chenhaozhe
2025-11-25 6f17e42e2463aee9804f50bfd0d5a8bcb1f7d7c2
pages/index/login.vue
@@ -85,7 +85,14 @@
                    "温州海诚光学": 'http://122.228.39.234:7177/API/',
                    "宁波惠康工业": 'http://172.16.72.30:6699/API/',
                    "余姚兴达起动器": 'http://121.37.133.104/API/',
               "翁涛涛本地测试": 'http://localhost:81/API/'
                "李林俊本地测试": 'http://localhost:8082/LuBaoAPI/',
               "苏州卫智科技": 'http://221.224.60.42:8082/API_WW/',
               "杭州凯贝奈特": 'http://192.168.50.253:8080/API/',
               "杭州凯贝奈特外网": 'http://erp.hzcabinet.cn:9090/API/',
               "翁涛涛本地测试": 'http://localhost:81/API/',
               "陈镐哲本地测试": 'http://localhost:81/API/',
               "张瑞广本地测试": 'http://localhost:8082/API/',
               "余思杰本地测试": 'http://localhost:8082/LuBaoAPI/',
                },
                serverUrlName: '浙江智云迈思',
@@ -96,7 +103,7 @@
                HOrgName: '',
                UserName: '', //admin    001
                PassWord: '', //123456
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API/',
                serverUrlCache: '',
            }
        },
@@ -107,8 +114,10 @@
                logindata = JSON.parse(logindata)
                this.HOrgName = logindata.HOrgName
                this.Organization = logindata.Organization
                this.UserName = logindata.UserName
                this.PassWord = logindata.PassWord
                this.UserName = logindata.HUserNumber
                this.PassWord = logindata.HPassWord
                // this.UserName = logindata.UserName
                // this.PassWord = logindata.PassWord
            }
            this.getOrganization()
            this.getDataBases()
@@ -226,15 +235,22 @@
                        title: '登录中...',
                        mask: true
                    })
                    var data = {
                        UserName: this.UserName,
                        PassWord: this.PassWord,
                        HOrgName: this.HOrgName,
                        Organization: this.Organization
                    var data =
                    {
                        HUserNumber: this.UserName,
                        HPassWord: this.PassWord,
                        HStockOrgID: this.HOrgName,
                        HStockOrgName: this.Organization
                    }
                    //     UserName: this.UserName,
                    //     PassWord: this.PassWord,
                    //     HOrgName: this.HOrgName,
                    //     Organization: this.Organization
                    // }
                    uni.setStorageSync('loginData', JSON.stringify(data));
                    uni.request({
                        url: this.serverUrl + '/Web/GetUser',
                        url: this.serverUrl + 'WEBSController/GetUser_Json',
                        method: 'GET',
                        data: data,
                        success: (res) => {
@@ -268,6 +284,42 @@
                            })
                        },
                    });
                    // uni.request({
                    //     url: this.serverUrl + '/Web/GetUser',
                    //     method: 'GET',
                    //     data: data,
                    //     success: (res) => {
                    //         console.log(res)
                    //         uni.hideLoading()
                    //         uni.showToast({
                    //             title: res.data.Message,
                    //             icon: 'none'
                    //         })
                    //         if (res.data.count == 1) {
                    //             setLoginData(data)
                    //             setUserInfo(res.data.data[0])
                    //             uni.setStorageSync('HUserName', res.data.data[0].Czymc);
                    //             uni.setStorageSync('HBillerID', res.data.data[0].HK3UserID);
                    //             uni.setStorageSync('SourceFlag', false);
                    //             uni.setStorageSync('login', "login");
                    //             uni.setStorageSync('Organization', this.Organization);
                    //             uni.setStorageSync('OrganizationID', this.HOrgName);
                    //             this.CommonUtils.setServerUrl(this.serverUrl)
                    //             uni.reLaunch({
                    //                 url: '/pages/index/index'
                    //             })
                    //         }
                    //     },
                    //     fail: (res) => {
                    //         console.log(res);
                    //         uni.hideLoading()
                    //         uni.showToast({
                    //             title: '接口请求失败',
                    //             icon: 'none'
                    //         })
                    //     },
                    // });
                }
            }
        }