Browse Source

优化

master
陈裕财 4 years ago
parent
commit
343d01a16f
  1. 3
      src/views/layout/components/Navbar.vue
  2. 5
      src/views/login/components/login.vue

3
src/views/layout/components/Navbar.vue

@ -223,7 +223,8 @@ export default {
}, },
logout() { logout() {
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch('LogOut').then(() => {
location.reload()// In order to re-instantiate the vue-router object to avoid bugs
//location.reload()// In order to re-instantiate the vue-router object to avoid bugs
this.$router.push({path:'/login'})
}) })
}, },
showSelectShopMethod() { showSelectShopMethod() {

5
src/views/login/components/login.vue

@ -328,17 +328,18 @@ export default {
this.handleLogin(); this.handleLogin();
}, },
weixinLogin(){ weixinLogin(){
var mdpRedirectUri="https://www.qingqinkj.com/xm/m1/"
getTpaState().then(res=>{ getTpaState().then(res=>{
var tips = res.data.tips; var tips = res.data.tips;
if(tips.isOk){ if(tips.isOk){
this.wxLoginCodeVisible=true; this.wxLoginCodeVisible=true;
var state=res.data.data var state=res.data.data
var obj = new WxLogin({ var obj = new WxLogin({
self_redirect:true,
self_redirect:false,
id:"login_container", id:"login_container",
appid: "wx2671d5db8346b6fc", appid: "wx2671d5db8346b6fc",
scope: "snsapi_login", scope: "snsapi_login",
redirect_uri: encodeURIComponent("https://www.maimengcloud.com/api/m1/tpa/login/token?authType=wechat_wxpub&authId=mmxmcloud_wxopen_pc"),
redirect_uri: encodeURIComponent("https://www.maimengcloud.com/api/m1/tpa/login/token?authType=wechat_wxpub&authId=mmxmcloud_wxopen_pc&redirectUri="+mdpRedirectUri),
state: state, state: state,
style: "", style: "",
href: "" href: ""

Loading…
Cancel
Save