chenhaozhe
昨天 013c334556cc87aa52ae1bce65eaa67e54125587
修正 自动登录报异常行为
3个文件已修改
33 ■■■■■ 已修改文件
.env.development 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.production 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.development
@@ -10,7 +10,7 @@
# VUE_APP_BASE_API = 'http://220.189.218.155:9010/API/'
# VUE_APP_BASE_API = 'http://localhost:8082/LuBaoAPI/'
#锦隆
# VUE_APP_BASE_API = 'http://192.168.1.11/API/'
VUE_APP_BASE_API_INNER = 'http://192.168.1.11/API/'
VUE_APP_BASE_API = http://61.174.29.234:8880/API/
#杜贺
# VUE_APP_BASE_API = http://localhost:8082/API/
.env.production
@@ -5,11 +5,11 @@
ENV = 'production'
# 宁波 四维尔
# VUE_APP_BASE_API = http://192.168.0.236:9010/API/
# VUE_APP_BASE_API = http://220.189.218.155:9010/API/
VUE_APP_BASE_API_INNER = http://192.168.0.236:9010/API/
VUE_APP_BASE_API = http://220.189.218.155:9010/API/
# 余姚 锦隆 智能家居
# VUE_APP_BASE_API = http://192.168.1.11/API/
VUE_APP_BASE_API = http://61.174.29.234:8880/API/
# VUE_APP_BASE_API_INNER = http://192.168.1.11/API/
# VUE_APP_BASE_API = http://61.174.29.234:8880/API/
# 智云迈思L-MOM管理系统/生产环境
# VUE_APP_BASE_API = http://47.96.97.237/API/
#杜贺
src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue
@@ -291,13 +291,13 @@
    },
    async created() {
        await this.loging();                                            //自动登录
        this.judgeIsLoging();                                           //判断是否登录,未登录则跳转回登录页面
        await this.judgeIsLoging();                                           //判断是否登录,未登录则跳转回登录页面
        await this.get_OrganizationList();                              //页面初始化 获取组织下拉列表数据
        await this.initPageData();                                      //页面初始化
    },
    methods: {
        //#region 判断是否登录,未登录则跳转回登录页面
        judgeIsLoging(){
        async judgeIsLoging(){
            if (sessionStorage["login"] != "login") {
                this.$modal.msgError("登录失效,请重新登录!!");
                this.$router.push({ path: "/" }).catch(() => { })
@@ -306,7 +306,7 @@
        //#endregion
        //#region 页面初始化
        initPageData(){
        async initPageData(){
            var params = this.get_UrlVars();
            var OperationType = params[params[0]];      //操作类型
@@ -729,11 +729,11 @@
            if (HOrgID == 0) {
                //判断是否登录 未登录则跳到登录页
                if (sessionStorage.login != "login") {
                    this.$modal.msgError("登录失效,请重新登录!!");
                    this.$router.push({ path: "/" }).catch(() => { })
                }
                return;
                // if (sessionStorage.login != "login") {
                //     this.$modal.msgError("登录失效,请重新登录!!");
                //     this.$router.push({ path: "/" }).catch(() => { })
                // }
                // return;
            }
            var sql_getHOrgName = "select HName from Xt_Organizations where HItemID = " + HOrgID;
@@ -763,6 +763,8 @@
                this.$router.push({ path: "/" }).catch(() => { })
            });
            // 写入sessionStorage 需要时间,后续操作需要等待 写入sessionStorage完成后再执行
            var sql_login = "select * from h_v_Gy_Czygl_Login where Czymc = '" + HUserName + "'";
            axios.get(this.$baseUrl + "/CommonModel/searchMethod", {
                params: { 
@@ -819,6 +821,11 @@
                        sessionStorage["Organization"] = HOrgName;
                        sessionStorage["HTranSlate"] = "1";
                        sessionStorage["HAutoLogin"] = "1";
                        // 添加一个延时,保证写入sessionStorage完成后再调用后续业务代码
                        setTimeout(() => {
                        }, 1000);
                    } else {
                        this.$modal.msgError("加载失败!!账号不存在,请联系管理员维护账号信息!!");
                        this.$router.push({ path: "/" }).catch(() => { });