公众配置接口

This commit is contained in:
qiaocl 2022-05-13 09:22:34 +08:00
parent 9f5eca2870
commit 3738c2abe0
188 changed files with 11646 additions and 10992 deletions

110
App.vue
View File

@ -1,55 +1,63 @@
<script>
export default {
methods: {},
onLaunch() {
//
const updateManager = wx.getUpdateManager()
//
updateManager.onCheckForUpdate(function(res) {
console.log("是否有新版本", res.hasUpdate)
})
//
updateManager.onUpdateReady(function() {
wx.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
success: function(res) {
if (res.confirm) {
// applyUpdate
updateManager.applyUpdate()
}
}
})
})
//
updateManager.onUpdateFailed(function() {
wx.showModal({
title: '新版本更新失败',
content: '请退出并移除小程序,重新打开...',
})
})
//
// uni.getSystemInfo({
// success: e => {
// let res = uni.getMenuButtonBoundingClientRect()
// let statusBarHeight = {
// BarTopHeight: res.top,
// BarTopLineHeight: res.height + 10,
// BarMarginTop: Number(res.top + res.height + 10)
// }
// this.$store.commit("handleBarHeight", statusBarHeight);
// console.log("", e, res)
// }
// })
},
mounted() {},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
import {
mapState
} from "vuex";
export default {
methods: {},
computed: {
...mapState(["appTheme"]),
},
onLaunch() {
//
const updateManager = wx.getUpdateManager()
//
updateManager.onCheckForUpdate(function(res) {
console.log("是否有新版本", res.hasUpdate)
})
//
updateManager.onUpdateReady(function() {
wx.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
success: function(res) {
if (res.confirm) {
// applyUpdate
updateManager.applyUpdate()
}
}
})
})
//
updateManager.onUpdateFailed(function() {
wx.showModal({
title: '新版本更新失败',
content: '请退出并移除小程序,重新打开...',
})
})
//
// uni.getSystemInfo({
// success: e => {
// let res = uni.getMenuButtonBoundingClientRect()
// let statusBarHeight = {
// BarTopHeight: res.top,
// BarTopLineHeight: res.height + 10,
// BarMarginTop: Number(res.top + res.height + 10)
// }
// this.$store.commit("handleBarHeight", statusBarHeight);
// console.log("", e, res)
// }
// })
//
},
mounted() {},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
},
}
</script>
<style lang="scss">

View File

@ -1,428 +1,436 @@
<template>
<view>
<view class="content weightPages">
<view class="title" v-if="isConnection == 0">连接中请稍后</view>
<view class="title" v-if="isConnection == 1">连接成功请开始测量</view>
<view class="title" v-if="isConnection == 2" @click="openBluetoothAdapter">连接失败点击重新连接</view>
<view class="text">{{text}}</view>
<view class="image">
<image src="/BLEPages/static/F018P01.gif" v-if="type==1"></image>
<image src="/BLEPages/static/F018P01.gif" v-if="type==2"></image>
</view>
<view class="tips">
<text>提示</text>
<text>1.请确定设备是开机状态</text>
<text>2.请确定手机蓝牙位置信息已打开</text>
<text>3.ios系统需打开设置>应用>微信里的蓝牙权限</text>
</view>
</view>
<view>
<view class="content weightPages">
<view class="title" v-if="isConnection == 0">连接中请稍后</view>
<view class="title" v-if="isConnection == 1">连接成功请开始测量</view>
<view class="title" v-if="isConnection == 2" @click="openBluetoothAdapter">连接失败点击重新连接</view>
<view class="text">{{text}}</view>
<view class="image">
<image src="/BLEPages/static/F018P01.gif" v-if="type==1"></image>
<image src="/BLEPages/static/F018P01.gif" v-if="type==2"></image>
</view>
<view class="tips">
<text>提示</text>
<text>1.请确定设备是开机状态</text>
<text>2.请确定手机蓝牙位置信息已打开</text>
<text>3.ios系统需打开设置>应用>微信里的蓝牙权限</text>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
var myTime;
export default {
data() {
return {
text: "",
height: "",
weight: "",
imp: 0,
type: 1,
uuid1: "",
uuid2: "",
uuid3: "",
macAddr: "",
deviceId: "",
serviceId: "",
Unload: false,
isConnection: 0, //
import {
mapState
} from "vuex";
var myTime;
export default {
data() {
return {
text: "",
height: "",
weight: "",
imp: 0,
type: 1,
uuid1: "",
uuid2: "",
uuid3: "",
macAddr: "",
deviceId: "",
serviceId: "",
Unload: false,
isConnection: 0, //
}
},
computed: {
...mapState(["user", "isConnected", "isBluetoothTyle", "appTheme"]),
info() {
return this.user
}
},
onUnload: function() {
let that = this
if (!that.Unload) {
that.stopBluetoothDevicesDiscovery() //
clearTimeout(myTime);
that.closeBLEConnection()
that.closeBluetoothAdapter()
console.log("返回上一个页面")
}
},
onLoad(options) {
let that = this
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
//
that.text = ""
if (options && options.deviceId) {
that.macAddr = options.deviceId
that.deviceId = options.deviceId
that.createBLEConnection()
}
that.onBLEConnectionStateChange()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
},
watch: {
isConnected: function() {
let that = this
if (!that.isConnected) {
that.handleBack()
that.isConnection = 2
}
},
isBluetoothTyle: function() {
let that = this
if (!that.isBluetoothTyle) {
that.handleBack()
that.isConnection = 2
}
},
},
methods: {
//
openBluetoothAdapter() {
let that = this
that.type = 1
uni.openBluetoothAdapter({
success: e => {
that.isConnection = 0
that.startBluetoothDeviceDiscovery()
},
fail: e => {
that.isConnection = 2
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
}
});
},
//
startBluetoothDeviceDiscovery() {
let that = this
uni.startBluetoothDevicesDiscovery({
allowDuplicatesKey: false,
interval: 500, //
services: [
"FFE0",
],
success: res => {
that.isConnection = 0
that.onBluetoothDeviceFound();
},
fail: res => {
that.isConnection = 2
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
}
});
},
/**
* 发现外围设备
*/
onBluetoothDeviceFound() {
var that = this;
that.isConnection = 0
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
if (!device.name && !device.localName) {
return
}
},
computed: {
...mapState(["user", "isConnected", "isBluetoothTyle"]),
info() {
return this.user
}
},
onUnload: function() {
let that = this
if (!that.Unload) {
that.stopBluetoothDevicesDiscovery() //
clearTimeout(myTime);
that.closeBLEConnection()
that.closeBluetoothAdapter()
console.log("返回上一个页面")
}
},
onLoad(options) {
let that = this
that.text = ""
if (options && options.deviceId) {
that.macAddr = options.deviceId
that.deviceId = options.deviceId
if (device.name.indexOf('AiLink_') != -1) {
clearTimeout(myTime);
let buff = device.advertisData.slice(-6)
device.mac = new Uint8Array(buff) // 广maciOSmac
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) {
that.stopBluetoothDevicesDiscovery()
that.macAddr = device.macAddr
that.deviceId = device.deviceId;
that.createBLEConnection()
return;
}
}
that.onBLEConnectionStateChange()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
},
watch: {
isConnected: function() {
let that = this
if (!that.isConnected) {
that.handleBack()
that.isConnection = 2
})
});
that.handleMyTime()
},
handleMyTime() {
var that = this;
myTime = setTimeout(function() {
if (!that.macAddr) {
clearTimeout(myTime);
that.Unload = true
that.isConnection = 2
that.closeBLEConnection()
that.closeBluetoothAdapter()
}
}, 20000);
},
/**
* 停止搜索蓝牙设备
*/
stopBluetoothDevicesDiscovery() {
uni.stopBluetoothDevicesDiscovery({
success: e => {
console.log("停止搜索蓝牙设备", e)
},
});
},
//
onBLEConnectionStateChange() {
let that = this
uni.onBLEConnectionStateChange(function(res) {
console.log("监听蓝牙连接状态", res.connected)
if (!res.connected) {
clearTimeout(myTime);
that.Unload = true
that.isConnection = 2
that.closeBLEConnection()
that.closeBluetoothAdapter()
}
that.$store.commit("changeConnected", res.connected);
})
},
//
createBLEConnection() {
let that = this;
uni.createBLEConnection({
deviceId: that.deviceId,
success: res => {
that.isConnection = 0
that.getBLEDeviceServices();
},
fail: res => {
that.isConnection = 2
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.isConnection = 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)
for (let i = 0; i < res.characteristics.length; i++) {
let item = res.characteristics[i];
if (item.uuid.indexOf('0000FFE1') != -1) {
that.uuid1 = item.uuid //
} else if (item.uuid.indexOf('0000FFE2') != -1) {
that.uuid2 = item.uuid //
that.notifyBLECharacteristicValue()
} else if (item.uuid.indexOf('0000FFE3') != -1) {
that.uuid3 = item.uuid //
}
}
},
fail: res => {
console.log('获取特征值失败:', JSON.stringify(res))
}
})
},
/**
* 开启订阅特征值
* read: true, //,write: true, //,notify: true, //广
*/
notifyBLECharacteristicValue() {
let that = this;
uni.notifyBLECharacteristicValueChange({
state: true, // notify
deviceId: that.deviceId,
serviceId: that.serviceId,
characteristicId: that.uuid2,
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)
if (type == "10") {
let data = parseInt(value.substring(13, 18), 16)
let dw1 = "kg"
let dw2 = "kg"
if (dw == "1") {
dw1 = "斤"
dw2 = "jin"
}
},
isBluetoothTyle: function() {
let that = this
if (!that.isBluetoothTyle) {
that.handleBack()
that.isConnection = 2
if (dw == "4") {
dw1 = "st:lb"
dw2 = "st"
data = 1 * data + 5
}
},
},
methods: {
//
openBluetoothAdapter() {
let that = this
that.type = 1
uni.openBluetoothAdapter({
success: e => {
that.isConnection = 0
that.startBluetoothDeviceDiscovery()
},
fail: e => {
that.isConnection = 2
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
}
});
},
//
startBluetoothDeviceDiscovery() {
let that = this
uni.startBluetoothDevicesDiscovery({
allowDuplicatesKey: false,
interval: 500, //
services: [
"FFE0",
],
success: res => {
that.isConnection = 0
that.onBluetoothDeviceFound();
},
fail: res => {
that.isConnection = 2
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
}
});
},
/**
* 发现外围设备
*/
onBluetoothDeviceFound() {
var that = this;
that.isConnection = 0
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
if (!device.name && !device.localName) {
return
}
if (device.deviceId.indexOf(that.deviceId) != -1) {
that.stopBluetoothDevicesDiscovery()
clearTimeout(myTime);
let buff = device.advertisData.slice(-6)
device.mac = new Uint8Array(buff) // 广maciOSmac
let tempMac = Array.from(device.mac)
tempMac.reverse()
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
that.macAddr = device.macAddr
that.deviceId = device.deviceId;
that.createBLEConnection()
return;
}
})
});
that.handleMyTime()
},
handleMyTime() {
var that = this;
myTime = setTimeout(function() {
if (!that.macAddr) {
clearTimeout(myTime);
that.Unload = true
that.isConnection = 2
that.closeBLEConnection()
that.closeBluetoothAdapter()
}
}, 20000);
},
/**
* 停止搜索蓝牙设备
*/
stopBluetoothDevicesDiscovery() {
uni.stopBluetoothDevicesDiscovery({
success: e => {
console.log("停止搜索蓝牙设备", e)
},
});
},
//
onBLEConnectionStateChange() {
let that = this
uni.onBLEConnectionStateChange(function(res) {
console.log("监听蓝牙连接状态", res.connected)
if (!res.connected) {
clearTimeout(myTime);
that.Unload = true
that.isConnection = 2
that.closeBLEConnection()
that.closeBluetoothAdapter()
}
that.$store.commit("changeConnected", res.connected);
})
},
//
createBLEConnection() {
let that = this;
uni.createBLEConnection({
deviceId: that.deviceId,
success: res => {
that.isConnection = 0
that.getBLEDeviceServices();
},
fail: res => {
that.isConnection = 2
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.isConnection = 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)
for (let i = 0; i < res.characteristics.length; i++) {
let item = res.characteristics[i];
if (item.uuid.indexOf('0000FFE1') != -1) {
that.uuid1 = item.uuid //
} else if (item.uuid.indexOf('0000FFE2') != -1) {
that.uuid2 = item.uuid //
} else if (item.uuid.indexOf('0000FFE3') != -1) {
that.uuid3 = item.uuid //
that.notifyBLECharacteristicValue()
}
}
},
fail: res => {
console.log('获取特征值失败:', JSON.stringify(res))
}
})
},
/**
* 开启订阅特征值
* read: true, //,write: true, //,notify: true, //广
*/
notifyBLECharacteristicValue() {
let that = this;
uni.notifyBLECharacteristicValueChange({
state: true, // notify
deviceId: that.deviceId,
serviceId: that.serviceId,
characteristicId: that.uuid3,
if (dw == "6") {
dw1 = "lb"
dw2 = "lb"
}
if (num == "1") {
data = parseInt(value.substring(13, 18), 16) / 10
}
if (num == "2") {
data = parseInt(value.substring(13, 18), 16) / 100
}
if (num == "3") {
data = parseInt(value.substring(13, 18), 16) / 1000
}
if (typeInfo == "01") {
that.text = "您的实时体重是:" + data + dw1
}
if (typeInfo == "02") {
that.text = "您的体重是:" + data + dw1
that.weight = data + dw2
console.log("稳定体重:", value, that.weight)
}
}
if (type == "11") {
that.type = 2
if (typeInfo == "03" || typeInfo == "04") {
that.imp = parseInt(value.substring(17, 22), 16)
}
console.log("体脂:", that.imp)
}
if (type == "14") { //
that.height = parseInt(value.substring(10, 14), 16) / 10
console.log("身高模式:", that.height)
}
if (type == "30") {
console.log("测量完成", that.weight, that.height, that.imp)
if (that.imp == 0) {
uni.showModal({
title: '提示',
content: "体脂测量失败,是否保存本次测量结果?",
cancelText: "放弃",
confirmText: "保存",
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)
if (type == "10") {
let data = parseInt(value.substring(13, 18), 16)
let dw1 = "kg"
let dw2 = "kg"
if (dw == "1") {
dw1 = "斤"
dw2 = "jin"
}
if (dw == "4") {
dw1 = "st:lb"
dw2 = "st"
data = 1 * data + 5
}
if (dw == "6") {
dw1 = "lb"
dw2 = "lb"
}
if (num == "1") {
data = parseInt(value.substring(13, 18), 16) / 10
}
if (num == "2") {
data = parseInt(value.substring(13, 18), 16) / 100
}
if (num == "3") {
data = parseInt(value.substring(13, 18), 16) / 1000
}
if (typeInfo == "01") {
that.text = "您的实时体重是:" + data + dw1
}
if (typeInfo == "02") {
that.text = "您的体重是:" + data + dw1
that.weight = data + dw2
console.log("稳定体重:", value, that.weight)
}
}
if (type == "11") {
if (typeInfo == "03") {
that.imp = parseInt(value.substring(17, 22), 16)
}
console.log("体脂:", that.imp)
}
if (type == "14") { //
that.height = parseInt(value.substring(10, 14), 16) / 10
that.type = 2
console.log("身高模式:", that.height)
}
if (type == "30") {
console.log("测量完成", that.weight, that.height, that.imp)
if (that.imp == 0) {
uni.showModal({
title: '提示',
content: "体脂测量失败,是否保存本次测量结果?",
cancelText: "放弃",
confirmText: "保存",
success(res) {
if (res.confirm) {
that.imp = 0
that.handleGetMeasure()
} else {
that.Unload = true
that.closeBLEConnection()
that.closeBluetoothAdapter()
uni.navigateBack({
delta: 1
})
}
}
})
} else {
that.handleGetMeasure()
}
}
});
},
fail(res) {
console.log("测量失败", res.value);
}
});
},
//
handleGetMeasure() {
let that = this
that.$model.getmeasure({
weight: that.weight,
imp: that.imp,
ecode: that.macAddr,
height: that.height,
familyid: that.info.familyid,
}).then(res => {
if (res.code == 0) {
that.$tools.msg("测量成功")
that.$store.dispatch("getUserInfo", {
familyid: that.info.familyid,
});
that.$store.dispatch("getResult", {
birthday: that.info.birthday,
familyid: that.info.familyid,
height: that.height,
sex: that.info.sex,
});
} else {
console.log("测量失败", res.message)
that.$tools.msg(res.message)
}
that.Unload = true
setTimeout(function() {
if (res.confirm) {
that.imp = 0
that.handleGetMeasure()
} else {
that.Unload = true
that.closeBLEConnection()
that.closeBluetoothAdapter()
uni.switchTab({
url: "/pages/index/index"
uni.navigateBack({
delta: 1
})
}, 200)
})
},
handleBack(ind) {
let that = this
that.text = ""
that.Unload = true
that.stopBluetoothDevicesDiscovery() //
that.closeBLEConnection()
that.closeBluetoothAdapter()
clearTimeout(myTime)
},
/**
* 断开蓝牙模块
*/
closeBluetoothAdapter() {
let that = this;
uni.closeBluetoothAdapter({
success: res => {
console.log('蓝牙模块关闭成功');
}
}
})
},
/**
* 断开蓝牙连接
*/
closeBLEConnection() {
var that = this;
uni.closeBLEConnection({
deviceId: that.deviceId,
success: res => {
console.log('断开蓝牙连接成功');
}
});
},
},
}
})
} else {
that.handleGetMeasure()
}
}
});
},
fail(res) {
console.log("测量失败", res.value);
}
});
},
//
handleGetMeasure() {
let that = this
that.$model.getmeasure({
weight: that.weight,
imp: that.imp,
ecode: that.macAddr,
height: that.height ? that.height : that.info.height,
familyid: that.info.familyid,
}).then(res => {
if (res.code == 0) {
that.$tools.msg("测量成功")
that.$store.dispatch("getUserInfo", {
familyid: that.info.familyid,
});
that.$store.dispatch("getResult", {
birthday: that.info.birthday,
familyid: that.info.familyid,
height: that.height ? that.height : that.info.height,
sex: that.info.sex,
});
} else {
console.log("测量失败", res.message)
that.$tools.msg(res.message)
}
that.Unload = true
setTimeout(function() {
that.closeBLEConnection()
that.closeBluetoothAdapter()
uni.switchTab({
url: "/pages/index/index"
})
}, 200)
})
},
handleBack(ind) {
let that = this
that.text = ""
that.Unload = true
that.stopBluetoothDevicesDiscovery() //
that.closeBLEConnection()
that.closeBluetoothAdapter()
clearTimeout(myTime)
},
/**
* 断开蓝牙模块
*/
closeBluetoothAdapter() {
let that = this;
uni.closeBluetoothAdapter({
success: res => {
console.log('蓝牙模块关闭成功');
}
})
},
/**
* 断开蓝牙连接
*/
closeBLEConnection() {
var that = this;
uni.closeBLEConnection({
deviceId: that.deviceId,
success: res => {
console.log('断开蓝牙连接成功');
}
});
},
},
}
</script>
<style scoped lang="scss">

474
BLEPages/adult/F01PRO.vue Normal file
View File

@ -0,0 +1,474 @@
<template>
<view>
<view class="content weightPages">
<view class="title" v-if="isConnection == 0">连接中请稍后</view>
<view class="title" v-if="isConnection == 1">连接成功请开始测量</view>
<view class="title" v-if="isConnection == 2" @click="openBluetoothAdapter">连接失败点击重新连接</view>
<view class="text">{{textW}}</view>
<view class="text">{{textH}}</view>
<view class="image">
<image src="/BLEPages/static/F018P01.gif"></image>
</view>
<view class="tips">
<text>请确保</text>
<text>1.请确定设备是开机状态</text>
<text>2.请确定手机蓝牙位置信息已打开</text>
<text>3.ios系统需打开设置>应用>微信里的蓝牙权限</text>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
var myTime;
const plugin = requirePlugin("sdkPlugin").AiLink;
export default {
data() {
return {
textW: "",
textH: "",
height: "",
weight: "",
imp: 0,
macAddr: "",
deviceId: "",
serviceId: "",
readId: "",
writeId: "",
notifyId: "",
isSend: true,
Unload: false,
devicesList: [],
isConnection: 0,
data01: {},
data02: {},
BLEResult: {}
}
},
computed: {
...mapState(["user", "isConnected", "isBluetoothTyle", "appTheme"]),
info() {
return this.user
}
},
onUnload: function() {
let that = this
if (!that.Unload) {
that.stopBluetoothDevicesDiscovery() //
clearTimeout(myTime);
that.closeBLEConnection()
that.closeBluetoothAdapter()
console.log("页面返回onUnload")
}
},
watch: {
isConnected: function() {
let that = this
if (!that.isConnected) {
that.handleBack()
that.isConnection = 2
}
},
isBluetoothTyle: function() {
let that = this
if (!that.isBluetoothTyle) {
that.handleBack()
that.isConnection = 2
}
},
},
onLoad(options) {
let that = this
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
//
that.textW = ""
that.textH = ""
console.log("options", options)
if (options && options.deviceId) {
that.macAddr = options.deviceId
that.deviceId = options.deviceId
that.closeBLEConnection()
that.closeBluetoothAdapter()
that.openBluetoothAdapter()
}
that.onBLEConnectionStateChange()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
},
methods: {
//
openBluetoothAdapter() {
let that = this
that.isSend = true
uni.openBluetoothAdapter({
success: e => {
that.isConnection = 0
that.startBluetoothDeviceDiscovery()
console.log('初始化蓝牙成功:' + e.errMsg);
},
fail: e => {
that.isConnection = 2
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
}
});
},
//
onBLEConnectionStateChange() {
let that = this
uni.onBLEConnectionStateChange(function(res) {
console.log("蓝牙连接状态", JSON.stringify(res));
if (!res.connected) {
that.Unload = true
that.isConnection = 2
clearTimeout(myTime);
that.closeBLEConnection()
that.closeBluetoothAdapter()
}
that.$store.commit("changeConnected", res.connected);
})
},
//
startBluetoothDeviceDiscovery() {
let that = this
uni.startBluetoothDevicesDiscovery({
allowDuplicatesKey: false,
interval: 500, //
success: res => {
that.isConnection = 0
that.onBluetoothDeviceFound();
},
fail: res => {
that.isConnection = 2
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
}
});
},
/**
* 发现外围设备
*/
onBluetoothDeviceFound() {
var that = this;
that.isConnection = 0
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
if (!device.name && !device.localName) {
return
}
if (device.name.indexOf('AiLink_') != -1) {
clearTimeout(myTime);
let buff = device.advertisData.slice(-6)
device.mac = new Uint8Array(buff) // 广maciOSmac
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) {
that.stopBluetoothDevicesDiscovery()
that.deviceId = device.deviceId
that.macAddr = device.macAddr
const foundDevices = that.devicesList
const idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId)
if (idx === -1) {
that.devicesList.push(device);
} else {
that.devicesList[idx] = device
}
that.createBLEConnection()
return;
}
}
})
});
that.handleMyTime()
},
handleMyTime() {
var that = this;
myTime = setTimeout(function() {
if (!that.macAddr) {
clearTimeout(myTime);
that.Unload = true
that.isConnection = 2
that.devicesList = []
that.closeBLEConnection()
that.closeBluetoothAdapter()
}
}, 20000);
},
/**
* 停止搜索蓝牙设备
*/
stopBluetoothDevicesDiscovery() {
uni.stopBluetoothDevicesDiscovery({
success: e => {
console.log("停止搜索蓝牙设备", e)
},
});
},
//
createBLEConnection() {
let that = this;
uni.createBLEConnection({
deviceId: that.deviceId,
success: res => {
console.log("设备连接成功获取设备的services", res);
that.isConnection = 0
that.getBLEDeviceServices();
},
fail: res => {
that.isConnection = 2
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.isConnection = 1
that.getBLEDeviceCharacteristics(that.deviceId, service.uuid);
console.log("设备的FFE0的serviceId ", that.serviceId);
break;
}
}
},
fail: res => {
console.log('获取设备的UUID失败:', res)
}
});
},
/**
* 获取指定服务的特征值
*/
getBLEDeviceCharacteristics(deviceId, serviceId) {
let characteristicsList = [];
let that = this;
uni.getBLEDeviceCharacteristics({
deviceId: deviceId,
serviceId: serviceId,
success: res => {
console.log("服务的特征值成功", res)
characteristicsList = res.characteristics;
for (let i = 0; i < characteristicsList.length; i++) {
let item = characteristicsList[i];
if (item.uuid.indexOf('0000FFE1') != -1) {
that.uuid1 = item.uuid //
} else if (item.uuid.indexOf('0000FFE2') != -1) {
that.uuid2 = item.uuid //
} else if (item.uuid.indexOf('0000FFE3') != -1) {
that.uuid3 = item.uuid //
}
}
//
uni.notifyBLECharacteristicValueChange({
deviceId,
serviceId,
characteristicId: that.uuid2,
state: true,
})
uni.notifyBLECharacteristicValueChange({
deviceId,
serviceId,
characteristicId: that.uuid3,
state: true,
})
//
console.log("初始化插件", that.devicesList)
that.devicesList[0].serviceId = that.serviceId
plugin.initPlugin(res.characteristics, that.devicesList[0])
uni.onBLECharacteristicValueChange((characteristic) => {
let bleData = plugin.parseBleData(characteristic.value)
let dw0 = "kg"
let data1 = {}
let data2 = {}
if (bleData.status == 0) {
let sex0 = that.info.sex == 1 ? 1 : 0
let sex = "0x0" + sex0.toString(16)
let age = "0x" + that.info.age.toString(16)
let height = "0x" + that.info.height.toString(16)
let arr = [0x01, parseInt(sex), parseInt(age), parseInt(height), 0x00]
console.log("指令发送成功", arr)
plugin.sendDataOfA7(arr)
console.log("握手成功")
} else if (bleData.status == 1) {
let payload = that.$tools.ab2hex(bleData.data, '')
let type = payload.substring(0, 2)
console.log("开始测量", payload)
if (type == "10" || type == "30" || type == "40") { //
let data = parseInt(payload.substring(6, 12), 16)
let typeInfo = payload.substring(4, 6)
let num = payload.substring(12, 13)
let dw = payload.substring(13, 14)
if (dw == "1") {
dw0 = "jin"
}
if (num == "1") {
data = data / 10
}
if (num == "2") {
data = data / 100
}
if (num == "3") {
data = data / 1000
}
if (typeInfo == "01") {
that.textW = "您的实时体重是:" + data
}
if (typeInfo == "02") {
that.textW = "您的体重是:" + data
that.weight = data + dw0
}
}
if (type == "14" || type == "41") { //
let height = parseInt(payload.substring(4, 8), 16)
that.textH = "您的身高是:" + height + "cm"
that.height = height
console.log("身高模式:", that.height)
}
if (type == "11") { //
let typeInfo = payload.substring(4, 6)
if (typeInfo == "02") {
that.imp = 0
}
if (typeInfo == "04") {
that.imp = parseInt(payload.substring(8, 12), 16)
}
console.log("阻抗:", that.imp)
}
if (type == '15') {
let typeInfo = payload.substring(4, 6)
if (typeInfo == "01") {
that.data01 = {
bodyage: parseInt(payload.substring(26, 28),
16),
fat_r: parseInt(payload.substring(6, 10),
16) / 10,
muscle: parseInt(payload.substring(18, 22),
16) / 10,
kcal: parseInt(payload.substring(22, 26),
16),
visceral: parseInt(payload.substring(14,
18), 16),
sfr: parseInt(payload.substring(10, 14),
16) / 10,
}
}
if (typeInfo == '02') {
that.data02 = {
water: parseInt(payload.substring(10, 14),
16) / 10,
bone: parseInt(payload.substring(6, 10),
16) / 10,
fatlevlval: parseInt(payload.substring(24,
26), 16) /
10,
protein: parseInt(payload.substring(14, 18),
16) / 10,
bmi: parseInt(payload.substring(18, 22),
16) / 10,
}
}
console.log("体脂数据", that.data01, that.data02)
that.BLEResult = Object.assign(that.data01, that.data02)
}
if (type == "80") { //
that.BLEResult.weight = that.weight
that.BLEResult.imp = that.imp ? that.imp : 0
that.BLEResult.ecode = that.macAddr
that.BLEResult.height = that.height ? that.height : that.info.height
that.BLEResult.familyid = that.info.id
console.log("体脂成功:", that.BLEResult)
that.handleGetMeasure(that.BLEResult)
}
}
})
},
fail: res => {
console.log('获取特征值失败:', JSON.stringify(res))
}
})
},
//
handleGetMeasure(data) {
console.log("保存结果")
let that = this
that.$model.getmeasuredata(data).then(res => {
if (res.code == 0) {
that.$store.dispatch("getUserInfo", {
familyid: that.info.familyid,
});
that.$store.dispatch("getResult", {
birthday: that.info.birthday,
familyid: that.info.familyid,
height: that.height ? that.height : that.info.height,
sex: that.info.sex,
});
that.$tools.msg("测量成功")
} else {
console.log("测量失败", res.message)
that.$tools.msg(res.message)
}
that.Unload = true
setTimeout(function() {
that.closeBLEConnection()
that.closeBluetoothAdapter()
uni.switchTab({
url: "/pages/index/index"
})
}, 200)
})
},
/**
* 断开蓝牙模块
*/
closeBluetoothAdapter() {
let that = this;
uni.closeBluetoothAdapter({
success: res => {
console.log('蓝牙模块关闭成功');
}
})
},
handleBack() {
let that = this
that.Unload = true
that.stopBluetoothDevicesDiscovery() //
that.closeBLEConnection()
that.closeBluetoothAdapter()
},
/**
* 断开蓝牙连接
*/
closeBLEConnection() {
var that = this;
uni.closeBLEConnection({
deviceId: that.deviceId,
success: res => {
console.log('断开蓝牙连接成功');
}
});
},
},
}
</script>
<style scoped lang="scss">
</style>

View File

@ -41,7 +41,7 @@
}
},
computed: {
...mapState(["user", "isConnected", "isBluetoothTyle"]),
...mapState(["user", "isConnected", "isBluetoothTyle","appTheme"]),
info() {
return this.user
}
@ -74,12 +74,19 @@
},
onLoad(options) {
let that = this
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
//
that.textW = ""
that.textH = ""
if (options && options.deviceId) {
that.macAddr = options.deviceId
that.deviceId = options.deviceId
that.createBLEConnection()
that.closeBLEConnection()
that.closeBluetoothAdapter()
that.openBluetoothAdapter()
}
that.onBLEConnectionStateChange()
uni.onBluetoothAdapterStateChange(function(res) {
@ -139,22 +146,26 @@
var that = this;
that.isConnection = 0
uni.onBluetoothDeviceFound(res => {
console.log('开始监听寻找到新设备的事件', res);
res.devices.forEach(device => {
if (!device.name && !device.localName) {
return
}
if (device.deviceId.indexOf(that.deviceId) != -1) {
that.stopBluetoothDevicesDiscovery() //
console.log('开始监听寻找到新设备的事件', device);
if (device.name.indexOf('My') != -1) {
clearTimeout(myTime);
let buff = device.advertisData.slice(-6)
device.mac = new Uint8Array(buff) // 广maciOSmac
let tempMac = Array.from(device.mac)
console.log('开始监听寻找到新设备的事件0', device)
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
that.deviceId = device.macAddr
that.macAddr = device.macAddr
that.createBLEConnection()
return;
if (device.deviceId.indexOf(that.deviceId) != -1 || device.macAddr.indexOf(that.deviceId) != -1) {
console.log('开始监听寻找到新设备的事件1', that.deviceId)
that.stopBluetoothDevicesDiscovery() //
that.deviceId = device.deviceId
that.macAddr = device.macAddr
that.createBLEConnection()
return;
}
}
})
});

View File

@ -1,448 +1,457 @@
<template>
<view>
<view class="content weightPages">
<view class="title" v-if="isConnection == 0">连接中请稍后</view>
<view class="title" v-if="isConnection == 1">连接成功请开始测量</view>
<view class="title" v-if="isConnection == 2" @click="openBluetoothAdapter">连接失败点击重新连接</view>
<view class="text">{{text}}</view>
<view class="text">{{textH}}</view>
<view class="image">
<image src="/BLEPages/static/H09B.gif" v-if="type == 1"></image>
<image src="/BLEPages/static/H09B2.gif" v-if="type == 2"></image>
</view>
<view class="tips">
<text>提示</text>
<text>1.请确定设备是开机状态</text>
<text>2.请确定手机蓝牙位置信息已打开</text>
<text>3.ios系统需打开设置>应用>微信里的蓝牙权限</text>
</view>
</view>
<view>
<view class="content weightPages">
<view class="title" v-if="isConnection == 0">连接中请稍后</view>
<view class="title" v-if="isConnection == 1">连接成功请开始测量</view>
<view class="title" v-if="isConnection == 2" @click="openBluetoothAdapter">连接失败点击重新连接</view>
<view class="text">{{text}}</view>
<view class="text">{{textH}}</view>
<view class="image">
<image src="/BLEPages/static/H09B.gif" v-if="type == 1"></image>
<image src="/BLEPages/static/H09B2.gif" v-if="type == 2"></image>
</view>
<view class="tips">
<text>提示</text>
<text>1.请确定设备是开机状态</text>
<text>2.请确定手机蓝牙位置信息已打开</text>
<text>3.ios系统需打开设置>应用>微信里的蓝牙权限</text>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
var myTime;
export default {
data() {
return {
text: "",
textH: "",
height: "",
weight: "",
imp: 0,
type: 1,
uuid1: "",
uuid2: "",
uuid3: "",
macAddr: "",
deviceId: "",
serviceId: "",
Unload: false,
isConnection: 0, //
import {
mapState
} from "vuex";
var myTime;
export default {
data() {
return {
text: "",
textH: "",
height: "",
weight: "",
imp: 0,
type: 1,
uuid1: "",
uuid2: "",
uuid3: "",
macAddr: "",
deviceId: "",
serviceId: "",
Unload: false,
isConnection: 0, //
}
},
computed: {
...mapState(["user", "isConnected", "isBluetoothTyle", "appTheme"]),
info() {
return this.user
}
},
onUnload: function() {
let that = this
if (!that.Unload) {
that.stopBluetoothDevicesDiscovery() //
clearTimeout(myTime);
that.closeBLEConnection()
that.closeBluetoothAdapter()
}
},
onLoad(options) {
let that = this
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
//
that.text = ""
that.textH = ""
that.imp = 0
if (options && options.deviceId) {
that.deviceId = options.deviceId
that.closeBLEConnection()
that.closeBluetoothAdapter()
that.openBluetoothAdapter()
}
that.onBLEConnectionStateChange()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
},
watch: {
isConnected: function() {
let that = this
if (!that.isConnected) {
that.handleBack()
that.isConnection = 2
}
},
isBluetoothTyle: function() {
let that = this
if (!that.isBluetoothTyle) {
that.handleBack()
that.isConnection = 2
}
},
},
methods: {
//
openBluetoothAdapter() {
let that = this
that.type = 1
uni.openBluetoothAdapter({
success: e => {
that.isConnection = 0
that.startBluetoothDeviceDiscovery()
},
fail: e => {
that.isConnection = 2
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
}
});
},
//
startBluetoothDeviceDiscovery() {
let that = this
uni.startBluetoothDevicesDiscovery({
allowDuplicatesKey: false,
interval: 500, //
services: [
"FFE0",
],
success: res => {
that.isConnection = 0
that.onBluetoothDeviceFound();
},
fail: res => {
that.isConnection = 2
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
}
});
},
/**
* 发现外围设备
*/
onBluetoothDeviceFound() {
var that = this;
that.isConnection = 0
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
if (!device.name && !device.localName) {
return
}
},
computed: {
...mapState(["user", "isConnected", "isBluetoothTyle"]),
info() {
return this.user
}
},
onUnload: function() {
let that = this
if (!that.Unload) {
that.stopBluetoothDevicesDiscovery() //
clearTimeout(myTime);
that.closeBLEConnection()
that.closeBluetoothAdapter()
}
},
onLoad(options) {
let that = this
that.text = ""
that.textH = ""
that.imp = 0
if (options && options.deviceId) {
that.macAddr = options.deviceId
that.deviceId = options.deviceId
if (device.name.indexOf('AiLink_') != -1) {
clearTimeout(myTime);
let buff = device.advertisData.slice(-6)
device.mac = new Uint8Array(buff) // 广maciOSmac
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) {
that.stopBluetoothDevicesDiscovery()
that.macAddr = device.macAddr
that.deviceId = device.deviceId;
that.createBLEConnection()
return;
}
}
that.onBLEConnectionStateChange()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
});
that.handleMyTime()
},
handleMyTime() {
var that = this;
myTime = setTimeout(function() {
if (!that.macAddr) {
clearTimeout(myTime);
that.Unload = true
that.isConnection = 2
that.closeBLEConnection()
that.closeBluetoothAdapter()
}
}, 20000);
},
/**
* 停止搜索蓝牙设备
*/
stopBluetoothDevicesDiscovery() {
uni.stopBluetoothDevicesDiscovery({
success: e => {
console.log("停止搜索蓝牙设备", e)
},
});
},
//
onBLEConnectionStateChange() {
let that = this
uni.onBLEConnectionStateChange(function(res) {
console.log("监听蓝牙连接状态", res.connected)
if (!res.connected) {
that.Unload = true
that.isConnection = 2
clearTimeout(myTime);
that.closeBLEConnection()
that.closeBluetoothAdapter()
}
that.$store.commit("changeConnected", res.connected);
})
},
//
createBLEConnection() {
let that = this;
uni.createBLEConnection({
deviceId: that.deviceId,
success: res => {
that.isConnection = 0
that.getBLEDeviceServices();
},
fail: res => {
that.isConnection = 2
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.isConnection = 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)
for (let i = 0; i < res.characteristics.length; i++) {
let item = res.characteristics[i];
if (item.uuid.indexOf('0000FFE1') != -1) {
that.uuid1 = item.uuid //
} else if (item.uuid.indexOf('0000FFE2') != -1) {
that.uuid2 = item.uuid //
} else if (item.uuid.indexOf('0000FFE3') != -1) {
that.uuid3 = item.uuid //
}
}
that.sendData()
uni.notifyBLECharacteristicValueChange({
deviceId: that.deviceId,
serviceId: that.serviceId,
characteristicId: that.uuid2,
state: true,
})
},
watch: {
isConnected: function() {
let that = this
if (!that.isConnected) {
that.handleBack()
that.isConnection = 2
uni.notifyBLECharacteristicValueChange({
deviceId: that.deviceId,
serviceId: that.serviceId,
characteristicId: that.uuid3,
state: true,
})
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)
if (type == "10") {
let data = parseInt(value.substring(13, 18), 16)
let dw1 = "kg"
let dw2 = "kg"
if (dw == "1") {
dw1 = "斤"
dw2 = "jin"
}
},
isBluetoothTyle: function() {
let that = this
if (!that.isBluetoothTyle) {
that.handleBack()
that.isConnection = 2
if (dw == "4") {
dw1 = "st:lb"
dw2 = "st"
data = 1 * data + 5
}
},
},
methods: {
//
openBluetoothAdapter() {
let that = this
that.type = 1
uni.openBluetoothAdapter({
success: e => {
that.isConnection = 0
that.startBluetoothDeviceDiscovery()
},
fail: e => {
that.isConnection = 2
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
}
});
},
//
startBluetoothDeviceDiscovery() {
let that = this
uni.startBluetoothDevicesDiscovery({
allowDuplicatesKey: false,
interval: 500, //
services: [
"FFE0",
],
success: res => {
that.isConnection = 0
that.onBluetoothDeviceFound();
},
fail: res => {
that.isConnection = 2
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!")
}
});
},
/**
* 发现外围设备
*/
onBluetoothDeviceFound() {
var that = this;
that.isConnection = 0
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
if (!device.name && !device.localName) {
return
}
if (device.deviceId.indexOf(that.deviceId) != -1) {
that.stopBluetoothDevicesDiscovery()
clearTimeout(myTime);
let buff = device.advertisData.slice(-6)
device.mac = new Uint8Array(buff) // 广maciOSmac
let tempMac = Array.from(device.mac)
tempMac.reverse()
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
that.macAddr = device.macAddr
that.deviceId = device.deviceId;
that.createBLEConnection()
return;
}
})
});
that.handleMyTime()
},
handleMyTime() {
var that = this;
myTime = setTimeout(function() {
if (!that.macAddr) {
clearTimeout(myTime);
if (dw == "6") {
dw1 = "lb"
dw2 = "lb"
}
if (num == "1") {
data = parseInt(value.substring(13, 18), 16) / 10
}
if (num == "2") {
data = parseInt(value.substring(13, 18), 16) / 100
}
if (num == "3") {
data = parseInt(value.substring(13, 18), 16) / 1000
}
if (typeInfo == "01") {
that.text = "您的实时体重是:" + data + dw1
}
if (typeInfo == "02") {
that.text = "您的体重是:" + data + dw1
that.weight = data + dw2
console.log("稳定体重:", value, that.weight)
}
}
if (type == "14") {
that.height = parseInt(value.substring(10, 14), 16) / 10
that.textH = "您的身高是:" + that.height + "cm"
that.type = 2
console.log("稳定身高:", that.height)
}
if (type == "11") {
if (typeInfo == "03" || typeInfo == "04") {
that.imp = parseInt(value.substring(17, 22), 16)
}
console.log("阻抗:", typeInfo, parseInt(value.substring(17, 22), 16))
}
if (type == "30") {
console.log("测量完成", that.weight, that.imp, that.height)
if (that.imp == 0) {
uni.showModal({
title: '提示',
content: "体脂测量失败,是否保存本次测量结果?",
cancelText: "放弃",
confirmText: "保存",
success(res) {
if (res.confirm) {
that.imp = 0
that.handleGetMeasure()
} else {
console.log("放弃保存")
that.Unload = true
that.isConnection = 2
that.closeBLEConnection()
that.closeBluetoothAdapter()
}
}, 20000);
},
/**
* 停止搜索蓝牙设备
*/
stopBluetoothDevicesDiscovery() {
uni.stopBluetoothDevicesDiscovery({
success: e => {
console.log("停止搜索蓝牙设备", e)
},
});
},
//
onBLEConnectionStateChange() {
let that = this
uni.onBLEConnectionStateChange(function(res) {
console.log("监听蓝牙连接状态", res.connected)
if (!res.connected) {
that.Unload = true
that.isConnection = 2
clearTimeout(myTime);
that.closeBLEConnection()
that.closeBluetoothAdapter()
}
that.$store.commit("changeConnected", res.connected);
})
},
//
createBLEConnection() {
let that = this;
uni.createBLEConnection({
deviceId: that.deviceId,
success: res => {
that.isConnection = 0
that.getBLEDeviceServices();
},
fail: res => {
that.isConnection = 2
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.isConnection = 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)
for (let i = 0; i < res.characteristics.length; i++) {
let item = res.characteristics[i];
if (item.uuid.indexOf('0000FFE1') != -1) {
that.uuid1 = item.uuid //
} else if (item.uuid.indexOf('0000FFE2') != -1) {
that.uuid2 = item.uuid //
} else if (item.uuid.indexOf('0000FFE3') != -1) {
that.uuid3 = item.uuid //
}
}
that.sendData()
uni.notifyBLECharacteristicValueChange({
deviceId: that.deviceId,
serviceId: that.serviceId,
characteristicId: that.uuid2,
state: true,
uni.navigateBack({
delta: 1
})
uni.notifyBLECharacteristicValueChange({
deviceId: that.deviceId,
serviceId: that.serviceId,
characteristicId: that.uuid3,
state: true,
})
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)
if (type == "10") {
let data = parseInt(value.substring(13, 18), 16)
let dw1 = "kg"
let dw2 = "kg"
if (dw == "1") {
dw1 = "斤"
dw2 = "jin"
}
if (dw == "4") {
dw1 = "st:lb"
dw2 = "st"
data = 1 * data + 5
}
if (dw == "6") {
dw1 = "lb"
dw2 = "lb"
}
if (num == "1") {
data = parseInt(value.substring(13, 18), 16) / 10
}
if (num == "2") {
data = parseInt(value.substring(13, 18), 16) / 100
}
if (num == "3") {
data = parseInt(value.substring(13, 18), 16) / 1000
}
if (typeInfo == "01") {
that.text = "您的实时体重是:" + data + dw1
}
if (typeInfo == "02") {
that.text = "您的体重是:" + data + dw1
that.weight = data + dw2
console.log("稳定体重:", value, that.weight)
}
}
if (type == "14") {
that.height = parseInt(value.substring(10, 14), 16) / 10
that.textH = "您的身高是:" + that.height + "cm"
that.type = 2
console.log("稳定身高:", that.height)
}
if (type == "11") {
if (typeInfo == "03" || typeInfo == "04") {
that.imp = parseInt(value.substring(17, 22), 16)
}
console.log("阻抗:", typeInfo, parseInt(value.substring(17, 22), 16))
}
if (type == "30") {
console.log("测量完成", that.weight, that.imp, that.height)
if (that.imp == 0) {
uni.showModal({
title: '提示',
content: "体脂测量失败,是否保存本次测量结果?",
cancelText: "放弃",
confirmText: "保存",
success(res) {
if (res.confirm) {
that.imp = 0
that.handleGetMeasure()
} else {
console.log("放弃保存")
that.Unload = true
that.closeBLEConnection()
that.closeBluetoothAdapter()
uni.navigateBack({
delta: 1
})
}
}
})
} else {
that.handleGetMeasure()
}
}
});
},
fail: res => {
console.log('获取特征值失败:', JSON.stringify(res))
}
}
})
},
//
sendData() {
let that = this
let j = Number(26 + 3 + 6 + 1).toString(16)
let str = "A9002603060100" + j.substr(j.length - 2, 2) + "9A"
let buf = new Uint8Array(str.match(/[\da-f]{2}/gi).map(function(h) {
return parseInt(h, 16)
}))
uni.writeBLECharacteristicValue({
deviceId: that.deviceId,
serviceId: that.serviceId,
characteristicId: that.uuid1,
value: buf.buffer,
success: res => {
console.log('下发指令成功', res.errMsg)
},
fail: res => {
console.log("下发指令失败", res);
},
})
},
//
handleGetMeasure() {
let that = this
that.$model.getmeasure({
weight: that.weight,
imp: that.imp,
ecode: that.macAddr,
height: that.height,
familyid: that.info.familyid,
}).then(res => {
if (res.code == 0) {
that.$store.dispatch("getUserInfo", {
familyid: that.info.familyid,
});
that.$store.dispatch("getResult", {
birthday: that.info.birthday,
familyid: that.info.familyid,
height: that.height,
sex: that.info.sex,
});
that.$tools.msg("测量成功")
} else {
console.log("测量失败", res.message)
that.$tools.msg(res.message)
}
that.Unload = true
setTimeout(function() {
that.closeBLEConnection()
that.closeBluetoothAdapter()
uni.switchTab({
url: "/pages/index/index"
})
}, 200)
})
},
handleBack(ind) {
let that = this
that.text = ""
that.textH = ""
that.Unload = true
that.stopBluetoothDevicesDiscovery() //
that.closeBLEConnection()
that.closeBluetoothAdapter()
},
/**
* 断开蓝牙模块
*/
closeBluetoothAdapter() {
let that = this;
uni.closeBluetoothAdapter({
success: res => {
console.log('蓝牙模块关闭成功');
}
})
},
/**
* 断开蓝牙连接
*/
closeBLEConnection() {
var that = this;
uni.closeBLEConnection({
deviceId: that.deviceId,
success: res => {
console.log('断开蓝牙连接成功');
}
});
},
},
}
})
} else {
that.handleGetMeasure()
}
}
});
},
fail: res => {
console.log('获取特征值失败:', JSON.stringify(res))
}
})
},
//
sendData() {
let that = this
let j = Number(26 + 3 + 6 + 1).toString(16)
let str = "A9002603060100" + j.substr(j.length - 2, 2) + "9A"
let buf = new Uint8Array(str.match(/[\da-f]{2}/gi).map(function(h) {
return parseInt(h, 16)
}))
uni.writeBLECharacteristicValue({
deviceId: that.deviceId,
serviceId: that.serviceId,
characteristicId: that.uuid1,
value: buf.buffer,
success: res => {
console.log('下发指令成功', res.errMsg)
},
fail: res => {
console.log("下发指令失败", res);
},
})
},
//
handleGetMeasure() {
let that = this
that.$model.getmeasure({
weight: that.weight,
imp: that.imp,
ecode: that.macAddr,
height: that.height,
familyid: that.info.familyid,
}).then(res => {
if (res.code == 0) {
that.$store.dispatch("getUserInfo", {
familyid: that.info.familyid,
});
that.$store.dispatch("getResult", {
birthday: that.info.birthday,
familyid: that.info.familyid,
height: that.height,
sex: that.info.sex,
});
that.$tools.msg("测量成功")
} else {
console.log("测量失败", res.message)
that.$tools.msg(res.message)
}
that.Unload = true
setTimeout(function() {
that.closeBLEConnection()
that.closeBluetoothAdapter()
uni.switchTab({
url: "/pages/index/index"
})
}, 200)
})
},
handleBack(ind) {
let that = this
that.text = ""
that.textH = ""
that.Unload = true
that.stopBluetoothDevicesDiscovery() //
that.closeBLEConnection()
that.closeBluetoothAdapter()
},
/**
* 断开蓝牙模块
*/
closeBluetoothAdapter() {
let that = this;
uni.closeBluetoothAdapter({
success: res => {
console.log('蓝牙模块关闭成功');
}
})
},
/**
* 断开蓝牙连接
*/
closeBLEConnection() {
var that = this;
uni.closeBLEConnection({
deviceId: that.deviceId,
success: res => {
console.log('断开蓝牙连接成功');
}
});
},
},
}
</script>
<style scoped lang="scss">

View File

@ -45,7 +45,7 @@
}
},
computed: {
...mapState(["user", "isConnected", "isBluetoothTyle"]),
...mapState(["user", "isConnected", "isBluetoothTyle","appTheme"]),
info() {
return this.user
}
@ -62,6 +62,12 @@
},
onLoad(options) {
let that = this
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
//
cnt = 0
that.text = ""
if (options && options.deviceId) {
@ -137,18 +143,20 @@
if (!device.name && !device.localName) {
return
}
if (device.deviceId.indexOf(that.deviceId) != -1) {
that.stopBluetoothDevicesDiscovery()
if (device.name.indexOf('AiLink_') != -1) {
clearTimeout(myTime);
let buff = device.advertisData.slice(-6)
device.mac = new Uint8Array(buff) // 广maciOSmac
let tempMac = Array.from(device.mac)
tempMac.reverse()
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
that.macAddr = device.macAddr
that.deviceId = device.deviceId;
that.createBLEConnection()
return;
if (device.deviceId.indexOf(that.deviceId) != -1 || device.macAddr.indexOf(that.deviceId) != -1) {
that.stopBluetoothDevicesDiscovery()
that.macAddr = device.macAddr
that.deviceId = device.deviceId;
that.createBLEConnection()
return;
}
}
})
});

View File

@ -40,7 +40,7 @@
}
},
computed: {
...mapState(["user", "isConnected", "isBluetoothTyle"]),
...mapState(["user", "isConnected", "isBluetoothTyle","appTheme"]),
info() {
return this.user
}
@ -57,10 +57,15 @@
},
onLoad(options) {
let that = this
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
//
that.text = ""
if (options && options.deviceId) {
that.deviceId = options.deviceId
console.log(0)
that.openBluetoothAdapter()
}
uni.onBluetoothAdapterStateChange(function(res) {

View File

@ -310,7 +310,7 @@
.add {
margin: 15px;
background: $greencolor;
background: $btncolor;
color: #fff;
height: 30px;
text-align: center;
@ -1161,7 +1161,8 @@
.title {
width: 100%;
text-align: center;
margin-top: 15px;
height: 45px;
line-height: 45px;
font-size: 18px;
font-weight: bold;
}

View File

@ -1,146 +1,146 @@
<template>
<view>
<view class="wrapper" v-if="isDrawe">
<view class="bg" @click="clear"></view>
<view class="wrapper_box">
<view class="top">
<image class="headimage mt-10" v-if="userinfo.headimg" :src="userinfo.headimg"></image>
<view class="overflow">{{userinfo.nickname||userinfo.name}}</view>
</view>
<view class="drawerList">
<view v-if="List.length">
<view class="drawerList_item" v-for="(item, index) in List" :key="index" @click="toggle(item)">
<image v-if="item.headimg" :src="item.headimg" class="image1"></image>
<view class="right">
<view class="name">
<view class="overflow">
{{item.name}}
</view>
<view class="dangqian" v-if="item.id == userinfo.familyid">当前</view>
</view>
<view class="info">
<view>{{item.mage}}</view>
<view>{{item.sex==0?'未知':item.sex==1?'男':'女'}}</view>
<view>{{item.type}}</view>
</view>
</view>
</view>
</view>
<view class="add">
<view @click="addInfo('add')">
+
</view>
</view>
</view>
</view>
<view>
<view class="wrapper" v-if="isDrawe">
<view class="bg" @click="clear"></view>
<view class="wrapper_box">
<view class="top" :style="{background:appTheme}">
<image class="headimage mt-10" v-if="userinfo.headimg" :src="userinfo.headimg"></image>
<view class="overflow">{{userinfo.nickname||userinfo.name}}</view>
</view>
<view class="drawerList">
<view v-if="List.length">
<view class="drawerList_item" v-for="(item, index) in List" :key="index" @click="toggle(item)">
<image v-if="item.headimg" :src="item.headimg" class="image1"></image>
<view class="right">
<view class="name">
<view class="overflow">
{{item.name}}
</view>
<view class="dangqian" v-if="item.id == userinfo.familyid">当前</view>
</view>
<view class="info">
<view>{{item.mage}}</view>
<view>{{item.sex==0?'未知':item.sex==1?'男':'女'}}</view>
<view>{{item.type}}</view>
</view>
</view>
</view>
</view>
<view class="add">
<view @click="addInfo('add')">
+
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {};
},
computed: {
...mapState(["user", "familayList", "isDrawe"]),
userinfo() {
return this.user
},
List() {
return this.familayList
},
},
methods: {
//
toggle(val) {
let that = this
uni.setStorageSync('familyid', val.familyid)
that.$store.dispatch("getResult", {
birthday: val.birthday,
familyid: val.familyid,
height: val.height,
sex: val.sex,
});
that.$store.dispatch("getUserInfo", {
familyid: val.familyid,
});
that.$store.commit("changeDrawe", false);
},
//
addInfo(type) {
uni.navigateTo({
url: "/pageTwo/me/adduser?type=" + type
})
},
clear() {
this.$store.commit("changeDrawe", false);
},
}
import {
mapState
} from "vuex";
export default {
data() {
return {};
},
computed: {
...mapState(["user", "familayList", "isDrawe", "appTheme"]),
userinfo() {
return this.user
},
List() {
return this.familayList
},
},
methods: {
//
toggle(val) {
let that = this
uni.setStorageSync('familyid', val.familyid)
that.$store.dispatch("getResult", {
birthday: val.birthday,
familyid: val.familyid,
height: val.height,
sex: val.sex,
});
that.$store.dispatch("getUserInfo", {
familyid: val.familyid,
});
that.$store.commit("changeDrawe", false);
},
//
addInfo(type) {
uni.navigateTo({
url: "/pageTwo/me/adduser?type=" + type
})
},
clear() {
this.$store.commit("changeDrawe", false);
},
}
}
</script>
<style lang="scss" scoped>
.wrapper {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 999;
.wrapper {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 999;
}
.bg {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
height: 100vh;
background-color: rgba(0, 0, 0, 0.4);
z-index: 99;
}
.uniDrawer {
width: 220px;
background-color: #fff;
z-index: 1000;
}
@keyframes uniDrawer {
0% {
transform: translateX(-100%);
}
.bg {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
height: 100vh;
background-color: rgba(0, 0, 0, 0.4);
z-index: 99;
100% {
transform: translateX(0%);
}
}
.uniDrawer {
width: 220px;
background-color: #fff;
z-index: 1000;
}
@keyframes uniDrawer {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(0%);
}
}
.list {
position: relative;
top: 0;
left: 0;
flex-direction: column;
flex: 1;
justify-content: flex-end;
margin-bottom: 20rpx;
width: 220px;
height: calc(100vh - 100px);
overflow-y: scroll;
}
.name {
width: 100%;
display: flex;
justify-content: space-between;
.overflow {
width: 60%;
}
.list {
position: relative;
top: 0;
left: 0;
flex-direction: column;
flex: 1;
justify-content: flex-end;
margin-bottom: 20rpx;
width: 220px;
height: calc(100vh - 100px);
overflow-y: scroll;
}
.name {
width: 100%;
display: flex;
justify-content: space-between;
.overflow {
width: 60%;
}
}
</style>

View File

@ -29,7 +29,7 @@
<view class="editem">
<view class="name">出生日期</view>
<view class="right">
<picker mode="date" :end="startDate" class="f-r" :value="info.birthday" @change="onBirthdayArr">
<picker mode="date" :end="endDate" class="f-r" :value="info.birthday" @change="onBirthdayArr">
<view class="uni-input">{{info.birthday?info.birthday:"请选择"}}
<icon class="iconfont icon-arrow-down"></icon>
</view>
@ -65,6 +65,9 @@
userInfo: function() {
return this.user
},
endDate() {
return this.$tools.getDate("start")
}
},
mounted() {
var agedata = []
@ -114,10 +117,13 @@
height: that.userInfo.height,
sex: that.userInfo.sex,
}).then((res) => {
that.$store.dispatch("getUserInfo", {
familyid: that.userInfo.familyid,
})
that.$store.dispatch("getFamilyList");
if (res.code == 0) {
that.$store.commit('changeMeasureResult', res.data)
that.$store.dispatch("getUserInfo", {
familyid: that.userInfo.familyid,
})
that.$store.dispatch("getFamilyList");
}
})
},
},

View File

@ -44,7 +44,10 @@
uni.getUserProfile({
desc: '登录',
success: (infoRes) => {
console.log("getUserProfile授权成功", infoRes, that.url);
console.log("getUserProfile授权成功", infoRes, uni.getStorageSync('tenantid'));
that.$store.dispatch("getConfig", {
tenantId: uni.getStorageSync('tenantid')
})
uni.redirectTo({
url: `/pageTwo/login/login?name=` + infoRes.userInfo.nickName +
"&headimg=" + infoRes.userInfo.avatarUrl + "&url=" + that.url

View File

@ -1,29 +1,17 @@
const accountInfo = wx.getAccountInfoSync();
const appid = accountInfo.miniProgram.appId
uni.setStorageSync('appid', appid)
let host = ""
if (process.env.NODE_ENV === 'development') {
console.log("开发环境")
// host = "https://ttybapi.pcxbc.com"
host = "https://ttybapi.pcxbc.com"
console.log("开发环境")
// host = "https://ttybapi.pcxbc.com"
host = "https://ybapi.pcxbc.com"
} else {
console.log("生产环境")
host = "https://ybapi.pcxbc.com"
console.log("生产环境")
host = "https://ybapi.pcxbc.com"
}
// // 设备管理
// let baseUrl = {}
// if (appid === 'wx3e83b37ba682faf5') {
// console.log("每日一称儿童")
// baseUrl.adult = "wxd230a93791c03259"
// baseUrl.device = "wx6f48cc32c5c0a4a2"
// } else if (appid === 'wx44df5e42ddf16203') {
// console.log("小秤匠")
// baseUrl.adult = "wx39cf431caa22b5c8"
// baseUrl.device = "wx6f48cc32c5c0a4a2"
// }
console.log("appid", appid)
module.exports = {
appid,
host
appid,
host,
};

View File

@ -22,14 +22,14 @@ Vue.prototype.$model = model;
// 环境配置
import config from './config.js'
Vue.prototype.config = config;
console.log("uni.setStorageSync", store)
Vue.config.productionTip = false
App.mpType = 'app'
//让页面onLoad在onLaunch后执行
Vue.prototype.$onLaunched = new Promise(resolve => {
Vue.prototype.$isResolve = resolve
Vue.prototype.$isResolve = resolve
})
const app = new Vue({
...App
...App
})
app.$mount()

View File

@ -57,7 +57,7 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wx3e83b37ba682faf5",
"appid" : "wxd230a93791c03259",
"setting" : {
"urlCheck" : true,
"minified" : true,

View File

@ -85,6 +85,11 @@
export default {
onLoad(options) {
let that = this
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
console.log("options", options)
if (options.info) {
that.infoID = JSON.parse(options.info)
@ -92,7 +97,7 @@
}
},
computed: {
...mapState(["user"]),
...mapState(["user","appTheme"]),
},
methods: {
handleSharepic(id) {

View File

@ -1,217 +0,0 @@
<template>
<view class="common homePage">
<!-- 头部 -->
<headTop :token="token"></headTop>
<!-- 健康报告 -->
<view class="myinfo myinfoPage">
<view class="mt-15" v-show="MeasureResult&&MeasureResult.muscle==0">
<view class="unusual">体脂测量异常请重新测量</view>
</view>
<view v-if="infoList.length">
<view class="box">
<view class="left">
<text class="text">本次健康评分</text>
<view class="circleprogress">
<view class="wrapper">
<view class="leftprogress" :style="{ width: MeasureResult.cmi + '%'}">
</view>
</view>
<view class="fen">
<view>{{MeasureResult.cmi}}</view>
</view>
</view>
</view>
<view class="right">
<view class="item">
<view><text>{{MeasureResult.height}}</text>cm</view>
<view class="tivon">身高</image>
</view>
</view>
<view class="item">
<view><text>{{MeasureResult.weight}}</text>kg</view>
<view>体重</view>
</view>
<!-- <view class="item">
<view><text>{{MeasureResult.lbm}}</text>kg</view>
<view class="tivon">去脂体重</image>
</view>
</view> -->
<view class="item">
<view><text>{{MeasureResult.bodyage}}</text></view>
<view>体龄</view>
</view>
<view class="item">
<view><text class="f-14">{{MeasureResult.body}}</text></view>
<view>体型</view>
</view>
</view>
</view>
<view class="box1">
<view class="h2">
<icon class="yuanxing"></icon>其他人体成分分析
</view>
<view class="list" v-for="(item,index) in infoList" :key="index" @click="handleToggle(index)">
<view class="block">
<view class="name">
<icon class="t-icon iconfont" :class="'t-icon-'+item.key"></icon>
{{item.title}}
</view>
<view class="val" v-if="item.title!='肥胖等级'">
{{item.fvalue?item.fvalue:'0'}}{{item.dw}}
</view>
<view class="val0" v-else>{{item.fevaluation}}</view>
<view class="level" v-if="item.title!='肥胖等级'">
<view class="btnf" :style="{backgroundColor:item.color}">{{item.fevaluation}}</view>
</view>
<view class="icon">
<icon class="iconfont icon-arrow-down" v-if="item.desc"></icon>
</view>
</view>
<view class="desc" v-if="item.showCon">
<view v-if="item.desc">{{item.desc}}</view>
<view class="statuevue" v-if="item.slist">
<view class="bi" v-if="item.title!='基础代谢'">
<view class="item" v-for="(ite , ind) in item.slist" :key="ind"
:style="{backgroundColor:ite.color}">
<view class="span1">{{ite.text}}</view>
<view v-if="ite.text==item.fevaluation&&item.fvalue>ite.maxvalue"
style="right: 10px" class="peobox">
<view class="xx"></view>
</view>
<view v-if="ite.text==item.fevaluation&&item.fvalue<=ite.maxvalue"
:style="'left:'+item.leftval+'rem'" class="peobox">
<view class="xx"></view>
</view>
<view class="span" v-if="ind<item.slist.length-1">{{ite.maxvalue}}</view>
</view>
</view>
<view v-else>
<view class="kcalClass">
标准值:{{item.slist[0].maxvalue}}kcal
</view>
</view>
</view>
</view>
</view>
</view>
<view class="introction">
<icon class="t-icon t-icon-tishi"></icon>
<span>此测量数据仅供参考不可代替医学专业测试</span>
</view>
</view>
<view v-else class="nolist">
<icon class="iconfont icon-zanwu"></icon>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
import headTop from "@/components/header/head.vue"
export default {
components: {
headTop
},
data() {
return {
token: null,
devtype: 0,
infoList: [],
deviceId: null,
};
},
computed: {
...mapState(["user", "MeasureResult"]),
},
onUnload: function() {
let that = this
uni.switchTab({
url: "/pages/index/index"
})
},
onShow() {
let that = this;
that.token = uni.getStorageSync('token')
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
console.log("报告页监听蓝牙状态openBluetoothAdapter", res.available)
})
},
onLoad(options) {
let that = this;
console.log("options", options)
if (options) {
that.devtype = options.t
that.deviceId = options.sn
}
this.$nextTick(() => {
that.handleToggle(0)
})
},
watch: {
MeasureResult() {
this.handleToggle(0)
}
},
methods: {
//
handleToggle(index) {
let that = this
if (!that.MeasureResult) return
let str = this.weightInfo.infoList(that.MeasureResult).slice(1, 14)
for (var i = 0; i < str.length; i++) {
if (i == index) {
str[i].showCon = !str[i].showCon
} else {
str[i].showCon = false
}
}
that.infoList = this.weightInfo.infoList(that.MeasureResult).slice(1, 14)
},
},
}
</script>
<style lang="scss" scoped>
.myinfo {
margin-top: 105px;
}
.val0 {
position: absolute;
left: 40%;
margin-left: 3px;
}
.wrapper {
z-index: 9 !important;
}
.unusual {
font-size: 14px;
border-radius: 8px;
text-align: center;
color: #e83a1e;
margin: 15px;
background: #f7e4c8;
padding: 5px 0;
}
.introction {
display: flex;
margin-left: 15px;
margin-bottom: 20px;
font-size: 12px;
color: #666;
.t-icon {
width: 15px;
height: 15px;
margin-right: 5px;
}
}
</style>

View File

@ -1,76 +1,88 @@
<template>
<view class="content">
<view>
<view class="title">{{content.title}}</view>
<view class="time">发布时间{{content.createtime}}</view>
<u-parse :content="content.content" @preview="preview" @navigate="navigate"></u-parse>
</view>
<view class="content">
<view>
<view class="title">{{content.title}}</view>
<view class="time">发布时间{{content.createtime}}</view>
<u-parse :content="content.content" @preview="preview" @navigate="navigate"></u-parse>
</view>
</view>
</template>
<script>
import uParse from '@/components/u-parse/u-parse.vue'
export default {
data() {
return {
content: "",
url: null
}
},
components: {
uParse
},
onLoad(option) {
console.log(option)
if (option.id) {
this.getOrderDetail(option.id);
}
if (option.url) {
this.url = option.url
} else {
this.url = null
}
import {
mapState
} from "vuex";
import uParse from '@/components/u-parse/u-parse.vue'
export default {
data() {
return {
content: "",
url: null
}
},
components: {
uParse
},
computed: {
...mapState(["user", "appTheme"]),
},
onLoad(option) {
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
//
console.log(option)
if (option.id) {
this.getOrderDetail(option.id);
}
if (option.url) {
this.url = option.url
} else {
this.url = null
}
},
methods: {
getOrderDetail(orderno) {
this.$model.GetAdListDetail({
id: orderno
}).then(res => {
if (res.code != 0) return
this.content = res.data
console.log("资讯详情", res)
});
},
preview(src, e) {
// do something
},
navigate(href, e) {
// do something
}
}
},
methods: {
getOrderDetail(orderno) {
this.$model.GetAdListDetail({
id: orderno
}).then(res => {
if (res.code != 0) return
this.content = res.data
console.log("资讯详情", res)
});
},
preview(src, e) {
// do something
},
navigate(href, e) {
// do something
}
}
}
</script>
<style scoped>
@import url("@/components/u-parse/u-parse.css");
@import url("@/components/u-parse/u-parse.css");
.content {
padding: 30rpx;
}
.content {
padding: 30rpx;
}
.title {
width: 100%;
margin-bottom: 15px;
text-align: left;
font-size: 18px;
font-weight: bold;
}
.title {
width: 100%;
margin-bottom: 15px;
text-align: left;
font-size: 18px;
font-weight: bold;
}
.time {
width: 100%;
text-align: left;
margin-bottom: 15px;
color: #666;
}
.time {
width: 100%;
text-align: left;
margin-bottom: 15px;
color: #666;
}
</style>

View File

@ -1,340 +1,351 @@
<template>
<view class="content">
<view class="top">
<image src="@/static/logo.png"></image>
<text>每日一称-成人</text>
</view>
<view class="edit">
<view class="ts">
<view>短信验证码登录</view>
</view>
<view class="editem">
<view class="input">
<input class="uni-input" v-model="phone" placeholder="请输入手机号" />
</view>
<view class="input yanzheng">
<view class="yanzhengma">
<input class="uni-input" v-model="code" placeholder="请输入验证码" />
</view>
<button class="code" type="none" @tap="handleCode" v-model="codeInfo"
:disabled="disabled">{{second<60 ? second+'S后重发':'获取验证码'}}
</button>
</view>
</view>
<view class="btnlogin" @click="handleTelLogin">登录</view>
</view>
<view class="btnGroup">
<view class="wxbtn" v-if="iswxphone">
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
<icon class="iconfont icon-weixin"></icon>
<text>微信登录</text>
</button>
</view>
<view class="xieyi">
<checkbox-group @change="checkboxChange" class="group">
<checkbox :value="1" checked="true" style="transform:scale(0.7)" />同意每日一称<text
@click="handlexieyi">个人信息保护政策</text>
</checkbox-group>
</view>
</view>
<view class="content">
<view class="top">
<image :src="configBox.logo"></image>
<text>{{configBox.title}}</text>
</view>
<view class="edit">
<view class="ts">
<view>短信验证码登录</view>
</view>
<view class="editem">
<view class="input">
<input class="uni-input" v-model="phone" placeholder="请输入手机号" />
</view>
<view class="input yanzheng">
<view class="yanzhengma">
<input class="uni-input" v-model="code" placeholder="请输入验证码" />
</view>
<button class="code" type="none" @tap="handleCode" v-model="codeInfo"
:disabled="disabled">{{second<60 ? second+'S后重发':'获取验证码'}}
</button>
</view>
</view>
<view class="btnlogin" @click="handleTelLogin">登录</view>
</view>
<view class="btnGroup">
<view class="wxbtn" v-if="iswxphone">
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
<icon class="iconfont icon-weixin"></icon>
<text>微信登录</text>
</button>
</view>
<view class="xieyi">
<checkbox-group @change="checkboxChange" class="group">
<checkbox :value="1" checked="true" style="transform:scale(0.7)" />同意{{configBox.title}}<text
@click="handlexieyi">个人信息保护政策</text>
</checkbox-group>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
phone: "",
code: "",
disabled: false,
second: 60,
value: 1,
iswxphone: true,
infoRes: {}
}
},
onLoad(options) {
let that = this
if (options) {
that.infoRes = options
console.log("登录信息", options, that.infoRes)
}
import {
mapState
} from "vuex";
export default {
data() {
return {
phone: "",
code: "",
disabled: false,
second: 60,
value: 1,
iswxphone: true,
infoRes: {}
}
},
computed: {
...mapState(["configBox", "appTheme"]),
},
onLoad(options) {
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
let that = this
if (options) {
that.infoRes = options
console.log("登录信息", options, that.infoRes, this.configBox)
}
this.iswxphone = uni.getStorageSync('iswxphone')
},
methods: {
checkboxChange(e) {
this.value = e.detail.value.length ? e.detail.value[0] : "0"
},
//
handleTelLogin() {
let that = this
if (this.value == 0) {
that.$tools.msg("请先勾选同意每日一称《个人信息保护政策》")
return
}
if (!this.phone) {
that.$tools.msg("请输入手机号")
return
}
if (!(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg("请输入正确的手机号码")
return
}
if (!that.code) {
that.$tools.msg("请输入验证码")
return
}
this.$model.getRegister({
phone: that.phone,
tenantId: uni.getStorageSync('tenantid'),
sessionId: uni.getStorageSync('sessionid'),
name: that.infoRes.name,
headImg: that.infoRes.headimg,
code: that.code,
isvrcode: true,
}).then(res => {
if (res.code != 0) {
that.$tools.msg(res.message)
return
}
uni.setStorageSync('token', res.data.token)
uni.setStorageSync('iswxphone', res.data.iswxphone)
uni.setStorageSync('refreshtoken', res.data.refreshtoken)
uni.setStorageSync('sessionid', res.data.sessionid)
if (that.infoRes.url == 'active') {
uni.reLaunch({
url: "/pages/index/active"
})
} else {
uni.reLaunch({
url: "/pages/index/index"
})
}
}).catch(err => {})
},
//
handleCode() {
let that = this
if (!that.phone) {
that.$tools.msg("请输入手机号")
return
}
if (!(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg("请输入正确的手机号码")
return
}
//
that.$model.getSendCode({
phone: that.phone
}).then(res => {
console.log(res)
if (res.code != 0) {
that.$tools.msg(res.message)
return
}
that.disabled = true
let interval = setInterval(() => {
--that.second
}, 1000)
setTimeout(() => {
clearInterval(interval)
that.disabled = false
that.second = 60
}, 60000)
}).catch(err => {})
},
//
getPhoneNumber(res) {
const that = this
if (this.value == 0) {
that.$tools.msg("请先勾选同意每日一称《个人信息保护政策")
return
}
if (res.detail.errMsg == 'getPhoneNumber:ok') {
console.log("res", res)
this.$model.getregister({
tenantId: uni.getStorageSync('tenantid'),
sessionId: uni.getStorageSync('sessionid'),
encryptedData: res.detail.encryptedData,
iv: res.detail.iv,
name: that.infoRes.name,
headImg: that.infoRes.headimg,
fansid: uni.getStorageSync('fansid')
}).then(res => {
if (res.code != 0) return
that.value = 1
uni.setStorageSync('token', res.data.token)
uni.setStorageSync('iswxphone', res.data.iswxphone)
uni.setStorageSync('refreshtoken', res.data.refreshtoken)
uni.setStorageSync('sessionid', res.data.sessionid)
if (that.infoRes.url == 'active') {
uni.reLaunch({
url: "/pages/index/active"
})
} else {
uni.reLaunch({
url: "/pages/index/index"
})
}
})
}
},
//
handlexieyi() {
uni.navigateTo({
url: "/pageTwo/login/detail?id=08DA1796-2FEE-4813-8B0C-8A45E7A57E70"
})
}
this.iswxphone = uni.getStorageSync('iswxphone')
},
methods: {
checkboxChange(e) {
this.value = e.detail.value.length ? e.detail.value[0] : "0"
},
//
handleTelLogin() {
let that = this
if (this.value == 0) {
that.$tools.msg("请先勾选同意每日一称《个人信息保护政策》")
return
}
if (!this.phone) {
that.$tools.msg("请输入手机号")
return
}
if (!(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg("请输入正确的手机号码")
return
}
if (!that.code) {
that.$tools.msg("请输入验证码")
return
}
this.$model.getRegister({
phone: that.phone,
tenantId: uni.getStorageSync('tenantid'),
sessionId: uni.getStorageSync('sessionid'),
name: that.infoRes.name,
headImg: that.infoRes.headimg,
code: that.code,
isvrcode: true,
}).then(res => {
if (res.code != 0) {
that.$tools.msg(res.message)
return
}
uni.setStorageSync('token', res.data.token)
uni.setStorageSync('iswxphone', res.data.iswxphone)
uni.setStorageSync('refreshtoken', res.data.refreshtoken)
uni.setStorageSync('sessionid', res.data.sessionid)
if (that.infoRes.url == 'active') {
uni.reLaunch({
url: "/pages/index/active"
})
} else {
uni.reLaunch({
url: "/pages/index/index"
})
}
}).catch(err => {})
},
//
handleCode() {
let that = this
if (!that.phone) {
that.$tools.msg("请输入手机号")
return
}
if (!(/^1[3456789]\d{9}$/.test(that.phone))) {
that.$tools.msg("请输入正确的手机号码")
return
}
//
that.$model.getSendCode({
phone: that.phone
}).then(res => {
console.log(res)
if (res.code != 0) {
that.$tools.msg(res.message)
return
}
that.disabled = true
let interval = setInterval(() => {
--that.second
}, 1000)
setTimeout(() => {
clearInterval(interval)
that.disabled = false
that.second = 60
}, 60000)
}).catch(err => {})
},
//
getPhoneNumber(res) {
const that = this
if (this.value == 0) {
that.$tools.msg("请先勾选同意每日一称《个人信息保护政策")
return
}
if (res.detail.errMsg == 'getPhoneNumber:ok') {
console.log("res", res)
this.$model.getregister({
tenantId: uni.getStorageSync('tenantid'),
sessionId: uni.getStorageSync('sessionid'),
encryptedData: res.detail.encryptedData,
iv: res.detail.iv,
name: that.infoRes.name,
headImg: that.infoRes.headimg,
fansid: uni.getStorageSync('fansid')
}).then(res => {
if (res.code != 0) return
that.value = 1
uni.setStorageSync('token', res.data.token)
uni.setStorageSync('iswxphone', res.data.iswxphone)
uni.setStorageSync('refreshtoken', res.data.refreshtoken)
uni.setStorageSync('sessionid', res.data.sessionid)
if (that.infoRes.url == 'active') {
uni.reLaunch({
url: "/pages/index/active"
})
} else {
uni.reLaunch({
url: "/pages/index/index"
})
}
})
}
},
//
handlexieyi() {
uni.navigateTo({
url: "/pageTwo/login/detail?id=" + this.configBox.privacyid
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
padding: 0;
height: 100vh;
background-color: #fff;
.content {
padding: 0;
height: 100vh;
background-color: #fff;
}
.top {
width: 100%;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
padding: 80px 0 0;
image {
width: 70px;
height: 70px;
margin: auto;
margin-bottom: 15px;
border-radius: 50%;
}
.top {
text {
display: block;
width: 100%;
text-align: center;
}
}
.edit {
width: 75%;
height: auto;
background: #fff;
border-radius: 10px;
padding: 15px;
margin: 40px auto 15px;
.ts {
text-align: left;
margin-bottom: 10px;
color: #999;
}
.editem {
position: relative;
display: flex;
align-items: center;
font-size: 28upx;
justify-content: space-between;
flex-wrap: wrap;
}
.input {
width: 100%;
border: #dfdfdf 1px solid;
padding: 0 10px;
height: 35px;
line-height: 35px;
margin-bottom: 15px;
display: flex;
border-radius: 10px;
position: relative;
input {
height: 35px;
line-height: 35px;
width: 100%;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
padding: 80px 0 0;
image {
width: 70px;
height: 70px;
margin: auto;
margin-bottom: 15px;
border-radius: 50%;
}
text {
display: block;
width: 100%;
text-align: center;
}
}
}
.edit {
width: 75%;
height: auto;
.btnlogin {
width: 100%;
margin: 20px 0;
height: 38px;
line-height: 38px;
background: $btncolor;
font-weight: 700;
border-radius: 10px;
text-align: center;
color: #fff !important;
}
.code {
width: 110px;
background: #dfdfdf;
font-size: 12px;
margin: 0;
border-radius: 10px;
text-align: center;
position: absolute;
right: 2.5px;
top: 2.5px;
}
}
.btnGroup {
width: 100%;
display: flex;
justify-content: center;
flex-wrap: wrap;
background-color: inherit;
line-height: inherit;
position: absolute;
bottom: 80rpx;
.wxbtn {
width: 100%;
icon {
font-size: 25px;
color: #28c445;
}
text {
display: block;
width: 100%;
margin-top: 5px;
font-size: 12px;
color: #666;
text-align: center;
}
button {
line-height: initial;
background: #fff;
border-radius: 10px;
padding: 15px;
margin: 40px auto 15px;
.ts {
text-align: left;
margin-bottom: 10px;
color: #999;
}
.editem {
position: relative;
display: flex;
align-items: center;
font-size: 28upx;
justify-content: space-between;
flex-wrap: wrap;
}
.input {
width: 100%;
border: #dfdfdf 1px solid;
padding: 0 10px;
height: 35px;
line-height: 35px;
margin-bottom: 15px;
display: flex;
border-radius: 10px;
position: relative;
input {
height: 35px;
line-height: 35px;
width: 100%;
}
}
.btnlogin {
width: 100%;
margin: 20px 0;
height: 38px;
line-height: 38px;
background: $btncolor;
font-weight: 700;
border-radius: 10px;
text-align: center;
color: #fff !important;
}
.code {
width: 110px;
background: #dfdfdf;
font-size: 12px;
margin: 0;
border-radius: 10px;
text-align: center;
position: absolute;
right: 2.5px;
top: 2.5px;
}
}
.btnGroup {
width: 100%;
display: flex;
justify-content: center;
flex-wrap: wrap;
background-color: inherit;
line-height: inherit;
position: absolute;
bottom: 80rpx;
padding: 0;
justify-content: center;
}
.wxbtn {
width: 100%;
icon {
font-size: 25px;
color: #28c445;
}
text {
display: block;
width: 100%;
margin-top: 5px;
font-size: 12px;
color: #666;
text-align: center;
}
button {
line-height: initial;
background: #fff;
display: flex;
flex-wrap: wrap;
padding: 0;
justify-content: center;
}
button::after {
display: none;
}
}
.xieyi {
font-size: 14px;
margin-top: 20px;
color: #333;
text {
border-bottom: 1px solid #333;
}
}
button::after {
display: none;
}
}
.xieyi {
font-size: 14px;
margin-top: 20px;
color: #333;
text {
border-bottom: 1px solid #333;
}
}
}
</style>

View File

@ -1,262 +1,268 @@
<template>
<view class="box">
<view class="lanBox">
<form action>
<view class="headbox">
<view class="touxiang">
<icon class="t-icon t-icon-touxiang headimage"></icon>
</view>
</view>
<view class="lan2">
请补充信息帮助我们更准确的分析数据
</view>
<view class="lan border-bottom">
<view class="left">用户名/昵称</view>
<view class="right">
<input name="name" type="text" v-model="name" placeholder="请输入用户名/昵称" />
</view>
</view>
<view class="lan border-bottom">
<view class="left">性别</view>
<view class="right">
<picker mode="selector" :range="sexItem" @change="onsexArr">
<view class="uni-input">{{sex==0?'请选择':sex==1?'男':'女'}}</view>
<icon class="iconfont icon-arrow-down"></icon>
</picker>
</view>
</view>
<view class="lan border-bottom">
<view class="left">身高</view>
<view class="right">
<input type="digit" class="mr-5" v-model="height" placeholder="请输入身高" />cm
<!-- <view class="uni-input">{{height?height+"cm":"请选择"}}</view>
<view class="box">
<view class="lanBox">
<form action>
<view class="headbox">
<view class="touxiang">
<icon class="t-icon t-icon-touxiang headimage"></icon>
</view>
</view>
<view class="lan2">
请补充信息帮助我们更准确的分析数据
</view>
<view class="lan border-bottom">
<view class="left">用户名/昵称</view>
<view class="right">
<text v-if="user.nickname">{{user.nickname}}</text>
<!-- <input name="name" type="text" v-model="name" placeholder="请输入用户名/昵称" /> -->
</view>
</view>
<view class="lan border-bottom">
<view class="left">性别</view>
<view class="right">
<picker mode="selector" :range="sexItem" @change="onsexArr">
<view class="uni-input">{{sex==0?'请选择':sex==1?'男':'女'}}</view>
<icon class="iconfont icon-arrow-down"></icon>
</picker>
</view>
</view>
<view class="lan border-bottom">
<view class="left">身高</view>
<view class="right">
<input type="digit" class="mr-5" v-model="height" placeholder="请输入身高" />cm
<!-- <view class="uni-input">{{height?height+"cm":"请选择"}}</view>
<icon class="iconfont icon-arrow-down ml-15"></icon> -->
<!-- <picker mode="selector" class="f-r" value="85" :range="heightArr" @change="onheightArr">
<!-- <picker mode="selector" class="f-r" value="85" :range="heightArr" @change="onheightArr">
<view class="uni-input">{{height!=0?height:"请选择"}}</view>
<icon class="iconfont icon-arrow-down"></icon>
</picker> -->
</view>
</view>
<view class="lan border-bottom">
<view class="left">出生日期</view>
<view class="right">
<picker class="picker" mode="date" :end="startDate" :value="birthday" @change="bindDateChange">
<view class="uni-input">{{birthday?birthday:"请选择"}}</view>
<icon class="iconfont icon-arrow-down"></icon>
</picker>
</view>
</view>
</form>
</view>
</view>
<view v-if="isHeight" class="slidePopup">
<view class="bg" @click="onTap">
<view class="slide-box" @click.stop>
<view class="btnGroup">
<view class="subtn close" @click="onTap">取消</view>
<view class="heightVal">{{height}}cm</view>
<view class="subtn" @click="isHeight = false">确定</view>
</view>
<slide-choose v-model="height" ref="slide"></slide-choose>
</view>
</view>
<view class="lan border-bottom">
<view class="left">出生日期</view>
<view class="right">
<picker class="picker" mode="date" :end="endDate" :value="birthday" @change="bindDateChange">
<view class="uni-input">{{birthday?birthday:"请选择"}}</view>
<icon class="iconfont icon-arrow-down"></icon>
</picker>
</view>
</view>
<view class="btn" @click="confirmInfo">提交</view>
</form>
</view>
<view v-if="isHeight" class="slidePopup">
<view class="bg" @click="onTap">
<view class="slide-box" @click.stop>
<view class="btnGroup">
<view class="subtn close" @click="onTap">取消</view>
<view class="heightVal">{{height}}cm</view>
<view class="subtn" @click="isHeight = false">确定</view>
</view>
<slide-choose v-model="height" ref="slide"></slide-choose>
</view>
</view>
</view>
<view class="btn" @click="confirmInfo">提交</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {
ageArr: [],
sexItem: [
"男",
"女"
],
sex: 0,
name: null,
birthday: "",
height: "",
isHeight: false,
};
},
computed: {
...mapState(["user"]),
userInfo() {
return this.user
},
startDate() {
return this.$tools.getDate('start');
}
},
methods: {
//
confirmInfo() {
let data = {};
if (!this.name) {
this.$tools.msg("请输入用户名")
return;
}
if (!this.sex) {
this.$tools.msg("请选择性别")
return;
}
if (!this.height) {
this.$tools.msg("请选择身高")
return;
}
if (!this.birthday) {
this.$tools.msg("请选择出生日期")
return;
}
data.name = this.name
data.sex = this.sex;
data.height = this.height;
data.birthday = this.birthday;
data.id = this.user.familyid
console.log("提交", data)
this.subInfo(data);
},
subInfo(data) {
let that = this
that.$model.getsubmit(data).then(res => {
if (res.code == 0) {
that.$tools.msg("提交成功");
uni.reLaunch({
url: "/pages/index/index"
})
} else {
that.$tools.msg(res.message);
}
});
},
//
bindDateChange(e) {
console.log(e.target.value, this.startDate)
this.birthday = e.target.value
},
onAgeArr(e) {
this.age = this.ageArr[e.target.value]
},
//
onsexArr(e) {
this.sex = this.sexItem[e.target.value] == "男" ? 1 : 2
},
onTap() {
this.height = ""
this.isHeight = false
},
},
onLoad(options) {
var agedata = []
for (var i = 12; i <= 80; i++) {
agedata.push(i);
}
this.ageArr = agedata
},
};
import {
mapState
} from "vuex";
export default {
data() {
return {
ageArr: [],
sexItem: [
"男",
"女"
],
sex: 0,
name: null,
birthday: "",
height: "",
isHeight: false,
};
},
computed: {
...mapState(["user", "appTheme"]),
userInfo() {
return this.user
},
endDate() {
return this.$tools.getDate("start")
}
},
methods: {
//
confirmInfo() {
let data = {};
if (!this.name) {
this.$tools.msg("请输入用户名")
return;
}
if (!this.sex) {
this.$tools.msg("请选择性别")
return;
}
if (!this.height) {
this.$tools.msg("请选择身高")
return;
}
if (!this.birthday) {
this.$tools.msg("请选择出生日期")
return;
}
data.name = this.name
data.sex = this.sex;
data.height = this.height;
data.birthday = this.birthday;
data.id = this.user.familyid
console.log("提交", data)
this.subInfo(data);
},
subInfo(data) {
let that = this
that.$model.getsubmit(data).then(res => {
if (res.code == 0) {
that.$tools.msg("提交成功");
uni.reLaunch({
url: "/pages/index/index"
})
} else {
that.$tools.msg(res.message);
}
});
},
//
bindDateChange(e) {
console.log(e.target.value, this.startDate)
this.birthday = e.target.value
},
onAgeArr(e) {
this.age = this.ageArr[e.target.value]
},
//
onsexArr(e) {
this.sex = this.sexItem[e.target.value] == "男" ? 1 : 2
},
onTap() {
this.height = ""
this.isHeight = false
},
},
onLoad(options) {
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
var agedata = []
for (var i = 12; i <= 80; i++) {
agedata.push(i);
}
this.ageArr = agedata
},
};
</script>
<style scoped="scoped" lang="scss">
.box {
height: 100vh;
// padding: 0 15px;
background-color: #fff;
.box {
height: 100vh;
// padding: 0 15px;
background-color: #fff;
}
.touxiang {
position: absolute;
top: 0;
margin: 0 auto;
z-index: 2;
}
input {
border: none;
background: inherit;
}
.headbox {
text-align: center;
position: relative;
display: flex;
justify-content: center;
height: 70px;
margin: 15px 0 30px;
}
.headimage,
.icontouxiang {
display: block;
width: 70px;
height: 70px;
border-radius: 50%;
}
.icontouxiang {
font-size: 70px;
color: $btncolor;
}
.lanBox {
padding: 15px 0;
}
.lan {
display: flex;
align-items: center;
font-size: 14px;
padding: 5px 0;
margin: 5px 15px;
border-bottom: 1px solid #f7f7f7;
}
.lan .left {
width: 24%;
text-align: left;
}
.lan .right {
display: flex;
align-items: center;
justify-content: flex-end;
width: 72%;
min-height: 38px;
box-sizing: border-box;
line-height: 36px;
position: relative;
text-align: right;
picker {
width: 100%;
text-align: right;
border: none;
margin-right: 8px;
}
.touxiang {
position: absolute;
top: 0;
margin: 0 auto;
z-index: 2;
.iconfont {
color: #333333;
font-size: 16px;
position: absolute;
right: -10px;
top: 0;
}
}
input {
border: none;
background: inherit;
}
.btn {
width: auto;
margin: 40px 15px 0;
}
.headbox {
text-align: center;
position: relative;
display: flex;
justify-content: center;
height: 70px;
margin: 15px 0 30px;
}
.headimage,
.icontouxiang {
display: block;
width: 70px;
height: 70px;
border-radius: 50%;
}
.icontouxiang {
font-size: 70px;
color: $btncolor;
}
.lanBox {
padding: 15px 0;
}
.lan {
display: flex;
align-items: center;
font-size: 14px;
padding: 5px 0;
margin: 5px 15px;
border-bottom: 1px solid #f7f7f7;
}
.lan .left {
width: 24%;
text-align: left;
}
.lan .right {
display: flex;
align-items: center;
justify-content: flex-end;
width: 72%;
min-height: 38px;
box-sizing: border-box;
line-height: 36px;
position: relative;
text-align: right;
picker {
width: 100%;
text-align: right;
border: none;
margin-right: 8px;
}
.iconfont {
color: #333333;
font-size: 16px;
position: absolute;
right: -10px;
top: 0;
}
}
.btn {
width: auto;
margin: 40px 15px 0;
}
.lan2 {
height: 35px;
line-height: 35px;
background: #f7f7f7;
font-size: 12px;
padding-left: 15px;
color: #999;
}
.lan2 {
height: 35px;
line-height: 35px;
background: #f7f7f7;
font-size: 12px;
padding-left: 15px;
color: #999;
}
</style>

View File

@ -1,253 +1,258 @@
<template>
<view class="box">
<view class="lanBox">
<form action>
<view class="headbox">
<view class="touxiang">
<image v-if="memInfo.headimg" :src="memInfo.headimg" class="headimage" />
<icon v-else class="t-icon t-icon-touxiang headimage"></icon>
</view>
</view>
<view class="lan border-bottom">
<view class="left">用户名</view>
<view class="right">
<input name="name" type="text" v-model="memInfo.name" placeholder="请输入用户名/昵称" />
</view>
</view>
<view class="lan border-bottom">
<view class="left">性别</view>
<view class="right">
<picker mode="selector" :range="sexItem" @change="onsexArr">
<view class="uni-input">{{!memInfo.sex?'请选择':memInfo.sex==1?'男':'女'}}</view>
<icon class="iconfont icon-arrow-down"></icon>
</picker>
</view>
</view>
<view class="lan border-bottom">
<view class="left">身高</view>
<view class="right">
<input type="digit" class="mr-5" v-model="memInfo.height" placeholder="请输入身高"/> cm
</view>
</view>
<view class="lan border-bottom">
<view class="left">出生日期</view>
<view class="right">
<picker class="picker" mode="date" :end="startDate" :value="memInfo.birthday"
@change="bindDateChange">
<view class="uni-input">{{memInfo.birthday?memInfo.birthday:"请选择"}}</view>
<icon class="iconfont icon-arrow-down"></icon>
</picker>
</view>
</view>
</form>
<view class="box">
<view class="lanBox">
<form action>
<view class="headbox">
<view class="touxiang">
<image v-if="memInfo.headimg" :src="memInfo.headimg" class="headimage" />
<icon v-else class="t-icon t-icon-touxiang headimage"></icon>
</view>
</view>
<view v-if="isHeight" class="slidePopup">
<view class="bg" @click="onTap">
<view class="slide-box" @click.stop>
<view class="btnGroup">
<view class="subtn close" @click="onTap">取消</view>
<view class="heightVal">{{memInfo.height}}cm</view>
<view class="subtn" @click="isHeight = false">确定</view>
</view>
<slide-choose v-model="memInfo.height" ref="slide"></slide-choose>
</view>
</view>
<view class="lan border-bottom">
<view class="left">用户名</view>
<view class="right">
<input name="name" type="text" v-model="memInfo.name" placeholder="请输入用户名/昵称" />
</view>
</view>
<view class="btn" @click="confirmInfo">提交</view>
<view class="lan border-bottom">
<view class="left">性别</view>
<view class="right">
<picker mode="selector" :range="sexItem" @change="onsexArr">
<view class="uni-input">{{!memInfo.sex?'请选择':memInfo.sex==1?'男':'女'}}</view>
<icon class="iconfont icon-arrow-down"></icon>
</picker>
</view>
</view>
<view class="lan border-bottom">
<view class="left">身高</view>
<view class="right">
<input type="digit" class="mr-5" v-model="memInfo.height" placeholder="请输入身高" /> cm
</view>
</view>
<view class="lan border-bottom">
<view class="left">出生日期</view>
<view class="right">
<picker class="picker" mode="date" :end="startDate" :value="memInfo.birthday" @change="bindDateChange">
<view class="uni-input">{{memInfo.birthday?memInfo.birthday:"请选择"}}</view>
<icon class="iconfont icon-arrow-down"></icon>
</picker>
</view>
</view>
</form>
</view>
<view v-if="isHeight" class="slidePopup">
<view class="bg" @click="onTap">
<view class="slide-box" @click.stop>
<view class="btnGroup">
<view class="subtn close" @click="onTap">取消</view>
<view class="heightVal">{{memInfo.height}}cm</view>
<view class="subtn" @click="isHeight = false">确定</view>
</view>
<slide-choose v-model="memInfo.height" ref="slide"></slide-choose>
</view>
</view>
</view>
<view class="btn" @click="confirmInfo">提交</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {
ageArr: [],
sexItem: [
"男",
"女"
],
isHeight: false,
isEdit: false,
memInfo: {
birthday: "",
height: "",
sex: "",
name: ""
},
};
import {
mapState
} from "vuex";
export default {
data() {
return {
ageArr: [],
sexItem: [
"男",
"女"
],
isHeight: false,
isEdit: false,
memInfo: {
birthday: "",
height: "",
sex: "",
name: ""
},
computed: {
...mapState(["user"]),
startDate() {
return this.$tools.getDate('start');
};
},
computed: {
...mapState(["user", "appTheme"]),
startDate() {
return this.$tools.getDate('start');
}
},
methods: {
//
confirmInfo() {
let that = this
that.isHeight = false
if (!this.memInfo.name) {
this.$tools.msg("请输入用户名")
return;
}
if (!this.memInfo.sex) {
this.$tools.msg("请选择性别")
return;
}
if (!this.memInfo.height) {
this.$tools.msg("请选则身高")
return;
}
if (!this.memInfo.birthday) {
this.$tools.msg("请选择出生日期")
return;
}
// console.log("", this.memInfo)
that.subInfo(this.memInfo)
},
subInfo(data) {
let that = this
data.fansid = uni.getStorageSync("unionid");
that.$model.getsubmit(data).then(res => {
if (res.code == 0) {
if (that.isEdit) {
that.$store.dispatch("getUserInfo", {
familyid: that.user.id
})
}
},
methods: {
//
confirmInfo() {
let that = this
that.isHeight = false
if (!this.memInfo.name) {
this.$tools.msg("请输入用户名")
return;
}
if (!this.memInfo.sex) {
this.$tools.msg("请选择性别")
return;
}
if (!this.memInfo.height) {
this.$tools.msg("请选则身高")
return;
}
if (!this.memInfo.birthday) {
this.$tools.msg("请选择出生日期")
return;
}
// console.log("", this.memInfo)
that.subInfo(this.memInfo)
},
subInfo(data) {
let that = this
data.fansid = uni.getStorageSync("unionid");
that.$model.getsubmit(data).then(res => {
if (res.code == 0) {
if (that.isEdit) {
that.$store.dispatch("getUserInfo", {
familyid: that.user.id
})
}
that.$store.dispatch("getFamilyList")
that.$tools.msg("提交成功");
uni.navigateBack({
delta: 1
});
} else {
that.$tools.msg(res.message);
}
});
},
//
bindDateChange(e) {
// console.log("", e)
this.memInfo.birthday = e.target.value
},
//
onsexArr(e) {
// console.log("", e)
this.memInfo.sex = this.sexItem[e.target.value] == "男" ? 1 : 2
},
//
ontypeArr(e) {
this.type = this.typeItem[e.target.value] == "成人" ? 1 : this.typeItem[e.target.value] == "儿童" ? 2 : 3
},
},
onLoad(options) {
var agedata = []
for (var i = 12; i <= 80; i++) {
agedata.push(i);
}
this.ageArr = agedata
//
if (options.familayData) {
let info = options.familayData
this.memInfo = JSON.parse(info)
this.isEdit = true
// console.log("", this.memInfo)
}
//
if (options.type) {
this.isEdit = false
this.memInfo = {
birthday: "",
height: "",
sex: "",
name: ""
}
}
},
};
that.$store.dispatch("getFamilyList")
that.$tools.msg("提交成功");
uni.navigateBack({
delta: 1
});
} else {
that.$tools.msg(res.message);
}
});
},
//
bindDateChange(e) {
// console.log("", e)
this.memInfo.birthday = e.target.value
},
//
onsexArr(e) {
// console.log("", e)
this.memInfo.sex = this.sexItem[e.target.value] == "男" ? 1 : 2
},
//
ontypeArr(e) {
this.type = this.typeItem[e.target.value] == "成人" ? 1 : this.typeItem[e.target.value] == "儿童" ? 2 : 3
},
},
onLoad(options) {
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
//
var agedata = []
for (var i = 12; i <= 80; i++) {
agedata.push(i);
}
this.ageArr = agedata
//
if (options.familayData) {
let info = options.familayData
this.memInfo = JSON.parse(info)
this.isEdit = true
// console.log("", this.memInfo)
}
//
if (options.type) {
this.isEdit = false
this.memInfo = {
birthday: "",
height: "",
sex: "",
name: ""
}
}
},
};
</script>
<style scoped="scoped" lang="scss">
.box {
height: 100vh;
padding: 0 15px;
background-color: #fff;
.box {
height: 100vh;
padding: 0 15px;
background-color: #fff;
}
.headimage,
.icontouxiang {
display: block;
width: 65px;
height: 65px;
font-size: 65px;
color: $btncolor;
border-radius: 50%;
}
.headbox {
text-align: center;
position: relative;
display: flex;
justify-content: center;
height: 65px;
margin: 15px;
}
.lanBox {
padding: 15px 0;
}
.lan {
display: flex;
align-items: center;
font-size: 14px;
padding: 5px 0;
margin: 4px auto;
border-bottom: 1px solid #f7f7f7;
input {
border: none;
background: inherit;
}
}
.lan .left {
width: 24%;
text-align: left;
}
.lan .right {
display: flex;
align-items: center;
justify-content: flex-end;
width: 72%;
min-height: 38px;
box-sizing: border-box;
line-height: 36px;
position: relative;
text-align: right;
picker {
width: 100%;
text-align: right;
border: none;
margin-right: 8px;
}
.headimage,
.icontouxiang {
display: block;
width: 65px;
height: 65px;
font-size: 65px;
color: $btncolor;
border-radius: 50%;
.iconfont {
color: #333333;
font-size: 16px;
position: absolute;
right: -10px;
top: 0;
}
}
.headbox {
text-align: center;
position: relative;
display: flex;
justify-content: center;
height: 65px;
margin: 15px;
}
.lanBox {
padding: 15px 0;
}
.lan {
display: flex;
align-items: center;
font-size: 14px;
padding: 5px 0;
margin: 4px auto;
border-bottom: 1px solid #f7f7f7;
input {
border: none;
background: inherit;
}
}
.lan .left {
width: 24%;
text-align: left;
}
.lan .right {
display: flex;
align-items: center;
justify-content: flex-end;
width: 72%;
min-height: 38px;
box-sizing: border-box;
line-height: 36px;
position: relative;
text-align: right;
picker {
width: 100%;
text-align: right;
border: none;
margin-right: 8px;
}
.iconfont {
color: #333333;
font-size: 16px;
position: absolute;
right: -10px;
top: 0;
}
}
.btn {
margin: 10px auto 0;
}
.btn {
margin: 10px auto 0;
}
</style>

View File

@ -1,319 +1,325 @@
<template>
<view class="common">
<view class="header" v-if="info">
<view class="left">
<image :src="info.headimg" class="image1" />
<view class="left_sm">
<view class="name">
<view>{{info.name?info.name:""}}</view>
<view class="right">
<view v-if="info.isself != 1" @click="deldet(Infoid)" class="guanliyuan">删除</view>
<view @click="editorInfo()" class="guanliyuan">编辑</view>
</view>
</view>
<view class="mt-5">
<text>{{info.sex==0?'未知':info.sex==2?'女':'男'}}</text>
<text>{{info.height}}cm</text>
<text>{{info.mage?info.mage:"0岁"}}</text>
</view>
</view>
<view class="common">
<view class="header" v-if="info" :style="{background:appTheme}">
<view class="left">
<image :src="info.headimg" class="image1" />
<view class="left_sm">
<view class="name">
<view>{{info.name?info.name:""}}</view>
<view class="right">
<view v-if="info.isself != 1" @click="deldet(Infoid)" class="guanliyuan">删除</view>
<view @click="editorInfo()" class="guanliyuan">编辑</view>
</view>
</view>
<view class="mt-5">
<text>{{info.sex==0?'未知':info.sex==2?'女':'男'}}</text>
<text>{{info.height}}cm</text>
<text>{{info.mage?info.mage:"0岁"}}</text>
</view>
</view>
<scroll-view scroll-y class="list ">
<view class="history" v-if="ranklist.length">
<view class="list-item" v-for="(item ,index) in ranklist" :key="index">
<view class="item">
<view class="time">
<icon class="t-icon t-icon-shijian-mianxing-0"></icon>
<text>{{item.createtime}}</text>
</view>
<view>{{item.height}}<text>身高</text></view>
<view>{{item.weight}}<text>体重</text></view>
<view>{{item.bmi}}<text>BMI</text></view>
</view>
</view>
<view class="endtext" v-if="!lastPage || page >= lastPage"> 到底了看看别的吧 </view>
</view>
<view class="nolist" v-else>
<icon class="iconfont icon-zanwu"></icon>
</view>
</scroll-view>
</view>
</view>
<scroll-view scroll-y class="list ">
<view class="history" v-if="ranklist.length">
<view class="list-item" v-for="(item ,index) in ranklist" :key="index">
<view class="item">
<view class="time">
<icon class="t-icon t-icon-shijian-mianxing-0"></icon>
<text>{{item.createtime}}</text>
</view>
<view>{{item.height}}<text>身高</text></view>
<view>{{item.weight}}<text>体重</text></view>
<view>{{item.bmi}}<text>BMI</text></view>
</view>
</view>
<view class="endtext" v-if="!lastPage || page >= lastPage"> 到底了看看别的吧 </view>
</view>
<view class="nolist" v-else>
<icon class="iconfont icon-zanwu"></icon>
</view>
</scroll-view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {
ranklist: [],
info: {},
memberText: null,
memberType: [],
page: 1,
lastPage: '',
import {
mapState
} from "vuex";
export default {
data() {
return {
ranklist: [],
info: {},
memberText: null,
memberType: [],
page: 1,
lastPage: '',
}
},
computed: {
...mapState(["user", "appTheme"])
},
onLoad(option) {
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
//
this.page = 1
this.ranklist = []
console.log("id", option)
if (option.id) {
this.Infoid = option.id
}
},
onShow() {
this.ranklist = []
this.gethistory(this.Infoid)
this.getHistoryList(this.Infoid)
},
onReachBottom() {
console.log(this.lastPage, this.page)
if (!this.lastPage || this.page >= this.lastPage) {
uni.showToast({
title: '没有更多数据!',
icon: 'none'
})
return
}
this.page++
this.getHistoryList(this.Infoid)
},
methods: {
//
getHistoryList(id) {
this.$model.getHistoryList({
familyId: id,
pageNo: this.page,
pageSize: 10,
}).then((res) => {
if (res.code != 0) {
return
}
this.ranklist = this.ranklist.concat(res.data.rows)
this.lastPage = res.data.totalpage
})
},
//
gethistory(id) {
this.$model.getdetail({
id: id
}).then((res) => {
if (res.code != 0) {
return
}
this.info = res.data
})
},
//
editorInfo() {
uni.navigateTo({
url: "/pageTwo/me/adduser?familayData=" + JSON.stringify(this.info),
})
},
//
deldet(id) {
let that = this
uni.showModal({
title: '友情提示',
content: '确定删除该成员吗',
success: function(res) {
if (res.confirm) {
that.$model.getdelete({
id: id,
}).then(res => {
if (res.code != 0) return
that.$tools.msg("删除成功!");
that.getFamilyList()
})
} else if (res.cancel) {
that.$tools.msg("您已取消删除!");
}
},
computed: {
...mapState(["user"])
},
onLoad(option) {
this.page = 1
this.ranklist = []
console.log("id", option)
if (option.id) {
this.Infoid = option.id
}
},
onShow() {
this.ranklist = []
this.gethistory(this.Infoid)
this.getHistoryList(this.Infoid)
},
onReachBottom() {
console.log(this.lastPage, this.page)
if (!this.lastPage || this.page >= this.lastPage) {
uni.showToast({
title: '没有更多数据!',
icon: 'none'
})
return
}
this.page++
this.getHistoryList(this.Infoid)
},
methods: {
//
getHistoryList(id) {
this.$model.getHistoryList({
familyId: id,
pageNo: this.page,
pageSize: 10,
}).then((res) => {
if (res.code != 0) {
return
}
this.ranklist = this.ranklist.concat(res.data.rows)
this.lastPage = res.data.totalpage
})
},
//
gethistory(id) {
this.$model.getdetail({
id: id
}).then((res) => {
if (res.code != 0) {
return
}
this.info = res.data
})
},
//
editorInfo() {
uni.navigateTo({
url: "/pageTwo/me/adduser?familayData=" + JSON.stringify(this.info),
})
},
//
deldet(id) {
let that = this
uni.showModal({
title: '友情提示',
content: '确定删除该成员吗',
success: function(res) {
if (res.confirm) {
that.$model.getdelete({
id: id,
}).then(res => {
if (res.code != 0) return
that.$tools.msg("删除成功!");
that.getFamilyList()
})
} else if (res.cancel) {
that.$tools.msg("您已取消删除!");
}
}
});
},
getFamilyList() {
let that = this
that.$model.getFamilyList({}).then(res => {
that.$store.commit("changeFamilay", res)
that.$store.dispatch("getUserInfo", {
familyid: res[0].familyid
})
uni.switchTab({
url: '/pages/me/me'
});
}).catch(e => {})
},
},
}
}
});
},
getFamilyList() {
let that = this
that.$model.getFamilyList({}).then(res => {
that.$store.commit("changeFamilay", res)
that.$store.dispatch("getUserInfo", {
familyid: res[0].familyid
})
uni.switchTab({
url: '/pages/me/me'
});
}).catch(e => {})
},
},
}
</script>
<style scoped="scoped" lang="scss">
.list {
margin-top: 80px;
.list {
margin-top: 80px;
}
.list-item {
width: 100%;
height: auto;
text-align: center;
margin: 10px 0 15px;
}
.item {
background-color: #fff;
padding: 5px 10px;
display: flex;
justify-content: space-between;
border-radius: 10px;
align-items: center;
text-align: center;
font-size: 32rpx;
font-weight: 700;
margin-bottom: 30rpx;
line-height: 40rpx;
text {
width: 100%;
font-size: 24rpx;
display: block;
color: #666;
text-align: center;
font-weight: 400;
}
.list-item {
view {
width: 18%;
}
.time {
width: 32% !important;
font-size: 28rpx;
color: #666;
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
image {
width: 40rpx;
height: 40rpx;
margin-right: 5px;
}
text {
width: 100%;
height: auto;
text-align: center;
margin: 10px 0 15px;
font-size: 28rpx;
margin-top: 3px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.item {
background-color: #fff;
padding: 5px 10px;
display: flex;
justify-content: space-between;
border-radius: 10px;
align-items: center;
text-align: center;
font-size: 32rpx;
font-weight: 700;
margin-bottom: 30rpx;
line-height: 40rpx;
}
//
.common {
padding: 0 15px;
min-height: calc(100vh - 90px);
height: 100%;
}
.header {
height: 90px;
background: $mainColor;
position: fixed;
top: 0rem;
left: 0;
right: 0;
display: flex;
z-index: 99;
padding: 0 10px;
justify-content: space-between;
.left {
width: 100%;
display: flex;
justify-content: start;
align-items: center;
position: relative;
.left_sm {
text-align: left;
color: #FFFFFF;
position: absolute;
left: 60px;
top: 25px;
right: 0;
.name {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
text {
width: 100%;
font-size: 24rpx;
display: block;
color: #666;
text-align: center;
font-weight: 400;
display: inline-block;
padding-right: 10px;
font-size: 14px;
}
}
view {
width: 18%;
}
.type,
.type2 {
background: #fff;
text-align: center;
display: inline-block;
padding: 0 3px !important;
font-size: 12px !important;
border-radius: 10px;
line-height: initial;
color: $btncolor;
}
.time {
width: 32% !important;
font-size: 28rpx;
color: #666;
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
image {
width: 40rpx;
height: 40rpx;
margin-right: 5px;
}
text {
width: 100%;
font-size: 28rpx;
margin-top: 3px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.image1 {
width: 50px;
height: 50px;
float: left;
border-radius: 50%;
}
p {
text-align: left;
margin-top: 5px;
}
}
//
.common {
padding: 0 15px;
min-height: calc(100vh - 90px);
height: 100%;
.right {
display: flex;
align-items: center;
color: #fff;
text-align: right;
font-size: 14px;
.guanliyuan {
border: 1px solid #fff;
padding: 2px 6px;
border-radius: 10px;
font-size: 12px;
margin-left: 10px;
}
}
}
.header {
height: 90px;
background: $mainColor;
position: fixed;
top: 0rem;
left: 0;
right: 0;
display: flex;
z-index: 99;
padding: 0 10px;
justify-content: space-between;
.leftChild {
width: 100% !important;
padding: 10px 0 !important;
.left {
width: 100%;
display: flex;
justify-content: start;
align-items: center;
position: relative;
.left_sm {
text-align: left;
color: #FFFFFF;
position: absolute;
left: 60px;
top: 25px;
right: 0;
.name {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
text {
display: inline-block;
padding-right: 10px;
font-size: 14px;
}
}
.type,
.type2 {
background: #fff;
text-align: center;
display: inline-block;
padding: 0 3px !important;
font-size: 12px !important;
border-radius: 10px;
line-height: initial;
color: $btncolor;
}
.image1 {
width: 50px;
height: 50px;
float: left;
border-radius: 50%;
}
p {
text-align: left;
margin-top: 5px;
}
}
.right {
display: flex;
align-items: center;
color: #fff;
text-align: right;
font-size: 14px;
.guanliyuan {
border: 1px solid #fff;
padding: 2px 6px;
border-radius: 10px;
font-size: 12px;
margin-left: 10px;
}
}
}
.leftChild {
width: 100% !important;
padding: 10px 0 !important;
view {
min-width: auto !important;
}
view {
min-width: auto !important;
}
}
</style>

View File

@ -1,103 +1,115 @@
<template>
<view class="content">
<view class="formbox">
<view class="input">
<view class="t-icon t-icon-dianhuatianchong"></view>
<input type="text" v-model="formdata.phone" placeholder="在此输入您的联系方式" />
</view>
<view class="input textarea">
<view class="t-icon t-icon-xinxi"></view>
<textarea v-model="formdata.content" name="content" placeholder-style="font-size:13px;margin-top:10px;"
placeholder="有什么想说的,尽管来吧..." />
</view>
<view class="btn " type="button" @click="submit">提交</view>
</view>
<view class="content">
<view class="formbox">
<view class="input">
<view class="t-icon t-icon-dianhuatianchong"></view>
<input type="text" v-model="formdata.phone" placeholder="在此输入您的联系方式" />
</view>
<view class="input textarea">
<view class="t-icon t-icon-xinxi"></view>
<textarea v-model="formdata.content" name="content" placeholder-style="font-size:13px;margin-top:10px;"
placeholder="有什么想说的,尽管来吧..." />
</view>
<view class="btn " type="button" @click="submit">提交</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
formdata: {
phone: "",
content: ""
},
}
import {
mapState
} from "vuex";
export default {
data() {
return {
formdata: {
phone: "",
content: ""
},
}
},
computed: {
...mapState(["appTheme"])
},
onLoad() {
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
},
methods: {
submit() {
if (!this.formdata.phone.trim()) {
this.$tools.msg("请输入联系方式");
return
}
if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.formdata.phone)) {
this.$tools.msg('请输入正确的联系方式');
return;
}
if (!this.formdata.content.trim()) {
this.$tools.msg("请输入建议");
return
}
this.$model.submitadvice(this.formdata).then((res) => {
this.$tools.msg(res.message)
setTimeout(function() {
uni.switchTab({
url: "/pages/me/me"
})
}, 500)
methods: {
submit() {
if (!this.formdata.phone.trim()) {
this.$tools.msg("请输入联系方式");
return
}
if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.formdata.phone)) {
this.$tools.msg('请输入正确的联系方式');
return;
}
if (!this.formdata.content.trim()) {
this.$tools.msg("请输入建议");
return
}
this.$model.submitadvice(this.formdata).then((res) => {
this.$tools.msg(res.message)
setTimeout(function() {
uni.switchTab({
url: "/pages/me/me"
})
}, 500)
}).catch((res) => {
this.$tools.msg('提交失败,请稍后重试!')
});
}).catch((res) => {
this.$tools.msg('提交失败,请稍后重试!')
});
}
},
}
}
},
}
</script>
<style lang="scss" scoped>
.content {
background: #fff;
.content {
background: #fff;
}
.formbox {
padding: 15px;
}
.input {
margin: 0;
display: flex;
border-radius: 5px;
padding: 10px;
margin-bottom: 1rem;
border: 1px solid #f7f7f7;
input {
width: 100%;
height: 1.5rem;
line-height: 1.5rem;
background: none;
border: none;
font-size: 14px;
margin-left: 10px;
}
.formbox {
padding: 15px;
/deep/textarea {
width: 100%;
height: 6.5rem;
line-height: 0;
background: none;
border: none;
font-size: 14px;
margin-left: 10px;
}
}
.input {
margin: 0;
display: flex;
border-radius: 5px;
padding: 10px;
margin-bottom: 1rem;
border: 1px solid #f7f7f7;
input {
width: 100%;
height: 1.5rem;
line-height: 1.5rem;
background: none;
border: none;
font-size: 14px;
margin-left: 10px;
}
/deep/textarea {
width: 100%;
height: 6.5rem;
line-height: 0;
background: none;
border: none;
font-size: 14px;
margin-left: 10px;
}
}
.btn {
display: block;
margin: 30px auto;
font-size: 14px;
}
.btn {
display: block;
margin: 30px auto;
font-size: 14px;
}
</style>

View File

@ -1,165 +1,170 @@
<template>
<view class="common">
<view class="history" v-if="ranklist.length">
<delectList :list="ranklist" :type="user.type" :border="false" @changeDelete="changeDelete"></delectList>
<view class="endtext" v-if="!lastPage || page >= lastPage"> 到底了看看别的吧 </view>
</view>
<view class="nolist" v-if="!lastPage">
<icon class="iconfont icon-zanwu"></icon>
</view>
<view class="common">
<view class="history" v-if="ranklist.length">
<delectList :list="ranklist" :type="user.type" :border="false" @changeDelete="changeDelete"></delectList>
<view class="endtext" v-if="!lastPage || page >= lastPage"> 到底了看看别的吧 </view>
</view>
<view class="nolist" v-if="!lastPage">
<icon class="iconfont icon-zanwu"></icon>
</view>
</view>
</template>
<script>
import delectList from "@/components/mark-slide-list/mark-slide-list.vue"
import {
mapState
} from "vuex";
export default {
components: {
delectList
},
computed: {
...mapState(['user']),
},
data() {
return {
buttonList: [{
title: '删除',
background: '#ff3b32'
}],
list: [
"测量时间",
"体重",
"BMI",
"操作",
],
ranklist: [],
page: 1,
lastPage: 1,
type: null,
id: null,
startX: 0,
endX: 0
import delectList from "@/components/mark-slide-list/mark-slide-list.vue"
import {
mapState
} from "vuex";
export default {
components: {
delectList
},
computed: {
...mapState(['user', "appTheme"]),
},
data() {
return {
buttonList: [{
title: '删除',
background: '#ff3b32'
}],
list: [
"测量时间",
"体重",
"BMI",
"操作",
],
ranklist: [],
page: 1,
lastPage: 1,
type: null,
id: null,
startX: 0,
endX: 0
}
},
onLoad() {
let that = this
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: that.appTheme,
})
that.getList(1)
},
onReachBottom() {
let that = this
console.log("this.lastPage", this.lastPage)
if (!this.lastPage || this.page >= this.lastPage) {
uni.showToast({
title: '没有更多数据!',
icon: 'none'
})
return
}
this.page++
this.getList(this.page)
},
methods: {
changeDelete(item) {
let that = this
uni.showModal({
title: '友情提示',
content: '是否删除当前测量记录?',
success: function(res) {
if (res.confirm) {
that.$model.gethistorydelete({
id: item.id,
}).then((res) => {
if (res.code != 0) {
that.$tools.msg(res.message)
return
}
that.ranklist.splice(that.ranklist.findIndex(ite => ite.id === item
.id), 1)
that.$store.dispatch("getUserInfo", {
familyid: that.user.familyid,
})
that.$store.dispatch("getResult", {
birthday: that.user.birthday,
familyid: that.user.familyid,
height: that.user.height,
sex: that.user.sex,
})
that.$tools.msg("删除成功")
})
} else if (res.cancel) {
that.$tools.msg("您已取消操作!");
}
},
onLoad() {
let that = this
that.getList(1)
},
onReachBottom() {
let that = this
console.log("this.lastPage", this.lastPage)
if (!this.lastPage || this.page >= this.lastPage) {
uni.showToast({
title: '没有更多数据!',
icon: 'none'
})
return
}
this.page++
this.getList(this.page)
},
methods: {
changeDelete(item) {
let that = this
uni.showModal({
title: '友情提示',
content: '是否删除当前测量记录?',
success: function(res) {
if (res.confirm) {
that.$model.gethistorydelete({
id: item.id,
}).then((res) => {
if (res.code != 0) {
that.$tools.msg(res.message)
return
}
that.ranklist.splice(that.ranklist.findIndex(ite => ite.id === item
.id), 1)
that.$store.dispatch("getUserInfo", {
familyid: that.user.familyid,
})
that.$store.dispatch("getResult", {
birthday: that.user.birthday,
familyid: that.user.familyid,
height: that.user.height,
sex: that.user.sex,
})
that.$tools.msg("删除成功")
})
} else if (res.cancel) {
that.$tools.msg("您已取消操作!");
}
},
})
},
getList(page) {
let that = this
that.$model.getHistoryList({
familyId: that.user.familyid,
pageNo: page,
pageSize: 10
}).then((res) => {
console.log("历史记录", res)
if (res.code != 0) return
res.data.rows.forEach(item => {
item.slide_x = 0
})
this.ranklist = this.ranklist.concat(res.data.rows)
this.lastPage = res.data.totalpage
})
},
//
touchStart(e) {
//
this.startX = e.touches[0].clientX
},
//
touchEnd(e) {
console.log("2", e)
//
let parentElement = e.currentTarget
//
this.endX = e.changedTouches[0].clientX
//
if (parentElement.dataset.type == 0 && this.startX - this.endX > 30) {
this.restSlide()
parentElement.dataset.type = 1
}
//
if (parentElement.dataset.type == 1 && this.startX - this.endX < -30) {
this.restSlide()
parentElement.dataset.type = 0
}
this.startX = 0
this.endX = 0
},
//
checkSlide() {
let listItems = document.querySelectorAll('.list')
for (let i = 0; i < listItems.length; i++) {
if (listItems[i].dataset.type == 1) {
return true
}
}
return false
},
//
restSlide() {
let listItems = document.querySelectorAll('list')
//
for (let i = 0; i < listItems.length; i++) {
listItems[i].dataset.type = 0
}
},
},
})
},
getList(page) {
let that = this
that.$model.getHistoryList({
familyId: that.user.familyid,
pageNo: page,
pageSize: 10
}).then((res) => {
console.log("历史记录", res)
if (res.code != 0) return
res.data.rows.forEach(item => {
item.slide_x = 0
})
this.ranklist = this.ranklist.concat(res.data.rows)
this.lastPage = res.data.totalpage
})
},
//
touchStart(e) {
//
this.startX = e.touches[0].clientX
},
//
touchEnd(e) {
console.log("2", e)
//
let parentElement = e.currentTarget
//
this.endX = e.changedTouches[0].clientX
//
if (parentElement.dataset.type == 0 && this.startX - this.endX > 30) {
this.restSlide()
parentElement.dataset.type = 1
}
//
if (parentElement.dataset.type == 1 && this.startX - this.endX < -30) {
this.restSlide()
parentElement.dataset.type = 0
}
this.startX = 0
this.endX = 0
},
//
checkSlide() {
let listItems = document.querySelectorAll('.list')
for (let i = 0; i < listItems.length; i++) {
if (listItems[i].dataset.type == 1) {
return true
}
}
return false
},
//
restSlide() {
let listItems = document.querySelectorAll('list')
//
for (let i = 0; i < listItems.length; i++) {
listItems[i].dataset.type = 0
}
},
}
}
</script>
<style scoped="scoped" lang="scss">
.common {
min-height: calc(100vh - 40px);
padding-bottom: 15px
}
.common {
min-height: calc(100vh - 40px);
padding-bottom: 15px
}
</style>

View File

@ -1,22 +1,22 @@
<template>
<view>
<view class="box">
<view class="form lanBox">
<view class="lan border-bottom" v-for="(item,index) in list" :key="index">
<view class="left">
<view class="icon">
<icon class="t-icon" :class="'t-icon-'+item.key"></icon>
</view>
{{item.title}}
</view>
<view class="center">
<view v-if="item.title!='肥胖等级'">
<text>{{item.fvalue?item.fvalue:"0"}}</text><text v-if="item.dw">{{item.dw}}</text>
</view>
<view v-if="item.title=='肥胖等级'"><text>{{item.fevaluation}}</text></view>
</view>
</view>
<!-- <view class="lan border-bottom">
<view>
<view class="box">
<view class="form lanBox">
<view class="lan border-bottom" v-for="(item,index) in list" :key="index">
<view class="left">
<view class="icon">
<icon class="t-icon" :class="'t-icon-'+item.key"></icon>
</view>
{{item.title}}
</view>
<view class="center">
<view v-if="item.title!='肥胖等级'">
<text>{{item.fvalue?item.fvalue:"0"}}</text><text v-if="item.dw">{{item.dw}}</text>
</view>
<view v-if="item.title=='肥胖等级'"><text>{{item.fevaluation}}</text></view>
</view>
</view>
<!-- <view class="lan border-bottom">
<view class="left">
<image src="@/static/weight.png"></image>体重
</view>
@ -124,76 +124,88 @@
</view>
<view class="right">{{memInfo.body?memInfo.body:'0'}}</view>
</view> -->
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: {},
};
},
onLoad(options) {
let info = options.index
let memInfo = JSON.parse(info)
this.list = this.weightInfo.infoList(memInfo)
console.log(this.list)
}
};
import {
mapState
} from "vuex";
export default {
data() {
return {
list: {},
};
},
computed: {
...mapState(["appTheme"])
},
onLoad(options) {
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
//
let info = options.index
let memInfo = JSON.parse(info)
this.list = this.weightInfo.infoList(memInfo)
console.log(this.list)
}
};
</script>
<style scoped="scoped" lang="scss">
.box {
min-height: 100vh;
background-color: #fff;
}
.box {
min-height: 100vh;
background-color: #fff;
}
.lanBox {
padding: 0px 15px 0;
}
.lanBox {
padding: 0px 15px 0;
}
.lan {
display: flex;
align-items: center;
font-size: 14px;
height: 50px;
line-height: 50px;
justify-content: space-between;
border-bottom: 1px solid #f7f7f7;
.lan {
display: flex;
align-items: center;
font-size: 14px;
height: 50px;
line-height: 50px;
justify-content: space-between;
border-bottom: 1px solid #f7f7f7;
.left {
display: flex;
align-items: center;
text-align: left;
font-size: 14px;
padding-left: 30px;
.left {
display: flex;
align-items: center;
text-align: left;
font-size: 14px;
padding-left: 30px;
.icon {
width: 18px;
height: 18px;
position: absolute;
left: 15px;
padding: 3px;
background-color: #aaa;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.icon {
width: 18px;
height: 18px;
position: absolute;
left: 15px;
padding: 3px;
background-color: #aaa;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
}
}
.right {
display: flex;
align-items: center;
justify-content: flex-end;
width: 50%;
min-height: 38px;
box-sizing: border-box;
line-height: 36px;
}
}
.right {
display: flex;
align-items: center;
justify-content: flex-end;
width: 50%;
min-height: 38px;
box-sizing: border-box;
line-height: 36px;
}
}
</style>

View File

@ -1,115 +1,121 @@
<template>
<view class="common">
<view class="add" @click="addInfo('add')">
<icon class="iconfont icon-tianjia"></icon>添加成员
</view>
<view class="box" v-if="familayList.lenght!=0">
<view class="list" v-for="(item ,index) in familayList" :key="index" @click="datail(item.id)">
<image :src="item.headimg" class="image1" />
<view class="left">
<view class="title">{{item.name?item.name:""}}</view>
<view class="title2">
<text>{{item.sex==0?'未知':item.sex==1?'男':'女'}}</text>
<text>{{item.mage?item.mage:'0岁'}}</text>
<text>{{item.type}}</text>
</view>
<view class="title2">最后测量时间{{item.lasthearttime||'-'}}</view>
</view>
</view>
</view>
<view v-else>
没有数据了
</view>
<view class="common">
<view class="add" @click="addInfo('add')">
<icon class="iconfont icon-tianjia"></icon>添加成员
</view>
<view class="box" v-if="familayList.lenght!=0">
<view class="list" v-for="(item ,index) in familayList" :key="index" @click="datail(item.id)">
<image :src="item.headimg" class="image1" />
<view class="left">
<view class="title">{{item.name?item.name:""}}</view>
<view class="title2">
<text>{{item.sex==0?'未知':item.sex==1?'男':'女'}}</text>
<text>{{item.mage?item.mage:'0岁'}}</text>
<text>{{item.type}}</text>
</view>
<view class="title2">最后测量时间{{item.lasthearttime||'-'}}</view>
</view>
</view>
</view>
<view v-else>
没有数据了
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
data() {
return {
visible: false,
ranklist: [],
}
},
computed: {
...mapState(["familayList", "user"])
},
onLoad() {},
methods: {
//
addInfo(type) {
uni.navigateTo({
url: "/pageTwo/me/adduser?type=${type}"
})
},
//
datail(id) {
uni.navigateTo({
url: `/pageTwo/me/detail?id=` + id,
})
},
}
import {
mapState
} from "vuex";
export default {
data() {
return {
visible: false,
ranklist: [],
}
},
computed: {
...mapState(["familayList", "user", "appTheme"])
},
onLoad() {
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
},
methods: {
//
addInfo(type) {
uni.navigateTo({
url: "/pageTwo/me/adduser?type=${type}"
})
},
//
datail(id) {
uni.navigateTo({
url: `/pageTwo/me/detail?id=` + id,
})
},
}
}
</script>
<style scoped="scoped" lang="scss">
.common {
padding: 15px;
height: calc(100vh - 30px);
.common {
padding: 15px;
height: calc(100vh - 30px);
}
.add {
width: 135px;
height: 30px;
line-height: 30px;
font-size: 14px;
margin-bottom: 10px;
color: #fff;
border-radius: 15px;
display: flex;
justify-content: center;
background: $btncolor;
}
.list {
width: auto;
background: #fff;
display: flex;
border-radius: 10px;
margin-bottom: 15px;
flex-wrap: wrap;
padding: 10px 15px;
font-size: 14px;
align-items: center;
.image1 {
width: 55px;
height: 55px;
border-radius: 50%;
margin-right: 15px;
}
}
.left {
width: 70%;
.title {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.add {
width: 135px;
height: 30px;
line-height: 30px;
font-size: 14px;
margin-bottom: 10px;
color: #fff;
border-radius: 15px;
display: flex;
justify-content: center;
background: $btncolor;
}
.list {
width: auto;
background: #fff;
display: flex;
border-radius: 10px;
margin-bottom: 15px;
flex-wrap: wrap;
padding: 10px 15px;
font-size: 14px;
align-items: center;
.image1 {
width: 55px;
height: 55px;
border-radius: 50%;
margin-right: 15px;
}
}
.left {
width: 70%;
.title {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.title2 {
margin-top: 5px;
font-size: 12px;
color: #999;
text {
margin-right: 10px;
}
}
.title2 {
margin-top: 5px;
font-size: 12px;
color: #999;
text {
margin-right: 10px;
}
}
}
</style>

View File

@ -1,384 +1,389 @@
<template>
<view class="content">
<view class="bgheight" v-if="!isShowA">
<view v-if="listA">
<view class="btn" @tap="handleListx(1)">重新测评</view>
<view class="box">
<view class="name">
<view>本次体质评估结果为</view>
</view>
<view class="conbt">
{{listA.bodytype}}
</view>
<view class="conbt">
{{listA.extinfo}}
</view>
</view>
<view class="box" v-if="listA.list.length">
<view class="h2">体质解读</view>
<view v-for="(item,index) in listA.list" :key="index">
<view class="title">{{item.bodytype}}</view>
<view class="con">
<view class="text" v-show="item.feature"><text>特征</text>{{item.feature}}</view>
<view class="text" v-show="item.people"><text>重点人群</text>{{item.people}}</view>
<view class="text" v-show="item.sick"><text>患病倾向</text>{{item.sick}}</view>
<view class="text" v-show="item.health"><text>调养方式</text>{{item.health}}</view>
</view>
</view>
<view class="tips" v-if="listA.referlist">
{{listA.referlist}}
</view>
</view>
</view>
</view>
<!-- 评估 -->
<view class="commonAll" v-else>
<view class="h2">请根据近一年的体验和感觉回答以下问题</view>
<view class="box" v-for="(item,index) in infoListA.slice((currpage-1)*eachpage,currpage*eachpage)"
:key="index">
<view v-for="(ite, ind) in item.qalist" :key="ind">
<view class="h5">{{ite.title}}</view>
<view class="item">
<view class="group" v-for="(it, id) in ite.data" :key="id" @click="Changeradio(it)">
<icon class="iconfont radioimg"
:class="[dasC.indexOf(it.val)!=-1?'icon-radio':'icon-kongradio']">
</icon>
<view>{{it.name}}</view>
</view>
</view>
</view>
</view>
</view>
<view class="page" v-if='!listA'>
<view class="pre" v-if="currpage>1" @click="pre">上一页</view>
<view v-if="currpage<pagesum" @click="next">下一页</view>
<view class="btn" v-if="currpage==pagesum" @click="handlesub">
提交
</view>
</view>
</view>
<view class="content">
<view class="bgheight" v-if="!isShowA">
<view v-if="listA">
<view class="btn" @tap="handleListx(1)">重新测评</view>
<view class="box">
<view class="name">
<view>本次体质评估结果为</view>
</view>
<view class="conbt">
{{listA.bodytype}}
</view>
<view class="conbt">
{{listA.extinfo}}
</view>
</view>
<view class="box" v-if="listA.list.length">
<view class="h2">体质解读</view>
<view v-for="(item,index) in listA.list" :key="index">
<view class="title">{{item.bodytype}}</view>
<view class="con">
<view class="text" v-show="item.feature"><text>特征</text>{{item.feature}}</view>
<view class="text" v-show="item.people"><text>重点人群</text>{{item.people}}</view>
<view class="text" v-show="item.sick"><text>患病倾向</text>{{item.sick}}</view>
<view class="text" v-show="item.health"><text>调养方式</text>{{item.health}}</view>
</view>
</view>
<view class="tips" v-if="listA.referlist">
{{listA.referlist}}
</view>
</view>
</view>
</view>
<!-- 评估 -->
<view class="commonAll" v-else>
<view class="h2">请根据近一年的体验和感觉回答以下问题</view>
<view class="box" v-for="(item,index) in infoListA.slice((currpage-1)*eachpage,currpage*eachpage)" :key="index">
<view v-for="(ite, ind) in item.qalist" :key="ind">
<view class="h5">{{ite.title}}</view>
<view class="item">
<view class="group" v-for="(it, id) in ite.data" :key="id" @click="Changeradio(it)">
<icon class="iconfont radioimg" :class="[dasC.indexOf(it.val)!=-1?'icon-radio':'icon-kongradio']">
</icon>
<view>{{it.name}}</view>
</view>
</view>
</view>
</view>
</view>
<view class="page" v-if='!listA'>
<view class="pre" v-if="currpage>1" @click="pre">上一页</view>
<view v-if="currpage<pagesum" @click="next">下一页</view>
<view class="btn" v-if="currpage==pagesum" @click="handlesub">
提交
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
computed: {
...mapState(["user"]),
info() {
return this.user
}
},
onShow() {
let that = this
that.handleTypeInfo()
},
methods: {
//
handleTypeInfo() {
let that = this
that.$model.getbodyinfo({
familyid: that.user.familyid,
}).then(res => {
if (res.code != 0) {
that.handleListx(1)
return
}
that.listA = res.data
that.isShowA = false
console.log("计算成功,去查看结果吧!")
})
import {
mapState
} from "vuex";
export default {
computed: {
...mapState(["user", "appTheme"]),
info() {
return this.user
}
},
onLoad() {
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
},
onShow() {
let that = this
that.handleTypeInfo()
},
methods: {
//
handleTypeInfo() {
let that = this
that.$model.getbodyinfo({
familyid: that.user.familyid,
}).then(res => {
if (res.code != 0) {
that.handleListx(1)
return
}
that.listA = res.data
that.isShowA = false
console.log("计算成功,去查看结果吧!")
})
},
//
handleListx(ind) {
let that = this
that.isShowA = true
that.currpage = 1
that.dasA = []
that.dasC = []
that.listA = ""
that.tmidlistA = []
that.infoListA = []
that.$model.getbodylist({
isrestart: ind,
sex: that.user.sex,
familyid: that.user.familyid,
}).then(res => {
console.log(123, res)
if (res.code != 0) return
that.pagesum = Math.ceil(res.data.length / that.eachpage);
that.infoListA = res.data
})
},
//
handleListx(ind) {
let that = this
that.isShowA = true
that.currpage = 1
that.dasA = []
that.dasC = []
that.listA = ""
that.tmidlistA = []
that.infoListA = []
that.$model.getbodylist({
isrestart: ind,
sex: that.user.sex,
familyid: that.user.familyid,
}).then(res => {
console.log(123, res)
if (res.code != 0) return
that.pagesum = Math.ceil(res.data.length / that.eachpage);
that.infoListA = res.data
})
},
//
Changeradio(tmitem) {
let that = this
if (that.tmidlistA.indexOf(tmitem.id) == -1) {
console.log(0)
that.tmidlistA.push(tmitem.id)
that.dasC.push(tmitem.val);
that.dasA.push(tmitem)
} else {
for (var n = 0; n < that.tmidlistA.length; n++) {
if (tmitem.id == that.tmidlistA[n]) {
console.log(1)
if (that.dasC.indexOf(tmitem.val) == -1) {
that.tmidlistA.push(tmitem.id)
that.dasC.push(tmitem.val);
that.dasA.push(tmitem)
console.log(2)
}
that.tmidlistA.splice(n, 1)
that.dasC.splice(n, 1);
that.dasA.splice(n, 1);
}
}
}
},
//
handlesub() {
let that = this
var obj = {}
let newArr = []
that.dasA.forEach(function(item, suffix) {
if (!obj[item.valId]) {
var arr = {
id: '',
list: []
};
arr.id = item.valId
arr.list.push({
id: item.id,
score: item.value
})
newArr.push(arr);
obj[item.valId] = item;
} else {
for (var q = 0; q < newArr.length; q++) {
if (newArr[q].id == item.valId) {
newArr[q].list.push({
id: item.id,
score: item.value
})
}
}
}
})
// for (var i = 0; i < that.infoListA.length; i++) {
// var arr = {
// id: '',
// list: []
// };
// arr.id = that.infoListA[i].id
// for (var e = 0; e < that.infoListA[i].qalist.length; e++) {
// arr.list.push({
// id: that.infoListA[i].qalist[e].Id,
// score: 3
// })
// }
// newArr.push(arr)
// }
console.log("去计算", newArr)
// if (newArr.length < 7 || newArr.length < 9) {
// that.$api.msg("")
// return
// }
that.$model.getbodyresultinfo({
appid: uni.getStorageSync("appid"),
familyid: that.user.familyid,
data: newArr
})
.then(res => {
console.log('res', res)
that.tmidlistA = []
that.dasA = []
that.dasC = []
if (res.code != 0) {
that.$tools.msg(res.message)
return
}
that.listA = res.data
that.isShowA = false
that.currpage = 1
console.log("计算成功,去查看结果吧!")
})
},
pre() {
this.currpage--
},
next() {
let that = this
that.currpage++
},
},
data() {
return {
isShowA: true,
dasA: [],
dasC: [],
listA: [],
infoListA: [],
tmidlistA: [],
pagesum: null, //
currpage: 1, //
eachpage: 2, //
}
},
}
},
//
Changeradio(tmitem) {
let that = this
if (that.tmidlistA.indexOf(tmitem.id) == -1) {
console.log(0)
that.tmidlistA.push(tmitem.id)
that.dasC.push(tmitem.val);
that.dasA.push(tmitem)
} else {
for (var n = 0; n < that.tmidlistA.length; n++) {
if (tmitem.id == that.tmidlistA[n]) {
console.log(1)
if (that.dasC.indexOf(tmitem.val) == -1) {
that.tmidlistA.push(tmitem.id)
that.dasC.push(tmitem.val);
that.dasA.push(tmitem)
console.log(2)
}
that.tmidlistA.splice(n, 1)
that.dasC.splice(n, 1);
that.dasA.splice(n, 1);
}
}
}
},
//
handlesub() {
let that = this
var obj = {}
let newArr = []
that.dasA.forEach(function(item, suffix) {
if (!obj[item.valId]) {
var arr = {
id: '',
list: []
};
arr.id = item.valId
arr.list.push({
id: item.id,
score: item.value
})
newArr.push(arr);
obj[item.valId] = item;
} else {
for (var q = 0; q < newArr.length; q++) {
if (newArr[q].id == item.valId) {
newArr[q].list.push({
id: item.id,
score: item.value
})
}
}
}
})
// for (var i = 0; i < that.infoListA.length; i++) {
// var arr = {
// id: '',
// list: []
// };
// arr.id = that.infoListA[i].id
// for (var e = 0; e < that.infoListA[i].qalist.length; e++) {
// arr.list.push({
// id: that.infoListA[i].qalist[e].Id,
// score: 3
// })
// }
// newArr.push(arr)
// }
console.log("去计算", newArr)
// if (newArr.length < 7 || newArr.length < 9) {
// that.$api.msg("")
// return
// }
that.$model.getbodyresultinfo({
appid: uni.getStorageSync("appid"),
familyid: that.user.familyid,
data: newArr
})
.then(res => {
console.log('res', res)
that.tmidlistA = []
that.dasA = []
that.dasC = []
if (res.code != 0) {
that.$tools.msg(res.message)
return
}
that.listA = res.data
that.isShowA = false
that.currpage = 1
console.log("计算成功,去查看结果吧!")
})
},
pre() {
this.currpage--
},
next() {
let that = this
that.currpage++
},
},
data() {
return {
isShowA: true,
dasA: [],
dasC: [],
listA: [],
infoListA: [],
tmidlistA: [],
pagesum: null, //
currpage: 1, //
eachpage: 2, //
}
},
}
</script>
<style scoped lang="scss">
.content {
font-size: 14px;
color: #666;
background-color: #fff;
padding: 15px;
min-height: calc(100vh - 30px);
}
.content {
font-size: 14px;
color: #666;
background-color: #fff;
padding: 15px;
min-height: calc(100vh - 30px);
}
.h2 {
font-size: 16px;
font-weight: bold;
}
.h2 {
font-size: 16px;
font-weight: bold;
}
.h5 {
margin: 15px 0 10px;
.h5 {
margin: 15px 0 10px;
}
}
.bgheight {
.name {
font-size: 16px;
font-weight: bold;
color: #f19601;
margin-bottom: 15px;
display: flex;
justify-content: space-between;
}
.bgheight {
.name {
font-size: 16px;
font-weight: bold;
color: #f19601;
margin-bottom: 15px;
display: flex;
justify-content: space-between;
}
.conbt {
font-size: 14px;
line-height: 25px;
width: 100%;
margin-bottom: 8px;
}
.conbt {
font-size: 14px;
line-height: 25px;
width: 100%;
margin-bottom: 8px;
}
.box .conbt:nth-last-child(1) text {
display: none;
}
.box .conbt:nth-last-child(1) text {
display: none;
}
.title {
width: 100%;
font-size: 16px;
text-align: left;
font-weight: bold;
margin: 15px 0;
color: #333;
}
.title {
width: 100%;
font-size: 16px;
text-align: left;
font-weight: bold;
margin: 15px 0;
color: #333;
}
.con {
line-height: 25px;
.con {
line-height: 25px;
text {
color: #333;
font-weight: bold;
}
}
text {
color: #333;
font-weight: bold;
}
}
.btn {
display: block;
height: 30px;
line-height: 30px;
border: none;
background: #f19601;
color: #fff;
margin: 0;
width: 100px;
border-radius: 10px;
text-align: center;
font-size: 14px;
float: right;
// margin-bottom: 10px;
}
}
.btn {
display: block;
height: 30px;
line-height: 30px;
border: none;
background: #f19601;
color: #fff;
margin: 0;
width: 100px;
border-radius: 10px;
text-align: center;
font-size: 14px;
float: right;
// margin-bottom: 10px;
}
}
.uni-list-cell {
display: flex;
width: 60%;
margin-bottom: 10px;
margin-left: 10px;
}
.uni-list-cell {
display: flex;
width: 60%;
margin-bottom: 10px;
margin-left: 10px;
}
:nth-child(even).uni-list-cell {
width: 30%;
margin-left: 0;
}
:nth-child(even).uni-list-cell {
width: 30%;
margin-left: 0;
}
.commonAll {
background-color: #fff;
}
.commonAll {
background-color: #fff;
}
.page {
width: 100%;
height: 35px;
text-align: center;
margin: 20px auto;
display: flex;
justify-content: space-around;
.page {
width: 100%;
height: 35px;
text-align: center;
margin: 20px auto;
display: flex;
justify-content: space-around;
view {
width: 150px;
background: #dfdfdf;
padding: 5px 0;
border-radius: 5px;
}
view {
width: 150px;
background: #dfdfdf;
padding: 5px 0;
border-radius: 5px;
}
.btn {
background: #f19601;
color: #fff;
margin: 0;
height: auto;
line-height: inherit;
}
}
.btn {
background: #f19601;
color: #fff;
margin: 0;
height: auto;
line-height: inherit;
}
}
.item {
display: flex;
flex-wrap: wrap;
}
.item {
display: flex;
flex-wrap: wrap;
}
.group {
display: flex;
align-items: center;
align-content: center;
width: 50%;
justify-content: end;
flex-wrap: wrap;
margin-top: 8px;
}
.group {
display: flex;
align-items: center;
align-content: center;
width: 50%;
justify-content: end;
flex-wrap: wrap;
margin-top: 8px;
}
.iconfont {
width: 22px;
height: 22px;
font-size: 20px;
color: #dfdfdf;
display: flex;
margin-right: 3px;
}
.iconfont {
width: 22px;
height: 22px;
font-size: 20px;
color: #dfdfdf;
display: flex;
margin-right: 3px;
}
.icon-radio {
color: #f19601;
}
.icon-radio {
color: #f19601;
}
.tips {
font-size: 12px;
color: #999;
margin-top: 10px;
line-height: 22px;
}
.tips {
font-size: 12px;
color: #999;
margin-top: 10px;
line-height: 22px;
}
</style>

View File

@ -1,208 +1,233 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/target/target",
"style": {
"navigationBarTitleText": "目标"
}
},
{
"path": "pages/compk/compk",
"style": {
"navigationBarTitleText": "对比"
}
},
{
"path": "pages/me/me",
"style": {
"navigationBarTitleText": "我的"
}
},
{
"path": "pages/index/active",
"style": {
"navigationBarTitleText": "设备激活",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/search/devType",
"style": {
"navigationBarTitleText": "设备搜索"
}
}
],
"subPackages": [{
"root": "pageTwo",
"pages": [{
"path": "login/login",
"style": {
"navigationBarTitleText": "登录",
"navigationStyle": "custom"
}
},
{
"path": "login/detail",
"style": {
"navigationBarTitleText": "协议"
}
},
{
"path": "login/userinfo",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "home/index",
"style": {
"navigationBarTitleText": "报告页"
}
},
{
"path": "compk/pkdetail",
"style": {
"navigationBarTitleText": "对比详情"
}
},
{
"path": "me/history",
"style": {
"navigationBarTitleText": "历史记录"
}
},
{
"path": "me/feedBack",
"style": {
"navigationBarTitleText": "意见反馈"
}
},
{
"path": "me/manage",
"style": {
"navigationBarTitleText": "用户管理"
}
},
{
"path": "me/adduser",
"style": {
"navigationBarTitleText": ""
}
}, {
"path": "me/detail",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "me/info",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "survey/survey",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
]
}, {
"root": "BLEPages",
"pages": [{
"path": "adult/H01pro",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "adult/PCD01pro",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "adult/PCL01",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "adult/H09B",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
, {
"path": "adult/F01B",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
]
}],
"globalStyle": {
"navigationBarTextStyle": "#fff",
"navigationBarBackgroundColor": "#00c6c6",
"backgroundColor": "#fff"
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#F9FAFC"
}
},
//
"tabBar": {
"color": "#333",
"selectedColor": "#00c6c6",
"backgroundColor": "#fff",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/tab_sy.png",
"selectedIconPath": "static/tab_sy01.png",
"text": "首页"
},
{
"pagePath": "pages/target/target",
"iconPath": "static/tab_sj.png",
"selectedIconPath": "static/tab_sj01.png",
"text": "目标"
},
{
"pagePath": "pages/compk/compk",
"iconPath": "static/tab_db.png",
"selectedIconPath": "static/tab_db01.png",
"text": "对比"
},
{
"pagePath": "pages/me/me",
"iconPath": "static/tab_me.png",
"selectedIconPath": "static/tab_me01.png",
"text": "我的"
}
]
{
"path": "pages/target/target",
"style": {
"navigationBarTitleText": "目标",
"navigationBarBackgroundColor": "#F9FAFC"
}
},
{
"path": "pages/compk/compk",
"style": {
"navigationBarTitleText": "对比",
"navigationBarBackgroundColor": "#F9FAFC"
}
},
{
"path": "pages/me/me",
"style": {
"navigationBarTitleText": "我的",
"navigationBarBackgroundColor": "#F9FAFC"
}
},
{
"path": "pages/index/active",
"style": {
"navigationBarTitleText": "设备激活",
"navigationBarBackgroundColor": "#F9FAFC",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/search/devType",
"style": {
"navigationBarTitleText": "设备搜索",
"navigationBarBackgroundColor": "#F9FAFC"
}
}
],
"subPackages": [{
"root": "pageTwo",
"pages": [{
"path": "login/login",
"style": {
"navigationBarTitleText": "登录",
"navigationBarBackgroundColor": "#F9FAFC",
"navigationStyle": "custom"
}
},
{
"path": "login/detail",
"style": {
"navigationBarTitleText": "协议",
"navigationBarBackgroundColor": "#F9FAFC"
}
},
{
"path": "login/userinfo",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F9FAFC"
}
},
{
"path": "compk/pkdetail",
"style": {
"navigationBarTitleText": "对比详情",
"navigationBarBackgroundColor": "#F9FAFC"
}
},
{
"path": "me/history",
"style": {
"navigationBarTitleText": "历史记录",
"navigationBarBackgroundColor": "#F9FAFC"
}
},
{
"path": "me/feedBack",
"style": {
"navigationBarTitleText": "意见反馈",
"navigationBarBackgroundColor": "#F9FAFC"
}
},
{
"path": "me/manage",
"style": {
"navigationBarTitleText": "用户管理",
"navigationBarBackgroundColor": "#F9FAFC"
}
},
{
"path": "me/adduser",
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#F9FAFC"
}
}, {
"path": "me/detail",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F9FAFC"
}
},
{
"path": "me/info",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F9FAFC"
}
},
{
"path": "survey/survey",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F9FAFC"
}
}
]
}, {
"root": "BLEPages",
"pages": [{
"path": "adult/H01pro",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F9FAFC"
}
},
{
"path": "adult/PCD01pro",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F9FAFC"
}
},
{
"path": "adult/PCL01",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F9FAFC"
}
},
{
"path": "adult/H09B",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F9FAFC"
}
}
, {
"path": "adult/F01B",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F9FAFC"
}
}, {
"path": "adult/F01PRO",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F9FAFC"
}
}
]
}],
"globalStyle": {
"navigationBarTextStyle": "#fff",
"navigationBarBackgroundColor": "#00c6c6",
"backgroundColor": "#fff"
},
//
"tabBar": {
"color": "#333",
"selectedColor": "#00c6c6",
"backgroundColor": "#fff",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/tab_sy.png",
"selectedIconPath": "static/tab_sy01.png",
"text": "首页"
},
{
"pagePath": "pages/target/target",
"iconPath": "static/tab_sj.png",
"selectedIconPath": "static/tab_sj01.png",
"text": "目标"
},
{
"pagePath": "pages/compk/compk",
"iconPath": "static/tab_db.png",
"selectedIconPath": "static/tab_db01.png",
"text": "对比"
},
{
"pagePath": "pages/me/me",
"iconPath": "static/tab_me.png",
"selectedIconPath": "static/tab_me01.png",
"text": "我的"
}
]
}
}

View File

@ -1,172 +1,177 @@
<template>
<view class="content">
<view class=" calendar">
<!-- 日历 -->
<ren-calendar ref='ren' :markDays='markDays' @onDayClick='onDayClick' @onMonthClickPre='onMonthClickPre'
@onMonthClickNext="onMonthClickNext" v-if="isShow">
</ren-calendar>
<!-- -->
<view class="box" v-if="infoList.length">
<view class="list" v-for="(item,index) in infoList" :key="index" @click="addMemberTags(item.id,item)">
<!-- 成人 -->
<view class="item">
<view class="check">
<icon class="iconfont" :class="isActive.indexOf(item.id)!=-1?'icon-radio':'icon-kongradio'">
</icon>
</view>
<view>{{item.height}}<text>身高</text></view>
<view>{{item.weight}}<text>体重</text></view>
<view>{{item.bmi}}<text>BMI</text></view>
</view>
</view>
</view>
<!-- -->
<view class="bottom">
<view class="list" v-for="(ite,ind) in ActiveDays" :key="ind" v-if="isActive"
@click="addMemberTags(ite.id,ite)">
<view class="item borderRadius">
<view class="time">{{ite.createtime}}</view>
<view>{{ite.height}}<text>身高</text></view>
<view>{{ite.weight}}<text>体重</text></view>
<view>{{ite.bmi}}<text>BMI</text></view>
<view class="check">
<icon class="iconfont icon-quxiao"></icon>
</view>
</view>
</view>
<view class="pkclass" v-if="length==2">vs</view>
<view :class="{'active':length!=2}" class="btn" @click="handlePK">减脂对比</view>
<view class="content">
<view class=" calendar">
<!-- 日历 -->
<ren-calendar ref='ren' :markDays='markDays' @onDayClick='onDayClick' @onMonthClickPre='onMonthClickPre'
@onMonthClickNext="onMonthClickNext" v-if="isShow">
</ren-calendar>
<!-- -->
<view class="box" v-if="infoList.length">
<view class="list" v-for="(item,index) in infoList" :key="index" @click="addMemberTags(item.id,item)">
<!-- 成人 -->
<view class="item">
<view class="check">
<icon class="iconfont" :class="isActive.indexOf(item.id)!=-1?'icon-radio':'icon-kongradio'">
</icon>
</view>
<view>{{item.height}}<text>身高</text></view>
<view>{{item.weight}}<text>体重</text></view>
<view>{{item.bmi}}<text>BMI</text></view>
</view>
</view>
<userPopup></userPopup>
</view>
<!-- -->
<view class="bottom">
<view class="list" v-for="(ite,ind) in ActiveDays" :key="ind" v-if="isActive"
@click="addMemberTags(ite.id,ite)">
<view class="item borderRadius">
<view class="time">{{ite.createtime}}</view>
<view>{{ite.height}}<text>身高</text></view>
<view>{{ite.weight}}<text>体重</text></view>
<view>{{ite.bmi}}<text>BMI</text></view>
<view class="check">
<icon class="iconfont icon-quxiao"></icon>
</view>
</view>
</view>
<view class="pkclass" v-if="length==2">vs</view>
<view :class="{'active':length!=2}" class="btn" @click="handlePK">减脂对比</view>
</view>
</view>
<userPopup></userPopup>
</view>
</template>
<script>
import userPopup from '@/components/userLogin.vue'
import RenCalendar from '@/components/ren-calendar/ren-calendar.vue';
import {
mapState
} from "vuex";
export default {
components: {
userPopup,
RenCalendar,
},
computed: {
...mapState(["user", "TrendPk"]),
length() {
return this.isActive.length
},
endDate() {
return this.$tools.getDate("start")
},
},
onLoad() {
this.token = uni.getStorageSync("token")
},
onShow() {
let that = this
that.startM = that.$tools.getDate("m").substring(0, 10)
that.endM = that.$tools.getDate("m").substring(11, 21)
that.infoList = []
that.markDays = []
that.list = []
that.isActive = []
that.ActiveDays = []
that.isShow = false
this.$nextTick(() => {
that.isShow = true
that.getList(that.startM, that.endM)
})
},
methods: {
getList(start, end) {
let that = this
that.$model.GetTrendList({
familyid: uni.getStorageSync('familyid'),
starttime: start,
endtime: end,
}).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].createtime)) {
that.infoList.push(res.pkList.list[i]);
}
}
}
})
},
onMonthClickPre(data) {
console.log("onMonthClickPre", data)
let that = this
let start = data.substring(0, 10)
let end = data.substring(11, 21)
that.infoList = []
that.markDays = []
that.list = []
that.getList(start, end)
},
onDayClick(data) {
let that = this
this.infoList = []
for (var i = 0; i < that.list.length; i++) {
if (Date.parse(data.date) == Date.parse(that.list[i].createtime)) { //includes
this.infoList.push(that.list[i]);
}
}
},
addMemberTags(index, item) {
var that = this;
console.log("addMemberTags", index, item)
// if (this.user.type != 1) return
if (that.isActive.indexOf(index) == -1) {
that.isActive.push(index);
that.ActiveDays.push(item);
} else {
that.isActive.splice(that.isActive.indexOf(index), 1);
that.ActiveDays.splice(that.ActiveDays.indexOf(item), 1);
}
if (that.isActive.length > 2) {
that.isActive.splice(0, 1)
that.ActiveDays.splice(0, 1);
}
},
handlePK() {
let that = this
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
return
}
if (that.isActive.length != 2) {
that.$tools.msg("请先选择数据!")
return
}
let info = {}
info.familyid = uni.getStorageSync('familyid')
info.firstId = that.isActive[0]
info.secondId = that.isActive[1]
uni.navigateTo({
url: "/pageTwo/compk/pkdetail?info=" + JSON.stringify(info)
})
},
},
data() {
return {
markDays: [],
infoList: [],
list: [],
isActive: [],
ActiveDays: [],
token: null,
startM: null,
endM: null,
isShow: true,
import userPopup from '@/components/userLogin.vue'
import RenCalendar from '@/components/ren-calendar/ren-calendar.vue';
import {
mapState
} from "vuex";
export default {
components: {
userPopup,
RenCalendar,
},
computed: {
...mapState(["user", "TrendPk", "appTheme"]),
length() {
return this.isActive.length
},
endDate() {
return this.$tools.getDate("start")
},
},
onLoad() {
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
this.token = uni.getStorageSync("token")
},
onShow() {
let that = this
that.startM = that.$tools.getDate("m").substring(0, 10)
that.endM = that.$tools.getDate("m").substring(11, 21)
that.infoList = []
that.markDays = []
that.list = []
that.isActive = []
that.ActiveDays = []
that.isShow = false
this.$nextTick(() => {
that.isShow = true
that.getList(that.startM, that.endM)
})
},
methods: {
getList(start, end) {
let that = this
that.$model.GetTrendList({
familyid: uni.getStorageSync('familyid'),
starttime: start,
endtime: end,
}).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].createtime)) {
that.infoList.push(res.pkList.list[i]);
}
}
},
}
}
})
},
onMonthClickPre(data) {
console.log("onMonthClickPre", data)
let that = this
let start = data.substring(0, 10)
let end = data.substring(11, 21)
that.infoList = []
that.markDays = []
that.list = []
that.getList(start, end)
},
onDayClick(data) {
let that = this
this.infoList = []
for (var i = 0; i < that.list.length; i++) {
if (Date.parse(data.date) == Date.parse(that.list[i].createtime)) { //includes
this.infoList.push(that.list[i]);
}
}
},
addMemberTags(index, item) {
var that = this;
console.log("addMemberTags", index, item)
// if (this.user.type != 1) return
if (that.isActive.indexOf(index) == -1) {
that.isActive.push(index);
that.ActiveDays.push(item);
} else {
that.isActive.splice(that.isActive.indexOf(index), 1);
that.ActiveDays.splice(that.ActiveDays.indexOf(item), 1);
}
if (that.isActive.length > 2) {
that.isActive.splice(0, 1)
that.ActiveDays.splice(0, 1);
}
},
handlePK() {
let that = this
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
return
}
if (that.isActive.length != 2) {
that.$tools.msg("请先选择数据!")
return
}
let info = {}
info.familyid = uni.getStorageSync('familyid')
info.firstId = that.isActive[0]
info.secondId = that.isActive[1]
uni.navigateTo({
url: "/pageTwo/compk/pkdetail?info=" + JSON.stringify(info)
})
},
},
data() {
return {
markDays: [],
infoList: [],
list: [],
isActive: [],
ActiveDays: [],
token: null,
startM: null,
endM: null,
isShow: true,
}
},
}
</script>
<style scoped lang="scss">

View File

@ -1,378 +1,384 @@
<template>
<view class="content">
<view class="tips">请在设备开机状态下搜索设备</view>
<view class="item" @click="handleWeight">开始搜索设备</view>
<view class="devices_summary">已发现 {{devices.length}} 个设备</view>
<view>
<scroll-view class="device_list" scroll-y scroll-with-animation v-if="popup">
<view v-for="(item,index) in devices" :key="index" @tap="createBLEConnection(item)" class="device_item">
<view>
<text>{{item.name|| item.localName}}</text>
</view>
<view>mac地址:{{item.macAddr || item.deviceId}}</view>
</view>
</scroll-view>
<view class="content">
<view class="tips">请在设备开机状态下搜索设备</view>
<view class="item" @click="handleWeight">开始搜索设备</view>
<view class="devices_summary">已发现 {{devices.length}} 个设备</view>
<view>
<scroll-view class="device_list" scroll-y scroll-with-animation v-if="popup">
<view v-for="(item,index) in devices" :key="index" @tap="createBLEConnection(item)" class="device_item">
<view>
<text>{{item.name|| item.localName}}</text>
</view>
<view>mac地址:{{item.macAddr || item.deviceId}}</view>
</view>
<view class="tishi">
<view class="text">
<icon class="t-icon t-icon-tishi"></icon> 设备激活流程说明
</view>
<view class="dv">
<text>1打开手机蓝牙和位置信息</text>
<text>2ios系统需打开设置>应用>微信里的蓝牙权限</text>
<text>3设备亮屏状态下搜索蓝牙</text>
<text>4选择蓝牙进行激活</text>
</view>
</view>
<userLogin :url="'active'"></userLogin>
</scroll-view>
</view>
<view class="tishi">
<view class="text">
<icon class="t-icon t-icon-tishi"></icon> 设备激活流程说明
</view>
<view class="dv">
<text>1打开手机蓝牙和位置信息</text>
<text>2ios系统需打开设置>应用>微信里的蓝牙权限</text>
<text>3设备亮屏状态下搜索蓝牙</text>
<text>4选择蓝牙进行激活</text>
</view>
</view>
<userLogin :url="'active'"></userLogin>
</view>
</template>
<script>
var myTime;
import {
mapState
} from "vuex";
import userLogin from "@/components/userLogin.vue"
export default {
data() {
return {
token: "",
macAddr: "",
code: "",
deviceId: "",
popup: false,
devices: [],
}
},
components: {
userLogin
},
computed: {
...mapState(["user", "isBluetoothTyle"])
},
onLoad(options) {
let that = this
console.log("设备code码", options)
if (options) {
that.code = options.code
}
that.token = uni.getStorageSync('token')
that.login()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
},
methods: {
login() {
let that = this
uni.login({
success(res) {
if (res.code) {
if (res.errMsg = "login:ok") {
that.$model.onlogin({
code: res.code,
}).then(res => {
if (res.code == 2) {
uni.clearStorageSync()
uni.removeStorageSync('token')
uni.removeStorageSync('changeUser')
uni.setStorageSync('tenantid', res.data.tenantid)
uni.setStorageSync('sessionid', res.data.sessionid)
uni.setStorageSync('iswxphone', res.data.iswxphone)
that.$store.commit("changeUserLogin", true)
return
} else {
uni.setStorageSync('sessionid', res.data.sessionid)
uni.setStorageSync('token', res.data.token)
uni.setStorageSync('iswxphone', res.data.iswxphone)
uni.setStorageSync('tenantid', res.data.tenantid)
uni.setStorageSync('refreshtoken', res.data.refreshtoken)
}
}).catch(e => {})
}
}
}
})
},
handleWeight() {
let that = this
that.devices = []
if (!that.token) {
var myTime;
import {
mapState
} from "vuex";
import userLogin from "@/components/userLogin.vue"
export default {
data() {
return {
token: "",
macAddr: "",
code: "",
deviceId: "",
popup: false,
devices: [],
}
},
components: {
userLogin
},
computed: {
...mapState(["user", "isBluetoothTyle", "appTheme"])
},
onLoad(options) {
let that = this
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
//
console.log("设备code码", options)
if (options) {
that.code = options.code
}
that.token = uni.getStorageSync('token')
that.login()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
},
methods: {
login() {
let that = this
uni.login({
success(res) {
if (res.code) {
if (res.errMsg = "login:ok") {
that.$model.onlogin({
code: res.code,
}).then(res => {
if (res.code == 2) {
uni.clearStorageSync()
uni.removeStorageSync('token')
uni.removeStorageSync('changeUser')
uni.setStorageSync('tenantid', res.data.tenantid)
uni.setStorageSync('sessionid', res.data.sessionid)
uni.setStorageSync('iswxphone', res.data.iswxphone)
that.$store.commit("changeUserLogin", true)
return
}
uni.openBluetoothAdapter({
success: e => {
that.$store.commit("changeBluetooth", true);
that.startBluetoothDeviceDiscovery()
},
fail: e => {
wx.hideLoading()
console.log("openBluetoothAdapter失败", e)
return that.$tools.getBluetoothAdapter(e)
}
});
},
startBluetoothDeviceDiscovery() {
let that = this;
wx.showLoading({
title: '设备搜索中',
})
uni.startBluetoothDevicesDiscovery({
allowDuplicatesKey: true,
success: res => {
that.onBluetoothDeviceFound();
},
fail: res => {
wx.hideLoading()
console.log("startBluetoothDeviceDiscovery失败", res)
}
});
},
onBluetoothDeviceFound() {
var that = this;
const foundDevices = []
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
if (!device.name && !device.localName) {
return
}
if (device.name.indexOf('AiLink_') != -1) {
const foundDevices = that.devices
const idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId)
let buff = device.advertisData.slice(-6)
device.mac = new Uint8Array(buff) // 广maciOSmac
let tempMac = Array.from(device.mac)
tempMac.reverse()
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
that.deviceId = device.deviceId
that.macAddr = device.macAddr
if (idx === -1) {
that.devices.push(device);
} else {
that.devices[idx] = device
}
that.popup = true
return
}
if (device.advertisServiceUUIDs[0].indexOf("F0A0") !== -1) {
const foundDevices = that.devices
const idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId)
let buffer = device.advertisData.slice(0, 8)
device.mac = new Uint8Array(buffer)
let tempMac = Array.from(device.mac)
tempMac.reverse()
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
that.deviceId = device.deviceId;
that.macAddr = device.macAddr
console.log("device1", device.macAddr, that.deviceId)
if (idx === -1) {
that.devices.push(device);
} else {
that.devices[idx] = device
}
that.popup = true
return
}
})
});
that.handleMyTime()
},
handleMyTime() {
var that = this;
myTime = setTimeout(function() {
if (!that.devices.length) {
clearTimeout(myTime);
wx.hideLoading()
that.stopBluetoothDevicesDiscovery() //
uni.showModal({
title: '提示',
content: '请确定蓝牙和手机位置信息已打开请确定设备已开机ios系统需打开设置——>应用——>微信里的蓝牙权限!是否继续?',
cancelText: "取消",
confirmText: "继续",
success(res) {
if (res.confirm) {
that.startBluetoothDeviceDiscovery()
} else {
that.$tools.msg("您已取消操作")
}
}
})
} else {
clearTimeout(myTime);
that.stopBluetoothDevicesDiscovery()
}
}, 30000);
},
/**
* 停止搜索蓝牙设备
*/
stopBluetoothDevicesDiscovery() {
uni.stopBluetoothDevicesDiscovery({
success: e => {
console.log("停止搜索蓝牙设备", e)
},
});
},
//
createBLEConnection(e) {
let that = this;
that.stopBluetoothDevicesDiscovery()
that.macAddr = e.macAddr
that.getCode()
},
getCode() {
let that = this;
clearTimeout(myTime);
wx.hideLoading()
uni.showModal({
title: '提示',
content: '是否激活该设备?',
cancelText: "取消",
confirmText: "确定",
success: (res) => {
if (res.confirm) {
that.getActive()
} else {
that.$tools.msg("您已取消操作")
}
}
})
},
getActive() {
let that = this
that.$model.getdevactive({
code: that.code,
sn: that.macAddr
}).then(res => {
that.$tools.msg(res.message)
that.closeBluetoothAdapter()
that.closeBLEConnection()
that.devices = []
if (res.code == 0) {
setTimeout(function() {
uni.reLaunch({
url: "/pages/index/index?t=" + that.devtype
})
}, 500)
}
})
},
/**
* 断开蓝牙模块
*/
closeBluetoothAdapter() {
let that = this;
uni.closeBluetoothAdapter({
success: res => {
console.log('蓝牙模块关闭成功');
}
})
},
/**
* 断开蓝牙连接
*/
closeBLEConnection() {
var that = this;
uni.closeBLEConnection({
deviceId: that.deviceId,
success: res => {
console.log('断开蓝牙连接成功');
}
});
},
} else {
uni.setStorageSync('sessionid', res.data.sessionid)
uni.setStorageSync('token', res.data.token)
uni.setStorageSync('iswxphone', res.data.iswxphone)
uni.setStorageSync('tenantid', res.data.tenantid)
uni.setStorageSync('refreshtoken', res.data.refreshtoken)
}
}).catch(e => {})
}
}
}
})
},
handleWeight() {
let that = this
that.devices = []
if (!that.token) {
that.$store.commit("changeUserLogin", true)
return
}
uni.openBluetoothAdapter({
success: e => {
that.$store.commit("changeBluetooth", true);
that.startBluetoothDeviceDiscovery()
},
fail: e => {
wx.hideLoading()
console.log("openBluetoothAdapter失败", e)
return that.$tools.getBluetoothAdapter(e)
}
});
},
startBluetoothDeviceDiscovery() {
let that = this;
wx.showLoading({
title: '设备搜索中',
})
uni.startBluetoothDevicesDiscovery({
allowDuplicatesKey: true,
success: res => {
that.onBluetoothDeviceFound();
},
fail: res => {
wx.hideLoading()
console.log("startBluetoothDeviceDiscovery失败", res)
}
});
},
onBluetoothDeviceFound() {
var that = this;
const foundDevices = []
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
if (!device.name && !device.localName) {
return
}
if (device.name.indexOf('AiLink_') != -1) {
const foundDevices = that.devices
const idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId)
let buff = device.advertisData.slice(-6)
device.mac = new Uint8Array(buff) // 广maciOSmac
let tempMac = Array.from(device.mac)
tempMac.reverse()
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
that.deviceId = device.deviceId
that.macAddr = device.macAddr
if (idx === -1) {
that.devices.push(device);
} else {
that.devices[idx] = device
}
that.popup = true
return
}
if (device.advertisServiceUUIDs[0].indexOf("F0A0") !== -1) {
const foundDevices = that.devices
const idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId)
let buffer = device.advertisData.slice(0, 8)
device.mac = new Uint8Array(buffer)
let tempMac = Array.from(device.mac)
tempMac.reverse()
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
that.deviceId = device.deviceId;
that.macAddr = device.macAddr
console.log("device1", device.macAddr, that.deviceId)
if (idx === -1) {
that.devices.push(device);
} else {
that.devices[idx] = device
}
that.popup = true
return
}
})
});
that.handleMyTime()
},
handleMyTime() {
var that = this;
myTime = setTimeout(function() {
if (!that.devices.length) {
clearTimeout(myTime);
wx.hideLoading()
that.stopBluetoothDevicesDiscovery() //
uni.showModal({
title: '提示',
content: '请确定蓝牙和手机位置信息已打开请确定设备已开机ios系统需打开设置——>应用——>微信里的蓝牙权限!是否继续?',
cancelText: "取消",
confirmText: "继续",
success(res) {
if (res.confirm) {
that.startBluetoothDeviceDiscovery()
} else {
that.$tools.msg("您已取消操作")
}
}
})
} else {
clearTimeout(myTime);
that.stopBluetoothDevicesDiscovery()
}
}, 30000);
},
/**
* 停止搜索蓝牙设备
*/
stopBluetoothDevicesDiscovery() {
uni.stopBluetoothDevicesDiscovery({
success: e => {
console.log("停止搜索蓝牙设备", e)
},
});
},
//
createBLEConnection(e) {
let that = this;
that.stopBluetoothDevicesDiscovery()
that.macAddr = e.macAddr
that.getCode()
},
getCode() {
let that = this;
clearTimeout(myTime);
wx.hideLoading()
uni.showModal({
title: '提示',
content: '是否激活该设备?',
cancelText: "取消",
confirmText: "确定",
success: (res) => {
if (res.confirm) {
that.getActive()
} else {
that.$tools.msg("您已取消操作")
}
}
})
},
getActive() {
let that = this
that.$model.getdevactive({
code: that.code,
sn: that.macAddr
}).then(res => {
that.$tools.msg(res.message)
that.closeBluetoothAdapter()
that.closeBLEConnection()
that.devices = []
if (res.code == 0) {
setTimeout(function() {
uni.reLaunch({
url: "/pages/index/index?t=" + that.devtype
})
}, 500)
}
})
},
/**
* 断开蓝牙模块
*/
closeBluetoothAdapter() {
let that = this;
uni.closeBluetoothAdapter({
success: res => {
console.log('蓝牙模块关闭成功');
}
})
},
/**
* 断开蓝牙连接
*/
closeBLEConnection() {
var that = this;
uni.closeBLEConnection({
deviceId: that.deviceId,
success: res => {
console.log('断开蓝牙连接成功');
}
});
},
}
}
</script>
<style scoped lang="scss">
.content {
min-height: 100vh;
padding: 0;
border-top: 66px solid #75DAD0;
background-color: #fff;
.content {
min-height: 100vh;
padding: 0;
border-top: 66px solid #75DAD0;
background-color: #fff;
}
.tishi {
width: 100%;
font-size: 14px;
line-height: 25px;
font-weight: bold;
position: absolute;
bottom: 30px;
padding-left: 15px;
.text {
display: flex;
align-items: center;
icon {
margin-right: 5px;
}
}
.tishi {
width: 100%;
text {
font-weight: 500;
font-size: 12px;
color: #999;
width: 100%;
display: block;
}
}
.item {
width: 70%;
height: 40px;
line-height: 38px;
text-align: center;
background: #f7f7f7;
border: 1px solid #dfdfdf;
font-weight: bold;
margin: auto;
border-radius: 15px;
margin-top: 15px;
}
.devices_summary {
width: 100%;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
color: #666;
}
.device_list {
flex: 1;
width: 100%;
height: auto;
max-height: 200px;
margin-top: 0;
margin-bottom: 10px;
.device_item {
font-size: 14px;
padding: 10px;
color: #999;
border-bottom: 1px solid #dfdfdf;
text {
display: inline-block;
font-size: 14px;
line-height: 25px;
font-weight: bold;
position: absolute;
bottom: 30px;
padding-left: 15px;
.text {
display: flex;
align-items: center;
icon {
margin-right: 5px;
}
}
text {
font-weight: 500;
font-size: 12px;
color: #999;
width: 100%;
display: block;
}
}
.item {
width: 70%;
height: 40px;
line-height: 38px;
text-align: center;
background: #f7f7f7;
border: 1px solid #dfdfdf;
font-weight: bold;
margin: auto;
border-radius: 15px;
margin-top: 15px;
}
.devices_summary {
width: 100%;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
color: #666;
margin-bottom: 5px;
}
}
}
.device_list {
flex: 1;
width: 100%;
height: auto;
max-height: 200px;
margin-top: 0;
margin-bottom: 10px;
.device_item {
font-size: 14px;
padding: 10px;
color: #999;
border-bottom: 1px solid #dfdfdf;
text {
display: inline-block;
font-size: 14px;
font-weight: bold;
color: #666;
margin-bottom: 5px;
}
}
}
.tips {
font-size: 14px;
text-align: center;
color: #e83a1e;
background: #f7e4c8;
padding: 5px 0;
margin-top: 15px;
}
.tips {
font-size: 14px;
text-align: center;
color: #e83a1e;
background: #f7e4c8;
padding: 5px 0;
margin-top: 15px;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -1,307 +1,312 @@
<template>
<view class="content">
<view class="header-con">
<view class="header" v-if="token">
<image :src="user.headimg" class="headimage" />
<text>{{user.name||user.name}}</text>
</view>
<view class="header2" v-else @click="handleLogin">
<view class="text"><text>登录</text>查看更多信息</view>
</view>
</view>
<!-- 列表 -->
<view class="infolist">
<view class="item borderRadius" @click="handleEditClick">
<view class="left">
性别
</view>
<view class="right"><text>{{user.sex==0?"未知":user.sex==1?'男':'女'}}</text>
<icon class="t-icon t-icon-bianji3"></icon>
</view>
</view>
<view class="item borderRadius" @click="handleEditClick">
<view class="left">
年龄()
</view>
<view class="right"><text>{{user.age?user.age:user.mage?user.mage:0}}</text>
<icon class="t-icon t-icon-bianji3"></icon>
</view>
</view>
<view class="item borderRadius" @click="handleEditClick">
<view class="left">
身高(cm)
</view>
<view class="right"><text>{{user.height?user.height:0}}</text>
<icon class="t-icon t-icon-bianji3"></icon>
</view>
</view>
</view>
<!-- -->
<view class="wxlist borderRadius">
<view class="list" @tap="navTo('/pageTwo/me/manage')">
<view class="item border-bottom">
<view class="left">
<i class="t-icon t-icon-shoucang"></i>
<view class="name">成员管理</view>
</view>
<view class="right">
<icon class="icon iconfont icon-arrow-right" color="#999"></icon>
</view>
</view>
</view>
<!-- -->
<view class="list" @tap="navTo('/pageTwo/me/history')">
<view class="item border-bottom">
<view class="left">
<i class="t-icon t-icon-gonglve"></i>
<view class="name">历史记录</view>
</view>
<view class="right">
<icon class="icon iconfont icon-arrow-right" color="#999"></icon>
</view>
</view>
</view>
<!-- -->
<view class="list" @tap="navTo('/pageTwo/me/feedBack')">
<view class="item border-bottom">
<view class="left">
<i class="t-icon t-icon-pinglun"></i>
<view class="name">意见反馈</view>
</view>
<view class="right">
<icon class="icon iconfont icon-arrow-right" color="#999"></icon>
</view>
</view>
</view>
<!-- -->
<view class="list" @click="handleClick(1)">
<view class="item border-bottom">
<view class="left">
<icon class="t-icon t-icon-shouhou"></icon>
<view class="name">设备管理</view>
</view>
<view class="right">
<icon class="icon iconfont icon-arrow-right" color="#999"></icon>
</view>
</view>
</view>
<!-- -->
<view class="list" @click="handleClick(0)">
<view class="item border-bottom">
<view class="left">
<icon class="t-icon t-icon-hezuo"></icon>
<view class="name">儿童测量</view>
</view>
<view class="right">
<icon class="icon iconfont icon-arrow-right" color="#999"></icon>
</view>
</view>
</view>
</view>
<view class="btn ml-15 mr-15" v-if="token" @click="handleOutLogin">退出登录</view>
<SignUp></SignUp>
<userPopup></userPopup>
<view class="content">
<view class="header-con" :style="{background:appTheme}">
<view class="header" v-if="token">
<image :src="user.headimg" class="headimage" />
<text>{{user.name||user.name}}</text>
</view>
<view class="header2" v-else @click="handleLogin">
<view class="text"><text>登录</text>查看更多信息</view>
</view>
</view>
<!-- 列表 -->
<view class="infolist">
<view class="item borderRadius" @click="handleEditClick">
<view class="left">
性别
</view>
<view class="right"><text>{{user.sex==0?"未知":user.sex==1?'男':'女'}}</text>
<icon class="t-icon t-icon-bianji3"></icon>
</view>
</view>
<view class="item borderRadius" @click="handleEditClick">
<view class="left">
年龄()
</view>
<view class="right"><text>{{user.age?user.age:user.mage?user.mage:0}}</text>
<icon class="t-icon t-icon-bianji3"></icon>
</view>
</view>
<view class="item borderRadius" @click="handleEditClick">
<view class="left">
身高(cm)
</view>
<view class="right"><text>{{user.height?user.height:0}}</text>
<icon class="t-icon t-icon-bianji3"></icon>
</view>
</view>
</view>
<!-- -->
<view class="wxlist borderRadius">
<view class="list" @tap="navTo('/pageTwo/me/manage')">
<view class="item border-bottom">
<view class="left">
<i class="t-icon t-icon-shoucang"></i>
<view class="name">成员管理</view>
</view>
<view class="right">
<icon class="icon iconfont icon-arrow-right" color="#999"></icon>
</view>
</view>
</view>
<!-- -->
<view class="list" @tap="navTo('/pageTwo/me/history')">
<view class="item border-bottom">
<view class="left">
<i class="t-icon t-icon-gonglve"></i>
<view class="name">历史记录</view>
</view>
<view class="right">
<icon class="icon iconfont icon-arrow-right" color="#999"></icon>
</view>
</view>
</view>
<!-- -->
<view class="list" @tap="navTo('/pageTwo/me/feedBack')">
<view class="item border-bottom">
<view class="left">
<i class="t-icon t-icon-pinglun"></i>
<view class="name">意见反馈</view>
</view>
<view class="right">
<icon class="icon iconfont icon-arrow-right" color="#999"></icon>
</view>
</view>
</view>
<!-- -->
<view class="list" @click="handleClick('device')">
<view class="item border-bottom">
<view class="left">
<icon class="t-icon t-icon-shouhou"></icon>
<view class="name">设备管理</view>
</view>
<view class="right">
<icon class="icon iconfont icon-arrow-right" color="#999"></icon>
</view>
</view>
</view>
<!-- -->
<view class="list" @click="handleClick('adult')">
<view class="item border-bottom">
<view class="left">
<icon class="t-icon t-icon-hezuo"></icon>
<view class="name">儿童测量</view>
</view>
<view class="right">
<icon class="icon iconfont icon-arrow-right" color="#999"></icon>
</view>
</view>
</view>
</view>
<view class="btn ml-15 mr-15" v-if="token" @click="handleOutLogin">退出登录</view>
<SignUp></SignUp>
<userPopup></userPopup>
</view>
</template>
<script>
import {
mapState
} from "vuex";
import SignUp from '@/components/signup/signup.vue';
import userPopup from '@/components/userLogin.vue'
export default {
data() {
return {
token: null,
}
},
components: {
userPopup,
SignUp,
},
computed: {
...mapState(["user"]),
},
onTabItemTap() {
this.$store.commit("changeEdit", false);
},
onLoad() {
this.token = uni.getStorageSync("token")
},
methods: {
handleLogin() {
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
return
}
},
handleOutLogin() {
let that = this
uni.showModal({
title: '友情提示',
content: '是否退出登录?',
success: function(res) {
if (res.confirm) {
that.$model.getoutlogin({
sessionid: uni.getStorageSync('sessionid')
}).then((res) => {
that.$tools.msg(res.message)
if (res.code != 0) return
console.log('确定退出', res)
uni.clearStorageSync()
uni.setStorageSync('sessionid', null)
that.$store.commit("changeLogout", false);
uni.reLaunch({
url: "/pages/index/index"
})
})
} else if (res.cancel) {
that.$tools.msg("您已取消操作!");
}
},
})
},
handleClick(ind) {
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
return
}
//
if (ind == 0) {
uni.navigateToMiniProgram({
appId: 'wx3e83b37ba682faf5',
path: 'pages/index/index',
extraData: {},
})
return
}
//
if (ind == 1) {
uni.navigateToMiniProgram({
appId: 'wx6f48cc32c5c0a4a2',
path: 'pages/index/index',
extraData: {},
})
return
}
},
navTo(url) {
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
return
}
uni.navigateTo({
url
})
},
handleEditClick() {
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
return
}
this.$store.commit("changeEdit", true);
},
import {
mapState
} from "vuex";
import SignUp from '@/components/signup/signup.vue';
import userPopup from '@/components/userLogin.vue'
export default {
data() {
return {
token: null,
}
},
components: {
userPopup,
SignUp,
},
computed: {
...mapState(["user", "configBox", "appTheme"]),
},
onTabItemTap() {
this.$store.commit("changeEdit", false);
},
onLoad() {
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
//
this.token = uni.getStorageSync("token")
},
methods: {
handleLogin() {
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
return
}
},
handleOutLogin() {
let that = this
uni.showModal({
title: '友情提示',
content: '是否退出登录?',
success: function(res) {
if (res.confirm) {
that.$model.getoutlogin({
sessionid: uni.getStorageSync('sessionid')
}).then((res) => {
that.$tools.msg(res.message)
if (res.code != 0) return
console.log('确定退出', res)
uni.clearStorageSync()
uni.setStorageSync('sessionid', null)
that.$store.commit("changeLogout", false);
uni.reLaunch({
url: "/pages/index/index"
})
})
} else if (res.cancel) {
that.$tools.msg("您已取消操作!");
}
},
})
},
handleClick(ind) {
let that = this
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
return
}
if (ind == 'adult' && that.configBox.referappid) {
uni.navigateToMiniProgram({
appId: that.configBox.referappid,
path: 'pages/index/index',
extraData: {},
})
return
}
if (ind == 'device' && that.configBox.businessappid) {
uni.navigateToMiniProgram({
appId: that.configBox.businessappid,
path: 'pages/index/index',
extraData: {},
})
return
}
},
navTo(url) {
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
return
}
uni.navigateTo({
url
})
},
handleEditClick() {
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
return
}
this.$store.commit("changeEdit", true);
},
}
}
</script>
<style scoped="scoped" lang="scss">
.content {
min-height: 100vh;
margin-top: 110px;
}
.content {
min-height: 100vh;
margin-top: 110px;
}
.header-con {
height: 95px !important;
}
.header-con {
height: 95px !important;
}
.wxlist {
height: auto;
overflow: hidden;
position: relative;
margin: 0 15px;
padding: 0 15px;
background: #fff;
border-radius: 10px;
.wxlist {
height: auto;
overflow: hidden;
position: relative;
margin: 0 15px;
padding: 0 15px;
background: #fff;
border-radius: 10px;
.item {
width: auto;
font-size: 14px;
line-height: 55px;
height: 55px;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
// border-bottom: 1px solid #dfdfdf;
.item {
width: auto;
font-size: 14px;
line-height: 55px;
height: 55px;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
// border-bottom: 1px solid #dfdfdf;
.left {
display: flex;
.name {
float: left;
color: #333;
position: absolute;
left: 27px;
top: 0;
}
}
}
}
.infolist {
.left {
display: flex;
justify-content: space-between;
align-items: center;
margin: 15px;
.item {
width: 30%;
padding: 10px 0;
text-align: center;
background: #fff;
border-radius: 10px;
position: relative;
.name {
float: left;
color: #333;
position: absolute;
left: 27px;
top: 0;
}
}
}
}
.right {
display: flex;
justify-content: center;
margin-top: 5px;
.infolist {
display: flex;
justify-content: space-between;
align-items: center;
margin: 15px;
text {
display: inline-block;
font-size: 16px;
color: #666;
font-weight: 700;
}
icon {
position: absolute;
right: 7px;
bottom: 9px;
}
}
.item {
width: 30%;
padding: 10px 0;
text-align: center;
background: #fff;
border-radius: 10px;
position: relative;
}
.btn {
width: auto;
margin-top: 50px;
}
.right {
display: flex;
justify-content: center;
margin-top: 5px;
/deep/ .header {
justify-content: center;
flex-wrap: wrap;
margin-top: 0;
}
/deep/ .header text {
background: inherit;
border: none;
width: 100%;
display: block;
color: #fff;
text-align: center;
margin-right: 0;
text {
display: inline-block;
font-size: 16px;
color: #666;
font-weight: 700;
}
icon {
position: absolute;
right: 7px;
bottom: 9px;
}
}
}
.btn {
width: auto;
margin-top: 50px;
}
/deep/ .header {
justify-content: center;
flex-wrap: wrap;
margin-top: 0;
}
/deep/ .header text {
background: inherit;
border: none;
width: 100%;
display: block;
color: #fff;
text-align: center;
margin-right: 0;
font-size: 16px;
}
</style>

View File

@ -1,469 +1,467 @@
<template>
<view class="container">
<view class="text" @click="openBluetoothAdapter" v-if="issearch">没有搜到想要的点击重新搜索</view>
<view class="point-area">
<view class="point point-10"></view>
<view class="point point-40"></view>
<view class="point point-80"></view>
<view class="point point-100"></view>
<view class="point point-120"></view>
</view>
<view class="list">
<view class="item" v-for="(item,index) in devList" :key="index" @click="handleWeight(item)">
<image :src="item.img"></image>
<text>{{item.faccode}}</text>
</view>
</view>
<view class="tips" v-if="isdevTip">
<view>提示</view>
<text>1.请确保设备是已激活</text>
<text>2.请确保设备是开机状态</text>
<text>3.请确定手机蓝牙位置信息已打开</text>
<text>4.ios系统需打开设置>应用>微信里的蓝牙权限</text>
</view>
<view class="container">
<view class="text" @click="openBluetoothAdapter" v-if="issearch">没有搜到想要的点击重新搜索</view>
<view class="point-area">
<view class="point point-10"></view>
<view class="point point-40"></view>
<view class="point point-80"></view>
<view class="point point-100"></view>
<view class="point point-120"></view>
</view>
<view class="list">
<view class="item" v-for="(item,index) in devList" :key="index" @click="handleWeight(item)">
<image :src="item.img"></image>
<text>{{item.faccode}}</text>
</view>
</view>
<view class="tips" v-if="isdevTip">
<view>提示</view>
<text>1.请确保设备是已激活</text>
<text>2.请确保设备是开机状态</text>
<text>3.请确定手机蓝牙位置信息已打开</text>
<text>4.ios系统需打开设置>应用>微信里的蓝牙权限</text>
</view>
</view>
</template>
<script>
let that;
let myTime;
import {
mapState
} from "vuex";
export default {
data() {
return {
Unload: false,
issearch: false,
isdevTip: false,
devList: []
}
},
computed: {
...mapState(["user", "isConnected", "isBluetoothTyle"]),
},
onLoad() {
that = this
that.openBluetoothAdapter()
that.onBLEConnectionStateChange()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
},
onUnload: function() {
let that = this
if (!that.Unload) {
that.stopBluetoothDevicesDiscovery() //
that.closeBLEConnection()
that.closeBluetoothAdapter()
console.log("搜索页返回")
}
},
watch: {
isBluetoothTyle: function() {
let that = this
if (!that.isBluetoothTyle) {
that.issearch = true
that.isdevTip = true
that.devList = []
clearTimeout(myTime);
that.closeBLEConnection()
that.closeBluetoothAdapter()
that.stopBluetoothDevicesDiscovery()
}
}
},
methods: {
//
openBluetoothAdapter() {
let that = this
uni.openBluetoothAdapter({
success: e => {
console.log("蓝牙初始化成功")
that.issearch = false
that.isdevTip = false
that.devList = []
that.startBluetoothDeviceDiscovery()
},
fail: e => {
that.$tools.msg("请打开蓝牙安卓系统需打开蓝牙、定位权限ios系统需打开设置——>应用——>微信里的蓝牙权限!")
}
});
},
//
onBLEConnectionStateChange() {
let that = this
uni.onBLEConnectionStateChange(function(res) {
console.log("蓝牙连接状态", res.connected)
that.$store.commit("changeConnected", res.connected);
})
},
/**
* 停止搜索蓝牙设备
*/
stopBluetoothDevicesDiscovery() {
uni.stopBluetoothDevicesDiscovery({
success: e => {
console.log("停止搜索蓝牙设备", e)
},
});
},
//
startBluetoothDeviceDiscovery() {
let that = this
uni.startBluetoothDevicesDiscovery({
// allowDuplicatesKey: false, //
success: res => {
that.onBluetoothDeviceFound();
},
fail: res => {
that.$tools.msg("请打开蓝牙安卓系统需打开蓝牙、定位权限ios系统需打开设置——>应用——>微信里的蓝牙权限!")
}
});
},
/**
* 发现外围设备
*/
onBluetoothDeviceFound() {
var that = this;
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
if (!device.name && !device.localName) {
return
}
if (device.advertisServiceUUIDs[0].indexOf("F0A0") !== -1) {
let buffer = device.advertisData.slice(0, 8)
device.mac = new Uint8Array(buffer)
let tempMac = Array.from(device.mac)
tempMac.reverse()
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
if (device.macAddr != "") {
that.handleDevType(device.macAddr)
}
return
}
let buff = device.advertisData.slice(-6)
device.mac = new Uint8Array(buff)
let tempMac = Array.from(device.mac)
if (device.name.indexOf('My') == -1) {
tempMac.reverse()
}
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
if (device.macAddr != "") {
that.handleDevType(device.macAddr)
}
})
});
that.handleMyTime()
},
handleMyTime() {
var that = this;
myTime = setTimeout(function() {
if (!that.devList.length) {
that.isdevTip = true
that.devList = []
}
that.issearch = true
clearTimeout(myTime);
that.closeBLEConnection()
that.closeBluetoothAdapter()
that.stopBluetoothDevicesDiscovery() //
}, 30000);
},
//
handleDevType(sn) {
that = this
that.$model.getdevdetail({
sn: sn
}).then(res => {
if (res.code == 0) {
res.data.deviceId = sn
that.devList.push(res.data);
}
})
},
handleWeight(item) {
let that = this
that.Unload = true
clearTimeout(myTime);
if (item.type != 4 || item.type != 5 || item.type != 16) {
that.stopBluetoothDevicesDiscovery()
}
that.$tools.handlePages(item.type, item.deviceId)
},
/**
* 断开蓝牙模块
*/
closeBluetoothAdapter() {
let that = this;
uni.closeBluetoothAdapter({
success: res => {
console.log('蓝牙模块关闭成功');
}
})
},
/**
* 断开蓝牙连接
*/
closeBLEConnection() {
var that = this;
uni.closeBLEConnection({
success: res => {
console.log('断开蓝牙连接成功');
}
});
},
handleBack() {
let that = this
that.Unload = true
that.stopBluetoothDevicesDiscovery() //
that.closeBLEConnection()
that.closeBluetoothAdapter()
uni.navigateBack({
delta: 1
})
},
let that;
let myTime;
import {
mapState
} from "vuex";
export default {
data() {
return {
Unload: false,
issearch: false,
isdevTip: false,
devList: [],
devicesList: [],
}
},
computed: {
...mapState(["user", "isConnected", "isBluetoothTyle", "appTheme"]),
},
onLoad() {
that = this
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
that.openBluetoothAdapter()
that.onBLEConnectionStateChange()
uni.onBluetoothAdapterStateChange(function(res) {
that.$store.commit("changeBluetooth", res.available);
})
},
onUnload: function() {
let that = this
if (!that.Unload) {
that.stopBluetoothDevicesDiscovery() //
that.closeBLEConnection()
that.closeBluetoothAdapter()
console.log("搜索页返回")
}
},
watch: {
isBluetoothTyle: function() {
let that = this
if (!that.isBluetoothTyle) {
that.issearch = true
that.isdevTip = true
that.devList = []
clearTimeout(myTime);
that.closeBLEConnection()
that.closeBluetoothAdapter()
that.stopBluetoothDevicesDiscovery()
}
}
},
methods: {
//
openBluetoothAdapter() {
let that = this
uni.openBluetoothAdapter({
success: e => {
console.log("蓝牙初始化成功")
that.issearch = false
that.isdevTip = false
that.devList = []
that.startBluetoothDeviceDiscovery()
},
fail: e => {
that.$tools.msg("请打开蓝牙安卓系统需打开蓝牙、定位权限ios系统需打开设置——>应用——>微信里的蓝牙权限!")
}
});
},
//
onBLEConnectionStateChange() {
let that = this
uni.onBLEConnectionStateChange(function(res) {
console.log("蓝牙连接状态", res.connected)
that.$store.commit("changeConnected", res.connected);
})
},
/**
* 停止搜索蓝牙设备
*/
stopBluetoothDevicesDiscovery() {
uni.stopBluetoothDevicesDiscovery({
success: e => {
console.log("停止搜索蓝牙设备", e)
},
});
},
//
startBluetoothDeviceDiscovery() {
let that = this
uni.startBluetoothDevicesDiscovery({
allowDuplicatesKey: false, //
// interval: 200,
success: res => {
that.onBluetoothDeviceFound();
},
fail: res => {
that.$tools.msg("请打开蓝牙安卓系统需打开蓝牙、定位权限ios系统需打开设置——>应用——>微信里的蓝牙权限!")
}
});
},
/**
* 发现外围设备
*/
onBluetoothDeviceFound() {
var that = this;
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
if (!device.name && !device.localName) {
return
}
console.log("设备列表", device)
let buff = ""
if (device.name.indexOf("ELK") !== -1 && device.advertisServiceUUIDs[0].indexOf("F0A0") !== -1) {
buff = device.advertisData.slice(0, 8)
} else {
buff = device.advertisData.slice(-6)
}
device.mac = new Uint8Array(buff)
let tempMac = Array.from(device.mac)
if (device.name.indexOf('My') == -1) {
tempMac.reverse()
}
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase()
const foundDevices = that.devicesList
const idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId)
if (idx === -1) {
that.devicesList.push(device);
if (device.macAddr != "") {
that.handleDevType(device.macAddr)
}
}
// console.log("", that.devicesList)
})
});
that.handleMyTime()
},
handleMyTime() {
var that = this;
myTime = setTimeout(function() {
if (!that.devList.length) {
that.isdevTip = true
that.devList = []
}
that.issearch = true
clearTimeout(myTime);
that.closeBLEConnection()
that.closeBluetoothAdapter()
that.stopBluetoothDevicesDiscovery() //
}, 30000);
},
//
handleDevType(sn) {
that = this
that.$model.getdevdetail({
sn: sn
}).then(res => {
if (res.code == 0) {
res.data.deviceId = sn
that.devList.push(res.data);
}
})
},
handleWeight(item) {
let that = this
that.Unload = true
clearTimeout(myTime);
if (item.type != 4 || item.type != 5 || item.type != 16) {
that.stopBluetoothDevicesDiscovery()
}
that.$tools.handlePages(item.type, item.deviceId)
},
/**
* 断开蓝牙模块
*/
closeBluetoothAdapter() {
let that = this;
uni.closeBluetoothAdapter({
success: res => {
console.log('蓝牙模块关闭成功');
}
})
},
/**
* 断开蓝牙连接
*/
closeBLEConnection() {
var that = this;
uni.closeBLEConnection({
success: res => {
console.log('断开蓝牙连接成功');
}
});
},
}
}
</script>
<style scoped lang="scss">
.text {
position: absolute;
top: 0px;
width: 100%;
text-align: center;
height: 50px;
line-height: 50px;
font-size: 16px;
color: $greencolor;
font-weight: bold;
.text {
position: absolute;
top: 0px;
width: 100%;
text-align: center;
height: 50px;
line-height: 50px;
font-size: 16px;
color: $greencolor;
font-weight: bold;
}
.tips {
position: absolute;
width: 100%;
bottom: 15px;
line-height: 24px;
view {
font-size: 14px;
color: $greencolor;
font-weight: bold;
margin-left: 15px;
}
.tips {
position: absolute;
width: 100%;
bottom: 15px;
line-height: 24px;
view {
font-size: 14px;
color: $greencolor;
font-weight: bold;
margin-left: 15px;
}
text {
font-size: 12px;
width: 100%;
display: block;
margin-left: 20px;
color: #999;
}
text {
font-size: 12px;
width: 100%;
display: block;
margin-left: 20px;
color: #999;
}
}
.list {
position: absolute;
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
.list {
position: absolute;
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
.item {
width: 30%;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
position: absolute;
left: 55%;
top: -10px;
.item {
width: 30%;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
position: absolute;
left: 55%;
top: -10px;
image {
width: 45px;
height: 45px;
border-radius: 50%;
}
text {
display: block;
width: 100%;
font-size: 12px;
color: #666;
margin-top: 5px;
text-align: center;
}
}
.item:nth-of-type(2) {
left: calc(55% - 60px);
top: 50px;
}
.item:nth-of-type(3) {
left: calc(50% - 140px);
top: 90px;
}
.item:nth-of-type(4) {
left: calc(61% + 20px);
top: 70px;
}
.item:nth-of-type(5) {
left: 20%;
top: -100px;
}
.item:nth-of-type(6) {
left: calc(20% - 16px);
top: -38px;
}
.item:nth-of-type(7) {
left: 0;
top: 15px;
}
.item:nth-of-type(8) {
left: calc(20% + 75px);
top: -150px;
}
.item:nth-of-type(9) {
left: calc(20% + 96px);
top: -80px;
}
.item:nth-of-type(10) {
left: 37px;
top: -170px;
}
.item:nth-of-type(11) {
left: calc(20% + 75px);
top: 130px;
}
.item:nth-of-type(12) {
left: -10px;
top: -104px;
}
.item:nth-of-type(13) {
left: calc(47% + 75px);
top: -150px;
}
.item:nth-of-type(14) {
left: calc(53% + 75px);
top: -50px;
}
}
.container {
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
position: relative;
overflow: hidden;
}
//
.container::after {
content: "";
width: 20px;
height: 20px;
image {
width: 45px;
height: 45px;
border-radius: 50%;
background-color: #fbb780;
position: absolute;
z-index: 9;
}
}
/* 定义范围*/
.point-area {
text-align: center;
position: relative;
width: 400rpx;
height: 400rpx;
transition: opacity 0.5s ease-out;
}
.point-10,
.point-40,
.point-80,
.point-100,
.point-120 {
width: 100%;
height: 100%;
}
.point-10:after,
.point-40:after,
.point-80:after,
.point-100:after,
.point-120:after {
content: '';
text {
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
border-radius: 50%;
opacity: 0;
border: 1px solid #f7cb6b;
animation-play-state: paused;
-webkit-animation-play-state: paused;
width: 100%;
font-size: 12px;
color: #666;
margin-top: 5px;
text-align: center;
}
}
.point-10:after {
content: '';
animation: ripple 3000ms linear 0ms infinite;
.item:nth-of-type(2) {
left: calc(55% - 60px);
top: 50px;
}
.point-40:after {
content: '';
animation: ripple 3000ms linear 600ms infinite;
.item:nth-of-type(3) {
left: calc(50% - 140px);
top: 90px;
}
.point-80:after {
content: '';
animation: ripple 3000ms linear 1200ms infinite;
.item:nth-of-type(4) {
left: calc(61% + 20px);
top: 70px;
}
.point-100:after {
content: '';
animation: ripple 3000ms linear 1800ms infinite;
.item:nth-of-type(5) {
left: 20%;
top: -100px;
}
.point-120:after {
content: '';
animation: ripple 3000ms linear 2400ms infinite;
.item:nth-of-type(6) {
left: calc(20% - 16px);
top: -38px;
}
@keyframes ripple {
0% {
opacity: 0;
transform: scale(0.1);
}
50% {
opacity: 0.8;
transform: scale(1);
}
100% {
opacity: 0.2;
transform: scale(2.2);
}
.item:nth-of-type(7) {
left: 0;
top: 15px;
}
.item:nth-of-type(8) {
left: calc(20% + 75px);
top: -150px;
}
.item:nth-of-type(9) {
left: calc(20% + 96px);
top: -80px;
}
.item:nth-of-type(10) {
left: 37px;
top: -170px;
}
.item:nth-of-type(11) {
left: calc(20% + 75px);
top: 130px;
}
.item:nth-of-type(12) {
left: -10px;
top: -104px;
}
.item:nth-of-type(13) {
left: calc(47% + 75px);
top: -150px;
}
.item:nth-of-type(14) {
left: calc(53% + 75px);
top: -50px;
}
}
.container {
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
position: relative;
overflow: hidden;
}
//
.container::after {
content: "";
width: 20px;
height: 20px;
border-radius: 50%;
background-color: #fbb780;
position: absolute;
z-index: 9;
}
/* 定义范围*/
.point-area {
text-align: center;
position: relative;
width: 400rpx;
height: 400rpx;
transition: opacity 0.5s ease-out;
}
.point-10,
.point-40,
.point-80,
.point-100,
.point-120 {
width: 100%;
height: 100%;
}
.point-10:after,
.point-40:after,
.point-80:after,
.point-100:after,
.point-120:after {
content: '';
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
border-radius: 50%;
opacity: 0;
border: 1px solid #f7cb6b;
animation-play-state: paused;
-webkit-animation-play-state: paused;
}
.point-10:after {
content: '';
animation: ripple 3000ms linear 0ms infinite;
}
.point-40:after {
content: '';
animation: ripple 3000ms linear 600ms infinite;
}
.point-80:after {
content: '';
animation: ripple 3000ms linear 1200ms infinite;
}
.point-100:after {
content: '';
animation: ripple 3000ms linear 1800ms infinite;
}
.point-120:after {
content: '';
animation: ripple 3000ms linear 2400ms infinite;
}
@keyframes ripple {
0% {
opacity: 0;
transform: scale(0.1);
}
50% {
opacity: 0.8;
transform: scale(1);
}
100% {
opacity: 0.2;
transform: scale(2.2);
}
}
</style>

View File

@ -1,312 +1,319 @@
<template>
<view class="content">
<!-- 时间选择 -->
<view class="TrendPage">
<view class="TrendTime">
<view class="boxTime">
<view class="one">
<picker mode="date" class="f-l" :value="startTime?startTime:startDate" @change="handStartTimeH">
<view class="uni-input">{{startTime?startTime:startDate}}
<icon class="iconfont iconDown"></icon>
</view>
</picker>
<view class="content">
<!-- 时间选择 -->
<view class="TrendPage">
<view class="TrendTime">
<view class="boxTime">
<view class="one">
<picker mode="date" class="f-l" :value="startTime?startTime:startDate" @change="handStartTimeH">
<view class="uni-input">{{startTime?startTime:startDate}}
<icon class="iconfont iconDown"></icon>
</view>
</picker>
<picker mode="date" :end="endDate" class="f-r" :value="endDate" @change="handEndTimeH">
<view class="uni-input">~ {{endTime?endTime:endDate}}
<icon class="iconfont iconDown"></icon>
</view>
</picker>
</view>
<view class="tow" @click="handAllTime(0)" :class="{style:active==0}">
近3月
</view>
<view class="tow" @click="handAllTime(1)" :class="{style:active==1}">
近半年
</view>
</view>
</view>
<!-- 曲线图 -->
<view class="box boxList">
<view class="listC">
<view :class="{active:index==active1}" class="name" v-for="(item,index) in weightList" :key="index"
@click="showbox(index)">
{{item.title}}
</view>
</view>
<view class="blockC">
<view v-if="lineData&&lineData.categories.length&&handTrue">
<qiun-data-charts type="area" :chartData="lineData" :canvas2d="true" canvasId="charts09"
:cHeight="480" :cWidth="640" :animation="false"
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}" :ontouch="true" />
</view>
<view class="nolist" v-else>
<icon class="iconfont icon-zanwu"></icon>
</view>
</view>
</view>
<!-- 目标-->
<view class="box">
<view class="data">
<view class="item" @click="handleClick(0)">
<view class="val">{{userInfo.targetweight?userInfo.targetweight:0}}<text>kg</text>
</view>
<view class="name">目标体重<icon class="t-icon t-icon-bianji3"></icon>
</view>
</view>
<view class="item">
<view class="val">{{userInfo.totalweight?Math.abs(userInfo.totalweight):0}}<text>kg</text>
</view>
<view class="name" v-if="Number(userInfo.totalweight)<0">累计增重</view>
<view class="name" v-else>累计减重</view>
</view>
<view class="item" @click="handleClick(1)">
<view class="val">{{userInfo.firstweight?userInfo.firstweight:0}}<text>kg</text>
</view>
<view class="name">初始体重<icon class="t-icon t-icon-bianji3"></icon>
</view>
</view>
<view class="item">
<view class="val">{{userInfo.day?userInfo.day:0}}<text></text></view>
<view class="name">减重天数</view>
</view>
<view class="item" @click="handleClick(2)">
<view class="val"></view>
<view class="name">
<icon class="iconfont icon-tianjia">手动记录</icon>
</view>
</view>
</view>
</view>
<!-- 手动 -->
<manuaRecord @getList="getList"></manuaRecord>
<!-- 初始 -->
<firstweight></firstweight>
<!-- 目标 -->
<targetWeight></targetWeight>
<!-- 登录 -->
<userPopup></userPopup>
<picker mode="date" :end="endDate" class="f-r" :value="endDate" @change="handEndTimeH">
<view class="uni-input">~ {{endTime?endTime:endDate}}
<icon class="iconfont iconDown"></icon>
</view>
</picker>
</view>
<view class="tow" @click="handAllTime(0)" :class="{style:active==0}">
近3月
</view>
<view class="tow" @click="handAllTime(1)" :class="{style:active==1}">
近半年
</view>
</view>
</view>
<!-- 曲线图 -->
<view class="box boxList">
<view class="listC">
<view :class="{active:index==active1}" class="name" v-for="(item,index) in weightList" :key="index"
@click="showbox(index)">
{{item.title}}
</view>
</view>
<view class="blockC">
<view v-if="lineData&&lineData.categories.length&&handTrue">
<qiun-data-charts type="area" :chartData="lineData" :canvas2d="true" canvasId="charts09" :cHeight="480"
:cWidth="640" :animation="false" :opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}"
:ontouch="true" />
</view>
<view class="nolist" v-else>
<icon class="iconfont icon-zanwu"></icon>
</view>
</view>
</view>
<!-- 目标-->
<view class="box">
<view class="data">
<view class="item" @click="handleClick(0)">
<view class="val">{{userInfo.targetweight?userInfo.targetweight:0}}<text>kg</text>
</view>
<view class="name">目标体重<icon class="t-icon t-icon-bianji3"></icon>
</view>
</view>
<view class="item">
<view class="val">{{userInfo.totalweight?Math.abs(userInfo.totalweight):0}}<text>kg</text>
</view>
<view class="name" v-if="Number(userInfo.totalweight)<0">累计增重</view>
<view class="name" v-else>累计减重</view>
</view>
<view class="item" @click="handleClick(1)">
<view class="val">{{userInfo.firstweight?userInfo.firstweight:0}}<text>kg</text>
</view>
<view class="name">初始体重<icon class="t-icon t-icon-bianji3"></icon>
</view>
</view>
<view class="item">
<view class="val">{{userInfo.day?userInfo.day:0}}<text></text></view>
<view class="name">减重天数</view>
</view>
<view class="item" @click="handleClick(2)">
<view class="val"></view>
<view class="name">
<icon class="iconfont icon-tianjia">手动记录</icon>
</view>
</view>
</view>
</view>
<!-- 手动 -->
<manuaRecord @getList="getList"></manuaRecord>
<!-- 初始 -->
<firstweight></firstweight>
<!-- 目标 -->
<targetWeight></targetWeight>
<!-- 登录 -->
<userPopup></userPopup>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
import userPopup from '@/components/userLogin.vue'
import targetWeight from '@/components/target/targetWeight.vue';
import firstweight from '@/components/target/firstweight.vue';
import manuaRecord from '@/components/target/manuaRecord.vue';
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
export default {
components: {
targetWeight,
firstweight,
manuaRecord,
userPopup,
qiunDataCharts,
},
computed: {
...mapState(["user", "Trend"]),
userInfo: function() {
return this.user
},
endDate() {
return this.$tools.getDate("start")
},
startDate() {
return this.$tools.GetDateStr(-90);
},
},
onShow() {
let that = this
this.token = uni.getStorageSync('token')
this.active = 0
this.startTime = ""
this.endTime = ""
that.getList(this.startDate, this.endDate)
},
methods: {
getList(start, end) {
console.log("fanhui", start, end)
let that = this
that.$model.getTrendList({
familyid: uni.getStorageSync('familyid'),
starttime: start,
endtime: end,
}).then(res => {
if (res) {
for (var i = 0; i < that.weightList.length; i++) {
that.weightList[i].Line = res[that.weightList[i].key];
}
that.showbox(0)
}
})
},
showbox(index) {
let that = this
that.handTrue = false
this.$nextTick(function() {
that.handTrue = true
that.lineData = that.weightList[index].Line
})
that.active1 = index
},
//
handStartTimeH(e) {
let that = this
if (this.endTime) {
if (Date.parse(e.target.value) > Date.parse(this.endTime)) {
this.$tools.msg("请选择正确的时间")
return
}
} else {
if (Date.parse(e.target.value) > Date.parse(this.endDate)) {
this.$tools.msg("请选择正确的时间")
return
}
}
this.startTime = e.target.value
let endtime = that.endTime ? that.endTime : that.endDate
this.getList(that.startTime, endtime)
},
//
handEndTimeH(e) {
let that = this
if (this.startTime) {
if (Date.parse(e.target.value) < Date.parse(this.startTime)) {
this.$tools.msg("请选择正确的时间")
return
}
} else {
if (Date.parse(e.target.value) < Date.parse(this.startDate)) {
this.$tools.msg("请选择正确的时间")
return
}
}
this.endTime = e.target.value
let startTime = that.startTime ? that.startTime : that.startDate
this.getList(startTime, this.endTime)
},
//
handAllTime(ind) {
let that = this
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
return
}
this.active = ind
if (ind == 0) {
this.startTime = that.$tools.GetDateStr(-90)
} else {
this.startTime = that.$tools.GetDateStr(-180)
}
this.getList(this.startTime, this.endDate)
},
handleClick(ind) {
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
return
}
if (ind == 0) {
this.$store.commit("changeTarget", true);
return
}
if (ind == 1) {
this.$store.commit("changeFirst", true);
return
}
if (ind == 2) {
this.$store.commit("changeRecord", true);
return
}
},
},
data() {
return {
lineData: null,
type: null,
active1: 0,
weight: "",
startTime: "",
endTime: "",
active: 0,
token: null,
handTrue: true,
weightList: [{
title: '体重',
key: 'weight',
showCon: false,
Line: {
"categories": [],
"series": [{
"color": "#fb7b92",
"name": "体重",
"data": []
}]
},
},
{
title: 'BMI',
key: 'bmi',
Line: {
"categories": [],
"series": [{
"color": "#6bb0fe",
"name": "bmi",
"data": []
}]
},
}, {
title: '肌肉',
key: 'muscle',
showCon: false,
Line: {
"categories": [],
"series": [{
"color": "#ff9f40",
"name": "肌肉率",
"data": []
}]
},
},
{
title: '脂肪',
key: 'fat_r',
showCon: false,
Line: {
"categories": [],
"series": [{
"color": "#3fcba7",
"name": "脂肪率",
"data": []
}]
},
}
],
};
import {
mapState
} from "vuex";
import userPopup from '@/components/userLogin.vue'
import targetWeight from '@/components/target/targetWeight.vue';
import firstweight from '@/components/target/firstweight.vue';
import manuaRecord from '@/components/target/manuaRecord.vue';
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
export default {
components: {
targetWeight,
firstweight,
manuaRecord,
userPopup,
qiunDataCharts,
},
computed: {
...mapState(["user", "Trend", "appTheme"]),
userInfo: function() {
return this.user
},
endDate() {
return this.$tools.getDate("start")
},
startDate() {
return this.$tools.GetDateStr(-90);
},
},
onLoad() {
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
},
onShow() {
let that = this
this.token = uni.getStorageSync('token')
this.active = 0
this.startTime = ""
this.endTime = ""
that.getList(this.startDate, this.endDate)
},
methods: {
getList(start, end) {
console.log("fanhui", start, end)
let that = this
that.$model.getTrendList({
familyid: uni.getStorageSync('familyid'),
starttime: start,
endtime: end,
}).then(res => {
if (res) {
for (var i = 0; i < that.weightList.length; i++) {
that.weightList[i].Line = res[that.weightList[i].key];
}
that.showbox(0)
}
})
},
showbox(index) {
let that = this
that.handTrue = false
this.$nextTick(function() {
that.handTrue = true
that.lineData = that.weightList[index].Line
})
that.active1 = index
},
//
handStartTimeH(e) {
let that = this
if (this.endTime) {
if (Date.parse(e.target.value) > Date.parse(this.endTime)) {
this.$tools.msg("请选择正确的时间")
return
}
} else {
if (Date.parse(e.target.value) > Date.parse(this.endDate)) {
this.$tools.msg("请选择正确的时间")
return
}
}
this.startTime = e.target.value
let endtime = that.endTime ? that.endTime : that.endDate
this.getList(that.startTime, endtime)
},
//
handEndTimeH(e) {
let that = this
if (this.startTime) {
if (Date.parse(e.target.value) < Date.parse(this.startTime)) {
this.$tools.msg("请选择正确的时间")
return
}
} else {
if (Date.parse(e.target.value) < Date.parse(this.startDate)) {
this.$tools.msg("请选择正确的时间")
return
}
}
this.endTime = e.target.value
let startTime = that.startTime ? that.startTime : that.startDate
this.getList(startTime, this.endTime)
},
//
handAllTime(ind) {
let that = this
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
return
}
this.active = ind
if (ind == 0) {
this.startTime = that.$tools.GetDateStr(-90)
} else {
this.startTime = that.$tools.GetDateStr(-180)
}
this.getList(this.startTime, this.endDate)
},
handleClick(ind) {
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
return
}
if (ind == 0) {
this.$store.commit("changeTarget", true);
return
}
if (ind == 1) {
this.$store.commit("changeFirst", true);
return
}
if (ind == 2) {
this.$store.commit("changeRecord", true);
return
}
},
},
data() {
return {
lineData: null,
type: null,
active1: 0,
weight: "",
startTime: "",
endTime: "",
active: 0,
token: null,
handTrue: true,
weightList: [{
title: '体重',
key: 'weight',
showCon: false,
Line: {
"categories": [],
"series": [{
"color": "#fb7b92",
"name": "体重",
"data": []
}]
},
},
{
title: 'BMI',
key: 'bmi',
Line: {
"categories": [],
"series": [{
"color": "#6bb0fe",
"name": "bmi",
"data": []
}]
},
}, {
title: '肌肉',
key: 'muscle',
showCon: false,
Line: {
"categories": [],
"series": [{
"color": "#ff9f40",
"name": "肌肉率",
"data": []
}]
},
},
{
title: '脂肪',
key: 'fat_r',
showCon: false,
Line: {
"categories": [],
"series": [{
"color": "#3fcba7",
"name": "脂肪率",
"data": []
}]
},
}
],
};
}
}
</script>
<style lang="scss" scoped>
.TrendTime {
background: #fff;
padding: 10px;
margin-bottom: 15px;
border-radius: 10px;
}
.TrendTime {
background: #fff;
padding: 10px;
margin-bottom: 15px;
border-radius: 10px;
}
.listC {
margin: 10px;
}
.listC {
margin: 10px;
}
.boxList {
background-color: #fff;
border-radius: 10px;
.boxList {
background-color: #fff;
border-radius: 10px;
.list {
margin: 10px;
}
.list {
margin: 10px;
}
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

@ -1,83 +1,98 @@
import model from "../tools/model.js"
import tools from '@/tools/tools.js'
import config from '@/config.js'
// Action 包含异步操作请求API方法、回调函数提交mutaions更改state数据状态使之可以异步
export default {
// 用户信息
getUserInfo({
commit
},
account) {
return model.getUserInfo(account).then(res => {
commit('changeUser', res.data)
if (!res.data.height || !res.data.mage || !res.data.birthday) {
uni.redirectTo({
url: `/pageTwo/login/userinfo`
})
return
}
});
// 用户信息
getUserInfo({
commit
},
// 获取称重结果
getResult({
commit
}, account) {
return model.getResult(account).then((res) => {
console.log("报告", res)
if (res.code == 0) {
commit('changeMeasureResult', res.data)
} else {
commit('changeMeasureResult', null)
}
return res.data
account) {
return model.getUserInfo(account).then(res => {
commit('changeUser', res.data)
if (!res.data.height || !res.data.mage || !res.data.birthday) {
uni.redirectTo({
url: `/pageTwo/login/userinfo`
})
},
// 获取历史记录
gethistoryList({
commit
}, account) {
return model.getHistoryList(account).then((res) => {
if (res.data && res.data.items) {
commit('changehistoryList', res.data.items)
} else {
commit('changehistoryList', null)
}
return res
})
},
//趋势
GetBodyTrendList({
commit
}, account) {
return model.GetBodyTrendList(account).then((res) => {
if (res) {
commit('changeTrend', res.cidata)
}
return res
})
},
// 更新家庭成员
getFamilyList({
commit
}) {
return model.getFamilyList({
pagenum: 20,
pagesize: 1
}).then((res) => {
commit('changeFamilay', res)
return res
})
},
// 获取历史记录
gethistoryList({
commit
}, account) {
return model.getHistoryList(account).then((res) => {
if (res.data && res.data.rows) {
commit('changehistoryList', res.data.rows)
} else {
commit('changehistoryList', null)
}
return res
})
},
return
}
});
},
// 获取称重结果
getResult({
commit
}, account) {
return model.getResult(account).then((res) => {
console.log("报告", res)
if (res.code == 0) {
commit('changeMeasureResult', res.data)
} else {
commit('changeMeasureResult', null)
}
return res.data
})
},
// 获取历史记录
gethistoryList({
commit
}, account) {
return model.getHistoryList(account).then((res) => {
if (res.data && res.data.items) {
commit('changehistoryList', res.data.items)
} else {
commit('changehistoryList', null)
}
return res
})
},
//趋势
GetBodyTrendList({
commit
}, account) {
return model.GetBodyTrendList(account).then((res) => {
if (res) {
commit('changeTrend', res.cidata)
}
return res
})
},
// 更新家庭成员
getFamilyList({
commit
}) {
return model.getFamilyList({
pagenum: 20,
pagesize: 1
}).then((res) => {
commit('changeFamilay', res)
return res
})
},
// 获取历史记录
gethistoryList({
commit
}, account) {
return model.getHistoryList(account).then((res) => {
if (res.data && res.data.rows) {
commit('changehistoryList', res.data.rows)
} else {
commit('changehistoryList', null)
}
return res
})
},
// 配置详情
getConfig({
commit
}, account) {
account.appid = config.appid
return model.getConfig(account).then((res) => {
console.log("配置详情", res)
if (res.code == 0) {
commit("changeConfig", res.data)
commit("toggleColor", res.data.themecolor)
}
})
}
}

View File

@ -3,130 +3,139 @@ import Vuex from 'vuex'
import actions from './actions.js'
Vue.use(Vuex)
export default new Vuex.Store({
// state: 存储基本数据
state: {
user: {
headimg: null,
name: "",
nickname: "",
targetweight: 0, //目标体重
firstweight: 0, //初始体重
weight: 0,
birthday: "",
height: 0,
age: "0",
sex: 0,
familyid: 0,
mage: "",
firstresulttime: ""
},
MeasureResult: {},
isedit: false,
isDrawe: false,
isConnected: false,
isBluetoothTyle: false,
familayList: [],
historyList: [],
Banner: [],
Trend: {},
TrendPk: {},
isTarget: false,
isFirst: false,
isRecord: false,
isLogin: false,
isLogout: true,
// state: 存储基本数据
state: {
user: {
headimg: null,
name: "",
nickname: "",
targetweight: 0, //目标体重
firstweight: 0, //初始体重
weight: 0,
birthday: "",
height: 0,
age: "0",
sex: 0,
familyid: 0,
mage: "",
firstresulttime: ""
},
MeasureResult: {},
isedit: false,
isDrawe: false,
isConnected: false,
isBluetoothTyle: false,
configBox: {},
familayList: [],
historyList: [],
Banner: [],
Trend: {},
TrendPk: {},
isTarget: false,
isFirst: false,
isRecord: false,
isLogin: false,
isLogout: true,
appTheme: '#00c6c6',
},
// mutations: Store中更改state数据状态的唯一方法(必须是同步函数)
mutations: {
toggleColor(state, color) { //你可以传入一个颜色参数(需要上面公共css中含有,如果不传入默认为粉色)
state.appTheme = color
},
/* 用户信息 */
changeUser(state, newData) {
if (newData.familyid) {
uni.setStorageSync('familyid', newData.familyid);
}
Object.assign(state.user, newData)
},
//登录弹框
changeUserLogin(state, newData) {
state.isLogin = newData
},
//历史记录
changehistoryList(state, newData) {
state.historyList = newData
},
// 获取称重数据
changeMeasureResult(state, newData) {
state.MeasureResult = newData
},
// 信息弹框
changeEdit(state, newData) {
state.isedit = newData
},
// 目标体重
changeTarget(state, newData) {
state.isTarget = newData
},
// 初始体重
changeFirst(state, newData) {
state.isFirst = newData
},
// 手动记录
changeRecord(state, newData) {
state.isRecord = newData
},
// 左侧菜单弹框
changeDrawe(state, newData) {
state.isDrawe = newData
},
//获取家庭成员
changeFamilay(state, newData) {
state.familayList = newData
},
//蓝牙状态
changeBluetooth(state, newData) {
state.isBluetoothTyle = newData
},
// 蓝牙连接状态
changeConnected(state, newData) {
state.isConnected = newData
},
//趋势
changeTrend(state, newData) {
state.Trend = newData
},
//对比
changeTrendPk(state, newData) {
state.TrendPk = newData
},
// banner
changeBanner(state, newData) {
state.Banner = newData
},
//配置详情
changeConfig(state, newData) {
state.configBox = newData
},
// 退出登录
changeLogout(state, newData) {
if (newData == false) {
state.user = {
headimg: null,
nickname: "",
name: "",
targetweight: 0, //目标体重
firstweight: 0, //初始体重
weight: 0,
birthday: "",
height: 0,
age: 0,
sex: 0,
familyid: 0,
firstresulttime: ""
}
state.Trend = null
state.historyList = null
state.devTypeList = null
}
state.isLogout = newData
},
// mutations: Store中更改state数据状态的唯一方法(必须是同步函数)
mutations: {
/* 用户信息 */
changeUser(state, newData) {
if (newData.familyid) {
uni.setStorageSync('familyid', newData.familyid);
}
Object.assign(state.user, newData)
},
//登录弹框
changeUserLogin(state, newData) {
state.isLogin = newData
},
//历史记录
changehistoryList(state, newData) {
state.historyList = newData
},
// 获取称重数据
changeMeasureResult(state, newData) {
state.MeasureResult = newData
},
// 信息弹框
changeEdit(state, newData) {
state.isedit = newData
},
// 目标体重
changeTarget(state, newData) {
state.isTarget = newData
},
// 初始体重
changeFirst(state, newData) {
state.isFirst = newData
},
// 手动记录
changeRecord(state, newData) {
state.isRecord = newData
},
// 左侧菜单弹框
changeDrawe(state, newData) {
state.isDrawe = newData
},
//获取家庭成员
changeFamilay(state, newData) {
state.familayList = newData
},
//蓝牙状态
changeBluetooth(state, newData) {
state.isBluetoothTyle = newData
},
// 蓝牙连接状态
changeConnected(state, newData) {
state.isConnected = newData
},
//趋势
changeTrend(state, newData) {
state.Trend = newData
},
//对比
changeTrendPk(state, newData) {
state.TrendPk = newData
},
// banner
changeBanner(state, newData) {
state.Banner = newData
},
// 退出登录
changeLogout(state, newData) {
if (newData == false) {
state.user = {
headimg: null,
nickname: "",
name: "",
targetweight: 0, //目标体重
firstweight: 0, //初始体重
weight: 0,
birthday: "",
height: 0,
age: 0,
sex: 0,
familyid: 0,
firstresulttime: ""
}
state.Trend = null
state.historyList = null
state.devTypeList = null
}
state.isLogout = newData
},
},
// 模块化vuex
modules: {},
actions
},
// 模块化vuex
modules: {},
actions
})

View File

@ -1,296 +1,296 @@
let data = [{
title: '体重',
showCon: false,
key: 'weight',
dw: 'kg',
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
color: "#ff4239",
desc: "反映和衡量一个人健康状况的重要标志之一",
},
{
title: 'BMI',
color: "#ff4239",
showCon: false,
key: 'bmi',
level: "bmilevel",
dw: '',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
desc: 'BMI是身体质量指数,是目前国际上常用的衡量人体胖瘦程度以及是否健康的一个标准。',
}, {
title: '脂肪率',
showCon: false,
color: "#ff4239",
key: 'fat_r',
level: "fat_rlevel",
dw: '%',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
desc: '体脂率是指身体成分中,脂肪组织所占的比率。测量体脂率比单纯的只测量体重更能反映我们身体的脂肪水平(肥胖程度)。',
},
//
{
title: '脂肪量',
key: 'fat_w',
color: "#ff4239",
scope: '',
showCon: false,
level: "fat_wlevel",
dw: 'kg',
leftval: 0,
desc: '人体脂肪的重量',
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
},
{
title: '肌肉率',
key: 'muscle',
showCon: false,
color: "#ff4239",
level: "musclelevel",
dw: '%',
slist: [],
leftval: 0,
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
desc: '根据人体肌肉总量和人体体重、身高等相结合得到的人体的一个比例值,这个值的范围决定一个人的身体健康状况以及力量的多少。',
},
{
title: '肌肉量',
color: "#ff4239",
key: 'muscleval',
level: "musclelevel",
showCon: false,
dw: 'kg',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
desc: '肌肉量=实际体重*肌肉率',
},
{
title: '水分',
key: 'water',
color: "#ff4239",
level: "waterlevel",
showCon: false,
dw: '%',
desc: '指人体内水分比例。',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
},
{
title: '蛋白量',
color: "#ff4239",
level: "proteinlevel",
key: 'proteinval',
showCon: false,
dw: 'kg',
desc: '蛋白量=实际体重*蛋白率',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
},
{
title: '骨重',
color: "#ff4239",
key: 'bone',
showCon: false,
level: "bonelevel",
dw: '',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
desc: '单位体积内,骨组织、骨矿物质(钙、磷等)和骨基质(骨胶原、蛋白率、无机盐等等)]含量,骨量代表它们骨骼健康的情况。',
},
{
title: '蛋白率',
color: "#ff4239",
key: 'protein',
level: "proteinlevel",
showCon: false,
dw: '%',
desc: '人体内蛋白率含量。',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
},
{
title: '基础代谢',
key: 'kcal',
color: "#ff4239",
level: "kcallevel",
showCon: false,
dw: 'kcal',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
desc: '指人体在清醒而又极端安静的状态下,不受肌肉活动、环境温度、食物及精神紧张等影响时的能量代谢率',
},
//
title: '体重',
showCon: false,
key: 'weight',
dw: 'kg',
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
color: "#ff4239",
desc: "反映和衡量一个人健康状况的重要标志之一",
},
{
title: 'BMI',
color: "#ff4239",
showCon: false,
key: 'bmi',
level: "bmilevel",
dw: '',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
desc: 'BMI是身体质量指数,是目前国际上常用的衡量人体胖瘦程度以及是否健康的一个标准。',
}, {
title: '脂肪率',
showCon: false,
color: "#ff4239",
key: 'fat_r',
level: "fat_rlevel",
dw: '%',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
desc: '体脂率是指身体成分中,脂肪组织所占的比率。测量体脂率比单纯的只测量体重更能反映我们身体的脂肪水平(肥胖程度)。',
},
//
{
title: '脂肪量',
key: 'fat_w',
color: "#ff4239",
scope: '',
showCon: false,
level: "fat_wlevel",
dw: 'kg',
leftval: 0,
desc: '人体脂肪的重量',
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
},
{
title: '肌肉率',
key: 'muscle',
showCon: false,
color: "#ff4239",
level: "musclelevel",
dw: '%',
slist: [],
leftval: 0,
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
desc: '根据人体肌肉总量和人体体重、身高等相结合得到的人体的一个比例值,这个值的范围决定一个人的身体健康状况以及力量的多少。',
},
{
title: '肌肉量',
color: "#ff4239",
key: 'muscleval',
level: "musclelevel",
showCon: false,
dw: 'kg',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
desc: '肌肉量=实际体重*肌肉率',
},
{
title: '水分',
key: 'water',
color: "#ff4239",
level: "waterlevel",
showCon: false,
dw: '%',
desc: '指人体内水分比例。',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
},
{
title: '蛋白量',
color: "#ff4239",
level: "proteinlevel",
key: 'proteinval',
showCon: false,
dw: 'kg',
desc: '蛋白量=实际体重*蛋白率',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
},
{
title: '骨重',
color: "#ff4239",
key: 'bone',
showCon: false,
level: "bonelevel",
dw: '',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
desc: '单位体积内,骨组织、骨矿物质(钙、磷等)和骨基质(骨胶原、蛋白率、无机盐等等)]含量,骨量代表它们骨骼健康的情况。',
},
{
title: '蛋白率',
color: "#ff4239",
key: 'protein',
level: "proteinlevel",
showCon: false,
dw: '%',
desc: '人体内蛋白率含量。',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
},
{
title: '基础代谢',
key: 'kcal',
color: "#ff4239",
level: "kcallevel",
showCon: false,
dw: 'kcal',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
desc: '指人体在清醒而又极端安静的状态下,不受肌肉活动、环境温度、食物及精神紧张等影响时的能量代谢率',
},
//
{
title: '内脏指数',
color: "#ff4239",
key: 'visceral',
showCon: false,
level: "viscerallevel",
dw: '',
desc: '内脏脂肪指数',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
},
{
title: '皮下脂肪',
key: 'sfr',
color: "#ff4239",
showCon: false,
level: "sfrlevel",
dw: '%',
desc: '皮下脂脂肪就是贮存于皮下的脂肪组织人体的脂肪大约有2/3贮存在皮下组织',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
},
{
title: '肥胖等级',
key: 'fatlevel',
level: "fatlevel",
showCon: false,
leftval: 0,
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
desc: '肥胖的程度,表现实际体重与理想体重的差距。肥胖等级是判定肥胖症的一个指标。',
},
//
{
title: '去脂体重',
key: 'lbm',
showCon: false,
dw: 'kg',
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
},
{
title: '体龄',
key: 'bodyage',
showCon: false,
dw: '岁',
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
},
{
title: '体型',
key: 'body',
level: "bodylevel",
showCon: false,
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
},
{
title: '内脏指数',
color: "#ff4239",
key: 'visceral',
showCon: false,
level: "viscerallevel",
dw: '',
desc: '内脏脂肪指数',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
},
{
title: '皮下脂肪',
key: 'sfr',
color: "#ff4239",
showCon: false,
level: "sfrlevel",
dw: '%',
desc: '皮下脂脂肪就是贮存于皮下的脂肪组织人体的脂肪大约有2/3贮存在皮下组织',
slist: [],
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
},
{
title: '肥胖等级',
key: 'fatlevel',
level: "fatlevel",
showCon: false,
leftval: 0,
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
desc: '肥胖的程度,表现实际体重与理想体重的差距。肥胖等级是判定肥胖症的一个指标。',
},
//
{
title: '去脂体重',
key: 'lbm',
showCon: false,
dw: 'kg',
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
},
{
title: '体龄',
key: 'bodyage',
showCon: false,
dw: '岁',
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
},
{
title: '体型',
key: 'body',
level: "bodylevel",
showCon: false,
fvalue: null,
svalue: null,
fevaluation: null,
sevaluation: null,
vs: 0,
num: 0,
},
]
function infoList(str) {
let listStr = [...data];
let leftval = 0
if (!str) return
for (var i = 0; i < listStr.length; i++) {
listStr[i].fvalue = str[listStr[i].key];
listStr[i].fevaluation = str[listStr[i].level];
if (str.list && str.list.length) {
for (var k = 0; k < str.list.length; k++) {
if (listStr[i].key == str.list[k].name) {
listStr[i].slist = str.list[k].list
listStr[i].color = str.list[k].color
listStr[i].fvalue = str.list[k].value
listStr[i].fevaluation = str.list[k].level
}
}
for (let j in listStr[i].slist) {
if (listStr[i].fevaluation == listStr[i].slist[j].text) {
listStr[i].leftval = (listStr[i].fvalue - listStr[i].slist[j].minvalue) / (listStr[i].slist[j]
.maxvalue - listStr[i].slist[j].minvalue) * 4.2
}
}
} else {
listStr[i].slist = null
let listStr = [...data];
let leftval = 0
if (!str) return
for (var i = 0; i < listStr.length; i++) {
listStr[i].fvalue = str[listStr[i].key];
listStr[i].fevaluation = str[listStr[i].level];
if (str.list && str.list.length) {
for (var k = 0; k < str.list.length; k++) {
if (listStr[i].key == str.list[k].name) {
listStr[i].slist = str.list[k].list
listStr[i].color = str.list[k].color
listStr[i].fvalue = str.list[k].value
listStr[i].fevaluation = str.list[k].level
}
}
for (let j in listStr[i].slist) {
if (listStr[i].fevaluation == listStr[i].slist[j].text) {
listStr[i].leftval = (listStr[i].fvalue - listStr[i].slist[j].minvalue) / (listStr[i].slist[j]
.maxvalue - listStr[i].slist[j].minvalue) * 4.2
}
}
} else {
listStr[i].slist = null
}
return listStr
}
return listStr
}
export default {
data,
infoList,
data,
infoList,
}

View File

@ -30,6 +30,11 @@ export default {
return res
})
},
getConfig(param) { // 配置详情
return http.post("/api/wxopen/config/get", param).then(res => {
return res
})
},
getoutlogin(param) { // 退出登录
return http.get("/api/wxopen/outlogin", param).then(res => {
return res
@ -45,6 +50,7 @@ export default {
return http.post("/api/adult/info", param).then(res => {
if (res.code == 0) {
res.data.name = res.data.nickname
res.data.id = res.data.familyid
// res.data.firstresulttime = res.data.firstresulttime.substring(0, 10)
}
return res

View File

@ -1,296 +1,303 @@
import $store from '@/store'
export default {
msg,
str2hex,
hex2str,
ab2hex,
inArray,
getAge,
getTime,
getDate,
getMonth,
GetDateStr,
handlePages,
getBluetoothAdapter
msg,
str2hex,
hex2str,
ab2hex,
inArray,
getAge,
getTime,
getDate,
getMonth,
GetDateStr,
handlePages,
getBluetoothAdapter
}
function inArray(arr, key, val) {
if (!arr || !arr.length || typeof arr != 'object' || !Array.isArray(arr)) {
return -1
}
for (let i = 0; i < arr.length; i++) {
if (!key) {
if (arr[i] == val) {
return i
}
} else if (arr[i][key] === val) {
return i
}
}
return -1;
if (!arr || !arr.length || typeof arr != 'object' || !Array.isArray(arr)) {
return -1
}
for (let i = 0; i < arr.length; i++) {
if (!key) {
if (arr[i] == val) {
return i
}
} else if (arr[i][key] === val) {
return i
}
}
return -1;
}
function msg(str) {
uni.showToast({
title: str,
icon: 'none'
})
uni.showToast({
title: str,
icon: 'none'
})
}
function ab2hex(buffer, split) {
var hexArr = Array.prototype.map.call(
new Uint8Array(buffer),
function(bit) {
return ('00' + bit.toString(16)).slice(-2)
}
)
return hexArr.join(split);
var hexArr = Array.prototype.map.call(
new Uint8Array(buffer),
function(bit) {
return ('00' + bit.toString(16)).slice(-2)
}
)
return hexArr.join(split);
}
function hex2str(arr) {
let decoder = new TextDecoder('utf8')
let uint8 = new Uint8Array(arr)
let res = decoder.decode(uint8)
return res
let decoder = new TextDecoder('utf8')
let uint8 = new Uint8Array(arr)
let res = decoder.decode(uint8)
return res
}
function str2hex(str) {
let encoder = new TextEncoder('utf8')
return encoder.encode(str)
let encoder = new TextEncoder('utf8')
return encoder.encode(str)
}
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,
})
}
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 getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
month = month > 9 ? month : '0' + month;;
day = day > 9 ? day : '0' + day;
if (type === 'tow') {
year = year - 2;
return `${year}-${month}-${day}`;
}
if (type === 'start') {
year = year;
return `${year}-${month}-${day}`;
}
if (type === 'end') {
year = year + 60;
return `${year}-${month}-${day}`;
}
if (type == "m") {
if (month == "01" || month == "03" || month == "05" || month == "07" || month == "08" || month == "10" ||
month == "12") {
return year + "/" + month + "/01" + "~" + year + "/" + month + "/31";
} else if (month == "02") {
if ((year % 4 == 0 && year % 100 != 0) || (year % 100 == 0 && year % 400 == 0)) {
return year + "/" + month + "/01" + "~" + year + "/" + month + "/29";
} else {
return year + "/" + month + "/01" + "~" + year + "/" + month + "/28";
};
} else {
return year + "/" + month + "/01" + "~" + year + "/" + month + "/30";
};
}
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
month = month > 9 ? month : '0' + month;;
day = day > 9 ? day : '0' + day;
if (type === 'tow') {
year = year - 2;
return `${year}-${month}-${day}`;
}
if (type === 'start') {
year = year;
return `${year}-${month}-${day}`;
}
if (type === 'end') {
year = year + 60;
return `${year}-${month}-${day}`;
}
if (type == "m") {
if (month == "01" || month == "03" || month == "05" || month == "07" || month == "08" || month == "10" ||
month == "12") {
return year + "/" + month + "/01" + "~" + year + "/" + month + "/31";
} else if (month == "02") {
if ((year % 4 == 0 && year % 100 != 0) || (year % 100 == 0 && year % 400 == 0)) {
return year + "/" + month + "/01" + "~" + year + "/" + month + "/29";
} else {
return year + "/" + month + "/01" + "~" + year + "/" + month + "/28";
};
} else {
return year + "/" + month + "/01" + "~" + year + "/" + month + "/30";
};
}
}
function GetDateStr(AddDayCount) {
var dd = new Date();
dd.setDate(dd.getDate() + AddDayCount); //获取AddDayCount天后的日期
var y = dd.getFullYear();
var m = (dd.getMonth() + 1) < 10 ? "0" + (dd.getMonth() + 1) : (dd.getMonth() + 1); //获取当前月份的日期不足10补0
var d = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate(); //获取当前几号不足10补0
return y + "-" + m + "-" + d;
var dd = new Date();
dd.setDate(dd.getDate() + AddDayCount); //获取AddDayCount天后的日期
var y = dd.getFullYear();
var m = (dd.getMonth() + 1) < 10 ? "0" + (dd.getMonth() + 1) : (dd.getMonth() + 1); //获取当前月份的日期不足10补0
var d = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate(); //获取当前几号不足10补0
return y + "-" + m + "-" + d;
}
// 获取当前日期
function getTime() {
var date = new Date()
var todate =
((date.getMonth() + 1) < 10 ? ('0' + (date.getMonth() + 1)) : date.getMonth() +
1) + '月' + (date.getDate() < 10 ? ('0' + date.getDate()) : date.getDate() + '日')
return todate
var date = new Date()
var todate =
((date.getMonth() + 1) < 10 ? ('0' + (date.getMonth() + 1)) : date.getMonth() +
1) + '月' + (date.getDate() < 10 ? ('0' + date.getDate()) : date.getDate() + '日')
return todate
}
// 根据出生日期获取年龄
function getAge(str) {
var r = str.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})/);
if (r == null) return false;
var r = str.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})/);
if (r == null) return false;
var d = new Date(r[1], r[3] - 1, r[4]);
var returnStr = "输入的日期格式错误!";
var d = new Date(r[1], r[3] - 1, r[4]);
var returnStr = "输入的日期格式错误!";
if (d.getFullYear() == r[1] && (d.getMonth() + 1) == r[3] && d.getDate() == r[4]) {
if (d.getFullYear() == r[1] && (d.getMonth() + 1) == r[3] && d.getDate() == r[4]) {
var date = new Date();
var yearNow = date.getFullYear();
var monthNow = date.getMonth() + 1;
var dayNow = date.getDate();
var date = new Date();
var yearNow = date.getFullYear();
var monthNow = date.getMonth() + 1;
var dayNow = date.getDate();
var largeMonths = [1, 3, 5, 7, 8, 10, 12], //大月, 用于计算天,只在年月都为零时,天数有效
lastMonth = monthNow - 1 > 0 ? monthNow - 1 : 12, // 上一个月的月份
isLeapYear = false, // 是否是闰年
daysOFMonth = 0; // 当前日期的上一个月多少天
var largeMonths = [1, 3, 5, 7, 8, 10, 12], //大月, 用于计算天,只在年月都为零时,天数有效
lastMonth = monthNow - 1 > 0 ? monthNow - 1 : 12, // 上一个月的月份
isLeapYear = false, // 是否是闰年
daysOFMonth = 0; // 当前日期的上一个月多少天
if ((yearNow % 4 === 0 && yearNow % 100 !== 0) || yearNow % 400 === 0) { // 是否闰年, 用于计算天,只在年月都为零时,天数有效
isLeapYear = true;
}
if ((yearNow % 4 === 0 && yearNow % 100 !== 0) || yearNow % 400 === 0) { // 是否闰年, 用于计算天,只在年月都为零时,天数有效
isLeapYear = true;
}
if (largeMonths.indexOf(lastMonth) > -1) {
daysOFMonth = 31;
} else if (lastMonth === 2) {
if (isLeapYear) {
daysOFMonth = 29;
} else {
daysOFMonth = 28;
}
} else {
daysOFMonth = 30;
}
if (largeMonths.indexOf(lastMonth) > -1) {
daysOFMonth = 31;
} else if (lastMonth === 2) {
if (isLeapYear) {
daysOFMonth = 29;
} else {
daysOFMonth = 28;
}
} else {
daysOFMonth = 30;
}
var Y = yearNow - parseInt(r[1]);
var M = monthNow - parseInt(r[3]);
var D = dayNow - parseInt(r[4]);
if (D < 0) {
D = D + daysOFMonth; //借一个月
M--;
}
if (M < 0) { // 借一年 12个月
Y--;
M = M + 12; //
}
var Y = yearNow - parseInt(r[1]);
var M = monthNow - parseInt(r[3]);
var D = dayNow - parseInt(r[4]);
if (D < 0) {
D = D + daysOFMonth; //借一个月
M--;
}
if (M < 0) { // 借一年 12个月
Y--;
M = M + 12; //
}
if (Y < 0) {
returnStr = "出生日期有误!";
if (Y < 0) {
returnStr = "出生日期有误!";
} else if (Y === 0) {
if (M === 0) {
returnStr = D + "天";
} else {
returnStr = M + "个月";
}
} else {
if (M === 0) {
returnStr = Y + "岁";
} else {
returnStr = Y + "岁" + M + "个月";
}
}
}
return returnStr;
} else if (Y === 0) {
if (M === 0) {
returnStr = D + "天";
} else {
returnStr = M + "个月";
}
} else {
if (M === 0) {
returnStr = Y + "岁";
} else {
returnStr = Y + "岁" + M + "个月";
}
}
}
return returnStr;
}
function getMonth(dates, months) {
var d = new Date(dates.substring(0, 10));
let year = d.getFullYear();
var month = d.getMonth() + 1;
if (Math.abs(months) > 12) {
months = months % 12;
};
if (months != 0) {
if (month + months > 12) {
year++;
month = (month + months) % 12;
} else if (month + months < 1) {
year--;
month = 12 + month + months;
} else {
month = month + months;
};
};
month = month < 10 ? "0" + month : month;
var date = d.getDate();
if (month == "01" || month == "03" || month == "05" || month == "07" || month == "08" || month == "10" ||
month == "12") {
return year + "/" + month + "/01" + "~" + year + "/" + month + "/31";
} else if (month == "02") {
if ((year % 4 == 0 && year % 100 != 0) || (year % 100 == 0 && year % 400 == 0)) {
return year + '/' + month + "/01" + "~" + year + "/" + year + "/" + month + "/29";
} else {
return year + '/' + month + "/01" + "~" + year + "/" + month + "/28";
};
} else {
return year + '/' + month + "/01" + "~" + year + "/" + month + "/30";
};
var d = new Date(dates.substring(0, 10));
let year = d.getFullYear();
var month = d.getMonth() + 1;
if (Math.abs(months) > 12) {
months = months % 12;
};
if (months != 0) {
if (month + months > 12) {
year++;
month = (month + months) % 12;
} else if (month + months < 1) {
year--;
month = 12 + month + months;
} else {
month = month + months;
};
};
month = month < 10 ? "0" + month : month;
var date = d.getDate();
if (month == "01" || month == "03" || month == "05" || month == "07" || month == "08" || month == "10" ||
month == "12") {
return year + "/" + month + "/01" + "~" + year + "/" + month + "/31";
} else if (month == "02") {
if ((year % 4 == 0 && year % 100 != 0) || (year % 100 == 0 && year % 400 == 0)) {
return year + '/' + month + "/01" + "~" + year + "/" + year + "/" + month + "/29";
} else {
return year + '/' + month + "/01" + "~" + year + "/" + month + "/28";
};
} else {
return year + '/' + month + "/01" + "~" + year + "/" + month + "/30";
};
};
// 页面跳转
function handlePages(type, deviceId) {
if (type == 1) {
uni.redirectTo({
url: "/BLEPages/adult/PCD01pro?deviceId=" + deviceId
})
return
}
if (type == 4 || type == 16) {
uni.redirectTo({
url: "/BLEPages/adult/PCL01?deviceId=" + deviceId
})
return
}
if (type == 8) {
uni.redirectTo({
url: "/BLEPages/adult/H01pro?deviceId=" + deviceId
})
return
}
if (type == 14) {
uni.redirectTo({
url: "/BLEPages/adult/F01B?deviceId=" + deviceId
})
return
}
if (type == 21) {
uni.redirectTo({
url: "/BLEPages/adult/H09B?deviceId=" + deviceId
})
return
}
if (type == 1) {
uni.redirectTo({
url: "/BLEPages/adult/PCD01pro?deviceId=" + deviceId
})
return
}
if (type == 4 || type == 16) {
uni.redirectTo({
url: "/BLEPages/adult/PCL01?deviceId=" + deviceId
})
return
}
if (type == 7) {
uni.redirectTo({
url: "/BLEPages/adult/F01PRO?deviceId=" + deviceId
})
return
}
if (type == 8) {
uni.redirectTo({
url: "/BLEPages/adult/H01pro?deviceId=" + deviceId
})
return
}
if (type == 14) {
uni.redirectTo({
url: "/BLEPages/adult/F01B?deviceId=" + deviceId
})
return
}
if (type == 21) {
uni.redirectTo({
url: "/BLEPages/adult/H09B?deviceId=" + deviceId
})
return
}
}

View File

@ -74,8 +74,7 @@ $uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:36rpx;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:30rpx;
// 自定义
$mainColor:linear-gradient(-180deg,#95E0DB,#75DAD0 80%,);
$mainColor:#00c6c6;
// 自定义/* $mainColor:#1d2088;*/
$mainColor:#00c6c6;
$btncolor:#FCA82D;
$greencolor:#00c6c6

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,34 +1,34 @@
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["BLEPages/adult/F01B"],{
/***/ 187:
/*!*******************************************************************************!*\
!*** E:/qiaocongli/adultDeviceApp/main.js?{"page":"BLEPages%2Fadult%2FF01B"} ***!
\*******************************************************************************/
/***/ 180:
/*!**************************************************************************************************!*\
!*** D:/MyWork/mywork////adultDeviceApp/main.js?{"page":"BLEPages%2Fadult%2FF01B"} ***!
\**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(createPage) {__webpack_require__(/*! uni-pages */ 5);
var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 3));
var _F01B = _interopRequireDefault(__webpack_require__(/*! ./BLEPages/adult/F01B.vue */ 188));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;
var _F01B = _interopRequireDefault(__webpack_require__(/*! ./BLEPages/adult/F01B.vue */ 181));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;
createPage(_F01B.default);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["createPage"]))
/***/ }),
/***/ 188:
/*!************************************************************!*\
!*** E:/qiaocongli/adultDeviceApp/BLEPages/adult/F01B.vue ***!
\************************************************************/
/***/ 181:
/*!*******************************************************************************!*\
!*** D:/MyWork/mywork////adultDeviceApp/BLEPages/adult/F01B.vue ***!
\*******************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _F01B_vue_vue_type_template_id_904b3610_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./F01B.vue?vue&type=template&id=904b3610&scoped=true& */ 189);
/* harmony import */ var _F01B_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./F01B.vue?vue&type=script&lang=js& */ 191);
/* harmony import */ var _F01B_vue_vue_type_template_id_904b3610_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./F01B.vue?vue&type=template&id=904b3610&scoped=true& */ 182);
/* harmony import */ var _F01B_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./F01B.vue?vue&type=script&lang=js& */ 184);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _F01B_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _F01B_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 9);
/* harmony import */ var _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 10);
var renderjs
@ -37,7 +37,7 @@ var renderjs
/* normalize component */
var component = Object(_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
var component = Object(_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
_F01B_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
_F01B_vue_vue_type_template_id_904b3610_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"],
_F01B_vue_vue_type_template_id_904b3610_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
@ -55,32 +55,32 @@ component.options.__file = "BLEPages/adult/F01B.vue"
/***/ }),
/***/ 189:
/*!*******************************************************************************************************!*\
!*** E:/qiaocongli/adultDeviceApp/BLEPages/adult/F01B.vue?vue&type=template&id=904b3610&scoped=true& ***!
\*******************************************************************************************************/
/***/ 182:
/*!**************************************************************************************************************************!*\
!*** D:/MyWork/mywork////adultDeviceApp/BLEPages/adult/F01B.vue?vue&type=template&id=904b3610&scoped=true& ***!
\**************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_template_id_904b3610_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./F01B.vue?vue&type=template&id=904b3610&scoped=true& */ 190);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_template_id_904b3610_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"]; });
/* harmony import */ var _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_template_id_904b3610_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./F01B.vue?vue&type=template&id=904b3610&scoped=true& */ 183);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_template_id_904b3610_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_template_id_904b3610_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_template_id_904b3610_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_template_id_904b3610_scoped_true___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_template_id_904b3610_scoped_true___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_template_id_904b3610_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_template_id_904b3610_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"]; });
/***/ }),
/***/ 190:
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!E:/qiaocongli/adultDeviceApp/BLEPages/adult/F01B.vue?vue&type=template&id=904b3610&scoped=true& ***!
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/***/ 183:
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/MyWork/mywork////adultDeviceApp/BLEPages/adult/F01B.vue?vue&type=template&id=904b3610&scoped=true& ***!
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
@ -104,26 +104,26 @@ render._withStripped = true
/***/ }),
/***/ 191:
/*!*************************************************************************************!*\
!*** E:/qiaocongli/adultDeviceApp/BLEPages/adult/F01B.vue?vue&type=script&lang=js& ***!
\*************************************************************************************/
/***/ 184:
/*!********************************************************************************************************!*\
!*** D:/MyWork/mywork////adultDeviceApp/BLEPages/adult/F01B.vue?vue&type=script&lang=js& ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./F01B.vue?vue&type=script&lang=js& */ 192);
/* harmony import */ var _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony default export */ __webpack_exports__["default"] = (_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
/* harmony import */ var _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./F01B.vue?vue&type=script&lang=js& */ 185);
/* harmony import */ var _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony default export */ __webpack_exports__["default"] = (_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01B_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
/***/ }),
/***/ 192:
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!E:/qiaocongli/adultDeviceApp/BLEPages/adult/F01B.vue?vue&type=script&lang=js& ***!
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/***/ 185:
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/MyWork/mywork////adultDeviceApp/BLEPages/adult/F01B.vue?vue&type=script&lang=js& ***!
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
@ -150,7 +150,7 @@ __webpack_require__.r(__webpack_exports__);
var _vuex = __webpack_require__(/*! vuex */ 15);function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}
var _vuex = __webpack_require__(/*! vuex */ 9);function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}
var myTime;var _default =
@ -173,7 +173,7 @@ var myTime;var _default =
};
},
computed: _objectSpread(_objectSpread({},
(0, _vuex.mapState)(["user", "isConnected", "isBluetoothTyle"])), {}, {
(0, _vuex.mapState)(["user", "isConnected", "isBluetoothTyle", "appTheme"])), {}, {
info: function info() {
return this.user;
} }),
@ -190,6 +190,12 @@ var myTime;var _default =
},
onLoad: function onLoad(options) {
var that = this;
// 导航栏颜色
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme });
//
that.text = "";
if (options && options.deviceId) {
that.macAddr = options.deviceId;
@ -263,18 +269,20 @@ var myTime;var _default =
if (!device.name && !device.localName) {
return;
}
if (device.deviceId.indexOf(that.deviceId) != -1) {
that.stopBluetoothDevicesDiscovery();
if (device.name.indexOf('AiLink_') != -1) {
clearTimeout(myTime);
var buff = device.advertisData.slice(-6);
device.mac = new Uint8Array(buff); // 保存广播数据中的mac地址这是由于iOS不直接返回mac地址
var tempMac = Array.from(device.mac);
tempMac.reverse();
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase();
that.macAddr = device.macAddr;
that.deviceId = device.deviceId;
that.createBLEConnection();
return;
if (device.deviceId.indexOf(that.deviceId) != -1 || device.macAddr.indexOf(that.deviceId) != -1) {
that.stopBluetoothDevicesDiscovery();
that.macAddr = device.macAddr;
that.deviceId = device.deviceId;
that.createBLEConnection();
return;
}
}
});
});
@ -376,9 +384,9 @@ var myTime;var _default =
that.uuid1 = item.uuid; //下发数据
} else if (item.uuid.indexOf('0000FFE2') != -1) {
that.uuid2 = item.uuid; //监听数据
that.notifyBLECharacteristicValue();
} else if (item.uuid.indexOf('0000FFE3') != -1) {
that.uuid3 = item.uuid; //写入设置
that.notifyBLECharacteristicValue();
}
}
},
@ -397,7 +405,7 @@ var myTime;var _default =
state: true, // 启用 notify 功能
deviceId: that.deviceId,
serviceId: that.serviceId,
characteristicId: that.uuid3,
characteristicId: that.uuid2,
success: function success(res) {
uni.onBLECharacteristicValueChange(function (res) {
var value = that.$tools.ab2hex(res.value, "");
@ -441,14 +449,14 @@ var myTime;var _default =
}
}
if (type == "11") {
if (typeInfo == "03") {
that.type = 2;
if (typeInfo == "03" || typeInfo == "04") {
that.imp = parseInt(value.substring(17, 22), 16);
}
console.log("体脂:", that.imp);
}
if (type == "14") {//身高模式
that.height = parseInt(value.substring(10, 14), 16) / 10;
that.type = 2;
console.log("身高模式:", that.height);
}
if (type == "30") {
@ -491,7 +499,7 @@ var myTime;var _default =
weight: that.weight,
imp: that.imp,
ecode: that.macAddr,
height: that.height,
height: that.height ? that.height : that.info.height,
familyid: that.info.familyid }).
then(function (res) {
if (res.code == 0) {
@ -502,7 +510,7 @@ var myTime;var _default =
that.$store.dispatch("getResult", {
birthday: that.info.birthday,
familyid: that.info.familyid,
height: that.height,
height: that.height ? that.height : that.info.height,
sex: that.info.sex });
} else {
@ -555,5 +563,5 @@ var myTime;var _default =
/***/ })
},[[187,"common/runtime","common/vendor"]]]);
},[[180,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/BLEPages/adult/F01B.js.map

View File

@ -1,5 +1,6 @@
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F9FAFC",
"usingComponents": {}
}

View File

@ -0,0 +1,604 @@
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["BLEPages/adult/F01PRO"],{
/***/ 186:
/*!****************************************************************************************************!*\
!*** D:/MyWork/mywork////adultDeviceApp/main.js?{"page":"BLEPages%2Fadult%2FF01PRO"} ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(createPage) {__webpack_require__(/*! uni-pages */ 5);
var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 3));
var _F01PRO = _interopRequireDefault(__webpack_require__(/*! ./BLEPages/adult/F01PRO.vue */ 187));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;
createPage(_F01PRO.default);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["createPage"]))
/***/ }),
/***/ 187:
/*!*********************************************************************************!*\
!*** D:/MyWork/mywork////adultDeviceApp/BLEPages/adult/F01PRO.vue ***!
\*********************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _F01PRO_vue_vue_type_template_id_4a952e43_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./F01PRO.vue?vue&type=template&id=4a952e43&scoped=true& */ 188);
/* harmony import */ var _F01PRO_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./F01PRO.vue?vue&type=script&lang=js& */ 190);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _F01PRO_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _F01PRO_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 10);
var renderjs
/* normalize component */
var component = Object(_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
_F01PRO_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
_F01PRO_vue_vue_type_template_id_4a952e43_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"],
_F01PRO_vue_vue_type_template_id_4a952e43_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
false,
null,
"4a952e43",
null,
false,
_F01PRO_vue_vue_type_template_id_4a952e43_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"],
renderjs
)
component.options.__file = "BLEPages/adult/F01PRO.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ 188:
/*!****************************************************************************************************************************!*\
!*** D:/MyWork/mywork////adultDeviceApp/BLEPages/adult/F01PRO.vue?vue&type=template&id=4a952e43&scoped=true& ***!
\****************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01PRO_vue_vue_type_template_id_4a952e43_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./F01PRO.vue?vue&type=template&id=4a952e43&scoped=true& */ 189);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01PRO_vue_vue_type_template_id_4a952e43_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01PRO_vue_vue_type_template_id_4a952e43_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01PRO_vue_vue_type_template_id_4a952e43_scoped_true___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01PRO_vue_vue_type_template_id_4a952e43_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"]; });
/***/ }),
/***/ 189:
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/MyWork/mywork////adultDeviceApp/BLEPages/adult/F01PRO.vue?vue&type=template&id=4a952e43&scoped=true& ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
var components
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
}
var recyclableRender = false
var staticRenderFns = []
render._withStripped = true
/***/ }),
/***/ 190:
/*!**********************************************************************************************************!*\
!*** D:/MyWork/mywork////adultDeviceApp/BLEPages/adult/F01PRO.vue?vue&type=script&lang=js& ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01PRO_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./F01PRO.vue?vue&type=script&lang=js& */ 191);
/* harmony import */ var _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01PRO_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01PRO_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01PRO_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01PRO_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony default export */ __webpack_exports__["default"] = (_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_F01PRO_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
/***/ }),
/***/ 191:
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/MyWork/mywork////adultDeviceApp/BLEPages/adult/F01PRO.vue?vue&type=script&lang=js& ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
var _vuex = __webpack_require__(/*! vuex */ 9);function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}
var myTime;
var plugin = requirePlugin("sdkPlugin").AiLink;var _default =
{
data: function data() {
return {
textW: "",
textH: "",
height: "",
weight: "",
imp: 0,
macAddr: "",
deviceId: "",
serviceId: "",
readId: "",
writeId: "",
notifyId: "",
isSend: true,
Unload: false,
devicesList: [],
isConnection: 0,
data01: {},
data02: {},
BLEResult: {} };
},
computed: _objectSpread(_objectSpread({},
(0, _vuex.mapState)(["user", "isConnected", "isBluetoothTyle", "appTheme"])), {}, {
info: function info() {
return this.user;
} }),
onUnload: function onUnload() {
var that = this;
if (!that.Unload) {
that.stopBluetoothDevicesDiscovery(); //取消蓝牙搜索
clearTimeout(myTime);
that.closeBLEConnection();
that.closeBluetoothAdapter();
console.log("页面返回onUnload");
}
},
watch: {
isConnected: function isConnected() {
var that = this;
if (!that.isConnected) {
that.handleBack();
that.isConnection = 2;
}
},
isBluetoothTyle: function isBluetoothTyle() {
var that = this;
if (!that.isBluetoothTyle) {
that.handleBack();
that.isConnection = 2;
}
} },
onLoad: function onLoad(options) {
var that = this;
// 导航栏颜色
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme });
//
that.textW = "";
that.textH = "";
console.log("options", options);
if (options && options.deviceId) {
that.macAddr = options.deviceId;
that.deviceId = options.deviceId;
that.closeBLEConnection();
that.closeBluetoothAdapter();
that.openBluetoothAdapter();
}
that.onBLEConnectionStateChange();
uni.onBluetoothAdapterStateChange(function (res) {
that.$store.commit("changeBluetooth", res.available);
});
},
methods: {
// 重新连接
openBluetoothAdapter: function openBluetoothAdapter() {
var that = this;
that.isSend = true;
uni.openBluetoothAdapter({
success: function success(e) {
that.isConnection = 0;
that.startBluetoothDeviceDiscovery();
console.log('初始化蓝牙成功:' + e.errMsg);
},
fail: function fail(e) {
that.isConnection = 2;
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!");
} });
},
// 监听蓝牙连接状态
onBLEConnectionStateChange: function onBLEConnectionStateChange() {
var that = this;
uni.onBLEConnectionStateChange(function (res) {
console.log("蓝牙连接状态", JSON.stringify(res));
if (!res.connected) {
that.Unload = true;
that.isConnection = 2;
clearTimeout(myTime);
that.closeBLEConnection();
that.closeBluetoothAdapter();
}
that.$store.commit("changeConnected", res.connected);
});
},
// 开始搜寻附近的蓝牙外围设备
startBluetoothDeviceDiscovery: function startBluetoothDeviceDiscovery() {
var that = this;
uni.startBluetoothDevicesDiscovery({
allowDuplicatesKey: false,
interval: 500, //上报设备的间隔
success: function success(res) {
that.isConnection = 0;
that.onBluetoothDeviceFound();
},
fail: function fail(res) {
that.isConnection = 2;
that.$tools.msg("请确定设备是开机状态、手机蓝牙权限已打开!");
} });
},
/**
* 发现外围设备
*/
onBluetoothDeviceFound: function onBluetoothDeviceFound() {
var that = this;
that.isConnection = 0;
uni.onBluetoothDeviceFound(function (res) {
res.devices.forEach(function (device) {
if (!device.name && !device.localName) {
return;
}
if (device.name.indexOf('AiLink_') != -1) {
clearTimeout(myTime);
var buff = device.advertisData.slice(-6);
device.mac = new Uint8Array(buff); // 保存广播数据中的mac地址这是由于iOS不直接返回mac地址
var 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) {
that.stopBluetoothDevicesDiscovery();
that.deviceId = device.deviceId;
that.macAddr = device.macAddr;
var foundDevices = that.devicesList;
var idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId);
if (idx === -1) {
that.devicesList.push(device);
} else {
that.devicesList[idx] = device;
}
that.createBLEConnection();
return;
}
}
});
});
that.handleMyTime();
},
handleMyTime: function handleMyTime() {
var that = this;
myTime = setTimeout(function () {
if (!that.macAddr) {
clearTimeout(myTime);
that.Unload = true;
that.isConnection = 2;
that.devicesList = [];
that.closeBLEConnection();
that.closeBluetoothAdapter();
}
}, 20000);
},
/**
* 停止搜索蓝牙设备
*/
stopBluetoothDevicesDiscovery: function stopBluetoothDevicesDiscovery() {
uni.stopBluetoothDevicesDiscovery({
success: function success(e) {
console.log("停止搜索蓝牙设备", e);
} });
},
// 连接蓝牙
createBLEConnection: function createBLEConnection() {
var that = this;
uni.createBLEConnection({
deviceId: that.deviceId,
success: function success(res) {
console.log("设备连接成功获取设备的services", res);
that.isConnection = 0;
that.getBLEDeviceServices();
},
fail: function fail(res) {
that.isConnection = 2;
console.log("设备连接失败,请重新连接", res);
} });
},
/**
* 获取设备的UUID
*/
getBLEDeviceServices: function getBLEDeviceServices() {
var serviceList = [];
var that = this;
uni.getBLEDeviceServices({
deviceId: that.deviceId,
success: function success(res) {
console.log("获取设备的UUID成功", res);
serviceList = res.services;
for (var i = 0; i < serviceList.length; i++) {
var service = serviceList[i];
if (service.uuid.indexOf('FFE0') != -1) {
that.serviceId = service.uuid;
that.isConnection = 1;
that.getBLEDeviceCharacteristics(that.deviceId, service.uuid);
console.log("设备的FFE0的serviceId ", that.serviceId);
break;
}
}
},
fail: function fail(res) {
console.log('获取设备的UUID失败:', res);
} });
},
/**
* 获取指定服务的特征值
*/
getBLEDeviceCharacteristics: function getBLEDeviceCharacteristics(deviceId, serviceId) {
var characteristicsList = [];
var that = this;
uni.getBLEDeviceCharacteristics({
deviceId: deviceId,
serviceId: serviceId,
success: function success(res) {
console.log("服务的特征值成功", res);
characteristicsList = res.characteristics;
for (var i = 0; i < characteristicsList.length; i++) {
var item = characteristicsList[i];
if (item.uuid.indexOf('0000FFE1') != -1) {
that.uuid1 = item.uuid; //下发数据
} else if (item.uuid.indexOf('0000FFE2') != -1) {
that.uuid2 = item.uuid; //监听数据
} else if (item.uuid.indexOf('0000FFE3') != -1) {
that.uuid3 = item.uuid; //写入设置
}
}
// 打开监听
uni.notifyBLECharacteristicValueChange({
deviceId: deviceId,
serviceId: serviceId,
characteristicId: that.uuid2,
state: true });
uni.notifyBLECharacteristicValueChange({
deviceId: deviceId,
serviceId: serviceId,
characteristicId: that.uuid3,
state: true });
// 初始化插件
console.log("初始化插件", that.devicesList);
that.devicesList[0].serviceId = that.serviceId;
plugin.initPlugin(res.characteristics, that.devicesList[0]);
uni.onBLECharacteristicValueChange(function (characteristic) {
var bleData = plugin.parseBleData(characteristic.value);
var dw0 = "kg";
var data1 = {};
var data2 = {};
if (bleData.status == 0) {
var sex0 = that.info.sex == 1 ? 1 : 0;
var sex = "0x0" + sex0.toString(16);
var age = "0x" + that.info.age.toString(16);
var height = "0x" + that.info.height.toString(16);
var arr = [0x01, parseInt(sex), parseInt(age), parseInt(height), 0x00];
console.log("指令发送成功", arr);
plugin.sendDataOfA7(arr);
console.log("握手成功");
} else if (bleData.status == 1) {
var payload = that.$tools.ab2hex(bleData.data, '');
var type = payload.substring(0, 2);
console.log("开始测量", payload);
if (type == "10" || type == "30" || type == "40") {//体脂模式
var data = parseInt(payload.substring(6, 12), 16);
var typeInfo = payload.substring(4, 6);
var num = payload.substring(12, 13);
var dw = payload.substring(13, 14);
if (dw == "1") {
dw0 = "jin";
}
if (num == "1") {
data = data / 10;
}
if (num == "2") {
data = data / 100;
}
if (num == "3") {
data = data / 1000;
}
if (typeInfo == "01") {
that.textW = "您的实时体重是:" + data;
}
if (typeInfo == "02") {
that.textW = "您的体重是:" + data;
that.weight = data + dw0;
}
}
if (type == "14" || type == "41") {//身高模式
var _height = parseInt(payload.substring(4, 8), 16);
that.textH = "您的身高是:" + _height + "cm";
that.height = _height;
console.log("身高模式:", that.height);
}
if (type == "11") {//阻抗模式
var _typeInfo = payload.substring(4, 6);
if (_typeInfo == "02") {
that.imp = 0;
}
if (_typeInfo == "04") {
that.imp = parseInt(payload.substring(8, 12), 16);
}
console.log("阻抗:", that.imp);
}
if (type == '15') {
var _typeInfo2 = payload.substring(4, 6);
if (_typeInfo2 == "01") {
that.data01 = {
bodyage: parseInt(payload.substring(26, 28),
16),
fat_r: parseInt(payload.substring(6, 10),
16) / 10,
muscle: parseInt(payload.substring(18, 22),
16) / 10,
kcal: parseInt(payload.substring(22, 26),
16),
visceral: parseInt(payload.substring(14,
18), 16),
sfr: parseInt(payload.substring(10, 14),
16) / 10 };
}
if (_typeInfo2 == '02') {
that.data02 = {
water: parseInt(payload.substring(10, 14),
16) / 10,
bone: parseInt(payload.substring(6, 10),
16) / 10,
fatlevlval: parseInt(payload.substring(24,
26), 16) /
10,
protein: parseInt(payload.substring(14, 18),
16) / 10,
bmi: parseInt(payload.substring(18, 22),
16) / 10 };
}
console.log("体脂数据", that.data01, that.data02);
that.BLEResult = Object.assign(that.data01, that.data02);
}
if (type == "80") {//测量结束
that.BLEResult.weight = that.weight;
that.BLEResult.imp = that.imp ? that.imp : 0;
that.BLEResult.ecode = that.macAddr;
that.BLEResult.height = that.height ? that.height : that.info.height;
that.BLEResult.familyid = that.info.id;
console.log("体脂成功:", that.BLEResult);
that.handleGetMeasure(that.BLEResult);
}
}
});
},
fail: function fail(res) {
console.log('获取特征值失败:', JSON.stringify(res));
} });
},
// 保存测量结果
handleGetMeasure: function handleGetMeasure(data) {
console.log("保存结果");
var that = this;
that.$model.getmeasuredata(data).then(function (res) {
if (res.code == 0) {
that.$store.dispatch("getUserInfo", {
familyid: that.info.familyid });
that.$store.dispatch("getResult", {
birthday: that.info.birthday,
familyid: that.info.familyid,
height: that.height ? that.height : that.info.height,
sex: that.info.sex });
that.$tools.msg("测量成功");
} else {
console.log("测量失败", res.message);
that.$tools.msg(res.message);
}
that.Unload = true;
setTimeout(function () {
that.closeBLEConnection();
that.closeBluetoothAdapter();
uni.switchTab({
url: "/pages/index/index" });
}, 200);
});
},
/**
* 断开蓝牙模块
*/
closeBluetoothAdapter: function closeBluetoothAdapter() {
var that = this;
uni.closeBluetoothAdapter({
success: function success(res) {
console.log('蓝牙模块关闭成功');
} });
},
handleBack: function handleBack() {
var that = this;
that.Unload = true;
that.stopBluetoothDevicesDiscovery(); //取消蓝牙搜索
that.closeBLEConnection();
that.closeBluetoothAdapter();
},
/**
* 断开蓝牙连接
*/
closeBLEConnection: function closeBLEConnection() {
var that = this;
uni.closeBLEConnection({
deviceId: that.deviceId,
success: function success(res) {
console.log('断开蓝牙连接成功');
} });
} } };exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
/***/ })
},[[186,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/BLEPages/adult/F01PRO.js.map

View File

@ -0,0 +1,6 @@
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F9FAFC",
"usingComponents": {}
}

View File

@ -0,0 +1 @@
<view class="data-v-4a952e43"><view class="content weightPages data-v-4a952e43"><block wx:if="{{isConnection==0}}"><view class="title data-v-4a952e43">连接中,请稍后</view></block><block wx:if="{{isConnection==1}}"><view class="title data-v-4a952e43">连接成功,请开始测量</view></block><block wx:if="{{isConnection==2}}"><view data-event-opts="{{[['tap',[['openBluetoothAdapter',['$event']]]]]}}" class="title data-v-4a952e43" bindtap="__e">连接失败,点击重新连接</view></block><view class="text data-v-4a952e43">{{textW}}</view><view class="text data-v-4a952e43">{{textH}}</view><view class="image data-v-4a952e43"><image src="/BLEPages/static/F018P01.gif" class="data-v-4a952e43"></image></view><view class="tips data-v-4a952e43"><text class="data-v-4a952e43">请确保:</text><text class="data-v-4a952e43">1.请确定设备是开机状态</text><text class="data-v-4a952e43">2.请确定手机蓝牙、位置信息已打开</text><text class="data-v-4a952e43">3.ios系统需打开设置—>应用—>微信里的蓝牙权限</text></view></view></view>

View File

@ -1,34 +1,34 @@
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["BLEPages/adult/H01pro"],{
/***/ 163:
/*!*********************************************************************************!*\
!*** E:/qiaocongli/adultDeviceApp/main.js?{"page":"BLEPages%2Fadult%2FH01pro"} ***!
\*********************************************************************************/
/***/ 156:
/*!****************************************************************************************************!*\
!*** D:/MyWork/mywork////adultDeviceApp/main.js?{"page":"BLEPages%2Fadult%2FH01pro"} ***!
\****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(createPage) {__webpack_require__(/*! uni-pages */ 5);
var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 3));
var _H01pro = _interopRequireDefault(__webpack_require__(/*! ./BLEPages/adult/H01pro.vue */ 164));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;
var _H01pro = _interopRequireDefault(__webpack_require__(/*! ./BLEPages/adult/H01pro.vue */ 157));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;
createPage(_H01pro.default);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["createPage"]))
/***/ }),
/***/ 164:
/*!**************************************************************!*\
!*** E:/qiaocongli/adultDeviceApp/BLEPages/adult/H01pro.vue ***!
\**************************************************************/
/***/ 157:
/*!*********************************************************************************!*\
!*** D:/MyWork/mywork////adultDeviceApp/BLEPages/adult/H01pro.vue ***!
\*********************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _H01pro_vue_vue_type_template_id_084d7ca1_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./H01pro.vue?vue&type=template&id=084d7ca1&scoped=true& */ 165);
/* harmony import */ var _H01pro_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./H01pro.vue?vue&type=script&lang=js& */ 167);
/* harmony import */ var _H01pro_vue_vue_type_template_id_084d7ca1_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./H01pro.vue?vue&type=template&id=084d7ca1&scoped=true& */ 158);
/* harmony import */ var _H01pro_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./H01pro.vue?vue&type=script&lang=js& */ 160);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _H01pro_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _H01pro_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 9);
/* harmony import */ var _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 10);
var renderjs
@ -37,7 +37,7 @@ var renderjs
/* normalize component */
var component = Object(_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
var component = Object(_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
_H01pro_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
_H01pro_vue_vue_type_template_id_084d7ca1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"],
_H01pro_vue_vue_type_template_id_084d7ca1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
@ -55,32 +55,32 @@ component.options.__file = "BLEPages/adult/H01pro.vue"
/***/ }),
/***/ 165:
/*!*********************************************************************************************************!*\
!*** E:/qiaocongli/adultDeviceApp/BLEPages/adult/H01pro.vue?vue&type=template&id=084d7ca1&scoped=true& ***!
\*********************************************************************************************************/
/***/ 158:
/*!****************************************************************************************************************************!*\
!*** D:/MyWork/mywork////adultDeviceApp/BLEPages/adult/H01pro.vue?vue&type=template&id=084d7ca1&scoped=true& ***!
\****************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_template_id_084d7ca1_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./H01pro.vue?vue&type=template&id=084d7ca1&scoped=true& */ 166);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_template_id_084d7ca1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"]; });
/* harmony import */ var _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_template_id_084d7ca1_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./H01pro.vue?vue&type=template&id=084d7ca1&scoped=true& */ 159);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_template_id_084d7ca1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_template_id_084d7ca1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_template_id_084d7ca1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_template_id_084d7ca1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_template_id_084d7ca1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_template_id_084d7ca1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_template_id_084d7ca1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"]; });
/***/ }),
/***/ 166:
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!E:/qiaocongli/adultDeviceApp/BLEPages/adult/H01pro.vue?vue&type=template&id=084d7ca1&scoped=true& ***!
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/***/ 159:
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/MyWork/mywork////adultDeviceApp/BLEPages/adult/H01pro.vue?vue&type=template&id=084d7ca1&scoped=true& ***!
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
@ -104,26 +104,26 @@ render._withStripped = true
/***/ }),
/***/ 167:
/*!***************************************************************************************!*\
!*** E:/qiaocongli/adultDeviceApp/BLEPages/adult/H01pro.vue?vue&type=script&lang=js& ***!
\***************************************************************************************/
/***/ 160:
/*!**********************************************************************************************************!*\
!*** D:/MyWork/mywork////adultDeviceApp/BLEPages/adult/H01pro.vue?vue&type=script&lang=js& ***!
\**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./H01pro.vue?vue&type=script&lang=js& */ 168);
/* harmony import */ var _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony default export */ __webpack_exports__["default"] = (_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_360_HBuilderX_3_4_7_20220422_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
/* harmony import */ var _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../../../../360Downloads/Software/HBuilderX.3.3.13.20220314/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./H01pro.vue?vue&type=script&lang=js& */ 161);
/* harmony import */ var _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony default export */ __webpack_exports__["default"] = (_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_360Downloads_Software_HBuilderX_3_3_13_20220314_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_H01pro_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
/***/ }),
/***/ 168:
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!E:/qiaocongli/adultDeviceApp/BLEPages/adult/H01pro.vue?vue&type=script&lang=js& ***!
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/***/ 161:
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/MyWork/mywork////adultDeviceApp/BLEPages/adult/H01pro.vue?vue&type=script&lang=js& ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
@ -148,7 +148,7 @@ __webpack_require__.r(__webpack_exports__);
var _vuex = __webpack_require__(/*! vuex */ 15);function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}
var _vuex = __webpack_require__(/*! vuex */ 9);function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}
var myTime;var _default =
@ -171,7 +171,7 @@ var myTime;var _default =
},
computed: _objectSpread(_objectSpread({},
(0, _vuex.mapState)(["user", "isConnected", "isBluetoothTyle"])), {}, {
(0, _vuex.mapState)(["user", "isConnected", "isBluetoothTyle", "appTheme"])), {}, {
info: function info() {
return this.user;
} }),
@ -204,12 +204,19 @@ var myTime;var _default =
onLoad: function onLoad(options) {
var that = this;
// 导航栏颜色
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme });
//
that.textW = "";
that.textH = "";
if (options && options.deviceId) {
that.macAddr = options.deviceId;
that.deviceId = options.deviceId;
that.createBLEConnection();
that.closeBLEConnection();
that.closeBluetoothAdapter();
that.openBluetoothAdapter();
}
that.onBLEConnectionStateChange();
uni.onBluetoothAdapterStateChange(function (res) {
@ -269,22 +276,26 @@ var myTime;var _default =
var that = this;
that.isConnection = 0;
uni.onBluetoothDeviceFound(function (res) {
console.log('开始监听寻找到新设备的事件', res);
res.devices.forEach(function (device) {
if (!device.name && !device.localName) {
return;
}
if (device.deviceId.indexOf(that.deviceId) != -1) {
that.stopBluetoothDevicesDiscovery(); //取消蓝牙搜索
console.log('开始监听寻找到新设备的事件', device);
if (device.name.indexOf('My') != -1) {
clearTimeout(myTime);
var buff = device.advertisData.slice(-6);
device.mac = new Uint8Array(buff); // 保存广播数据中的mac地址这是由于iOS不直接返回mac地址
var tempMac = Array.from(device.mac);
console.log('开始监听寻找到新设备的事件0', device);
device.macAddr = that.$tools.ab2hex(tempMac, ':').toUpperCase();
that.deviceId = device.macAddr;
that.macAddr = device.macAddr;
that.createBLEConnection();
return;
if (device.deviceId.indexOf(that.deviceId) != -1 || device.macAddr.indexOf(that.deviceId) != -1) {
console.log('开始监听寻找到新设备的事件1', that.deviceId);
that.stopBluetoothDevicesDiscovery(); //取消蓝牙搜索
that.deviceId = device.deviceId;
that.macAddr = device.macAddr;
that.createBLEConnection();
return;
}
}
});
});
@ -509,5 +520,5 @@ var myTime;var _default =
/***/ })
},[[163,"common/runtime","common/vendor"]]]);
},[[156,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/BLEPages/adult/H01pro.js.map

View File

@ -1,5 +1,6 @@
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F9FAFC",
"usingComponents": {}
}

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