tianyi 1 week ago
parent
commit
8577b37779
  1. 68
      package1/myCenter/merchantCenter.vue
  2. 10
      package1/myCenter/shopOrderList.vue

68
package1/myCenter/merchantCenter.vue

@ -64,15 +64,23 @@
待消费 待消费
</view> </view>
</view> </view>
<view class="order33" @tap="goDetail('db',7)">
<view class="order44">
0
</view>
<view class="order55">
待退款
</view>
</view>
<view class="order33" @tap="goDetail('db',11)"> <view class="order33" @tap="goDetail('db',11)">
<view class="order44"> <view class="order44">
0 0
</view> </view>
<view class="order55"> <view class="order55">
待退款/售后 待售后
</view> </view>
</view> </view>
<view class="order33" @tap="goDetail('db',5)"> <view class="order33" @tap="goDetail('pj')">
<view class="order44"> <view class="order44">
0 0
</view> </view>
@ -171,6 +179,7 @@
</template> </template>
<script> <script>
import base from '@/utils/ossUploadFile/base64.js';
export default { export default {
data() { data() {
return { return {
@ -248,7 +257,14 @@
url = '/package1/myCenter/shopBill' url = '/package1/myCenter/shopBill'
break; break;
case 'pj': case 'pj':
url = '/package1/group/shopEvaluate?item=' + JSON.stringify(uni.getStorageSync('schoolShop')) let item = {
shopScore:uni.getStorageSync('shopScore'),
id:uni.getStorageSync('id')
}
url = '/package1/group/shopEvaluate?item=' + JSON.stringify(item)
break;
case 'hx':
this.scanCodeAdd()
break; break;
default: default:
} }
@ -256,6 +272,52 @@
url: url url: url
}) })
}, },
//
scanCodeAdd() {
let that = this;
uni.scanCode({
success: (res) => {
if (res.scanType == "QR_CODE") { //
console.log('二维码',res)
// let shopId = base.decode(res.result.split(',')[1])
// if (shopId == uni.getStorageSync('shopId').substring('10', '12')) {
// that.productId = base.decode(res.result.split(',')[0])
// that.toggle('bottom', base.decode(res.result.split(',')[0]));
// } else {
// that.tui.toast('')
// }
} else {
console.log('条形码',res)
// that.tui.request("/app/product/getByBarcode", "POST", {
// barcode: res.result
// }, false, true).then((res1) => {
// if (res1.code == 200) {
// that.productId = res1.result[0].id
// if (res1.result == '') {
// that.tui.toast('')
// } else {
// that.toggle('bottom', res1.result[0].id);
// }
// } else {
// that.tui.toast(res.message)
// }
// }).catch((res) => {
// that.tui.toast(res)
// })
}
},
fail: (res) => {
uni.showToast({
title: '扫描失败',
icon: 'none'
})
}
})
},
back() { back() {
uni.navigateBack() uni.navigateBack()
}, },

10
package1/myCenter/shopOrderList.vue

@ -15,7 +15,7 @@
:scroll-with-animation="true"> :scroll-with-animation="true">
<view class="status-list"> <view class="status-list">
<view v-for="(item, index) in statusList" :key="index" class="status-item" <view v-for="(item, index) in statusList" :key="index" class="status-item"
:class="{ 'active': currentIndex === index }" @click="handleStatusClick(index,item.value)"> :class="{ 'active': currentIndex == item.value }" @click="handleStatusClick(item.value,item.value)">
<text class="status-text">{{ item.name }}</text> <text class="status-text">{{ item.name }}</text>
</view> </view>
</view> </view>
@ -35,8 +35,8 @@
</view> </view>
</view> </view>
<view style="height: 120rpx;padding-top: 20rpx;"> <view style="height: 120rpx;padding-top: 20rpx;">
<view style="height: 50rpx;line-height: 50rpx;font-size: 28rpx;font-weight: 700;"> <view style="height: 50rpx;line-height: 50rpx;font-size: 28rpx;font-weight: 700;display: flex;">
商品 <text><text>{{item.goodsNum}}</text></text> <text style="color: red;">已出餐</text> 商品 <text><text>{{item.goodsNum}}</text></text> <text style="color: red;flex: 1;text-align: right;">已出餐</text>
</view> </view>
<view style="display: flex;" v-for="(item1,index1) in item.goodsList" :key="index"> <view style="display: flex;" v-for="(item1,index1) in item.goodsList" :key="index">
<view style="flex: 1;"> <view style="flex: 1;">
@ -69,7 +69,7 @@
}, },
totalPages: 1, totalPages: 1,
orderList:[], orderList:[],
currentIndex: 0, currentIndex: 10,
menuButtonInfo: {}, menuButtonInfo: {},
statusList: [{ statusList: [{
name: '全部', name: '全部',
@ -195,7 +195,7 @@
}, },
goDetail(id){ goDetail(id){
uni.navigateTo({ uni.navigateTo({
url:'/package1/order/orderDetail?id=' + id url:'/package2/shop/orderDetail?id=' + id
}) })
}, },
handleStatusClick(index,value) { handleStatusClick(index,value) {

Loading…
Cancel
Save