@@ -110,7 +110,6 @@ export default function useOrderListItem(props) { | |||
"pageNo": params.pageNum, | |||
"pageSize": params.pageSize, | |||
"promotionModes": 1, | |||
"isAfter": true | |||
}, | |||
method: 'POST', | |||
// showLoading: isLoading ? (params.pageNum === 1 ? true : false) : false , |
@@ -25,7 +25,7 @@ | |||
</view> | |||
<view class="btn"> | |||
<submit-button title="登录" @submit="doLogin"></submit-button> | |||
<submit-button title="登录" @submit="doLogin" ></submit-button> | |||
</view> | |||
<view class="agreement"> |
@@ -42,7 +42,21 @@ export function createApp() { | |||
app.config.globalProperties.$systemInfo = counter.systemInfo; | |||
app.config.globalProperties.$util = utils; | |||
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 | |||
@@ -69,7 +69,8 @@ | |||
tabIndex: '0', //0全部 | |||
orderStep: '11', //11 为已完成” | |||
isValueCard: "", | |||
orderStatus: "1" | |||
orderStatus: "1", | |||
isAfter: true, | |||
}; | |||
const options = { | |||
type: 2, |
@@ -49,6 +49,7 @@ | |||
orderStep: "11", | |||
isValueCard: "", | |||
orderStatus: "1", | |||
isAfter: true, | |||
}; | |||
const options = { | |||
type: 2, |
@@ -69,7 +69,8 @@ | |||
tabIndex: '0', //0全部 | |||
orderStep: '11', //11 为已完成” | |||
isValueCard: "", | |||
orderStatus: "1" | |||
orderStatus: "1", | |||
isAfter: true, | |||
}; | |||
const options = { | |||
type: 2, |
@@ -69,7 +69,7 @@ | |||
<view> 3.xxxxxxxx </view> | |||
<view> 4.xxxxxxxx </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> | |||
<view class="mask" v-show="state.showPopup"> | |||
<view class="main"> | |||
@@ -109,7 +109,7 @@ | |||
cardModifyConfirm, | |||
obuRenewal | |||
} from "@/utils/network/api.js"; | |||
const cmd = require("../../../static/etcUtil/cmdConfig.js"); | |||
import { | |||
@@ -150,7 +150,6 @@ | |||
console.log(res); | |||
if (res.status) { | |||
getCardRenewal() | |||
getObuRenewal() | |||
} | |||
}) | |||
@@ -272,8 +271,8 @@ | |||
showLoading: true, | |||
}; | |||
request(cardModifyConfirm, options).then((res) => { | |||
console.log(res); | |||
state.showPopup = true; | |||
getObuRenewal() | |||
}) | |||
} | |||
@@ -298,31 +297,42 @@ | |||
//签续期 请求 | |||
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("正在执行指令"); | |||
bluetoothUtil.transCmd(cmdArray, "20", function(res) { | |||
bluetoothUtil.transCmd(cmdArray1, "20", function(res) { | |||
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> | |||
@@ -70,7 +70,8 @@ | |||
tabIndex: '0', | |||
orderStep: '11', | |||
isValueCard: '', | |||
orderStatus: "1" | |||
orderStatus: "1", | |||
isAfter: true, | |||
}; | |||
const options = { | |||
type: 2, |
@@ -70,7 +70,8 @@ | |||
tabIndex: '0', | |||
orderStep: '11', | |||
isValueCard: "", | |||
orderStatus: "1" | |||
orderStatus: "1", | |||
isAfter: true, | |||
}; | |||
const options = { | |||
type: 2, |
@@ -69,7 +69,8 @@ | |||
tabIndex: '0', //0全部 | |||
orderStep: '11', //11 为已完成” | |||
isValueCard: "", | |||
orderStatus: "1" | |||
orderStatus: "1", | |||
isAfter: true, | |||
}; | |||
const options = { | |||
type: 2, |
@@ -67,7 +67,8 @@ | |||
tabIndex: '0', | |||
orderStep: '11', | |||
isValueCard: '', | |||
orderStatus: "1" | |||
orderStatus: "1", | |||
isAfter: true, | |||
}; | |||
const options = { | |||
type: 2, |
@@ -69,7 +69,8 @@ | |||
tabIndex: '0', //0全部 | |||
orderStep: '11', //11 为已完成” | |||
isValueCard: "", | |||
orderStatus: "1" | |||
orderStatus: "1", | |||
isAfter: true, | |||
}; | |||
const options = { | |||
type: 2, |
@@ -48,7 +48,8 @@ | |||
tabIndex: "0", | |||
orderStep: "11", | |||
isValueCard: "", | |||
orderStatus: "1" | |||
orderStatus: "1", | |||
isAfter: true, | |||
}; | |||
const options = { | |||
type: 2, |
@@ -67,6 +67,7 @@ | |||
source: source, //渠道为小程序 | |||
tabIndex: '0', //0全部 | |||
orderStep: '11', //11 为已完成” | |||
isAfter: true, | |||
}; | |||
const options = { | |||
type: 2, |
@@ -67,6 +67,7 @@ | |||
source: source, //渠道为小程序 | |||
tabIndex: '0', //0全部 | |||
orderStep: '11', //11 为已完成” | |||
isAfter: true, | |||
}; | |||
const options = { | |||
type: 2, |
@@ -69,7 +69,8 @@ | |||
tabIndex: '0', //0全部 | |||
orderStep: '11', //11 为已完成” | |||
isValueCard: "", | |||
orderStatus: "1" | |||
orderStatus: "1", | |||
isAfter: true, | |||
}; | |||
const options = { | |||
type: 2, |
@@ -70,6 +70,7 @@ | |||
orderStep: '11', //11 为已完成” | |||
isValueCard: '1', | |||
title:'1', | |||
isAfter: true, | |||
}; | |||
const options = { | |||
type: 2, |
@@ -74,6 +74,7 @@ | |||
source: source, //渠道为小程序 | |||
tabIndex: '0', //0全部 | |||
orderStep: '11', //11 为已完成” | |||
isAfter: true, | |||
}; | |||
const options = { | |||
type: 2, |
@@ -1,6 +1,6 @@ | |||
<template> | |||
<view class="content"> | |||
<text class="please">请选择车辆</text> | |||
<text class="please">请选择车辆:</text> | |||
<view class="uni-list-cell-db"> | |||
<picker @change="bindPickerChange" :value="state.index" :range="state.array"> | |||
<view class="uni-input">{{state.array[state.index]}}</view> |
@@ -67,6 +67,7 @@ | |||
source: source, //渠道为小程序 | |||
tabIndex: '0', //0全部 | |||
orderStep: '11', //11 为已完成” | |||
isAfter: true, | |||
}; | |||
const options = { | |||
type: 2, |
@@ -66,6 +66,7 @@ | |||
source: source, //渠道为小程序 | |||
tabIndex: '0', //0全部 | |||
orderStep: '11', //11 为已完成” | |||
isAfter: true, | |||
}; | |||
const options = { | |||
type: 2, |
@@ -70,7 +70,8 @@ | |||
tabIndex: '0', | |||
orderStep: '11', | |||
isValueCard: '', | |||
orderStatus: "1" | |||
orderStatus: "1", | |||
isAfter: true, | |||
}; | |||
const options = { | |||
type: 2, |