| | |
| | | v-for="(item, index) in titleList" |
| | | :key="index" |
| | | :class="{active: selectedTitleIndex === item.index, 'title-item': true}" |
| | | :style="{color: textColor}" |
| | | @click="changeTab(item)" |
| | | > |
| | | <text>{{item.title}}</text> |
| | | <view class="underline" v-if="selectedTitleIndex === item.index"></view> |
| | | <view class="underline" :style="{backgroundColor: textColor}" v-if="selectedTitleIndex === item.index"></view> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | |
| | | selectedTitleIndex: { |
| | | type: String, |
| | | default: 'home' |
| | | }, |
| | | textColor: { |
| | | type: String, |
| | | default: 'white' |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | position: relative; |
| | | padding: 0 24rpx; |
| | | font-size: 32rpx; |
| | | color: white; |
| | | /* color: white; */ |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | transform: translateX(-50%); |
| | | width: calc(100% - 76rpx); |
| | | height: 4rpx; |
| | | background-color: white; |
| | | /* background-color: white; */ |
| | | border-radius: 4rpx; |
| | | } |
| | | </style> |
| | |
| | | }, |
| | | { |
| | | // "pagePath": "/pages/tabbar/category/category", |
| | | "pagePath": "/pages/commodity-square/commoditySquare", |
| | | "pagePath": "/pages/kitchen/KitchenVideo", |
| | | |
| | | "iconPath": "/static/tabbar/category.png", |
| | | "selectedIconPath": "/static/tabbar/category-s.png", |
| | | "text": "商城", |
| | | "key": 'shop' |
| | | "text": "神厨", |
| | | "key": 'kitchen' |
| | | }, |
| | | { |
| | | "pagePath": "/pages/tabbar/video/video", |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/kitchen/KitchenVideo", |
| | | "style": { |
| | | "navigationBarTitleText": "神厨", |
| | | "navigationStyle": "custom" // 隐藏系统导航栏 |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/tabbar/home/title", |
| | | "style": { |
| | | "navigationBarTitleText": "消息" |
| | |
| | | "navigationStyle": "custom" |
| | | } |
| | | }] |
| | | }, |
| | | { |
| | | "root": "pages/kitchen", |
| | | "pages": [{ |
| | | "path": "KitchenVideo", |
| | | "style": { |
| | | "navigationBarTitleText": "厨神" |
| | | } |
| | | }] |
| | | }, |
| | | { |
| | | "root": "pages/supplier", |
| | | "pages": [{ |
| | | "path" : "suppler-order/suppler-order", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "" |
| | | } |
| | | }] |
| | | } |
| | | |
| | | // , |
| | | // { |
| | | // "root": "pages/commodity-square", |
| | |
| | | "selectedIconPath": "static/tabbar/home-s.png", |
| | | "text": "首页" |
| | | }, |
| | | // { |
| | | // // "pagePath": "pages/tabbar/category/category", |
| | | // "pagePath": "pages/commodity-square/commoditySquare", |
| | | // "iconPath": "static/tabbar/category.png", |
| | | // "selectedIconPath": "static/tabbar/category-s.png", |
| | | // "text": "商城" |
| | | // }, |
| | | { |
| | | // "pagePath": "pages/tabbar/category/category", |
| | | "pagePath": "pages/kitchen/KitchenVideo", |
| | | "iconPath": "static/tabbar/category.png", |
| | | "selectedIconPath": "static/tabbar/category-s.png", |
| | | "text": "神厨" |
| | | }, |
| | | { |
| | | "pagePath": "pages/tabbar/video/video", |
| | | "iconPath": "static/tabbar/video.png", |
| | |
| | | <template> |
| | | <view class="container"> |
| | | <top-bar selectedTitleIndex="shop" @changeTab="topBarChange" class="topBar"></top-bar> |
| | | <top-bar selectedTitleIndex="shop" textColor="black" @changeTab="topBarChange" class="topBar"></top-bar> |
| | | <input type="text" v-show="false" v-model="flushDom" /> |
| | | <view class="search"> |
| | | <u-search class="nav-search" @blur='searchGoods' placeholder="搜索商品" :show-action="false"></u-search> |
| | |
| | | <view class="openShowLeft" @click="showDrawer('showLeft')" v-if="!showLeft"> |
| | | <uni-icons type="right" size="30"></uni-icons> |
| | | </view> |
| | | <uni-drawer ref="showLeft" mode="left" width="120" height="94vh" @change="change($event,'showLeft')" |
| | | <uni-drawer ref="showLeft" mode="left" width="120" height="80vh" @change="change($event,'showLeft')" |
| | | :cus-style="true" class="navigationLeft"> |
| | | <scroll-view class="typeNavigation" :scroll-y="true" show-scrollbar="false"> |
| | | <view class="typeNavigationItem" :class="{typeNavigationItemCheck:currentCategort ==item.id}" |
| | |
| | | |
| | | .openShowLeft { |
| | | position: fixed; |
| | | top: 120rpx; |
| | | top: 200rpx; |
| | | left: 0; |
| | | align-items: center; |
| | | justify-content: flex-start; |
| | |
| | | <template> |
| | | <view class="video-container"> |
| | | <top-bar selectedTitleIndex="health" @changeTab="topBarChange" class="topBar"></top-bar> |
| | | <top-bar selectedTitleIndex="health" textColor="black" @changeTab="topBarChange" class="topBar"></top-bar> |
| | | <!-- 视频加载 --> |
| | | <zero-loading v-show="videoLoading" type="circle" color="#0ebd57" text=""></zero-loading> |
| | | <!-- 视频列表 --> |
| | |
| | | import { getUserInfo } from "@/api/members"; |
| | | import storage from "@/utils/storage.js"; |
| | | export default { |
| | | components: {TopBar}, |
| | | computed: { |
| | | hasPlayTime() { |
| | | return this.sliderFormatTime(this.progress > 0 ? this.duration * this.progress / 100 : 0); |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | topBarChange(titleObj) { |
| | | if (titleObj.index === 'home') { |
| | | uni.switchTab({ |
| | | url: titleObj.pagePath |
| | | }); |
| | | } else { |
| | | uni.redirectTo({ |
| | | url: titleObj.pagePath |
| | | }); |
| | | } |
| | | }, |
| | | // 静默登录 |
| | | wxSilentLogin(callback) { |
| | | //获取code |
| | |
| | | </scroll-view> |
| | | </uni-drawer> |
| | | <view v-if="videoList.length===0" style="display: flex;align-items: center;justify-content: center;background-color: #fff;height: 100%">当前没有可以查看的视频</view> |
| | | |
| | | <custom-tabbar bgColor="#ffffff" selected="kitchen"></custom-tabbar> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | <template> |
| | | <view class="wrapper"> |
| | | <top-bar selectedTitleIndex="activity" @changeTab="topBarChange" class="topBar"></top-bar> |
| | | <top-bar selectedTitleIndex="activity" textColor="black" @changeTab="topBarChange" class="topBar"></top-bar> |
| | | |
| | | <view style="height: 100rpx"></view> |
| | | <!-- 内容区域 --> |
| | |
| | | <template> |
| | | <view class="video-container"> |
| | | <top-bar selectedTitleIndex="home" @changeTab="topBarChange" class="topBar"></top-bar> |
| | | <top-bar selectedTitleIndex="home" textColor="white" @changeTab="topBarChange" class="topBar"></top-bar> |
| | | <!-- 视频加载 --> |
| | | <zero-loading v-show="videoLoading" type="circle" color="#0ebd57" text=""></zero-loading> |
| | | <!-- 视频列表 --> |
| | |
| | | } |
| | | .custom-style{ |
| | | border-radius: 0 24rpx 24rpx 0; |
| | | top: 100px; |
| | | } |
| | | |
| | | .uni-drawer--left { |