"pageNo": params.pageNum, | "pageNo": params.pageNum, | ||||
"pageSize": params.pageSize, | "pageSize": params.pageSize, | ||||
"promotionModes": 1, | "promotionModes": 1, | ||||
"isAfter": true | |||||
}, | }, | ||||
method: 'POST', | method: 'POST', | ||||
// showLoading: isLoading ? (params.pageNum === 1 ? true : false) : false , | // showLoading: isLoading ? (params.pageNum === 1 ? true : false) : false , |
</view> | </view> | ||||
<view class="btn"> | <view class="btn"> | ||||
<submit-button title="登录" @submit="doLogin"></submit-button> | |||||
<submit-button title="登录" @submit="doLogin" ></submit-button> | |||||
</view> | </view> | ||||
<view class="agreement"> | <view class="agreement"> |
app.config.globalProperties.$systemInfo = counter.systemInfo; | app.config.globalProperties.$systemInfo = counter.systemInfo; | ||||
app.config.globalProperties.$util = utils; | app.config.globalProperties.$util = utils; | ||||
app.config.globalProperties.$imgUrl = fileURL + "/image/"; | app.config.globalProperties.$imgUrl = fileURL + "/image/"; | ||||
// main.ts | |||||
app.directive('preventReClick', (el, binding) => { | |||||
function preventReClickFun(elValue, bindingValue) { | |||||
if (!elValue.disabled) { | |||||
elValue.disabled = true | |||||
setTimeout(() => { | |||||
elValue.disabled = false | |||||
}, bindingValue.value || 3000) | |||||
} | |||||
} | |||||
el.addEventListener('click', () => preventReClickFun(el, binding)) | |||||
binding.dir.unmounted = function() { | |||||
el.removeEventListener('click', () => preventReClickFun(el, binding)) | |||||
} | |||||
}); | |||||
//全局网络注册 | //全局网络注册 | ||||
// app.config.globalProperties.$request = request | // app.config.globalProperties.$request = request | ||||
tabIndex: '0', //0全部 | tabIndex: '0', //0全部 | ||||
orderStep: '11', //11 为已完成” | orderStep: '11', //11 为已完成” | ||||
isValueCard: "", | isValueCard: "", | ||||
orderStatus: "1" | |||||
orderStatus: "1", | |||||
isAfter: true, | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
orderStep: "11", | orderStep: "11", | ||||
isValueCard: "", | isValueCard: "", | ||||
orderStatus: "1", | orderStatus: "1", | ||||
isAfter: true, | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
tabIndex: '0', //0全部 | tabIndex: '0', //0全部 | ||||
orderStep: '11', //11 为已完成” | orderStep: '11', //11 为已完成” | ||||
isValueCard: "", | isValueCard: "", | ||||
orderStatus: "1" | |||||
orderStatus: "1", | |||||
isAfter: true, | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
<view> 3.xxxxxxxx </view> | <view> 3.xxxxxxxx </view> | ||||
<view> 4.xxxxxxxx </view> | <view> 4.xxxxxxxx </view> | ||||
</view> --> | </view> --> | ||||
<button class="submit" @click="toPage" v-if="!state.flag">卡签续期</button> | |||||
<button class="submit" @click="toPage" v-if="!state.flag" >卡签续期</button> | |||||
<button class="submit" @click="toBack" v-else="state.flag">返回服务中心</button> | <button class="submit" @click="toBack" v-else="state.flag">返回服务中心</button> | ||||
<view class="mask" v-show="state.showPopup"> | <view class="mask" v-show="state.showPopup"> | ||||
<view class="main"> | <view class="main"> | ||||
cardModifyConfirm, | cardModifyConfirm, | ||||
obuRenewal | obuRenewal | ||||
} from "@/utils/network/api.js"; | } from "@/utils/network/api.js"; | ||||
const cmd = require("../../../static/etcUtil/cmdConfig.js"); | |||||
import { | import { | ||||
console.log(res); | console.log(res); | ||||
if (res.status) { | if (res.status) { | ||||
getCardRenewal() | getCardRenewal() | ||||
getObuRenewal() | |||||
} | } | ||||
}) | }) | ||||
showLoading: true, | showLoading: true, | ||||
}; | }; | ||||
request(cardModifyConfirm, options).then((res) => { | request(cardModifyConfirm, options).then((res) => { | ||||
console.log(res); | |||||
state.showPopup = true; | |||||
getObuRenewal() | |||||
}) | }) | ||||
} | } | ||||
//签续期 请求 | //签续期 请求 | ||||
const getObuRenewal = () => { | const getObuRenewal = () => { | ||||
const options = { | |||||
type: 2, | |||||
data: { | |||||
obuId: orderInfos.obuId, | |||||
}, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(obuRenewal, options).then((res) => { | |||||
let result = stringToJson(res.bizContent); | |||||
let cmdArray = result.command.split(","); | |||||
console.log(cmdArray); | |||||
console.log(result.cosRecordId); | |||||
if (cmdArray.length > 0) { | |||||
console.log("899执行之前",); | |||||
let cmdArray1 = [cmd.HOME_DIRECTORY, cmd.OBU_DF01, cmd.OBU_EF01, cmd.RANDOM_NUMBER]; | |||||
if (cmdArray1.length > 0) { | |||||
tools.showLoadingAlert("正在执行指令"); | tools.showLoadingAlert("正在执行指令"); | ||||
bluetoothUtil.transCmd(cmdArray, "20", function(res) { | |||||
bluetoothUtil.transCmd(cmdArray1, "20", function(res) { | |||||
tools.hideLoadingAlert(); | tools.hideLoadingAlert(); | ||||
let status = res[cmdArray.length - 1].substring(res[cmdArray.length - 1].length - | |||||
4, res[cmdArray.length - 1].length); | |||||
// if (status == "9000") { | |||||
// getCommandBack(result.command, result.cosRecordId, res.toString()); | |||||
// } | |||||
var str = res[3].substring(res[3].length - 4, res[3].length); | |||||
if (str == "9000") { | |||||
let cmdRandNum = res[3].substring(0, res[3].length - 4); | |||||
const options = { | |||||
type: 2, | |||||
data: { | |||||
obuId: orderInfos.obuId, | |||||
random:cmdRandNum | |||||
}, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
request(obuRenewal, options).then((res) => { | |||||
let result = stringToJson(res.bizContent); | |||||
let cmdArray = result.command.split(","); | |||||
console.log("899",result,cmdArray); | |||||
console.log(result.cosRecordId); | |||||
if (cmdArray.length > 0) { | |||||
tools.showLoadingAlert("正在执行指令"); | |||||
bluetoothUtil.transCmd(cmdArray, "20", function(res) { | |||||
tools.hideLoadingAlert(); | |||||
state.showPopup = true; | |||||
}) | |||||
} | |||||
}) | |||||
} else { | |||||
tools.alertF("RANDOM_NUMBER指令长度不符" + res[1]); | |||||
} | |||||
}) | }) | ||||
} | } | ||||
}) | |||||
}; | }; | ||||
</script> | </script> | ||||
tabIndex: '0', | tabIndex: '0', | ||||
orderStep: '11', | orderStep: '11', | ||||
isValueCard: '', | isValueCard: '', | ||||
orderStatus: "1" | |||||
orderStatus: "1", | |||||
isAfter: true, | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
tabIndex: '0', | tabIndex: '0', | ||||
orderStep: '11', | orderStep: '11', | ||||
isValueCard: "", | isValueCard: "", | ||||
orderStatus: "1" | |||||
orderStatus: "1", | |||||
isAfter: true, | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
tabIndex: '0', //0全部 | tabIndex: '0', //0全部 | ||||
orderStep: '11', //11 为已完成” | orderStep: '11', //11 为已完成” | ||||
isValueCard: "", | isValueCard: "", | ||||
orderStatus: "1" | |||||
orderStatus: "1", | |||||
isAfter: true, | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
tabIndex: '0', | tabIndex: '0', | ||||
orderStep: '11', | orderStep: '11', | ||||
isValueCard: '', | isValueCard: '', | ||||
orderStatus: "1" | |||||
orderStatus: "1", | |||||
isAfter: true, | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
tabIndex: '0', //0全部 | tabIndex: '0', //0全部 | ||||
orderStep: '11', //11 为已完成” | orderStep: '11', //11 为已完成” | ||||
isValueCard: "", | isValueCard: "", | ||||
orderStatus: "1" | |||||
orderStatus: "1", | |||||
isAfter: true, | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
tabIndex: "0", | tabIndex: "0", | ||||
orderStep: "11", | orderStep: "11", | ||||
isValueCard: "", | isValueCard: "", | ||||
orderStatus: "1" | |||||
orderStatus: "1", | |||||
isAfter: true, | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
source: source, //渠道为小程序 | source: source, //渠道为小程序 | ||||
tabIndex: '0', //0全部 | tabIndex: '0', //0全部 | ||||
orderStep: '11', //11 为已完成” | orderStep: '11', //11 为已完成” | ||||
isAfter: true, | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
source: source, //渠道为小程序 | source: source, //渠道为小程序 | ||||
tabIndex: '0', //0全部 | tabIndex: '0', //0全部 | ||||
orderStep: '11', //11 为已完成” | orderStep: '11', //11 为已完成” | ||||
isAfter: true, | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
tabIndex: '0', //0全部 | tabIndex: '0', //0全部 | ||||
orderStep: '11', //11 为已完成” | orderStep: '11', //11 为已完成” | ||||
isValueCard: "", | isValueCard: "", | ||||
orderStatus: "1" | |||||
orderStatus: "1", | |||||
isAfter: true, | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
orderStep: '11', //11 为已完成” | orderStep: '11', //11 为已完成” | ||||
isValueCard: '1', | isValueCard: '1', | ||||
title:'1', | title:'1', | ||||
isAfter: true, | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
source: source, //渠道为小程序 | source: source, //渠道为小程序 | ||||
tabIndex: '0', //0全部 | tabIndex: '0', //0全部 | ||||
orderStep: '11', //11 为已完成” | orderStep: '11', //11 为已完成” | ||||
isAfter: true, | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
<template> | <template> | ||||
<view class="content"> | <view class="content"> | ||||
<text class="please">请选择车辆</text> | |||||
<text class="please">请选择车辆:</text> | |||||
<view class="uni-list-cell-db"> | <view class="uni-list-cell-db"> | ||||
<picker @change="bindPickerChange" :value="state.index" :range="state.array"> | <picker @change="bindPickerChange" :value="state.index" :range="state.array"> | ||||
<view class="uni-input">{{state.array[state.index]}}</view> | <view class="uni-input">{{state.array[state.index]}}</view> |
source: source, //渠道为小程序 | source: source, //渠道为小程序 | ||||
tabIndex: '0', //0全部 | tabIndex: '0', //0全部 | ||||
orderStep: '11', //11 为已完成” | orderStep: '11', //11 为已完成” | ||||
isAfter: true, | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
source: source, //渠道为小程序 | source: source, //渠道为小程序 | ||||
tabIndex: '0', //0全部 | tabIndex: '0', //0全部 | ||||
orderStep: '11', //11 为已完成” | orderStep: '11', //11 为已完成” | ||||
isAfter: true, | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |
tabIndex: '0', | tabIndex: '0', | ||||
orderStep: '11', | orderStep: '11', | ||||
isValueCard: '', | isValueCard: '', | ||||
orderStatus: "1" | |||||
orderStatus: "1", | |||||
isAfter: true, | |||||
}; | }; | ||||
const options = { | const options = { | ||||
type: 2, | type: 2, |