优化估分、新增banner、头围、商务合作
This commit is contained in:
parent
9c8cc815f8
commit
8f6ec06a09
12
App.vue
12
App.vue
|
|
@ -21,6 +21,7 @@
|
|||
uni.onNetworkStatusChange(function(res) {
|
||||
if (res.isConnected == true) {
|
||||
that.handleCityList()
|
||||
that.handleCooperationUrl()
|
||||
uni.reLaunch({
|
||||
url: '/pageTwo/login/login'
|
||||
})
|
||||
|
|
@ -32,6 +33,7 @@
|
|||
// #endif
|
||||
// #ifndef APP-PLUS
|
||||
that.handleCityList()
|
||||
that.handleCooperationUrl()
|
||||
// #endif
|
||||
console.log('App Launch')
|
||||
},
|
||||
|
|
@ -57,6 +59,7 @@
|
|||
})
|
||||
console.log("当前应用版本号", info)
|
||||
that.handleCityList()
|
||||
that.handleCooperationUrl()
|
||||
that.handleoginversion(info)
|
||||
})
|
||||
},
|
||||
|
|
@ -158,6 +161,15 @@
|
|||
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>
|
||||
|
|
|
|||
|
|
@ -67,6 +67,12 @@
|
|||
<input type="digit" v-model="weight" placeholder="请输入体重">kg
|
||||
</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 class="" v-if="rtype==8">
|
||||
|
|
@ -122,11 +128,15 @@
|
|||
listType: null,
|
||||
describe: "",
|
||||
unit: "",
|
||||
fields: ""
|
||||
fields: "",
|
||||
head: ""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["isRecord", "PublicRecord", "labelList"]),
|
||||
...mapState(["user", "isRecord", "PublicRecord", "labelList"]),
|
||||
userInfo() {
|
||||
return this.user
|
||||
},
|
||||
info() {
|
||||
let that = this
|
||||
let info = {
|
||||
|
|
@ -297,6 +307,7 @@
|
|||
time: that.regTime,
|
||||
weight: that.weight,
|
||||
height: that.height,
|
||||
head_circumference: that.head ? that.head : 0
|
||||
}).then(res => {
|
||||
if (res.code != 0) return
|
||||
that.$tools.msg(res.msg)
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@
|
|||
that.$tools.msg(res.msg)
|
||||
if (res.code == 0) {
|
||||
that.$store.commit("changeFirst", false);
|
||||
that.$store.commit('changeUser', {
|
||||
that.$store.commit('changeMeasureResult', {
|
||||
target_current: res.data
|
||||
})
|
||||
that.regTime = ""
|
||||
|
|
|
|||
|
|
@ -10,12 +10,18 @@
|
|||
};
|
||||
},
|
||||
// 页面加载时接收URL参数并解码
|
||||
onLoad(option) {
|
||||
onLoad(options) {
|
||||
let that = this
|
||||
let url = ''
|
||||
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);
|
||||
console.log("11111",url,this.webviewUrl)
|
||||
console.log("11111", url, this.webviewUrl)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -12,6 +12,16 @@
|
|||
</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 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>
|
||||
</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="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="time">{{info?info.record_time:''}}</view>
|
||||
<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="c666 mb-5">{{item.name}}</view>
|
||||
<view><text>{{item.value}}</text>{{item.unit}}</view>
|
||||
|
|
@ -104,52 +125,53 @@
|
|||
</uni-collapse-item>
|
||||
</uni-collapse>
|
||||
</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 class="tips2" v-if="info&&info.bottom_list">
|
||||
<uni-icons type="info-filled" color="red"></uni-icons>
|
||||
此测量数据仅供参考,不可代替医学专业测试!
|
||||
</view>
|
||||
<!-- 成长建议 -->
|
||||
<view v-if="info&&cplist&&(cplist.sleeplist.length||cplist.nutritionlist.length)">
|
||||
<view class="bold mt-10">成长建议</view>
|
||||
<view class="jianyi_box">
|
||||
<view class="jianyi">
|
||||
<view @click="proposalnd=1" :class="{active:proposalnd==1}">
|
||||
<image src="../../static/icon4.png"></image>
|
||||
<text>营养</text>
|
||||
</view>
|
||||
<view @click="proposalnd=2" :class="{active:proposalnd==2}">
|
||||
<image src="../../static/icon1.png"></image>
|
||||
<text>睡眠</text>
|
||||
</view>
|
||||
<view @click="proposalnd=3" :class="{active:proposalnd==3}">
|
||||
<image src="../../static/icon3.png"></image>
|
||||
<text>运动</text>
|
||||
</view>
|
||||
<view @click="proposalnd=4" :class="{active:proposalnd==4}">
|
||||
<image src="../../static/icon2.png"></image>
|
||||
<text>情绪</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 数据参考 -->
|
||||
<view class="tips c999 ml-15 mb-15" v-if="info.literature.length">
|
||||
<text>*数据参考:</text>
|
||||
<text v-for="(item,index) in info.literature" :key="index">
|
||||
{{item}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="tips2 ml-10" v-if="info.bottom_list">
|
||||
<uni-icons type="info-filled" color="red"></uni-icons>
|
||||
此测量数据仅供参考,不可代替医学专业测试!
|
||||
</view>
|
||||
<!-- 成长建议 -->
|
||||
<view v-if="cplist.sleeplist.length||cplist.nutritionlist.length" class="ml-10 mr-10">
|
||||
<view class="bold mt-10">成长建议</view>
|
||||
<view class="jianyi_box">
|
||||
<view class="jianyi">
|
||||
<view @click="proposalnd=1" :class="{active:proposalnd==1}">
|
||||
<image src="../../static/icon4.png"></image>
|
||||
<text>营养</text>
|
||||
</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 @click="proposalnd=2" :class="{active:proposalnd==2}">
|
||||
<image src="../../static/icon1.png"></image>
|
||||
<text>睡眠</text>
|
||||
</view>
|
||||
<view @click="proposalnd=3" :class="{active:proposalnd==3}">
|
||||
<image src="../../static/icon3.png"></image>
|
||||
<text>运动</text>
|
||||
</view>
|
||||
<view @click="proposalnd=4" :class="{active:proposalnd==4}">
|
||||
<image src="../../static/icon2.png"></image>
|
||||
<text>情绪</text>
|
||||
</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>
|
||||
|
|
@ -201,12 +223,26 @@
|
|||
<view class="setcard" @click="handleCard" v-if="userList.length&&user.measure_model==1">
|
||||
设置数据页卡片
|
||||
</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'}">
|
||||
<image src="../../static/none.png"></image>
|
||||
<text>请先添加成员</text>
|
||||
</view> -->
|
||||
<!-- 手动 -->
|
||||
<record :rtype="rtype"></record>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -229,12 +265,10 @@
|
|||
serviceId: "",
|
||||
write: "",
|
||||
notify: "",
|
||||
cplist: {
|
||||
moodlist: [],
|
||||
nutritionlist: [],
|
||||
sleeplist: [],
|
||||
sportlist: []
|
||||
},
|
||||
isCoupon: false,
|
||||
notices: [],
|
||||
banner: [],
|
||||
pop: [],
|
||||
devicesList: [],
|
||||
islink: 0, //-1重新连接
|
||||
textLink: "",
|
||||
|
|
@ -298,13 +332,19 @@
|
|||
},
|
||||
computed: {
|
||||
...mapState(["user", "familayList", 'MeasureResult', "isConnected", "isBluetoothTyle"]),
|
||||
userInfo() {
|
||||
return this.user
|
||||
},
|
||||
userList() {
|
||||
return this.familayList
|
||||
},
|
||||
cplist() {
|
||||
console.log("this.MeasureResult.cplist", this.MeasureResult.cplist)
|
||||
return this.MeasureResult.cplist
|
||||
},
|
||||
info() {
|
||||
let that = this
|
||||
that.cplist = that.MeasureResult ? that.MeasureResult.cplist : null
|
||||
that.infoListTop = that.MeasureResult ? that.MeasureResult.top_list[0] : {}
|
||||
that.infoListTop = that.MeasureResult.top_list[0] ? that.MeasureResult.top_list[0] : {}
|
||||
that.activeHeight = 0
|
||||
return that.MeasureResult
|
||||
},
|
||||
|
|
@ -314,11 +354,13 @@
|
|||
// #ifdef APP-PLUS
|
||||
if (options && options.type == 1) {
|
||||
that.handleUserList()
|
||||
that.handleBannerList()
|
||||
}
|
||||
// #endif
|
||||
// #ifndef APP-PLUS
|
||||
that.handleoginversion()
|
||||
// #endif
|
||||
|
||||
uni.onBluetoothAdapterStateChange(function(res) {
|
||||
that.$store.commit("changeBluetooth", res.available);
|
||||
})
|
||||
|
|
@ -357,6 +399,150 @@
|
|||
}
|
||||
},
|
||||
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() {
|
||||
let that = this
|
||||
|
|
@ -369,48 +555,10 @@
|
|||
that.startBluetoothDeviceDiscovery()
|
||||
},
|
||||
fail: err => {
|
||||
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 => {
|
||||
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 = "请打开手机蓝牙后,开始测量"
|
||||
}
|
||||
that.islink = -1
|
||||
that.textLink = that.$tools.getBluetoothAdapter(err)
|
||||
console.log('初始化蓝牙失败:' + err);
|
||||
return
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
@ -595,130 +743,6 @@
|
|||
that.islink = -1
|
||||
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() {
|
||||
let that = this
|
||||
|
|
@ -826,6 +850,7 @@
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
.boxBg {
|
||||
width: 250rpx;
|
||||
height: 215rpx;
|
||||
|
|
|
|||
|
|
@ -40,6 +40,16 @@
|
|||
</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 -->
|
||||
<view class="list" @click="navTo('/pageTwo/my/about')">
|
||||
<view class="item border-bottom">
|
||||
|
|
@ -73,7 +83,7 @@
|
|||
headerIndex
|
||||
},
|
||||
computed: {
|
||||
...mapState(["accountNumber", "familayList"]),
|
||||
...mapState(["accountNumber", "familayList", "CooperationUrl"]),
|
||||
nickname() {
|
||||
return this.accountNumber.nickname
|
||||
},
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@
|
|||
<view class="name">{{score?score:'--'}}</view>
|
||||
</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 v-if="selectllist.length">
|
||||
|
|
@ -20,14 +22,19 @@
|
|||
<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 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)">
|
||||
{{it.name}}
|
||||
<text>{{it.name}}</text>
|
||||
<uni-icons type="info" color="#f0ad4e" size="20" v-if="it.describe"></uni-icons>
|
||||
</view>
|
||||
|
||||
|
|
@ -35,20 +42,23 @@
|
|||
<view class="input">
|
||||
<!-- 整数类型 -->
|
||||
<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="请输入"
|
||||
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)"
|
||||
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>
|
||||
<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="it.value=''" size="20"></uni-icons>
|
||||
@click="handleValue(it)" size="24"></uni-icons>
|
||||
</view>
|
||||
<text>{{it.unit}}</text>
|
||||
<text :style="{'color':it.inputStyle}" @input="changeDisabled(it)">{{it.unit}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 结果展示 -->
|
||||
|
|
@ -175,7 +185,7 @@
|
|||
that.timeList = that.$tools.gethms()
|
||||
if (that.familayList.length) {
|
||||
that.address = that.user.address
|
||||
that.getList()
|
||||
that.getList(0)
|
||||
}
|
||||
console.log("onLoad")
|
||||
},
|
||||
|
|
@ -192,7 +202,7 @@
|
|||
that.timeList = that.$tools.gethms()
|
||||
if (that.familayList.length) {
|
||||
that.address = that.user.address
|
||||
that.getList()
|
||||
that.getList(0)
|
||||
}
|
||||
setTimeout(() => {
|
||||
that.isRefresh = false
|
||||
|
|
@ -237,29 +247,42 @@
|
|||
that.sportsList = []
|
||||
that.isActiveList = []
|
||||
that.isActiveNameList = []
|
||||
that.getList()
|
||||
that.getList(0)
|
||||
},
|
||||
//
|
||||
getList() {
|
||||
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()
|
||||
// that.handleSportsList()
|
||||
})
|
||||
},
|
||||
// 重新估分
|
||||
|
|
@ -270,8 +293,66 @@
|
|||
that.sportsList = []
|
||||
that.isActiveList = []
|
||||
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() {
|
||||
let that = this
|
||||
|
|
@ -285,6 +366,9 @@
|
|||
that.sportsList = res.data.list
|
||||
})
|
||||
},
|
||||
handleValue(item) {
|
||||
item.value = ""
|
||||
},
|
||||
// 开始估分
|
||||
handlescore() {
|
||||
let that = this
|
||||
|
|
@ -319,7 +403,7 @@
|
|||
that.chartData.series[0].data = Number(res.data.total_score) / res.data.max_score
|
||||
})
|
||||
},
|
||||
// 添加项目
|
||||
// 项目项目
|
||||
handleHistory(item) {
|
||||
let that = this
|
||||
that.List = []
|
||||
|
|
@ -333,13 +417,6 @@
|
|||
console.log("添加项目", item)
|
||||
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) {
|
||||
let that = this
|
||||
|
|
@ -390,20 +467,6 @@
|
|||
}
|
||||
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() {
|
||||
let that = this
|
||||
|
|
@ -441,6 +504,25 @@
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,54 @@
|
|||
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 {
|
||||
|
|
@ -432,7 +480,7 @@
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 20%;
|
||||
margin: 5px 2.5% 0;
|
||||
margin: 0px 2.5% 0;
|
||||
|
||||
image {
|
||||
width: 25px;
|
||||
|
|
@ -485,3 +533,52 @@
|
|||
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%;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
.box {
|
||||
margin: 15px 10px 0;
|
||||
margin-top: 15px;
|
||||
padding: 15px 10px 10px;
|
||||
background-color: #fff;
|
||||
width: calc(100% - 40px);
|
||||
width: calc(100% - 20px);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
|
|
@ -91,9 +91,9 @@
|
|||
|
||||
|
||||
.indexCarList {
|
||||
width: calc(100% - 40px);
|
||||
margin: 10px;
|
||||
padding: 10px;
|
||||
width:100%;
|
||||
margin: 10px 0;
|
||||
padding: 10px 0;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
|
||||
|
|
@ -131,11 +131,20 @@
|
|||
padding: 0 10px;
|
||||
height: 50px;
|
||||
font-size: 32upx;
|
||||
align-items: center;
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
@ -159,6 +168,8 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #dfdfdf;
|
||||
justify-content: space-between;
|
||||
|
||||
.uni-icons {
|
||||
|
|
@ -174,9 +185,8 @@
|
|||
height: 35px;
|
||||
line-height: 33px;
|
||||
text-align: center;
|
||||
border: 1px solid #dfdfdf;
|
||||
border-radius: 5px;
|
||||
background-color: #f7f7f7;
|
||||
// border: 1px solid #dfdfdf;
|
||||
// background-color: #f7f7f7;
|
||||
}
|
||||
|
||||
/deep/picker {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,30 @@ export default new Vuex.Store({
|
|||
nickname: "",
|
||||
},
|
||||
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,
|
||||
PublicContent: null,
|
||||
familayList: [],
|
||||
|
|
@ -51,6 +74,7 @@ export default new Vuex.Store({
|
|||
isConnected: false,
|
||||
isPublicRecord: false,
|
||||
isBluetoothTyle: false,
|
||||
CooperationUrl: [],
|
||||
LungLevel: [], //肺活量标准
|
||||
devicesList: [], //筛选设备列表
|
||||
labelList: [],
|
||||
|
|
@ -87,7 +111,8 @@ export default new Vuex.Store({
|
|||
},
|
||||
// 获取称重数据
|
||||
changeMeasureResult(state, newData) {
|
||||
state.MeasureResult = newData
|
||||
// state.MeasureResult = newData
|
||||
Object.assign(state.MeasureResult, newData)
|
||||
},
|
||||
// 跳绳数据
|
||||
changeMeasureSkip(state, newData) {
|
||||
|
|
@ -194,6 +219,10 @@ export default new Vuex.Store({
|
|||
changePublicAdd(state, newData) {
|
||||
state.isPublicRecord = newData
|
||||
},
|
||||
// 合作服务
|
||||
changeCooperationUrl(state, newData) {
|
||||
state.CooperationUrl = newData
|
||||
},
|
||||
|
||||
},
|
||||
// 模块化vuex
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import tools from '@/toolJs/tools.js'
|
||||
import store from '../store'
|
||||
let baseUrl = "https://tc.pcxbc.com"
|
||||
// let baseUrl = "https://tc.pcxbc.com/testedition"
|
||||
// let baseUrl = "https://tc.pcxbc.com"
|
||||
let baseUrl = "https://tc.pcxbc.com/testedition"
|
||||
const httpRequest = (url, method = "get", data) => {
|
||||
let httpDefaultOpts = {
|
||||
url: baseUrl + url,
|
||||
|
|
|
|||
|
|
@ -356,4 +356,14 @@ export default {
|
|||
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
|
||||
})
|
||||
},
|
||||
}
|
||||
|
|
@ -15,7 +15,8 @@ export default {
|
|||
showModal,
|
||||
compareVersions,
|
||||
validatePhoneEmail,
|
||||
checkPrivacyAgreement
|
||||
checkPrivacyAgreement,
|
||||
getBluetoothAdapter
|
||||
}
|
||||
|
||||
function showModal(text) {
|
||||
|
|
@ -226,3 +227,44 @@ function checkPrivacyAgreement() {
|
|||
const isAgreed = uni.getStorageSync('isPrivacyAgreed');
|
||||
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
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
|
|
@ -139,6 +139,7 @@ var _default = {
|
|||
// 返回的是apk包信息
|
||||
|
||||
that.handleCityList();
|
||||
that.handleCooperationUrl();
|
||||
console.log('App Launch');
|
||||
},
|
||||
onShow: function onShow() {
|
||||
|
|
@ -158,6 +159,7 @@ var _default = {
|
|||
});
|
||||
console.log("当前应用版本号", info);
|
||||
that.handleCityList();
|
||||
that.handleCooperationUrl();
|
||||
that.handleoginversion(info);
|
||||
});
|
||||
},
|
||||
|
|
@ -194,6 +196,16 @@ var _default = {
|
|||
that.$store.commit('changeGradeList', res.data.grade_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);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1747,7 +1747,7 @@ function initData(vueOptions, context) {
|
|||
try {
|
||||
data = data.call(context); // 支持 Vue.prototype 上挂的数据
|
||||
} 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);
|
||||
}
|
||||
}
|
||||
|
|
@ -8790,7 +8790,7 @@ function type(obj) {
|
|||
|
||||
function flushCallbacks$1(vm) {
|
||||
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;
|
||||
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
|
||||
']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
|
||||
|
|
@ -8811,14 +8811,14 @@ function nextTick$1(vm, cb) {
|
|||
//1.nextTick 之前 已 setData 且 setData 还未回调完成
|
||||
//2.nextTick 之前存在 render watcher
|
||||
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;
|
||||
console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
|
||||
']:nextVueTick');
|
||||
}
|
||||
return nextTick(cb, vm)
|
||||
}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;
|
||||
console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
|
||||
']:nextMPTick');
|
||||
|
|
@ -8914,7 +8914,7 @@ var patch = function(oldVnode, vnode) {
|
|||
});
|
||||
var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
|
||||
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 +
|
||||
']差量更新',
|
||||
JSON.stringify(diffData));
|
||||
|
|
@ -9554,7 +9554,30 @@ var _default = new _vuex.default.Store({
|
|||
nickname: ""
|
||||
},
|
||||
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,
|
||||
PublicContent: null,
|
||||
familayList: [],
|
||||
|
|
@ -9582,6 +9605,7 @@ var _default = new _vuex.default.Store({
|
|||
isConnected: false,
|
||||
isPublicRecord: false,
|
||||
isBluetoothTyle: false,
|
||||
CooperationUrl: [],
|
||||
LungLevel: [],
|
||||
//肺活量标准
|
||||
devicesList: [],
|
||||
|
|
@ -9619,7 +9643,8 @@ var _default = new _vuex.default.Store({
|
|||
},
|
||||
// 获取称重数据
|
||||
changeMeasureResult: function changeMeasureResult(state, newData) {
|
||||
state.MeasureResult = newData;
|
||||
// state.MeasureResult = newData
|
||||
Object.assign(state.MeasureResult, newData);
|
||||
},
|
||||
// 跳绳数据
|
||||
changeMeasureSkip: function changeMeasureSkip(state, newData) {
|
||||
|
|
@ -9725,6 +9750,10 @@ var _default = new _vuex.default.Store({
|
|||
},
|
||||
changePublicAdd: function changePublicAdd(state, newData) {
|
||||
state.isPublicRecord = newData;
|
||||
},
|
||||
// 合作服务
|
||||
changeCooperationUrl: function changeCooperationUrl(state, newData) {
|
||||
state.CooperationUrl = newData;
|
||||
}
|
||||
},
|
||||
// 模块化vuex
|
||||
|
|
@ -11577,6 +11606,18 @@ var _default = {
|
|||
return _https.default.get("/model_content", param).then(function (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;
|
||||
|
|
@ -11600,8 +11641,8 @@ Object.defineProperty(exports, "__esModule", {
|
|||
exports.default = void 0;
|
||||
var _tools = _interopRequireDefault(__webpack_require__(/*! @/toolJs/tools.js */ 38));
|
||||
var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 33));
|
||||
var baseUrl = "https://tc.pcxbc.com";
|
||||
// let baseUrl = "https://tc.pcxbc.com/testedition"
|
||||
// let baseUrl = "https://tc.pcxbc.com"
|
||||
var baseUrl = "https://tc.pcxbc.com/testedition";
|
||||
var httpRequest = function httpRequest(url) {
|
||||
var method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "get";
|
||||
var data = arguments.length > 2 ? arguments[2] : undefined;
|
||||
|
|
@ -11695,7 +11736,8 @@ var _default = {
|
|||
showModal: showModal,
|
||||
compareVersions: compareVersions,
|
||||
validatePhoneEmail: validatePhoneEmail,
|
||||
checkPrivacyAgreement: checkPrivacyAgreement
|
||||
checkPrivacyAgreement: checkPrivacyAgreement,
|
||||
getBluetoothAdapter: getBluetoothAdapter
|
||||
};
|
||||
exports.default = _default;
|
||||
function showModal(text) {
|
||||
|
|
@ -11901,6 +11943,42 @@ function checkPrivacyAgreement() {
|
|||
var isAgreed = uni.getStorageSync('isPrivacyAgreed');
|
||||
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"]))
|
||||
|
||||
/***/ }),
|
||||
|
|
|
|||
|
|
@ -187,10 +187,14 @@ var _default = {
|
|||
listType: null,
|
||||
describe: "",
|
||||
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() {
|
||||
var that = this;
|
||||
var info = {
|
||||
|
|
@ -355,7 +359,8 @@ var _default = {
|
|||
aud_id: uni.getStorageSync('userid'),
|
||||
time: that.regTime,
|
||||
weight: that.weight,
|
||||
height: that.height
|
||||
height: that.height,
|
||||
head_circumference: that.head ? that.head : 0
|
||||
}).then(function (res) {
|
||||
if (res.code != 0) return;
|
||||
that.$tools.msg(res.msg);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
},
|
||||
"component": true
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
},
|
||||
"component": true
|
||||
}
|
||||
}
|
||||
|
|
@ -167,7 +167,7 @@ var _default = {
|
|||
that.$tools.msg(res.msg);
|
||||
if (res.code == 0) {
|
||||
that.$store.commit("changeFirst", false);
|
||||
that.$store.commit('changeUser', {
|
||||
that.$store.commit('changeMeasureResult', {
|
||||
target_current: res.data
|
||||
});
|
||||
that.regTime = "";
|
||||
|
|
|
|||
|
|
@ -150,10 +150,16 @@ var _default = {
|
|||
};
|
||||
},
|
||||
// 页面加载时接收URL参数并解码
|
||||
onLoad: function onLoad(option) {
|
||||
onLoad: function onLoad(options) {
|
||||
var that = this;
|
||||
var url = '';
|
||||
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);
|
||||
console.log("11111", url, this.webviewUrl);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,46 @@
|
|||
border-radius: 5px;
|
||||
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 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
|
@ -367,7 +407,7 @@
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 20%;
|
||||
margin: 5px 2.5% 0;
|
||||
margin: 0px 2.5% 0;
|
||||
}
|
||||
.report .jianyi view image.data-v-7bb9ca46 {
|
||||
width: 25px;
|
||||
|
|
@ -409,6 +449,50 @@
|
|||
.report.data-v-7bb9ca46 .uni-collapse-item__wrap-content.uni-collapse-item--border {
|
||||
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 {
|
||||
padding: 15px;
|
||||
font-size: 32rpx;
|
||||
|
|
|
|||
|
|
@ -132,79 +132,73 @@ var render = function () {
|
|||
var _h = _vm.$createElement
|
||||
var _c = _vm._self._c || _h
|
||||
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 g3 =
|
||||
g2 && _vm.infoListTop && _vm.infoListTop.list
|
||||
var g3 = _vm.info && _vm.info.top_list.length
|
||||
var g4 =
|
||||
g3 && _vm.infoListTop && _vm.infoListTop.list
|
||||
? _vm.infoListTop.list.length
|
||||
: null
|
||||
var l0 =
|
||||
g2 && _vm.infoListTop && _vm.infoListTop.list
|
||||
g3 && _vm.infoListTop && _vm.infoListTop.list
|
||||
? _vm.__map(_vm.infoListTop.list, function (ite, ind) {
|
||||
var $orig = _vm.__get_orig(ite)
|
||||
var g4 = _vm.infoListTop.list.length
|
||||
var g5 = _vm.infoListTop.list.length
|
||||
return {
|
||||
$orig: $orig,
|
||||
g4: g4,
|
||||
g5: g5,
|
||||
}
|
||||
})
|
||||
: null
|
||||
var g5 = _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) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g7 = item.list ? item.list.length : null
|
||||
var g8 = item.list ? item.list.length : null
|
||||
var l1 =
|
||||
item.list && item.title != "基础代谢"
|
||||
? _vm.__map(item.list, function (ite, ind) {
|
||||
var $orig = _vm.__get_orig(ite)
|
||||
var g8 = item.list.length
|
||||
var g9 = item.list.length
|
||||
return {
|
||||
$orig: $orig,
|
||||
g8: g8,
|
||||
g9: g9,
|
||||
}
|
||||
})
|
||||
: null
|
||||
var g9 =
|
||||
var g10 =
|
||||
item.list && !(item.title != "基础代谢")
|
||||
? item.list && item.list.length
|
||||
: null
|
||||
return {
|
||||
$orig: $orig,
|
||||
g7: g7,
|
||||
g8: g8,
|
||||
l1: l1,
|
||||
g9: g9,
|
||||
g10: g10,
|
||||
}
|
||||
})
|
||||
: null
|
||||
var g10 = g6 ? _vm.info && _vm.info.literature.length : null
|
||||
var g11 = g6
|
||||
? _vm.info &&
|
||||
_vm.cplist &&
|
||||
(_vm.cplist.sleeplist.length || _vm.cplist.nutritionlist.length)
|
||||
: null
|
||||
var g12 =
|
||||
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 g11 = _vm.info.literature.length
|
||||
var g12 = _vm.cplist.sleeplist.length || _vm.cplist.nutritionlist.length
|
||||
var g13 = g12 ? _vm.proposalnd == 1 && _vm.cplist.nutritionlist.length : null
|
||||
var g14 = g12 ? _vm.proposalnd == 2 && _vm.cplist.sleeplist.length : null
|
||||
var g15 = g12 ? _vm.proposalnd == 3 && _vm.cplist.sportlist.length : null
|
||||
var g16 = g12 ? _vm.proposalnd == 4 && _vm.cplist.moodlist.length : null
|
||||
var g17 = _vm.user ? _vm.user.card_data_list.length : null
|
||||
var l3 = _vm.user
|
||||
? _vm.__map(_vm.user.card_data_list, function (item, index) {
|
||||
var $orig = _vm.__get_orig(item)
|
||||
var g17 = item.inside_data.length
|
||||
var g18 = item.inside_data.length
|
||||
var g19 = item.inside_data.length
|
||||
return {
|
||||
$orig: $orig,
|
||||
g17: g17,
|
||||
g18: g18,
|
||||
g19: g19,
|
||||
}
|
||||
})
|
||||
: null
|
||||
var g19 = _vm.userList.length && _vm.user.measure_model == 1
|
||||
var g20 = _vm.userList.length && _vm.user.measure_model == 1
|
||||
if (!_vm._isMounted) {
|
||||
_vm.e0 = function ($event) {
|
||||
_vm.proposalnd = 1
|
||||
|
|
@ -225,6 +219,12 @@ var render = function () {
|
|||
var _temp, _temp2
|
||||
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(
|
||||
{},
|
||||
|
|
@ -234,19 +234,20 @@ var render = function () {
|
|||
g1: g1,
|
||||
g2: g2,
|
||||
g3: g3,
|
||||
g4: g4,
|
||||
l0: l0,
|
||||
g5: g5,
|
||||
g6: g6,
|
||||
g7: g7,
|
||||
l2: l2,
|
||||
g10: g10,
|
||||
g11: g11,
|
||||
g12: g12,
|
||||
g13: g13,
|
||||
g14: g14,
|
||||
g15: g15,
|
||||
g16: g16,
|
||||
g17: g17,
|
||||
l3: l3,
|
||||
g19: g19,
|
||||
g20: g20,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
|
@ -317,12 +318,10 @@ var _default = {
|
|||
serviceId: "",
|
||||
write: "",
|
||||
notify: "",
|
||||
cplist: {
|
||||
moodlist: [],
|
||||
nutritionlist: [],
|
||||
sleeplist: [],
|
||||
sportlist: []
|
||||
},
|
||||
isCoupon: false,
|
||||
notices: [],
|
||||
banner: [],
|
||||
pop: [],
|
||||
devicesList: [],
|
||||
islink: 0,
|
||||
//-1重新连接
|
||||
|
|
@ -376,13 +375,19 @@ var _default = {
|
|||
headerIndex: headerIndex
|
||||
},
|
||||
computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(["user", "familayList", 'MeasureResult', "isConnected", "isBluetoothTyle"])), {}, {
|
||||
userInfo: function userInfo() {
|
||||
return this.user;
|
||||
},
|
||||
userList: function userList() {
|
||||
return this.familayList;
|
||||
},
|
||||
cplist: function cplist() {
|
||||
console.log("this.MeasureResult.cplist", this.MeasureResult.cplist);
|
||||
return this.MeasureResult.cplist;
|
||||
},
|
||||
info: function info() {
|
||||
var that = this;
|
||||
that.cplist = that.MeasureResult ? that.MeasureResult.cplist : null;
|
||||
that.infoListTop = that.MeasureResult ? that.MeasureResult.top_list[0] : {};
|
||||
that.infoListTop = that.MeasureResult.top_list[0] ? that.MeasureResult.top_list[0] : {};
|
||||
that.activeHeight = 0;
|
||||
return that.MeasureResult;
|
||||
}
|
||||
|
|
@ -428,6 +433,151 @@ var _default = {
|
|||
}
|
||||
},
|
||||
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() {
|
||||
var that = this;
|
||||
|
|
@ -440,40 +590,10 @@ var _default = {
|
|||
that.startBluetoothDeviceDiscovery();
|
||||
},
|
||||
fail: function fail(err) {
|
||||
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) {
|
||||
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 = "请打开手机蓝牙后,开始测量";
|
||||
}
|
||||
that.islink = -1;
|
||||
that.textLink = that.$tools.getBluetoothAdapter(err);
|
||||
console.log('初始化蓝牙失败:' + err);
|
||||
return;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
@ -659,131 +779,6 @@ var _default = {
|
|||
that.islink = -1;
|
||||
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() {
|
||||
var that = this;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -20,6 +20,46 @@
|
|||
border-radius: 5px;
|
||||
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 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
|
@ -367,7 +407,7 @@
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 20%;
|
||||
margin: 5px 2.5% 0;
|
||||
margin: 0px 2.5% 0;
|
||||
}
|
||||
.report .jianyi view image.data-v-92bb8f34 {
|
||||
width: 25px;
|
||||
|
|
@ -409,6 +449,50 @@
|
|||
.report.data-v-92bb8f34 .uni-collapse-item__wrap-content.uni-collapse-item--border {
|
||||
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 {
|
||||
width: 100%;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ var _default = {
|
|||
components: {
|
||||
headerIndex: headerIndex
|
||||
},
|
||||
computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(["accountNumber", "familayList"])), {}, {
|
||||
computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(["accountNumber", "familayList", "CooperationUrl"])), {}, {
|
||||
nickname: function nickname() {
|
||||
return this.accountNumber.nickname;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -134,9 +134,11 @@ var render = function () {
|
|||
var $orig = _vm.__get_orig(item)
|
||||
var l0 = _vm.__map(item.list, function (ite, ind) {
|
||||
var $orig = _vm.__get_orig(ite)
|
||||
var m0 = !_vm.isresult ? Number(ite.is_choice) : null
|
||||
var g1 = _vm.isresult && ite.list.length > 1
|
||||
return {
|
||||
$orig: $orig,
|
||||
m0: m0,
|
||||
g1: g1,
|
||||
}
|
||||
})
|
||||
|
|
@ -159,15 +161,6 @@ var render = function () {
|
|||
}
|
||||
})
|
||||
: 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(
|
||||
{},
|
||||
{
|
||||
|
|
@ -293,7 +286,7 @@ var _default = {
|
|||
that.timeList = that.$tools.gethms();
|
||||
if (that.familayList.length) {
|
||||
that.address = that.user.address;
|
||||
that.getList();
|
||||
that.getList(0);
|
||||
}
|
||||
console.log("onLoad");
|
||||
},
|
||||
|
|
@ -310,7 +303,7 @@ var _default = {
|
|||
that.timeList = that.$tools.gethms();
|
||||
if (that.familayList.length) {
|
||||
that.address = that.user.address;
|
||||
that.getList();
|
||||
that.getList(0);
|
||||
}
|
||||
setTimeout(function () {
|
||||
that.isRefresh = false;
|
||||
|
|
@ -355,29 +348,41 @@ var _default = {
|
|||
that.sportsList = [];
|
||||
that.isActiveList = [];
|
||||
that.isActiveNameList = [];
|
||||
that.getList();
|
||||
that.getList(0);
|
||||
},
|
||||
//
|
||||
getList: function getList() {
|
||||
getList: function getList(ind) {
|
||||
var that = this;
|
||||
that.isresult = false;
|
||||
that.isSports = false;
|
||||
that.$model.getSportsListAll({
|
||||
gender: uni.getStorageSync('gender'),
|
||||
parameter_data: that.address
|
||||
parameter_data: that.address,
|
||||
aud_id: uni.getStorageSync('userid'),
|
||||
choice_last_time: ind
|
||||
}).then(function (res) {
|
||||
console.log("全部项目", res);
|
||||
if (res.code != 0) {
|
||||
that.msg = res.msg;
|
||||
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.Max_score = 0;
|
||||
that.selectllist = res.data;
|
||||
that.chartData.series[0].data = 0.8;
|
||||
that.tips = "";
|
||||
that.isTips = false;
|
||||
that.handleSportsList();
|
||||
// that.handleSportsList()
|
||||
});
|
||||
},
|
||||
// 重新估分
|
||||
|
|
@ -388,7 +393,53 @@ var _default = {
|
|||
that.sportsList = [];
|
||||
that.isActiveList = [];
|
||||
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() {
|
||||
|
|
@ -403,6 +454,9 @@ var _default = {
|
|||
that.sportsList = res.data.list;
|
||||
});
|
||||
},
|
||||
handleValue: function handleValue(item) {
|
||||
item.value = "";
|
||||
},
|
||||
// 开始估分
|
||||
handlescore: function handlescore() {
|
||||
var that = this;
|
||||
|
|
@ -437,7 +491,7 @@ var _default = {
|
|||
that.chartData.series[0].data = Number(res.data.total_score) / res.data.max_score;
|
||||
});
|
||||
},
|
||||
// 添加项目
|
||||
// 项目项目
|
||||
handleHistory: function handleHistory(item) {
|
||||
var that = this;
|
||||
that.List = [];
|
||||
|
|
@ -451,13 +505,6 @@ var _default = {
|
|||
console.log("添加项目", item);
|
||||
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) {
|
||||
var that = this;
|
||||
|
|
@ -507,11 +554,6 @@ var _default = {
|
|||
}
|
||||
that.isDrawe = false;
|
||||
},
|
||||
handleTips: function handleTips(text) {
|
||||
if (text == null || text == '') return;
|
||||
this.tips = text;
|
||||
this.isTips = true;
|
||||
},
|
||||
// 取消选择
|
||||
onTap: function onTap() {
|
||||
var that = this;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,10 +1,10 @@
|
|||
@charset "UTF-8";
|
||||
/* 主题色 */
|
||||
.box.data-v-2fa9cb28 {
|
||||
margin: 15px 10px 0;
|
||||
margin-top: 15px;
|
||||
padding: 15px 10px 10px;
|
||||
background-color: #fff;
|
||||
width: calc(100% - 40px);
|
||||
width: calc(100% - 20px);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
|
|
@ -79,9 +79,9 @@
|
|||
color: #333;
|
||||
}
|
||||
.indexCarList.data-v-2fa9cb28 {
|
||||
width: calc(100% - 40px);
|
||||
margin: 10px;
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
margin: 10px 0;
|
||||
padding: 10px 0;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
|
@ -120,6 +120,14 @@
|
|||
}
|
||||
.indexCarList .item3 .name.data-v-2fa9cb28 {
|
||||
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 {
|
||||
width: 58%;
|
||||
|
|
@ -140,6 +148,8 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #dfdfdf;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.indexCarList .item3 .weight .input .uni-icons.data-v-2fa9cb28 {
|
||||
|
|
@ -154,9 +164,6 @@
|
|||
height: 35px;
|
||||
line-height: 33px;
|
||||
text-align: center;
|
||||
border: 1px solid #dfdfdf;
|
||||
border-radius: 5px;
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
.indexCarList .item3 .weight .input.data-v-2fa9cb28 picker {
|
||||
position: relative;
|
||||
|
|
@ -191,6 +198,22 @@
|
|||
padding-bottom: 15px;
|
||||
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 {
|
||||
width: 80%;
|
||||
height: auto;
|
||||
|
|
|
|||
Loading…
Reference in New Issue