feat:修复地址
This commit is contained in:
@@ -409,19 +409,19 @@ export default {
|
||||
if (option.sed) {
|
||||
this.isPoints = 1;
|
||||
this.sed = JSON.parse(option.sed);
|
||||
await this.addressList();
|
||||
// console.log('addressListOne',this.addressListOne)
|
||||
// if(this.addressListOne && this.addressListOne.length){
|
||||
// this.addressShow = true;
|
||||
// }
|
||||
await this.addressList();
|
||||
// console.log('addressListOne',this.addressListOne)
|
||||
// if(this.addressListOne && this.addressListOne.length){
|
||||
// this.addressShow = true;
|
||||
// }
|
||||
this.getOrderTwo();
|
||||
}
|
||||
|
||||
|
||||
if (option.ids) {
|
||||
this.ids = option.ids;
|
||||
this.getOrder();
|
||||
}
|
||||
|
||||
|
||||
console.log("参数---", option, this.defaultAddress);
|
||||
|
||||
const addressShowPop = option.addressShow;
|
||||
@@ -491,16 +491,16 @@ export default {
|
||||
},
|
||||
onCancel() {
|
||||
if (this.type == "2") {
|
||||
uni.redirectTo({
|
||||
url: "/pages/rwa_package/setting/forgot-pass?type=1",
|
||||
uni.redirectTo({
|
||||
url: "/pages/rwa_package/forgotPass/forgotPass?type=1",
|
||||
});
|
||||
}
|
||||
this.tipsShow = false;
|
||||
},
|
||||
onConfirm() {
|
||||
if (this.type == "1") {
|
||||
uni.redirectTo({
|
||||
url: "/pages/rwa_package/setting/forgot-pass?type=1",
|
||||
uni.redirectTo({
|
||||
url: "/pages/rwa_package/forgotPass/forgotPass?type=1",
|
||||
});
|
||||
} else {
|
||||
this.tipsShow = false;
|
||||
@@ -562,6 +562,14 @@ export default {
|
||||
this.wayOption = data.filter((item) => item.type !== "vcoin");
|
||||
this.couponData = data.filter((item) => item.type === "vcoin")[0] || {};
|
||||
console.log("getWayOption", this.wayOption, this.couponData);
|
||||
//当前是微信小程序不显示支付宝支付
|
||||
// #ifdef MP-WEIXIN
|
||||
this.wayOption = this.wayOption.filter(
|
||||
(item) => item.type !== "alipay"
|
||||
);
|
||||
// #endif
|
||||
|
||||
console.log("getWayOption", this.wayOption);
|
||||
}
|
||||
},
|
||||
async getOrder() {
|
||||
@@ -882,12 +890,33 @@ export default {
|
||||
}
|
||||
},
|
||||
async passPay() {
|
||||
const params = {
|
||||
let params = {
|
||||
addrId: this.orderInfo.address.id, // 收货地址ID
|
||||
//结算的购物车ID,多个以逗号分割,ALL表示全选
|
||||
payway: this.orderInfo.paymentMethod, // 支付方式:1-微信,2-支付宝
|
||||
remark: JSON.stringify(this.getRemark()), //备注信息'[{"sid":"店铺ID","rmk":"备注内容"},{"sid":"店铺ID","rmk":"备注内容"}]'
|
||||
};
|
||||
|
||||
if (params.payway == "wechat") {
|
||||
// #ifdef MP-WEIXIN
|
||||
params["payway"] = "wechatMiniProgram";
|
||||
params["code"] = await new Promise((resolve) => {
|
||||
uni.login({
|
||||
provider: "weixin",
|
||||
onlyAuthorize: true,
|
||||
success: function (loginRes) {
|
||||
resolve(loginRes.code);
|
||||
},
|
||||
fail: (err) => {
|
||||
resolve(""); // 登录失败时返回空字符串,避免后续流程中断
|
||||
},
|
||||
});
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
|
||||
console.log("收货地址ID--params", params);
|
||||
|
||||
let resp = null;
|
||||
console.log("orderInfo----", this.sed);
|
||||
if (this.sed) {
|
||||
@@ -926,7 +955,8 @@ export default {
|
||||
|
||||
// 提交订单成功,就唤起支付
|
||||
if (resp && resp.bizcode === 100) {
|
||||
const item = resp.data;
|
||||
console.log("提交订单成功", resp.data);
|
||||
const item = resp.data;
|
||||
if (item.status === 1) {
|
||||
jumpWayOk();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user