diff --git a/App.vue b/App.vue index 5f584d2..099670e 100644 --- a/App.vue +++ b/App.vue @@ -1,132 +1,109 @@ \ No newline at end of file diff --git a/Food/search/list.vue b/Food/search/list.vue index f03c5a9..acd8405 100644 --- a/Food/search/list.vue +++ b/Food/search/list.vue @@ -13,16 +13,17 @@ {{it.create_user_nickname}} - + {{it.likes_num}} - —— 到底了,看看别的吧 —— + —— {{$t('msgBottom')}} —— - 还没有记录哦 + {{$t('msgNoMoreData')}} @@ -64,7 +65,7 @@ console.log("onReachBottom", this.lastPage) if (!this.lastPage || this.Page >= this.lastPage) { uni.showToast({ - title: '没有更多数据!', + title: that.$t('noMoreData'), icon: 'none' }) return @@ -89,7 +90,7 @@ handleDetail(id) { let that = this if (that.user.aud_id == '') { - that.$tools.msg("完善资料后查看更多") + that.$tools.msg(that.$t("ImproveData")) return } uni.navigateTo({ diff --git a/Food/search/search.vue b/Food/search/search.vue index 6414b43..44e6b3b 100644 --- a/Food/search/search.vue +++ b/Food/search/search.vue @@ -1,7 +1,7 @@ @@ -45,33 +45,40 @@ ranklist: [], page: 1, lastPage: '', - isActive: null, } }, - onLoad(options) { + onLoad() { let that = this + that.page = 1 + that.lastPage = "" + that.ranklist = [] that.getList() + uni.setNavigationBarTitle({ + title: this.$t('measuringRecord') + }) }, onReachBottom() { let that = this console.log("onReachBottom", this.lastPage) if (!this.lastPage || this.page >= this.lastPage) { uni.showToast({ - title: '没有更多数据!', + title: that.$t('noMoreData'), icon: 'none' }) return } this.page++ - this.getList(this.page) + this.getList() }, methods: { swipeClick(e, index) { let that = this let id = that.ranklist[index].id uni.showModal({ - title: '友情提示', - content: '是否删除当前测量记录?', + title: that.$t("msgTitle"), + content: that.$t("verifyDeleteHistory"), + cancelText: that.$t("btnSancellation"),//取消按钮文字 + confirmText: that.$t("btnConfirm"),//确认按钮文字 success: function(res) { if (res.confirm) { that.$model.gethistorydelete({ @@ -88,10 +95,10 @@ that.$store.dispatch("getResult", { aud_id: that.user.aud_id }) - that.$tools.msg("删除成功") + that.$tools.msg(that.$t("msgDelete")) }) } else if (res.cancel) { - that.$tools.msg("您已取消操作!"); + that.$tools.msg(that.$t("msgCancel")); } }, }) @@ -102,7 +109,7 @@ url: "/body/history/historyDetail?id=" + item.id }) }, - getList(page) { + getList() { let that = this that.$model.gethistory({ aud_id: that.user.aud_id, @@ -111,7 +118,7 @@ console.log("历史记录", res) if (res.code != 0) return let options = [{ - text: '删除', + text: that.$t("btnDelete"), style: { backgroundColor: '#dd524d' } @@ -123,10 +130,6 @@ this.lastPage = res.data.totalpage }) }, - handleEdit(id) { - let that = this - that.isActive = that.isActive == id ? null : id - }, } } diff --git a/body/history/historyDetail.vue b/body/history/historyDetail.vue index 31033b0..899c6fc 100644 --- a/body/history/historyDetail.vue +++ b/body/history/historyDetail.vue @@ -35,6 +35,9 @@ // }, onLoad(options) { let that = this + uni.setNavigationBarTitle({ + title: this.$t('titleDetail') + }) that.id = options.id that.getList() }, diff --git a/body/home/body.vue b/body/home/body.vue index 335ba6f..efe4d88 100644 --- a/body/home/body.vue +++ b/body/home/body.vue @@ -20,9 +20,9 @@ {{item.value?item.value:'0'}}{{item.unit}} - {{item.standard=='异常'?'-':item.standard}} + :style="{backgroundColor:(item.standard=='异常'||item.standard==''?'#F8595D':item.standard_color)}" + :class="[item.standard=='异常'||item.standard==''?'btnC':'']"> + {{item.standard=='异常'||item.standard==''?'-':item.standard}} @@ -30,7 +30,7 @@ {{item.description}} - + @@ -43,7 +43,7 @@ - 标准值:{{item.standard_list[0].max_val}}kcal + {{$t("StandardValue")}}:{{item.standard_list[0].max_val}}kcal @@ -78,7 +78,9 @@ }, onLoad(options) { this.to = options.to - console.log("to", this.to) + uni.setNavigationBarTitle({ + title: this.$t('bodyData') + }) this.handleResultDetail() }, methods: { diff --git a/body/login/forgetPassword.vue b/body/login/forgetPassword.vue index 1276af7..fca7c65 100644 --- a/body/login/forgetPassword.vue +++ b/body/login/forgetPassword.vue @@ -4,30 +4,30 @@ --> - 确认 + {{$t("btnSubmit")}} @@ -59,7 +59,11 @@ } }, onLoad(options) { + let that = this this.type = options.type //1 + uni.setNavigationBarTitle({ + title: that.type=='register'?that.$t('titleRegister'):that.$t('titleSetPassword') + }) }, methods: { checkboxChange(e) { @@ -68,40 +72,36 @@ // 登录、 handleTelLogin() { let that = this - let phoneType = that.phone.indexOf("@") !== -1 if (that.value == 0) { - that.$tools.msg("请先确认勾选协议") + that.$tools.msg(that.$t("verifyAgreement")) return } - if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) { - that.$tools.msg("请输入正确的手机号") - return - } - if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) { - that.$tools.msg("请输入正确的邮箱") + if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) { + that.$tools.msg(that.$t("verifyEmailCorrect")) return } if (!that.code) { - that.$tools.msg("请填写验证码") + that.$tools.msg(that.$t("verifyCode")) return } if (!that.password) { - that.$tools.msg("请填写密码") + that.$tools.msg(that.$t("verifyPassword")) return } if (!that.password2) { - that.$tools.msg("请确认密码") + that.$tools.msg(that.$t("verifyPassword")) return } if (that.password2 != that.password) { - that.$tools.msg("请确认两次密码填写一致") + that.$tools.msg(that.$t("verifyPasswordCorrect")) return } let account = { data: that.phone, password: that.password, - c_password: that.password2, - code: that.code + confirm_password: that.password2, + code: that.code, + language: uni.getStorageSync('language') } let https = that.type == 'register' ? that.$model.getregister(account) : that.$model.getResetPassword( account) @@ -114,7 +114,7 @@ uni.setStorageSync('token', res.data.token) uni.setStorageSync('aan_id', res.data.aan_id) that.$tools.handleUserList() - that.$tools.msg("设置成功,进入程序中") + that.$tools.msg(that.$t("msgSetPasswordSuccess")) setTimeout(function() { uni.reLaunch({ url: "/pages/index/index" @@ -125,19 +125,13 @@ // 获取验证码 handleCode() { let that = this - let phoneType = that.phone.indexOf("@") !== -1 - if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) { - that.$tools.msg("请输入正确的手机号") - return - } - if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) { - that.$tools.msg("请输入正确的邮箱") + if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) { + that.$tools.msg(that.$t("verifyEmailCorrect")) return } // that.$model.getSendCode({ data: that.phone, - type: that.type }).then(res => { console.log(res) if (res.code != 0) { @@ -155,7 +149,6 @@ }, 60000) }).catch(err => {}) }, - handlexieyi() {} } } @@ -181,23 +174,23 @@ } .login { - width: calc(100% - 30px); + width: calc(100% - 60rpx); height: auto; background: #fff; - border-radius: 10px; - padding: 15px; + border-radius: 20rpx; + padding: 30rpx; background-color: #fff; z-index: 99; // position: relative; - // margin-left: calc(10% - 40px); + // margin-left: calc(10% - 80rpx); // box-shadow: 0px 1px 5px 2px #dfe2e1fc; .title { text-align: left; color: #333; - font-size: 40rpx; + font-size: 40rpx; font-weight: bold; - margin-bottom: 15px; + margin-bottom: 30rpx; } @@ -215,51 +208,54 @@ display: flex; align-items: center; justify-content: space-between; - margin-bottom: 15px; + margin-bottom: 20rpx; + flex-wrap: wrap; .text { - width: 240rpx; - height: 40px; - line-height: 40px; + width: 100%; + height: 70rpx; + line-height: 70rpx; font-size: 32rpx; + font-weight: bold; } .input { - width: calc(100% - 240rpx); + width: 100%; height: 35px; line-height: 35px; display: flex; position: relative; border: #dfdfdf 1px solid; border-radius: 5px; - padding: 0 10px; + padding: 0 20rpx; background-color: #f7f7f7; } input { - height: 40px; - line-height: 40px; + height: 80rpx; + line-height: 80rpx; position: absolute; - left: 10px; + left: 20rpx; right: 0px; z-index: 88; - font-size:28rpx; + font-size: 28rpx; } .yanzhengma { input { - right: 220rpx; - font-size:28rpx; + right: 180px; + font-size: 28rpx; } } } .code { - width: 220rpx; + color: #333; + width: 180px; background: #dfdfdf; font-size: 28rpx; margin: 0; - line-height: 40px; + line-height: 80rpx; border-radius: 5px; text-align: center; position: absolute; @@ -291,12 +287,12 @@ .btnlogin { width: 100%; - margin: 15px 0; + margin: 30rpx 0; height: 42px; line-height: 42px; background: $btncolor; font-weight: 700; - border-radius: 15px; + border-radius: 30rpx; text-align: center; color: #fff !important; } diff --git a/body/login/login.vue b/body/login/login.vue index b2608a3..fa137b4 100644 --- a/body/login/login.vue +++ b/body/login/login.vue @@ -25,14 +25,14 @@ {{$t("infoEmail")}} - + {{$t("titleCode")}} - + @@ -42,7 +42,7 @@ {{$t("titlePassword")}} - + @@ -124,14 +124,18 @@ let that = this uni.setTabBarItem({ index: 0, - text: that.$t('titleHome') + text: that.$t('titleHealth') }) uni.setTabBarItem({ index: 1, - text: that.$t('titleCount') + text: that.$t('titleDiet') }) uni.setTabBarItem({ index: 2, + text: that.$t('titleExercise') + }) + uni.setTabBarItem({ + index: 3, text: that.$t('titleMe') }) }, @@ -299,4 +303,21 @@ border-radius: 50%; } } + .language { + position: absolute; + top: 0; + left: 15px; + background: #fff; + padding: 5px 20px; + border-radius: 10px; + + picker { + width: 100%; + + view { + display: flex; + align-items: center; + } + } + } \ No newline at end of file diff --git a/body/my/about.vue b/body/my/about.vue index b3edf57..5a6a7eb 100644 --- a/body/my/about.vue +++ b/body/my/about.vue @@ -2,15 +2,16 @@ {{$t("titleVersionUpdate")}} - {{$t("titleNewVersion")}}{{phoneInfo.versionUrl.version}} + {{$t("titleNewVersion")}}{{phoneInfo.versionUrl.version}} @@ -37,10 +38,14 @@ } }, computed: { - ...mapState(["phoneInfo"]), + ...mapState(["phoneInfo", "configInfo"]), }, onLoad() { let that = this + uni.setNavigationBarTitle({ + title: this.$t('titleAboutUs') + }); + console.log("11111111", phoneInfo) if (!that.phoneInfo.versionUrl) { that.handleoginversion() } else { diff --git a/body/my/manage.vue b/body/my/manage.vue index e2e24b7..8877012 100644 --- a/body/my/manage.vue +++ b/body/my/manage.vue @@ -48,6 +48,11 @@ computed: { ...mapState(["familayList"]) }, + onLoad() { + uni.setNavigationBarTitle({ + title: this.$t('titleManage') + }); + }, onPullDownRefresh() { let that = this that.handleUserList() @@ -91,11 +96,10 @@ return } that.$store.commit('changeFamilay', res.data.user_list) - console.log("删除", that.id, uni.getStorageSync('userid')) // 删除的是当前用户 - if (that.id == uni.getStorageSync('userid')) { - let userid = res.data.user_list[0].id + if (that.id == uni.getStorageSync('userid') || !res.data.user_list.length) { + let userid = !res.data.user_list.length ? "" : res.data.user_list[0].id uni.setStorageSync('userid', userid) that.$store.dispatch('getUserInfo', { aud_id: userid @@ -105,17 +109,9 @@ aud_id: userid, time: that.$tools.getDate("start") }) - // 全部卡片 - that.$store.dispatch("getCardAllList", { - aud_id: userid - }) - // that.$store.dispatch("getResult", { aud_id: userid }) - that.$store.dispatch("getPublicRecord", { - aud_id: userid - }) } }).catch(err => {}) }, diff --git a/body/my/userInfo.vue b/body/my/userInfo.vue index 028421d..30d6279 100644 --- a/body/my/userInfo.vue +++ b/body/my/userInfo.vue @@ -31,7 +31,8 @@ {{$t('infoHeight')}} - CM + CM @@ -39,7 +40,8 @@ {{$t('infoWeight')}} - KG + KG @@ -49,7 +51,7 @@ - {{memInfo.birthday?memInfo.birthday:$t('verifyPicker')}}}} + {{memInfo.birthday?memInfo.birthday:$t('verifyPicker')}} @@ -60,7 +62,7 @@ - {{memInfo.activity_level?activityLevel[levelInd].name:$t('verifyRecord')}}}} + {{memInfo.activity_level?activityLevel[levelInd].name:$t('verifyRecord')}} @@ -155,7 +157,7 @@ console.log("成功", res, that.isEdit, uni.getStorageSync('userid')) if (res.code == 0) { if (!that.isEdit) { - that.addID = res.aud_id + that.addID = res.data.aud_id } that.handleUserList() } else { @@ -176,6 +178,7 @@ that.$store.commit('changeFamilay', res.data.user_list) // 新增成员 if (!that.isEdit) { + console.log('新增', that.addID) let userid = that.addID uni.setStorageSync('userid', that.addID) that.$store.dispatch('getUserInfo', { diff --git a/body/report/report.vue b/body/report/report.vue index aed1375..660ff22 100644 --- a/body/report/report.vue +++ b/body/report/report.vue @@ -7,21 +7,21 @@ {{depthInfo.user_data.nickname}} - 性别:{{depthInfo.user_data.gender==2?'女':'男'}} + {{$t("infoGender")}}:{{depthInfo.user_data.gender==2?$t("infoWoman"):$t("infoMan")}} - 年龄 + {{$t("infoAge")}} {{depthInfo.user_data.age}} - 身高 + {{$t("infoHeight")}} {{depthInfo.user_data.height}} - 体重 + {{$t("infoWeight")}} {{depthInfo.user_data.weight}} @@ -33,7 +33,7 @@ {{depthInfo.user_data.score}} - 健康评分 + {{$t("HealthScore")}} @@ -121,9 +121,9 @@ {{item.value?item.value:'0'}}{{item.unit}} - {{item.standard=='异常'?'-':item.standard}} + :style="{backgroundColor:(item.standard=='异常'||item.standard==''?'#F8595D':item.standard_color)}" + :class="[item.standard=='异常'||item.standard==''?'btnC':'']"> + {{item.standard=='异常'||item.standard==''?'-':item.standard}} @@ -189,9 +189,9 @@ {{item.value?item.value:'0'}}{{item.unit}} - {{item.standard=='异常'?'-':item.standard}} + :style="{backgroundColor:(item.standard=='异常'||item.standard==''?'#F8595D':item.standard_color)}" + :class="[item.standard=='异常'||item.standard==''?'btnC':'']"> + {{item.standard=='异常'||item.standard==''?'-':item.standard}} @@ -312,7 +312,7 @@ name: "", }, subtitle: { - name: "体重(kg)" + name: this.$t("infoWeight") + "(kg)" } }, chartData: {}, @@ -340,6 +340,9 @@ }, }, onLoad() { + uni.setNavigationBarTitle({ + title: this.$t('titleDepthReport') + }); this.handleLabelList() }, methods: { @@ -370,7 +373,7 @@ this.chartData2 = JSON.parse(JSON.stringify({ series: [{ - name: "健康评分", + name: that.$t("HealthScore"), data: Number(that.depthInfo.user_data.score) / 100 }] })); @@ -458,7 +461,7 @@ } } - + .right { width: 160px; position: absolute; @@ -467,7 +470,7 @@ height: 100px; overflow: hidden; z-index: 999; - + .rightChart { width: 140px; height: 140px; @@ -475,13 +478,13 @@ border-radius: 50%; padding: 10px; } - + .charts-box { width: 140px; height: 140px; margin-top: 0px; } - + .score { position: absolute; width: 140px; @@ -491,7 +494,7 @@ align-items: center; justify-content: flex-end; top: -5px; - + text { color: $maincolor; font-size: 20px; diff --git a/body/setting/email.vue b/body/setting/email.vue index 32c1df0..23f7e2c 100644 --- a/body/setting/email.vue +++ b/body/setting/email.vue @@ -11,7 +11,7 @@ {{$t("titleCode")}} - + @@ -45,8 +45,9 @@ let that = this uni.showModal({ title: that.$t("msgTitle"), - confirmText: that.$t("btnDelete"), content: that.$t("verifyDeleteAccount"), + cancelText: that.$t("btnSancellation"),//取消按钮文字 + confirmText: that.$t("btnConfirm"),//确认按钮文字 success: function(res) { if (res.confirm) { that.$model.getDeleteAccount({ @@ -54,7 +55,7 @@ }).then((res) => { if (res.code != 0) return that.$tools.msg(that.$t('msgDelete')); - uni.setStorageSync('token', null) + uni.setStorageSync('token', "") uni.setStorageSync('aan_id', null) uni.clearStorageSync() setTimeout(() => { diff --git a/body/setting/password.vue b/body/setting/password.vue index 8dad29d..e5e8bad 100644 --- a/body/setting/password.vue +++ b/body/setting/password.vue @@ -5,13 +5,13 @@ {{$t("infoEmail")}} - + {{$t("titleCode")}} - + @@ -50,7 +50,7 @@ onLoad() { let that = this uni.setNavigationBarTitle({ - title: that.$t('titlePasswordEdit') + title: that.$t('titleSetPassword') }) }, methods: { @@ -90,7 +90,7 @@ that.$tools.msg(that.$t('msgSetSuccess')) that.$model.getloginOut({}).then((res) => { if (res.code != 0) return - uni.setStorageSync('token', null) + uni.setStorageSync('token', "") uni.setStorageSync('aan_id', null) uni.clearStorageSync() setTimeout(function() { diff --git a/body/setting/phone.vue b/body/setting/phone.vue index 0cb33d6..9e35159 100644 --- a/body/setting/phone.vue +++ b/body/setting/phone.vue @@ -11,7 +11,7 @@ {{$t('titleCode')}} - + diff --git a/body/setting/setting.vue b/body/setting/setting.vue index 0e526b3..7b9ee37 100644 --- a/body/setting/setting.vue +++ b/body/setting/setting.vue @@ -42,6 +42,11 @@ nickname: "" }; }, + onLoad() { + uni.setNavigationBarTitle({ + title: this.$t('titleSet') + }) + }, computed: { ...mapState(["accountNumber"]), user() { diff --git a/components/bodyIndex/bodyHome.vue b/components/bodyIndex/bodyHome.vue deleted file mode 100644 index 0d21757..0000000 --- a/components/bodyIndex/bodyHome.vue +++ /dev/null @@ -1,247 +0,0 @@ - - - - - \ No newline at end of file diff --git a/components/bodyIndex/drawer.vue b/components/bodyIndex/drawer.vue index 32fa6a8..58dce46 100644 --- a/components/bodyIndex/drawer.vue +++ b/components/bodyIndex/drawer.vue @@ -15,11 +15,11 @@ {{item.nickname}} - 当前 + {{$t("infoNowUser")}} - {{item.gender==1?'男':'女'}} - {{item.age}}岁 + {{item.gender==1?$t("infoMan"):$t("infoWoman")}} + {{item.age}}{{$t("infoAgeunit")}} diff --git a/components/bodyIndex/firstweight.vue b/components/bodyIndex/firstweight.vue index 11dd79d..3e29e11 100644 --- a/components/bodyIndex/firstweight.vue +++ b/components/bodyIndex/firstweight.vue @@ -2,24 +2,24 @@ - 初始体重 + {{$t("initial_weight")}} - 日期 + {{$t("titleDate")}} - {{regTime?regTime:'请选择'}} + {{regTime?regTime:$t("verifyPicker")}} - 体重 + {{$t("infoWeight")}} - kg + kg - 取消 - 确定 + {{$t("btnSancellation")}} + {{$t("btnConfirm")}} @@ -60,11 +60,11 @@ handleTarget() { let that = this if (!that.regTime) { - that.$tools.msg("请选择测量日期") + that.$tools.msg(that.$t("verifyDate")) return } if (!that.weight) { - that.$tools.msg("请输入测量体重") + that.$tools.msg(that.$t("verifyWeight")) return } that.$model.getfirstweight({ diff --git a/components/bodyIndex/record.vue b/components/bodyIndex/record.vue index f4e0e9b..c4d91b5 100644 --- a/components/bodyIndex/record.vue +++ b/components/bodyIndex/record.vue @@ -2,12 +2,12 @@ - 手动记录 + {{$t("manualRecording")}} - 日期 + {{$t("titleDate")}} - {{regTime?regTime:'请选择'}} + {{regTime?regTime:$t("verifyPicker")}} @@ -15,26 +15,26 @@ - 身高 + {{$t("infoHeight")}} - cm + cm - 体重 + {{$t("infoWeight")}} - kg + kg - 头围 + {{$t("infoHead")}} - cm + cm - 取消 - 确定 + {{$t("btnSancellation")}} + {{$t("btnConfirm")}} @@ -80,15 +80,15 @@ handleinsertmeasure() { let that = this if (!that.regTime) { - that.$tools.msg("请选择测量日期") + that.$tools.msg(that.$t('verifyBodyDate')) return } if (!that.height) { - that.$tools.msg("请输入测量身高") + that.$tools.msg(that.$t('verifyHeight')) return } if (!that.weight) { - that.$tools.msg("请输入测量体重") + that.$tools.msg(that.$t('verifyWeight')) return } that.$model.getinsertmeasure({ diff --git a/components/bodyIndex/targetWeight.vue b/components/bodyIndex/targetWeight.vue index 309d6d1..513117b 100644 --- a/components/bodyIndex/targetWeight.vue +++ b/components/bodyIndex/targetWeight.vue @@ -2,15 +2,15 @@ - 目标体重 + {{$t("target_weight")}} - 目标体重 + {{$t("target_weight")}} - kg + kg - 取消 - 确定 + {{$t("btnSancellation")}} + {{$t("btnConfirm")}} @@ -40,7 +40,7 @@ handleWeight() { let that = this if (!that.inputvalue) { - that.$tools.msg("请输入目标体重") + that.$tools.msg(that.$t("justDta")) return } that.$model.getTargetweight({ @@ -51,9 +51,6 @@ that.$tools.msg(res.msg) that.$store.commit("changeTarget", false); that.$emit("handleLabelList", that.endDate, that.startDate) - // that.$store.dispatch('getUserInfo', { - // aud_id: that.user.aud_id - // }) that.inputvalue = "" }) }, diff --git a/components/cardIndex/cardHome.vue b/components/cardIndex/cardHome.vue deleted file mode 100644 index 82618f9..0000000 --- a/components/cardIndex/cardHome.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - - \ No newline at end of file diff --git a/components/cardIndex/record.vue b/components/cardIndex/record.vue index bb163ce..7768c67 100644 --- a/components/cardIndex/record.vue +++ b/components/cardIndex/record.vue @@ -2,13 +2,13 @@ - 添加记录 + {{$t("addRecord")}} - 选择项目 + {{$t("option")}} - {{index!=-1?publicRecordInfo[index].name:'请选择'}} + {{index!=-1?publicRecordInfo[index].name:$t("verifyPicker")}} @@ -21,7 +21,7 @@ - {{RecordList[ind].value?RecordList[ind].value:'请选择'}} + {{RecordList[ind].value?RecordList[ind].value:$t("verifyPicker")}} @@ -31,27 +31,27 @@ - {{RecordList[ind].value?RecordList[ind].value:'请选择'}}{{ite.unit}} + {{RecordList[ind].value?RecordList[ind].value:$t("verifyPicker")}}{{ite.unit}} - {{ite.unit}} + {{ite.unit}} - {{ite.unit}} + {{ite.unit}} - {{ite.unit}} + {{ite.unit}} - 取消 - 确定 + {{$t("btnSancellation")}} + {{$t("btnConfirm")}} @@ -123,12 +123,12 @@ handlepublicmeasure() { let that = this if (that.index == -1) { - that.$tools.msg("请选择项目") + that.$tools.msg(that.$t("verifyOption")) return } for (let i = 0; i < that.RecordList.length; i++) { if (that.RecordList[i].value == "") { - that.$tools.msg("请输入正确信息") + that.$tools.msg(that.$t("justDta")) break; } break; diff --git a/components/foodIndex/bluetooth.vue b/components/foodIndex/bluetooth.vue index c43bbd7..a1451e3 100644 --- a/components/foodIndex/bluetooth.vue +++ b/components/foodIndex/bluetooth.vue @@ -6,7 +6,7 @@ {{bleTipsText}} - 断开连接 + {{$t("Disconnect")}} {{name}} @@ -27,19 +27,19 @@ - 单位 + {{$t("UnitBtn")}} - 保存 - 下一味 - 清零 + {{$t("Save")}} + {{$t("nextFlavor")}} + {{$t("resetBtn")}} - @@ -137,7 +137,7 @@ if (that.isConnection != 1) return that.kcal = "" that.$store.commit('changeBluetoothValue', { - bleTipsText: "蓝牙搜索中", + bleTipsText: that.$t("SearchBluetooth"), isConnectStatus: 0, deviceId: "", serviceId: "", @@ -173,7 +173,7 @@ that.$store.commit("changeBluetoothValue", { foodType: 1, isConnectStatus: 1, - bleTipsText: "连接超时,点击重新连接", + bleTipsText: that.$t("ConnectionTimeout"), }) console.log('获取特征值失败:', JSON.stringify(res)) } @@ -193,7 +193,7 @@ serviceId: that.serviceId, foodNotify: that.notify, foodWrite: that.write, - bleTipsText: "测量中,请将食物放到秤上", + bleTipsText: that.$t("Measuring"), isConnectStatus: 2 }) uni.onBLECharacteristicValueChange(function(res) { @@ -275,7 +275,7 @@ if (Number(that.weight) > 0) { that.$emit("handleDetailSub", that.weight, that.unit, that.kcal) } else { - that.$tools.msg("数据异常,请清零后重新测量!") + that.$tools.msg(that.$t("Remeasure")) } }, //备料下一个 @@ -284,7 +284,7 @@ if (Number(that.weight) > 0) { that.$emit("handleDetailNext", that.weight, that.unit, that.kcal) } else { - that.$tools.msg("数据异常,请清零后重新测量!") + that.$tools.msg(that.$t("Remeasure")) } }, changleUnits(e) { @@ -340,7 +340,7 @@ let that = this that.unitA = that.$json.unitMinus that.$store.commit("changeBluetoothValue", { - bleTipsText: "连接失败,点击重新连接", + bleTipsText: that.$t("ConnectionTimeout"), unitList: that.$json.unitMinus, isConnectStatus: 1, foodType: 1 diff --git a/components/foodIndex/bluetooth_food.vue b/components/foodIndex/bluetooth_food.vue index 8180b1b..6e1efbf 100644 --- a/components/foodIndex/bluetooth_food.vue +++ b/components/foodIndex/bluetooth_food.vue @@ -6,7 +6,7 @@ {{bleTipsText}} - 断开连接 + {{$t("Disconnect")}} @@ -24,20 +24,20 @@ - 单位 + {{$t("UnitBtn")}} - 保存 + {{$t("Save")}} + - 清零 + {{$t("resetBtn")}} - @@ -127,7 +127,7 @@ if (that.isConnection != 1) return that.kcal = "" that.$store.commit('changeBluetoothValue', { - bleTipsText: "蓝牙搜索中", + bleTipsText: that.$t("SearchBluetooth"), isConnectStatus: 0, deviceId: "", serviceId: "", @@ -164,7 +164,7 @@ that.$store.commit("changeBluetoothValue", { foodType: 1, isConnectStatus: 1, - bleTipsText: "连接超时,点击重新连接", + bleTipsText: that.$t("ConnectionTimeout"), }) console.log('获取特征值失败:', JSON.stringify(res)) } @@ -184,7 +184,7 @@ serviceId: that.serviceId, foodNotify: that.notify, foodWrite: that.write, - bleTipsText: "测量中,请将食物放到秤上", + bleTipsText: that.$t("Measuring"), isConnectStatus: 2 }) uni.onBLECharacteristicValueChange(function(res) { @@ -319,13 +319,13 @@ if (Number(that.weight) > 0) { that.$emit("handleBle", that.weight, that.unit, that.kcal) } else { - that.$tools.msg("数据异常,请清零后重新测量!") + that.$tools.msg(that.$t("Remeasure")) } }, handleBack() { let that = this that.$store.commit("changeBluetoothValue", { - bleTipsText: "连接失败,点击重新连接", + bleTipsText: that.$t("ConnectionTimeout"), unitList: that.$json.unitMinus, isConnectStatus: 1, foodType: 1 diff --git a/components/foodIndex/foodHome.vue b/components/foodIndex/foodHome.vue deleted file mode 100644 index 6dca0a8..0000000 --- a/components/foodIndex/foodHome.vue +++ /dev/null @@ -1,476 +0,0 @@ - - - - - \ No newline at end of file diff --git a/components/foodIndex/search.vue b/components/foodIndex/search.vue index cef8af1..b5225c6 100644 --- a/components/foodIndex/search.vue +++ b/components/foodIndex/search.vue @@ -3,7 +3,7 @@ - + @@ -11,7 +11,7 @@ - 搜索 + {{$t("Search")}} diff --git a/element/ren-calendar/ren-calendar.vue b/element/ren-calendar/ren-calendar.vue index 30bcd06..154b0ef 100644 --- a/element/ren-calendar/ren-calendar.vue +++ b/element/ren-calendar/ren-calendar.vue @@ -4,7 +4,7 @@ - {{y+'年'+formatNum(m)+'月'}} + {{y+'-'+formatNum(m)}} diff --git a/language/zh.json b/language/zh.json index 5930d0b..3d67036 100644 --- a/language/zh.json +++ b/language/zh.json @@ -29,28 +29,47 @@ "verifyMobileCorrect": "请输入正确的手机号", "verifyCode": "请输入验证码", "verifyPassword": "请输入密码", - "verifyPasswordTwo": "请输入确认密码", + "verifyTime": "请输入用时", + "verifyPasswordTwo": "请确认密码", "verifyPasswordCorrect": "请确认两次密码填写一致", "verifyAgreement": "请先确认并勾选协议", "verifyOutLogin": "是否退出登录?", "verifyDeleteUser": "是否删除该成员?", "verifyDeleteHistory": "是否删除当前测量记录?", "verifyDeleteAccount": "删除成功后,该账号的所有关联信息将被清空且无法找回,是否删除?", - "btnConfirm": "确认", + "btnConfirm": "确定", "btnSubmit": "提交", "btnSancellation": "取消", "btnContinue": "继续", "btnBack": "返回", "btnDelete": "删除", - "ConnectionTimeout": "连接超时,点击重新连接", + "ConnectionTimeout": "连接失败,点击重新连接", "Measuring": "测量中,请将食物放到秤上", + "ConnectionSuccessful": "连接成功", + "connectingDevice": "请先连接设备", "Weight": "重量", "RecordWeight": "请输入食物重量", + "connectBluetooth": "蓝牙连接中", "SearchBluetooth": "蓝牙搜索中", "Remeasure": "数据异常,请重新测量!", "reset": "数据异常,请清零后重新测量!", - "Disconnect": "断开连接", "remeasure": "重新测量", + "StableWeight": "稳定重量", + "StableWeightText": "您的稳定体重是:", + "realTimeWeight": "实时重量", + "realTimeWeightText": "您的实时体重是:", + "heightText": "您的身高是", + "zeroBtn": "清零", + "LockBtn": "锁定", + "SaveResult": "保存结果", + "measureResultTips": "测量结果提示", + "nowWeight": "本次测量体重是", + "lastHeight": "上次测量身高是:", + "lastWeight": "上次测量体重是:", + "nowHeight": "本次测量身高是:", + "lastHead": "上次测量头围是:", + "errorOperation": "操作错误,请重新测量", + "Disconnect": "断开连接", "resetBtn": "清零", "UnitBtn": "单位", "titleHome": "首页", @@ -65,7 +84,6 @@ "titleeveryDay": "营养分析", "titleMe": "我的", "titleDetail": "详情", - "titleBody": "目标", "titleHistory": "饮食记录", "titlePhone": "绑定手机号", "titleEmail": "绑定邮箱", @@ -157,8 +175,147 @@ "st": "st:lb", + "titleHealth": "健康", + "titleDiet": "饮食", + "titleExercise": "运动", + "titleScore": "中招估分", + "titleStartScore": "开始估分", + "titleScoreResult": "本次估分成绩", + "titleDepthReport": "深度报告", + "infoHead": "头围", + "verifyHead": "请输入头围", + "verifyHeightDad": "请输入爸爸身高", + "verifyHeightMom": "请输入妈妈身高", + "verifyRecordType": "请选择测量项目", + "verifyRecordTime": "请输入时长", + "verifyRecordNumber": "请输入个数", "measuringRecord": "测量记录", "newVersion": "发现新版本", "IsUpdate": "是否更新?", - "UpdateProgram":"稍后可在'关于我们'内更新程序!" + "msgCalculating": "计算中", + "titleSkipping": "跳绳数据", + "titlevVitalcapacity": "肺活量数据", + "titleCharts": "运动曲线", + "titleContrast": "数据对比", + "UpdateProgram": "稍后可在'关于我们'内更新程序!", + "lungsuctionspeed": "吸气速度", + "averagelungsuction": "平均吸气肺活量", + "isMarginal": "是否达标", + "today_jump_num": "今日个数", + "today_jump_time": "今日时长", + "today_jump_kcal": "卡路里", + "jumpFree": "自由跳", + "backwardCount": "倒计数", + "Countdown": "倒计时", + "jumpFreedom": "自由", + "jumpFreeDegree": "自由次数", + "jumpFreeNumber": "个数", + "jumpTargetDegree": "目标次数", + "jumpUnlimited": "无限制", + "jumpTarget": "调整目标", + "jumpTargetTime": "目标时长 分:秒", + "MinuteSecond": "分:秒", + "Consumed": "消耗", + "LongpressEnd": "长按结束", + "AverageSpeed": "平均速度", + "Unit": "个/分钟", + "Numberofinterrupts": "中断次数", + "Times": "次", + "LongestConsecutive": "最长连续", + "Number": "个", + "trainingsNumber": "训练个数", + "complete": "完成", + "instructStart": "开始", + "instructContinuous": "连续", + "instructStop": "停止", + "instructEnd": "结束", + "instructContinue": "继续", + "instructPause": "暂停", + "linkBluetoothFail": "连接已断开", + "deviceDisconnection": "训练过程中已与设备连接中断,请重新连接设备再开始训练", + "ToggleTrainingsTips": "训练过程中请勿切换训练,返回训练", + "NOComplete": "本次跳绳时间低于10秒,记录将不会被保存?", + "growthAdvice": "成长建议", + "nutrition": "营养", + "sleep": "睡眠", + "movement": "运动", + "emotion": "情绪", + "manualRecording": "手动记录", + "inheritHeighet.title": "身高预测", + "inheritHeighet.dad": "爸爸身高", + "inheritHeighet.mom": "妈妈身高", + "inheritHeighet.geneticheight": "当前标准身高", + "inheritHeighet.adultheight": "成年身高预测", + "inheritHeighet.tips0": "为保证数据准确定,请认真填写真实信息", + "inheritHeighet.tips1": "如果当前实际身高﹤当前标准身高", + "inheritHeighet.tips2": "孩子后天生长环境不利长高。请从饮食、睡眠、运动、情绪等方面排查。加强后天因素管理,让孩子处于最佳长高状态。", + "inheritHeighet.tips3": "如果当前实际身高﹥当前标准身高", + "inheritHeighet.tips4": "孩子后天生长环境有利长高。请继续保持,加强后天因素管理,孩子成年可比标准高10cm以上。", + "time": "时间(天)", + "weightdiff": "减重", + "weightdiffAugment": "增重", + "fatWdiff": "减脂", + "fatWdiffAugment": "增脂", + "changeData": "数据变化", + "trend": "趋势", + "before": "之前", + "after": "之后", + "target_weight": "目标体重", + "cumulative_weight_gain": "累计增重", + "cumulative_weight": "累计减重", + "initial_weight": "初始体重", + "cumulative_day": "减重天数", + "chartsDay": "当天", + "chartsMonth": "月度", + "chartsYear": "年度", + "recordType": "项目", + "recordTime": "时长", + "recordNumber": "个数", + "recordNumberFirst": "第一次", + "recordNumberSecond": "第二次", + "recordNumberThird": "第三次", + "linkBluetoothFail2": "蓝牙连接已断开,请重新连接后测量", + "Ideal": "理想", + "addRecord": "添加记录", + "HistoricalRcord": "历史记录", + "TimeSpent": "用时", + "minutes": "分钟", + "btnBMI": "立即计算", + "Record": "记录", + "depthReport": "深度报告", + "Enter": "进入", + "target": "目标", + "teach": "教你做", + "SearchRecipes": "输入食材快速搜索菜谱", + "RecipeType": "菜谱类型", + "linkWeighing": "连接测量", + "Collection": "收藏", + "Ingredients": "食材", + "Suggestions": "建议", + "Calories": "热量", + "remeasure2": "重秤", + "CurrentlyWeighing": "正在称重", + "TodayMeals": "是否保存为今日饮食", + "SavedSuccessfully": "保存成功", + "ImproveData": "完善资料后查看更多", + "KeyWords": "输入关键字匹配食谱", + "KeyWordsSearch": "输入关键字后搜索", + "nextFlavor": "下一味", + "option": "选择项目", + "verifyOption": "请选择项目", + "justDta": "请输入正确数据", + "infoNowUser": "当前", + "HealthScore": "健康评分", + "StandardValue": "标准值", + "bodyData": "身体数据", + "titleInheritHeighet": "身高预测", + "titleBmi": "BMI测评", + "linkBluetoothSuccess": "连接成功,请上称测量", + "onDeviceBluetoothTips": "请确定设备已开机", + "openDeviceeMeasureTips": "请确定手机蓝牙及位置信息已打开", + "msgSuccess": "测量成功", + "msgFail": "测量失败", + "msgResetData": "数据重置中", + "FatFailure":"体脂测量失败,是否保存本次测量结果?", + "waive":"放弃" } \ No newline at end of file diff --git a/main.js b/main.js index 9890dda..320eed2 100644 --- a/main.js +++ b/main.js @@ -14,9 +14,6 @@ Vue.prototype.$model = model; // 蓝牙js import useBluetooth from "@/toolJs/Bluetooth.js"; Vue.prototype.$ble = useBluetooth; -//模拟数据 -import video from '@/video.json' -Vue.prototype.$video = video; // 语言 diff --git a/pageTwo/bmi/bmi.vue b/pageTwo/bmi/bmi.vue index c5b0e9b..f6a02e5 100644 --- a/pageTwo/bmi/bmi.vue +++ b/pageTwo/bmi/bmi.vue @@ -1,37 +1,37 @@ @@ -110,6 +109,9 @@ }, onLoad() { let that = this + uni.setNavigationBarTitle({ + title: this.$t('titleBmi'), + }) // #ifdef APP-PLUS that.fields = "time" // #endif @@ -125,20 +127,20 @@ //bmi计算 submit() { var that = this; - if (!that.PostData.weight) { - this.$tools.msg("请输入体重") + if (!that.PostData.height) { + this.$tools.msg(that.$t("verifyHeight")) return; } - if (!that.PostData.height) { - this.$tools.msg("请输入身高") + if (!that.PostData.weight) { + this.$tools.msg(that.$t("verifyWeight")) return; } if (!that.PostData.sex) { - this.$tools.msg("请选择性别") + this.$tools.msg(that.$t("verifyGender")) return; } if (!that.PostData.birthday) { - this.$tools.msg("请选择年龄") + this.$tools.msg(that.$t("verifyBirthday")) return; } that.$model.calcbmi(that.PostData).then(res => { diff --git a/pageTwo/charts/charts.vue b/pageTwo/charts/charts.vue index d8ef875..fe47700 100644 --- a/pageTwo/charts/charts.vue +++ b/pageTwo/charts/charts.vue @@ -10,9 +10,9 @@ - 当天 - 月度 - 年度 + {{$t("chartsDay")}} + {{$t("chartsMonth")}} + {{$t("chartsYear")}} @@ -33,7 +33,7 @@ - 暂无数据,请手动添加~ + {{$t("msgNoMoreData")}} @@ -53,6 +53,7 @@ return { weightList: [], handTrue: true, + index: 0, active: 1, time: "", } @@ -75,6 +76,9 @@ }, onShow() { let that = this + uni.setNavigationBarTitle({ + title: this.$t('titleCharts'), + }) that.active = 1 that.index = 0 that.time = that.startDate @@ -86,7 +90,7 @@ that.index = ind that.active = 1 that.time = that.startDate - that.handleActive(that.index) + that.handleActive(that.active) }, getList() { let that = this diff --git a/pageTwo/compk/contrast.vue b/pageTwo/compk/contrast.vue index ded0011..aed79e5 100644 --- a/pageTwo/compk/contrast.vue +++ b/pageTwo/compk/contrast.vue @@ -43,7 +43,7 @@ vs - 对比 + {{$t("titleContrast")}} @@ -86,12 +86,16 @@ }, onLoad() { let that = this + uni.setNavigationBarTitle({ + title: that.$t('titleContrast') + }) that.handlonLoad() }, methods: { handlePageScrollTo(id, ind) { let that = this that.index = ind + that.isShow = false that.handlonLoad() }, handlonLoad() { @@ -166,7 +170,7 @@ handlePK() { let that = this if (that.isActive.length != 2) { - that.$tools.msg("请先选择数据!") + that.$tools.msg(that.$t('verifyBontrast')) return } let info = {} @@ -217,8 +221,8 @@ padding: 0 15px; } } - - .calendar{ + + .calendar { margin-top: 50px; } \ No newline at end of file diff --git a/pageTwo/compk/pkdetail.vue b/pageTwo/compk/pkdetail.vue index 2c5a319..b3d399c 100644 --- a/pageTwo/compk/pkdetail.vue +++ b/pageTwo/compk/pkdetail.vue @@ -7,30 +7,32 @@ {{memInfo.name?memInfo.name:memInfo.nickname}} - 性别:{{memInfo.gender=='0'?'未知':memInfo.gender=='1'?'男':'女'}} - 年龄:{{user.age}}岁 + + {{$t("infoGender")}}:{{memInfo.gender=='0'?$t("infoUnknown"):memInfo.gender=='1'?$t("infoMan"):$t("infoWoman")}} + + {{$t("infoAge")}}:{{user.age}}{{$t("infoAgeunit")}} {{memInfo.day?memInfo.day:'0'}} - 时间(天) + {{$t("time")}} {{memInfo.weightdiff?Math.abs(memInfo.weightdiff):0}} - 增重(kg) - 减重(kg) + {{$t("weightdiffAugment")}}(kg) + {{$t("weightdiff")}}(kg) {{memInfo.fat_wdiff?Math.abs(memInfo.fat_wdiff):0}} - 增脂(kg) - 减脂(kg) + {{$t("fatWdiffAugment")}}(kg) + {{$t("fatWdiff")}}(kg) {{memInfo.time}} - 数据变化 + {{$t("changeData")}} @@ -38,15 +40,15 @@ {{memInfo.time}} - 数据变化 + {{$t("changeData")}} - 趋势 - 之前 - 之后 + {{$t("trend")}} + {{$t("before")}} + {{$t("after")}} @@ -54,8 +56,8 @@ {{ite.diffval}} - - + + @@ -89,6 +91,11 @@ computed: { ...mapState(["user"]), }, + onLoad() { + uni.setNavigationBarTitle({ + title: this.$t('titleDetail'), + }) + }, methods: { handleSharepic(info) { let that = this diff --git a/pageTwo/devices/B20.vue b/pageTwo/devices/B20.vue index 0ba277f..3c6dc80 100644 --- a/pageTwo/devices/B20.vue +++ b/pageTwo/devices/B20.vue @@ -6,34 +6,34 @@ {{weight?weight:'0.00'}}{{unit}} - {{typeInfo==2?'稳定重量':'实时重量'}} + {{typeInfo==2?$t("StableWeight"):$t("realTimeWeight")}} - 清零 - 锁定 + {{$t("zeroBtn")}} + {{$t("LockBtn")}} - 提示: - 1.请确定设备是开机状态 - 2.请确定手机蓝牙、位置信息已打开 + {{$t("msgTitle")}}: + 1.{{$t("onDeviceBluetoothTips")}} + 2.{{$t("openDeviceeMeasureTips")}} - 测量结果提示 + {{$t("measureResultTips")}} - 本次测量体重是:{{weight}}{{unit}} + {{$t("nowWeight")}}:{{weight}}{{unit}} - 上次测量身高是:cm + {{$t("lastHeight")}}:cm - 上次测量头围是:cm + {{$t("lastHead")}}:cm - 重新测量 - 保存结果 + {{$t("remeasure")}} + {{$t("SaveResult")}} @@ -90,7 +90,7 @@ isBluetoothTyle: function() { let that = this if (!that.isBluetoothTyle) { - that.$tools.showModal('蓝牙连接已断开,请重新连接后测量') + that.$tools.showModal(that.$t("linkBluetoothFail2")) } }, bleValue: { @@ -142,7 +142,7 @@ that.$store.commit("changeBluetoothValue", { type: 1, isConnectStatus: 2, - bleTipsText: "蓝牙连接成功,请上秤测量", + bleTipsText:that.$t("linkBluetoothSuccess"), }) uni.notifyBLECharacteristicValueChange({ deviceId: that.deviceId, @@ -283,7 +283,7 @@ handleGetMeasure() { let that = this if (!that.height) { - this.$tools.msg("请输入身高") + this.$tools.msg(that.$t("verifyHeight")) return } that.$model.getmeasurefunit({ @@ -302,9 +302,9 @@ that.$store.dispatch("getResult", { aud_id: that.user.aud_id }) - that.$tools.msg("测量成功") + that.$tools.msg(that.$t("msgSuccess")) } else { - that.$tools.msg("测量失败") + that.$tools.msg(that.$t("msgFail")) } setTimeout(function() { @@ -329,7 +329,7 @@ success: res => { console.log('下发指令成功', res.errMsg) uni.showToast({ - title: '数据重置中', + title: that.$t("msgResetData"), icon: "none" }) console.log("重置", that.typeInfo, that.weight) diff --git a/pageTwo/devices/G02.vue b/pageTwo/devices/G02.vue index a94a599..b350061 100644 --- a/pageTwo/devices/G02.vue +++ b/pageTwo/devices/G02.vue @@ -7,24 +7,24 @@ - 提示: - 1.请确定设备已开机 - 2.请确定手机蓝牙及位置信息已打开 + {{$t("msgTitle")}}: + 1.{{$t("onDeviceBluetoothTips")}} + 2.{{$t("openDeviceeMeasureTips")}} - 测量结果提示 + {{$t("measureResultTips")}} - 本次测量身高为:{{height}}{{unit}} + {{$t("nowHeight")}}:{{height}}{{unit}} - 上次测量体重为:kg + {{$t("lastWeight")}}:kg - 重新测量 - 保存测量结果 + {{$t("remeasure")}} + {{$t("SaveResult")}} @@ -78,7 +78,7 @@ isBluetoothTyle: function() { let that = this if (!that.isBluetoothTyle) { - that.$tools.showModal('蓝牙连接已断开,请重新连接后测量') + that.$tools.showModal(that.$t("linkBluetoothFail2")) } }, bleValue: { @@ -116,7 +116,7 @@ that.$store.commit("changeBluetoothValue", { type: 1, isConnectStatus: 2, - bleTipsText: "蓝牙连接成功,请开始测量", + bleTipsText: $t("linkBluetoothSuccess"), }) uni.notifyBLECharacteristicValueChange({ deviceId: that.deviceId, @@ -167,7 +167,7 @@ that.unit = "ft" } if (Number(data) < 20) { - that.text = "操作错误,请重新测量" + that.text = that.$t("errorOperation") } else { if (unit == "2") { let data1 = data / 12 @@ -178,7 +178,7 @@ that.height2 = data that.height = data } - that.text = "您的身高是:" + that.height + that.unit + that.text = that.$t("heightText") + that.height + that.unit that.isHeight = true } console.log("G02", value, unit, data, that.height, that.height2) @@ -194,7 +194,7 @@ let that = this let height = 0 if (!that.weight) { - that.$tools.msg("请输入体重") + that.$tools.msg(that.$t("verifyWeight")) return } if (that.unit == 'ft') { @@ -217,9 +217,9 @@ that.$store.dispatch("getResult", { aud_id: that.user.aud_id }) - that.$tools.msg("测量成功") + that.$tools.msg(that.$t("msgSuccess")) } else { - that.$tools.msg("测量失败") + that.$tools.msg(that.$t("msgFail")) } setTimeout(function() { uni.switchTab({ diff --git a/pageTwo/devices/PCL.vue b/pageTwo/devices/PCL.vue index c6b1db3..ce21d66 100644 --- a/pageTwo/devices/PCL.vue +++ b/pageTwo/devices/PCL.vue @@ -1,30 +1,30 @@