update: 联调微信确认收货
This commit is contained in:
parent
cdb7f61cc9
commit
e8fbaf9ff3
@ -5,7 +5,7 @@
|
|||||||
:border="false"
|
:border="false"
|
||||||
:left-width="'400rpx'"
|
:left-width="'400rpx'"
|
||||||
:statusBar="true"
|
:statusBar="true"
|
||||||
:height="'34px'"
|
:height="'34px'"
|
||||||
>
|
>
|
||||||
<block slot="left">
|
<block slot="left">
|
||||||
<view class="left-block" @click="handerSkip">
|
<view class="left-block" @click="handerSkip">
|
||||||
@ -168,7 +168,7 @@
|
|||||||
OrderInfo.kind_id == 1201 &&
|
OrderInfo.kind_id == 1201 &&
|
||||||
OrderInfo.order_state_id == StateCode.ORDER_STATE_SHIPPED
|
OrderInfo.order_state_id == StateCode.ORDER_STATE_SHIPPED
|
||||||
"
|
"
|
||||||
@click="confirmReceipt"
|
@click="confirmReceipt(OrderInfo, $event)"
|
||||||
>{{ __("确认收货") }}</view
|
>{{ __("确认收货") }}</view
|
||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
@ -1912,31 +1912,110 @@ export default {
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
confirmReceipt: function (obj) {
|
confirmReceipt: function (data, obj) {
|
||||||
var params = {
|
var params = {
|
||||||
order_id: obj.currentTarget.dataset.on,
|
order_id: obj.currentTarget.dataset.on,
|
||||||
};
|
};
|
||||||
|
|
||||||
var that = this;
|
//拉起确认收货组件
|
||||||
that.$.confirm(
|
if (wx.openBusinessView) {
|
||||||
that.__("是否确认收货?"),
|
wx.openBusinessView({
|
||||||
function (e) {
|
businessType: "weappOrderConfirm",
|
||||||
if (e.confirm) {
|
extraData: {
|
||||||
that.$.request({
|
// merchant_id: data.lkl_merchant_no,//用户交易商户号
|
||||||
url: that.Config.URL.user.order_receive,
|
// merchant_trade_no: data.order_id,//商户订单号
|
||||||
data: params,
|
transaction_id: data.lkl_trade_no, //用户交易单号
|
||||||
success: function (data, status, msg, code) {
|
// transaction_id: "4200002884202509154936380358", //用户交易单号
|
||||||
if (status == 200) {
|
},
|
||||||
that.$.alert(that.__("收货成功!"), function () {
|
success: (e) => {
|
||||||
that.notice.postNotificationName("RefreshMessage", e);
|
console.log("e1", e);
|
||||||
});
|
if (e.extraData.status === "success") {
|
||||||
}
|
// 用户确认收货成功,再执行自己的代码
|
||||||
},
|
that.$.request({
|
||||||
|
url: that.Config.URL.user.order_receive,
|
||||||
|
data: params,
|
||||||
|
success: function (data, status, msg, code) {
|
||||||
|
if (status == 200) {
|
||||||
|
that.$.alert(that.__("收货成功!"), function () {
|
||||||
|
that.notice.postNotificationName("RefreshMessage", e);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else if (e.extraData.status === "fail") {
|
||||||
|
// 用户确认收货失败
|
||||||
|
uni.showToast({
|
||||||
|
title: "确认收货失败",
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
} else if (e.extraData.status === "cancel") {
|
||||||
|
// 用户取消
|
||||||
|
uni.showToast({
|
||||||
|
title: "取消确认收货",
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: (e) => {
|
||||||
|
console.log("e2", e);
|
||||||
|
uni.showToast({
|
||||||
|
title: "确认收货失败",
|
||||||
|
icon: "none",
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
},
|
complete: (e) => {
|
||||||
true
|
console.log("e3", e);
|
||||||
);
|
console.log("无论是否成功都会执行");
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
//引导用户升级微信版本
|
||||||
|
uni.showToast({
|
||||||
|
title: "请升级微信版本",
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
that.$.confirm(
|
||||||
|
that.__("是否确认收货?"),
|
||||||
|
function (e) {
|
||||||
|
if (e.confirm) {
|
||||||
|
that.$.request({
|
||||||
|
url: that.Config.URL.user.order_receive,
|
||||||
|
data: params,
|
||||||
|
success: function (data, status, msg, code) {
|
||||||
|
if (status == 200) {
|
||||||
|
that.$.alert(that.__("收货成功!"), function () {
|
||||||
|
that.notice.postNotificationName("RefreshMessage", e);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
var that = this;
|
||||||
|
|
||||||
|
// that.$.confirm(
|
||||||
|
// that.__("是否确认收货?"),
|
||||||
|
// function (e) {
|
||||||
|
// if (e.confirm) {
|
||||||
|
// that.$.request({
|
||||||
|
// url: that.Config.URL.user.order_receive,
|
||||||
|
// data: params,
|
||||||
|
// success: function (data, status, msg, code) {
|
||||||
|
// if (status == 200) {
|
||||||
|
// that.$.alert(that.__("收货成功!"), function () {
|
||||||
|
// that.notice.postNotificationName("RefreshMessage", e);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// true
|
||||||
|
// );
|
||||||
},
|
},
|
||||||
gotopay: async function (e) {
|
gotopay: async function (e) {
|
||||||
var that = this;
|
var that = this;
|
||||||
@ -2176,7 +2255,6 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "../../styles/_variables";
|
@import "../../styles/_variables";
|
||||||
|
|
||||||
@ -2714,4 +2792,4 @@ export default {
|
|||||||
margin-left: 6rpx;
|
margin-left: 6rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -803,9 +803,10 @@ export default {
|
|||||||
wx.openBusinessView({
|
wx.openBusinessView({
|
||||||
businessType: "weappOrderConfirm",
|
businessType: "weappOrderConfirm",
|
||||||
extraData: {
|
extraData: {
|
||||||
merchant_id: data.lkl_merchant_no,//用户交易商户号
|
// merchant_id: data.lkl_merchant_no,//用户交易商户号
|
||||||
merchant_trade_no: data.order_id,//商户订单号
|
// merchant_trade_no: data.order_id,//商户订单号
|
||||||
// transaction_id: data.lkl_trade_no, //用户交易单号
|
transaction_id: data.lkl_trade_no, //用户交易单号
|
||||||
|
// transaction_id: "4200002884202509154936380358", //用户交易单号
|
||||||
},
|
},
|
||||||
success: (e) => {
|
success: (e) => {
|
||||||
console.log("e1", e);
|
console.log("e1", e);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user