估分+地区
36
App.vue
|
|
@ -1,10 +1,15 @@
|
|||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
return {
|
||||
progress: 0,
|
||||
}
|
||||
},
|
||||
onLaunch: function() {
|
||||
this.checkForUpdates()
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
console.log('App Launch')
|
||||
},
|
||||
onShow: function() {
|
||||
|
|
@ -22,16 +27,25 @@
|
|||
uni.getSystemInfo({
|
||||
success(e) {
|
||||
platform = e.platform
|
||||
that.$store.commit('changePhoneInfo', {
|
||||
platform: e.platform
|
||||
})
|
||||
}
|
||||
})
|
||||
plus.runtime.getProperty(plus.runtime.appid, function(info) {
|
||||
uni.setStorageSync('VERSION', info.version)
|
||||
let res_version = info.version;
|
||||
that.$store.commit('changePhoneInfo', {
|
||||
info: info
|
||||
})
|
||||
that.$model.getloginversion({}).then(res => {
|
||||
let downloadUrl = res.data.url
|
||||
let latestVersion = res.data.version
|
||||
console.log("版本信息", info)
|
||||
console.log("res", res)
|
||||
that.$store.commit('changePhoneInfo', {
|
||||
versionUrl: res.data
|
||||
})
|
||||
// 比对版本号
|
||||
if (latestVersion !== res_version) {
|
||||
uni.showModal({
|
||||
|
|
@ -41,7 +55,7 @@
|
|||
if (modalRes.confirm) {
|
||||
if (platform === 'android') {
|
||||
uni.showLoading({
|
||||
title: '正在下载,请稍后'
|
||||
title: '正在升级,请耐心等待'
|
||||
})
|
||||
uni.setStorageSync('VERSION', res.data.version)
|
||||
that.downloadNewVersion(downloadUrl, res.code);
|
||||
|
|
@ -57,9 +71,11 @@
|
|||
if (res.code == 0) {
|
||||
that.handleUserList()
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
url: "/pages/login/login"
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -69,9 +85,11 @@
|
|||
if (res.code == 0) {
|
||||
that.handleUserList()
|
||||
} else {
|
||||
uni.reLaunch({
|
||||
url: "/pages/login/login"
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -100,7 +118,7 @@
|
|||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '下载失败',
|
||||
title: '升级失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,6 +90,20 @@
|
|||
.ml-15 {
|
||||
margin-left: 15px !important;
|
||||
}
|
||||
.orangeBtn {
|
||||
color: #fa8c16;
|
||||
background: #fff7e6;
|
||||
border: 1px solid #ffd591;
|
||||
padding: 5px 8px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.blueBtn {
|
||||
color: #1890ff;
|
||||
background: #dbebf9;
|
||||
border: 1px solid #8cc8ff;
|
||||
padding: 5px 8px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.bold {
|
||||
font-weight: bold;
|
||||
|
|
@ -369,7 +383,6 @@
|
|||
width: 60%;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: right;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
|
|
@ -378,12 +391,17 @@
|
|||
margin-right: 10px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: left;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
picker {
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
font-size: 16px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
view{
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.uni-input {
|
||||
|
|
@ -639,20 +657,27 @@
|
|||
border-radius: 10px;
|
||||
margin: 0 15px 10px;
|
||||
font-size: 14px;
|
||||
padding: 25px 10px 15px;
|
||||
padding: 20px 10px 5px;
|
||||
color: #fff;
|
||||
|
||||
.status {
|
||||
float: right;
|
||||
margin-bottom: 25px;
|
||||
width: auto;
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
padding:8px 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
text {
|
||||
width: auto;
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 8px 10px;
|
||||
}
|
||||
// text {
|
||||
// width: auto;
|
||||
// color: #333;
|
||||
// background-color: #fff;
|
||||
// border-radius: 10px;
|
||||
// padding: 8px 10px;
|
||||
// }
|
||||
}
|
||||
|
||||
.item {
|
||||
|
|
@ -663,8 +688,9 @@
|
|||
text {
|
||||
display: block;
|
||||
width: 100%;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
margin-top: 15px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -724,6 +750,7 @@
|
|||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
margin: auto;
|
||||
background-color: $btncolor;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@
|
|||
|
||||
}
|
||||
|
||||
|
||||
@keyframes wrapper_box {
|
||||
0% {
|
||||
transform: translateX(-100%);
|
||||
|
|
|
|||
|
|
@ -22,10 +22,31 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- 地区 -->
|
||||
<view class="area" v-if="isArea">
|
||||
<view>
|
||||
<text>当前地区标准:</text>
|
||||
<text>北京</text>
|
||||
<view class="cityList">
|
||||
<view class="area" v-if="isArea" @click="visible = true">
|
||||
<view>选择地区标准:</view>
|
||||
<view>{{region?region:user.address}}<uni-icons type="bottom"></uni-icons></view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view v-if="visible" class="visible" @click="visible=false">
|
||||
<view @click.stop class="item">
|
||||
<view class="groupBtn">
|
||||
<view @click="visible=false">取消</view>
|
||||
<view @click="handlesure()" class="sure">确定</view>
|
||||
</view>
|
||||
<picker-view @change="bindChange" :value="value" class="picker-view"
|
||||
:indicator-style="indicatorStyle">
|
||||
<picker-view-column>
|
||||
<view class="item" v-for="(item,index) in province" :key="index">{{item.name}}</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view class="item" v-for="(item,index) in city" :key="index">{{item}}</view>
|
||||
</picker-view-column>
|
||||
<!-- <picker-view-column>
|
||||
<view class="item" v-for="(item,index) in area" :key="index">{{item?item:'请选择'}}</view>
|
||||
</picker-view-column> -->
|
||||
</picker-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 切换成员 -->
|
||||
|
|
@ -43,6 +64,26 @@
|
|||
components: {
|
||||
drawer
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
value: [2, 0],
|
||||
visible: false,
|
||||
region: "",
|
||||
province: [], //省
|
||||
city: [], //市
|
||||
area: [], //区
|
||||
indicatorStyle: `height: 45px;`,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user", "familayList"]),
|
||||
userList() {
|
||||
return this.familayList
|
||||
},
|
||||
userId() {
|
||||
return this.user.id
|
||||
}
|
||||
},
|
||||
props: {
|
||||
isArea: {
|
||||
type: Boolean,
|
||||
|
|
@ -53,23 +94,72 @@
|
|||
default: true
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
mounted() {
|
||||
let that = this
|
||||
setTimeout(() => {
|
||||
if (that.isArea) {
|
||||
that.handleCityList()
|
||||
console.log("1111", this.user.address)
|
||||
}
|
||||
}, 500);
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
user: state => state.user,
|
||||
userList: state => state.familayList
|
||||
})
|
||||
watch: {
|
||||
userId() {
|
||||
let that = this
|
||||
that.region = that.user.address
|
||||
if (that.province.length) {
|
||||
let str = that.user.address.split(',')[0]
|
||||
let str2 = that.user.address.split(',')[1]
|
||||
var Index0 = that.province.findIndex((profile) => profile.name === str);
|
||||
var Index2 = that.province[Index0].list.findIndex((ite) => ite === str2);
|
||||
that.value[0] = Index0
|
||||
that.value[1] = Index2
|
||||
that.city = that.province[Index0].list
|
||||
}
|
||||
that.$emit("getAciveCity", that.region)
|
||||
},
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
bindChange: function(e) {
|
||||
let that = this
|
||||
if (e.detail.value[0] != that.value[0]) {
|
||||
e.detail.value[1] = 0
|
||||
}
|
||||
that.value = e.detail.value
|
||||
that.city = that.province[that.value[0]].list
|
||||
},
|
||||
handlesure() {
|
||||
let that = this
|
||||
let defaultRegion = [that.province[that.value[0]].name, that.city[that.value[1]]]
|
||||
that.region = defaultRegion.join(",");
|
||||
that.visible = false
|
||||
that.$emit("getAciveCity", that.region)
|
||||
},
|
||||
// 添加成员
|
||||
handleAddUser() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/me/userInfo"
|
||||
})
|
||||
},
|
||||
// 地区
|
||||
handleCityList() {
|
||||
let that = this
|
||||
that.$model.getCityList({
|
||||
type: 2
|
||||
}).then((res) => {
|
||||
console.log("|全部地区", res.data, that.user.address)
|
||||
if (res.code != 0) return
|
||||
that.province = res.data
|
||||
let str = that.user.address.split(',')[0]
|
||||
let str2 = that.user.address.split(',')[1]
|
||||
var Index0 = res.data.findIndex((profile) => profile.name === str);
|
||||
var Index2 = res.data[Index0].list.findIndex((ite) => ite === str2);
|
||||
that.value[0] = Index0
|
||||
that.value[1] = Index2
|
||||
that.city = res.data[Index0].list
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -99,4 +189,57 @@
|
|||
border-radius: 10px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
|
||||
.item {
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.visible {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 99;
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
|
||||
.groupBtn {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 15px;
|
||||
border-bottom: 1px solid #dfdfdf;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 45%;
|
||||
z-index: 999;
|
||||
|
||||
view {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding: 0 10px;
|
||||
background-color: #dfdfdf;
|
||||
border-radius: 5px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.sure {
|
||||
background-color: $textcolor;
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
|
||||
.picker-view {
|
||||
width: 100%;
|
||||
height: 45%;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -7,8 +7,10 @@
|
|||
<view class="editem" @click="hideKeyboard">
|
||||
<view class="left">日期</view>
|
||||
<view class="right">
|
||||
<uni-datetime-picker type="datetime" @change="changeLog" :border="false" :end="endDate"
|
||||
:clear-icon='false' :hide-second='true' />
|
||||
<picker mode="date" :end="endDate" @change="changeLog" fields="time">
|
||||
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
|
||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
|
|
@ -101,7 +103,7 @@
|
|||
},
|
||||
//
|
||||
changeLog(e) {
|
||||
this.regTime = e
|
||||
this.regTime = e.detail.value
|
||||
},
|
||||
onTap() {
|
||||
this.regTime = ""
|
||||
|
|
|
|||
|
|
@ -7,8 +7,10 @@
|
|||
<view class="editem" @click="hideKeyboard">
|
||||
<view class="left">日期</view>
|
||||
<view class="right">
|
||||
<uni-datetime-picker type="datetime" @change="changeLog" :border="false" :end="endDate"
|
||||
:clear-icon='false' :hide-second='true' />
|
||||
<picker mode="date" :end="endDate" @change="changeLog" fields="time">
|
||||
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
|
||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
|
|
@ -16,8 +18,9 @@
|
|||
<view class="name">时长</view>
|
||||
<view class="right">
|
||||
<picker mode="multiSelector" :range="timeList" :value="timesTndex" @change="bindTimeChange">
|
||||
<view>{{time_m?time_m:'请选择'}}{{time_s?time_s:''}}</view>
|
||||
<view class="size16">{{time_m?time_m+':':'请选择'}}{{time_s?time_s:''}}</view>
|
||||
</picker>
|
||||
<uni-icons type="bottom" class="ml-15 c666"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="editem">
|
||||
|
|
@ -46,7 +49,7 @@
|
|||
timeList: [],
|
||||
time_m: "",
|
||||
time_s: "",
|
||||
timesTndex: [0, 0]
|
||||
timesTndex: [1, 0]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -63,11 +66,19 @@
|
|||
},
|
||||
methods: {
|
||||
bindTimeChange(e) {
|
||||
let that = this
|
||||
let m = e.target.value[0]
|
||||
let s = e.target.value[1]
|
||||
this.timesTndex = e.target.value
|
||||
this.time_m = this.timeList[0][m]
|
||||
this.time_s = this.timeList[1][s]
|
||||
that.timesTndex = e.target.value
|
||||
let time_m = Number(that.timeList[0][m].substring(0, 2)) * 60
|
||||
let time_s = Number(that.timeList[1][s].substring(0, 2))
|
||||
if (Number(time_m + time_s) < 30) {
|
||||
that.time_m = '00'
|
||||
that.time_s = '30'
|
||||
} else {
|
||||
that.time_m = that.timeList[0][m].substring(0, 2)
|
||||
that.time_s = that.timeList[1][s].substring(0, 2)
|
||||
}
|
||||
},
|
||||
// 手动记录
|
||||
handleTarget() {
|
||||
|
|
@ -84,8 +95,8 @@
|
|||
aud_id: uni.getStorageSync('userid'),
|
||||
r_time: that.regTime,
|
||||
num: that.number,
|
||||
time_m: that.time_m.substring(0, 2),
|
||||
time_s: that.time_s.substring(0, 2),
|
||||
time_m: that.time_m,
|
||||
time_s: that.time_s,
|
||||
type: "free",
|
||||
}).then(res => {
|
||||
if (res.code != 0) return
|
||||
|
|
@ -103,7 +114,7 @@
|
|||
},
|
||||
//
|
||||
changeLog(e) {
|
||||
this.regTime = e
|
||||
this.regTime = e.detail.value
|
||||
},
|
||||
onTap() {
|
||||
this.regTime = ""
|
||||
|
|
|
|||
|
|
@ -7,8 +7,10 @@
|
|||
<view class="editem" @click="hideKeyboard">
|
||||
<view class="left">日期</view>
|
||||
<view class="right">
|
||||
<uni-datetime-picker type="datetime" @change="changeLog" :border="false" :end="endDate"
|
||||
:clear-icon='false' :hide-second='true' />
|
||||
<picker mode="date" :end="endDate" @change="changeLog" fields="time">
|
||||
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
|
||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
|
|
@ -96,7 +98,7 @@
|
|||
},
|
||||
//
|
||||
changeLog(e) {
|
||||
this.regTime = e
|
||||
this.regTime = e.detail.value
|
||||
},
|
||||
onTap() {
|
||||
this.regTime = ""
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<view :style="{ top: positionTop + 'rpx' }" class="days">
|
||||
<view class="item" v-for="(item, index) in dates" :key="index">
|
||||
<view class="day" @click="selectOne(item, $event)" :class="{
|
||||
choose: choose == `${item.year}-${item.month}-${item.date}`&&item.isCurM,
|
||||
choose: choose == `${item.year}/${item.month}/${item.date}`&&item.isCurM,
|
||||
nolm: !item.isCurM,
|
||||
today: isToday(item.year, item.month, item.date),
|
||||
isWorkDay: isWorkDay(item.year, item.month, item.date)
|
||||
|
|
|
|||
|
|
@ -6,8 +6,10 @@
|
|||
<view class="editem" @click="hideKeyboard" v-if="type!=1">
|
||||
<view class="name">日期</view>
|
||||
<view class="right">
|
||||
<uni-datetime-picker type="date" @change="changeLog" :border="false" :end="endDate"
|
||||
:clear-icon='false' :hide-second='false' />
|
||||
<picker mode="date" :start="startDate" :end="endDate" @change="changeLog" fields="time">
|
||||
<view class="uni-input">{{regTime?regTime:'请选择'}}</view>
|
||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="editem">
|
||||
|
|
@ -75,7 +77,7 @@
|
|||
},
|
||||
//
|
||||
changeLog(e) {
|
||||
this.regTime = e
|
||||
this.regTime = e.detail.value
|
||||
},
|
||||
onTap() {
|
||||
this.weight = ""
|
||||
|
|
|
|||
37
index.html
|
|
@ -1,20 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
<title></title>
|
||||
<!--preload-links-->
|
||||
<!--app-context-->
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"><!--app-html--></div>
|
||||
<script type="module" src="/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
<title></title>
|
||||
<!--preload-links-->
|
||||
<!--app-context-->
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"><!--app-html--></div>
|
||||
<script type="module" src="/main.js"></script>
|
||||
<script src="http://tc.pcxbc.com/x_admin/js/CityList.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
4
main.js
|
|
@ -5,6 +5,9 @@ Vue.prototype.$store = store;
|
|||
// 公共js
|
||||
import tools from '@/tools/tools.js'
|
||||
Vue.prototype.$tools = tools;
|
||||
// 蓝牙js
|
||||
import Bluetooth from '@/tools/Bluetooth.js'
|
||||
Vue.prototype.$Bluetooth = Bluetooth;
|
||||
//请求
|
||||
import http from '@/tools/https.js'
|
||||
Vue.prototype.$http = http;
|
||||
|
|
@ -13,7 +16,6 @@ import model from '@/tools/model.js'
|
|||
Vue.prototype.$model = model;
|
||||
// 语言
|
||||
import messages from './locale/index'
|
||||
|
||||
//首页卡片列表
|
||||
import json from '@/cardlist.json'
|
||||
Vue.prototype.$json = json;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
"name" : "青测",
|
||||
"appid" : "__UNI__E0E1A21",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.5",
|
||||
"versionCode" : 105,
|
||||
"versionName" : "1.1.0",
|
||||
"versionCode" : 110,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
|
@ -16,6 +16,7 @@
|
|||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
"template" : "index.html",
|
||||
/* 模块配置 */
|
||||
"modules" : {
|
||||
"Bluetooth" : {}
|
||||
|
|
@ -134,5 +135,8 @@
|
|||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "2",
|
||||
"locale" : "zh-Hans"
|
||||
"locale" : "zh-Hans",
|
||||
"h5" : {
|
||||
"template" : "index.html"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
26
pages.json
|
|
@ -333,11 +333,27 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/devices/PCT01",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "",
|
||||
"enablePullDownRefresh" : false
|
||||
"path": "pages/devices/PCT01",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false,
|
||||
"app-plus": {
|
||||
"titleNView": {
|
||||
"backgroundImage": "linear-gradient(to right, #477EFF, #39D9C9)"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/me/about",
|
||||
"style": {
|
||||
"navigationBarTitleText": "关于我们",
|
||||
"enablePullDownRefresh": false,
|
||||
"app-plus": {
|
||||
"titleNView": {
|
||||
"backgroundImage": "linear-gradient(to right, #477EFF, #39D9C9)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
<text class="t-icon-jilu1 t-icon"></text>
|
||||
<view>手动记录</view>
|
||||
</view>
|
||||
<view class="item" @click="$tools.handleDevicesMac(isdevice,acd_id)">
|
||||
<view class="item" @click="handleisSdevice()">
|
||||
<text class="t-icon-wulianjie t-icon"></text>
|
||||
<view>连接设备</view>
|
||||
</view>
|
||||
|
|
@ -116,11 +116,21 @@
|
|||
<!-- 时间选择 -->
|
||||
<view class="boxTime">
|
||||
<view class="one">
|
||||
<uni-datetime-picker type="date" :end="startDate" :clear-icon="false"
|
||||
:value="startTime?startTime:startDate" @change="handStartTimeH" :border="false" />
|
||||
<view>~</view>
|
||||
<uni-datetime-picker type="date" :end="endDate" :clear-icon="false"
|
||||
:value="endTime?endTime:endDate" @change="handEndTimeH" :border="false" />
|
||||
<!-- <uni-datetime-picker type="date" :end="startDate" :clear-icon="false"
|
||||
:value="startTime?startTime:startDate" @change="handStartTimeH" :border="false" /> -->
|
||||
<picker mode="date" :end="endDate" @change="handStartTimeH" fields="time"
|
||||
:value="startTime?startTime:startDate">
|
||||
<view class="uni-input">{{startTime?startTime:startDate}}</view>
|
||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||
</picker>
|
||||
<view class="center">~</view>
|
||||
<!-- <uni-datetime-picker type="date" :end="endDate" :clear-icon="false"
|
||||
:value="endTime?endTime:endDate" @change="handEndTimeH" :border="false" /> -->
|
||||
<picker mode="date" :end="endDate" @change="handEndTimeH" fields="time"
|
||||
:value="endTime?endTime:endDate">
|
||||
<view class="uni-input">{{endTime?endTime:endDate}}</view>
|
||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 曲线图 -->
|
||||
|
|
@ -259,6 +269,32 @@
|
|||
console.log("11111", options)
|
||||
},
|
||||
methods: {
|
||||
handleisSdevice() {
|
||||
let that = this
|
||||
console.log("isDevice", that.isdevice)
|
||||
if (that.isdevice == 'true' || that.isdevice) {
|
||||
uni.openBluetoothAdapter({
|
||||
success: e => {
|
||||
that.$store.commit("changeBluetooth", true);
|
||||
uni.navigateTo({
|
||||
url: "/pages/devices/search?id=" + that.acd_id
|
||||
})
|
||||
console.log('初始化蓝牙成功:' + e.errMsg);
|
||||
},
|
||||
fail: err => {
|
||||
console.log('初始化蓝牙失败:' + err.errMsg);
|
||||
return that.$Bluetooth.getBluetoothAdapter(err)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
that.$tools.msg("请先添加设备!")
|
||||
setTimeout(function() {
|
||||
uni.switchTab({
|
||||
url: "/pages/business/business"
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
// 历史数据删除时重新加载接口
|
||||
reload() {
|
||||
let that = this
|
||||
|
|
@ -287,17 +323,17 @@
|
|||
handStartTimeH(e) {
|
||||
let that = this
|
||||
if (that.endTime) {
|
||||
if (Date.parse(e) > Date.parse(that.endTime)) {
|
||||
if (Date.parse(e.detail.value) > Date.parse(that.endTime)) {
|
||||
that.$tools.msg("请选择正确的时间")
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if (Date.parse(e) > Date.parse(that.endDate)) {
|
||||
if (Date.parse(e.detail.value) > Date.parse(that.endDate)) {
|
||||
that.$tools.msg("请选择正确的时间")
|
||||
return
|
||||
}
|
||||
}
|
||||
that.startTime = e
|
||||
that.startTime = e.detail.value
|
||||
let endtime = that.endTime ? that.endTime : that.endDate
|
||||
that.$store.dispatch("GetBodyTrendList", {
|
||||
aud_id: that.user.id,
|
||||
|
|
@ -310,17 +346,17 @@
|
|||
handEndTimeH(e) {
|
||||
let that = this
|
||||
if (that.startTime) {
|
||||
if (Date.parse(e) < Date.parse(that.startTime)) {
|
||||
if (Date.parse(e.detail.value) < Date.parse(that.startTime)) {
|
||||
that.$tools.msg("请选择正确的时间")
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if (Date.parse(e) < Date.parse(that.startDate)) {
|
||||
if (Date.parse(e.detail.value) < Date.parse(that.startDate)) {
|
||||
that.$tools.msg("请选择正确的时间")
|
||||
return
|
||||
}
|
||||
}
|
||||
that.endTime = e
|
||||
that.endTime = e.detail.value
|
||||
let startTime = that.startTime ? that.startTime : that.startDate
|
||||
that.$store.dispatch("GetBodyTrendList", {
|
||||
aud_id: uni.getStorageSync('userid'),
|
||||
|
|
@ -396,6 +432,26 @@
|
|||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.center{
|
||||
margin: 0 15px;
|
||||
}
|
||||
|
||||
picker {
|
||||
width:100%;
|
||||
border: none;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
color: #333333;
|
||||
font-size: 16px;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.box {
|
||||
|
|
|
|||
|
|
@ -115,8 +115,9 @@
|
|||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.name {
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
onLoad(options) {
|
||||
that = this
|
||||
that.id = options.id
|
||||
that.$Bluetooth.onBLEConnectionStateChange()
|
||||
uni.onBluetoothAdapterStateChange(function(res) {
|
||||
that.$store.commit("changeBluetooth", res.available);
|
||||
})
|
||||
|
|
@ -59,9 +60,9 @@
|
|||
console.log("onUnload")
|
||||
let that = this
|
||||
if (!that.Unload) {
|
||||
that.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
||||
that.closeBLEConnection()
|
||||
that.closeBluetoothAdapter()
|
||||
uni.hideLoading()
|
||||
that.$Bluetooth.closeBluetoothAdapter() // 断开蓝牙模块
|
||||
that.$Bluetooth.stopBluetoothDevicesDiscovery() // 取消蓝牙搜索
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -75,25 +76,19 @@
|
|||
},
|
||||
fail: e => {
|
||||
console.log('初始化蓝牙失败:' + e.errMsg);
|
||||
that.$tools.getBluetoothAdapter(e)
|
||||
that.$Bluetooth.getBluetoothAdapter(e)
|
||||
}
|
||||
});
|
||||
},
|
||||
// 开始搜寻附近的蓝牙外围设备
|
||||
startBluetoothDeviceDiscovery() {
|
||||
let that = this
|
||||
uni.showLoading({
|
||||
title: '设备搜索中',
|
||||
})
|
||||
uni.startBluetoothDevicesDiscovery({
|
||||
allowDuplicatesKey: true, //是否允许重复上报同一设备
|
||||
success: res => {
|
||||
uni.hideLoading()
|
||||
that.onBluetoothDeviceFound();
|
||||
},
|
||||
fail: res => {
|
||||
uni.hideLoading()
|
||||
}
|
||||
fail: res => {}
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
|
@ -102,40 +97,33 @@
|
|||
onBluetoothDeviceFound() {
|
||||
var that = this;
|
||||
const foundDevices = []
|
||||
uni.showLoading({
|
||||
wx.showLoading({
|
||||
title: '设备搜索中',
|
||||
})
|
||||
console.log("id", that.id)
|
||||
uni.onBluetoothDeviceFound(res => {
|
||||
res.devices.forEach(device => {
|
||||
//
|
||||
if (that.id == 3 && device.name.indexOf("YPC") != -1) {
|
||||
console.log("跳绳", device,"YPC1293ED6802464CC843")
|
||||
if (device.name.indexOf("YPC") != -1) {
|
||||
clearTimeout(myTime);
|
||||
let buff = device.name.slice(7, 19)
|
||||
device.macAddr = that.$tools.str2Num(buff)
|
||||
if (device.macAddr != "") {
|
||||
that.handleDevice(device)
|
||||
}
|
||||
device.macAddr = that.$Bluetooth.str2Num(buff)
|
||||
device.deviceId = that.$Bluetooth.str2Num(buff)
|
||||
that.handleDevice(device)
|
||||
return
|
||||
}
|
||||
if (that.id == 4 && device.name.indexOf("G02") != -1) {
|
||||
if (device.name.indexOf("G02") != -1) {
|
||||
clearTimeout(myTime);
|
||||
let buff = device.advertisData.slice(3, 9)
|
||||
device.mac = new Uint8Array(buff) // 保存广播数据中的mac地址,这是由于iOS不直接返回mac地址
|
||||
let tempMac = Array.from(device.mac)
|
||||
tempMac.reverse()
|
||||
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
|
||||
that.handleDevice(device)
|
||||
return
|
||||
}
|
||||
if (that.id == 5 && device.name.indexOf("Yihejia_Lung") != -1) {
|
||||
console.log("肺活量", device,'04:0D:84:48:E0:9B')
|
||||
if (device.name.indexOf("Yihejia_Lung") != -1) {
|
||||
console.log("肺活量", device, '04:0D:84:48:E0:9B')
|
||||
device.macAddr = device.deviceId
|
||||
clearTimeout(myTime);
|
||||
// let buff = device.advertisData.slice(-6)
|
||||
// device.mac = new Uint8Array(buff) // 保存广播数据中的mac地址,这是由于iOS不直接返回mac地址
|
||||
// let tempMac = Array.from(device.mac)
|
||||
// device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
|
||||
that.handleDevice(device)
|
||||
return
|
||||
}
|
||||
|
|
@ -145,7 +133,6 @@
|
|||
},
|
||||
handleDevice(device) {
|
||||
let that = this
|
||||
console.log("11111112222")
|
||||
const foundDevices = that.devices
|
||||
const idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId)
|
||||
that.deviceId = device.deviceId;
|
||||
|
|
@ -159,46 +146,20 @@
|
|||
handleMyTime() {
|
||||
var that = this;
|
||||
myTime = setTimeout(function() {
|
||||
clearTimeout(myTime);
|
||||
uni.hideLoading()
|
||||
that.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
||||
if (!that.devices.length) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '请确定蓝牙已打开!是否继续?',
|
||||
cancelText: "取消",
|
||||
confirmText: "继续",
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
that.startBluetoothDeviceDiscovery()
|
||||
} else {
|
||||
that.$tools.msg("您已取消操作")
|
||||
}
|
||||
}
|
||||
})
|
||||
that.islink = -1
|
||||
that.$tools.showModal("没有查找到设备")
|
||||
}
|
||||
}, 30000);
|
||||
},
|
||||
/**
|
||||
* 停止搜索蓝牙设备
|
||||
*/
|
||||
stopBluetoothDevicesDiscovery() {
|
||||
uni.stopBluetoothDevicesDiscovery({
|
||||
success: e => {
|
||||
console.log("停止搜索蓝牙设备", e)
|
||||
},
|
||||
});
|
||||
uni.hideLoading()
|
||||
clearTimeout(myTime);
|
||||
that.$Bluetooth.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
||||
}, 15000);
|
||||
},
|
||||
// 连接蓝牙
|
||||
createBLEConnection(e) {
|
||||
let that = this;
|
||||
that.stopBluetoothDevicesDiscovery()
|
||||
that.$Bluetooth.stopBluetoothDevicesDiscovery()
|
||||
that.macAddr = e.macAddr
|
||||
that.getCode()
|
||||
},
|
||||
getCode() {
|
||||
let that = this;
|
||||
clearTimeout(myTime);
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '是否绑定该设备?',
|
||||
|
|
@ -219,8 +180,7 @@
|
|||
device_id: that.id,
|
||||
device_mac: that.macAddr
|
||||
}).then(res => {
|
||||
that.closeBluetoothAdapter()
|
||||
that.closeBLEConnection()
|
||||
that.$Bluetooth.closeBluetoothAdapter()
|
||||
that.devices = []
|
||||
if (res.code == 0) {
|
||||
that.$tools.msg('绑定成功!')
|
||||
|
|
@ -230,43 +190,14 @@
|
|||
})
|
||||
setTimeout(function() {
|
||||
uni.switchTab({
|
||||
url: "/pages/business/business"
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}, 500)
|
||||
} else {
|
||||
that.$tools.msg(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 监听蓝牙连接状态
|
||||
onBLEConnectionStateChange() {
|
||||
let that = this
|
||||
uni.onBLEConnectionStateChange(function(res) {
|
||||
console.log("蓝牙连接状态", res.connected)
|
||||
that.$store.commit("changeConnected", res.connected);
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 断开蓝牙模块
|
||||
*/
|
||||
closeBluetoothAdapter() {
|
||||
let that = this;
|
||||
uni.closeBluetoothAdapter({
|
||||
success: res => {
|
||||
console.log('蓝牙模块关闭成功');
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 断开蓝牙连接
|
||||
*/
|
||||
closeBLEConnection() {
|
||||
var that = this;
|
||||
uni.closeBLEConnection({
|
||||
deviceId: that.deviceId,
|
||||
success: res => {
|
||||
console.log('断开蓝牙连接成功');
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -96,14 +96,14 @@
|
|||
type: that.acd_id
|
||||
}).then(res => {
|
||||
if (res) {
|
||||
that.markDays = res.pkList.Dlist
|
||||
that.list = res.pkList.list
|
||||
for (var i = 0; i < res.pkList.list.length; i++) {
|
||||
if (Date.parse(that.endDate) == Date.parse(res.pkList.list[i].r_t)) {
|
||||
that.infoList.push(res.pkList.list[i]);
|
||||
that.markDays = res.Dlist
|
||||
that.list = res.data
|
||||
for (var i = 0; i < res.data.length; i++) {
|
||||
if (Date.parse(that.endDate) == Date.parse(res.data[i].r_t)) {
|
||||
that.infoList.push(res.data[i])
|
||||
}
|
||||
}
|
||||
console.log("对比", that.infoList)
|
||||
console.log("对比", res,)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,22 +1,514 @@
|
|||
<template>
|
||||
<view>
|
||||
|
||||
<view class="content skipping">
|
||||
<!--自由训练 -->
|
||||
<view class="title">{{info.active==1?'自由训练':info.active==2?'定时训练':'定数训练'}}</view>
|
||||
<view class="skiptop">
|
||||
<view class="item">
|
||||
<view class="item-ite">{{info.active==1?'自由次数':info.active==2?"个数":'目标次数'}}<text>{{weight}}</text>
|
||||
</view>
|
||||
<view class="item-ite">
|
||||
{{info.active==2?'目标时长 分:秒':"分:秒"}}<text>{{time_m?time_m:'00'}}:{{time_s?time_s:'00'}}</text>
|
||||
</view>
|
||||
<view class="item-ite">消耗/kcal<text>{{Math.floor(kcal)}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="image">
|
||||
<image src="../../static/t01.gif"></image>
|
||||
</view>
|
||||
<view class="end" @longpress="onlongpress">长按结束</view>
|
||||
<!-- 报告 -->
|
||||
<view class="wrapper" v-if="iswrapper">
|
||||
<view class="bg">
|
||||
<view class="edit">
|
||||
<view class="editem">
|
||||
<view>平均速度:<text class="cyello Blue size20 mr-5">{{bpm.toFixed(1)}}</text>bpm</view>
|
||||
<view class="size12 c999 ">(bpm=个/分钟)</view>
|
||||
</view>
|
||||
<view class="center">
|
||||
<view class="left">
|
||||
<image src="../../static/duan.png"></image>
|
||||
<view class="name">
|
||||
<view>
|
||||
中断次数
|
||||
</view>
|
||||
<view>
|
||||
<text class="cyello Blue size20 mr-5">{{Bcount}}</text>次
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="left">
|
||||
<image src="../../static/xu.png"></image>
|
||||
<view class="name">
|
||||
<view>
|
||||
最长连续
|
||||
</view>
|
||||
<view>
|
||||
<text class="cyello Blue size20 mr-5">{{continuous}}</text>个
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item-ite"><text>{{weight}}</text>训练个数</view>
|
||||
<view class="item-ite"><text>{{time_m?time_m:'00'}}:{{time_s?time_s:'00'}}</text>分:秒</view>
|
||||
<view class="item-ite"><text>{{Math.floor(kcal)}}</text>消耗/kcal</view>
|
||||
</view>
|
||||
<view class="btn" @click="handleTarget">完成</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
bpm: 0,
|
||||
isend: false,
|
||||
weight: 0,
|
||||
Ycount: 0,
|
||||
time_m: "",
|
||||
time_s: "",
|
||||
time: 0,
|
||||
kcal: 0,
|
||||
Bcount: 0,
|
||||
continuous: 0,
|
||||
info: {},
|
||||
isToggle: false,
|
||||
isEnd: false,
|
||||
iswrapper: false,
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["isConnected", "isBluetoothTyle"]),
|
||||
},
|
||||
onLoad(options) {
|
||||
let that = this
|
||||
if (options && options.info) {
|
||||
let info = options.info
|
||||
that.info = JSON.parse(info)
|
||||
that.notifyBLECharacteristicValue()
|
||||
setTimeout(function() {
|
||||
that.handleStart('开始')
|
||||
}, 900)
|
||||
setTimeout(function() {
|
||||
that.handleStart('连续')
|
||||
}, 1200)
|
||||
}
|
||||
that.$Bluetooth.onBLEConnectionStateChange()
|
||||
uni.onBluetoothAdapterStateChange(function(res) {
|
||||
that.$store.commit("changeBluetooth", res.available);
|
||||
})
|
||||
},
|
||||
onBackPress() {
|
||||
let that = this
|
||||
that.handleEnd()
|
||||
console.log("页面返回onBackPress")
|
||||
},
|
||||
watch: {
|
||||
isConnected: function() {
|
||||
let that = this
|
||||
if (!that.isConnected) {
|
||||
uni.showModal({
|
||||
title: '连接已断开',
|
||||
content: '训练过程中已与设备连接中断,请重新连接设备再开始训练',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.$emit('updateData', JSON.stringify(that.info))
|
||||
uni.navigateBack({ //返回
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log("isConnected", that.isConnected)
|
||||
}
|
||||
},
|
||||
isBluetoothTyle: function() {
|
||||
let that = this
|
||||
if (!that.isBluetoothTyle) {
|
||||
console.log("isBluetoothTyle", that.isBluetoothTyle)
|
||||
}
|
||||
},
|
||||
// 切换模式
|
||||
isToggle: function() {
|
||||
let that = this
|
||||
if (that.isToggle) {
|
||||
uni.showModal({
|
||||
title: '友情提示',
|
||||
content: '训练过程中请勿切换训练,返回训练',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
setTimeout(function() {
|
||||
that.handleStart('结束')
|
||||
}, 400)
|
||||
setTimeout(function() {
|
||||
uni.$emit('updateData', JSON.stringify(that.info))
|
||||
uni.navigateBack({ //返回
|
||||
delta: 1
|
||||
})
|
||||
}, 600)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 模式被结束
|
||||
isEnd: function() {
|
||||
let that = this
|
||||
if (that.isEnd) {
|
||||
setTimeout(function() {
|
||||
that.handleStart('停止')
|
||||
}, 200)
|
||||
setTimeout(function() {
|
||||
that.handleGetMeasure()
|
||||
}, 400)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 接收蓝牙数据
|
||||
notifyBLECharacteristicValue() {
|
||||
let that = this;
|
||||
uni.notifyBLECharacteristicValueChange({
|
||||
state: true, // 启用 notify 功能
|
||||
deviceId: that.info.deviceId,
|
||||
serviceId: that.info.serviceId,
|
||||
characteristicId: that.info.notify,
|
||||
success(res) {
|
||||
uni.onBLECharacteristicValueChange(function(res) {
|
||||
let value = that.$tools.ab2hex(res.value, "");
|
||||
console.log("value222222", value)
|
||||
let count = parseInt(value.substring(8, 12), 16)
|
||||
let Ycount = parseInt(value.substring(12, 16), 16) //设置次数
|
||||
let time = parseInt(value.substring(16, 20), 16) //运行时间/秒
|
||||
let timeDown = parseInt(value.substring(20, 24), 16) //倒计时时间
|
||||
let type = parseInt(value.substring(30, 32), 16) //当前状态
|
||||
let weight = parseInt(value.substring(32, 34), 16) //重量
|
||||
let kcal = parseInt(value.substring(34, 38), 16) //卡路里
|
||||
let minutes = null
|
||||
let seconds = null
|
||||
if (type == 0 || type == 4) {
|
||||
|
||||
that.weight = count //个数
|
||||
that.Ycount = Ycount
|
||||
that.time = time
|
||||
that.kcal = kcal / 10
|
||||
|
||||
if (that.info.active != 2 && count != 0) { //自由模式 + 计数
|
||||
minutes = Math.floor((time % 3600) / 60)
|
||||
seconds = time % 60
|
||||
that.time_m = minutes > 9 ? minutes : '0' + minutes
|
||||
that.time_s = seconds > 9 ? seconds : '0' + seconds
|
||||
}
|
||||
if (that.info.active == 2) { //计时
|
||||
let T = Number(timeDown) - Number(time)
|
||||
minutes = Math.floor((T % 3600) / 60)
|
||||
seconds = T % 60
|
||||
that.time_m = minutes > 9 ? minutes : '0' + minutes
|
||||
that.time_s = seconds > 9 ? seconds : '0' + seconds
|
||||
}
|
||||
that.Bcount = parseInt(value.substring(24, 26), 16) //绊绳个数
|
||||
that.continuous = parseInt(value.substring(26, 30), 16) //连续个数
|
||||
console.log("自由模式", count, kcal, time, that.time_m, that.time_s, weight)
|
||||
}
|
||||
if ((type == 2 || type == 3) && !that.isToggle) {
|
||||
setTimeout(function() {
|
||||
that.isToggle = true
|
||||
that.handleStart('停止')
|
||||
}, 200)
|
||||
console.log("当前状态被切换")
|
||||
|
||||
}
|
||||
if (type == 4 && !that.isEnd) {
|
||||
that.isEnd = true
|
||||
console.log("当前状态被结束")
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
fail(res) {
|
||||
console.log("测量失败", res.value);
|
||||
}
|
||||
})
|
||||
},
|
||||
SendData(str) {
|
||||
let that = this
|
||||
let buf = new Uint8Array(str.match(/[\da-f]{2}/gi).map(function(h) {
|
||||
return parseInt(h, 16)
|
||||
}))
|
||||
uni.writeBLECharacteristicValue({
|
||||
deviceId: that.info.deviceId,
|
||||
serviceId: that.info.serviceId,
|
||||
characteristicId: that.info.write,
|
||||
value: buf.buffer,
|
||||
success: res => {
|
||||
console.log('下发指令成功', res.errMsg)
|
||||
},
|
||||
fail: res => {
|
||||
console.log("下发指令失败", res);
|
||||
},
|
||||
})
|
||||
},
|
||||
onlongpress() {
|
||||
let that = this
|
||||
uni.vibrateLong({
|
||||
success: function() {
|
||||
console.log('短震动');
|
||||
if (Number(that.time) < 10) {
|
||||
uni.showModal({
|
||||
title: '友情提示',
|
||||
content: '本次跳绳时间低于10秒,记录将不会被保存?',
|
||||
confirmText: "继续",
|
||||
cancelText: "返回",
|
||||
success: function(res) {
|
||||
if (res.cancel) {
|
||||
that.handleEnd()
|
||||
}
|
||||
},
|
||||
})
|
||||
} else {
|
||||
that.handleStart('停止')
|
||||
setTimeout(function() {
|
||||
that.handleStart('结束')
|
||||
}, 400)
|
||||
setTimeout(function() {
|
||||
that.handleGetMeasure()
|
||||
}, 800)
|
||||
|
||||
}
|
||||
},
|
||||
fail: function(err) {
|
||||
console.error('震动失败:', err);
|
||||
},
|
||||
})
|
||||
},
|
||||
// 保存测量结果
|
||||
handleGetMeasure() {
|
||||
let that = this
|
||||
if (that.info.active == 3 && that.weight == 0 && that.Ycount != 0) {
|
||||
that.weight = that.Ycount
|
||||
}
|
||||
if (that.info.active == 3 && that.weight != 0 && that.Ycount != 0) {
|
||||
that.weight = Number(that.Ycount) - Number(that.weight)
|
||||
}
|
||||
if (that.info.active == 2) {
|
||||
that.time_m = Math.floor((that.time % 3600) / 60)
|
||||
that.time_s = that.time % 60
|
||||
}
|
||||
that.$model.getskipResult({
|
||||
aud_id: uni.getStorageSync('userid'),
|
||||
kcal: Math.floor(that.kcal),
|
||||
num: that.weight,
|
||||
time_m: that.time_m,
|
||||
time_s: that.time_s,
|
||||
type: that.info.active == 1 ? 'free' : that.info.active == 2 ? 'time' : 'num'
|
||||
}).then(res => {
|
||||
console.log("保存", that.time, res)
|
||||
if (res.code == 0) {
|
||||
that.bpm = that.weight / (that.time / 60)
|
||||
that.iswrapper = true
|
||||
// that.$tools.msg("数据已保存,请查看!")
|
||||
}else{
|
||||
that.$tools.msg(res.msg)
|
||||
}
|
||||
// setTimeout(function() {
|
||||
// uni.redirectTo({
|
||||
// url: "/pages/skip/skip?info=" + JSON.stringify(that.info)
|
||||
// })
|
||||
// }, 200)
|
||||
})
|
||||
},
|
||||
// 开始指令
|
||||
handleStart(text) {
|
||||
let that = this
|
||||
let j = null
|
||||
let str = null
|
||||
if (text == '连续') {
|
||||
j = Number(165 + 5 + 3).toString(16)
|
||||
str = "A5050300" + j.substr(j.length - 2, 2)
|
||||
console.log("连续连续", str)
|
||||
}
|
||||
if (text == '停止') {
|
||||
j = Number(165 + 5 + 3 + 5).toString(16)
|
||||
str = "A5050305" + j.substr(j.length - 2, 2)
|
||||
console.log("停止连续", str)
|
||||
}
|
||||
if (text == '开始') {
|
||||
j = Number(165 + 5 + 5).toString(16)
|
||||
str = "A5050500" + j.substr(j.length - 2, 2)
|
||||
}
|
||||
if (text == '结束') {
|
||||
j = Number(165 + 5 + 5 + 1).toString(16)
|
||||
str = "A5050501" + j.substr(j.length - 2, 2)
|
||||
console.log("结束指令", str)
|
||||
}
|
||||
if (text == '继续') {
|
||||
j = Number(165 + 5 + 4).toString(16)
|
||||
str = "A5050400" + j.substr(j.length - 2, 2)
|
||||
console.log("继续指令", str)
|
||||
}
|
||||
if (text == '暂停') {
|
||||
j = Number(165 + 5 + 4 + 1).toString(16)
|
||||
str = "A5050401" + j.substr(j.length - 2, 2)
|
||||
console.log("暂停指令", str)
|
||||
}
|
||||
that.SendData(str)
|
||||
},
|
||||
handleTarget() {
|
||||
let that = this
|
||||
uni.$emit('updateData', JSON.stringify(that.info))
|
||||
uni.navigateBack({ //返回
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
//
|
||||
handleEnd() {
|
||||
let that = this
|
||||
that.handleStart('停止')
|
||||
setTimeout(function() {
|
||||
that.handleStart('结束')
|
||||
}, 400)
|
||||
setTimeout(function() {
|
||||
uni.redirectTo({
|
||||
url: "/pages/skip/skip?info=" + JSON.stringify(that.info)
|
||||
})
|
||||
}, 600)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
</style>
|
||||
.item-ite {
|
||||
line-height: 20PX;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.title {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: 30px;
|
||||
|
||||
image {
|
||||
width: 200px;
|
||||
height: 252px;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.end {
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
bottom: 80px;
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
line-height: 70px;
|
||||
background: $btncolor;
|
||||
margin-left: calc(50% - 35px);
|
||||
border-radius: 50px;
|
||||
text-align: center;
|
||||
box-shadow: 0px 1px 5px 2px #dfe2e1fc;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
|
||||
.edit {
|
||||
width: 80% !important;
|
||||
background-color: #fff;
|
||||
|
||||
}
|
||||
|
||||
.editem {
|
||||
height: initial;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
|
||||
view {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.center {
|
||||
background-color: #eee;
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
margin: 45px 0;
|
||||
font-size: 14px;
|
||||
border-radius: 5px;
|
||||
height: 65px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
image {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
margin-right: 10px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
.name {
|
||||
margin-top: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.item-ite {
|
||||
line-height: 20px;
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
|
||||
text {
|
||||
display: block;
|
||||
width: 100%;
|
||||
font-size: 18px;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-top: 25px;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
background: $btncolor;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -32,43 +32,47 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="title" v-if="number3==''">
|
||||
<view class="">您好!第<text>{{number1!=""?'二':number2!=''?'三':'一'}}</text>次测试开始</view>
|
||||
<view>放下呼吸训练器,缓慢呼气,尽可能排空肺部气体</view>
|
||||
<view class="cgreen">使用呼吸训练器,缓慢吸气,直至到达极限</view>
|
||||
<view :class="[second==5?'cgreen':'']">您好!第<text>{{number1!=0?'二':number2!=''?'三':'一'}}</text>次测试开始
|
||||
</view>
|
||||
<view :class="[second==3?'cgreen':'']">放下呼吸训练器,缓慢呼气,尽可能排空肺部气体</view>
|
||||
<view :class="[second==1?'cgreen':'']">使用呼吸训练器,缓慢吸气,直至到达极限</view>
|
||||
</view>
|
||||
<view class="data" v-if="number3">
|
||||
<view class="val">
|
||||
<text>1441ml</text>
|
||||
<text>{{average.toFixed(2)}}ml</text>
|
||||
平均吸气肺活量
|
||||
</view>
|
||||
<view class="text">
|
||||
根据您的个人信息,您的达标吸气肺活量为2900ml。您本次测试吸气速度23.2L/min,肺活量测试结果1441ml。结合您的身体状态和改善目标,我们将为您生成详细的健康报告。
|
||||
根据您的个人信息,您的达标吸气肺活量为{{standard}}ml。您本次测试吸气速度{{averageS}}L/min,肺活量测试结果{{average.toFixed(2)}}ml。结合您的身体状态和改善目标,我们将为您生成详细的健康报告。
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn" v-if="number3">查看本次报告</view>
|
||||
<view class="btn close" v-if="number3">我想重新测试</view>
|
||||
<view class="btn" v-if="number1!=''&&number3==''">
|
||||
2S后开始第<text>{{number1!=""?'二':number2!=''?'三':'一'}}</text>次测试</view>
|
||||
<view class="btn" v-if="number3" @click="handleGetMeasure">查看本次报告</view>
|
||||
<view class="btn close" v-if="number3" @click="isstart=true">我想重新测试</view>
|
||||
<view class="btn" v-if="number1==0||number2==0||number3==0">
|
||||
{{second}}S后开始第<text>{{number1!=0?'二':number2!=0?'三':'一'}}</text>次测试
|
||||
</view>
|
||||
</view>
|
||||
<!-- -->
|
||||
<!-- 开始测量 -->
|
||||
<view class="weight" v-else>
|
||||
<view class="title cgreen">使用呼吸训练器,缓慢吸气,直至到达极限</view>
|
||||
<view class="box1">
|
||||
<view class="time">吸气速度 <text class="cgreen ml-5">38.3L/min</text></view>
|
||||
<view class="time">吸气速度 <text class="cgreen ml-5">{{LiuS}}L/min</text></view>
|
||||
<view class="item">
|
||||
<view class="image">
|
||||
<image src="../../static/bae.png" mode="widthFix"></image>
|
||||
<!-- -->
|
||||
<image src="../../static/01.gif" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
<view class="center mt-15">
|
||||
<view class="level"></view>
|
||||
<view class="level level-bg"></view>
|
||||
<view class="level-item" v-if="info">
|
||||
<view class="ite" v-for="(ite,ind) in list">{{ite}}</view>
|
||||
<view class="level level-bg" :style="{'top':Number(100 - offset)+'%'}"></view>
|
||||
<view class="level-item">
|
||||
<view class="ite" v-for="(ite,ind) in list">{{ite.text}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="val">
|
||||
<text>{{average}}ml</text>吸气肺活量
|
||||
<text>{{text}}ml</text>吸气肺活量
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -80,28 +84,51 @@
|
|||
mapState
|
||||
} from "vuex";
|
||||
let myTime;
|
||||
let cnt = 0;
|
||||
let count = 0;
|
||||
let lastValue = null;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isstart: true, //是否开始测量
|
||||
number1: "11",
|
||||
number2: "22",
|
||||
number3: "33",
|
||||
level1: "适中",
|
||||
level2: "适中",
|
||||
level3: "适中",
|
||||
average: "11",
|
||||
list: [],
|
||||
isEnd: false,
|
||||
isstart: false, //是否开始测量
|
||||
number1: 0,
|
||||
number2: 0,
|
||||
number3: 0,
|
||||
level1: "",
|
||||
level2: "",
|
||||
level3: "",
|
||||
average: "", //平均
|
||||
averageS: "", //平均流速
|
||||
text: 0, //实时
|
||||
LiuS: "", //流速
|
||||
macAddr: "",
|
||||
serviceId: "",
|
||||
deviceId: "",
|
||||
Unload: false,
|
||||
notify: "",
|
||||
write: "",
|
||||
second: 5, //倒计时
|
||||
standard: "", //标准
|
||||
offset: 0, //
|
||||
listS: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user", "isConnected", "isBluetoothTyle"]),
|
||||
...mapState(["user", "isConnected", "isBluetoothTyle", "lungLevel"]),
|
||||
info() {
|
||||
return this.user
|
||||
},
|
||||
list() {
|
||||
let that = this
|
||||
let standard = ""
|
||||
that.lungLevel.forEach(ite => {
|
||||
if (ite.text == "及格") {
|
||||
standard = ite.min_val
|
||||
}
|
||||
})
|
||||
that.standard = standard
|
||||
return this.lungLevel
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
|
|
@ -109,6 +136,7 @@
|
|||
if (!that.Unload) {
|
||||
clearTimeout(myTime)
|
||||
that.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
||||
that.closeBLEConnection()
|
||||
that.closeBluetoothAdapter()
|
||||
console.log("页面返回onUnload")
|
||||
}
|
||||
|
|
@ -139,12 +167,56 @@
|
|||
that.handleBack()
|
||||
}
|
||||
},
|
||||
second: function() {
|
||||
let that = this
|
||||
if (that.second <= 0) {
|
||||
cnt++
|
||||
that.isstart = true
|
||||
that.sendData("FA02A29E") //蓝牙主动上报
|
||||
that.offset = 0
|
||||
that.text = 0
|
||||
}
|
||||
},
|
||||
// 是否结束测量
|
||||
isEnd: function() {
|
||||
let that = this
|
||||
console.log("结束测量", that.isEnd)
|
||||
if (that.isEnd) {
|
||||
console.log("结束测量2", that.isEnd)
|
||||
that.isstart = false
|
||||
that.sendData("FA02A39F")
|
||||
that.level3 = that.handlelenver(that.number2)
|
||||
that.average = (Number(that.number3) + Number(that.number2) + Number(that.number1)) / 3
|
||||
var sum = 0
|
||||
for (var i = 0; i < that.listS.length; i++) {
|
||||
sum += Number(that.listS[i]);
|
||||
}
|
||||
that.averageS = (sum / that.listS.length).toFixed(2)
|
||||
console.log((sum / that.listS.length))
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 重新连接
|
||||
openBluetoothAdapter() {
|
||||
let that = this
|
||||
that.text = ""
|
||||
cnt = 0
|
||||
count = 0;
|
||||
lastValue = null;
|
||||
that.isEnd = false
|
||||
that.text = 0
|
||||
that.number1 = 0
|
||||
that.number2 = 0
|
||||
that.number3 = 0
|
||||
that.level1 = ""
|
||||
that.level2 = ""
|
||||
that.level3 = ""
|
||||
that.average = "" //平均
|
||||
that.LiuS = "" //流速
|
||||
that.second = 5 //倒计时
|
||||
that.standard = "" //标准
|
||||
that.offset = 0 //
|
||||
uni.openBluetoothAdapter({
|
||||
success: e => {
|
||||
that.startBluetoothDeviceDiscovery()
|
||||
|
|
@ -177,20 +249,13 @@
|
|||
if (!device.name && !device.localName) {
|
||||
return
|
||||
}
|
||||
if (device.name.indexOf('PC') != -1) {
|
||||
console.log("搜索设备", device)
|
||||
if (device.name.indexOf('Yihejia_Lung') != -1) {
|
||||
clearTimeout(myTime);
|
||||
let buff = device.advertisData.slice(-6)
|
||||
device.mac = new Uint8Array(buff) // 保存广播数据中的mac地址,这是由于iOS不直接返回mac地址
|
||||
let tempMac = Array.from(device.mac)
|
||||
tempMac.reverse()
|
||||
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
|
||||
if (device.deviceId.indexOf(that.deviceId) != -1 || device.macAddr.indexOf(that
|
||||
.deviceId) != -1) {
|
||||
device.macAddr = device.deviceId
|
||||
if (device.deviceId.indexOf(that.deviceId) != -1) {
|
||||
that.stopBluetoothDevicesDiscovery()
|
||||
that.macAddr = device.macAddr
|
||||
that.deviceId = device.deviceId
|
||||
that.createBLEConnection()
|
||||
console.log("that.deviceId", that.deviceId, device.deviceId)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -204,7 +269,10 @@
|
|||
uni.createBLEConnection({
|
||||
deviceId: that.deviceId,
|
||||
success: res => {
|
||||
that.getBLEDeviceServices();
|
||||
that.countdown()
|
||||
setTimeout(function() {
|
||||
that.getBLEDeviceServices()
|
||||
}, 1500)
|
||||
},
|
||||
fail: res => {
|
||||
console.log("设备连接失败,请重新连接", res);
|
||||
|
|
@ -218,7 +286,7 @@
|
|||
let serviceList = [];
|
||||
let that = this;
|
||||
uni.getBLEDeviceServices({
|
||||
deviceId: "12:F7:00:08:83:FC",
|
||||
deviceId: that.deviceId,
|
||||
success: res => {
|
||||
console.log("获取设备的UUID成功", res)
|
||||
serviceList = res.services;
|
||||
|
|
@ -248,58 +316,125 @@
|
|||
serviceId: that.serviceId,
|
||||
success: res => {
|
||||
console.log("服务的特征值成功", res)
|
||||
// * 读read: true, //,写write: true, //,通知notify: true
|
||||
for (let i = 0; i < res.characteristics.length; i++) {
|
||||
let item = res.characteristics[i];
|
||||
if (item.uuid.indexOf('0000FFE9') != -1) {
|
||||
console.log("0000FFE9")
|
||||
that.write = item.uuid
|
||||
} else if (item.uuid.indexOf('0000FFE4') != -1) {
|
||||
console.log("0000FFE4")
|
||||
that.notifyBLECharacteristicValue(item.uuid)
|
||||
} else if (item.uuid.indexOf('0000FFE0') != -1) {
|
||||
console.log("0000FFE0")
|
||||
that.notify = item.uuid
|
||||
}
|
||||
}
|
||||
uni.notifyBLECharacteristicValueChange({
|
||||
deviceId: that.deviceId,
|
||||
serviceId: that.serviceId,
|
||||
characteristicId: that.notify,
|
||||
state: true,
|
||||
})
|
||||
uni.notifyBLECharacteristicValueChange({
|
||||
deviceId: that.deviceId,
|
||||
serviceId: that.serviceId,
|
||||
characteristicId: that.write,
|
||||
state: true,
|
||||
})
|
||||
uni.onBLECharacteristicValueChange(function(res) {
|
||||
let value = that.$tools.ab2hex(res.value, "");
|
||||
// 流量
|
||||
let LiuL = value.substring(14, 16) + value.substring(10, 14)
|
||||
let LiuL2 = parseInt(LiuL, 16) / 1000
|
||||
// 流速
|
||||
let LiuS = parseInt(value.substring(22, 26), 16) + parseInt(value
|
||||
.substring(18, 22), 16)
|
||||
let LiuS2 = LiuS / 1000
|
||||
|
||||
if (Number(LiuL2) > 0) {
|
||||
that.text = LiuL2.toFixed(0)
|
||||
that.LiuS = LiuS2.toFixed(1)
|
||||
that.offset = that.handleoffset(that.text)
|
||||
// 第一次
|
||||
if (cnt == 1) {
|
||||
// 流量
|
||||
if (that.text == lastValue) {
|
||||
count++
|
||||
if (count >= 30) {
|
||||
that.isstart = false
|
||||
that.sendData("FA02A39F") //关闭蓝牙主动上报
|
||||
that.number1 = LiuL2.toFixed(0)
|
||||
that.level1 = that.handlelenver(that.number1)
|
||||
that.second = 5
|
||||
that.countdown()
|
||||
that.LiuS = 0
|
||||
return
|
||||
}
|
||||
} else {
|
||||
count = 0
|
||||
lastValue = that.text // 更新lastValue
|
||||
}
|
||||
}
|
||||
if (cnt == 2) {
|
||||
if (that.text == lastValue) {
|
||||
count++
|
||||
if (count >= 30) {
|
||||
that.isstart = false
|
||||
that.sendData("FA02A39F") //关闭蓝牙主动上报
|
||||
that.number2 = LiuL2.toFixed(0)
|
||||
that.level2 = that.handlelenver(that.number2)
|
||||
that.second = 5
|
||||
that.countdown()
|
||||
that.LiuS = 0
|
||||
return
|
||||
}
|
||||
} else {
|
||||
count = 0
|
||||
lastValue = that.text // 更新lastValue
|
||||
}
|
||||
// console.log('流量2', cnt, LiuL2, count)
|
||||
}
|
||||
if (cnt == 3) {
|
||||
// 流速
|
||||
if (that.LiuS != 0 || that.LiuS != 0.0) {
|
||||
that.listS.push(that.LiuS)
|
||||
}
|
||||
// 流量
|
||||
if (that.text == lastValue) {
|
||||
count++
|
||||
if (count >= 15) {
|
||||
that.number3 = LiuL2.toFixed(0)
|
||||
that.isEnd = true
|
||||
return
|
||||
}
|
||||
} else {
|
||||
count = 0
|
||||
lastValue = that.text // 更新lastValue
|
||||
}
|
||||
console.log('流量3', cnt, count)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: res => {
|
||||
console.log('获取特征值失败:', JSON.stringify(res))
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 开启订阅特征值
|
||||
* read: true, //读,write: true, //写,notify: true, //广播
|
||||
*/
|
||||
notifyBLECharacteristicValue(uuid) {
|
||||
let that = this;
|
||||
uni.notifyBLECharacteristicValueChange({
|
||||
state: true, // 启用 notify 功能
|
||||
// 开启蓝牙主动上报模式
|
||||
sendData(str) {
|
||||
let that = this
|
||||
let buf = new Uint8Array(str.match(/[\da-f]{2}/gi).map(function(h) {
|
||||
return parseInt(h, 16)
|
||||
}))
|
||||
uni.writeBLECharacteristicValue({
|
||||
deviceId: that.deviceId,
|
||||
serviceId: that.serviceId,
|
||||
characteristicId: uuid,
|
||||
success(res) {
|
||||
uni.onBLECharacteristicValueChange(function(res) {
|
||||
let value = that.$tools.ab2hex(res.value, "");
|
||||
let num = value.substring(18, 19)
|
||||
let dw = value.substring(19, 20)
|
||||
let type = value.substring(8, 10)
|
||||
let typeInfo = value.substring(10, 12)
|
||||
console.log("value", value)
|
||||
if (type == "10") {
|
||||
|
||||
}
|
||||
if (type == "11") {
|
||||
that.type = 2
|
||||
if (typeInfo == "03" || typeInfo == "04") {
|
||||
that.imp = parseInt(value.substring(17, 22), 16)
|
||||
}
|
||||
console.log("体脂:", that.imp)
|
||||
}
|
||||
});
|
||||
characteristicId: that.write,
|
||||
value: buf.buffer,
|
||||
success: res => {
|
||||
console.log('下发指令成功', res.errMsg)
|
||||
},
|
||||
fail(res) {
|
||||
console.log("测量失败", res.value);
|
||||
}
|
||||
});
|
||||
fail: res => {
|
||||
console.log("下发指令失败", res);
|
||||
},
|
||||
})
|
||||
},
|
||||
handleMyTime() {
|
||||
var that = this;
|
||||
|
|
@ -312,6 +447,26 @@
|
|||
}
|
||||
}, 30000);
|
||||
},
|
||||
// 等级
|
||||
handlelenver(value) {
|
||||
let that = this
|
||||
let text = ""
|
||||
that.list.forEach(ite => {
|
||||
if (Number(value) <= Number(ite.max_val) && Number(value) >= Number(ite.min_val)) {
|
||||
text = ite.text
|
||||
}
|
||||
})
|
||||
return text
|
||||
},
|
||||
//标准动态
|
||||
handleoffset(value) {
|
||||
let that = this
|
||||
let number = 0
|
||||
let length = that.list.length
|
||||
number = value / (that.list[0].max_val - that.list[length - 1].min_val) * 100
|
||||
return number.toFixed(0)
|
||||
},
|
||||
|
||||
/**
|
||||
* 停止搜索蓝牙设备
|
||||
*/
|
||||
|
|
@ -339,24 +494,24 @@
|
|||
// 保存测量结果
|
||||
handleGetMeasure() {
|
||||
let that = this
|
||||
that.$model.getmeasurefunit({
|
||||
imp: that.imp,
|
||||
weight: that.weight,
|
||||
ecode: that.macAddr,
|
||||
height: that.height,
|
||||
familyid: that.info.id
|
||||
that.$model.getMeasureLung({
|
||||
aud_id: uni.getStorageSync('userid'),
|
||||
one: that.number1,
|
||||
two: that.number2,
|
||||
three: that.number3,
|
||||
flow: that.averageS
|
||||
}).then(res => {
|
||||
that.isHeight = false
|
||||
if (res.code == 0) {
|
||||
that.$store.dispatch("getUserInfo", {
|
||||
familyid: that.info.id
|
||||
});
|
||||
that.$tools.msg("测量成功")
|
||||
} else {
|
||||
that.$tools.msg("测量失败")
|
||||
that.$store.dispatch('getUserInfo', {
|
||||
aud_id: uni.getStorageSync('userid')
|
||||
})
|
||||
that.$store.dispatch("getLungResult", {
|
||||
aud_id: uni.getStorageSync('userid')
|
||||
})
|
||||
}
|
||||
that.Unload = true
|
||||
setTimeout(function() {
|
||||
that.closeBLEConnection()
|
||||
that.closeBluetoothAdapter()
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
|
|
@ -371,12 +526,26 @@
|
|||
that.Unload = true
|
||||
that.stopBluetoothDevicesDiscovery()
|
||||
that.closeBluetoothAdapter()
|
||||
that.closeBLEConnection()
|
||||
if (ind == 1) {
|
||||
uni.switchTab({
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
}
|
||||
},
|
||||
// 5秒倒计时
|
||||
countdown() {
|
||||
let that = this
|
||||
count = 0
|
||||
lastValue = null
|
||||
var timer = setInterval(function() {
|
||||
that.second--;
|
||||
}, 1000);
|
||||
setTimeout(() => {
|
||||
clearInterval(timer)
|
||||
that.second = 0
|
||||
}, 5000)
|
||||
},
|
||||
/**
|
||||
* 断开蓝牙模块
|
||||
*/
|
||||
|
|
@ -569,12 +738,13 @@
|
|||
|
||||
image {
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.center {
|
||||
top: -10px;
|
||||
bottom: 20px;
|
||||
top: 0px;
|
||||
bottom: -15px;
|
||||
position: absolute;
|
||||
width: 55px;
|
||||
margin: auto;
|
||||
|
|
|
|||
|
|
@ -47,18 +47,18 @@
|
|||
that = this
|
||||
that.id = options ? options.id : 0
|
||||
that.openBluetoothAdapter()
|
||||
that.onBLEConnectionStateChange()
|
||||
// 监听蓝牙连接状态
|
||||
that.$Bluetooth.onBLEConnectionStateChange()
|
||||
uni.onBluetoothAdapterStateChange(function(res) {
|
||||
that.$store.commit("changeBluetooth", res.available);
|
||||
})
|
||||
},
|
||||
onUnload() {
|
||||
console.log("onUnload")
|
||||
let that = this
|
||||
console.log("onUnload", that.Unload)
|
||||
if (!that.Unload) {
|
||||
that.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
||||
that.closeBLEConnection()
|
||||
that.closeBluetoothAdapter()
|
||||
that.$Bluetooth.closeBluetoothAdapter() // 断开蓝牙模块
|
||||
that.$Bluetooth.stopBluetoothDevicesDiscovery() // 取消蓝牙搜索
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -69,10 +69,8 @@
|
|||
that.isdevTip = true
|
||||
that.devList = []
|
||||
clearTimeout(myTime);
|
||||
that.closeBLEConnection()
|
||||
that.closeBluetoothAdapter()
|
||||
that.stopBluetoothDevicesDiscovery()
|
||||
}
|
||||
console.log("蓝牙是否打开", that.isBluetoothTyle)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -87,7 +85,9 @@
|
|||
that.devList = []
|
||||
that.startBluetoothDeviceDiscovery()
|
||||
},
|
||||
fail: e => {}
|
||||
fail: e => {
|
||||
that.$Bluetooth.getBluetoothAdapter(e)
|
||||
}
|
||||
});
|
||||
},
|
||||
// 开始搜寻附近的蓝牙外围设备
|
||||
|
|
@ -114,25 +114,27 @@
|
|||
let buff = device.advertisData.slice(3, 9)
|
||||
device.mac = new Uint8Array(buff) // 保存广播数据中的mac地址,这是由于iOS不直接返回mac地址
|
||||
let tempMac = Array.from(device.mac)
|
||||
tempMac.reverse()
|
||||
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
|
||||
that.deviceId = device.macAddr
|
||||
that.handleDevice(device)
|
||||
return;
|
||||
}
|
||||
if (device.name.indexOf("PC") != -1) {
|
||||
console.log("肺活量", device)
|
||||
if (device.name.indexOf("Yihejia_Lung") != -1) {
|
||||
console.log("肺活量PCV02", device)
|
||||
clearTimeout(myTime);
|
||||
let buff = device.advertisData.slice(-6)
|
||||
device.mac = new Uint8Array(buff) // 保存广播数据中的mac地址,这是由于iOS不直接返回mac地址
|
||||
let tempMac = Array.from(device.mac)
|
||||
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
|
||||
device.macAddr = device.deviceId
|
||||
that.deviceId = device.deviceId
|
||||
that.handleDevice(device)
|
||||
return;
|
||||
}
|
||||
if (device.name.indexOf("YPC") != -1) {
|
||||
console.log("device333333", device.name, device)
|
||||
console.log("跳绳PCT02", device.name, device)
|
||||
clearTimeout(myTime);
|
||||
let buff = device.name.slice(7, 19)
|
||||
device.macAddr = that.$tools.str2Num(buff)
|
||||
device.deviceId = that.$tools.str2Num(buff)
|
||||
that.deviceId = that.$tools.str2Num(buff)
|
||||
if (device.macAddr != "") {
|
||||
that.handleDevice(device)
|
||||
}
|
||||
|
|
@ -146,8 +148,7 @@
|
|||
let that = this
|
||||
const foundDevices = that.devicesList
|
||||
const idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId)
|
||||
that.deviceId = device.macAddr;
|
||||
console.log("111", idx, device, )
|
||||
console.log("device", device, idx)
|
||||
if (idx === -1) {
|
||||
that.devicesList.push(device);
|
||||
if (device.macAddr != "") {
|
||||
|
|
@ -164,20 +165,8 @@
|
|||
}
|
||||
that.issearch = true
|
||||
clearTimeout(myTime);
|
||||
that.closeBLEConnection()
|
||||
that.closeBluetoothAdapter()
|
||||
that.stopBluetoothDevicesDiscovery() //取消蓝牙搜索
|
||||
}, 30000);
|
||||
},
|
||||
/**
|
||||
* 停止搜索蓝牙设备
|
||||
*/
|
||||
stopBluetoothDevicesDiscovery() {
|
||||
uni.stopBluetoothDevicesDiscovery({
|
||||
success: e => {
|
||||
console.log("停止搜索蓝牙设备", e)
|
||||
},
|
||||
});
|
||||
that.$Bluetooth.stopBluetoothDevicesDiscovery()
|
||||
}, 15000);
|
||||
},
|
||||
// 排查设备
|
||||
handleDevType(sn) {
|
||||
|
|
@ -186,7 +175,7 @@
|
|||
mac: sn,
|
||||
acd_id: that.id
|
||||
}).then(res => {
|
||||
console.log("排查返回", res)
|
||||
console.log("排查返回", res, sn, that.id)
|
||||
if (res.code == 0) {
|
||||
res.data.deviceId = sn
|
||||
that.devList.push(res.data);
|
||||
|
|
@ -199,43 +188,12 @@
|
|||
that.Unload = true
|
||||
console.log("跳转测量", item)
|
||||
if (item.bluetooth_type == '透传') {
|
||||
that.stopBluetoothDevicesDiscovery()
|
||||
that.$Bluetooth.stopBluetoothDevicesDiscovery()
|
||||
}
|
||||
uni.redirectTo({
|
||||
url: item.page_measure + '?deviceId=' + that.deviceId
|
||||
})
|
||||
},
|
||||
// 监听蓝牙连接状态
|
||||
onBLEConnectionStateChange() {
|
||||
let that = this
|
||||
uni.onBLEConnectionStateChange(function(res) {
|
||||
console.log("蓝牙连接状态", res.connected)
|
||||
that.$store.commit("changeConnected", res.connected);
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 断开蓝牙模块
|
||||
*/
|
||||
closeBluetoothAdapter() {
|
||||
let that = this;
|
||||
uni.closeBluetoothAdapter({
|
||||
success: res => {
|
||||
console.log('蓝牙模块关闭成功');
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 断开蓝牙连接
|
||||
*/
|
||||
closeBLEConnection() {
|
||||
var that = this;
|
||||
uni.closeBLEConnection({
|
||||
deviceId: that.deviceId,
|
||||
success: res => {
|
||||
console.log('断开蓝牙连接成功');
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -24,9 +24,10 @@
|
|||
</view>
|
||||
<!-- 手动记录 -->
|
||||
<view class="target" @click.stop>
|
||||
<view class="left" @click="$tools.handleDevicesMac(item.device_determine,item.acd_id)">蓝牙连接
|
||||
</view>
|
||||
<view class="targetBtn" @click="handlerRecord(item.acd_id)">手动记录</view>
|
||||
<view class="orangeBtn" v-if="item.acd_id==2"
|
||||
@click="$Bluetooth.handleDevicesMac(item.device_determine,item.acd_id)">蓝牙连接</view>
|
||||
<view v-else></view>
|
||||
<view class="blueBtn" @click="handlerRecord(item.acd_id)">手动记录</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 小标签 -->
|
||||
|
|
@ -73,7 +74,8 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
rtype: 0
|
||||
rtype: 0,
|
||||
transition: 1.6
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
|
@ -85,28 +87,23 @@
|
|||
},
|
||||
onLoad(options) {
|
||||
let that = this
|
||||
let systemInfo = uni.getSystemInfoSync();
|
||||
this.isAndroid = systemInfo.platform.toLowerCase() === 'android';
|
||||
uni.onLocaleChange((e) => {
|
||||
if (this.isAndroid) {
|
||||
uni.showModal({
|
||||
content: this.$t('index.language-change-confirm'),
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.setLocale(e.code);
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.setLocale(e.code);
|
||||
this.$i18n.locale = e.code;
|
||||
}
|
||||
})
|
||||
if (options && options.type == 1) {
|
||||
that.handleUserList()
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
let that = this
|
||||
that.$Bluetooth.stopBluetoothDevicesDiscovery()
|
||||
uni.hideLoading()
|
||||
},
|
||||
methods: {
|
||||
handlelenver(value) {
|
||||
let that = this
|
||||
let number = 0
|
||||
let length = that.list.length
|
||||
number = value / (that.list[0].max_val - that.list[length - 1].min_val) * 100
|
||||
return number.toFixed(0)
|
||||
},
|
||||
// 成员列表
|
||||
handleUserList() {
|
||||
let that = this
|
||||
|
|
@ -137,6 +134,9 @@
|
|||
uni.navigateTo({
|
||||
url: "/pages/card/card"
|
||||
})
|
||||
// uni.navigateTo({
|
||||
// url: "/pages/devices/PCT01"
|
||||
// })
|
||||
},
|
||||
// 报告页
|
||||
handlerReport(item) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,173 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="info">
|
||||
<view class="logo">
|
||||
<image src="../../static/logo.png"></image>
|
||||
<view>青测</view>
|
||||
<text>V{{phoneInfo.info.version}}</text>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item" @click="handleVersion">
|
||||
<view class="left">版本更新</view>
|
||||
<view class="right">
|
||||
<!-- -->
|
||||
<text class="new" v-if="phoneInfo.info.version !== phoneInfo.versionUrl.version">新版本</text>
|
||||
<uni-icons type="right"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="xieyi">
|
||||
<text>《隐私声明》</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
let dtask;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
progress: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["phoneInfo"]),
|
||||
},
|
||||
onLoad() {
|
||||
console.log("版本号", this.phoneInfo)
|
||||
},
|
||||
onBackPress() {
|
||||
dtask.onProgressUpdate((res) => {
|
||||
if (res.progress != 100) {
|
||||
dtask.abort();
|
||||
}
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
progress() {
|
||||
let that = this
|
||||
console.log("devicesList", that.progress)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleVersion() {
|
||||
let that = this
|
||||
if (that.phoneInfo.info.version === that.phoneInfo.versionUrl.version) {
|
||||
that.$tools.msg("已经是最新版本了!")
|
||||
} else {
|
||||
if (that.phoneInfo.platform === 'android') {
|
||||
uni.showLoading({
|
||||
title: '正在升级,请耐心等待'
|
||||
})
|
||||
uni.setStorageSync('VERSION', that.phoneInfo.versionUrl.version)
|
||||
that.downloadNewVersion(that.phoneInfo.versionUrl.url);
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '发现新版本 ' + that.phoneInfo.versionUrl.version,
|
||||
content: '请到App store进行升级',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
downloadNewVersion(downloadUrl) {
|
||||
let that = this
|
||||
dtask = uni.downloadFile({
|
||||
url: downloadUrl,
|
||||
success: (downloadRes) => {
|
||||
if (downloadRes.statusCode === 200) {
|
||||
uni.hideLoading();
|
||||
plus.runtime.install(
|
||||
downloadRes.tempFilePath, {
|
||||
force: true
|
||||
},
|
||||
function() {
|
||||
console.log('install success...');
|
||||
plus.runtime.restart();
|
||||
},
|
||||
function(e) {
|
||||
console.error('install fail...');
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '升级失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
dtask.onProgressUpdate((res) => {
|
||||
that.progress = res.progress
|
||||
console.log('下载进度' + that.progress + '%');
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
min-height: calc(100vh - 30px);
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
|
||||
.info {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
line-height: 30px;
|
||||
|
||||
image {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
text {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
width: calc(100% - 20px);
|
||||
border-radius: 10px;
|
||||
padding: 0 10px;
|
||||
background-color: #fff;
|
||||
margin: 50px 0;
|
||||
|
||||
.item {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.new {
|
||||
color: #fff;
|
||||
background-color: red;
|
||||
font-size: 12px;
|
||||
border-radius: 10px;
|
||||
padding: 3px 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.xieyi {
|
||||
color: $textcolor;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -40,6 +40,16 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list" @click="navTo('/pages/me/about')">
|
||||
<view class="item border-bottom">
|
||||
<view class="left">
|
||||
<view class="name">关于我们</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<uni-icons type="right"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="list" @click="navTo('/pages/login/forgetPassword?type=forgetPassword')">
|
||||
<view class="item border-bottom">
|
||||
<view class="left">
|
||||
|
|
|
|||
|
|
@ -43,8 +43,12 @@
|
|||
<view class="lan border-bottom">
|
||||
<view class="left">出生日期</view>
|
||||
<view class="right">
|
||||
<uni-datetime-picker type="date" :end="startDate" :clear-icon="false" v-model="memInfo.birthday"
|
||||
@change="maskClick" :border="false" />
|
||||
<picker mode="date" :start="startDate" :end="endDate" @change="maskClick" fields="time">
|
||||
<view class="uni-input">{{memInfo.birthday?memInfo.birthday:'请选择'}}</view>
|
||||
<icon class="iconfont icon-arrow-down-bold"></icon>
|
||||
</picker>
|
||||
<!-- <uni-datetime-picker type="date" :end="startDate" :clear-icon="false" v-model="memInfo.birthday"
|
||||
@change="maskClick" :border="false" /> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="lan border-bottom">
|
||||
|
|
@ -87,7 +91,11 @@
|
|||
},
|
||||
computed: {
|
||||
...mapState(["user", "familayList"]),
|
||||
|
||||
startDate() {
|
||||
return this.$tools.getDate("end");
|
||||
},
|
||||
endDate() {
|
||||
return this.$tools.getDate('start');
|
||||
}
|
||||
},
|
||||
|
|
@ -192,7 +200,7 @@
|
|||
},
|
||||
//确定年龄
|
||||
maskClick(e) {
|
||||
this.memInfo.birthday = e
|
||||
this.memInfo.birthday = e.detail.value
|
||||
},
|
||||
//确定性别
|
||||
onsexArr(e) {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,17 @@
|
|||
<template>
|
||||
<view class="common">
|
||||
<!-- 头部 -->
|
||||
<headerIndex></headerIndex>
|
||||
<headerIndex :isArea="false"></headerIndex>
|
||||
<!-- -->
|
||||
<view class="history" v-if="ranklist.length">
|
||||
<view class="list" v-for="(item, index) in ranklist" :key="index" @click="clickItemMethod(item.id)">
|
||||
<view class="data">
|
||||
<icon class="t-icon t-icon-shijian-mianxing-0"></icon>
|
||||
{{item.create_time}}
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="time">
|
||||
<icon class="t-icon t-icon-shijian-mianxing-0"></icon>
|
||||
{{item.create_time}}
|
||||
地区:{{item.address}}
|
||||
</view>
|
||||
<view class="number">
|
||||
{{item.score}}
|
||||
|
|
@ -114,28 +117,15 @@
|
|||
|
||||
.list {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 12px;
|
||||
|
||||
.item {
|
||||
width: calc(100% - 20px);
|
||||
.data {
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
margin-bottom: 3px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
font-weight: 700;
|
||||
line-height: 50rpx;
|
||||
padding: 10px;
|
||||
font-size: 18px !important;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
width: 70%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
align-items: center;
|
||||
|
||||
icon {
|
||||
width: 40rpx;
|
||||
|
|
@ -143,6 +133,28 @@
|
|||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
width: calc(100% - 20px);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background: #fff;
|
||||
font-weight: 700;
|
||||
line-height: 50rpx;
|
||||
padding: 10px;
|
||||
font-size: 18px !important;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
// font-size: 28rpx;
|
||||
// color: #666;
|
||||
// width: 70%;
|
||||
// overflow: hidden;
|
||||
// text-overflow: ellipsis;
|
||||
// white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -17,11 +17,12 @@
|
|||
<view class="title">
|
||||
<view class="name">{{ite.name}}</view>
|
||||
</view>
|
||||
<view class="item3" v-for="(it,id) in ite.list">
|
||||
<view class="item3" v-for="(it,id) in ite.list" v-if="ite.list.length>1">
|
||||
<view class="name">{{it.name}}</view>
|
||||
<view class="weight">
|
||||
<view class="input">{{it.value}}{{it.unit}}</view>
|
||||
<view class="cblue bold" >{{it.proportion_value}}</view>
|
||||
<view class="input">{{it.value?it.value:'-'}}</view>
|
||||
<view class="cblue bold">{{it.score?it.score:'-'}}</view>
|
||||
<view class="cblue bold">{{it.proportion_value?it.proportion_value:'-'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
@ -64,9 +65,9 @@
|
|||
console.log("历史记录详情", res)
|
||||
if (res.code != 0) return
|
||||
that.selectllist = res.data.list
|
||||
that.score = res.data.total_score
|
||||
that.score = Number(res.data.score)
|
||||
that.create_time = res.data.create_time
|
||||
that.chartData.series[0].data = res.data.total_score / 50
|
||||
that.chartData.series[0].data = Number(res.data.score) / 50
|
||||
})
|
||||
},
|
||||
|
||||
|
|
@ -156,6 +157,15 @@
|
|||
position: relative;
|
||||
justify-content: space-between;
|
||||
|
||||
view {
|
||||
width: 30%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<!-- 头部 -->
|
||||
<headerIndex></headerIndex>
|
||||
<headerIndex @getAciveCity="getAciveCity"></headerIndex>
|
||||
<!-- 估分 -->
|
||||
<view class="box">
|
||||
<view class="title bold">本次估分成绩为</view>
|
||||
|
|
@ -10,53 +10,63 @@
|
|||
</view>
|
||||
<view class="name">{{score?score:'--'}}</view>
|
||||
<view class="btn history" @click="navTo('/pages/score/history')">估分历史</view>
|
||||
<!-- <view class="groupBtn">
|
||||
<view class="btn" @click="navTo('/pages/score/history')">估分历史</view>
|
||||
<view class="btn" @click="$store.commit('changeSlider',true)">分数占比</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- -->
|
||||
<view v-for="(item,index) in selectllist">
|
||||
<view class="titleName bold mt-15 ml-15 size18">{{item.name}}</view>
|
||||
<view class="indexCarList">
|
||||
<view class="card" v-for="(ite,ind) in item.list">
|
||||
<view class="title">
|
||||
<view class="name">{{ite.name}}</view>
|
||||
<view class="right" v-if="ite.is_choice!=0" @click="handleHistory(ite)">切换项目</view>
|
||||
</view>
|
||||
<view class="item3" v-for="(it,id) in ite.list">
|
||||
<view class="name">{{it.name}}</view>
|
||||
<view v-if="selectllist.length">
|
||||
<view v-for="(item,index) in selectllist">
|
||||
<view class="titleName bold mt-15 ml-15 size18">{{item.name}}</view>
|
||||
<view class="indexCarList">
|
||||
<view class="card" v-for="(ite,ind) in item.list">
|
||||
<view class="title">
|
||||
<view class="name">{{ite.name}}</view>
|
||||
<view class="right" v-if="ite.is_choice!=0" @click="handleHistory(ite)">选择项目</view>
|
||||
</view>
|
||||
<!-- 列表 -->
|
||||
<view class="item3" v-for="(it,ik) in ite.list" :key="ik" v-if="!isresult">
|
||||
<view class="name">{{it.name}}</view>
|
||||
<view class="weight">
|
||||
<view class="input">
|
||||
<!-- 整数类型 -->
|
||||
<input type="number" v-model="it.value" confirm-type="done" placeholder="请输入"
|
||||
v-if="it.type ==1" />
|
||||
<!-- 小数类型 -->
|
||||
<input type="digit" v-model="it.value" confirm-type="done" placeholder="请输入"
|
||||
maxlength="4" v-else-if="it.type ==2||it.type ==3" />
|
||||
<!-- 分秒类型 -->
|
||||
<picker mode="multiSelector" :range="timeList" @change="bindTimeChange($event,it)"
|
||||
v-else-if="it.type ==4">
|
||||
<view>{{it.value?it.value:'请选择'}}</view>
|
||||
<uni-icons type="down" color="#999" size="20" class="down"></uni-icons>
|
||||
</picker>
|
||||
|
||||
<view class="weight" v-if="!it.proportion_value">
|
||||
<view class="input">
|
||||
<!-- 整数类型 -->
|
||||
<input type="number" v-model="it.value" confirm-type="done" placeholder="请输入"
|
||||
v-if="it.type ==1" />
|
||||
<!-- 小数类型 -->
|
||||
<input type="digit" v-model="it.value" confirm-type="done" placeholder="请输入"
|
||||
maxlength="4" v-else-if="it.type ==2||it.type ==3" />
|
||||
<!-- 分秒类型 -->
|
||||
<picker mode="multiSelector" :range="timeList" @change="bindTimeChange($event,it)"
|
||||
v-else-if="it.type ==4">
|
||||
<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>
|
||||
<uni-icons type="clear" color="#999" v-if="it.value &&it.type !=4"
|
||||
@click="it.value=''" size="20"></uni-icons>
|
||||
</view>
|
||||
<text>{{it.unit}}</text>
|
||||
</view>
|
||||
<text>{{it.unit}}</text>
|
||||
</view>
|
||||
<view v-else class="weight">
|
||||
<view class="input">{{it.value}}{{it.unit}}</view>
|
||||
<view class="cblue bold">{{it.proportion_value}}</view>
|
||||
<!-- 结果展示 -->
|
||||
<view class="result item3" v-for="(ita,idx) in ite.list" :key="idx" v-if="isresult&&ite.list.length>1">
|
||||
<view class="name">{{ita.name}}</view>
|
||||
<view class="weight">
|
||||
<view style="width: 40%;">{{ita.value?ita.value:'-'}}</view>
|
||||
<view class="cblue bold">{{ita.score?ita.score:'-'}}</view>
|
||||
<view class="cblue bold">{{ita.proportion_value?ita.proportion_value:'-'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="gfbtn" v-if="isSports" @click="getList()">重新估分</view>
|
||||
<view class="gfbtn" @click="handlescore()" v-else>开始估分</view>
|
||||
</view>
|
||||
<view class="gfbtn" v-if="isSports" @click="getList()">重新估分</view>
|
||||
<view class="gfbtn" @click="handlescore()" v-else>开始估分</view>
|
||||
<!-- -->
|
||||
<view class="nolist" v-else>
|
||||
<image src="../../static/none.png"></image>
|
||||
<text>{{msg}}</text>
|
||||
</view>
|
||||
|
||||
<!-- 占比 -->
|
||||
<uslider></uslider>
|
||||
<!-- 弹框 -->
|
||||
|
|
@ -98,7 +108,7 @@
|
|||
}]
|
||||
},
|
||||
sportsList: [],
|
||||
List: [],
|
||||
List: [],
|
||||
score: 0,
|
||||
isDrawe: false,
|
||||
selectllist: [],
|
||||
|
|
@ -107,6 +117,9 @@
|
|||
timeList: [],
|
||||
timesTndex: [0, 0],
|
||||
isSports: false,
|
||||
msg: "",
|
||||
address: "",
|
||||
isresult: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -127,14 +140,15 @@
|
|||
that.sportsList = []
|
||||
that.timeList = that.$tools.gethms()
|
||||
if (that.familayList.length) {
|
||||
that.address = that.user.address
|
||||
that.getList()
|
||||
that.handleSportsList()
|
||||
}
|
||||
|
||||
},
|
||||
onShow() {
|
||||
let that = this
|
||||
that.isSports = false
|
||||
// that.isresult = false
|
||||
// that.isSports = false
|
||||
if (!that.familayList.length) {
|
||||
that.score = 0
|
||||
that.selectllist = []
|
||||
|
|
@ -143,31 +157,46 @@
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
userId() {
|
||||
// userId() {
|
||||
// let that = this
|
||||
// that.score = 0
|
||||
// that.selectllist = []
|
||||
// that.sportsList = []
|
||||
// that.address = that.user.address
|
||||
// that.getList()
|
||||
// that.handleSportsList()
|
||||
// console.log("user变了", that.sportsList, that.selectllist)
|
||||
// },
|
||||
},
|
||||
methods: {
|
||||
getAciveCity(item) {
|
||||
console.log("item", item)
|
||||
let that = this
|
||||
that.address = item
|
||||
that.score = 0
|
||||
that.isresult = false
|
||||
that.selectllist = []
|
||||
that.sportsList = []
|
||||
that.getList()
|
||||
that.handleSportsList()
|
||||
console.log("user变了", that.sportsList, that.selectllist)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
//
|
||||
getList() {
|
||||
let that = this
|
||||
that.isresult = false
|
||||
that.isSports = false
|
||||
that.$model.getSportsListAll({
|
||||
aud_id: uni.getStorageSync('userid'),
|
||||
gender: uni.getStorageSync('gender'),
|
||||
parameter_data: '北京'
|
||||
parameter_data: that.address
|
||||
}).then((res) => {
|
||||
console.log("项目", res)
|
||||
if (res.code != 0) return
|
||||
console.log("全部项目", res)
|
||||
if (res.code != 0) {
|
||||
that.msg = res.msg
|
||||
return
|
||||
}
|
||||
that.score = 0
|
||||
that.selectllist = res.data.list
|
||||
that.selectllist = res.data
|
||||
that.chartData.series[0].data = 0.8
|
||||
that.handleSportsList()
|
||||
})
|
||||
},
|
||||
// 地区单个类型项目列表
|
||||
|
|
@ -176,7 +205,7 @@
|
|||
that.$model.getSportsList({
|
||||
aud_id: uni.getStorageSync('userid'),
|
||||
gender: uni.getStorageSync('gender'),
|
||||
parameter_data: '北京'
|
||||
address: that.address
|
||||
}).then((res) => {
|
||||
console.log("单地区", res)
|
||||
if (res.code != 0) return
|
||||
|
|
@ -193,7 +222,6 @@
|
|||
that.selectllist.forEach(item => {
|
||||
item.list.forEach(ite => {
|
||||
ite.list.forEach(it => {
|
||||
console.log("1111", it.value)
|
||||
it.value = it.value == "" ? "0" : it.value
|
||||
})
|
||||
})
|
||||
|
|
@ -201,8 +229,8 @@
|
|||
that.$model.getSportsData({
|
||||
aud_id: uni.getStorageSync('userid'),
|
||||
gender: uni.getStorageSync('gender'),
|
||||
parameter_data: '北京市,province',
|
||||
result_data: JSON.stringify(that.selectllist),
|
||||
parameter_data: that.address,
|
||||
result_data: that.selectllist,
|
||||
}).then((res) => {
|
||||
console.log("开始估分", res)
|
||||
if (res.code != 0) {
|
||||
|
|
@ -210,6 +238,7 @@
|
|||
return
|
||||
}
|
||||
that.isSports = true
|
||||
that.isresult = true
|
||||
that.selectllist = res.data.list
|
||||
that.score = res.data.total_score
|
||||
that.chartData.series[0].data = Number(res.data.total_score) / 50
|
||||
|
|
@ -228,7 +257,7 @@
|
|||
})
|
||||
that.isDrawe = true
|
||||
},
|
||||
bindTimeChange(e, it) {
|
||||
bindTimeChange(e, it) {
|
||||
let that = this
|
||||
let minute = e.target.value[0]
|
||||
let second = e.target.value[1]
|
||||
|
|
@ -410,7 +439,7 @@
|
|||
}
|
||||
|
||||
.input {
|
||||
width: 80% !important;
|
||||
width: 70%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
|
@ -445,17 +474,25 @@
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
color: $btncolor;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.result {
|
||||
width: 100%;
|
||||
|
||||
.weight {
|
||||
view {
|
||||
width: 30% !important;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.charts {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,11 @@
|
|||
<view class="content skipping">
|
||||
<!-- -->
|
||||
<view class="skiptop">
|
||||
<view class="status" @click="$tools.handleDevicesMac(isdevice,acd_id)"><text>设备连接</text></view>
|
||||
<view class="status" @click="handleisSdevice()">
|
||||
<text>{{islink==0?"正在连接":islink==1?'连接成功':'重新连接'}}</text>
|
||||
<image v-if="islink!=1" :class="[islink==-1?'':'icon_link']" src="../../static/zhuan.png"></image>
|
||||
<image v-if="islink==1" src="../../static/dui.png"></image>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item-ite">今日个数<text>{{info?info.today_jump_num:'--'}}</text></view>
|
||||
<view class="item-ite">今日时长<text>{{info?info.today_jump_time:'--'}}</text></view>
|
||||
|
|
@ -17,59 +21,64 @@
|
|||
</view>
|
||||
<!--自由训练 -->
|
||||
<view class="box1 box" v-if="active==1">
|
||||
<view class="time">{{info?info.last_record_time:'--'}}</view>
|
||||
<view class="item">
|
||||
<text class="item-ite">个数</text>
|
||||
<text class="bold">{{info?info.last_jump_num:'--'}}</text>
|
||||
<text class="item-set item-set0">自由</text>
|
||||
<text class="tips">无限制</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view :class="[isConnection?'start':'start Nstart']" @click="handleStart(1)">开始</view>
|
||||
<!-- <view class="item">
|
||||
<text class="item-ite">本次时长</text>
|
||||
<text class="bold">{{info?info.last_jump_time:'--'}}</text>
|
||||
<text class="bold">{{info?info.last_jump_time:'0'}}</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="item-ite">消耗卡路里</text>
|
||||
<text class="bold">{{info?info.last_jump_kcal:'--'}}</text>
|
||||
</view>
|
||||
<text class="bold">{{info?info.last_jump_kcal:'0'}}</text>
|
||||
</view> -->
|
||||
</view>
|
||||
<!--定时训练 -->
|
||||
<view class="box1 box" v-if="active==2">
|
||||
<view class="time">2024/03/25</view>
|
||||
<view class="item">
|
||||
<view class="item-set">
|
||||
<picker mode="multiSelector" :range="timeList" :value="timesTndex" @change="bindTimeChange">
|
||||
<view class="size26">{{timeList[0][timesTndex[0]]}}{{timeList[1][timesTndex[1]]}}</view>
|
||||
</picker>
|
||||
<uni-icons class="iconfont icon-bianji" color="#FEC407" size="20"></uni-icons>
|
||||
<text @click="handleTimeEdit('减')">-</text>
|
||||
<text>{{time_m}}:{{time_s}}</text>
|
||||
<text @click="handleTimeEdit('加')">+</text>
|
||||
</view>
|
||||
<view class="tips">
|
||||
<picker mode="multiSelector" :range="timeList" :value="timesTndex" @change="bindTimeChange">
|
||||
<view>调整目标</view>
|
||||
</picker>
|
||||
</view>
|
||||
<text class="tips">调整目标</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view :class="[isConnection?'start':'start Nstart']" @click="handleStart(2)">开始</view>
|
||||
<!-- <view class="item">
|
||||
<text class="item-ite">本次个数</text>
|
||||
<text>--</text>
|
||||
<text></text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="item-ite">消耗卡路里</text>
|
||||
<text>--</text>
|
||||
</view>
|
||||
<text></text>
|
||||
</view> -->
|
||||
</view>
|
||||
<!--定数训练 -->
|
||||
<view class="box1 box" v-if="active==3">
|
||||
<view class="time">2024/03/25</view>
|
||||
<view class="item">
|
||||
<view class="item-set">
|
||||
<input type="digit" v-model='weight' confirm-type="done" @blur="handleBlur" />
|
||||
<uni-icons class="iconfont icon-bianji" color="#FEC407" size="20"></uni-icons>
|
||||
<text @click="handleWeightEdit('减')">-</text>
|
||||
<text v-if="!disabled">{{weight>50?weight:50}}</text>
|
||||
<input type="number" v-model="weight" focus="true" v-else @blur="disabled=false">
|
||||
<text @click="handleWeightEdit('加')">+</text>
|
||||
</view>
|
||||
<text class="tips">调整目标</text>
|
||||
<text class="tips" @click="disabled=true">调整目标</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view :class="[isConnection?'start':'start Nstart']" @click="handleStart(3)">开始</view>
|
||||
<!-- <view class="item">
|
||||
<text class="item-ite">本次时长</text>
|
||||
<text>--</text>
|
||||
<text>0</text>
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="item-ite">消耗卡路里</text>
|
||||
<text>--</text>
|
||||
</view>
|
||||
<text>0</text>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- -->
|
||||
<view class="gridList">
|
||||
|
|
@ -106,6 +115,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
let myTime;
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
|
|
@ -115,49 +125,422 @@
|
|||
return {
|
||||
active: 1,
|
||||
acd_id: 6,
|
||||
isdevice: false,
|
||||
weight: 500,
|
||||
weight: 50,
|
||||
disabled: false,
|
||||
isDevice: false,
|
||||
isConnection: false,
|
||||
time_m: "",
|
||||
time_s: "",
|
||||
timeList: [],
|
||||
timesTndex: [0, 0]
|
||||
timesTndex: [1, 0],
|
||||
deviceId: "",
|
||||
serviceId: "",
|
||||
write: "",
|
||||
notify: "",
|
||||
islink: 0 //0连接中,1成功,-1失败
|
||||
}
|
||||
},
|
||||
components: {
|
||||
record
|
||||
},
|
||||
computed: {
|
||||
...mapState(["MeasureSkip"]),
|
||||
...mapState(['user', "MeasureSkip", "isConnected", "isBluetoothTyle", "devicesList"]),
|
||||
info() {
|
||||
return this.MeasureSkip
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
let that = this
|
||||
that.timeList = that.$tools.gethms()
|
||||
that.time_m = that.timeList[0][1].substring(0, 2)
|
||||
that.time_s = that.timeList[1][0].substring(0, 2)
|
||||
},
|
||||
onLoad(options) {
|
||||
let that = this
|
||||
that.acd_id = options.acd_id
|
||||
that.isdevice = options.device
|
||||
// 首页进入
|
||||
if (options && options.acd_id) {
|
||||
that.acd_id = options.acd_id
|
||||
that.isDevice = options.device
|
||||
setTimeout(function() {
|
||||
that.handleisSdevice()
|
||||
}, 1000)
|
||||
}
|
||||
// 跳绳页返回
|
||||
if (options && options.info) {
|
||||
let data = JSON.parse(options.info)
|
||||
that.active = data.active
|
||||
that.deviceId = data.deviceId
|
||||
that.serviceId = data.serviceId
|
||||
that.write = data.write
|
||||
that.notify = data.notify
|
||||
that.islink = 1
|
||||
that.notifyBLECharacteristicValue()
|
||||
}
|
||||
console.log('options', options)
|
||||
that.$store.dispatch("getSkipResult", {
|
||||
aud_id: uni.getStorageSync('userid')
|
||||
})
|
||||
console.log("跳绳传参", options)
|
||||
that.isConnection = that.isConnected
|
||||
that.$Bluetooth.onBLEConnectionStateChange()
|
||||
uni.onBluetoothAdapterStateChange(function(res) {
|
||||
that.$store.commit("changeBluetooth", res.available);
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
this.timeList = this.$tools.gethms()
|
||||
onShow() {
|
||||
let that = this
|
||||
// 跳绳页返回
|
||||
uni.$on('updateData', function(data) {
|
||||
let info = JSON.parse(data)
|
||||
that.acd_id = info.acd_id
|
||||
that.isDevice = info.device
|
||||
console.log('监听到事件来自 updateData ,携带参数为:' + info);
|
||||
})
|
||||
},
|
||||
onBackPress(options) {
|
||||
let that = this
|
||||
clearTimeout(myTime);
|
||||
that.isConnection = false
|
||||
that.$Bluetooth.closeBluetoothAdapter()
|
||||
that.$Bluetooth.stopBluetoothDevicesDiscovery()
|
||||
that.$store.commit("changeBluetooth", false);
|
||||
that.$store.commit("changeConnected", false);
|
||||
console.log("skip页面返回onBackPress005", options)
|
||||
},
|
||||
watch: {
|
||||
devicesList() {
|
||||
let that = this
|
||||
if (that.devicesList.length) {
|
||||
clearTimeout(myTime);
|
||||
that.$Bluetooth.stopBluetoothDevicesDiscovery()
|
||||
that.handleDevType(that.devicesList[0].macAddr)
|
||||
}
|
||||
console.log("devicesList", that.devicesList)
|
||||
},
|
||||
isConnected() {
|
||||
let that = this
|
||||
if (!that.isBluetoothTyle) {
|
||||
that.islink = -1
|
||||
}
|
||||
// that.isConnection = that.isConnected
|
||||
console.log("蓝牙是否连接", that.isConnected)
|
||||
},
|
||||
isBluetoothTyle() {
|
||||
let that = this
|
||||
if (!that.isBluetoothTyle) {
|
||||
that.isConnection = false
|
||||
that.islink = -1
|
||||
}
|
||||
console.log("蓝牙是否打开", that.isBluetoothTyle)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
bindTimeChange(e) {
|
||||
console.log("picker携带值", e.target.vaule)
|
||||
this.timesTndex = e.target.vaule
|
||||
handleisSdevice() {
|
||||
let that = this
|
||||
if (that.isConnected) return
|
||||
if (that.isDevice == 'true') {
|
||||
that.$Bluetooth.stopBluetoothDevicesDiscovery()
|
||||
uni.openBluetoothAdapter({
|
||||
success: e => {
|
||||
that.islink = 0
|
||||
that.handleMyTime()
|
||||
that.$store.commit("changedevicesList", []);
|
||||
that.$store.commit("changeBluetooth", true)
|
||||
that.$Bluetooth.startBluetoothDeviceDiscovery()
|
||||
console.log('初始化蓝牙成功:' + e.errMsg);
|
||||
},
|
||||
fail: e => {
|
||||
that.islink = -1
|
||||
that.$Bluetooth.getBluetoothAdapter(e)
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
that.$tools.msg("请先添加设备!")
|
||||
setTimeout(function() {
|
||||
uni.switchTab({
|
||||
url: "/pages/business/business"
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
// 设备排查
|
||||
handleDevType(sn) {
|
||||
let that = this
|
||||
that.$model.getdevdetail({
|
||||
mac: sn,
|
||||
acd_id: that.acd_id
|
||||
}).then(res => {
|
||||
console.log("排查返回", res)
|
||||
if (res.code == 0) {
|
||||
that.deviceId = sn
|
||||
that.createBLEConnection()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 连接蓝牙
|
||||
createBLEConnection() {
|
||||
let that = this;
|
||||
uni.createBLEConnection({
|
||||
deviceId: that.deviceId,
|
||||
success: res => {
|
||||
setTimeout(function() {
|
||||
uni.hideLoading()
|
||||
that.islink = 1
|
||||
that.isConnection = true
|
||||
that.getBLEDeviceServices()
|
||||
}, 1000)
|
||||
},
|
||||
fail: res => {
|
||||
console.log("设备连接失败,请重新连接", res);
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取设备的UUID
|
||||
*/
|
||||
getBLEDeviceServices() {
|
||||
let serviceList = [];
|
||||
let that = this;
|
||||
uni.getBLEDeviceServices({
|
||||
deviceId: that.deviceId,
|
||||
success: res => {
|
||||
console.log("获取设备的UUID成功", res)
|
||||
serviceList = res.services;
|
||||
for (let i = 0; i < serviceList.length; i++) {
|
||||
let service = serviceList[i];
|
||||
if (service.uuid.indexOf("FFE0") != -1) {
|
||||
that.serviceId = service.uuid;
|
||||
that.getBLEDeviceCharacteristics();
|
||||
console.log("设备的FFE0的serviceId: " + that.serviceId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
console.log('获取设备的UUID失败:', res)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取指定服务的特征值
|
||||
*/
|
||||
getBLEDeviceCharacteristics() {
|
||||
let characteristicsList = [];
|
||||
let that = this;
|
||||
uni.getBLEDeviceCharacteristics({
|
||||
deviceId: that.deviceId,
|
||||
serviceId: that.serviceId,
|
||||
success: res => {
|
||||
console.log("服务的特征值成功", res)
|
||||
// * 读read: true, //,写write: true, //,通知notify: true
|
||||
for (let i = 0; i < res.characteristics.length; i++) {
|
||||
let item = res.characteristics[i];
|
||||
if (item.uuid.indexOf('0000FF12') != -1) {
|
||||
that.write = item.uuid
|
||||
|
||||
} else if (item.uuid.indexOf('0000FFE4') != -1) {
|
||||
that.notify = item.uuid
|
||||
}
|
||||
}
|
||||
setTimeout(function() {
|
||||
let j = Number(165 + 10 + 1 + 8 + 8 + 8 + 8 + 8 + 8).toString(16)
|
||||
let str = "A50A01080808080808" + j.substr(j.length - 2, 2)
|
||||
that.SendData(str)
|
||||
}, 200)
|
||||
// 体重
|
||||
setTimeout(function() {
|
||||
that.handleStart(4)
|
||||
}, 400)
|
||||
uni.notifyBLECharacteristicValueChange({
|
||||
deviceId: that.deviceId,
|
||||
serviceId: that.serviceId,
|
||||
characteristicId: that.notify,
|
||||
state: true,
|
||||
})
|
||||
uni.notifyBLECharacteristicValueChange({
|
||||
deviceId: that.deviceId,
|
||||
serviceId: that.serviceId,
|
||||
characteristicId: that.write,
|
||||
state: true,
|
||||
})
|
||||
that.notifyBLECharacteristicValue()
|
||||
},
|
||||
fail: res => {
|
||||
console.log('获取特征值失败:', JSON.stringify(res))
|
||||
}
|
||||
})
|
||||
},
|
||||
notifyBLECharacteristicValue() {
|
||||
let that = this;
|
||||
uni.notifyBLECharacteristicValueChange({
|
||||
state: true, // 启用 notify 功能
|
||||
deviceId: that.deviceId,
|
||||
serviceId: that.serviceId,
|
||||
characteristicId: that.notify,
|
||||
success(res) {
|
||||
uni.onBLECharacteristicValueChange(function(res) {
|
||||
let value = that.$tools.ab2hex(res.value, "");
|
||||
if (value == '5a05090169') { //模式设置成功
|
||||
let info = {
|
||||
active: that.active,
|
||||
deviceId: that.deviceId,
|
||||
serviceId: that.serviceId,
|
||||
notify: that.notify,
|
||||
write: that.write,
|
||||
acd_id: that.acd_id,
|
||||
isDevice: that.isDevice
|
||||
}
|
||||
setTimeout(function() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/devices/PCT01?info=" + JSON.stringify(
|
||||
info)
|
||||
})
|
||||
}, 600)
|
||||
}
|
||||
console.log("value", value, that.active)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 开启蓝牙主动上报模式
|
||||
SendData(str) {
|
||||
let that = this
|
||||
let buf = new Uint8Array(str.match(/[\da-f]{2}/gi).map(function(h) {
|
||||
return parseInt(h, 16)
|
||||
}))
|
||||
console.log("xiafa", that.write, that.serviceId)
|
||||
uni.writeBLECharacteristicValue({
|
||||
deviceId: that.deviceId,
|
||||
serviceId: that.serviceId,
|
||||
characteristicId: that.write,
|
||||
value: buf.buffer,
|
||||
success: res => {
|
||||
console.log('下发指令成功', res.errMsg)
|
||||
},
|
||||
fail: res => {
|
||||
console.log("下发指令失败", res);
|
||||
},
|
||||
})
|
||||
},
|
||||
// 模式切换
|
||||
handleStart(ind) {
|
||||
let that = this
|
||||
let m = null
|
||||
let send = null
|
||||
if (!that.isConnected) {
|
||||
that.$tools.msg("请先连接设备!")
|
||||
return
|
||||
}
|
||||
if (ind == 1) { // 1自由
|
||||
m = Number(165 + 8 + 9).toString(16)
|
||||
send = "A5080900000000" + m.substr(m.length - 2, 2)
|
||||
}
|
||||
if (ind == 2) { //2定时
|
||||
let time = Number(that.time_m) * 60 + Number(that.time_s)
|
||||
m = Number(165 + 8 + 9 + time).toString(16)
|
||||
send = "A508090000" + that.$tools.toHex(time, 4) + m.substr(m.length - 2, 2)
|
||||
}
|
||||
if (ind == 3) { //3定数
|
||||
let weight = that.$tools.toHex(that.weight, 4)
|
||||
m = Number(165 + 8 + 9 + that.weight).toString(16)
|
||||
send = "A50809" + weight + "0000" + m.substr(m.length - 2, 2)
|
||||
}
|
||||
if (ind == 4) { //体重
|
||||
|
||||
let weight = Number(that.user.weight) * 2
|
||||
let num = parseInt(weight).toString();
|
||||
m = Number(165 + 5 + 8 + Number(num)).toString(16)
|
||||
send = "A50508" + Number(num).toString(16) + m.substr(m.length - 2, 2)
|
||||
}
|
||||
that.SendData(send)
|
||||
that.$Bluetooth.stopBluetoothDevicesDiscovery()
|
||||
},
|
||||
// 历史数据删除时重新加载接口
|
||||
reload() {
|
||||
let that = this
|
||||
console.log('重新加载');
|
||||
this.$nextTick(() => {
|
||||
that.$store.dispatch("getSkipResult", {
|
||||
aud_id: uni.getStorageSync('userid')
|
||||
})
|
||||
})
|
||||
},
|
||||
// 定时训练
|
||||
//
|
||||
bindTimeChange(e) {
|
||||
let that = this
|
||||
let m = e.target.value[0]
|
||||
let s = e.target.value[1]
|
||||
that.timesTndex = e.target.value
|
||||
let time_m = Number(that.timeList[0][m].substring(0, 2)) * 60
|
||||
let time_s = Number(that.timeList[1][s].substring(0, 2))
|
||||
if (Number(time_m + time_s) < 30) {
|
||||
that.time_m = '00'
|
||||
that.time_s = '30'
|
||||
} else {
|
||||
that.time_m = that.timeList[0][m].substring(0, 2)
|
||||
that.time_s = that.timeList[1][s].substring(0, 2)
|
||||
}
|
||||
},
|
||||
handleTimeEdit(text) {
|
||||
let that = this
|
||||
let time_m = Number(that.time_m) * 60
|
||||
let time_s = Number(that.time_s)
|
||||
let minutes = null
|
||||
let seconds = null
|
||||
|
||||
if (Number(time_m + time_s) >= 3570 && text == '加') {
|
||||
that.time_m = '59'
|
||||
that.time_s = '59'
|
||||
return
|
||||
}
|
||||
if (Number(time_m + time_s) <= 30 && text == '减') {
|
||||
that.time_m = '00'
|
||||
that.time_s = '30'
|
||||
return
|
||||
}
|
||||
if (text == '减') {
|
||||
minutes = Math.floor((Number(time_m + time_s - 30) % 3600) / 60)
|
||||
seconds = Number(time_m + time_s - 30) % 60
|
||||
}
|
||||
if (text == '加') {
|
||||
minutes = Math.floor((Number(time_m + time_s + 30) % 3600) / 60)
|
||||
seconds = Number(time_m + time_s + 30) % 60
|
||||
}
|
||||
that.time_m = minutes > 9 ? minutes : '0' + minutes;
|
||||
that.time_s = seconds > 9 ? seconds : '0' + seconds;
|
||||
that.timesTndex = [Number(that.time_m), Number(that.time_s)]
|
||||
},
|
||||
handleWeightEdit(text) {
|
||||
let that = this
|
||||
if (text == '减') {
|
||||
that.weight = Number(that.weight) - 50 > 50 ? Number(that.weight) - 50 : 50
|
||||
}
|
||||
if (text == '加') {
|
||||
that.weight = Number(that.weight) + 50
|
||||
}
|
||||
},
|
||||
// 蓝牙搜索记时
|
||||
handleMyTime() {
|
||||
let that = this
|
||||
myTime = setTimeout(function() {
|
||||
if (!that.devicesList.length) {
|
||||
that.islink = -1
|
||||
that.$tools.showModal("没有查找到设备")
|
||||
}
|
||||
clearTimeout(myTime)
|
||||
that.$Bluetooth.stopBluetoothDevicesDiscovery()
|
||||
}, 12000);
|
||||
},
|
||||
navTo(url) {
|
||||
let that = this
|
||||
if (!that.isConnected) {
|
||||
that.islink = -1
|
||||
clearTimeout(myTime)
|
||||
that.$Bluetooth.closeBluetoothAdapter()
|
||||
that.$Bluetooth.stopBluetoothDevicesDiscovery()
|
||||
console.log("蓝牙没有连接")
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
|
|
@ -217,7 +600,7 @@
|
|||
color: #333;
|
||||
font-size: 22px;
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
margin-bottom: 15px;
|
||||
|
||||
text {
|
||||
display: block;
|
||||
|
|
@ -225,35 +608,35 @@
|
|||
|
||||
.item-ite {
|
||||
font-size: 16px;
|
||||
margin-bottom: 5px;
|
||||
margin-bottom: 15px;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
.item-set {
|
||||
width: 50%;
|
||||
width: calc(100% - 30px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
height: 55px;
|
||||
line-height: 55px;
|
||||
font-size: 30px;
|
||||
margin-bottom: 5px;
|
||||
background-color: #f7f7f7;
|
||||
justify-content: center;
|
||||
padding: 0 15px;
|
||||
justify-content: space-between;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
|
||||
/deep/input {
|
||||
font-size: 30px;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
height: 55px;
|
||||
line-height: 55px;
|
||||
}
|
||||
}
|
||||
|
||||
.uni-icons {
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
bottom: -5px;
|
||||
}
|
||||
.item-set0 {
|
||||
background-color: #fff;
|
||||
justify-content: center
|
||||
}
|
||||
|
||||
.tips {
|
||||
|
|
@ -262,5 +645,45 @@
|
|||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.start {
|
||||
color: #fff;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
line-height: 100px;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
background: $textcolor;
|
||||
margin: 15px auto;
|
||||
}
|
||||
|
||||
.Nstart {
|
||||
opacity: 0.5 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.status {
|
||||
background-color: #fff;
|
||||
|
||||
image {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.icon_link {
|
||||
animation: rotation 0.6s infinite linear;
|
||||
}
|
||||
|
||||
@keyframes rotation {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -2,16 +2,17 @@
|
|||
<view class="content">
|
||||
<!-- -->
|
||||
<view class="skiptop">
|
||||
<view class="status" @click="$tools.handleDevicesMac(isdevice,acd_id)"><text>设备连接</text></view>
|
||||
<!-- <view class="status" @click="$Bluetooth.handleDevicesMac(isdevice,acd_id)"><text>设备连接</text></view> -->
|
||||
<view class="item">
|
||||
<view class="item-ite">平均吸气肺活量<text>{{info?info.average:'--'}}</text></view>
|
||||
<view class="item-ite">吸气速度<text>--</text></view>
|
||||
<view class="item-ite">吸气速度<text>{{info?info.flow_val:'--'}}</text></view>
|
||||
<view class="item-ite">是否达标<text>{{info?info.level:'--'}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<!--自由训练 -->
|
||||
<view class="box1">
|
||||
<view class="time">{{info?info.time:''}}</view>
|
||||
<view class="LiuS">吸气速度 <text class="cgreen ml-5">{{info?info.flow_val:'--'}}L/min</text></view>
|
||||
<view class="item">
|
||||
<view class="image">
|
||||
<image src="../../static/bae.png" mode="widthFix"></image>
|
||||
|
|
@ -20,7 +21,7 @@
|
|||
<view class="level"></view>
|
||||
<view class="level level-bg" :style="{'top':info?Number(100 - info.offset)+'%':'100%'}"></view>
|
||||
<view class="level-item" v-if="info">
|
||||
<view class="ite" v-for="(ite,ind) in info.list">{{ite}}</view>
|
||||
<view class="ite" v-for="(ite,ind) in info.list">{{ite.text}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -71,6 +72,7 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
LiuS: 0,
|
||||
acd_id: 8,
|
||||
isdevice: true,
|
||||
}
|
||||
|
|
@ -132,6 +134,29 @@
|
|||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.LiuS {
|
||||
width: 60%;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
border-radius: 10px;
|
||||
background-color: #272a2a;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.LiuS:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 45%;
|
||||
bottom: -7px;
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
border-left: 5px solid transparent;
|
||||
border-right: 5px solid transparent;
|
||||
border-top: 8px solid #272a2a;
|
||||
}
|
||||
|
||||
.item {
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
|
|
@ -147,13 +172,14 @@
|
|||
width: 80%;
|
||||
|
||||
image {
|
||||
margin-top: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.center {
|
||||
top: -10px;
|
||||
bottom: 0px;
|
||||
top: 0px;
|
||||
bottom: -0px;
|
||||
position: absolute;
|
||||
width: 55px;
|
||||
margin: auto;
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 370 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
|
@ -30,6 +30,7 @@ export default {
|
|||
uni.setStorageSync('userid', res.data.id)
|
||||
uni.setStorageSync('gender', res.data.gender)
|
||||
commit('changeUser', res.data)
|
||||
commit('changeLungLevel', res.data.vitalcapacity_data)
|
||||
});
|
||||
},
|
||||
// 成员列表
|
||||
|
|
@ -88,6 +89,7 @@ export default {
|
|||
return model.getLungResult(account).then((res) => {
|
||||
console.log("肺活量报告", res)
|
||||
if (res.code == 0) {
|
||||
commit('changeLungLevel', res.data.list)
|
||||
commit('changeMeasureLung', res.data)
|
||||
} else {
|
||||
commit('changeMeasureLung', null)
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ export default new Vuex.Store({
|
|||
birthday: "",
|
||||
gender: 0,
|
||||
sex: 0,
|
||||
address: [],
|
||||
card_data_list: [],
|
||||
target_current: {}
|
||||
},
|
||||
|
|
@ -42,10 +43,21 @@ export default new Vuex.Store({
|
|||
isSlider: false, //分数占比
|
||||
isConnected: false,
|
||||
isBluetoothTyle: false,
|
||||
LungLevel: [], //肺活量标准
|
||||
devicesList: [], //筛选设备列表
|
||||
phoneInfo: {
|
||||
info: {},
|
||||
versionUrl: {},
|
||||
platform: ""
|
||||
},
|
||||
|
||||
},
|
||||
// mutations: Store中更改state数据状态的唯一方法(必须是同步函数)
|
||||
mutations: {
|
||||
// 版本信息
|
||||
changePhoneInfo(state, newData) {
|
||||
Object.assign(state.phoneInfo, newData)
|
||||
},
|
||||
// 账户信息
|
||||
changeAccountNumber(state, newData) {
|
||||
Object.assign(state.accountNumber, newData)
|
||||
|
|
@ -99,6 +111,10 @@ export default new Vuex.Store({
|
|||
changeDrawe(state, newData) {
|
||||
state.isDrawe = newData
|
||||
},
|
||||
// 肺活量标准
|
||||
changeLungLevel(state, newData) {
|
||||
state.lungLevel = newData
|
||||
},
|
||||
//获取家庭成员
|
||||
changeFamilay(state, newData) {
|
||||
if (newData.length == 0) {
|
||||
|
|
@ -124,7 +140,10 @@ export default new Vuex.Store({
|
|||
// 用户设备列表
|
||||
changeUserDeviceList(state, newData) {
|
||||
state.userDeviceList = newData
|
||||
},
|
||||
}, //
|
||||
changedevicesList(state, newData) {
|
||||
state.devicesList = newData
|
||||
}
|
||||
},
|
||||
// 模块化vuex
|
||||
modules: {},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,201 @@
|
|||
import $store from '@/store'
|
||||
import $Bluetooth from '@/tools/Bluetooth.js'
|
||||
import $tools from '@/tools/tools.js'
|
||||
let myTime;
|
||||
let devicesList = []
|
||||
export default {
|
||||
str2Num,
|
||||
handleDevicesMac,
|
||||
openBluetoothAdapter,
|
||||
startBluetoothDeviceDiscovery,
|
||||
onBluetoothDeviceFound,
|
||||
getBluetoothAdapter,
|
||||
handleDevice,
|
||||
onBLEConnectionStateChange,
|
||||
closeBLEConnection,
|
||||
closeBluetoothAdapter,
|
||||
stopBluetoothDevicesDiscovery
|
||||
}
|
||||
|
||||
// 蓝牙连接
|
||||
function openBluetoothAdapter() {
|
||||
uni.openBluetoothAdapter({
|
||||
success: e => {
|
||||
$store.commit("changeBluetooth", true)
|
||||
$Bluetooth.startBluetoothDeviceDiscovery()
|
||||
console.log('初始化蓝牙成功:' + e.errMsg);
|
||||
},
|
||||
fail: e => {
|
||||
$Bluetooth.getBluetoothAdapter(e)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 开始搜寻附近的蓝牙外围设备
|
||||
function startBluetoothDeviceDiscovery() {
|
||||
devicesList = []
|
||||
uni.startBluetoothDevicesDiscovery({
|
||||
allowDuplicatesKey: true,
|
||||
interval: 200, //上报设备的间隔
|
||||
services: [],
|
||||
success: res => {
|
||||
$Bluetooth.onBluetoothDeviceFound();
|
||||
},
|
||||
fail: res => {
|
||||
$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 发现外围设备
|
||||
*/
|
||||
function onBluetoothDeviceFound() {
|
||||
uni.onBluetoothDeviceFound(res => {
|
||||
console.log('开始监听寻找到新设备的事件', res);
|
||||
res.devices.forEach(device => {
|
||||
if (!device.name && !device.localName) {
|
||||
return
|
||||
}
|
||||
if (device.name.indexOf('YPC') != -1) {
|
||||
let buff = device.name.slice(7, 19)
|
||||
device.macAddr = $Bluetooth.str2Num(buff)
|
||||
device.deviceId = $Bluetooth.str2Num(buff)
|
||||
$Bluetooth.handleDevice(device)
|
||||
console.log("ypc", device)
|
||||
return
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
// 蓝牙过滤
|
||||
function handleDevice(device) {
|
||||
const foundDevices = devicesList
|
||||
const idx = $tools.inArray(foundDevices, "deviceId", device.deviceId)
|
||||
console.log("ind", idx, devicesList, device)
|
||||
if (idx === -1) {
|
||||
devicesList.push(device);
|
||||
$store.commit("changedevicesList", devicesList);
|
||||
return
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 停止搜索蓝牙设备
|
||||
*/
|
||||
function stopBluetoothDevicesDiscovery() {
|
||||
uni.stopBluetoothDevicesDiscovery({
|
||||
success: e => {
|
||||
console.log("停止搜索蓝牙设备", e)
|
||||
},
|
||||
});
|
||||
}
|
||||
// 监听蓝牙连接状态
|
||||
function onBLEConnectionStateChange() {
|
||||
uni.onBLEConnectionStateChange(function(res) {
|
||||
console.log("蓝牙连接状态", JSON.stringify(res));
|
||||
if (!res.connected) {
|
||||
$Bluetooth.closeBLEConnection()
|
||||
$Bluetooth.closeBluetoothAdapter()
|
||||
}
|
||||
$store.commit("changeConnected", res.connected);
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 断开蓝牙模块
|
||||
*/
|
||||
function closeBluetoothAdapter() {
|
||||
uni.closeBluetoothAdapter({
|
||||
success: res => {
|
||||
console.log('蓝牙模块关闭成功');
|
||||
}
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 断开蓝牙连接
|
||||
*/
|
||||
function closeBLEConnection(deviceId) {
|
||||
console.log("deviceId", deviceId)
|
||||
uni.closeBLEConnection({
|
||||
deviceId: deviceId,
|
||||
success: res => {
|
||||
console.log('断开蓝牙连接成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function str2Num(str) {
|
||||
var result = "";
|
||||
for (let i = 0; i < str.length - 2; i++) {
|
||||
result += str[i];
|
||||
if (i % 2 === 1) result += ':';
|
||||
}
|
||||
return result + str.slice(-2)
|
||||
}
|
||||
// 蓝牙连接
|
||||
function handleDevicesMac(device, acd_id) {
|
||||
console.log("卡片设备", device, acd_id)
|
||||
if (device == 'true' || device || device == true) {
|
||||
uni.openBluetoothAdapter({
|
||||
success: e => {
|
||||
$store.commit("changeBluetooth", true);
|
||||
uni.navigateTo({
|
||||
url: "/pages/devices/search?id=" + acd_id
|
||||
})
|
||||
console.log('初始化蓝牙成功:' + e.errMsg);
|
||||
},
|
||||
fail: err => {
|
||||
console.log('初始化蓝牙失败:' + err.errMsg);
|
||||
return $Bluetooth.getBluetoothAdapter(err)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$tools.msg("请先添加设备!")
|
||||
setTimeout(function() {
|
||||
uni.switchTab({
|
||||
url: "/pages/business/business"
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
// 蓝牙连接失败
|
||||
function getBluetoothAdapter(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 => {
|
||||
uni.showToast({
|
||||
title: "获取权限成功,请继续去测量",
|
||||
icon: "none"
|
||||
})
|
||||
$store.commit("changeBluetooth", true);
|
||||
},
|
||||
fail: err => {
|
||||
$tools.showModal("手机蓝牙未打开")
|
||||
console.log('初始化蓝牙失败:' + err.errMsg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "获取权限失败,将无法使用手机蓝牙进行测量",
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
$tools.showModal("手机蓝牙未打开")
|
||||
}
|
||||
}
|
||||
|
|
@ -133,6 +133,11 @@ export default {
|
|||
return res
|
||||
})
|
||||
},
|
||||
getskipResult(param) { //测量报告
|
||||
return http.post('/skip_manual_recording_device', param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getSkipTrendList(param) { //趋势
|
||||
return http.post("/skip_curve_chart", param).then(res => {
|
||||
return res
|
||||
|
|
@ -149,6 +154,11 @@ export default {
|
|||
return res
|
||||
})
|
||||
},
|
||||
getMeasureLung(param) { //添加测量记录
|
||||
return http.post('/vitalcapacity_save_record_data_device', param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getLungTrendList(param) { //趋势
|
||||
return http.post("/vitalcapacity_curve_chart", param).then(res => {
|
||||
return res
|
||||
|
|
@ -165,17 +175,12 @@ export default {
|
|||
return res
|
||||
})
|
||||
},
|
||||
getSportsResult(param) { //报告
|
||||
return http.post("/sportstesting_get_last_data", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getSportsListAll(param) { //获取地区所有类型项目列表
|
||||
getSportsListAll(param) { //获取地区所有项目列表
|
||||
return http.post("/sportstesting_get_region_list", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
getSportsList(param) { //获取地区单个项目列表
|
||||
getSportsList(param) { //获取单个项目列表
|
||||
return http.post("/sportstesting_get_type_list", param).then(res => {
|
||||
return res
|
||||
})
|
||||
|
|
@ -185,6 +190,11 @@ export default {
|
|||
return res
|
||||
})
|
||||
},
|
||||
getCityList(param) { //获取地区
|
||||
return http.post("/sportstesting_get_city_list", param).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
// 设备管理
|
||||
getDeviceList(param) { //获取系统设备列表
|
||||
return http.post("/device_data_list", param).then(res => {
|
||||
|
|
@ -230,17 +240,14 @@ export default {
|
|||
getresultdiff(param) { //记录对比
|
||||
return http.post("/get_all_record_data_group", param).then(res => {
|
||||
if (res.code == 0) {
|
||||
let pkList = {
|
||||
list: [],
|
||||
Dlist: []
|
||||
}
|
||||
let Dlist = []
|
||||
for (var i = 0; i < res.data.length; i++) {
|
||||
pkList.list.push(res.data[i])
|
||||
if (!pkList.Dlist.includes(res.data[i].r_t)) { //includes 检测数组是否有某个值
|
||||
pkList.Dlist.push(res.data[i].r_t);
|
||||
if (!Dlist.includes(res.data[i].r_t)) { //includes 检测数组是否有某个值
|
||||
Dlist.push(res.data[i].r_t);
|
||||
}
|
||||
}
|
||||
res.pkList = pkList
|
||||
res.Dlist = Dlist
|
||||
console.log("111111", res)
|
||||
}
|
||||
return res
|
||||
})
|
||||
|
|
|
|||
109
tools/tools.js
|
|
@ -2,7 +2,7 @@ import $store from '@/store'
|
|||
import $tools from '@/tools/tools.js'
|
||||
export default {
|
||||
msg,
|
||||
str2Num,
|
||||
toHex,
|
||||
gethms,
|
||||
str2hex,
|
||||
hex2str,
|
||||
|
|
@ -12,90 +12,29 @@ export default {
|
|||
getDate,
|
||||
GetDateStr,
|
||||
PrefixZero,
|
||||
validatePhoneEmail,
|
||||
getBluetoothAdapter,
|
||||
handleDevicesMac
|
||||
showModal,
|
||||
validatePhoneEmail
|
||||
}
|
||||
// 蓝牙连接
|
||||
function handleDevicesMac(device, acd_id) {
|
||||
console.log("卡片设备", device, acd_id)
|
||||
if (device == 'true') {
|
||||
uni.openBluetoothAdapter({
|
||||
success: e => {
|
||||
$store.commit("changeBluetooth", true);
|
||||
uni.navigateTo({
|
||||
url: "/pages/devices/search?id=" + acd_id
|
||||
})
|
||||
console.log('初始化蓝牙成功:' + e.errMsg);
|
||||
},
|
||||
fail: err => {
|
||||
console.log('初始化蓝牙失败:' + err.errMsg);
|
||||
return $tools.getBluetoothAdapter(err)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$tools.msg("请先添加设备!")
|
||||
setTimeout(function() {
|
||||
uni.switchTab({
|
||||
url: "/pages/business/business"
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
// 蓝牙连接失败
|
||||
function getBluetoothAdapter(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 => {
|
||||
uni.showToast({
|
||||
title: "获取权限成功,请继续去测量",
|
||||
icon: "none"
|
||||
})
|
||||
$store.commit("changeBluetooth", true);
|
||||
},
|
||||
fail: err => {
|
||||
uni.showToast({
|
||||
title: "请打开手机蓝牙",
|
||||
icon: "none",
|
||||
duration: 1000,
|
||||
})
|
||||
console.log('初始化蓝牙失败:' + err.errMsg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "获取权限失败,将无法使用手机蓝牙进行测量",
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "请打开手机蓝牙",
|
||||
icon: "none",
|
||||
duration: 1000,
|
||||
})
|
||||
}
|
||||
|
||||
function showModal(text) {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: text,
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 2进制位数不足补0
|
||||
function PrefixZero(num, n) {
|
||||
return (Array(n).join(0) + num).slice(-n);
|
||||
}
|
||||
//转16进制位数不足补0
|
||||
function toHex(num, length) {
|
||||
return num.toString(16).padStart(length, '0');
|
||||
}
|
||||
|
||||
function inArray(arr, key, val) {
|
||||
if (!arr || !arr.length || typeof arr != 'object' || !Array.isArray(arr)) {
|
||||
|
|
@ -154,20 +93,12 @@ function str2hex(str) {
|
|||
return encoder.encode(str)
|
||||
}
|
||||
|
||||
function str2Num(str) {
|
||||
var result = "";
|
||||
for (let i = 0; i < str.length - 2; i++) {
|
||||
result += str[i];
|
||||
if (i % 2 === 1) result += ':';
|
||||
}
|
||||
return result + str.slice(-2)
|
||||
}
|
||||
// 跳绳分秒时间选择
|
||||
function gethms(type) {
|
||||
var mindata = []
|
||||
var secondData = []
|
||||
let timeList = []
|
||||
for (var i = 1; i <= 59; i++) {
|
||||
for (var i = 0; i <= 59; i++) {
|
||||
i = i > 9 ? i : '0' + i
|
||||
mindata.push(i + '分');
|
||||
}
|
||||
|
|
@ -231,7 +162,7 @@ function getDate(type) {
|
|||
}
|
||||
if (type === 'end') {
|
||||
year = year + 60;
|
||||
return `${year}-${month}-${day}`;
|
||||
return `${year}/${month}/${day}`;
|
||||
}
|
||||
if (type === 'year') {
|
||||
year = year;
|
||||
|
|
@ -239,7 +170,7 @@ function getDate(type) {
|
|||
}
|
||||
if (type === 'month') {
|
||||
year = year;
|
||||
return `${year}-${month}`;
|
||||
return `${year}/${month}`;
|
||||
}
|
||||
if (type == "m") {
|
||||
if (month == "01" || month == "03" || month == "05" || month == "07" || month == "08" || month == "10" ||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,137 @@
|
|||
<template>
|
||||
<picker mode="multiSelector"
|
||||
:value="multiIndex"
|
||||
:range="multiArray"
|
||||
@change="handleValueChange"
|
||||
@columnchange="handleColumnChange">
|
||||
<slot></slot>
|
||||
</picker>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const CHINA_REGIONS = require('./regions.json')
|
||||
export default {
|
||||
props:{
|
||||
defaultRegions:{
|
||||
type:Array,
|
||||
default(){
|
||||
return []
|
||||
}
|
||||
},
|
||||
defaultRegionCode:{
|
||||
type:String
|
||||
},
|
||||
defaultRegion:[String,Array]
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cityArr:CHINA_REGIONS[0].childs,
|
||||
districtArr:CHINA_REGIONS[0].childs[0].childs,
|
||||
multiIndex: [0, 0, 0],
|
||||
isInitMultiArray:true,
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
defaultRegion:{
|
||||
handler(region,oldRegion){
|
||||
if(Array.isArray(region)){
|
||||
// 避免传的是字面量的时候重复触发
|
||||
oldRegion = oldRegion || []
|
||||
if(region.join('')!==oldRegion.join('')){
|
||||
this.handleDefaultRegion(region)
|
||||
}
|
||||
}else if(region&®ion.length == 6){
|
||||
this.handleDefaultRegion(region)
|
||||
}else{
|
||||
console.warn('defaultRegion非有效格式')
|
||||
}
|
||||
},
|
||||
immediate:true,
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
multiArray(){
|
||||
return this.pickedArr.map(arr=>arr.map(item=>item.name))
|
||||
},
|
||||
pickedArr(){
|
||||
// 进行初始化
|
||||
if(this.isInitMultiArray){
|
||||
return [
|
||||
CHINA_REGIONS,
|
||||
CHINA_REGIONS[0].childs,
|
||||
CHINA_REGIONS[0].childs[0].childs
|
||||
]
|
||||
}
|
||||
return [CHINA_REGIONS,this.cityArr,this.districtArr];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleColumnChange(e){
|
||||
// console.log(e);
|
||||
this.isInitMultiArray = false;
|
||||
const that = this;
|
||||
let col = e.detail.column;
|
||||
let row = e.detail.value;
|
||||
that.multiIndex[col] = row;
|
||||
try{
|
||||
switch(col){
|
||||
case 0:
|
||||
if(CHINA_REGIONS[that.multiIndex[0]].childs.length==0){
|
||||
that.cityArr = that.districtArr = [CHINA_REGIONS[that.multiIndex[0]]]
|
||||
break;
|
||||
}
|
||||
that.cityArr = CHINA_REGIONS[that.multiIndex[0]].childs
|
||||
that.districtArr = CHINA_REGIONS[that.multiIndex[0]].childs[that.multiIndex[1]].childs
|
||||
break;
|
||||
case 1:
|
||||
that.districtArr = CHINA_REGIONS[that.multiIndex[0]].childs[that.multiIndex[1]].childs
|
||||
break;
|
||||
case 2:
|
||||
break;
|
||||
}
|
||||
}catch(e){
|
||||
// console.log(e);
|
||||
that.districtArr = CHINA_REGIONS[that.multiIndex[0]].childs[0].childs
|
||||
}
|
||||
|
||||
},
|
||||
handleValueChange(e){
|
||||
// 结构赋值
|
||||
let [index0,index1,index2] = e.detail.value;
|
||||
let [arr0,arr1,arr2] = this.pickedArr;
|
||||
let address = [arr0[index0],arr1[index1],arr2[index2]];
|
||||
// console.log(address);
|
||||
this.$emit('getRegion',address)
|
||||
},
|
||||
handleDefaultRegion(region){
|
||||
const isCode = !Array.isArray(region)
|
||||
this.isInitMultiArray = false;
|
||||
let children = CHINA_REGIONS
|
||||
for(let i=0;i<3;i++){
|
||||
for(let j=0;j<children.length;j++){
|
||||
let condition = isCode?children[j].code==region.slice(0,(i+1)*2):children[j].name.includes(region[i]);
|
||||
if(condition){
|
||||
// 匹配成功进行赋值
|
||||
// console.log(i,j,children.length-1);
|
||||
children = children[j].childs;
|
||||
if(i==0){
|
||||
this.cityArr = children
|
||||
}else if(i==1){
|
||||
this.districtArr = children
|
||||
}
|
||||
this.$set(this.multiIndex,i,j)
|
||||
// console.log(this.multiIndex);
|
||||
break;
|
||||
}else{
|
||||
// 首次匹配失败就用默认的初始化
|
||||
// console.log(i,j,children.length-1);
|
||||
if(i==0 && j==(children.length-1)){
|
||||
this.isInitMultiArray = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1 +1 @@
|
|||
https://app.liuyingyong.cn/build/download/52962370-2546-11ef-95bf-a5fcc7b741b5
|
||||
https://app.liuyingyong.cn/build/download/43dc30f0-4675-11ef-b70f-170ccd299e65
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
andrCertfile=D:/软件包/HBuilderX.3.6.4.20220922/HBuilderX/plugins/app-safe-pack/Test.keystore
|
||||
andrCertAlias=android
|
||||
andrCertPass=ep/Tdjka4Y7WYqDB6/S7dw==
|
||||
andrCertfile=D:/qingce.keystore
|
||||
andrCertAlias=qingce
|
||||
andrCertPass=e7l98mrpB0Uj4WWFn9y0Mg==
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__E0E1A21","name":"青测","version":{"name":"1.0.5","code":105},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Bluetooth":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#fff"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"icon-android-hdpi.png","xhdpi":"icon-android-xhdpi.png","xxhdpi":"icon-android-xxhdpi.png","xxxhdpi":"icon-android-xxxhdpi.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"},"prerendered":"false"}},"splashscreen":{"androidStyle":"common","android":{"hdpi":"static/logo.png","xhdpi":"static/logo.png","xxhdpi":"static/logo.png"},"useOriginalMsgbox":true},"google":{"abiFilters":["arm64-v8a","x86"],"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"packagename":"qingce.app","custompermissions":true},"apple":{"dSYMs":false,"idfa":false,"privacyDescription":{"NSBluetoothAlwaysUsageDescription":"连接设备"},"plistcmds":["Add :UIFileSharingEnabled bool true"],"devices":"universal"},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}},"debug":true,"syncDebug":true,"orientation":"portrait-primary"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"safearea":{"background":"#fff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"3.99","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333","selectedColor":"#477EFF","backgroundColor":"#fff","list":[{"pagePath":"pages/index/index","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"首页"},{"pagePath":"pages/score/score","iconPath":"static/ping.png","selectedIconPath":"static/ping2.png","text":"估分"},{"pagePath":"pages/business/business","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"设备"},{"pagePath":"pages/me/me","iconPath":"static/wo.png","selectedIconPath":"static/wo2.png","text":"我的"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html","adid":"122604250007"},"locale":"zh-Hans","fallbackLocale":"zh-Hans"}
|
||||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__E0E1A21","name":"青测","version":{"name":"1.1.0","code":110},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Bluetooth":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"autoclose":true,"delay":0,"target":"id:1","waiting":true},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#fff"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"template":"index.html","distribute":{"icons":{"android":{"hdpi":"icon-android-hdpi.png","xhdpi":"icon-android-xhdpi.png","xxhdpi":"icon-android-xxhdpi.png","xxxhdpi":"icon-android-xxxhdpi.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"},"prerendered":"false"}},"splashscreen":{"androidStyle":"common","android":{"hdpi":"static/logo.png","xhdpi":"static/logo.png","xxhdpi":"static/logo.png"},"useOriginalMsgbox":true},"google":{"abiFilters":["arm64-v8a","x86"],"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"packagename":"qingce.app","aliasname":"qingce","password":"e7l98mrpB0Uj4WWFn9y0Mg==","keystore":"google-keystore.keystore","custompermissions":true},"apple":{"dSYMs":false,"idfa":false,"privacyDescription":{"NSBluetoothAlwaysUsageDescription":"连接设备"},"devices":"universal"},"plugins":{"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}},"orientation":"portrait-primary"},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"safearea":{"background":"#fff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"3.99","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333","selectedColor":"#477EFF","backgroundColor":"#fff","list":[{"pagePath":"pages/index/index","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"首页"},{"pagePath":"pages/score/score","iconPath":"static/ping.png","selectedIconPath":"static/ping2.png","text":"估分"},{"pagePath":"pages/business/business","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"设备"},{"pagePath":"pages/me/me","iconPath":"static/wo.png","selectedIconPath":"static/wo2.png","text":"我的"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html","adid":"122604250007"},"locale":"zh-Hans","fallbackLocale":"zh-Hans"}
|
||||
|
After Width: | Height: | Size: 370 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
|
@ -1 +1 @@
|
|||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__E0E1A21","name":"青测","version":{"name":"1.0.5","code":105},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Bluetooth":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#fff"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common","android":{"hdpi":"static/logo.png","xhdpi":"static/logo.png","xxhdpi":"static/logo.png"},"useOriginalMsgbox":true},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"abiFilters":["arm64-v8a","x86"]},"apple":{"dSYMs":false,"idfa":false,"privacyDescription":{"NSBluetoothAlwaysUsageDescription":"连接设备"}},"plugins":{"share":{},"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"safearea":{"background":"#fff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"3.99","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333","selectedColor":"#477EFF","backgroundColor":"#fff","list":[{"pagePath":"pages/index/index","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"首页"},{"pagePath":"pages/score/score","iconPath":"static/ping.png","selectedIconPath":"static/ping2.png","text":"估分"},{"pagePath":"pages/business/business","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"设备"},{"pagePath":"pages/me/me","iconPath":"static/wo.png","selectedIconPath":"static/wo2.png","text":"我的"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"},"locale":"zh-Hans","fallbackLocale":"zh-Hans"}
|
||||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__E0E1A21","name":"青测","version":{"name":"1.1.0","code":110},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Bluetooth":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#fff"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"template":"index.html","distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common","android":{"hdpi":"static/logo.png","xhdpi":"static/logo.png","xxhdpi":"static/logo.png"},"useOriginalMsgbox":true},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"abiFilters":["arm64-v8a","x86"]},"apple":{"dSYMs":false,"idfa":false,"privacyDescription":{"NSBluetoothAlwaysUsageDescription":"连接设备"}},"plugins":{"share":{},"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"safearea":{"background":"#fff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"3.99","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333","selectedColor":"#477EFF","backgroundColor":"#fff","list":[{"pagePath":"pages/index/index","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"首页"},{"pagePath":"pages/score/score","iconPath":"static/ping.png","selectedIconPath":"static/ping2.png","text":"估分"},{"pagePath":"pages/business/business","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"设备"},{"pagePath":"pages/me/me","iconPath":"static/wo.png","selectedIconPath":"static/wo2.png","text":"我的"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"},"locale":"zh-Hans","fallbackLocale":"zh-Hans"}
|
||||
|
After Width: | Height: | Size: 370 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
|
@ -1 +1 @@
|
|||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__E0E1A21","name":"青测","version":{"name":"1.0.5","code":105},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Bluetooth":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#fff"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common","android":{"hdpi":"static/logo.png","xhdpi":"static/logo.png","xxhdpi":"static/logo.png"},"useOriginalMsgbox":true},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"abiFilters":["arm64-v8a","x86"]},"apple":{"dSYMs":false,"idfa":false,"privacyDescription":{"NSBluetoothAlwaysUsageDescription":"连接设备"}},"plugins":{"share":{},"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"safearea":{"background":"#fff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"3.99","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333","selectedColor":"#477EFF","backgroundColor":"#fff","list":[{"pagePath":"pages/index/index","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"首页"},{"pagePath":"pages/score/score","iconPath":"static/ping.png","selectedIconPath":"static/ping2.png","text":"估分"},{"pagePath":"pages/business/business","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"设备"},{"pagePath":"pages/me/me","iconPath":"static/wo.png","selectedIconPath":"static/wo2.png","text":"我的"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"},"locale":"zh-Hans","fallbackLocale":"zh-Hans"}
|
||||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__E0E1A21","name":"青测","version":{"name":"1.1.0","code":110},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Bluetooth":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#fff"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"template":"index.html","distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common","android":{"hdpi":"static/logo.png","xhdpi":"static/logo.png","xxhdpi":"static/logo.png"},"useOriginalMsgbox":true},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"],"abiFilters":["arm64-v8a","x86"]},"apple":{"dSYMs":false,"idfa":false,"privacyDescription":{"NSBluetoothAlwaysUsageDescription":"连接设备"}},"plugins":{"share":{},"ad":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"safearea":{"background":"#fff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"3.99","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333","selectedColor":"#477EFF","backgroundColor":"#fff","list":[{"pagePath":"pages/index/index","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"首页"},{"pagePath":"pages/score/score","iconPath":"static/ping.png","selectedIconPath":"static/ping2.png","text":"估分"},{"pagePath":"pages/business/business","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"设备"},{"pagePath":"pages/me/me","iconPath":"static/wo.png","selectedIconPath":"static/wo2.png","text":"我的"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"},"locale":"zh-Hans","fallbackLocale":"zh-Hans"}
|
||||
|
After Width: | Height: | Size: 370 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 3.6 KiB |