mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-06 17:36:45 +08:00
Merge branch 'dai-master'
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/** 管理端接口 **/
|
||||
import ajax from './manageAjax.js';
|
||||
const baseURL ="/manageApi";
|
||||
import config from '../../config/index.js';
|
||||
const baseURL =config.manageApiBaseUrl;
|
||||
|
||||
/**用户的待办任务数量*/
|
||||
const getTaskNum = function(){
|
||||
|
||||
@@ -64,8 +64,9 @@
|
||||
})
|
||||
}else if (citem.source==3){
|
||||
let params=encodeURIComponent('courseId='+citem.id);
|
||||
let mapi=this.$config.manageApiBaseUrl;
|
||||
uni.navigateTo({
|
||||
url:'/pages/forward?to=/manageApi/stu/project/redirectDetail¶ms='+params
|
||||
url:'/pages/forward?to='+mapi+'/stu/project/redirectDetail¶ms='+params
|
||||
});
|
||||
}else{
|
||||
console.log('不支持的数据来源 '+citem.source)
|
||||
|
||||
@@ -15,6 +15,7 @@ let scormPlayer='';
|
||||
if(process.env.NODE_ENV === 'development'){
|
||||
//本地开发环境
|
||||
apiBaseUrl = '/systemapi';
|
||||
manageApiBaseUrl ='/manageApi';
|
||||
oldApiBaseUrl = '/uboeApi';
|
||||
statApiBaseUrl='/statApi';
|
||||
socialApiBaseUrl='/socialApi';
|
||||
@@ -24,10 +25,11 @@ if(process.env.NODE_ENV === 'development'){
|
||||
}else if(process.env.ENV_TYPE === 'preview'){
|
||||
// 预发布环境,当前配置未使用上
|
||||
context='/mobile-release';
|
||||
apiBaseUrl = '/systemapi';
|
||||
apiBaseUrl = '/systemapi-release';
|
||||
manageApiBaseUrl ='/manageApi-release';
|
||||
oldApiBaseUrl = '/uboeApi';
|
||||
statApiBaseUrl='/statApi';
|
||||
socialApiBaseUrl='/socialApi';
|
||||
statApiBaseUrl='/statApi-release';
|
||||
socialApiBaseUrl='/socialApi-release';
|
||||
fileUrl = 'https://u.boe.com/upload';
|
||||
loginPath='https://u.boe.com/m/loginuser';
|
||||
scormPlayer='https://u.boe.com/newscorm/scorm-player';
|
||||
@@ -43,6 +45,7 @@ if(process.env.NODE_ENV === 'development'){
|
||||
}else{
|
||||
// 生产环境
|
||||
apiBaseUrl = '/systemapi';
|
||||
manageApiBaseUrl ='/manageApi';
|
||||
oldApiBaseUrl = '/uboeApi';
|
||||
statApiBaseUrl='/statApi';
|
||||
socialApiBaseUrl='/socialApi';
|
||||
|
||||
@@ -253,6 +253,10 @@
|
||||
},
|
||||
onLoad() {
|
||||
//this.$watermark.set('');
|
||||
//用于测试打印当前环境是否正确
|
||||
console.log(this.$config.apiBaseUrl);
|
||||
console.log(this.$config.context);
|
||||
console.log(this.$config.manageApiBaseUrl);
|
||||
},
|
||||
onShow() {
|
||||
this.countNoReadMsg();
|
||||
|
||||
@@ -764,8 +764,9 @@
|
||||
})
|
||||
}else if (coure.source==3){
|
||||
let params=encodeURIComponent('courseId='+coure.id);
|
||||
let mapi=this.$config.manageApiBaseUrl;
|
||||
uni.navigateTo({
|
||||
url:'/pages/forward?to=/manageApi/stu/project/redirectDetail¶ms='+params
|
||||
url:'/pages/forward?to='+mapi+'/stu/project/redirectDetail¶ms='+params
|
||||
});
|
||||
}else{
|
||||
console.log('不支持的数据来源 '+coure.source)
|
||||
|
||||
@@ -490,10 +490,19 @@
|
||||
let taskUrl='';
|
||||
if(task.cmtask_type==1){ //学习路径图
|
||||
let params=encodeURIComponent('routerId='+task.cmtask_id);
|
||||
taskUrl='/pages/forward?to=/student-h5/pathdetails¶ms='+params;
|
||||
if(this.$config.context=='/mobile-release'){
|
||||
taskUrl='/pages/forward?to=/student-h5-release/pathdetails¶ms='+params;
|
||||
}else{
|
||||
taskUrl='/pages/forward?to=/student-h5/pathdetails¶ms='+params;
|
||||
}
|
||||
|
||||
}else if(task.cmtask_type==2){ //学习项目
|
||||
let params=encodeURIComponent('projectId='+task.cmtask_id);
|
||||
taskUrl='/pages/forward?to=/student-h5/projectdetails¶ms='+params;
|
||||
if(this.$config.context=='/mobile-release'){
|
||||
taskUrl='/pages/forward?to=/student-h5-release/projectdetails¶ms='+params;
|
||||
}else{
|
||||
taskUrl='/pages/forward?to=/student-h5/projectdetails¶ms='+params;
|
||||
}
|
||||
}else if(task.cmtask_type==3){
|
||||
taskUrl='/pages/study/loaddetail?id=' + task.cmtask_id
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user