英语版

This commit is contained in:
qiaocl 2025-04-26 13:35:30 +08:00
parent 323810464b
commit 5b0c7348a6
260 changed files with 11583 additions and 8072 deletions

29
App.vue
View File

@ -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: '请退出并移除小程序,重新打开...',
})
})
}
},
}
}
</script>

View File

@ -2,12 +2,12 @@
<view class="wrapper" v-if="isRecord">
<view class="bg" @click="onTap">
<view class="edit" @click.stop>
<view class="title">手动记录</view>
<view class="title">{{$t("index.manualRecording")}}</view>
<view class="editem">
<view class="left">日期</view>
<view class="left">{{$t('common.titleDate')}}</view>
<view class="right">
<picker mode="date" :end="endDate" @change="changeLog" :fields="fields">
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
<view class="uni-input">{{regTime?regTime:$t('tips.verifyPicker')}}</view>
<icon class="iconfont icon-arrow-down-bold"></icon>
</picker>
</view>
@ -15,10 +15,10 @@
<view v-if="rtype!=8&&rtype!=2">
<!-- 项目 -->
<view class="editem" v-if="info&&info.list.length">
<view class="left">项目</view>
<view class="left">{{$t('recordType')}}</view>
<view class="right">
<picker :range="info.list" range-key="name" :value="lableTndex" @change="bindLableChange">
<view class="uni-input">{{name?name:'请选择'}}</view>
<view class="uni-input">{{name?name:$t('tips.verifyPicker')}}</view>
<icon class="iconfont icon-arrow-down-bold"></icon>
</picker>
</view>
@ -28,75 +28,78 @@
<view class="name">{{describe}}</view>
<view class="right" v-if="listType==4">
<picker mode="multiSelector" :range="timeList" :value="timesTndex" @change="bindTimeChange">
<view class="size16">{{time_m?time_m+':':'请选择'}}{{time_s?time_s:''}}</view>
<view class="size16">{{time_m?time_m+':':$t('tips.verifyPicker')}}{{time_s?time_s:''}}
</view>
</picker>
<uni-icons type="bottom" class="ml-15 c666"></uni-icons>
</view>
<view class="right" v-if="listType!=4">
<input :type="listType==1?'number':'digit'" v-model="number" placeholder="请输入">
<input :type="listType==1?'number':'digit'" v-model="number"
:placeholder="$t('tips.verifyRecord')">
{{unit}}
</view>
</view>
<view class="editem" v-if="info&&info.time">
<view class="name">时长</view>
<view class="name">{{$t('recordTime')}}</view>
<view class="right">
<picker mode="multiSelector" :range="timeList" :value="timesTndex" @change="bindTimeChange">
<view class="size16">{{time_m?time_m+':':'请选择'}}{{time_s?time_s:''}}</view>
<view class="size16">{{time_m?time_m+':':$t('tips.verifyPicker')}}{{time_s?time_s:''}}
</view>
</picker>
<uni-icons type="bottom" class="ml-15 c666"></uni-icons>
</view>
</view>
<view class="editem" v-if="info&&info.number">
<view class="name">个数</view>
<view class="name">{{$t('recordNumber')}}</view>
<view class="right">
<input type="number" v-model="number" placeholder="请输入">
<input type="number" v-model="number" :placeholder="$t('tips.verifyRecord')">{{$t('skip.Number')}}
</view>
</view>
</view>
<!-- 身体 -->
<view class="" v-if="rtype==2">
<view class="editem" v-if="info&&info.height">
<view class="name">身高</view>
<view class="name">{{$t('common.infoHeight')}}</view>
<view class="right">
<input type="digit" v-model="height" placeholder="请输入身高" />cm
<input type="digit" v-model="height" :placeholder="$t('tips.verifyRecord')" />cm
</view>
</view>
<view class="editem" v-if="info&&info.weight">
<view class="name">体重</view>
<view class="name">{{$t('common.infoWeight')}}</view>
<view class="right">
<input type="digit" v-model="weight" placeholder="请输入体重">kg
<input type="digit" v-model="weight" :placeholder="$t('tips.verifyRecord')">kg
</view>
</view>
<view class="editem" v-if="userInfo.stage=='婴儿'">
<view class="left">头围</view>
<view class="left">{{$t('common.infoHead')}}</view>
<view class="right">
<input v-model="head" type="digit" placeholder="请输入" />cm
<input v-model="head" type="digit" :placeholder="$t('tips.verifyRecord')" />cm
</view>
</view>
</view>
<!-- 肺活量 -->
<view class="" v-if="rtype==8">
<view class="editem">
<view class="name">第一次</view>
<view class="name">{{$t('recordNumberFirst')}}</view>
<view class="right">
<input type="digit" v-model="number1" placeholder="请输入">ml
<input type="digit" v-model="number1" :placeholder="$t('tips.verifyRecord')">ml
</view>
</view>
<view class="editem">
<view class="name">第二次</view>
<view class="name">{{$t('recordNumberSecond')}}</view>
<view class="right">
<input type="digit" v-model="number2" placeholder="请输入">ml
<input type="digit" v-model="number2" :placeholder="$t('tips.verifyRecord')">ml
</view>
</view>
<view class="editem">
<view class="name">第三次</view>
<view class="name">{{$t('recordNumberThird')}}</view>
<view class="right">
<input type="digit" v-model="number3" placeholder="请输入">ml
<input type="digit" v-model="number3" :placeholder="$t('tips.verifyRecord')">ml
</view>
</view>
</view>
<view class="btn close" @click="onTap()">取消</view>
<view class="btn" @click="handleTarget">确定</view>
<view class="btn close" @click="onTap()">{{$t("tips.btnSancellation")}}</view>
<view class="btn" @click="handleTarget">{{$t("tips.btnConfirm")}}</view>
</view>
</view>
</view>
@ -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({

View File

@ -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"
}

View File

@ -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": "第三次"
}

View File

@ -18,7 +18,7 @@ Vue.prototype.$model = model;
// 语言
let i18nConfig = {
locale: uni.getLocale(),
locale: uni.getStorageSync('language'),
messages
}

View File

@ -62,6 +62,11 @@
components: {
RenCalendar,
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titleContrast'),
})
},
computed: {
...mapState(["user", "TrendPk", "appTheme"]),
length() {

View File

@ -91,6 +91,11 @@
that.handleSharepic(JSON.parse(options.info))
}
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titleDetail'),
})
},
computed: {
...mapState(["user", "appTheme"]),
},

View File

@ -6,34 +6,34 @@
<view>
<text class="weight">{{weight?weight:'0.00'}}</text>{{unit}}
</view>
<view class="typeInfo" v-if="typeInfo!=0">{{typeInfo==2?'稳定重量':'实时重量'}}</view>
<view class="typeInfo" v-if="typeInfo!=0">{{typeInfo==2?$t("linkBluetooth.StableWeight"):$t("linkBluetooth.realTimeWeight")}}</view>
</view>
<view class="btnGroup" v-if="isSave">
<view :class="[IsLing?'disabled':'btnClose']" @click="handleIsLing">清零</view>
<view class="baocun" @click="handleIsNum">锁定</view>
<view :class="[IsLing?'disabled':'btnClose']" @click="handleIsLing">{{$t("linkBluetooth.zeroBtn")}}</view>
<view class="baocun" @click="handleIsNum">{{$t("linkBluetooth.LockBtn")}}</view>
</view>
<view class="tips">
<text>提示</text>
<text>1.请确定设备是开机状态</text>
<text>2.请确定手机蓝牙位置信息已打开</text>
<text>{{$t("tips.msgTitle")}}:</text>
<text>{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
<text>{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
</view>
</view>
<!-- 手动记录 -->
<view class="wrapper" v-if="isHeight">
<view class="bg"></view>
<view class="Blue">
<view class="h4">测量结果提示</view>
<view class="h4">{{$t("linkBluetooth.measureResultTips")}}</view>
<view class="Blue-box">
本次测量体重是<text>{{weight}}{{unit}}</text>
{{$t("linkBluetooth.nowWeight")}}<text>{{weight}}{{unit}}</text>
</view>
<view class="Blue-box">
上次测量身高是<input v-model="height" type="digit" placeholder="请输入身高" />cm
{{$t("linkBluetooth.lastHeight")}}<input v-model="height" type="digit" :placeholder="$t('tips.verifyHeight')" />cm
</view>
<view class="Blue-box" v-if="userInfo.stage=='婴儿'">
上次测量头围是<input v-model="head" type="digit" placeholder="请输入头围" />cm
{{$t("linkBluetooth.lastHead")}}<input v-model="head" type="digit" :placeholder="$t('tips.verifyHead')" />cm
</view>
<view class="Blue-btn Blue-close" @click="handleBack">重新测量</view>
<view class="Blue-btn" @click="handleGetMeasure">保存结果</view>
<view class="Blue-btn Blue-close" @click="handleBack">{{$t("linkBluetooth.remeasure")}}</view>
<view class="Blue-btn" @click="handleGetMeasure">{{$t("linkBluetooth.SaveResult")}}</view>
</view>
</view>
</view>
@ -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)

View File

@ -7,24 +7,25 @@
<image src="/pageTwo/static/HC.png" class="image3"></image>
</view>
<view class="tips">
<view>提示</view>
<text>1.请确定设备已开机</text>
<text>2.请确定手机蓝牙及位置信息已打开</text>
<text>{{$t("tips.msgTitle")}}:</text>
<text>{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
<text>{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
</view>
</view>
<!-- 手动记录 -->
<view class="wrapper" v-if="isHeight">
<view class="bg"></view>
<view class="Blue">
<view class="h4">测量结果提示</view>
<view class="h4">{{$t("linkBluetooth.measureResultTips")}}</view>
<view class="Blue-box">
本次测量身高为<text>{{height}}{{unit}}</text>
{{$t('linkBluetooth.nowHeight')}}<text>{{height}}{{unit}}</text>
</view>
<view class="Blue-box">
上次测量体重为<input v-model="weight" type="digit" placeholder="请输入体重" />kg
{{$t('linkBluetooth.lastWeight')}}<input v-model="weight" type="digit"
:placeholder="$t('tips.verifyWeight')" />kg
</view>
<view class="Blue-btn Blue-close" @click="handleHeight">重新测量</view>
<view class="Blue-btn" @click="handleGetMeasure">保存测量结果</view>
<view class="Blue-btn Blue-close" @click="handleHeight">{{$t("linkBluetooth.remeasure")}}</view>
<view class="Blue-btn" @click="handleGetMeasure">{{$t("linkBluetooth.SaveResult")}}</view>
</view>
</view>
</view>
@ -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({

View File

@ -1,30 +1,31 @@
<template>
<view class="weightPages">
<view class="content ">
<view class="title">连接成功开始测量</view>
<view class="title">{{$t("linkBluetooth.linkBluetoothSuccess")}}</view>
<view class="text">{{text}}</view>
<view class="image">
<image src="/pageTwo/static/PCL.gif" class="image3"></image>
</view>
<view class="tips">
<view>提示</view>
<text>1.请确定设备已开机</text>
<text>2.请确定手机蓝牙及位置信息已打开</text>
<text>{{$t("tips.msgTitle")}}:</text>
<text>{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
<text>{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
</view>
</view>
<!-- 手动记录 -->
<view class="wrapper" v-if="isHeight">
<view class="bg"></view>
<view class="Blue">
<view class="h4">测量结果提示</view>
<view class="h4">{{$t("linkBluetooth.measureResultTips")}}</view>
<view class="Blue-box">
本次测量体重为<text>{{weight}}{{unit}}</text>
{{$t("linkBluetooth.nowWeight")}}<text>{{weight}}{{unit}}</text>
</view>
<view class="Blue-box">
上次测量身高为<input v-model="height" type="digit" placeholder="请输入身高" />cm
{{$t("linkBluetooth.lastHeight")}}
<input v-model="height" type="digit" :placeholder="$t('tips.verifyHeight')" />cm
</view>
<view class="Blue-btn Blue-close" @click="handleBack">取消</view>
<view class="Blue-btn" @click="handleGetMeasure">保存测量结果</view>
<view class="Blue-btn Blue-close" @click="handleBack">{{$t("tips.btnSancellation")}}</view>
<view class="Blue-btn" @click="handleGetMeasure">{{$t("linkBluetooth.SaveResult")}}</view>
</view>
</view>
</view>
@ -120,9 +121,9 @@
data = data / 100
}
}
that.text = "您的实时体重是:" + data + that.unit
that.text = that.$t("linkBluetooth.realTimeWeightText") + data + that.unit
if (type == "1") {
that.text = "您的稳定体重是:" + data + that.unit
that.text = that.$t("linkBluetooth.StableWeightText") + data + that.unit
that.imp = parseInt(value.substring(8, 12), 16) / 10
that.deviceId = device.deviceId
that.weight = data
@ -162,7 +163,7 @@
handleGetMeasure() {
let that = this
if (!that.height) {
this.$tools.msg("请输入身高")
this.$tools.msg(that.$t("tips.verifyHeight"))
return
}
that.$model.getmeasurefunit({
@ -180,9 +181,9 @@
that.$store.dispatch("getResult", {
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
setTimeout(function() {

View File

@ -1,30 +1,31 @@
<template>
<view class="weightPages">
<view class="content ">
<view class="title">连接成功开始测量</view>
<view class="title">{{$t("linkBluetooth.linkBluetoothSuccess")}}</view>
<view class="text">{{text}}</view>
<view class="image">
<image src="/pageTwo/static/PCL.gif" class="image3"></image>
</view>
<view class="tips">
<view>提示</view>
<text>1.请确定设备已开机</text>
<text>2.请确定手机蓝牙及位置信息已打开</text>
<text>{{$t("tips.msgTitle")}}:</text>
<text>{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
<text>{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
</view>
</view>
<!-- 手动记录 -->
<view class="wrapper" v-if="isHeight">
<view class="bg"></view>
<view class="Blue">
<view class="h4">测量结果提示</view>
<view class="h4">{{$t("linkBluetooth.measureResultTips")}}</view>
<view class="Blue-box">
本次测量体重为<text>{{weight}}{{unit}}</text>
{{$t("linkBluetooth.nowWeight")}}<text>{{weight}}{{unit}}</text>
</view>
<view class="Blue-box">
上次测量身高为<input v-model="height" type="digit" placeholder="请输入身高" />cm
{{$t("linkBluetooth.lastHeight")}}<input v-model="height" type="digit"
:placeholder="$t('tips.verifyHeight')" />cm
</view>
<view class="Blue-btn Blue-close" @click="handleBack">取消</view>
<view class="Blue-btn" @click="handleGetMeasure">保存测量结果</view>
<view class="Blue-btn Blue-close" @click="handleBack">{{$t("tips.btnSancellation")}}</view>
<view class="Blue-btn" @click="handleGetMeasure">{{$t("linkBluetooth.SaveResult")}}</view>
</view>
</view>
</view>
@ -130,14 +131,15 @@
if (status == "0") {
that.typeInfo = 0
that.stopblue = false
that.text = "您的实时体重是:" + weight + that.unit
that.text = that.$t("linkBluetooth.realTimeWeightText") + weight + that
.unit
}
if (status == "1") {
if (type == '1') {
that.imp = parseInt(value.substring(8, 12), 16) / 10
}
that.typeInfo = 1
that.text = "您的稳定体重是:" + weight + that.unit
that.text = that.$t("linkBluetooth.StableWeightText") + weight + that.unit
that.weight = weight
that.stopblue = true
console.log("测量完成", that.weight)
@ -175,7 +177,7 @@
handleGetMeasure() {
let that = this
if (!that.height) {
this.$tools.msg("请输入身高")
this.$tools.msg(that.$t("tips.verifyHeight"))
return
}
that.$model.getmeasurefunit({
@ -193,9 +195,9 @@
that.$store.dispatch("getResult", {
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
setTimeout(function() {

View File

@ -1,30 +1,30 @@
<template>
<view class="weightPages">
<view class="content ">
<view class="title">连接成功开始测量</view>
<view class="title">{{$t("linkBluetooth.linkBluetoothSuccess")}}</view>
<view class="text">{{text}}</view>
<view class="image">
<image src="/pageTwo/static/PCL.gif" class="image3"></image>
</view>
<view class="tips">
<view>提示</view>
<text>1.请确定设备已开机</text>
<text>2.请确定手机蓝牙及位置信息已打开</text>
<text>{{$t("tips.msgTitle")}}:</text>
<text>{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
<text>{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
</view>
</view>
<!-- 手动记录 -->
<view class="wrapper" v-if="isHeight">
<view class="bg"></view>
<view class="Blue">
<view class="h4">测量结果提示</view>
<view class="h4">{{$t("linkBluetooth.measureResultTips")}}</view>
<view class="Blue-box">
本次测量体重为<text>{{weight}}{{unit}}</text>
{{$t("linkBluetooth.nowWeight")}}<text>{{weight}}{{unit}}</text>
</view>
<view class="Blue-box">
上次测量身高为<input v-model="height" type="digit" placeholder="请输入身高" />cm
{{$t("linkBluetooth.lastHeight")}}<input v-model="height" type="digit" :placeholder="$t('tips.verifyHeight')" />cm
</view>
<view class="Blue-btn Blue-close" @click="handleBack">取消</view>
<view class="Blue-btn" @click="handleGetMeasure">保存测量结果</view>
<view class="Blue-btn Blue-close" @click="handleBack">{{$t("tips.btnSancellation")}}</view>
<view class="Blue-btn" @click="handleGetMeasure">{{$t("linkBluetooth.SaveResult")}}</view>
</view>
</view>
</view>
@ -111,11 +111,11 @@
if (type == "d") {
that.typeInfo = 0
that.stopblue = false
that.text = "您的实时体重是:" + weight + 'kg'
that.text = that.$t("linkBluetooth.realTimeWeightText") + weight + 'kg'
}
if (type == "e") {
that.typeInfo = 1
that.text = "您的稳定体重是:" + weight + 'kg'
that.text = that.$t("linkBluetooth.StableWeightText") + weight + 'kg'
that.imp = !isNaN(type2) ? parseInt(value.substring(6, 10), 16) : ''
that.weight = weight
that.stopblue = true
@ -154,7 +154,7 @@
handleGetMeasure() {
let that = this
if (!that.height) {
this.$tools.msg("请输入身高")
this.$tools.msg(that.$t("tips.verifyHeight"))
return
}
that.$model.getmeasurefunit({
@ -172,9 +172,9 @@
that.$store.dispatch("getResult", {
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
setTimeout(function() {

View File

@ -1,38 +1,41 @@
<template>
<view class="content skipping">
<!--自由训练 -->
<view class="title">{{info.active==1?'自由跳':info.active==2?'倒计时':'倒计数'}}</view>
<view class="title">
{{info.active==1?$t("skip.jumpFree"):info.active==2?$t("skip.Countdown"):$t("skip.backwardCount")}}</view>
<view class="skiptop">
<view class="item">
<view class="item-ite">{{info.active==1?'自由次数':info.active==2?"个数":'目标次数'}}<text>{{weight}}</text>
<view class="item-ite">
{{info.active==1?$t("skip.jumpFreeDegree"):info.active==2?$t("skip.jumpFreeNumber"):$t("skip.jumpTargetDegree")}}<text>{{weight}}</text>
</view>
<view class="item-ite">
{{info.active==2?'目标时长 分:秒':"分:秒"}}<text>{{time_m?time_m:'00'}}:{{time_s?time_s:'00'}}</text>
{{info.active==2?$t("skip.jumpTargetTime"):$t("skip.MinuteSecond")}}<text>{{time_m?time_m:'00'}}:{{time_s?time_s:'00'}}</text>
</view>
<view class="item-ite">消耗/kcal<text>{{Math.floor(kcal)}}</text></view>
<view class="item-ite">{{$t("skip.Consumed")}}/kcal<text>{{Math.floor(kcal)}}</text></view>
</view>
</view>
<view class="image">
<image src="/pageTwo/static/t01.gif"></image>
<image src="/pageTwo/static/t01.gif"></image>
</view>
<view class="end" @longpress="onlongpress">长按结束</view>
<view class="end" @longpress="onlongpress">{{$t("skip.LongpressEnd")}}</view>
<!-- 报告 -->
<view class="wrapper" v-if="iswrapper">
<view class="bg">
<view class="edit">
<view class="editem">
<view>平均速度<text class="cyello Blue size20 mr-5">{{bpm.toFixed(1)}}</text>bpm</view>
<view class="size12 c999 ">(bpm=/分钟)</view>
<view>{{$t("skip.AverageSpeed")}}<text
class="cyello Blue size20 mr-5">{{bpm.toFixed(1)}}</text>bpm</view>
<view class="size12 c999 ">(bpm={{$t("skip.Unit")}})</view>
</view>
<view class="center">
<view class="center" :class="[language== 'zh-Hans'?'':'center2']">
<view class="left">
<image src="/pageTwo/static/duan.png"></image>
<view class="name">
<view>
中断次数
{{$t("skip.Numberofinterrupts")}}
</view>
<view>
<text class="cyello Blue size20 mr-5">{{Bcount}}</text>
<text class="cyello Blue size20 mr-5">{{Bcount}}</text>{{$t("skip.Times")}}
</view>
</view>
</view>
@ -41,20 +44,21 @@
<image src="/pageTwo/static/xu.png"></image>
<view class="name">
<view>
最长连续
{{$t("skip.LongestConsecutive")}}
</view>
<view>
<text class="cyello Blue size20 mr-5">{{continuous}}</text>
<text class="cyello Blue size20 mr-5">{{continuous}}</text>{{$t("skip.Number")}}
</view>
</view>
</view>
</view>
<view class="item">
<view class="item-ite"><text>{{weight}}</text>训练个数</view>
<view class="item-ite"><text>{{time_m?time_m:'00'}}:{{time_s?time_s:'00'}}</text>:</view>
<view class="item-ite"><text>{{Math.floor(kcal)}}</text>消耗/kcal</view>
<view class="item-ite"><text>{{weight}}</text>{{$t("skip.trainingsNumber")}}</view>
<view class="item-ite">
<text>{{time_m?time_m:'00'}}:{{time_s?time_s:'00'}}</text>{{$t("skip.MinuteSecond")}}</view>
<view class="item-ite"><text>{{Math.floor(kcal)}}</text>{{$t("skip.Consumed")}}/kcal</view>
</view>
<view class="btn" @click="handleTarget">完成</view>
<view class="btn" @click="handleTarget">{{$t("skip.complete")}}</view>
</view>
</view>
</view>
@ -83,7 +87,8 @@
isToggle: false,
isEnd: false,
iswrapper: false,
isStart: false
isStart: false,
language: "",
}
},
computed: {
@ -91,162 +96,165 @@
},
onLoad(options) {
let that = this
innerAudioContext = uni.createInnerAudioContext()
if (options && options.info) {
let info = options.info
that.info = JSON.parse(info)
that.notifyBLECharacteristicValue()
setTimeout(function() {
that.handleStart('开始')
}, 900)
setTimeout(function() {
that.handleStart('连续')
}, 1200)
}
that.handleAudioStart()
that.$Bluetooth.onBLEConnectionStateChange()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
that.language = uni.getStorageSync('language')
// innerAudioContext = uni.createInnerAudioContext()
// if (options && options.info) {
// let info = options.info
// that.info = JSON.parse(info)
// that.notifyBLECharacteristicValue()
// setTimeout(function() {
// that.handleStart('')
// }, 900)
// setTimeout(function() {
// that.handleStart('')
// }, 1200)
// }
// that.handleAudioStart()
// that.$Bluetooth.onBLEConnectionStateChange()
// uni.onBluetoothAdapterStateChange(function(res) {
// that.$store.commit("changeBluetooth", res.available);
// })
},
onUnload: function() {
let that = this
if (innerAudioContext) {
innerAudioContext.destroy(); //
}
that.handleEnd()
console.log("PCT01返回onUnload")
// if (innerAudioContext) {
// innerAudioContext.destroy(); //
// }
// that.handleEnd()
// console.log("PCT01onUnload")
},
watch: {
isConnected: function() {
let that = this
if (!that.isConnected) {
uni.showModal({
title: '连接已断开',
content: '训练过程中已与设备连接中断,请重新连接设备再开始训练',
showCancel: false,
success: function(res) {
if (res.confirm) {
that.handleTarget()
}
}
})
console.log("蓝牙是否连接", that.isConnected)
}
// if (!that.isConnected) {
// uni.showModal({
// title: that.$t("tips.linkBluetoothFail"),
// content: that.$t("skip.deviceDisconnection"),
// showCancel: false,
// confirmText: that.$t('tips.btnConfirm'),
// success: function(res) {
// if (res.confirm) {
// that.handleTarget()
// }
// }
// })
// console.log("", that.isConnected)
// }
},
isBluetoothTyle: function() {
let that = this
if (!that.isBluetoothTyle) {
console.log("蓝牙是否打开", that.isBluetoothTyle)
}
// if (!that.isBluetoothTyle) {
// console.log("", that.isBluetoothTyle)
// }
},
//
isStart: function() {
let that = this
if (that.isStart) {
that.handleAudio()
}
// if (that.isStart) {
// that.handleAudio()
// }
},
//
isToggle: function() {
let that = this
if (that.isToggle) {
uni.showModal({
title: '友情提示',
content: '训练过程中请勿切换训练,返回训练',
showCancel: false,
success: function(res) {
if (res.confirm) {
setTimeout(function() {
that.handleStart('结束')
}, 400)
setTimeout(function() {
that.handleTarget()
}, 600)
}
}
})
}
// if (that.isToggle) {
// uni.showModal({
// title: that.$t("tips.msgTitle"),
// content: that.$t("skip.ToggleTrainingsTips"),
// showCancel: false,
// confirmText: that.$t('tips.btnConfirm'),
// success: function(res) {
// if (res.confirm) {
// setTimeout(function() {
// that.handleStart('')
// }, 400)
// setTimeout(function() {
// that.handleTarget()
// }, 600)
// }
// }
// })
// }
},
//
isEnd: function() {
let that = this
if (that.isEnd) {
setTimeout(function() {
that.handleStart('停止')
}, 200)
setTimeout(function() {
that.handleGetMeasure()
}, 400)
}
// if (that.isEnd) {
// setTimeout(function() {
// that.handleStart('')
// }, 200)
// setTimeout(function() {
// that.handleGetMeasure()
// }, 400)
// }
},
//
weight: function() {
let that = this
if (that.info.active == 1) {
that.$video.video.forEach(ite => {
if (Number(ite.name) == that.weight) {
innerAudioContext.autoplay = true;
innerAudioContext.loop = false;
innerAudioContext.src = ite.video;
innerAudioContext.play()
setTimeout(function() {
innerAudioContext.stop();
that.handleAudio()
}, 3000)
}
})
}
if (that.info.active == 2) {
let time = that.time_m * 60 + that.time_s
that.$video.video.forEach(ite => {
if ((Number(ite.name) == that.weight) && (Number(time) > 10)) {
innerAudioContext.autoplay = true;
innerAudioContext.loop = false;
innerAudioContext.src = ite.video;
innerAudioContext.play()
setTimeout(function() {
innerAudioContext.stop();
that.handleAudio()
}, 3000)
}
})
if (that.time_m == "00" && that.time_s == "10") {
innerAudioContext.autoplay = true;
innerAudioContext.loop = false;
innerAudioContext.src = '/pageTwo/static/time.mp3';
innerAudioContext.play()
setTimeout(function() {
innerAudioContext.stop();
that.handleAudio()
}, 3000)
}
}
if (that.info.active == 3) {
that.$video.video.forEach(ite => {
if ((Number(ite.name) == (Number(that.Ycount) - Number(that.weight))) && Number(that
.weight) != 0) {
innerAudioContext.autoplay = true;
innerAudioContext.loop = false;
innerAudioContext.src = ite.video;
innerAudioContext.play()
setTimeout(function() {
innerAudioContext.stop();
that.handleAudio()
}, 3000)
}
})
if (Number(that.weight) == 10) {
innerAudioContext.autoplay = true;
innerAudioContext.loop = false;
innerAudioContext.src = '/pageTwo/static/number.mp3';
innerAudioContext.play()
setTimeout(function() {
innerAudioContext.stop();
that.handleAudio()
}, 3000)
}
}
// if (that.info.active == 1) {
// that.$video.video.forEach(ite => {
// if (Number(ite.name) == that.weight) {
// innerAudioContext.autoplay = true;
// innerAudioContext.loop = false;
// innerAudioContext.src = ite.video;
// innerAudioContext.play()
// setTimeout(function() {
// innerAudioContext.stop();
// that.handleAudio()
// }, 3000)
// }
// })
// }
// if (that.info.active == 2) {
// let time = that.time_m * 60 + that.time_s
// that.$video.video.forEach(ite => {
// if ((Number(ite.name) == that.weight) && (Number(time) > 10)) {
// innerAudioContext.autoplay = true;
// innerAudioContext.loop = false;
// innerAudioContext.src = ite.video;
// innerAudioContext.play()
// setTimeout(function() {
// innerAudioContext.stop();
// that.handleAudio()
// }, 3000)
// }
// })
// if (that.time_m == "00" && that.time_s == "10") {
// innerAudioContext.autoplay = true;
// innerAudioContext.loop = false;
// innerAudioContext.src = '/pageTwo/static/time.mp3';
// innerAudioContext.play()
// setTimeout(function() {
// innerAudioContext.stop();
// that.handleAudio()
// }, 3000)
// }
// }
// if (that.info.active == 3) {
// that.$video.video.forEach(ite => {
// if ((Number(ite.name) == (Number(that.Ycount) - Number(that.weight))) && Number(that
// .weight) != 0) {
// innerAudioContext.autoplay = true;
// innerAudioContext.loop = false;
// innerAudioContext.src = ite.video;
// innerAudioContext.play()
// setTimeout(function() {
// innerAudioContext.stop();
// that.handleAudio()
// }, 3000)
// }
// })
// if (Number(that.weight) == 10) {
// innerAudioContext.autoplay = true;
// innerAudioContext.loop = false;
// innerAudioContext.src = '/pageTwo/static/number.mp3';
// innerAudioContext.play()
// setTimeout(function() {
// innerAudioContext.stop();
// that.handleAudio()
// }, 3000)
// }
// }
},
},
methods: {
@ -354,10 +362,10 @@
console.log('短震动');
if (Number(that.time) < 10) {
uni.showModal({
title: '友情提示',
content: '本次跳绳时间低于10秒记录将不会被保存',
confirmText: "继续",
cancelText: "返回",
title: that.$t("tips.msgTitle"),
content: that.$t("skip.NOComplete"),
cancelText: that.$t('tips.btnBack'),
confirmText: that.$t('tips.btnContinue'),
success: function(res) {
if (res.cancel) {
that.isStart = false

View File

@ -4,59 +4,60 @@
<view class="top">
<view class="left cgreen f-l">T</view>
<view class="right">
<text class="cgreen">肺活量测试</text>
<text class="text">肺活量测试能让我们更好的了解您为您生成详细的健康报告</text>
<text class="cgreen">{{$t("lung.lungTitle")}}</text>
<text class="text">{{$t("lung.lungExplain0")}}</text>
</view>
</view>
<view class="list">
<view class="item" v-if="number1">
<text class="ml-10 mr-10">1</text>
<text>吸气肺活量</text>
<text>{{$t("lung.lungsuction")}}</text>
<text class="cgreen">{{number1}}ml</text>
<text>吸气速度</text>
<text>{{$t("lung.lungsuctionspeed")}}</text>
<text class="cgreen level">{{level1}}</text>
</view>
<view class="item" v-if="number2">
<text class="ml-10 mr-10">2</text>
<text>吸气肺活量</text>
<text>{{$t("lung.lungsuction")}}</text>
<text class="cgreen">{{number2}}ml</text>
<text>吸气速度</text>
<text>{{$t("lung.lungsuctionspeed")}}</text>
<text class="cgreen level">{{level2}}</text>
</view>
<view class="item" v-if="number3">
<text class="ml-10 mr-10">3</text>
<text>吸气肺活量</text>
<text>{{$t("lung.lungsuction")}}</text>
<text class="cgreen">{{number3}}ml</text>
<text>吸气速度</text>
<text>{{$t("lung.lungsuctionspeed")}}</text>
<text class="cgreen level">{{level3}}</text>
</view>
</view>
<view class="title" v-if="number3==''">
<view :class="[second==5?'cgreen':'']">您好<text>{{number1!=0?'二':number2!=''?'三':'一'}}</text>次测试开始
<view :class="[second==5?'cgreen':'']">
{{number1!=0?$t("lung.lungsecond"):number2!=''?$t("lung.lungthird"):$t("lung.lungfirst")}}
</view>
<view :class="[second==3?'cgreen':'']">放下呼吸训练器缓慢呼气尽可能排空肺部气体</view>
<view :class="[second==1?'cgreen':'']">使用呼吸训练器缓慢吸气直至到达极限</view>
<view :class="[second==3?'cgreen':'']">{{$t("lung.lungExplain1")}}</view>
<view :class="[second==1?'cgreen':'']">{{$t("lung.lungExplain2")}}</view>
</view>
<view class="data" v-if="number3">
<view class="val">
<text>{{average.toFixed(2)}}ml</text>
平均吸气肺活量
{{$t("lung.averagelungsuction")}}
</view>
<view class="text">
根据您的个人信息您的达标吸气肺活量为{{standard}}ml您本次测试吸气速度{{averageS}}L/min,肺活量测试结果{{average.toFixed(2)}}ml结合您的身体状态和改善目标我们将为您生成详细的健康报告
{{$t("lung.lungExplain3")}}{{standard}}ml{{$t("lung.nowlungsuctionspeed")}}{{averageS}}L/min,{{$t("lung.lungresult")}}{{average.toFixed(2)}}ml{{$t("lung.lungExplain4")}}
</view>
</view>
<view class="btn" v-if="number3" @click="handleGetMeasure">查看本次报告</view>
<view class="btn close" v-if="number3" @click="isstart=true">我想重新测试</view>
<view class="btn" v-if="number3" @click="handleGetMeasure">{{$t("lung.lunglookreport")}}</view>
<view class="btn close" v-if="number3" @click="isstart=true">{{$t("lung.remeasure")}}</view>
<view class="btn" v-if="number1==0||number2==0||number3==0">
{{second}}S后开始第<text>{{number1!=0?'二':number2!=0?'三':'一'}}</text>次测试
{{second}}{{$t("lunganewstart")}}<text>{{number1!=0?$t("lung.lungsecond"):number2!=0?$t("lung.lungthird"):$t("lung.lungfirst")}}</text>
</view>
</view>
<!-- 开始测量 -->
<view class="weight" v-else>
<view class="title cgreen">使用呼吸训练器缓慢吸气直至到达极限</view>
<view class="title cgreen">{{$t("lung.lungExplain2")}}</view>
<view class="box1">
<view class="time">吸气速度 <text class="cgreen ml-5">{{LiuS}}L/min</text></view>
<view class="time">{{$t("lung.lungsuctionspeed")}}<text class="cgreen ml-5">{{LiuS}}L/min</text></view>
<view class="item">
<view class="image">
<!-- -->
@ -72,7 +73,7 @@
</view>
</view>
<view class="val">
<text>{{text}}ml</text>吸气肺活量
<text>{{text}}ml</text>{{$t("lung.averagelungsuction")}}
</view>
</view>
</view>
@ -222,7 +223,7 @@
that.startBluetoothDeviceDiscovery()
},
fail: e => {
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
that.$tools.msg(that.$t("linkBluetooth.onDeviceBluetoothTips"))
}
});
},
@ -236,7 +237,7 @@
that.onBluetoothDeviceFound();
},
fail: res => {
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
that.$tools.msg(that.$t("linkBluetooth.onDeviceBluetoothTips"))
}
});
},

View File

@ -68,10 +68,11 @@
background-color: #eee;
padding: 0 10px;
display: flex;
margin: 45px 0;
flex-wrap: wrap;
margin:45px 0;
font-size: 32rpx;
border-radius: 5px;
height: 65px;
// height: 65px;
align-items: center;
justify-content: space-between;
@ -83,14 +84,28 @@
}
.left {
display: flex;
align-content: center;
display: flex;
align-content: center;
padding-bottom: 10px;
}
.name {
margin-top: 15px;
}
}
.center2{
margin:10px 0;
background-color:#fff;
padding: 0 ;
.left{
width: 100%;
background: #eee;
padding: 0 10px 10px;
margin-bottom: 10px
}
}
.item {
display: flex;

View File

@ -56,6 +56,11 @@
that.getList()
console.log("options", options)
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titleHistory'),
})
},
onUnload() {
console.log('关闭页面');
let that = this

View File

@ -33,6 +33,11 @@
computed: {
...mapState([])
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titleDetail'),
})
},
onLoad(options) {
//
let that = this

View File

@ -33,7 +33,7 @@
<view class="right">
<picker mode="date" :value="PostData.birthday" :end="endDate" @change="bindDateChange"
:fields="fields">
<view class="text">{{PostData.birthday?PostData.birthday:$t('tips.verifyBirthday')}}</view>
<view class="text">{{PostData.birthday?PostData.birthday:$t('tips.verifyPicker')}}</view>
<icon class="iconfont icon-arrow-down-bold"></icon>
</picker>
</view>
@ -117,6 +117,11 @@
that.fields = "day"
// #endif
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titleBmi'),
})
},
methods: {
//
onsexArr(e) {

View File

@ -5,7 +5,7 @@
{{$t("inheritHeighet.tips0")}}
</view>
<view class="table">
<view class="tr">
<view class="tr" :class="[language=='zh-Hans'?'':'tr2']">
<view class="text">{{$t("common.infoGender")}}</view>
<view class="td">
<view class="radio">
@ -18,7 +18,7 @@
</view>
</view>
</view>
<view class="tr">
<view class="tr" :class="[language=='zh-Hans'?'':'tr2']">
<view class="text">{{$t("common.infoBirthday")}}</view>
<view class="td">
<picker mode="date" :end="endDate" @change="maskClick" :value="birthday?birthday:endDate"
@ -30,13 +30,13 @@
</picker>
</view>
</view>
<view class="tr">
<view class="tr" :class="[language=='zh-Hans'?'':'tr2']">
<view class="text">{{$t("inheritHeighet.dad")}}</view>
<view class="td">
<input class="input" type="digit" v-model="dadheight " :placeholder="$t('tips.verifyRecord')">cm
</view>
</view>
<view class="tr">
<view class="tr" :class="[language=='zh-Hans'?'':'tr2']">
<view class="text">{{$t("inheritHeighet.mom")}}</view>
<view class="td">
<input class="input" type="digit" v-model="momheight" :placeholder="$t('tips.verifyRecord')">cm
@ -82,6 +82,7 @@
momheight: "",
birthday: "",
fields: "",
language: ""
}
},
computed: {
@ -96,6 +97,8 @@
// withShareTicket: true,
// menus: ["shareAppMessage"]
// })
that.language = uni.getStorageSync('language')
// #ifdef APP-PLUS
that.fields = "time"
// #endif
@ -103,6 +106,11 @@
that.fields = "day"
// #endif
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titleInheritHeighet'),
})
},
// onShareAppMessage(res) {
// let that = this
// return {
@ -226,6 +234,8 @@
.td {
width: 60%;
display: flex;
justify-content: space-around;
}
}
@ -292,6 +302,10 @@
}
}
.tr2 {
width: 100% !important;
}
.btn {
margin-top: 20px;
margin-bottom: 15px;

View File

@ -4,30 +4,31 @@
<view class="login">
<view class="editem">
<view class="item">
<view class="text">{{$t("common.titleAccountText")}}</view>
<view class="text">{{language == 'zh-Hans'?$t("common.titleAccountText"):$t("common.infoEmail")}}
</view>
<view class="input">
<input v-model="phone" type="text" :placeholder="$t('common.titleAccountText')"/>
<input v-model="phone" type="text" :placeholder="$t('tips.verifyRecord')" />
</view>
</view>
<view class="item ">
<view class="text">{{$t("common.titleCode")}}</view>
<view class="input yanzhengma">
<input class="uni-input" v-model="code" :placeholder="$t('common.titleCode')"/>
<input class="uni-input" v-model="code" :placeholder="$t('common.titleCode')" />
<button class="code" type="none" @click="handleCode" v-model="code"
:disabled="disabled">{{second<60 ? second+'$t("common.titleSendCodeRetry")':$t("common.titleSendCode")}}
:disabled="disabled">{{second<60 ? second:$t("common.titleSendCode")}}
</button>
</view>
</view>
<view class="item">
<view class="text">{{$t("common.titlePassword")}}</view>
<view class="input">
<input class="uni-input" v-model="password" :placeholder="$t('common.titlePassword')"/>
<input class="uni-input" v-model="password" :placeholder="$t('common.titlePassword')" />
</view>
</view>
<view class="item">
<view class="text">{{$t("common.titleConfirmPassword")}}</view>
<view class="input">
<input class="uni-input" v-model="password2" :placeholder="$t('common.titleConfirmPassword')"/>
<input class="uni-input" v-model="password2" :placeholder="$t('common.titleConfirmPassword')" />
</view>
</view>
</view>
@ -55,11 +56,19 @@
disabled: false,
second: 60,
value: 1,
type: ""
type: "",
language: ""
}
},
onLoad(options) {
let that = this
this.type = options.type //1
that.language = uni.getLocale()
console.log("language", that.language)
uni.setNavigationBarTitle({
title: that.type == "register" ? this.$t('common.titleRegister') : this.$t(
'common.titleForgotPassword'),
})
},
methods: {
checkboxChange(e) {
@ -69,14 +78,21 @@
handleTelLogin() {
let that = this
let phoneType = that.phone.indexOf("@") !== -1
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
if (that.language == 'zh-Hans' && !phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
if (that.language == 'zh-Hans' && phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that
.phone))) {
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (that.language != 'zh-Hans' && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
that.$tools.msg(that.$t("tips.verifyEmailCorrect"))
return
}
if (!that.code) {
that.$tools.msg(that.$t("tips.verifyCode"))
return
@ -119,14 +135,19 @@
handleCode() {
let that = this
let phoneType = that.phone.indexOf("@") !== -1
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
if (that.language == 'zh-Hans' && !phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
if (that.language == 'zh-Hans' && phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that
.phone))) {
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (that.language != 'zh-Hans' && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
that.$tools.msg(that.$t("tips.verifyEmailCorrect"))
return
}
//
that.$model.getSendCode({
data: that.phone,
@ -197,7 +218,7 @@
position: relative;
display: flex;
align-items: center;
font-size: 32rpx;
font-size: 28rpx;
justify-content: space-between;
flex-wrap: wrap;
@ -205,19 +226,20 @@
.item {
width: 100%;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
margin-bottom: 15px;
.text {
width: 240rpx;
width: 100%;
height: 40px;
line-height: 40px;
font-size: 32rpx;
font-size: 28rpx;
}
.input {
width: calc(100% - 240rpx);
width: 100%;
height: 35px;
line-height: 35px;
display: flex;
@ -240,16 +262,15 @@
.yanzhengma {
input {
right: 220rpx;
font-size: 28rpx;
right: 120px;
}
}
}
.code {
width: 220rpx;
width: 110px;
background: #dfdfdf;
font-size: 28rpx;
font-size: 14px;
margin: 0;
line-height: 40px;
border-radius: 5px;
@ -260,12 +281,6 @@
bottom: 0;
z-index: 99;
}
.forget {
width: 80px;
background: #fff;
color: $textcolor;
}
}
.btngroup {

View File

@ -1,7 +1,6 @@
<template>
<view class="content">
<view class="bg"></view>
<!-- #ifdef APP-PLUS||APP -->
<!-- 语言切换 -->
<view class="language">
<view class="nowlanguage" @click="Islanguage =!Islanguage">
@ -9,14 +8,13 @@
<uni-icons type="down" size="18"></uni-icons>
</view>
<view class="languageList" v-if="Islanguage">
<view class="item" v-for="(ite,ind) in languageList" :class="[nowlanguage==ite.name?'active':'']"
<view class="item" v-for="(ite,ind) in languageList" :class="[nowlanguage==ite.value?'active':'']"
@click="handleSetlanguage(ite)">
{{ite.name}}
<image src="../../static/dui1.png" v-if="nowlanguage==ite.name"></image>
{{ite.value}}
<image src="../../static/dui1.png" v-if="nowlanguage==ite.value"></image>
</view>
</view>
</view>
<!-- #endif -->
<view class="top">
<image src="../../static/logo2.png"></image>
<text>Reedaw</text>
@ -28,18 +26,19 @@
</view>
<view class="editem">
<view class="item">
<view class="text">{{$t("common.titleAccountText")}}</view>
<view class="text">{{language=='zh-Hans'?$t("common.titleAccountText"):$t("common.infoEmail")}}
</view>
<view class="input">
<input v-model="phone" :placeholder="$t('common.titleAccountText')"/>
<input v-model="phone" :placeholder="$t('tips.verifyRecord')" />
</view>
</view>
<!-- 验证码登录 -->
<view class="item " v-if="isCode">
<view class="text">{{$t("common.titleCode")}}</view>
<view class="input yanzhengma">
<input class="uni-input" v-model="code" :placeholder="$t('common.titleCode')"/>
<input class="uni-input" v-model="code" :placeholder="$t('common.titleCode')" />
<button class="code" type="none" @click="handleCode" v-model="code"
:disabled="disabled">{{second<60 ? second+'$t("common.titleSendCodeRetry")':$t("common.titleSendCode")}}
:disabled="disabled">{{second<60 ? second:$t("common.titleSendCode")}}
</button>
</view>
</view>
@ -47,7 +46,7 @@
<view class="item " v-else>
<view class="text">{{$t("common.titlePassword")}}</view>
<view class="input">
<input class="uni-input" v-model="password" :placeholder="$t('common.titlePassword')"/>
<input class="uni-input" v-model="password" :placeholder="$t('common.titlePassword')" />
</view>
</view>
<view class="forget " v-if="!isCode">
@ -92,6 +91,9 @@
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {
@ -106,19 +108,20 @@
Islanguage: false,
language: "",
nowlanguage: "",
languageList: [],
componentKey: 1
}
},
computed: {
...mapState(["languageList"]),
},
onLoad() {
let that = this
that.language = uni.getStorageSync('language') ? uni.getStorageSync('language') : uni.getLocale()
console.log("language", that.language, uni.getStorageSync('language'), uni.getLocale())
that.nowlanguage = that.languageList.find(ite => ite.key == that.language).value
// #ifdef MP-WEIXIN
that.login()
// #endif
that.language = uni.getLocale()
that.languageList = that.$video.language
that.nowlanguage = that.languageList.find(ite => ite.key == that.language).name
console.log("that.nowlanguage", that.nowlanguage)
},
methods: {
//
@ -133,14 +136,19 @@
that.$tools.msg(that.$t("tips.verifyAgreement"))
return
}
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
if (that.language == 'zh-Hans' && !phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
if (that.language == 'zh-Hans' && phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that
.phone))) {
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (that.language != 'zh-Hans' && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
that.$tools.msg(that.$t("tips.verifyEmailCorrect"))
return
}
if (that.isCode && !that.code) {
that.$tools.msg(that.$t("tips.verifyCode"))
return
@ -169,14 +177,19 @@
handleCode() {
let that = this
let phoneType = that.phone.indexOf("@") !== -1
if (!phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
if (that.language == 'zh-Hans' && !phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
if (that.language == 'zh-Hans' && phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that
.phone))) {
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (that.language != 'zh-Hans' && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
that.$tools.msg(that.$t("tips.verifyEmailCorrect"))
return
}
//
that.$model.getSendCode({
data: that.phone,
@ -239,11 +252,18 @@
},
//
handleSetlanguage(ite) {
let that = this
uni.setLocale(ite.key)
this.nowlanguage = ite.name
that.language = ite.key
that.nowlanguage = ite.value
that.Islanguage = false
uni.setStorageSync('language', ite.key)
console.log("ite", ite.key)
},
handleToggle() {
this.phone = ""
this.code = ""
this.password = ""
this.isCode = !this.isCode
},
handlePassword(text) {

View File

@ -59,6 +59,11 @@
that.version = that.$tools.compareVersions(that.phoneInfo.info.version, that.phoneInfo.versionUrl.version)
}
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titleAboutUs'),
})
},
onBackPress() {
console.log("dtask", dtask)
if (dtask != undefined) {

View File

@ -67,6 +67,11 @@
onLoad() {
console.log("语言", uni.getLocale())
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titleManage'),
})
},
onPullDownRefresh() {
let that = this
that.handleUserList()

View File

@ -22,12 +22,12 @@
<view class="radio">
<uni-icons :type="memInfo.gender==1?'checkbox-filled':'circle'" @click="memInfo.gender=1"
size="24" :color="memInfo.gender==1?'#fea606':'#dfdfdf'"></uni-icons>
{{$t("common.infoMan")}}
{{$t("common.infoMan")}}
</view>
<view class="radio ml-15">
<uni-icons :type="memInfo.gender==2?'checkbox-filled':'circle'" @click="memInfo.gender=2"
size="24":color="memInfo.gender==2?'#fea606':'#dfdfdf'"></uni-icons>
{{$t("common.infoWoman")}}
size="24" :color="memInfo.gender==2?'#fea606':'#dfdfdf'"></uni-icons>
{{$t("common.infoWoman")}}
</view>
<!-- <picker mode="selector" :range="sexItem" @change="onsexArr">
<view class="uni-input">{{memInfo.gender==0?'请选择':memInfo.gender==1?'男':'女'}}</view>
@ -176,6 +176,9 @@
},
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titleMember'),
})
this.language = uni.getLocale()
},
onLoad(options) {

View File

@ -53,6 +53,11 @@
return this.user.id
}
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titleScoreHistory'),
})
},
onLoad() {
let that = this
that.page = 1

View File

@ -13,7 +13,7 @@
<view class="input yanzhengma">
<input class="uni-input" v-model="code" :placeholder="$t('tips.verifyCode')"/>
<button class="code" type="none" @click="handleCode" v-model="code"
:disabled="disabled">{{second<60 ? second+"$t('common.titleSendCodeRetry')":$t("common.titleSendCode")}}
:disabled="disabled">{{second<60 ? second:$t("common.titleSendCode")}}
</button>
</view>
</view>
@ -136,7 +136,7 @@
position: relative;
display: flex;
align-items: center;
font-size: 32rpx;
font-size: 28rpx;
justify-content: space-between;
flex-wrap: wrap;
@ -144,19 +144,20 @@
.item {
width: 100%;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
margin-bottom: 15px;
.text {
width: 80px;
width: 100%;
height: 40px;
line-height: 40px;
font-size: 32rpx;
font-size: 28rpx;
}
.input {
width: calc(100% - 100px);
width: 100%;
height: 35px;
line-height: 35px;
display: flex;
@ -174,13 +175,12 @@
left: 10px;
right: 0px;
z-index: 88;
font-size: 32rpx;
font-size: 28rpx;
}
.yanzhengma {
input {
right: 120px;
font-size: 32rpx;
}
}
}
@ -188,7 +188,7 @@
.code {
width: 110px;
background: #dfdfdf;
font-size: 32rpx;
font-size: 14px;
margin: 0;
line-height: 40px;
border-radius: 5px;

View File

@ -5,13 +5,13 @@
<view class="item">
<view class="text">{{$t("common.titlePassword")}}</view>
<view class="input">
<input class="uni-input" v-model="password" :placeholder="$t('tips.verifyPassword')"/>
<input class="uni-input" v-model="password" :placeholder="$t('tips.verifyPassword')" />
</view>
</view>
<view class="item">
<view class="text">{{$t("common.titleConfirmPassword")}}</view>
<view class="input">
<input class="uni-input" v-model="password2" :placeholder="$t('tips.verifyPasswordTwo')"/>
<input class="uni-input" v-model="password2" :placeholder="$t('tips.verifyPasswordTwo')" />
</view>
</view>
</view>
@ -29,6 +29,11 @@
}
},
onLoad() {},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titlePassword'),
})
},
methods: {
//
handleTelLogin() {
@ -81,7 +86,7 @@
position: relative;
display: flex;
align-items: center;
font-size:28rpx;
font-size: 28rpx;
justify-content: space-between;
flex-wrap: wrap;
@ -89,19 +94,20 @@
.item {
width: 100%;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
margin-bottom: 15px;
.text {
width: 80px;
width: 100%;
height: 40px;
line-height: 40px;
font-size: 32rpx;
font-size: 28rpx;
}
.input {
width: calc(100% - 100px);
width: 100%;
height: 35px;
line-height: 35px;
display: flex;
@ -119,7 +125,7 @@
left: 10px;
right: 0px;
z-index: 88;
font-size: 28rpx;
font-size: 28rpx;
}
}
}

View File

@ -11,9 +11,9 @@
<view class="item ">
<view class="text">{{$t("common.titleCode")}}</view>
<view class="input yanzhengma">
<input class="uni-input" v-model="code" :placeholder="$t('tips.verifyCode')"/>
<input class="uni-input" v-model="code" :placeholder="$t('common.titleCode')"/>
<button class="code" type="none" @click="handleCode" v-model="code"
:disabled="disabled">{{second<60 ? second+"$t('common.titleSendCodeRetry')":$t("common.titleSendCode")}}
:disabled="disabled">{{second<60 ? second:$t("common.titleSendCode")}}
</button>
</view>
</view>
@ -144,18 +144,19 @@
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 15px;
.text {
width: 80px;
width: 100%;
height: 40px;
line-height: 40px;
font-size: 28rpx;
}
.input {
width: calc(100% - 100px);
width: 100%;
height: 35px;
line-height: 35px;
display: flex;
@ -186,7 +187,7 @@
.code {
width: 110px;
background: #dfdfdf;
font-size: 32rpx;
font-size: 14px;
margin: 0;
line-height: 40px;
border-radius: 5px;

View File

@ -52,6 +52,11 @@
return this.accountNumber
}
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titleSet'),
})
},
methods: {
handleOutLogin() {
let that = this
@ -101,7 +106,7 @@
background-color: #F3F4F6;
padding: 15px;
min-height: 100vh;
font-size: 36rpx;
font-size: 30rpx;
}
.image {
@ -111,14 +116,14 @@
}
.text_r {
width: 70%;
display: flex;
align-items: center;
justify-content: flex-end;
text {
width: calc(100% - 30px);
width: 100%;
display: inline-block;
margin-right: 7px;
}
input {

View File

@ -11,7 +11,7 @@
{
"path": "pages/skiping/skip",
"style": {
"navigationBarTitleText": "跳绳数据",
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"onReachBottomDistance": 50
}
@ -19,7 +19,7 @@
{
"path": "pages/skiping/charts",
"style": {
"navigationBarTitleText": "%pageText.charts%",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
@ -27,7 +27,7 @@
{
"path": "pages/lunging/vitalcapacity",
"style": {
"navigationBarTitleText": "肺活量数据",
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"onReachBottomDistance": 50,
"navigationBarBackgroundColor": "#000000",
@ -37,7 +37,7 @@
{
"path": "pages/lunging/charts",
"style": {
"navigationBarTitleText": "运动曲线",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
@ -45,7 +45,7 @@
{
"path": "pages/my/me",
"style": {
"navigationBarTitleText": "我的",
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"onReachBottomDistance": 50
@ -54,7 +54,7 @@
{
"path": "pages/score/score",
"style": {
"navigationBarTitleText": "分数评估",
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"onReachBottomDistance": 50
@ -63,13 +63,13 @@
{
"path": "pages/PublicCards/PublicCards",
"style": {
"navigationBarTitleText": "对比详情"
"navigationBarTitleText": ""
}
},
{
"path": "pages/body/body",
"style": {
"navigationBarTitleText": "身体数据",
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"onReachBottomDistance": 50
@ -88,7 +88,7 @@
"pages": [{
"path": "history/history",
"style": {
"navigationBarTitleText": "历史记录",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
@ -96,7 +96,7 @@
{
"path": "history/historyDetail",
"style": {
"navigationBarTitleText": "记录详情",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
@ -104,7 +104,7 @@
{
"path": "compk/contrast",
"style": {
"navigationBarTitleText": "数据对比",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
@ -112,14 +112,14 @@
{
"path": "compk/pkdetail",
"style": {
"navigationBarTitleText": "对比详情",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "cardList/card",
"style": {
"navigationBarTitleText": "卡片设置",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
@ -127,7 +127,7 @@
{
"path": "business/business",
"style": {
"navigationBarTitleText": "设备管理",
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"onReachBottomDistance": 50
@ -135,7 +135,7 @@
}, {
"path": "business/addDevice",
"style": {
"navigationBarTitleText": "设备列表",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
@ -143,7 +143,7 @@
{
"path": "business/search",
"style": {
"navigationBarTitleText": "搜索设备",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
@ -151,14 +151,14 @@
{
"path": "score/history",
"style": {
"navigationBarTitleText": "估分历史",
"navigationBarTitleText": "历史",
"enablePullDownRefresh": false
}
}, {
"path": "score/report",
"style": {
"navigationBarTitleText": "估分报告",
"navigationBarTitleText": "记录",
"enablePullDownRefresh": false
}
@ -166,7 +166,7 @@
{
"path": "my/manage",
"style": {
"navigationBarTitleText": "成员管理",
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"onReachBottomDistance": 50
@ -182,14 +182,14 @@
{
"path": "my/userInfo",
"style": {
"navigationBarTitleText": "资料"
"navigationBarTitleText": ""
}
},
{
"path": "login/forgetPassword",
"style": {
"navigationBarTitleText": "密码",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
@ -197,7 +197,7 @@
{
"path": "login/login",
"style": {
"navigationBarTitleText": "登录",
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
@ -205,14 +205,14 @@
{
"path": "my/about",
"style": {
"navigationBarTitleText": "关于我们",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "setting/setting",
"style": {
"navigationBarTitleText": "设置",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
@ -220,7 +220,7 @@
{
"path": "setting/password",
"style": {
"navigationBarTitleText": "修改密码",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
@ -228,7 +228,7 @@
{
"path": "setting/email",
"style": {
"navigationBarTitleText": "绑定邮箱",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
@ -236,7 +236,7 @@
{
"path": "setting/phone",
"style": {
"navigationBarTitleText": "绑定手机号",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
@ -244,7 +244,7 @@
{
"path": "devices/search",
"style": {
"navigationBarTitleText": "蓝牙搜索",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
@ -252,7 +252,7 @@
{
"path": "devices/G02",
"style": {
"navigationBarTitleText": "测量",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
@ -260,7 +260,7 @@
{
"path": "devices/PCL",
"style": {
"navigationBarTitleText": "测量",
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
@ -340,14 +340,14 @@
{
"path": "home/inheritHeighet",
"style": {
"navigationBarTitleText": "身高预测"
"navigationBarTitleText": ""
}
},
{
"path": "home/bmi",
"style": {
"navigationBarTitleText": "BMI测评"
"navigationBarTitleText": ""
}
},
{
@ -376,20 +376,20 @@
"list": [{
"pagePath": "pages/home/home",
"iconPath": "static/shou.png",
"selectedIconPath": "static/shou2.png",
"text": "记录"
"selectedIconPath": "static/shou2.png"
// "text": "123"
},
{
"pagePath": "pages/zixun/list",
"iconPath": "static/ping.png",
"selectedIconPath": "static/ping2.png",
"text": "资讯"
"selectedIconPath": "static/ping2.png"
// "text": "资讯"
},
{
"pagePath": "pages/my/me",
"iconPath": "static/wo.png",
"selectedIconPath": "static/wo2.png",
"text": "我的"
"selectedIconPath": "static/wo2.png"
// "text": "我的"
}
]
},

View File

@ -89,25 +89,25 @@
<view class="image">
<image src="@/static/charts.png"></image>
</view>
<view class="name">运动曲线</view>
<view class="name">{{$t("common.titleCharts")}}</view>
</view>
<view class="item" @click="navTo('/pageTwo/PublicCards/history?acd_id='+acd_id)">
<view class="image">
<image src="@/static/add.png"></image>
</view>
<view class="name">历史记录</view>
<view class="name">{{$t("common.titleHistory")}}</view>
</view>
<view class="item" @click="navTo('/pageTwo/PublicCards/contrast?acd_id='+acd_id)">
<view class="image">
<image src="@/static/pk.png"></image>
</view>
<view class="name">数据对比</view>
<view class="name">{{$t("common.titleContrast")}}</view>
</view>
<view class="item" @click="$store.commit('changePublicAdd',true)">
<view class="image">
<image src="@/static/history.png"></image>
</view>
<view class="name">添加记录</view>
<view class="name">{{$t("common.btnAdd")}}{{$t("common.titleHome")}}</view>
</view>
</view>
</view>

View File

@ -127,6 +127,11 @@
firstweight,
qiunDataCharts,
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titleBody'),
})
},
onLoad(options) {
let that = this
that.acd_id = options.acd_id

View File

@ -13,7 +13,7 @@
</view>
<view class="notice" v-if="notices.length">
<text>公告</text>
<text>{{$t('index.notice')}}</text>
<!-- -->
<swiper class="swiper" vertical="true" autoplay="true">
<swiper-item v-for="(item,index) in notices" :key="index" @click="$tools.NewsPtype(item)">
@ -24,27 +24,67 @@
<!-- 工具区 -->
<view class="tools_l">
<view v-for="(item,index) in toollist" :key="index" class="list" @click="handleTool(index,item.path)">
<view v-for="(item,index) in toollist" :key="index" class="list" @click="handleTool(index,item.path)"
:class="[language=='zh-Hans'?'':'list2']">
<image :src="item.icon"></image>
<view class="text">{{item.title}}</view>
</view>
</view>
<!-- banner -->
<view class="f_banner" v-if="banner.length">
<swiper class="swiper" indicator-dots="true" autoplay="true">
<swiper-item v-for="(image, index) in banner" :key="index" @click="$tools.NewsPtype(image)">
<image :src="image.pic" mode="aspectFill" />
</swiper-item>
</swiper>
</view>
<!-- 身体数据 -->
<view class="report">
<view class="bold mt-10 ml-10" v-if="info&&info.top_list.length">身体报告</view>
<view class="box" v-if="info&&info.top_list.length">
<view class="bold mt-10 ml-10 title" v-if="info&&info.top_list.length">
<view>{{$t('index.body')}}</view>
<view class="time">{{info?info.record_time:''}}</view>
<view class="item2">
</view>
<view class="box" v-if="info&&info.top_list.length" v-for="(item,index) in info.top_list">
<view class="data data2">
<view class="left" :class="[item.difference_val?'':'left2']">
<view class="name bold">{{item.name}}</view>
<view>
<text class="bold mr-5"
:class="[item.difference_val?'size26':'size14']">{{item.value}}</text>{{item.unit}}
</view>
</view>
<view class="right" v-if="item.difference_val">
<view>{{$t("index.ideal")}}{{item.name}}</view>
<view class="lixiang">
<view class="mr-10"><text class="mr-5">{{item.standard_val}}</text>{{item.unit}}</view>
<view>
<icon class="t-icon t-icon-shang" v-if="Number(item.difference_val)>0"></icon>
<icon class="t-icon t-icon-xia" v-if="Number(item.difference_val)<0"></icon>
{{item.difference_val}}
</view>
</view>
</view>
</view>
<view class="myinfoPage">
<view class="desc">
<view v-if="item.desc" class="ming size12">{{item.desc}}</view>
<view :class="[item.list.length?'statuevue':'']" v-if="item.list">
<view class="bi">
<view :style="'left:'+item.offset+'%'" class="peobox">
<view class="xx"></view>
</view>
<view class="item" v-for="(ite , ind) in item.list" :key="ind"
:style="{backgroundColor:ite.color}">
<view class="span1">{{ite.text}}</view>
<view class="span" v-if="ind<item.list.length-1">{{ite.max_val}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- <view class="item2">
<view class="item2_data" :style="userInfo.stage=='婴儿'?'width:25%':'width:33%'"
v-for="(item,index) in info.top_list" @click="handleToggleTop(item,index)">
<view class="data" :class="[activeHeight==index?'activeHeight':'']">
@ -63,23 +103,23 @@
<view class="item" v-for="(ite , ind) in infoListTop.list" :key="ind"
:style="{backgroundColor:ite.color}">
<view class="span1">{{ite.text}}</view>
<view class="span" v-if="ind<infoListTop.list.length-1">{{ite.max_val}}</view>
<view class="span" v-if="ind<infoListTop.list.length-1">{{ite.max_val}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view> -->
<view class="nolist" v-if="!info">
<image src="../../static/none.png"></image>
<text>暂无数据请手动添加~</text>
<text>{{$t('index.none')}}</text>
</view>
<view class="box2" v-if="info&&info.body_type_value">
<view>身体得分{{info?info.score_value:0}}</view>
<view>身体类型{{info?info.body_type_value:'无'}}</view>
<view>{{$t('index.BodyScore')}}{{info?info.score_value:0}}{{$t("index.number")}}</view>
<view>{{$t('index.BodyType')}}{{info?info.body_type_value:$t("index.no")}}</view>
</view>
<view class="bold mt-10 ml-10" v-if="info&&info.bottom_list.length">其他数据</view>
<view class="bold mt-10 ml-10" v-if="info&&info.bottom_list.length">{{$t('index.otherData')}}</view>
<view class="ml-10 mr-10" v-if="info&&info.bottom_list.length">
<view class="myinfoPage">
<view class="box1">
@ -88,11 +128,13 @@
<template v-slot:title>
<uni-list-item class="block">
<view class="name">
<icon class="t-icon iconfont" :class="'t-icon-'+item.key_name"></icon>
{{item.name}}
<icon class="t-icon iconfont" :class="'t-icon-'+item.key_name">
</icon>
<text>{{item.name}}</text>
</view>
<view class="val" v-if="item.key_name=='key_name'"> - </view>
<view class="val" v-else>{{item.value?item.value:'0'}}{{item.unit}}
</view>
<view class="val" v-if="item.title=='肥胖等级'||item.title=='体型'"> - </view>
<view class="val" v-else>{{item.value?item.value:'0'}}{{item.unit}}</view>
<view class="level">
<view class="btnf"
:style="{backgroundColor:(item.standard=='异常'?'#FFF':item.color)}"
@ -103,21 +145,22 @@
</uni-list-item>
</template>
<view class="desc">
<view v-if="item.desc" class="ming">{{item.desc}}</view>
<view v-if="item.desc" class="ming size12">{{item.desc}}</view>
<view :class="[item.list.length?'statuevue':'']" v-if="item.list">
<view class="bi" v-if="item.title!='基础代谢'">
<view class="bi" v-if="item.key_name!='kcal'">
<view :style="'left:'+item.offset+'%'" class="peobox">
<view class="xx"></view>
</view>
<view class="item" v-for="(ite , ind) in item.list" :key="ind"
:style="{backgroundColor:ite.color}">
<view class="span1">{{ite.text}}</view>
<view class="span" v-if="ind<item.list.length-1">{{ite.max_val}}</view>
<view class="span" v-if="ind<item.list.length-1">{{ite.max_val}}
</view>
</view>
</view>
<view v-else>
<view class="kcalClass" v-if="item.list&&item.list.length">
标准值:{{item.list[0].max_val}}kcal
{{$t("index.Standard")}}:{{item.list[0].max_val}}kcal
</view>
</view>
</view>
@ -129,35 +172,44 @@
</view>
<!-- 数据参考 -->
<view class="tips c999 ml-15 mb-15" v-if="info.literature.length">
<text>*数据参考</text>
<text>*{{$t("index.dataReference")}}</text>
<text v-for="(item,index) in info.literature" :key="index">
{{item}}
</text>
</view>
<view class="tips2 ml-10" v-if="info.bottom_list">
<uni-icons type="info-filled" color="red"></uni-icons>
此测量数据仅供参考不可代替医学专业测试
{{$t("index.referencetips")}}
</view>
<!-- banner -->
<view class="f_banner" v-if="banner.length">
<swiper class="swiper" indicator-dots="true" autoplay="true">
<swiper-item v-for="(image, index) in banner" :key="index" @click="$tools.NewsPtype(image)">
<image :src="image.pic" mode="aspectFill" />
</swiper-item>
</swiper>
</view>
<!-- 成长建议 -->
<view v-if="cplist.sleeplist.length||cplist.nutritionlist.length" class="ml-10 mr-10">
<view class="bold mt-10">成长建议</view>
<view class="bold mt-10">{{$t("index.growthAdvice")}}</view>
<view class="jianyi_box">
<view class="jianyi">
<view @click="proposalnd=1" :class="{active:proposalnd==1}">
<image src="../../static/icon4.png"></image>
<text>营养</text>
<text>{{$t("index.nutrition")}}</text>
</view>
<view @click="proposalnd=2" :class="{active:proposalnd==2}">
<image src="../../static/icon1.png"></image>
<text>睡眠</text>
<text>{{$t("index.sleep")}}</text>
</view>
<view @click="proposalnd=3" :class="{active:proposalnd==3}">
<image src="../../static/icon3.png"></image>
<text>运动</text>
<text>{{$t("index.movement")}}</text>
</view>
<view @click="proposalnd=4" :class="{active:proposalnd==4}">
<image src="../../static/icon2.png"></image>
<text>情绪</text>
<text>{{$t("index.emotion")}}</text>
</view>
</view>
<view>
@ -202,7 +254,8 @@
</view>
<view class="btnGroup">
<view class="blueBtn" v-if="item.acd_id==2" @click.stop
@click="$Bluetooth.handleDevicesMac(item.device_determine,item.acd_id)">蓝牙连接</view>
@click="$Bluetooth.handleDevicesMac(item.device_determine,item.acd_id)">蓝牙连接
</view>
<view class="blueBtn" v-else-if="item.acd_id==6">蓝牙连接</view>
<view v-else></view>
<view class="orangeBtn" @click="handlerRecord(item.acd_id)" @click.stop>手动记录</view>
@ -278,7 +331,56 @@
proposalnd: 1,
unit: "",
language: "",
// toollist: []
toolList: [{
"icon": "/static/q2.png",
"title": "中招估分",
"path": "/pages/score/score"
}, {
"icon": "/static/q4.png",
"title": this.$t("index.bmi"),
"path": "/pageTwo/home/bmi"
},
{
"icon": "/static/q6.png",
"title": this.$t("common.titleInheritHeighet"),
"path": "/pageTwo/home/inheritHeighet"
},
{
"icon": "/static/q1.png",
"title": this.$t("index.skipping"),
"path": "/pages/skiping/skip?acd_id=6"
},
{
"icon": "/static/q10.png",
"title": this.$t("index.vitalcapacity"),
"path": "/pages/lunging/vitalcapacity?acd_id=8"
},
{
"icon": "/static/q3.png",
"title": this.$t("common.titleContrast"),
"path": "/pageTwo/compk/contrast?acd_id=2"
},
{
"icon": "/static/q5.png",
"title": this.$t("common.titleBody"),
"path": "/pages/body/body?acd_id=2"
},
{
"icon": "/static/q7.png",
"title": this.$t("index.manualRecording"),
"path": ""
},
{
"icon": "/static/q8.png",
"title": this.$t("common.titleHistory"),
"path": "/pageTwo/history/history?acd_id=2"
},
{
"icon": "/static/q9.png",
"title": this.$t("common.titleManage"),
"path": "/pageTwo/my/manage"
}
]
}
},
components: {
@ -303,8 +405,8 @@
return that.MeasureResult
},
toollist() {
let list = this.$video.toolList
return uni.getLocale() == "zh-Hans" ? list : list.splice(1, 9)
let list = this.toolList
return uni.getStorageSync('language') == "zh-Hans" ? list : list.splice(1, 7)
},
isCoupon() {
return this.bannerCon.isCoupon
@ -339,7 +441,7 @@
let that = this
console.log("isConnected", that.isConnected)
if (!that.isConnected) {
that.textLink = "开始连接"
that.textLink = that.$t("linkBluetooth.startlinkBluetooth")
that.islink = -1
}
},
@ -347,14 +449,14 @@
let that = this
console.log("isBluetoothTyle", that.isBluetoothTyle)
if (!that.isBluetoothTyle) {
that.textLink = "开始连接"
that.textLink = that.$t("linkBluetooth.startlinkBluetooth")
that.islink = -1
}
},
},
onShow() {
let that = this
that.language = uni.getLocale()
that.language = uni.getStorageSync('language')
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
@ -410,6 +512,7 @@
},
navTo(url) {
console.log("url", url)
uni.navigateTo({
url: url
})
@ -421,7 +524,7 @@
uni.openBluetoothAdapter({
success: e => {
that.islink = 0
that.textLink = "蓝牙搜索中"
that.textLink = that.$t("linkBluetooth.searchBluetooth")
console.log("蓝牙初始化成功")
that.startBluetoothDeviceDiscovery()
},
@ -569,7 +672,7 @@
myTime = setTimeout(function() {
if (!that.devicesList.length) {
that.islink = -1
that.textLink = "未搜索到有效设备,重新搜索"
that.textLink = that.$t("linkBluetooth.Nodevicefound")
clearTimeout(myTime);
that.$Bluetooth.stopBluetoothDevicesDiscovery()
}
@ -579,7 +682,7 @@
getBlereload() {
let that = this
that.islink = -1
that.textLink = "重新测量"
that.textLink = that.$t("linkBluetooth.remeasure")
},
//
onBLEConnectionStateChange() {
@ -633,6 +736,10 @@
margin-top: -36px;
}
/deep/.box {
padding: 10px 10px 1px !important;
}
.list {
margin-top: 0rpx;
padding: 0;
@ -756,4 +863,61 @@
padding-bottom: 10px;
border-bottom: 2px solid $maincolor;
}
.title {
display: flex;
margin-right: 10px;
justify-content: space-between;
}
.data2 {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
height: 60px;
line-height: 30px;
.name {
width: 100%;
}
.left2 {
width: 100%;
display: flex;
justify-content: space-between;
}
.right {
width: 50%;
display: flex;
flex-wrap: wrap;
font-size: 14px;
.lixiang {
display: flex;
align-items: baseline;
// justify-content: space-between;
view {
display: flex;
align-items: baseline;
}
text {
color: $maincolor;
font-size: 22px;
font-weight: bold;
}
}
}
}
.list2 {
width: 22% !important;
margin-bottom: 10px !important;
}
.list2:nth-child(n+5) {
width: 33% !important;
}
</style>

View File

@ -1,9 +1,9 @@
<template>
<view class="TrendPage">
<view class="listC">
<view @click="handleActive(1)" :class="[active==1?'active':'']">当天</view>
<view @click="handleActive(2)" :class="[active==2?'active':'']">月度</view>
<view @click="handleActive(3)" :class="[active==3?'active':'']">年度</view>
<view @click="handleActive(1)" :class="[active==1?'active':'']">{{$t('chartsDay')}}</view>
<view @click="handleActive(2)" :class="[active==2?'active':'']">{{$t('chartsMonth')}}</view>
<view @click="handleActive(3)" :class="[active==3?'active':'']">{{$t('chartsYear')}}</view>
</view>
<view class="box">
<!-- 时间选择 -->
@ -23,7 +23,7 @@
</view>
<view class="nolist" v-else>
<image src="../../static/none.png"></image>
<text>暂无数据请手动添加~</text>
<text>{{$t('index.none')}}~</text>
</view>
</view>
</view>
@ -54,6 +54,11 @@
this.time = this.startDate
that.getList()
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titleCharts'),
})
},
methods: {
getList() {
let that = this

View File

@ -4,9 +4,9 @@
<view class="skiptop">
<!-- <view class="status" @click="$Bluetooth.handleDevicesMac(isdevice,acd_id)"><text>设备连接</text></view> -->
<view class="item">
<view class="item-ite">平均吸气肺活量<text>{{info?info.average:'--'}}</text></view>
<view class="item-ite">吸气速度<text>--</text></view>
<view class="item-ite">是否达标<text>{{info?info.level:'--'}}</text></view>
<view class="item-ite text_c">{{$t("lung.averagelungsuction")}}<text>{{info?info.average:'--'}}</text></view>
<view class="item-ite ml-10 mr-10 text_c">{{$t("lung.lungsuctionspeed")}}<text>--</text></view>
<view class="item-ite text_c">{{$t("lung.isMarginal")}}<text>{{info?info.level:'--'}}</text></view>
</view>
</view>
<!--自由训练 -->
@ -28,7 +28,7 @@
</view>
<view class="val" v-if="info">
<text>{{info.average}}</text>
吸气肺活量平均值
{{$t("lung.averagelungsuction")}}
</view>
</view>
<!-- -->
@ -38,25 +38,25 @@
<view class="image">
<image src="../../static/charts.png"></image>
</view>
<view class="name">运动曲线</view>
<view class="name">{{$t("common.titleCharts")}}</view>
</view>
<view class="item" @click="navTo('/pageTwo/history/history?acd_id='+acd_id)">
<view class="image">
<image src="../../static/add.png"></image>
</view>
<view class="name">历史记录</view>
<view class="name">{{$t("common.titleHistory")}}</view>
</view>
<view class="item" @click="navTo('/pageTwo/compk/contrast?acd_id='+acd_id)">
<view class="image">
<image src="../../static/pk.png"></image>
</view>
<view class="name">数据对比</view>
<view class="name">{{$t("common.titleContrast")}}</view>
</view>
<view class="item" @click="$store.commit('changeRecord',true)">
<view class="image">
<image src="../../static/history.png"></image>
</view>
<view class="name">添加记录</view>
<view class="name">{{$t("common.btnAdd")}}{{$t("common.titleHome")}}</view>
</view>
</view>
</view>
@ -87,6 +87,11 @@
return this.MeasureLung
}
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titlevVitalcapacity'),
})
},
onLoad(options) {
let that = this
that.acd_id = options.acd_id

View File

@ -20,6 +20,16 @@
</view>
</view>
</view>
<view class="list" @click="navTo('/pageTwo/history/history?acd_id=2')" v-if="language!= 'zh-Hans'">
<view class="item border-bottom">
<view class="left">
<view class="name">{{$t("common.titleHistory")}}</view>
</view>
<view class="right">
<uni-icons type="right"></uni-icons>
</view>
</view>
</view>
<!-- <view class="list" @click="navTo('/pageTwo/business/business')">
<view class="item border-bottom">
<view class="left">
@ -51,6 +61,16 @@
</view>
</view>
</view>
<view class="list">
<view class="picker item">
<view class="name">{{$t("common.titleLanguage")}}</view>
<picker mode="selector" :range="languageList" :value="index" range-key="value"
@change="languageClick">
<view class="uni-input">{{languageList[index].value}}</view>
<icon class="iconfont icon-arrow-down-bold"></icon>
</picker>
</view>
</view>
<!-- #endif -->
<view class="list" v-for="(ite,ind) in CooperationUrl" :key="ind">
<view class="item border-bottom" @click="navTo('/pageTwo/webview/webview?url=' + ite.url)">
@ -77,14 +97,15 @@
return {
token: "",
user: {},
language: ""
language: "",
index: 0,
}
},
components: {
headerIndex
},
computed: {
...mapState(["accountNumber", "familayList", "CooperationUrl"]),
...mapState(["accountNumber", "familayList", "CooperationUrl", 'languageList']),
nickname() {
return this.accountNumber.nickname
},
@ -94,7 +115,9 @@
},
onLoad() {
let that = this
that.language = uni.getLocale()
that.language = uni.getStorageSync('language')
that.index = that.languageList.findIndex(ite => ite.key == that.language)
console.log("language", that.language, that.index)
that.token = uni.getStorageSync('token')
that.handleAccountNumber()
},
@ -149,6 +172,20 @@
},
})
},
languageClick(e) {
let that = this
that.index = e.detail.value
that.language = that.languageList[that.index].key
uni.setLocale(that.languageList[that.index].key)
uni.setStorageSync('language', that.languageList[that.index].key)
// that.$model.getSetLanguage({
// language: that.languageList[that.index].key,
// }).then(res => {
// console.log("qqqqqqqqqqq", res)
// uni.setLocale(that.languageList[that.index].key)
// that.language = that.languageList[that.index].key
// })
},
navTo(url) {
uni.navigateTo({
url
@ -233,4 +270,22 @@
background: $btncolor;
margin: 50px 15px 0 15px;
}
/deep/picker {
width: 50%;
position: relative;
.uni-input {
display: flex;
padding-right: 20px;
text-align: right;
justify-content: flex-end;
}
.iconfont {
position: absolute;
right: -1px;
top: 3px;
}
}
</style>

View File

@ -1,9 +1,9 @@
<template>
<view class="TrendPage">
<view class="listC">
<view @click="handleActive(1)" :class="[active==1?'active':'']">当天</view>
<view @click="handleActive(2)" :class="[active==2?'active':'']">月度</view>
<view @click="handleActive(3)" :class="[active==3?'active':'']">年度</view>
<view @click="handleActive(1)" :class="[active==1?'active':'']">{{$t("chartsDay")}}</view>
<view @click="handleActive(2)" :class="[active==2?'active':'']">{{$t("chartsMonth")}}</view>
<view @click="handleActive(3)" :class="[active==3?'active':'']">{{$t("chartsYear")}}</view>
</view>
<view class="box">
<!-- 时间选择 -->
@ -24,7 +24,7 @@
<view class="line" v-else>
<view class="nolist">
<image src="../../static/none.png"></image>
<text>暂无数据请手动添加~</text>
<text>{{$t("index.none")}}~</text>
</view>
</view>
</view>

View File

@ -8,24 +8,24 @@
<image v-if="islink==1" src="../../static/dui.png"></image>
</view>
<view class="item">
<view class="item-ite">今日个数<text>{{info?info.today_jump_num:'--'}}</text></view>
<view class="item-ite">今日时长<text>{{info?info.today_jump_time:'--'}}</text></view>
<view class="item-ite">卡路里/kcal<text>{{info?info.today_jump_kcal:'--'}}</text></view>
<view class="item-ite text_c">{{$t("skip.today_jump_num")}}<text>{{info?info.today_jump_num:'--'}}</text></view>
<view class="item-ite ml-10 mr-10 text_c">{{$t("skip.today_jump_time")}}<text>{{info?info.today_jump_time:'--'}}</text></view>
<view class="item-ite text_c">{{$t("skip.today_jump_kcal")}}/kcal<text>{{info?info.today_jump_kcal:'--'}}</text></view>
</view>
</view>
<!-- -->
<view class="tabbar">
<view @click="active=1" :class="[active==1?'active':'']">自由跳</view>
<view @click="active=3" :class="[active==3?'active':'']">倒计数</view>
<view @click="active=2" :class="[active==2?'active':'']">倒计时</view>
<view @click="active=1" :class="[active==1?'active':'']">{{$t("skip.jumpFree")}}</view>
<view @click="active=3" :class="[active==3?'active':'']">{{$t("skip.backwardCount")}}</view>
<view @click="active=2" :class="[active==2?'active':'']">{{$t("skip.Countdown")}}</view>
</view>
<!--自由训练 -->
<view class="box1 box" v-if="active==1">
<view class="item">
<text class="item-set item-set0">自由</text>
<text class="tips">无限制</text>
<text class="item-set item-set0">{{$t("skip.jumpFreedom")}}</text>
<text class="tips">{{$t("skip.jumpUnlimited")}}</text>
</view>
<view :class="[islink==1?'start':'start Nstart']" @click="handleStart(1)">开始</view>
<view :class="[islink==1?'start':'start Nstart']" @click="handleStart(1)">{{$t("skip.instructStart")}}</view>
<!-- <view class="item">
<text class="item-ite">本次时长</text>
<text class="bold">{{info?info.last_jump_time:'0'}}</text>
@ -45,11 +45,11 @@
</view>
<view class="tips">
<picker mode="multiSelector" :range="timeList" :value="timesTndex" @change="bindTimeChange">
<view>调整目标</view>
<view>{{$t("skip.jumpTarget")}}</view>
</picker>
</view>
</view>
<view :class="[isConnection?'start':'start Nstart']" @click="handleStart(2)">开始</view>
<view :class="[isConnection?'start':'start Nstart']" @click="handleStart(2)">{{$t("skip.instructStart")}}</view>
<!-- <view class="item">
<text class="item-ite">本次个数</text>
<text></text>
@ -68,9 +68,9 @@
<input type="number" v-model="weight" focus="true" v-else @blur="disabled=false">
<text @click="handleWeightEdit('加')"></text>
</view>
<text class="tips" @click="disabled=true">调整目标</text>
<text class="tips" @click="disabled=true">{{$t("skip.jumpTarget")}}</text>
</view>
<view :class="[isConnection?'start':'start Nstart']" @click="handleStart(3)">开始</view>
<view :class="[isConnection?'start':'start Nstart']" @click="handleStart(3)">{{$t("skip.instructStart")}}</view>
<!-- <view class="item">
<text class="item-ite">本次时长</text>
<text>0</text>
@ -87,25 +87,25 @@
<view class="image">
<image src="@/static/charts.png"></image>
</view>
<view class="name">运动曲线</view>
<view class="name">{{$t("common.titleCharts")}}</view>
</view>
<view class="item" @click="navTo('/pageTwo/history/history?acd_id='+acd_id)">
<view class="image">
<image src="@/static/add.png"></image>
</view>
<view class="name">历史记录</view>
<view class="name">{{$t("common.titleHistory")}}</view>
</view>
<view class="item" @click="navTo('/pageTwo/compk/contrast?acd_id='+acd_id)">
<view class="image">
<image src="@/static/pk.png"></image>
</view>
<view class="name">数据对比</view>
<view class="name">{{$t("common.titleContrast")}}</view>
</view>
<view class="item" @click="$store.commit('changeRecord',true)">
<view class="image">
<image src="@/static/history.png"></image>
</view>
<view class="name">添加记录</view>
<view class="name">{{$t("common.btnAdd")}}{{$t("common.titleHome")}}</view>
</view>
</view>
</view>
@ -157,6 +157,11 @@
that.time_m = that.timeList[0][1].substring(0, 2)
that.time_s = that.timeList[1][0].substring(0, 2)
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titleSkipping'),
})
},
onLoad(options) {
let that = this
//
@ -233,7 +238,7 @@
let that = this
if (!that.isConnected) {
that.islink = -1
that.textLink = "重新连接"
that.textLink = that.$t('linkBluetooth.anewlinkBluetooth')
}
that.isConnection = that.isConnected
console.log("蓝牙是否连接", that.isConnected)
@ -242,7 +247,7 @@
let that = this
if (!that.isBluetoothTyle) {
that.isConnection = false
that.textLink = "请打开手机蓝牙"
that.textLink = that.$t('linkBluetooth.onPhoneBluetoothTips')
that.islink = -1
}
console.log("蓝牙是否打开", that.isBluetoothTyle)
@ -259,7 +264,7 @@
success: e => {
that.islink = 0
that.handleMyTime()
that.textLink = "蓝牙搜索中"
that.textLink = that.$t('linkBluetooth.searchBluetooth')
that.startBluetoothDeviceDiscovery()
that.$store.commit("changeBluetooth", true)
console.log('初始化蓝牙成功:' + e.errMsg);
@ -320,14 +325,14 @@
uni.createBLEConnection({
deviceId: that.deviceId,
success: res => {
that.textLink = "蓝牙连接中"
that.textLink = that.$t('linkBluetooth.linkBluetooth')
setTimeout(function() {
that.islink = 1
that.getBLEDeviceServices()
}, 1000)
},
fail: res => {
that.textLink = "重新连接"
that.textLink = that.$t('linkBluetooth.anewlinkBluetooth')
console.log("设备连接失败,请重新连接", res, that.deviceId);
}
});
@ -348,7 +353,7 @@
if (service.uuid.indexOf("FFE0") != -1) {
that.serviceId = service.uuid;
that.isConnection = true
that.textLink = "连接成功"
that.textLink = that.$t('linkBluetooth.linkBluetoothSuccess')
that.getBLEDeviceCharacteristics();
console.log("设备的FFE0的serviceId " + that.serviceId);
break;
@ -358,7 +363,7 @@
fail: res => {
console.log('获取设备的UUID失败:', res)
that.islink = -1
that.textLink = "重新连接"
that.textLink = that.$t('linkBluetooth.anewlinkBluetooth')
clearTimeout(myTime);
that.isConnection = false
}
@ -474,7 +479,7 @@
let m = null
let send = null
if (!that.isConnected) {
that.$tools.msg("请先连接设备!")
that.$tools.msg(that.$t('linkBluetooth.isLinkBluetooth'))
return
}
if (ind == 1) { // 1
@ -571,8 +576,8 @@
myTime = setTimeout(function() {
if (!that.devicesList.length) {
that.islink = -1
that.textLink = "重新搜索"
that.$tools.showModal("没有查找到设备")
that.textLink = that.$t('linkBluetooth.searchBluetoothFail')
that.$tools.showModal(that.$t('linkBluetooth.Nodevicefound'))
}
clearTimeout(myTime)
that.$Bluetooth.stopBluetoothDevicesDiscovery()

View File

@ -277,7 +277,7 @@
border-radius: 10px;
font-size: 32rpx;
position: relative;
margin: 0px 15px 0;
margin: 0px 10px 0;
padding-bottom: 10px;
.list {
@ -311,7 +311,11 @@
.name {
width: 40%;
display: flex;
line-height: 22px;
align-items: center;
text{
width: calc(100% - 25px);
}
}
.icon {
@ -409,13 +413,14 @@
font-size: 28rpx;
border-radius: 5px;
height: 22px;
margin: 0 10px 0 0;
margin: 0 5px 0 0;
line-height: 22px;
color: #fff;
font-weight: 400;
width: 44px !important;
width: auto!important;
text-align: center !important;
float: right;
padding: 0 5px;
}
.tivon {

View File

@ -338,7 +338,7 @@
// 弹框
.edit {
width: 15rem;
width: 75%;
height: auto;
background: #eee;
border-radius: 10px;
@ -706,6 +706,7 @@
display: flex;
align-items: center;
justify-content: center;
line-height: 20px;
color: #999;
}
}

View File

@ -88,12 +88,13 @@ export default new Vuex.Store({
cityList: [],
gradeList: [],
identityList: [],
bannerCon:{
notices:[],
banner:[],
pop:[],
isCoupon:false
}
bannerCon: {
notices: [],
banner: [],
pop: [],
isCoupon: false
},
languageList: []
},
// mutations: Store中更改state数据状态的唯一方法(必须是同步函数)
mutations: {
@ -238,6 +239,10 @@ export default new Vuex.Store({
changeCooperationUrl(state, newData) {
state.CooperationUrl = newData
},
// 语言
changeLanguage(state, newData) {
state.languageList = newData
},
},
// 模块化vuex

View File

@ -1,6 +1,8 @@
import $store from '@/store'
import $Bluetooth from '@/toolJs/Bluetooth.js'
import $tools from '@/toolJs/tools.js'
import messages from '@/locale/index.js'
let $t = messages[uni.getLocale()]
let myTime;
let devicesList = []
export default {
@ -42,7 +44,7 @@ function startBluetoothDeviceDiscovery() {
$Bluetooth.onBluetoothDeviceFound();
},
fail: res => {
$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
$tools.msg($t.linkBluetooth.onDeviceBluetoothTips)
}
});
}
@ -167,9 +169,10 @@ function getBluetoothAdapter(err) {
err.errMsg === "openBluetoothAdapter:fail authorize no response"
) {
uni.showModal({
title: "提示",
content: "需要您授权使用手机蓝牙",
title: $t.tips.msgTitle,
content: $t.linkBluetooth.accreditTips,
showCancel: false,
confirmText: $t.tips.btnConfirm,
success(modalSuccess) {
uni.openSetting({
success(settingdata) {
@ -177,19 +180,19 @@ function getBluetoothAdapter(err) {
uni.openBluetoothAdapter({
success: e => {
uni.showToast({
title: "获取权限成功,请继续去测量",
title:$t.linkBluetooth.openBluetoothSuccess,
icon: "none"
})
$store.commit("changeBluetooth", true);
},
fail: err => {
$tools.showModal("手机蓝牙未打开")
$tools.showModal($t.linkBluetooth.onPhoneBluetoothTips)
console.log('初始化蓝牙失败:' + err.errMsg);
}
});
} else {
uni.showToast({
title: "获取权限失败,将无法使用手机蓝牙进行测量",
title: $t.linkBluetooth.openSettingFail,
icon: "none"
})
}
@ -198,6 +201,6 @@ function getBluetoothAdapter(err) {
}
})
} else {
$tools.showModal("手机蓝牙未打开")
$tools.showModal($t.linkBluetooth.onPhoneBluetoothTips)
}
}

View File

@ -1,7 +1,7 @@
import tools from '@/toolJs/tools.js'
import store from '../store'
let baseUrl = "https://tc.pcxbc.com"
// let baseUrl = "https://tc.pcxbc.com/testedition"
// let baseUrl = "https://tc.pcxbc.com"
let baseUrl = "https://tc.pcxbc.com/testedition"
const httpRequest = (url, method = "get", data) => {
let httpDefaultOpts = {
url: baseUrl + url,
@ -16,6 +16,7 @@ const httpRequest = (url, method = "get", data) => {
uni.request(httpDefaultOpts).then(
(res) => {
uni.hideLoading()
// console.log("request", url, res, )
if (res[1].data.code == 20001) {
uni.$emit('need-login');
return
@ -39,14 +40,19 @@ const httpRequest = (url, method = "get", data) => {
const get = (url, data) => {
data.token = uni.getStorageSync('token')
data.aan_id = uni.getStorageSync('aan_id')
data.language = uni.getLocale() == 'zh-Hans' ? "zh" : uni.getLocale()
if(url!="/set_language_country"){
data.language = uni.getLocale()
}
return httpRequest(url, 'get', data)
}
const post = (url, data) => {
data.token = uni.getStorageSync('token')
data.aan_id = uni.getStorageSync('aan_id')
data.language = uni.getLocale() == 'zh-Hans' ? "zh" : uni.getLocale()
if(url!="/set_language_country"){
data.language = uni.getLocale()
}
// console.log("data", url, data)
return httpRequest(url, 'post', data)
}
export default {

View File

@ -1,6 +1,8 @@
import http from './https.js'
import tools from './tools.js'
import store from '@/store'
import messages from '@/locale/index.js'
let $t = messages[uni.getLocale()]
export default {
// 登录
getonlogin(param) { // 登录
@ -18,6 +20,11 @@ export default {
return res
})
},
getSetLanguage(param) { // 设置语言
return http.post("/set_language_country", param).then(res => {
return res
})
},
getRegisterPhone(param) { // 手机号快捷登录
return http.post("/wechat_quick_login", param).then(res => {
return res
@ -75,7 +82,7 @@ export default {
return http.post("/get_user_card_list", param).then(res => {
if (res.data.length) {
let options = [{
text: '删除',
text: $t.tips.btnDelete,
style: {
backgroundColor: '#dd524d'
}

View File

@ -1,5 +1,8 @@
import $store from '@/store'
import $tools from '@/toolJs/tools.js'
import messages from '@/locale/index.js'
let Language = uni.getStorageSync("language")
let $t = messages[Language]
export default {
msg,
toHex,
@ -44,9 +47,10 @@ function NewsPtype(con) {
function showModal(text) {
uni.showModal({
title: "提示",
title: $t.tips.msgTitle,
content: text,
showCancel: false,
confirmText: $t.tips.btnConfirm,
success: function(res) {
if (res.confirm) {
uni.switchTab({ //返回
@ -262,9 +266,10 @@ function getBluetoothAdapter(err) {
err.errMsg === "openBluetoothAdapter:fail authorize no response"
) {
uni.showModal({
title: "提示",
content: "需要您授权使用手机蓝牙",
title: $t.tips.msgTitle,
content: $t.linkBluetooth.accreditTips,
showCancel: false,
confirmText: $t.tips.btnConfirm,
success(modalSuccess) {
uni.openSetting({
success(settingdata) {
@ -272,18 +277,18 @@ function getBluetoothAdapter(err) {
uni.openBluetoothAdapter({
success: e => {
$store.commit("changeBluetooth", true);
textLink = "蓝牙权限获取成功,重新连接蓝牙"
textLink = $t.linkBluetooth.openBluetoothSuccess
return textLink
},
fail: err => {
textLink = "请打开手机蓝牙后,开始测量"
textLink = $t.linkBluetooth.onPhoneBluetoothTips
console.log('初始化蓝牙失败:' + err.errMsg);
return textLink
}
});
} else {
textLink = "获取权限失败,将无法使用手机蓝牙进行测量"
textLink = $t.linkBluetooth.openSettingFail
return textLink
}
}
@ -291,7 +296,7 @@ function getBluetoothAdapter(err) {
}
})
} else {
textLink = "请打开手机蓝牙后,开始测量"
textLink = $t.linkBluetooth.onPhoneBluetoothTips
return textLink
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More