Merge remote-tracking branch 'origin/dev' into dev
| | |
| | | <!-- components/custom-tabbar.vue --> |
| | | <template> |
| | | <view class="custom-tabbar" :style="{backgroundColor: bgColor}"> |
| | | <view |
| | | v-for="(item, index) in list" |
| | | :key="index" |
| | | class="tabbar-item" |
| | | @click="switchTab(item)" |
| | | > |
| | | <image |
| | | :src="selected === item.key ? item.selectedIconPath : item.iconPath" |
| | | :class="{'tabbar-icon': true, 'video-add': item.key == 'video'}" |
| | | /> |
| | | <text class="tabbar-text" v-if="item.text" :style="{color: selected === item.key ? selectedTextColor : color}"> |
| | | {{item.text}} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | <view class="custom-tabbar" :style="{backgroundColor: bgColor, marginBottom: marginBottom + 'px'}"> |
| | | <view v-for="(item, index) in list" :key="index" class="tabbar-item" @click="switchTab(item)"> |
| | | <image :src="selected === item.key ? item.selectedIconPath : item.iconPath" |
| | | :class="{'tabbar-icon': true, 'video-add': item.key == 'video'}" /> |
| | | <text class="tabbar-text" v-if="item.text" |
| | | :style="{color: selected === item.key ? selectedTextColor : color}"> |
| | | {{item.text}} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "CustomTabbar", |
| | | props: { |
| | | selected: { |
| | | type: String, |
| | | default: 'index' |
| | | }, |
| | | bgColor: { |
| | | type: String, |
| | | default: '#333333' |
| | | }, |
| | | selectedTextColor: { |
| | | type: String, |
| | | default: '#ff573e' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | color: '#999999', |
| | | list: [ |
| | | { |
| | | "pagePath": "/pages/tabbar/index/home", |
| | | "iconPath": "/static/tabbar/home.png", |
| | | "selectedIconPath": "/static/tabbar/home-s.png", |
| | | "text": "首页", |
| | | "key": 'index' |
| | | }, |
| | | { |
| | | // "pagePath": "/pages/tabbar/category/category", |
| | | "pagePath": "/pages/kitchen/KitchenVideo", |
| | | |
| | | "iconPath": "/static/tabbar/category.png", |
| | | "selectedIconPath": "/static/tabbar/category-s.png", |
| | | "text": "神厨", |
| | | "key": 'kitchen' |
| | | }, |
| | | { |
| | | "pagePath": "/pages/tabbar/video/video", |
| | | "iconPath": "/static/tabbar/video1.png", |
| | | "selectedIconPath": "/static/tabbar/video1-selected.png", |
| | | "key": 'video' |
| | | export default { |
| | | name: "CustomTabbar", |
| | | props: { |
| | | selected: { |
| | | type: String, |
| | | default: 'index' |
| | | }, |
| | | { |
| | | "pagePath": "/pages/tabbar/cart/cartList", |
| | | "iconPath": "/static/tabbar/cart.png", |
| | | "selectedIconPath": "/static/tabbar/cart-s.png", |
| | | "text": "购物车", |
| | | "key": 'buyCar' |
| | | }, |
| | | { |
| | | "pagePath": "/pages/tabbar/user/my", |
| | | "iconPath": "/static/tabbar/mine.png", |
| | | "selectedIconPath": "/static/tabbar/mine-s.png", |
| | | "text": "我的", |
| | | "key": 'my' |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | methods: { |
| | | switchTab(item) { |
| | | console.log("执行力", item); |
| | | if (this.selected === item.key) return; |
| | | uni.switchTab({ |
| | | url: item.pagePath |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | bgColor: { |
| | | type: String, |
| | | default: '#333333' |
| | | }, |
| | | selectedTextColor: { |
| | | type: String, |
| | | default: '#ff573e' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | color: '#999999', |
| | | marginBottom: 0, |
| | | list: [{ |
| | | "pagePath": "/pages/tabbar/index/home", |
| | | "iconPath": "/static/tabbar/home.png", |
| | | "selectedIconPath": "/static/tabbar/home-s.png", |
| | | "text": "首页", |
| | | "key": 'index' |
| | | }, |
| | | { |
| | | // "pagePath": "/pages/tabbar/category/category", |
| | | "pagePath": "/pages/kitchen/KitchenVideo", |
| | | |
| | | "iconPath": "/static/tabbar/category.png", |
| | | "selectedIconPath": "/static/tabbar/category-s.png", |
| | | "text": "神厨", |
| | | "key": 'kitchen' |
| | | }, |
| | | { |
| | | "pagePath": "/pages/tabbar/video/video", |
| | | "iconPath": "/static/tabbar/video1.png", |
| | | "selectedIconPath": "/static/tabbar/video1-selected.png", |
| | | "key": 'video' |
| | | }, |
| | | { |
| | | "pagePath": "/pages/tabbar/cart/cartList", |
| | | "iconPath": "/static/tabbar/cart.png", |
| | | "selectedIconPath": "/static/tabbar/cart-s.png", |
| | | "text": "购物车", |
| | | "key": 'buyCar' |
| | | }, |
| | | { |
| | | "pagePath": "/pages/tabbar/user/my", |
| | | "iconPath": "/static/tabbar/mine.png", |
| | | "selectedIconPath": "/static/tabbar/mine-s.png", |
| | | "text": "我的", |
| | | "key": 'my' |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | created() { |
| | | console.log("底部安全区域", uni.getSystemInfoSync().safeAreaInsets); |
| | | this.marginBottom = uni.getSystemInfoSync().safeAreaInsets.bottom |
| | | }, |
| | | methods: { |
| | | switchTab(item) { |
| | | console.log("执行力", item); |
| | | if (this.selected === item.key) return; |
| | | uni.switchTab({ |
| | | url: item.pagePath |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .custom-tabbar { |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | right: 0; |
| | | height: 50px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-around; |
| | | border-top: 1px solid #ededed; |
| | | box-sizing: border-box; |
| | | } |
| | | .custom-tabbar { |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | right: 0; |
| | | height: 50px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-around; |
| | | border-top: 1px solid #ededed; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .tabbar-item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .video-add { |
| | | width: 30px !important; |
| | | height: 30px !important; |
| | | } |
| | | .tabbar-icon { |
| | | width: 24px; |
| | | height: 24px; |
| | | margin-bottom: 4px; |
| | | } |
| | | .tabbar-item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .tabbar-text { |
| | | font-size: 10px; |
| | | } |
| | | .video-add { |
| | | width: 30px !important; |
| | | height: 30px !important; |
| | | } |
| | | |
| | | .tabbar-icon { |
| | | width: 24px; |
| | | height: 24px; |
| | | margin-bottom: 4px; |
| | | } |
| | | |
| | | .tabbar-text { |
| | | font-size: 10px; |
| | | } |
| | | </style> |
| | |
| | | @touchstart.stop="handleTouchStart" |
| | | @touchmove.stop="handleTouchMove" |
| | | @touchend.stop="handleTouchEnd" |
| | | :style="{bottom: marginBottom + 'px'}" |
| | | class="container"> |
| | | <!-- 进度条 - 整个区域可拖动 --> |
| | | <view class="process-warp" :style="{ opacity: showProcess ? 1 : 0 }"> |
| | |
| | | |
| | | |
| | | <!-- 视频信息层 --> |
| | | <view class="video-info"> |
| | | <view class="video-info" :style="{bottom: marginBottom + 20 + 'px'}"> |
| | | <view> |
| | | <text class="video-author">@{{item.authorName}}</text> |
| | | </view> |
| | |
| | | pageNumber: 1, |
| | | pageSize: 10, |
| | | videoFrom: 'recommend' |
| | | } |
| | | }, |
| | | marginBottom: 0 // 底部安全区域 |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | this.startHidenTime = Date.now() |
| | | }, |
| | | onLoad(option) { |
| | | this.marginBottom = uni.getSystemInfoSync().safeAreaInsets.bottom |
| | | const token = storage.getAccessToken(); |
| | | if (! token) { |
| | | this.wxSilentLogin(() => { |
| | |
| | | @touchstart.stop="handleTouchStart" |
| | | @touchmove.stop="handleTouchMove" |
| | | @touchend.stop="handleTouchEnd" |
| | | :style="{bottom: marginBottom + 'px'}" |
| | | class="container"> |
| | | <!-- 进度条 - 整个区域可拖动 --> |
| | | <view class="process-warp" :style="{ opacity: showProcess ? 1 : 0 }"> |
| | |
| | | |
| | | |
| | | <!-- 视频信息层 --> |
| | | <view class="video-info"> |
| | | <view class="video-info" :style="{bottom: marginBottom + 20 + 'px'}"> |
| | | <view> |
| | | <text class="video-author">@{{item.authorName}}</text> |
| | | </view> |
| | |
| | | pageSize: 6, |
| | | videoFrom: 'recommend', |
| | | videoType: 'cook' |
| | | } |
| | | }, |
| | | marginBottom: 0 // 底部安全区域 |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | this.startHidenTime = Date.now() |
| | | }, |
| | | onLoad() { |
| | | // 获取状态栏高度 |
| | | const systemInfo = uni.getSystemInfoSync(); |
| | | this.buttonHeight = systemInfo.statusBarHeight; |
| | | this.getKitchenTypeList(); |
| | | this.loadVideos(); |
| | | this.marginBottom = uni.getSystemInfoSync().safeAreaInsets.bottom |
| | | // 获取状态栏高度 |
| | | const systemInfo = uni.getSystemInfoSync(); |
| | | this.buttonHeight = systemInfo.statusBarHeight; |
| | | this.getKitchenTypeList(); |
| | | this.loadVideos(); |
| | | }, |
| | | onReady() { |
| | | // 初始化视频上下文 |
| | |
| | | .video-item { |
| | | width: 100%; |
| | | height: 100%; |
| | | object-fit: cover; |
| | | } |
| | | |
| | | .play-icon { |
| | |
| | | </div> |
| | | </u-navbar> |
| | | <!-- 空白页--> |
| | | <view v-if="!loading && (cartDetail.cartList == '' || cartDetail.cartList == [] || !cartDetail)" class="empty"> |
| | | <view v-if="!loading && (cartDetail.cartList == '' || cartDetail.cartList == [] || !cartDetail)" class="empty" :style="{height: windowHeight - marginBottom - 50 + 'px'}"> |
| | | <image src="/static/emptyCart.png" mode="aspectFit"></image> |
| | | <view class="empty-tips"> |
| | | 空空如也 |
| | |
| | | </view> |
| | | </view> |
| | | <!-- 店铺商品信息 --> |
| | | <div class="content"> |
| | | <div class="content" :style="{height: windowHeight - marginBottom - 50 + 'px'}"> |
| | | <div class="box box2" :class="{ invalid: isInvalid(item) }" v-for="(item, index) in cartDetail.cartList" |
| | | :key="index"> |
| | | <view class="tab"> |
| | |
| | | <u-modal v-model="deleteShow" :confirm-style="{'color':lightColor}" @confirm="deleteConfirm" show-cancel-button |
| | | :content="deleteContent" :async-close="true"></u-modal> |
| | | <!-- 结账 --> |
| | | <div class="box box6"> |
| | | <div class="box box6" :style="{bottom: marginBottom + 50 + 'px'}"> |
| | | <view class="navL"> |
| | | <u-checkbox shape="circle" :active-color="lightColor" v-model="checkout" @change="checkOut()" label-size="24">全选 |
| | | </u-checkbox> |
| | |
| | | isEdit: false, // 是否是编辑 |
| | | checkout: false, //全选按钮 |
| | | WEIXIN_num: "", //购物车兼容微信步进器 |
| | | marginBottom: 0 ,// 底部安全区域 |
| | | windowHeight: 0 // 可使用屏幕高度 |
| | | }; |
| | | }, |
| | | |
| | | mounted() { |
| | | this.marginBottom = uni.getSystemInfoSync().safeAreaInsets.bottom |
| | | this.windowHeight = uni.getSystemInfoSync().windowHeight |
| | | // #ifdef MP-WEIXIN |
| | | // 小程序默认分享 |
| | | uni.showShareMenu({ withShareTicket: true }); |
| | |
| | | @touchstart.stop="handleTouchStart" |
| | | @touchmove.stop="handleTouchMove" |
| | | @touchend.stop="handleTouchEnd" |
| | | :style="{bottom: marginBottom + 'px'}" |
| | | class="container"> |
| | | <!-- 进度条 - 整个区域可拖动 --> |
| | | <view class="process-warp" :style="{ opacity: showProcess ? 1 : 0 }"> |
| | |
| | | |
| | | |
| | | <!-- 视频信息层 --> |
| | | <view class="video-info"> |
| | | <view class="video-info" :style="{bottom: marginBottom + 20 + 'px'}"> |
| | | <view> |
| | | <text class="video-author">@{{item.authorName}}</text> |
| | | </view> |
| | |
| | | pageNumber: 1, |
| | | pageSize: 10, |
| | | videoFrom: 'recommend' |
| | | } |
| | | }, |
| | | marginBottom: 0 // 底部安全区域 |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | this.startHidenTime = Date.now() |
| | | }, |
| | | onLoad(option) { |
| | | this.marginBottom = uni.getSystemInfoSync().safeAreaInsets.bottom |
| | | const token = storage.getAccessToken(); |
| | | if (! token) { |
| | | this.wxSilentLogin(() => { |
| | |
| | | <view>我的活动</view> |
| | | </view> |
| | | |
| | | <view class="interact-item" @click="navigateTo('/pages/mine/activity/reportActivity')"> |
| | | <image src="/static/mine/shensu.png" mode=""></image> |
| | | <view>活动</view> |
| | | </view> |
| | | |
| | | <view class="interact-item" @click="navigateTo('/pages/mine/myCollect/myCollect')"> |
| | | <image src="/static/mine/shensu.png" mode=""></image> |
| | | <view>我的收藏</view> |
| | |
| | | |
| | | |
| | | |
| | | <view class="interact-item" @click="navigateTo('/pages/mine/signIn')"> |
| | | <!-- <view class="interact-item" @click="navigateTo('/pages/mine/signIn')"> |
| | | <image src="/static/mine/sign.png" mode=""></image> |
| | | <view>每日签到</view> |
| | | </view> |
| | | </view> --> |
| | | |
| | | <view class="interact-item" @click="navigateTo('/pages/cart/coupon/couponCenter')"> |
| | | <image src="/static/mine/couponcenter.png" mode=""></image> |
| | |
| | | |
| | | |
| | | |
| | | <view class="interact-item" @click="navigateTo('/pages/promotion/bargain/log')"> |
| | | <!-- <view class="interact-item" @click="navigateTo('/pages/promotion/bargain/log')"> |
| | | <image src="/static/mine/kanjia.png" mode=""></image> |
| | | <view>砍价记录</view> |
| | | </view> |
| | | </view> --> |
| | | |
| | | |
| | | |
| | |
| | | @touchmove="handleSwiperMove" |
| | | @touchend="handleSwiperEnd(item)" |
| | | > |
| | | <view style="width: 100%;height: 100%;" v-if="item.videoContentType === 'video'"> |
| | | <view :style="{width: '100%', height: windowHeight - marginBottom + 'px'}" v-if="item.videoContentType === 'video'"> |
| | | <!-- 播放按钮(仅当视频暂停时显示) --> |
| | | <view |
| | | class="play-icon" |
| | |
| | | pageSize: 10, |
| | | authorId: '', |
| | | videoFrom: '' |
| | | } |
| | | }, |
| | | marginBottom: 0, // 底部安全区域 |
| | | windowHeight: 0 // 可使用屏幕高度 |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | |
| | | }, |
| | | onLoad(option) { |
| | | this.marginBottom = uni.getSystemInfoSync().safeAreaInsets.bottom |
| | | this.windowHeight = uni.getSystemInfoSync().windowHeight |
| | | const playInfo = uni.getStorageSync("playInfo", playInfo); |
| | | if(playInfo) { |
| | | this.currentIndex = playInfo.playIndex; |
| | |
| | | .video-info { |
| | | width: 70%; |
| | | position: absolute; |
| | | bottom: 20px; |
| | | bottom: 40px; |
| | | left: 20px; |
| | | color: #f8f8f8; |
| | | z-index: 10; |
| | |
| | | flex-direction: column; |
| | | align-items: center; |
| | | position: absolute; |
| | | bottom: 0; |
| | | bottom: 20px; |
| | | width: 100%; |
| | | } |
| | | |