修改首页和登录页统计接口逻辑

This commit is contained in:
田岩
2025-06-24 16:41:10 +08:00
parent 9d354db292
commit c2520d4e8c
31 changed files with 2569 additions and 161 deletions
+5 -1
View File
@@ -56,8 +56,12 @@ export function previewFile(id, responseType = 'arraybuffer') {
header,
responseType,
success(result) {
console.log(result)
//#ifdef APP-PLUS
let _header = result.header['Content-Type'].split(';')[0]
// #endif
//#ifndef APP-PLUS
let _header = result.header['content-type'].split(';')[0]
// #endif
// let base64 = new Blob([result.data],{type:result.header['content-type'].split(';')[0]})
let base64 = `data:${_header};base64,` + uni.arrayBufferToBase64(result.data)
resolve(base64)
+4 -8
View File
@@ -12,8 +12,7 @@ export const getStatisticsData = (data) => {
return request({
url: '/traapp/traStdyInfo/queryTraStdyStatisticsPerson',
method: 'post',
data,
suppressErrors: true
data
});
};
@@ -35,8 +34,7 @@ export const queryCrsInfoByLastnew = (data) => {
return request({
url: '/traapp/mycrs/queryCrsInfoByLastnew',
method: 'post',
data,
suppressErrors: true
data
});
};
@@ -63,8 +61,7 @@ export const queryCrsInfoByPopular = (data) => {
return request({
url: '/traapp/mycrs/queryCrsInfoByPopular',
method: 'post',
data,
suppressErrors: true
data
});
};
@@ -86,7 +83,6 @@ export const queryCrsInfoByRecmd = (data) => {
return request({
url: '/traapp/mycrs/queryCrsInfoByRecmd',
method: 'post',
data,
suppressErrors: true
data
});
};
+3 -3
View File
@@ -32,14 +32,14 @@ export const REQUES_ERROR_CODES = {
let no_login_show_modal_state = false
// 去登录方法
export const goto_login_fun = () => {
// if (no_login_show_modal_state) return;
if (no_login_show_modal_state) return;
no_login_show_modal_state = true
common.hideLoading()
common.show('未登录', '现在去登录').then(() => {
common.navigateTo('/pages/login/login')
}).finally(() => {
no_login_show_modal_state = false
})
})
}
@@ -96,7 +96,7 @@ export default function request({
return reject(res)
},
fail(res) {
console.log('131231', res, url, base_url);
console.log('请求错误', res, url, base_url);
}
});
})