Commit 9ad88f11 by 刘海龙

111

parent 71412443
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<!-- <input id="file" name="image" type="file" v-show="false" class="upload" accept="image/*" @change="upload"/> <!-- <input id="file" name="image" type="file" v-show="false" class="upload" accept="image/*" @change="upload"/>
<input id="file2" name="image" type="file" v-show="false" class="upload" accept="image/*" @change="upload"/> <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="file3" name="image" type="file" v-show="false" class="upload" accept="image/*" @change="upload"/> -->
<input id="file" name="image" type="file" style="display: none;" 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="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="file3" name="image" type="file" style="display: none;" accept="image/*" @change="upload"/>
</div> </div>
...@@ -105,6 +105,7 @@ ...@@ -105,6 +105,7 @@
isNew: '{$isNew}', isNew: '{$isNew}',
uploadName: '', uploadName: '',
isSubmit: true, isSubmit: true,
isFile: true,
upload_image: '__PUBLIC__/appapi/img/iconCard-1.png', upload_image: '__PUBLIC__/appapi/img/iconCard-1.png',
upload_image2: '__PUBLIC__/appapi/img/iconCard-2.png', upload_image2: '__PUBLIC__/appapi/img/iconCard-2.png',
upload_image3: '__PUBLIC__/appapi/img/iconCard-3.png', upload_image3: '__PUBLIC__/appapi/img/iconCard-3.png',
...@@ -182,7 +183,6 @@ ...@@ -182,7 +183,6 @@
this.uploadName = name; this.uploadName = name;
if (this.uploadName === 'front_view') { if (this.uploadName === 'front_view') {
$("#file").click(); $("#file").click();
console.log($("#file").val)
} }
if (this.uploadName === 'back_view') { if (this.uploadName === 'back_view') {
$("#file2").click(); $("#file2").click();
...@@ -208,6 +208,7 @@ ...@@ -208,6 +208,7 @@
saveName = 'auth_' + uid + '_3'; saveName = 'auth_' + uid + '_3';
} }
var loadingIndex = layer.load(2); var loadingIndex = layer.load(2);
this.isFile = false
$.ajaxFileUpload({ $.ajaxFileUpload({
url: './index.php?g=Appapi&m=Auth&a=upload', url: './index.php?g=Appapi&m=Auth&a=upload',
secureuri: false, secureuri: false,
...@@ -226,6 +227,7 @@ ...@@ -226,6 +227,7 @@
} else { } else {
if (_this.uploadName === 'front_view') { if (_this.uploadName === 'front_view') {
_this.form.front_view = str.data.url; _this.form.front_view = str.data.url;
this.isFile = true
} }
if (_this.uploadName === 'back_view') { if (_this.uploadName === 'back_view') {
_this.form.back_view = str.data.url; _this.form.back_view = str.data.url;
......
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