diff --git a/manifest.json b/manifest.json index dbeeea4..47022f7 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name" : "兰坪实名制", - "appid" : "__UNI__517BDE0", + "appid" : "__UNI__DC0416B", "description" : "兰坪实名制", "versionName" : "1.0.11", "versionCode" : 111, diff --git a/pages/realName/workbench/personEnter/addPeople.vue b/pages/realName/workbench/personEnter/addPeople.vue index 4995b0f..8aef058 100644 --- a/pages/realName/workbench/personEnter/addPeople.vue +++ b/pages/realName/workbench/personEnter/addPeople.vue @@ -363,12 +363,12 @@ 公司级考试 + + + - - {{ entryTrainBean.companyExamFilePath ? '重新上传' : '附件上传' }} - @@ -376,12 +376,12 @@ 部门级考试 + + + - - {{ entryTrainBean.deptExamFilePath ? '重新上传' : '附件上传' }} - @@ -389,12 +389,12 @@ 班组级级考试 + + + - - {{ entryTrainBean.eamExamFilePath ? '重新上传' : '附件上传' }} - @@ -1808,45 +1808,34 @@ export default { sourceType: ['camera'], success: res => { console.log('?? ~ res-拍照:', res) - this.imgToBase64(res.tempFilePaths[0]).then(base64 => { - uni.uploadFile({ - url: config.realFileUrl + `file/uploadFaceRecognition`, //服务器地址 - fileType: 'image', //ZFB必填,不然报错 - filePath: res.tempFilePaths[0], //这个就是我们上面拍照返回或者先中照片返回的数组 - formData: { - file: base64, - optMode: 'replace', - photoType: 'face', - uniqueKey: this.entryIdNumberBean.idNumber - }, - success: uploadFileRes => { - console.log(uploadFileRes) - if (uploadFileRes.statusCode == 200) { - uploadFileRes = JSON.parse(uploadFileRes.data) - if (uploadFileRes.code == 200) { - this.faceImgUrl = base64 - - if (type === 1) { - this.entryTrainBean.companyExamFilePath = uploadFileRes.data.url - } - if (type === 2) { - this.entryTrainBean.deptExamFilePath = uploadFileRes.data.url - } - if (type === 3) { - this.entryTrainBean.eamExamFilePath = uploadFileRes.data.url - } - } else { - uni.$u.toast(uploadFileRes.msg) - } - } else { - uni.$u.toast('上传失败') + uni.uploadFile({ + url: config.realFileUrl + `file/upload`, //服务器地址 + fileType: 'image', //ZFB必填,不然报错 + filePath: res.tempFilePaths[0], //这个就是我们上面拍照返回或者先中照片返回的数组 + name: 'imgFile', + formData: { + photoType: 'Contract' + }, + success: uploadFileRes => { + console.log(uploadFileRes) + if (uploadFileRes.statusCode == 200) { + if (type === 1) { + this.entryTrainBean.companyExamFilePath = config.realBaseUrl + JSON.parse(uploadFileRes.data).data.url } - }, - fail: err => { + if (type === 2) { + this.entryTrainBean.deptExamFilePath = config.realBaseUrl + JSON.parse(uploadFileRes.data).data.url + } + if (type === 3) { + this.entryTrainBean.eamExamFilePath = config.realBaseUrl + JSON.parse(uploadFileRes.data).data.url + } + } else { uni.$u.toast('上传失败') - console.log(err) } - }) + }, + fail: err => { + uni.$u.toast('上传失败') + console.log(err) + } }) }, fail: err => { diff --git a/pages/realName/workbench/personEnter/editPeople.vue b/pages/realName/workbench/personEnter/editPeople.vue index 9673ee7..8758ebc 100644 --- a/pages/realName/workbench/personEnter/editPeople.vue +++ b/pages/realName/workbench/personEnter/editPeople.vue @@ -375,12 +375,12 @@ 公司级考试 + + + - - {{ entryTrainBean.companyExamFilePath ? '重新上传' : '附件上传' }} - @@ -388,12 +388,12 @@ 部门级考试 + + + - - {{ entryTrainBean.deptExamFilePath ? '重新上传' : '附件上传' }} - @@ -401,12 +401,12 @@ 班组级级考试 + + + - - {{ entryTrainBean.eamExamFilePath ? '重新上传' : '附件上传' }} - @@ -1881,45 +1881,34 @@ export default { sourceType: ['camera'], success: res => { console.log('?? ~ res-拍照:', res) - this.imgToBase64(res.tempFilePaths[0]).then(base64 => { - uni.uploadFile({ - url: config.realFileUrl + `file/uploadFaceRecognition`, //服务器地址 - fileType: 'image', //ZFB必填,不然报错 - filePath: res.tempFilePaths[0], //这个就是我们上面拍照返回或者先中照片返回的数组 - formData: { - file: base64, - optMode: 'replace', - photoType: 'face', - uniqueKey: this.entryIdNumberBean.idNumber - }, - success: uploadFileRes => { - console.log(uploadFileRes) - if (uploadFileRes.statusCode == 200) { - uploadFileRes = JSON.parse(uploadFileRes.data) - if (uploadFileRes.code == 200) { - this.faceImgUrl = base64 - - if (type === 1) { - this.entryTrainBean.companyExamFilePath = uploadFileRes.data.url - } - if (type === 2) { - this.entryTrainBean.deptExamFilePath = uploadFileRes.data.url - } - if (type === 3) { - this.entryTrainBean.eamExamFilePath = uploadFileRes.data.url - } - } else { - uni.$u.toast(uploadFileRes.msg) - } - } else { - uni.$u.toast('上传失败') + uni.uploadFile({ + url: config.realFileUrl + `file/upload`, //服务器地址 + fileType: 'image', //ZFB必填,不然报错 + filePath: res.tempFilePaths[0], //这个就是我们上面拍照返回或者先中照片返回的数组 + name: 'imgFile', + formData: { + photoType: 'Contract' + }, + success: uploadFileRes => { + console.log(uploadFileRes) + if (uploadFileRes.statusCode == 200) { + if (type === 1) { + this.entryTrainBean.companyExamFilePath = config.realBaseUrl + JSON.parse(uploadFileRes.data).data.url } - }, - fail: err => { + if (type === 2) { + this.entryTrainBean.deptExamFilePath = config.realBaseUrl + JSON.parse(uploadFileRes.data).data.url + } + if (type === 3) { + this.entryTrainBean.eamExamFilePath = config.realBaseUrl + JSON.parse(uploadFileRes.data).data.url + } + } else { uni.$u.toast('上传失败') - console.log(err) } - }) + }, + fail: err => { + uni.$u.toast('上传失败') + console.log(err) + } }) }, fail: err => {