更改订单
This commit is contained in:
@@ -16,11 +16,11 @@ const baseUrl = debug ? proxyApi : "https://wxcashiertest.sxczgkj.cn/cashierServ
|
||||
const baseUrlwws = 'ws://cashier.sxczgkj.cn/cashierService'
|
||||
// #endif
|
||||
// #ifdef APP || MP-WEIXIN
|
||||
// const baseUrl = 'https://cashier.sxczgkj.cn/cashierService'// 线上
|
||||
// const baseUrlwws = 'wss://cashier.sxczgkj.cn/cashierService' // 线上
|
||||
const baseUrl = 'https://cashier.sxczgkj.cn/cashierService'// 线上
|
||||
const baseUrlwws = 'wss://cashier.sxczgkj.cn/cashierService' // 线上
|
||||
// const baseUrl = 'http://192.168.2.42:9888/cashierService'// 测试-w
|
||||
const baseUrlwws ='wss://192.168.2.42:9999/cashierService' // 测试-w
|
||||
const baseUrl = 'https://wxcashiertest.sxczgkj.cn/cashierService'// 测试
|
||||
// const baseUrlwws ='wss://192.168.2.42:9999/cashierService' // 测试-w
|
||||
// const baseUrl = 'https://wxcashiertest.sxczgkj.cn/cashierService'// 测试
|
||||
// const baseUrlwws ='wss://wxcashiertest.sxczgkj.cn/cashierService' // 测试
|
||||
|
||||
// #endif
|
||||
|
||||
@@ -93,7 +93,8 @@
|
||||
</view>
|
||||
<view class="fivecontent_item_box">
|
||||
<view class="fivecontent_item_boxitem flex-between">
|
||||
<image :src="`${item.image}?x-oss-process=image/resize,m_lfit,w_192,h_192`" mode="aspectFill"></image>
|
||||
<image :src="`${item.image}?x-oss-process=image/resize,m_lfit,w_192,h_192`"
|
||||
mode="aspectFill"></image>
|
||||
<view class="fivecontent_item_boxitemleft flex-colum-start">
|
||||
<view class="fivecontent_item_boxitemleftone flex-between"
|
||||
style="display: flex;justify-content: space-between;align-items: center;">
|
||||
@@ -509,7 +510,9 @@
|
||||
|
||||
if (item.isChild) {
|
||||
this.form.type = '' //先清空后赋值
|
||||
this.showproductlist = true
|
||||
setTimeout(()=> {
|
||||
this.showproductlist = true
|
||||
}, 500);
|
||||
} else {
|
||||
this.showproductlist = false
|
||||
// 以下没有多选处理
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
console.log(e)
|
||||
try {
|
||||
this.types = e.type
|
||||
this.types = e.types
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
|
||||
@@ -2,38 +2,39 @@
|
||||
<view>
|
||||
<view class="navtab flex-center">
|
||||
<view class="navtabpost flex-center">
|
||||
<view :class="navtabindex == 0 ? 'navtabone':'navtabtow'" style="border-radius: 12rpx 0 0 12rpx;" @click="navtabclick(0)">
|
||||
团购订单
|
||||
</view>
|
||||
<view :class="navtabindex == 1 ? 'navtabone':'navtabtow'" style="border-radius: 0 12rpx 12rpx 0;" @click="navtabclick(1)">
|
||||
<view :class="navtabindex == 0 ? 'navtabone':'navtabtow'" @click="navtabclick(0)">
|
||||
到店订单
|
||||
</view>
|
||||
<view :class="navtabindex == 1 ? 'navtabone':'navtabtow'" @click="navtabclick(1)">
|
||||
团购订单
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-sticky bgColor="#fff">
|
||||
<view class="tab-wrap">
|
||||
<block v-if="navtabindex==0">
|
||||
<view class="item" v-for="(item, index) in tabs2" :key="index" @click="orderswitch(item,index)">
|
||||
<text >{{ item.name }}</text>
|
||||
<block v-if="navtabindex==1">
|
||||
<view class="item" v-for="(item, index) in tabs2" :key="index" @click="orderswitch(item,index)">
|
||||
<text>{{ item.name }}</text>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<block v-if="navtabindex==1">
|
||||
<view class="item" v-for="(item, index) in tabs" :key="index" @click="orderswitch(item,index)">
|
||||
<text >{{ item.name }}</text>
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="navtabindex==0">
|
||||
<view class="item" v-for="(item, index) in tabs" :key="index" @click="orderswitch(item,index)">
|
||||
<text>{{ item.name }}</text>
|
||||
</view>
|
||||
</block>
|
||||
<view class="line-wrap"
|
||||
:style="{ left: `${(100 / tabs.length) * active}%`, width: `${100 / tabs.length}%` }">
|
||||
<view class="line">
|
||||
<image style="width:40rpx; height: 10rpx;"
|
||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/today/dgs.png" mode="aspectFill">
|
||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/today/dgs.png"
|
||||
mode="aspectFill">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<view class="list-wrap" v-if="navtabindex == 1">
|
||||
<view class="list-wrap" v-if="navtabindex == 0">
|
||||
<view class="item" v-for="(item,index) in list" :key="index" @click="orderinfo(item)">
|
||||
<view class="header-wrap">
|
||||
<text v-if="item.sendType == 'post'">快递</text>
|
||||
@@ -98,7 +99,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 新订单 -->
|
||||
<view class="orderList" v-if="navtabindex == 0">
|
||||
<view class="orderList" v-if="navtabindex == 1">
|
||||
<view class="listBox" v-for="(item,i) in groupList" :key="i" @click="orderinfoTo(item)">
|
||||
<view class="df">
|
||||
<view style="display: flex;">
|
||||
@@ -117,10 +118,8 @@
|
||||
<view>实付:<text style="color: #FF4C11;">¥{{item.payAmount}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<button v-if="item.status=='unused'" type="primary" class="buttonStyle"
|
||||
>查看券码</button>
|
||||
<button v-if="item.status=='unpaid'" type="primary" class="buttonStyle"
|
||||
>去付款</button>
|
||||
<button v-if="item.status=='unused'" type="primary" class="buttonStyle">查看券码</button>
|
||||
<button v-if="item.status=='unpaid'" type="primary" class="buttonStyle">去付款</button>
|
||||
</view>
|
||||
</view>
|
||||
<image style="margin:32rpx auto;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png"
|
||||
@@ -213,7 +212,7 @@
|
||||
this.init_fn()
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.navtabindex == 0) {
|
||||
if (this.navtabindex == 1) {
|
||||
// 获取团购订单
|
||||
this.getorderList()
|
||||
} else {
|
||||
@@ -264,7 +263,7 @@
|
||||
this.form.page = 1
|
||||
this.form.size = 10
|
||||
this.form.status = 'loadmore'
|
||||
if (this.navtabindex == 0) {
|
||||
if (this.navtabindex == 1) {
|
||||
// 获取团购订单
|
||||
this.getorderList()
|
||||
} else {
|
||||
@@ -353,18 +352,20 @@
|
||||
|
||||
.navtabpost {
|
||||
position: relative;
|
||||
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
padding:0 10rpx;
|
||||
.navtabone {
|
||||
// margin-left: -10rpx;
|
||||
width: 162rpx;
|
||||
height: 56rpx;
|
||||
width: 166rpx;
|
||||
height: 36rpx;
|
||||
background: #FFEAB1;
|
||||
// border-radius: 12rpx 0 0 12rpx;
|
||||
border-radius: 12rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 56rpx;
|
||||
line-height: 36rpx;
|
||||
text-align: center;
|
||||
z-index: 10;
|
||||
}
|
||||
@@ -372,11 +373,10 @@
|
||||
.navtabtow {
|
||||
// margin-left: -10rpx;
|
||||
z-index: 9;
|
||||
width: 166rpx;
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
text-align: center;
|
||||
background: #FFFFFF;
|
||||
// border-radius: 0 12rpx 12rpx 0;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
|
||||
@@ -323,16 +323,26 @@
|
||||
let res = await this.api.productqueryShopIdByTableCode({
|
||||
code: uni.cache.get('tableCode')
|
||||
})
|
||||
try {
|
||||
if (res.data) {
|
||||
let time = new Date
|
||||
console.log(time, '时间戳')
|
||||
uni.cache.set('shopUser', res.data)
|
||||
this.handlemessage()
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
if (res.code == 0) {
|
||||
let time = new Date
|
||||
console.log(time, '时间戳')
|
||||
uni.cache.set('shopUser', res.data)
|
||||
this.handlemessage()
|
||||
}else{
|
||||
setTimeout(()=>{
|
||||
uni.pro.switchTab('index/index')
|
||||
},1000)
|
||||
}
|
||||
// try {
|
||||
// if (res.data) {
|
||||
// let time = new Date
|
||||
// console.log(time, '时间戳')
|
||||
// uni.cache.set('shopUser', res.data)
|
||||
// this.handlemessage()
|
||||
// }
|
||||
// } catch (e) {
|
||||
// //TODO handle the exception
|
||||
// }
|
||||
},
|
||||
getMessage(msg) { //wss 回显数据
|
||||
if (msg.status != 'success') {
|
||||
|
||||
Reference in New Issue
Block a user