| xqd
@@ -8,8 +8,8 @@
|
|
|
<load-refresh ref="loadRefresh" :isRefresh="true" refreshType="loader" refreshTime="2000" heightReduce="10"
|
|
|
backgroundCover="#fff" :pageNo="pageindex" :totalPageNo="totalPage" @loadMore="loadMore" @refresh="refresh">
|
|
|
<view slot="content-list">
|
|
|
- <view class="margin-top-sm margin-lr-sm padding-lr-xs" v-for="(item,index) in ordersList" @click="goinfoorder" :data-id="item.id"
|
|
|
- :key="index" style="border-radius: 16rpx;box-shadow:0px 0px 10px rgba(0,0,0,.2);">
|
|
|
+ <view class="margin-top-sm margin-lr-sm padding-lr-xs" v-for="(item,index) in ordersList" @click="goinfoorder"
|
|
|
+ :data-id="item.id" :key="index" style="border-radius: 16rpx;box-shadow:0px 0px 10px rgba(0,0,0,.2);">
|
|
|
<view class="flex justify-between align-center bg-white" style="padding: 28rpx;border-radius: 16rpx;">
|
|
|
<view class="jinxing">
|
|
|
<text style="display: inline-block;width: 12rpx;height: 12rpx;border-radius: 50%;background-color:#EEAA3F;margin-right: 8rpx;"></text>
|
| xqd
@@ -217,6 +217,25 @@
|
|
|
// },
|
|
|
methods: {
|
|
|
cancelOrder: async function(item, index) {
|
|
|
+ uni.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: "确定要取消订单吗?",
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.requestSubscribeMessage({
|
|
|
+ tmplIds: ['bjZ-r79i8sl7zEtdttAtcCPZLkCgFSYHTNWnNVd1cG0'],
|
|
|
+ success: (res) => {
|
|
|
+ this.confirmorder(item, index)
|
|
|
+ },
|
|
|
+ fail: (err) => {
|
|
|
+ this.confirmorder(item, index)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ confirmorder: async function(item, index) {
|
|
|
let res = await this.$request.post("/api/v1/order/orderCancel", {
|
|
|
order_id: item.id
|
|
|
})
|
| xqd
@@ -226,14 +245,12 @@
|
|
|
icon: "none"
|
|
|
})
|
|
|
this.ordersList.splice(index, 1)
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
uni.showModal({
|
|
|
- title:"提示",
|
|
|
- content:res.message,
|
|
|
- showCancel:false,
|
|
|
- success: (res) => {
|
|
|
-
|
|
|
- }
|
|
|
+ title: "提示",
|
|
|
+ content: res.message,
|
|
|
+ showCancel: false,
|
|
|
+ success: (res) => {}
|
|
|
})
|
|
|
}
|
|
|
},
|