xiaohaizhao преди 1 година
родител
ревизия
4cb309dd4d

+ 1 - 1
components/Yl_field/index.js

@@ -130,7 +130,7 @@ Component({
                     case 'mail':
                         reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
                         this.setData({
-                            [`form[${index}].errMsg`]: !reg.test(value) ? '请输入正确的邮箱格式' : ''
+                            [`form[${index}].errMsg`]: !reg.test(value) ? getApp().globalData.Language.getMapText('请输入正确的邮箱格式') : ''
                         });
                         break;
                     default:

+ 1 - 1
packageA/contract/add/type4/select.wxml

@@ -31,7 +31,7 @@
         <view class="count">
             {{language['已选']||'已选'}}:{{result.length}}
         </view>
-        <van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">{{language['添加']||''添加}}</van-button>
+        <van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">{{language['添加']||'添加'}}</van-button>
     </view>
 </block>
 

+ 2 - 2
packageA/forecast/index.wxml

@@ -1,14 +1,14 @@
 <view id="placeholder" />
 <Yl_ListBox id='ListBox' bind:getlist='getList'>
     <view class="header">
-        {{language[提报任务'']||'提报任务'}}
+        {{language['提报任务']||'提报任务'}}
     </view>
     <view class="item" wx:for="{{list}}" wx:key="sa_salesforecastmodelid">
         <view class="introduce">
             <image class="image" src="/static/image/forecast.png" />
             <view class="title line-1">{{item.title}}</view>
             <view class="explain line-1">{{language['提报周期:每']||'提报周期:每'}}{{item.periodtype}} {{item.periodpointchange}} {{item.periodtype=='月'?language['日']||'号':''}}</view>
-            <view class="explain line-1">{{language['提报要求']||'提报要求'}}:{{{language[item.baseonproject=='1'?'按项目及产品类别预测':'按产品类别预测']||item.baseonproject=='1'?'按项目及产品类别预测':'按产品类别预测'}}</view>
+            <view class="explain line-1">{{language['提报要求']||'提报要求'}}:{{language[item.baseonproject=='1'?'按项目及产品类别预测':'按产品类别预测']||item.baseonproject=='1'?'按项目及产品类别预测':'按产品类别预测'}}</view>
         </view>
         <view class="handle">
             <navigator url="#" data-item="{{item}}" bindtap="toDetail">

+ 1 - 1
packageA/select/brand/select.wxml

@@ -21,7 +21,7 @@
 		<view class="count">
 			{{language['已选']||'已选'}}:{{result.length}}
 		</view>
-		<van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">{{language['添加']||''添加}}</van-button>
+		<van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">{{language['添加']||'添加'}}</van-button>
 	</view>
 </block>
 

+ 1 - 1
packageA/select/contacts/select.wxml

@@ -29,7 +29,7 @@
         <view class="count">
             {{language['已选']||'已选'}}:{{result.length}}
         </view>
-        <van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">{{language['添加']||''添加}}</van-button>
+        <van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">{{language['添加']||'添加'}}</van-button>
     </view>
 </block>
 

+ 1 - 1
packageA/select/contract/select.wxml

@@ -29,7 +29,7 @@
         <view class="count">
             {{language['已选']||'已选'}}:{{result.length}}
         </view>
-        <van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">{{language['添加']||''添加}}</van-button>
+        <van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">{{language['添加']||'添加'}}</van-button>
     </view>
 </block>
 

+ 1 - 1
packageA/select/linkman/select.wxml

@@ -24,7 +24,7 @@
         <view class="count">
             {{language['已选']||'已选'}}:{{result.length}}
         </view>
-        <van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">{{language['添加']||''添加}}</van-button>
+        <van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">{{language['添加']||'添加'}}</van-button>
     </view>
 </block>
 <wxs module="handle">

+ 1 - 0
pages/tabbar/home/index.js

@@ -18,6 +18,7 @@ Page({
         this.setData({ //获取胶囊位置信息
             capsule: wx.getMenuButtonBoundingClientRect()
         })
+        getApp().globalData.Language.getLanguagePackage(this)
         this.refreshData() //更新权限等信息
         this.getTabBar().unReadMessageCount(); //更新信息数量
 

+ 55 - 54
pages/tabbar/home/index.scss

@@ -7,12 +7,12 @@
 	background-color: var(--bgColor);
 
 	&_title {
-			height: 50rpx;
-			font-size: 36rpx;
-			font-family: PingFang SC-Bold, PingFang SC;
-			font-weight: bold;
-			color: #FFFFFF;
-			margin: 0 8rpx 0 24rpx;
+		height: 50rpx;
+		font-size: 36rpx;
+		font-family: PingFang SC-Bold, PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+		margin: 0 8rpx 0 24rpx;
 	}
 }
 
@@ -22,8 +22,8 @@
 	font-family: PingFang SC-Regular, PingFang SC;
 
 	.work {
-			color: #FA8C16;
-			margin-right: 20rpx;
+		color: #FA8C16;
+		margin-right: 20rpx;
 	}
 }
 
@@ -32,13 +32,13 @@
 	height: 240rpx !important;
 
 	swiper-item {
-			width: 100vw;
-			height: 240rpx !important;
+		width: 100vw;
+		height: 240rpx !important;
 
-			image {
-					width: 100vw;
-					height: 240rpx;
-			}
+		image {
+			width: 100vw;
+			height: 240rpx;
+		}
 	}
 }
 
@@ -49,54 +49,55 @@
 	padding-top: 30rpx;
 
 	.group {
-			margin-bottom: 30rpx;
+		margin-bottom: 30rpx;
 
-			.label {
-					height: 36rpx;
-					font-size: 30rpx;
-					font-family: AppleSystemUIFont-Bold, AppleSystemUIFont;
-					font-weight: bold;
-					color: #333333;
-					margin-bottom: 10rpx;
+		.label {
+			height: 36rpx;
+			font-size: 30rpx;
+			font-family: AppleSystemUIFont-Bold, AppleSystemUIFont;
+			font-weight: bold;
+			color: #333333;
+			margin-bottom: 10rpx;
 
-					text {
-							margin: 0 20rpx 0 30rpx;
-					}
+			text {
+				margin: 0 20rpx 0 30rpx;
 			}
+		}
 
-			.main {
-					display: flex;
-					flex-wrap: wrap;
-
-					.item {
-							display: flex;
-							flex-direction: column;
-							align-items: center;
-							padding: 20rpx 0;
-							width: 20%;
-							border-radius: 16rpx;
+		.main {
+			display: flex;
+			flex-wrap: wrap;
 
-							.icon-box {
-									width: 80rpx;
-									border-radius: 16rpx;
-									line-height: 80rpx;
-									text-align: center;
+			.item {
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				padding: 20rpx 0;
+				width: 20%;
+				border-radius: 16rpx;
+				overflow: hidden;
 
-									text {
-											font-size: 40rpx;
-									}
-							}
+				.icon-box {
+					width: 80rpx;
+					border-radius: 16rpx;
+					line-height: 80rpx;
+					text-align: center;
 
-							.name {
-									width: 80%;
-									line-height: 30rpx;
-									font-size: 24rpx;
-									font-family: AppleSystemUIFont-Regular, AppleSystemUIFont;
-									color: #333333;
-									margin-top: 16rpx;
-									text-align: center;
-							}
+					text {
+						font-size: 40rpx;
 					}
+				}
+
+				.name {
+					width: 80%;
+					line-height: 30rpx;
+					font-size: 24rpx;
+					font-family: AppleSystemUIFont-Regular, AppleSystemUIFont;
+					color: #333333;
+					margin-top: 16rpx;
+					text-align: center;
+				}
 			}
+		}
 	}
 }

+ 2 - 2
pages/tabbar/home/index.wxml

@@ -23,13 +23,13 @@
 <view class="grld">
     <block wx:for="{{entrance}}" wx:key="index">
         <view class="group" wx:if="{{item.list.length}}">
-            <view class="label"><text class="work {{item.icon}}" />{{item.label}}</view>
+            <view class="label"><text class="work {{item.icon}}" />{{language[item.label]||item.label}}</view>
             <view class="main">
                 <navigator version='develop' class="item" wx:for="{{item.list}}" wx:for-item="it" wx:for-index="i" target='{{item.appid!=appid?"miniProgram":"self"}}' app-id='{{item.appid}}' path="{{it.path+'?auth='+auth+'&userMsg='+userMsg+'&site='+site+'&templetList='+templetList+'$languagecode='+languagecode}}" url="{{it.path}}" open-type="{{it.openType||'navigate'}}" wx:key="name" data-it="{{it}}" data-item="{{item}}" bindtap="openRecord">
                     <view class="icon-box" style="background-color: {{it.bColor}};">
                         <text class="work {{it.icon}}" style="color: {{it.color}};" />
                     </view>
-                    <view class="name">{{it.name}}</view>
+                    <view class="name">{{language[it.name]||it.name}}</view>
                 </navigator>
             </view>
         </view>

+ 1 - 1
pages/tabbar/message/details.wxml

@@ -3,6 +3,6 @@
     <view class="time">{{language[detailsData.readdate]||detailsData.readdate}}</view>
     <view class="content multi-line">{{language[detailsData.message]||detailsData.message}}</view>
     <navigator wx:if="{{detailsData.name}}" class="nav" target='{{detailsData.appid!=appid?"miniProgram":"self"}}' app-id='{{detailsData.appid}}' path="{{detailsData.path+'?auth='+auth+'&userMsg='+userMsg+'&site='+site+'&id='+detailsData.objectid}}" url="{{detailsData.path+'?id='+detailsData.objectid}}" open-type="{{detailsData.openType||'navigate'}}">
-        {{language['立即前往']||'立即前往'}}“<text class="work {{detailsData.icon}}" style="color: {{detailsData.color}};" /> {{detailsData.name}}”<text class="text">{{language['查看']||'查看'}} ></text>
+        {{language['立即前往']||'立即前往'}}“<text class="work {{detailsData.icon}}" style="color: {{detailsData.color}};" /> {{language[detailsData.name]||detailsData.name}}”<text class="text">{{language['查看']||'查看'}} ></text>
     </navigator>
 </view>

+ 1 - 1
pages/tabbar/message/index.wxml

@@ -8,7 +8,7 @@
         <view class="title line-1">{{item.title}}</view>
         <view class="content line-3">{{item.message}}</view>
         <view class="time">
-            <van-tag wx:if="{{item.name}}" class="tag" plain type="primary">{{item.name}}</van-tag>{{item.createdate}}
+            <van-tag wx:if="{{item.name}}" class="tag" plain type="primary">{{language[item.name]||item.name}}</van-tag>{{item.createdate}}
         </view>
         <view wx:if="{{item.isread=='0'}}" class="unread-item" />
     </navigator>

+ 1 - 0
pages/tabbar/mine/associatedPublicNumber.js

@@ -13,6 +13,7 @@ Page({
         } else {
             this.WechatServceBinding(options.code);
         }
+        getApp().globalData.Language.getLanguagePackage(this, '关联公众号');
     },
     WechatServceBinding(wechat_code) {
         _Http.basic({

+ 9 - 11
pages/tabbar/mine/associatedPublicNumber.wxml

@@ -1,36 +1,34 @@
 <view wx:if="{{text}}" style="margin-top: 400rpx;">
-    {{text}}
+    {{language[text]||text}}
 </view>
 <block wx:else>
     <image style="margin-top: 50rpx;" src="https://yostest175549.obs.cn-east-2.myhuaweicloud.com:443/202306131686620036790B2108907.jpg" show-menu-by-longpress />
     <block wx:if="{{code}}">
         <view>
-            查询到还未关注公众号
+            {{language['查询到还未关注公众号']||'查询到还未关注公众号'}}
         </view>
         <view style="margin-bottom: 30rpx;margin-top: 20rpx;">
-            请先关注公众号后进行绑定
+            {{language['请先关注公众号后进行绑定']||'请先关注公众号后进行绑定'}}
         </view>
         <view>
-            请长按二维码识别图中公众号
+            {{language['请长按二维码识别图中公众号']||'请长按二维码识别图中公众号'}}
         </view>
         <view style="margin-top: 20rpx;">
-            前去关注
+            {{language['前去关注']||'前去关注'}}
         </view>
     </block>
     <block wx:else>
         <view>
-            已成功绑定消息通知
+            {{language['已成功绑定消息通知']||'已成功绑定消息通知'}}
         </view>
         <view style="margin-bottom: 30rpx;margin-top: 20rpx;">
-            应用消息请关注公众号信息
+            {{language['应用消息请关注公众号信息']||'应用消息请关注公众号信息'}}
         </view>
         <view>
-            可长按二维码识别图中公众号
+            {{language['可长按二维码识别图中公众号']||'可长按二维码识别图中公众号'}}
         </view>
-
         <view style="margin-top: 20rpx;">
-            前去查看信息
+            {{language['前去查看信息']||'前去查看信息'}}
         </view>
     </block>
-
 </block>

+ 1 - 3
pages/tabbar/mine/index.json

@@ -1,6 +1,4 @@
 {
     "navigationBarTitleText": "我的",
-    "usingComponents": {
-        "My_form":"/components/My_form/index"
-    }
+    "usingComponents": {}
 }

+ 0 - 14
utils/work/work.js

@@ -27,20 +27,6 @@ async function initWorkbench(that) {
         icon: "work-E-fuwu",
         list: apps.geteservice()
     }];
-    if (wx.getStorageSync('languagecode') != 'ZH') {
-        const language = getApp().globalData.Language;
-        await language.getLanguages(wx.getStorageSync('languagecode'))
-        entrance = entrance.map(v => {
-            try {
-                v.label = language.getMapText(v.label)
-                v.list = v.list.map(item => {
-                    item.name = language.getMapText(item.name)
-                    return item
-                })
-            } catch (error) {}
-            return v
-        })
-    }
     wx.removeStorageSync('auth')
     wx.setStorageSync('auth', apps.authList)
     that.setData({