|
@@ -213,6 +213,17 @@
|
|
|
<div class="arrow"></div>
|
|
|
<div class="clear"></div>
|
|
|
</div>
|
|
|
+ <div class="list_height plist-txt notarrow">
|
|
|
+ <div class="pic"></div>
|
|
|
+ <div class="tit font14">简历</div>
|
|
|
+ <div class="describe font13">
|
|
|
+ <span id="uploadPicButton">双击上传文件</span>
|
|
|
+ <input type="file" id="uploadFile" accept="application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,text/plain,application/pdf" style="display: none;">
|
|
|
+ </div>
|
|
|
+ <div class="arrow"></div>
|
|
|
+ <div class="clear"></div>
|
|
|
+ <input type="hidden" id="attachment" name="attachment" value="">
|
|
|
+ </div>
|
|
|
<div class="btn-spacing">
|
|
|
<button type="submit" class="qs-btn qs-btn-blue qs-btn-linear-orange bd4 font16 b-big">保存</button>
|
|
|
</div>
|
|
@@ -350,5 +361,33 @@
|
|
|
})
|
|
|
return false;
|
|
|
});
|
|
|
+
|
|
|
+ $('#uploadPicButton').click(function(){
|
|
|
+ $('#uploadFile').click();
|
|
|
+ });
|
|
|
+ $('#uploadFile').on('change',function(event) {
|
|
|
+ $('#uploadPicButton').html('正在上传文件中');
|
|
|
+ let file = this.files[0];
|
|
|
+ let formData = new FormData();
|
|
|
+ formData.append('files',file);
|
|
|
+ $.ajax({
|
|
|
+ url: "{{route('mobile.spring.uploadfile')}}",
|
|
|
+ type: 'POST',
|
|
|
+ data: formData,
|
|
|
+ async: true,
|
|
|
+ cache: false,
|
|
|
+ contentType: false,
|
|
|
+ processData: false,
|
|
|
+ success: function(data) {
|
|
|
+ if (data.status == 0) {
|
|
|
+ alert(data.msg);
|
|
|
+ $('#uploadPicButton').html('上传失败,重新选择');
|
|
|
+ } else {
|
|
|
+ $('#uploadPicButton').html(data.filename);
|
|
|
+ $('#attachment').val(data.path);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
</script>
|
|
|
@endsection
|