xiaohaizhao il y a 1 an
Parent
commit
f5a59f1360

+ 4 - 10
components/My_accessory/index.js

@@ -30,8 +30,8 @@ Component({
                 this.triggerEvent("callBack", item);
             } else if (type == '删除') {
                 wx.showModal({
-                    title: "通知",
-                    content: "是否确认删除该附件?",
+                    title: getApp().globalData.Language.getMapText('提示'),
+                    content: getApp().globalData.Language.getMapText('是否确认删除该附件') + "?",
                     cancelText: getApp().globalData.Language.getMapText('取消'),
                     confirmText: getApp().globalData.Language.getMapText('确定'),
                     success: res => {
@@ -52,17 +52,11 @@ Component({
                                 fail: console.error,
                             })
                         } else {
-                            wx.showToast({
-                                title: '微信下载保存失败',
-                                icon: "none"
-                            })
+                            getApp().globalData.Language.showToast('微信下载保存失败')
                         }
                     },
                     fail() {
-                        wx.showToast({
-                            title: '文件下载失败',
-                            icon: "none"
-                        })
+                        getApp().globalData.Language.showToast('文件下载失败')
                     }
                 });
                 this.triggerEvent("downLoadRecord");

+ 0 - 19
components/My_card/index.js

@@ -1,14 +1,9 @@
-// components/My_card/index.js
 Component({
-    //暴露外部样式表 [根节点,]
     externalClasses: ["custom-class"],
     options: {
         addGlobalClass: true,
         multipleSlots: true
     },
-    /**
-     * 组件的属性列表
-     */
     properties: {
         title: {
             type: String,
@@ -19,18 +14,4 @@ Component({
             value: false
         }
     },
-
-    /**
-     * 组件的初始数据
-     */
-    data: {
-
-    },
-
-    /**
-     * 组件的方法列表
-     */
-    methods: {
-
-    }
 })

+ 0 - 17
components/My_categoryListings/index.js

@@ -1,8 +1,4 @@
-// components/My_categoryListings/index.js
 Component({
-    /**
-     * 组件的属性列表
-     */
     properties: {
         height: {
             type: String,
@@ -13,18 +9,9 @@ Component({
             value: []
         }
     },
-
     options: {
         addGlobalClass: true
     },
-
-    lifetimes: {
-        ready() {}
-    },
-
-    /**
-     * 组件的初始数据
-     */
     data: {
         systemIndex: 0, //系统index
         portIndex: 0, //选择端口Index
@@ -54,10 +41,6 @@ Component({
             }, 200)
         }
     },
-
-    /**
-     * 组件的方法列表
-     */
     methods: {
         /* 模块选择 */
         checkBack(e) {

+ 1 - 2
components/My_categoryListings/index.wxml

@@ -20,5 +20,4 @@
         </view>
         <view style="height: {{height-80}}rpx;" />
     </scroll-view>
-</view>
-<!-- <My_empty wx:if="{{list.length==0}}" /> -->
+</view>

+ 0 - 11
components/My_categoryListings/modules/group.js

@@ -1,8 +1,4 @@
-// components/My_categoryListings/modules/group.js
 Component({
-    /**
-     * 组件的属性列表
-     */
     properties: {
         apps: {
             type: Array,
@@ -18,19 +14,12 @@ Component({
             this.refactorDom();
         }
     },
-
-    /**
-     * 组件的初始数据
-     */
     data: {
         backupArrays: [],
         nubArr: [],
         count: 0,
         show: true,
     },
-    /**
-     * 组件的方法列表
-     */
     methods: {
         /* 功能单选 */
         onChange(e) {

+ 0 - 1
components/My_categoryListings/modules/group.wxml

@@ -4,7 +4,6 @@
         <van-checkbox wx:for="{{apps.options}}" wx:key="{{options.optionid}}" wx:for-item="options" icon-size='28rpx' custom-class='custom-checkbox ' label-class='label-text' shape='square' name="{{options.optionid}}">{{options.optionname}}</van-checkbox>
     </van-checkbox-group>
 </view>
-<!-- <button bindtap="cha">2121</button> -->
 <wxs module="isCheck">
     module.exports.isCheck = function (id, arr) {
         for (var i = 0; i < arr.length; i++) {

+ 3 - 10
components/My_datePicker/index.js

@@ -2,9 +2,6 @@ const month = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11',
     day = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'],
     getTime = require("../../utils/getTime");
 Component({
-    /**
-     * 组件的属性列表
-     */
     properties: {
         startDate: {
             type: String,
@@ -18,10 +15,6 @@ Component({
             type: Function
         }
     },
-
-    /**
-     * 组件的初始数据
-     */
     data: {
         value: [9, 3, 3]
     },
@@ -38,11 +31,11 @@ Component({
             });
             //开始处理
             this.handleChange(this.data.startDate)
+        },
+        attached: function () {
+            getApp().globalData.Language.getLanguagePackage(this)
         }
     },
-    /**
-     * 组件的方法列表
-     */
     methods: {
         /* 处理日期改变 */
         handleChange(date) {

+ 3 - 3
components/My_datePicker/index.wxml

@@ -1,13 +1,13 @@
 <view class="picker">
     <picker-view indicator-class="indicator" style="width: 100%; height: 300px;" value="{{value}}" bindchange="pickerChange">
         <picker-view-column style="width: 100%; text-align: center;">
-            <view wx:for="{{years}}" style="line-height: 90rpx">{{item}}</view>
+            <view wx:for="{{years}}" style="line-height: 90rpx">{{item + language['年']||'年'}}</view>
         </picker-view-column>
         <picker-view-column style="width: 100%; text-align: center;">
-            <view wx:for="{{months}}" style="line-height: 90rpx">{{item}}</view>
+            <view wx:for="{{months}}" style="line-height: 90rpx">{{item+ language['月']||'月'}}</view>
         </picker-view-column>
         <picker-view-column style="width: 100%; text-align: center;">
-            <view wx:for="{{days}}" style="line-height: 90rpx">{{item}}</view>
+            <view wx:for="{{days}}" style="line-height: 90rpx">{{item+ language['日']||'日'}}</view>
         </picker-view-column>
     </picker-view>
 </view>

+ 0 - 1
components/My_displayData/displayData.js

@@ -64,7 +64,6 @@ Component({
         },
         getData() {
             _Http.basic(this.data.params).then(res => {
-                console.log(this.data.active, "学习数据", res)
                 this.setData({
                     list: res.data,
                     tips: res.tips

+ 0 - 12
components/My_form/index.js

@@ -1,9 +1,6 @@
 const getTime = require("../../utils/getTime"),
     deleteMark = require("../../utils/deleteMark");
 Component({
-    /**
-     * 组件的属性列表
-     */
     properties: {
         fromList: {
             type: Array,
@@ -16,10 +13,6 @@ Component({
     options: {
         multipleSlots: true
     },
-
-    /**
-     * 组件的初始数据
-     */
     data: {
         endTime: "", //结束时间
         selectTime: "", //选择时间
@@ -30,7 +23,6 @@ Component({
         }],
         seleteSexShow: false
     },
-
     lifetimes: {
         attached: function () {
             getApp().globalData.Language.getLanguagePackage(this)
@@ -39,10 +31,6 @@ Component({
             })
         }
     },
-
-    /**
-     * 组件的方法列表
-     */
     methods: {
         /* 性别选择器 */
         seleteSex(e) {

+ 4 - 16
components/My_richText/index.js

@@ -1,9 +1,6 @@
 const _Http = getApp().globalData.http;
 
 Component({
-    /**
-     * 组件的属性列表
-     */
     properties: {
         //富文本内容
         content: {
@@ -61,15 +58,6 @@ Component({
             // 在组件实例被从页面节点树移除时执行
         },
     },
-
-    /**
-     * 组件的初始数据
-     */
-    data: {},
-
-    /**
-     * 组件的方法列表
-     */
     methods: {
         insertImgEdit({
             detail
@@ -152,8 +140,8 @@ Component({
         // 清空编辑器内容
         clear() {
             wx.showModal({
-                title: '确认',
-                content: '确定清空内容吗?',
+                title: getApp().globalData.Language.getMapText('提示'),
+                content: getApp().globalData.Language.getMapText('确定清空内容吗') + '?',
                 cancelText: getApp().globalData.Language.getMapText('取消'),
                 confirmText: getApp().globalData.Language.getMapText('确定'),
                 success: res => {
@@ -168,8 +156,8 @@ Component({
                 let content = this.ctx.getContent(),
                     that = this;
                 wx.showModal({
-                    title: '保存',
-                    content: "是否确认保存",
+                    title: getApp().globalData.Language.getMapText('提示'),
+                    content: getApp().globalData.Language.getMapText('是否确认保存'),
                     cancelText: getApp().globalData.Language.getMapText('取消'),
                     confirmText: getApp().globalData.Language.getMapText('完成'),
                     success: res => {

+ 0 - 11
components/My_upload/index.js

@@ -1,8 +1,5 @@
 const _Http = getApp().globalData.http;
 Component({
-    /**
-     * 组件的属性列表
-     */
     properties: {
         /* 最大上传数量 */
         maxCount: {
@@ -24,17 +21,9 @@ Component({
             value: wx.getStorageSync('siteP').appfolderid
         }
     },
-
-    /**
-     * 组件的初始数据
-     */
     data: {
         fileList: []
     },
-
-    /**
-     * 组件的方法列表
-     */
     methods: {
         /* 上传文件 */
         afterRead(event) {

+ 2 - 5
components/Yl_Files/index.js

@@ -63,10 +63,7 @@ Component({
                             errMsg
                         }) {
                             wx.hideLoading();
-                            if (errMsg != "openDocument:ok") wx.showToast({
-                                title: '打开失败',
-                                icon: "none"
-                            })
+                            if (errMsg != "openDocument:ok") getApp().globalData.Language.showToast('打开失败')
                         }
                     })
                 }
@@ -78,7 +75,7 @@ Component({
             if (this.data.strict) {
                 wx.showModal({
                     title: getApp().globalData.Language.getMapText('提示'),
-                    content: '是否确定删除该附件',
+                    content: getApp().globalData.Language.getMapText('是否确定删除该附件'),
                     cancelText: getApp().globalData.Language.getMapText('取消'),
                     confirmText: getApp().globalData.Language.getMapText('确定'),
                     complete: (res) => {

+ 6 - 1
components/Yl_Filtrate1/modules/multilevelClass.js

@@ -7,6 +7,11 @@ Component({
     data: {
         active: {}
     },
+    lifetimes: {
+        attached: function () {
+            getApp().globalData.Language.getLanguagePackage(this)
+        }
+    },
     methods: {
         clearChild() {
             this.setData({
@@ -34,7 +39,7 @@ Component({
                     "item.index": i,
                     childClass: item.subdep.length ? {
                         index: null,
-                        label: item.itemclassname ? item.itemclassname + '的下级分类' : item.depname + '的下级部门' ,
+                        label: item.itemclassname ? item.itemclassname + getApp().globalData.Language.getMapText('的下级分类') : item.depname + getApp().globalData.Language.getMapText('的下级部门'),
                         list: item.subdep,
                         selectKey: this.data.item.selectKey,
                         showName: this.data.item.showName,

+ 7 - 4
components/Yl_field/index.js

@@ -20,6 +20,9 @@ Component({
     lifetimes: {
         attached: function () {
             getApp().globalData.Language.getLanguagePackage(this)
+            this.setData({
+                languagecode:wx.getStorageSync('languagecode')
+            })
         },
     },
     data: {
@@ -110,7 +113,7 @@ Component({
                     case 'phone':
                         reg = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/;
                         this.setData({
-                            [`form[${index}].errMsg`]: !reg.test(value) ? '请输入正确11位手机号码' : ''
+                            [`form[${index}].errMsg`]: !reg.test(value) ? getApp().globalData.Language.getMapText('号码格式错误') || '请输入正确11位手机号码!' : ''
                         });
                         break;
                     case "telephone":
@@ -120,7 +123,7 @@ Component({
                         let result = value[0] + "-" + value[1];
                         reg = /^0\d{2,3}-[1-9]\d{6,7}$/
                         this.setData({
-                            [`form[${index}].errMsg`]: !reg.test(result) ? '请填写正确的座机电话' : '',
+                            [`form[${index}].errMsg`]: !reg.test(result) ? getApp().globalData.Language.getMapText('号码格式错误') || '请填写正确的座机电话' : '',
                             [`form[${index}].result`]: result,
                         });
                         break;
@@ -133,7 +136,7 @@ Component({
                     default:
                         reg = new RegExp(reg);
                         this.setData({
-                            [`form[${index}].errMsg`]: !reg.test(value) ? item.hint || '输入文本不符合条件!' : ''
+                            [`form[${index}].errMsg`]: !reg.test(value) ? item.hint || getApp().globalData.Language.getMapText('输入文本不符合条件!') || '输入文本不符合条件!' : ''
                         });
                         break;
                 };
@@ -274,7 +277,7 @@ Component({
             });
             if (isPass) {
                 wx.showToast({
-                    title: '请检查表单内容',
+                    title: getApp().globalData.Language.getMapText('请检查表单内容'),
                     icon: "none"
                 })
             } else {

+ 1 - 1
components/Yl_field/index.wxml

@@ -186,7 +186,7 @@
         <view wx:if="{{item.slot}}" style="margin-right: 8rpx;">
           <slot name="{{item.slot}}" />
         </view>
-        <Yl_VoiceInput wx:if="{{item.type=='text'||item.type=='textarea' && !item.disabled}}" data-index="{{index}}" bindcallback="onVoiceInput" />
+        <Yl_VoiceInput wx:if="{{languagecode =='ZH' && item.type=='text'||item.type=='textarea' && !item.disabled}}" data-index="{{index}}" bindcallback="onVoiceInput" />
       </view>
     </van-field>
   </view>

+ 1 - 1
components/Yl_nav/index.js

@@ -159,7 +159,7 @@ Component({
             let that = this;
             wx.showModal({
                 title: getApp().globalData.Language.getMapText('提示'),
-                content: '是否删除所有搜索历史',
+                content: getApp().globalData.Language.getMapText('是否删除所有搜索历史'),
                 cancelText: getApp().globalData.Language.getMapText('取消'),
                 confirmText: getApp().globalData.Language.getMapText('确定'),
                 complete: ({

+ 1 - 1
packageA/contacts/detail.js

@@ -134,7 +134,7 @@ Page({
         let that = this;
         const contacts = this.data.detail;
         console.log(contacts)
-        let content = `是否确认删除${contacts.name ||contacts.NAME}`;
+        let content = getApp().globalData.Language.getMapText('是否确认删除') + (contacts.name || contacts.NAME)
         if (contacts.islinkcustomer || contacts.islinkproject) content = getApp().globalData.Language.getMapText('当前联系人已存在关联客户/项目,是否确定删除')
         wx.showModal({
             title: getApp().globalData.Language.getMapText('提示'),

+ 1 - 1
packageA/forecast/detail.js

@@ -136,7 +136,7 @@ Page({
         } = e.currentTarget.dataset, that = this;
         wx.showModal({
             title: getApp().globalData.Language.getMapText('提示'),
-            content: `是否确认删除${item.projectname}`,
+            content: getApp().globalData.Language.getMapText('是否确认删除') + item.projectname,
             cancelText: getApp().globalData.Language.getMapText('取消'),
             confirmText: getApp().globalData.Language.getMapText('确定'),
             success({

+ 2 - 2
packageA/forecast/detail.wxml

@@ -10,7 +10,7 @@
                 <project item="{{item}}" data-item="{{item}}" catchtap="toReportForms" />
             </van-cell-group>
             <view slot="right" class="slide">
-                <van-button custom-class='but' color="#FF3B30" bindtap="deleteProject" data-item="{{item}}">删除</van-button>
+                <van-button custom-class='but' color="#FF3B30" bindtap="deleteProject" data-item="{{item}}">{{language['删除']||'删除'}}</van-button>
             </view>
         </van-swipe-cell>
     </block>
@@ -20,6 +20,6 @@
     <My_empty wx:if="{{list.length==0}}" />
 </Yl_ListBox>
 <view class="footer" wx:if="{{myProject}}">
-    <van-button custom-class='but' bindtap="addProjece">添加项目</van-button>
+    <van-button custom-class='but' bindtap="addProjece">{{language['添加项目']||'添加项目'}}</van-button>
 </view>
 <projectList id='Plist' list='{{projectList}}' showList='{{projectList}}' bindgetResult="getResult" />

+ 2 - 2
packageA/forecast/reportForms.js

@@ -76,7 +76,7 @@ Page({
             "sa_projectid": this.data.sourceData.sa_projectid
         }
         _Http.basic(parem).then(res => {
-            console.log(321321321,res)
+            console.log(321321321, res)
             if (res.msg != '成功') return wx.showToast({
                 title: res.msg,
                 icon: "none"
@@ -167,7 +167,7 @@ Page({
             that = this;
         wx.showModal({
             title: getApp().globalData.Language.getMapText('提示'),
-            content: `是否确认删除${item.itemclassname}`,
+            content: getApp().globalData.Language.getMapText('是否确认删除') + item.itemclassname,
             cancelText: getApp().globalData.Language.getMapText('取消'),
             confirmText: getApp().globalData.Language.getMapText('确定'),
             success({

+ 5 - 0
packageA/invoiceforecast/modules/client/index.js

@@ -13,6 +13,11 @@ Component({
     options: {
         addGlobalClass: true
     },
+    lifetimes: {
+        attached: function () {
+            getApp().globalData.Language.getLanguagePackage(this)
+        }
+    },
     data: {
         sa_salesforecastbillid: 0,
         list: [],

+ 2 - 2
packageA/setclient/modules/trace/detail/index.js

@@ -20,6 +20,7 @@ Page({
                 ...JSON.parse(options.data)
             })
             this.getDetail();
+            getApp().globalData.Language.getLanguagePackage(this, '跟进动态详情');
         }
     },
     getDetail() {
@@ -68,6 +69,5 @@ Page({
                 })
                 break;
         }
-    },
-    onShareAppMessage() {}
+    }
 })

+ 1 - 1
pages/teams/addRole.wxml

@@ -8,7 +8,7 @@
 <My_categoryListings id="myCateg" height='{{height}}' list='{{appList}}' />
 
 <view wx:if="{{update!='false' || userDelete!='false'}}" class="footer">
-    <van-button wx:if="{{userDelete!='false'}}" custom-class='delete-but' round catchtap="deleteRole">删除</van-button>
+    <van-button wx:if="{{userDelete!='false'}}" custom-class='delete-but' round catchtap="deleteRole">{{language['删除']||'删除'}}</van-button>
     <van-button wx:if="{{update!='false'}}" custom-class='submit {{userDelete!="false"?"delete-sub":""}}' disabled='{{disabled}}' loading='{{loading}}' bindtap="submitRole" loading-text="{{language['保存中...']||'保存中...'}}">{{language['保存']||'保存'}}</van-button>
 </view>
 <!--  -->

+ 2 - 9
utils/checkFile.js

@@ -7,11 +7,7 @@ module.exports.checkFile = (item) => {
         wx.setClipboardData({
             data: item.url,
             success: function () {
-                wx.showToast({
-                    title: '当前文件类型不支持在线浏览,已将文件下载地址复制到剪切板,您可在浏览器中打开链接下载到本地浏览',
-                    icon: "none",
-                    duration: 5000
-                });
+                getApp().globalData.Language.modeBoxPrompts('当前文件类型不支持在线浏览,已将文件下载地址复制到剪切板,您可在浏览器中打开链接下载到本地浏览')
             }
         })
     }
@@ -42,10 +38,7 @@ function openDocument(item) {
                     console.log('打开文档成功')
                 },
                 fail: (err) => {
-                    wx.showToast({
-                        title: '打开失败',
-                        icon: "none"
-                    })
+                    getApp().globalData.Language.showToast('打开失败')
                 }
             })
         }

+ 1 - 1
utils/deleteMark.js

@@ -22,7 +22,7 @@ const CheckEmail = (num) => {
     const reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
     let isAllow = reg.test(num);
     if (!isAllow) wx.showToast({
-        title: getApp().globalData.Language.getMapText('邮箱错误') || '请输入正确的邮箱格式!',
+        title: getApp().globalData.Language.getMapText('请输入正确的邮箱格式') || '请输入正确的邮箱格式!',
         icon: "none"
     })
     return isAllow;