mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-13 04:46:44 +08:00
ajax配置
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/**文章模块的相关处理*/
|
||||
import ajax from '@/utils/xajax.js'
|
||||
|
||||
// import ajax from '@/utils/xajax.js'
|
||||
import ajax from '../ajax'
|
||||
const baseURL = process.env.VUE_APP_STAT_BASE_API;
|
||||
/**
|
||||
* 发送事件,具体事件参考后台管理的事件查看
|
||||
*参数如下:
|
||||
@@ -19,7 +20,7 @@ import ajax from '@/utils/xajax.js'
|
||||
*
|
||||
*/
|
||||
const sendEvent = function(data) {
|
||||
return ajax.get('/xboe/m/stat/event/send');
|
||||
return ajax.get(baseURL,'/xboe/m/stat/event/send');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -28,7 +29,7 @@ const sendEvent = function(data) {
|
||||
* @param {Object} data 参数 []数组,10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数,空数组 返回用户的全部类型统计。
|
||||
*/
|
||||
const userTotal = function(aid,data) {
|
||||
return ajax.postJson('/xboe/m/stat/user/total/'+aid,data);
|
||||
return ajax.postJson(baseURL,'/xboe/m/stat/user/total/'+aid,data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -43,7 +44,7 @@ const userTotal = function(aid,data) {
|
||||
} data
|
||||
*/
|
||||
const userDynamicList = function(data) {
|
||||
return ajax.post('/xboe/m/stat/userdynamic/list',data);
|
||||
return ajax.post(baseURL,'/xboe/m/stat/userdynamic/list',data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -52,7 +53,7 @@ const userDynamicList = function(data) {
|
||||
* @param {Integer} days 整数,最近几天的记录
|
||||
*/
|
||||
const userCoinList = function(aid,days) {
|
||||
return ajax.get('xboe/m/stat/usercoinrecord/list?aid='+aid+'&days='+days);
|
||||
return ajax.get(baseURL,'xboe/m/stat/usercoinrecord/list?aid='+aid+'&days='+days);
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user