Commit 39d9cb32 authored by 郭志伟's avatar 郭志伟

Merge branch 'fix/goods' into 'master'

fix: 微信静默授权

See merge request !184
parents b0bb76c8 eaf6f86a
import { setShare } from "@/service/wxJsSdk";
const currentOrigin = window.location.origin + "/share.html?path=";
const currentOrigin = window.location.origin + "/share.html#";
const logo = currentOrigin + "/shareImg/index.png";
const shareList = {
home: {
......
......@@ -2,7 +2,7 @@
* @Description: weixin-js-sdk
* @LastEditors: gzw
* @Date: 20120-08-30 18:40:11
* @LastEditTime: 2020-09-01 17:23:22
* @LastEditTime: 2020-09-01 18:00:52
*/
import cfg from "@/config/index";
import { getwxAuth } from "@/api/user";
......@@ -75,7 +75,7 @@ export function checkOpenId() {
cfg.wxAppId +
"&redirect_uri=" +
encodeURIComponent(local) +
"&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect";
"&response_type=code&scope=snsapi_base&state=1#wechat_redirect";
return false;
} else {
return true;
......
......@@ -222,15 +222,15 @@ export default {
this.checkLogin();
}
},
created() {
!checkOpenId();
},
mounted() {
this.updateRemain();
},
methods: {
...mapActions(["setIsShowLogin"]),
checkLogin() {
if (!checkOpenId()) {
return;
}
if (!this.isLogin) {
this.setIsShowLogin(true);
return;
......
......@@ -106,6 +106,7 @@ import Detail from "@/api/detail.zhongan.yiwai";
import { trail, list } from "@/api/product";
import { isIdNo } from "@/service/validation";
import { getRealAge, getBirthDate } from "@/service/utils";
import { checkOpenId } from "@/service/wxJsSdk";
export default {
name: "GoodsDetail-AI",
......@@ -223,6 +224,9 @@ export default {
return JSON.parse(JSON.stringify(this.formData));
}
},
created() {
checkOpenId();
},
mounted() {
this.getDetail();
},
......
......@@ -235,6 +235,9 @@ export default {
return JSON.parse(JSON.stringify(this.formData));
}
},
created() {
checkOpenId();
},
mounted() {
this.getDetail();
},
......@@ -252,9 +255,6 @@ export default {
this.$notify({ type: "warn", message: "被保人年龄不在可投保范围,请仔细核对" });
return;
}
if (!checkOpenId()) {
return;
}
if (localStorage.get("mongoToken")) {
this.$refs.insureForm.getFamilyList(true).then(() => {
setTimeout(() => {
......
......@@ -210,6 +210,9 @@ export default {
return JSON.parse(JSON.stringify(this.formData));
}
},
created() {
checkOpenId();
},
mounted() {
this.getDetail();
},
......@@ -237,9 +240,6 @@ export default {
// this.currentPupopIndex = 6;
// return;
// }
if (!checkOpenId()) {
return;
}
this.showLoginPopup();
this.popupShow = false;
},
......
......@@ -218,6 +218,9 @@ export default {
return JSON.parse(JSON.stringify(this.formData));
}
},
created() {
checkOpenId();
},
mounted() {
this.getDetail();
},
......@@ -235,9 +238,6 @@ export default {
this.$notify({ type: "warning", message: "被保人年龄不在可投保范围,请仔细核对" });
return;
}
if (!checkOpenId()) {
return;
}
if (localStorage.get("mongoToken")) {
socialSecurityCache = this.formData.socialSecurity;
this.$refs.insureForm.getFamilyList(true).then(() => {
......
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