|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<view class="content">
|
|
|
<view class='content1'>
|
|
|
-
|
|
|
+
|
|
|
<view class="title">上传身份证人像面</view>
|
|
|
<view @click.stop="uploadImg(1,index)" class="picture picture1" v-if="!dataDetails.cardAddressUrl">
|
|
|
<image class="xj-image" src="@/static/mine/ic_shanchuan@2x.png"></image>
|
|
@@ -14,13 +14,13 @@
|
|
|
</view>
|
|
|
<image class="" :src="dataDetails.cardAddressUrl" mode="aspectFit" style=""></image>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<view class="title">上传身份证国徽面</view>
|
|
|
<view @click="uploadImg(2,index)" class="picture picture2" v-if="!dataDetails.cardBackAddressUrl">
|
|
|
<image class="xj-image" src="@/static/mine/ic_shanchuan@2x.png"></image>
|
|
|
<view class="text">上传身份证国徽面</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<view v-if="dataDetails.cardBackAddressUrl" @click.stop="uploadImg(2,index)"
|
|
|
class="preview-card-img picture">
|
|
|
<!-- <image class="card-img" :src="dataDetails.cardAddressUrl"></image> -->
|
|
@@ -28,7 +28,7 @@
|
|
|
<image class='del-card' src="@/static/images/common/quxiao@2x.png">
|
|
|
</image>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<image class="" :src="dataDetails.cardBackAddressUrl" mode="aspectFit"></image>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -36,7 +36,8 @@
|
|
|
<view style='padding:5px 0 10px;border-bottom:1px solid #eee;' class="flex width100">
|
|
|
<view style='width:100px;font-size:14px;'>姓名</view>
|
|
|
<view class="flex">
|
|
|
- <u--input @input='nameinput' placeholder="输入姓名" inputAlign='left' border="none" v-model="dataDetails.name">
|
|
|
+ <u--input @input='nameinput' placeholder="输入姓名" inputAlign='left' border="none"
|
|
|
+ v-model="dataDetails.name">
|
|
|
</u--input>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -61,12 +62,13 @@
|
|
|
<u--input placeholder="输入姓氏" class="ch-style" inputAlign='left' border="none"
|
|
|
v-model="dataDetails.call">
|
|
|
</u--input>
|
|
|
- <view class="flex align-center" >{{sexText}}</view>
|
|
|
+ <view class="flex align-center">{{sexText}}</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="flex row">
|
|
|
<view class="left-text">身份证号</view>
|
|
|
- <u--input :disabled='dataDetails.id' placeholder="请输入身份证号" inputAlign='left' border="none" v-model="dataDetails.cardNumber">
|
|
|
+ <u--input :disabled='dataDetails.id' placeholder="请输入身份证号" inputAlign='left' border="none"
|
|
|
+ v-model="dataDetails.cardNumber">
|
|
|
</u--input>
|
|
|
</view>
|
|
|
|
|
@@ -137,7 +139,7 @@
|
|
|
disabled: false
|
|
|
},
|
|
|
],
|
|
|
- sexText:"先生",
|
|
|
+ sexText: "先生",
|
|
|
uploadType: '',
|
|
|
isShowimgType: false,
|
|
|
dataDetails: {
|
|
@@ -149,7 +151,7 @@
|
|
|
cardBackAddressUrl: '',
|
|
|
cardValidityDate: '',
|
|
|
driverSex: '男',
|
|
|
- sex:''
|
|
|
+ sex: ''
|
|
|
},
|
|
|
checked: false,
|
|
|
isShowcardValidity: false,
|
|
@@ -170,17 +172,16 @@
|
|
|
...mapState(['hasLogin', 'userInfo']),
|
|
|
},
|
|
|
methods: {
|
|
|
- nameinput(){
|
|
|
- this.dataDetails.call=this.dataDetails.name[0]
|
|
|
+ nameinput() {
|
|
|
+ this.dataDetails.call = this.dataDetails.name[0]
|
|
|
},
|
|
|
// 性别切换
|
|
|
radioChange(n) {
|
|
|
this.dataDetails.sex = n
|
|
|
console.log('radioChange', this.dataDetails.sex);
|
|
|
- if(n == "男"){
|
|
|
+ if (n == "男") {
|
|
|
this.sexText = "先生"
|
|
|
- }
|
|
|
- else{
|
|
|
+ } else {
|
|
|
this.sexText = "女士"
|
|
|
}
|
|
|
},
|
|
@@ -206,7 +207,7 @@
|
|
|
savePhoto(path) {
|
|
|
//
|
|
|
this.imagesrc = path;
|
|
|
- uploadImage('image',path, 'appData/',
|
|
|
+ uploadImage('image', path, 'appData/',
|
|
|
result => {
|
|
|
// 上传成功
|
|
|
console.log('图片地址', result)
|
|
@@ -266,14 +267,14 @@
|
|
|
})
|
|
|
return true
|
|
|
}
|
|
|
- if (this.dataDetails.name.length<2||this.dataDetails.name.length>10) {
|
|
|
+ if (this.dataDetails.name.length < 2 || this.dataDetails.name.length > 10) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
message: "姓名输入错误!",
|
|
|
})
|
|
|
return true
|
|
|
}
|
|
|
- if (this.dataDetails.call.length>4) {
|
|
|
+ if (this.dataDetails.call.length > 4) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
message: "称呼输入错误!",
|
|
@@ -287,7 +288,7 @@
|
|
|
})
|
|
|
return true
|
|
|
}
|
|
|
- if (this.dataDetails.cardNumber.length<18) {
|
|
|
+ if (this.dataDetails.cardNumber.length < 18) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
message: "身份证号输入错误!",
|
|
@@ -307,7 +308,7 @@
|
|
|
uni.$u.toast('提交成功')
|
|
|
// uni.$u.route('/pages/mine/cargoowner/cargoowner')
|
|
|
uni.navigateBack({
|
|
|
- delta:1
|
|
|
+ delta: 1
|
|
|
})
|
|
|
})
|
|
|
.catch(res => {
|
|
@@ -325,7 +326,7 @@
|
|
|
uni.chooseImage({
|
|
|
count: 1,
|
|
|
success: function(res) {
|
|
|
- uploadImage('image',res.tempFilePaths[0], 'appData/',
|
|
|
+ uploadImage('image', res.tempFilePaths[0], 'appData/',
|
|
|
result => {
|
|
|
// 上传成功
|
|
|
console.log('图片地址', result)
|
|
@@ -344,11 +345,11 @@
|
|
|
sourceType: this.$helper.chooseImage.sourceType,
|
|
|
success: function(res) {
|
|
|
console.log(JSON.stringify(res.tempFilePaths));
|
|
|
- uploadImage('image',res.tempFilePaths[0], 'appData/',
|
|
|
+ uploadImage('image', res.tempFilePaths[0], 'appData/',
|
|
|
result => {
|
|
|
// 上传成功回调函数
|
|
|
console.log('图片地址', result)
|
|
|
-
|
|
|
+
|
|
|
switch (that.uploadType) {
|
|
|
// 身份正面
|
|
|
case 1:
|
|
@@ -360,15 +361,15 @@
|
|
|
}).then(res => {
|
|
|
that.dataDetails.cardNumber = res.data.recPersonNo
|
|
|
//性别设置默认
|
|
|
- let i = res.data.recPersonNo.substr(16,1)
|
|
|
- if(i%2 == 0){
|
|
|
- that.dataDetails.sex = "女"
|
|
|
+ let i = res.data.recPersonNo.substr(16, 1)
|
|
|
+ if (i % 2 == 0) {
|
|
|
+ that.dataDetails.sex = "女"
|
|
|
that.sexText = "女士"
|
|
|
- }else{
|
|
|
- that.dataDetails.sex = "男"
|
|
|
+ } else {
|
|
|
+ that.dataDetails.sex = "男"
|
|
|
that.sexText = "先生"
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (!that.dataDetails.name) {
|
|
|
that.dataDetails.name = res.data.recPerson
|
|
|
}
|
|
@@ -439,17 +440,19 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- /deep/.content{
|
|
|
- margin-bottom:160px;
|
|
|
+ /deep/.content {
|
|
|
+ margin-bottom: 160px;
|
|
|
}
|
|
|
+
|
|
|
// .preview-card-img {
|
|
|
// /deep/uni-image>div, uni-image>img {
|
|
|
// transform: scale(1.5) rotate(-90deg);
|
|
|
// }
|
|
|
// }
|
|
|
- /deep/.uni-input-input:disabled{
|
|
|
- background:#fff;
|
|
|
+ /deep/.uni-input-input:disabled {
|
|
|
+ background: #fff;
|
|
|
}
|
|
|
+
|
|
|
.picture {
|
|
|
margin-top: 20rpx;
|
|
|
background: #F5F6FA;
|
|
@@ -468,6 +471,7 @@
|
|
|
margin: 20rpx;
|
|
|
padding: 20rpx;
|
|
|
border-radius: 20rpx;
|
|
|
+
|
|
|
.row-ch {
|
|
|
padding-right: 180rpx;
|
|
|
box-sizing: border-box;
|
|
@@ -514,21 +518,24 @@
|
|
|
height: 80rpx;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
.picture {
|
|
|
width: 100%;
|
|
|
height: 440rpx;
|
|
|
position: relative;
|
|
|
+
|
|
|
.text {
|
|
|
margin-top: 20rpx;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.xj-image {
|
|
|
width: 100rpx;
|
|
|
height: 100rpx;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.title {
|
|
|
color: #999999;
|
|
|
margin: 20rpx 0;
|
|
@@ -578,19 +585,21 @@
|
|
|
height: 80rpx;
|
|
|
z-index: 9;
|
|
|
}
|
|
|
- .bz{
|
|
|
+
|
|
|
+ .bz {
|
|
|
font-size: 28rpx;
|
|
|
}
|
|
|
+
|
|
|
.picture1 {
|
|
|
background: url(../../../static/mine/zm.png);
|
|
|
background-size: 100% 100%;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.picture2 {
|
|
|
background: url(../../../static/mine/gh.png);
|
|
|
background-size: 100% 100%;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.picture3 {
|
|
|
background: url(../../../static/mine/yhkzm.png);
|
|
|
background-size: 100% 100%;
|