This commit is contained in:
parent
c15915a17e
commit
9b05cc53d7
|
|
@ -206,7 +206,8 @@ const onCameraSuccess = (file) => {
|
|||
id: opts.id,
|
||||
leaseSignUrl: signUrl,
|
||||
leaseSignType: signType.value,
|
||||
taskType: opts.taskType || ''
|
||||
taskType: opts.taskType || '',
|
||||
publishTask: opts.publishTask || '',
|
||||
}
|
||||
console.log('🚀 ~ success: ~ params:', params)
|
||||
updateLeaseApplyInfoSign(params).then((res) => {
|
||||
|
|
@ -251,7 +252,8 @@ const uploadImg2 = async (base64Data) => {
|
|||
id: opts.id,
|
||||
leaseSignUrl: signUrl,
|
||||
leaseSignType: signType.value,
|
||||
taskType: opts.taskType || ''
|
||||
taskType: opts.taskType || '',
|
||||
publishTask: opts.publishTask || '',
|
||||
}
|
||||
console.log('🚀 ~ success: ~ params:', params)
|
||||
const res = await updateLeaseApplyInfoSign(params)
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ const onSignature = (e, item) => {
|
|||
leaseSignType: item.leaseSignType,
|
||||
isLease: true,
|
||||
taskType: item.taskType,
|
||||
publishTask: item.publishTask,
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/pages/my/signature?params=${JSON.stringify(params)}`,
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import { useMemberStore } from '@/stores'
|
|||
const ENV = process.env.NODE_ENV
|
||||
// export const baseURL = ENV === 'development' ? 'http://192.168.0.244:18580' : 'http://192.168.0.244:18580'//测试
|
||||
// export const baseURL = ENV === 'development' ? 'http://sgwpdm.ah.sgcc.com.cn/iws/jiju-api/' : 'http://sgwpdm.ah.sgcc.com.cn/iws/jiju-api/'//生产
|
||||
export const baseURL = ENV === 'development' ? '/api' : '/iws/jiju-api'; // 宏源服务
|
||||
// export const baseURL = ENV === 'development' ? '/api' : '/iws/jiju-api'; // 宏源服务
|
||||
// export const baseURL = ENV === 'development' ? 'http://192.168.0.234:18080' : '***'
|
||||
// export const baseURL = ENV === 'development' ? 'http://192.168.0.96:18080' : 'http://192.168.1.244:18080'//马
|
||||
export const baseURL = ENV === 'development' ? 'http://192.168.1.117:18080' : 'http://192.168.1.117:18080'//马
|
||||
// export const baseURL = ENV === 'development' ? '/api' : '***'
|
||||
|
||||
// **********OCR识别为NVUE文件页面请求URL需要同步配置**********
|
||||
|
|
@ -58,12 +58,12 @@ export const http = (options) => {
|
|||
uni.request({
|
||||
...options,
|
||||
success(res) {
|
||||
// console.log('res', res)
|
||||
try {
|
||||
// 1. 判断是否请求成功
|
||||
if (res.statusCode >= 200 && res.statusCode < 300) {
|
||||
if (res.data.code >= 200 && res.data.code < 300) {
|
||||
if (res.data && res.data.code >= 200 && res.data.code < 300) {
|
||||
resolve(res.data)
|
||||
} else if (res.data.code === 401) {
|
||||
} else if (res.data && res.data.code === 401) {
|
||||
// 2. 401 表示token过期 去往登录页重新登录
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
|
|
@ -80,16 +80,18 @@ export const http = (options) => {
|
|||
})
|
||||
}
|
||||
reject(res)
|
||||
} else if (res.data.code === 500) {
|
||||
} else if (res.data && res.data.code === 500) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: `${res.data.msg}`,
|
||||
})
|
||||
reject(res)
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: `${res.data.msg}` || '请求失败',
|
||||
title: `${res.data && res.data.msg ? res.data.msg : '请求失败'}`,
|
||||
})
|
||||
reject(res)
|
||||
}
|
||||
} else if (res.statusCode === 401) {
|
||||
// 2. 401 表示token过期 去往登录页重新登录
|
||||
|
|
@ -108,7 +110,13 @@ export const http = (options) => {
|
|||
})
|
||||
reject(res)
|
||||
}
|
||||
// console.log(res)
|
||||
} catch (err) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请求失败',
|
||||
})
|
||||
reject(err)
|
||||
}
|
||||
},
|
||||
fail(err) {
|
||||
uni.showToast({
|
||||
|
|
|
|||
Loading…
Reference in New Issue