不甘寂寞 2 년 전
부모
커밋
4cd0e54af1
2개의 변경된 파일11개의 추가작업 그리고 4개의 파일을 삭제
  1. 6
    1
      pages/bluetooth/device-active-step3.vue
  2. 5
    3
      pages/recharge/recharge.vue

+ 6
- 1
pages/bluetooth/device-active-step3.vue 파일 보기

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;

+ 5
- 3
pages/recharge/recharge.vue 파일 보기

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)

Loading…
취소
저장