会员相关更新、商品列表更新

This commit is contained in:
GaoHao
2024-08-16 18:09:09 +08:00
26 changed files with 1891 additions and 2186 deletions

View File

@@ -9,7 +9,7 @@
</view>
<!-- 顶部面板 -->
<view class="top--panel">
<navseat :opacity='opacity' :search="true" @searchVal="searchVal" :titleshow='true' @navigateBacknav='navigateBacknav'
<navseat :opacity='opacity' :inputshow="true" :readonly="true" @searchStatus="searchStatus" :titleshow='true' @navigateBacknav='navigateBacknav'
:navigateBacknavtitle='true'></navseat>
<!-- 顶部面板可添加所需要放在页面顶部的内容代码比如banner图 -->
<image class="panelimgbackground"
@@ -59,14 +59,15 @@
<view v-if="item.isPauseSale != 0 " class="flex-between" style="margin-top: 32rpx;margin-bottom: 48rpx;">
<view v-if="item.isPauseSale != 0 || item.isSale == 0 " class="flex-between" style="margin-top: 32rpx;margin-bottom: 48rpx;">
<view class="panelfiveitemsex flex-between">
<view class="panelfiveitemsex_oen"><text>¥</text><text>{{item.lowPrice}}</text><text>/</text></view>
</view>
<view class="panelfiveitemNum" >
<view class="sku-wrap flex-center" style="background-color: #CECECE;">
<text class="t">已售罄</text>
<text class="t" v-if="item.isSale == 0" >非可售时间</text>
<text class="t" v-else-if="item.isPauseSale != 0" >已售罄</text>
</view>
</view>
</view>
@@ -106,7 +107,7 @@
</view>
</view>
<view v-if="item.isPauseSale != 0 " style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;background-color: rgba(255,255,255,0.5);"></view>
<view v-if="item.isPauseSale != 0 || item.isSale == 0" style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;z-index: 9,background-color: rgba(255,255,255,0.5);"></view>
</view>
</view>
</scroll-view>
@@ -143,7 +144,7 @@
<image class="goodsImg" src="@/static/1.gif" mode="" v-else :lazy-load="true"></image>
<view v-if="item.name=='热销'" class="topSort" :class="'c'+(index1+1)">TOP{{index1+1}}
</view>
<view class="goods_right">
<view class="goods_right" style="overflow: hidden;">
<!-- <text class="suit" v-if="item1.suit > 1">{{item1.suit}}份起点</text> -->
<view class="name">{{ item1.name }}</view>
<view class="lookBack" v-if="item.name=='热销'">本店回头客第{{index1+1}}</view>
@@ -151,11 +152,12 @@
<view class="monthlySale">月售{{item1.stockNumber}}</view>
<view v-if="item1.isPauseSale != 0 " class="flex-between">
<view v-if="item1.isPauseSale != 0 || item.isSale == 0 " class="flex-between">
<view class="money"><text class="money_num">{{ item1.lowPrice }}</text>/</view>
<view class="flex-end" >
<view class="sku-wrap flex-center" style="background-color: #CECECE;">
<text class="t">已售罄</text>
<text class="t" v-if="item1.isSale == 0" >非可售时间</text>
<text class="t" v-else-if="item1.isPauseSale != 0" >已售罄</text>
</view>
</view>
</view>
@@ -196,7 +198,7 @@
</view>
</view>
<view v-if="item1.isPauseSale != 0 " style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;background-color: rgba(255,255,255,0.5);"></view>
<view v-if="item1.isPauseSale != 0 || item1.isSale == 0 " style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;z-index: 9background-color: rgba(255,255,255,0.5);"></view>
</view>
</view>
<view class="fill-last" :style="{ 'height':fillHeight + 'px' }"></view>
@@ -444,8 +446,6 @@
this.tableCode = this.getQueryString(decodeURIComponent(e.q), 'code')
uni.cache.set('tableCode', this.tableCode)
}
uni.cache.set('types', 'types');
},
onUnload() {
if (this.socketTicket) {
@@ -465,10 +465,9 @@
scrollTop: 0,
duration: 0
});
if (!uni.cache.get('token')) {
await this.$onLaunched;
}
uni.$on('message', this.getMessage)
console.log(uni.cache.get('token'))
console.log(14)
_this.getLocation()
},
methods: {
@@ -494,6 +493,7 @@
userId: uni.cache.get('userInfo').id,
"type": "connect",
})
uni.$on('message', this.getMessage)
},
/**
@@ -563,7 +563,12 @@
// e.currentTarget.src
},
searchVal (e) {
searchStatus (e) {
if ( e == "searchClick" ) {
uni.navigateTo({
url: '/pages/order_food/order_food_search?tableCode=' + uni.cache.get('tableCode')
});
}
console.log(e)
},
@@ -736,7 +741,7 @@
* @param {Object} index1
*/
async clickspecifications(item1, index, index1, type) {
if ( item1.isPauseSale != 0 ) {
if ( item1.isPauseSale != 0 || item1.isSale == 0 ) {
return;
}
this.skuidname = []
@@ -956,6 +961,7 @@
* @param {Object} msg
*/
getMessage(msg) { //wss 回显数据
console.log(msg)
if (msg == 1) { // 网络在连接
this.fixedtrue = true
return false
@@ -1064,7 +1070,6 @@
/* 获取最后一项的高度,设置填充高度。判断和填充时做了 +-20 的操作,是为了滚动时更好的定位 */
let last = res[res.length - 1].height;
if (last - 20 < this.scrollHeight) {
// this.fillHeight = this.scrollHeight - last + 20; //这是吸到顶部的距离
this.fillHeight = 200;
}
});
@@ -1110,10 +1115,7 @@
</script>
<style lang="scss" scoped>
$bg: #fafafa;
$tabLeft: 200upx;
$itemH: 100upx;
$cartH: 90upx;
/* 容器 */
.container {
@@ -1310,8 +1312,7 @@
justify-content: flex-end;
.sku-wrap {
width: 138rpx;
height: 54rpx;
padding: 10rpx 20rpx;
background: #E3AD7F;
border-radius: 32rpx;
position: relative;
@@ -2077,8 +2078,7 @@
}
.sku-wrap {
width: 138rpx;
height: 54rpx;
padding: 10rpx 20rpx;
background: #E3AD7F;
border-radius: 32rpx;
// position: absolute;