| | |
| | | else{ |
| | | const value = uni.getStorageSync('userInfo'); |
| | | console.log(value); |
| | | //this.webviewUrl = encodeURI('http://appapitest.ushopvip.com/html/fengqiangbang.html?token='+value.token); |
| | | this.webviewUrl = encodeURI('http://dfgapp.ushopvip.com/html/fengqiangbang.html?token='+value.token); |
| | | } |
| | | |
| | |
| | | }, |
| | | methods: { |
| | | received(e) { |
| | | console.log(e.detail.data[0].type) |
| | | if(e.detail.data[0].type=='getToken'){ |
| | | const token = uni.getStorageSync('userInfo').token; |
| | | var currentWebview = this.$scope.$getAppWebview() |
| | | var wv = currentWebview.children()[0] |
| | | wv.evalJS('localStorage.setItem("ZZTOKEN",' + JSON.stringify(token) + ')'); |
| | | var res=e.detail.data[0]; |
| | | console.log(res); |
| | | switch(res.action) |
| | | { |
| | | case "back"://返回 |
| | | this.backLast(); |
| | | break; |
| | | } |
| | | }, |
| | | |
| | | backLast() |
| | | { |
| | | console.log("返回") |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }); |
| | | }, |
| | | // 关闭mui返回 |
| | | clearMuiBack() { |
| | | // #ifdef APP-PLUS |