Commit 39b5703b by 刘海龙

1111

parent fd297563
......@@ -59,7 +59,7 @@
<div class="imgItem" @click="addImg('front_view')">
<img :src="form.front_view ? form.front_view : upload_image">
</div>
<div v-if="isFile" class="imgItem" @click="addImg('back_view')">
<div class="imgItem" @click="addImg('back_view')">
<img :src="form.back_view ? form.back_view : upload_image2">
</div>
<div class="imgItem" @click="addImg('handset_view')">
......@@ -69,8 +69,8 @@
<input id="file2" name="image" type="file" v-show="false" class="upload" accept="image/*" @change="upload"/>
<input id="file3" name="image" type="file" v-show="false" class="upload" accept="image/*" @change="upload"/> -->
<input id="file" name="image" type="file" v-if="isFile" style="display: none;" accept="image/*" @change="upload"/>
<input id="file2" name="image" type="file" style="display: none;" accept="image/*" @change="upload"/>
<input id="file3" name="image" type="file" style="display: none;" accept="image/*" @change="upload"/>
<input id="file2" name="image" type="file" v-if="isFile2" style="display: none;" accept="image/*" @change="upload"/>
<input id="file3" name="image" type="file" v-if="isFile3" style="display: none;" accept="image/*" @change="upload"/>
</div>
<!-- 按钮 -->
......@@ -106,6 +106,8 @@
uploadName: '',
isSubmit: true,
isFile: true,
isFile2: true,
isFile3: true,
upload_image: '__PUBLIC__/appapi/img/iconCard-1.png',
upload_image2: '__PUBLIC__/appapi/img/iconCard-2.png',
upload_image3: '__PUBLIC__/appapi/img/iconCard-3.png',
......@@ -198,17 +200,19 @@
if (_this.uploadName === 'front_view') {
id = 'file';
saveName = 'auth_' + uid + '_1';
_this.isFile = false
}
if (_this.uploadName === 'back_view') {
id = 'file2';
saveName = 'auth_' + uid + '_2';
_this.isFile2 = false
}
if (_this.uploadName === 'handset_view') {
id = 'file3';
saveName = 'auth_' + uid + '_3';
_this.isFile3 = false
}
var loadingIndex = layer.load(2);
_this.isFile = false
$.ajaxFileUpload({
url: './index.php?g=Appapi&m=Auth&a=upload',
secureuri: false,
......@@ -231,9 +235,11 @@
}
if (_this.uploadName === 'back_view') {
_this.form.back_view = str.data.url;
_this.isFile2 = true
}
if (_this.uploadName === 'handset_view') {
_this.form.handset_view = str.data.url;
_this.isFile3 = true
}
_this.checkSubmit();
layer.close(loadingIndex);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment