fix: 增加 结算pay

This commit is contained in:
zhangds 2024-03-15 11:23:34 +08:00
parent 294381080b
commit 04dc299a93
1 changed files with 19 additions and 14 deletions

View File

@ -47,7 +47,7 @@
<script>
new Vue({
el: "#app",
data () {
data() {
return {
orderNumber: '',
orderInfo: { type: 3 },
@ -72,7 +72,7 @@
components: { modelPop },
created () {
created() {
let orderNumber = this.getQueryString(
window.location.search,
"order_number"
@ -82,7 +82,7 @@
localStorage.setItem('token', this.getQueryString(window.location.search, "token"));
},
methods: {
getQueryString (path, name) {
getQueryString(path, name) {
//获取浏览器地址栏的参数
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = path.substr(1).match(reg);
@ -90,15 +90,15 @@
return null;
},
//返回订单页面
orderPageFn () {
orderPageFn() {
window.location.replace('./coupon/myOrder.html');
},
//卡密返回卡密详情页面
cardPwdPageFn () {
cardPwdPageFn() {
window.location.replace('./coupon/myOrder.html');
},
/* 倒计时 */
countdownFn () {
countdownFn() {
let time = 3;
let stopTimer = setInterval(() => {
time--;
@ -112,7 +112,7 @@
}, 1000);
},
//获取订单详情
getOrderDetail (id) {
getOrderDetail(id) {
req.axiosGet("/key/order/detail/" + id).then((res) => {
if (res.code == 200) {
this.orderInfo = res.data;
@ -133,11 +133,11 @@
},
//弹出框提示
openTipDialog (popUpAttr) {
openTipDialog(popUpAttr) {
this.popAttr = popUpAttr;
},
/* 弹窗回调 */
backFunctionPop (type) {
backFunctionPop(type) {
if (this.popAttr.bottomText === '点击复制' && type) {
var aux = document.createElement("input");
aux.setAttribute("value", this.copyLink);
@ -157,7 +157,7 @@
this.delayedOut();
}
},
toLinkAlipay () {
toLinkAlipay() {
//支付宝H5跳转
let self = this;
let banklink = encodeURIComponent(
@ -176,13 +176,13 @@
window.location.replace(link);
}
},
openErrorDialog (tip, bottomText) {
openErrorDialog(tip, bottomText) {
this.popAttr.text = tip;
this.popAttr.show = true;
this.popAttr.bottomText = bottomText;
},
//领取立减金
receiveFn () {
receiveFn() {
if (this.payStatus != 2) {
this.openTipDialog({
show: true,
@ -210,7 +210,7 @@
},
/* 公众号领取 */
publicCollection () {
publicCollection() {
let params = {
token: localStorage.getItem('token'),
code_batch_id: this.code_batch_id,
@ -223,7 +223,12 @@
this.message = '领取成功';
this.getProductDetail();
} else {
this.axiosErrorFun(res.code, res.message);
this.openTipDialog({
show: true,
title: '温馨提示',
status: 3,/*1 成功 2提示 3失败 */
text: res.message
});
}
})
.catch((err) => { this.loading = false; });