From 0debeb9d6cfed5c4e6cd08eadc67acce164b12c8 Mon Sep 17 00:00:00 2001
From: chenhaozhe <gaozhechen26@gmail.com>
Date: 星期三, 11 三月 2026 20:28:14 +0800
Subject: [PATCH] 修复 除 登录页面外,其余页面无法在网页端进行多语言同步的问题
---
pages/caigouruku/POStockInBill.vue | 178 ++++++++++++----------
utils/i18n.js | 20 +-
pages/index/login.vue | 252 +++++++++++++++---------------
3 files changed, 235 insertions(+), 215 deletions(-)
diff --git a/pages/caigouruku/POStockInBill.vue b/pages/caigouruku/POStockInBill.vue
index 8511a35..aa6e88c 100644
--- a/pages/caigouruku/POStockInBill.vue
+++ b/pages/caigouruku/POStockInBill.vue
@@ -26,7 +26,9 @@
</view>
</view>
<view class="form-item">
- <view class="title">{{ $t(`Gy.HStockPlaceName`) == "Gy.HStockPlaceName"?"浠撲綅": $t(`Gy.HStockPlaceName`) }}:</view>
+ <view class="title">
+ {{ $t(`Gy.HStockPlaceName`) == "Gy.HStockPlaceName"?"浠撲綅": $t(`Gy.HStockPlaceName`) }}:
+ </view>
<view class="right" v-show="true">
<uni-combox :candidates="arrayHStockPlaceNameComputed" placeholder="璇疯緭鍏�(鎴栨壂鎻�)浠撲綅"
v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"
@@ -37,15 +39,25 @@
</view>
<view class="tabs">
- <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">{{ $t(`Gy.SourceBillSelect`) == "Gy.SourceBillSelect"?"閫夋嫨婧愬崟": $t(`Gy.SourceBillSelect`) }}</view>
- <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">{{ $t(`Gy.TableHeaderInfo`) == "Gy.TableHeaderInfo"?"琛ㄥご淇℃伅": $t(`Gy.TableHeaderInfo`) }}</view>
- <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">{{ $t(`Gy.MaterInfo`) == "Gy.MaterInfo"?"鐗╂枡淇℃伅": $t(`Gy.MaterInfo`) }}</view>
- <view :class="tabs == 3 ? 'on':''" @tap="tabs = 3">{{ $t(`Gy.BarCodeInfo`) == "Gy.BarCodeInfo"?"鏉$爜淇℃伅": $t(`Gy.BarCodeInfo`) }}</view>
+ <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">
+ {{ $t(`Gy.SourceBillSelect`) == "Gy.SourceBillSelect"?"閫夋嫨婧愬崟": $t(`Gy.SourceBillSelect`) }}
+ </view>
+ <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">
+ {{ $t(`Gy.TableHeaderInfo`) == "Gy.TableHeaderInfo"?"琛ㄥご淇℃伅": $t(`Gy.TableHeaderInfo`) }}
+ </view>
+ <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">
+ {{ $t(`Gy.MaterInfo`) == "Gy.MaterInfo"?"鐗╂枡淇℃伅": $t(`Gy.MaterInfo`) }}
+ </view>
+ <view :class="tabs == 3 ? 'on':''" @tap="tabs = 3">
+ {{ $t(`Gy.BarCodeInfo`) == "Gy.BarCodeInfo"?"鏉$爜淇℃伅": $t(`Gy.BarCodeInfo`) }}
+ </view>
</view>
<view v-if="tabs == 0">
<view class="form-item">
- <view class="title">{{ $t(`Gy.HMainSourceBillType`) == "Gy.HMainSourceBillType"?"婧愬崟绫诲瀷": $t(`Gy.HMainSourceBillType`) }}:</view>
+ <view class="title">
+ {{ $t(`Gy.HMainSourceBillType`) == "Gy.HMainSourceBillType"?"婧愬崟绫诲瀷": $t(`Gy.HMainSourceBillType`) }}:
+ </view>
<view class="right" v-show="showHMainSourceBillType">
<picker :range="arrayHMainSourceBillType" v-model="HMainSourceBillType"
@change="HMainSourceBillTypeChange">
@@ -60,7 +72,9 @@
</view>
</view>
<view class="form-item">
- <view class="title">{{$t(`Gy.HMainSourceBillNo`) == "Gy.HMainSourceBillNo"?"婧愬崟鍗曞彿": $t(`Gy.HMainSourceBillNo`) }}:</view>
+ <view class="title">
+ {{$t(`Gy.HMainSourceBillNo`) == "Gy.HMainSourceBillNo"?"婧愬崟鍗曞彿": $t(`Gy.HMainSourceBillNo`) }}:
+ </view>
<view class="right" v-show="showHSourceBillNo">
<!-- <uni-combox v-if="reHSourceBillNo" :candidates="arrayHSourceBillNo" placeholder="璇疯緭鍏ユ簮鍗曞崟鍙�"
v-model="hform.HSourceBillNo" @input="HSourceBillNoChange"></uni-combox> -->
@@ -86,7 +100,7 @@
</view> -->
</view>
<view class="form-item">
- <view class="title">鏃ユ湡:</view>
+ <view class="title">{{ $t(`Gy.HDate`) == "Gy.HDate"?"鏃ユ湡": $t(`Gy.HDate`) }}:</view>
<view class="right">
<picker mode="date" v-model="hform.HDate" @change="HDateChange">
<input disabled v-model="hform.HDate" placeholder="璇烽�夋嫨鏃ユ湡" />
@@ -101,7 +115,7 @@
</view>
</view>
<view class="form-item">
- <view class="title">鍗曟嵁鍙�:</view>
+ <view class="title">{{ $t(`Gy.HBillNo`) == "Gy.HBillNo"?"鍗曟嵁鍙�": $t(`Gy.HBillNo`) }}:</view>
<view class="righton">
<input name="HBillNo" disabled v-model="hform.HBillNo" />
</view>
@@ -159,45 +173,45 @@
<view v-if="tabs == 2">
<view class="list" v-for="(item,index) in Materlist" :key="index">
- <uni-card :title="item.鐗╂枡鍚嶇О" style="margin: 10px;" @tap="delMater(item, $event)">
- <!-- 鐗╂枡浠g爜浣滀负鍙偣鍑婚摼鎺� -->
- <view class="card-header" @tap.stop="gotoInventoryQuery(item.鐗╂枡浠g爜)">
- <text class="link-text">鐗╂枡浠g爜锛歿{item.鐗╂枡浠g爜}}</text>
- </view>
-
- <view class="card-detail">
- <view class="detail">
- <text>婧愬崟鍗曞彿锛�</text>{{item.婧愬崟鍗曞彿}}
- </view>
- <view class="detail">
- <text>婧愬崟鏁伴噺锛�</text>{{item.婧愬崟鏁伴噺}}
- </view>
- <view class="detail">
- <text>鏁伴噺锛�</text>{{item.鏁伴噺}}
- </view>
- <view class="detail">
- <text>鏉$爜涓暟锛�</text>{{item.鏉$爜涓暟}}
- </view>
- <view class="detail" v-if="item.瑙勬牸鍨嬪彿">
- <text>瑙勬牸鍨嬪彿锛�</text>{{item.瑙勬牸鍨嬪彿}}
- </view>
- <view class="detail" v-if="item.杈呭姪灞炴��">
- <text>杈呭姪灞炴�э細</text>{{item.杈呭姪灞炴�}
- </view>
- <view class="detail" v-if="item.娆惧彿">
- <text>娆惧彿锛�</text>{{item.娆惧彿}}
- </view>
- <view class="detail" v-if="item.鍚堣鏁伴噺">
- <text>鍚堣鏁伴噺锛�</text>{{item.鍚堣鏁伴噺}}
- </view>
- <view class="detail" v-if="item.鍗曚环">
- <text>鍗曚环锛�</text>{{item.鍗曚环}}
- </view>
- <view class="detail" v-if="materMeta[0].HWHName && /鍏磋揪/.test(hform.HStockOrgName)">
- <text>浠撳簱锛�</text>{{materMeta[0].HWHName}}
- </view>
- </view>
- </uni-card>
+ <uni-card :title="item.鐗╂枡鍚嶇О" style="margin: 10px;" @tap="delMater(item, $event)">
+ <!-- 鐗╂枡浠g爜浣滀负鍙偣鍑婚摼鎺� -->
+ <view class="card-header" @tap.stop="gotoInventoryQuery(item.鐗╂枡浠g爜)">
+ <text class="link-text">鐗╂枡浠g爜锛歿{item.鐗╂枡浠g爜}}</text>
+ </view>
+
+ <view class="card-detail">
+ <view class="detail">
+ <text>婧愬崟鍗曞彿锛�</text>{{item.婧愬崟鍗曞彿}}
+ </view>
+ <view class="detail">
+ <text>婧愬崟鏁伴噺锛�</text>{{item.婧愬崟鏁伴噺}}
+ </view>
+ <view class="detail">
+ <text>鏁伴噺锛�</text>{{item.鏁伴噺}}
+ </view>
+ <view class="detail">
+ <text>鏉$爜涓暟锛�</text>{{item.鏉$爜涓暟}}
+ </view>
+ <view class="detail" v-if="item.瑙勬牸鍨嬪彿">
+ <text>瑙勬牸鍨嬪彿锛�</text>{{item.瑙勬牸鍨嬪彿}}
+ </view>
+ <view class="detail" v-if="item.杈呭姪灞炴��">
+ <text>杈呭姪灞炴�э細</text>{{item.杈呭姪灞炴�}
+ </view>
+ <view class="detail" v-if="item.娆惧彿">
+ <text>娆惧彿锛�</text>{{item.娆惧彿}}
+ </view>
+ <view class="detail" v-if="item.鍚堣鏁伴噺">
+ <text>鍚堣鏁伴噺锛�</text>{{item.鍚堣鏁伴噺}}
+ </view>
+ <view class="detail" v-if="item.鍗曚环">
+ <text>鍗曚环锛�</text>{{item.鍗曚环}}
+ </view>
+ <view class="detail" v-if="materMeta[0].HWHName && /鍏磋揪/.test(hform.HStockOrgName)">
+ <text>浠撳簱锛�</text>{{materMeta[0].HWHName}}
+ </view>
+ </view>
+ </uni-card>
</view>
<view class="over" v-if="Materlist.length == 0">鏆傛棤鏁版嵁</view>
</view>
@@ -523,7 +537,7 @@
this.hform.HBarCode = ""
})
},
-
+
//鎵爜
toScanCode() {
var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
@@ -803,7 +817,7 @@
if (this.HWHNameList[i]['鍚敤浠撲綅'] == 'Y') {
this.showHStockPlaceName = true
this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"])
- }
+ }
}
}
},
@@ -1543,30 +1557,30 @@
},
});
},
- gotoInventoryQuery(HMaterNumber) {
- console.log('璺宠浆鍒板簱瀛樻煡璇紝鐗╂枡浠g爜锛�', HMaterNumber);
-
- // 浣跨敤uni.navigateTo璺宠浆鍒版柊椤甸潰
- uni.navigateTo({
- url: `/pages/jishikucunchaxun/table?OperationType=2&HMaterNumber=${HMaterNumber}`,
- success: (res) => {
- console.log('璺宠浆鎴愬姛');
- },
- fail: (err) => {
- console.error('璺宠浆澶辫触锛�', err);
- // 濡傛灉椤甸潰涓嶅瓨鍦紝鍙互璺宠浆鍒伴粯璁ら〉闈�
- uni.showToast({
- title: '鍔熻兘姝e湪寮�鍙戜腑',
- icon: 'none'
- });
- }
- });
- },
+ gotoInventoryQuery(HMaterNumber) {
+ console.log('璺宠浆鍒板簱瀛樻煡璇紝鐗╂枡浠g爜锛�', HMaterNumber);
+
+ // 浣跨敤uni.navigateTo璺宠浆鍒版柊椤甸潰
+ uni.navigateTo({
+ url: `/pages/jishikucunchaxun/table?OperationType=2&HMaterNumber=${HMaterNumber}`,
+ success: (res) => {
+ console.log('璺宠浆鎴愬姛');
+ },
+ fail: (err) => {
+ console.error('璺宠浆澶辫触锛�', err);
+ // 濡傛灉椤甸潰涓嶅瓨鍦紝鍙互璺宠浆鍒伴粯璁ら〉闈�
+ uni.showToast({
+ title: '鍔熻兘姝e湪寮�鍙戜腑',
+ icon: 'none'
+ });
+ }
+ });
+ },
delMater(item) {
- if (event && event.target.classList && event.target.classList.contains('link-text')) {
- return; // 濡傛灉鏄摼鎺ョ偣鍑伙紝涓嶆墽琛屽垹闄�
- }
-
+ if (event && event.target.classList && event.target.classList.contains('link-text')) {
+ return; // 濡傛灉鏄摼鎺ョ偣鍑伙紝涓嶆墽琛屽垹闄�
+ }
+
uni.showModal({
title: '鎻愮ず',
content: '纭瑕佸垹闄� "' + item.鐗╂枡鍚嶇О + '" 鎵�鏈夋壂鐮佽褰曪紵鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛�',
@@ -2044,10 +2058,12 @@
color: #fff;
}
}
- /* 娣诲姞閾炬帴鏍峰紡 */
- .link-text {
- color: #3a78ff; /* 钃濊壊锛岀被浼艰秴閾炬帴 */
- }
+
+ /* 娣诲姞閾炬帴鏍峰紡 */
+ .link-text {
+ color: #3a78ff;
+ /* 钃濊壊锛岀被浼艰秴閾炬帴 */
+ }
.list {
width: 100%;
@@ -2067,10 +2083,10 @@
margin-right: 20rpx;
text {
- color: #999;
- font-size: 26rpx;
- }
-
+ color: #999;
+ font-size: 26rpx;
+ }
+
}
}
diff --git a/pages/index/login.vue b/pages/index/login.vue
index 8173f6c..7bc9f79 100644
--- a/pages/index/login.vue
+++ b/pages/index/login.vue
@@ -110,7 +110,7 @@
"鏉窞鍑礉濂堢壒": 'http://192.168.50.253:8080/API/',
"鏉窞鍑礉濂堢壒澶栫綉": 'http://erp.hzcabinet.cn:9090/API/',
"缈佹稕娑涙湰鍦版祴璇�": 'http://localhost:81/API/',
- "闄堥晲鍝叉湰鍦版祴璇�": 'http://192.168.0.121:81/API/',
+ "闄堥晲鍝叉湰鍦版祴璇�": 'http://192.168.0.101:81/API/',
"闄堥晲鍝叉湰鍦版祴璇�2": 'http://192.168.88.82:81/API/',
"寮犵憺骞挎湰鍦版祴璇�": 'http://localhost:8082/API/',
"浣欐�濇澃鏈湴娴嬭瘯": 'http://localhost:8082/LuBaoAPI/',
@@ -164,13 +164,13 @@
methods: {
async ApplyLanguagePack(lang, forceUpdate = false) {
// 璇诲彇璇█鍖呭苟鍔犺浇
- // let {
- // data,
- // getRemoteFile
- // } = await getLanguagePackJson(lang)
- // if (getRemoteFile) {
- // this.$i18n.setLocaleMessage(lang, data)
- // }
+ let {
+ data,
+ getRemoteFile
+ } = await getLanguagePackJson(lang)
+ if (getRemoteFile) {
+ this.$i18n.setLocaleMessage(lang, data)
+ }
this.$i18n.locale = lang
},
onLanguageChangeHandler(e) {
@@ -305,124 +305,126 @@
title: '鐧诲綍涓�...',
mask: true
})
- if (this.serverUrlName =="浣欏鍗庤繙"){//鍗庤繙涓嶉渶瑕亀ms楠岃瘉
- var data = {
- UserName: this.UserName,
- PassWord: this.PassWord,
- HOrgName: this.HOrgName,
- Organization: this.Organization
- }
- var data2 = {//鐢ㄤ簬淇濆瓨鐧诲綍淇℃伅
- HUserNumber: this.UserName,
- HPassWord: this.PassWord,
- HStockOrgID: this.HOrgName,
- HStockOrgName: this.Organization
- }
- uni.setStorageSync('loginData', JSON.stringify(data2));
- 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(data2)
- 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'
+ if (this.serverUrlName == "浣欏鍗庤繙") { //鍗庤繙涓嶉渶瑕亀ms楠岃瘉
+ var data = {
+ UserName: this.UserName,
+ PassWord: this.PassWord,
+ HOrgName: this.HOrgName,
+ Organization: this.Organization
+ }
+ var data2 = { //鐢ㄤ簬淇濆瓨鐧诲綍淇℃伅
+ HUserNumber: this.UserName,
+ HPassWord: this.PassWord,
+ HStockOrgID: this.HOrgName,
+ HStockOrgName: this.Organization
+ }
+ uni.setStorageSync('loginData', JSON.stringify(data2));
+ 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'
})
- }
- },
- fail: (res) => {
- console.log(res);
- uni.hideLoading()
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- }else{
- var data = {
- HUserNumber: this.UserName,
- HPassWord: this.PassWord,
- HStockOrgID: this.HOrgName,
- HStockOrgName: this.Organization
- }
-
-
- uni.setStorageSync('loginData', JSON.stringify(data));
- uni.request({
- url: this.serverUrl + 'WEBSController/GetUser_Json',
- 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);
- //瀛樺偍閮ㄩ棬 鑱屽憳 浠撳簱 绛変俊鎭�
- uni.setStorageSync('HDeptID', res.data.data[0].HDeptID); //閮ㄩ棬
- uni.setStorageSync('HDeptName', res.data.data[0].HDeptName);
- uni.setStorageSync('HEmpID', res.data.data[0].HEmpID); //鑱屽憳
- uni.setStorageSync('HEmpName', res.data.data[0].HEmpName);
- uni.setStorageSync('HSCWHID', res.data.data[0].HSCWHID); //璋冨叆浠撳簱
- uni.setStorageSync('HSCWHName', res.data.data[0].HSCWHName);
- uni.setStorageSync('HWhID', res.data.data[0].HWhID); //瀵瑰簲浠撳簱
- uni.setStorageSync('HWhName', res.data.data[0].HWhName);
- uni.setStorageSync('HWorkCenterID', res.data.data[0].HWorkCenterID); //宸ヤ綔涓績
- uni.setStorageSync('HWorkCenterName', res.data.data[0].HWorkCenterName);
- uni.setStorageSync('HSecManagerID', res.data.data[0].HSecManagerID); //瀵瑰簲楠屾敹
- uni.setStorageSync('HSecManagerName', res.data.data[0].HSecManagerName);
- uni.setStorageSync('HGroupID', res.data.data[0].HGroupID); //瀵瑰簲鐝粍
- uni.setStorageSync('HGroupName', res.data.data[0].HGroupName);
- uni.setStorageSync('HProcID', res.data.data[0].HProcID); //瀵瑰簲宸ュ簭
- uni.setStorageSync('HProcName', res.data.data[0].HProcName);
- uni.setStorageSync('HSourceID', res.data.data[0].HSourceID); //瀵瑰簲鐢熶骇璧勬簮
- uni.setStorageSync('HSourceName', res.data.data[0].HSourceName);
- this.CommonUtils.setServerUrl(this.serverUrl)
- // this.WebSocketServices.createConnect(res.data.data[0].Czybm,res.data.data[0].Czymc);
- // getuiUtils.getClientID()
- getuiUtils.getClientID(res.data.data[0].Czybm, res.data.data[0].Czymc)
- uni.reLaunch({
- url: '/pages/index/index'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.hideLoading()
- uni.showToast({
- title: '鎺ュ彛璇锋眰澶辫触',
- icon: 'none'
- })
- },
- });
- }
-
+ if (res.data.count == 1) {
+ setLoginData(data2)
+ 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'
+ })
+ },
+ });
+ } else {
+ var data = {
+ HUserNumber: this.UserName,
+ HPassWord: this.PassWord,
+ HStockOrgID: this.HOrgName,
+ HStockOrgName: this.Organization
+ }
+
+
+ uni.setStorageSync('loginData', JSON.stringify(data));
+ uni.request({
+ url: this.serverUrl + 'WEBSController/GetUser_Json',
+ 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);
+ //瀛樺偍閮ㄩ棬 鑱屽憳 浠撳簱 绛変俊鎭�
+ uni.setStorageSync('HDeptID', res.data.data[0].HDeptID); //閮ㄩ棬
+ uni.setStorageSync('HDeptName', res.data.data[0].HDeptName);
+ uni.setStorageSync('HEmpID', res.data.data[0].HEmpID); //鑱屽憳
+ uni.setStorageSync('HEmpName', res.data.data[0].HEmpName);
+ uni.setStorageSync('HSCWHID', res.data.data[0].HSCWHID); //璋冨叆浠撳簱
+ uni.setStorageSync('HSCWHName', res.data.data[0].HSCWHName);
+ uni.setStorageSync('HWhID', res.data.data[0].HWhID); //瀵瑰簲浠撳簱
+ uni.setStorageSync('HWhName', res.data.data[0].HWhName);
+ uni.setStorageSync('HWorkCenterID', res.data.data[0]
+ .HWorkCenterID); //宸ヤ綔涓績
+ uni.setStorageSync('HWorkCenterName', res.data.data[0].HWorkCenterName);
+ uni.setStorageSync('HSecManagerID', res.data.data[0]
+ .HSecManagerID); //瀵瑰簲楠屾敹
+ uni.setStorageSync('HSecManagerName', res.data.data[0].HSecManagerName);
+ uni.setStorageSync('HGroupID', res.data.data[0].HGroupID); //瀵瑰簲鐝粍
+ uni.setStorageSync('HGroupName', res.data.data[0].HGroupName);
+ uni.setStorageSync('HProcID', res.data.data[0].HProcID); //瀵瑰簲宸ュ簭
+ uni.setStorageSync('HProcName', res.data.data[0].HProcName);
+ uni.setStorageSync('HSourceID', res.data.data[0].HSourceID); //瀵瑰簲鐢熶骇璧勬簮
+ uni.setStorageSync('HSourceName', res.data.data[0].HSourceName);
+ this.CommonUtils.setServerUrl(this.serverUrl)
+ // this.WebSocketServices.createConnect(res.data.data[0].Czybm,res.data.data[0].Czymc);
+ // getuiUtils.getClientID()
+ getuiUtils.getClientID(res.data.data[0].Czybm, res.data.data[0].Czymc)
+ uni.reLaunch({
+ url: '/pages/index/index'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.hideLoading()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ }
+
}
}
}
diff --git a/utils/i18n.js b/utils/i18n.js
index 1d3b27a..e5d1b00 100644
--- a/utils/i18n.js
+++ b/utils/i18n.js
@@ -85,7 +85,7 @@
MissingKeysMap[key] = Array.from(MissingKeysMap[key])
}
}
- CommonUtils.doRequest2Sync({
+ await CommonUtils.doRequest2Sync({
url: "/Xt_grdAlignment_WMES/syncMissingKeyToDB",
data: {
missingObj: JSON.stringify(MissingKeysMap)
@@ -98,12 +98,14 @@
// 閲嶅惎搴旂敤
const systemInfo = uni.getSystemInfoSync();
const platform = systemInfo.platform;
-
- if (platform === 'ios' || platform === 'android') {
- // App 绔細瀹屽叏閲嶅惎
- plus.runtime.restart();
- } else if (platform === 'h5') {
- // H5 绔細鍒锋柊椤甸潰
- window.location.reload();
- }
+ // #ifdef APP-PLUS
+ // App 绔細瀹屽叏閲嶅惎
+ plus.runtime.restart();
+ // #endif
+ // #ifdef H5
+ console.log('H5鍥炲埌鐧诲綍椤�: ');
+ uni.reLaunch({
+ url: '/pages/index/login'
+ })
+ // #endif
}
\ No newline at end of file
--
Gitblit v1.9.1