Commit 7ebf4441 by 宋冰琦
parents c0cb8258 26b589a3
......@@ -105,7 +105,7 @@ export default {
onLoad() {
const resData = uni.getStorageSync('orderInfo');
this.orderInfo = resData
const isBuild = ['4', '5', '7'].indexOf(this.orderInfo.state) >= 0;
const isBuild = ['4', '5'].indexOf(this.orderInfo.state) >= 0;
if (isBuild) {
new QRCode('myQrcode', {
text: this.orderInfo.pickCode,
......@@ -188,7 +188,7 @@ export default {
},
qrShow() {
console.log(this.orderInfo.orderDetails);
return ['2','3','4','5', '7'].indexOf(this.orderInfo.state) >= 0;
return ['2','3','4','5'].indexOf(this.orderInfo.state) >= 0;
},
// 1 未支付
// 2 已支付
......@@ -215,11 +215,11 @@ export default {
case '3':
return '制作中'
case '4':
case '7':
return '待取餐'
case '5':
return '取餐中'
case '6':
case '7':
return '已完成'
case '8':
case '9':
......
......@@ -119,13 +119,13 @@ export default {
// 微信扫码进入
this.option = JSON.stringify(option)
const { q } = option;
console.log(q);
// console.log(q);
if (q) {
User.getLocation((state, params) => {
uni.removeStorageSync('shopCarInfo');
$EventBus.$emit('updateCar');
// let id = decodeURIComponent(q).split('?')[1].split('=')[1];
let id = q;
let id = decodeURIComponent(q).split('?')[1].split('=')[1];
// let id = q;
Menu.getScreenShopCar(id, params).then(res => {
const data = JSON.parse(res.data.data);
console.log(data);
......@@ -244,7 +244,7 @@ export default {
} else {
list = uni.getStorageSync('goodsList').filter((v) => v.flag == true);
}
let res = await Utils.AssemblyOrder(this.totalPrice, this.totalNum, this.buyType, list);
let res = await Utils.AssemblyOrder(this.shopData, this.totalPrice, this.totalNum, this.buyType, list);
if (res) {
// 发起订单
let orderInfo = await Menu.saveReserve(res);
......
......@@ -46,7 +46,7 @@
</view>
</view>
</view>
<view v-if="item.state == 2 || item.state == 3 || item.state == 4 || item.state == 5 || item.state == 7" class="qr_code">
<view v-if="item.state == 2 || item.state == 3 || item.state == 4 || item.state == 5" class="qr_code">
<image class="qr_code_img" src="/static/imgs/icon-barcode.png"></image>
<view class="qr_text">点击二维码取单</view>
</view>
......@@ -106,11 +106,11 @@ export default {
case '3':
return '制作中'
case '4':
case '7':
return '待取餐'
case '5':
return '取餐中'
case '6':
case '7':
return '已完成'
case '8':
case '9':
......
......@@ -4,7 +4,7 @@ import { $EventBus } from './EventBus';
export default {
// 组装提交订单数据
AssemblyOrder(totalPrice, totalNum, buyType, shopCarInfo) {
AssemblyOrder(shopData, totalPrice, totalNum, buyType, shopCarInfo) {
if (shopCarInfo && totalPrice > 0 && totalNum > 0) {
let orderDetails = [];
for (let i = 0; i < shopCarInfo.length; i++) {
......@@ -25,7 +25,7 @@ export default {
orderDetails.push(res);
}
const shopData = uni.getStorageSync('shopData');
// const shopData = uni.getStorageSync('shopData');
let DAta = {
amount: totalPrice, //商品总金额
goodsNum: totalNum, //商品总数量
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment