Commit 6f2b4e0f by 刘海龙

1111

parent 181b26e1
......@@ -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" 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"/>
<input id="file2" name="image" type="file" v-if="isFile" style="display: none;" accept="image/*" @change="upload"/>
<input id="file3" name="image" type="file" v-if="isFile" style="display: none;" accept="image/*" @change="upload"/>
</div>
<!-- 按钮 -->
......@@ -106,8 +106,6 @@
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',
......@@ -200,25 +198,25 @@
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,
fileElementId: id,
data: {saveName: saveName},
dataType: 'html',
processData: false,
contentType: false,
success: function (data) {
data = data.replace(/<[^>]+>/g, "");
var str = JSON.parse(data);
......@@ -233,11 +231,9 @@
}
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