暂存代码
This commit is contained in:
+49
-20
@@ -41,14 +41,12 @@ const _sfc_main = {
|
||||
// 收件地址数据类型
|
||||
selectAddress: {},
|
||||
// 收件地址选择
|
||||
wayOption: []
|
||||
// leftPath:'',
|
||||
// leftPathType:'',
|
||||
wayOption: [],
|
||||
isShowBalance: false
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
const ids = option.ids;
|
||||
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:202", "ids", ids);
|
||||
if (ids && ids !== "null") {
|
||||
this.ids = ids;
|
||||
this.getOrder();
|
||||
@@ -57,9 +55,13 @@ const _sfc_main = {
|
||||
if (addressShow && addressShow !== "null") {
|
||||
this.addressShow = addressShow;
|
||||
}
|
||||
const payOpen = option.payOpen;
|
||||
if (payOpen && payOpen !== "null") {
|
||||
this.getWayOption();
|
||||
this.wayShow = payOpen;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getWayOption();
|
||||
},
|
||||
methods: {
|
||||
getValue: utils_enumUtils.getValue,
|
||||
@@ -71,10 +73,25 @@ const _sfc_main = {
|
||||
url: "/pages/mine_address_add/mine_address_add?ids=" + ids
|
||||
});
|
||||
},
|
||||
wayShowFun(type) {
|
||||
if (type) {
|
||||
this.getWayOption();
|
||||
}
|
||||
this.wayShow = type;
|
||||
},
|
||||
async getWayOption() {
|
||||
const result = await api_order.getSupportPay();
|
||||
if (result && result.bizcode === 100) {
|
||||
this.wayOption = result.data;
|
||||
const data = result.data || [];
|
||||
const amount = this.orderInfo.amount;
|
||||
let flag = data.some((item) => ["wechat", "alipay"].includes(item.type));
|
||||
if (flag) {
|
||||
this.isShowBalance = false;
|
||||
} else {
|
||||
const balanceFlag = data.some((item) => item.type === "balance" && item.balance < amount);
|
||||
this.isShowBalance = balanceFlag;
|
||||
}
|
||||
this.wayOption = data;
|
||||
}
|
||||
},
|
||||
async getOrder() {
|
||||
@@ -202,7 +219,7 @@ const _sfc_main = {
|
||||
remark: JSON.stringify(this.getRemark())
|
||||
//备注信息'[{"sid":"店铺ID","rmk":"备注内容"},{"sid":"店铺ID","rmk":"备注内容"}]'
|
||||
};
|
||||
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:366", "params", params);
|
||||
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:381", "params", params);
|
||||
const resp = await api_cart.settle(params);
|
||||
if (resp && resp.bizcode === 100) {
|
||||
const item = resp.data;
|
||||
@@ -231,18 +248,18 @@ const _sfc_main = {
|
||||
async appWxpay(alipay, orderId, orderNum) {
|
||||
try {
|
||||
const result = await utils_payUtils.appWxpayFun(alipay, orderId, orderNum);
|
||||
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:396", "支付成功", result);
|
||||
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:411", "支付成功", result);
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/order_submit/order_submit.vue:399", "支付失败", error);
|
||||
common_vendor.index.__f__("error", "at pages/order_submit/order_submit.vue:414", "支付失败", error);
|
||||
}
|
||||
},
|
||||
// 支付宝支付
|
||||
async zfbPay(alipay, orderId, orderNum) {
|
||||
try {
|
||||
const result = await utils_payUtils.zfbPayFun(alipay, orderId, orderNum);
|
||||
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:407", "支付成功", result);
|
||||
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:422", "支付成功", result);
|
||||
} catch (error) {
|
||||
common_vendor.index.__f__("error", "at pages/order_submit/order_submit.vue:410", "支付失败", error);
|
||||
common_vendor.index.__f__("error", "at pages/order_submit/order_submit.vue:425", "支付失败", error);
|
||||
}
|
||||
},
|
||||
// 地址选中
|
||||
@@ -271,10 +288,17 @@ const _sfc_main = {
|
||||
this.shopsIndex = index;
|
||||
},
|
||||
jumpProductInfo(item) {
|
||||
common_vendor.index.__f__("log", "at pages/order_submit/order_submit.vue:440", "item", item);
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/productInfo/productInfo?id=" + item.goodsId
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 去充值
|
||||
*/
|
||||
goRechargeFun(item) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/mine_purse_recharge/mine_purse_recharge?category=balance&amount=" + item.balance + "&back=submit&id=" + this.ids
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -401,9 +425,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
height: "20",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
o: common_vendor.o(($event) => {
|
||||
$data.wayShow = true;
|
||||
}),
|
||||
o: common_vendor.o(($event) => $options.wayShowFun(true)),
|
||||
p: common_vendor.t($data.orderInfo.amount),
|
||||
q: common_vendor.o((...args) => $options.goPay && $options.goPay(...args)),
|
||||
r: common_vendor.f($data.wayOption, (item, k0, i0) => {
|
||||
@@ -413,12 +435,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
}, item.balance ? {
|
||||
c: common_vendor.t(item.balance)
|
||||
} : {}, {
|
||||
d: "dc7219ba-10-" + i0 + ",dc7219ba-9",
|
||||
e: common_vendor.p({
|
||||
d: item.type === "balance" && $data.isShowBalance
|
||||
}, item.type === "balance" && $data.isShowBalance ? {
|
||||
e: common_vendor.o(($event) => $options.goRechargeFun(item), item.id)
|
||||
} : {
|
||||
f: "dc7219ba-10-" + i0 + ",dc7219ba-9",
|
||||
g: common_vendor.p({
|
||||
name: item.type,
|
||||
activeColor: "#FF7C41"
|
||||
}),
|
||||
f: item.id
|
||||
activeColor: "#03AD27"
|
||||
})
|
||||
}, {
|
||||
h: item.type === "balance" && $data.isShowBalance
|
||||
}, item.type === "balance" && $data.isShowBalance ? {} : {}, {
|
||||
i: item.id
|
||||
});
|
||||
}),
|
||||
s: common_vendor.o(($event) => $data.orderInfo.paymentMethod = $event),
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -23,7 +23,7 @@
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
.order_submit_warp.data-v-dc7219ba {
|
||||
background-color: #F5F5F5;
|
||||
background-color: #F5F5F5FF;
|
||||
height: calc(100vh - 200rpx);
|
||||
padding: 20rpx;
|
||||
overflow-y: auto;
|
||||
|
||||
Reference in New Issue
Block a user