main
fanfan 7 months ago
parent 3679cb0d6c
commit 5eab12358b
  1. 6
      pages/member/index.vue
  2. 39
      pages/order/index.vue

@ -197,7 +197,8 @@
.then((result) => { .then((result) => {
console.log(22,result) console.log(22,result)
uni.showToast({ uni.showToast({
title: "支付成功" title: "支付成功",
icon: 'success'
}) })
this.isClick = true; this.isClick = true;
@ -209,7 +210,8 @@
}) })
.catch(err => { .catch(err => {
uni.showToast({ uni.showToast({
title: "支付失败" title: "支付失败",
icon:'none'
}) })
this.isClick = true; this.isClick = true;
}) })

@ -54,7 +54,8 @@
<view class="mask" @click="changeMenu(index)"> <view class="mask" @click="changeMenu(index)">
</view> </view>
<view class="menulist"> <view class="menulist">
<view class="" v-if="item.order_status == OrderStatusEnum.COMPLETED.value &&item.pay_status == PayStatusEnum.SUCCESS.value" <view class=""
v-if="item.order_status == OrderStatusEnum.COMPLETED.value &&item.pay_status == PayStatusEnum.SUCCESS.value"
@click="onInvoicing(item.order_id,item)"> @click="onInvoicing(item.order_id,item)">
申请开票 申请开票
</view> </view>
@ -273,9 +274,14 @@
app.getOrderList(1) app.getOrderList(1)
}, },
changeMenu(index) { changeMenu(index) {
this.list.forEach((item, ind) => { let that = this;
item.menushow = !item.menushow; this.list.map((item, inx) => {
}); if (index == inx) {
item.menushow = item.menushow == true ? false : true
} else {
item.menushow = false
}
})
}, },
toggleImage() { toggleImage() {
this.isToggle = !this.isToggle this.isToggle = !this.isToggle
@ -307,7 +313,7 @@
}); });
if (status == 200) { if (status == 200) {
uni.hideLoading(); uni.hideLoading();
this.list = this.arrayUnique(this.list.concat(data.list.data),'order_id') this.list = this.arrayUnique(this.list.concat(data.list.data), 'order_id')
this.total = data.list.total this.total = data.list.total
} }
}, },
@ -334,7 +340,7 @@
} }
}, },
onCopyLink(str){ onCopyLink(str) {
uni.setClipboardData({ uni.setClipboardData({
data: str, // value data: str, // value
success: function() { success: function() {
@ -360,9 +366,11 @@
// //
app.$toast(result.message) app.$toast(result.message)
// //
setTimeout(() => {
app.list = [] app.list = []
app.pageNum = 1 app.pageNum = 1
app.getOrderList() app.getOrderList()
}, 1500)
}) })
} }
} }
@ -382,10 +390,11 @@
.then(result => { .then(result => {
// //
app.$toast(result.message) app.$toast(result.message)
// setTimeout(() => {
app.list = [] app.list = []
app.pageNum = 1 app.pageNum = 1
app.getOrderList() app.getOrderList()
}, 1500)
}) })
} }
} }
@ -411,9 +420,11 @@
// //
app.$success(result.message) app.$success(result.message)
// //
setTimeout(() => {
app.list = [] app.list = []
app.pageNum = 1 app.pageNum = 1
app.getOrderList() app.getOrderList()
}, 1500)
}) })
} }
} }
@ -462,13 +473,13 @@
}, },
// //
arrayUnique(arr, name) { arrayUnique(arr, name) {
    var hash = {}; var hash = {};
    return arr.reduce(function (item, next) { return arr.reduce(function(item, next) {
        hash[next[name]] hash[next[name]] ?
            ? "" "" :
            : (hash[next[name]] = true && item.push(next)); (hash[next[name]] = true && item.push(next));
        return item; return item;
    }, []); }, []);
}, },
// //
onLogistics(orderId, item) { onLogistics(orderId, item) {

Loading…
Cancel
Save