APPbug反馈修改
This commit is contained in:
@@ -94,7 +94,7 @@ export const transferDevice = (id) => {
|
||||
url: '/cs-device-boot/deviceUser/transfer',
|
||||
method: 'POST',
|
||||
data: {
|
||||
eid: id,
|
||||
ids: id,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -48,3 +48,23 @@ export function deleteEngineering(id) {
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
// 查询工程配置列表
|
||||
export function queryAllEnginner(params) {
|
||||
return request({
|
||||
url: '/cs-device-boot/csMarketData/queryAllEnginner',
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
|
||||
// 更新工程配置
|
||||
export function csMarketDataAdd(params) {
|
||||
return request({
|
||||
url: '/cs-device-boot/csMarketData/follow',
|
||||
method: 'post',
|
||||
data: params,
|
||||
header: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,25 +2,41 @@ import request from '../js/request'
|
||||
import config from '../js/config'
|
||||
|
||||
export function addAppProject(params, files) {
|
||||
return uni.uploadFile({
|
||||
url: config.domain + '/cs-device-boot/project/addAppProject', //仅为示例,非真实的接口地址
|
||||
files: files,
|
||||
header: {
|
||||
Authorization: uni.getStorageSync('access_token'),
|
||||
},
|
||||
formData: params,
|
||||
})
|
||||
if (files.length === 0) {
|
||||
return request({
|
||||
url: '/cs-device-boot/project/addAppProject',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
} else {
|
||||
return uni.uploadFile({
|
||||
url: config.domain + '/cs-device-boot/project/addAppProject', //仅为示例,非真实的接口地址
|
||||
files: files,
|
||||
header: {
|
||||
Authorization: uni.getStorageSync('access_token'),
|
||||
},
|
||||
formData: params,
|
||||
})
|
||||
}
|
||||
}
|
||||
// 修改项目
|
||||
export function updateAppProject(params, files) {
|
||||
return uni.uploadFile({
|
||||
url: config.domain + '/cs-device-boot/project/auditAppProject', //仅为示例,非真实的接口地址
|
||||
files: files,
|
||||
header: {
|
||||
Authorization: uni.getStorageSync('access_token'),
|
||||
},
|
||||
formData: params,
|
||||
})
|
||||
if (files.length === 0) {
|
||||
return request({
|
||||
url: '/cs-device-boot/project/updateAppProject',
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}else{
|
||||
return uni.uploadFile({
|
||||
url: config.domain + '/cs-device-boot/project/auditAppProject', //仅为示例,非真实的接口地址
|
||||
files: files,
|
||||
header: {
|
||||
Authorization: uni.getStorageSync('access_token'),
|
||||
},
|
||||
formData: params,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export function getProjectList(params) {
|
||||
@@ -101,4 +117,3 @@ export function addAppTopologyDiagram(params, filePath) {
|
||||
),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -149,22 +149,22 @@ page {
|
||||
margin: 0 20rpx;
|
||||
display: grid;
|
||||
grid-gap: 20rpx;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
grid-template-columns: 1fr 1fr 1fr 1fr;
|
||||
.header-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 10rpx 10rpx 20rpx;
|
||||
color: #111;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
background: #fff;
|
||||
background: $uni-theme-color;
|
||||
border-radius: 12rpx;
|
||||
.header-item-value {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.header-item-label{
|
||||
font-size: 28rpx;
|
||||
.header-item-label {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -182,18 +182,21 @@ page {
|
||||
z-index: 2;
|
||||
|
||||
.nav-menu {
|
||||
padding: 10rpx 20rpx;
|
||||
padding: 6rpx 20rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-size: 24rpx;
|
||||
border-radius: 8rpx;
|
||||
background: #ebeaec;
|
||||
color: #666;
|
||||
|
||||
&-active {
|
||||
background: #dfe5f7;
|
||||
color: $uni-theme-color;
|
||||
}
|
||||
&-btn {
|
||||
background: $uni-theme-color;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
export default {
|
||||
onPullDownRefresh() {
|
||||
this.store && this.store.reload();
|
||||
this.store && this.store.reload()
|
||||
this.store.loadedCallback = () => {
|
||||
uni.stopPullDownRefresh();
|
||||
};
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.store.status != 'noMore') {
|
||||
this.store.next && this.store.next();
|
||||
this.store.next && this.store.next()
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
store: {},
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
DataSource(url) {
|
||||
var me = this;
|
||||
var me = this
|
||||
return {
|
||||
data: [],
|
||||
status: 'more',
|
||||
@@ -31,11 +31,11 @@ export default {
|
||||
pageSize: 20,
|
||||
},
|
||||
reload() {
|
||||
this.data = [];
|
||||
this.status = 'loading';
|
||||
this.empty = false;
|
||||
this.params.pageNum = 1;
|
||||
this.next();
|
||||
this.data = []
|
||||
this.status = 'loading'
|
||||
this.empty = false
|
||||
this.params.pageNum = 1
|
||||
this.next()
|
||||
},
|
||||
callBack: null,
|
||||
firstCallBack: null,
|
||||
@@ -47,37 +47,35 @@ export default {
|
||||
header: this.header,
|
||||
method: 'POST',
|
||||
}).then((res) => {
|
||||
console.warn(res);
|
||||
let resultData =
|
||||
res.data?.list || res.data?.records || [];
|
||||
console.warn(res)
|
||||
let resultData = res.data?.list || res.data?.records || []
|
||||
if (this.params.pageNum == 1) {
|
||||
this.data = resultData;
|
||||
this.data = resultData
|
||||
if (resultData.length == 0 || resultData == 0) {
|
||||
this.empty = true;
|
||||
} else if (
|
||||
resultData.length < this.params.pageSize
|
||||
) {
|
||||
this.status = 'noMore';
|
||||
this.empty = true
|
||||
this.status = 'noMore'
|
||||
} else if (resultData.length < this.params.pageSize) {
|
||||
this.status = 'noMore'
|
||||
} else if (res.total == resultData.length) {
|
||||
this.status = 'noMore';
|
||||
this.status = 'noMore'
|
||||
}
|
||||
} else {
|
||||
this.data.push(...resultData);
|
||||
this.data.push(...resultData)
|
||||
if (resultData.length < this.params.pageSize) {
|
||||
this.status = 'noMore';
|
||||
this.status = 'noMore'
|
||||
}
|
||||
}
|
||||
|
||||
if (this.params.pageNum == 1) {
|
||||
this.firstCallBack && this.firstCallBack();
|
||||
this.firstCallBack && this.firstCallBack()
|
||||
}
|
||||
this.loadedCallback && this.loadedCallback();
|
||||
this.params.pageNum++;
|
||||
this.total = res.total;
|
||||
this.loading = false;
|
||||
});
|
||||
this.loadedCallback && this.loadedCallback()
|
||||
this.params.pageNum++
|
||||
this.total = res.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ export default (options = {}) => {
|
||||
}
|
||||
uni.request({
|
||||
url,
|
||||
timeout: 5000,
|
||||
data: {
|
||||
...options.data,
|
||||
},
|
||||
@@ -65,6 +66,7 @@ export default (options = {}) => {
|
||||
* @param {Number} code 错误码
|
||||
*/
|
||||
function errHandler(res) {
|
||||
console.log(res);
|
||||
switch (res.code) {
|
||||
case 'A0024':
|
||||
uni.reLaunch({ url: '/pages/user/login' })
|
||||
|
||||
Reference in New Issue
Block a user