订单相关修改提测
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
<page-meta :page-style="'overflow:'+(pagemetashow?'hidden':'visible')"></page-meta>
|
||||
<view class="container">
|
||||
<!-- 占位符 接口请求完毕才显示 -->
|
||||
<view v-if="fixedtrue"
|
||||
<!-- <view v-if="fixedtrue"
|
||||
style="height: 100vh; width: 100%; position: fixed; z-index: 999; top: 0; left: 0; background-color: #fff; display: flex; justify-content: center; align-items: center;">
|
||||
<image style="width: 140rpx; height: 140rpx;" src="@/static/1.gif" mode="aspectFill"></image>
|
||||
<text style="margin-left:10rpx;font-size: 40rpx;color: #7d7d76;">加载中</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- 顶部面板 -->
|
||||
<view class="top--panel">
|
||||
<navseat :opacity='opacity' :inputshow="true" :readonly="true" @searchStatus="searchStatus" :titleshow='true' @navigateBacknav='navigateBacknav'
|
||||
@@ -243,7 +243,7 @@
|
||||
<view class="list-wrap">
|
||||
<view class="shop-item" v-for="(item,index) in cartLists.data" :key="item.id">
|
||||
<view class="cover">
|
||||
<c-image :src="item.coverImg" width="120" height="120"></c-image>
|
||||
<u-image :src="item.coverImg" width="120" height="120"></u-image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="name"> {{ item.name }} </view>
|
||||
@@ -427,6 +427,7 @@
|
||||
orderdetailFlag: true,
|
||||
forceUpdate: false,
|
||||
shopExtend: null,
|
||||
shopId: null,
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
@@ -468,8 +469,11 @@
|
||||
}
|
||||
},
|
||||
onHide() {
|
||||
this.socketTicket.Close()
|
||||
uni.$off('message')
|
||||
if (this.socketTicket) {
|
||||
this.socketTicket.Close()
|
||||
uni.$off('message')
|
||||
}
|
||||
|
||||
this.fixedtrue = true
|
||||
},
|
||||
async onShow() {
|
||||
@@ -489,7 +493,7 @@
|
||||
*/
|
||||
async getShopExtend () {
|
||||
let res = await this.api.getShopExtend({
|
||||
shopId: uni.cache.get('shopUser'),
|
||||
shopId: this.shopId,
|
||||
autokey: "shopInfo_bg" //index_bg my_bg member_bg shopInfo_bg
|
||||
})
|
||||
if ( res.code == 0) {
|
||||
@@ -514,7 +518,7 @@
|
||||
this.socketTicket ? this.socketTicket.Close() : null //调用前先判断是否有socket正在进行 先关闭后链接
|
||||
this.socketTicket = new webSocketUtils(`${uni.conf.baseUrlwws}`, 5000, {
|
||||
tableId: uni.cache.get('tableCode'),
|
||||
shopId: uni.cache.get('shopUser'),
|
||||
shopId: this.shopId,
|
||||
userId: uni.cache.get('userInfo').id,
|
||||
"type": "connect",
|
||||
})
|
||||
@@ -573,7 +577,9 @@
|
||||
'',
|
||||
})
|
||||
if (res.code == 0) {
|
||||
uni.cache.set('shopUser', res.data.storeInfo.id)
|
||||
let expireTime = uni.utils.timestamp() + 30 * 60; // 有效期
|
||||
uni.cache.set('shopId', res.data.storeInfo.id, expireTime)
|
||||
this.shopId = res.data.storeInfo.id;
|
||||
this.shopInfo = res.data;
|
||||
this.productqueryProduct() //list 数据
|
||||
this.handlemessage() //监听websocket返回
|
||||
@@ -691,7 +697,7 @@
|
||||
"type": a == '+' ? 1 : 0,
|
||||
"isVip": item.isVip,
|
||||
"productId": item.id, //商品id
|
||||
"shopId": uni.cache.get('shopUser'),
|
||||
"shopId": this.shopId,
|
||||
"userId": uni.cache.get('userInfo').id,
|
||||
"tableId": uni.cache.get('tableCode'),
|
||||
}
|
||||
@@ -715,7 +721,7 @@
|
||||
"type": c == '+' ? 1 : 0,
|
||||
"isVip": item.isVip,
|
||||
"productId": item.productId, //商品id
|
||||
"shopId": uni.cache.get('shopUser'),
|
||||
"shopId": this.shopId,
|
||||
"userId": uni.cache.get('userInfo').id,
|
||||
"tableId": uni.cache.get('tableCode'),
|
||||
}
|
||||
@@ -743,7 +749,7 @@
|
||||
*/
|
||||
async cartclear() {
|
||||
let res = await this.api.cleanCart({
|
||||
"shopId": uni.cache.get('shopUser'),
|
||||
"shopId": this.shopId,
|
||||
"tableId": uni.cache.get('tableCode'),
|
||||
})
|
||||
},
|
||||
@@ -964,7 +970,7 @@
|
||||
// console.log(this.skuidname.join(","))
|
||||
let res = await this.api.productqueryProductSku({
|
||||
code: uni.cache.get('tableCode'),
|
||||
shopId: uni.cache.get('shopUser'),
|
||||
shopId: this.shopId,
|
||||
productId: item.id, //商品id
|
||||
isVip: item.isVip, //商品id
|
||||
spec_tag: this.skuidname.join(","),
|
||||
@@ -978,7 +984,7 @@
|
||||
"type": c == '+' ? 1 : 0,
|
||||
"productId": item.id, //商品id
|
||||
"isVip": item.isVip,
|
||||
"shopId": uni.cache.get('shopUser'),
|
||||
"shopId": this.shopId,
|
||||
"userId": uni.cache.get('userInfo').id,
|
||||
"tableId": uni.cache.get('tableCode'),
|
||||
}
|
||||
@@ -1018,7 +1024,7 @@
|
||||
return false
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/order_food/confirm_order?storeInfo=' + JSON.stringify(this.shopInfo.storeInfo)
|
||||
url: `/pages/order_food/confirm_order?storeInfo=${JSON.stringify(this.shopInfo.storeInfo)}&cartList=${JSON.stringify(this.cartLists)}`
|
||||
});
|
||||
|
||||
},
|
||||
@@ -1102,7 +1108,7 @@
|
||||
*/
|
||||
async productqueryProduct() {
|
||||
let res = await this.api.productqueryProduct({
|
||||
"shopId": uni.cache.get('shopUser'),
|
||||
"shopId": this.shopId,
|
||||
"productGroupId": ''
|
||||
})
|
||||
if (res.code == 0) {
|
||||
@@ -1203,7 +1209,9 @@
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
align-content: flex-start;
|
||||
|
||||
::v-deep .u-input input{
|
||||
background-color: transparent;
|
||||
}
|
||||
.navbarcontent .active {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user