This commit is contained in:
BianLzhaoMin 2025-09-06 15:10:49 +08:00
parent b8ca5dfed5
commit b285da3091
11 changed files with 299 additions and 198 deletions

View File

@ -1,4 +1,4 @@
# VITE_API_BASE_URL = http://112.29.103.165:1616 # VITE_API_BASE_URL = http://112.29.103.165:1616
# VITE_API_BASE_URL = /api # VITE_API_BASE_URL = /api
VITE_API_BASE_URL = http://192.168.0.14:1999/hd-realname/prod-api # VITE_API_BASE_URL = http://192.168.0.14:1999/hd-realname/prod-api
# VITE_API_BASE_URL = http://192.168.0.234:38080 VITE_API_BASE_URL = http://192.168.0.234:38080

View File

@ -119,7 +119,7 @@
@delete="deletePic($event, index)" @delete="deletePic($event, index)"
:disabled="isEditContractStatus" :disabled="isEditContractStatus"
:deletable="!isEditContractStatus" :deletable="!isEditContractStatus"
@afterRead="afterRead($event, index)" @afterRead="afterRead($event, index, item.type)"
:capture="['album', 'camera']" :capture="['album', 'camera']"
/> />
</up-form-item> </up-form-item>
@ -158,6 +158,8 @@ const contractInfoForm = ref({
wageCriterion: '', // wageCriterion: '', //
}) // }) //
const contractImageIdList = ref([]) // ID
const contractImageList = ref([ const contractImageList = ref([
{ {
type: 1, type: 1,
@ -269,16 +271,45 @@ const onCancelContractStartDate = (e) => {
// //
const deletePic = (e, index) => { const deletePic = (e, index) => {
contractImageList.value[index].fileList = [] contractImageList.value[index].fileList = []
contractImageIdList.value.splice(index, 1)
} }
// //
const afterRead = (e, index) => { const afterRead = (e, index, fileType) => {
const type = e.file[0].type const type = e.file[0].type
if (!type.includes('image')) { if (!type.includes('image')) {
uni.$u.toast('请上传图片格式') uni.$u.toast('请上传图片格式')
return return
} }
contractImageList.value[index].fileList = [e.file[0]] const files = [
{
name: 'file',
file: e.file[0].url,
uri: e.file[0].url,
},
]
uni.uploadFile({
url: '/bmw/app/uploadFile',
files: files,
name: 'file',
isUploadFile: true,
formData: {
type: fileType,
},
success: (res) => {
const data = JSON.parse(res.data)
if (data.code === 200) {
contractImageList.value[index].fileList.push({ isNew: true, ...e.file[0] })
// IDfileList
contractImageIdList.value[index] = { id: data.data, fileType: fileType }
} else {
uni.$u.toast('上传失败:' + data.msg)
}
},
fail: (err) => {
uni.$u.toast('上传失败,请重新上传')
},
})
} }
const checkFormStatus = () => { const checkFormStatus = () => {
@ -338,10 +369,21 @@ const validateContractForm = async () => {
uni.$u.toast('请完善合同见证中的所有信息') uni.$u.toast('请完善合同见证中的所有信息')
return reject(new Error('合同信息未完善')) return reject(new Error('合同信息未完善'))
} else { } else {
let data = {}
if (contractImageIdList.value.length > 0) {
data = {
photoIds: contractImageIdList.value
.map((item) => item.id)
.join(','),
...contractInfoForm.value,
}
} else {
data = { ...contractInfoForm.value }
}
resolve({ resolve({
data,
status, status,
isValid: true, isValid: true,
data: contractInfoForm.value,
imgList: contractImageList.value, imgList: contractImageList.value,
}) })
} }

View File

@ -157,6 +157,7 @@ import {
} from '@/services/common' } from '@/services/common'
const keyInfoFormRef = ref(null) // ref const keyInfoFormRef = ref(null) // ref
const photoIds = ref('') // ID
const keyInfoForm = ref({ const keyInfoForm = ref({
proId: '', // proId: '', //
postId: '', // postId: '', //
@ -330,22 +331,47 @@ const afterRead = (e) => {
const files = [ const files = [
{ {
file: e.file[0].file, file: e.file[0].url,
name: 'file', name: 'file',
uri: e.file[0].url,
}, },
] ]
uni.uploadFile({ uni.uploadFile({
url: '/bmw/worker/faceDetection', url: '/bmw/worker/faceDetection',
files: files, files: files,
name: 'file', name: 'file',
isUploadFile: true,
success: (res) => { success: (res) => {
const data = JSON.parse(res.data) const data = JSON.parse(res.data)
// console.log(data, 'res--9996')
if (data.code === 200) { if (data.code === 200) {
keyInfoForm.value.faceImg = [e.file[0]] uni.uploadFile({
url: '/bmw/app/uploadFile',
files: files,
name: 'file',
isUploadFile: true,
formData: {
type: 1,
},
success: (res) => {
const data = JSON.parse(res.data)
if (data.code === 200) {
keyInfoForm.value.faceImg.push({
...e.file[0],
})
// IDfileList
// keyInfoForm.value.photoIds = data.data
photoIds.value = data.data
} else {
uni.$u.toast('上传失败:' + data.msg)
}
},
fail: (err) => {
uni.$u.toast('上传失败,请重新上传')
},
})
} else { } else {
uni.$u.toast('人脸识别失败:' + data.msg) uni.$u.toast('人脸识别失败:' + data.msg)
keyInfoForm.value.faceImg = [e.file[0]] keyInfoForm.value.faceImg = []
} }
}, },
fail: (err) => { fail: (err) => {
@ -362,10 +388,18 @@ const validateKeyInfoForm = async () => {
.validate() .validate()
.then((valid) => { .then((valid) => {
if (valid) { if (valid) {
const params = { let data = {}
isValid: true, if (photoIds.value) {
data: keyInfoForm.value, data = { photoIds: photoIds.value, ...keyInfoForm.value }
} else {
data = { ...keyInfoForm.value }
} }
let params = {
isValid: true,
data,
}
resolve(params) resolve(params)
} }
}) })

View File

@ -143,6 +143,7 @@
<up-datetime-picker <up-datetime-picker
mode="date" mode="date"
ref="pikerBirthdayRef" ref="pikerBirthdayRef"
:minDate="0"
:show="showPikerBirthday" :show="showPikerBirthday"
@cancel="onCancelBirthday" @cancel="onCancelBirthday"
@confirm="onConfirmBirthday" @confirm="onConfirmBirthday"
@ -155,6 +156,7 @@
import { ref, watch } from 'vue' import { ref, watch } from 'vue'
import { pathToBase64 } from 'image-tools' import { pathToBase64 } from 'image-tools'
import { useMemberStore } from '@/stores' import { useMemberStore } from '@/stores'
import dayjs from 'dayjs'
const memberStore = useMemberStore() const memberStore = useMemberStore()
const idCardFormRef = ref(null) // ref const idCardFormRef = ref(null) // ref
@ -344,9 +346,9 @@ const onHandleRecognizeIdCard = (type) => {
// 1 2 // 1 2
// console.log('') // console.log('')
uni.$u.toast('功能正在开发中,敬请期待...') // uni.$u.toast('...')
return // return
uni.chooseImage({ uni.chooseImage({
count: 1, // 1 count: 1, // 1
@ -354,29 +356,75 @@ const onHandleRecognizeIdCard = (type) => {
sourceType: ['camera', 'album'], // sourceType: ['camera', 'album'], //
success: async (res) => { success: async (res) => {
const base64 = await imgToBase64Fun(res.tempFilePaths[0]) const base64 = await imgToBase64Fun(res.tempFilePaths[0])
const param = { let params = {
imageBase64: base64.split(',')[1], recognitionFrontData: '',
recognitionBackData: '',
type: 1,
}
if (type === 1) {
params.recognitionFrontData = base64.split(',')[1]
} else {
params.recognitionBackData = base64.split(',')[1]
} }
// //
uni.request({ uni.request({
url: '/bmw/appRecognition/bankCardRecognition', url: 'http://192.168.0.14:18975/recognition',
method: 'POST', method: 'POST',
data: param, data: params,
isUploadFile: true,
header: { header: {
// 'Content-Type': 'application/Json', // 'Content-Type': 'application/Json',
Authorization: memberStore?.token, // token Authorization: memberStore?.token, // token
}, },
success: (res) => { success: (res) => {
const { data: result } = res const data = JSON.parse(res.data)
if (result.code === 200) { console.log(data, '识别身份证结果')
if (data.code === 20001) {
uni.$u.toast('识别身份证成功') uni.$u.toast('识别身份证成功')
if (type === 1) {
const { name, gender, ethnicity, dateOfBirth, address, idNumber } =
data.data
const match = dateOfBirth.match(/(\d+)年(\d+)月(\d+)日/)
let birthday = ''
if (match) {
const year = match[1]
//
const month = String(match[2]).padStart(2, '0')
const day = String(match[3]).padStart(2, '0')
birthday = `${year}-${month}-${day}`
}
idCardModel.value.name = name
idCardModel.value.sex = gender
idCardModel.value.nation = ethnicity
idCardModel.value.birthday = birthday
idCardModel.value.address = address
idCardModel.value.idNumber = idNumber
} else {
const { issuingAuthority, validTime } = data.data
const validTimeArr = validTime.split('-')
idCardModel.value.issuingAuthority = issuingAuthority
idCardModel.value.startTime = validTimeArr[0].replace(/\./g, '-')
idCardModel.value.endTime = validTimeArr[1].replace(/\./g, '-')
}
} else { } else {
uni.$u.toast('识别身份证失败,请重新识别') uni.$u.toast('识别失败,请重新识别')
} }
// const { data: result } = res
// if (result.code === 200) {
// uni.$u.toast('')
// } else {
// uni.$u.toast('')
// }
}, },
fail: (err) => { fail: (err) => {
console.log(err, '----识别身份证失败') // console.log(err, '----')
uni.$u.toast('识别失败,请重新识别')
}, },
}) })
}, },

View File

@ -73,8 +73,8 @@
:name="item.name" :name="item.name"
:fileList="item.fileList" :fileList="item.fileList"
:capture="['album', 'camera']" :capture="['album', 'camera']"
@delete="deletePic($event, index)" @delete="deletePic($event, index, item)"
@afterRead="afterRead($event, index)" @afterRead="afterRead($event, index, item.type)"
/> />
</up-form-item> </up-form-item>
</up-form> </up-form>
@ -112,6 +112,8 @@ const wageCardInfoForm = ref({
bankBranchName: '', // bankBranchName: '', //
}) // }) //
const deleteFileList = ref([]) // ID
const wageCardImageList = ref([ const wageCardImageList = ref([
{ {
type: 1, type: 1,
@ -138,7 +140,7 @@ const wageCardImageList = ref([
title: '其它照片', title: '其它照片',
}, },
]) // ]) //
const wageCardUploadIdList = ref([]) // ID
const wageCardInfoFormRules = ref({ const wageCardInfoFormRules = ref({
bankName: [ bankName: [
{ {
@ -173,19 +175,71 @@ const wageCardInfoFormRules = ref({
], ],
}) })
const props = defineProps({
wageCardInfo: {
type: Object,
default: () => {},
},
wageCardImageList: {
type: Array,
default: () => [],
},
formType: {
type: [Number, String], //
default: 1,
},
})
// //
const deletePic = (e, index) => { const deletePic = (e, index, item) => {
if (props.formType == 2 && !item.isNew) {
deleteFileList.value.push(item.fileList[0].id)
}
wageCardImageList.value[index].fileList = [] wageCardImageList.value[index].fileList = []
wageCardUploadIdList.value.splice(index, 1)
} }
// //
const afterRead = (e, index) => { const afterRead = (e, index, fileType) => {
console.log(e, '选择的文件')
const type = e.file[0].type const type = e.file[0].type
if (!type.includes('image')) { if (!type.includes('image')) {
uni.$u.toast('请上传图片格式') uni.$u.toast('请上传图片格式')
return return
} }
wageCardImageList.value[index].fileList = [e.file[0]]
const files = [
{
file: e.file[0].url,
name: 'file',
uri: e.file[0].url,
},
]
uni.uploadFile({
url: '/bmw/app/uploadFile',
files: files,
name: 'file',
isUploadFile: true,
formData: {
type: fileType,
},
success: (res) => {
const data = JSON.parse(res.data)
console.log(data, '上传结果')
if (data.code === 200) {
wageCardImageList.value[index].fileList.push({ isNew: true, ...e.file[0] })
// IDfileList
wageCardUploadIdList.value[index] = { id: data.data, fileType: fileType }
} else {
uni.$u.toast('上传失败:' + data.msg)
}
},
fail: (err) => {
uni.$u.toast('上传失败,请重新上传')
},
})
} }
// //
@ -232,6 +286,8 @@ const checkFormStatus = () => {
// //
const validateWageCardForm = async () => { const validateWageCardForm = async () => {
// console.log(wageCardFormRef.value, '9995') // console.log(wageCardFormRef.value, '9995')
console.log('提交表单')
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
wageCardFormRef.value wageCardFormRef.value
.validate() .validate()
@ -244,10 +300,26 @@ const validateWageCardForm = async () => {
uni.$u.toast('请完善工资卡见证中的所有信息') uni.$u.toast('请完善工资卡见证中的所有信息')
return reject(new Error('工资卡信息未完善')) return reject(new Error('工资卡信息未完善'))
} else { } else {
let data = {}
if (wageCardUploadIdList.value.length > 0) {
data = {
photoIds: wageCardUploadIdList.value
.map((item) => item.id)
.join(','),
...wageCardInfoForm.value,
}
} else {
data = { ...wageCardInfoForm.value }
}
if (props.formType == 2 && deleteFileList.value.length > 0) {
wageCardInfoForm.value.delIds = deleteFileList.value.join(',')
}
resolve({ resolve({
data,
status, status,
isValid: true, isValid: true,
data: wageCardInfoForm.value,
imgList: wageCardImageList.value, imgList: wageCardImageList.value,
}) })
} }
@ -291,13 +363,15 @@ const onHandleRecognizeBankCard = () => {
} }
// //
uni.request({ uni.request({
url: import.meta.env.VITE_API_BASE_URL + '/bmw/appRecognition/bankCardRecognition', url: '/bmw/appRecognition/bankCardRecognition',
method: 'POST', method: 'POST',
data: param, data: param,
isUploadFile: true,
header: { header: {
Authorization: memberStore?.token, // token Authorization: memberStore?.token, // token
}, },
success: (res) => { success: (res) => {
console.log(res, '银行卡识别结果')
showLoading.value = false showLoading.value = false
const { data: result } = res const { data: result } = res
if (result.code === 200) { if (result.code === 200) {
@ -329,17 +403,6 @@ defineExpose({
updateWageCardInfo, updateWageCardInfo,
}) })
const props = defineProps({
wageCardInfo: {
type: Object,
default: () => {},
},
wageCardImageList: {
type: Array,
default: () => [],
},
})
// //
watch( watch(
props.wageCardInfo, props.wageCardInfo,

View File

@ -87,7 +87,7 @@ const onAttendanceHandle = () => {
uni.chooseImage({ uni.chooseImage({
count: 1, // 1 count: 1, // 1
sizeType: ['original', 'compressed'], sizeType: ['original', 'compressed'],
sourceType: ['camera', 'album'], // sourceType: ['camera'], //
success: (res) => { success: (res) => {
console.log(res, '选择的文件') console.log(res, '选择的文件')
showLoading.value = true showLoading.value = true

View File

@ -36,6 +36,7 @@
:isEditContractStatus="isEditContractStatus" :isEditContractStatus="isEditContractStatus"
/> />
<WageCardForm <WageCardForm
:formType="formType"
ref="personWageCardFormRef" ref="personWageCardFormRef"
:wageCardInfo="wageCardInfo" :wageCardInfo="wageCardInfo"
:wageCardImageList="wageCardImageList" :wageCardImageList="wageCardImageList"
@ -57,21 +58,33 @@
:text="currentStep === 3 ? '提交' : '下一步'" :text="currentStep === 3 ? '提交' : '下一步'"
/> />
</view> </view>
<up-loading-icon
:vertical="true"
duration="2000"
color="#3c9cff"
:show="showLoading"
textColor="#3c9cff"
text="数据正在提交,请稍后..."
style="position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%)"
/>
</view> </view>
</template> </template>
<script setup name="addAndEditPerson"> <script setup name="addAndEditPerson">
import { useCommonStore } from '@/stores' import { useCommonStore } from '@/stores'
import { pathToBase64 } from 'image-tools'
import { onLoad } from '@dcloudio/uni-app'
import { ref, onMounted, nextTick } from 'vue' import { ref, onMounted, nextTick } from 'vue'
import { decryptWithSM4, encryptWithSM4, hashWithSM3AndSalt } from '@/utils/sm' import { decryptWithSM4, encryptWithSM4, hashWithSM3AndSalt } from '@/utils/sm'
import { getPersonInfoByIdAPI, updatePersonLightStatusApi } from '@/services/person-entry' import { getPersonInfoByIdAPI, updatePersonLightStatusApi } from '@/services/person-entry'
import { addPersonEntryApi, editPersonEntryApi } from '@/services/person-entry'
import PersonIdCardForm from '@/components/PersonIdCardForm/index.vue' import PersonIdCardForm from '@/components/PersonIdCardForm/index.vue'
import KeyInfoForm from '@/components/KeyInfoForm/index.vue' import KeyInfoForm from '@/components/KeyInfoForm/index.vue'
import ContractForm from '@/components/ContractForm/index.vue' import ContractForm from '@/components/ContractForm/index.vue'
import WageCardForm from '@/components/WageCardForm/index.vue' import WageCardForm from '@/components/WageCardForm/index.vue'
import NavBarModal from '@/components/NavBarModal/index.vue' import NavBarModal from '@/components/NavBarModal/index.vue'
import { onLoad } from '@dcloudio/uni-app'
const { safeAreaInsets } = uni.getSystemInfoSync() const { safeAreaInsets } = uni.getSystemInfoSync()
const commonStore = useCommonStore() const commonStore = useCommonStore()
const navBarTitle = ref('新增人员信息') const navBarTitle = ref('新增人员信息')
@ -87,6 +100,7 @@ const editUploadFileList = ref([]) // 编辑时已上传文件列表
const formType = ref(1) // const formType = ref(1) //
const personId = ref('') // id const personId = ref('') // id
const einStatus = ref('') // const einStatus = ref('') //
const showLoading = ref(false) //
const props = defineProps({ const props = defineProps({
type: { type: {
@ -186,6 +200,19 @@ const wageCardImageList = ref([
]) // ]) //
const wageCardStatus = ref('') // const wageCardStatus = ref('') //
const imgToBase64Fun = async (path) => {
return new Promise((resolve, reject) => {
pathToBase64(path)
.then((base64) => {
resolve(base64)
})
.catch((error) => {
console.error(error)
reject(error)
})
})
}
// //
const onHandleNext = async () => { const onHandleNext = async () => {
try { try {
@ -235,6 +262,7 @@ const onHandleNext = async () => {
} }
if (currentStep.value === 3) { if (currentStep.value === 3) {
const res = await personWageCardFormRef.value.validateWageCardForm() const res = await personWageCardFormRef.value.validateWageCardForm()
if (res.isValid) { if (res.isValid) {
stepList.value[currentStep.value].isError = false stepList.value[currentStep.value].isError = false
@ -243,9 +271,6 @@ const onHandleNext = async () => {
wageCardImageList.value = imgList wageCardImageList.value = imgList
wageCardStatus.value = status wageCardStatus.value = status
//
const files = []
const fileMsg = []
const params = { const params = {
...idCardInfo.value, ...idCardInfo.value,
...keyInfo.value, ...keyInfo.value,
@ -256,165 +281,30 @@ const onHandleNext = async () => {
params.einStatus = einStatus.value params.einStatus = einStatus.value
} }
//
if (keyInfo.value.faceImg) {
keyInfo.value.faceImg.forEach((e) => {
if (!e.id) {
files.push({
file: e.file,
name: 'files',
})
fileMsg.push({
type: 1,
name: 'faceImg',
})
}
})
}
// //
if (contractStatus.value === 'all_filled') { if (contractStatus.value === 'all_filled' && !isEditContractStatus.value) {
params.bmWorkerContract = contractInfo.value params.bmWorkerContract = contractInfo.value
contractImageList.value.forEach((item) => {
item.fileList.forEach((j) => {
if (!j.id) {
files.push({
file: j.file,
name: 'files',
})
fileMsg.push({
type: item.type,
name: item.name,
})
}
})
})
} }
// //
if (wageCardStatus.value === 'all_filled') { if (wageCardStatus.value === 'all_filled') {
params.bmWorkerWageCard = wageCardInfo.value params.bmWorkerWageCard = wageCardInfo.value
let reserveFileList = []
let deleteFileList = []
wageCardImageList.value.forEach((item) => {
item.fileList.forEach((j) => {
if (!j.id) {
files.push({
file: j.file,
name: 'files',
})
fileMsg.push({
type: item.type,
name: item.name,
})
}
if (j.id) {
reserveFileList.push(j.id)
}
})
if (isEditWageCardStatus && reserveFileList.length > 0) {
deleteFileList = editUploadFileList.value
.filter((item) => !reserveFileList.includes(item.id))
.map((j) => j.id)
params.bmWorkerWageCard.delIds = deleteFileList.join(',')
}
})
} }
delete params.faceImg // delete params.faceImg //
const requestUrl = formType.value == 2 ? '/bmw/worker/edit' : '/bmw/worker/insert'
console.log('files---***---', files) showLoading.value = true
const API = formType.value == 2 ? editPersonEntryApi : addPersonEntryApi
showLoading.value = false
const { encryptRequest, encryptResponse, checkIntegrity } = console.log('params--**----请求参数', params)
commonStore?.requestConfig const result = await API(params)
console.log('res--**----新增或修改的结果', result)
if (files.length > 0) { if (result.code === 200) {
uni.uploadFile({ uni.$u.toast(result.msg)
url: requestUrl, setTimeout(() => {
files: files, uni.navigateBack()
name: 'files', }, 500)
formData: {
params: !encryptRequest
? JSON.stringify(params)
: encryptWithSM4(JSON.stringify(params)),
fileMsg: !encryptRequest
? JSON.stringify(fileMsg)
: encryptWithSM4(JSON.stringify(fileMsg)),
},
header: {
encryptRequest,
encryptResponse,
checkIntegrity,
},
success: async (res) => {
console.log('res提交结果', res)
let data = null
if (encryptResponse) {
data = JSON.parse(decryptWithSM4(res.data))
} else {
data = JSON.parse(res.data)
}
if (data.code === 200) {
uni.$u.toast(data.msg)
setTimeout(() => {
uni.navigateBack()
}, 500)
const id = formType.value == 2 ? personId.value : data.data
await updatePersonLightStatusApi(id) // 绿
} else {
uni.$u.toast(data.msg)
}
},
fail: (err) => {
sendLoading.value = false
},
})
} else {
uni.uploadFile({
url: requestUrl,
formData: {
params: !encryptRequest
? JSON.stringify(params)
: encryptWithSM4(JSON.stringify(params)),
fileMsg: !encryptRequest
? JSON.stringify(fileMsg)
: encryptWithSM4(JSON.stringify(fileMsg)),
},
header: {
encryptRequest,
encryptResponse,
checkIntegrity,
},
success: async (res) => {
console.log('res提交结果', res)
let data = null
if (encryptResponse) {
data = JSON.parse(decryptWithSM4(res.data))
} else {
data = JSON.parse(res.data)
}
if (data.code === 200) {
uni.$u.toast(data.msg)
setTimeout(() => {
uni.navigateBack()
}, 500)
const id = formType.value == 2 ? personId.value : data.data
await updatePersonLightStatusApi(id) // 绿
} else {
uni.$u.toast(data.msg)
}
},
fail: (err) => {
sendLoading.value = false
},
})
} }
} }
} }

View File

@ -50,7 +50,7 @@
<up-upload <up-upload
multiple multiple
:maxCount="3" :maxCount="1"
accept="image" accept="image"
@delete="deletePic" @delete="deletePic"
:fileList="fileList" :fileList="fileList"

View File

@ -190,6 +190,10 @@ const onInputLoaded = async () => {
// //
const onPersonExitItem = (item) => { const onPersonExitItem = (item) => {
if (item.einStatus == 2) {
uni.$u.toast('人员已出场')
return
}
const { name, id, proId, proName, subName, idNumber, workerId, teamName } = item const { name, id, proId, proName, subName, idNumber, workerId, teamName } = item
const params = { const params = {
name, name,

View File

@ -28,3 +28,21 @@ export const updatePersonLightStatusApi = (id) => {
}, },
}) })
} }
// 新增人员入场接口
export const addPersonEntryApi = (data) => {
return http({
url: `/bmw/app/appWorkerInsert`,
method: 'POST',
data,
})
}
// 修改人员入场接口
export const editPersonEntryApi = (data) => {
return http({
url: `/bmw/app/appWorkerEdit`,
method: 'POST',
data,
})
}

View File

@ -29,7 +29,7 @@ const httpInterceptor = {
console.log(options.url, '文件上传') console.log(options.url, '文件上传')
// 2. 设置请求超时时间默认为60s设置为 10s // 2. 设置请求超时时间默认为60s设置为 10s
options.timeout = 10000 options.timeout = 60000
// 3. 增加小程序端请求头标识 // 3. 增加小程序端请求头标识
options.header = { options.header = {
@ -52,7 +52,7 @@ const httpInterceptor = {
} }
// 2. 设置请求超时时间默认为60s设置为 10s // 2. 设置请求超时时间默认为60s设置为 10s
options.timeout = 10000 options.timeout = 60000
// 3. 增加小程序端请求头标识 // 3. 增加小程序端请求头标识
options.header = { options.header = {
@ -99,6 +99,8 @@ const httpInterceptor = {
options.url = url options.url = url
} }
} }
console.log(options, 'options--**----')
} }
}, },
} }