fix: 0元跳转订单
This commit is contained in:
parent
caec57ea4a
commit
0ec4b59392
|
|
@ -205,6 +205,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import state from '@/store/index';
|
||||||
import { HTTP_REQUEST_URL } from '@/config/app.js';
|
import { HTTP_REQUEST_URL } from '@/config/app.js';
|
||||||
// 混入
|
// 混入
|
||||||
import mixin from '@/static/js/mixin/mixin.js';
|
import mixin from '@/static/js/mixin/mixin.js';
|
||||||
|
|
@ -441,9 +442,15 @@
|
||||||
if (res.data.is_zero_pay) {
|
if (res.data.is_zero_pay) {
|
||||||
uni.showLoading({ title: '支付成功, 跳转订单页' });
|
uni.showLoading({ title: '支付成功, 跳转订单页' });
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
wx.miniProgram.navigateTo({
|
wx.miniProgram.getEnv((wx) => {
|
||||||
url: `/pages/goods/order_list/index`
|
if (wx.miniprogram) {
|
||||||
});
|
wx.miniProgram.navigateTo({
|
||||||
|
url: `/pages/goods/order_list/index`
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
window.location.href = `${HTTP_REQUEST_URL}/JXH5/pages/goods/order_list/index`;
|
||||||
|
}
|
||||||
|
})
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}, 1000)
|
}, 1000)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -478,6 +485,20 @@
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
removeBearerPrefix(tokenString) {
|
||||||
|
/**
|
||||||
|
* 移除字符串开头的 'Bearer ' 前缀(包括空格)
|
||||||
|
*
|
||||||
|
* @param {string} tokenString - 包含 Bearer 前缀的 token 字符串
|
||||||
|
* @returns {string} 移除 Bearer 前缀后的纯 token 字符串
|
||||||
|
*/
|
||||||
|
const bearerPrefix = "Bearer ";
|
||||||
|
if (tokenString.startsWith(bearerPrefix)) {
|
||||||
|
return tokenString.substring(bearerPrefix.length);
|
||||||
|
}
|
||||||
|
return tokenString;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -449,9 +449,15 @@
|
||||||
if (res.data.is_zero_pay) {
|
if (res.data.is_zero_pay) {
|
||||||
uni.showLoading({ title: '支付成功, 跳转订单页' });
|
uni.showLoading({ title: '支付成功, 跳转订单页' });
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
wx.miniProgram.navigateTo({
|
wx.miniProgram.getEnv((wx) => {
|
||||||
url: `/pages/goods/order_list/index`
|
if (wx.miniprogram) {
|
||||||
});
|
wx.miniProgram.navigateTo({
|
||||||
|
url: `/pages/goods/order_list/index`
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
window.location.href = `${HTTP_REQUEST_URL}/JXH5/pages/goods/order_list/index`;
|
||||||
|
}
|
||||||
|
})
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}, 1000)
|
}, 1000)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>在线点餐</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
|
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>在线点餐</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
|
||||||
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><script src="https://h5.dhcc.wang/api/apilink-native.min.js?v=20200701"></script><link rel=stylesheet href=/privilege/static/index.883130ca.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/privilege/static/js/chunk-vendors.e3fc7d65.js></script><script src=/privilege/static/js/index.3ba0a0d9.js></script></body></html>
|
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><script src="https://h5.dhcc.wang/api/apilink-native.min.js?v=20200701"></script><link rel=stylesheet href=/privilege/static/index.883130ca.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/privilege/static/js/chunk-vendors.e3fc7d65.js></script><script src=/privilege/static/js/index.ea797860.js></script></body></html>
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue