优化B20测量过程
31
App.vue
|
|
@ -31,9 +31,11 @@
|
|||
}
|
||||
that.checkForUpdates()
|
||||
// #endif
|
||||
// #ifndef APP-PLUS
|
||||
// #ifdef MP-WEIXIN
|
||||
// 版本更新
|
||||
that.handleCityList()
|
||||
that.handleCooperationUrl()
|
||||
that.updataWeiXin()
|
||||
// #endif
|
||||
console.log('App Launch')
|
||||
},
|
||||
|
|
@ -170,6 +172,33 @@
|
|||
this.$store.commit("changeCooperationUrl", res.data);
|
||||
})
|
||||
},
|
||||
// 微信小程序更新
|
||||
updataWeiXin() {
|
||||
let that = this
|
||||
const updateManager = uni.getUpdateManager()
|
||||
// 请求完新版本信息的回调
|
||||
updateManager.onCheckForUpdate(function(res) {
|
||||
console.log("是否有新版本", res.hasUpdate)
|
||||
})
|
||||
updateManager.onUpdateReady(function() {
|
||||
uni.showModal({
|
||||
title: '更新提示',
|
||||
content: '新版本已经准备好,是否重启应用?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||
updateManager.applyUpdate()
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
updateManager.onUpdateFailed(function() {
|
||||
uni.showModal({
|
||||
title: '新版本更新失败',
|
||||
content: '请退出并移除小程序,重新打开...',
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -17,5 +17,6 @@
|
|||
<body>
|
||||
<div id="app"><!--app-html--></div>
|
||||
<script type="module" src="/main.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
"name" : "Reedaw",
|
||||
"appid" : "__UNI__20604F1",
|
||||
"description" : "面向儿童青少年的健康体质测量APP",
|
||||
"versionName" : "1.2.8",
|
||||
"versionCode" : 128,
|
||||
"versionName" : "1.3.0",
|
||||
"versionCode" : 130,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
|
|
|||
|
|
@ -112,10 +112,10 @@
|
|||
},
|
||||
isFinished: function() {
|
||||
let that = this
|
||||
if (that.isFinished) {
|
||||
if (that.isFinished && that.typeInfo == 2) {
|
||||
setTimeout(function() {
|
||||
that.isHeight = true
|
||||
}, 600)
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -180,6 +180,7 @@
|
|||
that.notify = item.uuid
|
||||
} else if (item.uuid.indexOf('0000FFF2') != -1) {
|
||||
that.write = item.uuid
|
||||
that.writeBLECharacteristicValue("A6020500076A") // 清零
|
||||
}
|
||||
}
|
||||
that.textLink = "蓝牙连接成功,请开始测量"
|
||||
|
|
@ -195,9 +196,10 @@
|
|||
characteristicId: that.write,
|
||||
state: true,
|
||||
})
|
||||
let str = "A6020401076A"
|
||||
that.writeBLECharacteristicValue(str)
|
||||
that.notifyBLECharacteristicValue()
|
||||
that.isFinished = false
|
||||
setTimeout(function() {
|
||||
that.notifyBLECharacteristicValue()
|
||||
}, 600)
|
||||
},
|
||||
fail: res => {
|
||||
console.log('获取特征值失败:', JSON.stringify(res))
|
||||
|
|
@ -256,6 +258,7 @@
|
|||
that.typeInfo = 1
|
||||
that.weight = weight
|
||||
that.IsLing = false
|
||||
that.isFinished = false
|
||||
}
|
||||
if (typeInfo == "02") {
|
||||
that.typeInfo = 2
|
||||
|
|
@ -270,20 +273,18 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
// 去皮
|
||||
// 清零
|
||||
handleIsLing() {
|
||||
let that = this
|
||||
let str = "A6020500076A"
|
||||
if (!that.IsLing) {
|
||||
that.writeBLECharacteristicValue(str)
|
||||
that.writeBLECharacteristicValue("A6020500076A")
|
||||
that.IsLing = true
|
||||
}
|
||||
},
|
||||
//锁定
|
||||
handleIsNum() {
|
||||
let that = this
|
||||
let str = "A6020400066A"
|
||||
that.writeBLECharacteristicValue(str)
|
||||
that.writeBLECharacteristicValue("A6020400066A")
|
||||
},
|
||||
writeBLECharacteristicValue(str) {
|
||||
var that = this;
|
||||
|
|
@ -313,7 +314,7 @@
|
|||
}
|
||||
that.$model.getmeasurefunit({
|
||||
adc: 0,
|
||||
weight: that.weight,
|
||||
weight: that.weight + that.unit,
|
||||
height: that.height,
|
||||
aud_id: that.userInfo.id,
|
||||
head_data: that.head ? that.head : 0
|
||||
|
|
@ -344,14 +345,12 @@
|
|||
//重新测量
|
||||
handleBack() {
|
||||
let that = this
|
||||
let str = ""
|
||||
that.typeInfo = 0
|
||||
that.isFinished = false
|
||||
str = "A6020500076A"
|
||||
that.writeBLECharacteristicValue(str)
|
||||
that.writeBLECharacteristicValue("A6020500076A") // 清零
|
||||
setTimeout(function() {
|
||||
that.isFinished = false
|
||||
that.isHeight = false
|
||||
}, 500)
|
||||
}, 200)
|
||||
|
||||
},
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<view class="status">{{textLink}}</view>
|
||||
<view class="text">{{text}}</view>
|
||||
<view class="image">
|
||||
<image src="/static/HC.png" class="image3"></image>
|
||||
<image src="/pageTwo/static/HC.png" class="image3"></image>
|
||||
</view>
|
||||
<view class="tips">
|
||||
<view>提示:</view>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<view class="title">连接成功,开始测量</view>
|
||||
<view class="text">{{text}}</view>
|
||||
<view class="image">
|
||||
<image src="/static/PCL.gif" class="image3"></image>
|
||||
<image src="/pageTwo/static/PCL.gif" class="image3"></image>
|
||||
</view>
|
||||
<view class="tips">
|
||||
<view>提示:</view>
|
||||
|
|
@ -165,22 +165,14 @@
|
|||
this.$tools.msg("请输入身高")
|
||||
return
|
||||
}
|
||||
let weight = ""
|
||||
if (that.unit == "斤") {
|
||||
weight = that.weight / 2
|
||||
}else if (that.unit == "lb") {
|
||||
weight =Number(that.weight * 0.4536).toFixed(2)
|
||||
}else{
|
||||
weight = that.weight
|
||||
}
|
||||
that.$model.getmeasurefunit({
|
||||
adc: that.imp,
|
||||
weight: weight,
|
||||
weight: that.weight + that.unit,
|
||||
height: that.height,
|
||||
aud_id: that.info.id
|
||||
}).then(res => {
|
||||
that.isHeight = false
|
||||
console.log("res", res,that.imp)
|
||||
console.log("res", res, that.imp)
|
||||
if (res.code == 0) {
|
||||
that.$store.dispatch('getUserInfo', {
|
||||
aud_id: uni.getStorageSync('userid')
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="image">
|
||||
<image src="../../static/t01.gif"></image>
|
||||
<image src="/pageTwo/static/t01.gif"></image>
|
||||
</view>
|
||||
<view class="end" @longpress="onlongpress">长按结束</view>
|
||||
<!-- 报告 -->
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
</view>
|
||||
<view class="center">
|
||||
<view class="left">
|
||||
<image src="../../static/duan.png"></image>
|
||||
<image src="/pageTwo/static/duan.png"></image>
|
||||
<view class="name">
|
||||
<view>
|
||||
中断次数
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
</view>
|
||||
<!-- -->
|
||||
<view class="left">
|
||||
<image src="../../static/xu.png"></image>
|
||||
<image src="/pageTwo/static/xu.png"></image>
|
||||
<view class="name">
|
||||
<view>
|
||||
最长连续
|
||||
|
|
@ -214,7 +214,7 @@
|
|||
if (that.time_m == "00" && that.time_s == "10") {
|
||||
innerAudioContext.autoplay = true;
|
||||
innerAudioContext.loop = false;
|
||||
innerAudioContext.src = '/static/time.mp3';
|
||||
innerAudioContext.src = '/pageTwo/static/time.mp3';
|
||||
innerAudioContext.play()
|
||||
setTimeout(function() {
|
||||
innerAudioContext.stop();
|
||||
|
|
@ -239,7 +239,7 @@
|
|||
if (Number(that.weight) == 10) {
|
||||
innerAudioContext.autoplay = true;
|
||||
innerAudioContext.loop = false;
|
||||
innerAudioContext.src = '/static/number.mp3';
|
||||
innerAudioContext.src = '/pageTwo/static/number.mp3';
|
||||
innerAudioContext.play()
|
||||
setTimeout(function() {
|
||||
innerAudioContext.stop();
|
||||
|
|
@ -254,7 +254,7 @@
|
|||
let that = this
|
||||
innerAudioContext.autoplay = true;
|
||||
innerAudioContext.loop = false;
|
||||
innerAudioContext.src = '/static/Start.mp3';
|
||||
innerAudioContext.src = '/pageTwo/static/Start.mp3';
|
||||
innerAudioContext.play()
|
||||
setTimeout(function() {
|
||||
innerAudioContext.stop();
|
||||
|
|
@ -264,7 +264,7 @@
|
|||
handleAudio() {
|
||||
innerAudioContext.autoplay = true;
|
||||
innerAudioContext.loop = true;
|
||||
innerAudioContext.src = '/static/flight.mp3';
|
||||
innerAudioContext.src = '/pageTwo/static/flight.mp3';
|
||||
innerAudioContext.play()
|
||||
},
|
||||
// 接收蓝牙数据
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
|
@ -1,7 +1,7 @@
|
|||
import tools from '@/toolJs/tools.js'
|
||||
import store from '../store'
|
||||
// let baseUrl = "https://tc.pcxbc.com"
|
||||
let baseUrl = "https://tc.pcxbc.com/testedition"
|
||||
let baseUrl = "https://tc.pcxbc.com"
|
||||
// let baseUrl = "https://tc.pcxbc.com/testedition"
|
||||
const httpRequest = (url, method = "get", data) => {
|
||||
let httpDefaultOpts = {
|
||||
url: baseUrl + url,
|
||||
|
|
@ -21,7 +21,6 @@ const httpRequest = (url, method = "get", data) => {
|
|||
uni.clearStorageSync()
|
||||
uni.setStorageSync('token', null)
|
||||
uni.setStorageSync('aan_id', null)
|
||||
console.log("https.js跳转登录页面")
|
||||
setTimeout(function() {
|
||||
uni.reLaunch({
|
||||
url: "/pageTwo/login/login"
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__20604F1","name":"Reedaw","version":{"name":"1.2.8","code":128},"description":"面向儿童青少年的健康体质测量APP","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":"light","background":"#37cc92"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"template":"index.html","compattible":{"ignoreVersion":true},"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":"需要蓝牙权限来连接设备","NSBluetoothPeripheralUsageDescription":"使用蓝牙与外设通信"}},"plugins":{"share":{},"ad":{},"geolocation":{"system":{"__platform__":["ios"]}},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"uniStatistics":{"enable":false,"version":"2"},"allowsInlineMediaPlayback":true,"safearea":{"background":"#fff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"4.24","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333","fontSize":"14px","selectedColor":"#37cc92","backgroundColor":"#fff","list":[{"pagePath":"pages/home/home","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"首页"},{"pagePath":"pages/zixun/list","iconPath":"static/ping.png","selectedIconPath":"static/ping2.png","text":"资讯"},{"pagePath":"pages/my/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"}
|
||||
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__20604F1","name":"Reedaw","version":{"name":"1.3.0","code":130},"description":"面向儿童青少年的健康体质测量APP","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":"light","background":"#37cc92"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"template":"index.html","compattible":{"ignoreVersion":true},"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":"需要蓝牙权限来连接设备","NSBluetoothPeripheralUsageDescription":"使用蓝牙与外设通信"}},"plugins":{"share":{},"ad":{},"geolocation":{"system":{"__platform__":["ios"]}},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"uniStatistics":{"enable":false,"version":"2"},"allowsInlineMediaPlayback":true,"safearea":{"background":"#fff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"4.24","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333","fontSize":"14px","selectedColor":"#37cc92","backgroundColor":"#fff","list":[{"pagePath":"pages/home/home","iconPath":"static/shou.png","selectedIconPath":"static/shou2.png","text":"记录"},{"pagePath":"pages/zixun/list","iconPath":"static/ping.png","selectedIconPath":"static/ping2.png","text":"资讯"},{"pagePath":"pages/my/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"}
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
|
@ -1 +1 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["common/main"],{"0326":function(t,e,o){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={data:function(){return{}},onLaunch:function(){this.handleCityList(),this.handleCooperationUrl(),console.log("App Launch")},onShow:function(){console.log("App Show")},onHide:function(){console.log("App Hide")},methods:{checkForUpdates:function(){var e=this;plus.runtime.getProperty(plus.runtime.appid,(function(o){t.setStorageSync("VERSION",o.version),e.$store.commit("changePhoneInfo",{info:o}),console.log("当前应用版本号",o),e.handleCityList(),e.handleCooperationUrl(),e.handleoginversion(o)}))},handleoginversion:function(t){var e=this;e.$model.getloginversion({}).then((function(t){console.log("是否登录及版本号",t),e.handleCancelUpdate(t.code)}))},handleCancelUpdate:function(e){0==e?t.reLaunch({url:"/pages/home/home?type=1"}):setTimeout((function(){t.reLaunch({url:"/pageTwo/login/login"})}),500)},handleCityList:function(){var t=this;t.$model.getGradeList({}).then((function(e){console.log("|全部地区",e.data),0==e.code&&(t.$store.commit("changeCityList",e.data.area_list),t.$store.commit("changeGradeList",e.data.grade_list),t.$store.commit("changeIdentityList",e.data.identity_list))}))},handleCooperationUrl:function(){var t=this;this.$model.getCooperationUrl({}).then((function(e){console.log("合作服务",e.data),0==e.code&&t.$store.commit("changeCooperationUrl",e.data)}))}}};e.default=o}).call(this,o("df3c")["default"])},"25df":function(t,e,o){},"266f":function(t,e,o){"use strict";o.r(e);var n=o("0326"),a=o.n(n);for(var r in n)["default"].indexOf(r)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(r);e["default"]=a.a},"467f":function(t,e,o){"use strict";o.r(e);var n=o("266f");for(var a in n)["default"].indexOf(a)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(a);o("dad9");var r=o("828b"),i=Object(r["a"])(n["default"],void 0,void 0,!1,null,null,null,!1,void 0,void 0);e["default"]=i.exports},7580:function(t,e,o){"use strict";(function(t,e,n){var a=o("47a9"),r=a(o("7ca3"));o("30b7");var i=a(o("467f")),l=a(o("1160")),c=a(o("7d8e")),u=a(o("8d27")),d=a(o("b788")),f=a(o("455e")),s=a(o("a3d2")),p=a(o("b664")),h=a(o("3240")),g=a(o("4d79"));function m(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}t.__webpack_require_UNI_MP_PLUGIN__=o,h.default.prototype.$store=l.default,h.default.prototype.$tools=c.default,h.default.prototype.$Bluetooth=u.default,h.default.prototype.$http=d.default,h.default.prototype.$model=f.default,h.default.prototype.$video=p.default;var v={locale:e.getLocale(),messages:s.default};h.default.use(g.default);var y=new g.default(v);h.default.config.productionTip=!1,i.default.mpType="app";var b=new h.default(function(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?m(Object(o),!0).forEach((function(e){(0,r.default)(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):m(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({i18n:y},i.default));n(b).$mount()}).call(this,o("3223")["default"],o("df3c")["default"],o("df3c")["createApp"])},dad9:function(t,e,o){"use strict";var n=o("25df"),a=o.n(n);a.a}},[["7580","common/runtime","common/vendor"]]]);
|
||||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["common/main"],{"0326":function(t,e,o){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={data:function(){return{}},onLaunch:function(){this.handleCityList(),this.handleCooperationUrl(),this.updataWeiXin(),console.log("App Launch")},onShow:function(){console.log("App Show")},onHide:function(){console.log("App Hide")},methods:{checkForUpdates:function(){var e=this;plus.runtime.getProperty(plus.runtime.appid,(function(o){t.setStorageSync("VERSION",o.version),e.$store.commit("changePhoneInfo",{info:o}),console.log("当前应用版本号",o),e.handleCityList(),e.handleCooperationUrl(),e.handleoginversion(o)}))},handleoginversion:function(t){var e=this;e.$model.getloginversion({}).then((function(t){console.log("是否登录及版本号",t),e.handleCancelUpdate(t.code)}))},handleCancelUpdate:function(e){0==e?t.reLaunch({url:"/pages/home/home?type=1"}):setTimeout((function(){t.reLaunch({url:"/pageTwo/login/login"})}),500)},handleCityList:function(){var t=this;t.$model.getGradeList({}).then((function(e){console.log("|全部地区",e.data),0==e.code&&(t.$store.commit("changeCityList",e.data.area_list),t.$store.commit("changeGradeList",e.data.grade_list),t.$store.commit("changeIdentityList",e.data.identity_list))}))},handleCooperationUrl:function(){var t=this;this.$model.getCooperationUrl({}).then((function(e){console.log("合作服务",e.data),0==e.code&&t.$store.commit("changeCooperationUrl",e.data)}))},updataWeiXin:function(){var e=t.getUpdateManager();e.onCheckForUpdate((function(t){console.log("是否有新版本",t.hasUpdate)})),e.onUpdateReady((function(){t.showModal({title:"更新提示",content:"新版本已经准备好,是否重启应用?",success:function(t){t.confirm&&e.applyUpdate()}})})),e.onUpdateFailed((function(){t.showModal({title:"新版本更新失败",content:"请退出并移除小程序,重新打开..."})}))}}};e.default=o}).call(this,o("df3c")["default"])},"25df":function(t,e,o){},"266f":function(t,e,o){"use strict";o.r(e);var n=o("0326"),a=o.n(n);for(var i in n)["default"].indexOf(i)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(i);e["default"]=a.a},"467f":function(t,e,o){"use strict";o.r(e);var n=o("266f");for(var a in n)["default"].indexOf(a)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(a);o("dad9");var i=o("828b"),r=Object(i["a"])(n["default"],void 0,void 0,!1,null,null,null,!1,void 0,void 0);e["default"]=r.exports},7580:function(t,e,o){"use strict";(function(t,e,n){var a=o("47a9"),i=a(o("7ca3"));o("30b7");var r=a(o("467f")),c=a(o("1160")),l=a(o("7d8e")),d=a(o("8d27")),u=a(o("b788")),f=a(o("455e")),s=a(o("a3d2")),p=a(o("b664")),h=a(o("3240")),g=a(o("4d79"));function m(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}t.__webpack_require_UNI_MP_PLUGIN__=o,h.default.prototype.$store=c.default,h.default.prototype.$tools=l.default,h.default.prototype.$Bluetooth=d.default,h.default.prototype.$http=u.default,h.default.prototype.$model=f.default,h.default.prototype.$video=p.default;var v={locale:e.getLocale(),messages:s.default};h.default.use(g.default);var y=new g.default(v);h.default.config.productionTip=!1,r.default.mpType="app";var b=new h.default(function(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?m(Object(o),!0).forEach((function(e){(0,i.default)(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):m(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({i18n:y},r.default));n(b).$mount()}).call(this,o("3223")["default"],o("df3c")["default"],o("df3c")["createApp"])},dad9:function(t,e,o){"use strict";var n=o("25df"),a=o.n(n);a.a}},[["7580","common/runtime","common/vendor"]]]);
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
},
|
||||
"component": true
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
.btn.data-v-49b08bfe{width:40%;float:right;margin-top:15px;background:#37cc92!important}.close.data-v-49b08bfe{background:#dfdfdf!important;float:left}
|
||||
.btn.data-v-345408ac{width:40%;float:right;margin-top:15px;background:#37cc92!important}.close.data-v-345408ac{background:#dfdfdf!important;float:left}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"uni-icons": "/uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
},
|
||||
"component": true
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
<view class="weightPages data-v-4b742bda"><view class="content data-v-4b742bda"><view class="status data-v-4b742bda">{{textLink}}</view><view class="quan data-v-4b742bda"><view class="data-v-4b742bda"><text class="weight data-v-4b742bda">{{weight?weight:'0.00'}}</text>{{unit+''}}</view><block wx:if="{{typeInfo!=0}}"><view class="typeInfo data-v-4b742bda">{{typeInfo==2?'稳定重量':'实时重量'}}</view></block></view><block wx:if="{{isSave}}"><view class="btnGroup data-v-4b742bda"><view data-event-opts="{{[['tap',[['handleIsLing',['$event']]]]]}}" class="{{['data-v-4b742bda',IsLing?'disabled':'btnClose']}}" bindtap="__e">清零</view><view data-event-opts="{{[['tap',[['handleIsNum',['$event']]]]]}}" class="baocun data-v-4b742bda" bindtap="__e">锁定</view></view></block><view class="tips data-v-4b742bda"><text class="data-v-4b742bda">提示:</text><text class="data-v-4b742bda">1.请确定设备是开机状态</text><text class="data-v-4b742bda">2.请确定手机蓝牙、位置信息已打开</text></view></view><block wx:if="{{isHeight}}"><view class="wrapper data-v-4b742bda"><view class="bg data-v-4b742bda"></view><view class="Blue data-v-4b742bda"><view class="h4 data-v-4b742bda">测量结果提示</view><view class="Blue-box data-v-4b742bda">本次测量体重是:<text class="data-v-4b742bda">{{weight+unit}}</text></view><view class="Blue-box data-v-4b742bda">上次测量身高是:<input type="digit" placeholder="请输入身高" data-event-opts="{{[['input',[['__set_model',['','height','$event',[]]]]]]}}" value="{{height}}" bindinput="__e" class="data-v-4b742bda"/>cm</view><block wx:if="{{userInfo.stage=='婴儿'}}"><view class="Blue-box data-v-4b742bda">上次测量头围是:<input type="digit" placeholder="请输入头围" data-event-opts="{{[['input',[['__set_model',['','head','$event',[]]]]]]}}" value="{{head}}" bindinput="__e" class="data-v-4b742bda"/>cm</view></block><view data-event-opts="{{[['tap',[['handleBack',['$event']]]]]}}" class="Blue-btn Blue-close data-v-4b742bda" bindtap="__e">重新测量</view><view data-event-opts="{{[['tap',[['handleGetMeasure',['$event']]]]]}}" class="Blue-btn data-v-4b742bda" bindtap="__e">保存结果</view></view></view></block></view>
|
||||
<view class="weightPages data-v-2e16bdff"><view class="content data-v-2e16bdff"><view class="status data-v-2e16bdff">{{textLink}}</view><view class="quan data-v-2e16bdff"><view class="data-v-2e16bdff"><text class="weight data-v-2e16bdff">{{weight?weight:'0.00'}}</text>{{unit+''}}</view><block wx:if="{{typeInfo!=0}}"><view class="typeInfo data-v-2e16bdff">{{typeInfo==2?'稳定重量':'实时重量'}}</view></block></view><block wx:if="{{isSave}}"><view class="btnGroup data-v-2e16bdff"><view data-event-opts="{{[['tap',[['handleIsLing',['$event']]]]]}}" class="{{['data-v-2e16bdff',IsLing?'disabled':'btnClose']}}" bindtap="__e">清零</view><view data-event-opts="{{[['tap',[['handleIsNum',['$event']]]]]}}" class="baocun data-v-2e16bdff" bindtap="__e">锁定</view></view></block><view class="tips data-v-2e16bdff"><text class="data-v-2e16bdff">提示:</text><text class="data-v-2e16bdff">1.请确定设备是开机状态</text><text class="data-v-2e16bdff">2.请确定手机蓝牙、位置信息已打开</text></view></view><block wx:if="{{isHeight}}"><view class="wrapper data-v-2e16bdff"><view class="bg data-v-2e16bdff"></view><view class="Blue data-v-2e16bdff"><view class="h4 data-v-2e16bdff">测量结果提示</view><view class="Blue-box data-v-2e16bdff">本次测量体重是:<text class="data-v-2e16bdff">{{weight+unit}}</text></view><view class="Blue-box data-v-2e16bdff">上次测量身高是:<input type="digit" placeholder="请输入身高" data-event-opts="{{[['input',[['__set_model',['','height','$event',[]]]]]]}}" value="{{height}}" bindinput="__e" class="data-v-2e16bdff"/>cm</view><block wx:if="{{userInfo.stage=='婴儿'}}"><view class="Blue-box data-v-2e16bdff">上次测量头围是:<input type="digit" placeholder="请输入头围" data-event-opts="{{[['input',[['__set_model',['','head','$event',[]]]]]]}}" value="{{head}}" bindinput="__e" class="data-v-2e16bdff"/>cm</view></block><view data-event-opts="{{[['tap',[['handleBack',['$event']]]]]}}" class="Blue-btn Blue-close data-v-2e16bdff" bindtap="__e">重新测量</view><view data-event-opts="{{[['tap',[['handleGetMeasure',['$event']]]]]}}" class="Blue-btn data-v-2e16bdff" bindtap="__e">保存结果</view></view></view></block></view>
|
||||
|
|
@ -1 +1 @@
|
|||
.content.data-v-4b742bda{background:#fff;width:100%;height:100vh;display:flex;flex-direction:column;justify-content:space-between}.btnClose.data-v-4b742bda{color:#fff;background:linear-gradient(-90deg,#fccf4f,#fba418 80%)!important}.baocun.data-v-4b742bda{color:#fff;background:linear-gradient(-90deg,#feaa50,#e96b13 80%)!important}.quan.data-v-4b742bda{width:400rpx;height:400rpx;border:8px solid #feaa50;border-radius:50%;margin:15px auto;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 0 25px 10px #e96b13;-webkit-animation:pulse-data-v-4b742bda 1s infinite;animation:pulse-data-v-4b742bda 1s infinite}.quan .weight.data-v-4b742bda{font-size:50px;color:#000;font-weight:700}.quan .typeInfo.data-v-4b742bda{width:100%;text-align:center;font-size:16px;color:#f0ae43}@-webkit-keyframes pulse-data-v-4b742bda{0%{box-shadow:0 0 25px 10px #e96b13}50%{box-shadow:0 0 25px 10px #fba418}100%{box-shadow:0 0 25px 10px #e96b13}}@keyframes pulse-data-v-4b742bda{0%{box-shadow:0 0 25px 10px #e96b13}50%{box-shadow:0 0 25px 10px #fba418}100%{box-shadow:0 0 25px 10px #e96b13}}.status.data-v-4b742bda{width:70%;font-size:16px;height:35px;line-height:35px;text-align:center;border-radius:15px;margin:15px auto;background-color:#ffdda6}.disabled.data-v-4b742bda{width:150px;background-color:#dfdfdf;border:1px solid #f7f7f7;color:#fff;text-align:center;padding:7px;border-radius:10px;margin:15px auto}.tips.data-v-4b742bda{font-size:14px!important;margin-bottom:20px}
|
||||
.content.data-v-2e16bdff{background:#fff;width:100%;height:100vh;display:flex;flex-direction:column;justify-content:space-between}.btnClose.data-v-2e16bdff{color:#fff;background:linear-gradient(-90deg,#fccf4f,#fba418 80%)!important}.baocun.data-v-2e16bdff{color:#fff;background:linear-gradient(-90deg,#feaa50,#e96b13 80%)!important}.quan.data-v-2e16bdff{width:400rpx;height:400rpx;border:8px solid #feaa50;border-radius:50%;margin:15px auto;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 0 25px 10px #e96b13;-webkit-animation:pulse-data-v-2e16bdff 1s infinite;animation:pulse-data-v-2e16bdff 1s infinite}.quan .weight.data-v-2e16bdff{font-size:50px;color:#000;font-weight:700}.quan .typeInfo.data-v-2e16bdff{width:100%;text-align:center;font-size:16px;color:#f0ae43}@-webkit-keyframes pulse-data-v-2e16bdff{0%{box-shadow:0 0 25px 10px #e96b13}50%{box-shadow:0 0 25px 10px #fba418}100%{box-shadow:0 0 25px 10px #e96b13}}@keyframes pulse-data-v-2e16bdff{0%{box-shadow:0 0 25px 10px #e96b13}50%{box-shadow:0 0 25px 10px #fba418}100%{box-shadow:0 0 25px 10px #e96b13}}.status.data-v-2e16bdff{width:70%;font-size:16px;height:35px;line-height:35px;text-align:center;border-radius:15px;margin:15px auto;background-color:#ffdda6}.disabled.data-v-2e16bdff{width:150px;background-color:#dfdfdf;border:1px solid #f7f7f7;color:#fff;text-align:center;padding:7px;border-radius:10px;margin:15px auto}.tips.data-v-2e16bdff{font-size:14px!important;margin-bottom:20px}
|
||||
|
|
@ -1 +1 @@
|
|||
<view class="weightPages data-v-47279c26"><view class="content data-v-47279c26"><view class="status data-v-47279c26">{{textLink}}</view><view class="text data-v-47279c26">{{text}}</view><view class="image data-v-47279c26"><image class="image3 data-v-47279c26" src="/static/HC.png"></image></view><view class="tips data-v-47279c26"><view class="data-v-47279c26">提示:</view><text class="data-v-47279c26">1.请确定设备已开机</text><text class="data-v-47279c26">2.请确定手机蓝牙及位置信息已打开</text></view></view><block wx:if="{{isHeight}}"><view class="wrapper data-v-47279c26"><view class="bg data-v-47279c26"></view><view class="Blue data-v-47279c26"><view class="h4 data-v-47279c26">测量结果提示</view><view class="Blue-box data-v-47279c26">本次测量身高为:<text class="data-v-47279c26">{{height+unit}}</text></view><view class="Blue-box data-v-47279c26">上次测量体重为:<input type="digit" placeholder="请输入体重" data-event-opts="{{[['input',[['__set_model',['','weight','$event',[]]]]]]}}" value="{{weight}}" bindinput="__e" class="data-v-47279c26"/>kg</view><view data-event-opts="{{[['tap',[['handleHeight',['$event']]]]]}}" class="Blue-btn Blue-close data-v-47279c26" bindtap="__e">重新测量</view><view data-event-opts="{{[['tap',[['handleGetMeasure',['$event']]]]]}}" class="Blue-btn data-v-47279c26" bindtap="__e">保存测量结果</view></view></view></block></view>
|
||||
<view class="weightPages data-v-f038e658"><view class="content data-v-f038e658"><view class="status data-v-f038e658">{{textLink}}</view><view class="text data-v-f038e658">{{text}}</view><view class="image data-v-f038e658"><image class="image3 data-v-f038e658" src="/pageTwo/static/HC.png"></image></view><view class="tips data-v-f038e658"><view class="data-v-f038e658">提示:</view><text class="data-v-f038e658">1.请确定设备已开机</text><text class="data-v-f038e658">2.请确定手机蓝牙及位置信息已打开</text></view></view><block wx:if="{{isHeight}}"><view class="wrapper data-v-f038e658"><view class="bg data-v-f038e658"></view><view class="Blue data-v-f038e658"><view class="h4 data-v-f038e658">测量结果提示</view><view class="Blue-box data-v-f038e658">本次测量身高为:<text class="data-v-f038e658">{{height+unit}}</text></view><view class="Blue-box data-v-f038e658">上次测量体重为:<input type="digit" placeholder="请输入体重" data-event-opts="{{[['input',[['__set_model',['','weight','$event',[]]]]]]}}" value="{{weight}}" bindinput="__e" class="data-v-f038e658"/>kg</view><view data-event-opts="{{[['tap',[['handleHeight',['$event']]]]]}}" class="Blue-btn Blue-close data-v-f038e658" bindtap="__e">重新测量</view><view data-event-opts="{{[['tap',[['handleGetMeasure',['$event']]]]]}}" class="Blue-btn data-v-f038e658" bindtap="__e">保存测量结果</view></view></view></block></view>
|
||||
|
|
@ -1 +1 @@
|
|||
.image3.data-v-47279c26{width:200px!important;height:340px!important}.status.data-v-47279c26{width:70%;font-size:16px;height:35px;line-height:35px;text-align:center;border-radius:15px;margin:15px auto;background-color:#ffdda6}
|
||||
.image3.data-v-f038e658{width:200px!important;height:340px!important}.status.data-v-f038e658{width:70%;font-size:16px;height:35px;line-height:35px;text-align:center;border-radius:15px;margin:15px auto;background-color:#ffdda6}
|
||||
|
|
@ -1 +1 @@
|
|||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/devices/PCL"],{"0b1e":function(e,t,o){"use strict";(function(e){var i=o("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,r=i(o("7ca3")),s=o("8f59");function u(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function c(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?u(Object(o),!0).forEach((function(t){(0,r.default)(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):u(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var a={data:function(){return{text:"",imp:"",weight:"",height:"",deviceId:"",unit:"kg",Unload:!1,isHeight:!1,isConnection:0,isdevice:!1,stopblue:!0}},computed:c(c({},(0,s.mapState)(["user"])),{},{info:function(){return this.user}}),onUnload:function(){if(!this.Unload){clearTimeout(n),this.closeBluetoothAdapter(),this.stopBluetoothDevicesDiscovery();var e=getCurrentPages();e[e.length-2].$vm.getBlereload(),console.log("页面返回onUnload",e,e[e.length-2])}},onLoad:function(e){this.text="",this.stopblue=!0,this.deviceId=e.deviceId,this.height=this.user.height,this.onBluetoothDeviceFound()},watch:{stopblue:function(){this.stopblue||(clearTimeout(n),this.isHeight=!0)}},methods:{onBluetoothDeviceFound:function(){var t=this;e.onBluetoothDeviceFound((function(e){e.devices.forEach((function(e){if(e.advertisData=e.advertisData?e.advertisData:"",-1!==e.name.indexOf("PCL")&&-1!=e.deviceId.indexOf(t.deviceId)){clearTimeout(n);var o=t.$tools.ab2hex(e.advertisData,""),i=parseInt(o.substring(4,8),16),r=parseInt(o.substring(16,18),16).toString(2),s=r.substring(5,6),u=r.substring(3,5),c=r.substring(1,3);return"01"==c&&(t.unit="斤"),"10"==c&&(t.unit="lb"),"00"==u&&(i/=10),"10"==u&&("10"==c?(t.unit="lb",i/=10):i/=100),t.text="您的实时体重是:"+i+t.unit,"1"==s?(t.text="您的稳定体重是:"+i+t.unit,t.imp=parseInt(o.substring(8,12),16)/10,t.deviceId=e.deviceId,t.weight=i,void(t.stopblue=!1)):void 0}}))}))},handleMyTime:function(){var e=this;n=setTimeout((function(){e.macAddr||(clearTimeout(n),e.text="",e.Unload=!0,e.isHeight=!1,e.startBluetoothDeviceDiscovery(),e.closeBluetoothAdapter())}),3e4)},stopBluetoothDevicesDiscovery:function(){e.stopBluetoothDevicesDiscovery({success:function(e){console.log("停止搜索蓝牙设备",e)}})},handleGetMeasure:function(){var t=this;if(t.height){var o="";o="斤"==t.unit?t.weight/2:"lb"==t.unit?Number(.4536*t.weight).toFixed(2):t.weight,t.$model.getmeasurefunit({adc:t.imp,weight:o,height:t.height,aud_id:t.info.id}).then((function(o){t.isHeight=!1,console.log("res",o,t.imp),0==o.code?(t.$store.dispatch("getUserInfo",{aud_id:e.getStorageSync("userid")}),t.$store.dispatch("getResult",{aud_id:e.getStorageSync("userid")}),t.$tools.msg("测量成功")):t.$tools.msg("测量失败"),t.Unload=!0,setTimeout((function(){t.stopBluetoothDevicesDiscovery();var o=getCurrentPages();o[o.length-2].$vm.getBlereload(),e.switchTab({url:"/pages/home/home"})}),200)}))}else this.$tools.msg("请输入身高")},handleBack:function(){this.text="",this.Unload=!0,this.stopBluetoothDevicesDiscovery();var t=getCurrentPages();console.log("页面返回onUnload",t,t[t.length-2]),t[t.length-2].$vm.getBlereload(),e.switchTab({url:"/pages/home/home"})},closeBluetoothAdapter:function(){e.closeBluetoothAdapter({success:function(e){console.log("蓝牙模块关闭成功")}})}}};t.default=a}).call(this,o("df3c")["default"])},"352c":function(e,t,o){},"3b6b":function(e,t,o){"use strict";(function(e,t){var i=o("47a9");o("30b7");i(o("3240"));var n=i(o("b27a"));e.__webpack_require_UNI_MP_PLUGIN__=o,t(n.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])},"41d0":function(e,t,o){"use strict";var i=o("352c"),n=o.n(i);n.a},7860:function(e,t,o){"use strict";o.d(t,"b",(function(){return i})),o.d(t,"c",(function(){return n})),o.d(t,"a",(function(){}));var i=function(){var e=this.$createElement;this._self._c},n=[]},"8b3d":function(e,t,o){"use strict";o.r(t);var i=o("0b1e"),n=o.n(i);for(var r in i)["default"].indexOf(r)<0&&function(e){o.d(t,e,(function(){return i[e]}))}(r);t["default"]=n.a},b27a:function(e,t,o){"use strict";o.r(t);var i=o("7860"),n=o("8b3d");for(var r in n)["default"].indexOf(r)<0&&function(e){o.d(t,e,(function(){return n[e]}))}(r);o("41d0");var s=o("828b"),u=Object(s["a"])(n["default"],i["b"],i["c"],!1,null,"00b77638",null,!1,i["a"],void 0);t["default"]=u.exports}},[["3b6b","common/runtime","common/vendor"]]]);
|
||||
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/devices/PCL"],{"0b1e":function(e,t,o){"use strict";(function(e){var i=o("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,r=i(o("7ca3")),s=o("8f59");function c(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function u(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?c(Object(o),!0).forEach((function(t){(0,r.default)(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):c(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var a={data:function(){return{text:"",imp:"",weight:"",height:"",deviceId:"",unit:"kg",Unload:!1,isHeight:!1,isConnection:0,isdevice:!1,stopblue:!0}},computed:u(u({},(0,s.mapState)(["user"])),{},{info:function(){return this.user}}),onUnload:function(){if(!this.Unload){clearTimeout(n),this.closeBluetoothAdapter(),this.stopBluetoothDevicesDiscovery();var e=getCurrentPages();e[e.length-2].$vm.getBlereload(),console.log("页面返回onUnload",e,e[e.length-2])}},onLoad:function(e){this.text="",this.stopblue=!0,this.deviceId=e.deviceId,this.height=this.user.height,this.onBluetoothDeviceFound()},watch:{stopblue:function(){this.stopblue||(clearTimeout(n),this.isHeight=!0)}},methods:{onBluetoothDeviceFound:function(){var t=this;e.onBluetoothDeviceFound((function(e){e.devices.forEach((function(e){if(e.advertisData=e.advertisData?e.advertisData:"",-1!==e.name.indexOf("PCL")&&-1!=e.deviceId.indexOf(t.deviceId)){clearTimeout(n);var o=t.$tools.ab2hex(e.advertisData,""),i=parseInt(o.substring(4,8),16),r=parseInt(o.substring(16,18),16).toString(2),s=r.substring(5,6),c=r.substring(3,5),u=r.substring(1,3);return"01"==u&&(t.unit="斤"),"10"==u&&(t.unit="lb"),"00"==c&&(i/=10),"10"==c&&("10"==u?(t.unit="lb",i/=10):i/=100),t.text="您的实时体重是:"+i+t.unit,"1"==s?(t.text="您的稳定体重是:"+i+t.unit,t.imp=parseInt(o.substring(8,12),16)/10,t.deviceId=e.deviceId,t.weight=i,void(t.stopblue=!1)):void 0}}))}))},handleMyTime:function(){var e=this;n=setTimeout((function(){e.macAddr||(clearTimeout(n),e.text="",e.Unload=!0,e.isHeight=!1,e.startBluetoothDeviceDiscovery(),e.closeBluetoothAdapter())}),3e4)},stopBluetoothDevicesDiscovery:function(){e.stopBluetoothDevicesDiscovery({success:function(e){console.log("停止搜索蓝牙设备",e)}})},handleGetMeasure:function(){var t=this;t.height?t.$model.getmeasurefunit({adc:t.imp,weight:t.weight+t.unit,height:t.height,aud_id:t.info.id}).then((function(o){t.isHeight=!1,console.log("res",o,t.imp),0==o.code?(t.$store.dispatch("getUserInfo",{aud_id:e.getStorageSync("userid")}),t.$store.dispatch("getResult",{aud_id:e.getStorageSync("userid")}),t.$tools.msg("测量成功")):t.$tools.msg("测量失败"),t.Unload=!0,setTimeout((function(){t.stopBluetoothDevicesDiscovery();var o=getCurrentPages();o[o.length-2].$vm.getBlereload(),e.switchTab({url:"/pages/home/home"})}),200)})):this.$tools.msg("请输入身高")},handleBack:function(){this.text="",this.Unload=!0,this.stopBluetoothDevicesDiscovery();var t=getCurrentPages();console.log("页面返回onUnload",t,t[t.length-2]),t[t.length-2].$vm.getBlereload(),e.switchTab({url:"/pages/home/home"})},closeBluetoothAdapter:function(){e.closeBluetoothAdapter({success:function(e){console.log("蓝牙模块关闭成功")}})}}};t.default=a}).call(this,o("df3c")["default"])},"3b6b":function(e,t,o){"use strict";(function(e,t){var i=o("47a9");o("30b7");i(o("3240"));var n=i(o("b27a"));e.__webpack_require_UNI_MP_PLUGIN__=o,t(n.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])},7544:function(e,t,o){"use strict";o.d(t,"b",(function(){return i})),o.d(t,"c",(function(){return n})),o.d(t,"a",(function(){}));var i=function(){var e=this.$createElement;this._self._c},n=[]},"8a6a":function(e,t,o){},"8b3d":function(e,t,o){"use strict";o.r(t);var i=o("0b1e"),n=o.n(i);for(var r in i)["default"].indexOf(r)<0&&function(e){o.d(t,e,(function(){return i[e]}))}(r);t["default"]=n.a},b27a:function(e,t,o){"use strict";o.r(t);var i=o("7544"),n=o("8b3d");for(var r in n)["default"].indexOf(r)<0&&function(e){o.d(t,e,(function(){return n[e]}))}(r);o("ede7");var s=o("828b"),c=Object(s["a"])(n["default"],i["b"],i["c"],!1,null,"c6a7b0ba",null,!1,i["a"],void 0);t["default"]=c.exports},ede7:function(e,t,o){"use strict";var i=o("8a6a"),n=o.n(i);n.a}},[["3b6b","common/runtime","common/vendor"]]]);
|
||||
|
|
@ -1 +1 @@
|
|||
<view class="weightPages data-v-00b77638"><view class="content data-v-00b77638"><view class="title data-v-00b77638">连接成功,开始测量</view><view class="text data-v-00b77638">{{text}}</view><view class="image data-v-00b77638"><image class="image3 data-v-00b77638" src="/static/PCL.gif"></image></view><view class="tips data-v-00b77638"><view class="data-v-00b77638">提示:</view><text class="data-v-00b77638">1.请确定设备已开机</text><text class="data-v-00b77638">2.请确定手机蓝牙及位置信息已打开</text></view></view><block wx:if="{{isHeight}}"><view class="wrapper data-v-00b77638"><view class="bg data-v-00b77638"></view><view class="Blue data-v-00b77638"><view class="h4 data-v-00b77638">测量结果提示</view><view class="Blue-box data-v-00b77638">本次测量体重为:<text class="data-v-00b77638">{{weight+unit}}</text></view><view class="Blue-box data-v-00b77638">上次测量身高为:<input type="digit" placeholder="请输入身高" data-event-opts="{{[['input',[['__set_model',['','height','$event',[]]]]]]}}" value="{{height}}" bindinput="__e" class="data-v-00b77638"/>cm</view><view data-event-opts="{{[['tap',[['handleBack',['$event']]]]]}}" class="Blue-btn Blue-close data-v-00b77638" bindtap="__e">取消</view><view data-event-opts="{{[['tap',[['handleGetMeasure',['$event']]]]]}}" class="Blue-btn data-v-00b77638" bindtap="__e">保存测量结果</view></view></view></block></view>
|
||||
<view class="weightPages data-v-c6a7b0ba"><view class="content data-v-c6a7b0ba"><view class="title data-v-c6a7b0ba">连接成功,开始测量</view><view class="text data-v-c6a7b0ba">{{text}}</view><view class="image data-v-c6a7b0ba"><image class="image3 data-v-c6a7b0ba" src="/pageTwo/static/PCL.gif"></image></view><view class="tips data-v-c6a7b0ba"><view class="data-v-c6a7b0ba">提示:</view><text class="data-v-c6a7b0ba">1.请确定设备已开机</text><text class="data-v-c6a7b0ba">2.请确定手机蓝牙及位置信息已打开</text></view></view><block wx:if="{{isHeight}}"><view class="wrapper data-v-c6a7b0ba"><view class="bg data-v-c6a7b0ba"></view><view class="Blue data-v-c6a7b0ba"><view class="h4 data-v-c6a7b0ba">测量结果提示</view><view class="Blue-box data-v-c6a7b0ba">本次测量体重为:<text class="data-v-c6a7b0ba">{{weight+unit}}</text></view><view class="Blue-box data-v-c6a7b0ba">上次测量身高为:<input type="digit" placeholder="请输入身高" data-event-opts="{{[['input',[['__set_model',['','height','$event',[]]]]]]}}" value="{{height}}" bindinput="__e" class="data-v-c6a7b0ba"/>cm</view><view data-event-opts="{{[['tap',[['handleBack',['$event']]]]]}}" class="Blue-btn Blue-close data-v-c6a7b0ba" bindtap="__e">取消</view><view data-event-opts="{{[['tap',[['handleGetMeasure',['$event']]]]]}}" class="Blue-btn data-v-c6a7b0ba" bindtap="__e">保存测量结果</view></view></view></block></view>
|
||||
|
|
@ -1 +1 @@
|
|||
.image3.data-v-00b77638{width:200px!important;height:340px!important}
|
||||
.image3.data-v-c6a7b0ba{width:200px!important;height:340px!important}
|
||||
|
|
@ -1 +1 @@
|
|||
<view class="content skipping data-v-115fd8c8"><view class="title data-v-115fd8c8">{{info.active==1?'自由跳':info.active==2?'倒计时':'倒计数'}}</view><view class="skiptop data-v-115fd8c8"><view class="item data-v-115fd8c8"><view class="item-ite data-v-115fd8c8">{{info.active==1?'自由次数':info.active==2?"个数":'目标次数'}}<text class="data-v-115fd8c8">{{weight}}</text></view><view class="item-ite data-v-115fd8c8">{{''+(info.active==2?'目标时长 分:秒':"分:秒")}}<text class="data-v-115fd8c8">{{(time_m?time_m:'00')+":"+(time_s?time_s:'00')}}</text></view><view class="item-ite data-v-115fd8c8">消耗/kcal<text class="data-v-115fd8c8">{{$root.g0}}</text></view></view></view><view class="image data-v-115fd8c8"><image src="../../static/t01.gif" class="data-v-115fd8c8"></image></view><view data-event-opts="{{[['longpress',[['onlongpress',['$event']]]]]}}" class="end data-v-115fd8c8" bindlongpress="__e">长按结束</view><block wx:if="{{iswrapper}}"><view class="wrapper data-v-115fd8c8"><view class="bg data-v-115fd8c8"><view class="edit data-v-115fd8c8"><view class="editem data-v-115fd8c8"><view class="data-v-115fd8c8">平均速度:<text class="cyello Blue size20 mr-5 data-v-115fd8c8">{{$root.g1}}</text>bpm</view><view class="size12 c999 data-v-115fd8c8">(bpm=个/分钟)</view></view><view class="center data-v-115fd8c8"><view class="left data-v-115fd8c8"><image src="../../static/duan.png" class="data-v-115fd8c8"></image><view class="name data-v-115fd8c8"><view class="data-v-115fd8c8">中断次数</view><view class="data-v-115fd8c8"><text class="cyello Blue size20 mr-5 data-v-115fd8c8">{{Bcount}}</text>次</view></view></view><view class="left data-v-115fd8c8"><image src="../../static/xu.png" class="data-v-115fd8c8"></image><view class="name data-v-115fd8c8"><view class="data-v-115fd8c8">最长连续</view><view class="data-v-115fd8c8"><text class="cyello Blue size20 mr-5 data-v-115fd8c8">{{continuous}}</text>个</view></view></view></view><view class="item data-v-115fd8c8"><view class="item-ite data-v-115fd8c8"><text class="data-v-115fd8c8">{{weight}}</text>训练个数</view><view class="item-ite data-v-115fd8c8"><text class="data-v-115fd8c8">{{(time_m?time_m:'00')+":"+(time_s?time_s:'00')}}</text>分:秒</view><view class="item-ite data-v-115fd8c8"><text class="data-v-115fd8c8">{{$root.g2}}</text>消耗/kcal</view></view><view data-event-opts="{{[['tap',[['handleTarget',['$event']]]]]}}" class="btn data-v-115fd8c8" bindtap="__e">完成</view></view></view></view></block></view>
|
||||
<view class="content skipping data-v-a850cfc0"><view class="title data-v-a850cfc0">{{info.active==1?'自由跳':info.active==2?'倒计时':'倒计数'}}</view><view class="skiptop data-v-a850cfc0"><view class="item data-v-a850cfc0"><view class="item-ite data-v-a850cfc0">{{info.active==1?'自由次数':info.active==2?"个数":'目标次数'}}<text class="data-v-a850cfc0">{{weight}}</text></view><view class="item-ite data-v-a850cfc0">{{''+(info.active==2?'目标时长 分:秒':"分:秒")}}<text class="data-v-a850cfc0">{{(time_m?time_m:'00')+":"+(time_s?time_s:'00')}}</text></view><view class="item-ite data-v-a850cfc0">消耗/kcal<text class="data-v-a850cfc0">{{$root.g0}}</text></view></view></view><view class="image data-v-a850cfc0"><image src="/pageTwo/static/t01.gif" class="data-v-a850cfc0"></image></view><view data-event-opts="{{[['longpress',[['onlongpress',['$event']]]]]}}" class="end data-v-a850cfc0" bindlongpress="__e">长按结束</view><block wx:if="{{iswrapper}}"><view class="wrapper data-v-a850cfc0"><view class="bg data-v-a850cfc0"><view class="edit data-v-a850cfc0"><view class="editem data-v-a850cfc0"><view class="data-v-a850cfc0">平均速度:<text class="cyello Blue size20 mr-5 data-v-a850cfc0">{{$root.g1}}</text>bpm</view><view class="size12 c999 data-v-a850cfc0">(bpm=个/分钟)</view></view><view class="center data-v-a850cfc0"><view class="left data-v-a850cfc0"><image src="/pageTwo/static/duan.png" class="data-v-a850cfc0"></image><view class="name data-v-a850cfc0"><view class="data-v-a850cfc0">中断次数</view><view class="data-v-a850cfc0"><text class="cyello Blue size20 mr-5 data-v-a850cfc0">{{Bcount}}</text>次</view></view></view><view class="left data-v-a850cfc0"><image src="/pageTwo/static/xu.png" class="data-v-a850cfc0"></image><view class="name data-v-a850cfc0"><view class="data-v-a850cfc0">最长连续</view><view class="data-v-a850cfc0"><text class="cyello Blue size20 mr-5 data-v-a850cfc0">{{continuous}}</text>个</view></view></view></view><view class="item data-v-a850cfc0"><view class="item-ite data-v-a850cfc0"><text class="data-v-a850cfc0">{{weight}}</text>训练个数</view><view class="item-ite data-v-a850cfc0"><text class="data-v-a850cfc0">{{(time_m?time_m:'00')+":"+(time_s?time_s:'00')}}</text>分:秒</view><view class="item-ite data-v-a850cfc0"><text class="data-v-a850cfc0">{{$root.g2}}</text>消耗/kcal</view></view><view data-event-opts="{{[['tap',[['handleTarget',['$event']]]]]}}" class="btn data-v-a850cfc0" bindtap="__e">完成</view></view></view></view></block></view>
|
||||
|
|
@ -1 +1 @@
|
|||
.content.data-v-115fd8c8{width:100%;min-height:100vh;background-color:#fff}.item-ite.data-v-115fd8c8{line-height:20PX;margin-bottom:15px}.title.data-v-115fd8c8{height:50px;line-height:50px;text-align:center;font-weight:700}.image.data-v-115fd8c8{width:100%;text-align:center;margin-top:30px}.image image.data-v-115fd8c8{width:200px;height:252px;margin:auto}.end.data-v-115fd8c8{color:#fff;position:absolute;bottom:80px;width:70px;height:70px;line-height:70px;background:#fea606;margin-left:calc(50% - 35px);border-radius:50px;text-align:center;box-shadow:0 1px 5px 2px rgba(223,226,225,.9882352941176471)}.wrapper.data-v-115fd8c8{background-color:rgba(0,0,0,.6)}.wrapper .edit.data-v-115fd8c8{width:80%!important;background-color:#fff}.wrapper .editem.data-v-115fd8c8{height:auto;display:flex;align-items:center;flex-direction:column}.wrapper .editem view.data-v-115fd8c8{width:100%;text-align:center;margin-bottom:5px}.wrapper .center.data-v-115fd8c8{background-color:#eee;padding:0 10px;display:flex;margin:45px 0;font-size:32rpx;border-radius:5px;height:65px;align-items:center;justify-content:space-between}.wrapper .center image.data-v-115fd8c8{width:35px;height:35px;margin-right:10px;margin-top:15px}.wrapper .center .left.data-v-115fd8c8{display:flex;align-content:center}.wrapper .center .name.data-v-115fd8c8{margin-top:15px}.wrapper .item.data-v-115fd8c8{display:flex;justify-content:space-between}.wrapper .item .item-ite.data-v-115fd8c8{line-height:20px;font-size:28rpx;color:#999;text-align:center}.wrapper .item .item-ite text.data-v-115fd8c8{display:block;width:100%;font-size:36rpx;color:#333;text-align:center;margin-bottom:10px}.wrapper .btn.data-v-115fd8c8{margin-top:25px;height:45px;line-height:45px;background:#fea606;margin-bottom:25px}
|
||||
.content.data-v-a850cfc0{width:100%;min-height:100vh;background-color:#fff}.item-ite.data-v-a850cfc0{line-height:20PX;margin-bottom:15px}.title.data-v-a850cfc0{height:50px;line-height:50px;text-align:center;font-weight:700}.image.data-v-a850cfc0{width:100%;text-align:center;margin-top:30px}.image image.data-v-a850cfc0{width:200px;height:252px;margin:auto}.end.data-v-a850cfc0{color:#fff;position:absolute;bottom:80px;width:70px;height:70px;line-height:70px;background:#fea606;margin-left:calc(50% - 35px);border-radius:50px;text-align:center;box-shadow:0 1px 5px 2px rgba(223,226,225,.9882352941176471)}.wrapper.data-v-a850cfc0{background-color:rgba(0,0,0,.6)}.wrapper .edit.data-v-a850cfc0{width:80%!important;background-color:#fff}.wrapper .editem.data-v-a850cfc0{height:auto;display:flex;align-items:center;flex-direction:column}.wrapper .editem view.data-v-a850cfc0{width:100%;text-align:center;margin-bottom:5px}.wrapper .center.data-v-a850cfc0{background-color:#eee;padding:0 10px;display:flex;margin:45px 0;font-size:32rpx;border-radius:5px;height:65px;align-items:center;justify-content:space-between}.wrapper .center image.data-v-a850cfc0{width:35px;height:35px;margin-right:10px;margin-top:15px}.wrapper .center .left.data-v-a850cfc0{display:flex;align-content:center}.wrapper .center .name.data-v-a850cfc0{margin-top:15px}.wrapper .item.data-v-a850cfc0{display:flex;justify-content:space-between}.wrapper .item .item-ite.data-v-a850cfc0{line-height:20px;font-size:28rpx;color:#999;text-align:center}.wrapper .item .item-ite text.data-v-a850cfc0{display:block;width:100%;font-size:36rpx;color:#333;text-align:center;margin-bottom:10px}.wrapper .btn.data-v-a850cfc0{margin-top:25px;height:45px;line-height:45px;background:#fea606;margin-bottom:25px}
|
||||