cshenfu
2023-05-18 cff9dd6ad06b10b6e936b23bae2261b28d48fe56
save openid
1个文件已修改
22 ■■■■■ 已修改文件
App.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
App.vue
@@ -5,7 +5,29 @@
    } 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) {