feat:天平连接
This commit is contained in:
112
nx/api/auncel.js
112
nx/api/auncel.js
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@ import request from '@/nx/request'
|
||||
//获取实验室设备
|
||||
const getDeviceLaboratoryListBy = params => {
|
||||
return request({
|
||||
url: '/qms/lims/deviceLaboratory/list',
|
||||
url: '/qms/resource/device-infomation/page',
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
import request from '@/nx/request'
|
||||
|
||||
// 根据用户id获取计量点
|
||||
const getMeasurePointByUserId = params => {
|
||||
return request({
|
||||
url: '/mas-iot/user-measure-point/listByUserId',
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params
|
||||
},
|
||||
custom: {
|
||||
isApiEncryption: false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 根据用户id及计量点id获取计量点
|
||||
const getMeasurePointByUserIdAndMeasurePointId = params => {
|
||||
return request({
|
||||
url: '/mas-iot/user-measure-point/findByUserIdAndMeasurePointId',
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params
|
||||
},
|
||||
custom: {
|
||||
isApiEncryption: false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//获取物料信息
|
||||
const getGoodsListBy = params => {
|
||||
return request({
|
||||
url: '/mas-lims/bas-goods/oldGoodsListBy',
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params
|
||||
},
|
||||
custom: {
|
||||
isApiEncryption: false
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取发货方
|
||||
const getSellerListBy = params => {
|
||||
return request({
|
||||
url: '/mas-lims/bas-businesses/oldSellerListBy',
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params
|
||||
},
|
||||
custom: {
|
||||
isApiEncryption: false
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取收货方
|
||||
const getBuyerListBy = params => {
|
||||
return request({
|
||||
url: '/mas-lims/bas-businesses/oldBuyerListBy',
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params
|
||||
},
|
||||
custom: {
|
||||
isApiEncryption: false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
getGoodsListBy,
|
||||
getSellerListBy,
|
||||
getBuyerListBy,
|
||||
getMeasurePointByUserId,
|
||||
getMeasurePointByUserIdAndMeasurePointId
|
||||
}
|
||||
@@ -130,6 +130,8 @@ http.interceptors.response.use(
|
||||
// $store('user').setToken(response.header.authorization || response.header.Authorization)
|
||||
// }
|
||||
|
||||
const userStore = $store('user')
|
||||
const isLogin = userStore.isLogin
|
||||
response.config.custom.showLoading && closeLoading()
|
||||
|
||||
console.log('response', JSON.parse(JSON.stringify(response.data)))
|
||||
@@ -193,6 +195,9 @@ http.interceptors.response.use(
|
||||
title: msg || response.config.custom.errorMsg,
|
||||
icon: 'none'
|
||||
})
|
||||
if (code === 401) {
|
||||
userStore.logout(true)
|
||||
}
|
||||
}
|
||||
|
||||
if ((code === 0 || code === 200) && response.config.custom.showSuccess) {
|
||||
|
||||
Reference in New Issue
Block a user