|
@@ -2,7 +2,7 @@ import { getWxUserInfo, getWxConfig } from '../api/login'
|
|
|
|
|
|
export default {
|
|
|
install(Vue) {
|
|
|
- Vue.prototype.getOpenid = async function (page) {
|
|
|
+ Vue.prototype.getOpenid = async function () {
|
|
|
if (localStorage.getItem("openid") != 'undefined' && localStorage.getItem("openid") != null) {
|
|
|
return;
|
|
|
}
|
|
@@ -10,7 +10,7 @@ export default {
|
|
|
console.log(code, 'code====++++')
|
|
|
if (code == 'undefined' || code == null || code == "") {
|
|
|
// alert("参数异常,请返回首页重试");
|
|
|
- this.urlredirect(page);
|
|
|
+ this.urlredirect();
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -21,12 +21,12 @@ export default {
|
|
|
localStorage.setItem("openid", res.body.openId);
|
|
|
localStorage.setItem("headimgurl", res.body.headimgurl);
|
|
|
} else {
|
|
|
- this.urlredirect(page);
|
|
|
+ this.urlredirect();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
- Vue.prototype.urlredirect = async function (page) {
|
|
|
+ Vue.prototype.urlredirect = async function () {
|
|
|
const res = await getWxConfig({})
|
|
|
const href = window.location.href
|
|
|
// const href = 'https://tianzong.info666.com/'
|