This commit is contained in:
parent
b10fe4c605
commit
96a3a2ef8d
|
@ -104,10 +104,10 @@ const handleEnter = () => {
|
||||||
auth_code: input.value,
|
auth_code: input.value,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data.trade_state == "SUCCESS") {
|
if (res.data.out_trade_no && res.msg == "支付成功") {
|
||||||
drawer.value = false;
|
drawer.value = false;
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: res.data.trade_state_desc || "支付成功",
|
message: "支付成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
});
|
});
|
||||||
// if(res.data.message) audioplay(res.data.message);
|
// if(res.data.message) audioplay(res.data.message);
|
||||||
|
@ -173,10 +173,10 @@ const orderPay = (id) => {
|
||||||
};
|
};
|
||||||
orderPayApi(id, query)
|
orderPayApi(id, query)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data.trade_state == "SUCCESS") {
|
if (res.data.out_trade_no && res.msg == "支付成功") {
|
||||||
drawer.value = false;
|
drawer.value = false;
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: res.message == "success" ? "支付成功" : res.message,
|
message: "支付成功",
|
||||||
type: "success",
|
type: "success",
|
||||||
});
|
});
|
||||||
// if(res.data.message) audioplay(res.data.message);
|
// if(res.data.message) audioplay(res.data.message);
|
||||||
|
|
|
@ -139,6 +139,9 @@ const onPrint = (data)=>{
|
||||||
total: item.goods_total_price, //小计
|
total: item.goods_total_price, //小计
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
let paytype = "现金支付";
|
||||||
|
if(data.pay_type==13) paytype = "支付宝支付";
|
||||||
|
if(data.pay_type==9) paytype = "微信支付";
|
||||||
let obj = {
|
let obj = {
|
||||||
mer_name: userStore.userInfo.merchant.mer_name, //商户名称
|
mer_name: userStore.userInfo.merchant.mer_name, //商户名称
|
||||||
service_phone: userStore.userInfo.merchant.service_phone, //客服电话
|
service_phone: userStore.userInfo.merchant.service_phone, //客服电话
|
||||||
|
@ -146,7 +149,7 @@ const onPrint = (data)=>{
|
||||||
create_time: data.create_time, //下单时间
|
create_time: data.create_time, //下单时间
|
||||||
total_price: orderForm.value.total, //总价
|
total_price: orderForm.value.total, //总价
|
||||||
pay_price: orderForm.value.total, //实付
|
pay_price: orderForm.value.total, //实付
|
||||||
pay_type: data.trade_type=='MICROPAY' ? '微信支付':'余额支付', //支付方式
|
pay_type: paytype, //支付方式
|
||||||
pay_number: data.transaction_id, //支付单号
|
pay_number: data.transaction_id, //支付单号
|
||||||
goods: goods, //商品列表
|
goods: goods, //商品列表
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue