Commit 8b5c1f44 authored by 郭志伟's avatar 郭志伟

fix: 信用钱包H5跳转问题

parent 744d589a
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
</div> </div>
<div class="auth-protocol"> <div class="auth-protocol">
允许即表示同意 允许即表示同意
<a href>《用户协议》</a> <a href="javascript:;" @click="showProtocol(0)">《用户协议》</a>
<a href>《隐私政策》</a> <a href="javascript:;" @click="showProtocol(1)">《隐私政策》</a>
</div> </div>
<div class="auth-foot"> <div class="auth-foot">
<cr-button class="wx-default" @click="setAuthXyqb(3)">拒绝</cr-button> <cr-button class="wx-default" @click="setAuthXyqb(3)">拒绝</cr-button>
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
<script> <script>
import { mapState, mapActions } from "vuex"; import { mapState, mapActions } from "vuex";
import protocol from "@/api/protocol";
import localStorage from "@/service/localStorage"; import localStorage from "@/service/localStorage";
export default { export default {
...@@ -43,6 +44,16 @@ export default { ...@@ -43,6 +44,16 @@ export default {
data() { data() {
return { return {
showAuth: true, showAuth: true,
protocol: [
{
title: "用户协议",
url: protocol.userAgreement
},
{
title: "隐私政策",
url: protocol.privacyPolicy
}
],
userInfo: [] userInfo: []
}; };
}, },
...@@ -51,7 +62,7 @@ export default { ...@@ -51,7 +62,7 @@ export default {
immediate: true, immediate: true,
handler(val) { handler(val) {
this.setUserInfo(); this.setUserInfo();
this.showAuth = !!this.userInfo.length && val === 2; this.showAuth = !!this.userInfo.length && val === 2 && !localStorage.get("mongoToken");
if (this.showAuth) { if (this.showAuth) {
this.$nextTick(() => { this.$nextTick(() => {
const activeElement = document.activeElement; const activeElement = document.activeElement;
...@@ -72,11 +83,14 @@ export default { ...@@ -72,11 +83,14 @@ export default {
...mapState(["showAuthXyqb"]) ...mapState(["showAuthXyqb"])
}, },
methods: { methods: {
...mapActions(["setAuthXyqb"]), ...mapActions(["setAuthXyqb", "setPublicPopup"]),
confirm() { confirm() {
localStorage.set("mongoToken", localStorage.get("mongoTokenFromxyqb")); localStorage.set("mongoToken", localStorage.get("mongoTokenFromxyqb"));
this.setAuthXyqb(4); this.setAuthXyqb(4);
}, },
showProtocol(idx) {
this.setPublicPopup(this.protocol[idx]);
},
setUserInfo() { setUserInfo() {
const xyqbUserInfo = localStorage.get("xyqbUserInfo") || {}; const xyqbUserInfo = localStorage.get("xyqbUserInfo") || {};
Object.keys(xyqbUserInfo).forEach(key => { Object.keys(xyqbUserInfo).forEach(key => {
......
...@@ -2,13 +2,11 @@ ...@@ -2,13 +2,11 @@
* @Description: 支付微信h5, jsapi, 第三方收银台,跳转) * @Description: 支付微信h5, jsapi, 第三方收银台,跳转)
* @Date: 2020-07-28 15:03:52 * @Date: 2020-07-28 15:03:52
* @LastEditors: gzw * @LastEditors: gzw
* @LastEditTime: 2020-08-27 15:41:41 * @LastEditTime: 2020-08-28 11:56:33
*/ */
// import cherry from "@qg/cherry-ui";
import qs from "qs"; import qs from "qs";
// const { Notify } = cherry; import { isXyqb } from "@/service/validation";
/** /**
* payByWeixinJsapi * payByWeixinJsapi
* @description: 微信通过jsapi支付 * @description: 微信通过jsapi支付
...@@ -57,6 +55,7 @@ function payByWeixinJsapi(info = {}, callback) { ...@@ -57,6 +55,7 @@ function payByWeixinJsapi(info = {}, callback) {
*/ */
function payByWeixinH5(info) { function payByWeixinH5(info) {
if (!info.url) return; if (!info.url) return;
info.params.isXyqb = isXyqb;
const currentPath = encodeURIComponent( const currentPath = encodeURIComponent(
window.location.origin + window.location.origin +
"/payWaiting" + "/payWaiting" +
...@@ -75,6 +74,7 @@ function payByWeixinH5(info) { ...@@ -75,6 +74,7 @@ function payByWeixinH5(info) {
*/ */
function payByThirdPartyCashier(info) { function payByThirdPartyCashier(info) {
if (!info.url) return; if (!info.url) return;
info.params.isXyqb = isXyqb;
const currentPath = encodeURIComponent( const currentPath = encodeURIComponent(
window.location.origin + window.location.origin +
"/payWaiting" + "/payWaiting" +
......
...@@ -270,7 +270,9 @@ export default { ...@@ -270,7 +270,9 @@ export default {
this.formData.selfIdNo = idNoMask; this.formData.selfIdNo = idNoMask;
} }
if (phoneNoMask) { if (phoneNoMask) {
setTimeout(() => {
this.formData.selfPhone = phoneNoMask; this.formData.selfPhone = phoneNoMask;
}, 500);
} }
this.xyqbAuthState = localStorage.get("xyqbAuthState"); this.xyqbAuthState = localStorage.get("xyqbAuthState");
this.selfInfoReadonly = nameMask && idNoMask && phoneNoMask; this.selfInfoReadonly = nameMask && idNoMask && phoneNoMask;
......
...@@ -15,10 +15,14 @@ export default { ...@@ -15,10 +15,14 @@ export default {
mounted() { mounted() {
this.setIsPayWait(true); this.setIsPayWait(true);
this.orderInfo = this.$route.query; this.orderInfo = this.$route.query;
if (this.orderInfo.isXyqb) {
window.location.href = "xyqb://";
return;
}
if (!this.orderInfo.payOrderNo) { if (!this.orderInfo.payOrderNo) {
this.$notify({ type: "warning", message: "正在跳转..." }); this.$notify({ type: "warning", message: "正在跳转..." });
setTimeout(() => { setTimeout(() => {
this.$router.replace("/policy"); this.$router.replace("/");
}, 1000); }, 1000);
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment