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

fix: 分享授权

parent b5c21698
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Description: weixin-js-sdk * @Description: weixin-js-sdk
* @LastEditors: gzw * @LastEditors: gzw
* @Date: 20120-08-30 18:40:11 * @Date: 20120-08-30 18:40:11
* @LastEditTime: 2020-09-01 19:40:04 * @LastEditTime: 2020-09-01 19:56:12
*/ */
import cfg from "@/config/index"; import cfg from "@/config/index";
import { getwxAuth } from "@/api/user"; import { getwxAuth } from "@/api/user";
...@@ -27,7 +27,7 @@ export async function setShare({ ...@@ -27,7 +27,7 @@ export async function setShare({
}); });
const { appId, timestamp, nonceStr, signature } = res; const { appId, timestamp, nonceStr, signature } = res;
wx.config({ wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId, // 必填,公众号的唯一标识,填自己的! appId, // 必填,公众号的唯一标识,填自己的!
timestamp, // 必填,生成签名的时间戳,刚才接口拿到的数据 timestamp, // 必填,生成签名的时间戳,刚才接口拿到的数据
nonceStr, // 必填,生成签名的随机串 nonceStr, // 必填,生成签名的随机串
......
...@@ -222,13 +222,12 @@ export default { ...@@ -222,13 +222,12 @@ export default {
this.checkLogin(); this.checkLogin();
} }
}, },
created() {
checkOpenId();
},
mounted() { mounted() {
this.updateRemain(); this.updateRemain();
this.checkOpenId();
}, },
methods: { methods: {
...{ checkOpenId },
...mapActions(["setIsShowLogin"]), ...mapActions(["setIsShowLogin"]),
checkLogin() { checkLogin() {
if (!this.isLogin) { if (!this.isLogin) {
......
...@@ -224,13 +224,12 @@ export default { ...@@ -224,13 +224,12 @@ export default {
return JSON.parse(JSON.stringify(this.formData)); return JSON.parse(JSON.stringify(this.formData));
} }
}, },
created() {
checkOpenId();
},
mounted() { mounted() {
this.getDetail(); this.getDetail();
this.checkOpenId();
}, },
methods: { methods: {
...{ checkOpenId },
openIframePupop(index) { openIframePupop(index) {
if (index === 4) { if (index === 4) {
this.$router.push({ path: "/goods/plan", query: { type: this.type } }); this.$router.push({ path: "/goods/plan", query: { type: this.type } });
......
...@@ -235,13 +235,12 @@ export default { ...@@ -235,13 +235,12 @@ export default {
return JSON.parse(JSON.stringify(this.formData)); return JSON.parse(JSON.stringify(this.formData));
} }
}, },
created() {
checkOpenId();
},
mounted() { mounted() {
this.getDetail(); this.getDetail();
this.checkOpenId();
}, },
methods: { methods: {
...{ checkOpenId },
openIframePupop(index) { openIframePupop(index) {
if (index === 4) { if (index === 4) {
this.$router.push({ path: "/goods/plan", query: { type: this.type } }); this.$router.push({ path: "/goods/plan", query: { type: this.type } });
......
...@@ -210,13 +210,12 @@ export default { ...@@ -210,13 +210,12 @@ export default {
return JSON.parse(JSON.stringify(this.formData)); return JSON.parse(JSON.stringify(this.formData));
} }
}, },
created() {
checkOpenId();
},
mounted() { mounted() {
this.getDetail(); this.getDetail();
this.checkOpenId();
}, },
methods: { methods: {
...{ checkOpenId },
showBirthPickerHandler() { showBirthPickerHandler() {
this.showCalDate = true; this.showCalDate = true;
}, },
......
...@@ -218,13 +218,12 @@ export default { ...@@ -218,13 +218,12 @@ export default {
return JSON.parse(JSON.stringify(this.formData)); return JSON.parse(JSON.stringify(this.formData));
} }
}, },
created() {
checkOpenId();
},
mounted() { mounted() {
this.getDetail(); this.getDetail();
this.checkOpenId();
}, },
methods: { methods: {
...{ checkOpenId },
openIframePupop(index) { openIframePupop(index) {
if (index === 4) { if (index === 4) {
this.$router.push({ path: "/goods/plan", query: { type: this.type } }); this.$router.push({ path: "/goods/plan", query: { type: this.type } });
......
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