@@ -1,3 +1,4 @@ | |||
<<<<<<< HEAD | |||
<template> | |||
<navBar title="九州ETC"></navBar> | |||
<navBgCar></navBgCar> | |||
@@ -459,4 +460,475 @@ | |||
line-height: 80rpx; | |||
} | |||
} | |||
======= | |||
<template> | |||
<navBar title="九州ETC"></navBar> | |||
<navBgCar></navBgCar> | |||
<view class="content-wrap"> | |||
<!-- 车牌输入 --> | |||
<view class="car-input"> | |||
<view class="title">请输入申办车牌</view> | |||
<car-number-input @numberInputResult="carNumber"></car-number-input> | |||
</view> | |||
<!-- 车牌颜色 --> | |||
<view class="chepai-lane"> | |||
<view class="title">选择车牌颜色</view> | |||
<numberplate-color :numberplate="state.data.vehiclePlateNumber" :numberplateCor="{ id: 0 }" | |||
@numberplateResult="checkNumberplateColor"> | |||
</numberplate-color> | |||
</view> | |||
<!-- 收货地址 --> | |||
<view v-if="!state.data.address" class="address-lane"> | |||
<view class="title">请选择或新增收货地址</view> | |||
<view style="margin-top: 30rpx" class="action"> | |||
<button type="default" class="button" @click="state.show = true"> | |||
添加收货地址 | |||
</button> | |||
</view> | |||
</view> | |||
<view v-if="state.data.address" class="address-lane"> | |||
<view class="title">收货地址</view> | |||
<view @click="state.show = true" class="address-content" style="margin-top: 30rpx"> | |||
<view class="flex"> | |||
<image :showLoading="true" :src="`${$imgUrl}applyCard/location.png`" | |||
style="width: 48rpx; height: 48rpx"> | |||
</image> | |||
<view style="margin-left: 18rpx" class=""> | |||
<view class="address"> | |||
{{ state.data.region + state.data.address }} | |||
</view> | |||
<view style="margin-top: 15rpx" class="flex"> | |||
<view class="name"> | |||
{{ state.data.consignee }} | |||
</view> | |||
<view class="phone"> | |||
{{ state.data.consigneeTel }} | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="arror"> > </view> | |||
</view> | |||
<view style="margin-top: 30rpx" class="action"> | |||
<button type="default" class="button" @click="nextAction()"> | |||
下一步 | |||
</button> | |||
</view> | |||
</view> | |||
</view> | |||
<!-- 地址弹窗 --> | |||
<u-popup mode="bottom" v-model="state.show"> | |||
<view class="address-line"> | |||
<view v-if="state.addressArray" v-for="(item, index) in state.addressArray" :key="index" | |||
@click="addressSelected(item)" style="margin-bottom: 60rpx" class="flex-bettwen"> | |||
<view class="flex"> | |||
<view class="xing"> | |||
{{ item.consignee.charAt(0) }} | |||
</view> | |||
<view class="content"> | |||
<view class="flex"> | |||
<view class="name"> | |||
{{ item.consignee }} | |||
</view> | |||
<view class="phone"> | |||
{{ item.consigneeTel }} | |||
</view> | |||
</view> | |||
<view class="address"> | |||
{{ item.region + item.address }} | |||
</view> | |||
</view> | |||
</view> | |||
<view @click.stop="editAddress(item)" style="margin-left: 80rpx" class="picture"> | |||
<image :showLoading="true" :src="`${$imgUrl}applyCard/edit.png`" | |||
style="width: 48rpx; height: 48rpx"></image> | |||
</view> | |||
</view> | |||
<view :style="state.addressArray ? 'margin-top: 60rpx;' : ''" class="action-bottom"> | |||
<button type="default" class="button" @click="goToAddAddress()"> | |||
添加收货地址 | |||
</button> | |||
</view> | |||
</view> | |||
</u-popup> | |||
</template> | |||
<script setup lang="ts"> | |||
/*导航*/ | |||
import navBgCar from "./components/nav-bg-car1"; | |||
import carNumberInput from "@/components/car-number-input/car-number-input.vue"; | |||
import numberplateColor from "./components/layout-numberplate-color"; | |||
import { | |||
getItem, | |||
StorageKeys | |||
} from "@/utils/storage"; | |||
import { | |||
stringToJson | |||
} from "@/utils/network/encryption"; | |||
import navBar from "../components/nav-bar/nav-bar2.vue"; | |||
import { | |||
onLoad, | |||
onShow | |||
} from "@dcloudio/uni-app"; | |||
import { | |||
addressQuery, | |||
etcCreatOrder, | |||
etcVehiclePlateVer, | |||
searchOrder | |||
} from "@/utils/network/api.js"; | |||
import { | |||
request | |||
} from "@/utils/network/request.js"; | |||
import { | |||
reactive | |||
} from "vue"; | |||
import { | |||
msg | |||
} from "@/utils/utils"; | |||
const state = reactive({ | |||
data: { | |||
vehiclePlate: undefined, //车牌号 | |||
vehiclePlateNumber: "贵A1234", //车牌号 | |||
vehiclePlateColor: 0, //车盘颜色 | |||
type: "0", //车牌类型 | |||
userType: "1", | |||
whetherToMail: 0, //是否需要邮寄 小程序默认邮寄 | |||
orderSource: "WECHAT", | |||
opId: "", | |||
consignee: "", //收货人 | |||
consigneeTel: "", //收货电话 | |||
region: "", | |||
address: "", | |||
postalCode: "", | |||
}, | |||
show: false, | |||
addressArray: undefined, | |||
}); | |||
/* 选择车牌颜色 */ | |||
const checkNumberplateColor = (item: any) => { | |||
state.data.vehiclePlateColor = item.id; | |||
}; | |||
const goToAddAddress = () => { | |||
uni.navigateTo({ | |||
url: "/applyCard/addAddress", | |||
}); | |||
}; | |||
const editAddress = (val) => { | |||
uni.navigateTo({ | |||
url: `/applyCard/editAddress?content=` + JSON.stringify(val), | |||
}); | |||
}; | |||
const carNumber = (val: any) => { | |||
state.data.vehiclePlate = val; | |||
state.data.vehiclePlateNumber = val | |||
}; | |||
const addressSelected = (val: any) => { | |||
state.data = { | |||
...state.data, | |||
...val, | |||
}; | |||
state.show = false; | |||
}; | |||
const nextAction = () => { | |||
if (!state.data.vehiclePlate) { | |||
msg('请输入申办车牌'); | |||
return; | |||
} | |||
state.data.vehiclePlate = state.data.vehiclePlate.trim(); | |||
console.log(state.data.vehiclePlate) | |||
console.log(state.data.vehiclePlate.length) | |||
if (state.data.vehiclePlate.length < 7) { | |||
msg('请输入正确的申办车牌'); | |||
return; | |||
} | |||
//1.优先车牌校验 2.在进行订单创建 | |||
var vehicleData = { | |||
vehiclePlate: state.data.vehiclePlate, | |||
vehiclePlateColor: state.data.vehiclePlateColor, | |||
}; | |||
const options = { | |||
type: 2, | |||
data: vehicleData, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(etcVehiclePlateVer, options).then((res) => { | |||
var data = state.data; | |||
const options = { | |||
type: 2, | |||
data: data, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(etcCreatOrder, options).then((res) => { | |||
console.log(res); | |||
if (res.statusCode === 600) { | |||
orderGoAction() | |||
} else { | |||
const data = stringToJson(res.bizContent); | |||
if (state.data.userType === "1") { | |||
uni.navigateTo({ | |||
url: `/applyCard/opening-account-people?orderId=${data.orderId}&&vehiclePlateColor=${state.data.vehiclePlateColor}`, | |||
}); | |||
} else { | |||
uni.navigateTo({ | |||
url: `/applyCard/opening-account-unit?orderId=${data.orderId}&&vehiclePlateColor=${state.data.vehiclePlateColor}`, | |||
}); | |||
} | |||
} | |||
}); | |||
}); | |||
}; | |||
//按照订单阶段去跳转 | |||
const orderGoAction = () => { | |||
var orderParmas = { | |||
vehicleId: state.data.vehiclePlate + '_' + state.data.vehiclePlateColor, | |||
opId: getItem(StorageKeys.OpenId), | |||
source: 'WECHAT' | |||
} | |||
const options = { | |||
type: 2, | |||
data: orderParmas, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(searchOrder, options).then((res) => { | |||
const data = stringToJson(res.bizContent); | |||
orderStepGoActon(data) | |||
}); | |||
} | |||
//订单状态舔砖 | |||
const orderStepGoActon = (val: any) => { | |||
//完成填写基本信息 | |||
if (val.orderStep === 1) { | |||
if (state.data.userType === "1") { | |||
uni.navigateTo({ | |||
url: `/applyCard/opening-account-people?orderId=${val.orderId}&&vehiclePlateColor=${val.vehiclePlateColor}`, | |||
}); | |||
} else { | |||
uni.navigateTo({ | |||
url: `/applyCard/opening-account-unit?orderId=${val.orderId}&&vehiclePlateColor=${val.vehiclePlateColor}`, | |||
}); | |||
} | |||
} else if (val.orderStep === 2) { | |||
uni.navigateTo({ | |||
url: `/applyCard/car-release?orderId=${val.orderId}&&vehiclePlateColor=${val.vehiclePlateColor}`, | |||
}); | |||
} else if (val.orderStep === 3) { | |||
uni.navigateTo({ | |||
url: `/applyCard/choice-product?orderId=${val.orderId}`, | |||
}); | |||
} else if (val.orderStep === 4) { | |||
uni.navigateTo({ | |||
url: `/applyCard/product-detail?orderId=${val.orderId}&&clientFee=${val.product.clientFee}&&id=${val.productId}`, | |||
}); | |||
} | |||
}; | |||
onLoad((option: any) => { | |||
state.data.opId = getItem(StorageKeys.OpenId); | |||
state.data.type = option.type; //客车 | |||
state.data.userType = option.userType; | |||
}); | |||
onShow(() => { | |||
var data = { | |||
openId: getItem(StorageKeys.OpenId), | |||
}; | |||
const options = { | |||
type: 2, | |||
data: data, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(addressQuery, options).then((res) => { | |||
const data = stringToJson(res.bizContent); | |||
state.addressArray = data.data; | |||
}); | |||
}); | |||
</script> | |||
<style lang="scss" scoped> | |||
.flex { | |||
display: flex; | |||
align-items: center; | |||
} | |||
.content-wrap { | |||
position: relative; | |||
margin-top: -50rpx; | |||
padding: 0rpx 30rpx; | |||
.title { | |||
font-size: 30rpx; | |||
font-family: Noto Sans S Chinese; | |||
font-weight: 400; | |||
color: #000000; | |||
line-height: 30rpx; | |||
margin-bottom: 30rpx; | |||
} | |||
.car-input {} | |||
.chepai-lane { | |||
margin-top: 60rpx; | |||
margin-bottom: 20rpx; | |||
} | |||
.address-lane { | |||
margin-bottom: 30rpx; | |||
.title { | |||
font-size: 30rpx; | |||
font-weight: 400; | |||
color: #000000; | |||
line-height: 30rpx; | |||
} | |||
} | |||
} | |||
.address-content { | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
padding-bottom: 30rpx; | |||
border-bottom: 1rpx solid #dcdcdc; | |||
.name { | |||
font-size: 26rpx; | |||
font-family: Microsoft YaHei; | |||
font-weight: 400; | |||
color: #999999; | |||
font-size: 26rpx; | |||
} | |||
.phone { | |||
font-size: 26rpx; | |||
font-family: Microsoft YaHei; | |||
font-weight: 400; | |||
color: #999999; | |||
line-height: 26rpx; | |||
margin-left: 20rpx; | |||
} | |||
.arror { | |||
width: 16rpx; | |||
height: 30rpx; | |||
color: rgba(153, 153, 153, 1); | |||
} | |||
.address { | |||
font-size: 32rpx; | |||
font-family: Microsoft YaHei; | |||
font-weight: 400; | |||
color: #333333; | |||
line-height: 32rpx; | |||
} | |||
} | |||
.address-line { | |||
padding: 20px; | |||
.flex-bettwen { | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
} | |||
.xing { | |||
width: 68rpx; | |||
height: 68rpx; | |||
background: rgba(0, 179, 139, 0.2); | |||
border-radius: 50%; | |||
font-size: 26rpx; | |||
font-weight: 400; | |||
color: #00b38b; | |||
line-height: 68rpx; | |||
text-align: center; | |||
} | |||
.content { | |||
margin-left: 20px; | |||
.name { | |||
font-size: 30rpx; | |||
font-family: Microsoft YaHei; | |||
font-weight: 500; | |||
color: #333333; | |||
} | |||
.phone { | |||
margin-left: 10rpx; | |||
font-size: 24rpx; | |||
font-family: Microsoft YaHei; | |||
font-weight: 400; | |||
color: #999999; | |||
line-height: 36rpx; | |||
} | |||
.address { | |||
margin-top: 10rpx; | |||
font-size: 26rpx; | |||
font-family: Microsoft YaHei; | |||
font-weight: 400; | |||
color: #333333; | |||
line-height: 36rpx; | |||
} | |||
.picture { | |||
width: 48rpx; | |||
height: 48rpx; | |||
} | |||
.editIcon { | |||
width: 48rpx; | |||
height: 48rpx; | |||
} | |||
} | |||
} | |||
.action { | |||
padding-bottom: 100rpx; | |||
.button { | |||
height: 80rpx; | |||
background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||
border-radius: 40rpx; | |||
font-size: 32rpx; | |||
font-weight: 400; | |||
color: #ffffff; | |||
line-height: 80rpx; | |||
} | |||
} | |||
.action-bottom { | |||
padding-bottom: 30rpx; | |||
.button { | |||
height: 80rpx; | |||
background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||
border-radius: 40rpx; | |||
font-size: 32rpx; | |||
font-weight: 400; | |||
color: #ffffff; | |||
line-height: 80rpx; | |||
} | |||
} | |||
>>>>>>> 635b3f85aa8742588b6513074a85b40c2fa107c2 | |||
</style> |
@@ -1,319 +1,278 @@ | |||
<template> | |||
<navBar title="ETC开户新办申请-单位"></navBar> | |||
<navBgCar></navBgCar> | |||
<view class="content-wrap"> | |||
<view class="item-tips"> | |||
<view class="title"> 上传后请核对识别信息 </view> | |||
<view class="tip"> 如有错误请及时手动修改 </view> | |||
</view> | |||
<view class="picture-wrapper" @click="cardImageOcr('1')"> | |||
<view class="bg"> | |||
<view class=""> | |||
<view class="name"> 营业执照 </view> | |||
<view class="value"> 上传企业的营业执照 </view> | |||
<view class="tip"> | |||
<view class="tip-value"> 拍摄规范 </view> | |||
</view> | |||
</view> | |||
<image | |||
class="icon" | |||
src="../../static/image/applyCard/zhizhao.png" | |||
></image> | |||
</view> | |||
</view> | |||
<view class="picture-wrapper" @click="cardImageOcr('1')"> | |||
<view class="bg"> | |||
<view class=""> | |||
<view class="name"> 人像面 </view> | |||
<view class="value"> 上传身份证的人像面 </view> | |||
<view class="tip"> | |||
<view class="tip-value"> 拍摄规范 </view> | |||
</view> | |||
</view> | |||
<image | |||
class="icon" | |||
src="../../static/image/applyCard/renxiang.png" | |||
></image> | |||
</view> | |||
</view> | |||
<view class="shibie-wrapper"> | |||
<view class="title"> 识别内容如下 </view> | |||
<view class=""> | |||
<u-field | |||
v-model="state.ocrData.conmpany" | |||
input-align="right" | |||
label="公司名称" | |||
disabled="true" | |||
> | |||
</u-field> | |||
<u-field | |||
v-model="state.ocrData.type" | |||
input-align="right" | |||
label="证件类型" | |||
disabled="true" | |||
> | |||
</u-field> | |||
<u-field | |||
v-model="state.ocrData.card" | |||
input-align="right" | |||
label="证件号码" | |||
disabled="true" | |||
> | |||
</u-field> | |||
</view> | |||
</view> | |||
<view class="buchong-wrapper"> | |||
<view class="title"> 需要补充内容如下 </view> | |||
<view class=""> | |||
<u-field | |||
label-width="200" | |||
v-model="state.buchongData.conmpany" | |||
input-align="right" | |||
label="经办人名称" | |||
> | |||
</u-field> | |||
<u-field | |||
label-width="200" | |||
v-model="state.buchongData.type" | |||
input-align="right" | |||
label="经办人证件类型" | |||
> | |||
</u-field> | |||
<u-field | |||
label-width="200" | |||
v-model="state.buchongData.card" | |||
input-align="right" | |||
label="经办人证件号码" | |||
> | |||
</u-field> | |||
<u-field | |||
label-width="200" | |||
v-model="state.buchongData.phone" | |||
input-align="right" | |||
label="经办人手机号" | |||
placeholder="请手动输入联系方式" | |||
> | |||
</u-field> | |||
</view> | |||
</view> | |||
<view class="green-tip"> | |||
如识别信息有误,请手动修改,确认无误后,点击下一步! | |||
</view> | |||
<view class="action"> | |||
<button type="default" class="button" @click="savaHandle()"> | |||
下一步 | |||
</button> | |||
</view> | |||
</view> | |||
</template> | |||
<script setup lang="ts"> | |||
import { reactive } from "vue"; | |||
import navBgCar from "./components/nav-bg-car2"; | |||
import navBar from "../components/nav-bar/nav-bar2.vue"; | |||
import { pathToBase64 } from "@/utils/image-tools/index.js"; | |||
import { | |||
etcOcrCard, | |||
etcUserCardInfoSubmit, | |||
fileUpload, | |||
} from "@/utils/network/api.js"; | |||
import { request } from "@/utils/network/request.js"; | |||
import { stringToJson } from "@/utils/network/encryption"; | |||
import { onLoad } from "@dcloudio/uni-app"; | |||
const savaHandle = () => { | |||
console.log("执行点击事件"); | |||
uni.navigateTo({ | |||
url: "/applyCard/car-release", | |||
}); | |||
}; | |||
const state = reactive({ | |||
ocrData: { | |||
conmpany: "", | |||
type: "", | |||
card: "", | |||
}, | |||
buchongData: { | |||
conmpany: "", | |||
type: "", | |||
card: "", | |||
phone: "", | |||
}, | |||
}); | |||
//orc接口调用 | |||
const cardImageOcr = (val: any) => { | |||
console.log("点击了"); | |||
var imageType = val; | |||
uni.chooseImage({ | |||
count: 1, //只能选取一张照片 | |||
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有 | |||
sourceType: ["camera", "album"], //从相册选择 | |||
success: function (res) { | |||
console.log(res); | |||
pathToBase64(res.tempFilePaths[0]) | |||
.then((path) => { | |||
console.log(path); | |||
console.log("哈哈哈"); | |||
var data = { | |||
source: "1", | |||
agencyId: "52010106004", | |||
imageType: imageType, | |||
fileName: res.tempFilePaths[0], | |||
imageBase64: path, | |||
}; | |||
const options = { | |||
type: 2, | |||
data: data, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(etcOcrCard, options).then((res) => { | |||
console.log(res); | |||
const data = stringToJson(res.bizContent); | |||
}); | |||
}) | |||
.catch((error) => {}); | |||
}, | |||
}); | |||
}; | |||
onLoad((option: any) => { | |||
//state.fromOrder = option.fromOrder //是否来自订单-修改资料 | |||
}); | |||
</script> | |||
<style lang="scss" scoped> | |||
.content-wrap { | |||
position: relative; | |||
margin-top: -50rpx; | |||
padding: 0rpx 30rpx; | |||
position: relative; | |||
.action { | |||
padding-left: 20rpx; | |||
padding-right: 20rpx; | |||
padding-bottom: 30rpx; | |||
.button { | |||
height: 80rpx; | |||
background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||
border-radius: 40rpx; | |||
font-size: 32rpx; | |||
font-weight: 400; | |||
color: #ffffff; | |||
line-height: 80rpx; | |||
} | |||
} | |||
.item-tips { | |||
.title { | |||
font-size: 30rpx; | |||
font-family: Microsoft YaHei; | |||
font-weight: 400; | |||
color: #000000; | |||
line-height: 24rpx; | |||
} | |||
.tip { | |||
margin-top: 16rpx; | |||
font-size: 24rpx; | |||
font-family: Microsoft YaHei; | |||
font-weight: 400; | |||
color: #999999; | |||
line-height: 24rpx; | |||
} | |||
} | |||
.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; | |||
} | |||
} | |||
.shibie-wrapper { | |||
margin-top: 60rpx; | |||
.title { | |||
font-size: 30rpx; | |||
font-family: Microsoft YaHei; | |||
font-weight: 400; | |||
color: #000000; | |||
line-height: 30rpx; | |||
} | |||
} | |||
.buchong-wrapper { | |||
margin-top: 60rpx; | |||
.title { | |||
font-size: 30rpx; | |||
font-family: Microsoft YaHei; | |||
font-weight: 400; | |||
color: #000000; | |||
line-height: 30rpx; | |||
} | |||
} | |||
.green-tip { | |||
margin-top: 50rpx; | |||
font-size: 24rpx; | |||
font-family: Microsoft YaHei; | |||
font-weight: 400; | |||
color: #00b38b; | |||
line-height: 24rpx; | |||
margin-bottom: 60rpx; | |||
} | |||
} | |||
<template> | |||
<navBar title="ETC开户新办申请-单位"></navBar> | |||
<navBgCar></navBgCar> | |||
<view class="content-wrap"> | |||
<view class="item-tips"> | |||
<view class="title"> 上传后请核对识别信息 </view> | |||
<view class="tip"> 如有错误请及时手动修改 </view> | |||
</view> | |||
<view class="picture-wrapper" @click="cardImageOcr('1')"> | |||
<view class="bg"> | |||
<view class=""> | |||
<view class="name"> 营业执照 </view> | |||
<view class="value"> 上传企业的营业执照 </view> | |||
<view class="tip"> | |||
<view class="tip-value"> 拍摄规范 </view> | |||
</view> | |||
</view> | |||
<image class="icon" src="../../static/image/applyCard/zhizhao.png"></image> | |||
</view> | |||
</view> | |||
<view class="picture-wrapper" @click="cardImageOcr('1')"> | |||
<view class="bg"> | |||
<view class=""> | |||
<view class="name"> 人像面 </view> | |||
<view class="value"> 上传身份证的人像面 </view> | |||
<view class="tip"> | |||
<view class="tip-value"> 拍摄规范 </view> | |||
</view> | |||
</view> | |||
<image class="icon" src="../../static/image/applyCard/renxiang.png"></image> | |||
</view> | |||
</view> | |||
<view class="shibie-wrapper"> | |||
<view class="title"> 识别内容如下 </view> | |||
<view class=""> | |||
<u-field v-model="state.ocrData.conmpany" input-align="right" label="公司名称" disabled="true"> | |||
</u-field> | |||
<u-field v-model="state.ocrData.type" input-align="right" label="证件类型" disabled="true"> | |||
</u-field> | |||
<u-field v-model="state.ocrData.card" input-align="right" label="证件号码" disabled="true"> | |||
</u-field> | |||
</view> | |||
</view> | |||
<view class="buchong-wrapper"> | |||
<view class="title"> 需要补充内容如下 </view> | |||
<view class=""> | |||
<u-field label-width="200" v-model="state.buchongData.conmpany" input-align="right" label="经办人名称"> | |||
</u-field> | |||
<u-field label-width="200" v-model="state.buchongData.type" input-align="right" label="经办人证件类型"> | |||
</u-field> | |||
<u-field label-width="200" v-model="state.buchongData.card" input-align="right" label="经办人证件号码"> | |||
</u-field> | |||
<u-field label-width="200" v-model="state.buchongData.phone" input-align="right" label="经办人手机号" | |||
placeholder="请手动输入联系方式"> | |||
</u-field> | |||
</view> | |||
</view> | |||
<view class="green-tip"> | |||
如识别信息有误,请手动修改,确认无误后,点击下一步! | |||
</view> | |||
<view class="action"> | |||
<button type="default" class="button" @click="savaHandle()"> | |||
下一步 | |||
</button> | |||
</view> | |||
</view> | |||
</template> | |||
<script setup lang="ts"> | |||
import { | |||
reactive | |||
} from "vue"; | |||
import navBgCar from "./components/nav-bg-car2"; | |||
import navBar from "../components/nav-bar/nav-bar2.vue"; | |||
import { | |||
pathToBase64New | |||
} from "@/utils/image-tools/index.js"; | |||
import { | |||
ocrAllQuery | |||
} from "@/utils/network/api.js"; | |||
import { | |||
request | |||
} from "@/utils/network/request.js"; | |||
import { | |||
stringToJson | |||
} from "@/utils/network/encryption"; | |||
import { | |||
onLoad | |||
} from "@dcloudio/uni-app"; | |||
const savaHandle = () => { | |||
console.log("执行点击事件"); | |||
uni.navigateTo({ | |||
url: "/applyCard/car-release", | |||
}); | |||
}; | |||
const state = reactive({ | |||
ocrData: { | |||
conmpany: "", | |||
type: "", | |||
card: "", | |||
}, | |||
buchongData: { | |||
conmpany: "", | |||
type: "", | |||
card: "", | |||
phone: "", | |||
}, | |||
}); | |||
//orc接口调用 | |||
const cardImageOcr = (val: any) => { | |||
var imageType = val; | |||
uni.chooseImage({ | |||
count: 1, //只能选取一张照片 | |||
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有 | |||
sourceType: ["camera", "album"], //从相册选择 | |||
success: function(res) { | |||
console.log(res); | |||
pathToBase64New(res.tempFilePaths[0]) | |||
.then((path) => { | |||
var data = { | |||
type: 'business_license', | |||
base64: path, | |||
}; | |||
const options = { | |||
type: 2, | |||
data: data, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(ocrAllQuery, options).then((res) => { | |||
console.log(res); | |||
const data = stringToJson(res.bizContent); | |||
}); | |||
}) | |||
.catch((error) => {}); | |||
}, | |||
}); | |||
}; | |||
onLoad((option: any) => { | |||
//state.fromOrder = option.fromOrder //是否来自订单-修改资料 | |||
}); | |||
</script> | |||
<style lang="scss" scoped> | |||
.content-wrap { | |||
position: relative; | |||
margin-top: -50rpx; | |||
padding: 0rpx 30rpx; | |||
position: relative; | |||
.action { | |||
padding-left: 20rpx; | |||
padding-right: 20rpx; | |||
padding-bottom: 30rpx; | |||
.button { | |||
height: 80rpx; | |||
background: linear-gradient(-90deg, #43a1e0 0%, #13e7c1 100%); | |||
border-radius: 40rpx; | |||
font-size: 32rpx; | |||
font-weight: 400; | |||
color: #ffffff; | |||
line-height: 80rpx; | |||
} | |||
} | |||
.item-tips { | |||
.title { | |||
font-size: 30rpx; | |||
font-family: Microsoft YaHei; | |||
font-weight: 400; | |||
color: #000000; | |||
line-height: 24rpx; | |||
} | |||
.tip { | |||
margin-top: 16rpx; | |||
font-size: 24rpx; | |||
font-family: Microsoft YaHei; | |||
font-weight: 400; | |||
color: #999999; | |||
line-height: 24rpx; | |||
} | |||
} | |||
.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; | |||
} | |||
} | |||
.shibie-wrapper { | |||
margin-top: 60rpx; | |||
.title { | |||
font-size: 30rpx; | |||
font-family: Microsoft YaHei; | |||
font-weight: 400; | |||
color: #000000; | |||
line-height: 30rpx; | |||
} | |||
} | |||
.buchong-wrapper { | |||
margin-top: 60rpx; | |||
.title { | |||
font-size: 30rpx; | |||
font-family: Microsoft YaHei; | |||
font-weight: 400; | |||
color: #000000; | |||
line-height: 30rpx; | |||
} | |||
} | |||
.green-tip { | |||
margin-top: 50rpx; | |||
font-size: 24rpx; | |||
font-family: Microsoft YaHei; | |||
font-weight: 400; | |||
color: #00b38b; | |||
line-height: 24rpx; | |||
margin-bottom: 60rpx; | |||
} | |||
} | |||
</style> |
@@ -1,196 +1,272 @@ | |||
function getLocalFilePath(path) { | |||
if (path.indexOf('_www') === 0 || path.indexOf('_doc') === 0 || path.indexOf('_documents') === 0 || path.indexOf('_downloads') === 0) { | |||
return path | |||
} | |||
if (path.indexOf('file://') === 0) { | |||
return path | |||
} | |||
if (path.indexOf('/storage/emulated/0/') === 0) { | |||
return path | |||
} | |||
if (path.indexOf('/') === 0) { | |||
var localFilePath = plus.io.convertAbsoluteFileSystem(path) | |||
if (localFilePath !== path) { | |||
return localFilePath | |||
} else { | |||
path = path.substr(1) | |||
} | |||
} | |||
return '_www/' + path | |||
function getLocalFilePath(path) { | |||
if (path.indexOf('_www') === 0 || path.indexOf('_doc') === 0 || path.indexOf('_documents') === 0 || path.indexOf( | |||
'_downloads') === 0) { | |||
return path | |||
} | |||
if (path.indexOf('file://') === 0) { | |||
return path | |||
} | |||
if (path.indexOf('/storage/emulated/0/') === 0) { | |||
return path | |||
} | |||
if (path.indexOf('/') === 0) { | |||
var localFilePath = plus.io.convertAbsoluteFileSystem(path) | |||
if (localFilePath !== path) { | |||
return localFilePath | |||
} else { | |||
path = path.substr(1) | |||
} | |||
} | |||
return '_www/' + path | |||
} | |||
function dataUrlToBase64(str) { | |||
var array = str.split(',') | |||
return array[array.length - 1] | |||
} | |||
var index = 0 | |||
function getNewFileId() { | |||
return Date.now() + String(index++) | |||
} | |||
function biggerThan(v1, v2) { | |||
var v1Array = v1.split('.') | |||
var v2Array = v2.split('.') | |||
var update = false | |||
for (var index = 0; index < v2Array.length; index++) { | |||
var diff = v1Array[index] - v2Array[index] | |||
if (diff !== 0) { | |||
update = diff > 0 | |||
break | |||
} | |||
} | |||
return update | |||
} | |||
export function pathToBase64(path) { | |||
return new Promise(function(resolve, reject) { | |||
if (typeof window === 'object' && 'document' in window) { | |||
if (typeof FileReader === 'function') { | |||
var xhr = new XMLHttpRequest() | |||
xhr.open('GET', path, true) | |||
xhr.responseType = 'blob' | |||
xhr.onload = function() { | |||
if (this.status === 200) { | |||
let fileReader = new FileReader() | |||
fileReader.onload = function(e) { | |||
resolve(e.target.result) | |||
} | |||
fileReader.onerror = reject | |||
fileReader.readAsDataURL(this.response) | |||
} | |||
} | |||
xhr.onerror = reject | |||
xhr.send() | |||
return | |||
} | |||
var canvas = document.createElement('canvas') | |||
var c2x = canvas.getContext('2d') | |||
var img = new Image | |||
img.onload = function() { | |||
canvas.width = img.width | |||
canvas.height = img.height | |||
c2x.drawImage(img, 0, 0) | |||
resolve(canvas.toDataURL()) | |||
canvas.height = canvas.width = 0 | |||
} | |||
img.onerror = reject | |||
img.src = path | |||
return | |||
} | |||
if (typeof plus === 'object') { | |||
plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) { | |||
entry.file(function(file) { | |||
var fileReader = new plus.io.FileReader() | |||
fileReader.onload = function(data) { | |||
resolve(data.target.result) | |||
} | |||
fileReader.onerror = function(error) { | |||
reject(error) | |||
} | |||
fileReader.readAsDataURL(file) | |||
}, function(error) { | |||
reject(error) | |||
}) | |||
}, function(error) { | |||
reject(error) | |||
}) | |||
return | |||
} | |||
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) { | |||
wx.getFileSystemManager().readFile({ | |||
filePath: path, | |||
encoding: 'base64', | |||
success: function(res) { | |||
resolve('data:image/png;base64,' + res.data) | |||
}, | |||
fail: function(error) { | |||
reject(error) | |||
} | |||
}) | |||
return | |||
} | |||
reject(new Error('not support')) | |||
}) | |||
} | |||
export function base64ToPath(base64) { | |||
return new Promise(function(resolve, reject) { | |||
if (typeof window === 'object' && 'document' in window) { | |||
base64 = base64.split(',') | |||
var type = base64[0].match(/:(.*?);/)[1] | |||
var str = atob(base64[1]) | |||
var n = str.length | |||
var array = new Uint8Array(n) | |||
while (n--) { | |||
array[n] = str.charCodeAt(n) | |||
} | |||
return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([array], { | |||
type: type | |||
}))) | |||
} | |||
var extName = base64.split(',')[0].match(/data\:\S+\/(\S+);/) | |||
if (extName) { | |||
extName = extName[1] | |||
} else { | |||
reject(new Error('base64 error')) | |||
} | |||
var fileName = getNewFileId() + '.' + extName | |||
if (typeof plus === 'object') { | |||
var basePath = '_doc' | |||
var dirPath = 'uniapp_temp' | |||
var filePath = basePath + '/' + dirPath + '/' + fileName | |||
if (!biggerThan(plus.os.name === 'Android' ? '1.9.9.80627' : '1.9.9.80472', plus.runtime | |||
.innerVersion)) { | |||
plus.io.resolveLocalFileSystemURL(basePath, function(entry) { | |||
entry.getDirectory(dirPath, { | |||
create: true, | |||
exclusive: false, | |||
}, function(entry) { | |||
entry.getFile(fileName, { | |||
create: true, | |||
exclusive: false, | |||
}, function(entry) { | |||
entry.createWriter(function(writer) { | |||
writer.onwrite = function() { | |||
resolve(filePath) | |||
} | |||
writer.onerror = reject | |||
writer.seek(0) | |||
writer.writeAsBinary(dataUrlToBase64(base64)) | |||
}, reject) | |||
}, reject) | |||
}, reject) | |||
}, reject) | |||
return | |||
} | |||
var bitmap = new plus.nativeObj.Bitmap(fileName) | |||
bitmap.loadBase64Data(base64, function() { | |||
bitmap.save(filePath, {}, function() { | |||
bitmap.clear() | |||
resolve(filePath) | |||
}, function(error) { | |||
bitmap.clear() | |||
reject(error) | |||
}) | |||
}, function(error) { | |||
bitmap.clear() | |||
reject(error) | |||
}) | |||
return | |||
} | |||
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) { | |||
var filePath = wx.env.USER_DATA_PATH + '/' + fileName | |||
wx.getFileSystemManager().writeFile({ | |||
filePath: filePath, | |||
data: dataUrlToBase64(base64), | |||
encoding: 'base64', | |||
success: function() { | |||
resolve(filePath) | |||
}, | |||
fail: function(error) { | |||
reject(error) | |||
} | |||
}) | |||
return | |||
} | |||
reject(new Error('not support')) | |||
}) | |||
} | |||
export function pathToBase64New(path) { | |||
return new Promise(function(resolve, reject) { | |||
if (typeof window === 'object' && 'document' in window) { | |||
if (typeof FileReader === 'function') { | |||
var xhr = new XMLHttpRequest() | |||
xhr.open('GET', path, true) | |||
xhr.responseType = 'blob' | |||
xhr.onload = function() { | |||
if (this.status === 200) { | |||
let fileReader = new FileReader() | |||
fileReader.onload = function(e) { | |||
resolve(e.target.result) | |||
} | |||
fileReader.onerror = reject | |||
fileReader.readAsDataURL(this.response) | |||
} | |||
} | |||
xhr.onerror = reject | |||
xhr.send() | |||
return | |||
} | |||
var canvas = document.createElement('canvas') | |||
var c2x = canvas.getContext('2d') | |||
var img = new Image | |||
img.onload = function() { | |||
canvas.width = img.width | |||
canvas.height = img.height | |||
c2x.drawImage(img, 0, 0) | |||
resolve(canvas.toDataURL()) | |||
canvas.height = canvas.width = 0 | |||
} | |||
img.onerror = reject | |||
img.src = path | |||
return | |||
} | |||
if (typeof plus === 'object') { | |||
plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) { | |||
entry.file(function(file) { | |||
var fileReader = new plus.io.FileReader() | |||
fileReader.onload = function(data) { | |||
resolve(data.target.result) | |||
} | |||
fileReader.onerror = function(error) { | |||
reject(error) | |||
} | |||
fileReader.readAsDataURL(file) | |||
}, function(error) { | |||
reject(error) | |||
}) | |||
}, function(error) { | |||
reject(error) | |||
}) | |||
return | |||
} | |||
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) { | |||
wx.getFileSystemManager().readFile({ | |||
filePath: path, | |||
encoding: 'base64', | |||
success: function(res) { | |||
resolve(res.data) | |||
}, | |||
fail: function(error) { | |||
reject(error) | |||
} | |||
}) | |||
return | |||
} | |||
reject(new Error('not support')) | |||
}) | |||
} | |||
function dataUrlToBase64(str) { | |||
var array = str.split(',') | |||
return array[array.length - 1] | |||
} | |||
var index = 0 | |||
function getNewFileId() { | |||
return Date.now() + String(index++) | |||
} | |||
function biggerThan(v1, v2) { | |||
var v1Array = v1.split('.') | |||
var v2Array = v2.split('.') | |||
var update = false | |||
for (var index = 0; index < v2Array.length; index++) { | |||
var diff = v1Array[index] - v2Array[index] | |||
if (diff !== 0) { | |||
update = diff > 0 | |||
break | |||
} | |||
} | |||
return update | |||
} | |||
export function pathToBase64(path) { | |||
return new Promise(function(resolve, reject) { | |||
if (typeof window === 'object' && 'document' in window) { | |||
if (typeof FileReader === 'function') { | |||
var xhr = new XMLHttpRequest() | |||
xhr.open('GET', path, true) | |||
xhr.responseType = 'blob' | |||
xhr.onload = function() { | |||
if (this.status === 200) { | |||
let fileReader = new FileReader() | |||
fileReader.onload = function(e) { | |||
resolve(e.target.result) | |||
} | |||
fileReader.onerror = reject | |||
fileReader.readAsDataURL(this.response) | |||
} | |||
} | |||
xhr.onerror = reject | |||
xhr.send() | |||
return | |||
} | |||
var canvas = document.createElement('canvas') | |||
var c2x = canvas.getContext('2d') | |||
var img = new Image | |||
img.onload = function() { | |||
canvas.width = img.width | |||
canvas.height = img.height | |||
c2x.drawImage(img, 0, 0) | |||
resolve(canvas.toDataURL()) | |||
canvas.height = canvas.width = 0 | |||
} | |||
img.onerror = reject | |||
img.src = path | |||
return | |||
} | |||
if (typeof plus === 'object') { | |||
plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) { | |||
entry.file(function(file) { | |||
var fileReader = new plus.io.FileReader() | |||
fileReader.onload = function(data) { | |||
resolve(data.target.result) | |||
} | |||
fileReader.onerror = function(error) { | |||
reject(error) | |||
} | |||
fileReader.readAsDataURL(file) | |||
}, function(error) { | |||
reject(error) | |||
}) | |||
}, function(error) { | |||
reject(error) | |||
}) | |||
return | |||
} | |||
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) { | |||
wx.getFileSystemManager().readFile({ | |||
filePath: path, | |||
encoding: 'base64', | |||
success: function(res) { | |||
resolve('data:image/png;base64,' + res.data) | |||
}, | |||
fail: function(error) { | |||
reject(error) | |||
} | |||
}) | |||
return | |||
} | |||
reject(new Error('not support')) | |||
}) | |||
} | |||
export function base64ToPath(base64) { | |||
return new Promise(function(resolve, reject) { | |||
if (typeof window === 'object' && 'document' in window) { | |||
base64 = base64.split(',') | |||
var type = base64[0].match(/:(.*?);/)[1] | |||
var str = atob(base64[1]) | |||
var n = str.length | |||
var array = new Uint8Array(n) | |||
while (n--) { | |||
array[n] = str.charCodeAt(n) | |||
} | |||
return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([array], { type: type }))) | |||
} | |||
var extName = base64.split(',')[0].match(/data\:\S+\/(\S+);/) | |||
if (extName) { | |||
extName = extName[1] | |||
} else { | |||
reject(new Error('base64 error')) | |||
} | |||
var fileName = getNewFileId() + '.' + extName | |||
if (typeof plus === 'object') { | |||
var basePath = '_doc' | |||
var dirPath = 'uniapp_temp' | |||
var filePath = basePath + '/' + dirPath + '/' + fileName | |||
if (!biggerThan(plus.os.name === 'Android' ? '1.9.9.80627' : '1.9.9.80472', plus.runtime.innerVersion)) { | |||
plus.io.resolveLocalFileSystemURL(basePath, function(entry) { | |||
entry.getDirectory(dirPath, { | |||
create: true, | |||
exclusive: false, | |||
}, function(entry) { | |||
entry.getFile(fileName, { | |||
create: true, | |||
exclusive: false, | |||
}, function(entry) { | |||
entry.createWriter(function(writer) { | |||
writer.onwrite = function() { | |||
resolve(filePath) | |||
} | |||
writer.onerror = reject | |||
writer.seek(0) | |||
writer.writeAsBinary(dataUrlToBase64(base64)) | |||
}, reject) | |||
}, reject) | |||
}, reject) | |||
}, reject) | |||
return | |||
} | |||
var bitmap = new plus.nativeObj.Bitmap(fileName) | |||
bitmap.loadBase64Data(base64, function() { | |||
bitmap.save(filePath, {}, function() { | |||
bitmap.clear() | |||
resolve(filePath) | |||
}, function(error) { | |||
bitmap.clear() | |||
reject(error) | |||
}) | |||
}, function(error) { | |||
bitmap.clear() | |||
reject(error) | |||
}) | |||
return | |||
} | |||
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) { | |||
var filePath = wx.env.USER_DATA_PATH + '/' + fileName | |||
wx.getFileSystemManager().writeFile({ | |||
filePath: filePath, | |||
data: dataUrlToBase64(base64), | |||
encoding: 'base64', | |||
success: function() { | |||
resolve(filePath) | |||
}, | |||
fail: function(error) { | |||
reject(error) | |||
} | |||
}) | |||
return | |||
} | |||
reject(new Error('not support')) | |||
}) | |||
} |
@@ -1,103 +1,104 @@ | |||
/* 接口中常量 */ | |||
export const appId = "52030131"; //应用appid 综合业务支撑平台使用 | |||
export const loginTime = 86400; //登录有效时间(单位s) 1天 | |||
export const wechatPayConfigId = "6a9a54bc01f6443faea7ffe132b19f6"; //支付配置编号 微信小程序支付 | |||
export const wechatAppID = "wx008c60533388527a"; //小程序APPid | |||
export const wechatSecret = "95197718b43b497f02732bd9f8011080"; //小程序AppSecret | |||
/*统一 会员平台*/ | |||
export const sendCode = "2"; //统一会员平台发送验证码接口 | |||
export const regist = "3"; // 统一会员平台个人账号注册 | |||
export const login = "4"; //统一会员平台个人账号手机号密码登录 | |||
export const loginCode = "55"; //统一会员平台个人账号手机号验证码登录 | |||
export const resetPwd = "52"; //会员平台个人账号修改密码手机号验证码接口 | |||
export const getToken = "5"; //统一会员平台登录确认接口(用于换取openId和token) | |||
/*地址管理*/ | |||
export const addressQuery = "27"; //地址管理查询 | |||
export const addOrEditAddressQuery = "29"; //地址管理新增或编辑 | |||
export const fileUpload = "17"; // 文件上传 | |||
export const addressDelete = "28"; // 地址删除 | |||
/*下单CSMSN*/ | |||
export const etcVehiclePlateVer = "35"; //车牌校验 | |||
export const etcCreatOrder = "6"; //CSMSN-创建订单 | |||
export const searchOrder = "156";//8.54.CSMSN-根据车辆ID、操作人、来源获取未完成办理订单 | |||
export const etcOcrCard = "15"; //CSMSN-OCR识别身份证 | |||
export const etcCarOcrCard = "16"; //CSMSN-OCR识别行驶证 | |||
export const etcUserCardInfoSubmit = "22"; // CSMSN-提交个人用户信息 | |||
export const etcUserCardInfoChange = "21"; // CSMSN-更改个人用户信息 | |||
export const etcCarCardInfoSubmit = "18"; // CSMSN-提交车辆信息 | |||
export const etcQyList = "66"; // 统一会员平台可签约渠道列表查询接口 | |||
/*******************蓝牙 start*************/ | |||
/* 开卡 * 50->51->52->73->51*/ | |||
export const writeCardApply = "50"; //BDS-写卡指令申请 | |||
export const writeCardBack = "51"; //BDS-写卡指令返回 | |||
export const writeCardConfirm = "53"; //BDS-写卡确认 | |||
export const bindCardAndObu = "73"; //.BDS-卡签绑定 | |||
/* OBU发行 */ | |||
export const writeObuApply = "77"; //BDS-OBU发行申请 | |||
export const modifyObuSysInfo = "74"; //VFJ-修改系统信息 | |||
export const modifyObuVehicleInfo = "75"; //VFJ-修改车辆信息 | |||
export const obuConfirm = "78"; //BDS-OBU发行确认 | |||
export const searchObuInfo = "153"; //BDS-OBU信息查询 | |||
export const searchVehicleInfo = "154"; //BDS-车辆信息查询 | |||
export const installApply = "79"; //BDS-安装申请 | |||
export const obuActivation = "76"; //VFJ-OBU在线激活 | |||
export const obuInstall = "80"; //BDS-安装确认 | |||
export const obuDecrypt = "90"; //VFJ-OBU系统信息在线解密 | |||
/* 设备重复激活 二次激活*/ | |||
// export const searchObuInfo = "153"; //BDS-OBU信息查询 | |||
// export const searchVehicleInfo = "154"; //BDS-车辆信息查询 | |||
// export const installApply = "79"; //BDS-安装申请 | |||
// export const obuActivation = "76"; //VFJ-OBU在线激活 | |||
// export const reconciliation = "89"; //VFJ-对账交易 | |||
/*******************蓝牙 end*************/ | |||
//产品选择 | |||
export const etcQueryProduct = "48"; //获取产品 | |||
//签约 | |||
export const etcOpenIdMember = "62"; //统一会员平台openId查询接口 | |||
export const etcQYAction = "23"; //签约接口 | |||
/* 订单管理模块 */ | |||
export const orderList = "36"; //订单分页查询 | |||
export const orderDetail = "9"; //根据订单ID获取订单详情 | |||
export const orderPay = "56"; //订单支付下单 | |||
export const checkOrderStatus = "57"; //订单支付结果查询接口 | |||
export const cancelOrder = "7"; //取消订单 | |||
export const receiveOrder = "155"; //订单完成收货 | |||
export const getLogistics = "30"; //获取所有的快递公司信息 | |||
export const editOrderAddr = '164'; //订单修改收货地址 | |||
export const orderReturn = '165'; //订单申请退货 | |||
export const orderExchange = '167'; //订单申请换货 | |||
export const outletList = '168'; //根据机构号获取服务网点信息 | |||
export const orderEvaluate = '169'; //评价订单 | |||
export const orderEvaluateTag = '170'; //获取服务评价标签 | |||
//个人中心 | |||
export const changePassword = "94"; //重置密码 | |||
export const changePhone = "220"; //修改手机号 | |||
// 售后管理 | |||
export const CardSignCancellation = "146"; //卡签注销 | |||
export const PassivelyHangUp = "85"; //卡被动挂起 | |||
export const labelRelease = "88"; //签解挂 | |||
export const labelHangUp = "87"; //签挂起 | |||
export const CardRelease = "86"; //卡解挂 | |||
export const CardHangUpStatus = "81"; //卡挂起 | |||
export const CardlossStatus ='82' //卡签挂失/解挂 | |||
//圈层 | |||
export const quanCheck = "69"; //圈层检测 | |||
export const quanApply = "70"; //圈层申请 | |||
export const cardCzApply = "810";//储值卡充值一申请 | |||
export const cardCzPay = "811";//储值卡充值一获取支付 (充值申请) | |||
export const cardCzPayResult = "812";//储值卡充值-查询支付结果 | |||
export const cardCzPayResultCheck = "814";//储值卡充值-获取已支付未圈存的充值单(充值检测) | |||
export const cardCzXFCheck = "815";//储值卡充值-圈存(消费) | |||
export const quanXf = "71";//圈存修复V (写指令) | |||
export const quanConfirm = "72";//圈存确认 | |||
/* 接口中常量 */ | |||
export const appId = "52030131"; //应用appid 综合业务支撑平台使用 | |||
export const loginTime = 86400; //登录有效时间(单位s) 1天 | |||
export const wechatPayConfigId = "6a9a54bc01f6443faea7ffe132b19f6"; //支付配置编号 微信小程序支付 | |||
export const wechatAppID = "wx008c60533388527a"; //小程序APPid | |||
export const wechatSecret = "95197718b43b497f02732bd9f8011080"; //小程序AppSecret | |||
/*统一 会员平台*/ | |||
export const sendCode = "2"; //统一会员平台发送验证码接口 | |||
export const regist = "3"; // 统一会员平台个人账号注册 | |||
export const login = "4"; //统一会员平台个人账号手机号密码登录 | |||
export const loginCode = "55"; //统一会员平台个人账号手机号验证码登录 | |||
export const resetPwd = "52"; //会员平台个人账号修改密码手机号验证码接口 | |||
export const getToken = "5"; //统一会员平台登录确认接口(用于换取openId和token) | |||
/*地址管理*/ | |||
export const addressQuery = "27"; //地址管理查询 | |||
export const addOrEditAddressQuery = "29"; //地址管理新增或编辑 | |||
export const fileUpload = "17"; // 文件上传 | |||
export const addressDelete = "28"; // 地址删除 | |||
/*下单CSMSN*/ | |||
export const etcVehiclePlateVer = "35"; //车牌校验 | |||
export const etcCreatOrder = "6"; //CSMSN-创建订单 | |||
export const searchOrder = "156"; //8.54.CSMSN-根据车辆ID、操作人、来源获取未完成办理订单 | |||
export const etcOcrCard = "15"; //CSMSN-OCR识别身份证 | |||
export const etcCarOcrCard = "16"; //CSMSN-OCR识别行驶证 | |||
export const ocrAllQuery = '91'; //8.76.BDS-OCR证照识别接口 | |||
export const etcUserCardInfoSubmit = "22"; // CSMSN-提交个人用户信息 | |||
export const etcUserCardInfoChange = "21"; // CSMSN-更改个人用户信息 | |||
export const etcCarCardInfoSubmit = "18"; // CSMSN-提交车辆信息 | |||
export const etcQyList = "66"; // 统一会员平台可签约渠道列表查询接口 | |||
/*******************蓝牙 start*************/ | |||
/* 开卡 * 50->51->52->73->51*/ | |||
export const writeCardApply = "50"; //BDS-写卡指令申请 | |||
export const writeCardBack = "51"; //BDS-写卡指令返回 | |||
export const writeCardConfirm = "53"; //BDS-写卡确认 | |||
export const bindCardAndObu = "73"; //.BDS-卡签绑定 | |||
/* OBU发行 */ | |||
export const writeObuApply = "77"; //BDS-OBU发行申请 | |||
export const modifyObuSysInfo = "74"; //VFJ-修改系统信息 | |||
export const modifyObuVehicleInfo = "75"; //VFJ-修改车辆信息 | |||
export const obuConfirm = "78"; //BDS-OBU发行确认 | |||
export const searchObuInfo = "153"; //BDS-OBU信息查询 | |||
export const searchVehicleInfo = "154"; //BDS-车辆信息查询 | |||
export const installApply = "79"; //BDS-安装申请 | |||
export const obuActivation = "76"; //VFJ-OBU在线激活 | |||
export const obuInstall = "80"; //BDS-安装确认 | |||
export const obuDecrypt = "90"; //VFJ-OBU系统信息在线解密 | |||
/* 设备重复激活 二次激活*/ | |||
// export const searchObuInfo = "153"; //BDS-OBU信息查询 | |||
// export const searchVehicleInfo = "154"; //BDS-车辆信息查询 | |||
// export const installApply = "79"; //BDS-安装申请 | |||
// export const obuActivation = "76"; //VFJ-OBU在线激活 | |||
// export const reconciliation = "89"; //VFJ-对账交易 | |||
/*******************蓝牙 end*************/ | |||
//产品选择 | |||
export const etcQueryProduct = "48"; //获取产品 | |||
//签约 | |||
export const etcOpenIdMember = "62"; //统一会员平台openId查询接口 | |||
export const etcQYAction = "23"; //签约接口 | |||
/* 订单管理模块 */ | |||
export const orderList = "36"; //订单分页查询 | |||
export const orderDetail = "9"; //根据订单ID获取订单详情 | |||
export const orderPay = "56"; //订单支付下单 | |||
export const checkOrderStatus = "57"; //订单支付结果查询接口 | |||
export const cancelOrder = "7"; //取消订单 | |||
export const receiveOrder = "155"; //订单完成收货 | |||
export const getLogistics = "30"; //获取所有的快递公司信息 | |||
export const editOrderAddr = '164'; //订单修改收货地址 | |||
export const orderReturn = '165'; //订单申请退货 | |||
export const orderExchange = '167'; //订单申请换货 | |||
export const outletList = '168'; //根据机构号获取服务网点信息 | |||
export const orderEvaluate = '169'; //评价订单 | |||
export const orderEvaluateTag = '170'; //获取服务评价标签 | |||
//个人中心 | |||
export const changePassword = "94"; //重置密码 | |||
export const changePhone = "220"; //修改手机号 | |||
// 售后管理 | |||
export const CardSignCancellation = "146"; //卡签注销 | |||
export const PassivelyHangUp = "85"; //卡被动挂起 | |||
export const labelRelease = "88"; //签解挂 | |||
export const labelHangUp = "87"; //签挂起 | |||
export const CardRelease = "86"; //卡解挂 | |||
export const CardHangUpStatus = "81"; //卡挂起 | |||
export const CardlossStatus = '82' //卡签挂失/解挂 | |||
//圈层 | |||
export const quanCheck = "69"; //圈层检测 | |||
export const quanApply = "70"; //圈层申请 | |||
export const cardCzApply = "810"; //储值卡充值一申请 | |||
export const cardCzPay = "811"; //储值卡充值一获取支付 (充值申请) | |||
export const cardCzPayResult = "812"; //储值卡充值-查询支付结果 | |||
export const cardCzPayResultCheck = "814"; //储值卡充值-获取已支付未圈存的充值单(充值检测) | |||
export const cardCzXFCheck = "815"; //储值卡充值-圈存(消费) | |||
export const quanXf = "71"; //圈存修复V (写指令) | |||
export const quanConfirm = "72"; //圈存确认 |
@@ -1,196 +1,271 @@ | |||
function getLocalFilePath(path) { | |||
if (path.indexOf('_www') === 0 || path.indexOf('_doc') === 0 || path.indexOf('_documents') === 0 || path.indexOf('_downloads') === 0) { | |||
return path | |||
} | |||
if (path.indexOf('file://') === 0) { | |||
return path | |||
} | |||
if (path.indexOf('/storage/emulated/0/') === 0) { | |||
return path | |||
} | |||
if (path.indexOf('/') === 0) { | |||
var localFilePath = plus.io.convertAbsoluteFileSystem(path) | |||
if (localFilePath !== path) { | |||
return localFilePath | |||
} else { | |||
path = path.substr(1) | |||
} | |||
} | |||
return '_www/' + path | |||
function getLocalFilePath(path) { | |||
if (path.indexOf('_www') === 0 || path.indexOf('_doc') === 0 || path.indexOf('_documents') === 0 || path.indexOf( | |||
'_downloads') === 0) { | |||
return path | |||
} | |||
if (path.indexOf('file://') === 0) { | |||
return path | |||
} | |||
if (path.indexOf('/storage/emulated/0/') === 0) { | |||
return path | |||
} | |||
if (path.indexOf('/') === 0) { | |||
var localFilePath = plus.io.convertAbsoluteFileSystem(path) | |||
if (localFilePath !== path) { | |||
return localFilePath | |||
} else { | |||
path = path.substr(1) | |||
} | |||
} | |||
return '_www/' + path | |||
} | |||
function dataUrlToBase64(str) { | |||
var array = str.split(',') | |||
return array[array.length - 1] | |||
} | |||
var index = 0 | |||
function getNewFileId() { | |||
return Date.now() + String(index++) | |||
} | |||
function biggerThan(v1, v2) { | |||
var v1Array = v1.split('.') | |||
var v2Array = v2.split('.') | |||
var update = false | |||
for (var index = 0; index < v2Array.length; index++) { | |||
var diff = v1Array[index] - v2Array[index] | |||
if (diff !== 0) { | |||
update = diff > 0 | |||
break | |||
} | |||
} | |||
return update | |||
} | |||
export function pathToBase64(path) { | |||
return new Promise(function(resolve, reject) { | |||
if (typeof window === 'object' && 'document' in window) { | |||
if (typeof FileReader === 'function') { | |||
var xhr = new XMLHttpRequest() | |||
xhr.open('GET', path, true) | |||
xhr.responseType = 'blob' | |||
xhr.onload = function() { | |||
if (this.status === 200) { | |||
let fileReader = new FileReader() | |||
fileReader.onload = function(e) { | |||
resolve(e.target.result) | |||
} | |||
fileReader.onerror = reject | |||
fileReader.readAsDataURL(this.response) | |||
} | |||
} | |||
xhr.onerror = reject | |||
xhr.send() | |||
return | |||
} | |||
var canvas = document.createElement('canvas') | |||
var c2x = canvas.getContext('2d') | |||
var img = new Image | |||
img.onload = function() { | |||
canvas.width = img.width | |||
canvas.height = img.height | |||
c2x.drawImage(img, 0, 0) | |||
resolve(canvas.toDataURL()) | |||
canvas.height = canvas.width = 0 | |||
} | |||
img.onerror = reject | |||
img.src = path | |||
return | |||
} | |||
if (typeof plus === 'object') { | |||
plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) { | |||
entry.file(function(file) { | |||
var fileReader = new plus.io.FileReader() | |||
fileReader.onload = function(data) { | |||
resolve(data.target.result) | |||
} | |||
fileReader.onerror = function(error) { | |||
reject(error) | |||
} | |||
fileReader.readAsDataURL(file) | |||
}, function(error) { | |||
reject(error) | |||
}) | |||
}, function(error) { | |||
reject(error) | |||
}) | |||
return | |||
} | |||
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) { | |||
wx.getFileSystemManager().readFile({ | |||
filePath: path, | |||
encoding: 'base64', | |||
success: function(res) { | |||
resolve('data:image/png;base64,' + res.data) | |||
}, | |||
fail: function(error) { | |||
reject(error) | |||
} | |||
}) | |||
return | |||
} | |||
reject(new Error('not support')) | |||
}) | |||
} | |||
export function pathToBase64New(path) { | |||
return new Promise(function(resolve, reject) { | |||
if (typeof window === 'object' && 'document' in window) { | |||
if (typeof FileReader === 'function') { | |||
var xhr = new XMLHttpRequest() | |||
xhr.open('GET', path, true) | |||
xhr.responseType = 'blob' | |||
xhr.onload = function() { | |||
if (this.status === 200) { | |||
let fileReader = new FileReader() | |||
fileReader.onload = function(e) { | |||
resolve(e.target.result) | |||
} | |||
fileReader.onerror = reject | |||
fileReader.readAsDataURL(this.response) | |||
} | |||
} | |||
xhr.onerror = reject | |||
xhr.send() | |||
return | |||
} | |||
var canvas = document.createElement('canvas') | |||
var c2x = canvas.getContext('2d') | |||
var img = new Image | |||
img.onload = function() { | |||
canvas.width = img.width | |||
canvas.height = img.height | |||
c2x.drawImage(img, 0, 0) | |||
resolve(canvas.toDataURL()) | |||
canvas.height = canvas.width = 0 | |||
} | |||
img.onerror = reject | |||
img.src = path | |||
return | |||
} | |||
if (typeof plus === 'object') { | |||
plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) { | |||
entry.file(function(file) { | |||
var fileReader = new plus.io.FileReader() | |||
fileReader.onload = function(data) { | |||
resolve(data.target.result) | |||
} | |||
fileReader.onerror = function(error) { | |||
reject(error) | |||
} | |||
fileReader.readAsDataURL(file) | |||
}, function(error) { | |||
reject(error) | |||
}) | |||
}, function(error) { | |||
reject(error) | |||
}) | |||
return | |||
} | |||
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) { | |||
wx.getFileSystemManager().readFile({ | |||
filePath: path, | |||
encoding: 'base64', | |||
success: function(res) { | |||
resolve(res.data) | |||
}, | |||
fail: function(error) { | |||
reject(error) | |||
} | |||
}) | |||
return | |||
} | |||
reject(new Error('not support')) | |||
}) | |||
} | |||
export function base64ToPath(base64) { | |||
return new Promise(function(resolve, reject) { | |||
if (typeof window === 'object' && 'document' in window) { | |||
base64 = base64.split(',') | |||
var type = base64[0].match(/:(.*?);/)[1] | |||
var str = atob(base64[1]) | |||
var n = str.length | |||
var array = new Uint8Array(n) | |||
while (n--) { | |||
array[n] = str.charCodeAt(n) | |||
} | |||
return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([array], { | |||
type: type | |||
}))) | |||
} | |||
var extName = base64.split(',')[0].match(/data\:\S+\/(\S+);/) | |||
if (extName) { | |||
extName = extName[1] | |||
} else { | |||
reject(new Error('base64 error')) | |||
} | |||
var fileName = getNewFileId() + '.' + extName | |||
if (typeof plus === 'object') { | |||
var basePath = '_doc' | |||
var dirPath = 'uniapp_temp' | |||
var filePath = basePath + '/' + dirPath + '/' + fileName | |||
if (!biggerThan(plus.os.name === 'Android' ? '1.9.9.80627' : '1.9.9.80472', plus.runtime | |||
.innerVersion)) { | |||
plus.io.resolveLocalFileSystemURL(basePath, function(entry) { | |||
entry.getDirectory(dirPath, { | |||
create: true, | |||
exclusive: false, | |||
}, function(entry) { | |||
entry.getFile(fileName, { | |||
create: true, | |||
exclusive: false, | |||
}, function(entry) { | |||
entry.createWriter(function(writer) { | |||
writer.onwrite = function() { | |||
resolve(filePath) | |||
} | |||
writer.onerror = reject | |||
writer.seek(0) | |||
writer.writeAsBinary(dataUrlToBase64(base64)) | |||
}, reject) | |||
}, reject) | |||
}, reject) | |||
}, reject) | |||
return | |||
} | |||
var bitmap = new plus.nativeObj.Bitmap(fileName) | |||
bitmap.loadBase64Data(base64, function() { | |||
bitmap.save(filePath, {}, function() { | |||
bitmap.clear() | |||
resolve(filePath) | |||
}, function(error) { | |||
bitmap.clear() | |||
reject(error) | |||
}) | |||
}, function(error) { | |||
bitmap.clear() | |||
reject(error) | |||
}) | |||
return | |||
} | |||
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) { | |||
var filePath = wx.env.USER_DATA_PATH + '/' + fileName | |||
wx.getFileSystemManager().writeFile({ | |||
filePath: filePath, | |||
data: dataUrlToBase64(base64), | |||
encoding: 'base64', | |||
success: function() { | |||
resolve(filePath) | |||
}, | |||
fail: function(error) { | |||
reject(error) | |||
} | |||
}) | |||
return | |||
} | |||
reject(new Error('not support')) | |||
}) | |||
} | |||
function dataUrlToBase64(str) { | |||
var array = str.split(',') | |||
return array[array.length - 1] | |||
} | |||
var index = 0 | |||
function getNewFileId() { | |||
return Date.now() + String(index++) | |||
} | |||
function biggerThan(v1, v2) { | |||
var v1Array = v1.split('.') | |||
var v2Array = v2.split('.') | |||
var update = false | |||
for (var index = 0; index < v2Array.length; index++) { | |||
var diff = v1Array[index] - v2Array[index] | |||
if (diff !== 0) { | |||
update = diff > 0 | |||
break | |||
} | |||
} | |||
return update | |||
} | |||
export function pathToBase64(path) { | |||
return new Promise(function(resolve, reject) { | |||
if (typeof window === 'object' && 'document' in window) { | |||
if (typeof FileReader === 'function') { | |||
var xhr = new XMLHttpRequest() | |||
xhr.open('GET', path, true) | |||
xhr.responseType = 'blob' | |||
xhr.onload = function() { | |||
if (this.status === 200) { | |||
let fileReader = new FileReader() | |||
fileReader.onload = function(e) { | |||
resolve(e.target.result) | |||
} | |||
fileReader.onerror = reject | |||
fileReader.readAsDataURL(this.response) | |||
} | |||
} | |||
xhr.onerror = reject | |||
xhr.send() | |||
return | |||
} | |||
var canvas = document.createElement('canvas') | |||
var c2x = canvas.getContext('2d') | |||
var img = new Image | |||
img.onload = function() { | |||
canvas.width = img.width | |||
canvas.height = img.height | |||
c2x.drawImage(img, 0, 0) | |||
resolve(canvas.toDataURL()) | |||
canvas.height = canvas.width = 0 | |||
} | |||
img.onerror = reject | |||
img.src = path | |||
return | |||
} | |||
if (typeof plus === 'object') { | |||
plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) { | |||
entry.file(function(file) { | |||
var fileReader = new plus.io.FileReader() | |||
fileReader.onload = function(data) { | |||
resolve(data.target.result) | |||
} | |||
fileReader.onerror = function(error) { | |||
reject(error) | |||
} | |||
fileReader.readAsDataURL(file) | |||
}, function(error) { | |||
reject(error) | |||
}) | |||
}, function(error) { | |||
reject(error) | |||
}) | |||
return | |||
} | |||
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) { | |||
wx.getFileSystemManager().readFile({ | |||
filePath: path, | |||
encoding: 'base64', | |||
success: function(res) { | |||
resolve('data:image/png;base64,' + res.data) | |||
}, | |||
fail: function(error) { | |||
reject(error) | |||
} | |||
}) | |||
return | |||
} | |||
reject(new Error('not support')) | |||
}) | |||
} | |||
export function base64ToPath(base64) { | |||
return new Promise(function(resolve, reject) { | |||
if (typeof window === 'object' && 'document' in window) { | |||
base64 = base64.split(',') | |||
var type = base64[0].match(/:(.*?);/)[1] | |||
var str = atob(base64[1]) | |||
var n = str.length | |||
var array = new Uint8Array(n) | |||
while (n--) { | |||
array[n] = str.charCodeAt(n) | |||
} | |||
return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([array], { type: type }))) | |||
} | |||
var extName = base64.split(',')[0].match(/data\:\S+\/(\S+);/) | |||
if (extName) { | |||
extName = extName[1] | |||
} else { | |||
reject(new Error('base64 error')) | |||
} | |||
var fileName = getNewFileId() + '.' + extName | |||
if (typeof plus === 'object') { | |||
var basePath = '_doc' | |||
var dirPath = 'uniapp_temp' | |||
var filePath = basePath + '/' + dirPath + '/' + fileName | |||
if (!biggerThan(plus.os.name === 'Android' ? '1.9.9.80627' : '1.9.9.80472', plus.runtime.innerVersion)) { | |||
plus.io.resolveLocalFileSystemURL(basePath, function(entry) { | |||
entry.getDirectory(dirPath, { | |||
create: true, | |||
exclusive: false, | |||
}, function(entry) { | |||
entry.getFile(fileName, { | |||
create: true, | |||
exclusive: false, | |||
}, function(entry) { | |||
entry.createWriter(function(writer) { | |||
writer.onwrite = function() { | |||
resolve(filePath) | |||
} | |||
writer.onerror = reject | |||
writer.seek(0) | |||
writer.writeAsBinary(dataUrlToBase64(base64)) | |||
}, reject) | |||
}, reject) | |||
}, reject) | |||
}, reject) | |||
return | |||
} | |||
var bitmap = new plus.nativeObj.Bitmap(fileName) | |||
bitmap.loadBase64Data(base64, function() { | |||
bitmap.save(filePath, {}, function() { | |||
bitmap.clear() | |||
resolve(filePath) | |||
}, function(error) { | |||
bitmap.clear() | |||
reject(error) | |||
}) | |||
}, function(error) { | |||
bitmap.clear() | |||
reject(error) | |||
}) | |||
return | |||
} | |||
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) { | |||
var filePath = wx.env.USER_DATA_PATH + '/' + fileName | |||
wx.getFileSystemManager().writeFile({ | |||
filePath: filePath, | |||
data: dataUrlToBase64(base64), | |||
encoding: 'base64', | |||
success: function() { | |||
resolve(filePath) | |||
}, | |||
fail: function(error) { | |||
reject(error) | |||
} | |||
}) | |||
return | |||
} | |||
reject(new Error('not support')) | |||
}) | |||
} |