|
|
- <template>
- <view class="list bx popup-bx">
- <view
- :class="{item : true, active : select == index}"
- @click="toPath(item, index)"
- v-for="(item, index) in list">
- <view class="icon">
- <image :src="'/static/tabbar/' + (index + 1) + '.png'" class="icon-image" mode=""></image>
- </view>
- <view class="title">
- {{ $t(item.title) }}
- </view>
- </view>
-
-
- <!-- 客服列表 -->
- <serviceList :show="showService" @close="closeServiceList"></serviceList>
- </view>
- </template>
-
- <script>
- import serviceList from '@/components/serviceList/serviceList.vue'
- export default {
- props : ['select'],
- components : {
- serviceList,
- },
- data() {
- return {
- // "list": [
- // {
- // "selectedIconPath": "/static/tabbar/2.png",
- // "iconPath": "/static/tabbar/1.png",
- // "pagePath": "/pages/home/home",
- // "title": "tabbar.title.1"
- // },{
- // "selectedIconPath": "/static/tabbar/4.png",
- // "iconPath": "/static/tabbar/3.png",
- // "pagePath": "/pages/prizeDraw/prizeDraw",
- // "title": "tabbar.title.2"
- // },{
- // "selectedIconPath": "/static/tabbar/6.png",
- // "iconPath": "/static/tabbar/5.png",
- // "pagePath": "/pages/order/order",
- // "title": "tabbar.title.3"
- // },{
- // "selectedIconPath": "/static/tabbar/8.png",
- // "iconPath": "/static/tabbar/7.png",
- // "pagePath": "/pages/center/center",
- // "title": "tabbar.title.4"
- // }
- // ],
- "list": [
- {
- "pagePath": "/pages/home/home",
- "title": "tabbar.title.1"
- },
- {
- "pagePath": "/pages/order/order",
- "title": "tabbar.title.2"
- },
- {
- "pagePath": "/pages/starting/starting",
- "title": "tabbar.title.3"
- },
- {
- "title": "tabbar.title.4"
- },
- {
- "pagePath": "/pages/center/center",
- "title": "tabbar.title.5"
- }
- ],
- showService: false,
- serverList: [],
- }
- },
- methods: {
- toPath(item, index){
- if(index == this.select){
- return
- }
-
- if(!item.pagePath){
- return this.revealServiceList()
- }
-
- this.$play()
- uni.redirectTo({
- url: item.pagePath
- })
- },
-
- //显示客服列表
- revealServiceList() {
- this.$play()
- this.showService = true;
- },
- //关闭客服列表
- closeServiceList() {
- this.$play()
- this.showService = false;
- },
- }
- }
- </script>
-
- <style scoped lang="scss">
- .list{
- position: fixed;
- width: 100vw;
- background-color: #000;
- display: flex;
- justify-content: center;
- align-items: center;
- height: 120rpx;
- z-index: 999;
- font-size: 20rpx;
- bottom: 0;
- left: 0;
- line-height: 50rpx;
- color: #fff;
- box-shadow: 0px 0rpx 10rpx 10rpx #00000022;
- width: 750rpx;
- font-weight: 500;
- .item:nth-child(2){
- // .icon{
- // .icon-image{
- // width: 95rpx;
- // height: 95rpx;
- // margin-top: -55rpx;
- // }
- // }
- }
- .item{
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- .icon{
- width: 100%;
- height: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- .icon-image{
- width: 45rpx;
- height: 45rpx;
- }
- }
- .icon-image{
- width: 100%;
- height: 50%;
- }
- .title{
- overflow:hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- -o-text-overflow:ellipsis;
- }
- }
- }
- .active{
- color: rgb(92, 173, 255) !important;
- }
- </style>
|