|
@@ -1,9 +1,12 @@
|
|
<template>
|
|
<template>
|
|
<view style="width: 100%;">
|
|
<view style="width: 100%;">
|
|
- <view class="confirm-text">
|
|
|
|
|
|
+ <view class="confirm-text" v-if="vinImg">
|
|
<view>请核对VIN识别是否正确?</view>
|
|
<view>请核对VIN识别是否正确?</view>
|
|
<view>如果有误,请修改</view>
|
|
<view>如果有误,请修改</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="confirm-text" v-else>
|
|
|
|
+ <view>请正确输入17位VIN码</view>
|
|
|
|
+ </view>
|
|
<view class="vin-img" v-if="vinImg">
|
|
<view class="vin-img" v-if="vinImg">
|
|
<u-image :src="vinImg" width="100%" height="165"></u-image>
|
|
<u-image :src="vinImg" width="100%" height="165"></u-image>
|
|
</view>
|
|
</view>
|
|
@@ -12,14 +15,14 @@
|
|
<u-input v-model="verifyCode" :custom-style="{fontSize:'40rpx'}" type="text" height="90" :maxlength='17' input-align="center" placeholder="请输入VIN" :border="true" />
|
|
<u-input v-model="verifyCode" :custom-style="{fontSize:'40rpx'}" type="text" height="90" :maxlength='17' input-align="center" placeholder="请输入VIN" :border="true" />
|
|
</view>
|
|
</view>
|
|
<view class="confirm-button">
|
|
<view class="confirm-button">
|
|
- <u-button @click="ok" :custom-style="{background:'#1283d4'}" type="primary" shape="circle">确认</u-button>
|
|
|
|
|
|
+ <u-button @click="submitForm" :custom-style="{background:'#1283d4'}" type="primary" shape="circle">确认</u-button>
|
|
</view>
|
|
</view>
|
|
<view class="share-list flex align_center">
|
|
<view class="share-list flex align_center">
|
|
<view @click="toScan">
|
|
<view @click="toScan">
|
|
<view><u-icon name="scan" size="60" color="##d5d5d5"></u-icon></view>
|
|
<view><u-icon name="scan" size="60" color="##d5d5d5"></u-icon></view>
|
|
<view>重新扫描</view>
|
|
<view>重新扫描</view>
|
|
</view>
|
|
</view>
|
|
- <view>
|
|
|
|
|
|
+ <view v-if="verifyCode.length>=17">
|
|
<view>
|
|
<view>
|
|
<button open-type="share"><u-icon name="chat" size="60" color="##d5d5d5"></u-icon></button>
|
|
<button open-type="share"><u-icon name="chat" size="60" color="##d5d5d5"></u-icon></button>
|
|
</view>
|
|
</view>
|
|
@@ -43,12 +46,11 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(opts) {
|
|
onLoad(opts) {
|
|
- this.verifyCode = opts.verifyCode
|
|
|
|
|
|
+ this.verifyCode = opts.verifyCode || ''
|
|
this.vinImg = opts.filePath || ''
|
|
this.vinImg = opts.filePath || ''
|
|
},
|
|
},
|
|
// 分享
|
|
// 分享
|
|
onShareAppMessage(e){
|
|
onShareAppMessage(e){
|
|
- console.log(e)
|
|
|
|
return {
|
|
return {
|
|
title: '修配一码通车架号(VIN)分享',
|
|
title: '修配一码通车架号(VIN)分享',
|
|
path: '/pages/vinIput/share?userId=123&vin='+this.verifyCode,
|
|
path: '/pages/vinIput/share?userId=123&vin='+this.verifyCode,
|
|
@@ -71,14 +73,20 @@
|
|
},
|
|
},
|
|
// 复制
|
|
// 复制
|
|
toCopy(){
|
|
toCopy(){
|
|
- uni.setClipboardData({
|
|
|
|
- data: this.verifyCode,
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- confirm(code){
|
|
|
|
- console.log(code)
|
|
|
|
- this.verifyCode = code
|
|
|
|
|
|
+ if(this.verifyCode.length>=17){
|
|
|
|
+ uni.setClipboardData({
|
|
|
|
+ data: this.verifyCode,
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon: 'none',
|
|
|
|
+ title: '请输入正确的VIN码'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
+ // confirm(code){
|
|
|
|
+ // this.verifyCode = code
|
|
|
|
+ // },
|
|
// 提交并匹配车型
|
|
// 提交并匹配车型
|
|
submitForm(){
|
|
submitForm(){
|
|
const _this = this
|
|
const _this = this
|