F01PRO新增AiLink蓝牙名称
This commit is contained in:
parent
d3b80546d6
commit
e5b7648729
|
|
@ -55,15 +55,20 @@
|
||||||
return this.user
|
return this.user
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onUnload: function() {
|
onUnload: async function() {
|
||||||
let that = this
|
let that = this
|
||||||
console.log('F01PRO:onUnload-' + that.Unload)
|
|
||||||
if (!that.Unload) {
|
if (!that.Unload) {
|
||||||
clearTimeout(myTime)
|
clearTimeout(myTime)
|
||||||
|
that.$store.state.devicesList2 = []
|
||||||
|
|
||||||
that.closeBLEConnection()
|
that.closeBLEConnection()
|
||||||
that.closeBluetoothAdapter()
|
that.closeBluetoothAdapter()
|
||||||
that.$store.state.devicesList2 = []
|
|
||||||
console.log("页面返回onUnload")
|
if(that.isConnection != 1) {
|
||||||
|
let pages = getCurrentPages();
|
||||||
|
pages[pages.length - 2].$vm.islink = -1;
|
||||||
|
pages[pages.length - 2].$vm.textLink = '开始连接';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -123,7 +128,7 @@
|
||||||
onBLEConnectionStateChange() {
|
onBLEConnectionStateChange() {
|
||||||
let that = this
|
let that = this
|
||||||
uni.onBLEConnectionStateChange(function(res) {
|
uni.onBLEConnectionStateChange(function(res) {
|
||||||
console.log('F01PRO:onBLEConnectionStateChange-' + that.Unload)
|
console.log('F01PRO:onBLEConnectionStateChange-' + res.connected)
|
||||||
if (!res.connected) {
|
if (!res.connected) {
|
||||||
that.Unload = true
|
that.Unload = true
|
||||||
that.isConnection = 2
|
that.isConnection = 2
|
||||||
|
|
@ -161,7 +166,8 @@
|
||||||
if (!device.name && !device.localName) {
|
if (!device.name && !device.localName) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (device.name.indexOf('AiLink_') != -1 || device.name.indexOf('PCF01') != -1 || (device.localName && (device.localName
|
if (device.name.indexOf('AiLink_') != -1 || device.name.indexOf('PCF01') != -1 || (device
|
||||||
|
.localName && (device.localName
|
||||||
.indexOf('AiLink_') != -1 || device.localName
|
.indexOf('AiLink_') != -1 || device.localName
|
||||||
.indexOf('PCF01') != -1))) {
|
.indexOf('PCF01') != -1))) {
|
||||||
clearTimeout(myTime);
|
clearTimeout(myTime);
|
||||||
|
|
@ -436,10 +442,7 @@
|
||||||
that.closeBLEConnection()
|
that.closeBLEConnection()
|
||||||
that.closeBluetoothAdapter()
|
that.closeBluetoothAdapter()
|
||||||
that.$store.state.devicesList2 = []
|
that.$store.state.devicesList2 = []
|
||||||
// setTimeout(() => {
|
|
||||||
// let pages = getCurrentPages();
|
|
||||||
// pages[pages.length - 2].$vm.getBlereload();
|
|
||||||
// },1000)
|
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: "/pages/home/home"
|
url: "/pages/home/home"
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -382,7 +382,7 @@
|
||||||
watch: {
|
watch: {
|
||||||
isConnected: function() {
|
isConnected: function() {
|
||||||
let that = this
|
let that = this
|
||||||
console.log("Home:isConnected-", that.isConnected)
|
console.log("------------Home:isConnected-", that.isConnected)
|
||||||
if (!that.isConnected) {
|
if (!that.isConnected) {
|
||||||
that.textLink = "开始连接"
|
that.textLink = "开始连接"
|
||||||
that.islink = -1
|
that.islink = -1
|
||||||
|
|
@ -390,7 +390,7 @@
|
||||||
},
|
},
|
||||||
isBluetoothTyle: function() {
|
isBluetoothTyle: function() {
|
||||||
let that = this
|
let that = this
|
||||||
console.log("Home:isBluetoothTyle-", that.isBluetoothTyle)
|
console.log("-------------Home:isBluetoothTyle-", that.isBluetoothTyle)
|
||||||
if (!that.isBluetoothTyle) {
|
if (!that.isBluetoothTyle) {
|
||||||
that.textLink = "开始连接"
|
that.textLink = "开始连接"
|
||||||
that.islink = -1
|
that.islink = -1
|
||||||
|
|
@ -660,7 +660,6 @@
|
||||||
let that = this
|
let that = this
|
||||||
const foundDevices = that.devicesList
|
const foundDevices = that.devicesList
|
||||||
const idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId)
|
const idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId)
|
||||||
console.log("1111111", device.name)
|
|
||||||
if (idx === -1) {
|
if (idx === -1) {
|
||||||
// 体脂秤
|
// 体脂秤
|
||||||
if (device.name.toLowerCase().indexOf("pcl") != -1) {
|
if (device.name.toLowerCase().indexOf("pcl") != -1) {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
||||||
<view class="data-v-5409745b"><view class="content weightPages data-v-5409745b"><block wx:if="{{isConnection==0}}"><view class="title data-v-5409745b">连接中,请稍后</view></block><block wx:if="{{isConnection==1}}"><view class="title data-v-5409745b">连接成功,请开始测量</view></block><block wx:if="{{isConnection==2}}"><view data-event-opts="{{[['tap',[['openBluetoothAdapter',['$event']]]]]}}" class="title data-v-5409745b" bindtap="__e">连接失败,点击重新连接</view></block><view class="text data-v-5409745b">{{textW}}</view><view class="text data-v-5409745b">{{textH}}</view><block wx:if="{{textImp!=''}}"><view class="text data-v-5409745b">{{textImp}}</view></block><view class="image data-v-5409745b" style="margin-top:200rpx;"><image src="/pageTwo/static/F018P01.gif" mode="widthFix" class="data-v-5409745b"></image></view><view class="tips data-v-5409745b"><text class="data-v-5409745b">请确保:</text><text class="data-v-5409745b">1.请确定设备是开机状态</text><text class="data-v-5409745b">2.请确定手机蓝牙、位置信息已打开</text><text class="data-v-5409745b">3.ios系统需打开设置—>应用—>微信里的蓝牙权限</text></view></view></view>
|
<view class="data-v-4c084893"><view class="content weightPages data-v-4c084893"><block wx:if="{{isConnection==0}}"><view class="title data-v-4c084893">连接中,请稍后</view></block><block wx:if="{{isConnection==1}}"><view class="title data-v-4c084893">连接成功,请开始测量</view></block><block wx:if="{{isConnection==2}}"><view data-event-opts="{{[['tap',[['openBluetoothAdapter',['$event']]]]]}}" class="title data-v-4c084893" bindtap="__e">连接失败,点击重新连接</view></block><view class="text data-v-4c084893">{{textW}}</view><view class="text data-v-4c084893">{{textH}}</view><block wx:if="{{textImp!=''}}"><view class="text data-v-4c084893">{{textImp}}</view></block><view class="image data-v-4c084893" style="margin-top:200rpx;"><image src="/pageTwo/static/F018P01.gif" mode="widthFix" class="data-v-4c084893"></image></view><view class="tips data-v-4c084893"><text class="data-v-4c084893">请确保:</text><text class="data-v-4c084893">1.请确定设备是开机状态</text><text class="data-v-4c084893">2.请确定手机蓝牙、位置信息已打开</text><text class="data-v-4c084893">3.ios系统需打开设置—>应用—>微信里的蓝牙权限</text></view></view></view>
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
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
|
|
@ -140,6 +140,8 @@ Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
exports.default = void 0;
|
exports.default = void 0;
|
||||||
|
var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 462));
|
||||||
|
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 465));
|
||||||
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
|
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
|
||||||
var _vuex = __webpack_require__(/*! vuex */ 34);
|
var _vuex = __webpack_require__(/*! vuex */ 34);
|
||||||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
||||||
|
|
@ -174,17 +176,37 @@ var _default = {
|
||||||
return this.user;
|
return this.user;
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
onUnload: function onUnload() {
|
onUnload: function () {
|
||||||
var that = this;
|
var _onUnload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
||||||
console.log('F01PRO:onUnload-' + that.Unload);
|
var that, pages;
|
||||||
|
return _regenerator.default.wrap(function _callee$(_context) {
|
||||||
|
while (1) {
|
||||||
|
switch (_context.prev = _context.next) {
|
||||||
|
case 0:
|
||||||
|
that = this;
|
||||||
if (!that.Unload) {
|
if (!that.Unload) {
|
||||||
clearTimeout(myTime);
|
clearTimeout(myTime);
|
||||||
|
that.$store.state.devicesList2 = [];
|
||||||
that.closeBLEConnection();
|
that.closeBLEConnection();
|
||||||
that.closeBluetoothAdapter();
|
that.closeBluetoothAdapter();
|
||||||
that.$store.state.devicesList2 = [];
|
if (that.isConnection != 1) {
|
||||||
console.log("页面返回onUnload");
|
pages = getCurrentPages();
|
||||||
|
pages[pages.length - 2].$vm.islink = -1;
|
||||||
|
pages[pages.length - 2].$vm.textLink = '开始连接';
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
|
case 2:
|
||||||
|
case "end":
|
||||||
|
return _context.stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, _callee, this);
|
||||||
|
}));
|
||||||
|
function onUnload() {
|
||||||
|
return _onUnload.apply(this, arguments);
|
||||||
|
}
|
||||||
|
return onUnload;
|
||||||
|
}(),
|
||||||
watch: {
|
watch: {
|
||||||
isConnected: function isConnected() {
|
isConnected: function isConnected() {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
@ -241,7 +263,7 @@ var _default = {
|
||||||
onBLEConnectionStateChange: function onBLEConnectionStateChange() {
|
onBLEConnectionStateChange: function onBLEConnectionStateChange() {
|
||||||
var that = this;
|
var that = this;
|
||||||
uni.onBLEConnectionStateChange(function (res) {
|
uni.onBLEConnectionStateChange(function (res) {
|
||||||
console.log('F01PRO:onBLEConnectionStateChange-' + that.Unload);
|
console.log('F01PRO:onBLEConnectionStateChange-' + res.connected);
|
||||||
if (!res.connected) {
|
if (!res.connected) {
|
||||||
that.Unload = true;
|
that.Unload = true;
|
||||||
that.isConnection = 2;
|
that.isConnection = 2;
|
||||||
|
|
@ -545,10 +567,6 @@ var _default = {
|
||||||
that.closeBLEConnection();
|
that.closeBLEConnection();
|
||||||
that.closeBluetoothAdapter();
|
that.closeBluetoothAdapter();
|
||||||
that.$store.state.devicesList2 = [];
|
that.$store.state.devicesList2 = [];
|
||||||
// setTimeout(() => {
|
|
||||||
// let pages = getCurrentPages();
|
|
||||||
// pages[pages.length - 2].$vm.getBlereload();
|
|
||||||
// },1000)
|
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: "/pages/home/home"
|
url: "/pages/home/home"
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -436,7 +436,7 @@ var _default = {
|
||||||
watch: {
|
watch: {
|
||||||
isConnected: function isConnected() {
|
isConnected: function isConnected() {
|
||||||
var that = this;
|
var that = this;
|
||||||
console.log("Home:isConnected-", that.isConnected);
|
console.log("------------Home:isConnected-", that.isConnected);
|
||||||
if (!that.isConnected) {
|
if (!that.isConnected) {
|
||||||
that.textLink = "开始连接";
|
that.textLink = "开始连接";
|
||||||
that.islink = -1;
|
that.islink = -1;
|
||||||
|
|
@ -444,7 +444,7 @@ var _default = {
|
||||||
},
|
},
|
||||||
isBluetoothTyle: function isBluetoothTyle() {
|
isBluetoothTyle: function isBluetoothTyle() {
|
||||||
var that = this;
|
var that = this;
|
||||||
console.log("Home:isBluetoothTyle-", that.isBluetoothTyle);
|
console.log("-------------Home:isBluetoothTyle-", that.isBluetoothTyle);
|
||||||
if (!that.isBluetoothTyle) {
|
if (!that.isBluetoothTyle) {
|
||||||
that.textLink = "开始连接";
|
that.textLink = "开始连接";
|
||||||
that.islink = -1;
|
that.islink = -1;
|
||||||
|
|
@ -713,7 +713,6 @@ var _default = {
|
||||||
var that = this;
|
var that = this;
|
||||||
var foundDevices = that.devicesList;
|
var foundDevices = that.devicesList;
|
||||||
var idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId);
|
var idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId);
|
||||||
console.log("1111111", device.name);
|
|
||||||
if (idx === -1) {
|
if (idx === -1) {
|
||||||
// 体脂秤
|
// 体脂秤
|
||||||
if (device.name.toLowerCase().indexOf("pcl") != -1) {
|
if (device.name.toLowerCase().indexOf("pcl") != -1) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue