(e : "submit", connectSuccess : any, cardId : any) : void; | (e : "submit", connectSuccess : any, cardId : any) : void; | ||||
}>(); | }>(); | ||||
const connectSuccess = (res) => { | const connectSuccess = (res) => { | ||||
console.log("================================================") | |||||
console.log("连接回调函数func1"); | console.log("连接回调函数func1"); | ||||
console.log(res); | console.log(res); | ||||
if (res.code == 0) { | if (res.code == 0) { |
{ | { | ||||
"path": "pages/order/order", | "path": "pages/order/order", | ||||
"style": { | "style": { | ||||
"navigationBarTitleText": "我的订单" | |||||
// "enablePullDownRefresh": true | |||||
"navigationBarTitleText": "我的订单", | |||||
"enablePullDownRefresh": true | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
"enablePullDownRefresh": false | "enablePullDownRefresh": false | ||||
} | } | ||||
}, | }, | ||||
{ | |||||
"path": "pages/recharge/recharge-weixin", | |||||
"style": { | |||||
"navigationBarTitleText": "用户账户充值", | |||||
"enablePullDownRefresh": false | |||||
} | |||||
}, | |||||
{ | { | ||||
"path": "pages/recharge/select-car", | "path": "pages/recharge/select-car", | ||||
"style": { | "style": { | ||||
"enablePullDownRefresh": false | "enablePullDownRefresh": false | ||||
} | } | ||||
}, | }, | ||||
{ | |||||
"path": "pages/recharge/recharge-pay", | |||||
"style": { | |||||
"navigationBarTitleText": "选择充值方式", | |||||
"enablePullDownRefresh": false | |||||
} | |||||
}, | |||||
{ | { | ||||
"path": "pages/recharge/result", | "path": "pages/recharge/result", | ||||
"style": { | "style": { |
number: "235564444558855", | number: "235564444558855", | ||||
}, | }, | ||||
], | ], | ||||
connectSuccess: 1 | |||||
}); | }); | ||||
const deviceList = ref([]); | const deviceList = ref([]); | ||||
url: "/subpackage/after-sale/activation/activate", | url: "/subpackage/after-sale/activation/activate", | ||||
}); | }); | ||||
} else if (routeType.value == "2") { | } else if (routeType.value == "2") { | ||||
// #ifdef MP-ALIPAY | |||||
uni.navigateTo({ | uni.navigateTo({ | ||||
url: `/pages/recharge/recharge?connectSuccess=1&&cardId=${state.cardId}&&fee=${state.fee}`, | url: `/pages/recharge/recharge?connectSuccess=1&&cardId=${state.cardId}&&fee=${state.fee}`, | ||||
}); | }); | ||||
// #endif | |||||
// #ifdef MP-WEIXIN | |||||
uni.navigateTo({ | |||||
url: `/pages/recharge/recharge-weixin?connectSuccess=${state.connectSuccess}`, | |||||
}); | |||||
// #endif | |||||
} else if (routeType.value == "3") { | } else if (routeType.value == "3") { | ||||
} else if (routeType.value == "4") { | } else if (routeType.value == "4") { | ||||
if (res.code == 0) { | if (res.code == 0) { | ||||
datas.setData("bluLinkStatus", true); | datas.setData("bluLinkStatus", true); | ||||
datas.setData("connectPrefixName", connectPrefixName.value); | datas.setData("connectPrefixName", connectPrefixName.value); | ||||
oks(); | |||||
// oks(); | |||||
} else { | } else { | ||||
//断开蓝牙 | //断开蓝牙 | ||||
// bluetoothUtil.disconnectDevice(); | // bluetoothUtil.disconnectDevice(); |
const cardRecharge = (val) => { | const cardRecharge = (val) => { | ||||
// #ifdef MP-ALIPAY | // #ifdef MP-ALIPAY | ||||
msg("业务升级中,请前往九州ETC公众号进行办理。或拨打客服电话400-800-8787") | msg("业务升级中,请前往九州ETC公众号进行办理。或拨打客服电话400-800-8787") | ||||
// val==1 navTo('/pages/recharge/select-car', true) 去圈存的 支付宝 | |||||
// #endif | // #endif | ||||
// #ifdef MP-WEIXIN | // #ifdef MP-WEIXIN | ||||
if (val == 1) { | if (val == 1) { | ||||
navTo('/pages/recharge/select-car', true) | |||||
navTo('/pages/recharge/recharge-pay', true) | |||||
} else if (val == 2) { | } else if (val == 2) { | ||||
navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select', true) | navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select', true) | ||||
} | } |
<!-- 订单列表 --> | <!-- 订单列表 --> | ||||
<template> | <template> | ||||
<scroll-view class="setHight" scroll-y="true" refresher-enabled="true" :refresher-enabled='state.freshing' | |||||
<!-- <scroll-view class="setHight" scroll-y="true" refresher-enabled="true" :refresher-enabled='state.freshing' | |||||
:refresher-triggered='state.triggered' @refresherrefresh="onRefresh" @refresherpulling="onPulling" | :refresher-triggered='state.triggered' @refresherrefresh="onRefresh" @refresherpulling="onPulling" | ||||
refresher-default-style="black"> | |||||
<!-- 搜索框 --> | |||||
<view class="as-layout-horizontal as-gravity-center-start search-layout"> | |||||
<view class="search-box"> | |||||
<image :src="`${$imgUrl}service/icon-search.png`" class="icon" mode="aspectFill"></image> | |||||
<input class="search" placeholder="请输入车牌号" @input="onKeyInput" /> | |||||
</view> | |||||
<view class="search-btn" @click="doSearch">搜索</view> | |||||
refresher-default-style="black"> --> | |||||
<!-- 搜索框 --> | |||||
<view class="as-layout-horizontal as-gravity-center-start search-layout"> | |||||
<view class="search-box"> | |||||
<image :src="`${$imgUrl}service/icon-search.png`" class="icon" mode="aspectFill"></image> | |||||
<input class="search" placeholder="请输入车牌号" @input="onKeyInput" /> | |||||
</view> | </view> | ||||
<view class="search-btn" @click="doSearch">搜索</view> | |||||
</view> | |||||
<!-- 数据为空 --> | |||||
<empty-view :mode="config.emptyHint.mode" :content="config.emptyHint.hint" v-if="ordersList.length === 0" /> | |||||
<!-- 数据为空 --> | |||||
<empty-view :mode="config.emptyHint.mode" :content="config.emptyHint.hint" v-if="ordersList.length === 0" /> | |||||
<template v-else> | |||||
<!-- 列表 --> | |||||
<block v-for="(item,index) in ordersList" :key="index"> | |||||
<!-- 新办订单 --> | |||||
<!-- v-if="item.orderType == 'ISSUE'" --> | |||||
<order-list-item-new :item="item" /> | |||||
<!-- 卡签同时更换/更换卡/更换签订单 --> | |||||
<!-- <order-list-item-card-sign :item="item" | |||||
<template v-else> | |||||
<!-- 列表 --> | |||||
<block v-for="(item,index) in ordersList" :key="index"> | |||||
<!-- 新办订单 --> | |||||
<!-- v-if="item.orderType == 'ISSUE'" --> | |||||
<order-list-item-new :item="item" /> | |||||
<!-- 卡签同时更换/更换卡/更换签订单 --> | |||||
<!-- <order-list-item-card-sign :item="item" | |||||
v-else-if="item.orderType == OrderTypes.同时换卡换签 || item.orderType == 'REPLACEMENT_CARD' | v-else-if="item.orderType == OrderTypes.同时换卡换签 || item.orderType == 'REPLACEMENT_CARD' | ||||
|| item.orderType == 'REPLACEMENT_SIGNATURE'" /> --> | || item.orderType == 'REPLACEMENT_SIGNATURE'" /> --> | ||||
<!-- 增补OBU订单 --> | |||||
<!-- <order-list-item-obu :item="item" v-else-if="item.orderType == 'SUPPLEMENT_OBU'" /> --> | |||||
<!-- 公务车增补OBU订单 --> | |||||
<!-- <order-list-item-obu :item="item" v-else-if="item.orderType == 'OFFICAL_SUPPLEMENT_OBU'" /> --> | |||||
<!-- ETC注销业务类型订单 --> | |||||
<!-- <order-list-item-logoff-etc :item="item" v-else-if="item.orderType == OrderTypes.ETC注销" /> --> | |||||
<!-- 车辆信息变更 --> | |||||
<!-- <order-list-item-edit-car :item="item" v-else-if="item.orderType == OrderTypes.车辆信息变更" /> --> | |||||
<!-- 解除车牌占用 --> | |||||
<!-- <order-list-item-cancel-numberplate :item="item" v-else-if="item.orderType == OrderTypes.解除车牌占用" /> --> | |||||
<!-- 单位账户充值开户订单 --> | |||||
<!-- <order-list-item-recharge :item="item" v-else-if="item.orderType == 'EXCHANGE_CARD_TYPE'" /> --> | |||||
</block> | |||||
<uni-load-more :status="params.status" iconType="snow" :icon-size="16" :content-text="config.contentTxt" | |||||
v-if="ordersList.length > 0" /> | |||||
</template> | |||||
</scroll-view> | |||||
<!-- 增补OBU订单 --> | |||||
<!-- <order-list-item-obu :item="item" v-else-if="item.orderType == 'SUPPLEMENT_OBU'" /> --> | |||||
<!-- 公务车增补OBU订单 --> | |||||
<!-- <order-list-item-obu :item="item" v-else-if="item.orderType == 'OFFICAL_SUPPLEMENT_OBU'" /> --> | |||||
<!-- ETC注销业务类型订单 --> | |||||
<!-- <order-list-item-logoff-etc :item="item" v-else-if="item.orderType == OrderTypes.ETC注销" /> --> | |||||
<!-- 车辆信息变更 --> | |||||
<!-- <order-list-item-edit-car :item="item" v-else-if="item.orderType == OrderTypes.车辆信息变更" /> --> | |||||
<!-- 解除车牌占用 --> | |||||
<!-- <order-list-item-cancel-numberplate :item="item" v-else-if="item.orderType == OrderTypes.解除车牌占用" /> --> | |||||
<!-- 单位账户充值开户订单 --> | |||||
<!-- <order-list-item-recharge :item="item" v-else-if="item.orderType == 'EXCHANGE_CARD_TYPE'" /> --> | |||||
</block> | |||||
<uni-load-more :status="params.status" iconType="snow" :icon-size="16" :content-text="config.contentTxt" | |||||
v-if="ordersList.length > 0" /> | |||||
</template> | |||||
<!-- </scroll-view> --> | |||||
</template> | </template> | ||||
<script setup lang="ts"> | <script setup lang="ts"> |
<template> | |||||
<view class="wrapper"> | |||||
<view class="tabs"> | |||||
<view class="tab-tit as-gravity-center-start">充值方式 | |||||
<u-input @click="state.transWayTypeShow = true" inputAlign="center" v-model="state.transWayName" | |||||
type="select" /> | |||||
</view> | |||||
</view> | |||||
<view class="btn btn-primary" @click="rechargeAction">立即充值</view> | |||||
</view> | |||||
<u-select v-model="state.transWayTypeShow" :list="state.transWayTypeList" @confirm="selectConfirm"></u-select> | |||||
</template> | |||||
<script setup lang="ts"> | |||||
import { | |||||
stringToJson | |||||
} from "@/utils/network/encryption"; | |||||
import { | |||||
onLoad, | |||||
onShow | |||||
} from "@dcloudio/uni-app"; | |||||
import { | |||||
request | |||||
} from "@/utils/network/request.js"; | |||||
import { | |||||
reactive | |||||
} from "vue"; | |||||
import { | |||||
navTo | |||||
} from "@/utils/utils" | |||||
import { | |||||
msg | |||||
} from "@/utils/utils"; | |||||
const datas = require("../../static/etcUtil/datas.js"); | |||||
const bluetoothUtil = require("../../static/etcUtil/index.js"); | |||||
const cmd = require("../../static/etcUtil/cmdConfig.js"); | |||||
const tools = require("../../static/etcUtil/tools.js"); | |||||
const NFCAPI = require('../../static/nfc/NFCAPI.js'); | |||||
const state = reactive({ | |||||
transWayTypeShow: false, | |||||
transWayTypeList: [{ | |||||
label: "蓝牙", | |||||
value: "blu", | |||||
}, { | |||||
label: "NFC", | |||||
value: "nfc", | |||||
} | |||||
], | |||||
isShowBlue: false, | |||||
tableIndex: 0, | |||||
openid: "", | |||||
connectSuccess: undefined, | |||||
fee: 5000, | |||||
money: 50, | |||||
orderNum: "", | |||||
transWayName: "蓝牙", | |||||
transWay: "blu", //“blu”为蓝牙充值方式、“nfc”为NFC充值方式 | |||||
cardId: "", //卡号 需要传参 | |||||
mockpreBalance: 2000, //fix:模拟余额 目前没有检测状态接口,第一次会模拟圈层检测来检测状态 | |||||
show: false, | |||||
current: 0 | |||||
}); | |||||
const selectConfirm = (item : any) => { | |||||
state.transWayName = item[0].label | |||||
state.transWay = item[0].value | |||||
}; | |||||
onLoad((option) => { | |||||
}); | |||||
function radioChange(evt) { | |||||
console.log('输出内容', evt) | |||||
state.transWay = evt.detail.value; //“blu”为蓝牙充值方式、“nfc”为NFC充值方式 | |||||
} | |||||
/*点击充值按钮*/ | |||||
const rechargeAction = () => { | |||||
if (state.transWay == 'blu') { | |||||
uni.redirectTo({ | |||||
url: `/pages/bluetooth/bluetooth?routeType=2`, | |||||
}); | |||||
} else { | |||||
uni.redirectTo({ | |||||
url: `/pages/nfc/nfc?routeType=2`, | |||||
}); | |||||
} | |||||
}; | |||||
const goRecord = () => { | |||||
uni.navigateTo({ | |||||
url: `/subpackage/personal-center/consumption-record?cardId=${state.cardId}` | |||||
}) | |||||
} | |||||
</script> | |||||
<style> | |||||
.record { | |||||
width: 90%; | |||||
display: flex; | |||||
justify-content: space-between; | |||||
margin: 0 auto; | |||||
align-items: center; | |||||
} | |||||
.arrow { | |||||
width: 14rpx; | |||||
height: 26rpx; | |||||
} | |||||
.tabs .tab-tit { | |||||
font-size: 30rpx; | |||||
color: #333; | |||||
padding: 45rpx 0 22rpx 30rpx; | |||||
} | |||||
.tabs .tab { | |||||
display: flex; | |||||
flex-wrap: wrap; | |||||
justify-content: space-evenly; | |||||
} | |||||
.tabs .tab .item { | |||||
width: 210rpx; | |||||
height: 100rpx; | |||||
background: #f6fff7; | |||||
border: 1px solid #dcdde1; | |||||
box-sizing: border-box; | |||||
line-height: 100rpx; | |||||
border-radius: 6rpx; | |||||
text-align: center; | |||||
margin-bottom: 24rpx; | |||||
color: #333333; | |||||
font-size: 32rpx; | |||||
} | |||||
.tabs .tab .item.active { | |||||
border: 1px solid #24cc49; | |||||
color: #24cc49; | |||||
} | |||||
.btn-primary { | |||||
width: 670rpx; | |||||
height: 80rpx; | |||||
line-height: 80rpx; | |||||
background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||||
border-radius: 40rpx; | |||||
font-size: 32rpx; | |||||
color: #ffffff; | |||||
margin: 200rpx 40rpx 0; | |||||
text-align: center; | |||||
} | |||||
label { | |||||
display: flex; | |||||
justify-content: space-between; | |||||
margin-top: 30rpx; | |||||
} | |||||
</style> |
StorageKeys, | StorageKeys, | ||||
setItem | setItem | ||||
} from "@/utils/storage"; | } from "@/utils/storage"; | ||||
// const bluetooth=require("../../components/bluetooth/bluetooth") | |||||
const datas = require("../../static/etcUtil/datas.js"); | const datas = require("../../static/etcUtil/datas.js"); | ||||
const bluetoothUtil = require("../../static/etcUtil/index.js"); | const bluetoothUtil = require("../../static/etcUtil/index.js"); | ||||
const cmd = require("../../static/etcUtil/cmdConfig.js"); | const cmd = require("../../static/etcUtil/cmdConfig.js"); | ||||
}; | }; | ||||
/*读卡*/ | /*读卡*/ | ||||
const getCardId = (readMoney) => { | |||||
const getCardId = () => { | |||||
console.log("======获取卡信息======"); | console.log("======获取卡信息======"); | ||||
let cmdArr = [ | let cmdArr = [ | ||||
cmd.HOME_DIRECTORY, | cmd.HOME_DIRECTORY, | ||||
provider: "weixin", | provider: "weixin", | ||||
success: function (e) { | success: function (e) { | ||||
getOpenid(e.code); | getOpenid(e.code); | ||||
// wx.request({ | |||||
// url: `https://api.weixin.qq.com/sns/jscode2session?appid=${wechatAppID}&secret=${wechatSecret}&js_code=${e.code}&grant_type=authorization_code`, | |||||
// success: (res : any) => { | |||||
// state.openid = res.data.openid; | |||||
// }, | |||||
// }); | |||||
}, | }, | ||||
fail: function () { | fail: function () { | ||||
msg("获取不到oppenId,请检查AppID和Secret是否争取"); | msg("获取不到oppenId,请检查AppID和Secret是否争取"); |
const quanCheckActionTrue = () => { | const quanCheckActionTrue = () => { | ||||
let source = "" | let source = "" | ||||
// #ifdef MP-ALIPAY | // #ifdef MP-ALIPAY | ||||
source ="ALI" | |||||
source = "ALI" | |||||
// #endif | // #endif | ||||
// #ifdef MP-WEIXIN | // #ifdef MP-WEIXIN | ||||
source ="WECHAT" | |||||
source = "WECHAT" | |||||
// #endif | // #endif | ||||
var data = { | var data = { | ||||
opId: getItem(StorageKeys.OpenId), | opId: getItem(StorageKeys.OpenId), |
<image :src="`${$imgUrl}user/icon-arrow.png`" class="arrow"></image> | <image :src="`${$imgUrl}user/icon-arrow.png`" class="arrow"></image> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="sub-bind"> | |||||
<view class="item-tit"> | |||||
<image :src="`${$imgUrl}user/icon-car-3.png`" class="icon icon-2"></image> | |||||
<text>我要关联车辆</text> | |||||
</view> | |||||
<view class="right-arrow" | |||||
@click="$util.navTo('/subpackage/personal-center/setting/car-information/car-create', true)"> | |||||
<view class="sub-tit">增加未关联车辆</view> | |||||
<image :src="`${$imgUrl}user/icon-arrow.png`" class="arrow"></image> | |||||
</view> | |||||
</view> | |||||
<view class="car-item" v-for="(item,index) in state.list"> | <view class="car-item" v-for="(item,index) in state.list"> | ||||
<image :src="`${$imgUrl}che.png`" class="car-pic" mode="aspectFill"></image> | <image :src="`${$imgUrl}che.png`" class="car-pic" mode="aspectFill"></image> | ||||
<view class="car-info"> | <view class="car-info"> | ||||
<view class="loading-more" v-if="state.carNumber>5" | <view class="loading-more" v-if="state.carNumber>5" | ||||
@click="$util.navTo('/subpackage/personal-center/vehicle-information', true)">加载更多~</view> | @click="$util.navTo('/subpackage/personal-center/vehicle-information', true)">加载更多~</view> | ||||
</view> | </view> | ||||
<view class="sub-bind"> | |||||
<view class="item-tit"> | |||||
<image :src="`${$imgUrl}user/icon-car-3.png`" class="icon icon-2"></image> | |||||
<text>我要关联车辆</text> | |||||
</view> | |||||
<view class="right-arrow" | |||||
@click="$util.navTo('/subpackage/personal-center/setting/car-information/car-create', true)"> | |||||
<view class="sub-tit">增加未关联车辆</view> | |||||
<image :src="`${$imgUrl}user/icon-arrow.png`" class="arrow"></image> | |||||
</view> | |||||
</view> | |||||
</view> | </view> | ||||
<view class="menu"> | <view class="menu"> | ||||
<view class="item" @click="$util.navTo('/subpackage/personal-center/setting/setting', true)"> | <view class="item" @click="$util.navTo('/subpackage/personal-center/setting/setting', true)"> |
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="picture-wrapper" @click="takePhotoMode('3')"> | |||||
<view class="bg"> | |||||
<view class=""> | |||||
<view class="name"> 行驶证主页 </view> | |||||
<view class="value"> 上传行驶证的主页 </view> | |||||
<view class="tip"> | |||||
<view class="tip-value"> 拍摄规范 </view> | |||||
</view> | |||||
</view> | |||||
<image v-if="!state.form.vehPosImgUrl" class="icon" :src="`${$imgUrl}applyCard/car-zhu.png`"> | |||||
</image> | |||||
<image v-else class="icon" :src="strReplace(state.form.vehPosImgUrl)"></image> | |||||
</view> | |||||
</view> | |||||
<view class="picture-wrapper" @click="takePhotoMode('4')"> | |||||
<view class="bg"> | |||||
<view class=""> | |||||
<view class="name"> 行驶证副页 </view> | |||||
<view class="value"> 上传行驶证的副页 </view> | |||||
<view class="tip"> | |||||
<view class="tip-value"> 拍摄规范 </view> | |||||
</view> | |||||
</view> | |||||
<image v-if="!state.form.vehNegImgUrl" class="icon" :src="`${$imgUrl}applyCard/car-fu.png`"> | |||||
</image> | |||||
<image v-else class="icon" :src="strReplace(state.form.vehNegImgUrl)"></image> | |||||
</view> | |||||
</view> | |||||
<button class="submit" @click="toPage">再次激活</button> | <button class="submit" @click="toPage">再次激活</button> | ||||
<view class="mask" v-show="state.showPopup"> | <view class="mask" v-show="state.showPopup"> | ||||
<view class="main"> | <view class="main"> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
<view class="choice-takePhoto-wrap" v-if="state.isTakePhotoModeShow" @click="cancle"> | |||||
<view class="choice-takePhoto"> | |||||
<view @click.stop="takePhoto(state.choiceIndex)" style="border-radius: 20rpx 20rpx 0 0;">拍照</view> | |||||
<view @click.stop="xiangce(state.choiceIndex)">从手机相册选择</view> | |||||
<view @click.stop="cancle">取消</view> | |||||
</view> | |||||
</view> | |||||
<viewfinder v-if="state.phoneType" :phoneType="state.phoneType" :images="state.images" | |||||
:showStartPhoto="state.showImg" @confirmReturn="confirmReturn" @camera="camera"></viewfinder> | |||||
</template> | </template> | ||||
<script lang="ts" setup> | <script lang="ts" setup> | ||||
import viewfinder from "@/components/viewfinder.vue" | |||||
import { | import { | ||||
reactive, | reactive, | ||||
ref | ref | ||||
expireDate2, | expireDate2, | ||||
getFormatDate, | getFormatDate, | ||||
msg, | msg, | ||||
navTo | |||||
navTo, | |||||
strReplace, | |||||
uploadFile | |||||
} from "@/utils/utils"; | } from "@/utils/utils"; | ||||
import { | import { | ||||
onLoad, onShow | onLoad, onShow | ||||
const state = reactive({ | const state = reactive({ | ||||
showPopup: false | |||||
phoneType: 0, // 1 身份证正面 2 身份证反面 3行驶证正面 4行驶证反面 | |||||
choiceIndex: 1, // 1 身份证正面 2 身份证反面 | |||||
isTakePhotoModeShow: false, //选择拍照方式是否出来 | |||||
changeColor: false, | |||||
showImg: true, | |||||
images: '', | |||||
showPopup: false, | |||||
form: { | |||||
vehPosImgUrl: "", | |||||
vehNegImgUrl: "", | |||||
vehicleIdNum: "" | |||||
} | |||||
}) | }) | ||||
//订单 | //订单 | ||||
}; | }; | ||||
const toPage = () => { | const toPage = () => { | ||||
navTo("/pages/bluetooth/bluetooth?routeType=5"); | |||||
if (!state.form.vehPosImgUrl) { | |||||
msg("请上传行驶证主页") | |||||
return; | |||||
} | |||||
if (!state.form.vehNegImgUrl) { | |||||
msg("请上传行驶证副页") | |||||
return; | |||||
} | |||||
console.log("state.form.vehicleIdNum", state.form.vehicleIdNum, orderInfos.vehiclePlate) | |||||
if (state.form.vehicleIdNum == orderInfos.vehiclePlate) { | |||||
activationRecordQuery().then((val) => { | |||||
console.log("激活次数", val) | |||||
if (val.limit) { | |||||
navTo("/pages/bluetooth/bluetooth?routeType=5"); | |||||
} else { | |||||
msg("一年内到达激活次数上限5次") | |||||
} | |||||
}); | |||||
} else { | |||||
msg("请上传正确行驶证") | |||||
} | |||||
}; | }; | ||||
//获取订单详情 | //获取订单详情 | ||||
orderInfos.cardStatus = orderInfo.cardStatus; | orderInfos.cardStatus = orderInfo.cardStatus; | ||||
orderInfos.obuId = orderInfo.obuId; | orderInfos.obuId = orderInfo.obuId; | ||||
orderInfos.obuStatus = orderInfo.obuStatus; | orderInfos.obuStatus = orderInfo.obuStatus; | ||||
let arr = orderInfo.vehicleDimensions.split("x"); | |||||
let arr = orderInfo.vehicleDimensions.split("X"); | |||||
orderInfos.outlineL = parseInt(arr[0]); //外廓 长 | orderInfos.outlineL = parseInt(arr[0]); //外廓 长 | ||||
orderInfos.outlineW = parseInt(arr[1]); //外廓 宽 | orderInfos.outlineW = parseInt(arr[1]); //外廓 宽 | ||||
orderInfos.outlineH = parseInt(arr[2].substring(0, arr[2].length - 2)); //外廓 高 | orderInfos.outlineH = parseInt(arr[2].substring(0, arr[2].length - 2)); //外廓 高 | ||||
.then(() => { | .then(() => { | ||||
tools.hideLoadingAlert(); | tools.hideLoadingAlert(); | ||||
state.showPopup = true; | state.showPopup = true; | ||||
submitVehicleQuery() | |||||
}); | }); | ||||
}; | }; | ||||
const xiangce = (val) => { | |||||
console.log("val", val) | |||||
if (state.choiceIndex == 3) { | |||||
var imageType = 1; | |||||
} else { | |||||
var imageType = 2; | |||||
} | |||||
state.changeColor = true; | |||||
uni.chooseImage({ | |||||
count: 1, //只能选取一张照片 | |||||
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有 | |||||
sourceType: ["album"], //从相册选择 | |||||
success: function (res) { | |||||
console.log("tempFilePaths[0].startsWith('file://')", res.tempFilePaths[0], res.tempFilePaths[0].startsWith('file://')) | |||||
if (state.choiceIndex == 3 || state.choiceIndex == 4) { | |||||
state.showImg = false | |||||
state.images = res.tempFilePaths[0] | |||||
state.phoneType = state.choiceIndex | |||||
state.isTakePhotoModeShow = false | |||||
return | |||||
} | |||||
}, | |||||
}) | |||||
} | |||||
const takePhoto = (val) => { | |||||
console.log("拍照", val) | |||||
state.phoneType = val; | |||||
state.showImg = true; | |||||
} | |||||
const confirmReturn = (val) => { | |||||
if (state.choiceIndex == 3) { | |||||
var imageType = 1; | |||||
} else { | |||||
var imageType = 2; | |||||
} | |||||
state.changeColor = true; | |||||
state.phoneType = 0 | |||||
state.isTakePhotoModeShow = false | |||||
uploadFile(val.tempImagePath, imageType, IFCODE.etcCarOcrCard).then((data) => { | |||||
// uploadFile(val.tempImagePath, state.choiceIndex, ocrAllQuery).then((data) => { | |||||
console.log('输出内容=====================', state.choiceIndex) | |||||
if (state.choiceIndex === "3") { | |||||
if (data.plate_a.length > 8) { | |||||
state.form.vehicleIdNum = data.plate_a.substring(0, 8); | |||||
} else { | |||||
state.form.vehicleIdNum = data.plate_a; | |||||
} | |||||
state.form.vehPosImgUrl = data.imageUrl; | |||||
} else { | |||||
state.form.vehNegImgUrl = data.imageUrl; | |||||
console.log('=====================', state.form.vehNegImgUrl, state) | |||||
} | |||||
state.isTakePhotoModeShow = false | |||||
}) | |||||
console.log("图片地址val", val.tempImagePath) | |||||
} | |||||
const takePhotoMode = (index) => { | |||||
console.log("index", index) | |||||
state.isTakePhotoModeShow = true | |||||
state.choiceIndex = index | |||||
} | |||||
const cancle = () => { | |||||
state.isTakePhotoModeShow = false | |||||
} | |||||
const camera = () => { | |||||
state.phoneType = 0 | |||||
} | |||||
// 查询重新激活记录 | |||||
const activationRecordQuery = () => { | |||||
const options = { | |||||
type: 2, | |||||
data: { | |||||
cardId: orderInfos.cardId, | |||||
obuId: orderInfos.obuId, | |||||
}, | |||||
method: "POST", | |||||
showLoading: true, | |||||
}; | |||||
return new Promise(async (resolve, reject) => { | |||||
const res = await request(IFCODE.activationRecordApi, options); | |||||
const data = stringToJson(res.bizContent); | |||||
resolve(data); | |||||
}).catch((error) => { | |||||
reject(error); | |||||
}); | |||||
} | |||||
// 提交车辆信息 | |||||
const submitVehicleQuery = () => { | |||||
const options = { | |||||
type: 2, | |||||
data: { | |||||
cardId: orderInfos.cardId, | |||||
obuId: orderInfos.obuId, | |||||
vehPosImgUrl: state.form.vehPosImgUrl, | |||||
vehNegImgUrl: state.form.vehNegImgUrl, | |||||
vehiclePlate: orderInfos.vehiclePlate | |||||
}, | |||||
method: "POST", | |||||
}; | |||||
console.log("提交车辆信息成功", options) | |||||
request(IFCODE.submitVehicleApi, options).then(() => { | |||||
console.log("提交车辆信息成功") | |||||
}); | |||||
} | |||||
</script> | </script> | ||||
<style> | <style> | ||||
.choose-item { | .choose-item { | ||||
margin-right: 20rpx; | margin-right: 20rpx; | ||||
/* width: 50rpx; */ | |||||
// height: 50rpx; | |||||
/* border: 1rpx solid #00B38B; */ | |||||
border-radius: 50%; | border-radius: 50%; | ||||
// display: flex; | |||||
// justify-content: center; | |||||
// align-items: center; | |||||
font-size: 25rpx; | font-size: 25rpx; | ||||
// align-self: end; | |||||
.active { | .active { | ||||
width: 38rpx; | width: 38rpx; | ||||
.submit { | .submit { | ||||
margin-top: 100rpx; | margin-top: 100rpx; | ||||
margin-bottom: 30rpx; | |||||
width: 670rpx; | width: 670rpx; | ||||
height: 80rpx; | height: 80rpx; | ||||
background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | ||||
line-height: 80rpx; | line-height: 80rpx; | ||||
} | } | ||||
} | } | ||||
.picture-wrapper { | |||||
margin-top: 40rpx; | |||||
.bg { | |||||
background: #ffffff; | |||||
box-shadow: 0rpx 4rpx 13rpx 3rpx rgba(223, 223, 223, 0.8); | |||||
border-radius: 20rpx; | |||||
padding: 40rpx; | |||||
display: flex; | |||||
// align-items: center; | |||||
justify-content: space-between; | |||||
.name { | |||||
font-size: 34rpx; | |||||
font-family: Microsoft YaHei; | |||||
font-weight: 400; | |||||
color: #000000; | |||||
line-height: 34rpx; | |||||
} | |||||
.value { | |||||
margin-top: 20rpx; | |||||
font-size: 24rpx; | |||||
font-family: Microsoft YaHei; | |||||
font-weight: 400; | |||||
color: #999999; | |||||
line-height: 24rpx; | |||||
} | |||||
.tip { | |||||
margin-top: 20rpx; | |||||
text-align: center; | |||||
width: 110rpx; | |||||
height: 40rpx; | |||||
background: rgba(33, 190, 177, 0.2); | |||||
border-radius: 6rpx; | |||||
.tip-value { | |||||
font-size: 20rpx; | |||||
font-family: Microsoft YaHei; | |||||
font-weight: 400; | |||||
color: #0a8f8a; | |||||
line-height: 40rpx; | |||||
opacity: 1; | |||||
} | |||||
} | |||||
} | |||||
.icon { | |||||
width: 294rpx; | |||||
height: 188rpx; | |||||
} | |||||
} | |||||
.choice-takePhoto { | |||||
position: absolute; | |||||
bottom: 0; | |||||
background-color: white; | |||||
width: 100%; | |||||
border-radius: 20rpx 20rpx 0 0; | |||||
} | |||||
.choice-takePhoto>view:first-child { | |||||
text-align: center; | |||||
height: 80rpx; | |||||
line-height: 80rpx; | |||||
border-bottom: 1rpx solid rgba(127, 127, 127, 0.3); | |||||
background-color: white; | |||||
} | |||||
.choice-takePhoto>view:last-child { | |||||
text-align: center; | |||||
height: 80rpx; | |||||
line-height: 80rpx; | |||||
border-top: 6rpx solid rgba(127, 127, 127, 0.1); | |||||
background-color: white; | |||||
} | |||||
.choice-takePhoto>view { | |||||
text-align: center; | |||||
height: 80rpx; | |||||
line-height: 80rpx; | |||||
background-color: white; | |||||
} | |||||
.choice-takePhoto-wrap { | |||||
width: 100%; | |||||
height: 100vh; | |||||
background-color: rgba(127, 127, 127, 0.2); | |||||
position: fixed; | |||||
left: 0; | |||||
top: 0; | |||||
z-index: 11111; | |||||
} | |||||
</style> | </style> |
const cancel = () => { | const cancel = () => { | ||||
state.flag = true; | state.flag = true; | ||||
state.showPopup = false; | state.showPopup = false; | ||||
uni.navigateTo({ | |||||
url: `/subpackage/after-sale/deviceInfo/deviceInfo` | |||||
}) | |||||
} | } | ||||
</script> | </script> | ||||
name: "寄回", | name: "寄回", | ||||
val: "1", | val: "1", | ||||
}, | }, | ||||
{ | |||||
name: "不寄回", | |||||
val: "0", | |||||
}, | |||||
// { | |||||
// name: "不寄回", | |||||
// val: "0", | |||||
// }, | |||||
]); | ]); | ||||
const radiolist2 = reactive([{ | const radiolist2 = reactive([{ |
<view>ETC卡号:{{item.cardId}}<text class="payStatus">{{item.payStatusC}}</text></view> | <view>ETC卡号:{{item.cardId}}<text class="payStatus">{{item.payStatusC}}</text></view> | ||||
<view>充值金额:¥{{item.rechargeMoney/100}}</view> | <view>充值金额:¥{{item.rechargeMoney/100}}</view> | ||||
<view>申请时间:{{item.insertTime}}</view> | <view>申请时间:{{item.insertTime}}</view> | ||||
<view>圈存状态:{{item.chargeStatus}}</view> | |||||
</view> | </view> | ||||
<view style="text-align: center;margin: 20rpx;" v-if="state.flags">我是有底线的~</view> | |||||
</view> | </view> | ||||
<view style="text-align: center;margin: 20rpx;" v-if="state.flags">我是有底线的</view> | |||||
<view class="noContent" v-if="!state.newList.length">暂无消费明细</view> | <view class="noContent" v-if="!state.newList.length">暂无消费明细</view> | ||||
</template> | </template> | ||||
export const ETCProductStatusListQueryApi = "448e81a599fe49b5b7f90f4af3ecae06" //ETC产品状态名单查询 | export const ETCProductStatusListQueryApi = "448e81a599fe49b5b7f90f4af3ecae06" //ETC产品状态名单查询 | ||||
export const ETCProductStatusListQueryDetailsApi = "3b8fdabde0aa4db59be440cd3d688d72" //ETC产品状态名单查询详情 | export const ETCProductStatusListQueryDetailsApi = "3b8fdabde0aa4db59be440cd3d688d72" //ETC产品状态名单查询详情 | ||||
export const DataSynchronizationApi = "1ed5f05a48d24ee8985a4fa104e8ef3e" //订单数据同步到老系统接口 | export const DataSynchronizationApi = "1ed5f05a48d24ee8985a4fa104e8ef3e" //订单数据同步到老系统接口 | ||||
export const isSubmitOrderApi = "3cec5ab7db63439186bda5a054c5fab7" //老中台-检测能否提交订单 | |||||
export const isSubmitOrderApi = "3cec5ab7db63439186bda5a054c5fab7" //老中台-检测能否提交订单 | |||||
export const activationRecordApi = "1be22d30f08a4f10958a4b76dcfae6cf" //查询重新激活记录限制 | |||||
export const submitVehicleApi = "e35daf84891549afabcbf86b4ed7e2e3" //重新激活提交车辆信息 |