This commit is contained in:
qcl_123 2026-04-17 10:49:57 +08:00
parent cbc21d67d8
commit 1a3a8babc4
84 changed files with 211 additions and 193 deletions

View File

@ -82,6 +82,9 @@
export default {
onLoad(options) {
let that = this
uni.setNavigationBarTitle({
title: this.$t('titleDetail'),
})
//
if (options.info) {
let info = JSON.parse(options.info)
@ -91,11 +94,6 @@
computed: {
...mapState(["user"]),
},
onLoad() {
uni.setNavigationBarTitle({
title: this.$t('titleDetail'),
})
},
methods: {
handleSharepic(info) {
let that = this

View File

@ -81,6 +81,7 @@
return this.$tools.GetDateStr(-90);
},
cardList() {
console.log("11111111111111",this.CardList)
return this.CardList
}
},

View File

@ -200,7 +200,7 @@
onPullDownRefresh() {
let that = this
that.$tools.handleUserList()
if (that.bleValue.isConnectStatus != 2) {
if (that.token && that.bleValue.isConnectStatus != 2) {
that.$ble.openBluetoothAdapter()
}
that.$ble.onBLEConnectionStateChange()

View File

@ -33,6 +33,7 @@ export default {
return model.getUserList(account).then(res => {
if (res.code != 0) {
tools.msg(res.msg)
uni.setStorageSync('userid', "")
return
}
commit('changeFamilay', res.data.user_list)
@ -64,6 +65,7 @@ export default {
target_current: {},
vitalcapacity_data: []
})
uni.setStorageSync('userid', "")
return
}
uni.setStorageSync('userid', res.data.aud_id)

View File

@ -14,6 +14,7 @@ export default {
unitInstruction,
convertToGrams,
unitConversion,
handleDevType,
openBluetoothAdapter,
startBluetoothDeviceDiscovery,
onBluetoothDeviceFound,
@ -87,19 +88,18 @@ function startBluetoothDeviceDiscovery() {
function onBluetoothDeviceFound() {
uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => {
// if (!device.name && !device.localName) {
// device.advertisData = device.advertisData ? device.advertisData : ''
// let value = $tools.ab2hex(device.advertisData, "")
// let type = value.substring(0, 2)
// let id = value.substring(12, 16)
// if (type.toLowerCase() == 'c0') {
// clearTimeout(searchTimer);
// device.name = "c00002"
// Bluetoothfilter(device)
// }
// return
// }
console.log("device.name", device.name)
if (!device.name && !device.localName) {
device.advertisData = device.advertisData ? device.advertisData : ''
let value = $tools.ab2hex(device.advertisData, "")
let type = value.substring(0, 2)
let id = value.substring(12, 16)
if (type.toLowerCase() == 'c0') {
clearTimeout(searchTimer);
device.name = "c00002"
Bluetoothfilter(device)
}
return
}
if (device.name.toLowerCase().indexOf('pc-c06pro') != -1 ||
device.name.toLowerCase().indexOf('pc-c02pro') != -1 ||
device.name.toLowerCase().indexOf('pc-c09pro') != -1 ||
@ -114,25 +114,26 @@ function onBluetoothDeviceFound() {
const bytes = new Uint8Array(device.advertisData);
const macBytes = bytes.slice(6, 12);
device.macAddr = $tools.ab2hex(macBytes, ':').toUpperCase()
stopBluetoothDevicesDiscovery()
Bluetoothfilter(device)
stopBluetoothDevicesDiscovery()
return
}
console.log("name", device.name)
if (device.name.toLowerCase().indexOf("g02") != -1 ||
device.name.toLowerCase().indexOf('ypc') != -1 ||
device.name.toLowerCase().indexOf('da') != -1 ||
device.name.toLowerCase().indexOf('pcl') != -1 ||
device.name.toLowerCase().indexOf('ailink_') != -1 ||
device.name.toLowerCase().indexOf('pcf01') != -1 ||
device.name.toLowerCase().indexOf('chipsea_ble') != -1 ||
device.name.toLowerCase().indexOf('Yihejia_Lung') != -1) {
clearTimeout(searchTimer);
stopBluetoothDevicesDiscovery()
setTimeout(function() {
Bluetoothfilter(device)
}, 200)
return
}
// if (device.name.toLowerCase().indexOf("g02") != -1 ||
// device.name.toLowerCase().indexOf('ypc') != -1 ||
// device.name.toLowerCase().indexOf('da') != -1 ||
// device.name.toLowerCase().indexOf('pcl') != -1 ||
// device.name.toLowerCase().indexOf('ailink_') != -1 ||
// device.name.toLowerCase().indexOf('pcf01') != -1 ||
// device.name.toLowerCase().indexOf('chipsea_ble') != -1 ||
// device.name.toLowerCase().indexOf('Yihejia_Lung') != -1) {
// clearTimeout(searchTimer);
// stopBluetoothDevicesDiscovery()
// setTimeout(function() {
// Bluetoothfilter(device)
// }, 200)
// return
// }
})
});
}
@ -201,7 +202,6 @@ function Bluetoothfilter(device) {
(device.localName && device.localName.toLowerCase().indexOf('pc-c02pro') != -1) ||
(device.localName && device.localName.toLowerCase().indexOf('pc-c09pro') != -1)) {
deviceName = 'CFC'
// createBLEConnection("FFF0")
handleDevType(device)
return
}

View File

@ -163,7 +163,16 @@ export default {
return res
})
},
getSetLanguage(param) { // 语言设置
return http.post("/update_language", param).then(res => {
return res
})
},
getCheckDevice(param) { // 设备过滤
return http.post("/de/check_device_msg", param).then(res => {
return res
})
},
// 卡片
getCardAllList(param) { // 获取所有卡片
@ -217,7 +226,7 @@ export default {
return res
})
},
getpublicmeasure(param) { //手动记录
getpublicmeasure(param) { //新增卡片手动记录
return http.post("/card/manual_record", param).then(res => {
return res
})

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

View File

@ -11171,6 +11171,7 @@ var _default = {
return _model.default.getUserList(account).then(function (res) {
if (res.code != 0) {
_tools.default.msg(res.msg);
uni.setStorageSync('userid', "");
return;
}
commit('changeFamilay', res.data.user_list);
@ -11200,6 +11201,7 @@ var _default = {
target_current: {},
vitalcapacity_data: []
});
uni.setStorageSync('userid', "");
return;
}
uni.setStorageSync('userid', res.data.aud_id);
@ -11497,6 +11499,18 @@ var _default = (_getonlogin$getSendCo = {
return res;
});
},
getSetLanguage: function getSetLanguage(param) {
// 语言设置
return _https.default.post("/update_language", param).then(function (res) {
return res;
});
},
getCheckDevice: function getCheckDevice(param) {
// 设备过滤
return _https.default.post("/de/check_device_msg", param).then(function (res) {
return res;
});
},
// 卡片
getCardAllList: function getCardAllList(param) {
// 获取所有卡片
@ -11556,7 +11570,7 @@ var _default = (_getonlogin$getSendCo = {
});
},
getpublicmeasure: function getpublicmeasure(param) {
//手动记录
//新增卡片手动记录
return _https.default.post("/card/manual_record", param).then(function (res) {
return res;
});
@ -31231,6 +31245,7 @@ var _default = {
unitInstruction: unitInstruction,
convertToGrams: convertToGrams,
unitConversion: unitConversion,
handleDevType: handleDevType,
openBluetoothAdapter: openBluetoothAdapter,
startBluetoothDeviceDiscovery: startBluetoothDeviceDiscovery,
onBluetoothDeviceFound: onBluetoothDeviceFound,
@ -31306,43 +31321,36 @@ function startBluetoothDeviceDiscovery() {
function onBluetoothDeviceFound() {
uni.onBluetoothDeviceFound(function (res) {
res.devices.forEach(function (device) {
// if (!device.name && !device.localName) {
// device.advertisData = device.advertisData ? device.advertisData : ''
// let value = $tools.ab2hex(device.advertisData, "")
// let type = value.substring(0, 2)
// let id = value.substring(12, 16)
// if (type.toLowerCase() == 'c0') {
// clearTimeout(searchTimer);
// device.name = "c00002"
// Bluetoothfilter(device)
// }
// return
// }
console.log("device.name", device.name);
if (!device.name && !device.localName) {
device.advertisData = device.advertisData ? device.advertisData : '';
var value = _tools.default.ab2hex(device.advertisData, "");
var type = value.substring(0, 2);
var id = value.substring(12, 16);
if (type.toLowerCase() == 'c0') {
clearTimeout(searchTimer);
device.name = "c00002";
Bluetoothfilter(device);
}
return;
}
if (device.name.toLowerCase().indexOf('pc-c06pro') != -1 || device.name.toLowerCase().indexOf('pc-c02pro') != -1 || device.name.toLowerCase().indexOf('pc-c09pro') != -1 || device.name.toLowerCase().indexOf('pc-c10pro') != -1 || device.name.toLowerCase().indexOf('pc-c07pro') != -1 || device.localName && device.localName.toLowerCase().indexOf('pc-c07pro') != -1 || device.localName && device.localName.toLowerCase().indexOf('pc-c10pro') != -1 || device.localName && device.localName.toLowerCase().indexOf('pc-c06pro') != -1 || device.localName && device.localName.toLowerCase().indexOf('pc-c02pro') != -1 || device.localName && device.localName.toLowerCase().indexOf('pc-c09pro') != -1) {
clearTimeout(searchTimer);
var bytes = new Uint8Array(device.advertisData);
var macBytes = bytes.slice(6, 12);
device.macAddr = _tools.default.ab2hex(macBytes, ':').toUpperCase();
stopBluetoothDevicesDiscovery();
Bluetoothfilter(device);
stopBluetoothDevicesDiscovery();
return;
}
console.log("name", device.name);
if (device.name.toLowerCase().indexOf("g02") != -1 || device.name.toLowerCase().indexOf('ypc') != -1 || device.name.toLowerCase().indexOf('da') != -1 || device.name.toLowerCase().indexOf('pcl') != -1 || device.name.toLowerCase().indexOf('ailink_') != -1 || device.name.toLowerCase().indexOf('pcf01') != -1 || device.name.toLowerCase().indexOf('chipsea_ble') != -1 || device.name.toLowerCase().indexOf('Yihejia_Lung') != -1) {
clearTimeout(searchTimer);
stopBluetoothDevicesDiscovery();
setTimeout(function () {
Bluetoothfilter(device);
}, 200);
return;
}
// if (device.name.toLowerCase().indexOf("g02") != -1 ||
// device.name.toLowerCase().indexOf('ypc') != -1 ||
// device.name.toLowerCase().indexOf('da') != -1 ||
// device.name.toLowerCase().indexOf('pcl') != -1 ||
// device.name.toLowerCase().indexOf('ailink_') != -1 ||
// device.name.toLowerCase().indexOf('pcf01') != -1 ||
// device.name.toLowerCase().indexOf('chipsea_ble') != -1 ||
// device.name.toLowerCase().indexOf('Yihejia_Lung') != -1) {
// clearTimeout(searchTimer);
// stopBluetoothDevicesDiscovery()
// setTimeout(function() {
// Bluetoothfilter(device)
// }, 200)
// return
// }
});
});
}
@ -31402,7 +31410,6 @@ function Bluetoothfilter(device) {
//厨房秤
if (device.name.toLowerCase().indexOf('pc-c06pro') != -1 || device.name.toLowerCase().indexOf('pc-c02pro') != -1 || device.name.toLowerCase().indexOf('pc-c09pro') != -1 || device.name.toLowerCase().indexOf('pc-c10pro') != -1 || device.name.toLowerCase().indexOf('pc-c07pro') != -1 || device.localName && device.localName.toLowerCase().indexOf('pc-c07pro') != -1 || device.localName && device.localName.toLowerCase().indexOf('pc-c10pro') != -1 || device.localName && device.localName.toLowerCase().indexOf('pc-c06pro') != -1 || device.localName && device.localName.toLowerCase().indexOf('pc-c02pro') != -1 || device.localName && device.localName.toLowerCase().indexOf('pc-c09pro') != -1) {
deviceName = 'CFC';
// createBLEConnection("FFF0")
handleDevType(device);
return;
}

View File

@ -1,7 +1,7 @@
{
"component": true,
"usingComponents": {
"uni-popup": "/uni_modules/uni-popup/components/uni-popup/uni-popup",
"uni-popup-dialog": "/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog"
},
"component": true
}
}

View File

@ -1,4 +1,4 @@
{
"usingComponents": {},
"component": true
"component": true,
"usingComponents": {}
}

View File

@ -237,24 +237,22 @@ Object.defineProperty(exports, "__esModule", {
exports.default = void 0;
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
var _vuex = __webpack_require__(/*! vuex */ 30);
var _onLoad$computed$onLo;
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 _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
var _default = (_onLoad$computed$onLo = {
var _default = {
onLoad: function onLoad(options) {
var that = this;
uni.setNavigationBarTitle({
title: this.$t('titleDetail')
});
// 导航栏颜色
if (options.info) {
var info = JSON.parse(options.info);
that.handleSharepic(JSON.parse(options.info));
}
},
computed: _objectSpread({}, (0, _vuex.mapState)(["user"]))
}, (0, _defineProperty2.default)(_onLoad$computed$onLo, "onLoad", function onLoad() {
uni.setNavigationBarTitle({
title: this.$t('titleDetail')
});
}), (0, _defineProperty2.default)(_onLoad$computed$onLo, "methods", {
computed: _objectSpread({}, (0, _vuex.mapState)(["user"])),
methods: {
handleSharepic: function handleSharepic(info) {
var _this = this;
var that = this;
@ -284,13 +282,15 @@ var _default = (_onLoad$computed$onLo = {
that.listStr = res.data.list;
});
}
}), (0, _defineProperty2.default)(_onLoad$computed$onLo, "data", function data() {
},
data: function data() {
return {
memInfo: {},
listStr: [],
acd_id: ""
};
}), _onLoad$computed$onLo);
}
};
exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))

View File

@ -196,6 +196,7 @@ var _default = {
return this.$tools.GetDateStr(-90);
},
cardList: function cardList() {
console.log("11111111111111", this.CardList);
return this.CardList;
}
}),

View File

@ -335,7 +335,7 @@ var _default = {
onPullDownRefresh: function onPullDownRefresh() {
var that = this;
that.$tools.handleUserList();
if (that.bleValue.isConnectStatus != 2) {
if (that.token && that.bleValue.isConnectStatus != 2) {
that.$ble.openBluetoothAdapter();
}
that.$ble.onBLEConnectionStateChange();