This commit is contained in:
lf 2024-07-25 15:15:53 +08:00
parent 75e65a0c9c
commit 2adf809a91
5 changed files with 60 additions and 7 deletions

View File

@ -540,7 +540,6 @@
req.axiosPost("/key/couponGroupUsage", data)
.then((res) => {
if (res.code == 200) {
alert(navigator.userAgent, 1)
if (this.goods.group_info.channel == 1 && this.goods.group_info.receive_mode == 1) {
/* 支付宝官方领取 */
this.toLinkAlipay();
@ -653,7 +652,6 @@
// 提交函数
submitOne(data) {
/* 领取立减金 */
alert(159)
req.axiosPost("/key/couponGroupUsage", data)
.then(({ code, message }) => {
if (code == 200) {

View File

@ -552,7 +552,6 @@
req.axiosPost("/key/couponGroupUsage", data)
.then((res) => {
if (res.code == 200) {
alert(navigator.userAgent, 3)
// 领取结算 4
if (bm_obj_data && !bm_obj_data.settlement_data.is_settlement && bm_obj_data.settlement_data.settlement_type === 4) {
settlementFun(bm_obj_data.token, bm_obj_data.settlement_data.settlement_type);

View File

@ -15,6 +15,7 @@
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/lodash.min.js"></script>
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/api2_0.js?v=232323"></script>
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/libs.js?v=sdfhksdfklwrwer"></script>
<script src="../YT_Client_api.js"></script>
<style>
body,
html {
@ -543,7 +544,35 @@
this.publicCollection();
} else {
/* 小程序 */
window.location.replace(res.data.redirect_url);
let ua = navigator.userAgent; //判断用户打开链接环境
if (ua.indexOf("CreditCardAppNew") > -1) { // 正式z 用 CreditCardAppNew UnionPay/1.0
Fw.device.api.openWXMiniProgram({
programID: "gh_07fecf7a6d31",
path: "pages/index/index",
miniType: 2, // 1 开发版 2 体验版 // 正式z 删除
extJson: JSON.stringify({
...res.data
})
})
} else if (ua.indexOf("Source/YOUBankApp/psbc") > -1) {
function upWXSmallProgramYouBank(){
function objectToQueryString(path) {
const obj = JSON.parse(JSON.stringify(path));
return Object.keys(obj).map(key => key + '=' + obj[key]).join('&');
}
let url = "pages/index/index?" + objectToQueryString(res.data);
AlipayJSBridge.call('upWXSmallProgramYouBank', {
id: 'gh_07fecf7a6d31',
url: url,
},
function(result) {
console.log(result);
});
}
upWXSmallProgramYouBank();
} else {
window.location.replace(res.data.redirect_url);
}
self.timeGet = setInterval(() => {
self.getProductDetail();
// self.groupProductVoucherDetail();

View File

@ -15,6 +15,7 @@
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/lodash.min.js"></script>
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/api2_0.js?v=232323"></script>
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/libs.js?v=sdfhksdfklwrwer"></script>
<script src="./YT_Client_api.js"></script>
<style>
body,
html {
@ -513,7 +514,6 @@
code_batch_id: this.code_batch_id,
receive_mode: 1
};
alert('zgp')
req.axiosPost("/key/couponGroupUsage", data)
.then((res) => {
if (res.code == 200) {
@ -526,7 +526,35 @@
this.publicCollection();
} else {
/* 小程序 */
window.location.replace(res.data.redirect_url);
let ua = navigator.userAgent; //判断用户打开链接环境
if (ua.indexOf("CreditCardAppNew") > -1) { // 正式z 用 CreditCardAppNew UnionPay/1.0
Fw.device.api.openWXMiniProgram({
programID: "gh_07fecf7a6d31",
path: "pages/index/index",
miniType: 2, // 1 开发版 2 体验版 // 正式z 删除
extJson: JSON.stringify({
...res.data
})
})
} else if (ua.indexOf("Source/YOUBankApp/psbc") > -1) {
function upWXSmallProgramYouBank(){
function objectToQueryString(path) {
const obj = JSON.parse(JSON.stringify(path));
return Object.keys(obj).map(key => key + '=' + obj[key]).join('&');
}
let url = "pages/index/index?" + objectToQueryString(res.data);
AlipayJSBridge.call('upWXSmallProgramYouBank', {
id: 'gh_07fecf7a6d31',
url: url,
},
function(result) {
console.log(result);
});
}
upWXSmallProgramYouBank();
} else {
window.location.replace(res.data.redirect_url);
}
self.timeGet = setInterval(() => {
self.getProductDetail(); //
// self.groupProductVoucherDetail(); // 没有返回值,解决不了

View File

@ -510,7 +510,6 @@
req.axiosPost("/key/couponGroupUsage", data)
.then((res) => {
if (res.code == 200) {
alert(navigator.userAgent, 2)
// 第一步:是否是微信环境 -> 公众号授权
if (self.openId && navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1) {
self.publicCollection(res.data.order_number);