44 lines
1.3 KiB
JavaScript
44 lines
1.3 KiB
JavaScript
"use strict";
|
|
var common_vendor = require("../../common/vendor.js");
|
|
const _sfc_main = {
|
|
setup(__props) {
|
|
common_vendor.onLoad((option) => {
|
|
console.log(option);
|
|
deviceId.value = option.deviceId;
|
|
deviceName.value = option.name;
|
|
});
|
|
const deviceId = common_vendor.ref("");
|
|
const deviceName = common_vendor.ref("");
|
|
const ignoreTheDevice = () => {
|
|
wx.closeBLEConnection({
|
|
deviceId: deviceId.value
|
|
});
|
|
common_vendor.index.navigateBack({
|
|
delta: 1
|
|
});
|
|
};
|
|
const startConnect = () => {
|
|
common_vendor.index.navigateTo({
|
|
url: "/pages/bluetooth/connect?deviceId=" + deviceId
|
|
});
|
|
if (deviceId.value)
|
|
;
|
|
};
|
|
const goSelectBluetooth = () => {
|
|
common_vendor.index.navigateBack({
|
|
delta: 1
|
|
});
|
|
};
|
|
return (_ctx, _cache) => {
|
|
return {
|
|
a: common_vendor.t(deviceName.value != "" ? deviceName.value : deviceId.value),
|
|
b: common_vendor.o(goSelectBluetooth),
|
|
c: common_vendor.o(startConnect),
|
|
d: common_vendor.o(ignoreTheDevice)
|
|
};
|
|
};
|
|
}
|
|
};
|
|
var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-2ad235d0"], ["__file", "C:/Users/bzm15/Desktop/ix/mini_web-develop/pages/bluetooth/device.vue"]]);
|
|
wx.createPage(MiniProgramPage);
|