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