F01PRO新增AiLink蓝牙名称

This commit is contained in:
subing008 2025-08-18 10:58:58 +08:00
parent d3b80546d6
commit e5b7648729
76 changed files with 563 additions and 544 deletions

View File

@ -55,15 +55,20 @@
return this.user
}
},
onUnload: function() {
onUnload: async function() {
let that = this
console.log('F01PROonUnload-' + that.Unload)
if (!that.Unload) {
clearTimeout(myTime)
that.$store.state.devicesList2 = []
that.closeBLEConnection()
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: {
@ -123,7 +128,7 @@
onBLEConnectionStateChange() {
let that = this
uni.onBLEConnectionStateChange(function(res) {
console.log('F01PROonBLEConnectionStateChange-' + that.Unload)
console.log('F01PROonBLEConnectionStateChange-' + res.connected)
if (!res.connected) {
that.Unload = true
that.isConnection = 2
@ -161,7 +166,8 @@
if (!device.name && !device.localName) {
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('PCF01') != -1))) {
clearTimeout(myTime);
@ -436,10 +442,7 @@
that.closeBLEConnection()
that.closeBluetoothAdapter()
that.$store.state.devicesList2 = []
// setTimeout(() => {
// let pages = getCurrentPages();
// pages[pages.length - 2].$vm.getBlereload();
// },1000)
uni.switchTab({
url: "/pages/home/home"
})

View File

@ -382,7 +382,7 @@
watch: {
isConnected: function() {
let that = this
console.log("HomeisConnected-", that.isConnected)
console.log("------------HomeisConnected-", that.isConnected)
if (!that.isConnected) {
that.textLink = "开始连接"
that.islink = -1
@ -390,7 +390,7 @@
},
isBluetoothTyle: function() {
let that = this
console.log("HomeisBluetoothTyle-", that.isBluetoothTyle)
console.log("-------------HomeisBluetoothTyle-", that.isBluetoothTyle)
if (!that.isBluetoothTyle) {
that.textLink = "开始连接"
that.islink = -1
@ -660,7 +660,6 @@
let that = this
const foundDevices = that.devicesList
const idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId)
console.log("1111111", device.name)
if (idx === -1) {
//
if (device.name.toLowerCase().indexOf("pcl") != -1) {

File diff suppressed because one or more lines are too long

View File

@ -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

View File

@ -140,6 +140,8 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
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 _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; }
@ -174,17 +176,37 @@ var _default = {
return this.user;
}
}),
onUnload: function onUnload() {
var that = this;
console.log('F01PROonUnload-' + that.Unload);
onUnload: function () {
var _onUnload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
var that, pages;
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
that = this;
if (!that.Unload) {
clearTimeout(myTime);
that.$store.state.devicesList2 = [];
that.closeBLEConnection();
that.closeBluetoothAdapter();
that.$store.state.devicesList2 = [];
console.log("页面返回onUnload");
if (that.isConnection != 1) {
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: {
isConnected: function isConnected() {
var that = this;
@ -241,7 +263,7 @@ var _default = {
onBLEConnectionStateChange: function onBLEConnectionStateChange() {
var that = this;
uni.onBLEConnectionStateChange(function (res) {
console.log('F01PROonBLEConnectionStateChange-' + that.Unload);
console.log('F01PROonBLEConnectionStateChange-' + res.connected);
if (!res.connected) {
that.Unload = true;
that.isConnection = 2;
@ -545,10 +567,6 @@ var _default = {
that.closeBLEConnection();
that.closeBluetoothAdapter();
that.$store.state.devicesList2 = [];
// setTimeout(() => {
// let pages = getCurrentPages();
// pages[pages.length - 2].$vm.getBlereload();
// },1000)
uni.switchTab({
url: "/pages/home/home"
});

View File

@ -436,7 +436,7 @@ var _default = {
watch: {
isConnected: function isConnected() {
var that = this;
console.log("HomeisConnected-", that.isConnected);
console.log("------------HomeisConnected-", that.isConnected);
if (!that.isConnected) {
that.textLink = "开始连接";
that.islink = -1;
@ -444,7 +444,7 @@ var _default = {
},
isBluetoothTyle: function isBluetoothTyle() {
var that = this;
console.log("HomeisBluetoothTyle-", that.isBluetoothTyle);
console.log("-------------HomeisBluetoothTyle-", that.isBluetoothTyle);
if (!that.isBluetoothTyle) {
that.textLink = "开始连接";
that.islink = -1;
@ -713,7 +713,6 @@ var _default = {
var that = this;
var foundDevices = that.devicesList;
var idx = that.$tools.inArray(foundDevices, "deviceId", device.deviceId);
console.log("1111111", device.name);
if (idx === -1) {
// 体脂秤
if (device.name.toLowerCase().indexOf("pcl") != -1) {