diff --git a/subPackages/line/order.vue b/subPackages/line/order.vue index 635494c..3ce4c4c 100644 --- a/subPackages/line/order.vue +++ b/subPackages/line/order.vue @@ -132,39 +132,43 @@ methods: { // 下一步 order() { - let selectDate = this.selectDate; - let sku = this.sku; - let nums = this.nums; - let allNum = 0; - if (!selectDate) { - uni.showToast({ - title: '请先选择日期', - icon: 'none' - }); - return; - } - sku.map((item, index) => { - item.num = nums[index]; - allNum = allNum + nums[index]; - item.price = selectDate.info[index].money; - }); - if (allNum == 0) { - uni.showToast({ - title: '至少选择一个规格', - icon: 'none' - }); - return; - } - - let data = { - sku: sku, - selectDate: selectDate, - price: this.totalPrice() - } - this.$store.commit('changeLineInfo',data) - - uni.navigateTo({ - url: '/subPackages/line/orders' + this.Post({}, '/api/user/getUserDetails').then(res => { + if(res.data) { + let selectDate = this.selectDate; + let sku = this.sku; + let nums = this.nums; + let allNum = 0; + if (!selectDate) { + uni.showToast({ + title: '请先选择日期', + icon: 'none' + }); + return; + } + sku.map((item, index) => { + item.num = nums[index]; + allNum = allNum + nums[index]; + item.price = selectDate.info[index].money; + }); + if (allNum == 0) { + uni.showToast({ + title: '至少选择一个规格', + icon: 'none' + }); + return; + } + + let data = { + sku: sku, + selectDate: selectDate, + price: this.totalPrice() + } + this.$store.commit('changeLineInfo',data) + + uni.navigateTo({ + url: '/subPackages/line/orders' + }) + } }) }, // 减少数量 diff --git a/unpackage/dist/build/web/index.html b/unpackage/dist/build/web/index.html index 3677c78..2373920 100644 --- a/unpackage/dist/build/web/index.html +++ b/unpackage/dist/build/web/index.html @@ -1,2 +1,2 @@