"quickapp" : {}, | "quickapp" : {}, | ||||
/* 小程序特有相关 */ | /* 小程序特有相关 */ | ||||
"mp-weixin" : { | "mp-weixin" : { | ||||
"appid" : "wx214b4f8de36a0181", | |||||
"appid" : "wx008c60533388527a", | |||||
"setting" : { | "setting" : { | ||||
"urlCheck" : false, | "urlCheck" : false, | ||||
"checkSiteMap" : false, | "checkSiteMap" : false, |
const bluetoothUtil = require("../../static/etcUtil/index.js"); | const bluetoothUtil = require("../../static/etcUtil/index.js"); | ||||
const state = reactive({ | const state = reactive({ | ||||
cardId:'', | |||||
showPopup: false, //显示激活成功提示 | showPopup: false, //显示激活成功提示 | ||||
curDeviceId: "", //当前选中的设备ID | curDeviceId: "", //当前选中的设备ID | ||||
deviceList: [ | deviceList: [ | ||||
prefixName: "", //前缀名称 | prefixName: "", //前缀名称 | ||||
selected: false, //判断点击次数 | selected: false, //判断点击次数 | ||||
_name: "", //中文名称 | _name: "", //中文名称 | ||||
}); | }); | ||||
onReady(() => { | onReady(() => { | ||||
load(); | load(); | ||||
}); | }); | ||||
onLoad((option) => { | onLoad((option) => { | ||||
routeType.value = option.routeType ? option.routeType : "1"; | routeType.value = option.routeType ? option.routeType : "1"; | ||||
state.cardId = option.cardId | |||||
}); | }); | ||||
/* | /* | ||||
}); | }); | ||||
} else if (routeType.value == "2") { | } else if (routeType.value == "2") { | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: "/pages/recharge/recharge?connectSuccess=1", | |||||
url: `/pages/recharge/recharge?connectSuccess=1&&cardId=${state.cardId}`, | |||||
}); | }); | ||||
} else { | } else { | ||||
return; | return; |
getOpenID(); | getOpenID(); | ||||
/*传参*/ | /*传参*/ | ||||
state.cardId = option.cardId | state.cardId = option.cardId | ||||
console.log(state.cardId); | |||||
console.log('888888888') | |||||
state.connectSuccess = option.connectSuccess | state.connectSuccess = option.connectSuccess | ||||
state.orderNum = getItem("orderNum") | state.orderNum = getItem("orderNum") | ||||
if (state.connectSuccess === '1') { | if (state.connectSuccess === '1') { | ||||
//链接蓝牙 | //链接蓝牙 | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: `/pages/bluetooth/device-active-step3?routeType=2`, | |||||
url: `/pages/bluetooth/device-active-step3?routeType=2&&cardId=${state.cardId}` | |||||
}); | }); | ||||
} else { | } else { | ||||
console.log(`进行充值申请`) | console.log(`进行充值申请`) | ||||
} else { | } else { | ||||
//走蓝牙进行修复 | //走蓝牙进行修复 | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: `/pages/bluetooth/device-active-step3?routeType=2`, | |||||
url: `/pages/bluetooth/device-active-step3?routeType=2&&cardId=${state.cardId}`, | |||||
}); | }); | ||||
} | } | ||||
if (data.tradeState === 'SUCCESS') | if (data.tradeState === 'SUCCESS') | ||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: `/pages/bluetooth/device-active-step3?routeType=2`, | |||||
url: `/pages/bluetooth/device-active-step3?routeType=2&&cardId=${state.cardId}` | |||||
}); | }); | ||||
console.log(data) | console.log(data) |