Feat(页面):页面埋点配置
This commit is contained in:
@@ -44,99 +44,102 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
orderDetail,
|
||||
getRefundReason,
|
||||
postOrderRefund
|
||||
} from "@/api/order";
|
||||
import {
|
||||
trim
|
||||
} from "@/utils";
|
||||
import {
|
||||
VUE_APP_API_URL
|
||||
} from "@/config";
|
||||
import {
|
||||
orderDetail,
|
||||
getRefundReason,
|
||||
postOrderRefund
|
||||
} from "@/api/order";
|
||||
import {
|
||||
trim
|
||||
} from "@/utils";
|
||||
import {
|
||||
VUE_APP_API_URL
|
||||
} from "@/config";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "goodsReturn",
|
||||
components: {
|
||||
// VueCoreImageUpload
|
||||
export default {
|
||||
name: "goodsReturn",
|
||||
components: {
|
||||
// VueCoreImageUpload
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
url: `${VUE_APP_API_URL}/upload/image`,
|
||||
headers: {
|
||||
Authorization: "Bearer " + this.$store.state.token
|
||||
},
|
||||
id: 0,
|
||||
orderInfo: {},
|
||||
reasonList: [],
|
||||
reason: "",
|
||||
refundReasonWapExplain: "",
|
||||
pageKeyId: Object.freeze('userOrderRefundApply')
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
changeReason(e) {
|
||||
this.reason = this.reasonList[e.mp.detail.value];
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
url: `${VUE_APP_API_URL}/upload/image`,
|
||||
headers: {
|
||||
Authorization: "Bearer " + this.$store.state.token
|
||||
},
|
||||
id: 0,
|
||||
orderInfo: {},
|
||||
reasonList: [],
|
||||
reason: "",
|
||||
refundReasonWapExplain: ""
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
changeReason(e) {
|
||||
this.reason = this.reasonList[e.mp.detail.value];
|
||||
},
|
||||
getOrderDetail() {
|
||||
orderDetail(this.id)
|
||||
.then(res => {
|
||||
this.orderInfo = res.data;
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
getRefundReason() {
|
||||
getRefundReason().then(res => {
|
||||
this.reasonList = res.data;
|
||||
});
|
||||
},
|
||||
submit() {
|
||||
const refundReasonWapExplain = trim(this.refundReasonWapExplain),
|
||||
text = this.reason;
|
||||
if (!text) {
|
||||
getOrderDetail() {
|
||||
orderDetail(this.id)
|
||||
.then(res => {
|
||||
this.orderInfo = res.data;
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title: "请选择退款原因",
|
||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return
|
||||
}
|
||||
postOrderRefund({
|
||||
text,
|
||||
uni: this.orderInfo.orderId,
|
||||
refundReasonWapExplain
|
||||
})
|
||||
.then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "success",
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$yrouter.back();
|
||||
}, 1500);
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
this.id = this.$yroute.query.id || 0;
|
||||
this.getOrderDetail();
|
||||
this.getRefundReason();
|
||||
getRefundReason() {
|
||||
getRefundReason().then(res => {
|
||||
this.reasonList = res.data;
|
||||
});
|
||||
},
|
||||
submit() {
|
||||
const refundReasonWapExplain = trim(this.refundReasonWapExplain),
|
||||
text = this.reason;
|
||||
if (!text) {
|
||||
uni.showToast({
|
||||
title: "请选择退款原因",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return
|
||||
}
|
||||
postOrderRefund({
|
||||
text,
|
||||
uni: this.orderInfo.orderId,
|
||||
refundReasonWapExplain
|
||||
})
|
||||
.then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "success",
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$yrouter.back();
|
||||
}, 1500);
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.id = this.$yroute.query.id || 0;
|
||||
this.getOrderDetail();
|
||||
this.getRefundReason();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.apply-return .list .item .inp {
|
||||
|
||||
@@ -145,9 +145,11 @@ import {cancelOrderHandle, payOrderHandle, takeOrderHandle} from "@/libs/order";
|
||||
import Loading from "@/components/Loading";
|
||||
import Payment from "@/components/Payment";
|
||||
import {mapGetters} from "vuex";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "MyOrder",
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
@@ -172,6 +174,7 @@ export default {
|
||||
|
||||
showExtend: false,
|
||||
delayId: null,
|
||||
pageKeyId: Object.freeze('userOrderIndex')
|
||||
};
|
||||
},
|
||||
components: {
|
||||
|
||||
@@ -265,6 +265,7 @@ import DataFormat from "@/components/DataFormat";
|
||||
import {copyClipboard} from "@/utils";
|
||||
import {mapGetters} from "vuex";
|
||||
import {cancelOrderHandle, delOrderHandle, payOrderHandle, takeOrderHandle, yuePayOrderHandle} from "@/libs/order";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
const STATUS = [
|
||||
"待付款",
|
||||
@@ -288,7 +289,7 @@ export default {
|
||||
DataFormat,
|
||||
passkeyborad
|
||||
},
|
||||
props: {},
|
||||
mixins: [pageListenMixins],
|
||||
data: function () {
|
||||
return {
|
||||
isShowPayPwdPop: false,
|
||||
@@ -308,7 +309,8 @@ export default {
|
||||
mapKay: "",
|
||||
mapShow: false,
|
||||
payPassword: null,
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
pageKeyId: Object.freeze('userOrderInfo')
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -256,6 +256,7 @@ import {isNullOrEmpty, isWeixin} from "@/utils";
|
||||
import blPaymentPasswordInput from '@/components/blPaymentPasswordInput.vue';
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
import CouponsPopup from "@/components/CouponsPopup.vue"
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
const NAME = "OrderSubmission",
|
||||
_isWeixin = isWeixin();
|
||||
@@ -269,6 +270,7 @@ export default {
|
||||
passkeyborad,
|
||||
CouponsPopup
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
props: {},
|
||||
data: function () {
|
||||
return {
|
||||
@@ -317,7 +319,8 @@ export default {
|
||||
// 订单是否可以使用积分
|
||||
canUsePoints: false,
|
||||
// 订单最大可使用积分数量
|
||||
maxPoints: 0
|
||||
maxPoints: 0,
|
||||
pageKeyId: Object.freeze('orderConfirm')
|
||||
};
|
||||
},
|
||||
computed: mapGetters(["userInfo", "storeItems"]),
|
||||
|
||||
@@ -48,12 +48,14 @@
|
||||
<script>
|
||||
import {getOrderList} from "@/api/order";
|
||||
import Loading from "@/components/Loading";
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
|
||||
export default {
|
||||
name: "ReturnList",
|
||||
components: {
|
||||
Loading
|
||||
},
|
||||
mixins: [pageListenMixins],
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
@@ -61,7 +63,8 @@ export default {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
loading: false,
|
||||
loaded: false
|
||||
loaded: false,
|
||||
pageKeyId: Object.freeze('userOrderRefundList')
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user