| | |
| | | } from 'vuex' |
| | | import setting from "@/common/config"; |
| | | export default { |
| | | onLoad(op) { |
| | | let code = '' |
| | | let open_id2 = this.getURLParams() |
| | | if(open_id2.indexOf("?") != -1){ |
| | | var str = open_id2.substr(1); |
| | | var strs = str.split("="); |
| | | code = strs[1]; |
| | | uni.setStorageSync('openid',code); |
| | | } |
| | | let st_open = uni.getStorageSync('openid') |
| | | console.log("eeeeeeeee",st_open) |
| | | }, |
| | | methods: { |
| | | getURLParams() { |
| | | var url = window.location.href; |
| | | var theRequest = ''; |
| | | if (url.indexOf("?") != -1) { |
| | | theRequest = url |
| | | }else{ |
| | | theRequest = null |
| | | } |
| | | return theRequest |
| | | }, |
| | | gzhLogin() { |
| | | // #ifdef H5 |
| | | if (/MicroMessenger/i.test(navigator.userAgent) && this.$store.state.config.wxGzhLogin == 1) { |