|
@@ -15,7 +15,8 @@
|
|
取餐时间
|
|
取餐时间
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <u-icon slot="icon" size="20" name="arrow-right" :label="goods.arriveCutTime" labelPos="left"></u-icon>
|
|
|
|
|
|
+ <u-icon slot="icon" size="20" name="arrow-right" label="15:00" labelPos="left"></u-icon>
|
|
|
|
+ <!-- <u-icon slot="icon" size="20" name="arrow-right" :label="goods.orderPickup.writeOffTime" labelPos="left"></u-icon> -->
|
|
</view>
|
|
</view>
|
|
<view class="gap"></view>
|
|
<view class="gap"></view>
|
|
<view class="padding-sm dflex-b bg-main">
|
|
<view class="padding-sm dflex-b bg-main">
|
|
@@ -25,8 +26,9 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view>
|
|
<view>
|
|
|
|
+ <!-- 字段返回数据有问题 -->
|
|
<radio style="transform: scale(0.85)" value="r1" :checked="true" color="#ff0000" class="radio">
|
|
<radio style="transform: scale(0.85)" value="r1" :checked="true" color="#ff0000" class="radio">
|
|
- {{goods.pickupType.pickupType ? '店内用餐' : '打包带走'}}
|
|
|
|
|
|
+ {{goods.pickupType.pickupType == '0' ? '打包带走' : '店内用餐'}}
|
|
</radio>
|
|
</radio>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -40,7 +42,7 @@
|
|
<view class="total-goods">共计{{lists}}件商品</view>
|
|
<view class="total-goods">共计{{lists}}件商品</view>
|
|
</view>
|
|
</view>
|
|
<view class="goods-cart w-full">
|
|
<view class="goods-cart w-full">
|
|
- <view class="goods-cont padding-tb" v-for="(item, index) in goods.itemList" :key="index">
|
|
|
|
|
|
+ <view class="goods-cont padding-tb" v-for="(item, index) in goods.orderItemVoList" :key="index">
|
|
<my-goods :item="item">
|
|
<my-goods :item="item">
|
|
<view class="good-num">×{{item.quantity}}</view>
|
|
<view class="good-num">×{{item.quantity}}</view>
|
|
</my-goods>
|
|
</my-goods>
|
|
@@ -91,15 +93,16 @@
|
|
<view class="bg-main">
|
|
<view class="bg-main">
|
|
<view class="dflex-b padding-lr padding-tb-sm">
|
|
<view class="dflex-b padding-lr padding-tb-sm">
|
|
<view class="flex1 send-label">总金额</view>
|
|
<view class="flex1 send-label">总金额</view>
|
|
- <view class=""><text style="font-size: 24rpx;">¥</text>{{goods.payment}}</view>
|
|
|
|
|
|
+ <view class=""><text style="font-size: 24rpx;">¥</text>{{goods.totalAmount}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="gap"></view>
|
|
<view class="gap"></view>
|
|
<view class="bar-space"></view>
|
|
<view class="bar-space"></view>
|
|
<view class="cart-bottom padding-sm dflex-b">
|
|
<view class="cart-bottom padding-sm dflex-b">
|
|
- <view class="go-cart dflex-c">取消订单</view>
|
|
|
|
|
|
+ <view class="go-cart dflex-c" @click="toDelete()">取消订单</view>
|
|
<view class="go-buy dflex-c background-gradient" @click="toPay()">去支付</view>
|
|
<view class="go-buy dflex-c background-gradient" @click="toPay()">去支付</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <u-toast ref="uToast"></u-toast>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -112,13 +115,16 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(e) {
|
|
onLoad(e) {
|
|
- this.fatchDate(e)
|
|
|
|
- },
|
|
|
|
- onUnload() {
|
|
|
|
- // uni.redirectTo({
|
|
|
|
- // url: `/pages/classify/classify` // 指定页面的路径
|
|
|
|
- // });
|
|
|
|
- // return true;
|
|
|
|
|
|
+ var dataString = decodeURIComponent(e.data)
|
|
|
|
+ var data = JSON.parse(dataString);
|
|
|
|
+ console.log('data', data)
|
|
|
|
+ this.goods = data
|
|
|
|
+ this.lists = this.goods.orderItemVoList.length
|
|
|
|
+ this.goods.orderItemVoList.forEach(item => {
|
|
|
|
+ item.imgUrl = item.picUrl
|
|
|
|
+ })
|
|
|
|
+ console.log('this.lists', this.lists)
|
|
|
|
+ // this.fatchDate(e)
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
async fatchDate(e) {
|
|
async fatchDate(e) {
|
|
@@ -143,15 +149,35 @@
|
|
return v.toString(16);
|
|
return v.toString(16);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ toDelete() {
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ type: 'default',
|
|
|
|
+ title: '默认主题',
|
|
|
|
+ message: "演示阶段暂时不能取消",
|
|
|
|
+ position: 'center'
|
|
|
|
+ })
|
|
|
|
+ },
|
|
toPay() {
|
|
toPay() {
|
|
- const params = {
|
|
|
|
- orderId: this.goods.orderId,
|
|
|
|
- amount: this.goods.payment,
|
|
|
|
- }
|
|
|
|
- this.$request('post', `/order/orderPay/addOrderPay`, params, true).then(res => {
|
|
|
|
- this._toPay()
|
|
|
|
|
|
+ // 显示提示
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ type: 'default',
|
|
|
|
+ title: '默认主题',
|
|
|
|
+ message: "演示阶段暂时不能支付",
|
|
|
|
+ position: 'center'
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
+ // title: '演示阶段暂时不能支付',
|
|
|
|
+ // icon: 'error',
|
|
|
|
+ // duration: 1000
|
|
|
|
+ // });
|
|
|
|
+ // const params = {
|
|
|
|
+ // orderId: this.goods.orderId,
|
|
|
|
+ // amount: this.goods.payment,
|
|
|
|
+ // }
|
|
|
|
+ // this.$request('post', `/order/orderPay/addOrderPay`, params, true).then(res => {
|
|
|
|
+ // this._toPay()
|
|
|
|
+ // })
|
|
},
|
|
},
|
|
async _toPay() {
|
|
async _toPay() {
|
|
console.log('this.uuid()', this.uuid())
|
|
console.log('this.uuid()', this.uuid())
|