转载自 https://blog.csdn.net/qq_35713752/article/details/78975877
-
-
-
-
-
-
<view class='hint'>标☆号为必填项
</view>
-
<form bindsubmit="formSubmit" bindreset="formReset">
-
头 像 上 传 ☆
<image wx:if="{{tempFilePaths[0] ==='undefined'}}" class='headimage' bindtap='img_item' id='0' name='headimage'>
</image>
-
<image wx:else src="{{tempFilePaths[0]}}" class='headimage' bindtap='img_item' id='0' name='headimage'>
</image>
-
<view class='view1' >
<view class='view'>姓 名 ☆
</view>
<input type='text' name="name">
</input>
</view>
-
<view class='view1' >
<view class='view'>性 别 ☆
</view>
<input type='text' name="sex">
</input>
</view>
-
<view class='view1' >
<view class='view'>登录账号 ☆
</view>
<input type='text' name="account">
</input>
</view>
-
<view class='view1' >
<view class='view'>登录密码 ☆
</view>
<input type='text' bindinput='psw_1' name="psw">
</input>
</view>
-
<view class='view1' >
<view class='view'>确认密码 ☆
</view>
<input type='text' bindinput='psw_2' name="psw">
</input>
</view>
-
<view class='view1' >
<view class='view'>身份证号 ☆
</view>
<input type='text' name="certificate_num">
</input>
</view>
-
<view class='view1' >
<view class='view'>车牌号码 ☆
</view>
<input type='text' name="car_num">
</input>
</view>
-
<view class='view1' >
<view class='view'>手机号码 ☆
</view>
<input type='text' name="linktel">
</input>
</view>
-
-
<view class='view'>身份证正面 ☆
</view>
-
<image class='img' wx:if="{{!tempFilePaths[1]}}" bindtap='img_item' id='1' name='idcard_positive' src='../../../image/jia.png'>
</image>
-
<image class='img' wx:else bindtap='img_item' id='1' name='idcard_positive' src='{{tempFilePaths[1]}}'>
</image>
-
<view class='view'>身份证反面 ☆
</view>
-
<image class='img' wx:if="{{!tempFilePaths[2]}}" bindtap='img_item' id='2' name='idcars_reverse' src='../../../image/jia.png'>
</image>
-
<image class='img' wx:else bindtap='img_item' id='2' name='idcard_positive' src='{{tempFilePaths[2]}}'>
</image>
-
<view class='view'>行驶本 ☆
</view>
-
<image class='img' wx:if="{{!tempFilePaths[3]}}" bindtap='img_item' id='3' name='driver_license' src='../../../image/jia.png'>
</image>
-
<image class='img' wx:else bindtap='img_item' id='3' name='idcard_positive' src='{{tempFilePaths[3]}}'>
</image>
-
<view class='view'>驾驶证 ☆
</view>
-
<image class='img' wx:if="{{!tempFilePaths[4]}}" bindtap='img_item' id='4' name='driving_this' src='../../../image/jia.png'>
</image>
-
<image class='img' wx:else bindtap='img_item' id='4' name='idcard_positive' src='{{tempFilePaths[4]}}'>
</image>
-
<view class='xiahuaxian'>
</view>
-
<progress percent="{{percent}}" wx:if="{{in_percent}}" show-info />
-
<button formType="submit">提交审核
</button>
-
-
-
js
-
-
-
const util =
require(
"../../../utils/util.js")
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
sizeType: [
'original',
'compressed'],
-
sourceType: [
'album',
'camera'],
-
success:
function (res) {
-
-
[
'tempFilePaths[' + e.target.id +
']']: res.tempFilePaths[
0]
-
-
-
-
-
-
formSubmit:
function (e) {
-
-
form_data = e.detail.value;
-
if (psw_vaule[
0] === psw_vaule[
1]) {
-
if (e.detail.value.name !=
'' && e.detail.value.account !=
'' && e.detail.value.psw !=
'' && e.detail.value.linktel !=
'' && e.detail.value.car_num !=
'') {
-
-
for (
var a =
0; a < that.data.tempFilePaths.length; a++) {
-
if (that.data.tempFilePaths[a] ===
null) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
image_belong =
'headimage'
-
-
-
image_belong =
'idcard_positive'
-
-
-
image_belong =
'idcars_reverse'
-
-
-
image_belong =
'driver_license'
-
-
-
image_belong =
'driving_this'
-
-
-
-
data.openid = app._openid
-
data.program_id = app.jtappid
-
-
-
data.image_belong = image_belong
-
-
-
filePath: that.data.tempFilePaths[i],
-
-
-
success:
function (res) {
-
console.log(image_belong)
-
-
-
percent: that.data.percent +
20,
-
-
-
if (i == that.data.tempFilePaths.length) {
-
util.request(
'/temp_info',
'get', {
'only_num': only_num },
'正在加载数据',
function (res) {
-
-
if (res.data.state ==
1) {
-
-
-
-
success:
function (res) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
}
else
if (i < that.data.tempFilePaths.length) {
-
-
-
-
-
-
onLoad:
function (options) {
-
-
-
-
only_num =
'jt' +
Math.round(
new
Date() /
1000);
-
-
-
onReachBottom:
function (e) {
-
-
-
onShareAppMessage:
function () {
-
-
-
-
psw_vaule[
0] = e.detail.value
-
-
-
psw_vaule[
1] = e.detail.value
-
-
css
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
border:
1px solid
#F7B45D;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
border:
1px solid
#F7B45D;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-