add
This commit is contained in:
@ -101,7 +101,7 @@ export default {
|
||||
refund_reason_wap_explain
|
||||
})
|
||||
.then(res => {
|
||||
wx.showToast({
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "success",
|
||||
duration: 2000
|
||||
|
@ -48,9 +48,7 @@
|
||||
</div>
|
||||
<div class="font-color-red">{{ getStatus(order) }}</div>
|
||||
</div>
|
||||
<div
|
||||
@click="$yrouter.push({ path: '/pages/order/OrderDetails/index',query:{id:order.orderId} })"
|
||||
>
|
||||
<div @click="goOrderDetails(order)">
|
||||
<div
|
||||
class="item-info acea-row row-between row-top"
|
||||
v-for="(cart,cartInfoIndex) in order.cartInfo"
|
||||
@ -118,13 +116,13 @@
|
||||
<div class="bnt cancelBnt" @click="cancelOrder(order)">取消订单</div>
|
||||
<div
|
||||
class="bnt bg-color-red"
|
||||
@click="$yrouter.push({ path: '/pages/order/OrderDetails/index',query:{id:order.orderId} })"
|
||||
@click="goOrderDetails(order)"
|
||||
>立即付款</div>
|
||||
</template>
|
||||
<template v-if="order._status._type == 1 || order._status._type == 9">
|
||||
<div
|
||||
class="bnt bg-color-red"
|
||||
@click="$yrouter.push({ path: '/pages/order/OrderDetails/index',query:{id:order.orderId} })"
|
||||
@click="goOrderDetails(order)"
|
||||
>查看详情</div>
|
||||
</template>
|
||||
<template v-if="order._status._type == 2">
|
||||
@ -148,13 +146,13 @@
|
||||
<!--</div>-->
|
||||
<div
|
||||
class="bnt bg-color-red"
|
||||
@click="$yrouter.push({ path: '/pages/order/OrderDetails/index',query:{id:order.orderId} })"
|
||||
@click="goOrderDetails(order)"
|
||||
>去评价</div>
|
||||
</template>
|
||||
<template v-if="order._status._type === 4">
|
||||
<div
|
||||
class="bnt bg-color-red"
|
||||
@click="$yrouter.push({ path: '/pages/order/OrderDetails/index',query:{id:order.orderId} })"
|
||||
@click="goOrderDetails(order)"
|
||||
>查看订单</div>
|
||||
</template>
|
||||
</div>
|
||||
@ -233,6 +231,12 @@ export default {
|
||||
type() {}
|
||||
},
|
||||
methods: {
|
||||
goOrderDetails(order) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
query: { id: order.orderId }
|
||||
});
|
||||
},
|
||||
dataFormat,
|
||||
setOfflinePayStatus: function(status) {
|
||||
var that = this;
|
||||
@ -263,7 +267,7 @@ export default {
|
||||
this.page = 1;
|
||||
this.loaded = false;
|
||||
this.loading = false;
|
||||
this.getOrderList();
|
||||
this.getOrderList();
|
||||
},
|
||||
getOrderList() {
|
||||
if (this.loading || this.loaded) return;
|
||||
|
@ -270,10 +270,7 @@
|
||||
<div class="bnt bg-color-red" @click="pay = true">立即付款</div>
|
||||
</template>
|
||||
<template v-if="status.type == 1">
|
||||
<div
|
||||
class="bnt cancel"
|
||||
@click="$yrouter.push({ path: '/pages/order/GoodsReturn/index',query:{id:orderInfo.orderId } })"
|
||||
>申请退款</div>
|
||||
<div class="bnt cancel" @click="goGoodsReturn(orderInfo)">申请退款</div>
|
||||
</template>
|
||||
<template v-if="status.type == 2">
|
||||
<div
|
||||
@ -302,12 +299,7 @@
|
||||
>查看物流</div>
|
||||
</template>
|
||||
<template v-if="status.type == 6">
|
||||
<div
|
||||
class="bnt bg-color-red"
|
||||
@click="
|
||||
$yrouter.push({ path: '/pages/activity/GroupRule/index',query:{id:orderInfo.pinkId} })
|
||||
"
|
||||
>查看拼团</div>
|
||||
<div class="bnt bg-color-red" @click="goGroupRule(orderInfo)">查看拼团</div>
|
||||
</template>
|
||||
</div>
|
||||
<Payment v-model="pay" :types="payType" @checked="toPay" :balance="userInfo.nowMoney"></Payment>
|
||||
@ -322,6 +314,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
goGoodsReturn(orderInfo) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/order/GoodsReturn/index",
|
||||
query: { id: orderInfo.orderId }
|
||||
});
|
||||
},
|
||||
goGroupRule(orderInfo) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/GroupRule/index",
|
||||
query: { id: orderInfo.pinkId }
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.geoPage {
|
||||
position: fixed;
|
||||
@ -612,7 +622,7 @@ export default {
|
||||
this.setOfflinePayStatus(this.orderInfo.offlinePayStatus);
|
||||
})
|
||||
.catch(err => {
|
||||
wx.showToast({
|
||||
uni.showToast({
|
||||
title: err.response.data.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
|
@ -366,7 +366,7 @@ export default {
|
||||
const data = res.data;
|
||||
if (data.status === "EXTEND_ORDER") {
|
||||
this.$yrouter.replace({
|
||||
path: "/pages/order/OrderDetails/main",
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
query: { id: data.result.orderId }
|
||||
});
|
||||
} else {
|
||||
@ -442,7 +442,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
wx.showLoading({ title: "生成订单中" });
|
||||
uni.showLoading({ title: "生成订单中" });
|
||||
createOrder(this.orderGroupInfo.orderKey, {
|
||||
realName: this.contacts,
|
||||
phone: this.contactsTel,
|
||||
@ -459,7 +459,7 @@ export default {
|
||||
shippingType: parseInt(shipping_type) + 1
|
||||
})
|
||||
.then(res => {
|
||||
wx.hideLoading();
|
||||
uni.hideLoading();
|
||||
const data = res.data;
|
||||
switch (data.status) {
|
||||
case "ORDER_EXIST":
|
||||
@ -468,24 +468,24 @@ export default {
|
||||
case "PAY_ERROR":
|
||||
this.$dialog.toast({ mes: res.msg });
|
||||
this.$yrouter.replace({
|
||||
path: "/pages/order/OrderDetails/main",
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
query: { id: data.result.orderId }
|
||||
});
|
||||
break;
|
||||
case "SUCCESS":
|
||||
wx.showToast({
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
this.$yrouter.replace({
|
||||
path: "/pages/order/OrderDetails/main",
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
query: { id: data.result.orderId }
|
||||
});
|
||||
break;
|
||||
case "WECHAT_H5_PAY":
|
||||
this.$yrouter.replace({
|
||||
path: "/pages/order/OrderDetails/main",
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
query: { id: data.result.orderId }
|
||||
});
|
||||
setTimeout(() => {
|
||||
@ -495,7 +495,7 @@ export default {
|
||||
case "WECHAT_PAY":
|
||||
weappPay(data.result.jsConfig).then(res => {
|
||||
this.$yrouter.replace({
|
||||
path: "/pages/order/OrderDetails/main",
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
query: { id: data.result.orderId }
|
||||
});
|
||||
});
|
||||
@ -503,13 +503,13 @@ export default {
|
||||
// 下面为原先微信支付方式,
|
||||
// pay(data.result.jsConfig).finally(() => {
|
||||
// this.$yrouter.replace({
|
||||
// path: "/pages/order/OrderDetails/main" ,query: { id: data.result.orderId}
|
||||
// path: "/pages/order/OrderDetails/index" ,query: { id: data.result.orderId}
|
||||
// });
|
||||
// });
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
wx.hideLoading();
|
||||
uni.hideLoading();
|
||||
this.$dialog.error(err.response.data.msg || "创建订单失败");
|
||||
});
|
||||
}
|
||||
|
@ -8,16 +8,10 @@
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-for="(cart,cartInfoIndex) in order.cartInfo"
|
||||
:key="cartInfoIndex"
|
||||
@click="$yrouter.push({ path: '/pages/order/OrderDetails/index',query:{id:order.orderId} })"
|
||||
@click="goOrderDetails(order)"
|
||||
>
|
||||
<div class="pictrue">
|
||||
<img
|
||||
:src="cart.productInfo.image"
|
||||
class="image"
|
||||
@click.stop="
|
||||
$yrouter.push({ path: '/pages/shop/GoodsCon/index',query: { id: cart.productInfo.id } })
|
||||
"
|
||||
/>
|
||||
<img :src="cart.productInfo.image" class="image" @click.stop="goGoodsCon(cart)" />
|
||||
</div>
|
||||
<div class="text">
|
||||
<div class="acea-row row-between-wrapper">
|
||||
@ -67,6 +61,18 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
goGoodsCon(cart) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/shop/GoodsCon/index",
|
||||
query: { id: cart.productInfo.id }
|
||||
});
|
||||
},
|
||||
goOrderDetails(order) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
query: { id: order.orderId }
|
||||
});
|
||||
},
|
||||
getOrderList() {
|
||||
const { page, limit } = this;
|
||||
if (this.loading || this.loaded) return;
|
||||
@ -88,6 +94,6 @@ export default {
|
||||
},
|
||||
onReachBottom() {
|
||||
!this.loading && this.getOrderList();
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user