新增身高增量对比

This commit is contained in:
qiaocl 2025-04-29 17:29:44 +08:00
parent 5b0c7348a6
commit 50ee190427
183 changed files with 8898 additions and 6462 deletions

28
App.vue
View File

@ -27,10 +27,6 @@
that.$store.commit('changePhoneInfo', { that.$store.commit('changePhoneInfo', {
platform: e.platform 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 if (platform === 'ios') { // ios
@ -78,7 +74,7 @@
that.handleoginversion() that.handleoginversion()
that.handleCityList() that.handleCityList()
that.handleCooperationUrl() that.handleCooperationUrl()
console.log('App Launch') console.log('App Launch', uni.getLocale())
}, },
onShow: function() { onShow: function() {
console.log('App Show') console.log('App Show')
@ -94,15 +90,27 @@
// //
handleoginversion() { handleoginversion() {
let that = this let that = this
that.$model.getloginversion({}).then(res => { that.$model.getloginversion({
// #ifdef MP-WEIXIN is_wechat: uni.getSystemInfoSync().uniPlatform == 'app' ? false : true
uni.setStorageSync('language', 'en') }).then(res => {
// #endif
that.$store.commit('changeLanguage', res.data.language_arr) that.$store.commit('changeLanguage', res.data.language_arr)
if (res.code == 0) { if (res.code == 0) {
// uni.setLocale(res.data.language)
uni.setStorageSync('language', res.data.language)
uni.$emit('login-sucesss'); uni.$emit('login-sucesss');
console.log("已登录手机语言", res.data.language)
} else { } else {
uni.$emit('need-login'); 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 // #ifdef APP-PLUS||APP
that.$store.commit('changePhoneInfo', { that.$store.commit('changePhoneInfo', {

View File

@ -8,10 +8,13 @@
<view class="info" @click="handleAddUser(1)"> <view class="info" @click="handleAddUser(1)">
<view class="size18 bold">{{info.nickname}}</view> <view class="size18 bold">{{info.nickname}}</view>
<view class="mt-5"> <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> <text class="ml-10">{{$t("common.infoAge")}}{{info.age}}{{$t("common.infoAgeunit")}}</text>
</view> </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> </view>
<text class="t-icon t-icon-qiehuan1" @click="$store.commit('changeDrawe', true)" v-if="isLeft"></text> <text class="t-icon t-icon-qiehuan1" @click="$store.commit('changeDrawe', true)" v-if="isLeft"></text>
</view> </view>
@ -75,6 +78,7 @@
province: [], // province: [], //
city: [], // city: [], //
area: [], // area: [], //
language: "",
indicatorStyle: `height: 45px;`, indicatorStyle: `height: 45px;`,
}; };
}, },
@ -107,6 +111,7 @@
that.handleCityList() that.handleCityList()
} }
}, 1000); }, 1000);
that.language = uni.getStorageSync('language') ? uni.getStorageSync('language') : uni.getLocale()
}, },
watch: { watch: {
userAddress() { userAddress() {

View File

@ -136,6 +136,7 @@
"titleContrast": "Data comparison", "titleContrast": "Data comparison",
"titleDetail": "Details", "titleDetail": "Details",
"titleBody": "Curve/Target", "titleBody": "Curve/Target",
"titleIncrement": "Increment",
"titleLanguage": "Language switching", "titleLanguage": "Language switching",
@ -229,7 +230,7 @@
"infoHeight": "height", "infoHeight": "height",
"infoHead": "head circumference", "infoHead": "HC",
"infoWeight": "weight", "infoWeight": "weight",
@ -259,7 +260,7 @@
"linkBluetooth": { "linkBluetooth": {
"onBluetoothTips": "Please search for the device while it is powered on.", "onBluetoothTips": "Please make sure the device is on.",
"onBluetoothHaveFound": "Has been discovered", "onBluetoothHaveFound": "Has been discovered",
@ -269,72 +270,76 @@
"onBluetoothBind": "Device Binding Process Description", "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.", "isLinkBluetooth": "Please connect the device first.",
"startlinkBluetooth": "Start Connecting", "startlinkBluetooth": "Start Connecting",
"linkBluetooth": "Bluetooth connection in progress",
"linkBluetooth": "BLE connection in progress",
"anewlinkBluetooth": "Reconnect", "anewlinkBluetooth": "reconnection",
"linkBluetoothFail": "Device connection failed. Return to the home page and reconnect.", "linkBluetoothFail": "Connection failed",
"linkBluetoothSuccess": "Bluetooth connection successful. Please start measuring.", "linkBluetoothSuccess": "The connection is successful. Start measuring",
"startSearchBluetooth": "Start searching", "startSearchBluetooth": "Start searching",
"searchBluetooth": "Bluetooth search ongoing", "searchBluetooth": "BLE search ongoing",
"searchBluetoothFail": "Re-search", "searchBluetoothFail": "Search again",
"Nodevicefound": "No Bluetooth device was found",
"Nodevicefound": "No BLE device was found",
"onDeviceMeasureTips": "Please make sure the device is on.", "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.", "deviceDisconnection": "Connection interrupted Reconnect",
"offBluetooth": "Bluetooth is turned off. Please turn it on again before starting the measurement.",
"offBluetooth": "BLE is turned off. Measure after turning on BLE.",
"remeasure": "Remeasure", "remeasure": "Remeasure",
"StableWeight": "Stable weight", "StableWeight": "Stable weight",
"StableWeightText": "Your stable weight is :", "StableWeightText": "stable weight is :",
"realTimeWeight": "Real-time weight", "realTimeWeight": "Real-time weight",
"realTimeWeightText": "Your real-time weight is :", "realTimeWeightText": "real-time weight is :",
"heightText": "Your height is", "heightText": "Your height is",
"zeroBtn": "Reset to zero", "zeroBtn": "zero",
"LockBtn": "Lock", "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." "errorOperation": "Operation error. Please remeasure."
}, },
@ -496,6 +501,7 @@
"index.Standard": "Standard value", "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.", "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.title": "Adult Height Prediction",
"inheritHeighet.dad": "Dad's height", "inheritHeighet.dad": "Dad's height",

View File

@ -79,6 +79,7 @@
"titleBusinesSList": "设备列表", "titleBusinesSList": "设备列表",
"titleBusinesSearch": "搜索设备", "titleBusinesSearch": "搜索设备",
"titleInheritHeighet": "身高预测", "titleInheritHeighet": "身高预测",
"titleIncrement": "增量对比",
"titleBmi": "BMI测评", "titleBmi": "BMI测评",
"titlePhone": "绑定手机号", "titlePhone": "绑定手机号",
"titleEmail": "绑定邮箱", "titleEmail": "绑定邮箱",

View File

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

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="weightPages"> <view class="weightPages">
<view class="content "> <view class="content ">
<view class="status">{{textLink}}</view> <view class="status overflow">{{textLink}}</view>
<view class="quan"> <view class="quan">
<view> <view>
<text class="weight">{{weight?weight:'0.00'}}</text>{{unit}} <text class="weight">{{weight?weight:'0.00'}}</text>{{unit}}
@ -14,8 +14,9 @@
</view> </view>
<view class="tips"> <view class="tips">
<text>{{$t("tips.msgTitle")}}:</text> <text>{{$t("tips.msgTitle")}}:</text>
<text>{{$t("linkBluetooth.onDeviceMeasureTips")}}</text> <text>1,{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
<text>{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text> <text>2,{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
<text>3,{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
</view> </view>
</view> </view>
<!-- 手动记录 --> <!-- 手动记录 -->
@ -499,13 +500,14 @@
} }
.status { .status {
width: 70%; width:auto;
font-size: 16px; font-size: 16px;
height: 35px; height: 35px;
line-height: 35px; line-height: 35px;
text-align: center; text-align: center;
border-radius: 15px; border-radius: 15px;
margin: 15px auto; margin: 15px auto;
padding: 0 15px;
background-color: #ffdda6; background-color: #ffdda6;
} }

View File

@ -1,15 +1,16 @@
<template> <template>
<view class="weightPages"> <view class="weightPages">
<view class="content "> <view class="content ">
<view class="status">{{textLink}}</view> <view class="status overflow">{{textLink}}</view>
<view class="text">{{text}}</view> <view class="text">{{text}}</view>
<view class="image"> <view class="image">
<image src="/pageTwo/static/HC.png" class="image3"></image> <image src="/pageTwo/static/HC.png" class="image3"></image>
</view> </view>
<view class="tips"> <view class="tips">
<text>{{$t("tips.msgTitle")}}:</text> <text>{{$t("tips.msgTitle")}}:</text>
<text>{{$t("linkBluetooth.onDeviceMeasureTips")}}</text> <text>1,{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
<text>{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text> <text>2,{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
<text>3,{{$t("linkBluetooth.openDeviceeMeasureTips2")}}</text>
</view> </view>
</view> </view>
<!-- 手动记录 --> <!-- 手动记录 -->
@ -340,13 +341,14 @@
} }
.status { .status {
width: 70%; width: auto;
font-size: 16px; font-size: 16px;
height: 35px; height: 35px;
line-height: 35px; line-height: 35px;
text-align: center; text-align: center;
border-radius: 15px; border-radius: 15px;
margin: 15px auto; margin: 15px auto;
padding: 0 15px;
background-color: #ffdda6; background-color: #ffdda6;
} }
</style> </style>

View File

@ -1,15 +1,16 @@
<template> <template>
<view class="weightPages"> <view class="weightPages">
<view class="content "> <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="text">{{text}}</view>
<view class="image"> <view class="image">
<image src="/pageTwo/static/PCL.gif" class="image3"></image> <image src="/pageTwo/static/PCL.gif" class="image3"></image>
</view> </view>
<view class="tips"> <view class="tips">
<text>{{$t("tips.msgTitle")}}:</text> <text>{{$t("tips.msgTitle")}}:</text>
<text>{{$t("linkBluetooth.onDeviceMeasureTips")}}</text> <text>1,{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
<text>{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text> <text>2,{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
<text>3,{{$t("linkBluetooth.openDeviceeMeasureTips2")}}</text>
</view> </view>
</view> </view>
<!-- 手动记录 --> <!-- 手动记录 -->

View File

@ -1,15 +1,16 @@
<template> <template>
<view class="weightPages"> <view class="weightPages">
<view class="content "> <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="text">{{text}}</view>
<view class="image"> <view class="image">
<image src="/pageTwo/static/PCL.gif" class="image3"></image> <image src="/pageTwo/static/PCL.gif" class="image3"></image>
</view> </view>
<view class="tips"> <view class="tips">
<text>{{$t("tips.msgTitle")}}:</text> <text>{{$t("tips.msgTitle")}}:</text>
<text>{{$t("linkBluetooth.onDeviceMeasureTips")}}</text> <text>1,{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
<text>{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text> <text>2,{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
<text>3,{{$t("linkBluetooth.openDeviceeMeasureTips2")}}</text>
</view> </view>
</view> </view>
<!-- 手动记录 --> <!-- 手动记录 -->

View File

@ -1,15 +1,16 @@
<template> <template>
<view class="weightPages"> <view class="weightPages">
<view class="content "> <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="text">{{text}}</view>
<view class="image"> <view class="image">
<image src="/pageTwo/static/PCL.gif" class="image3"></image> <image src="/pageTwo/static/PCL.gif" class="image3"></image>
</view> </view>
<view class="tips"> <view class="tips">
<text>{{$t("tips.msgTitle")}}:</text> <text>{{$t("tips.msgTitle")}}:</text>
<text>{{$t("linkBluetooth.onDeviceMeasureTips")}}</text> <text>1,{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
<text>{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text> <text>2,{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
<text>3,{{$t("linkBluetooth.openDeviceeMeasureTips2")}}</text>
</view> </view>
</view> </view>
<!-- 手动记录 --> <!-- 手动记录 -->
@ -18,10 +19,11 @@
<view class="Blue"> <view class="Blue">
<view class="h4">{{$t("linkBluetooth.measureResultTips")}}</view> <view class="h4">{{$t("linkBluetooth.measureResultTips")}}</view>
<view class="Blue-box"> <view class="Blue-box">
{{$t("linkBluetooth.nowWeight")}}<text>{{weight}}{{unit}}</text> {{$t("linkBluetooth.nowWeight")}}<text>{{weight}}{{unit}}</text>
</view> </view>
<view class="Blue-box"> <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>
<view class="Blue-btn Blue-close" @click="handleBack">{{$t("tips.btnSancellation")}}</view> <view class="Blue-btn Blue-close" @click="handleBack">{{$t("tips.btnSancellation")}}</view>
<view class="Blue-btn" @click="handleGetMeasure">{{$t("linkBluetooth.SaveResult")}}</view> <view class="Blue-btn" @click="handleGetMeasure">{{$t("linkBluetooth.SaveResult")}}</view>

View File

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

View File

@ -223,7 +223,7 @@
that.startBluetoothDeviceDiscovery() that.startBluetoothDeviceDiscovery()
}, },
fail: e => { fail: e => {
that.$tools.msg(that.$t("linkBluetooth.onDeviceBluetoothTips")) that.$tools.msg(that.$t("linkBluetooth.Nodevicefound"))
} }
}); });
}, },
@ -237,7 +237,7 @@
that.onBluetoothDeviceFound(); that.onBluetoothDeviceFound();
}, },
fail: res => { fail: res => {
that.$tools.msg(that.$t("linkBluetooth.onDeviceBluetoothTips")) that.$tools.msg(that.$t("linkBluetooth.Nodevicefound"))
} }
}); });
}, },

343
pageTwo/home/childPK.vue Normal file
View File

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

View File

@ -113,7 +113,8 @@
data: that.phone, data: that.phone,
password: that.password, password: that.password,
c_password: that.password2, 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( let https = that.type == 'register' ? that.$model.getregister(account) : that.$model.getResetPassword(
account) account)

View File

@ -2,6 +2,7 @@
<view class="content"> <view class="content">
<view class="bg"></view> <view class="bg"></view>
<!-- 语言切换 --> <!-- 语言切换 -->
<!-- #ifdef APP-PLUS -->
<view class="language"> <view class="language">
<view class="nowlanguage" @click="Islanguage =!Islanguage"> <view class="nowlanguage" @click="Islanguage =!Islanguage">
{{nowlanguage}} {{nowlanguage}}
@ -15,6 +16,7 @@
</view> </view>
</view> </view>
</view> </view>
<!-- #endif -->
<view class="top"> <view class="top">
<image src="../../static/logo2.png"></image> <image src="../../static/logo2.png"></image>
<text>Reedaw</text> <text>Reedaw</text>
@ -115,13 +117,15 @@
...mapState(["languageList"]), ...mapState(["languageList"]),
}, },
onLoad() { onLoad() {
// #ifdef MP-WEIXIN
that.login()
// #endif
},
onReady() {
let that = this let that = this
that.language = uni.getStorageSync('language') ? uni.getStorageSync('language') : uni.getLocale() that.language = uni.getStorageSync('language') ? uni.getStorageSync('language') : uni.getLocale()
console.log("language", that.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 that.nowlanguage = that.languageList.find(ite => ite.key == that.language).value
// #ifdef MP-WEIXIN
that.login()
// #endif
}, },
methods: { methods: {
// //
@ -160,7 +164,8 @@
this.$model.getonlogin({ this.$model.getonlogin({
data: that.phone, data: that.phone,
validate_data: that.isCode ? that.code : that.password, 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 => { }).then(res => {
console.log("data", res.data) console.log("data", res.data)
that.$tools.msg(res.msg) that.$tools.msg(res.msg)
@ -253,10 +258,10 @@
// //
handleSetlanguage(ite) { handleSetlanguage(ite) {
let that = this let that = this
uni.setLocale(ite.key)
that.language = ite.key that.language = ite.key
that.nowlanguage = ite.value that.nowlanguage = ite.value
that.Islanguage = false that.Islanguage = false
uni.setLocale(ite.key)
uni.setStorageSync('language', ite.key) uni.setStorageSync('language', ite.key)
console.log("ite", ite.key) console.log("ite", ite.key)
}, },

View File

@ -80,7 +80,7 @@
</view> </view>
</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="left">身份信息</view>
<view class="right"> <view class="right">
<picker mode="selector" :range="identityList" :value="identityIndex" range-key="name" <picker mode="selector" :range="identityList" :value="identityIndex" range-key="name"
@ -91,14 +91,15 @@
</picker> </picker>
</view> </view>
</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="left">所属地区</view>
<view class="right"> <view class="right">
<view class="mr-10">{{memInfo.address?memInfo.address:'请选择'}}</view> <view class="mr-10">{{memInfo.address?memInfo.address:'请选择'}}</view>
<icon class="iconfont icon-arrow-down-bold"></icon> <icon class="iconfont icon-arrow-down-bold"></icon>
</view> </view>
</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="left">所在年级</view>
<view class="right"> <view class="right">
<picker mode="selector" :range="gradeList" :value="gradeIndex" range-key="name" <picker mode="selector" :range="gradeList" :value="gradeIndex" range-key="name"
@ -179,7 +180,7 @@
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.$t('common.titleMember'), title: this.$t('common.titleMember'),
}) })
this.language = uni.getLocale() this.language = uni.getStorageSync('language')
}, },
onLoad(options) { onLoad(options) {
let that = this let that = this
@ -223,11 +224,11 @@
that.$tools.msg(that.$t("tips.verifyBirthday")) that.$tools.msg(that.$t("tips.verifyBirthday"))
return; 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("请选择身份信息") that.$tools.msg("请选择身份信息")
return; 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("请选择所属地区") that.$tools.msg("请选择所属地区")
return; return;
} }

View File

@ -350,6 +350,12 @@
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }
}, },
{
"path": "home/childPK",
"style": {
"navigationBarTitleText": ""
}
},
{ {
"path": "webview/webview", "path": "webview/webview",
"style": { "style": {

View File

@ -23,11 +23,57 @@
</view> </view>
<!-- 工具区 --> <!-- 工具区 -->
<view class="tools_l"> <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)" <!-- <view v-for="(item,index) in toollist" :key="index" class="list" @click="handleTool(index,item.path)"
:class="[language=='zh-Hans'?'':'list2']"> :class="[language=='zh-Hans'?'':'list2']">
<image :src="item.icon"></image> <image :src="item.icon"></image>
<view class="text">{{item.title}}</view> <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>
</view> </view>
@ -38,7 +84,7 @@
<view class="time">{{info?info.record_time:''}}</view> <view class="time">{{info?info.record_time:''}}</view>
</view> </view>
<view class="box" v-if="info&&info.top_list.length" v-for="(item,index) in info.top_list"> <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="left" :class="[item.difference_val?'':'left2']">
<view class="name bold">{{item.name}}</view> <view class="name bold">{{item.name}}</view>
<view> <view>
@ -47,7 +93,7 @@
</view> </view>
</view> </view>
<view class="right" v-if="item.difference_val"> <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="lixiang">
<view class="mr-10"><text class="mr-5">{{item.standard_val}}</text>{{item.unit}}</view> <view class="mr-10"><text class="mr-5">{{item.standard_val}}</text>{{item.unit}}</view>
<view> <view>
@ -77,13 +123,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="item2"> <!-- <view class="item2">
<view class="item2_data" :style="userInfo.stage=='婴儿'?'width:25%':'width:33%'" <view class="item2_data" :style="userInfo.stage=='婴儿'?'width:25%':'width:33%'"
v-for="(item,index) in info.top_list" @click="handleToggleTop(item,index)"> v-for="(item,index) in info.top_list" @click="handleToggleTop(item,index)">
@ -331,56 +370,6 @@
proposalnd: 1, proposalnd: 1,
unit: "", unit: "",
language: "", 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: { components: {
@ -404,10 +393,6 @@
that.activeHeight = 0 that.activeHeight = 0
return that.MeasureResult return that.MeasureResult
}, },
toollist() {
let list = this.toolList
return uni.getStorageSync('language') == "zh-Hans" ? list : list.splice(1, 7)
},
isCoupon() { isCoupon() {
return this.bannerCon.isCoupon return this.bannerCon.isCoupon
}, },
@ -427,7 +412,10 @@
uni.onBluetoothAdapterStateChange(function(res) { uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available); that.$store.commit("changeBluetooth", res.available);
}) })
that.openBluetoothAdapter() console.log("token", uni.getStorageSync('token'))
if (uni.getStorageSync('token')) {
that.openBluetoothAdapter()
}
that.onBLEConnectionStateChange() that.onBLEConnectionStateChange()
}, },
onPullDownRefresh() { onPullDownRefresh() {
@ -478,13 +466,15 @@
url: "/pageTwo/cardList/card" url: "/pageTwo/cardList/card"
}) })
}, },
handleTool(ind, path) { handleTool(path) {
let that = this let that = this
console.log("path", path) console.log("1111", path)
if (path == "") { if (path == "" || path == undefined) {
that.handlerRecord(2) that.handlerRecord(2)
} else { } else {
that.navTo(path) uni.navigateTo({
url: path
})
} }
}, },
// //
@ -512,7 +502,7 @@
}, },
navTo(url) { navTo(url) {
console.log("url", url) console.log("url", url)
uni.navigateTo({ uni.navigateTo({
url: url url: url
}) })
@ -556,7 +546,7 @@
var that = this; var that = this;
uni.onBluetoothDeviceFound(res => { uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => { res.devices.forEach(device => {
console.log("name", device.name) // console.log("name", device.name)
if (!device.name && !device.localName) { if (!device.name && !device.localName) {
device.advertisData = device.advertisData ? device.advertisData : '' device.advertisData = device.advertisData ? device.advertisData : ''
let value = that.$tools.ab2hex(device.advertisData, "") let value = that.$tools.ab2hex(device.advertisData, "")
@ -614,7 +604,7 @@
let that = this let that = this
const foundDevices = that.devicesList const foundDevices = that.devicesList
const idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId) const idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId)
console.log("1111111", device.name) // console.log("1111111", device.name)
if (idx === -1) { if (idx === -1) {
// //
if (device.name.toLowerCase().indexOf("pcl") != -1) { if (device.name.toLowerCase().indexOf("pcl") != -1) {
@ -874,7 +864,7 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
height: 60px; // height: 60px;
line-height: 30px; line-height: 30px;
.name { .name {
@ -885,6 +875,10 @@
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.name {
width: 50%;
}
} }
.right { .right {
@ -913,11 +907,10 @@
} }
.list2 { .list2 {
width: 22% !important;
margin-bottom: 10px !important;
}
.list2:nth-child(n+5) { .list {
width: 33% !important; width: 33% !important;
margin-bottom: 10px !important;
}
} }
</style> </style>

View File

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

View File

@ -176,15 +176,14 @@
let that = this let that = this
that.index = e.detail.value that.index = e.detail.value
that.language = that.languageList[that.index].key that.language = that.languageList[that.index].key
uni.setLocale(that.languageList[that.index].key) that.$model.getSetLanguage({
uni.setStorageSync('language', that.languageList[that.index].key) language: that.languageList[that.index].key,
// that.$model.getSetLanguage({ }).then(res => {
// language: that.languageList[that.index].key, console.log("qqqqqqqqqqq", res)
// }).then(res => { that.language = that.languageList[that.index].key
// console.log("qqqqqqqqqqq", res) uni.setLocale(that.languageList[that.index].key)
// uni.setLocale(that.languageList[that.index].key) uni.setStorageSync('language', that.languageList[that.index].key)
// that.language = that.languageList[that.index].key })
// })
}, },
navTo(url) { navTo(url) {
uni.navigateTo({ uni.navigateTo({

View File

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

BIN
static/q11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -44,7 +44,7 @@ function startBluetoothDeviceDiscovery() {
$Bluetooth.onBluetoothDeviceFound(); $Bluetooth.onBluetoothDeviceFound();
}, },
fail: res => { fail: res => {
$tools.msg($t.linkBluetooth.onDeviceBluetoothTips) $tools.msg($t.linkBluetooth.Nodevicefound)
} }
}); });
} }

View File

@ -40,19 +40,12 @@ const httpRequest = (url, method = "get", data) => {
const get = (url, data) => { const get = (url, data) => {
data.token = uni.getStorageSync('token') data.token = uni.getStorageSync('token')
data.aan_id = uni.getStorageSync('aan_id') data.aan_id = uni.getStorageSync('aan_id')
if(url!="/set_language_country"){
data.language = uni.getLocale()
}
return httpRequest(url, 'get', data) return httpRequest(url, 'get', data)
} }
const post = (url, data) => { const post = (url, data) => {
data.token = uni.getStorageSync('token') data.token = uni.getStorageSync('token')
data.aan_id = uni.getStorageSync('aan_id') 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) return httpRequest(url, 'post', data)
} }
export default { export default {

View File

@ -124,6 +124,37 @@ export default {
return res 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) { //修改初始体重 getfirstweight(param) { //修改初始体重
return http.post("/card_modify_weight", param).then(res => { 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -51,6 +51,7 @@
"PublicCards/pkdetail", "PublicCards/pkdetail",
"home/inheritHeighet", "home/inheritHeighet",
"home/bmi", "home/bmi",
"home/childPK",
"webview/webview" "webview/webview"
] ]
} }

View File

@ -43,7 +43,7 @@ _vue.default.prototype.$model = _model.default;
// 语言 // 语言
var i18nConfig = { var i18nConfig = {
locale: uni.getStorageSync('language'), locale: uni.getStorageSync('language') ? uni.getStorageSync('language') : uni.getLocale(),
messages: _index.default messages: _index.default
}; };
@ -178,7 +178,7 @@ var _default = {
that.handleoginversion(); that.handleoginversion();
that.handleCityList(); that.handleCityList();
that.handleCooperationUrl(); that.handleCooperationUrl();
console.log('App Launch'); console.log('App Launch', uni.getLocale());
}, },
onShow: function onShow() { onShow: function onShow() {
console.log('App Show'); console.log('App Show');
@ -188,13 +188,25 @@ var _default = {
// 版本信息 // 版本信息
handleoginversion: function handleoginversion() { handleoginversion: function handleoginversion() {
var that = this; var that = this;
that.$model.getloginversion({}).then(function (res) { that.$model.getloginversion({
uni.setStorageSync('language', 'en'); is_wechat: uni.getSystemInfoSync().uniPlatform == 'app' ? false : true
}).then(function (res) {
that.$store.commit('changeLanguage', res.data.language_arr); that.$store.commit('changeLanguage', res.data.language_arr);
if (res.code == 0) { if (res.code == 0) {
// uni.setLocale(res.data.language)
uni.setStorageSync('language', res.data.language);
uni.$emit('login-sucesss'); uni.$emit('login-sucesss');
console.log("已登录手机语言", res.data.language);
} else { } else {
uni.$emit('need-login'); 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