You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
122 lines
2.3 KiB
122 lines
2.3 KiB
import request from '../utils/rerquest'
|
|
|
|
/**
|
|
* 已核对
|
|
* 用户登录接口
|
|
* @param {number} username 用户名
|
|
* @param {number} password 密码
|
|
* @param {string} wxCode 微信code
|
|
*
|
|
*/
|
|
export function login({ username, password, wxCode }: RequestAPIOptionsLogin) {
|
|
return request({
|
|
method: 'POST',
|
|
url: 'api/analysis/user/login',
|
|
options: {
|
|
username,
|
|
password,
|
|
wxCode
|
|
}
|
|
})
|
|
}
|
|
|
|
|
|
/**
|
|
* 已核对
|
|
* 获取token
|
|
* @param {string} wxCode 微信code
|
|
*/
|
|
export function getToken(wxCode: string) {
|
|
return request({
|
|
method: 'GET',
|
|
url: 'api/analysis/user/getToken',
|
|
options: {
|
|
wxCode
|
|
}
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 已核对
|
|
* 数据分析小程序首页-轮播接口
|
|
*
|
|
*/
|
|
|
|
export function bannerList() {
|
|
return request({
|
|
method: 'GET',
|
|
url: 'cloudAnalysis/typicalcase/homePage/banners'
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 已核对
|
|
* 数据分析小程序首页-用户总数
|
|
* @param {String} gridId 网格Id
|
|
* @param {String} generateDate 网页打开时间(如 2020-02-20)
|
|
*/
|
|
export function getAllSituation({ deptId }: RequestAPIOptionsLogin) {
|
|
return request({
|
|
method: 'GET',
|
|
url: 'cloudAnalysis/user/getAllSituation',
|
|
options: {
|
|
deptId
|
|
}
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 已核对
|
|
* 数据分析小程序首页接口-议题接口
|
|
* @param {String} gridId 网格Id
|
|
* @param {String} generateDate 网页打开时间(如 2020-02-20)
|
|
*/
|
|
export function getSurvey({ deptId }: RequestAPIOptionsLogin) {
|
|
return request({
|
|
method: 'GET',
|
|
url: 'cloudAnalysis/issue/getIssueSurvey',
|
|
options: {
|
|
deptId
|
|
}
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 已核对
|
|
* 获取经典案例
|
|
* @param {number} pageIndex 当前页数
|
|
* @param {number} pageSize 页面条数
|
|
*
|
|
*/
|
|
export function getCaseList({ pageIndex, pageSize }: RequestAPIOptionsLogin) {
|
|
return request({
|
|
method: 'GET',
|
|
url:'cloudAnalysis/typicalcase/caseList',
|
|
options:{
|
|
pageIndex,
|
|
pageSize
|
|
}
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 已核对
|
|
* 点击轮播图获取典型
|
|
* @param {string} id 根据典型案例id获取典型案例详细
|
|
*/
|
|
export function getTypicalList( id:string) {
|
|
return request({
|
|
method: 'GET',
|
|
url: `cloudAnalysis/typicalcase/detail/${id}`,
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 首页功能权限
|
|
*/
|
|
export function getIndexPanel() {
|
|
return request({
|
|
method: 'GET',
|
|
url: 'cloudAnalysis/home/getIndexPanel',
|
|
})
|
|
}
|
|
|