优化估分、新增banner、头围、商务合作

This commit is contained in:
qiaocl 2024-12-07 10:41:48 +08:00
parent 9c8cc815f8
commit 8f6ec06a09
97 changed files with 3490 additions and 2186 deletions

12
App.vue
View File

@ -21,6 +21,7 @@
uni.onNetworkStatusChange(function(res) { uni.onNetworkStatusChange(function(res) {
if (res.isConnected == true) { if (res.isConnected == true) {
that.handleCityList() that.handleCityList()
that.handleCooperationUrl()
uni.reLaunch({ uni.reLaunch({
url: '/pageTwo/login/login' url: '/pageTwo/login/login'
}) })
@ -32,6 +33,7 @@
// #endif // #endif
// #ifndef APP-PLUS // #ifndef APP-PLUS
that.handleCityList() that.handleCityList()
that.handleCooperationUrl()
// #endif // #endif
console.log('App Launch') console.log('App Launch')
}, },
@ -57,6 +59,7 @@
}) })
console.log("当前应用版本号", info) console.log("当前应用版本号", info)
that.handleCityList() that.handleCityList()
that.handleCooperationUrl()
that.handleoginversion(info) that.handleoginversion(info)
}) })
}, },
@ -158,6 +161,15 @@
that.$store.commit('changeIdentityList', res.data.identity_list) that.$store.commit('changeIdentityList', res.data.identity_list)
}) })
}, },
//
handleCooperationUrl() {
let that = this
that.$model.getCooperationUrl({}).then((res) => {
console.log("合作服务", res.data)
if (res.code != 0) return
this.$store.commit("changeCooperationUrl", res.data);
})
},
} }
} }
</script> </script>

View File

@ -67,6 +67,12 @@
<input type="digit" v-model="weight" placeholder="请输入体重">kg <input type="digit" v-model="weight" placeholder="请输入体重">kg
</view> </view>
</view> </view>
<view class="editem" v-if="userInfo.stage=='婴儿'">
<view class="left">头围</view>
<view class="right">
<input v-model="head" type="digit" placeholder="请输入" />cm
</view>
</view>
</view> </view>
<!-- 肺活量 --> <!-- 肺活量 -->
<view class="" v-if="rtype==8"> <view class="" v-if="rtype==8">
@ -122,11 +128,15 @@
listType: null, listType: null,
describe: "", describe: "",
unit: "", unit: "",
fields: "" fields: "",
head: ""
} }
}, },
computed: { computed: {
...mapState(["isRecord", "PublicRecord", "labelList"]), ...mapState(["user", "isRecord", "PublicRecord", "labelList"]),
userInfo() {
return this.user
},
info() { info() {
let that = this let that = this
let info = { let info = {
@ -297,6 +307,7 @@
time: that.regTime, time: that.regTime,
weight: that.weight, weight: that.weight,
height: that.height, height: that.height,
head_circumference: that.head ? that.head : 0
}).then(res => { }).then(res => {
if (res.code != 0) return if (res.code != 0) return
that.$tools.msg(res.msg) that.$tools.msg(res.msg)

View File

@ -77,7 +77,7 @@
that.$tools.msg(res.msg) that.$tools.msg(res.msg)
if (res.code == 0) { if (res.code == 0) {
that.$store.commit("changeFirst", false); that.$store.commit("changeFirst", false);
that.$store.commit('changeUser', { that.$store.commit('changeMeasureResult', {
target_current: res.data target_current: res.data
}) })
that.regTime = "" that.regTime = ""

View File

@ -10,12 +10,18 @@
}; };
}, },
// URL // URL
onLoad(option) { onLoad(options) {
let that = this let that = this
let url = ''
let token = uni.getStorageSync('token') let token = uni.getStorageSync('token')
let url = "https://tc.pcxbc.com/editortext/model_content?token=" + token + '&id=' + option.id if (options.id) {
url = "https://tc.pcxbc.com/model_content?token=" + token + '&id=' + options.id
}
if (options.url) {
url = options.url
}
that.webviewUrl = decodeURIComponent(url); that.webviewUrl = decodeURIComponent(url);
console.log("11111",url,this.webviewUrl) console.log("11111", url, this.webviewUrl)
} }
} }
</script> </script>

View File

@ -12,6 +12,16 @@
</view> </view>
</view> </view>
<view class="notice">
<text>头条</text>
<!-- -->
<swiper class="swiper" vertical="true" autoplay="true">
<swiper-item v-for="(item,index) in notices" :key="index" @click="detail(item.id)">
<view class='overflow'>{{item.title}}</view>
</swiper-item>
</swiper>
</view>
<!-- 工具区 --> <!-- 工具区 -->
<view class="tools_l"> <view class="tools_l">
<view v-for="(item,index) in toollist" :key="index" class="list" @click="handleTool(index,item.path)"> <view v-for="(item,index) in toollist" :key="index" class="list" @click="handleTool(index,item.path)">
@ -19,13 +29,24 @@
<view class="text">{{item.title}}</view> <view class="text">{{item.title}}</view>
</view> </view>
</view> </view>
<!-- banner -->
<view class="f_banner" v-if="banner.length">
<swiper class="swiper" indicator-dots="true" autoplay="true">
<swiper-item v-for="(image, index) in banner" :key="index" @click="detail(image.id)">
<image :src="image.pic" mode="aspectFill" />
</swiper-item>
</swiper>
</view>
<!-- 身体数据 --> <!-- 身体数据 -->
<view class="report"> <view class="report">
<view class="bold mt-10 ml-10" v-if="info&&info.top_list.length">身体报告</view> <view class="bold mt-10 ml-10" v-if="info&&info.top_list.length">身体报告</view>
<view class="box" v-if="info&&info.top_list.length"> <view class="box" v-if="info&&info.top_list.length">
<view class="time">{{info?info.record_time:''}}</view> <view class="time">{{info?info.record_time:''}}</view>
<view class="item2"> <view class="item2">
<view class="item2_data" v-for="(item,index) in info.top_list" @click="handleToggleTop(item,index)"> <view class="item2_data" :style="userInfo.stage=='婴儿'?'width:25%':'width:33%'"
v-for="(item,index) in info.top_list" @click="handleToggleTop(item,index)">
<view class="data" :class="[activeHeight==index?'activeHeight':'']"> <view class="data" :class="[activeHeight==index?'activeHeight':'']">
<view class="c666 mb-5">{{item.name}}</view> <view class="c666 mb-5">{{item.name}}</view>
<view><text>{{item.value}}</text>{{item.unit}}</view> <view><text>{{item.value}}</text>{{item.unit}}</view>
@ -104,52 +125,53 @@
</uni-collapse-item> </uni-collapse-item>
</uni-collapse> </uni-collapse>
</view> </view>
<view class="tips c999 ml-15 mb-15" v-if="info&&info.literature.length">
<text>*数据参考</text>
<text v-for="(item,index) in info.literature" :key="index">
{{item}}
</text>
</view>
</view> </view>
<view class="tips2" v-if="info&&info.bottom_list"> </view>
<uni-icons type="info-filled" color="red"></uni-icons> <!-- 数据参考 -->
此测量数据仅供参考不可代替医学专业测试 <view class="tips c999 ml-15 mb-15" v-if="info.literature.length">
</view> <text>*数据参考</text>
<!-- 成长建议 --> <text v-for="(item,index) in info.literature" :key="index">
<view v-if="info&&cplist&&(cplist.sleeplist.length||cplist.nutritionlist.length)"> {{item}}
<view class="bold mt-10">成长建议</view> </text>
<view class="jianyi_box"> </view>
<view class="jianyi"> <view class="tips2 ml-10" v-if="info.bottom_list">
<view @click="proposalnd=1" :class="{active:proposalnd==1}"> <uni-icons type="info-filled" color="red"></uni-icons>
<image src="../../static/icon4.png"></image> 此测量数据仅供参考不可代替医学专业测试
<text>营养</text> </view>
</view> <!-- 成长建议 -->
<view @click="proposalnd=2" :class="{active:proposalnd==2}"> <view v-if="cplist.sleeplist.length||cplist.nutritionlist.length" class="ml-10 mr-10">
<image src="../../static/icon1.png"></image> <view class="bold mt-10">成长建议</view>
<text>睡眠</text> <view class="jianyi_box">
</view> <view class="jianyi">
<view @click="proposalnd=3" :class="{active:proposalnd==3}"> <view @click="proposalnd=1" :class="{active:proposalnd==1}">
<image src="../../static/icon3.png"></image> <image src="../../static/icon4.png"></image>
<text>运动</text> <text>营养</text>
</view>
<view @click="proposalnd=4" :class="{active:proposalnd==4}">
<image src="../../static/icon2.png"></image>
<text>情绪</text>
</view>
</view> </view>
<view> <view @click="proposalnd=2" :class="{active:proposalnd==2}">
<view v-if="proposalnd==1&&cplist.nutritionlist.length" class="jianyi-con"> <image src="../../static/icon1.png"></image>
<text v-for="(item,index) in cplist.nutritionlist" :key="index">{{item}}</text> <text>睡眠</text>
</view> </view>
<view v-if="proposalnd==2&&cplist.sleeplist.length" class="jianyi-con"> <view @click="proposalnd=3" :class="{active:proposalnd==3}">
<text v-for="(item,index) in cplist.sleeplist" :key="index">{{item}}</text> <image src="../../static/icon3.png"></image>
</view> <text>运动</text>
<view v-if="proposalnd==3&&cplist.sportlist.length" class="jianyi-con"> </view>
<text v-for="(item,index) in cplist.sportlist" :key="index">{{item}}</text> <view @click="proposalnd=4" :class="{active:proposalnd==4}">
</view> <image src="../../static/icon2.png"></image>
<view v-if="proposalnd==4&&cplist.moodlist.length" class="jianyi-con"> <text>情绪</text>
<text v-for="(item,index) in cplist.moodlist" :key="index">{{item}}</text> </view>
</view> </view>
<view>
<view v-if="proposalnd==1&&cplist.nutritionlist.length" class="jianyi-con">
<text v-for="(item,index) in cplist.nutritionlist" :key="index">{{item}}</text>
</view>
<view v-if="proposalnd==2&&cplist.sleeplist.length" class="jianyi-con">
<text v-for="(item,index) in cplist.sleeplist" :key="index">{{item}}</text>
</view>
<view v-if="proposalnd==3&&cplist.sportlist.length" class="jianyi-con">
<text v-for="(item,index) in cplist.sportlist" :key="index">{{item}}</text>
</view>
<view v-if="proposalnd==4&&cplist.moodlist.length" class="jianyi-con">
<text v-for="(item,index) in cplist.moodlist" :key="index">{{item}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -201,12 +223,26 @@
<view class="setcard" @click="handleCard" v-if="userList.length&&user.measure_model==1"> <view class="setcard" @click="handleCard" v-if="userList.length&&user.measure_model==1">
设置数据页卡片 设置数据页卡片
</view> </view>
<!-- 弹框广告 -->
<view class="wrapper" v-if="isCoupon">
<view class="bg" @click="isCoupon=false">
<view class="edit">
<view class="text" @click.stop>
<image :src="pop[0].pic" mode="aspectFill" @click="detail(pop[0].id)" />
</view>
<uni-icons type="clear" @click="isCoupon=false" size="40"></uni-icons>
</view>
</view>
</view>
<!-- <view class="nolist" @click="handleAddUser" :style="{'marginTop':isShow?'150px':'0'}"> <!-- <view class="nolist" @click="handleAddUser" :style="{'marginTop':isShow?'150px':'0'}">
<image src="../../static/none.png"></image> <image src="../../static/none.png"></image>
<text>请先添加成员</text> <text>请先添加成员</text>
</view> --> </view> -->
<!-- 手动 --> <!-- 手动 -->
<record :rtype="rtype"></record> <record :rtype="rtype"></record>
</view> </view>
</template> </template>
@ -229,12 +265,10 @@
serviceId: "", serviceId: "",
write: "", write: "",
notify: "", notify: "",
cplist: { isCoupon: false,
moodlist: [], notices: [],
nutritionlist: [], banner: [],
sleeplist: [], pop: [],
sportlist: []
},
devicesList: [], devicesList: [],
islink: 0, //-1 islink: 0, //-1
textLink: "", textLink: "",
@ -298,13 +332,19 @@
}, },
computed: { computed: {
...mapState(["user", "familayList", 'MeasureResult', "isConnected", "isBluetoothTyle"]), ...mapState(["user", "familayList", 'MeasureResult', "isConnected", "isBluetoothTyle"]),
userInfo() {
return this.user
},
userList() { userList() {
return this.familayList return this.familayList
}, },
cplist() {
console.log("this.MeasureResult.cplist", this.MeasureResult.cplist)
return this.MeasureResult.cplist
},
info() { info() {
let that = this let that = this
that.cplist = that.MeasureResult ? that.MeasureResult.cplist : null that.infoListTop = that.MeasureResult.top_list[0] ? that.MeasureResult.top_list[0] : {}
that.infoListTop = that.MeasureResult ? that.MeasureResult.top_list[0] : {}
that.activeHeight = 0 that.activeHeight = 0
return that.MeasureResult return that.MeasureResult
}, },
@ -314,11 +354,13 @@
// #ifdef APP-PLUS // #ifdef APP-PLUS
if (options && options.type == 1) { if (options && options.type == 1) {
that.handleUserList() that.handleUserList()
that.handleBannerList()
} }
// #endif // #endif
// #ifndef APP-PLUS // #ifndef APP-PLUS
that.handleoginversion() that.handleoginversion()
// #endif // #endif
uni.onBluetoothAdapterStateChange(function(res) { uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available); that.$store.commit("changeBluetooth", res.available);
}) })
@ -357,6 +399,150 @@
} }
}, },
methods: { methods: {
//
handleoginversion() {
let that = this
that.$model.getloginversion({}).then(res => {
if (res.code == 0) {
that.handleUserList()
that.handleBannerList()
} else {
uni.setStorageSync('token', null)
uni.setStorageSync('aan_id', null)
uni.clearStorageSync()
uni.reLaunch({
url: "/pageTwo/login/login"
})
}
})
},
//
handleUserList() {
let that = this
that.$model.getUserList({
type: 2
}).then(res => {
that.isShow = true
console.log("用户列表", res, uni.getStorageSync('userid'))
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.$store.commit('changeFamilay', res.data)
if (res.data.length) {
let userid = ""
if (uni.getStorageSync('userid')) {
let found = res.data.find(e => e.id == uni.getStorageSync('userid'));
if (found !== undefined) {
userid = found.id
} else {
userid = res.data[0].id
uni.setStorageSync('userid', res.data[0].id)
}
} else {
userid = res.data[0].id
uni.setStorageSync('userid', res.data[0].id)
}
console.log("正确userid", userid)
that.$store.dispatch('getUserInfo', {
aud_id: userid
})
that.$store.dispatch("getResult", {
aud_id: userid
})
that.handleLabelList(userid)
that.handlePublicRecord(userid)
that.openBluetoothAdapter()
}
}).catch(err => {})
},
//
handleLabelList(id) {
let that = this
that.$model.getLabelList({
aud_id: id
}).then(res => {
console.log("公共卡片项目", res)
if (res.code == 0) {
that.$store.commit('changeLabelList', res.data)
}
})
},
//
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)
}
})
},
// banner
handleBannerList() {
let that = this
that.$model.getBannerList({}).then(res => {
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.notices = res.data.notice
that.banner = res.data.banner
that.pop = res.data.pop
that.isCoupon = res.data.pop.length ? true : false
})
},
detail(id) {
uni.navigateTo({
url: "/pageTwo/webview/webview?id=" + id
})
},
//
handleCard() {
uni.navigateTo({
url: "/pageTwo/cardList/card"
})
},
handleTool(ind, path) {
let that = this
if (ind == 8) {
that.handlerRecord(2)
} else {
that.navTo(path)
}
},
//
handlerReport(item) {
console.log("item", item)
let device = item.device_determine ? 1 : 0
uni.navigateTo({
url: item.page_url_report + "?acd_id=" + item.acd_id + '&device=' + device
})
},
//
handlerRecord(id) {
this.rtype = id
this.$store.commit('changeRecord', true)
},
//
handleAddUser() {
uni.navigateTo({
url: "/pageTwo/my/userInfo"
})
},
handleToggleTop(item, index) {
this.infoListTop = item
this.activeHeight = index
},
navTo(url) {
console.log("url", url)
uni.navigateTo({
url: url
})
},
// //
openBluetoothAdapter() { openBluetoothAdapter() {
let that = this let that = this
@ -369,48 +555,10 @@
that.startBluetoothDeviceDiscovery() that.startBluetoothDeviceDiscovery()
}, },
fail: err => { fail: err => {
if (err.errMsg == "openBluetoothAdapter:fail auth denied" || err.errMsg === that.islink = -1
"openBluetoothAdapter:fail auth deny" || that.textLink = that.$tools.getBluetoothAdapter(err)
err.errMsg === "openBluetoothAdapter:fail authorize no response" console.log('初始化蓝牙失败:' + err);
) { return
uni.showModal({
title: "提示",
content: "需要您授权使用手机蓝牙",
showCancel: false,
success(modalSuccess) {
uni.openSetting({
success(settingdata) {
if (settingdata.authSetting[
"scope.bluetooth"]) {
uni.openBluetoothAdapter({
success: e => {
that.islink = -1
that.textLink =
"蓝牙获取权限成功,重新连接蓝牙"
that.$store.commit(
"changeBluetooth",
true);
},
fail: err => {
that.islink = -1
that.textLink =
"请打开手机蓝牙后,开始测量"
}
});
} else {
uni.showToast({
title: "获取权限失败,将无法使用手机蓝牙进行测量",
icon: "none"
})
}
}
})
}
})
} else {
that.islink = -1
that.textLink = "请打开手机蓝牙后,开始测量"
}
} }
}); });
}, },
@ -595,130 +743,6 @@
that.islink = -1 that.islink = -1
that.textLink = "重新测量" that.textLink = "重新测量"
}, },
//
handleoginversion() {
let that = this
that.$model.getloginversion({}).then(res => {
if (res.code == 0) {
that.handleUserList()
} else {
uni.setStorageSync('token', null)
uni.setStorageSync('aan_id', null)
uni.clearStorageSync()
uni.reLaunch({
url: "/pageTwo/login/login"
})
}
})
},
//
handleUserList() {
let that = this
that.$model.getUserList({
type: 2
}).then(res => {
that.isShow = true
console.log("用户列表", res, uni.getStorageSync('userid'))
if (res.code != 0) {
that.$tools.msg(res.msg)
return
}
that.$store.commit('changeFamilay', res.data)
if (res.data.length) {
let userid = ""
if (uni.getStorageSync('userid')) {
let found = res.data.find(e => e.id == uni.getStorageSync('userid'));
if (found !== undefined) {
userid = found.id
} else {
userid = res.data[0].id
uni.setStorageSync('userid', res.data[0].id)
}
} else {
userid = res.data[0].id
uni.setStorageSync('userid', res.data[0].id)
}
console.log("正确userid", userid)
that.$store.dispatch('getUserInfo', {
aud_id: userid
})
that.$store.dispatch("getResult", {
aud_id: userid
})
that.handleLabelList(userid)
that.handlePublicRecord(userid)
that.openBluetoothAdapter()
}
}).catch(err => {})
},
//
handleLabelList(id) {
let that = this
that.$model.getLabelList({
aud_id: id
}).then(res => {
console.log("公共卡片项目", res)
if (res.code == 0) {
that.$store.commit('changeLabelList', res.data)
}
})
},
//
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)
}
})
},
//
handleCard() {
uni.navigateTo({
url: "/pageTwo/cardList/card"
})
},
handleTool(ind, path) {
let that = this
if (ind == 8) {
that.handlerRecord(2)
} else {
that.navTo(path)
}
},
//
handlerReport(item) {
console.log("item", item)
let device = item.device_determine ? 1 : 0
uni.navigateTo({
url: item.page_url_report + "?acd_id=" + item.acd_id + '&device=' + device
})
},
//
handlerRecord(id) {
this.rtype = id
this.$store.commit('changeRecord', true)
},
//
handleAddUser() {
uni.navigateTo({
url: "/pageTwo/my/userInfo"
})
},
handleToggleTop(item, index) {
this.infoListTop = item
this.activeHeight = index
},
navTo(url) {
console.log("url", url)
uni.navigateTo({
url: url
})
},
// //
onBLEConnectionStateChange() { onBLEConnectionStateChange() {
let that = this let that = this
@ -826,6 +850,7 @@
overflow: hidden; overflow: hidden;
} }
.boxBg { .boxBg {
width: 250rpx; width: 250rpx;
height: 215rpx; height: 215rpx;

View File

@ -40,6 +40,16 @@
</view> </view>
</view> </view>
</view> </view>
<view class="list" v-for="(ite,ind) in CooperationUrl" :key="ind">
<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>
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<view class="list" @click="navTo('/pageTwo/my/about')"> <view class="list" @click="navTo('/pageTwo/my/about')">
<view class="item border-bottom"> <view class="item border-bottom">
@ -73,7 +83,7 @@
headerIndex headerIndex
}, },
computed: { computed: {
...mapState(["accountNumber", "familayList"]), ...mapState(["accountNumber", "familayList", "CooperationUrl"]),
nickname() { nickname() {
return this.accountNumber.nickname return this.accountNumber.nickname
}, },

View File

@ -10,7 +10,9 @@
<view class="name">{{score?score:'--'}}</view> <view class="name">{{score?score:'--'}}</view>
</view> </view>
<view class="btn history" @click="navTo('/pageTwo/score/history')">估分历史</view> <view class="btn history" @click="navTo('/pageTwo/score/history')">估分历史</view>
<view class="title bold" v-if="Max_score">该地区体育总成绩为:{{Max_score}}</view> <view class="title bold Max_score" v-if="Max_score">该地区体育总成绩为:{{Max_score}}</view>
<view class="Lastdata" @click="getList(1)">上次数据</view>
</view> </view>
<!-- --> <!-- -->
<view v-if="selectllist.length"> <view v-if="selectllist.length">
@ -20,14 +22,19 @@
<view class="card" v-for="(ite,ind) in item.list"> <view class="card" v-for="(ite,ind) in item.list">
<view class="title"> <view class="title">
<view class="name ">{{ite.name}}</view> <view class="name ">{{ite.name}}</view>
<view class="right" v-if="ite.is_choice!=0&&!isresult" @click="handleHistory(ite)">选择项目 <!-- <view class="right" v-if="ite.is_choice!=0&&!isresult" @click="handleHistory(ite)">选择项目
</view> </view> -->
</view> </view>
<!-- 列表 --> <!-- 列表 -->
<view class="item3" v-for="(it,ik) in ite.list" :key="ik" v-if="!isresult"> <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)"> <view class="name" @click="handleTips(it.describe)">
{{it.name}} <text>{{it.name}}</text>
<uni-icons type="info" color="#f0ad4e" size="20" v-if="it.describe"></uni-icons> <uni-icons type="info" color="#f0ad4e" size="20" v-if="it.describe"></uni-icons>
</view> </view>
@ -35,20 +42,23 @@
<view class="input"> <view class="input">
<!-- 整数类型 --> <!-- 整数类型 -->
<input type="number" v-model="it.value" confirm-type="done" placeholder="请输入" <input type="number" v-model="it.value" confirm-type="done" placeholder="请输入"
v-if="it.type ==1" /> v-if="it.type ==1" :style="{'color':it.inputStyle}"
@input="changeDisabled(it)" />
<!-- 小数类型 --> <!-- 小数类型 -->
<input type="digit" v-model="it.value" confirm-type="done" placeholder="请输入" <input type="digit" v-model="it.value" confirm-type="done" placeholder="请输入"
maxlength="4" v-else-if="it.type ==2||it.type ==3" /> 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)" <picker mode="multiSelector" :range="timeList" @change="bindTimeChange($event,it)"
v-else-if="it.type ==4"> v-else-if="it.type ==4" :style="{'color':it.inputStyle}"
@input="changeDisabled(it)">
<view>{{it.value?it.value:'请选择'}}</view> <view>{{it.value?it.value:'请选择'}}</view>
<uni-icons type="down" color="#999" size="20" class="down"></uni-icons> <uni-icons type="down" color="#999" size="20" class="down"></uni-icons>
</picker> </picker>
<uni-icons type="clear" color="#999" v-if="it.value &&it.type !='4'" <uni-icons type="clear" color="#999" v-if="it.value &&it.type !='4'"
@click="it.value=''" size="20"></uni-icons> @click="handleValue(it)" size="24"></uni-icons>
</view> </view>
<text>{{it.unit}}</text> <text :style="{'color':it.inputStyle}" @input="changeDisabled(it)">{{it.unit}}</text>
</view> </view>
</view> </view>
<!-- 结果展示 --> <!-- 结果展示 -->
@ -175,7 +185,7 @@
that.timeList = that.$tools.gethms() that.timeList = that.$tools.gethms()
if (that.familayList.length) { if (that.familayList.length) {
that.address = that.user.address that.address = that.user.address
that.getList() that.getList(0)
} }
console.log("onLoad") console.log("onLoad")
}, },
@ -192,7 +202,7 @@
that.timeList = that.$tools.gethms() that.timeList = that.$tools.gethms()
if (that.familayList.length) { if (that.familayList.length) {
that.address = that.user.address that.address = that.user.address
that.getList() that.getList(0)
} }
setTimeout(() => { setTimeout(() => {
that.isRefresh = false that.isRefresh = false
@ -237,29 +247,42 @@
that.sportsList = [] that.sportsList = []
that.isActiveList = [] that.isActiveList = []
that.isActiveNameList = [] that.isActiveNameList = []
that.getList() that.getList(0)
}, },
// //
getList() { getList(ind) {
let that = this let that = this
that.isresult = false that.isresult = false
that.isSports = false that.isSports = false
that.$model.getSportsListAll({ that.$model.getSportsListAll({
gender: uni.getStorageSync('gender'), gender: uni.getStorageSync('gender'),
parameter_data: that.address, parameter_data: that.address,
aud_id: uni.getStorageSync('userid'),
choice_last_time: ind
}).then((res) => { }).then((res) => {
console.log("全部项目", res) console.log("全部项目", res)
if (res.code != 0) { if (res.code != 0) {
that.msg = res.msg that.msg = res.msg
return 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.score = 0
that.Max_score = 0 that.Max_score = 0
that.selectllist = res.data that.selectllist = res.data
that.chartData.series[0].data = 0.8 that.chartData.series[0].data = 0.8
that.tips = "" that.tips = ""
that.isTips = false that.isTips = false
that.handleSportsList() // that.handleSportsList()
}) })
}, },
// //
@ -270,8 +293,66 @@
that.sportsList = [] that.sportsList = []
that.isActiveList = [] that.isActiveList = []
that.isActiveNameList = [] that.isActiveNameList = []
that.getList() 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() { handleSportsList() {
let that = this let that = this
@ -285,6 +366,9 @@
that.sportsList = res.data.list that.sportsList = res.data.list
}) })
}, },
handleValue(item) {
item.value = ""
},
// //
handlescore() { handlescore() {
let that = this let that = this
@ -319,7 +403,7 @@
that.chartData.series[0].data = Number(res.data.total_score) / res.data.max_score that.chartData.series[0].data = Number(res.data.total_score) / res.data.max_score
}) })
}, },
// //
handleHistory(item) { handleHistory(item) {
let that = this let that = this
that.List = [] that.List = []
@ -333,13 +417,6 @@
console.log("添加项目", item) console.log("添加项目", item)
that.isDrawe = true that.isDrawe = true
}, },
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)
},
// //
toggle(item) { toggle(item) {
let that = this let that = this
@ -390,20 +467,6 @@
} }
that.isDrawe = false that.isDrawe = false
}, },
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
},
// //
onTap() { onTap() {
let that = this let that = this
@ -441,6 +504,25 @@
background-color: #f7f7f7; 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 { .uni-stat-tooltip {
width: 80%; width: 80%;
height: auto; height: auto;

View File

@ -20,6 +20,54 @@
background: $maincolor; background: $maincolor;
} }
} }
// 头条
.notice {
width: 100%;
display: flex;
align-items: center;
background-color: #fff;
margin-top: 15px;
margin-bottom: 15px;
border-radius: 10px;
text {
width: 60px;
font-size: 18px;
color: red;
font-weight: bold;
text-align: center;
border-right: 1px solid #dfdfdf;
}
/deep/swiper {
width: calc(100% - 15px);
height: 40px;
line-height: 40px;
margin-left: 15px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
// banner
.f_banner {
width: calc(100% - 20px);
height: 330rpx;
margin: 20rpx;
/deep/swiper {
height: 330rpx;
}
image {
width: 100%;
height: 100%;
border-radius: 10px;
background-size: 100%;
}
}
// 曲线 // 曲线
.charts { .charts {
@ -432,7 +480,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 20%; width: 20%;
margin: 5px 2.5% 0; margin: 0px 2.5% 0;
image { image {
width: 25px; width: 25px;
@ -485,3 +533,52 @@
border-bottom-width: 0 border-bottom-width: 0
} }
} }
.wrapper {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 999;
.bg {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.4);
z-index: 99;
}
.edit {
width: 90%;
height: auto;
background: #fff;
border-radius: 10px;
position: relative;
top: 23%;
padding: 5px;
margin: auto;
z-index: 99999;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: space-between;
image {
width: 100%;
height: 450rpx;
margin-top: 10px;
}
}
uni-icons {
position: absolute;
right: 3px;
top: 0px;
background-color: #fff;
border-radius: 50%;
}
}

View File

@ -1,8 +1,8 @@
.box { .box {
margin: 15px 10px 0; margin-top: 15px;
padding: 15px 10px 10px; padding: 15px 10px 10px;
background-color: #fff; background-color: #fff;
width: calc(100% - 40px); width: calc(100% - 20px);
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: center; justify-content: center;
@ -91,9 +91,9 @@
.indexCarList { .indexCarList {
width: calc(100% - 40px); width:100%;
margin: 10px; margin: 10px 0;
padding: 10px; padding: 10px 0;
background-color: #fff; background-color: #fff;
border-radius: 10px; border-radius: 10px;
@ -131,11 +131,20 @@
padding: 0 10px; padding: 0 10px;
height: 50px; height: 50px;
font-size: 32upx; font-size: 32upx;
align-items: center; align-items: center;
border-bottom: 1px solid #f7f7f7; border-bottom: 1px solid #f7f7f7;
.name { .name {
width: 42%; 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; // line-height: 50px;
} }
@ -159,6 +168,8 @@
display: flex; display: flex;
align-items: center; align-items: center;
position: relative; position: relative;
border-radius: 5px;
border: 1px solid #dfdfdf;
justify-content: space-between; justify-content: space-between;
.uni-icons { .uni-icons {
@ -174,9 +185,8 @@
height: 35px; height: 35px;
line-height: 33px; line-height: 33px;
text-align: center; text-align: center;
border: 1px solid #dfdfdf; // border: 1px solid #dfdfdf;
border-radius: 5px; // background-color: #f7f7f7;
background-color: #f7f7f7;
} }
/deep/picker { /deep/picker {

View File

@ -30,7 +30,30 @@ export default new Vuex.Store({
nickname: "", nickname: "",
}, },
MeasureSkip: null, MeasureSkip: null,
MeasureResult: null, MeasureResult: {
body_type_name: "",
body_type_unit: "",
body_type_value: "",
bottom_list: [],
cplist: {
moodlist: [],
nutritionlist: [],
sleeplist: [],
sportlist: []
},
literature: [],
record_time: "",
score_name: "",
score_unit: "",
score_value: "",
target_current: {
target_weight: 0,
initial_weight: "",
cumulative_weight: "",
cumulative_day: ""
},
top_list: []
},
MeasureLung: null, MeasureLung: null,
PublicContent: null, PublicContent: null,
familayList: [], familayList: [],
@ -51,6 +74,7 @@ export default new Vuex.Store({
isConnected: false, isConnected: false,
isPublicRecord: false, isPublicRecord: false,
isBluetoothTyle: false, isBluetoothTyle: false,
CooperationUrl: [],
LungLevel: [], //肺活量标准 LungLevel: [], //肺活量标准
devicesList: [], //筛选设备列表 devicesList: [], //筛选设备列表
labelList: [], labelList: [],
@ -87,7 +111,8 @@ export default new Vuex.Store({
}, },
// 获取称重数据 // 获取称重数据
changeMeasureResult(state, newData) { changeMeasureResult(state, newData) {
state.MeasureResult = newData // state.MeasureResult = newData
Object.assign(state.MeasureResult, newData)
}, },
// 跳绳数据 // 跳绳数据
changeMeasureSkip(state, newData) { changeMeasureSkip(state, newData) {
@ -194,6 +219,10 @@ export default new Vuex.Store({
changePublicAdd(state, newData) { changePublicAdd(state, newData) {
state.isPublicRecord = newData state.isPublicRecord = newData
}, },
// 合作服务
changeCooperationUrl(state, newData) {
state.CooperationUrl = newData
},
}, },
// 模块化vuex // 模块化vuex

View File

@ -1,7 +1,7 @@
import tools from '@/toolJs/tools.js' import tools from '@/toolJs/tools.js'
import store from '../store' import store from '../store'
let baseUrl = "https://tc.pcxbc.com" // let baseUrl = "https://tc.pcxbc.com"
// let baseUrl = "https://tc.pcxbc.com/testedition" let baseUrl = "https://tc.pcxbc.com/testedition"
const httpRequest = (url, method = "get", data) => { const httpRequest = (url, method = "get", data) => {
let httpDefaultOpts = { let httpDefaultOpts = {
url: baseUrl + url, url: baseUrl + url,

View File

@ -356,4 +356,14 @@ export default {
return res return res
}) })
}, },
getBannerList(param) { //banner
return http.post("/get_recommend_information", param).then(res => {
return res
})
},
getCooperationUrl(param) { //合作服务
return http.post("/get_business_cooperation_url", param).then(res => {
return res
})
},
} }

View File

@ -15,7 +15,8 @@ export default {
showModal, showModal,
compareVersions, compareVersions,
validatePhoneEmail, validatePhoneEmail,
checkPrivacyAgreement checkPrivacyAgreement,
getBluetoothAdapter
} }
function showModal(text) { function showModal(text) {
@ -226,3 +227,44 @@ function checkPrivacyAgreement() {
const isAgreed = uni.getStorageSync('isPrivacyAgreed'); const isAgreed = uni.getStorageSync('isPrivacyAgreed');
return !!isAgreed; return !!isAgreed;
} }
function getBluetoothAdapter(err) {
let textLink = ""
if (err.errMsg == "openBluetoothAdapter:fail auth denied" || err.errMsg ===
"openBluetoothAdapter:fail auth deny" ||
err.errMsg === "openBluetoothAdapter:fail authorize no response"
) {
uni.showModal({
title: "提示",
content: "需要您授权使用手机蓝牙",
showCancel: false,
success(modalSuccess) {
uni.openSetting({
success(settingdata) {
if (settingdata.authSetting["scope.bluetooth"]) {
uni.openBluetoothAdapter({
success: e => {
$store.commit("changeBluetooth", true);
textLink = "蓝牙权限获取成功,重新连接蓝牙"
return textLink
},
fail: err => {
textLink = "请打开手机蓝牙后,开始测量"
console.log('初始化蓝牙失败:' + err.errMsg);
return textLink
}
});
} else {
textLink = "获取权限失败,将无法使用手机蓝牙进行测量"
return textLink
}
}
})
}
})
} else {
textLink = "请打开手机蓝牙后,开始测量"
return textLink
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -139,6 +139,7 @@ var _default = {
// 返回的是apk包信息 // 返回的是apk包信息
that.handleCityList(); that.handleCityList();
that.handleCooperationUrl();
console.log('App Launch'); console.log('App Launch');
}, },
onShow: function onShow() { onShow: function onShow() {
@ -158,6 +159,7 @@ var _default = {
}); });
console.log("当前应用版本号", info); console.log("当前应用版本号", info);
that.handleCityList(); that.handleCityList();
that.handleCooperationUrl();
that.handleoginversion(info); that.handleoginversion(info);
}); });
}, },
@ -194,6 +196,16 @@ var _default = {
that.$store.commit('changeGradeList', res.data.grade_list); that.$store.commit('changeGradeList', res.data.grade_list);
that.$store.commit('changeIdentityList', res.data.identity_list); that.$store.commit('changeIdentityList', res.data.identity_list);
}); });
},
// 合作服务
handleCooperationUrl: function handleCooperationUrl() {
var _this = this;
var that = this;
that.$model.getCooperationUrl({}).then(function (res) {
console.log("合作服务", res.data);
if (res.code != 0) return;
_this.$store.commit("changeCooperationUrl", res.data);
});
} }
} }
}; };

View File

@ -1747,7 +1747,7 @@ function initData(vueOptions, context) {
try { try {
data = data.call(context); // 支持 Vue.prototype 上挂的数据 data = data.call(context); // 支持 Vue.prototype 上挂的数据
} catch (e) { } catch (e) {
if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) { if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data); console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
} }
} }
@ -8790,7 +8790,7 @@ function type(obj) {
function flushCallbacks$1(vm) { function flushCallbacks$1(vm) {
if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) { if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) { if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
var mpInstance = vm.$scope; var mpInstance = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid + console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']'); ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
@ -8811,14 +8811,14 @@ function nextTick$1(vm, cb) {
//1.nextTick 之前 已 setData 且 setData 还未回调完成 //1.nextTick 之前 已 setData 且 setData 还未回调完成
//2.nextTick 之前存在 render watcher //2.nextTick 之前存在 render watcher
if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) { if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){ if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
var mpInstance = vm.$scope; var mpInstance = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid + console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
']:nextVueTick'); ']:nextVueTick');
} }
return nextTick(cb, vm) return nextTick(cb, vm)
}else{ }else{
if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){ if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
var mpInstance$1 = vm.$scope; var mpInstance$1 = vm.$scope;
console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid + console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
']:nextMPTick'); ']:nextMPTick');
@ -8914,7 +8914,7 @@ var patch = function(oldVnode, vnode) {
}); });
var diffData = this.$shouldDiffData === false ? data : diff(data, mpData); var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
if (Object.keys(diffData).length) { if (Object.keys(diffData).length) {
if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) { if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Reedaw","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid + console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
']差量更新', ']差量更新',
JSON.stringify(diffData)); JSON.stringify(diffData));
@ -9554,7 +9554,30 @@ var _default = new _vuex.default.Store({
nickname: "" nickname: ""
}, },
MeasureSkip: null, MeasureSkip: null,
MeasureResult: null, MeasureResult: {
body_type_name: "",
body_type_unit: "",
body_type_value: "",
bottom_list: [],
cplist: {
moodlist: [],
nutritionlist: [],
sleeplist: [],
sportlist: []
},
literature: [],
record_time: "",
score_name: "",
score_unit: "",
score_value: "",
target_current: {
target_weight: 0,
initial_weight: "",
cumulative_weight: "",
cumulative_day: ""
},
top_list: []
},
MeasureLung: null, MeasureLung: null,
PublicContent: null, PublicContent: null,
familayList: [], familayList: [],
@ -9582,6 +9605,7 @@ var _default = new _vuex.default.Store({
isConnected: false, isConnected: false,
isPublicRecord: false, isPublicRecord: false,
isBluetoothTyle: false, isBluetoothTyle: false,
CooperationUrl: [],
LungLevel: [], LungLevel: [],
//肺活量标准 //肺活量标准
devicesList: [], devicesList: [],
@ -9619,7 +9643,8 @@ var _default = new _vuex.default.Store({
}, },
// 获取称重数据 // 获取称重数据
changeMeasureResult: function changeMeasureResult(state, newData) { changeMeasureResult: function changeMeasureResult(state, newData) {
state.MeasureResult = newData; // state.MeasureResult = newData
Object.assign(state.MeasureResult, newData);
}, },
// 跳绳数据 // 跳绳数据
changeMeasureSkip: function changeMeasureSkip(state, newData) { changeMeasureSkip: function changeMeasureSkip(state, newData) {
@ -9725,6 +9750,10 @@ var _default = new _vuex.default.Store({
}, },
changePublicAdd: function changePublicAdd(state, newData) { changePublicAdd: function changePublicAdd(state, newData) {
state.isPublicRecord = newData; state.isPublicRecord = newData;
},
// 合作服务
changeCooperationUrl: function changeCooperationUrl(state, newData) {
state.CooperationUrl = newData;
} }
}, },
// 模块化vuex // 模块化vuex
@ -11577,6 +11606,18 @@ var _default = {
return _https.default.get("/model_content", param).then(function (res) { return _https.default.get("/model_content", param).then(function (res) {
return res; return res;
}); });
},
getBannerList: function getBannerList(param) {
//banner
return _https.default.post("/get_recommend_information", param).then(function (res) {
return res;
});
},
getCooperationUrl: function getCooperationUrl(param) {
//合作服务
return _https.default.post("/get_business_cooperation_url", param).then(function (res) {
return res;
});
} }
}; };
exports.default = _default; exports.default = _default;
@ -11600,8 +11641,8 @@ Object.defineProperty(exports, "__esModule", {
exports.default = void 0; exports.default = void 0;
var _tools = _interopRequireDefault(__webpack_require__(/*! @/toolJs/tools.js */ 38)); var _tools = _interopRequireDefault(__webpack_require__(/*! @/toolJs/tools.js */ 38));
var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 33)); var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 33));
var baseUrl = "https://tc.pcxbc.com"; // let baseUrl = "https://tc.pcxbc.com"
// let baseUrl = "https://tc.pcxbc.com/testedition" var baseUrl = "https://tc.pcxbc.com/testedition";
var httpRequest = function httpRequest(url) { var httpRequest = function httpRequest(url) {
var method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "get"; var method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "get";
var data = arguments.length > 2 ? arguments[2] : undefined; var data = arguments.length > 2 ? arguments[2] : undefined;
@ -11695,7 +11736,8 @@ var _default = {
showModal: showModal, showModal: showModal,
compareVersions: compareVersions, compareVersions: compareVersions,
validatePhoneEmail: validatePhoneEmail, validatePhoneEmail: validatePhoneEmail,
checkPrivacyAgreement: checkPrivacyAgreement checkPrivacyAgreement: checkPrivacyAgreement,
getBluetoothAdapter: getBluetoothAdapter
}; };
exports.default = _default; exports.default = _default;
function showModal(text) { function showModal(text) {
@ -11901,6 +11943,42 @@ function checkPrivacyAgreement() {
var isAgreed = uni.getStorageSync('isPrivacyAgreed'); var isAgreed = uni.getStorageSync('isPrivacyAgreed');
return !!isAgreed; return !!isAgreed;
} }
function getBluetoothAdapter(err) {
var textLink = "";
if (err.errMsg == "openBluetoothAdapter:fail auth denied" || err.errMsg === "openBluetoothAdapter:fail auth deny" || err.errMsg === "openBluetoothAdapter:fail authorize no response") {
uni.showModal({
title: "提示",
content: "需要您授权使用手机蓝牙",
showCancel: false,
success: function success(modalSuccess) {
uni.openSetting({
success: function success(settingdata) {
if (settingdata.authSetting["scope.bluetooth"]) {
uni.openBluetoothAdapter({
success: function success(e) {
_store.default.commit("changeBluetooth", true);
textLink = "蓝牙权限获取成功,重新连接蓝牙";
return textLink;
},
fail: function fail(err) {
textLink = "请打开手机蓝牙后,开始测量";
console.log('初始化蓝牙失败:' + err.errMsg);
return textLink;
}
});
} else {
textLink = "获取权限失败,将无法使用手机蓝牙进行测量";
return textLink;
}
}
});
}
});
} else {
textLink = "请打开手机蓝牙后,开始测量";
return textLink;
}
}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"])) /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
/***/ }), /***/ }),

View File

@ -187,10 +187,14 @@ var _default = {
listType: null, listType: null,
describe: "", describe: "",
unit: "", unit: "",
fields: "" fields: "",
head: ""
}; };
}, },
computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(["isRecord", "PublicRecord", "labelList"])), {}, { computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(["user", "isRecord", "PublicRecord", "labelList"])), {}, {
userInfo: function userInfo() {
return this.user;
},
info: function info() { info: function info() {
var that = this; var that = this;
var info = { var info = {
@ -355,7 +359,8 @@ var _default = {
aud_id: uni.getStorageSync('userid'), aud_id: uni.getStorageSync('userid'),
time: that.regTime, time: that.regTime,
weight: that.weight, weight: that.weight,
height: that.height height: that.height,
head_circumference: that.head ? that.head : 0
}).then(function (res) { }).then(function (res) {
if (res.code != 0) return; if (res.code != 0) return;
that.$tools.msg(res.msg); that.$tools.msg(res.msg);

View File

@ -1,6 +1,6 @@
{ {
"component": true,
"usingComponents": { "usingComponents": {
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons" "uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
}, }
"component": true
} }

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"component": true,
"usingComponents": { "usingComponents": {
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons" "uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
}, }
"component": true
} }

View File

@ -167,7 +167,7 @@ var _default = {
that.$tools.msg(res.msg); that.$tools.msg(res.msg);
if (res.code == 0) { if (res.code == 0) {
that.$store.commit("changeFirst", false); that.$store.commit("changeFirst", false);
that.$store.commit('changeUser', { that.$store.commit('changeMeasureResult', {
target_current: res.data target_current: res.data
}); });
that.regTime = ""; that.regTime = "";

View File

@ -150,10 +150,16 @@ var _default = {
}; };
}, },
// 页面加载时接收URL参数并解码 // 页面加载时接收URL参数并解码
onLoad: function onLoad(option) { onLoad: function onLoad(options) {
var that = this; var that = this;
var url = '';
var token = uni.getStorageSync('token'); var token = uni.getStorageSync('token');
var url = "https://tc.pcxbc.com/editortext/model_content?token=" + token + '&id=' + option.id; if (options.id) {
url = "https://tc.pcxbc.com/model_content?token=" + token + '&id=' + options.id;
}
if (options.url) {
url = options.url;
}
that.webviewUrl = decodeURIComponent(url); that.webviewUrl = decodeURIComponent(url);
console.log("11111", url, this.webviewUrl); console.log("11111", url, this.webviewUrl);
} }

View File

@ -20,6 +20,46 @@
border-radius: 5px; border-radius: 5px;
background: #37cc92; background: #37cc92;
} }
.notice.data-v-7bb9ca46 {
width: 100%;
display: flex;
align-items: center;
background-color: #fff;
margin-top: 15px;
margin-bottom: 15px;
border-radius: 10px;
}
.notice text.data-v-7bb9ca46 {
width: 60px;
font-size: 18px;
color: red;
font-weight: bold;
text-align: center;
border-right: 1px solid #dfdfdf;
}
.notice.data-v-7bb9ca46 swiper {
width: calc(100% - 15px);
height: 40px;
line-height: 40px;
margin-left: 15px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.f_banner.data-v-7bb9ca46 {
width: calc(100% - 20px);
height: 330rpx;
margin: 20rpx;
}
.f_banner.data-v-7bb9ca46 swiper {
height: 330rpx;
}
.f_banner image.data-v-7bb9ca46 {
width: 100%;
height: 100%;
border-radius: 10px;
background-size: 100%;
}
.charts .boxTime.data-v-7bb9ca46 { .charts .boxTime.data-v-7bb9ca46 {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -367,7 +407,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 20%; width: 20%;
margin: 5px 2.5% 0; margin: 0px 2.5% 0;
} }
.report .jianyi view image.data-v-7bb9ca46 { .report .jianyi view image.data-v-7bb9ca46 {
width: 25px; width: 25px;
@ -409,6 +449,50 @@
.report.data-v-7bb9ca46 .uni-collapse-item__wrap-content.uni-collapse-item--border { .report.data-v-7bb9ca46 .uni-collapse-item__wrap-content.uni-collapse-item--border {
border-bottom-width: 0; border-bottom-width: 0;
} }
.wrapper.data-v-7bb9ca46 {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 999;
}
.wrapper .bg.data-v-7bb9ca46 {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.4);
z-index: 99;
}
.wrapper .edit.data-v-7bb9ca46 {
width: 90%;
height: auto;
background: #fff;
border-radius: 10px;
position: relative;
top: 23%;
padding: 5px;
margin: auto;
z-index: 99999;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.wrapper .edit image.data-v-7bb9ca46 {
width: 100%;
height: 450rpx;
margin-top: 10px;
}
.wrapper uni-icons.data-v-7bb9ca46 {
position: absolute;
right: 3px;
top: 0px;
background-color: #fff;
border-radius: 50%;
}
.content.data-v-7bb9ca46 { .content.data-v-7bb9ca46 {
padding: 15px; padding: 15px;
font-size: 32rpx; font-size: 32rpx;

View File

@ -132,79 +132,73 @@ var render = function () {
var _h = _vm.$createElement var _h = _vm.$createElement
var _c = _vm._self._c || _h var _c = _vm._self._c || _h
var g0 = _vm.userList.length var g0 = _vm.userList.length
var g1 = _vm.info && _vm.info.top_list.length var g1 = _vm.banner.length
var g2 = _vm.info && _vm.info.top_list.length var g2 = _vm.info && _vm.info.top_list.length
var g3 = var g3 = _vm.info && _vm.info.top_list.length
g2 && _vm.infoListTop && _vm.infoListTop.list var g4 =
g3 && _vm.infoListTop && _vm.infoListTop.list
? _vm.infoListTop.list.length ? _vm.infoListTop.list.length
: null : null
var l0 = var l0 =
g2 && _vm.infoListTop && _vm.infoListTop.list g3 && _vm.infoListTop && _vm.infoListTop.list
? _vm.__map(_vm.infoListTop.list, function (ite, ind) { ? _vm.__map(_vm.infoListTop.list, function (ite, ind) {
var $orig = _vm.__get_orig(ite) var $orig = _vm.__get_orig(ite)
var g4 = _vm.infoListTop.list.length var g5 = _vm.infoListTop.list.length
return { return {
$orig: $orig, $orig: $orig,
g4: g4, g5: g5,
} }
}) })
: null : null
var g5 = _vm.info && _vm.info.bottom_list.length
var g6 = _vm.info && _vm.info.bottom_list.length var g6 = _vm.info && _vm.info.bottom_list.length
var l2 = g6 var g7 = _vm.info && _vm.info.bottom_list.length
var l2 = g7
? _vm.__map(_vm.info.bottom_list, function (item, index) { ? _vm.__map(_vm.info.bottom_list, function (item, index) {
var $orig = _vm.__get_orig(item) var $orig = _vm.__get_orig(item)
var g7 = item.list ? item.list.length : null var g8 = item.list ? item.list.length : null
var l1 = var l1 =
item.list && item.title != "基础代谢" item.list && item.title != "基础代谢"
? _vm.__map(item.list, function (ite, ind) { ? _vm.__map(item.list, function (ite, ind) {
var $orig = _vm.__get_orig(ite) var $orig = _vm.__get_orig(ite)
var g8 = item.list.length var g9 = item.list.length
return { return {
$orig: $orig, $orig: $orig,
g8: g8, g9: g9,
} }
}) })
: null : null
var g9 = var g10 =
item.list && !(item.title != "基础代谢") item.list && !(item.title != "基础代谢")
? item.list && item.list.length ? item.list && item.list.length
: null : null
return { return {
$orig: $orig, $orig: $orig,
g7: g7, g8: g8,
l1: l1, l1: l1,
g9: g9, g10: g10,
} }
}) })
: null : null
var g10 = g6 ? _vm.info && _vm.info.literature.length : null var g11 = _vm.info.literature.length
var g11 = g6 var g12 = _vm.cplist.sleeplist.length || _vm.cplist.nutritionlist.length
? _vm.info && var g13 = g12 ? _vm.proposalnd == 1 && _vm.cplist.nutritionlist.length : null
_vm.cplist && var g14 = g12 ? _vm.proposalnd == 2 && _vm.cplist.sleeplist.length : null
(_vm.cplist.sleeplist.length || _vm.cplist.nutritionlist.length) var g15 = g12 ? _vm.proposalnd == 3 && _vm.cplist.sportlist.length : null
: null var g16 = g12 ? _vm.proposalnd == 4 && _vm.cplist.moodlist.length : null
var g12 = var g17 = _vm.user ? _vm.user.card_data_list.length : null
g6 && g11 ? _vm.proposalnd == 1 && _vm.cplist.nutritionlist.length : null
var g13 =
g6 && g11 ? _vm.proposalnd == 2 && _vm.cplist.sleeplist.length : null
var g14 =
g6 && g11 ? _vm.proposalnd == 3 && _vm.cplist.sportlist.length : null
var g15 = g6 && g11 ? _vm.proposalnd == 4 && _vm.cplist.moodlist.length : null
var g16 = _vm.user ? _vm.user.card_data_list.length : null
var l3 = _vm.user var l3 = _vm.user
? _vm.__map(_vm.user.card_data_list, function (item, index) { ? _vm.__map(_vm.user.card_data_list, function (item, index) {
var $orig = _vm.__get_orig(item) var $orig = _vm.__get_orig(item)
var g17 = item.inside_data.length
var g18 = item.inside_data.length var g18 = item.inside_data.length
var g19 = item.inside_data.length
return { return {
$orig: $orig, $orig: $orig,
g17: g17,
g18: g18, g18: g18,
g19: g19,
} }
}) })
: null : null
var g19 = _vm.userList.length && _vm.user.measure_model == 1 var g20 = _vm.userList.length && _vm.user.measure_model == 1
if (!_vm._isMounted) { if (!_vm._isMounted) {
_vm.e0 = function ($event) { _vm.e0 = function ($event) {
_vm.proposalnd = 1 _vm.proposalnd = 1
@ -225,6 +219,12 @@ var render = function () {
var _temp, _temp2 var _temp, _temp2
return _vm.$Bluetooth.handleDevicesMac(item.device_determine, item.acd_id) return _vm.$Bluetooth.handleDevicesMac(item.device_determine, item.acd_id)
} }
_vm.e5 = function ($event) {
_vm.isCoupon = false
}
_vm.e6 = function ($event) {
_vm.isCoupon = false
}
} }
_vm.$mp.data = Object.assign( _vm.$mp.data = Object.assign(
{}, {},
@ -234,19 +234,20 @@ var render = function () {
g1: g1, g1: g1,
g2: g2, g2: g2,
g3: g3, g3: g3,
g4: g4,
l0: l0, l0: l0,
g5: g5,
g6: g6, g6: g6,
g7: g7,
l2: l2, l2: l2,
g10: g10,
g11: g11, g11: g11,
g12: g12, g12: g12,
g13: g13, g13: g13,
g14: g14, g14: g14,
g15: g15, g15: g15,
g16: g16, g16: g16,
g17: g17,
l3: l3, l3: l3,
g19: g19, g20: g20,
}, },
} }
) )
@ -317,12 +318,10 @@ var _default = {
serviceId: "", serviceId: "",
write: "", write: "",
notify: "", notify: "",
cplist: { isCoupon: false,
moodlist: [], notices: [],
nutritionlist: [], banner: [],
sleeplist: [], pop: [],
sportlist: []
},
devicesList: [], devicesList: [],
islink: 0, islink: 0,
//-1重新连接 //-1重新连接
@ -376,13 +375,19 @@ var _default = {
headerIndex: headerIndex headerIndex: headerIndex
}, },
computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(["user", "familayList", 'MeasureResult', "isConnected", "isBluetoothTyle"])), {}, { computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(["user", "familayList", 'MeasureResult', "isConnected", "isBluetoothTyle"])), {}, {
userInfo: function userInfo() {
return this.user;
},
userList: function userList() { userList: function userList() {
return this.familayList; return this.familayList;
}, },
cplist: function cplist() {
console.log("this.MeasureResult.cplist", this.MeasureResult.cplist);
return this.MeasureResult.cplist;
},
info: function info() { info: function info() {
var that = this; var that = this;
that.cplist = that.MeasureResult ? that.MeasureResult.cplist : null; that.infoListTop = that.MeasureResult.top_list[0] ? that.MeasureResult.top_list[0] : {};
that.infoListTop = that.MeasureResult ? that.MeasureResult.top_list[0] : {};
that.activeHeight = 0; that.activeHeight = 0;
return that.MeasureResult; return that.MeasureResult;
} }
@ -428,6 +433,151 @@ var _default = {
} }
}, },
methods: { methods: {
// 是否登录
handleoginversion: function handleoginversion() {
var that = this;
that.$model.getloginversion({}).then(function (res) {
if (res.code == 0) {
that.handleUserList();
that.handleBannerList();
} else {
uni.setStorageSync('token', null);
uni.setStorageSync('aan_id', null);
uni.clearStorageSync();
uni.reLaunch({
url: "/pageTwo/login/login"
});
}
});
},
// 成员列表
handleUserList: function handleUserList() {
var that = this;
that.$model.getUserList({
type: 2
}).then(function (res) {
that.isShow = true;
console.log("用户列表", res, uni.getStorageSync('userid'));
if (res.code != 0) {
that.$tools.msg(res.msg);
return;
}
that.$store.commit('changeFamilay', res.data);
if (res.data.length) {
var userid = "";
if (uni.getStorageSync('userid')) {
var found = res.data.find(function (e) {
return e.id == uni.getStorageSync('userid');
});
if (found !== undefined) {
userid = found.id;
} else {
userid = res.data[0].id;
uni.setStorageSync('userid', res.data[0].id);
}
} else {
userid = res.data[0].id;
uni.setStorageSync('userid', res.data[0].id);
}
console.log("正确userid", userid);
that.$store.dispatch('getUserInfo', {
aud_id: userid
});
that.$store.dispatch("getResult", {
aud_id: userid
});
that.handleLabelList(userid);
that.handlePublicRecord(userid);
that.openBluetoothAdapter();
}
}).catch(function (err) {});
},
// 公共卡片列表
handleLabelList: function handleLabelList(id) {
var that = this;
that.$model.getLabelList({
aud_id: id
}).then(function (res) {
console.log("公共卡片项目", res);
if (res.code == 0) {
that.$store.commit('changeLabelList', res.data);
}
});
},
// 公共手动记录内容
handlePublicRecord: function handlePublicRecord(id) {
var that = this;
that.$model.getPublicRecord({
aud_id: id
}).then(function (res) {
console.log("公共手动记录", res);
if (res.code == 0) {
that.$store.commit('changePublicRecord', res.data);
}
});
},
// banner
handleBannerList: function handleBannerList() {
var that = this;
that.$model.getBannerList({}).then(function (res) {
if (res.code != 0) {
that.$tools.msg(res.msg);
return;
}
that.notices = res.data.notice;
that.banner = res.data.banner;
that.pop = res.data.pop;
that.isCoupon = res.data.pop.length ? true : false;
});
},
detail: function detail(id) {
uni.navigateTo({
url: "/pageTwo/webview/webview?id=" + id
});
},
// 设置数据页卡片
handleCard: function handleCard() {
uni.navigateTo({
url: "/pageTwo/cardList/card"
});
},
handleTool: function handleTool(ind, path) {
var that = this;
if (ind == 8) {
that.handlerRecord(2);
} else {
that.navTo(path);
}
},
// 报告页
handlerReport: function handlerReport(item) {
console.log("item", item);
var device = item.device_determine ? 1 : 0;
uni.navigateTo({
url: item.page_url_report + "?acd_id=" + item.acd_id + '&device=' + device
});
},
// 手动添加
handlerRecord: function handlerRecord(id) {
this.rtype = id;
this.$store.commit('changeRecord', true);
},
// 添加成员
handleAddUser: function handleAddUser() {
uni.navigateTo({
url: "/pageTwo/my/userInfo"
});
},
handleToggleTop: function handleToggleTop(item, index) {
this.infoListTop = item;
this.activeHeight = index;
},
navTo: function navTo(url) {
console.log("url", url);
uni.navigateTo({
url: url
});
},
// 初始化蓝牙 // 初始化蓝牙
openBluetoothAdapter: function openBluetoothAdapter() { openBluetoothAdapter: function openBluetoothAdapter() {
var that = this; var that = this;
@ -440,40 +590,10 @@ var _default = {
that.startBluetoothDeviceDiscovery(); that.startBluetoothDeviceDiscovery();
}, },
fail: function fail(err) { fail: function fail(err) {
if (err.errMsg == "openBluetoothAdapter:fail auth denied" || err.errMsg === "openBluetoothAdapter:fail auth deny" || err.errMsg === "openBluetoothAdapter:fail authorize no response") { that.islink = -1;
uni.showModal({ that.textLink = that.$tools.getBluetoothAdapter(err);
title: "提示", console.log('初始化蓝牙失败:' + err);
content: "需要您授权使用手机蓝牙", return;
showCancel: false,
success: function success(modalSuccess) {
uni.openSetting({
success: function success(settingdata) {
if (settingdata.authSetting["scope.bluetooth"]) {
uni.openBluetoothAdapter({
success: function success(e) {
that.islink = -1;
that.textLink = "蓝牙获取权限成功,重新连接蓝牙";
that.$store.commit("changeBluetooth", true);
},
fail: function fail(err) {
that.islink = -1;
that.textLink = "请打开手机蓝牙后,开始测量";
}
});
} else {
uni.showToast({
title: "获取权限失败,将无法使用手机蓝牙进行测量",
icon: "none"
});
}
}
});
}
});
} else {
that.islink = -1;
that.textLink = "请打开手机蓝牙后,开始测量";
}
} }
}); });
}, },
@ -659,131 +779,6 @@ var _default = {
that.islink = -1; that.islink = -1;
that.textLink = "重新测量"; that.textLink = "重新测量";
}, },
// 是否登录
handleoginversion: function handleoginversion() {
var that = this;
that.$model.getloginversion({}).then(function (res) {
if (res.code == 0) {
that.handleUserList();
} else {
uni.setStorageSync('token', null);
uni.setStorageSync('aan_id', null);
uni.clearStorageSync();
uni.reLaunch({
url: "/pageTwo/login/login"
});
}
});
},
// 成员列表
handleUserList: function handleUserList() {
var that = this;
that.$model.getUserList({
type: 2
}).then(function (res) {
that.isShow = true;
console.log("用户列表", res, uni.getStorageSync('userid'));
if (res.code != 0) {
that.$tools.msg(res.msg);
return;
}
that.$store.commit('changeFamilay', res.data);
if (res.data.length) {
var userid = "";
if (uni.getStorageSync('userid')) {
var found = res.data.find(function (e) {
return e.id == uni.getStorageSync('userid');
});
if (found !== undefined) {
userid = found.id;
} else {
userid = res.data[0].id;
uni.setStorageSync('userid', res.data[0].id);
}
} else {
userid = res.data[0].id;
uni.setStorageSync('userid', res.data[0].id);
}
console.log("正确userid", userid);
that.$store.dispatch('getUserInfo', {
aud_id: userid
});
that.$store.dispatch("getResult", {
aud_id: userid
});
that.handleLabelList(userid);
that.handlePublicRecord(userid);
that.openBluetoothAdapter();
}
}).catch(function (err) {});
},
// 公共卡片列表
handleLabelList: function handleLabelList(id) {
var that = this;
that.$model.getLabelList({
aud_id: id
}).then(function (res) {
console.log("公共卡片项目", res);
if (res.code == 0) {
that.$store.commit('changeLabelList', res.data);
}
});
},
// 公共手动记录内容
handlePublicRecord: function handlePublicRecord(id) {
var that = this;
that.$model.getPublicRecord({
aud_id: id
}).then(function (res) {
console.log("公共手动记录", res);
if (res.code == 0) {
that.$store.commit('changePublicRecord', res.data);
}
});
},
// 设置数据页卡片
handleCard: function handleCard() {
uni.navigateTo({
url: "/pageTwo/cardList/card"
});
},
handleTool: function handleTool(ind, path) {
var that = this;
if (ind == 8) {
that.handlerRecord(2);
} else {
that.navTo(path);
}
},
// 报告页
handlerReport: function handlerReport(item) {
console.log("item", item);
var device = item.device_determine ? 1 : 0;
uni.navigateTo({
url: item.page_url_report + "?acd_id=" + item.acd_id + '&device=' + device
});
},
// 手动添加
handlerRecord: function handlerRecord(id) {
this.rtype = id;
this.$store.commit('changeRecord', true);
},
// 添加成员
handleAddUser: function handleAddUser() {
uni.navigateTo({
url: "/pageTwo/my/userInfo"
});
},
handleToggleTop: function handleToggleTop(item, index) {
this.infoListTop = item;
this.activeHeight = index;
},
navTo: function navTo(url) {
console.log("url", url);
uni.navigateTo({
url: url
});
},
// 监听蓝牙连接状态 // 监听蓝牙连接状态
onBLEConnectionStateChange: function onBLEConnectionStateChange() { onBLEConnectionStateChange: function onBLEConnectionStateChange() {
var that = this; var that = this;

File diff suppressed because one or more lines are too long

View File

@ -20,6 +20,46 @@
border-radius: 5px; border-radius: 5px;
background: #37cc92; background: #37cc92;
} }
.notice.data-v-92bb8f34 {
width: 100%;
display: flex;
align-items: center;
background-color: #fff;
margin-top: 15px;
margin-bottom: 15px;
border-radius: 10px;
}
.notice text.data-v-92bb8f34 {
width: 60px;
font-size: 18px;
color: red;
font-weight: bold;
text-align: center;
border-right: 1px solid #dfdfdf;
}
.notice.data-v-92bb8f34 swiper {
width: calc(100% - 15px);
height: 40px;
line-height: 40px;
margin-left: 15px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.f_banner.data-v-92bb8f34 {
width: calc(100% - 20px);
height: 330rpx;
margin: 20rpx;
}
.f_banner.data-v-92bb8f34 swiper {
height: 330rpx;
}
.f_banner image.data-v-92bb8f34 {
width: 100%;
height: 100%;
border-radius: 10px;
background-size: 100%;
}
.charts .boxTime.data-v-92bb8f34 { .charts .boxTime.data-v-92bb8f34 {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -367,7 +407,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 20%; width: 20%;
margin: 5px 2.5% 0; margin: 0px 2.5% 0;
} }
.report .jianyi view image.data-v-92bb8f34 { .report .jianyi view image.data-v-92bb8f34 {
width: 25px; width: 25px;
@ -409,6 +449,50 @@
.report.data-v-92bb8f34 .uni-collapse-item__wrap-content.uni-collapse-item--border { .report.data-v-92bb8f34 .uni-collapse-item__wrap-content.uni-collapse-item--border {
border-bottom-width: 0; border-bottom-width: 0;
} }
.wrapper.data-v-92bb8f34 {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 999;
}
.wrapper .bg.data-v-92bb8f34 {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.4);
z-index: 99;
}
.wrapper .edit.data-v-92bb8f34 {
width: 90%;
height: auto;
background: #fff;
border-radius: 10px;
position: relative;
top: 23%;
padding: 5px;
margin: auto;
z-index: 99999;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.wrapper .edit image.data-v-92bb8f34 {
width: 100%;
height: 450rpx;
margin-top: 10px;
}
.wrapper uni-icons.data-v-92bb8f34 {
position: absolute;
right: 3px;
top: 0px;
background-color: #fff;
border-radius: 50%;
}
.data-v-92bb8f34 .header { .data-v-92bb8f34 .header {
width: 100%; width: 100%;
} }

View File

@ -184,7 +184,7 @@ var _default = {
components: { components: {
headerIndex: headerIndex headerIndex: headerIndex
}, },
computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(["accountNumber", "familayList"])), {}, { computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(["accountNumber", "familayList", "CooperationUrl"])), {}, {
nickname: function nickname() { nickname: function nickname() {
return this.accountNumber.nickname; return this.accountNumber.nickname;
}, },

View File

@ -1 +1 @@
<view class="content data-v-0ac7a6b2"><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/setting/setting']]]]]}}" class="top data-v-0ac7a6b2" bindtap="__e"><view class="headimg data-v-0ac7a6b2"><image class="image data-v-0ac7a6b2" src="{{user.head_pic}}"></image><view class="size20 bold data-v-0ac7a6b2">{{user.nickname}}</view></view><text class="t-icon t-icon-arrow-right-bold data-v-0ac7a6b2"></text></view><view class="wxlist borderRadius data-v-0ac7a6b2"><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/my/manage']]]]]}}" class="list data-v-0ac7a6b2" bindtap="__e"><view class="item border-bottom data-v-0ac7a6b2"><view class="left data-v-0ac7a6b2"><view class="name data-v-0ac7a6b2">成员管理</view></view><view class="right data-v-0ac7a6b2"><uni-icons vue-id="4e2db094-1" type="right" class="data-v-0ac7a6b2" bind:__l="__l"></uni-icons></view></view></view><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/business/business']]]]]}}" class="list data-v-0ac7a6b2" bindtap="__e"><view class="item border-bottom data-v-0ac7a6b2"><view class="left data-v-0ac7a6b2"><view class="name data-v-0ac7a6b2">设备管理</view></view><view class="right data-v-0ac7a6b2"><uni-icons vue-id="4e2db094-2" type="right" class="data-v-0ac7a6b2" bind:__l="__l"></uni-icons></view></view></view><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/score/history']]]]]}}" class="list data-v-0ac7a6b2" bindtap="__e"><view class="item border-bottom data-v-0ac7a6b2"><view class="left data-v-0ac7a6b2"><view class="name data-v-0ac7a6b2">估分历史</view></view><view class="right data-v-0ac7a6b2"><uni-icons vue-id="4e2db094-3" type="right" class="data-v-0ac7a6b2" bind:__l="__l"></uni-icons></view></view></view></view><block wx:if="{{token}}"><view data-event-opts="{{[['tap',[['handleOutLogin',['$event']]]]]}}" class="btn mb-15 data-v-0ac7a6b2" bindtap="__e">退出登录</view></block></view> <view class="content data-v-0ac7a6b2"><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/setting/setting']]]]]}}" class="top data-v-0ac7a6b2" bindtap="__e"><view class="headimg data-v-0ac7a6b2"><image class="image data-v-0ac7a6b2" src="{{user.head_pic}}"></image><view class="size20 bold data-v-0ac7a6b2">{{user.nickname}}</view></view><text class="t-icon t-icon-arrow-right-bold data-v-0ac7a6b2"></text></view><view class="wxlist borderRadius data-v-0ac7a6b2"><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/my/manage']]]]]}}" class="list data-v-0ac7a6b2" bindtap="__e"><view class="item border-bottom data-v-0ac7a6b2"><view class="left data-v-0ac7a6b2"><view class="name data-v-0ac7a6b2">成员管理</view></view><view class="right data-v-0ac7a6b2"><uni-icons vue-id="4e2db094-1" type="right" class="data-v-0ac7a6b2" bind:__l="__l"></uni-icons></view></view></view><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/business/business']]]]]}}" class="list data-v-0ac7a6b2" bindtap="__e"><view class="item border-bottom data-v-0ac7a6b2"><view class="left data-v-0ac7a6b2"><view class="name data-v-0ac7a6b2">设备管理</view></view><view class="right data-v-0ac7a6b2"><uni-icons vue-id="4e2db094-2" type="right" class="data-v-0ac7a6b2" bind:__l="__l"></uni-icons></view></view></view><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/score/history']]]]]}}" class="list data-v-0ac7a6b2" bindtap="__e"><view class="item border-bottom data-v-0ac7a6b2"><view class="left data-v-0ac7a6b2"><view class="name data-v-0ac7a6b2">估分历史</view></view><view class="right data-v-0ac7a6b2"><uni-icons vue-id="4e2db094-3" type="right" class="data-v-0ac7a6b2" bind:__l="__l"></uni-icons></view></view></view><block wx:for="{{CooperationUrl}}" wx:for-item="ite" wx:for-index="ind" wx:key="ind"><view class="list data-v-0ac7a6b2"><view data-event-opts="{{[['tap',[['navTo',['/pageTwo/webview/webview?url='+ite.url]]]]]}}" class="item border-bottom data-v-0ac7a6b2" bindtap="__e"><view class="left data-v-0ac7a6b2"><view class="name data-v-0ac7a6b2">{{ite.title}}</view></view><view class="right data-v-0ac7a6b2"><uni-icons vue-id="{{'4e2db094-4-'+ind}}" type="right" class="data-v-0ac7a6b2" bind:__l="__l"></uni-icons></view></view></view></block></view><block wx:if="{{token}}"><view data-event-opts="{{[['tap',[['handleOutLogin',['$event']]]]]}}" class="btn mb-15 data-v-0ac7a6b2" bindtap="__e">退出登录</view></block></view>

View File

@ -134,9 +134,11 @@ var render = function () {
var $orig = _vm.__get_orig(item) var $orig = _vm.__get_orig(item)
var l0 = _vm.__map(item.list, function (ite, ind) { var l0 = _vm.__map(item.list, function (ite, ind) {
var $orig = _vm.__get_orig(ite) var $orig = _vm.__get_orig(ite)
var m0 = !_vm.isresult ? Number(ite.is_choice) : null
var g1 = _vm.isresult && ite.list.length > 1 var g1 = _vm.isresult && ite.list.length > 1
return { return {
$orig: $orig, $orig: $orig,
m0: m0,
g1: g1, g1: g1,
} }
}) })
@ -159,15 +161,6 @@ var render = function () {
} }
}) })
: null : null
if (!_vm._isMounted) {
_vm.e0 = function ($event, it) {
var _temp = arguments[arguments.length - 1].currentTarget.dataset,
_temp2 = _temp.eventParams || _temp["event-params"],
it = _temp2.it
var _temp, _temp2
it.value = ""
}
}
_vm.$mp.data = Object.assign( _vm.$mp.data = Object.assign(
{}, {},
{ {
@ -293,7 +286,7 @@ var _default = {
that.timeList = that.$tools.gethms(); that.timeList = that.$tools.gethms();
if (that.familayList.length) { if (that.familayList.length) {
that.address = that.user.address; that.address = that.user.address;
that.getList(); that.getList(0);
} }
console.log("onLoad"); console.log("onLoad");
}, },
@ -310,7 +303,7 @@ var _default = {
that.timeList = that.$tools.gethms(); that.timeList = that.$tools.gethms();
if (that.familayList.length) { if (that.familayList.length) {
that.address = that.user.address; that.address = that.user.address;
that.getList(); that.getList(0);
} }
setTimeout(function () { setTimeout(function () {
that.isRefresh = false; that.isRefresh = false;
@ -355,29 +348,41 @@ var _default = {
that.sportsList = []; that.sportsList = [];
that.isActiveList = []; that.isActiveList = [];
that.isActiveNameList = []; that.isActiveNameList = [];
that.getList(); that.getList(0);
}, },
// //
getList: function getList() { getList: function getList(ind) {
var that = this; var that = this;
that.isresult = false; that.isresult = false;
that.isSports = false; that.isSports = false;
that.$model.getSportsListAll({ that.$model.getSportsListAll({
gender: uni.getStorageSync('gender'), gender: uni.getStorageSync('gender'),
parameter_data: that.address parameter_data: that.address,
aud_id: uni.getStorageSync('userid'),
choice_last_time: ind
}).then(function (res) { }).then(function (res) {
console.log("全部项目", res); console.log("全部项目", res);
if (res.code != 0) { if (res.code != 0) {
that.msg = res.msg; that.msg = res.msg;
return; return;
} }
res.data.forEach(function (item) {
item.list.forEach(function (list) {
list.list.forEach(function (val) {
val.inputStyle = "#999";
if (list.is_choice == 2 && val.choice_state == 1) {
that.isActiveList.push(val.name);
}
});
});
});
that.score = 0; that.score = 0;
that.Max_score = 0; that.Max_score = 0;
that.selectllist = res.data; that.selectllist = res.data;
that.chartData.series[0].data = 0.8; that.chartData.series[0].data = 0.8;
that.tips = ""; that.tips = "";
that.isTips = false; that.isTips = false;
that.handleSportsList(); // that.handleSportsList()
}); });
}, },
// 重新估分 // 重新估分
@ -388,7 +393,53 @@ var _default = {
that.sportsList = []; that.sportsList = [];
that.isActiveList = []; that.isActiveList = [];
that.isActiveNameList = []; that.isActiveNameList = [];
that.getList(); that.getList(0);
},
changeDisabled: function changeDisabled(item) {
item.inputStyle = '#333';
},
// 多项选择
handleActiveState: function handleActiveState(item, ite, ind) {
var that = this;
// 单选
if (Number(item.is_choice) == 1) {
item.list.forEach(function (list) {
list.choice_state = 0;
});
ite.choice_state = ite.choice_state == 1 ? 0 : 1;
}
// 多选
var 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(function (list) {
list.choice_state = 0;
that.isActiveList.forEach(function (it) {
if (list.name == it) {
list.choice_state = 1;
}
});
});
}
},
bindTimeChange: function bindTimeChange(e, it) {
var that = this;
var minute = e.target.value[0];
var 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: function handleTips(text) {
if (text == null || text == '') return;
this.tips = text;
this.isTips = true;
}, },
// 地区单个类型项目列表 // 地区单个类型项目列表
handleSportsList: function handleSportsList() { handleSportsList: function handleSportsList() {
@ -403,6 +454,9 @@ var _default = {
that.sportsList = res.data.list; that.sportsList = res.data.list;
}); });
}, },
handleValue: function handleValue(item) {
item.value = "";
},
// 开始估分 // 开始估分
handlescore: function handlescore() { handlescore: function handlescore() {
var that = this; var that = this;
@ -437,7 +491,7 @@ var _default = {
that.chartData.series[0].data = Number(res.data.total_score) / res.data.max_score; that.chartData.series[0].data = Number(res.data.total_score) / res.data.max_score;
}); });
}, },
// 添加项目 // 项目项目
handleHistory: function handleHistory(item) { handleHistory: function handleHistory(item) {
var that = this; var that = this;
that.List = []; that.List = [];
@ -451,13 +505,6 @@ var _default = {
console.log("添加项目", item); console.log("添加项目", item);
that.isDrawe = true; that.isDrawe = true;
}, },
bindTimeChange: function bindTimeChange(e, it) {
var that = this;
var minute = e.target.value[0];
var 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)
},
// 选择项目 // 选择项目
toggle: function toggle(item) { toggle: function toggle(item) {
var that = this; var that = this;
@ -507,11 +554,6 @@ var _default = {
} }
that.isDrawe = false; that.isDrawe = false;
}, },
handleTips: function handleTips(text) {
if (text == null || text == '') return;
this.tips = text;
this.isTips = true;
},
// 取消选择 // 取消选择
onTap: function onTap() { onTap: function onTap() {
var that = this; var that = this;

File diff suppressed because one or more lines are too long

View File

@ -1,10 +1,10 @@
@charset "UTF-8"; @charset "UTF-8";
/* 主题色 */ /* 主题色 */
.box.data-v-2fa9cb28 { .box.data-v-2fa9cb28 {
margin: 15px 10px 0; margin-top: 15px;
padding: 15px 10px 10px; padding: 15px 10px 10px;
background-color: #fff; background-color: #fff;
width: calc(100% - 40px); width: calc(100% - 20px);
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: center; justify-content: center;
@ -79,9 +79,9 @@
color: #333; color: #333;
} }
.indexCarList.data-v-2fa9cb28 { .indexCarList.data-v-2fa9cb28 {
width: calc(100% - 40px); width: 100%;
margin: 10px; margin: 10px 0;
padding: 10px; padding: 10px 0;
background-color: #fff; background-color: #fff;
border-radius: 10px; border-radius: 10px;
} }
@ -120,6 +120,14 @@
} }
.indexCarList .item3 .name.data-v-2fa9cb28 { .indexCarList .item3 .name.data-v-2fa9cb28 {
width: 42%; width: 42%;
display: flex;
}
.indexCarList .item3 .name text.data-v-2fa9cb28 {
max-width: calc(100% - 25px);
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
} }
.indexCarList .item3 .weight.data-v-2fa9cb28 { .indexCarList .item3 .weight.data-v-2fa9cb28 {
width: 58%; width: 58%;
@ -140,6 +148,8 @@
display: flex; display: flex;
align-items: center; align-items: center;
position: relative; position: relative;
border-radius: 5px;
border: 1px solid #dfdfdf;
justify-content: space-between; justify-content: space-between;
} }
.indexCarList .item3 .weight .input .uni-icons.data-v-2fa9cb28 { .indexCarList .item3 .weight .input .uni-icons.data-v-2fa9cb28 {
@ -154,9 +164,6 @@
height: 35px; height: 35px;
line-height: 33px; line-height: 33px;
text-align: center; text-align: center;
border: 1px solid #dfdfdf;
border-radius: 5px;
background-color: #f7f7f7;
} }
.indexCarList .item3 .weight .input.data-v-2fa9cb28 picker { .indexCarList .item3 .weight .input.data-v-2fa9cb28 picker {
position: relative; position: relative;
@ -191,6 +198,22 @@
padding-bottom: 15px; padding-bottom: 15px;
background-color: #f7f7f7; background-color: #f7f7f7;
} }
.Max_score.data-v-2fa9cb28 {
width: 100%;
text-align: center;
}
.Lastdata.data-v-2fa9cb28 {
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.data-v-2fa9cb28 { .uni-stat-tooltip.data-v-2fa9cb28 {
width: 80%; width: 80%;
height: auto; height: auto;