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