Commit 118566ee by 刘海龙

111

parent 7a04251c
...@@ -198,6 +198,10 @@ ...@@ -198,6 +198,10 @@
if (_this.uploadName === 'front_view') { if (_this.uploadName === 'front_view') {
id = 'file'; id = 'file';
saveName = 'auth_' + uid + '_1'; saveName = 'auth_' + uid + '_1';
$('#file').replaceWith('<input id="file" name="image" type="file" v-show="false" class="upload" accept="image/*" @change="upload"/>');
$('#file').on('change', function () {
object.upload();
});
} }
if (_this.uploadName === 'back_view') { if (_this.uploadName === 'back_view') {
id = 'file2'; id = 'file2';
...@@ -214,6 +218,8 @@ ...@@ -214,6 +218,8 @@
fileElementId: id, fileElementId: id,
data: {saveName: saveName}, data: {saveName: saveName},
dataType: 'html', dataType: 'html',
processData: false,
contentType: false,
success: function (data) { success: function (data) {
data = data.replace(/<[^>]+>/g, ""); data = data.replace(/<[^>]+>/g, "");
var str = JSON.parse(data); var str = JSON.parse(data);
......
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