diff --git a/App.vue b/App.vue index d10262fc..8f62dff8 100644 --- a/App.vue +++ b/App.vue @@ -7,6 +7,18 @@ }, onLaunch: function() { let that = this + uni.setTabBarItem({ + index: 0, + text: that.$t('common.titleHome') + }) + uni.setTabBarItem({ + index: 1, + text: that.$t('common.titleNews') + }) + uni.setTabBarItem({ + index: 2, + text: that.$t('common.titleMe') + }) // #ifdef APP-PLUS // 获取设备信息 uni.getSystemInfo({ @@ -15,7 +27,10 @@ that.$store.commit('changePhoneInfo', { platform: e.platform }) - console.log("getSystemInfo", e.platform) + let language = uni.getStorageSync('language') ? uni.getStorageSync('language') : e + .language == "zh-CN" ? "zh-Hans" : e.language + uni.setStorageSync('language', language) + console.log("getSystemInfo", language, e) } }) if (platform === 'ios') { // ios首次安装没有网络 @@ -34,7 +49,6 @@ that.$store.commit('changePhoneInfo', { info: info }) - console.log("222222222", info.version, SystemVersion) }) // #endif // #ifdef MP-WEIXIN @@ -55,7 +69,6 @@ uni.$on('need-login', function() { uni.setStorageSync('token', null) uni.setStorageSync('aan_id', null) - uni.clearStorageSync() setTimeout(() => { uni.reLaunch({ url: '/pageTwo/login/login' @@ -71,7 +84,6 @@ console.log('App Show') }, onHide: function() { - console.log('App Hide') // #ifdef APP-PLUS uni.offNetworkStatusChange(function(res) { console.log("取消网络监听") @@ -83,9 +95,10 @@ handleoginversion() { let that = this that.$model.getloginversion({}).then(res => { - let language = res.data.language == "zh" ? 'zh-Hans' : res.data.language - uni.setLocale(language) - uni.setStorageSync('language', res.data.language) + // #ifdef MP-WEIXIN + uni.setStorageSync('language', 'en') + // #endif + that.$store.commit('changeLanguage', res.data.language_arr) if (res.code == 0) { uni.$emit('login-sucesss'); } else { @@ -233,7 +246,7 @@ content: '请退出并移除小程序,重新打开...', }) }) - } + }, } } diff --git a/element/manuallyAdd/record.vue b/element/manuallyAdd/record.vue index 9d56f1a1..48aa81f7 100644 --- a/element/manuallyAdd/record.vue +++ b/element/manuallyAdd/record.vue @@ -2,12 +2,12 @@ - 手动记录 + {{$t("index.manualRecording")}} - 日期 + {{$t('common.titleDate')}} - {{regTime?regTime:'请选择'}} + {{regTime?regTime:$t('tips.verifyPicker')}} @@ -15,10 +15,10 @@ - 项目 + {{$t('recordType')}} - {{name?name:'请选择'}} + {{name?name:$t('tips.verifyPicker')}} @@ -28,75 +28,78 @@ {{describe}} - {{time_m?time_m+':':'请选择'}}{{time_s?time_s:''}} + {{time_m?time_m+':':$t('tips.verifyPicker')}}{{time_s?time_s:''}} + - + {{unit}} - 时长 + {{$t('recordTime')}} - {{time_m?time_m+':':'请选择'}}{{time_s?time_s:''}} + {{time_m?time_m+':':$t('tips.verifyPicker')}}{{time_s?time_s:''}} + - 个数 + {{$t('recordNumber')}} - 个 + {{$t('skip.Number')}} - 身高 + {{$t('common.infoHeight')}} - cm + cm - 体重 + {{$t('common.infoWeight')}} - kg + kg - 头围 + {{$t('common.infoHead')}} - cm + cm - 第一次 + {{$t('recordNumberFirst')}} - ml + ml - 第二次 + {{$t('recordNumberSecond')}} - ml + ml - 第三次 + {{$t('recordNumberThird')}} - ml + ml - 取消 - 确定 + {{$t("tips.btnSancellation")}} + {{$t("tips.btnConfirm")}} @@ -190,19 +193,19 @@ handlepublicmeasure() { let that = this if (!that.name) { - that.$tools.msg("请选择测量项目") + that.$tools.msg(that.$t("tips.verifyRecordType")) return } if (!that.regTime) { - that.$tools.msg("请选择日期") + that.$tools.msg(that.$t("tips.verifyDate")) return } if (that.listType == 4 && (!that.time_m || !that.time_s)) { - that.$tools.msg("请输入时长") + that.$tools.msg(that.$t("tips.verifyRecordTime")) return } if (that.listType != 4 && !that.number) { - let msg = that.listType == 1 ? '请输入个数' : '请输入时长' + let msg = that.listType == 1 ? that.$t("tips.verifyRecordNumber") : that.$t("tips.verifyRecordTime") that.$tools.msg(msg) return } @@ -230,19 +233,19 @@ handleLungmeasure() { let that = this if (!that.regTime) { - that.$tools.msg("请选择测量日期") + that.$tools.msg(that.$t("tips.verifyDate")) return } if (!that.number1) { - that.$tools.msg("请输入第一次吸气值") + that.$tools.msg(that.$t("lung.oneNumberTips")) return } if (!that.number2) { - that.$tools.msg("请输入第二次吸气值") + that.$tools.msg(that.$t("lung.twoNumberTips")) return } if (!that.number3) { - that.$tools.msg("请输入第三次吸气值") + that.$tools.msg(that.$t("lung.threeNumberTips")) return } that.$model.getLungmeasure({ @@ -264,11 +267,11 @@ handleskipmeasure() { let that = this if (!that.regTime) { - that.$tools.msg("请选择测量日期") + that.$tools.msg(that.$t("tips.verifyDate")) return } if (!that.number) { - that.$tools.msg("请输入跳绳个数") + that.$tools.msg(that.$t("tips.verifyRecordNumber")) return } that.$model.getskipmeasure({ @@ -291,15 +294,15 @@ handleinsertmeasure() { let that = this if (!that.regTime) { - that.$tools.msg("请选择测量日期") + that.$tools.msg(that.$t("tips.verifyDate")) return } if (!that.height) { - that.$tools.msg("请输入测量身高") + that.$tools.msg(that.$t("tips.verifyHeight")) return } if (!that.weight) { - that.$tools.msg("请输入测量体重") + that.$tools.msg(that.$t("tips.verifyWeight")) return } that.$model.getinsertmeasure({ diff --git a/locale/en.json b/locale/en.json index 67e2f0c4..679034ac 100644 --- a/locale/en.json +++ b/locale/en.json @@ -1,71 +1,562 @@ { - "common": { - "titleSetLanguage": "语言设置", - "titleSkipping": "跳绳数据", - "titlevVitalcapacity": "肺活量数据", - "titleCharts": "运动曲线", - "titleMe": "我的", - "titleScore": "中招估分", - "titleScoreHistory": "估分历史", - "titleScoreReport": "估分报告", - "titleContrast": "数据对比", - "titleDetail": "详情", - "titleBody": "曲线/目标", - "titleHistory": "历史记录", - "titleCardSet": "卡片设置", - "titlebBusiness": "设备管理", - "titleBusinesAdd": "添加设备", - "titleBusinesSList": "设备列表", - "titleBusinesSearch": "搜索设备", - "titleInheritHeighet": "身高预测", - "titleBmi": "BMI测评", - "titlePhone": "绑定手机号", - "titleEmail": "绑定邮箱", - "titlePasswordEdit": "修改密码", - "titleSet": "设置", - "titleDate": "日期", - "titleMember": "资料", - "titleManage": "成员管理", - "titleManageAdd": "添加成员", - "titleAboutUs": "关于我们", - "titleSetPassword": "设置密码", - "titlePassword": "密码", - "titleConfirmPassword": "确认密码", - "titleForgotPassword": "忘记密码", - "titleCode": "验证码", - "titleSendCode": "获取验证码", - "titleSendCodeRetry": "S后重发", - "titleLogin": "登录", - "titleRegister": "注册", - "titleToggleLogin": "切换登录", - "titleAccountText": "手机号/邮箱", - "titleAgreementText": "阅读并同意", - "titleAgreementContntText": "《隐私协议》", - "infoAvatar": "头像", - "infoNickname": "昵称", - "infoMobile": "手机号", - "infoEmail": "邮箱", - "infoAge": "年龄", - "infoAgeunit": "岁", - "infoGender": "性别", - "infoMan": "男", - "infoWoman": "女", - "infoUnknown": "未知", - "infoBirthday": "出生日期", - "infoNowUser": "当前", - "infoHeight": "身高", - "infoHead": "头围", - "infoWeight": "体重", - "infoBMI": "BMI", - "infoAddress": "当前地区", - "btnEdit": "编辑", - "btnDelete": "删除", - "btnAdd": "添加", - "btnDetails": "详情", - "btnUnbind": "解绑", - "btnBMI": "立即计算", - "btnDeleteAccount": "删除账号", - "btnLogOut": "退出登录", - "btnContrast": "对比" - } -} + + "tips": { + + "msgTitle": "Friendly reminder", + + "msgResetData": "Data reset in progress", + + "msgSuccess": "Measurement successful!", + + "msgFail": "Measurement failed!", + + "msgUpgradeFail": "Upgrade Failed", + + "msgDownloading": " Downloading now", + + "msgLatestVersion": "It's the latest version!", + + "msgCancel": "You have cancelled the operation!", + + "msgLoginSuccess": "Login successful!", + + "msgDelete": "Deletion successful", + + "msgSetSuccess": "Set successfully", + + "msgbindt": "Binding successful!", + + "msgUnBind": "Unbind successfully!", + + "msgBottom": "It's all there. Let's see something else.", + + "msgNoMoreData": "There's no more data!", + + "msgCalculating ": " Under calculation ", + + "msgSetPasswordSuccess": "The password was set successfully.", + + "msgAddUser": "There are no members yet. Please add them first.", + + "verifyNickName": "Please enter the nickname", + + "verifyNotOptional": "Future dates are not selectable", + + "verifyDate": "Please select the measurement date", + + "verifyBirthday": "Please select your date of birth", + + "verifyHeight": "Please enter your height", + + "verifyWeight": "Please enter your weight", + + "verifyHead": "Please enter the head circumference", + + "verifyHeightDad": "Please enter Dad's height.", + + "verifyHeightMom": "Please enter Mom's height", + + "verifyGender": "Please select gender", + + "verifyBontrast": "Please select the data", + + "verifyBodyDate": "Please select the correct time", + + "verifyRecordType": "Please select the measurement item", + + "verifyRecordTime": " Please enter the duration", + + "verifyRecordNumber": "Please enter the number", + + "verifyRecord": "Please enter", + + "verifyPicker": "Please select", + + "verifyAccount": "Please enter the correct Mobile phone or email address.", + + "verifyEmail": "Please enter your email address", + + "verifyEmailCorrect": "Please enter the correct email address", + + "verifyMobile": "Please enter your Mobile phone", + + "verifyMobileCorrect": "Please enter the correct phone number", + + "verifyCode": "Please enter the verification code", + + "verifyPassword": "Please enter your password", + + "verifyPasswordTwo": "Please enter the confirmation password", + + "verifyPasswordCorrect": "Please confirm that the password is filled in the same way twice.", + + "verifyAgreement": "Please confirm and check the agreement first.", + + "verifyOutLogin": "Do you want to log out?", + + "verifyDeleteUser": "Do you want to delete this member?", + + "verifyDeleteHistory": "Do you want to delete the current measurement record?", + + "verifyUnbindt": "Do you want to unbind this device?", + + "verifybindt": "Do you want to bind this device?", + + "verifyDeleteAccount": "After a successful deletion, all associated information of this account will be cleared and cannot be retrieved. Do you want to delete it?", + + "btnConfirm": "Confirm", + + "btnSubmit": "Submit", + + "btnSancellation": "Cancel", + + "btnContinue": "Continue", + + "btnBack": "Return", + + "btnDelete": "Delete" + + }, + + "common": { + + "titleSetLanguage": "Language Settings", + + "titleSkipping": "Skipping rope data", + + "titlevVitalcapacity": "Vitalcapacity data", + + "titleCharts": "Motion curve", + "titleHome": "Record", + "titleNews": "Information", + "titleMe": "My", + "titleScore": "Estimated Score for the High School Entrance Examination", + "titleScoreHistory": "EstimatedScoreHistory", + "titleScoreReport": "EstimatedScoreReport", + "titleContrast": "Data comparison", + "titleDetail": "Details", + "titleBody": "Curve/Target", + + "titleLanguage": "Language switching", + + "titleHistory": "historical", + + "titleCardSet": "Card Settings", + + "titlebBusiness": "Equipment Management", + + "titleBusinesAdd": "Add equipment", + + "titleBusinesSList": "Device List", + + "titleBusinesSearch": "Search Device", + + "titleInheritHeighet": "Height Prediction", + + "titleBmi": "BMI Assessment", + + "titlePhone": "Bind the Mobile phone", + + "titleEmail": "Bound Email", + + "titlePasswordEdit": "Change password", + + "titleSet": "Settings", + + "titleDate": "Date", + + "titleMember": "Data", + + "titleManage": "Member Management", + + "titleManageAdd": "Add Member", + + "titleAboutUs": "AboutUs", + + "titleSetPassword": "Set password", + + "titlePassword": "Password", + + "titleConfirmPassword": "Confirmation Password", + + "titleForgotPassword": "Forgot password", + + "titleCode": "Verification code", + + "titleSendCode": "Send code", + + "titleSendCodeRetry": "send again", + + "titleLogin": "Login", + + "titleRegister": "Register", + + "titleToggleLogin": "Switch Login", + + "titleAccountText": "Mobile phone/Email", + + "titleAgreementText": "Read and agree", + + "titleAgreementContntText": "Privacy Agreement", + + "titleVersionUpdate": "VersionUpdate", + + "titleNewVersion": "New version", + + "infoAvatar": "Avatar", + + "infoNickname": "Nickname", + + "infoMobile": "Mobile phone", + + "infoEmail": "Mailbox", + + "infoAge": "age", + + "infoAgeunit": "year", + + "infoGender": "gender", + + "infoMan": "Man", + + "infoWoman": "Woman", + + "infoUnknown": "unknown", + + "infoBirthday": "Birthday", + + "infoNowUser": "Currently", + + "infoHeight": "height", + + "infoHead": "head circumference", + + "infoWeight": "weight", + + "infoBMI": "BMI", + + "infoAddress": "Region", + + "btnEdit": "edit", + + "btnDelete": "Delete", + + "btnAdd": "Add", + + "btnDetails": "Details", + + "btnUnbind": "Unbind", + + "btnBMI": "Calculate immediately", + + "btnDeleteAccount": "Delete account", + + "btnLogOut": "Log out", + + "btnContrast": "contrast" + + }, + + "linkBluetooth": { + + "onBluetoothTips": "Please search for the device while it is powered on.", + + "onBluetoothHaveFound": "Has been discovered", + + "onBluetoothDevice": "device", + + "onBluetoothMac": "mac address", + + "onBluetoothBind": "Device Binding Process Description", + + "onBluetoothSelect": "Select Bluetooth for binding", + + "onPhoneBluetoothTips": "The phone's Bluetooth is not turned on.", + + "onDeviceBluetoothTips": "Please make sure the device is powered on and the Bluetooth permission on your phone is enabled!", + + "Youdaoplaceholder0 ": "You need to authorize the use of Bluetooth on your phone", + + "openBluetoothSuccess": "Bluetooth permission was obtained successfully. Reconnect to Bluetooth.", + + "openSettingFail": "Permission acquisition failed. Measurement cannot be conducted using the phone's Bluetooth.", + + "isLinkBluetooth": "Please connect the device first.", + + "startlinkBluetooth": "Start Connecting", + "linkBluetooth": "Bluetooth connection in progress", + + "anewlinkBluetooth": "Reconnect", + + "linkBluetoothFail": "Device connection failed. Return to the home page and reconnect.", + + "linkBluetoothSuccess": "Bluetooth connection successful. Please start measuring.", + + "startSearchBluetooth": "Start searching", + + "searchBluetooth": "Bluetooth search ongoing", + + "searchBluetoothFail": "Re-search", + "Nodevicefound": "No Bluetooth device was found", + + "onDeviceMeasureTips": "Please make sure the device is on.", + + "openDeviceeMeasureTips": "Please make sure your phone's Bluetooth and location information are turned on.", + + "deviceDisconnection": "The connection with the device was interrupted during the measurement process. Please reconnect the device and start the measurement again.", + "offBluetooth": "Bluetooth is turned off. Please turn it on again before starting the measurement.", + + "remeasure": "Remeasure", + + "StableWeight": "Stable weight", + + "StableWeightText": "Your stable weight is :", + + "realTimeWeight": "Real-time weight", + + "realTimeWeightText": "Your real-time weight is :", + + "heightText": "Your height is", + + "zeroBtn": "Reset to zero", + + "LockBtn": "Lock", + + "SaveResult": "Save the result", + + "measureResultTips": "Measurement Result Prompts", + + "nowWeight": "The weight measured this time is", + + "lastHeight": "The last height measurement was:", + + "lastWeight": "The last measured weight was:", + + "nowHeight": "The height measured this time is:", + "lastHead": "The last measurement of head circumference was:", + + "errorOperation": "Operation error. Please remeasure." + + }, + "lung": { + "lungTitle": "Lung Capacity Test", + + "lungExplain0": "Lung capacity tests can help us better understand you and generate a detailed health report for you.", + + "lungsuction": "Inspiratory vital capacity", + + "lungsuctionspeed": "Inhalation speed", + + "averagelungsuction": "average suction vital capacity", + "isMarginal": "reach the standard", + "lungHello": "Hello!", + "lungfirst": "Hello!The first test begins", + "lungsecond": "Hello!The second test begins", + "lungthird": "Hello!The third test begins", + + "lungstart": "The test begins", + + "lungExplain1": "Put down the breathing trainer, exhale slowly and empty the air in your lungs as much as possible.", + + "lungExplain2": "Use the breathing trainer and inhale slowly until you reach your limit.", + + "lungExplain3": "Based on your personal information, your qualifying inspiratory vital capacity is", + + "nowlungsuctionspeed": "You are testing the inhalation speed this time", + + "lungresult": "Lung capacity test result", + + "lungExplain4": "Based on your physical condition and improvement goals, we will generate a detailed health report for you.", + + "lunglookreport": "View this Report", + "lunganewstart": "seconds later", + "Marginal": "Pass", + "oneNumberTips": "Please enter the first inhalation value", + + "twoNumberTips": "Please enter the second inhalation value.", + + "threeNumberTips": "Please enter the third inhalation value" + }, + "skip": { + "today_jump_num": "Today's number", + + "today_jump_time": "Today's duration", + + "today_jump_kcal": "kcal", + + "jumpFree": "Jump freely", + + "backwardCount": "Reverse count", + + "Countdown": "Countdown", + + "jumpFreedom": "Freedom", + + "instructStart": "Start", + + "jumpFreeDegree": "Free number of times", + + "jumpFreeNumber": "Number", + + "jumpTargetDegree": "number", + + "jumpUnlimited": "Unrestricted", + + "jumpTarget": "Adjust the target", + + "jumpTargetTime": "Target duration in minutes: seconds", + + "MinuteSecond": "time", + + "Consumed": "consume", + + "LongpressEnd": "Longpress end", + + "AverageSpeed": "average speed", + + "Unit": "Number per minute", + + "Numberofinterrupts": "Numberofinterrupts", + + "Times": "frequency", + + "LongestConsecutive": "longest continuum", + + "Number": "Number", + + "trainingsNumber": "Number", + + "complete": "Finished", + + "instructStart": "Start", + "instructContinuous": "Continuous", + + "instructStop": "Stop", + + "instructEnd": "end", + + "instructContinue": "Continue", + + "instructPause": "Pause", + + "linkBluetoothFail": "Connection disconnected", + + "deviceDisconnection": "The connection with the device was interrupted during training. Please reconnect the device and start training again.", + + "ToggleTrainingsTips": "Do not switch training during the training process. Return to training.", + + "NOComplete": "If the rope skipping time this time is less than 10 seconds, will the record not be saved?" + }, + "index.home": "Record", + + "index.bmi": "BMI Evaluation", + "index.Height": "Height", + "index.skipping": "Intelligent skipping", + "index.vitalcapacity": "vital capacity", + "index.contrast": "contrast", + + "index.none": "No data available for now", + + "index.body": "Body report", + + "index.BodyScore": "Body score", + + "index.BodyType": "Body type", + + "index.otherData": "Other data", + + "index.dataReference": "Data Reference", + + "index.referencetips": "This measurement data is for reference only and cannot replace medical professional tests!", + + "index.number": "score", + + "index.no": "None", + + "index.growthAdvice": "growthAdvice", + + "index.nutrition": "nutrition", + + "index.sleep": "sleep", + + "index.movement": "movement", + + "index.emotion": "mood", + + "index.card": "Card data", + + "index.cardSet": "Set the data page card", + + "index.manualRecording": "Manual recording", + + "index.notice": "Announcement", + + "index.browse": "Page views", + + "index.Standard": "Standard value", + + "bmi.desc": "BMI stands for Body Mass Index, which is currently a commonly used international standard for measuring the degree of fatness or thinness of the human body and whether it is healthy.", + "inheritHeighet.title": "Adult Height Prediction", + + "inheritHeighet.dad": "Dad's height", + + "inheritHeighet.mom": "Mom's height", + + "inheritHeighet.geneticheight": "Standard height", + + "inheritHeighet.adultheight": "Adult height", + + "inheritHeighet.tips0": "To ensure the accuracy of the data, please fill in the true information carefully.", + + "inheritHeighet.tips1": "If the current actual height is less than the current standard height", + + "inheritHeighet.tips2": "Children grow taller in an unfavorable environment after birth. Please check from aspects such as diet, sleep, exercise and mood. Strengthen the management of postnatal factors to keep children in the best growth state.", + + "inheritHeighet.tips3": "If the current actual height is greater than the current standard height", + + "inheritHeighet.tips4": "A child's postnatal growth environment is conducive to their growth in height. Please continue to maintain and strengthen the management of acquired factors. When the child reaches adulthood, they can be more than 10cm taller than the standard.", + + "contrast.time": "time (days)", + "index.ideal": "ideal", + + "contrast.weightdiff": "reduce weight", + + "contrast.weightdiffAugment": "weight", + + "contrast.fatWdiff": "reduce fat", + + "contrast.fatWdiffAugment": "Fat Gain", + + "contrast.changeData": "Data change", + + "contrast.trend": "trend", + + "contrast.before": "before", + + "contrast.after": "after", + + "body.target_weight": "Target weight", + + "body.cumulative_weight": "Cumulative weight loss", + + "body.initial_weight": "Initial weight", + + "body.cumulative_day": "Days of weight loss", + + "chartsDay": "That day", + + "chartsMonth": "Monthly", + + "chartsYear": "Annual", + + "recordType": "Project", + + "recordTime": "Duration", + + "recordNumber": "number", + "recordNumberFirst": "firstTime", + + "recordNumberSecond": "secondTime", + + "recordNumberThird": "thirdTime" +} \ No newline at end of file diff --git a/locale/zh.json b/locale/zh.json index 4fdd2b2d..23c037a9 100644 --- a/locale/zh.json +++ b/locale/zh.json @@ -1,16 +1,4 @@ { - "language": { - "zh": "中文", - "en": "英语", - "es": "西班牙语", - "fr": "法语", - "pt": "葡萄牙语", - "dh": "阿拉伯语", - "ru": "俄语", - "de": "德语", - "nowlanguage": "中文", - "confirmcontent": "确认切换该语言吗" - }, "tips": { "msgTitle": "友情提示", "msgResetData": "数据重置中", @@ -106,6 +94,7 @@ "titleConfirmPassword": "确认密码", "titleForgotPassword": "忘记密码", "titleCode": "验证码", + "titleLanguage": "语言设置", "titleSendCode": "获取验证码", "titleSendCodeRetry": "S后重发", "titleLogin": "登录", @@ -171,17 +160,19 @@ "offBluetooth": "蓝牙已关闭,请重新打开蓝牙后再开始测量", "remeasure": "重新测量", "StableWeight": "稳定重量", - "StableWeightText": "您的稳定体重是", + "StableWeightText": "您的稳定体重是:", "realTimeWeight": "实时重量", - "realTimeWeightText": "您的实时体重是", + "realTimeWeightText": "您的实时体重是:", "heightText": "您的身高是", "zeroBtn": "清零", "LockBtn": "锁定", "SaveResult": "保存结果", "measureResultTips": "测量结果提示", "nowWeight": "本次测量体重是", - "lastHeight": "上次测量身高是", - "lastHead": "上次测量头围是", + "lastHeight": "上次测量身高是:", + "lastWeight": "上次测量体重是:", + "nowHeight": "本次测量身高是:", + "lastHead": "上次测量头围是:", "errorOperation": "操作错误,请重新测量" }, "lung": { @@ -191,7 +182,7 @@ "lungsuctionspeed": "吸气速度", "averagelungsuction": "平均吸气肺活量", "isMarginal": "是否达标", - "lungHello": "您好!第", + "lungHello": "您好", "lungstart": "次测试开始", "lungExplain1": "放下呼吸训练器,缓慢呼气,尽可能排空肺部气体", "lungExplain2": "使用呼吸训练器,缓慢吸气,直至到达极限", @@ -200,8 +191,11 @@ "lungresult": "肺活量测试结果", "lungExplain4": "结合您的身体状态和改善目标,我们将为您生成详细的健康报告", "lunglookreport": "查看本次报告", - "lunganewstart": "S后第", + "lunganewstart": "秒后", "Marginal": "及格", + "lungfirst": "您好,第一次测试开始", + "lungsecond": "您好,第二次测试开始", + "lungthird": "您好,第三次测试开始", "oneNumberTips": "请输入第一次吸气值", "twoNumberTips": "请输入第二次吸气值", "threeNumberTips": "请输入第三次吸气值" @@ -220,12 +214,12 @@ "jumpUnlimited": "无限制", "jumpTarget": "调整目标", "jumpTargetTime": "目标时长 分:秒", - "MinuteSecond ": "分:秒", + "MinuteSecond": "分:秒", "Consumed": "消耗", "LongpressEnd": "长按结束", - "AverageSpeed ": "平均速度", + "AverageSpeed": "平均速度", "Unit": "个/分钟", - "Numberofinterrupts ": "中断次数", + "Numberofinterrupts": "中断次数", "Times": "次", "LongestConsecutive": "最长连续", "Number": "个", @@ -249,10 +243,13 @@ "index.body": "身体报告", "index.BodyScore": "身体得分", "index.BodyType": "身体类型", - "index.otherData ": "其他数据", + "index.bmi": "BMI测评", + "index.otherData": "其他数据", "index.dataReference": "数据参考", "index.referencetips": "此测量数据仅供参考,不可代替医学专业测试!", - "index.growthAdvice ": "成长建议", + "index.number": "分", + "index.no": "无", + "index.growthAdvice": "成长建议", "index.nutrition": "营养", "index.sleep": "睡眠", "index.movement": "运动", @@ -262,6 +259,8 @@ "index.manualRecording": "手动记录", "index.notice": "公告", "index.browse": "浏览量", + "index.Standard": "标准值", + "index.ideal": "当前年龄段理想", "bmi.desc": "BMI是身体质量指数,是目前国际上常用的衡量人体胖瘦程度以及是否健康的一个标准", "inheritHeighet.title": "成年身高预测", "inheritHeighet.dad": "爸爸身高", @@ -291,5 +290,8 @@ "chartsYear": "年度", "recordType": "项目", "recordTime": "时长", - "recordNumber": "个数" + "recordNumber": "个数", + "recordNumberFirst": "第一次", + "recordNumberSecond": "第二次", + "recordNumberThird": "第三次" } \ No newline at end of file diff --git a/main.js b/main.js index b02db5a0..40b5a4bd 100644 --- a/main.js +++ b/main.js @@ -18,7 +18,7 @@ Vue.prototype.$model = model; // 语言 let i18nConfig = { - locale: uni.getLocale(), + locale: uni.getStorageSync('language'), messages } diff --git a/pageTwo/compk/contrast.vue b/pageTwo/compk/contrast.vue index 5bd99608..229a4680 100644 --- a/pageTwo/compk/contrast.vue +++ b/pageTwo/compk/contrast.vue @@ -62,6 +62,11 @@ components: { RenCalendar, }, + onReady() { + uni.setNavigationBarTitle({ + title: this.$t('common.titleContrast'), + }) + }, computed: { ...mapState(["user", "TrendPk", "appTheme"]), length() { diff --git a/pageTwo/compk/pkdetail.vue b/pageTwo/compk/pkdetail.vue index e4e4be45..f68bd5ff 100644 --- a/pageTwo/compk/pkdetail.vue +++ b/pageTwo/compk/pkdetail.vue @@ -91,6 +91,11 @@ that.handleSharepic(JSON.parse(options.info)) } }, + onReady() { + uni.setNavigationBarTitle({ + title: this.$t('common.titleDetail'), + }) + }, computed: { ...mapState(["user", "appTheme"]), }, diff --git a/pageTwo/devices/B20.vue b/pageTwo/devices/B20.vue index 929a1558..b6c0fac3 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("linkBluetooth.StableWeight"):$t("linkBluetooth.realTimeWeight")}} - 清零 - 锁定 + {{$t("linkBluetooth.zeroBtn")}} + {{$t("linkBluetooth.LockBtn")}} - 提示: - 1.请确定设备是开机状态 - 2.请确定手机蓝牙、位置信息已打开 + {{$t("tips.msgTitle")}}: + {{$t("linkBluetooth.onDeviceMeasureTips")}} + {{$t("linkBluetooth.openDeviceeMeasureTips")}} - 测量结果提示 + {{$t("linkBluetooth.measureResultTips")}} - 本次测量体重是:{{weight}}{{unit}} + {{$t("linkBluetooth.nowWeight")}}:{{weight}}{{unit}} - 上次测量身高是:cm + {{$t("linkBluetooth.lastHeight")}}:cm - 上次测量头围是:cm + {{$t("linkBluetooth.lastHead")}}:cm - 重新测量 - 保存结果 + {{$t("linkBluetooth.remeasure")}} + {{$t("linkBluetooth.SaveResult")}} @@ -99,14 +99,14 @@ isConnected: function() { let that = this if (!that.isConnected) { - let text = '测量过程中已与设备连接中断,请重新连接设备再开始测量' + let text = that.$t("linkBluetooth.deviceDisconnection") that.$tools.showModal(text) } }, isBluetoothTyle: function() { let that = this if (!that.isBluetoothTyle) { - let text = '蓝牙已关闭,请重新打开蓝牙后再开始测量' + let text = that.$t("linkBluetooth.offBluetooth") that.$tools.showModal(text) } }, @@ -131,13 +131,13 @@ uni.createBLEConnection({ deviceId: that.deviceId, success: res => { - that.textLink = "蓝牙连接中" + that.textLink = that.$t("linkBluetooth.linkBluetooth") setTimeout(function() { that.getBLEDeviceServices() }, 1000) }, fail: res => { - that.textLink = "设备连接失败,返回首页重新连接" + that.textLink = that.$t("linkBluetooth.linkBluetoothFail") console.log("设备连接失败,请重新连接", res, that.deviceId); } }); @@ -164,7 +164,7 @@ } }, fail: res => { - that.textLink = "设备连接失败,返回首页重新连接" + that.textLink =that.$t("linkBluetooth.linkBluetoothFail") console.log('获取设备的UUID失败:', res) } }); @@ -188,7 +188,7 @@ that.writeBLECharacteristicValue("A6020500076A") // 清零 } } - that.textLink = "蓝牙连接成功,请开始测量" + that.textLink = that.$t("linkBluetooth.linkBluetoothSuccess") uni.notifyBLECharacteristicValueChange({ deviceId: that.deviceId, serviceId: that.serviceId, @@ -328,7 +328,7 @@ handleGetMeasure() { let that = this if (!that.height) { - this.$tools.msg("请输入身高") + this.$tools.msg(that.$t("tips.verifyHeight")) return } that.$model.getmeasurefunit({ @@ -347,9 +347,9 @@ that.$store.dispatch('getUserInfo', { aud_id: uni.getStorageSync('userid') }) - that.$tools.msg("测量成功") + that.$tools.msg(that.$t("tips.msgSuccess")) } else { - that.$tools.msg("测量失败") + that.$tools.msg(that.$t("tips.msgFail")) } that.Unload = true uni.switchTab({ @@ -376,7 +376,7 @@ success: res => { console.log('下发指令成功', res.errMsg) uni.showToast({ - title: '数据重置中', + title:that.$t("tips.msgResetData"), icon: "none" }) console.log("重置", that.typeInfo, that.weight) diff --git a/pageTwo/devices/G02.vue b/pageTwo/devices/G02.vue index a97e7e5c..18ce64d4 100644 --- a/pageTwo/devices/G02.vue +++ b/pageTwo/devices/G02.vue @@ -7,24 +7,25 @@ - 提示: - 1.请确定设备已开机 - 2.请确定手机蓝牙及位置信息已打开 + {{$t("tips.msgTitle")}}: + {{$t("linkBluetooth.onDeviceMeasureTips")}} + {{$t("linkBluetooth.openDeviceeMeasureTips")}} - 测量结果提示 + {{$t("linkBluetooth.measureResultTips")}} - 本次测量身高为:{{height}}{{unit}} + {{$t('linkBluetooth.nowHeight')}}:{{height}}{{unit}} - 上次测量体重为:kg + {{$t('linkBluetooth.lastWeight')}}:kg - 重新测量 - 保存测量结果 + {{$t("linkBluetooth.remeasure")}} + {{$t("linkBluetooth.SaveResult")}} @@ -83,14 +84,14 @@ isConnected: function() { let that = this if (!that.isConnected) { - let text = '测量过程中已与设备连接中断,请重新连接设备再开始测量' + let text = that.$t("linkBluetooth.deviceDisconnection") that.$tools.showModal(text) } }, isBluetoothTyle: function() { let that = this if (!that.isBluetoothTyle) { - let text = '蓝牙已关闭,请重新打开蓝牙后再开始测量' + let text = that.$t("linkBluetooth.offBluetooth") that.$tools.showModal(text) } }, @@ -102,13 +103,13 @@ uni.createBLEConnection({ deviceId: that.deviceId, success: res => { - that.textLink = "蓝牙连接中" + that.textLink = that.$t("linkBluetooth.linkBluetooth") setTimeout(function() { that.getBLEDeviceServices() }, 1000) }, fail: res => { - that.textLink = "设备连接失败,返回首页重新连接" + that.textLink = that.$t("linkBluetooth.linkBluetoothFail") console.log("设备连接失败,请重新连接", res, that.deviceId); } }); @@ -135,7 +136,7 @@ } }, fail: res => { - that.textLink = "设备连接失败,返回首页重新连接" + that.textLink = that.$t("linkBluetooth.linkBluetoothFail") console.log('获取设备的UUID失败:', res) } }); @@ -158,7 +159,7 @@ that.write = item.uuid } } - that.textLink = "蓝牙连接成功,请开始测量" + that.textLink = that.$t("linkBluetooth.linkBluetoothSuccess") uni.notifyBLECharacteristicValueChange({ deviceId: that.deviceId, serviceId: that.serviceId, @@ -208,7 +209,7 @@ that.unit = "ft" } if (Number(data) < 20) { - that.text = "操作错误,请重新测量" + that.text = that.$t("linkBluetooth.errorOperation") } else { if (unit == "2") { let data1 = data / 12 @@ -219,7 +220,7 @@ that.height2 = data that.height = data } - that.text = "您的身高是:" + that.height + that.unit + that.text = that.$t("linkBluetooth.heightText") + that.height + that.unit that.isHeight = true } console.log("G02", value, unit, data, that.height, that.height2) @@ -235,7 +236,7 @@ let that = this let height = 0 if (!that.weight) { - that.$tools.msg("请输入体重") + that.$tools.msg(that.$t("tips.verifyWeight")) return } if (that.unit == 'ft') { @@ -258,9 +259,9 @@ that.$store.dispatch('getUserInfo', { aud_id: uni.getStorageSync('userid') }) - that.$tools.msg("测量成功") + that.$tools.msg(that.$t("tips.msgSuccess")) } else { - that.$tools.msg("测量失败") + that.$tools.msg(that.$t("tips.msgFail")) } that.Unload = true uni.switchTab({ diff --git a/pageTwo/devices/PCL.vue b/pageTwo/devices/PCL.vue index 2833b60e..f2bd677c 100644 --- a/pageTwo/devices/PCL.vue +++ b/pageTwo/devices/PCL.vue @@ -1,30 +1,31 @@