新增身高增量对比
This commit is contained in:
parent
5b0c7348a6
commit
50ee190427
26
App.vue
26
App.vue
|
|
@ -27,10 +27,6 @@
|
|||
that.$store.commit('changePhoneInfo', {
|
||||
platform: 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首次安装没有网络
|
||||
|
|
@ -78,7 +74,7 @@
|
|||
that.handleoginversion()
|
||||
that.handleCityList()
|
||||
that.handleCooperationUrl()
|
||||
console.log('App Launch')
|
||||
console.log('App Launch', uni.getLocale())
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show')
|
||||
|
|
@ -94,15 +90,27 @@
|
|||
// 版本信息
|
||||
handleoginversion() {
|
||||
let that = this
|
||||
that.$model.getloginversion({}).then(res => {
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.setStorageSync('language', 'en')
|
||||
// #endif
|
||||
that.$model.getloginversion({
|
||||
is_wechat: uni.getSystemInfoSync().uniPlatform == 'app' ? false : true
|
||||
}).then(res => {
|
||||
that.$store.commit('changeLanguage', res.data.language_arr)
|
||||
if (res.code == 0) {
|
||||
// uni.setLocale(res.data.language)
|
||||
uni.setStorageSync('language', res.data.language)
|
||||
uni.$emit('login-sucesss');
|
||||
console.log("已登录手机语言", res.data.language)
|
||||
} else {
|
||||
uni.getSystemInfo({
|
||||
success(e) {
|
||||
let language = uni.getStorageSync('language') ? uni.getStorageSync(
|
||||
'language') : e.language.indexOf("zh") != -1 ? "zh-Hans" : e
|
||||
.language
|
||||
uni.setLocale(language)
|
||||
uni.setStorageSync('language', language)
|
||||
uni.$emit('need-login');
|
||||
console.log("未登录手机语言", language)
|
||||
}
|
||||
})
|
||||
}
|
||||
// #ifdef APP-PLUS||APP
|
||||
that.$store.commit('changePhoneInfo', {
|
||||
|
|
|
|||
|
|
@ -8,10 +8,13 @@
|
|||
<view class="info" @click="handleAddUser(1)">
|
||||
<view class="size18 bold">{{info.nickname}}</view>
|
||||
<view class="mt-5">
|
||||
<text class="mr-10">{{$t("common.infoGender")}}:{{info.gender==1?$t("common.infoMan"):info.gender==2?$t("common.infoWoman"):$t("common.infoUnknown")}}</text>
|
||||
<text
|
||||
class="mr-10">{{$t("common.infoGender")}}:{{info.gender==1?$t("common.infoMan"):info.gender==2?$t("common.infoWoman"):$t("common.infoUnknown")}}</text>
|
||||
<text class="ml-10">{{$t("common.infoAge")}}:{{info.age}}{{$t("common.infoAgeunit")}}</text>
|
||||
</view>
|
||||
<view class="mt-5" v-if="info.measure_model==1">{{$t("common.infoNowUser")}}{{$t("common.infoAddress")}}:{{info.address}}</view>
|
||||
<view class="mt-5" v-if="info.measure_model==1&&language=='zh-Hans'">
|
||||
{{$t("common.infoNowUser")}}{{$t("common.infoAddress")}}:{{info.address}}
|
||||
</view>
|
||||
</view>
|
||||
<text class="t-icon t-icon-qiehuan1" @click="$store.commit('changeDrawe', true)" v-if="isLeft"></text>
|
||||
</view>
|
||||
|
|
@ -75,6 +78,7 @@
|
|||
province: [], //省
|
||||
city: [], //市
|
||||
area: [], //区
|
||||
language: "",
|
||||
indicatorStyle: `height: 45px;`,
|
||||
};
|
||||
},
|
||||
|
|
@ -107,6 +111,7 @@
|
|||
that.handleCityList()
|
||||
}
|
||||
}, 1000);
|
||||
that.language = uni.getStorageSync('language') ? uni.getStorageSync('language') : uni.getLocale()
|
||||
},
|
||||
watch: {
|
||||
userAddress() {
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@
|
|||
"titleContrast": "Data comparison",
|
||||
"titleDetail": "Details",
|
||||
"titleBody": "Curve/Target",
|
||||
"titleIncrement": "Increment",
|
||||
|
||||
"titleLanguage": "Language switching",
|
||||
|
||||
|
|
@ -229,7 +230,7 @@
|
|||
|
||||
"infoHeight": "height",
|
||||
|
||||
"infoHead": "head circumference",
|
||||
"infoHead": "HC",
|
||||
|
||||
"infoWeight": "weight",
|
||||
|
||||
|
|
@ -259,7 +260,7 @@
|
|||
|
||||
"linkBluetooth": {
|
||||
|
||||
"onBluetoothTips": "Please search for the device while it is powered on.",
|
||||
"onBluetoothTips": "Please make sure the device is on.",
|
||||
|
||||
"onBluetoothHaveFound": "Has been discovered",
|
||||
|
||||
|
|
@ -269,72 +270,76 @@
|
|||
|
||||
"onBluetoothBind": "Device Binding Process Description",
|
||||
|
||||
"onBluetoothSelect": "Select Bluetooth for binding",
|
||||
"onBluetoothSelect": "Select BLE for binding",
|
||||
|
||||
"onPhoneBluetoothTips": "The phone's Bluetooth is not turned on.",
|
||||
"onPhoneBluetoothTips": "The phone's BLE is not turned on.",
|
||||
|
||||
"onDeviceBluetoothTips": "Please make sure the device is powered on and the Bluetooth permission on your phone is enabled!",
|
||||
"onDeviceBluetoothTips": "Please make sure the device is powered on and the BLE permission on your phone is enabled!",
|
||||
|
||||
"Youdaoplaceholder0 ": "You need to authorize the use of Bluetooth on your phone",
|
||||
"accreditTips ": "You need to authorize the use of your mobile phone's BLE",
|
||||
|
||||
"openBluetoothSuccess": "Bluetooth permission was obtained successfully. Reconnect to Bluetooth.",
|
||||
"openBluetoothSuccess": "BLE permission was obtained successfully. Reconnect to BLE.",
|
||||
|
||||
"openSettingFail": "Permission acquisition failed. Measurement cannot be conducted using the phone's Bluetooth.",
|
||||
"openSettingFail": "Failed to obtain permission",
|
||||
|
||||
"isLinkBluetooth": "Please connect the device first.",
|
||||
|
||||
"startlinkBluetooth": "Start Connecting",
|
||||
"linkBluetooth": "Bluetooth connection in progress",
|
||||
|
||||
"anewlinkBluetooth": "Reconnect",
|
||||
"linkBluetooth": "BLE connection in progress",
|
||||
|
||||
"linkBluetoothFail": "Device connection failed. Return to the home page and reconnect.",
|
||||
"anewlinkBluetooth": "reconnection",
|
||||
|
||||
"linkBluetoothSuccess": "Bluetooth connection successful. Please start measuring.",
|
||||
"linkBluetoothFail": "Connection failed",
|
||||
|
||||
"linkBluetoothSuccess": "The connection is successful. Start measuring",
|
||||
|
||||
"startSearchBluetooth": "Start searching",
|
||||
|
||||
"searchBluetooth": "Bluetooth search ongoing",
|
||||
"searchBluetooth": "BLE search ongoing",
|
||||
|
||||
"searchBluetoothFail": "Re-search",
|
||||
"Nodevicefound": "No Bluetooth device was found",
|
||||
"searchBluetoothFail": "Search again",
|
||||
|
||||
"Nodevicefound": "No BLE 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.",
|
||||
"openDeviceeMeasureTips": "Please turn on the Bluetooth of your mobile phone",
|
||||
"openDeviceeMeasureTips2": "Please turn on the location information of your mobile phone",
|
||||
|
||||
"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.",
|
||||
"deviceDisconnection": "Connection interrupted Reconnect",
|
||||
|
||||
"offBluetooth": "BLE is turned off. Measure after turning on BLE.",
|
||||
|
||||
"remeasure": "Remeasure",
|
||||
|
||||
"StableWeight": "Stable weight",
|
||||
|
||||
"StableWeightText": "Your stable weight is :",
|
||||
"StableWeightText": "stable weight is :",
|
||||
|
||||
"realTimeWeight": "Real-time weight",
|
||||
|
||||
"realTimeWeightText": "Your real-time weight is :",
|
||||
"realTimeWeightText": "real-time weight is :",
|
||||
|
||||
"heightText": "Your height is",
|
||||
|
||||
"zeroBtn": "Reset to zero",
|
||||
"zeroBtn": "zero",
|
||||
|
||||
"LockBtn": "Lock",
|
||||
|
||||
"SaveResult": "Save the result",
|
||||
"SaveResult": "Save",
|
||||
|
||||
"measureResultTips": "Measurement Result Prompts",
|
||||
"measureResultTips": "Measurement Result Tips",
|
||||
|
||||
"nowWeight": "The weight measured this time is",
|
||||
"nowWeight": "this weight ",
|
||||
|
||||
"lastHeight": "The last height measurement was:",
|
||||
"lastHeight": "last height ",
|
||||
|
||||
"lastWeight": "The last measured weight was:",
|
||||
"lastWeight": "last weight ",
|
||||
|
||||
"nowHeight": "The height measured this time is:",
|
||||
"lastHead": "The last measurement of head circumference was:",
|
||||
"nowHeight": "this height ",
|
||||
|
||||
"lastHead": "last head ",
|
||||
"errorOperation": "Operation error. Please remeasure."
|
||||
|
||||
},
|
||||
|
|
@ -496,6 +501,7 @@
|
|||
"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",
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@
|
|||
"titleBusinesSList": "设备列表",
|
||||
"titleBusinesSearch": "搜索设备",
|
||||
"titleInheritHeighet": "身高预测",
|
||||
"titleIncrement": "增量对比",
|
||||
"titleBmi": "BMI测评",
|
||||
"titlePhone": "绑定手机号",
|
||||
"titleEmail": "绑定邮箱",
|
||||
|
|
|
|||
2
main.js
2
main.js
|
|
@ -18,7 +18,7 @@ Vue.prototype.$model = model;
|
|||
// 语言
|
||||
|
||||
let i18nConfig = {
|
||||
locale: uni.getStorageSync('language'),
|
||||
locale: uni.getStorageSync('language') ? uni.getStorageSync('language') : uni.getLocale(),
|
||||
messages
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="weightPages">
|
||||
<view class="content ">
|
||||
<view class="status">{{textLink}}</view>
|
||||
<view class="status overflow">{{textLink}}</view>
|
||||
<view class="quan">
|
||||
<view>
|
||||
<text class="weight">{{weight?weight:'0.00'}}</text>{{unit}}
|
||||
|
|
@ -14,8 +14,9 @@
|
|||
</view>
|
||||
<view class="tips">
|
||||
<text>{{$t("tips.msgTitle")}}:</text>
|
||||
<text>{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
|
||||
<text>{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
|
||||
<text>1,{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
|
||||
<text>2,{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
|
||||
<text>3,{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 手动记录 -->
|
||||
|
|
@ -499,13 +500,14 @@
|
|||
}
|
||||
|
||||
.status {
|
||||
width: 70%;
|
||||
width:auto;
|
||||
font-size: 16px;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
text-align: center;
|
||||
border-radius: 15px;
|
||||
margin: 15px auto;
|
||||
padding: 0 15px;
|
||||
background-color: #ffdda6;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
<template>
|
||||
<view class="weightPages">
|
||||
<view class="content ">
|
||||
<view class="status">{{textLink}}</view>
|
||||
<view class="status overflow">{{textLink}}</view>
|
||||
<view class="text">{{text}}</view>
|
||||
<view class="image">
|
||||
<image src="/pageTwo/static/HC.png" class="image3"></image>
|
||||
</view>
|
||||
<view class="tips">
|
||||
<text>{{$t("tips.msgTitle")}}:</text>
|
||||
<text>{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
|
||||
<text>{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
|
||||
<text>1,{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
|
||||
<text>2,{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
|
||||
<text>3,{{$t("linkBluetooth.openDeviceeMeasureTips2")}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 手动记录 -->
|
||||
|
|
@ -340,13 +341,14 @@
|
|||
}
|
||||
|
||||
.status {
|
||||
width: 70%;
|
||||
width: auto;
|
||||
font-size: 16px;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
text-align: center;
|
||||
border-radius: 15px;
|
||||
margin: 15px auto;
|
||||
padding: 0 15px;
|
||||
background-color: #ffdda6;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,15 +1,16 @@
|
|||
<template>
|
||||
<view class="weightPages">
|
||||
<view class="content ">
|
||||
<view class="title">{{$t("linkBluetooth.linkBluetoothSuccess")}}</view>
|
||||
<view class="title overflow">{{$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">
|
||||
<text>{{$t("tips.msgTitle")}}:</text>
|
||||
<text>{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
|
||||
<text>{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
|
||||
<text>1,{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
|
||||
<text>2,{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
|
||||
<text>3,{{$t("linkBluetooth.openDeviceeMeasureTips2")}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 手动记录 -->
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
<template>
|
||||
<view class="weightPages">
|
||||
<view class="content ">
|
||||
<view class="title">{{$t("linkBluetooth.linkBluetoothSuccess")}}</view>
|
||||
<view class="title overflow">{{$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">
|
||||
<text>{{$t("tips.msgTitle")}}:</text>
|
||||
<text>{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
|
||||
<text>{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
|
||||
<text>1,{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
|
||||
<text>2,{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
|
||||
<text>3,{{$t("linkBluetooth.openDeviceeMeasureTips2")}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 手动记录 -->
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
<template>
|
||||
<view class="weightPages">
|
||||
<view class="content ">
|
||||
<view class="title">{{$t("linkBluetooth.linkBluetoothSuccess")}}</view>
|
||||
<view class="title overflow">{{$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">
|
||||
<text>{{$t("tips.msgTitle")}}:</text>
|
||||
<text>{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
|
||||
<text>{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
|
||||
<text>1,{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
|
||||
<text>2,{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
|
||||
<text>3,{{$t("linkBluetooth.openDeviceeMeasureTips2")}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 手动记录 -->
|
||||
|
|
@ -18,10 +19,11 @@
|
|||
<view class="Blue">
|
||||
<view class="h4">{{$t("linkBluetooth.measureResultTips")}}</view>
|
||||
<view class="Blue-box">
|
||||
{{$t("linkBluetooth.nowWeight")}}<text>{{weight}}{{unit}}</text>
|
||||
{{$t("linkBluetooth.nowWeight")}}:<text>{{weight}}{{unit}}</text>
|
||||
</view>
|
||||
<view class="Blue-box">
|
||||
{{$t("linkBluetooth.lastHeight")}}<input v-model="height" type="digit" :placeholder="$t('tips.verifyHeight')" />cm
|
||||
{{$t("linkBluetooth.lastHeight")}}:<input v-model="height" type="digit"
|
||||
:placeholder="$t('tips.verifyHeight')" />cm
|
||||
</view>
|
||||
<view class="Blue-btn Blue-close" @click="handleBack">{{$t("tips.btnSancellation")}}</view>
|
||||
<view class="Blue-btn" @click="handleGetMeasure">{{$t("linkBluetooth.SaveResult")}}</view>
|
||||
|
|
|
|||
|
|
@ -1,41 +1,38 @@
|
|||
<template>
|
||||
<view class="content skipping">
|
||||
<!--自由训练 -->
|
||||
<view class="title">
|
||||
{{info.active==1?$t("skip.jumpFree"):info.active==2?$t("skip.Countdown"):$t("skip.backwardCount")}}</view>
|
||||
<view class="title">{{info.active==1?'自由跳':info.active==2?'倒计时':'倒计数'}}</view>
|
||||
<view class="skiptop">
|
||||
<view class="item">
|
||||
<view class="item-ite">
|
||||
{{info.active==1?$t("skip.jumpFreeDegree"):info.active==2?$t("skip.jumpFreeNumber"):$t("skip.jumpTargetDegree")}}<text>{{weight}}</text>
|
||||
<view class="item-ite">{{info.active==1?'自由次数':info.active==2?"个数":'目标次数'}}<text>{{weight}}</text>
|
||||
</view>
|
||||
<view class="item-ite">
|
||||
{{info.active==2?$t("skip.jumpTargetTime"):$t("skip.MinuteSecond")}}<text>{{time_m?time_m:'00'}}:{{time_s?time_s:'00'}}</text>
|
||||
{{info.active==2?'目标时长 分:秒':"分:秒"}}<text>{{time_m?time_m:'00'}}:{{time_s?time_s:'00'}}</text>
|
||||
</view>
|
||||
<view class="item-ite">{{$t("skip.Consumed")}}/kcal<text>{{Math.floor(kcal)}}</text></view>
|
||||
<view class="item-ite">消耗/kcal<text>{{Math.floor(kcal)}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="image">
|
||||
<image src="/pageTwo/static/t01.gif"></image>
|
||||
</view>
|
||||
<view class="end" @longpress="onlongpress">{{$t("skip.LongpressEnd")}}</view>
|
||||
<view class="end" @longpress="onlongpress">长按结束</view>
|
||||
<!-- 报告 -->
|
||||
<view class="wrapper" v-if="iswrapper">
|
||||
<view class="bg">
|
||||
<view class="edit">
|
||||
<view class="editem">
|
||||
<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>平均速度:<text class="cyello Blue size20 mr-5">{{bpm.toFixed(1)}}</text>bpm</view>
|
||||
<view class="size12 c999 ">(bpm=个/分钟)</view>
|
||||
</view>
|
||||
<view class="center" :class="[language== 'zh-Hans'?'':'center2']">
|
||||
<view class="center">
|
||||
<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>{{$t("skip.Times")}}
|
||||
<text class="cyello Blue size20 mr-5">{{Bcount}}</text>次
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -44,21 +41,20 @@
|
|||
<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>{{$t("skip.Number")}}
|
||||
<text class="cyello Blue size20 mr-5">{{continuous}}</text>个
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<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 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>
|
||||
<view class="btn" @click="handleTarget">{{$t("skip.complete")}}</view>
|
||||
<view class="btn" @click="handleTarget">完成</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -87,8 +83,7 @@
|
|||
isToggle: false,
|
||||
isEnd: false,
|
||||
iswrapper: false,
|
||||
isStart: false,
|
||||
language: "",
|
||||
isStart: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -96,165 +91,162 @@
|
|||
},
|
||||
onLoad(options) {
|
||||
let that = this
|
||||
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);
|
||||
// })
|
||||
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("PCT01返回onUnload")
|
||||
},
|
||||
watch: {
|
||||
isConnected: function() {
|
||||
let that = this
|
||||
// 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)
|
||||
// }
|
||||
if (!that.isConnected) {
|
||||
uni.showModal({
|
||||
title: '连接已断开',
|
||||
content: '训练过程中已与设备连接中断,请重新连接设备再开始训练',
|
||||
showCancel: false,
|
||||
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: 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)
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
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)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 模式被结束
|
||||
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: {
|
||||
|
|
@ -362,10 +354,10 @@
|
|||
console.log('短震动');
|
||||
if (Number(that.time) < 10) {
|
||||
uni.showModal({
|
||||
title: that.$t("tips.msgTitle"),
|
||||
content: that.$t("skip.NOComplete"),
|
||||
cancelText: that.$t('tips.btnBack'),
|
||||
confirmText: that.$t('tips.btnContinue'),
|
||||
title: '友情提示',
|
||||
content: '本次跳绳时间低于10秒,记录将不会被保存?',
|
||||
confirmText: "继续",
|
||||
cancelText: "返回",
|
||||
success: function(res) {
|
||||
if (res.cancel) {
|
||||
that.isStart = false
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@
|
|||
that.startBluetoothDeviceDiscovery()
|
||||
},
|
||||
fail: e => {
|
||||
that.$tools.msg(that.$t("linkBluetooth.onDeviceBluetoothTips"))
|
||||
that.$tools.msg(that.$t("linkBluetooth.Nodevicefound"))
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
@ -237,7 +237,7 @@
|
|||
that.onBluetoothDeviceFound();
|
||||
},
|
||||
fail: res => {
|
||||
that.$tools.msg(that.$t("linkBluetooth.onDeviceBluetoothTips"))
|
||||
that.$tools.msg(that.$t("linkBluetooth.Nodevicefound"))
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,343 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="top">
|
||||
<text class="overflow">{{info.nickname}}身高/体重增量对比</text>
|
||||
</view>
|
||||
<table class="table table3">
|
||||
<tr>
|
||||
<th>姓名</th>
|
||||
<td>{{info.nickname}}</td>
|
||||
<th>性别</th>
|
||||
<td>{{info.gender==0?"未知":info.sex==1?"男":"女"}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>出生年月</th>
|
||||
<td>{{info.birthday}}</td>
|
||||
<th>年龄</th>
|
||||
<td>{{info.age?info.age:"0岁"}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<view class="title">实测身高增量对比</view>
|
||||
<table class="table table2">
|
||||
<tr>
|
||||
<th>项目名称</th>
|
||||
<th>结果</th>
|
||||
<th>结论</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>实测身高</td>
|
||||
<td>{{height.height?height.height:0}}cm</td>
|
||||
<td>{{height.statusHeight}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>近半年增量</td>
|
||||
<td>{{height.halfyearheight?height.halfyearheight:0}}cm</td>
|
||||
<td>{{height.statusHalfyear}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>近一年增量</td>
|
||||
<td>{{height.yearheight?height.yearheight:0}}cm</td>
|
||||
<td>{{height.statusYear}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- 实测身高 -->
|
||||
<view class="box">
|
||||
<view class="title">
|
||||
实测身高:{{height.height?height.height:0}}cm
|
||||
<text class="btn btn2" v-if="height.statusHeight"
|
||||
:style="{backgroundColor:height.colorHeight}">{{height.statusHeight}}</text>
|
||||
</view>
|
||||
<view class="rank" :class="{TextLeft:list.length>6}">
|
||||
<view class="list" v-for="(item , index) in list" :key="index">
|
||||
<view class="left"><text>{{item.minvalue}}cm</text></view>
|
||||
<view class="center" :style="{backgroundColor:item.color}"><text>{{item.text}}</text></view>
|
||||
<view class="right">
|
||||
<view v-if="height.heightlevel==item.level" :style="{color:item.color}">
|
||||
<text class="triangle_left" :style="{borderRightColor:item.color}"></text>
|
||||
<text class="text">{{height.height}}</text>cm
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
在{{user.age}}的{{user.sex==0?"未知":user.sex==1?"男":"女"}}宝宝中身高属于<span
|
||||
:style="{color:height.colorHeight}">{{height.statusHeight}}</span>,请每月记录身高,持续监测孩子生长发育情况
|
||||
</view>
|
||||
</view>
|
||||
<!-- 近半年增量 -->
|
||||
<view class="box">
|
||||
<view class="title">
|
||||
近半年增量:{{height.halfyearheight?height.halfyearheight:0}}cm
|
||||
<text class="btn btn2" v-if="height.statusHalfyear"
|
||||
:style="{backgroundColor:height.colorHalfyear}">{{height.statusHalfyear}}</text>
|
||||
</view>
|
||||
<view class="rank">
|
||||
<view class="list list3" v-for="(item , ind) in height.halfyearstandlist" :key="ind">
|
||||
<view class="left"><text>{{item.val}}cm</text></view>
|
||||
<view class="center" :style="{backgroundColor:item.color}">{{item.text}}</view>
|
||||
<view class="right">
|
||||
<view v-if="height.halfyearheightlevel==item.level" :style="{color:item.color}">
|
||||
<text class="triangle_left" :style="{borderRightColor:item.color}"></text>
|
||||
<text class="text">{{height.halfyearheight}}</text>cm
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
提示:最近宝宝生长<span
|
||||
:style="{color:height.colorHalfyear}">{{height.statusHalfyear}}</span>,请持续跟踪宝宝数据,检测孩子生长发育情况
|
||||
</view>
|
||||
</view>
|
||||
<!-- 近一年增量 -->
|
||||
<view class="box">
|
||||
<view class="title">
|
||||
近一年增量:{{height.yearheight?height.yearheight:0}}cm
|
||||
<text class="btn btn2" v-if="height.statusYear"
|
||||
:style="{backgroundColor:height.colorYear}">{{height.statusYear}}</text>
|
||||
</view>
|
||||
<view class="rank">
|
||||
<view class="list list3" v-for="(item , ind) in height.yearstandlist" :key="ind">
|
||||
<view class="left"><text>{{item.val}}cm</text></view>
|
||||
<view class="center" :style="{backgroundColor:item.color}">{{item.text}}</view>
|
||||
<view class="right">
|
||||
<view v-if="height.yearheightlevel==item.level" :style="{color:item.color}">
|
||||
<text class="triangle_left" :style="{borderRightColor:item.color}"></text>
|
||||
<text class="text">{{height.yearheight}}</text>cm
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
最近宝宝生长<span :style="{color:height.colorYear}">{{height.statusYear}}</span>,请持续跟踪宝宝数据,检测孩子生长发育情况</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
export default {
|
||||
computed: {
|
||||
...mapState(["user"]),
|
||||
info() {
|
||||
return this.user
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isF4: true,
|
||||
height: {},
|
||||
list: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
that.$model.getYearHeightInfo({
|
||||
aud_id: that.user.id
|
||||
}).then(res => {
|
||||
console.log("身高增量对比", res)
|
||||
if (res.code != 0) false
|
||||
that.height = res.data
|
||||
that.list = res.data.list.length ? res.data.list : []
|
||||
})
|
||||
|
||||
//
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped="scoped" lang="scss">
|
||||
.content {
|
||||
padding: 15px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
margin: 30rpx auto;
|
||||
|
||||
.btn {
|
||||
font-weight: 500;
|
||||
font-size: 12px;
|
||||
padding: 2px 7px;
|
||||
border-radius: 2px;
|
||||
margin-left: 30rpx;
|
||||
background-color: #6492f6;
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
width: 100%;
|
||||
border: 1px solid #d69231;
|
||||
border-bottom: none;
|
||||
box-sizing: border-box;
|
||||
border-spacing: inherit;
|
||||
font-size: 12px;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
border-right: none;
|
||||
|
||||
th {
|
||||
width: 20%;
|
||||
float: left;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
background: #ffcf85;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #d69231;
|
||||
border-right: 1px solid #d69231;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
td {
|
||||
box-sizing: border-box;
|
||||
background: #e4cdac21;
|
||||
display: block;
|
||||
float: left;
|
||||
width: 30%;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
border-bottom: 1px solid #d69231;
|
||||
border-right: 1px solid #d69231;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.table2 {
|
||||
margin-top: 30rpx;
|
||||
|
||||
th,
|
||||
td {
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
width: 33.3%;
|
||||
display: inherit;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.top {
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
margin: 30rpx;
|
||||
color: #999;
|
||||
|
||||
text {
|
||||
width: 100%;
|
||||
display: block;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.TextLeft :nth-last-child(2).list {
|
||||
.center text {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
z-index: 9;
|
||||
text-align: center;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.rank {
|
||||
text-align: center;
|
||||
margin-top: 50rpx;
|
||||
|
||||
.list {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
display: flex;
|
||||
margin-left: 20px;
|
||||
line-height: 20px;
|
||||
justify-content: center;
|
||||
|
||||
.left {
|
||||
width: 90px;
|
||||
line-height: 60px;
|
||||
text-align: left;
|
||||
color: #666;
|
||||
font-size: 13px;
|
||||
border-bottom: 1px solid #dfdfdf;
|
||||
}
|
||||
|
||||
.center {
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.right {
|
||||
width: 120px;
|
||||
|
||||
view {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.triangle_left:after {
|
||||
clear: both;
|
||||
content: "";
|
||||
display: inline-block;
|
||||
margin-top: 12px;
|
||||
margin-right: 10px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-top: 8px solid transparent;
|
||||
border-right: 8px solid;
|
||||
border-bottom: 8px solid transparent;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:last-child .left {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.list3 {
|
||||
height: 60px !important;
|
||||
line-height: 60px !important;
|
||||
|
||||
.center {
|
||||
height: 60px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
font-size: 12px;
|
||||
margin-top: 15px;
|
||||
line-height: 25px;
|
||||
color: #666;
|
||||
|
||||
span {
|
||||
color: red;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -113,7 +113,8 @@
|
|||
data: that.phone,
|
||||
password: that.password,
|
||||
c_password: that.password2,
|
||||
code: that.code
|
||||
code: that.code,
|
||||
language: that.language
|
||||
}
|
||||
let https = that.type == 'register' ? that.$model.getregister(account) : that.$model.getResetPassword(
|
||||
account)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<view class="content">
|
||||
<view class="bg"></view>
|
||||
<!-- 语言切换 -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<view class="language">
|
||||
<view class="nowlanguage" @click="Islanguage =!Islanguage">
|
||||
{{nowlanguage}}
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<view class="top">
|
||||
<image src="../../static/logo2.png"></image>
|
||||
<text>Reedaw</text>
|
||||
|
|
@ -115,13 +117,15 @@
|
|||
...mapState(["languageList"]),
|
||||
},
|
||||
onLoad() {
|
||||
// #ifdef MP-WEIXIN
|
||||
that.login()
|
||||
// #endif
|
||||
},
|
||||
onReady() {
|
||||
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
|
||||
},
|
||||
methods: {
|
||||
// 勾选协议
|
||||
|
|
@ -160,7 +164,8 @@
|
|||
this.$model.getonlogin({
|
||||
data: that.phone,
|
||||
validate_data: that.isCode ? that.code : that.password,
|
||||
validate_type: that.isCode ? 'code' : 'password'
|
||||
validate_type: that.isCode ? 'code' : 'password',
|
||||
language: that.language
|
||||
}).then(res => {
|
||||
console.log("data", res.data)
|
||||
that.$tools.msg(res.msg)
|
||||
|
|
@ -253,10 +258,10 @@
|
|||
// 语言切换
|
||||
handleSetlanguage(ite) {
|
||||
let that = this
|
||||
uni.setLocale(ite.key)
|
||||
that.language = ite.key
|
||||
that.nowlanguage = ite.value
|
||||
that.Islanguage = false
|
||||
uni.setLocale(ite.key)
|
||||
uni.setStorageSync('language', ite.key)
|
||||
console.log("ite", ite.key)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="lan border-bottom" v-if="memInfo.measure_model==1">
|
||||
<view class="lan border-bottom" v-if="memInfo.measure_model==1&&language=='zh-Hans'">
|
||||
<view class="left">身份信息</view>
|
||||
<view class="right">
|
||||
<picker mode="selector" :range="identityList" :value="identityIndex" range-key="name"
|
||||
|
|
@ -91,14 +91,15 @@
|
|||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="lan border-bottom" @click="handleCityList" v-if="memInfo.measure_model==1">
|
||||
<view class="lan border-bottom" @click="handleCityList"
|
||||
v-if="memInfo.measure_model==1 &&language=='zh-Hans'">
|
||||
<view class="left">所属地区</view>
|
||||
<view class="right">
|
||||
<view class="mr-10">{{memInfo.address?memInfo.address:'请选择'}}</view>
|
||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="lan border-bottom" v-if="memInfo.measure_model==1">
|
||||
<view class="lan border-bottom" v-if="memInfo.measure_model==1&&language=='zh-Hans'">
|
||||
<view class="left">所在年级</view>
|
||||
<view class="right">
|
||||
<picker mode="selector" :range="gradeList" :value="gradeIndex" range-key="name"
|
||||
|
|
@ -179,7 +180,7 @@
|
|||
uni.setNavigationBarTitle({
|
||||
title: this.$t('common.titleMember'),
|
||||
})
|
||||
this.language = uni.getLocale()
|
||||
this.language = uni.getStorageSync('language')
|
||||
},
|
||||
onLoad(options) {
|
||||
let that = this
|
||||
|
|
@ -223,11 +224,11 @@
|
|||
that.$tools.msg(that.$t("tips.verifyBirthday"))
|
||||
return;
|
||||
}
|
||||
if (that.memInfo.measure_model == 1 && !that.memInfo.identity_id) {
|
||||
if (that.language=='zh-Hans'&&that.memInfo.measure_model == 1 && !that.memInfo.identity_id) {
|
||||
that.$tools.msg("请选择身份信息")
|
||||
return;
|
||||
}
|
||||
if (that.memInfo.measure_model == 1 && !that.memInfo.address) {
|
||||
if (that.language=='zh-Hans'&&that.memInfo.measure_model == 1 && !that.memInfo.address) {
|
||||
that.$tools.msg("请选择所属地区")
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -350,6 +350,12 @@
|
|||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "home/childPK",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "webview/webview",
|
||||
"style": {
|
||||
|
|
|
|||
|
|
@ -23,11 +23,57 @@
|
|||
</view>
|
||||
|
||||
<!-- 工具区 -->
|
||||
<view class="tools_l">
|
||||
<view v-for="(item,index) in toollist" :key="index" class="list" @click="handleTool(index,item.path)"
|
||||
<view class="tools_l" :class="[language=='zh-Hans'?'':'list2']">
|
||||
<!-- <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 class="list" @click="handleTool('/pages/score/score')" v-if="language=='zh-Hans'">
|
||||
<image src="../../static/q2.png"></image>
|
||||
<view class="text">中考估分</view>
|
||||
</view>
|
||||
<view class="list" @click="handleTool('/pageTwo/home/bmi')">
|
||||
<image src="../../static/q4.png"></image>
|
||||
<view class="text">{{$t("common.titleBmi")}}</view>
|
||||
</view>
|
||||
<view class="list" @click="handleTool('/pageTwo/home/inheritHeighet')">
|
||||
<image src="../../static/q6.png"></image>
|
||||
<view class="text">{{$t("common.titleInheritHeighet")}}</view>
|
||||
</view>
|
||||
<view class="list" @click="handleTool('/pages/skiping/skip?acd_id=6')" v-if="language=='zh-Hans'">
|
||||
<image src="../../static/q1.png"></image>
|
||||
<view class="text">智能跳绳</view>
|
||||
</view>
|
||||
<view class="list" @click="handleTool('/pages/lunging/vitalcapacity?acd_id=8')" v-if="language=='zh-Hans'">
|
||||
<image src="../../static/q10.png"></image>
|
||||
<view class="text">肺活量训练</view>
|
||||
</view>
|
||||
<view class="list" @click="handleTool('/pageTwo/home/childPK')"
|
||||
v-if="Number(userInfo.age)<=16&&language=='zh-Hans'">
|
||||
<image src="../../static/q11.png"></image>
|
||||
<view class="text">增量对比</view>
|
||||
</view>
|
||||
<view class="list" @click="handleTool('/pageTwo/compk/contrast?acd_id=2')">
|
||||
<image src="../../static/q3.png"></image>
|
||||
<view class="text">{{$t("common.titleContrast")}}</view>
|
||||
</view>
|
||||
<view class="list" @click="handleTool('/pages/body/body?acd_id=2')">
|
||||
<image src="../../static/q5.png"></image>
|
||||
<view class="text">{{$t("common.titleBody")}}</view>
|
||||
</view>
|
||||
<view class="list" @click="handleTool()">
|
||||
<image src="../../static/q7.png"></image>
|
||||
<view class="text">{{$t("index.manualRecording")}}</view>
|
||||
</view>
|
||||
<view class="list" @click="handleTool('/pageTwo/history/history?acd_id=2')">
|
||||
<image src="../../static/q8.png"></image>
|
||||
<view class="text">{{$t("common.titleHistory")}}</view>
|
||||
</view>
|
||||
<view class="list" @click="handleTool('/pageTwo/my/manage')"
|
||||
v-if="Number(userInfo.age)>16&&language=='zh-Hans'">
|
||||
<image src="../../static/q9.png"></image>
|
||||
<view class="text">成员管理</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
@ -38,7 +84,7 @@
|
|||
<view class="time">{{info?info.record_time:''}}</view>
|
||||
</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="data data2" :style="{height:(item.difference_val?'60px':'auto')}">
|
||||
<view class="left" :class="[item.difference_val?'':'left2']">
|
||||
<view class="name bold">{{item.name}}</view>
|
||||
<view>
|
||||
|
|
@ -47,7 +93,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="right" v-if="item.difference_val">
|
||||
<view>{{$t("index.ideal")}}{{item.name}}</view>
|
||||
<view style="width: 100%;">{{$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>
|
||||
|
|
@ -77,13 +123,6 @@
|
|||
</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)">
|
||||
|
|
@ -331,56 +370,6 @@
|
|||
proposalnd: 1,
|
||||
unit: "",
|
||||
language: "",
|
||||
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: {
|
||||
|
|
@ -404,10 +393,6 @@
|
|||
that.activeHeight = 0
|
||||
return that.MeasureResult
|
||||
},
|
||||
toollist() {
|
||||
let list = this.toolList
|
||||
return uni.getStorageSync('language') == "zh-Hans" ? list : list.splice(1, 7)
|
||||
},
|
||||
isCoupon() {
|
||||
return this.bannerCon.isCoupon
|
||||
},
|
||||
|
|
@ -427,7 +412,10 @@
|
|||
uni.onBluetoothAdapterStateChange(function(res) {
|
||||
that.$store.commit("changeBluetooth", res.available);
|
||||
})
|
||||
console.log("token", uni.getStorageSync('token'))
|
||||
if (uni.getStorageSync('token')) {
|
||||
that.openBluetoothAdapter()
|
||||
}
|
||||
that.onBLEConnectionStateChange()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
|
|
@ -478,13 +466,15 @@
|
|||
url: "/pageTwo/cardList/card"
|
||||
})
|
||||
},
|
||||
handleTool(ind, path) {
|
||||
handleTool(path) {
|
||||
let that = this
|
||||
console.log("path", path)
|
||||
if (path == "") {
|
||||
console.log("1111", path)
|
||||
if (path == "" || path == undefined) {
|
||||
that.handlerRecord(2)
|
||||
} else {
|
||||
that.navTo(path)
|
||||
uni.navigateTo({
|
||||
url: path
|
||||
})
|
||||
}
|
||||
},
|
||||
// 报告页
|
||||
|
|
@ -556,7 +546,7 @@
|
|||
var that = this;
|
||||
uni.onBluetoothDeviceFound(res => {
|
||||
res.devices.forEach(device => {
|
||||
console.log("name", device.name)
|
||||
// console.log("name", device.name)
|
||||
if (!device.name && !device.localName) {
|
||||
device.advertisData = device.advertisData ? device.advertisData : ''
|
||||
let value = that.$tools.ab2hex(device.advertisData, "")
|
||||
|
|
@ -614,7 +604,7 @@
|
|||
let that = this
|
||||
const foundDevices = that.devicesList
|
||||
const idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId)
|
||||
console.log("1111111", device.name)
|
||||
// console.log("1111111", device.name)
|
||||
if (idx === -1) {
|
||||
// 体脂秤
|
||||
if (device.name.toLowerCase().indexOf("pcl") != -1) {
|
||||
|
|
@ -874,7 +864,7 @@
|
|||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
height: 60px;
|
||||
// height: 60px;
|
||||
line-height: 30px;
|
||||
|
||||
.name {
|
||||
|
|
@ -885,6 +875,10 @@
|
|||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.name {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
|
|
@ -913,11 +907,10 @@
|
|||
}
|
||||
|
||||
.list2 {
|
||||
width: 22% !important;
|
||||
|
||||
.list {
|
||||
width: 33% !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
|
||||
.list2:nth-child(n+5) {
|
||||
width: 33% !important;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -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_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 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>
|
||||
</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">{{$t("common.titleCharts")}}</view>
|
||||
<view class="name">运动曲线</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">{{$t("common.titleHistory")}}</view>
|
||||
<view class="name">历史记录</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">{{$t("common.titleContrast")}}</view>
|
||||
<view class="name">数据对比</view>
|
||||
</view>
|
||||
<view class="item" @click="$store.commit('changeRecord',true)">
|
||||
<view class="image">
|
||||
<image src="../../static/history.png"></image>
|
||||
</view>
|
||||
<view class="name">{{$t("common.btnAdd")}}{{$t("common.titleHome")}}</view>
|
||||
<view class="name">添加记录</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -87,11 +87,6 @@
|
|||
return this.MeasureLung
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$t('common.titlevVitalcapacity'),
|
||||
})
|
||||
},
|
||||
onLoad(options) {
|
||||
let that = this
|
||||
that.acd_id = options.acd_id
|
||||
|
|
|
|||
|
|
@ -176,15 +176,14 @@
|
|||
let that = this
|
||||
that.index = e.detail.value
|
||||
that.language = that.languageList[that.index].key
|
||||
that.$model.getSetLanguage({
|
||||
language: that.languageList[that.index].key,
|
||||
}).then(res => {
|
||||
console.log("qqqqqqqqqqq", res)
|
||||
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({
|
||||
|
|
|
|||
|
|
@ -8,24 +8,24 @@
|
|||
<image v-if="islink==1" src="../../static/dui.png"></image>
|
||||
</view>
|
||||
<view class="item">
|
||||
<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 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>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="tabbar">
|
||||
<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 @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>
|
||||
<!--自由训练 -->
|
||||
<view class="box1 box" v-if="active==1">
|
||||
<view class="item">
|
||||
<text class="item-set item-set0">{{$t("skip.jumpFreedom")}}</text>
|
||||
<text class="tips">{{$t("skip.jumpUnlimited")}}</text>
|
||||
<text class="item-set item-set0">自由</text>
|
||||
<text class="tips">无限制</text>
|
||||
</view>
|
||||
<view :class="[islink==1?'start':'start Nstart']" @click="handleStart(1)">{{$t("skip.instructStart")}}</view>
|
||||
<view :class="[islink==1?'start':'start Nstart']" @click="handleStart(1)">开始</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>{{$t("skip.jumpTarget")}}</view>
|
||||
<view>调整目标</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view :class="[isConnection?'start':'start Nstart']" @click="handleStart(2)">{{$t("skip.instructStart")}}</view>
|
||||
<view :class="[isConnection?'start':'start Nstart']" @click="handleStart(2)">开始</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">{{$t("skip.jumpTarget")}}</text>
|
||||
<text class="tips" @click="disabled=true">调整目标</text>
|
||||
</view>
|
||||
<view :class="[isConnection?'start':'start Nstart']" @click="handleStart(3)">{{$t("skip.instructStart")}}</view>
|
||||
<view :class="[isConnection?'start':'start Nstart']" @click="handleStart(3)">开始</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">{{$t("common.titleCharts")}}</view>
|
||||
<view class="name">运动曲线</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">{{$t("common.titleHistory")}}</view>
|
||||
<view class="name">历史记录</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">{{$t("common.titleContrast")}}</view>
|
||||
<view class="name">数据对比</view>
|
||||
</view>
|
||||
<view class="item" @click="$store.commit('changeRecord',true)">
|
||||
<view class="image">
|
||||
<image src="@/static/history.png"></image>
|
||||
</view>
|
||||
<view class="name">{{$t("common.btnAdd")}}{{$t("common.titleHome")}}</view>
|
||||
<view class="name">添加记录</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -157,11 +157,6 @@
|
|||
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
|
||||
// 首页进入
|
||||
|
|
@ -238,7 +233,7 @@
|
|||
let that = this
|
||||
if (!that.isConnected) {
|
||||
that.islink = -1
|
||||
that.textLink = that.$t('linkBluetooth.anewlinkBluetooth')
|
||||
that.textLink = "重新连接"
|
||||
}
|
||||
that.isConnection = that.isConnected
|
||||
console.log("蓝牙是否连接", that.isConnected)
|
||||
|
|
@ -247,7 +242,7 @@
|
|||
let that = this
|
||||
if (!that.isBluetoothTyle) {
|
||||
that.isConnection = false
|
||||
that.textLink = that.$t('linkBluetooth.onPhoneBluetoothTips')
|
||||
that.textLink = "请打开手机蓝牙"
|
||||
that.islink = -1
|
||||
}
|
||||
console.log("蓝牙是否打开", that.isBluetoothTyle)
|
||||
|
|
@ -264,7 +259,7 @@
|
|||
success: e => {
|
||||
that.islink = 0
|
||||
that.handleMyTime()
|
||||
that.textLink = that.$t('linkBluetooth.searchBluetooth')
|
||||
that.textLink = "蓝牙搜索中"
|
||||
that.startBluetoothDeviceDiscovery()
|
||||
that.$store.commit("changeBluetooth", true)
|
||||
console.log('初始化蓝牙成功:' + e.errMsg);
|
||||
|
|
@ -325,14 +320,14 @@
|
|||
uni.createBLEConnection({
|
||||
deviceId: that.deviceId,
|
||||
success: res => {
|
||||
that.textLink = that.$t('linkBluetooth.linkBluetooth')
|
||||
that.textLink = "蓝牙连接中"
|
||||
setTimeout(function() {
|
||||
that.islink = 1
|
||||
that.getBLEDeviceServices()
|
||||
}, 1000)
|
||||
},
|
||||
fail: res => {
|
||||
that.textLink = that.$t('linkBluetooth.anewlinkBluetooth')
|
||||
that.textLink = "重新连接"
|
||||
console.log("设备连接失败,请重新连接", res, that.deviceId);
|
||||
}
|
||||
});
|
||||
|
|
@ -353,7 +348,7 @@
|
|||
if (service.uuid.indexOf("FFE0") != -1) {
|
||||
that.serviceId = service.uuid;
|
||||
that.isConnection = true
|
||||
that.textLink = that.$t('linkBluetooth.linkBluetoothSuccess')
|
||||
that.textLink = "连接成功"
|
||||
that.getBLEDeviceCharacteristics();
|
||||
console.log("设备的FFE0的serviceId: " + that.serviceId);
|
||||
break;
|
||||
|
|
@ -363,7 +358,7 @@
|
|||
fail: res => {
|
||||
console.log('获取设备的UUID失败:', res)
|
||||
that.islink = -1
|
||||
that.textLink = that.$t('linkBluetooth.anewlinkBluetooth')
|
||||
that.textLink = "重新连接"
|
||||
clearTimeout(myTime);
|
||||
that.isConnection = false
|
||||
}
|
||||
|
|
@ -479,7 +474,7 @@
|
|||
let m = null
|
||||
let send = null
|
||||
if (!that.isConnected) {
|
||||
that.$tools.msg(that.$t('linkBluetooth.isLinkBluetooth'))
|
||||
that.$tools.msg("请先连接设备!")
|
||||
return
|
||||
}
|
||||
if (ind == 1) { // 1自由
|
||||
|
|
@ -576,8 +571,8 @@
|
|||
myTime = setTimeout(function() {
|
||||
if (!that.devicesList.length) {
|
||||
that.islink = -1
|
||||
that.textLink = that.$t('linkBluetooth.searchBluetoothFail')
|
||||
that.$tools.showModal(that.$t('linkBluetooth.Nodevicefound'))
|
||||
that.textLink = "重新搜索"
|
||||
that.$tools.msg("没有查找到设备")
|
||||
}
|
||||
clearTimeout(myTime)
|
||||
that.$Bluetooth.stopBluetoothDevicesDiscovery()
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
|
|
@ -44,7 +44,7 @@ function startBluetoothDeviceDiscovery() {
|
|||
$Bluetooth.onBluetoothDeviceFound();
|
||||
},
|
||||
fail: res => {
|
||||
$tools.msg($t.linkBluetooth.onDeviceBluetoothTips)
|
||||
$tools.msg($t.linkBluetooth.Nodevicefound)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,19 +40,12 @@ const httpRequest = (url, method = "get", data) => {
|
|||
const get = (url, data) => {
|
||||
data.token = uni.getStorageSync('token')
|
||||
data.aan_id = uni.getStorageSync('aan_id')
|
||||
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')
|
||||
if(url!="/set_language_country"){
|
||||
data.language = uni.getLocale()
|
||||
}
|
||||
// console.log("data", url, data)
|
||||
return httpRequest(url, 'post', data)
|
||||
}
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -124,6 +124,37 @@ export default {
|
|||
return res
|
||||
})
|
||||
},
|
||||
getYearHeightInfo(param) { //获取儿童增量信息
|
||||
return http.post("/incremental_comparison", param).then(res => {
|
||||
if (res.code == 0) {
|
||||
let data = res.data
|
||||
data.list = data.list.reverse()
|
||||
for (var a = 0; a < data.list.length; a++) {
|
||||
if (data.heightlevel == data.list[a].level) {
|
||||
data.statusHeight = data.list[a].text
|
||||
data.colorHeight = data.list[a].color
|
||||
}
|
||||
}
|
||||
data.yearstandlist = data.yearstandlist.reverse()
|
||||
for (var b = 0; b < data.yearstandlist.length; b++) {
|
||||
if (data.yearheightlevel == data.yearstandlist[b].level) {
|
||||
data.statusYear = data.yearstandlist[b].text
|
||||
data.colorYear = data.yearstandlist[b].color
|
||||
}
|
||||
}
|
||||
data.halfyearstandlist = data.halfyearstandlist.reverse()
|
||||
for (var c = 0; c < data.halfyearstandlist.length; c++) {
|
||||
if (data.halfyearheightlevel == data.halfyearstandlist[c].level) {
|
||||
data.statusHalfyear = data.halfyearstandlist[c].text
|
||||
data.colorHalfyear = data.halfyearstandlist[c].color
|
||||
}
|
||||
}
|
||||
console.log("增量对比", res)
|
||||
return res
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
// 身体数据卡片
|
||||
getfirstweight(param) { //修改初始体重
|
||||
return http.post("/card_modify_weight", param).then(res => {
|
||||
|
|
|
|||
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
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
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
|
|
@ -51,6 +51,7 @@
|
|||
"PublicCards/pkdetail",
|
||||
"home/inheritHeighet",
|
||||
"home/bmi",
|
||||
"home/childPK",
|
||||
"webview/webview"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ _vue.default.prototype.$model = _model.default;
|
|||
// 语言
|
||||
|
||||
var i18nConfig = {
|
||||
locale: uni.getStorageSync('language'),
|
||||
locale: uni.getStorageSync('language') ? uni.getStorageSync('language') : uni.getLocale(),
|
||||
messages: _index.default
|
||||
};
|
||||
|
||||
|
|
@ -178,7 +178,7 @@ var _default = {
|
|||
that.handleoginversion();
|
||||
that.handleCityList();
|
||||
that.handleCooperationUrl();
|
||||
console.log('App Launch');
|
||||
console.log('App Launch', uni.getLocale());
|
||||
},
|
||||
onShow: function onShow() {
|
||||
console.log('App Show');
|
||||
|
|
@ -188,13 +188,25 @@ var _default = {
|
|||
// 版本信息
|
||||
handleoginversion: function handleoginversion() {
|
||||
var that = this;
|
||||
that.$model.getloginversion({}).then(function (res) {
|
||||
uni.setStorageSync('language', 'en');
|
||||
that.$model.getloginversion({
|
||||
is_wechat: uni.getSystemInfoSync().uniPlatform == 'app' ? false : true
|
||||
}).then(function (res) {
|
||||
that.$store.commit('changeLanguage', res.data.language_arr);
|
||||
if (res.code == 0) {
|
||||
// uni.setLocale(res.data.language)
|
||||
uni.setStorageSync('language', res.data.language);
|
||||
uni.$emit('login-sucesss');
|
||||
console.log("已登录手机语言", res.data.language);
|
||||
} else {
|
||||
uni.getSystemInfo({
|
||||
success: function success(e) {
|
||||
var language = uni.getStorageSync('language') ? uni.getStorageSync('language') : e.language.indexOf("zh") != -1 ? "zh-Hans" : e.language;
|
||||
uni.setLocale(language);
|
||||
uni.setStorageSync('language', language);
|
||||
uni.$emit('need-login');
|
||||
console.log("未登录手机语言", language);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
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
Loading…
Reference in New Issue