Commit 1703e665 authored by 郭志伟's avatar 郭志伟

Merge branch 'fix/goods' into 'master'

fix: 信用钱包H5跳转问题

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