|
|
|
@ -64,15 +64,23 @@ |
|
|
|
待消费 |
|
|
|
</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="order44"> |
|
|
|
0 |
|
|
|
</view> |
|
|
|
<view class="order55"> |
|
|
|
待退款/售后 |
|
|
|
待售后 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="order33" @tap="goDetail('db',5)"> |
|
|
|
<view class="order33" @tap="goDetail('pj')"> |
|
|
|
<view class="order44"> |
|
|
|
0 |
|
|
|
</view> |
|
|
|
@ -171,6 +179,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import base from '@/utils/ossUploadFile/base64.js'; |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
@ -248,7 +257,14 @@ |
|
|
|
url = '/package1/myCenter/shopBill' |
|
|
|
break; |
|
|
|
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; |
|
|
|
default: |
|
|
|
} |
|
|
|
@ -256,6 +272,52 @@ |
|
|
|
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() { |
|
|
|
uni.navigateBack() |
|
|
|
}, |
|
|
|
|