chenhaozhe
2025-09-22 c5ce0e20f31b18a7f783088006e49a9a0dee2aa1
添加 余姚兴达起动器 地址
2个文件已修改
74 ■■■■ 已修改文件
manifest.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/login.vue 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json
@@ -2,8 +2,8 @@
    "name" : "智云LMES",
    "appid" : "__UNI__B002F49",
    "description" : "",
    "versionName" : "1.0.82",
    "versionCode" : 182,
    "versionName" : "1.0.83",
    "versionCode" : 183,
    "transformPx" : false,
    /* 5+App特有相关 */
    "app-plus" : {
pages/index/login.vue
@@ -45,17 +45,18 @@
                    <view class="apibtn" @tap="changeApi=true">修改服务器地址</view> -->
                </view>
            </view>
            <uni-popup ref="popup" type="center">
                <uni-popup-dialog title="服务器设置" mode="input" @confirm="confirmHandler" :before-close="true" @close="close">
                    <view class="popup-content">
                        <input type="text" v-model="serverUrlName" placeholder="请输入服务器名称">
                    </view>
                </uni-popup-dialog>
            </uni-popup>
            <uni-popup ref="popup" type="center">
                <uni-popup-dialog title="服务器设置" mode="input" @confirm="confirmHandler" :before-close="true"
                    @close="close">
                    <view class="popup-content">
                        <input type="text" v-model="serverUrlName" placeholder="请输入服务器名称">
                    </view>
                </uni-popup-dialog>
            </uni-popup>
            <view class="btn" @tap="submit">登 录</view>
            <view class="btn apibtn" @click="openServerSettingHandler">服务器设置</view>
            <view class="btn apibtn" @click="openServerSettingHandler">服务器设置</view>
        </view>
    </view>
</template>
@@ -78,10 +79,15 @@
                CommonUtils,
                arrayDataBases: [],
                DataBases: '',
                serverUrlandName:{"浙江智云迈思":'http://47.96.97.237/API/',"温州海诚光学":'http://122.228.39.234:7177/API/',"宁波惠康工业":'http://172.16.72.30:6699/API/'},
                serverUrlName:'浙江智云迈思',
                serverUrlandName: {
                    "浙江智云迈思": 'http://47.96.97.237/API/',
                    "温州海诚光学": 'http://122.228.39.234:7177/API/',
                    "宁波惠康工业": 'http://172.16.72.30:6699/API/',
                    "余姚兴达起动器": 'http://121.37.133.104/API/',
                },
                serverUrlName: '浙江智云迈思',
                arrayOrganization: [],
                Organization: '',
                HOrgNameList: [],
@@ -124,24 +130,24 @@
            },
            confirmHandler() {
                console.log(this.serverUrlName)
                console.log(this.serverUrlandName[this.serverUrlName])
                let url = this.serverUrlandName[this.serverUrlName];
                if(url!=undefined){
                    uni.setStorageSync('serverUrl', url)
                    this.serverUrl = url
                    this.changeApi = false
                    this.getOrganization()
                    this.$refs.popup.close()
                }else{
                    uni.showToast({
                        title: '服务器名称错误请重新输入',
                        icon: 'none',
                    })
                }
                console.log(this.serverUrlandName[this.serverUrlName])
                let url = this.serverUrlandName[this.serverUrlName];
                if (url != undefined) {
                    uni.setStorageSync('serverUrl', url)
                    this.serverUrl = url
                    this.changeApi = false
                    this.getOrganization()
                    this.$refs.popup.close()
                } else {
                    uni.showToast({
                        title: '服务器名称错误请重新输入',
                        icon: 'none',
                    })
                }
            },
            close(){
                this.$refs.popup.close()
            },
            close() {
                this.$refs.popup.close()
            },
            openServerSettingHandler() {
                this.$refs.popup.open()
            },
@@ -170,7 +176,7 @@
            },
            getOrganization() {
                this.arrayOrganization = []
                this.arrayOrganization = []
                uni.request({
                    url: this.serverUrl + '/Web/GetOrganizations',
                    success: (res) => {