feat:优化
This commit is contained in:
@@ -411,19 +411,19 @@ export default {
|
||||
this.sed = JSON.parse(option.sed);
|
||||
this.leftPathType = "navigateTo";
|
||||
this.leftPath = null;
|
||||
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;
|
||||
@@ -493,7 +493,7 @@ export default {
|
||||
},
|
||||
onCancel() {
|
||||
if (this.type == "2") {
|
||||
uni.redirectTo({
|
||||
uni.redirectTo({
|
||||
url: "/pages/rwa_package/forgotPass/forgotPass?type=1",
|
||||
});
|
||||
}
|
||||
@@ -501,7 +501,7 @@ export default {
|
||||
},
|
||||
onConfirm() {
|
||||
if (this.type == "1") {
|
||||
uni.redirectTo({
|
||||
uni.redirectTo({
|
||||
url: "/pages/rwa_package/forgotPass/forgotPass?type=1",
|
||||
});
|
||||
} else {
|
||||
@@ -532,21 +532,28 @@ export default {
|
||||
},
|
||||
async getWayOption() {
|
||||
let parmas = {};
|
||||
if (this.isPoints) {
|
||||
parmas["types"] = "4";
|
||||
} else {
|
||||
parmas["types"] = "1,2,3";
|
||||
}
|
||||
console.log("parmas-----", this.isCoupon);
|
||||
// if (this.isPoints) {
|
||||
// parmas["types"] = "4";
|
||||
// } else {
|
||||
// parmas["types"] = "1,2,3";
|
||||
// }
|
||||
// console.log("parmas-----", this.isCoupon);
|
||||
|
||||
if (this.isCoupon) {
|
||||
parmas["types"] = "1,2,3";
|
||||
parmas.isDeduction = true;
|
||||
}
|
||||
// if (this.isCoupon) {
|
||||
// parmas["types"] = "1,2,3";
|
||||
// parmas.isDeduction = true;
|
||||
// }
|
||||
|
||||
// if (this.sed?.activedType == "seckill") {
|
||||
// parmas["types"] = "1,2,3";
|
||||
// }
|
||||
// #ifdef MP-WEIXIN
|
||||
parmas["types"] = "1,3";
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
parmas["types"] = "1,2,3";
|
||||
// #endif
|
||||
|
||||
if (this.sed?.activedType == "seckill") {
|
||||
parmas["types"] = "1,2,3";
|
||||
}
|
||||
const result = await getSupportPay(parmas);
|
||||
if (result && result.bizcode === 100) {
|
||||
const data = result.data || [];
|
||||
@@ -901,7 +908,7 @@ export default {
|
||||
|
||||
if (params.payway == "wechat") {
|
||||
// #ifdef MP-WEIXIN
|
||||
params["payway"] = "wechatMiniProgram";
|
||||
params["payway"] = "wechat";
|
||||
params["code"] = await new Promise((resolve) => {
|
||||
uni.login({
|
||||
provider: "weixin",
|
||||
@@ -920,7 +927,7 @@ export default {
|
||||
console.log("收货地址ID--params", params);
|
||||
|
||||
let resp = null;
|
||||
console.log("orderInfo----", this.sed);
|
||||
console.log("orderInfo----", this.sed, this.orderInfo);
|
||||
if (this.sed) {
|
||||
if (
|
||||
this.orderInfo.paymentMethod == "balance" ||
|
||||
@@ -939,8 +946,21 @@ export default {
|
||||
params["activityId"] = Number(this.sed?.activityId); // 秒杀活动ID
|
||||
resp = await setSeckillOrder(params);
|
||||
} else {
|
||||
if (this.isCoupon) params.payway2 = "vcoin";
|
||||
resp = await settlementOrder(params);
|
||||
if (this.isCoupon) {
|
||||
params.payway2 = "vcoin";
|
||||
resp = await settlementOrder(params);
|
||||
} else {
|
||||
// params["cartIds"] = this.ids;
|
||||
if (
|
||||
this.orderInfo.paymentMethod == "balance" ||
|
||||
this.orderInfo.paymentMethod == "redpacket"
|
||||
) {
|
||||
params["password"] = CryptoJS.MD5(this.payPwd).toString();
|
||||
}
|
||||
resp = await settle(params);
|
||||
}
|
||||
|
||||
// resp = await settle(params);
|
||||
}
|
||||
} else {
|
||||
params["cartIds"] = this.ids;
|
||||
@@ -957,8 +977,8 @@ export default {
|
||||
|
||||
// 提交订单成功,就唤起支付
|
||||
if (resp && resp.bizcode === 100) {
|
||||
console.log("提交订单成功", resp.data);
|
||||
const item = resp.data;
|
||||
console.log("提交订单成功", resp.data);
|
||||
const item = resp.data;
|
||||
if (item.status === 1) {
|
||||
jumpWayOk();
|
||||
return;
|
||||
|
||||
@@ -1331,8 +1331,8 @@ export default {
|
||||
};
|
||||
|
||||
console.log("selectTempl", selectTempl);
|
||||
if (this.isShowCart == 1 || this.isCoupon || isBy) {
|
||||
console.log("活动类型params---秦星星", params, this.isCoupon);
|
||||
if (this.isShowCart == 1 || this.isCoupon) {
|
||||
console.log("活动类型params---秦星星", params, this.isCoupon, this.isShowCart == 1);
|
||||
params["specsId"] = selectTempl;
|
||||
let url = "";
|
||||
if (this.activedType == "seckill") {
|
||||
@@ -1356,6 +1356,8 @@ export default {
|
||||
this.specificationShow = false;
|
||||
}
|
||||
|
||||
console.log("活动类型params---秦星星--1", url);
|
||||
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
});
|
||||
@@ -1363,12 +1365,20 @@ export default {
|
||||
}
|
||||
const resp = await addGoods(params);
|
||||
if (resp && resp.bizcode === 100) {
|
||||
this.specificationShow = false;
|
||||
uni.showToast({
|
||||
title: "成功加入购物车",
|
||||
icon: "success", // 可选 success/loading/none
|
||||
duration: 2000, // 持续时长,单位ms
|
||||
});
|
||||
|
||||
if (isBy) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/order_package/order_submit/order_submit?ids=${resp.data}&address=${this.selectAddress?.id}`,
|
||||
});
|
||||
} else {
|
||||
this.specificationShow = false;
|
||||
uni.showToast({
|
||||
title: "成功加入购物车",
|
||||
icon: "success", // 可选 success/loading/none
|
||||
duration: 2000, // 持续时长,单位ms
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
// 跳转到分享页面
|
||||
|
||||
Reference in New Issue
Block a user