解决了吗
点金计划-商家小票链接被强制重定向到空白页面?商家小票跳转链接:https://testshop8306.acescm.cn/storeTicket 支付完成以后配置的商家小票链接一闪而过,看着像是被重定向到了一个空白页面,但是点击浏览器的返回还是可以加载出来再次被重定向到空白页面, 商家小票的跳转链接配置了无需登陆校验,在浏览器里也是可以正常打开,但是在微信浏览器里就被无限重定向,排查了所有代码都没找到问题,各位大佬给点意见 商户订单号:15308174149166062186592696 微信支付单号:4200001611202208162829761850 微信支付商户号:1629508494 [图片] 代码如下: <template> <div class="main"> <div class="img"> <img src="../../assets/img/home/success.png" alt=""> </div> <div class="text"> 您的订单已支付成功! </div> <div class="toOrder" @click="toDetail"> 查看订单 </div> </div> </template> <script lang="ts"> import Vue from 'vue' export default class extends Vue{ private title:any = ''; private data:any = {}; private jumpUrl:any = ""; created () { } mounted() { let mchData ={ action:'onIframeReady', displayStyle:'SHOW_CUSTOM_PAGE', } let postData = JSON.stringify(mchData) parent.postMessage(postData, 'https://payapp.weixin.qq.com'); this.getJumpUrl(); } //获取参数 private getQueryString(name) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i = 0; i < vars.length; i++) { var pair = vars[i].split("="); if (pair[0] == name) { return pair[1]; } } return null; } //获取跳转链接 private getJumpUrl(){ this.$toast.loading({ message: '加载中', forbidClick: true, duration: 0 }); let params = { "sub_mch_id":this.getQueryString("sub_mch_id"), "out_trade_no":this.getQueryString("out_trade_no"), "check_code":this.getQueryString("check_code"), "shop_website":window.location.hostname, "token":this.$store.state.user.userData.token, }; (this as any).$axios.get('/shopping/purchaseorder/get_order_id_by_jgoldplan',{params}).then((res: any) => { this.$toast.clear(); if (res.data && res.data.success) { this.jumpUrl = res.data.data.order_id; }else{ this.$toast.fail(res.data.msg || "服务器内部错误,请联系管理员!"); } }).catch((err:any)=>{ this.$toast.clear(); this.$toast.fail(err.message || err.msg || err); }); } private toDetail(){ if(this.jumpUrl){ let mchData = { action:'jumpOut', jumpOutUrl:window.location.origin + '/order/detail/' + this.jumpUrl } let postData = JSON. stringify(mchData) parent.postMessage(postData, 'https://payapp.weixin.qq.com') }else{ this.$toast.fail("服务器内部错误,请联系管理员!"); } } } </script> <style lang="scss" scoped> .main{ display: flex; width: 100%; height: 100%; flex-direction: column; justify-content: space-around; align-items: center; .img{ width: 60px; height: 60px; img{ width: 100%; height: 100%; } } .text{ font-size: 18px; font-weight: 500; color: #2B3347; } .toOrder{ width: 78%; height: 12%; background: #4786FF; border-radius: 50px; font-size: 18px; font-weight: 500; color: #FFFFFF; display: flex; align-items: center; justify-content: center; } } </style>
02-20