parent
d32d5b310d
commit
0f8890674f
|
@ -335,20 +335,18 @@ export default {
|
|||
this.form.REVIEW_TIME = uni.$u.timeFormat(event.value, 'yyyy-mm-dd')
|
||||
},
|
||||
fnAfterRead(event) {
|
||||
var houzhui = event.file.url.replace(/.+\./, "");
|
||||
console.log(houzhui);
|
||||
if (houzhui == "jpg" || houzhui == "png") {
|
||||
this.form.fileList.push(event.file)
|
||||
var houzhui = event.file.name.split('.').pop().toLowerCase();
|
||||
console.log(houzhui)
|
||||
if (['jpg', 'png'].includes(houzhui)) {
|
||||
this.form.fileList.push(event.file);
|
||||
} else {
|
||||
uni.$u.toast('图片格式不正确,请上传jpg格式图片或者png格式图片')
|
||||
this.form.fileList = []
|
||||
|
||||
uni.$u.toast('图片格式不正确,请上传jpg格式图片或者png格式图片');
|
||||
}
|
||||
},
|
||||
fnAfterRead1(event) {
|
||||
var houzhui = event.file.url.replace(/.+\./, "");
|
||||
var houzhui = event.file.name.split('.').pop().toLowerCase();
|
||||
console.log(houzhui);
|
||||
if (houzhui == "jpg" || houzhui == "png") {
|
||||
if (['jpg', 'png'].includes(houzhui)) {
|
||||
this.form.fileListBack.push(event.file)
|
||||
} else {
|
||||
uni.$u.toast('图片格式不正确,请上传jpg格式图片或者png格式图片')
|
||||
|
|
|
@ -166,6 +166,7 @@ export default {
|
|||
})
|
||||
}
|
||||
let resData = await getUserInfo({
|
||||
USER_ID: this.userInfo.USER_ID,
|
||||
CORPINFO_ID: this.userInfo.CORPINFO_ID,
|
||||
EMPLOYMENT_APPLY_MANAGEMENT_ID: this.EMPLOYMENT_APPLY_MANAGEMENT_ID
|
||||
})
|
||||
|
|
|
@ -1032,6 +1032,7 @@ export default {
|
|||
USER_ID: result.pd.USER_ID,
|
||||
PHOTO: this.$filePath + result.pd.PHOTO,
|
||||
userPhoto: this.$filePath + result.pd.PHOTO,
|
||||
token: this.userInfo.token
|
||||
})
|
||||
uni.$u.toast('保存成功')
|
||||
setTimeout(() => {
|
||||
|
|
|
@ -15,6 +15,7 @@ const store = new Vuex.Store({
|
|||
USERNAME: "",
|
||||
USER_ID: "",
|
||||
PHOTO: "",
|
||||
token: ""
|
||||
},
|
||||
},
|
||||
getters: {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
let requestPath = 'https://qggf.qhdsafety.com/xgfApi/'; // 后台请求地址
|
||||
let requestPath = 'http://192.168.0.104:8059/xgf_gwj'; // 后台请求地址
|
||||
// let requestPath = 'https://skqhdg.porthebei.com:9006/qa-prevention-xgf/'; // 后台请求地址
|
||||
// let requestPath = 'https://qgxgf.qhdsafety.com/qa-prevention-xgf/'; // 外网地址
|
||||
import store from '../store/index'
|
||||
|
@ -19,7 +19,8 @@ function post(url, data) {
|
|||
},
|
||||
method: 'POST',
|
||||
header: {
|
||||
'Content-type': data?.postMethod || 'application/x-www-form-urlencoded'
|
||||
'Content-type': data?.postMethod || 'application/x-www-form-urlencoded',
|
||||
'token': store.state.userInfo.token || ''
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.statusCode != 200){
|
||||
|
@ -71,6 +72,9 @@ function upload(url, data) {
|
|||
filePath: data.filePath,
|
||||
name: data.name || 'file',
|
||||
formData: data.formData || {},
|
||||
header: {
|
||||
'token': store.state.userInfo.token || ''
|
||||
},
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (JSON.parse(res.data).result === 'success') {
|
||||
|
@ -108,6 +112,9 @@ function uploads(url, data) {
|
|||
url: requestPath + url,
|
||||
files: data.files,
|
||||
formData: data.formData || {},
|
||||
header: {
|
||||
'token': store.state.userInfo.token || ''
|
||||
},
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (JSON.parse(res.data).result === 'success') {
|
||||
|
|
Loading…
Reference in New Issue