中英文内容一致

This commit is contained in:
qiaocl 2025-05-10 14:31:09 +08:00
parent caff2f30f2
commit 4b658da705
438 changed files with 10775 additions and 64946 deletions

66
App.vue
View File

@ -31,13 +31,6 @@
uni.onNetworkStatusChange(function(res) {
if (res.isConnected == true) {
that.handleoginversion()
that.handleCityList()
that.handleCooperationUrl()
// setTimeout(() => {
// uni.reLaunch({
// url: '/pageTwo/login/login'
// })
// }, 500)
}
});
}
@ -76,7 +69,7 @@
})
that.handleoginversion()
that.handleCityList()
that.handleCooperationUrl()
},
onShow: function() {
let that = this
@ -188,30 +181,6 @@
that.$store.dispatch("getResult", {
aud_id: userid
})
that.handleLabelList(userid)
that.handlePublicRecord(userid)
}
})
},
//
handleLabelList(id) {
let that = this
that.$model.getLabelList({
aud_id: id
}).then(res => {
if (res.code == 0) {
that.$store.commit('changeLabelList', res.data)
}
})
},
//
handlePublicRecord(id) {
let that = this
that.$model.getPublicRecord({
aud_id: id
}).then(res => {
if (res.code == 0) {
that.$store.commit('changePublicRecord', res.data)
}
})
},
@ -224,24 +193,6 @@
}
})
},
//
handleCityList() {
let that = this
that.$model.getGradeList({}).then((res) => {
if (res.code != 0) return
that.$store.commit('changeCityList', res.data.area_list)
that.$store.commit('changeGradeList', res.data.grade_list)
that.$store.commit('changeIdentityList', res.data.identity_list)
})
},
//
handleCooperationUrl() {
let that = this
that.$model.getCooperationUrl({}).then((res) => {
if (res.code != 0) return
this.$store.commit("changeCooperationUrl", res.data);
})
},
//
updataWeiXin() {
let that = this
@ -266,6 +217,17 @@
})
})
},
//
handleCityList() {
let that = this
that.$model.getGradeList({}).then((res) => {
// console.log("|", res.data)
if (res.code != 0) return
that.$store.commit('changeCityList', res.data.area_list)
that.$store.commit('changeGradeList', res.data.grade_list)
that.$store.commit('changeIdentityList', res.data.identity_list)
})
},
handleTabBarItem() {
let that = this
uni.setTabBarItem({
@ -274,10 +236,6 @@
})
uni.setTabBarItem({
index: 1,
text: that.$t('common.titleNews')
})
uni.setTabBarItem({
index: 2,
text: that.$t('common.titleMe')
})
}

View File

@ -1,74 +0,0 @@
<template>
<view v-if="isCity" class="visible">
<view class="bg" @click="clear"></view>
<view @click.stop class="item">
<view class="groupBtn">
<view @click="visible=false">取消</view>
<view @click="handlesure()" class="sure">确定</view>
</view>
<picker-view @change="bindChange" :value="value" class="picker-view" :indicator-style="indicatorStyle">
<picker-view-column>
<view class="item" v-for="(item,index) in province" :key="index">{{item.name}}</view>
</picker-view-column>
<picker-view-column>
<view class="item" v-for="(item,index) in city" :key="index">{{item}}</view>
</picker-view-column>
<!-- <picker-view-column>
<view class="item" v-for="(item,index) in area" :key="index">{{item?item:'请选择'}}</view>
</picker-view-column> -->
</picker-view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {
value: [2, 0],
province: [], //
city: [], //
area: [], //
}
},
computed: {
...mapState(["cityList", "user", "isCity"]),
},
mounted() {
let that = this
setTimeout(() => {
that.handleCityList()
console.log("1111", this.user.address, that.cityList, that.province)
}, 500);
},
methods: {
//
handleCityList() {
let that = this
that.province = that.cityList
let str = that.user.address.split(',')[0]
let str2 = that.user.address.split(',')[1]
var Index0 = that.cityList.findIndex((profile) => profile.name === str);
var Index2 = that.cityList[Index0].list.findIndex((ite) => ite === str2);
that.value[0] = Index0
that.value[1] = Index2
that.city = that.cityList[Index0].list
},
}
}
</script>
<style scoped lang="scss">
.bg {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.4);
z-index: 99;
}
</style>

View File

@ -8,15 +8,15 @@
<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="ml-10">{{$t("common.infoAge")}}{{info.age}}{{$t("common.infoAgeunit")}}</text>
</view>
<view class="mt-5" v-if="info.measure_model==1&&language=='zh-Hans'">
{{$t("common.infoNowUser")}}{{$t("common.infoAddress")}}{{info.address}}
<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>
<text class="t-icon t-icon-qiehuan1" @click="$store.commit('changeDrawe', true)" v-if="isLeft"></text>
<view class="t-icon t-icon-qiehuan1" @click="$store.commit('changeDrawe', true)"></view>
</view>
<view class="top" v-else @click="handleAddUser(2)">
<view class="info">
@ -27,34 +27,6 @@
</view>
</view>
</view>
<!-- 地区 -->
<view class="cityList">
<view class="area" v-if="isArea" @click="visible = true">
<view>中招地区标准</view>
<view>{{region?region:info.address}}<uni-icons type="bottom"></uni-icons></view>
</view>
<!-- -->
<view v-if="visible" class="visible" @click="visible=false">
<view @click.stop class="item">
<view class="groupBtn">
<view @click="visible=false">取消</view>
<view @click="handlesure()" class="sure">确定</view>
</view>
<picker-view @change="bindChange" :value="value" class="picker-view"
:indicator-style="indicatorStyle">
<picker-view-column>
<view class="item" v-for="(item,index) in province" :key="index">{{item.name}}</view>
</picker-view-column>
<picker-view-column>
<view class="item" v-for="(item,index) in city" :key="index">{{item}}</view>
</picker-view-column>
<!-- <picker-view-column>
<view class="item" v-for="(item,index) in area" :key="index">{{item?item:'请选择'}}</view>
</picker-view-column> -->
</picker-view>
</view>
</view>
</view>
<!-- 切换成员 -->
<drawer></drawer>
</view>
@ -71,72 +43,21 @@
drawer
},
data() {
return {
value: [2, 0],
visible: false,
region: "",
province: [], //
city: [], //
area: [], //
language: "",
indicatorStyle: `height: 45px;`,
};
return {};
},
computed: {
...mapState(["user", "familayList", "cityList"]),
...mapState(["user", "familayList"]),
info() {
return this.user
},
userList() {
return this.familayList
},
userAddress() {
return this.user.address
},
},
props: {
isArea: {
type: Boolean,
default: true
},
isLeft: {
type: Boolean,
default: true
},
},
mounted() {
let that = this
setTimeout(() => {
if (that.isArea) {
that.handleCityList()
}
}, 1000);
that.language = uni.getStorageSync('language') ? uni.getStorageSync('language') : uni.getLocale()
},
watch: {
userAddress() {
let that = this
that.region = that.user.address
that.handleCityList()
that.$emit("getAciveCity", that.region)
},
},
methods: {
bindChange: function(e) {
let that = this
if (e.detail.value[0] != that.value[0]) {
e.detail.value[1] = 0
}
that.value = e.detail.value
that.city = that.province[that.value[0]].list
},
handlesure() {
let that = this
let defaultRegion = [that.province[that.value[0]].name, that.city[that.value[1]]]
that.region = defaultRegion.join(",");
that.visible = false
that.$emit("getAciveCity", that.region)
},
//
handleAddUser(ind) {
let that = this
@ -147,29 +68,11 @@
"/pageTwo/my/userInfo"
})
} else {
console.log("headerIndex跳转登录页面")
uni.reLaunch({
url: '/pageTwo/login/login'
})
}
},
//
handleCityList() {
let that = this
if (that.cityList.length) {
if (that.user.address != '') {
that.province = that.cityList
let str = that.user.address.split(',')[0]
var Index0 = that.province.findIndex((profile) => profile.name == str);
that.value[0] = Index0
console.log("地区", str, Index0)
that.city = that.province[Index0].list
} else {
that.value = [2, 0]
that.city = that.cityList[2].list
}
}
},
}
}
</script>

View File

@ -1,147 +0,0 @@
<template>
<view class="wrapper" v-if="isRecord">
<view class="bg" @click="onTap">
<view class="edit" @click.stop>
<view class="title">手动记录</view>
<!-- -->
<view class="editem" @click="hideKeyboard">
<view class="left">日期</view>
<view class="right">
<picker mode="date" :end="endDate" @change="changeLog" :fields="fields">
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
<icon class="iconfont icon-arrow-down-bold"></icon>
</picker>
</view>
</view>
<view class="">
<view class="editem">
<view class="name">第一次</view>
<view class="right">
<input type="digit" v-model="number1" placeholder="请输入">ml
</view>
</view>
<view class="editem">
<view class="name">第二次</view>
<view class="right">
<input type="digit" v-model="number2" placeholder="请输入">ml
</view>
</view>
<view class="editem">
<view class="name">第三次</view>
<view class="right">
<input type="digit" v-model="number3" placeholder="请输入">ml
</view>
</view>
</view>
<view class="btn close" @click="onTap()">取消</view>
<view class="btn" @click="handleTarget">确定</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {
regTime: "",
number1: '',
number2: "",
number3: "",
fields: "",
}
},
props: {
rtype: null,
},
computed: {
...mapState(["user","isRecord"]),
endDate() {
return this.$tools.getDate("start")
},
startDate() {
return this.$tools.GetDateStr(-90);
},
},
methods: {
//
handleTarget() {
let that = this
if (!that.regTime) {
that.$tools.msg("请选择测量日期")
return
}
if (!that.number1) {
that.$tools.msg("请输入第一次吸气值")
return
}
if (!that.number2) {
that.$tools.msg("请输入第二次吸气值")
return
}
if (!that.number3) {
that.$tools.msg("请输入第三次吸气值")
return
}
that.$model.getLungmeasure({
aud_id: uni.getStorageSync('userid'),
time: that.regTime,
one: that.number1,
two: that.number2,
three: that.number3
}).then(res => {
if (res.code != 0) return
that.$tools.msg(res.msg)
that.$store.commit("changeRecord", false);
that.$store.dispatch("getUserInfo", {
aud_id: uni.getStorageSync('userid')
})
that.$store.dispatch("getLungResult", {
aud_id: uni.getStorageSync('userid')
})
that.regTime = ""
that.number1 = ""
that.number2 = ""
that.number3 = ""
that.onTap()
})
},
//
changeLog(e) {
this.regTime = e.detail.value
},
onTap() {
this.regTime = ""
this.number1 = ""
this.number2 = ""
this.number3 = ""
this.$store.commit("changeRecord", false);
},
hideKeyboard() {
uni.hideKeyboard()
},
}
}
</script>
<style scoped lang="scss">
.btn {
width: 40%;
float: right;
margin-top: 15px;
background: $maincolor !important;
}
.edit {
top: 20%
}
.close {
background: #fff !important;
float: left;
color: #333;
}
</style>

View File

@ -1,223 +0,0 @@
<template>
<view class="wrapper" v-if="isPublicRecord">
<view class="bg" @click="onTap">
<view class="edit" @click.stop>
<view class="title">手动记录</view>
<view class="editem">
<view class="left">项目</view>
<view class="right">
{{labelName}}
</view>
</view>
<!-- -->
<view class="editem">
<view class="left">日期</view>
<view class="right">
<picker mode="date" :end="endDate" @change="changeLog" :fields="fields">
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
<icon class="iconfont icon-arrow-down-bold"></icon>
</picker>
</view>
</view>
<view class="editem" v-if="info&&info.list.length&&listType">
<view class="name">{{describe}}</view>
<view class="right" v-if="listType==4">
<picker mode="multiSelector" :range="timeList" :value="timesTndex" @change="bindTimeChange">
<view class="size16">{{time_m?time_m+':':'请选择'}}{{time_s?time_s:''}}</view>
</picker>
<uni-icons type="bottom" class="ml-10 c666"></uni-icons>
</view>
<view class="right" v-if="listType!=4">
<input :type="listType==1?'number':'digit'" v-model="number" placeholder="请输入">
{{unit}}
</view>
</view>
<view class="editem" v-if="info&&info.time">
<view class="name">时长</view>
<view class="right">
<picker mode="multiSelector" :range="timeList" :value="timesTndex" @change="bindTimeChange">
<view class="size16">{{time_m?time_m+':':'请选择'}}{{time_s?time_s:''}}</view>
</picker>
<uni-icons type="bottom" class="ml-15 c666"></uni-icons>
</view>
</view>
<view class="editem" v-if="info&&info.number">
<view class="name">个数</view>
<view class="right">
<input type="number" v-model="number" placeholder="请输入">
</view>
</view>
<view class="btn close" @click="onTap()">取消</view>
<view class="btn" @click="handleTarget">确定</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {
name: "",
regTime: "",
number: '',
timeList: [],
time_m: "",
time_s: "",
fields: "",
listType: null,
describe: "",
unit: "",
timesTndex: [1, 0],
lableTndex: 0,
labelName: "",
}
},
props: {
rtype: null,
active: {
type: Number,
default: 0
},
},
computed: {
...mapState(["PublicRecord", "isPublicRecord"]),
info() {
let that = this
let info = {
height: false,
weight: false,
number: false,
time: false,
list: []
}
if (that.PublicRecord.length) {
that.PublicRecord.forEach(ite => {
if (ite.id == that.rtype) {
info = ite
}
})
if (info && info.list.length) {
// console.log("8888888", that.PublicRecord, info, that.active)
that.labelName = info.list[that.active].name
that.listType = info.list[that.active].type
that.describe = info.list[that.active].describe
that.unit = info.list[that.active].unit
// console.log("", info, that.active)
}
}
return that.PublicRecord.length ? info : null
},
endDate() {
return this.$tools.getDate("start")
},
startDate() {
return this.$tools.GetDateStr(-90);
},
},
mounted() {
// console.log("999999", that.labelName, that.PublicRecord)
},
mounted() {
let that = this
that.timeList = this.$tools.gethms()
// #ifdef APP-PLUS
that.fields = "time"
// #endif
// #ifndef APP-PLUS
that.fields = "day"
// #endif
},
methods: {
bindTimeChange(e) {
let that = this
let m = e.target.value[0]
let s = e.target.value[1]
let time_m = Number(that.timeList[0][m].substring(0, 2)) * 60
let time_s = Number(that.timeList[1][s].substring(0, 2))
that.timesTndex = e.target.value
that.time_m = that.timeList[0][m].substring(0, 2)
that.time_s = that.timeList[1][s].substring(0, 2)
console.log("时长", that.time_m, that.time_s)
},
//
handleTarget() {
let that = this
if (!that.regTime) {
that.$tools.msg("请选择日期")
return
}
if (that.listType == 4 && (!that.time_m || !that.time_s)) {
that.$tools.msg("请输入时长")
return
}
if (that.listType != 4 && !that.number) {
let msg = that.listType == 1 ? '请输入个数' : '请输入时长'
that.$tools.msg(msg)
return
}
let time_m = that.time_m + ':' + that.time_s
that.$model.getpublicmeasure({
acd_id: that.rtype,
name: that.labelName,
record_time: that.regTime,
data: that.listType == 4 ? time_m : that.number,
aud_id: uni.getStorageSync('userid')
}).then(res => {
if (res.code != 0) return
that.$tools.msg(res.msg)
that.$store.commit("changeRecord", false);
that.$store.dispatch("getUserInfo", {
aud_id: uni.getStorageSync('userid'),
})
that.$store.dispatch("getPublicContent", {
acd_id: that.rtype,
aud_id: uni.getStorageSync('userid')
})
that.onTap()
})
},
bindTimeChange(e) {
let that = this
let m = e.target.value[0]
let s = e.target.value[1]
that.timesTndex = e.target.value
let time_m = Number(that.timeList[0][m].substring(0, 2)) * 60
let time_s = Number(that.timeList[1][s].substring(0, 2))
that.time_m = that.timeList[0][m].substring(0, 2)
that.time_s = that.timeList[1][s].substring(0, 2)
},
//
changeLog(e) {
this.regTime = e.detail.value
},
onTap() {
this.regTime = ""
this.$store.commit("changePublicAdd", false);
},
}
}
</script>
<style scoped lang="scss">
.btn {
width: 40%;
float: right;
margin-top: 15px;
background: $maincolor !important;
}
.edit {
top: 20%
}
.close {
background: #fff !important;
float: left;
color: #333;
}
</style>

View File

@ -1,379 +0,0 @@
<template>
<view class="wrapper" v-if="isRecord">
<view class="bg" @click="onTap">
<view class="edit" @click.stop>
<view class="title">{{$t("index.manualRecording")}}</view>
<view class="editem">
<view class="left">{{$t('common.titleDate')}}</view>
<view class="right">
<picker mode="date" :end="endDate" @change="changeLog" :fields="fields">
<view class="uni-input">{{regTime?regTime:$t('tips.verifyPicker')}}</view>
<icon class="iconfont icon-arrow-down-bold"></icon>
</picker>
</view>
</view>
<view v-if="rtype!=8&&rtype!=2">
<!-- 项目 -->
<view class="editem" v-if="info&&info.list.length">
<view class="left">{{$t('recordType')}}</view>
<view class="right">
<picker :range="info.list" range-key="name" :value="lableTndex" @change="bindLableChange">
<view class="uni-input">{{name?name:$t('tips.verifyPicker')}}</view>
<icon class="iconfont icon-arrow-down-bold"></icon>
</picker>
</view>
</view>
<!-- 项目时长类型 -->
<view class="editem" v-if="info&&info.list.length&&listType">
<view class="name">{{describe}}</view>
<view class="right" v-if="listType==4">
<picker mode="multiSelector" :range="timeList" :value="timesTndex" @change="bindTimeChange">
<view class="size16">{{time_m?time_m+':':$t('tips.verifyPicker')}}{{time_s?time_s:''}}
</view>
</picker>
<uni-icons type="bottom" class="ml-15 c666"></uni-icons>
</view>
<view class="right" v-if="listType!=4">
<input :type="listType==1?'number':'digit'" v-model="number"
:placeholder="$t('tips.verifyRecord')">
{{unit}}
</view>
</view>
<view class="editem" v-if="info&&info.time">
<view class="name">{{$t('recordTime')}}</view>
<view class="right">
<picker mode="multiSelector" :range="timeList" :value="timesTndex" @change="bindTimeChange">
<view class="size16">{{time_m?time_m+':':$t('tips.verifyPicker')}}{{time_s?time_s:''}}
</view>
</picker>
<uni-icons type="bottom" class="ml-15 c666"></uni-icons>
</view>
</view>
<view class="editem" v-if="info&&info.number">
<view class="name">{{$t('recordNumber')}}</view>
<view class="right">
<input type="number" v-model="number" :placeholder="$t('tips.verifyRecord')">{{$t('skip.Number')}}
</view>
</view>
</view>
<!-- 身体 -->
<view class="" v-if="rtype==2">
<view class="editem" v-if="info&&info.height">
<view class="name">{{$t('common.infoHeight')}}</view>
<view class="right">
<input type="digit" v-model="height" :placeholder="$t('tips.verifyRecord')" />cm
</view>
</view>
<view class="editem" v-if="info&&info.weight">
<view class="name">{{$t('common.infoWeight')}}</view>
<view class="right">
<input type="digit" v-model="weight" :placeholder="$t('tips.verifyRecord')">kg
</view>
</view>
<view class="editem" v-if="userInfo.stage=='婴儿'">
<view class="left">{{$t('common.infoHead')}}</view>
<view class="right">
<input v-model="head" type="digit" :placeholder="$t('tips.verifyRecord')" />cm
</view>
</view>
</view>
<!-- 肺活量 -->
<view class="" v-if="rtype==8">
<view class="editem">
<view class="name">{{$t('recordNumberFirst')}}</view>
<view class="right">
<input type="digit" v-model="number1" :placeholder="$t('tips.verifyRecord')">ml
</view>
</view>
<view class="editem">
<view class="name">{{$t('recordNumberSecond')}}</view>
<view class="right">
<input type="digit" v-model="number2" :placeholder="$t('tips.verifyRecord')">ml
</view>
</view>
<view class="editem">
<view class="name">{{$t('recordNumberThird')}}</view>
<view class="right">
<input type="digit" v-model="number3" :placeholder="$t('tips.verifyRecord')">ml
</view>
</view>
</view>
<view class="btn close" @click="onTap()">{{$t("tips.btnSancellation")}}</view>
<view class="btn" @click="handleTarget">{{$t("tips.btnConfirm")}}</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
props: {
rtype: null,
},
data() {
return {
name: "",
number: '',
regTime: "",
number1: '',
number2: "",
number3: "",
time_m: "",
time_s: "",
weight: "",
height: '',
timeList: [],
lableTndex: 0,
timesTndex: [1, 0],
listType: null,
describe: "",
unit: "",
fields: "",
head: ""
}
},
computed: {
...mapState(["user", "isRecord", "PublicRecord", "labelList"]),
userInfo() {
return this.user
},
info() {
let that = this
let info = {
height: false,
weight: false,
number: false,
time: false,
list: []
}
if (that.PublicRecord.length) {
that.PublicRecord.forEach(ite => {
if (ite.id == that.rtype) {
info = ite
}
})
}
return that.PublicRecord.length ? info : null
},
endDate() {
return this.$tools.getDate("start")
},
startDate() {
return this.$tools.GetDateStr(-90);
},
},
mounted() {
let that = this
that.timeList = that.$tools.gethms()
// #ifdef APP-PLUS
that.fields = "time"
// #endif
// #ifndef APP-PLUS
that.fields = "day"
// #endif
},
methods: {
//
handleTarget() {
let that = this
if (that.rtype == 2) {
that.handleinsertmeasure()
} else if (that.rtype == 6) {
that.handleskipmeasure()
} else if (that.rtype == 8) {
that.handleLungmeasure()
} else {
that.handlepublicmeasure()
}
},
//
handlepublicmeasure() {
let that = this
if (!that.name) {
that.$tools.msg(that.$t("tips.verifyRecordType"))
return
}
if (!that.regTime) {
that.$tools.msg(that.$t("tips.verifyDate"))
return
}
if (that.listType == 4 && (!that.time_m || !that.time_s)) {
that.$tools.msg(that.$t("tips.verifyRecordTime"))
return
}
if (that.listType != 4 && !that.number) {
let msg = that.listType == 1 ? that.$t("tips.verifyRecordNumber") : that.$t("tips.verifyRecordTime")
that.$tools.msg(msg)
return
}
let time_m = that.time_m + ':' + that.time_s
that.$model.getpublicmeasure({
acd_id: that.rtype,
name: that.name,
record_time: that.regTime,
data: that.listType == 4 ? time_m : that.number,
aud_id: uni.getStorageSync('userid')
}).then(res => {
if (res.code != 0) return
that.$tools.msg(res.msg)
that.$store.dispatch("getUserInfo", {
aud_id: uni.getStorageSync('userid'),
})
that.$store.dispatch("getPublicContent", {
acd_id: that.rtype,
aud_id: uni.getStorageSync('userid')
})
that.onTap()
})
},
//
handleLungmeasure() {
let that = this
if (!that.regTime) {
that.$tools.msg(that.$t("tips.verifyDate"))
return
}
if (!that.number1) {
that.$tools.msg(that.$t("lung.oneNumberTips"))
return
}
if (!that.number2) {
that.$tools.msg(that.$t("lung.twoNumberTips"))
return
}
if (!that.number3) {
that.$tools.msg(that.$t("lung.threeNumberTips"))
return
}
that.$model.getLungmeasure({
aud_id: uni.getStorageSync('userid'),
time: that.regTime,
one: that.number1,
two: that.number2,
three: that.number3
}).then(res => {
if (res.code != 0) return
that.$tools.msg(res.msg)
that.$store.dispatch("getLungResult", {
aud_id: uni.getStorageSync('userid')
})
that.onTap()
})
},
//
handleskipmeasure() {
let that = this
if (!that.regTime) {
that.$tools.msg(that.$t("tips.verifyDate"))
return
}
if (!that.number) {
that.$tools.msg(that.$t("tips.verifyRecordNumber"))
return
}
that.$model.getskipmeasure({
aud_id: uni.getStorageSync('userid'),
num: that.number,
r_time: that.regTime,
time_m: that.time_m,
time_s: that.time_s,
type: "free",
}).then(res => {
if (res.code != 0) return
that.$tools.msg(res.msg)
that.$store.dispatch("getSkipResult", {
aud_id: uni.getStorageSync('userid'),
})
that.onTap()
})
},
//
handleinsertmeasure() {
let that = this
if (!that.regTime) {
that.$tools.msg(that.$t("tips.verifyDate"))
return
}
if (!that.height) {
that.$tools.msg(that.$t("tips.verifyHeight"))
return
}
if (!that.weight) {
that.$tools.msg(that.$t("tips.verifyWeight"))
return
}
that.$model.getinsertmeasure({
aud_id: uni.getStorageSync('userid'),
time: that.regTime,
weight: that.weight,
height: that.height,
head_data: that.head ? that.head : 0
}).then(res => {
if (res.code != 0) return
that.$tools.msg(res.msg)
that.$store.dispatch("getResult", {
aud_id: uni.getStorageSync('userid')
})
that.$store.dispatch("getUserInfo", {
aud_id: uni.getStorageSync('userid')
})
that.onTap()
})
},
bindTimeChange(e) {
let that = this
let m = e.target.value[0]
let s = e.target.value[1]
that.timesTndex = e.target.value
let time_m = Number(that.timeList[0][m].substring(0, 2)) * 60
let time_s = Number(that.timeList[1][s].substring(0, 2))
that.time_m = that.timeList[0][m].substring(0, 2)
that.time_s = that.timeList[1][s].substring(0, 2)
},
bindLableChange(e) {
console.log("e", e)
this.name = this.info.list[e.detail.value].name
this.listType = this.info.list[e.detail.value].type
this.describe = this.info.list[e.detail.value].describe
this.unit = this.info.list[e.detail.value].unit
},
changeLog(e) {
this.regTime = e.detail.value
},
onTap() {
let that = this
that.name = ""
that.weight = ""
that.height = ""
that.regTime = ""
that.number1 = ""
that.number2 = ""
that.number3 = ""
that.number = ''
that.time_m = ""
that.time_s = ""
that.lableTndex = 0
that.timesTndex = [1, 0]
that.listType = null
that.$store.commit("changeRecord", false);
},
}
}
</script>
<style scoped lang="scss">
.btn {
width: 40%;
float: right;
margin-top: 15px;
background: $maincolor !important;
}
.close {
background: #dfdfdf !important;
float: left;
}
</style>

View File

@ -1,148 +0,0 @@
<template>
<view class="wrapper">
<view class="bg" @click="onTap">
<view class="edit" @click.stop>
<view class="title">手动记录</view>
<!-- -->
<view class="editem" @click="hideKeyboard">
<view class="left">日期</view>
<view class="right">
<picker mode="date" :end="endDate" @change="changeLog" :fields="fields">
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
<icon class="iconfont icon-arrow-down-bold"></icon>
</picker>
</view>
</view>
<view class="">
<view class="editem">
<view class="name">时长</view>
<view class="right">
<picker mode="multiSelector" :range="timeList" :value="timesTndex" @change="bindTimeChange">
<view class="size16">{{time_m?time_m+':':'请选择'}}{{time_s?time_s:''}}</view>
</picker>
<uni-icons type="bottom" class="ml-15 c666"></uni-icons>
</view>
</view>
<view class="editem">
<view class="name">个数</view>
<view class="right">
<input type="number" v-model="number" placeholder="请输入">
</view>
</view>
</view>
<view class="btn close" @click="onTap()">取消</view>
<view class="btn" @click="handleTarget">确定</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {
regTime: "",
number: '',
timeList: [],
time_m: "",
time_s: "",
timesTndex: [1, 0]
}
},
computed: {
...mapState(["user"]),
endDate() {
return this.$tools.getDate("start")
},
startDate() {
return this.$tools.GetDateStr(-90);
},
},
mounted() {
this.timeList = this.$tools.gethms()
},
methods: {
bindTimeChange(e) {
let that = this
let m = e.target.value[0]
let s = e.target.value[1]
that.timesTndex = e.target.value
let time_m = Number(that.timeList[0][m].substring(0, 2)) * 60
let time_s = Number(that.timeList[1][s].substring(0, 2))
if (Number(time_m + time_s) < 30) {
that.time_m = '00'
that.time_s = '30'
} else {
that.time_m = that.timeList[0][m].substring(0, 2)
that.time_s = that.timeList[1][s].substring(0, 2)
}
},
//
handleTarget() {
let that = this
if (!that.regTime) {
that.$tools.msg("请选择测量日期")
return
}
if (!that.number) {
that.$tools.msg("请输入跳绳个数")
return
}
that.$model.getskipmeasure({
aud_id: uni.getStorageSync('userid'),
r_time: that.regTime,
num: that.number,
time_m: that.time_m,
time_s: that.time_s,
type: "free",
}).then(res => {
if (res.code != 0) return
that.$tools.msg(res.msg)
that.$store.commit("changeRecord", false);
that.$store.dispatch("getUserInfo", {
aud_id: uni.getStorageSync('userid'),
})
that.$store.dispatch("getSkipResult", {
aud_id: uni.getStorageSync('userid'),
})
that.regTime = ""
that.weight = ""
})
},
//
changeLog(e) {
this.regTime = e.detail.value
},
onTap() {
this.regTime = ""
this.weight = ""
this.$store.commit("changeRecord", false);
},
hideKeyboard() {
uni.hideKeyboard()
},
}
}
</script>
<style scoped lang="scss">
.btn {
width: 40%;
float: right;
margin-top: 15px;
background: $maincolor !important;
}
.edit {
top: 20%
}
.close {
background: #fff !important;
float: left;
color: #333;
}
</style>

View File

@ -1,34 +1,40 @@
<template>
<view class="wrapper wrapperbg">
<view class="wrapper wrapperbg" v-if="isRecord">
<view class="bg" @click="onTap">
<view class="edit" @click.stop>
<view class="title">手动记录</view>
<view class="title">{{$t("index.manualRecording")}}</view>
<!-- -->
<view class="editem" @click="hideKeyboard">
<view class="left">日期</view>
<view class="editem">
<view class="left">{{$t('common.titleDate')}}</view>
<view class="right">
<picker mode="date" :end="endDate" @change="changeLog" :fields="fields">
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
<view class="uni-input">{{regTime?regTime:$t('tips.verifyPicker')}}</view>
<icon class="iconfont icon-arrow-down-bold"></icon>
</picker>
</view>
</view>
<view class="">
<view class="editem">
<view class="name">身高</view>
<view class="name">{{$t('common.infoHeight')}}</view>
<view class="right">
<input type="digit" v-model="height" placeholder="请输入身高" />cm
<input type="digit" v-model="height" :placeholder="$t('tips.verifyRecord')" />cm
</view>
</view>
<view class="editem">
<view class="name">体重</view>
<view class="name">{{$t('common.infoWeight')}}</view>
<view class="right">
<input type="digit" v-model="weight" placeholder="请输入体重">kg
<input type="digit" v-model="weight" :placeholder="$t('tips.verifyRecord')">kg
</view>
</view>
<view class="editem" v-if="userInfo.stage=='婴儿'">
<view class="left">{{$t('common.infoHead')}}</view>
<view class="right">
<input v-model="head" type="digit" :placeholder="$t('tips.verifyRecord')" />cm
</view>
</view>
</view>
<view class="btn close" @click="onTap()">取消</view>
<view class="btn" @click="handleTarget">确定</view>
<view class="btn close" @click="onTap()">{{$t("tips.btnSancellation")}}</view>
<view class="btn" @click="handleTarget">{{$t("tips.btnConfirm")}}</view>
</view>
</view>
</view>
@ -43,11 +49,16 @@
return {
regTime: "",
weight: "",
height: ''
height: '',
head: "",
fields: "",
}
},
computed: {
...mapState(["user", "isWeight"]),
...mapState(["user", "isWeight","isRecord"]),
userInfo() {
return this.user
},
endDate() {
return this.$tools.getDate("start")
},
@ -55,28 +66,37 @@
return this.$tools.GetDateStr(-90);
},
},
mounted() {
let that = this
// #ifdef APP-PLUS
that.fields = "time"
// #endif
// #ifndef APP-PLUS
that.fields = "day"
// #endif
},
methods: {
//
handleTarget() {
let that = this
if (!that.regTime) {
that.$tools.msg("请选择测量日期")
that.$tools.msg(that.$t("tips.verifyDate"))
return
}
if (!that.height) {
that.$tools.msg("请输入测量身高")
that.$tools.msg(that.$t("tips.verifyHeight"))
return
}
if (!that.weight) {
that.$tools.msg("请输入测量体重")
that.$tools.msg(that.$t("tips.verifyWeight"))
return
}
that.$store.commit("changeRecord", false);
that.$model.getinsertmeasure({
aud_id: uni.getStorageSync('userid'),
time: that.regTime,
weight: that.weight,
height: that.height,
head_data: that.head ? that.head : 0
}).then(res => {
if (res.code != 0) return
that.$tools.msg(res.msg)
@ -86,14 +106,7 @@
that.$store.dispatch("getUserInfo", {
aud_id: uni.getStorageSync('userid')
})
that.$store.dispatch("GetBodyTrendList", {
aud_id: uni.getStorageSync('userid'),
s_time: that.startDate,
e_time: that.endDate
})
that.regTime = ""
that.weight = ""
that.height = ""
that.onTap()
})
},
//
@ -106,9 +119,6 @@
this.height = ""
this.$store.commit("changeRecord", false);
},
hideKeyboard() {
uni.hideKeyboard()
},
}
}
</script>

View File

@ -1,138 +0,0 @@
<template>
<view v-if="isSlider" class="wrapper">
<view class="bg" @click="onTap">
<view class="edit" @click.stop>
<view class="title">分数占比设置</view>
<view class="editem">
<view class="left">身体指数</view>
<view class="right">
<slider @change="sliderChange" value="10" show-value block-size="12" block-color="#007aff">
</slider>
</view>
</view>
<view class="editem">
<view class="left">1分钟跳绳</view>
<view class="right">
<slider @change="sliderChange($event,2)" value="40" show-value block-size="12"
block-color="#007aff"></slider>
</view>
</view>
<view class="editem">
<view class="left">肺活量</view>
<view class="right">
<slider @change="sliderChange" value="60" show-value block-size="12" block-color="#007aff">
</slider>
</view>
</view>
<view class="tips">
*所有项目评分占比和为100%
</view>
<view class="btn close" @click="onTap()">取消</view>
<view class="btn" @click="handleTarget">确定</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {
regTime: "",
number1: '',
number2: "",
number3: ""
}
},
computed: {
...mapState(["user", "isSlider"]),
},
methods: {
//
handleTarget() {
let that = this
if (!that.regTime) {
that.$tools.msg("请选择测量日期")
return
}
if (!that.weight) {
that.$tools.msg("请输入测量体重")
return
}
that.$model.getinsertmeasure({
familyid: that.user.familyid,
time: that.regTime,
weight: that.weight,
}).then(res => {
if (res.code != 0) return
that.$tools.msg(res.msg)
that.$store.commit("changeSlider", false);
that.$store.dispatch("getResult", {
birthday: that.user.birthday,
familyid: that.user.familyid,
height: that.user.height,
sex: that.user.sex,
})
that.$store.dispatch("getUserInfo", {
familyid: that.user.familyid,
})
that.$emit("getList", this.startDate, this.endDate)
that.regTime = ""
that.weight = ""
})
},
//
sliderChange(event, ind) {
console.log('value 发生变化:', e.detail.value, ind)
},
onTap() {
this.regTime = ""
this.number1 = ""
this.number2 = ""
this.number3 = ""
this.$store.commit("changeSlider", false);
},
}
}
</script>
<style scoped lang="scss">
.edit {
width: 75%;
padding: 15px;
.editem {
padding: 0 !important;
background: #fff !important;
.right {
width: 72% !important;
}
/deep/slider {
width: 100%;
padding: 0 !important;
margin: 0 !important;
}
}
}
.btn {
width: 40%;
float: right;
margin-top: 15px;
background: $maincolor !important;
}
.edit {
top: 20%
}
.close {
background: #dfdfdf !important;
float: left;
}
</style>

View File

@ -343,117 +343,7 @@
"errorOperation": "Operation error. Please remeasure."
},
"lung": {
"lungTitle": "Lung Capacity Test",
"lungExplain0": "Lung capacity tests can help us better understand you and generate a detailed health report for you.",
"lungsuction": "Inspiratory vital capacity",
"lungsuctionspeed": "Inhalation speed",
"averagelungsuction": "average suction vital capacity",
"isMarginal": "reach the standard",
"lungHello": "Hello!",
"lungfirst": "Hello!The first test begins",
"lungsecond": "Hello!The second test begins",
"lungthird": "Hello!The third test begins",
"lungstart": "The test begins",
"lungExplain1": "Put down the breathing trainer, exhale slowly and empty the air in your lungs as much as possible.",
"lungExplain2": "Use the breathing trainer and inhale slowly until you reach your limit.",
"lungExplain3": "Based on your personal information, your qualifying inspiratory vital capacity is",
"nowlungsuctionspeed": "You are testing the inhalation speed this time",
"lungresult": "Lung capacity test result",
"lungExplain4": "Based on your physical condition and improvement goals, we will generate a detailed health report for you.",
"lunglookreport": "View this Report",
"lunganewstart": "seconds later",
"Marginal": "Pass",
"oneNumberTips": "Please enter the first inhalation value",
"twoNumberTips": "Please enter the second inhalation value.",
"threeNumberTips": "Please enter the third inhalation value"
},
"skip": {
"today_jump_num": "Today's number",
"today_jump_time": "Today's duration",
"today_jump_kcal": "kcal",
"jumpFree": "Jump freely",
"backwardCount": "Reverse count",
"Countdown": "Countdown",
"jumpFreedom": "Freedom",
"instructStart": "Start",
"jumpFreeDegree": "Free number of times",
"jumpFreeNumber": "Number",
"jumpTargetDegree": "number",
"jumpUnlimited": "Unrestricted",
"jumpTarget": "Adjust the target",
"jumpTargetTime": "Target duration in minutes: seconds",
"MinuteSecond": "time",
"Consumed": "consume",
"LongpressEnd": "Longpress end",
"AverageSpeed": "average speed",
"Unit": "Number per minute",
"Numberofinterrupts": "Numberofinterrupts",
"Times": "frequency",
"LongestConsecutive": "longest continuum",
"Number": "Number",
"trainingsNumber": "Number",
"complete": "Finished",
"instructStart": "Start",
"instructContinuous": "Continuous",
"instructStop": "Stop",
"instructEnd": "end",
"instructContinue": "Continue",
"instructPause": "Pause",
"linkBluetoothFail": "Connection disconnected",
"deviceDisconnection": "The connection with the device was interrupted during training. Please reconnect the device and start training again.",
"ToggleTrainingsTips": "Do not switch training during the training process. Return to training.",
"NOComplete": "If the rope skipping time this time is less than 10 seconds, will the record not be saved?"
},
"index.home": "Record",
"index.bmi": "BMI Evaluation",
"index.Height": "Height",
"index.skipping": "Intelligent skipping",
@ -547,7 +437,9 @@
"body.initial_weight": "Initial weight",
"body.cumulative_day": "Days of weight loss",
"body.cumulative_day": "Cumulative weight loss",
"body.Gain_weight": "Cumulative weight gain",
"chartsDay": "That day",

View File

@ -157,7 +157,7 @@
"Nodevicefound": "没有搜索到蓝牙设备",
"onDeviceMeasureTips": "请确定设备是开机状态",
"openDeviceeMeasureTips": "请确定手机蓝牙已打开",
"openDeviceeMeasureTips2":"请确定手机位置信息已打开",
"openDeviceeMeasureTips2": "请确定手机位置信息已打开",
"deviceDisconnection": "测量过程中已与设备连接中断,请重新连接设备再开始测量",
"offBluetooth": "蓝牙已关闭,请重新打开蓝牙后再开始测量",
"remeasure": "重新测量",
@ -177,67 +177,6 @@
"lastHead": "上次测量头围是:",
"errorOperation": "操作错误,请重新测量"
},
"lung": {
"lungTitle": "肺活量测试",
"lungExplain0": "肺活量测试能让我们更好的了解您,为您生成详细的健康报告。",
"lungsuction": "吸气肺活量",
"lungsuctionspeed": "吸气速度",
"averagelungsuction": "平均吸气肺活量",
"isMarginal": "是否达标",
"lungHello": "您好",
"lungstart": "次测试开始",
"lungExplain1": "放下呼吸训练器,缓慢呼气,尽可能排空肺部气体",
"lungExplain2": "使用呼吸训练器,缓慢吸气,直至到达极限",
"lungExplain3": "根据您的个人信息,您的达标吸气肺活量为",
"nowlungsuctionspeed": "您本次测试吸气速度",
"lungresult": "肺活量测试结果",
"lungExplain4": "结合您的身体状态和改善目标,我们将为您生成详细的健康报告",
"lunglookreport": "查看本次报告",
"lunganewstart": "秒后",
"Marginal": "及格",
"lungfirst": "您好,第一次测试开始",
"lungsecond": "您好,第二次测试开始",
"lungthird": "您好,第三次测试开始",
"oneNumberTips": "请输入第一次吸气值",
"twoNumberTips": "请输入第二次吸气值",
"threeNumberTips": "请输入第三次吸气值"
},
"skip": {
"today_jump_num": "今日个数",
"today_jump_time": "今日时长",
"today_jump_kcal": "卡路里",
"jumpFree": "自由跳",
"backwardCount": "倒计数",
"Countdown": "倒计时",
"jumpFreedom": "自由",
"jumpFreeDegree": "自由次数",
"jumpFreeNumber": "个数",
"jumpTargetDegree": "目标次数",
"jumpUnlimited": "无限制",
"jumpTarget": "调整目标",
"jumpTargetTime": "目标时长 分:秒",
"MinuteSecond": "分:秒",
"Consumed": "消耗",
"LongpressEnd": "长按结束",
"AverageSpeed": "平均速度",
"Unit": "个/分钟",
"Numberofinterrupts": "中断次数",
"Times": "次",
"LongestConsecutive": "最长连续",
"Number": "个",
"trainingsNumber": "训练个数",
"complete": "完成",
"instructStart": "开始",
"instructContinuous": "连续",
"instructStop": "停止",
"instructEnd": "结束",
"instructContinue": "继续",
"instructPause": "暂停",
"linkBluetoothFail": "连接已断开",
"deviceDisconnection": "训练过程中已与设备连接中断,请重新连接设备再开始训练",
"ToggleTrainingsTips": "训练过程中请勿切换训练,返回训练",
"NOComplete": "本次跳绳时间低于10秒记录将不会被保存"
},
"index.home": "记录",
"index.skipping": "智能跳绳",
"index.vitalcapacity": "肺活训练",
@ -285,6 +224,7 @@
"contrast.after": "之后",
"body.target_weight": "目标体重",
"body.cumulative_weight": "累计减重",
"body.Gain_weight": "累计增重",
"body.initial_weight": "初始体重",
"body.cumulative_day": "减重天数",
"chartsDay": "当天",

View File

@ -1,7 +1,7 @@
{
"name" : "Reedaw",
"name" : "Reedaw+",
"appid" : "__UNI__20604F1",
"description" : "面向儿童青少年的健康体质测量APP",
"description" : "健康体质测量APP",
"versionName" : "1.3.4",
"versionCode" : 134,
"transformPx" : false,

View File

@ -1,212 +0,0 @@
<template>
<view class="TrendPage">
<view class="charts">
<!-- 时间选择 -->
<view class="boxTime">
<view class="one">
<picker mode="date" :end="endDate" @change="handStartTimeH" :fields="fields"
:value="startTime?startTime:startDate">
<view class="uni-input mr-10">{{startTime?startTime:startDate}}
<icon class="iconfont icon-arrow-down-bold"></icon>
</view>
</picker>
<view class="center">~</view>
<picker mode="date" :end="endDate" @change="handEndTimeH" :fields="fields"
:value="endTime?endTime:endDate">
<view class="uni-input mr-10">{{endTime?endTime:endDate}}
<icon class="iconfont icon-arrow-down-bold"></icon>
</view>
</picker>
</view>
</view>
</view>
<!-- 曲线图 -->
<view class="box">
<view class="boxLine">
<view class="line" v-for="(item,index) in weightList">
<view v-if="item.line.categories.length" class="mt-15 mb-15">
<qiunDataCharts type="column" :chartData="item.line" :canvas2d="true" :canvasId="item.id"
:Width="340" :Height="250" :animation="false"
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}" :ontouch="true" />
</view>
<view v-else>
<view class="nolist">
<image src="../../static/none.png"></image>
<text>{{$t("index.none")}}</text>
</view>
<view class="title">
{{item.title}}
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue'
export default {
components: {
qiunDataCharts,
},
computed: {
...mapState(["labelList"]),
endDate() {
return this.$tools.getDate("start")
},
startDate() {
return this.$tools.GetDateStr(-90);
},
},
data() {
return {
name: "",
list: [],
acd_id: 0,
handTrue: true,
active: 0,
startTime: "",
endTime: "",
fields: "",
weightList: [],
};
},
onLoad(options) {
let that = this
that.active = 0
that.acd_id = options.acd_id
that.time = that.startDate
that.labelList.forEach(ite => {
if (ite.acd_id == that.acd_id) {
that.list = ite.list
that.name = that.list[0]
return
}
})
that.handlePublicTrendList()
// #ifdef APP-PLUS
that.fields = "time"
// #endif
// #ifndef APP-PLUS
that.fields = "day"
// #endif
},
methods: {
handStartTimeH(e) {
let that = this
if (that.endTime) {
if (Date.parse(e.detail.value) > Date.parse(that.endTime)) {
that.$tools.msg(that.$t("tips.verifyBodyDate"))
return
}
} else {
if (Date.parse(e.detail.value) > Date.parse(that.endDate)) {
that.$tools.msg(that.$t("tips.verifyBodyDate"))
return
}
}
that.startTime = e.detail.value
that.handlePublicTrendList()
},
handEndTimeH(e) {
let that = this
if (that.startTime) {
if (Date.parse(e.detail.value) < Date.parse(that.startTime)) {
that.$tools.msg(that.$t("tips.verifyBodyDate"))
return
}
} else {
if (Date.parse(e.detail.value) < Date.parse(that.startDate)) {
that.$tools.msg(that.$t("tips.verifyBodyDate"))
return
}
}
that.endTime = e.detail.value
that.handlePublicTrendList()
},
handlePublicTrendList() {
let that = this
that.$model.getPublicTrendList({
aud_id: uni.getStorageSync('userid'),
acd_id: that.acd_id,
s_time: that.startTime ? that.startTime : that.startDate,
e_time: that.endTime ? that.endTime : that.endDate
}).then(res => {
// 线
if (res.code == 0) {
that.weightList = res.data
}
console.log("公共曲线", that.weightList)
})
},
navTo(url) {
uni.navigateTo({
url: url
})
}
},
}
</script>
<style lang="scss" scoped>
.TrendPage {
min-height: 100vh;
}
.boxTime {
display: flex;
justify-content: center;
align-items: center;
background-color: #fff;
border-radius: 10px 10px 0 0;
.one {
width: 100%;
display: flex;
line-height: 25px;
justify-content: space-between;
align-items: center;
}
.center {
width: 10%;
margin: 0 15px;
}
picker {
width: 50%;
border: none;
display: flex;
justify-content: center;
}
.iconfont {
color: #333333;
font-size: 36rpx;
}
}
.line {
padding-top: 15px;
}
.title {
width: 100%;
text-align: center;
color: #999;
font-size: 14PX;
margin-top: 15px;
text {
width: 15px;
height: 10px;
margin-right: 5px;
display: inline-block;
}
}
</style>

View File

@ -1,256 +0,0 @@
<template>
<view class="content">
<view class="tabbar">
<scroll-view class="scroll-menu" scroll-x="true" style="white-space: nowrap;">
<view v-for="(item,index) in labellist" :class="[active==index?'active':'']"
@click="handleActive(item,index)">
<text>{{item}}</text>
</view>
</scroll-view>
</view>
<view class=" calendar">
<!-- 日历 -->
<ren-calendar ref='ren' :markDays='markDays' @onDayClick='onDayClick' @onMonthClickPre='onMonthClickPre'
v-if="isShow">
</ren-calendar>
<!-- -->
<view class="box" v-if="infoList.length">
<view class="list" v-for="(item,index) in infoList" :key="index" @click="addMemberTags(item.id,item)">
<view class="item">
<view class="check">
<uni-icons :type="isActive.indexOf(item.id)!=-1?'checkbox-filled':'circle'" size="22"
:color="isActive.indexOf(item.id)!=-1?'#FEC407':'#dfdfdf'"></uni-icons>
</view>
<view>{{item.v1}}<text>{{item.v1_name}}</text></view>
<view v-if="item.v2">{{item.v2}}<text>{{item.v2_name}}</text></view>
<view v-if="item.v3">{{item.v3}}<text>{{item.v3_name}}</text></view>
</view>
</view>
</view>
<!-- -->
<view class="bottom">
<view class="list" v-for="(ite,ind) in ActiveDays" :key="ind" v-if="isActive"
@click="addMemberTags(ite.id,ite)">
<view class="item borderRadius">
<view class="time">{{ite.r_t}}</view>
<view>{{ite.v1}}<text>{{ite.v1_name}}</text></view>
<view v-if="ite.v2">{{ite.v2}}<text>{{ite.v2_name}}</text></view>
<view v-if="ite.v3">{{ite.v3}}<text>{{ite.v3_name}}</text></view>
<view class="check">
<uni-icons type="clear" size="22" color="#999"></uni-icons>
</view>
</view>
</view>
<view class="pkclass" v-if="length==2">vs</view>
<!-- <view :class="{'active':length!=2}" class="btn" @click="handlePK">对比</view> -->
</view>
</view>
</view>
</template>
<script>
import RenCalendar from '@/element/ren-calendar/ren-calendar.vue';
import {
mapState
} from "vuex";
export default {
data() {
return {
markDays: [],
infoList: [],
list: [],
isActive: [],
ActiveDays: [],
startM: null,
endM: null,
isShow: true,
acd_id: "",
active: 0,
labelName: "",
}
},
components: {
RenCalendar,
},
computed: {
...mapState(["user", "TrendPk", "labelList"]),
labellist() {
let that = this
let list = []
that.labelList.forEach(ite => {
if (ite.acd_id == that.acd_id) {
list = ite.list
that.labelName = ite.list[0]
}
})
return list
},
length() {
return this.isActive.length
},
endDate() {
return this.$tools.getDate("start")
},
},
onLoad(optoins) {
let that = this
that.acd_id = optoins.acd_id
that.startM = that.$tools.getDate("m").substring(0, 10)
that.endM = that.$tools.getDate("m").substring(11, 21)
that.markDays = []
that.list = []
that.isActive = []
that.ActiveDays = []
that.$nextTick(() => {
that.isShow = true
that.getList(that.startM, that.endM)
})
},
methods: {
getList(start, end) {
let that = this
that.$model.getPublicResultdiff({
aud_id: uni.getStorageSync('userid'),
acd_id: that.acd_id,
s_time: start,
e_time: end,
name: that.labelName
}).then(res => {
if (res) {
that.markDays = res.Dlist
that.list = res.data
for (var i = 0; i < res.data.length; i++) {
if (Date.parse(that.endDate) == Date.parse(res.data[i].r_t)) {
that.infoList.push(res.data[i])
}
}
console.log("对比", res, )
}
})
},
onMonthClickPre(data) {
console.log("onMonthClickPre", data)
let that = this
let start = data.substring(0, 10)
let end = data.substring(11, 21)
that.infoList = []
that.markDays = []
that.list = []
that.getList(start, end)
},
onDayClick(data) {
let that = this
this.infoList = []
for (var i = 0; i < that.list.length; i++) {
if (Date.parse(data.date) == Date.parse(that.list[i].r_t)) { //includes
this.infoList.push(that.list[i]);
}
}
},
addMemberTags(index, item) {
var that = this;
console.log("addMemberTags", index, item)
if (that.isActive.indexOf(index) == -1) {
that.isActive.push(index);
that.ActiveDays.push(item);
} else {
that.isActive.splice(that.isActive.indexOf(index), 1);
that.ActiveDays.splice(that.ActiveDays.indexOf(item), 1);
}
if (that.isActive.length > 2) {
that.isActive.splice(0, 1)
that.ActiveDays.splice(0, 1);
}
},
handlePK() {
let that = this
if (that.isActive.length != 2) {
that.$tools.msg(that.$t("tips.verifyBontrast"))
return
}
let info = {}
info.type = that.acd_id
info.before_id = that.isActive[0]
info.after_id = that.isActive[1]
console.log("1111", info, that.isActive)
uni.navigateTo({
url: "/pageTwo/compk/pkdetail?info=" + JSON.stringify(info)
})
},
handleActive(ite, ind) {
let that = this
that.active = ind
that.labelName = ite
that.startM = that.$tools.getDate("m").substring(0, 10)
that.endM = that.$tools.getDate("m").substring(11, 21)
that.list = []
that.infoList = []
that.markDays = []
that.isActive = []
that.ActiveDays = []
that.$nextTick(() => {
that.isShow = true
that.getList(that.startM, that.endM)
})
},
},
}
</script>
<style scoped lang="scss">
.calendar {
padding-top: 60px;
}
/deep/.calendar-wrapper {
margin: 15px;
.header {
background-color: #fff;
color: $maincolor;
border-radius: 10px 10px 0 0;
}
/deep/uni-icons {
color: $maincolor;
}
}
.item {
font-size: 30rpx !important;
}
.tabbar {
display: flex;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 999;
justify-content: space-between;
border-bottom: 1px solid #f7f7f7;
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
background-color: #fff;
.scroll-menu {
width: 100%;
white-space: nowrap;
view {
height: 55px;
line-height: 55px;
display: inline-block;
min-width: 100px;
margin: 0 10px;
text-align: center;
}
}
.active {
color: $maincolor;
font-weight: bold;
border-bottom: 2px solid $maincolor;
}
}
</style>

View File

@ -1,273 +0,0 @@
<template>
<view class="common">
<view class="tabbar">
<scroll-view class="scroll-menu" scroll-x="true" style="white-space: nowrap;">
<view v-for="(item,index) in labellist" :class="[active==index?'active':'']"
@click="handleActive(item,index)">
<text>{{item}}</text>
</view>
</scroll-view>
</view>
<view class="history">
<uni-swipe-action>
<uni-swipe-action-item :right-options="item.options" v-for="(item, index) in ranklist" :key="index"
@click="swipeClick($event, index)">
<view class='list'>
<view class="item">
<view class="time">
<icon class="t-icon t-icon-shijian-mianxing-0"></icon>
<text>{{item.record_time}}</text>
</view>
<view>{{item.v1}}<text>{{item.v1_name}}</text></view>
<view>{{item.v2}}<text>{{item.v2_name}}</text></view>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
<view class="endtext" v-if="!lastPage || page >= lastPage"> {{$t("tips.msgBottom")}} </view>
</view>
<view class="nolist" v-if="!lastPage">
<image src="../../static/none.png"></image>
<text>{{$t("index.none")}}</text>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
computed: {
...mapState(['user', 'labelList']),
labellist() {
let that = this
let list = []
that.labelList.forEach(ite => {
if (ite.acd_id == that.acd_id) {
list = ite.list
that.labelName = ite.list[0]
}
})
return list
},
endDate() {
return this.$tools.getDate("start")
},
startDate() {
return this.$tools.GetDateStr(-90);
},
},
data() {
return {
ranklist: [],
page: 1,
isDelete: false,
lastPage: '',
acd_id: "",
active: 0,
labelName: "",
}
},
onLoad(options) {
let that = this
that.acd_id = options.acd_id
that.$nextTick(() => {
that.getList()
})
},
onUnload() {
console.log('关闭页面');
let that = this
var pages = getCurrentPages();
var Page = pages[pages.length - 1]; //
var prevPage = pages[pages.length - 2];
if (that.isDelete) { //
prevPage.$vm.reload()
}
},
onReachBottom() {
let that = this
console.log("onReachBottom", this.lastPage)
if (!this.lastPage || this.page >= this.lastPage) {
uni.showToast({
title: '没有更多数据!',
icon: 'none'
})
return
}
this.page++
this.getList()
},
methods: {
swipeClick(e, index) {
let that = this
let id = that.ranklist[index].id
uni.showModal({
title: '友情提示',
content: '是否删除当前测量记录?',
success: function(res) {
if (res.confirm) {
that.$model.getPublicHistoryDel({
id: id,
}).then((res) => {
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.ranklist.splice(index, 1)
that.$store.dispatch("getUserInfo", {
aud_id: uni.getStorageSync('userid')
})
that.isDelete = true
that.$tools.msg("删除成功")
})
} else if (res.cancel) {
that.$tools.msg("您已取消操作!");
}
},
})
},
getList() {
let that = this
that.$model.getPublicHistory({
aud_id: uni.getStorageSync('userid'),
acd_id: that.acd_id,
page: that.page,
name: that.labelName
}).then((res) => {
console.log("历史记录", res)
if (res.code != 0) return
let options = [{
text: '删除',
style: {
backgroundColor: '#dd524d'
}
}]
res.data.rows.forEach(item => {
item.options = options
})
this.ranklist = this.ranklist.concat(res.data.rows)
this.lastPage = res.data.totalpage
})
},
handleActive(ite, ind) {
let that = this
that.active = ind
that.labelName = ite
that.page = 1
that.ranklist = []
that.lastPage = ""
that.getList()
},
}
}
</script>
<style scoped="scoped" lang="scss">
.common {
width: 100%;
min-height: 100.5vh; //
overflow-y: scroll;
background-color: #f7f7f7;
}
.tabbar {
display: flex;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 999;
justify-content: space-between;
border-bottom: 1px solid #f7f7f7;
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
background-color: #fff;
.scroll-menu {
width: 100%;
white-space: nowrap;
view {
height: 55px;
line-height: 55px;
display: inline-block;
min-width: 100px;
margin: 0 10px;
text-align: center;
}
}
.active {
color: $maincolor;
font-weight: bold;
border-bottom: 2px solid $maincolor;
}
}
.history {
width: calc(100% - 30px);
height: auto;
margin: 70px 15px 0;
padding-bottom: 40px;
.list {
width: 100%;
margin-top: 12px;
position: relative;
.item {
width: calc(100% - 20px);
height: auto;
background: #fff;
padding: 10px;
display: flex;
justify-content: space-between;
border-radius: 10px;
align-items: center;
font-weight: 700;
font-size: 30rpx !important;
text {
width: 100%;
display: block;
color: #666;
text-align: center;
font-weight: 500;
font-size: 28rpx;
}
view {
width: 28%;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
}
.time {
width: 44% !important;
font-size: 28rpx;
color: #666;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
icon {
width: 40rpx;
height: 40rpx;
margin-right: 5px;
}
text {
width: 100%;
font-size: 30rpx;
margin-top: 3px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
}
</style>

View File

@ -1,158 +0,0 @@
<template>
<view class="content pkconp">
<view class="headerTop">
<view class="left">
<image :src="memInfo.headimg" class="image1"></image>
</view>
<view class="right">
<view class="name">{{memInfo.name?memInfo.name:memInfo.nickname}}</view>
<view class="top">
<view>
{{$t("common.infoGender")}}{{memInfo.gender=='0'?$t("common.infoUnknown"):memInfo.gender=='1'?$t("common.infoMan"):$t("common.infoWoman")}}
</view>
<view class="ml-15">{{$t("common.infoAge")}}{{user.age}}{{$t("common.infoAgeunit")}}</view>
</view>
</view>
</view>
<view class="box" v-if="acd_id==2">
<view class="item">
<view>{{memInfo.day?memInfo.day:'0'}}</view>
<text>{{$t("contrast.time")}}</text>
</view>
<view class="item">
<view>{{memInfo.weightdiff?Math.abs(memInfo.weightdiff):0}}</view>
<text v-if="Number(memInfo.weightdiff)>0">{{$t("contrast.weightdiffAugment")}}(kg)</text>
<text v-else>{{$t("contrast.weightdiff")}}(kg)</text>
</view>
<view class="item">
<view>{{memInfo.fat_wdiff?Math.abs(memInfo.fat_wdiff):0}}</view>
<text v-if="Number(memInfo.fat_wdiff)>0">{{$t("contrast.fatWdiffAugment")}}(kg)</text>
<text v-else>{{$t("contrast.fatWdiff")}}(kg)</text>
</view>
<view class="time">
<view>
<uni-icons class="t-icon t-icon-shijian-mianxing-0"></uni-icons>{{memInfo.time}}
</view>{{$t("contrast.changeData")}}
</view>
</view>
<view class="boxTime" v-else>
<view class=" mt-10 mb-10">
<uni-icons class="t-icon t-icon-shijian-mianxing-0 mr-10 size18"></uni-icons>
{{memInfo.time}}
</view>
{{$t("contrast.changeData")}}
</view>
<view class="control">
<!-- 名称 -->
<view class="title">
<view class="name"></view>
<view>{{$t("contrast.trend")}}</view>
<view>{{$t("contrast.before")}}</view>
<view>{{$t("contrast.after")}}</view>
</view>
<view v-for="(ite,ind) in listStr" :key="ind" class="li">
<view class="name">
<text>{{ite.title}}</text>
</view>
<view class="num">
<text
v-if="ite.diffval!=0||ite.diffval=='0.00'||ite.diffval=='00:00:00'">{{acd_id!=6?Math.abs(ite.diffval):ite.diffval}}</text>
<icon class="t-icon t-icon-shang" v-if="Number(ite.diffval)>0"></icon>
<icon class="t-icon t-icon-xia" v-if="Number(ite.diffval)<0"></icon>
<icon class="t-icon t-icon-hengxian"
v-if="!ite.diffval||ite.diffval=='0.00'||ite.diffval=='00:00:00'"></icon>
</view>
<view class="f">
<view>{{ite.firstresult?ite.firstresult.value:'-'}}</view>
<text>{{ite.firstresult.level}}</text>
</view>
<view class="f">
<view>{{ite.secondresult?ite.secondresult.value:'-'}}</view>
<text>{{ite.secondresult.level}}</text>
</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
onLoad(options) {
let that = this
//
console.log("options", options)
if (options.info) {
let info = JSON.parse(options.info)
that.acd_id = info.type
that.handleSharepic(JSON.parse(options.info))
}
},
computed: {
...mapState(["user", "appTheme"]),
},
methods: {
handleSharepic(info) {
let that = this
that.$model.getresultcontrast({
type: info.type,
before_id: info.before_id,
after_id: info.after_id,
}).then(res => {
console.log("res", res)
if (res.code != 0) {
this.$tools.msg(res.msg)
return
}
res.data.list.forEach(ite => {
if (ite.firstresult && ite.firstresult.name == 'weight') {
res.data.weightdiff = ite.diffval
}
if (ite.firstresult && ite.firstresult.name == 'fat_w') {
res.data.fat_wdiff = ite.diffval
}
if (ite.firstresult || ite.secondresult) {
ite.name = ite.firstresult ? ite.firstresult.name : ite.secondresult.name
ite.title = ite.firstresult ? ite.firstresult.title : ite.secondresult.title
}
})
that.memInfo = res.data
that.listStr = res.data.list
})
},
},
data() {
return {
memInfo: {},
listStr: [],
acd_id: "",
}
},
}
</script>
<style scoped lang="scss">
.age {
margin-right: 20px;
}
.icon {
width: 18px;
height: 18px;
padding: 3px;
margin-right: 7px;
background-color: #aaa;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.t-icon-hengxian {
height: 2px;
width: 10px;
}
</style>

View File

@ -1,75 +0,0 @@
<template>
<view class="content">
<view class="list">
<view class="item" v-for="(item,index) in list" @click="handlebinging(item)">
<image :src="item.pic"></image>
<view class="name">{{item.name}}</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: []
}
},
onLoad() {
this.handleUserDeviceList()
},
methods: {
handleUserDeviceList() {
let that = this
that.$model.getDeviceList({}).then(res => {
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.list = res.data.list
}).catch(err => {})
},
handlebinging(item) {
console.log("item", item)
uni.redirectTo({
url: "/pageTwo/business/search?id=" + item.id
})
}
}
}
</script>
<style scoped lang="scss">
.list {
width: 100%;
.item {
width: 33.3%;
padding-top: 8px;
display: flex;
float: left;
flex-direction: column;
box-sizing: border-box;
justify-content: center;
border-right: 1px solid #dfdfdf;
border-bottom: 1px solid #dfdfdf;
image {
width: 60px;
height: 60px;
margin: 0 auto 10px;
}
.name {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: center;
margin-bottom: 10px;
}
}
}
</style>

View File

@ -1,154 +0,0 @@
<template>
<view class="content">
<view class="add" @click="handleAddDevice()">{{$t("common.titleBusinesAdd")}}</view>
<view class="list">
<view class="item" v-for="(item,index) in list" @click="handleunbind(item,index)">
<view class="left">
<image :src="item.pic"></image>
<view class="name">
<text>{{item.name}}</text>
<text>{{item.bind_time}}</text>
</view>
</view>
<view class="bing">{{$t("common.btnUnbind")}}</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {
// list: []
}
},
computed: {
...mapState(["user", "userDeviceList"]),
list() {
return this.userDeviceList
}
},
onLoad() {
let that = this
that.$store.dispatch('getUserDeviceList')
},
onPullDownRefresh() {
let that = this
that.$store.dispatch('getUserDeviceList')
setTimeout(() => {
uni.stopPullDownRefresh()
}, 1000);
},
methods: {
handleunbind(item, index) {
let that = this
uni.showModal({
title: that.$t('tips.msgTitle'),
content: that.$t('tips.verifyUnbindt'),
cancelText: that.$t('tips.btnSancellation'),
confirmText: that.$t('tips.btnConfirm'),
success: function(res) {
if (res.confirm) {
that.$model.getUnbinding({
id: item.id
}).then(res => {
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.$tools.msg(that.$t("tips.msgUnBind"))
that.list.splice(index, 1)
that.$store.dispatch('getUserInfo', {
aud_id: uni.getStorageSync('userid')
})
})
} else if (res.cancel) {
that.$tools.msg(that.$t("tips.msgCancel"));
}
},
})
},
handleAddDevice() {
uni.navigateTo({
url: "/pageTwo/business/addDevice"
})
},
}
}
</script>
<style lang="scss" scoped>
.content {
font-size: 32rpx;
padding: 15px;
background-color: #F5F6FA;
min-height: calc(100vh - 30px);
}
.add {
width: 100%;
height: 35px;
line-height: 35px;
font-size: 32rpx;
margin-bottom: 15px;
color: #fff;
border-radius: 15px;
display: flex;
justify-content: center;
background: $btncolor;
}
.list {
width: 100%;
.item {
width: calc(100% - 20px);
padding: 5px 10px;
display: flex;
align-items: center;
justify-content: space-between;
border-radius: 10px;
background-color: #fff;
margin-bottom: 10px;
.left {
width: 80%;
display: flex;
align-items: center;
image {
width: 50px;
height: 50px;
margin-right: 10px;
}
.name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: center;
text {
width: 100%;
display: block;
text-align: left;
margin-top: 10px;
}
}
}
.bing {
width: auto;
float: right;
background-color: #dfdfdf;
border-radius: 10px;
padding: 5px 10px;
}
}
}
</style>

View File

@ -1,296 +0,0 @@
<template>
<view class="container">
<view class="tips">{{$t("linkBluetooth.onBluetoothTips")}}</view>
<view class="item" @click="openBluetoothAdapter">{{$t("linkBluetooth.startSearchBluetooth")}}</view>
<view class="devices_summary">{{$t("linkBluetooth.onBluetoothHaveFound")}}
{{devices.length}}{{$t("linkBluetooth.onBluetoothDevice")}}
</view>
<view>
<scroll-view class="device_list" scroll-y scroll-with-animation v-if="popup">
<view v-for="(item,index) in devices" :key="index" @tap="createBLEConnection(item)" class="device_item">
<view>
<text>{{item.localName ||item.name}}</text>
</view>
<view>mac地址{{$t("linkBluetooth.onBluetoothMac")}}:{{item.macAddr || item.deviceId}}</view>
</view>
</scroll-view>
</view>
<view class="tishi">
<view class="text">
<icon class="t-icon t-icon-tishi"></icon> {{$t("linkBluetooth.onBluetoothBind")}}
</view>
<view class="dv">
<text class="size14">1{{$t("linkBluetooth.openDeviceeMeasureTips")}}</text>
<text class="size14">2{{$t("linkBluetooth.onDeviceMeasureTips")}}</text>
<text class="size14">3{{$t("linkBluetooth.onBluetoothSelect")}}</text>
</view>
</view>
</view>
</template>
<script>
let that;
let myTime;
import {
mapState
} from "vuex";
export default {
data() {
return {
macAddr: "",
code: "",
deviceId: "",
popup: false,
devices: [],
id: 0
}
},
computed: {
...mapState(["user", "isConnected", "isBluetoothTyle"]),
},
onLoad(options) {
that = this
that.id = options.id
that.$Bluetooth.onBLEConnectionStateChange()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
},
onUnload() {
console.log("onUnload")
let that = this
if (!that.Unload) {
uni.hideLoading()
that.$Bluetooth.closeBluetoothAdapter() //
that.$Bluetooth.stopBluetoothDevicesDiscovery() //
}
},
methods: {
//
openBluetoothAdapter() {
let that = this
uni.openBluetoothAdapter({
success: e => {
console.log("蓝牙初始化成功")
that.startBluetoothDeviceDiscovery()
},
fail: e => {
console.log('初始化蓝牙失败:' + e.errMsg);
that.$Bluetooth.getBluetoothAdapter(e)
}
});
},
//
startBluetoothDeviceDiscovery() {
let that = this
uni.startBluetoothDevicesDiscovery({
allowDuplicatesKey: true, //
success: res => {
that.onBluetoothDeviceFound();
},
fail: res => {}
});
},
/**
* 发现外围设备
*/
onBluetoothDeviceFound() {
var that = this;
const foundDevices = []
wx.showLoading({
title: that.$t("linkBluetooth.searchBluetooth"),
})
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
if (device.name.indexOf("YPC") != -1) {
clearTimeout(myTime);
let buff = device.name.slice(7, 19)
device.macAddr = that.$Bluetooth.str2Num(buff)
device.deviceId = that.$Bluetooth.str2Num(buff)
that.handleDevice(device)
return
}
if (device.name.indexOf("G02") != -1) {
clearTimeout(myTime);
let buff = device.advertisData.slice(3, 9)
device.mac = new Uint8Array(buff) // 广maciOSmac
let tempMac = Array.from(device.mac)
tempMac.reverse()
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
that.handleDevice(device)
return
}
if (device.name.indexOf("Yihejia_Lung") != -1) {
console.log("肺活量", device, '04:0D:84:48:E0:9B')
device.macAddr = device.deviceId
clearTimeout(myTime);
that.handleDevice(device)
return
}
})
});
that.handleMyTime()
},
handleDevice(device) {
let that = this
const foundDevices = that.devices
const idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId)
that.deviceId = device.deviceId;
if (idx === -1) {
that.devices.push(device);
} else {
that.devices[idx] = device
}
that.popup = true
},
handleMyTime() {
var that = this;
myTime = setTimeout(function() {
if (!that.devices.length) {
that.islink = -1
that.$tools.showModal(that.$t("linkBluetooth.Nodevicefound"))
}
uni.hideLoading()
clearTimeout(myTime);
that.$Bluetooth.stopBluetoothDevicesDiscovery() //
}, 15000);
},
//
createBLEConnection(e) {
let that = this;
that.$Bluetooth.stopBluetoothDevicesDiscovery()
that.macAddr = e.macAddr
uni.showModal({
title: that.$t("tips.msgTitle"),
content: that.$t("tips.verifybindt"),
cancelText: that.$t("tips.btnSancellation"),
confirmText: that.$t("tips.btnConfirm"),
success: (res) => {
if (res.confirm) {
that.getActive()
} else {
that.$tools.msg(that.$t("tips.msgCancel"))
}
}
})
},
getActive() {
let that = this
that.$model.getBinding({
device_id: that.id,
device_mac: that.macAddr
}).then(res => {
that.$Bluetooth.closeBluetoothAdapter()
that.devices = []
if (res.code == 0) {
that.$tools.msg(that.$t("tips.msgbind"))
that.$store.dispatch('getUserDeviceList')
that.$store.dispatch('getUserInfo', {
aud_id: uni.getStorageSync('userid')
})
setTimeout(function() {
uni.switchTab({
url: "/pages/home/home"
})
}, 500)
} else {
that.$tools.msg(res.msg)
}
})
},
}
}
</script>
<style scoped lang="scss">
.content {
min-height: calc(100vh - 66px);
padding: 0;
border-top: 66px solid #F9FAFC;
background-color: #fff;
}
.tishi {
width: 100%;
font-size: 28rpx;
line-height: 25px;
font-weight: bold;
position: absolute;
bottom: 20px;
padding-left: 15px;
.text {
display: flex;
align-items: center;
icon {
margin-right: 5px;
}
}
text {
font-weight: 500;
font-size: 32rpx;
color: #999;
width: 100%;
display: block;
}
}
.item {
width: 70%;
height: 40px;
line-height: 38px;
text-align: center;
background: #f7f7f7;
border: 1px solid #dfdfdf;
font-weight: bold;
margin: auto;
border-radius: 15px;
margin-top: 15px;
}
.devices_summary {
width: 100%;
height: 40px;
line-height: 40px;
text-align: center;
color: #666;
}
.device_list {
flex: 1;
width: 100%;
height: auto;
max-height: 340px;
margin-top: 0;
margin-bottom: 10px;
position: absolute;
bottom: 160px;
top: 170px;
.device_item {
font-size: 32rpx;
padding: 7px 10px;
color: #999;
border-bottom: 1px solid #dfdfdf;
text {
display: inline-block;
font-size: 28rpx;
font-weight: bold;
color: #666;
margin-bottom: 5px;
}
}
}
.tips {
font-size: 28rpx;
text-align: center;
color: #e83a1e;
background: #f7e4c8;
padding: 5px 0;
margin-top: 15px;
}
</style>

View File

@ -1,178 +0,0 @@
<template>
<view class="content">
<!-- 已添加的卡片 -->
<view class="box">
<!-- <view class="tips">长按拖拽可调整卡片位置</view> -->
<view class="list">
<view class="item" v-for="(item,index) in cardList.user" @click="deleteCard(item,index)">
<uni-icons type="minus-filled" size="18" color="#FF6D66" v-if="item.id!=2"></uni-icons>
<view class="info">
<image :src="item.pic"></image>
<view>{{item.name}}</view>
</view>
</view>
</view>
</view>
<!-- 可添加的卡片 -->
<view class="box">
<view class="tips2 tips">可添加的卡片</view>
<view class="list">
<view class="item" v-for="(item,index) in cardList.all" @click="addCard(item,index)">
<uni-icons type="plus-filled" size="18" color="#05BD79"></uni-icons>
<view class="info">
<image :src="item.pic"></image>
<view>{{item.name}}</view>
</view>
</view>
</view>
</view>
<view class="btn" @click="handleGradeList()">保存卡片</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {
cardList: {
user: [],
all: []
},
}
},
onLoad() {
let that = this
that.handleCardList()
},
computed: {
...mapState(['user']),
},
methods: {
//
handleCardList() {
let that = this
that.$model.getCardAllList({
aud_id: that.user.id
}).then(res => {
console.log("卡片列表", res.data)
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.cardList = res.data
})
},
handleGradeList() {
let that = this
let list = []
that.cardList.user.forEach(ite => {
list.push(ite.id)
})
that.$model.getCardAllOrder({
aud_id: that.user.id,
card_order: list.join(",")
}).then(res => {
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.$store.dispatch('getUserInfo', {
aud_id: that.user.id
})
uni.switchTab({
url: "/pages/home/home"
})
}).catch(err => {})
},
//
deleteCard(item, index) {
let that = this
if (item.id == 2) return
that.cardList.user.splice(index, 1)
that.cardList.all.push(item)
// that.handleGradeList()
},
//
addCard(item, index) {
let that = this
that.cardList.all.splice(index, 1)
that.cardList.user.push(item)
// that.handleGradeList()
},
}
}
</script>
<style scoped lang="scss">
.content {
padding: 15px;
font-size: 32rpx;
background-color: #F5F6FA;
min-height: 100vh;
.tips {
font-size: 32rpx;
color: #999;
width: 100%;
margin-bottom: 15px;
}
.tips2 {
color: #333;
font-size: 32rpx;
font-weight: bold;
}
.list {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.item {
width: 45%;
background-color: #fff;
margin-bottom: 15px;
position: relative;
height: 60px;
line-height: 60px;
border-radius: 5px;
.uni-icons,
uni-icons {
font-size: 36rpx;
position: absolute;
top: -28px;
left: -5px;
}
.info {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
image {
width: 30px;
height: 30px;
background-color: #F2F2F2;
margin-right: 10px;
border-radius: 50%;
}
}
}
}
}
.btn {
width: auto;
margin: 40px 15px 0;
background: $btncolor !important;
}
</style>

View File

@ -1,285 +0,0 @@
<template>
<view class="weightPages">
<view class="content ">
<view class="title" v-if="isConnection == 0">连接中请稍后</view>
<view class="title" v-if="isConnection == 1">连接成功开始测量</view>
<view class="title" v-if="isConnection == 2" @click="openBluetoothAdapter">连接失败点击重新连接</view>
<view class="text">{{text}}</view>
<view class="image">
<image src="/static/HC.png" class="image3"></image>
</view>
<view class="tips">
<view>提示</view>
<text>1.请确定设备已开机</text>
<text>2.请确定手机蓝牙及位置信息已打开</text>
</view>
</view>
<!-- 手动记录 -->
<view class="wrapper" v-if="isHeight">
<view class="bg"></view>
<view class="Blue">
<view class="h4">测量结果提示</view>
<view class="Blue-box">
本次测量身高为<text>{{height}}{{unit}}</text>
</view>
<view class="Blue-box">
上次测量体重为<input v-model="weight" type="digit" placeholder="请输入体重" />kg
</view>
<view class="Blue-btn Blue-close" @click="handleBack(1)">取消</view>
<view class="Blue-btn" @click="handleGetMeasure">保存测量结果</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
let myTime;
export default {
data() {
return {
text: "",
weight: "",
height: "",
deviceId: "",
macAddr: "",
unit: "cm",
Unload: false,
stopblue: true,
isHeight: false,
isConnection: 0,
isdevice: false
}
},
computed: {
...mapState(["user", "isConnected", "isBluetoothTyle"]),
info() {
return this.user
},
endDate() {
return this.$tools.getDate("start")
},
startDate() {
return this.$tools.GetDateStr(-90);
},
},
onUnload: function() {
let that = this
if (!that.Unload) {
clearTimeout(myTime)
that.stopBluetoothDevicesDiscovery() //
that.closeBluetoothAdapter()
console.log("页面返回onUnload")
}
},
onLoad(options) {
let that = this
that.text = ""
that.isdevice = options.isdevice
that.openBluetoothAdapter()
},
watch: {
isConnected: function() {
let that = this
if (!that.isConnected) {
that.handleBack()
that.isConnection = 2
}
},
isBluetoothTyle: function() {
let that = this
if (!that.isBluetoothTyle) {
that.handleBack()
that.isConnection = 2
}
},
stopblue: function() {
let that = this
if (!that.stopblue) {
clearTimeout(myTime);
that.isHeight = true
}
}
},
methods: {
//
openBluetoothAdapter() {
let that = this
that.text = ""
that.stopblue = true
that.isHeight = false
uni.openBluetoothAdapter({
success: e => {
that.isConnection = 0
that.startBluetoothDeviceDiscovery()
},
fail: e => {
that.isConnection = 2
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
}
});
},
//
startBluetoothDeviceDiscovery() {
let that = this
uni.startBluetoothDevicesDiscovery({
allowDuplicatesKey: true,
success: res => {
that.onBluetoothDeviceFound();
},
fail: res => {
that.isConnection = 2
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
}
});
},
/**
* 发现外围设备
*/
onBluetoothDeviceFound() {
var that = this;
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
if (!device.name && !device.localName) {
return
}
if (device.name.indexOf("G02") !== -1) {
let value = that.$tools.ab2hex(device.advertisData, "")
let type = value.substring(22, 24)
let num = value.substring(28, 29)
let dw = value.substring(29, 30)
let data = parseInt(value.substring(24, 28), 16)
that.isConnection = 1
if (dw == "1") {
that.unit = "FT"
data = data * 2.54
}
if (num == "1") {
data = data / 10
}
if (num == "2") {
data = data / 100
}
if (num == "3") {
data = data / 1000
}
if (type == "01") {
clearTimeout(myTime);
that.text = "您的身高是:" + data + that.unit
let buffer = device.advertisData.slice(3, 9)
device.mac = new Uint8Array(buffer) // 广maciOSmac
let tempMac = Array.from(device.mac)
tempMac.reverse()
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
that.deviceId = device.deviceId
that.macAddr = device.macAddr
that.height = data
that.stopblue = false
return
}
return;
}
})
});
that.handleMyTime()
},
handleMyTime() {
var that = this;
myTime = setTimeout(function() {
if (!that.macAddr) {
clearTimeout(myTime);
that.text = ""
that.Unload = true
that.stopblue = true
that.isHeight = false
that.isConnection = 2
that.startBluetoothDeviceDiscovery()
that.closeBluetoothAdapter()
}
}, 30000);
},
/**
* 停止搜索蓝牙设备
*/
stopBluetoothDevicesDiscovery() {
uni.stopBluetoothDevicesDiscovery({
success: e => {
console.log("停止搜索蓝牙设备", e)
},
});
},
//
handleGetMeasure() {
let that = this
if (!that.weight) {
this.$tools.msg("请输入体重")
return
}
that.$model.getmeasurefunit({
adc: 0,
weight: that.weight,
height: that.height,
aud_id: that.info.id
}).then(res => {
that.isHeight = false
if (res.code == 0) {
that.$store.dispatch('getUserInfo', {
aud_id: uni.getStorageSync('userid')
})
that.$store.dispatch("getResult", {
aud_id: uni.getStorageSync('userid')
})
that.$store.dispatch("GetBodyTrendList", {
aud_id: uni.getStorageSync('userid'),
s_time: that.startDate,
e_time: that.endDate
})
that.$tools.msg("测量成功")
} else {
that.$tools.msg("测量失败")
}
that.Unload = true
setTimeout(function() {
that.closeBluetoothAdapter()
uni.redirectTo({
url: "/pages/body/body?acd_id=2" + '&device=' + that.isdevice
})
}, 200)
})
},
//
handleBack(ind) {
let that = this
that.text = ""
that.Unload = true
that.stopBluetoothDevicesDiscovery()
that.closeBluetoothAdapter()
if (ind == 1) {
uni.redirectTo({
url: "/pages/body/body?acd_id=2" + '&device=' + that.isdevice
})
}
},
/**
* 断开蓝牙模块
*/
closeBluetoothAdapter() {
let that = this;
uni.closeBluetoothAdapter({
success: res => {
console.log('蓝牙模块关闭成功');
}
})
},
},
}
</script>
<style scoped lang="scss">
.image3 {
width: 200px !important;
height: 340px !important;
}
</style>

View File

@ -1,485 +0,0 @@
<template>
<view class="content skipping">
<!--自由训练 -->
<view class="title">{{info.active==1?'自由跳':info.active==2?'倒计时':'倒计数'}}</view>
<view class="skiptop">
<view class="item">
<view class="item-ite">{{info.active==1?'自由次数':info.active==2?"个数":'目标次数'}}<text>{{weight}}</text>
</view>
<view class="item-ite">
{{info.active==2?'目标时长 分:秒':"分:秒"}}<text>{{time_m?time_m:'00'}}:{{time_s?time_s:'00'}}</text>
</view>
<view class="item-ite">消耗/kcal<text>{{Math.floor(kcal)}}</text></view>
</view>
</view>
<view class="image">
<image src="/pageTwo/static/t01.gif"></image>
</view>
<view class="end" @longpress="onlongpress">长按结束</view>
<!-- 报告 -->
<view class="wrapper" v-if="iswrapper">
<view class="bg">
<view class="edit">
<view class="editem">
<view>平均速度<text class="cyello Blue size20 mr-5">{{bpm.toFixed(1)}}</text>bpm</view>
<view class="size12 c999 ">(bpm=/分钟)</view>
</view>
<view class="center">
<view class="left">
<image src="/pageTwo/static/duan.png"></image>
<view class="name">
<view>
中断次数
</view>
<view>
<text class="cyello Blue size20 mr-5">{{Bcount}}</text>
</view>
</view>
</view>
<!-- -->
<view class="left">
<image src="/pageTwo/static/xu.png"></image>
<view class="name">
<view>
最长连续
</view>
<view>
<text class="cyello Blue size20 mr-5">{{continuous}}</text>
</view>
</view>
</view>
</view>
<view class="item">
<view class="item-ite"><text>{{weight}}</text>训练个数</view>
<view class="item-ite"><text>{{time_m?time_m:'00'}}:{{time_s?time_s:'00'}}</text>:</view>
<view class="item-ite"><text>{{Math.floor(kcal)}}</text>消耗/kcal</view>
</view>
<view class="btn" @click="handleTarget">完成</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
let innerAudioContext = null;
export default {
data() {
return {
bpm: 0,
isend: false,
weight: 0,
Ycount: 0,
time_m: "",
time_s: "",
time: 0,
kcal: 0,
Bcount: 0,
continuous: 0,
info: {},
isToggle: false,
isEnd: false,
iswrapper: false,
isStart: false
}
},
computed: {
...mapState(["isConnected", "isBluetoothTyle"]),
},
onLoad(options) {
let that = this
innerAudioContext = uni.createInnerAudioContext()
if (options && options.info) {
let info = options.info
that.info = JSON.parse(info)
that.notifyBLECharacteristicValue()
setTimeout(function() {
that.handleStart('开始')
}, 900)
setTimeout(function() {
that.handleStart('连续')
}, 1200)
}
that.handleAudioStart()
that.$Bluetooth.onBLEConnectionStateChange()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
},
onUnload: function() {
let that = this
if (innerAudioContext) {
innerAudioContext.destroy(); //
}
that.handleEnd()
console.log("PCT01返回onUnload")
},
watch: {
isConnected: function() {
let that = this
if (!that.isConnected) {
uni.showModal({
title: '连接已断开',
content: '训练过程中已与设备连接中断,请重新连接设备再开始训练',
showCancel: false,
success: function(res) {
if (res.confirm) {
that.handleTarget()
}
}
})
console.log("蓝牙是否连接", that.isConnected)
}
},
isBluetoothTyle: function() {
let that = this
if (!that.isBluetoothTyle) {
console.log("蓝牙是否打开", that.isBluetoothTyle)
}
},
//
isStart: function() {
let that = this
if (that.isStart) {
that.handleAudio()
}
},
//
isToggle: function() {
let that = this
if (that.isToggle) {
uni.showModal({
title: '友情提示',
content: '训练过程中请勿切换训练,返回训练',
showCancel: false,
success: function(res) {
if (res.confirm) {
setTimeout(function() {
that.handleStart('结束')
}, 400)
setTimeout(function() {
that.handleTarget()
}, 600)
}
}
})
}
},
//
isEnd: function() {
let that = this
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)
}
}
},
},
methods: {
handleAudioStart() {
let that = this
innerAudioContext.autoplay = true;
innerAudioContext.loop = false;
innerAudioContext.src = '/pageTwo/static/Start.mp3';
innerAudioContext.play()
setTimeout(function() {
innerAudioContext.stop();
that.handleAudio()
}, 5000)
},
handleAudio() {
innerAudioContext.autoplay = true;
innerAudioContext.loop = true;
innerAudioContext.src = '/pageTwo/static/flight.mp3';
innerAudioContext.play()
},
//
notifyBLECharacteristicValue() {
let that = this;
uni.notifyBLECharacteristicValueChange({
state: true, // notify
deviceId: that.info.deviceId,
serviceId: that.info.serviceId,
characteristicId: that.info.notify,
success(res) {
uni.onBLECharacteristicValueChange(function(res) {
let value = that.$tools.ab2hex(res.value, "");
let count = parseInt(value.substring(8, 12), 16)
let Ycount = parseInt(value.substring(12, 16), 16) //
let time = parseInt(value.substring(16, 20), 16) ///
let timeDown = parseInt(value.substring(20, 24), 16) //
let type = parseInt(value.substring(30, 32), 16) //
let weight = parseInt(value.substring(32, 34), 16) //
let kcal = parseInt(value.substring(34, 38), 16) //
let minutes = null
let seconds = null
if (type == 0 || type == 4) {
that.weight = count //
that.Ycount = Ycount
that.time = time
that.kcal = kcal / 10
if (that.info.active != 2 && count != 0) { // +
minutes = Math.floor((time % 3600) / 60)
seconds = time % 60
that.time_m = minutes > 9 ? minutes : '0' + minutes
that.time_s = seconds > 9 ? seconds : '0' + seconds
}
if (that.info.active == 2) { //
let T = Number(timeDown) - Number(time)
minutes = Math.floor((T % 3600) / 60)
seconds = T % 60
that.time_m = minutes > 9 ? minutes : '0' + minutes
that.time_s = seconds > 9 ? seconds : '0' + seconds
}
that.Bcount = parseInt(value.substring(24, 26), 16) //
that.continuous = parseInt(value.substring(26, 30), 16) //
console.log("自由模式", count, kcal, time, that.time_m, that.time_s, weight)
}
if ((type == 2 || type == 3) && !that.isToggle) {
setTimeout(function() {
that.isToggle = true
that.handleStart('停止')
}, 200)
console.log("当前状态被切换")
}
if (type == 4 && !that.isEnd) {
that.isEnd = true
console.log("当前状态被结束")
}
})
},
fail(res) {
console.log("测量失败", res.value);
}
})
},
SendData(str) {
let that = this
let buf = new Uint8Array(str.match(/[\da-f]{2}/gi).map(function(h) {
return parseInt(h, 16)
}))
uni.writeBLECharacteristicValue({
deviceId: that.info.deviceId,
serviceId: that.info.serviceId,
characteristicId: that.info.write,
value: buf.buffer,
success: res => {
console.log('下发指令成功', res.errMsg)
},
fail: res => {
console.log("下发指令失败", res);
},
})
},
onlongpress() {
let that = this
uni.vibrateLong({
success: function() {
console.log('短震动');
if (Number(that.time) < 10) {
uni.showModal({
title: '友情提示',
content: '本次跳绳时间低于10秒记录将不会被保存',
confirmText: "继续",
cancelText: "返回",
success: function(res) {
if (res.cancel) {
that.isStart = false
innerAudioContext.stop();
uni.navigateBack({ //
delta: 1
})
}
},
})
} else {
that.handleStart('停止')
setTimeout(function() {
that.handleStart('结束')
}, 400)
setTimeout(function() {
that.handleGetMeasure()
}, 800)
}
},
fail: function(err) {
console.error('震动失败:', err);
},
})
},
//
handleGetMeasure() {
let that = this
if (that.info.active == 3 && that.weight == 0 && that.Ycount != 0) {
console.log("1", that.weight, that.Ycount)
that.weight = that.Ycount
} else if (that.info.active == 3 && that.weight != 0 && that.Ycount != 0) {
console.log("2", that.weight, that.Ycount)
that.weight = Number(that.Ycount) - Number(that.weight)
}
if (that.info.active == 2) {
that.time_m = Math.floor((that.time % 3600) / 60)
that.time_s = that.time % 60
}
console.log("111111保存", that.weight, that.Ycount, that.time_m, that.time_s)
that.$model.getskipResult({
aud_id: uni.getStorageSync('userid'),
kcal: Math.floor(that.kcal),
num: that.weight,
time_m: Number(that.time_m),
time_s: that.time_s,
type: that.info.active == 1 ? 'free' : that.info.active == 2 ? 'time' : 'num'
}).then(res => {
console.log("保存", that.time, res)
that.isStart = false
innerAudioContext.stop()
if (res.code == 0) {
that.bpm = that.weight / (that.time / 60)
that.iswrapper = true
that.info.isSuccessful = true
that.$store.dispatch('getUserInfo', {
aud_id: uni.getStorageSync('userid')
})
} else {
that.$tools.msg(res.msg)
}
})
},
//
handleStart(text) {
let that = this
let j = null
let str = null
if (text == '连续') {
j = Number(165 + 5 + 3).toString(16)
str = "A5050300" + j.substr(j.length - 2, 2)
console.log("连续连续", str)
}
if (text == '停止') {
j = Number(165 + 5 + 3 + 5).toString(16)
str = "A5050305" + j.substr(j.length - 2, 2)
console.log("停止连续", str)
}
if (text == '开始') {
j = Number(165 + 5 + 5).toString(16)
str = "A5050500" + j.substr(j.length - 2, 2)
}
if (text == '结束') {
j = Number(165 + 5 + 5 + 1).toString(16)
str = "A5050501" + j.substr(j.length - 2, 2)
console.log("结束指令", str)
}
if (text == '继续') {
j = Number(165 + 5 + 4).toString(16)
str = "A5050400" + j.substr(j.length - 2, 2)
console.log("继续指令", str)
}
if (text == '暂停') {
j = Number(165 + 5 + 4 + 1).toString(16)
str = "A5050401" + j.substr(j.length - 2, 2)
console.log("暂停指令", str)
}
that.SendData(str)
},
handleTarget() {
let that = this
innerAudioContext.stop();
uni.navigateBack({ //
delta: 1
})
},
//
handleEnd() {
let that = this
that.handleStart('停止')
setTimeout(function() {
that.handleStart('结束')
}, 400)
setTimeout(function() {
uni.$emit('updateData', JSON.stringify(that.info))
}, 600)
}
}
}
</script>
<style lang="scss" scoped>
@import "./scss/PCT01.scss";
</style>

View File

@ -1,588 +0,0 @@
<template>
<view class="content">
<view class="tips" v-if="!isstart">
<view class="top">
<view class="left cgreen f-l">T</view>
<view class="right">
<text class="cgreen">{{$t("lung.lungTitle")}}</text>
<text class="text">{{$t("lung.lungExplain0")}}</text>
</view>
</view>
<view class="list">
<view class="item" v-if="number1">
<text class="ml-10 mr-10">1</text>
<text>{{$t("lung.lungsuction")}}</text>
<text class="cgreen">{{number1}}ml</text>
<text>{{$t("lung.lungsuctionspeed")}}</text>
<text class="cgreen level">{{level1}}</text>
</view>
<view class="item" v-if="number2">
<text class="ml-10 mr-10">2</text>
<text>{{$t("lung.lungsuction")}}</text>
<text class="cgreen">{{number2}}ml</text>
<text>{{$t("lung.lungsuctionspeed")}}</text>
<text class="cgreen level">{{level2}}</text>
</view>
<view class="item" v-if="number3">
<text class="ml-10 mr-10">3</text>
<text>{{$t("lung.lungsuction")}}</text>
<text class="cgreen">{{number3}}ml</text>
<text>{{$t("lung.lungsuctionspeed")}}</text>
<text class="cgreen level">{{level3}}</text>
</view>
</view>
<view class="title" v-if="number3==''">
<view :class="[second==5?'cgreen':'']">
{{number1!=0?$t("lung.lungsecond"):number2!=''?$t("lung.lungthird"):$t("lung.lungfirst")}}
</view>
<view :class="[second==3?'cgreen':'']">{{$t("lung.lungExplain1")}}</view>
<view :class="[second==1?'cgreen':'']">{{$t("lung.lungExplain2")}}</view>
</view>
<view class="data" v-if="number3">
<view class="val">
<text>{{average.toFixed(2)}}ml</text>
{{$t("lung.averagelungsuction")}}
</view>
<view class="text">
{{$t("lung.lungExplain3")}}{{standard}}ml{{$t("lung.nowlungsuctionspeed")}}{{averageS}}L/min,{{$t("lung.lungresult")}}{{average.toFixed(2)}}ml{{$t("lung.lungExplain4")}}
</view>
</view>
<view class="btn" v-if="number3" @click="handleGetMeasure">{{$t("lung.lunglookreport")}}</view>
<view class="btn close" v-if="number3" @click="isstart=true">{{$t("lung.remeasure")}}</view>
<view class="btn" v-if="number1==0||number2==0||number3==0">
{{second}}{{$t("lunganewstart")}}<text>{{number1!=0?$t("lung.lungsecond"):number2!=0?$t("lung.lungthird"):$t("lung.lungfirst")}}</text>
</view>
</view>
<!-- 开始测量 -->
<view class="weight" v-else>
<view class="title cgreen">{{$t("lung.lungExplain2")}}</view>
<view class="box1">
<view class="time">{{$t("lung.lungsuctionspeed")}}<text class="cgreen ml-5">{{LiuS}}L/min</text></view>
<view class="item">
<view class="image">
<!-- -->
<!-- <image src="../../static/01.gif" mode="widthFix"> -->
<!-- </image> -->
</view>
<view class="center mt-15">
<view class="level"></view>
<view class="level level-bg" :style="{'top':Number(100 - offset)+'%'}"></view>
<view class="level-item">
<view class="ite" v-for="(ite,ind) in list">{{ite.text}}</view>
</view>
</view>
</view>
<view class="val">
<text>{{text}}ml</text>{{$t("lung.averagelungsuction")}}
</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
let myTime;
let cnt = 0;
let count = 0;
let lastValue = null;
export default {
data() {
return {
isEnd: false,
isstart: false, //
number1: 0,
number2: 0,
number3: 0,
level1: "",
level2: "",
level3: "",
average: "", //
averageS: "", //
text: 0, //
LiuS: "", //
macAddr: "",
serviceId: "",
deviceId: "",
Unload: false,
notify: "",
write: "",
second: 5, //
standard: "", //
offset: 0, //
listS: [],
}
},
computed: {
...mapState(["user", "isConnected", "isBluetoothTyle", "lungLevel"]),
info() {
return this.user
},
list() {
let that = this
let standard = ""
that.lungLevel.forEach(ite => {
if (ite.text == "及格") {
standard = ite.min_val
}
})
that.standard = standard
return this.lungLevel
}
},
onUnload: function() {
let that = this
if (!that.Unload) {
clearTimeout(myTime)
that.stopBluetoothDevicesDiscovery() //
that.closeBLEConnection()
that.closeBluetoothAdapter()
console.log("页面返回onUnload")
}
},
onLoad(options) {
let that = this
if (options && options.deviceId) {
that.deviceId = options.deviceId
that.openBluetoothAdapter()
}
that.openBluetoothAdapter()
that.onBLEConnectionStateChange()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
},
watch: {
isConnected: function() {
let that = this
if (!that.isConnected) {
that.handleBack()
}
},
isBluetoothTyle: function() {
let that = this
if (!that.isBluetoothTyle) {
that.handleBack()
}
},
second: function() {
let that = this
if (that.second <= 0) {
cnt++
that.isstart = true
that.sendData("FA02A29E") //
that.offset = 0
that.text = 0
}
},
//
isEnd: function() {
let that = this
console.log("结束测量", that.isEnd)
if (that.isEnd) {
console.log("结束测量2", that.isEnd)
that.isstart = false
that.sendData("FA02A39F")
that.level3 = that.handlelenver(that.number2)
that.average = (Number(that.number3) + Number(that.number2) + Number(that.number1)) / 3
var sum = 0
for (var i = 0; i < that.listS.length; i++) {
sum += Number(that.listS[i]);
}
that.averageS = (sum / that.listS.length).toFixed(2)
console.log((sum / that.listS.length))
}
}
},
methods: {
//
openBluetoothAdapter() {
let that = this
cnt = 0
count = 0;
lastValue = null;
that.isEnd = false
that.text = 0
that.number1 = 0
that.number2 = 0
that.number3 = 0
that.level1 = ""
that.level2 = ""
that.level3 = ""
that.average = "" //
that.LiuS = "" //
that.second = 5 //
that.standard = "" //
that.offset = 0 //
uni.openBluetoothAdapter({
success: e => {
console.log("初始化设备")
that.startBluetoothDeviceDiscovery()
},
fail: e => {
that.$tools.msg(that.$t("linkBluetooth.Nodevicefound"))
}
});
},
//
startBluetoothDeviceDiscovery() {
let that = this
uni.startBluetoothDevicesDiscovery({
allowDuplicatesKey: true,
success: res => {
console.log("开始搜索")
that.onBluetoothDeviceFound();
},
fail: res => {
that.$tools.msg(that.$t("linkBluetooth.Nodevicefound"))
}
});
},
/**
* 发现外围设备
*/
onBluetoothDeviceFound() {
var that = this;
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
if (!device.name && !device.localName) {
return
}
if (device.name.indexOf('Yihejia_Lung') != -1) {
clearTimeout(myTime);
device.macAddr = device.deviceId
if (device.deviceId.indexOf(that.deviceId) != -1) {
that.stopBluetoothDevicesDiscovery()
that.createBLEConnection()
console.log("that.deviceId", that.deviceId, device.deviceId)
return;
}
}
})
});
that.handleMyTime()
},
//
createBLEConnection() {
let that = this;
uni.createBLEConnection({
deviceId: that.deviceId,
success: res => {
that.countdown()
setTimeout(function() {
that.getBLEDeviceServices()
}, 1500)
},
fail: res => {
console.log("设备连接失败,请重新连接", res);
}
});
},
/**
* 获取设备的UUID
*/
getBLEDeviceServices() {
let serviceList = [];
let that = this;
uni.getBLEDeviceServices({
deviceId: that.deviceId,
success: res => {
console.log("获取设备的UUID成功", res)
serviceList = res.services;
for (let i = 0; i < serviceList.length; i++) {
let service = serviceList[i];
if (service.uuid.indexOf("FFE0") != -1) {
that.serviceId = service.uuid;
that.getBLEDeviceCharacteristics();
console.log("设备的FFE0的serviceId " + that.serviceId);
break;
}
}
},
fail: res => {
console.log('获取设备的UUID失败:', res)
}
});
},
/**
* 获取指定服务的特征值
*/
getBLEDeviceCharacteristics() {
let characteristicsList = [];
let that = this;
uni.getBLEDeviceCharacteristics({
deviceId: that.deviceId,
serviceId: that.serviceId,
success: res => {
console.log("服务的特征值成功", res)
// * read: true, //,write: true, //,notify: true
for (let i = 0; i < res.characteristics.length; i++) {
let item = res.characteristics[i];
if (item.uuid.indexOf('0000FFE9') != -1) {
that.write = item.uuid
} else if (item.uuid.indexOf('0000FFE4') != -1) {
that.notify = item.uuid
}
}
uni.notifyBLECharacteristicValueChange({
deviceId: that.deviceId,
serviceId: that.serviceId,
characteristicId: that.notify,
state: true,
})
uni.notifyBLECharacteristicValueChange({
deviceId: that.deviceId,
serviceId: that.serviceId,
characteristicId: that.write,
state: true,
})
uni.onBLECharacteristicValueChange(function(res) {
let value = that.$tools.ab2hex(res.value, "");
//
let LiuL = value.substring(14, 16) + value.substring(10, 14)
let LiuL2 = parseInt(LiuL, 16) / 1000
//
let LiuS = parseInt(value.substring(22, 26), 16) + parseInt(value
.substring(18, 22), 16)
let LiuS2 = LiuS / 1000
if (Number(LiuL2) > 0) {
that.text = LiuL2.toFixed(0)
that.LiuS = LiuS2.toFixed(1)
that.offset = that.handleoffset(that.text)
//
if (cnt == 1) {
//
if (that.text == lastValue) {
count++
if (count >= 30) {
that.isstart = false
that.sendData("FA02A39F") //
that.number1 = LiuL2.toFixed(0)
that.level1 = that.handlelenver(that.number1)
that.second = 5
that.countdown()
that.LiuS = 0
return
}
} else {
count = 0
lastValue = that.text // lastValue
}
}
if (cnt == 2) {
if (that.text == lastValue) {
count++
if (count >= 30) {
that.isstart = false
that.sendData("FA02A39F") //
that.number2 = LiuL2.toFixed(0)
that.level2 = that.handlelenver(that.number2)
that.second = 5
that.countdown()
that.LiuS = 0
return
}
} else {
count = 0
lastValue = that.text // lastValue
}
// console.log('2', cnt, LiuL2, count)
}
if (cnt == 3) {
//
if (that.LiuS != 0 || that.LiuS != 0.0) {
that.listS.push(that.LiuS)
}
//
if (that.text == lastValue) {
count++
if (count >= 15) {
that.number3 = LiuL2.toFixed(0)
that.isEnd = true
return
}
} else {
count = 0
lastValue = that.text // lastValue
}
console.log('流量3', cnt, count)
}
}
})
},
fail: res => {
console.log('获取特征值失败:', JSON.stringify(res))
}
})
},
//
sendData(str) {
let that = this
let buf = new Uint8Array(str.match(/[\da-f]{2}/gi).map(function(h) {
return parseInt(h, 16)
}))
uni.writeBLECharacteristicValue({
deviceId: that.deviceId,
serviceId: that.serviceId,
characteristicId: that.write,
value: buf.buffer,
success: res => {
console.log('下发指令成功', res.errMsg)
},
fail: res => {
console.log("下发指令失败", res);
},
})
},
handleMyTime() {
var that = this;
myTime = setTimeout(function() {
if (!that.macAddr) {
clearTimeout(myTime);
that.Unload = true
that.startBluetoothDeviceDiscovery()
that.closeBluetoothAdapter()
}
}, 30000);
},
//
handlelenver(value) {
let that = this
let text = ""
that.list.forEach(ite => {
if (Number(value) <= Number(ite.max_val) && Number(value) >= Number(ite.min_val)) {
text = ite.text
}
})
return text
},
//
handleoffset(value) {
let that = this
let number = 0
let length = that.list.length
number = value / (that.list[0].max_val - that.list[length - 1].min_val) * 100
return number.toFixed(0)
},
/**
* 停止搜索蓝牙设备
*/
stopBluetoothDevicesDiscovery() {
uni.stopBluetoothDevicesDiscovery({
success: e => {
console.log("停止搜索蓝牙设备", e)
},
});
},
//
onBLEConnectionStateChange() {
let that = this
uni.onBLEConnectionStateChange(function(res) {
console.log("监听蓝牙连接状态", res.connected)
if (!res.connected) {
clearTimeout(myTime);
that.Unload = true
that.closeBLEConnection()
that.closeBluetoothAdapter()
}
that.$store.commit("changeConnected", res.connected);
})
},
//
handleGetMeasure() {
let that = this
that.$model.getMeasureLung({
aud_id: uni.getStorageSync('userid'),
one: that.number1,
two: that.number2,
three: that.number3,
flow: that.averageS
}).then(res => {
if (res.code == 0) {
that.$store.dispatch('getUserInfo', {
aud_id: uni.getStorageSync('userid')
})
that.$store.dispatch("getLungResult", {
aud_id: uni.getStorageSync('userid')
})
}
that.Unload = true
setTimeout(function() {
that.closeBLEConnection()
that.closeBluetoothAdapter()
uni.switchTab({
url: "/pages/home/home"
})
}, 200)
})
},
//
handleBack(ind) {
let that = this
that.text = ""
that.Unload = true
that.stopBluetoothDevicesDiscovery()
that.closeBluetoothAdapter()
that.closeBLEConnection()
if (ind == 1) {
uni.switchTab({
url: "/pages/home/home"
})
}
},
// 5
countdown() {
let that = this
count = 0
lastValue = null
var timer = setInterval(function() {
that.second--;
}, 1000);
setTimeout(() => {
clearInterval(timer)
that.second = 0
}, 5000)
},
/**
* 断开蓝牙模块
*/
closeBluetoothAdapter() {
let that = this;
uni.closeBluetoothAdapter({
success: res => {
console.log('蓝牙模块关闭成功');
}
})
},
/**
* 断开蓝牙连接
*/
closeBLEConnection() {
var that = this;
uni.closeBLEConnection({
deviceId: that.deviceId,
success: res => {
console.log('断开蓝牙连接成功');
}
});
},
}
}
</script>
<style scoped lang="scss">
@import "./scss/PCV02.scss";
.content {
width: calc(100% - 30px);
padding: 0 15px;
min-height: 100vh;
color: #5d5651;
background-color: #000;
}
</style>

View File

@ -1,205 +0,0 @@
<template>
<view class="container">
<view class="text" @click="openBluetoothAdapter" v-if="issearch">没有搜到想要的点击重新搜索</view>
<view class="point-area">
<view class="point point-10"></view>
<view class="point point-40"></view>
<view class="point point-80"></view>
<view class="point point-100"></view>
<view class="point point-120"></view>
</view>
<view class="list">
<view class="item" v-for="(item,index) in devList" :key="index" @click="handleWeight(item)">
<image :src="item.pic"></image>
<text>{{item.name}}</text>
</view>
</view>
<view class="tips" v-if="isdevTip">
<view>提示</view>
<text>1.请确定设备已绑定</text>
<text>2.请确定设备已开机</text>
<text>3.请确定手机蓝牙及位置信息已打开</text>
</view>
</view>
</template>
<script>
let that;
let myTime;
import {
mapState
} from "vuex";
export default {
data() {
return {
Unload: false, //
issearch: false, //
isdevTip: false, //
devicesList: [],
devList: [],
id: 0,
isdevice: true
}
},
computed: {
...mapState(["user", "isConnected", "isBluetoothTyle"]),
},
onLoad(options) {
that = this
that.id = options ? options.id : 0
that.isdevice = options.device
that.openBluetoothAdapter()
//
that.$Bluetooth.onBLEConnectionStateChange()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
},
onBackPress() {
let that = this
console.log("onUnload", that.Unload)
if (!that.Unload) {
that.$Bluetooth.closeBluetoothAdapter() //
that.$Bluetooth.stopBluetoothDevicesDiscovery() //
}
},
watch: {
isBluetoothTyle: function() {
let that = this
if (!that.isBluetoothTyle) {
that.issearch = true
that.isdevTip = true
that.devList = []
clearTimeout(myTime);
}
console.log("蓝牙是否打开", that.isBluetoothTyle)
}
},
methods: {
//
openBluetoothAdapter() {
let that = this
uni.openBluetoothAdapter({
success: e => {
console.log("蓝牙初始化成功")
that.issearch = false
that.isdevTip = false
that.devList = []
that.startBluetoothDeviceDiscovery()
},
fail: e => {
that.$Bluetooth.getBluetoothAdapter(e)
}
});
},
//
startBluetoothDeviceDiscovery() {
let that = this
uni.startBluetoothDevicesDiscovery({
allowDuplicatesKey: true, //
success: res => {
that.onBluetoothDeviceFound();
},
fail: res => {}
});
},
/**
* 发现外围设备
*/
onBluetoothDeviceFound() {
var that = this;
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
if (device.name.indexOf("G02") != -1) {
console.log("G02", device)
clearTimeout(myTime);
let buff = device.advertisData.slice(3, 9)
device.mac = new Uint8Array(buff) // 广maciOSmac
let tempMac = Array.from(device.mac)
tempMac.reverse()
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
that.deviceId = device.macAddr
that.handleDevice(device)
return;
}
if (device.name.indexOf("Yihejia_Lung") != -1) {
console.log("肺活量PCV02", device)
clearTimeout(myTime);
device.macAddr = device.deviceId
that.deviceId = device.deviceId
that.handleDevice(device)
return;
}
if (device.name.indexOf("YPC") != -1) {
console.log("跳绳PCT02", device.name, device)
clearTimeout(myTime);
let buff = device.name.slice(7, 19)
device.macAddr = that.$tools.str2Num(buff)
device.deviceId = that.$tools.str2Num(buff)
that.deviceId = that.$tools.str2Num(buff)
if (device.macAddr != "") {
that.handleDevice(device)
}
return
}
})
});
that.handleMyTime()
},
handleDevice(device) {
let that = this
const foundDevices = that.devicesList
const idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId)
console.log("device", device, idx)
if (idx === -1) {
that.devicesList.push(device);
if (device.macAddr != "") {
that.handleDevType(device.macAddr)
}
}
},
handleMyTime() {
var that = this;
myTime = setTimeout(function() {
if (!that.devList.length) {
that.isdevTip = true
that.devList = []
}
that.issearch = true
clearTimeout(myTime);
that.$Bluetooth.stopBluetoothDevicesDiscovery()
}, 15000);
},
//
handleDevType(sn) {
that = this
that.$model.getdevdetail({
mac: sn,
acd_id: that.id
}).then(res => {
console.log("排查返回", res, sn, that.id)
if (res.code == 0) {
res.data.deviceId = sn
that.devList.push(res.data);
}
})
},
handleWeight(item) {
let that = this
clearTimeout(myTime);
that.Unload = true
console.log("跳转测量", item)
if (item.bluetooth_type == '透传') {
that.$Bluetooth.stopBluetoothDevicesDiscovery()
}
uni.redirectTo({
url: item.page_measure + '?deviceId=' + that.deviceId + '&isdevice=' + that.isdevice
})
},
}
}
</script>
<style scoped lang="scss">
@import "./scss/search.scss";
</style>

View File

@ -4,7 +4,7 @@
<view class="login">
<view class="editem">
<view class="item">
<view class="text">{{language == 'zh-Hans'?$t("common.titleAccountText"):$t("common.infoEmail")}}
<view class="text">{{$t("common.infoEmail")}}
</view>
<view class="input">
<input v-model="phone" type="text" :placeholder="$t('tips.verifyRecord')" />
@ -63,7 +63,7 @@
onLoad(options) {
let that = this
this.type = options.type //1
that.language = uni.getLocale()
that.language = uni.getStorageSync('language') ? uni.getStorageSync('language') : uni.getLocale()
console.log("language", that.language)
uni.setNavigationBarTitle({
title: that.type == "register" ? this.$t('common.titleRegister') : this.$t(
@ -79,16 +79,7 @@
let that = this
let phoneType = that.phone.indexOf("@") !== -1
if (that.language == 'zh-Hans' && !phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (that.language == 'zh-Hans' && phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that
.phone))) {
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (that.language != 'zh-Hans' && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
that.$tools.msg(that.$t("tips.verifyEmailCorrect"))
return
}
@ -136,16 +127,8 @@
handleCode() {
let that = this
let phoneType = that.phone.indexOf("@") !== -1
if (that.language == 'zh-Hans' && !phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (that.language == 'zh-Hans' && phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that
.phone))) {
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (that.language != 'zh-Hans' && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
that.$tools.msg(that.$t("tips.verifyEmailCorrect"))
return
}

View File

@ -19,7 +19,7 @@
<!-- #endif -->
<view class="top">
<image src="../../static/logo2.png"></image>
<text>Reedaw</text>
<text>Reedaw+</text>
</view>
<view class="login box_shadow">
<view class="title">{{$t("common.titleLogin")}}</view>
@ -28,7 +28,7 @@
</view>
<view class="editem">
<view class="item">
<view class="text">{{language=='zh-Hans'?$t("common.titleAccountText"):$t("common.infoEmail")}}
<view class="text">{{$t("common.infoEmail")}}
</view>
<view class="input">
<input v-model="phone" :placeholder="$t('tips.verifyRecord')" />
@ -135,21 +135,11 @@
//
handleTelLogin() {
let that = this
let phoneType = that.phone.indexOf("@") !== -1
if (that.value == 0) {
that.$tools.msg(that.$t("tips.verifyAgreement"))
return
}
if (that.language == 'zh-Hans' && !phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (that.language == 'zh-Hans' && phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that
.phone))) {
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (that.language != 'zh-Hans' && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
that.$tools.msg(that.$t("tips.verifyEmailCorrect"))
return
}
@ -182,16 +172,7 @@
handleCode() {
let that = this
let phoneType = that.phone.indexOf("@") !== -1
if (that.language == 'zh-Hans' && !phoneType && !(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (that.language == 'zh-Hans' && phoneType && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that
.phone))) {
that.$tools.msg(that.$t("tips.verifyAccount"))
return
}
if (that.language != 'zh-Hans' && !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
if (!(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(that.phone))) {
that.$tools.msg(that.$t("tips.verifyEmailCorrect"))
return
}

View File

@ -1,125 +0,0 @@
<template>
<view class="content ">
<view v-if="list.length" class="tipsList">
<view class="list" v-for="(ite,ind) in list" :key="ind" @click="handleDetail">
<icon class="iconfont icon-tixing-copy"></icon>
<view class="info">
<view class="time">
<text class="name">{{ite.title}}</text>
<text class="date">{{ite.time}}</text>
</view>
<text class="des">{{ite.content}}</text>
</view>
</view>
<view class="endtext" v-if="!lastPage || page >= lastPage"> 到底了看看别的吧 </view>
</view>
<view class="nolist" v-if="!lastPage">
<image src="../../static/none.png"></image>
<text>暂无数据</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [{
title: "驱虫",
type: 1,
time: "2023/05/15",
des: "哈哈哈哈或或或或",
static: 1
}],
page: 1,
lastPage: 0,
}
},
onLoad() {
let that = this
that.page = 1
},
onReachBottom() {
let that = this
if (!this.lastPage || this.page >= this.lastPage) {
uni.showToast({
title: '没有更多数据!',
icon: 'none'
})
return
}
this.page++
},
methods: {
getList(page) {
let that = this
that.$model.getHistoryList({
pageNo: this.page,
pageSize: 10,
}).then((res) => {
if (res.code != 0) return
this.list = this.list.concat(res.data.rows)
this.lastPage = res.data.totalpage
})
},
handleDetail() {}
}
}
</script>
<style lang="scss" scoped>
.content {
padding: 0 15px;
min-height: 100vh;
background-color: #f7f7f7;
}
.list {
margin-top: 15px;
background-color: #fff !important;
icon {
background-color: #f7f7f7;
border: 8px solid #f7f7f7;
position: relative;
}
icon::after {
content: "";
width: 10px;
height: 10px;
border-radius: 50%;
background-color: red;
position: absolute;
top: 0px;
right: 0px;
}
.time {
display: inline-block;
font-weight: bold;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.name {
color: #333;
width: 60%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-top: 0;
}
.date {
font-weight: 500;
font-size: 12px;
width: auto;
margin-top: 0;
float: right;
}
}
}
</style>

View File

@ -3,7 +3,7 @@
<view class="info">
<view class="logo">
<image src="../../static/logo2.png"></image>
<view>Reedaw</view>
<view>Reedaw+</view>
<text>V{{phoneInfo.info.version}}</text>
</view>
<view class="list">

View File

@ -29,10 +29,6 @@
size="24" :color="memInfo.gender==2?'#fea606':'#dfdfdf'"></uni-icons>
{{$t("common.infoWoman")}}
</view>
<!-- <picker mode="selector" :range="sexItem" @change="onsexArr">
<view class="uni-input">{{memInfo.gender==0?'请选择':memInfo.gender==1?'男':'女'}}</view>
<icon class="iconfont icon-arrow-down-bold"></icon>
</picker> -->
</view>
</view>
<view class="lan border-bottom">
@ -63,71 +59,8 @@
</picker>
</view>
</view>
<view class="lan border-bottom" v-if="language=='zh-Hans'">
<view class="left">场景选择</view>
<view class="right">
<view class="radio">
<uni-icons :type="memInfo.measure_model==1?'checkbox-filled':'circle'"
@click="handleMeasureModel(1)" size="24"
:color="memInfo.measure_model==1?'#fea606':'#dfdfdf'"></uni-icons>
</view>
<view class="radio ml-15">
<uni-icons :type="memInfo.measure_model==2?'checkbox-filled':'circle'"
@click="handleMeasureModel(2)" size="24"
:color="memInfo.measure_model==2?'#fea606':'#dfdfdf'"></uni-icons>
</view>
</view>
</view>
<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"
@change="changegIdentity">
<view class="uni-input">{{identityList[identityIndex]?identityList[identityIndex].name:"请选择"}}
</view>
<icon class="iconfont icon-arrow-down-bold"></icon>
</picker>
</view>
</view>
<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&&language=='zh-Hans'">
<view class="left">所在年级</view>
<view class="right">
<picker mode="selector" :range="gradeList" :value="gradeIndex" range-key="name"
@change="changegType">
<view class="uni-input">{{gradeList[gradeIndex]?gradeList[gradeIndex].name:"请选择"}}</view>
<icon class="iconfont icon-arrow-down-bold"></icon>
</picker>
</view>
</view>
</view>
<view class="btn" @click="confirmInfo">{{$t("tips.btnConfirm")}}</view>
<!-- 地区 -->
<view v-if="visible" class="visible" @click="visible=false">
<view @click.stop class="item">
<view class="groupBtn">
<view @click="visible=false">取消</view>
<view @click="handlesure()" class="sure">确定</view>
</view>
<picker-view @change="bindChange" :value="value" class="picker-view" :indicator-style="indicatorStyle">
<picker-view-column>
<view class="item" v-for="(item,index) in province" :key="index">{{item.name}}</view>
</picker-view-column>
<picker-view-column>
<view class="item" v-for="(item,index) in city" :key="index">{{item}}</view>
</picker-view-column>
</picker-view>
</view>
</view>
</view>
</template>
<script>
@ -151,24 +84,15 @@
grade: "nothing",
height: "",
weight: "",
address: '',
identity_name: "陌生人",
identity_id: "P0",
},
language: "",
visible: false,
province: [], //
city: [], //
area: [], //
value: [2, 0],
headimg: "",
identityIndex: 0,
gradeIndex: 0,
indicatorStyle: `height: 45px;`,
};
},
computed: {
...mapState(["user", "familayList", "cityList", "gradeList", "identityList"]),
...mapState(["user", "familayList", "cityList", "gradeList", ]),
endDate() {
return this.$tools.getDate("start")
},
@ -180,21 +104,15 @@
uni.setNavigationBarTitle({
title: this.$t('common.titleMember'),
})
this.language = uni.getStorageSync('language')
},
onLoad(options) {
let that = this
that.handleIdentityList()
if (options.info) {
let info = JSON.parse(options.info)
that.memInfo = info
// if (info.measure_model == "1" || info.measure_model == 1) {
console.log("that.memInfo ", that.memInfo)
that.gradeIndex = that.gradeList.findIndex((profile) => profile.id === that.memInfo.grade);
that.memInfo.grade = that.gradeList[that.gradeIndex].id
that.identityIndex = that.identityList.findIndex((profile) => profile.id === that.memInfo.identity_id);
console.log("1111111111", that.identityList, that.identityIndex)
// }
that.isEdit = true
}
// #ifdef APP-PLUS
@ -224,14 +142,6 @@
that.$tools.msg(that.$t("tips.verifyBirthday"))
return;
}
if (that.language=='zh-Hans'&&that.memInfo.measure_model == 1 && !that.memInfo.identity_id) {
that.$tools.msg("请选择身份信息")
return;
}
if (that.language=='zh-Hans'&&that.memInfo.measure_model == 1 && !that.memInfo.address) {
that.$tools.msg("请选择所属地区")
return;
}
let https = that.isEdit ? that.$model.getEditUser(that.memInfo) : that.$model.getAddUser(that.memInfo)
return https.then(res => {
console.log("成功", res)
@ -250,29 +160,30 @@
}).then(res => {
console.log("成员列表", res)
that.$store.commit('changeFamilay', res.data)
let aud_id = ""
let pages = getCurrentPages()
let prevPage = pages[pages.length - 2]
//
if (that.isEdit && that.memInfo.id == uni.getStorageSync('userid')) {
console.log("修改用户")
aud_id = uni.getStorageSync('userid')
console.log("修改用户", that.memInfo.id, uni.getStorageSync('userid'))
that.$store.dispatch('getUserInfo', {
aud_id: uni.getStorageSync('userid')
})
that.$store.dispatch("getResult", {
aud_id: uni.getStorageSync('userid')
})
}
//
if (!that.isEdit) {
console.log("添加用户")
uni.setStorageSync('userid', id)
uni.setStorageSync('gender', that.memInfo.gender)
aud_id = id
}
that.handlePublicRecord(aud_id)
that.$store.dispatch('getUserInfo', {
aud_id: aud_id
aud_id: id
})
that.$store.dispatch("getResult", {
aud_id: aud_id
aud_id: id
})
console.log("familayList个数", that.familayList.length)
}
if (!that.isEdit && that.familayList.length == 1) {
uni.setStorageSync('isBle', true)
uni.switchTab({
@ -284,18 +195,6 @@
}).catch(err => {})
},
//
handlePublicRecord(id) {
let that = this
that.$model.getPublicRecord({
aud_id: id
}).then(res => {
console.log("公共手动记录", res)
if (res.code == 0) {
that.$store.commit('changePublicRecord', res.data)
}
})
},
//
maskClick(e) {
console.log("出生日期", e.detail.value)
@ -305,72 +204,6 @@
onsexArr(e) {
this.memInfo.gender = this.sexItem[e.target.value] == that.$t("common.infoMan") ? 1 : 2
},
//
changegType(e) {
this.gradeIndex = e.detail.value
this.memInfo.grade = this.gradeList[e.target.value].id
},
//
changegIdentity(e) {
let that = this
that.identityIndex = e.detail.value
that.memInfo.identity_id = that.identityList[e.detail.value].id
that.memInfo.identity_name = that.identityList[e.detail.value].name
},
//
bindChange(e) {
let that = this
if (e.detail.value[0] != that.value[0]) {
e.detail.value[1] = 0
}
that.value = e.detail.value
that.city = that.province[that.value[0]].list
},
handlesure() {
let that = this
let defaultRegion = [that.province[that.value[0]].name, that.city[that.value[1]]]
that.memInfo.address = defaultRegion.join(",");
that.visible = false
},
handleCityList() {
let that = this
that.province = that.cityList
if (that.user.address != '') {
let str = that.user.address.split(',')[0]
let str2 = that.user.address.split(',')[1]
var Index0 = that.cityList.findIndex((profile) => profile.name === str);
var Index2 = that.cityList[Index0].list.findIndex((ite) => ite === str2);
that.value[0] = Index0
that.value[1] = Index2
that.city = that.cityList[Index0].list
} else {
that.value = [2, 0]
that.city = that.cityList[2].list
}
that.visible = true
},
//
// handleGradeList() {
// let that = this
// if (that.isEdit == true) {
// that.gradeIndex = that.gradeList.findIndex(ite => ite.id == that.memInfo.grade)
// that.memInfo.grade = that.gradeList[that.gradeIndex].id
// }
// },
//
handleIdentityList() {
let that = this
if (that.isEdit == true) {
that.identityIndex = that.identityList.findIndex(ite => ite.id == that.memInfo.identity_id)
that.memInfo.identity_id = that.identityList[that.identityIndex].id
that.memInfo.identity_name = that.identityList[that.identityIndex].name
}
},
//
handleMeasureModel(ind) {
let that = this
that.memInfo.measure_model = ind
},
},
};
@ -466,56 +299,4 @@
margin: 40px 15px 0;
background: $btncolor !important;
}
.visible {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 9999;
background-color: rgba(0, 0, 0, 0.6);
.groupBtn {
height: 50px;
line-height: 50px;
background-color: #fff;
display: flex;
justify-content: space-between;
padding: 0 15px;
border-bottom: 1px solid #dfdfdf;
position: absolute;
left: 0;
right: 0;
bottom: 45%;
z-index: 999;
view {
height: 30px;
line-height: 30px;
padding: 0 10px;
background-color: #dfdfdf;
border-radius: 5px;
margin-top: 10px;
}
.sure {
background-color: $textcolor;
color: #fff !important;
}
}
.picker-view {
width: 100%;
height: 45%;
bottom: 0;
position: absolute;
background-color: #fff;
}
.item {
line-height: 45px;
text-align: center;
}
}
</style>

View File

@ -1,100 +0,0 @@
<template>
<view class="content addText">
<view class="item">
<!-- <view class="name">
<view class="text">记录宠物</view>
<picker mode="selector" :range="petList" range-key="name" @change="handleList">
<view class="uni-input">{{petList[index].name?petList[index].name:'请选择宠物'}}
<icon class="iconfont icon-shouqi-xi"></icon>
</view>
</picker>
</view> -->
<view class="name">
<view class="text">记录时间</view>
<view class="example-body">
<uni-datetime-picker type="datetime" v-model="recordTime" @change="changeLog" :border="false"
:clear-icon='false' :hide-second='true' />
</view>
</view>
</view>
<view class="item">
<view class="ji">小记</view>
<textarea v-model="content" placeholder="说点什么吧" name="content" maxlength="200" />
<view class="length">{{content.length}}/200</view>
</view>
<view class="btn" @click="handleCloseClick">保存</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {
index: -1,
petId: "",
content: '',
recordTime: ""
}
},
computed: {
...mapState(["petInfo", "petList"]),
start() {
return this.$tools.getTime()
},
},
mounted() {
this.recordTime = this.$tools.getTime()
},
methods: {
//
handleList(e) {
this.index = e.target.value
this.petId = this.petList[e.target.value].id
},
//
changeLog(e) {
this.recordTime = e
},
//
handleCloseClick() {
let that = this
// if (!that.petId) {
// that.$tools.msg("")
// return
// }
if (!that.recordTime) {
that.$tools.msg("请选择记录时间")
return
}
that.$model.getNotepadSubmit({
petId: uni.getStorageSync('petid'),
content: that.content,
recordTime: that.recordTime,
}).then((res) => {
if (res.code != 0) false
that.$tools.msg("记录成功!")
uni.redirectTo({
url: "/pages/notepad/notepad"
})
})
},
}
}
</script>
<style lang="scss" scoped>
.btn {
margin-top: 25px;
}
/deep/.example-body {
picker {
text-align: center !important;
}
}
</style>

View File

@ -1,87 +0,0 @@
<template>
<view class="content">
<view class="add" @click="handleAdd" v-if="token">+新增记事</view>
<view v-if="list.length" class="tipsList">
<view class="tips" v-for="(ite,ind) in list" :key="ind">
<view class="title">{{ite.recordtime}}</view>
<uni-swipe-action>
<uni-swipe-action-item :right-options="ite.options">
<view class="list">
<icon class="t-icon t-icon-a-ziyuan265"></icon>
<view class="info">
<view class="time">{{petInfo.name}}</view>
<text>记事内容</text>
<text>{{ite.content}}</text>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
<view class="endtext" v-if="!lastPage || page >= lastPage"> 到底了看看别的吧 </view>
</view>
<view class="nolist mt-15" v-if="!lastPage">
<image src="../../static/none.png"></image>
<text>暂无数据</text>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {
token: "",
list: [],
page: 1,
lastPage: 0,
}
},
computed: {
...mapState(["petList", "petInfo"]),
},
onShow() {
let that = this
that.page = 1
that.list = []
},
methods: {}
}
</script>
<style lang="scss" scoped>
.add {
width: 100%;
text-align: center;
background: #fff;
height: 45px;
line-height: 45px;
border-radius: 5px;
font-weight: bold;
font-size: 16px;
}
.content {
padding: 15px
}
.info {
// height: 50px;
}
text {
margin-top: 3px !important;
width: auto !important;
font-size: 13px;
}
.nolist {
text {
margin: -15px auto 15px !important;
width: 100% !important;
}
}
</style>

View File

@ -1,160 +0,0 @@
<template>
<view class="common">
<!-- 头部 -->
<headerIndex :isArea="false"></headerIndex>
<!-- -->
<view class="history" v-if="ranklist.length">
<view class="list" v-for="(item, index) in ranklist" :key="index" @click="clickItemMethod(item.id)">
<view class="data">
<icon class="t-icon t-icon-shijian-mianxing-0"></icon>
{{item.create_time}}
</view>
<view class="item">
<view class="time">
{{$t("index.infoNowUser")}}{{$t("index.infoAddress")}}{{item.address}}
</view>
<view class="number">
{{item.score}}
<uni-icons type="right"></uni-icons>
</view>
</view>
</view>
<view class="endtext" v-if="!lastPage || page >= lastPage"> {{$t("tips.msgBottom")}} </view>
</view>
<view class="nolist" v-if="!lastPage">
<image src="../../static/none.png"></image>
<text>{{$t("index.none")}}</text>
</view>
</view>
</template>
<script>
import headerIndex from "@/element/headerIndex.vue";
import {
mapState
} from "vuex";
export default {
computed: {
...mapState(['user', "appTheme"]),
},
data() {
return {
page: 1,
ranklist: [],
lastPage: "",
}
},
components: {
headerIndex
},
computed: {
...mapState(["user"]),
userId() {
return this.user.id
}
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titleScoreHistory'),
})
},
onLoad() {
let that = this
that.page = 1
that.getList(1)
},
watch: {
userId() {
let that = this
that.page = 1
that.ranklist = []
that.getList(1)
console.log("user变了")
},
},
onReachBottom() {
let that = this
console.log("onReachBottom", this.lastPage)
if (!this.lastPage || this.page >= this.lastPage) {
uni.showToast({
title: '没有更多数据!',
icon: 'none'
})
return
}
this.page++
this.getList(this.page)
},
methods: {
clickItemMethod(id) {
uni.navigateTo({
url: "/pageTwo/score/report?id=" + id
})
},
getList(page) {
let that = this
that.$model.getSportshistory({
aud_id: uni.getStorageSync('userid'),
page: page,
}).then((res) => {
console.log("历史记录", res)
if (res.code != 0) return
this.ranklist = this.ranklist.concat(res.data.rows)
this.lastPage = res.data.totalpage
})
},
}
}
</script>
<style scoped="scoped" lang="scss">
.common {
width: 100%;
min-height: 100.5vh; //
overflow-y: scroll;
background-color: #f7f7f7;
}
.history {
width: calc(100% - 30px);
height: auto;
margin: 15px 15px 0;
padding-bottom: 40px;
.list {
width: 100%;
border-radius: 10px;
margin-bottom: 12px;
.data {
width: 100%;
justify-content: center;
margin-bottom: 8px;
display: flex;
align-items: center;
font-size: 36rpx;
icon {
width: 40rpx;
height: 40rpx;
margin-right: 8px;
}
}
.item {
width: calc(100% - 40rpx);
display: flex;
justify-content: space-between;
background: #fff;
font-weight: 700;
line-height: 50rpx;
padding: 10px;
font-size: 36rpx !important;
}
.time {
font-size: 32rpx;
font-weight: 500;
}
}
}
</style>

View File

@ -1,89 +0,0 @@
<template>
<view class="content">
<view class="time text_c bold">{{create_time}}</view>
<!-- 估分 -->
<view class="box">
<view class="title bold">本次估分成绩为</view>
<view class="charts">
<qiun-data-charts type="arcbar" :chartData="chartData" :Height="140" :Width="140"/>
<view class="name">{{score}}</view>
</view>
<view class="title bold" v-if="Max_score">该地区体育总成绩为:{{Max_score}}</view>
</view>
<!-- -->
<view v-for="(item,index) in selectllist">
<view class="titleName bold mt-15 ml-15 size16">{{item.name}}</view>
<view class="indexCarList">
<view class="card" v-for="(ite,ind) in item.list">
<view class="title">
<view class="name">{{ite.name}}</view>
</view>
<view class="item3" v-for="(it,id) in ite.list" v-if="ite.list.length>1">
<view class="name">{{it.name}}</view>
<view class="weight">
<view class="input">{{it.value?it.value:'-'}}</view>
<view class="cblue bold">{{it.proportion_value?it.proportion_value:'-'}}</view>
<view class="cblue bold">{{it.total_score?it.total_score:'-'}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
export default {
data() {
return {
chartData: {
series: [{
name: "正确率",
color: "#4687F9",
data: 0.8
}]
},
score: 0,
Max_score: 0,
create_time: "",
selectllist: []
}
},
components: {
qiunDataCharts
},
onLoad(options) {
let that = this
that.getList(options.id)
},
methods: {
getList(id) {
let that = this
that.$model.getSportshistorydetail({
id: Number(id),
}).then((res) => {
console.log("历史记录详情", res)
if (res.code != 0) return
that.selectllist = res.data.list
that.score = Number(res.data.score)
that.Max_score = res.data.max_score
that.create_time = res.data.create_time
that.chartData.series[0].data = Number(res.data.score) / Number(that.Max_score)
})
},
}
}
</script>
<style scoped lang="scss">
@import "@/scss/report.scss";
.content {
min-height: 100vh;
padding-top: 15px;
padding-bottom: 15px;
background-color: #f7f7f7;
}
</style>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -8,40 +8,6 @@
"onReachBottomDistance": 50
}
},
{
"path": "pages/skiping/skip",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"onReachBottomDistance": 50
}
},
{
"path": "pages/skiping/charts",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/lunging/vitalcapacity",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"onReachBottomDistance": 50,
"navigationBarBackgroundColor": "#000000",
"backgroundColor": "#000000"
}
},
{
"path": "pages/lunging/charts",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/my/me",
"style": {
@ -51,21 +17,6 @@
}
},
{
"path": "pages/score/score",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"onReachBottomDistance": 50
}
},
{
"path": "pages/PublicCards/PublicCards",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/body/body",
"style": {
@ -74,14 +25,7 @@
"onReachBottomDistance": 50
}
},
{
"path": "pages/zixun/list",
"style": {
"navigationBarTitleText": ""
}
}
],
"subPackages": [{
"root": "pageTwo",
@ -115,52 +59,6 @@
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "cardList/card",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "business/business",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"onReachBottomDistance": 50
}
}, {
"path": "business/addDevice",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "business/search",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "score/history",
"style": {
"navigationBarTitleText": "历史",
"enablePullDownRefresh": false
}
}, {
"path": "score/report",
"style": {
"navigationBarTitleText": "记录",
"enablePullDownRefresh": false
}
},
{
@ -172,13 +70,6 @@
}
},
{
"path": "message/list",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "my/userInfo",
"style": {
@ -241,14 +132,6 @@
}
},
{
"path": "devices/search",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "devices/G02",
"style": {
@ -263,20 +146,6 @@
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, {
"path": "devices/PCV02",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "devices/PCT01",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "devices/B20",
@ -299,44 +168,6 @@
"enablePullDownRefresh": false
}
},
{
"path": "notepad/notepad",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "notepad/addNotepad",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "PublicCards/charts",
"style": {
"navigationBarTitleText": "运动曲线"
}
},
{
"path": "PublicCards/history",
"style": {
"navigationBarTitleText": "历史记录"
}
},
{
"path": "PublicCards/contrast",
"style": {
"navigationBarTitleText": "数据对比"
}
},
{
"path": "PublicCards/pkdetail",
"style": {
"navigationBarTitleText": "对比详情"
}
},
{
"path": "home/inheritHeighet",
"style": {
@ -355,14 +186,6 @@
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "webview/webview",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
]
}],
@ -385,12 +208,6 @@
"selectedIconPath": "static/shou2.png"
// "text": "123"
},
{
"pagePath": "pages/zixun/list",
"iconPath": "static/ping.png",
"selectedIconPath": "static/ping2.png"
// "text": "资讯"
},
{
"pagePath": "pages/my/me",
"iconPath": "static/wo.png",

View File

@ -1,422 +0,0 @@
<template>
<view class="content ">
<view class="tabbar">
<scroll-view class="scroll-menu" scroll-x="true" style="white-space: nowrap;">
<view v-for="(item,index) in labelList" :class="[active==index?'active':'']"
@click="handleActive(item,index)">
<text>{{item}}</text>
</view>
</scroll-view>
</view>
<!-- -->
<view class="desc">
<view class="statuevue">
<view class="bi">
<view class="peobox" :style="'left:'+Number(offset)+'%'">
<view class="xx"></view>
</view>
<view class="item" v-for="(ite,ind) in lineList" :key="ind" :style="{backgroundColor:ite.color}">
<view class="span1">{{ite.text}}</view>
<view class="span" v-if="ind<lineList.length-1">{{ite.max_val}}</view>
</view>
</view>
</view>
</view>
<!-- -->
<view v-for="(ite,ind) in label_data" v-if="active == ind">
<view class="info">
<view class="table">
<text class="time">{{ite.record_time}}</text>
<text class="name2">训练成绩为</text>
</view>
<view class="left">
<view class="left_view">
<view class="title">{{ite.this_time_title}}:</view>
<view class="val">
<text class="yello"></text>
{{ite.this_time_value?ite.this_time_value:'-'}}
</view>
</view>
<view class="left_view">
<view class="title">{{ite.today_time_title}}:</view>
<view class="val">
<text class="yello"></text>
{{ite.today_time_value?ite.today_time_value:'-'}}
</view>
</view>
<view class="left_view">
<view class="title"></view>
<view class="val">
<text class="blues yello"></text>
{{ite.today_times?ite.today_times:'-'}}
</view>
</view>
<view class="left_view">
<view class="title">{{ite.all_time_title}}:</view>
<view class="val">
<text class="yello"></text>
{{ite.all_time_value?ite.all_time_value:'-'}}
</view>
</view>
<view class="left_view">
<view class="title"></view>
<view class="val">
<text class="blues yello"></text>
{{ite.all_times?ite.all_times:'-'}}
</view>
</view>
</view>
<view class="right">
<view class="charts">
<qiun-data-charts type="arcbar" :chartData="chartData" :Height="130" :Width="130" :canvas2d="true"/>
<view class="name">{{ite.score?ite.score:'-'}}</view>
</view>
<view class="standard" v-if="ite.standard">
<text :style="{backgroundColor:ite.color}">{{ite.standard}}</text>
</view>
<view v-if="ite.max_score" class="size12 c999"> 总成绩为{{ite.max_score}}</view>
</view>
</view>
<!-- 说明 -->
<view class="info describe" v-if="ite.describe">
{{ite.describe}}
</view>
</view>
<!-- -->
<view class="gridList">
<view class="data">
<view class="item" @click="navTo('/pageTwo/PublicCards/charts?acd_id='+acd_id)">
<view class="image">
<image src="@/static/charts.png"></image>
</view>
<view class="name">{{$t("common.titleCharts")}}</view>
</view>
<view class="item" @click="navTo('/pageTwo/PublicCards/history?acd_id='+acd_id)">
<view class="image">
<image src="@/static/add.png"></image>
</view>
<view class="name">{{$t("common.titleHistory")}}</view>
</view>
<view class="item" @click="navTo('/pageTwo/PublicCards/contrast?acd_id='+acd_id)">
<view class="image">
<image src="@/static/pk.png"></image>
</view>
<view class="name">{{$t("common.titleContrast")}}</view>
</view>
<view class="item" @click="$store.commit('changePublicAdd',true)">
<view class="image">
<image src="@/static/history.png"></image>
</view>
<view class="name">{{$t("common.btnAdd")}}{{$t("common.titleHome")}}</view>
</view>
</view>
</view>
<!-- 手动记录 -->
<publicAdd :rtype='acd_id' :active="active"></publicAdd>
</view>
</template>
<script>
import {
mapState
} from "vuex";
import publicAdd from '@/element/manuallyAdd/publicAdd.vue';
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
export default {
data() {
return {
active: 0,
acd_id: null,
lineList: [],
label_data: [],
offset: 0,
labelName: "",
chartData: {
series: [{
name: "正确率",
color: "#4687F9",
data: 0
}]
},
}
},
components: {
publicAdd,
qiunDataCharts
},
computed: {
...mapState(["PublicContent"]),
labelList() {
let that = this
if (that.PublicContent) {
that.labelName = that.PublicContent.label_list[that.active]
that.lineList = that.PublicContent.line_list
that.label_data = that.PublicContent.label_data
that.offset = that.PublicContent.label_data[that.active].offset
that.chartData.series[0].data = that.PublicContent.label_data[that.active].score.split('分')[0]/that.PublicContent.label_data[that.active].max_score
}
return that.PublicContent ? that.PublicContent.label_list : []
},
},
onLoad(options) {
let that = this
that.acd_id = options.acd_id
that.$store.dispatch("getPublicContent", {
acd_id: that.acd_id,
aud_id: uni.getStorageSync('userid')
})
},
methods: {
handleActive(ite, ind) {
let that = this
that.active = ind
that.labelName = ite
that.offset = that.label_data[ind].offset
that.chartData.series[0].data = Number(that.label_data[ind].offset) / 100
},
//
reload() {
let that = this
console.log('返回历史页', that.acd_id)
this.$nextTick(() => {
that.$store.dispatch("getPublicContent", {
acd_id: that.acd_id,
aud_id: uni.getStorageSync('userid')
})
})
},
navTo(url) {
uni.navigateTo({
url: url
})
},
}
}
</script>
<style scoped lang="scss">
.content {
width: calc(100% - 30px);
min-height: calc(100vh - 80px);
padding: 65px 15px 15px;
background-color: #f7f7f7;
}
.tabbar {
display: flex;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 999;
justify-content: space-between;
border-bottom: 1px solid #f7f7f7;
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
background-color: #fff;
.scroll-menu {
width: 100%;
white-space: nowrap;
view {
height: 55px;
line-height: 55px;
display: inline-block;
min-width: 100px;
margin: 0 10px;
text-align: center;
}
}
.active {
color: $maincolor;
font-weight: bold;
border-bottom: 2px solid $maincolor;
}
}
.desc {
padding: 15px;
text-align: left;
width: calc(100%-20px);
height: auto;
border-radius: 5px;
font-size: 30rpx;
color: #999;
margin-top: 15px;
background: #fff;
.statuevue {
height: 35px;
position: relative;
width: 100% !important;
margin: 20px auto 10px;
.bi {
display: flex;
justify-content: space-between;
width: auto;
padding-top: 10px;
.peobox {
position: absolute;
right: 0;
top: -1px;
.xx {
width: 5px;
height: 5px;
border-radius: 50%;
background: #fff;
position: absolute;
z-index: 9;
border: 2px solid #1b2086;
top: 9px;
}
}
}
.item {
position: relative;
margin: 0;
flex: 1;
height: 5px;
color: #666;
font-size: 30rpx;
.span1 {
width: 100%;
text-align: center;
position: absolute;
top: -23px;
}
.span {
margin-top: 8px;
position: absolute;
right: -8px;
}
}
}
}
.describe {
color: #666;
font-size: 28rpx;
line-height: 25px;
}
.info {
background-color: #fff;
padding: 15px;
margin-top: 15px;
border-radius: 5px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.table {
width: 100%;
display: flex;
flex-wrap: wrap;
.name2 {
width: 260rpx;
text-align: center;
font-weight: bold;
font-size: 36rpx;
}
.time {
width: calc(100% - 260rpx);
color: #999;
font-size: 32rpx;
margin-bottom: 5px;
display: inline-block;
}
}
.left {
width: calc(100% - 280rpx);
display: flex;
flex-wrap: wrap;
.left_view {
width: 100%;
display: flex;
align-items: center;
}
.title {
width: 80px;
font-weight: bold;
margin-right: 10px;
}
}
.right {
width: 260rpx;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
.charts {
width: 260upx;
height: 260upx;
margin: 10px 0;
position: relative;
display: flex;
align-items: center;
justify-content: center;
z-index: 9;
.name {
width: 100%;
text-align: center;
font-size: 56rpx;
color: #4687F9;
position: absolute;
}
}
.title {
width: 100%;
text-align: center;
}
}
}
.standard {
width: 100%;
text-align: center;
margin-top: 0px;
margin-bottom: 8px;
text {
width: 100px;
color: #fff;
font-size: 14px;
padding: 2px 10px;
border-radius: 5px;
}
}
.yello {
width: 8px;
height: 8px;
border-radius: 50%;
display: inline-block;
margin-right: 5px;
background-color: $btncolor;
}
.blues {
background-color: $maincolor;
}
.gridList {
margin: 0;
}
</style>

View File

@ -88,7 +88,6 @@
import {
mapState
} from "vuex";
import record from '@/element/manuallyAdd/record.vue';
import firstweight from '@/element/target/firstweight.vue';
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue'
export default {
@ -123,7 +122,6 @@
},
},
components: {
record,
firstweight,
qiunDataCharts,
},

View File

@ -23,16 +23,7 @@
</view>
<!-- 工具区 -->
<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="tools_l">
<view class="list" @click="handleTool('/pageTwo/home/bmi')">
<image src="../../static/q4.png"></image>
<view class="text">{{$t("common.titleBmi")}}</view>
@ -41,18 +32,13 @@
<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'">
<view class="list" @click="handleTool('/pageTwo/home/childPK')" v-if="Number(userInfo.age)<=16">
<image src="../../static/q11.png"></image>
<view class="text">增量对比</view>
<view class="text">{{$t("common.titleIncrement")}}</view>
</view>
<view class="list" @click="handleTool('/pageTwo/history/history?acd_id=2')" v-if="Number(userInfo.age)>16">
<image src="../../static/q8.png"></image>
<view class="text">{{$t("common.titleHistory")}}</view>
</view>
<view class="list" @click="handleTool('/pageTwo/compk/contrast?acd_id=2')">
<image src="../../static/q3.png"></image>
@ -66,15 +52,7 @@
<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>
<!-- 身体数据 -->
@ -269,52 +247,7 @@
</view>
</view>
<!-- 卡片 -->
<view class="list" v-if="user&&language == 'zh-Hans'">
<view class="bold mt-10 ml-10" v-if="user.card_data_list.length">卡片数据</view>
<view v-for="(item,index) in user.card_data_list">
<!-- 标题 -->
<view class="card box" @click="handlerReport(item)" :style="{'backgroundColor':item.background_color}">
<view class="boxBg">
<image :src="item.background_pic"></image>
</view>
<view class="title border">
<view class="name2">{{item.card_name}}</view>
<view class="time">
{{item.record_time}}
<uni-icons type="right" size="20" v-if="item.inside_data[0].value"></uni-icons>
</view>
</view>
<view class="target item">
<view class="bold size16 c666" v-if="item.acd_id!=2">本次数据</view>
<view class="bold size14" v-else>
<text class="size32">{{item.inside_data[1].value}}</text>
{{item.inside_data[1].unit}}
</view>
<view class="btnGroup">
<view class="blueBtn" v-if="item.acd_id==2" @click.stop
@click="$Bluetooth.handleDevicesMac(item.device_determine,item.acd_id)">蓝牙连接
</view>
<view class="blueBtn" v-else-if="item.acd_id==6">蓝牙连接</view>
<view v-else></view>
<view class="orangeBtn" @click="handlerRecord(item.acd_id)" @click.stop>手动记录</view>
</view>
</view>
<!-- 内容 -->
<view class="item title"
:style="{'justifyContent':item.inside_data.length>2?'space-between':'center'}">
<view v-for="(ite,ind) in item.inside_data" :class="[item.inside_data.length>3?'item2':'']">
<view class="weight"><text>{{ite.value?ite.value:'-'}}</text>{{ite.unit}}</view>
<view class="name mt-5" v-if="item.acd_id!=8">{{ite.name}}</view>
</view>
</view>
</view>
</view>
</view>
<!-- 设置数据卡片 -->
<view class="setcard" @click="handleCard" v-if="userList.length&&user.measure_model==1&&language == 'zh-Hans'">
设置数据页卡片
</view>
<!-- 弹框广告 -->
<view class="wrapper" v-if="isCoupon">
<view class="bg" @click="isCoupon=false">
@ -329,12 +262,6 @@
</view>
</view>
</view>
<!-- <view class="nolist" @click="handleAddUser" :style="{'marginTop':isShow?'150px':'0'}">
<image src="../../static/none.png"></image>
<text>请先添加成员</text>
</view> -->
<!-- 手动 -->
<record :rtype="rtype"></record>
@ -347,14 +274,14 @@
} from "vuex";
let myTime;
import headerIndex from "@/element/headerIndex.vue"
import record from '@/element/manuallyAdd/record.vue';
import record from '@/element/manuallyAdd/weightAdd.vue';
import {
I18nT
} from "vue-i18n";
export default {
data() {
return {
rtype: 0,
rtype: 2,
transition: 1.6,
isShow: true,
infoListTop: {},
@ -483,8 +410,7 @@
})
},
//
handlerRecord(id) {
this.rtype = id
handlerRecord() {
this.$store.commit('changeRecord', true)
},
//
@ -601,7 +527,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) {
@ -806,7 +732,7 @@
.bleTips {
height: 35px;
line-height: 35px;
margin: 15px 10px 10px;
margin: 10px;
background: #fff;
border-radius: 10px;
text-align: center;
@ -828,7 +754,7 @@
justify-content: space-between;
.list {
width: 20%;
width: 33%;
text-align: center;
font-size: 14px;
margin-bottom: 20px;
@ -905,12 +831,4 @@
}
}
}
.list2 {
.list {
width: 33% !important;
margin-bottom: 10px !important;
}
}
</style>

View File

@ -1,107 +0,0 @@
<template>
<view class="TrendPage">
<view class="listC">
<view @click="handleActive(1)" :class="[active==1?'active':'']">{{$t('chartsDay')}}</view>
<view @click="handleActive(2)" :class="[active==2?'active':'']">{{$t('chartsMonth')}}</view>
<view @click="handleActive(3)" :class="[active==3?'active':'']">{{$t('chartsYear')}}</view>
</view>
<view class="box">
<!-- 时间选择 -->
<view class="boxTime">
<picker mode="date" class="f-l" :value="startDate" @change="handStartTimeH"
:fields="active==1?'day':active==2?'month':'year'">
<view class="uni-input">{{time}}<uni-icons type="bottom"></uni-icons></view>
</picker>
</view>
<!-- 曲线图 -->
<view class="boxLine">
<view class="line" v-for="(item,index) in weightList">
<view v-if="item.line.categories.length">
<qiunDataCharts type="column" :chartData="item.line" :canvas2d="true" :canvasId="'lung'+index"
:Width="340" :Height="250" :animation="false"
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}" :ontouch="true" />
</view>
<view class="nolist" v-else>
<image src="../../static/none.png"></image>
<text>{{$t('index.none')}}~</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue'
export default {
components: {
qiunDataCharts,
},
computed: {
...mapState(["user"]),
userInfo: function() {
return this.user
},
startDate() {
return this.$tools.getDate("start")
},
},
onLoad() {
let that = this
this.active = 1
this.time = this.startDate
that.getList()
},
onReady() {
uni.setNavigationBarTitle({
title: this.$t('common.titleCharts'),
})
},
methods: {
getList() {
let that = this
that.$model.getLungTrendList({
aud_id: uni.getStorageSync('userid'),
time: that.time,
}).then(res => {
console.log("肺活量曲线", res.data)
that.weightList = res.data
})
},
handleActive(ite) {
let that = this
that.handTrue = false
that.time = ite == 1 ? this.startDate : ite == 2 ? this.$tools.getDate("month") : this.$tools.getDate(
"year")
that.getList()
that.$nextTick(function() {
that.handTrue = true
})
that.active = ite
},
handStartTimeH(e) {
let that = this
that.time = e.target.value
that.getList()
},
navTo(url) {
uni.navigateTo({
url: url
})
}
},
data() {
return {
weightList: [],
handTrue: true,
active: 1,
time: "",
};
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -1,130 +0,0 @@
<template>
<view class="content">
<!-- -->
<view class="skiptop">
<!-- <view class="status" @click="$Bluetooth.handleDevicesMac(isdevice,acd_id)"><text>设备连接</text></view> -->
<view class="item">
<view class="item-ite">平均吸气肺活量<text>{{info?info.average:'--'}}</text></view>
<view class="item-ite">吸气速度<text>--</text></view>
<view class="item-ite">是否达标<text>{{info?info.level:'--'}}</text></view>
</view>
</view>
<!--自由训练 -->
<view class="box1">
<view class="time">{{info?info.time:''}}</view>
<!-- <view class="LiuS">吸气速度 <text class="cgreen ml-5">{{info?info.flow_val:'--'}}L/min</text></view> -->
<view class="item">
<view class="image">
<image src="../../static/bae.png" mode="widthFix"></image>
</view>
<view class="center mt-15">
<view class="level"></view>
<view class="level level-bg" :style="{'top':info?Number(100 - info.offset)+'%':'100%'}"></view>
<view class="level-item" v-if="info">
<view class="ite" v-for="(ite,ind) in info.list" :style="{'height':100/info.list.length+'%'}">
{{ite.text}}</view>
</view>
</view>
</view>
<view class="val" v-if="info">
<text>{{info.average}}</text>
吸气肺活量平均值
</view>
</view>
<!-- -->
<view class="gridList">
<view class="data">
<view class="item" @click="navTo('/pages/lunging/charts')">
<view class="image">
<image src="../../static/charts.png"></image>
</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">历史记录</view>
</view>
<view class="item" @click="navTo('/pageTwo/compk/contrast?acd_id='+acd_id)">
<view class="image">
<image src="../../static/pk.png"></image>
</view>
<view class="name">数据对比</view>
</view>
<view class="item" @click="$store.commit('changeRecord',true)">
<view class="image">
<image src="../../static/history.png"></image>
</view>
<view class="name">添加记录</view>
</view>
</view>
</view>
<!-- 手动记录 -->
<record :rtype="acd_id"></record>
</view>
</template>
<script>
import {
mapState
} from "vuex";
import record from '@/element/manuallyAdd/record.vue';
export default {
data() {
return {
LiuS: 0,
acd_id: 8,
isdevice: true,
}
},
components: {
record
},
computed: {
...mapState(["MeasureLung"]),
info() {
return this.MeasureLung
}
},
onLoad(options) {
let that = this
that.acd_id = options.acd_id
that.isdevice = options.device
that.$store.dispatch("getLungResult", {
aud_id: uni.getStorageSync('userid')
})
},
onPullDownRefresh() {
let that = this
that.$store.dispatch("getLungResult", {
aud_id: uni.getStorageSync('userid')
})
setTimeout(() => {
uni.stopPullDownRefresh()
}, 1000);
},
methods: {
//
reload() {
let that = this
console.log('重新加载');
this.$nextTick(() => {
that.$store.dispatch("getLungResult", {
aud_id: uni.getStorageSync('userid')
})
})
},
navTo(url) {
uni.navigateTo({
url: url
})
},
}
}
</script>
<style lang="scss" scoped>
@import "@/scss/lunging.scss";
</style>

View File

@ -20,7 +20,7 @@
</view>
</view>
</view>
<view class="list" @click="navTo('/pageTwo/history/history?acd_id=2')" v-if="language!= 'zh-Hans'">
<view class="list" @click="navTo('/pageTwo/history/history?acd_id=2')">
<view class="item border-bottom">
<view class="left">
<view class="name">{{$t("common.titleHistory")}}</view>
@ -30,26 +30,6 @@
</view>
</view>
</view>
<!-- <view class="list" @click="navTo('/pageTwo/business/business')">
<view class="item border-bottom">
<view class="left">
<view class="name">{{$t("common.titlebBusiness")}}</view>
</view>
<view class="right">
<uni-icons type="right"></uni-icons>
</view>
</view>
</view> -->
<view class="list" @click="navTo('/pageTwo/score/history')" v-if="language== 'zh-Hans'">
<view class="item border-bottom">
<view class="left">
<view class="name">{{$t("common.titleScoreHistory")}}</view>
</view>
<view class="right">
<uni-icons type="right"></uni-icons>
</view>
</view>
</view>
<!-- #ifdef APP-PLUS -->
<view class="list" @click="navTo('/pageTwo/my/about')">
<view class="item border-bottom">
@ -72,17 +52,6 @@
</view>
</view>
<!-- #endif -->
<view class="list" v-for="(ite,ind) in CooperationUrl" :key="ind" v-if="language== 'zh-Hans'">
<view class="item border-bottom" @click="navTo('/pageTwo/webview/webview?url=' + ite.url)">
<view class="left">
<view class="name">{{ite.title}}</view>
</view>
<view class="right">
<uni-icons type="right"></uni-icons>
</view>
</view>
</view>
</view>
<view class="btn mb-15" v-if="token" @click="handleOutLogin">{{$t("common.btnLogOut")}}</view>
</view>
@ -177,6 +146,7 @@
that.$model.getSetLanguage({
language: that.languageList[that.index].key,
}).then(res => {
console.log("语言切换成功", that.languageList[that.index].key)
that.$i18n.locale = that.languageList[that.index].key
uni.setStorageSync('language', that.languageList[that.index].key)
that.$store.commit('changeLocale', that.languageList[that.index].key)

View File

@ -1,541 +0,0 @@
<template>
<view class="content">
<!-- 头部 -->
<headerIndex @getAciveCity="getAciveCity" v-if="!isRefresh"></headerIndex>
<!-- 估分 -->
<view class="box">
<view class="title bold">本次估分成绩为</view>
<view class="charts mt-15">
<qiun-data-charts type="arcbar" :chartData="chartData" :Height="140" :Width="140" :canvas2d="true" />
<view class="name">{{score?score:'--'}}</view>
</view>
<view class="btn history" @click="navTo('/pageTwo/score/history')">估分历史</view>
<view class="title bold Max_score" v-if="Max_score">该地区体育总成绩为:{{Max_score}}</view>
<view class="Lastdata" @click="getList(1)">上次数据</view>
</view>
<!-- -->
<view v-if="selectllist.length">
<view v-for="(item,index) in selectllist">
<view class="titleName bold mt-15 ml-15 size16">{{item.name}}</view>
<view class="indexCarList">
<view class="card" v-for="(ite,ind) in item.list">
<view class="title">
<view class="name ">{{ite.name}}</view>
<!-- <view class="right" v-if="ite.is_choice!=0&&!isresult" @click="handleHistory(ite)">选择项目
</view> -->
</view>
<!-- 列表 -->
<view class="item3" v-for="(it,ik) in ite.list" :key="ik" v-if="!isresult">
<!-- 单选 -->
<uni-icons :type="it.choice_state==1?'circle-filled':'circle'"
:color="it.choice_state==1?'#FEC407':'#dfdfdf'" size="22"
v-if="Number(ite.is_choice)>=1" @click="handleActiveState(ite,it,ik)"></uni-icons>
<view class="name" @click="handleTips(it.describe)">
<text>{{it.name}}</text>
<uni-icons type="info" color="#f0ad4e" size="20" v-if="it.describe"></uni-icons>
</view>
<view class="weight">
<view class="input">
<!-- 整数类型 -->
<input type="number" v-model="it.value" confirm-type="done" placeholder="请输入"
v-if="it.type ==1" :style="{'color':it.inputStyle}"
@input="changeDisabled(it)" />
<!-- 小数类型 -->
<input type="digit" v-model="it.value" confirm-type="done" placeholder="请输入"
maxlength="4" v-else-if="it.type ==2||it.type ==3"
:style="{'color':it.inputStyle}" @input="changeDisabled(it)" />
<!-- 分秒类型 -->
<picker mode="multiSelector" :range="timeList" @change="bindTimeChange($event,it)"
v-else-if="it.type ==4" :style="{'color':it.inputStyle}"
@input="changeDisabled(it)">
<view>{{it.value?it.value:'请选择'}}</view>
<uni-icons type="down" color="#999" size="20" class="down"></uni-icons>
</picker>
<uni-icons type="clear" color="#999" v-if="it.value &&it.type !='4'"
@click="handleValue(it)" size="24" class="uni-icons"></uni-icons>
</view>
<text :style="{'color':it.inputStyle}" @input="changeDisabled(it)">{{it.unit}}</text>
</view>
</view>
<!-- 结果展示 -->
<view class="result item3" v-for="(ita,idx) in ite.list" :key="idx"
v-if="isresult&&ite.list.length>1">
<view class="name">{{ita.name}}</view>
<view class="weight">
<view style="width: 40%;">{{ita.value?ita.value:'-'}}</view>
<view class="cblue bold">{{ita.proportion_value?ita.proportion_value:'-'}}</view>
<view class="cblue bold">{{ita.total_score?ita.total_score:'-'}}</view>
</view>
</view>
</view>
</view>
</view>
<view class="gfbtn" v-if="isSports" @click="handleNewScore()">重新估分</view>
<view class="gfbtn" @click="handlescore()" v-else>开始估分</view>
</view>
<!-- -->
<view class="nolist" v-else>
<image src="../../static/none.png"></image>
<text>{{msg}}</text>
</view>
<!-- 占比 -->
<uslider></uslider>
<!-- 弹框 -->
<view class="wrapper" v-if="isDrawe">
<view class="bg" @click="onTap"></view>
<!-- 单选 -->
<view class="edit" @click.stop>
<view class="title">请选择<text class="choice">({{List.length}}{{choice}})</text></view>
<view class="item" v-for="(item, index) in List" :key="index" @click="toggle(item)">
<!-- d单选 -->
<uni-icons :type="isActive.name==item.name?'circle-filled':'circle'" size="22"
:color="isActive.name==item.name?'#FEC407':'#dfdfdf'" v-if="choice==1"></uni-icons>
<!-- 多选 -->
<uni-icons :type="isActiveNameList.indexOf(item.name)!=-1?'checkbox-filled':'circle'" size="22"
:color="isActiveNameList.indexOf(item.name)!=-1?'#FEC407':'#dfdfdf'"
v-if="choice>1"></uni-icons>
<view class="name">
<view class="overflow">
{{item.name}}
</view>
</view>
</view>
<view class="btn close" @click="onTap">取消</view>
<view class="btn" @click="handleTarget">确定</view>
</view>
</view>
<!-- -->
<!-- #ifndef APP-PLUS -->
<view class="uni-stat-tooltip" v-if="isTips">
{{tips}}
</view>
<!-- #endif -->
</view>
</template>
<script>
import uslider from "@/element/slider-fraction.vue";
import headerIndex from "@/element/headerIndex.vue";
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue';
import {
mapState
} from "vuex";
export default {
data() {
return {
tips: "",
isTips: false,
chartData: {
series: [{
name: "正确率",
color: "#4687F9",
data: 0.8
}]
},
sportsList: [],
List: [],
score: 0,
Max_score: 0,
isDrawe: false,
selectllist: [],
isActive: {},
isActiveList: [],
isActiveNameList: [],
region_list: {},
timeList: [],
timesTndex: [0, 0],
isSports: false,
msg: "暂无信息",
address: "",
isresult: false,
choice: 0,
isRefresh: false,
}
},
computed: {
...mapState(["user", "familayList"]),
userAddress() {
return this.user.address
},
userId() {
return this.user.id
},
},
components: {
uslider,
headerIndex,
qiunDataCharts
},
onLoad() {
let that = this
that.score = 0
that.tips = ""
that.isTips = false
that.selectllist = []
that.sportsList = []
that.timeList = that.$tools.gethms()
if (that.familayList.length) {
that.address = that.user.address
that.getList(0)
}
console.log("onLoad")
},
onPullDownRefresh() {
let that = this
that.tips = ""
that.isTips = false
that.score = 0
that.choice = 0
that.Max_score = 0
that.selectllist = []
that.sportsList = []
that.isRefresh = true
that.timeList = that.$tools.gethms()
if (that.familayList.length) {
that.address = that.user.address
that.getList(0)
}
setTimeout(() => {
that.isRefresh = false
uni.stopPullDownRefresh()
}, 200);
console.log("刷新")
},
onShow() {
let that = this
// that.isresult = false
// that.isSports = false
that.tips = ""
that.isTips = false
if (!that.familayList.length) {
that.score = 0
that.Max_score = 0
that.selectllist = []
that.sportsList = []
that.isActiveList = []
that.isActiveNameList = []
that.chartData.series[0].data = 0.8
}
},
watch: {
isTips() {
let that = this
if (that.isTips) {
setTimeout(() => {
that.isTips = false
}, 4000);
}
}
},
methods: {
getAciveCity(item) {
console.log("item", item)
let that = this
that.address = item
that.score = 0
that.isresult = false
that.selectllist = []
that.sportsList = []
that.isActiveList = []
that.isActiveNameList = []
that.getList(0)
},
//
getList(ind) {
let that = this
that.isresult = false
that.isSports = false
that.$model.getSportsListAll({
gender: uni.getStorageSync('gender'),
parameter_data: that.address,
aud_id: uni.getStorageSync('userid'),
choice_last_time: ind
}).then((res) => {
console.log("全部项目", res)
if (res.code != 0) {
that.msg = res.msg
return
}
res.data.forEach(item => {
item.list.forEach(list => {
list.list.forEach(val => {
val.inputStyle = "#999"
if (list.is_choice == 2 && val.choice_state == 1) {
that.isActiveList.push(val.name)
}
})
})
})
that.score = 0
that.Max_score = 0
that.selectllist = res.data
that.chartData.series[0].data = 0.8
that.tips = ""
that.isTips = false
// that.handleSportsList()
})
},
//
handleNewScore() {
let that = this
that.isActive = {}
that.selectllist = []
that.sportsList = []
that.isActiveList = []
that.isActiveNameList = []
that.getList(0)
},
changeDisabled(item) {
item.inputStyle = '#333'
},
//
handleActiveState(item, ite, ind) {
let that = this
//
if (Number(item.is_choice) == 1) {
item.list.forEach(list => {
list.choice_state = 0
})
ite.choice_state = ite.choice_state == 1 ? 0 : 1
}
//
let isActive = []
if (Number(item.is_choice) >= 2) {
if (that.isActiveList.indexOf(ite.name) == -1) {
that.isActiveList.push(ite.name);
} else {
that.isActiveList.splice(that.isActiveList.indexOf(ite.name), 1);
}
if (that.isActiveList.length > 2) {
that.isActiveList.splice(0, 1)
}
item.list.forEach(list => {
list.choice_state = 0
that.isActiveList.forEach(it => {
if (list.name == it) {
list.choice_state = 1
}
})
})
}
},
bindTimeChange(e, it) {
let that = this
let minute = e.target.value[0]
let second = e.target.value[1]
it.value = that.timeList[0][minute].substring(0, 2) + ':' + that.timeList[1][second].substring(
0, 2)
// console.log(e.target.value, it)
},
handleTips(text) {
if (text == null || text == '') return
// #ifndef APP-PLUS
this.tips = text
this.isTips = true
// #endif
// #ifdef APP-PLUS
uni.showToast({
title: text,
duration: 4000,
icon: 'none'
})
// #endif
},
//
handleSportsList() {
let that = this
that.$model.getSportsList({
aud_id: uni.getStorageSync('userid'),
gender: uni.getStorageSync('gender'),
address: that.address
}).then((res) => {
console.log("单地区", res)
if (res.code != 0) return
that.sportsList = res.data.list
})
},
handleValue(item) {
item.value = ""
},
//
handlescore() {
let that = this
if (!that.familayList.length) {
that.$tools.msg("请先添加成员")
return
}
console.log("selectllist", that.selectllist)
that.selectllist.forEach(item => {
item.list.forEach(ite => {
ite.list.forEach(it => {
it.value = it.value == "" ? "0" : it.value
})
})
})
that.$model.getSportsData({
aud_id: uni.getStorageSync('userid'),
gender: uni.getStorageSync('gender'),
parameter_data: that.address,
result_data: that.selectllist,
}).then((res) => {
console.log("开始估分", res)
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.isSports = true
that.isresult = true
that.selectllist = res.data.list
that.score = res.data.total_score
that.Max_score = res.data.max_score
that.chartData.series[0].data = Number(res.data.total_score) / res.data.max_score
})
},
//
handleHistory(item) {
let that = this
that.List = []
that.region_list = item
that.sportsList.forEach(ite => {
if (ite.key == item.key) {
that.List = ite.list
that.choice = item.is_choice
}
})
console.log("添加项目", item)
that.isDrawe = true
},
//
toggle(item) {
let that = this
//
if (that.choice == 1) {
that.isActive = that.isActive.name == item.name ? {} : item
return
}
//
if (that.isActiveNameList.indexOf(item.name) == -1) {
that.isActiveNameList.push(item.name)
that.isActiveList.push(item)
} else {
for (var n = 0; n < that.isActiveNameList.length; n++) {
if (item.name == that.isActiveNameList[n]) {
if (that.isActiveNameList.indexOf(item.name) == -1) {
that.isActiveNameList.push(item.name)
that.isActiveList.push(item);
}
that.isActiveNameList.splice(n, 1)
that.isActiveList.splice(n, 1);
}
}
}
if (that.isActiveList.length > that.choice) {
that.isActiveList.splice(0, 1)
that.isActiveNameList.splice(0, 1)
}
console.log("isActiveList", item.name, that.isActiveList, that.region_list.list)
},
//
handleTarget() {
let that = this
that.selectllist.forEach(item => {
item.list.forEach(it => {
if (it.key == that.region_list.key) {
it.list = []
}
})
})
if (that.choice == 1) {
if (Object.keys(that.isActive).length != 0) {
that.region_list.list.push(that.isActive)
}
} else {
that.region_list.list = that.isActiveList
}
that.isDrawe = false
},
//
onTap() {
let that = this
//
if (that.choice == 1) {
if (Object.keys(that.isActive).length == 0) {
that.region_list.list = []
that.selectllist.forEach(item => {
item.list.forEach(it => {
if (it.key == that.region_list.key) {
it.list = []
}
})
})
}
}
that.isDrawe = false
console.log("取消", Object.keys(that.isActive).length, this.isActive)
},
navTo(url) {
uni.navigateTo({
url: url
})
},
}
}
</script>
<style scoped lang="scss">
@import "@/scss/score.scss";
.content {
min-height: 100vh;
padding-bottom: 15px;
background-color: #f7f7f7;
}
.Max_score {
width: 100%;
text-align: center;
}
.Lastdata {
height: 35px;
line-height: 35px;
margin-top: 15px;
font-size: 28rpx;
padding: 0 10px;
background: #FEC407 !important;
border-radius: 10px;
color: #fff;
width: 30%;
text-align: center;
}
.uni-stat-tooltip {
width: 80%;
height: auto;
overflow: scroll;
word-break: break-word;
position: fixed;
margin: auto;
background-color: rgba(0, 0, 0, 0.8);
color: #fff;
z-index: 999;
padding: 10px;
border-radius: 10px;
top: 33%;
left: 10%;
}
</style>

View File

@ -1,103 +0,0 @@
<template>
<view class="TrendPage">
<view class="listC">
<view @click="handleActive(1)" :class="[active==1?'active':'']">{{$t("chartsDay")}}</view>
<view @click="handleActive(2)" :class="[active==2?'active':'']">{{$t("chartsMonth")}}</view>
<view @click="handleActive(3)" :class="[active==3?'active':'']">{{$t("chartsYear")}}</view>
</view>
<view class="box">
<!-- 时间选择 -->
<view class="boxTime">
<picker mode="date" class="f-l" :value="startDate" @change="handStartTimeH"
:fields="active==1?'day':active==2?'month':'year'">
<view class="uni-input">{{time}}<uni-icons type="bottom"></uni-icons></view>
</picker>
</view>
<!-- 曲线图 -->
<view class="boxLine">
<view class="line" v-for="(item,index) in weightList">
<view v-if="item.line.categories.length">
<qiunDataCharts type="column" :chartData="item.line" :canvas2d="true" :canvasId="item.id"
:Width="340" :Height="250" :animation="false"
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}" :ontouch="true" />
</view>
<view class="line" v-else>
<view class="nolist">
<image src="../../static/none.png"></image>
<text>{{$t("index.none")}}~</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue'
export default {
components: {
qiunDataCharts,
},
computed: {
...mapState(["user"]),
userInfo: function() {
return this.user
},
startDate() {
return this.$tools.getDate("start")
},
},
onLoad() {
let that = this
this.active = 1
this.time = this.startDate
that.getList()
},
methods: {
getList() {
let that = this
that.$model.getSkipTrendList({
aud_id: uni.getStorageSync('userid'),
time: that.time,
}).then(res => {
console.log("跳绳曲线", res.data)
that.weightList = res.data
})
},
handleActive(ite) {
let that = this
that.handTrue = false
that.time = ite == 1 ? this.startDate : ite == 2 ? this.$tools.getDate("month") : this.$tools.getDate("year")
that.getList()
that.$nextTick(function() {
that.handTrue = true
})
that.active = ite
},
handStartTimeH(e) {
let that = this
that.time = e.target.value
that.getList()
},
navTo(url) {
uni.navigateTo({
url: url
})
}
},
data() {
return {
weightList: [],
handTrue: true,
active: 1,
time: "",
};
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -1,771 +0,0 @@
<template>
<view class="content skipping">
<!-- -->
<view class="skiptop">
<view class="status" @click="handleisSdevice()">
<text>{{textLink}}</text>
<image v-if="islink!=1" :class="[islink==-1?'':'icon_link']" src="../../static/zhuan.png"></image>
<image v-if="islink==1" src="../../static/dui.png"></image>
</view>
<view class="item">
<view class="item-ite">今日个数<text>{{info?info.today_jump_num:'--'}}</text></view>
<view class="item-ite">今日时长<text>{{info?info.today_jump_time:'--'}}</text></view>
<view class="item-ite">卡路里/kcal<text>{{info?info.today_jump_kcal:'--'}}</text></view>
</view>
</view>
<!-- -->
<view class="tabbar">
<view @click="active=1" :class="[active==1?'active':'']">自由跳</view>
<view @click="active=3" :class="[active==3?'active':'']">倒计数</view>
<view @click="active=2" :class="[active==2?'active':'']">倒计时</view>
</view>
<!--自由训练 -->
<view class="box1 box" v-if="active==1">
<view class="item">
<text class="item-set item-set0">自由</text>
<text class="tips">无限制</text>
</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>
</view>
<view class="item">
<text class="item-ite">消耗卡路里</text>
<text class="bold">{{info?info.last_jump_kcal:'0'}}</text>
</view> -->
</view>
<!--定时训练 -->
<view class="box1 box" v-if="active==2">
<view class="item">
<view class="item-set">
<text @click="handleTimeEdit('减')"></text>
<text>{{time_m}}:{{time_s}}</text>
<text @click="handleTimeEdit('加')"></text>
</view>
<view class="tips">
<picker mode="multiSelector" :range="timeList" :value="timesTndex" @change="bindTimeChange">
<view>调整目标</view>
</picker>
</view>
</view>
<view :class="[isConnection?'start':'start Nstart']" @click="handleStart(2)">开始</view>
<!-- <view class="item">
<text class="item-ite">本次个数</text>
<text></text>
</view>
<view class="item">
<text class="item-ite">消耗卡路里</text>
<text></text>
</view> -->
</view>
<!--定数训练 -->
<view class="box1 box" v-if="active==3">
<view class="item">
<view class="item-set">
<text @click="handleWeightEdit('减')"></text>
<text v-if="!disabled">{{weight>50?weight:50}}</text>
<input type="number" v-model="weight" focus="true" v-else @blur="disabled=false">
<text @click="handleWeightEdit('加')"></text>
</view>
<text class="tips" @click="disabled=true">调整目标</text>
</view>
<view :class="[isConnection?'start':'start Nstart']" @click="handleStart(3)">开始</view>
<!-- <view class="item">
<text class="item-ite">本次时长</text>
<text>0</text>
</view>
<view class="item">
<text class="item-ite">消耗卡路里</text>
<text>0</text>
</view> -->
</view>
<!-- -->
<view class="gridList">
<view class="data">
<view class="item" @click="navTo('/pages/skiping/charts')">
<view class="image">
<image src="@/static/charts.png"></image>
</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">历史记录</view>
</view>
<view class="item" @click="navTo('/pageTwo/compk/contrast?acd_id='+acd_id)">
<view class="image">
<image src="@/static/pk.png"></image>
</view>
<view class="name">数据对比</view>
</view>
<view class="item" @click="$store.commit('changeRecord',true)">
<view class="image">
<image src="@/static/history.png"></image>
</view>
<view class="name">添加记录</view>
</view>
</view>
</view>
<!-- 手动记录 -->
<record :rtype="acd_id"></record>
</view>
</template>
<script>
let myTime;
import {
mapState
} from "vuex";
import record from '@/element/manuallyAdd/record.vue';
export default {
data() {
return {
active: 1,
acd_id: 6,
weight: 50,
disabled: false,
isDevice: 0,
isConnection: false,
time_m: "",
time_s: "",
timeList: [],
devicesList: [],
timesTndex: [1, 0],
deviceId: "",
serviceId: "",
write: "",
notify: "",
islink: 0, //01-1
textLink: ""
}
},
components: {
record
},
computed: {
...mapState(['user', "MeasureSkip", "isConnected", "isBluetoothTyle"]),
info() {
return this.MeasureSkip
},
},
mounted() {
let that = this
that.timeList = that.$tools.gethms()
that.time_m = that.timeList[0][1].substring(0, 2)
that.time_s = that.timeList[1][0].substring(0, 2)
},
onLoad(options) {
let that = this
//
if (options && options.deviceId) {
that.deviceId = options.deviceId
setTimeout(function() {
that.createBLEConnection()
}, 500)
}
if (options && options.acd_id) {
that.$Bluetooth.stopBluetoothDevicesDiscovery()
setTimeout(function() {
that.handleisSdevice()
}, 500)
}
that.$store.dispatch("getSkipResult", {
aud_id: uni.getStorageSync('userid')
})
that.isConnection = that.isConnected
that.onBLEConnectionStateChange()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
},
onPullDownRefresh() {
setTimeout(() => {
uni.stopPullDownRefresh()
}, 1000);
},
onShow() {
let that = this
//
uni.$on('updateData', function(info) {
let data = JSON.parse(info)
that.acd_id = data.acd_id
that.isDevice = data.device
that.active = data.active
that.deviceId = data.deviceId
that.serviceId = data.serviceId
that.write = data.write
that.notify = data.notify
that.islink = !that.isConnected ? -1 : 1
that.isConnection = that.isConnected
that.notifyBLECharacteristicValue()
if (data.isSuccessful) {
that.$store.dispatch("getSkipResult", {
aud_id: uni.getStorageSync('userid')
})
}
that.onBLEConnectionStateChange()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
console.log('监听到事件来自 updateData', data);
})
},
onUnload: function() {
let that = this
clearTimeout(myTime);
that.islink = -1
that.isConnection = false
that.closeBLEConnection()
that.closeBluetoothAdapter()
uni.$off("updateData")
setTimeout(() => {
uni.switchTab({
url: '/pages/home/home'
})
}, 300)
console.log("返回首页onUnload")
},
watch: {
isConnected() {
let that = this
if (!that.isConnected) {
that.islink = -1
that.textLink = "重新连接"
}
that.isConnection = that.isConnected
console.log("蓝牙是否连接", that.isConnected)
},
isBluetoothTyle() {
let that = this
if (!that.isBluetoothTyle) {
that.isConnection = false
that.textLink = "请打开手机蓝牙"
that.islink = -1
}
console.log("蓝牙是否打开", that.isBluetoothTyle)
}
},
methods: {
//
handleisSdevice() {
let that = this
if (that.isConnected) return
that.devicesList = []
that.$Bluetooth.stopBluetoothDevicesDiscovery()
uni.openBluetoothAdapter({
success: e => {
that.islink = 0
that.handleMyTime()
that.textLink = "蓝牙搜索中"
that.startBluetoothDeviceDiscovery()
that.$store.commit("changeBluetooth", true)
console.log('初始化蓝牙成功:' + e.errMsg);
},
fail: e => {
that.islink = -1
that.textLink = that.$tools.getBluetoothAdapter(e)
return
}
});
},
//
startBluetoothDeviceDiscovery() {
let that = this
uni.startBluetoothDevicesDiscovery({
allowDuplicatesKey: true,
interval: 200, //
services: [],
success: res => {
that.onBluetoothDeviceFound();
},
fail: res => {}
});
},
/**
* 发现外围设备
*/
onBluetoothDeviceFound() {
var that = this;
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
if (!device.name && !device.localName) {
return
}
if (device.name.indexOf('YPC') != -1) {
device.deviceId = device.deviceId
that.deviceId = device.deviceId
that.$Bluetooth.stopBluetoothDevicesDiscovery()
that.handleDevice(device)
return
}
})
});
that.handleMyTime()
},
handleDevice(device) {
let that = this
const foundDevices = that.devicesList
const idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId)
if (idx === -1) {
that.devicesList.push(device);
that.createBLEConnection()
}
},
//
createBLEConnection() {
let that = this;
uni.createBLEConnection({
deviceId: that.deviceId,
success: res => {
that.textLink = "蓝牙连接中"
setTimeout(function() {
that.islink = 1
that.getBLEDeviceServices()
}, 1000)
},
fail: res => {
that.textLink = "重新连接"
console.log("设备连接失败,请重新连接", res, that.deviceId);
}
});
},
/**
* 获取设备的UUID
*/
getBLEDeviceServices() {
let serviceList = [];
let that = this;
uni.getBLEDeviceServices({
deviceId: that.deviceId,
success: res => {
console.log("获取设备的UUID成功", res)
serviceList = res.services;
for (let i = 0; i < serviceList.length; i++) {
let service = serviceList[i];
if (service.uuid.indexOf("FFE0") != -1) {
that.serviceId = service.uuid;
that.isConnection = true
that.textLink = "连接成功"
that.getBLEDeviceCharacteristics();
console.log("设备的FFE0的serviceId " + that.serviceId);
break;
}
}
},
fail: res => {
console.log('获取设备的UUID失败:', res)
that.islink = -1
that.textLink = "重新连接"
clearTimeout(myTime);
that.isConnection = false
}
});
},
/**
* 获取指定服务的特征值
*/
getBLEDeviceCharacteristics() {
let characteristicsList = [];
let that = this;
uni.getBLEDeviceCharacteristics({
deviceId: that.deviceId,
serviceId: that.serviceId,
success: res => {
console.log("服务的特征值成功", res)
// * read: true, //,write: true, //,notify: true
for (let i = 0; i < res.characteristics.length; i++) {
let item = res.characteristics[i];
if (item.uuid.indexOf('0000FF12') != -1) {
that.write = item.uuid
} else if (item.uuid.indexOf('0000FFE4') != -1) {
that.notify = item.uuid
}
}
setTimeout(function() {
let j = Number(165 + 10 + 1 + 8 + 8 + 8 + 8 + 8 + 8).toString(16)
let str = "A50A01080808080808" + j.substr(j.length - 2, 2)
that.SendData(str)
}, 300)
//
setTimeout(function() {
that.handleStart(4)
}, 600)
uni.notifyBLECharacteristicValueChange({
deviceId: that.deviceId,
serviceId: that.serviceId,
characteristicId: that.notify,
state: true,
})
uni.notifyBLECharacteristicValueChange({
deviceId: that.deviceId,
serviceId: that.serviceId,
characteristicId: that.write,
state: true,
})
that.notifyBLECharacteristicValue()
},
fail: res => {
console.log('获取特征值失败:', JSON.stringify(res))
}
})
},
notifyBLECharacteristicValue() {
let that = this;
uni.notifyBLECharacteristicValueChange({
state: true, // notify
deviceId: that.deviceId,
serviceId: that.serviceId,
characteristicId: that.notify,
success(res) {
uni.onBLECharacteristicValueChange(function(res) {
let value = that.$tools.ab2hex(res.value, "");
if (value == '5a05090169') { //
let info = {
active: that.active,
deviceId: that.deviceId,
serviceId: that.serviceId,
notify: that.notify,
write: that.write,
acd_id: that.acd_id,
isDevice: that.isDevice,
isSuccessful: false
}
setTimeout(function() {
uni.$off("updateData")
uni.navigateTo({
url: "/pageTwo/devices/PCT01?info=" + JSON
.stringify(info)
})
}, 200)
}
console.log("value", value, that.active)
})
}
})
},
//
SendData(str) {
let that = this
let buf = new Uint8Array(str.match(/[\da-f]{2}/gi).map(function(h) {
return parseInt(h, 16)
}))
console.log("xiafa", str)
uni.writeBLECharacteristicValue({
deviceId: that.deviceId,
serviceId: that.serviceId,
characteristicId: that.write,
value: buf.buffer,
success: res => {
console.log('下发指令成功', res.errMsg)
},
fail: res => {
console.log("下发指令失败", res);
},
})
},
//
handleStart(ind) {
let that = this
let m = null
let send = null
if (!that.isConnected) {
that.$tools.msg("请先连接设备!")
return
}
if (ind == 1) { // 1
m = Number(165 + 8 + 9).toString(16)
send = "A5080900000000" + m.substr(m.length - 2, 2)
}
if (ind == 2) { //2
let time = Number(that.time_m) * 60 + Number(that.time_s)
m = Number(165 + 8 + 9 + time).toString(16)
send = "A508090000" + that.$tools.toHex(time, 4) + m.substr(m.length - 2, 2)
}
if (ind == 3) { //3
let weight = that.$tools.toHex(that.weight, 4)
m = Number(165 + 8 + 9 + that.weight).toString(16)
send = "A50809" + weight + "0000" + m.substr(m.length - 2, 2)
}
if (ind == 4) { //
let weight = Number(that.user.weight) * 2
let num = parseInt(weight).toString();
m = Number(165 + 5 + 8 + Number(num)).toString(16)
send = "A50508" + Number(num).toString(16) + m.substr(m.length - 2, 2)
}
that.SendData(send)
that.$Bluetooth.stopBluetoothDevicesDiscovery()
},
//
reload() {
let that = this
this.$nextTick(() => {
that.$store.dispatch("getSkipResult", {
aud_id: uni.getStorageSync('userid')
})
})
},
//
//
bindTimeChange(e) {
let that = this
let m = e.target.value[0]
let s = e.target.value[1]
that.timesTndex = e.target.value
let time_m = Number(that.timeList[0][m].substring(0, 2)) * 60
let time_s = Number(that.timeList[1][s].substring(0, 2))
if (Number(time_m + time_s) < 30) {
that.time_m = '00'
that.time_s = '30'
} else {
that.time_m = that.timeList[0][m].substring(0, 2)
that.time_s = that.timeList[1][s].substring(0, 2)
}
},
handleTimeEdit(text) {
let that = this
let time_m = Number(that.time_m) * 60
let time_s = Number(that.time_s)
let minutes = null
let seconds = null
if (Number(time_m + time_s) >= 3570 && text == '加') {
that.time_m = '59'
that.time_s = '59'
return
}
if (Number(time_m + time_s) <= 30 && text == '减') {
that.time_m = '00'
that.time_s = '30'
return
}
if (text == '减') {
minutes = Math.floor((Number(time_m + time_s - 30) % 3600) / 60)
seconds = Number(time_m + time_s - 30) % 60
}
if (text == '加') {
minutes = Math.floor((Number(time_m + time_s + 30) % 3600) / 60)
seconds = Number(time_m + time_s + 30) % 60
}
that.time_m = minutes > 9 ? minutes : '0' + minutes;
that.time_s = seconds > 9 ? seconds : '0' + seconds;
that.timesTndex = [Number(that.time_m), Number(that.time_s)]
},
handleWeightEdit(text) {
let that = this
if (text == '减') {
that.weight = Number(that.weight) - 50 > 50 ? Number(that.weight) - 50 : 50
}
if (text == '加') {
that.weight = Number(that.weight) + 50
}
},
//
handleMyTime() {
let that = this
myTime = setTimeout(function() {
if (!that.devicesList.length) {
that.islink = -1
that.textLink = "重新搜索"
that.$tools.msg("没有查找到设备")
}
clearTimeout(myTime)
that.$Bluetooth.stopBluetoothDevicesDiscovery()
}, 20000);
},
//
onBLEConnectionStateChange() {
let that = this
uni.onBLEConnectionStateChange(function(res) {
console.log("监听蓝牙连接状态", res.connected)
that.$store.commit("changeConnected", res.connected);
})
},
/**
* 断开蓝牙模块
*/
closeBluetoothAdapter() {
let that = this;
uni.closeBluetoothAdapter({
success: res => {
console.log('蓝牙模块关闭成功');
}
})
},
/**
* 断开蓝牙连接
*/
closeBLEConnection() {
var that = this;
uni.closeBLEConnection({
deviceId: that.deviceId,
success: res => {
console.log('断开蓝牙连接成功');
that.$store.commit("changeConnected", false);
}
});
},
navTo(url) {
let that = this
if (!that.isConnected) {
that.islink = -1
clearTimeout(myTime)
that.$Bluetooth.closeBluetoothAdapter()
that.$Bluetooth.closeBLEConnection(that.deviceId)
that.$Bluetooth.stopBluetoothDevicesDiscovery()
console.log("蓝牙没有连接")
}
uni.navigateTo({
url: url
})
},
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100%;
min-height: 100vh;
background-color: #F5F6FA;
}
.skiptop {
margin-top: 15px;
}
.tabbar {
width: 100%;
margin-top: 20px;
margin-bottom: 20px;
display: flex;
align-items: center;
justify-content: space-around;
view {
position: relative;
}
.active:after {
content: "";
height: 3px;
width: 100%;
position: absolute;
bottom: -8px;
left: 0;
border-radius: 5px;
background: $maincolor;
}
}
.box1 {
background-color: #fff;
padding: 10px !important;
color: #999;
margin: 15px;
border-radius: 10px;
width: calc(100%- 30px);
.time {
width: 100%;
font-size: 32rpx;
margin-bottom: 20px;
}
.item {
width: 100%;
color: #333;
font-size: 44rpx;
text-align: center;
margin-bottom: 15px;
text {
display: block;
}
.item-ite {
font-size: 36rpx;
margin-bottom: 15px;
width: 100%;
}
.item-set {
width: calc(100% - 30px);
display: flex;
align-items: center;
height: 55px;
line-height: 55px;
font-size: 60rpx;
margin-bottom: 5px;
background-color: #f7f7f7;
padding: 0 15px;
justify-content: space-between;
margin: auto;
position: relative;
/deep/input {
font-size: 60rpx;
height: 55px;
line-height: 55px;
}
}
.item-set0 {
background-color: #fff;
justify-content: center
}
.tips {
font-size: 32rpx;
color: #999;
margin-top: 10px;
}
}
.start {
color: #fff;
width: 100px;
height: 100px;
font-size: 36rpx;
font-weight: bold;
line-height: 100px;
text-align: center;
border-radius: 50%;
background: $textcolor;
margin: 15px auto;
}
.Nstart {
opacity: 0.5 !important;
}
}
.status {
background-color: #fff;
image {
width: 18px;
height: 18px;
}
.icon_link {
animation: rotation 0.6s infinite linear;
}
@keyframes rotation {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
}
</style>

View File

@ -1,252 +0,0 @@
<template>
<view class="content">
<view class="f_banner" v-if="fimages.length">
<swiper class="swiper" indicator-dots="true" autoplay="true">
<swiper-item v-for="(image, index) in fimages" :key="index" @click="$tools.NewsPtype(image)">
<image :src="image.cover_image" mode="aspectFill" />
</swiper-item>
</swiper>
</view>
<!-- 标签 -->
<view class="tabbar">
<scroll-view class="scroll-menu" scroll-x="true" style="white-space: nowrap;">
<view @click="handleactive(index)" v-for="(name,index) in labelList" :key="index"
:class="[active==index?'active':'']">
{{name.name}}
</view>
</scroll-view>
</view>
<!-- list -->
<view class="list">
<view class="newslist" v-for="(item,index) in list" :key="index" @click="handleActive(item,index)">
<view class="left">
<view class="title">
{{item.title}}
</view>
</view>
<view class="right">
<image :src="item.cover_image" mode="aspectFill"></image>
</view>
<view class="time">
<view class="size14 c999">
<icon class="iconfont icon-icon-test"></icon>
{{$t("index.browse")}}{{item.reading}}
</view>
<view class="size14 c999">
<icon class="iconfont icon-icon-test1"></icon>
{{item.create_time}}
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {
page: 1,
fimages: [],
lastPage: "",
labelList: [],
active: 0,
list: []
};
},
computed: {
...mapState([]),
},
onLoad() {
let that = this;
that.page = 1
that.handleContentLabel()
},
onReachBottom() {
let that = this
if (!this.lastPage || this.page >= this.lastPage) {
uni.showToast({
title: that.$t("tips.msgNoMoreData"),
icon: 'none'
})
return
}
this.page++
this.handleContentMsg()
},
methods: {
//
handleContentMsg() {
let that = this
that.$model.getContentMsg({
type: that.active,
sector_id: 1,
page: that.page,
}).then(res => {
console.log("资讯", res)
if (res.code != 0) return
that.list = that.list.concat(res.data.content_data)
})
},
//
handleContentLabel() {
let that = this
that.$model.getContentLabel({}).then(res => {
console.log("标签类别信息", res)
if (res.code != 0) return
that.labelList = res.data[0].list
that.fimages = res.data[0].loop_data
that.handleContentMsg()
})
},
//
handleactive(ind) {
let that = this
that.active = ind
that.page = 1
that.list = []
that.handleContentMsg()
},
detail(ite) {
this.$tools.NewsPtype(ite)
// uni.navigateTo({
// url: "/pageTwo/webview/webview?url=" + item.jump_url
// })
},
handleActive(ite, ind) {
let that = this
that.$tools.NewsPtype(ite)
setTimeout(function() {
that.list[ind].reading++
}, 2000);
}
}
}
</script>
<style lang="scss">
// banner
.f_banner {
width: 100%;
height: 400upx;
/deep/swiper {
height: 400upx;
}
image {
width: 100%;
height: 100%;
background-size: 100%;
}
}
.tabbar {
height: 50px;
display: flex;
font-weight: bold;
font-size: 16px;
justify-content: space-between;
margin: 15px 10px;
.scroll-menu {
width: 100%;
white-space: nowrap;
}
view {
display: inline-block;
height: 48px;
line-height: 48px;
padding: 0 10px;
text {
display: block;
width: 100%;
text-align: center;
margin-top: 10px;
}
}
.active {
color: #fff;
border-radius: 5px;
background-color: $btncolor;
}
}
.list {
width: 100%;
padding-bottom: 50px;
}
.newslist {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 10px 15px;
border-bottom: 1px solid #f7f7f7;
.left {
width: calc(100% - 115px);
height: 60px;
display: flex;
flex-wrap: wrap;
flex-flow: column;
justify-content: space-between;
.title {
width: 100%;
font-size: 30rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
line-height: 30px;
font-weight: bold;
}
}
.right {
width: 105px;
height: 60px;
border: 1px solid #f7f7f7;
image {
width: 100%;
height: 100%;
}
}
.time {
width: 100%;
margin-top: 5px;
display: flex;
justify-content: space-between;
icon {
width: 20px;
display: block;
margin-right: 3px;
margin-top: -5px;
float: left;
}
.icon-icon-test1 {
font-size: 16px;
}
view {
color: #666;
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
</style>

View File

@ -501,7 +501,7 @@
}
.header {
width: 100%;
height: 240rpx;
height: 165rpx;
background: $maincolor;
image {
@ -518,7 +518,7 @@
background-color: #fff;
border-radius: 10px;
padding:10px 15px;
height: 160rpx;
height: 120rpx;
.headimg {
width: 55px;
height: 55px;

View File

@ -1,164 +0,0 @@
.content {
width: 100%;
padding-top: 10px;
min-height: 100vh;
background-color: #000;
}
.box1 {
color: #fff;
margin: 15px;
width: calc(100%- 30px);
.time {
width: 100%;
font-size: 32rpx;
margin-bottom: 20px;
}
.LiuS {
width: 60%;
margin: auto;
position: relative;
text-align: center;
border-radius: 10px;
background-color: #272a2a;
height: 30px;
line-height: 30px;
}
.LiuS:after {
content: "";
position: absolute;
left: 45%;
bottom: -7px;
width: 0px;
height: 0px;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 8px solid #272a2a;
}
.item {
width: 100%;
font-size: 28rpx;
padding: 10px 0;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 15px;
position: relative;
.image {
width: 80%;
image {
margin-top: 10px;
width: 100%;
}
}
.center {
top: 0px;
bottom: -0px;
position: absolute;
width: 70px;
margin: auto;
text-align: center;
background-color: #333;
border-radius: 10px;
z-index: 9;
}
.level-bg {
position: absolute;
width: 70px;
margin: auto;
text-align: center;
background-color: #4d6c7b;
border-radius: 0 0 10px 10px;
bottom: 0px;
z-index: 19;
}
.level-item {
width: 70px;
height: 100%;
position: absolute;
z-index: 99;
:last-child {
border-bottom: none;
}
}
.ite {
margin: 0 5px;
width: calc(100% - 10px);
height: 40px;
line-height: 40px;
font-size: 32rpx;
color: #fff;
z-index: 99;
border-bottom: 1px solid #999;
}
}
.val {
width: 100%;
text-align: center;
margin: 20px 0;
color: #fff;
font-size: 32rpx;
text {
display: block;
color: #39D9C9 !important;
font-size: 64rpx;
margin-bottom: 10px;
}
}
}
.box {
padding: 0;
display: flex;
flex-wrap: wrap;
border-radius: 10px;
margin: 15px;
width: calc(100%- 30px);
justify-content: space-between;
.data {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
width: 100%;
}
.item {
width: 47.5%;
font-size: 28rpx;
background: #fff;
padding: 10px 0;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 15px;
}
.val {
width: 40px;
height: 40px;
border-radius: 50%;
image {
width: 70%;
height: 70%;
}
}
}

View File

@ -1,232 +0,0 @@
.box {
margin-top: 15px;
padding: 15px 10px 10px;
background-color: #fff;
width: calc(100% - 20px);
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
border-radius: 10px;
position: relative;
min-height: 30px;
.groupBtn {
width: 100%;
}
.history {
position: absolute;
top: 0px;
right: 10px;
height: 35px;
line-height: 35px;
float: right;
margin-top: 15px;
font-size: 28rpx;
padding: 0 10px;
background: $maincolor !important;
}
.charts {
width: 100%;
height: 260upx;
margin: 10px 0;
position: relative;
display: flex;
align-items: center;
justify-content: center;
.name {
position: absolute;
width: 100%;
text-align: center;
font-size: 56rpx;
margin: auto;
color: #4687F9;
}
}
}
.wrapper {
font-size: 28upx;
.choice {
color: $textcolor;
font-weight: 500;
padding-left: 15px;
display: inline-block;
}
.edit {
background-color: #fff;
}
.item {
width: 100%;
height: 45px;
line-height: 45px;
display: flex;
border-bottom: 1px solid #f7f7f7;
}
.btn {
width: 40%;
float: right;
margin-top: 15px;
background: $maincolor !important;
}
.edit {
top: 20%
}
.close {
background: #dfdfdf !important;
float: left;
color: #333;
}
}
.indexCarList {
width:100%;
margin: 10px 0;
padding: 10px 0;
background-color: #fff;
border-radius: 10px;
.title {
color: #000;
background-color: #f5f5f5 !important;
border-bottom: 1px solid #d9d9d9;
padding-left: 10px;
border-radius: 5px;
height: 35px;
display: flex;
align-items: center;
width: calc(100% - 10px);
.name {
font-size: 32upx;
font-weight: bold;
margin-top: 3px;
}
.right {
width: 30%;
color: $textcolor;
font-size: 32rpx;
text-align: right;
margin-top: 5px;
margin-right: 10px;
}
}
.item3 {
display: flex;
background: #fff;
padding: 0 10px;
height: 50px;
font-size: 32upx;
align-items: center;
border-bottom: 1px solid #f7f7f7;
.name {
width: 42%;
display: flex;
text{
max-width: calc(100% - 25px);
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
// line-height: 50px;
}
.weight {
width: 58%;
display: flex;
align-items: center;
position: relative;
justify-content: space-between;
text {
color: #666;
position: absolute;
right: 0;
bottom: 15px;
font-size: 24rpx;
}
.input {
width: 70%;
display: flex;
align-items: center;
position: relative;
border-radius: 5px;
border: 1px solid #dfdfdf;
justify-content: space-between;
.uni-icons {
position: absolute;
right: 10px;
bottom: 5px;
}
/deep/input,
/deep/picker {
width: 100%;
font-size: 32upx;
height: 35px;
line-height: 33px;
text-align: center;
// border: 1px solid #dfdfdf;
// background-color: #f7f7f7;
}
/deep/picker {
position: relative;
.down {
position: absolute;
right: 10px;
top: 1px;
}
}
}
}
.iconfont {
color: $btncolor;
}
}
}
.result {
width: 100%;
.weight {
view {
width: 30% !important;
text-align: center;
}
}
}
.gfbtn {
width: calc(100% - 40px);
margin-top: 20px;
margin-left: 20px;
color: #fff;
padding: 8px 0;
border-radius: 10px;
text-align: center;
background: $maincolor;
}

Binary file not shown.

View File

@ -1 +1 @@
https://app.liuyingyong.cn/build/download/f411d760-7bb3-11ef-88e8-3f2eddb71367
https://app.liuyingyong.cn/build/download/03800440-2ca7-11f0-8c97-13a90d45fc87

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

View File

@ -1 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__20604F1","name":"Reedaw","version":{"name":"1.3.4","code":134},"description":"面向儿童青少年的健康体质测量APP","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Bluetooth":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"light","background":"#37cc92"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"template":"index.html","compattible":{"ignoreVersion":true},"distribute":{"icons":{"android":{"hdpi":"icon-android-hdpi.png","xhdpi":"icon-android-xhdpi.png","xxhdpi":"icon-android-xxhdpi.png","xxxhdpi":"icon-android-xxxhdpi.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"},"prerendered":"false"}},"splashscreen":{"androidStyle":"common","android":{"hdpi":"static/logo.png","xhdpi":"static/logo.png","xxhdpi":"static/logo.png"},"useOriginalMsgbox":true},"google":{"abiFilters":["arm64-v8a","x86"],"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"packagename":"uni.UNI20604F1","aliasname":"qingce","password":"e7l98mrpB0Uj4WWFn9y0Mg==","keystore":"google-keystore.keystore","custompermissions":true},"apple":{"dSYMs":false,"idfa":false,"privacyDescription":{"NSBluetoothAlwaysUsageDescription":"需要蓝牙权限来连接设备","NSBluetoothPeripheralUsageDescription":"使用蓝牙与外设通信"},"devices":"universal"},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}},"orientation":"portrait-primary"},"uniStatistics":{"enable":false,"version":"2"},"allowsInlineMediaPlayback":true,"safearea":{"background":"#fff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"4.24","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333","fontSize":"14px","selectedColor":"#37cc92","backgroundColor":"#fff","list":[{"pagePath":"pages/home/home","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png"},{"pagePath":"pages/zixun/list","iconPath":"static/ping.png","selectedIconPath":"static/ping2.png"},{"pagePath":"pages/my/me","iconPath":"static/wo.png","selectedIconPath":"static/wo2.png"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html","adid":"124881220911"},"locale":"zh-Hans","fallbackLocale":"en"}
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__20604F1","name":"Reedaw+","version":{"name":"1.3.4","code":134},"description":"健康体质测量APP","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Bluetooth":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"light","background":"#37cc92"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"template":"index.html","compattible":{"ignoreVersion":true},"distribute":{"icons":{"android":{"hdpi":"icon-android-hdpi.png","xhdpi":"icon-android-xhdpi.png","xxhdpi":"icon-android-xxhdpi.png","xxxhdpi":"icon-android-xxxhdpi.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"},"prerendered":"false"}},"splashscreen":{"androidStyle":"common","android":{"hdpi":"static/logo.png","xhdpi":"static/logo.png","xxhdpi":"static/logo.png"},"useOriginalMsgbox":true},"google":{"abiFilters":["arm64-v8a","x86"],"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"packagename":"uni.UNI20604F1","aliasname":"qingce","password":"e7l98mrpB0Uj4WWFn9y0Mg==","keystore":"google-keystore.keystore","custompermissions":true},"apple":{"dSYMs":false,"idfa":false,"privacyDescription":{"NSBluetoothAlwaysUsageDescription":"需要蓝牙权限来连接设备","NSBluetoothPeripheralUsageDescription":"使用蓝牙与外设通信"},"devices":"universal"},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}},"orientation":"portrait-primary"},"uniStatistics":{"enable":false,"version":"2"},"allowsInlineMediaPlayback":true,"safearea":{"background":"#fff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"4.24","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333","fontSize":"14px","selectedColor":"#37cc92","backgroundColor":"#fff","list":[{"pagePath":"pages/home/home","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png"},{"pagePath":"pages/my/me","iconPath":"static/wo.png","selectedIconPath":"static/wo2.png"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html","adid":"124881220911"},"locale":"zh-Hans","fallbackLocale":"en"}

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