提交 d3ef26c5 编写于 作者: huangwensu's avatar huangwensu

修改baseUrl

上级 bad63d05
......@@ -92,7 +92,7 @@ export default {
req = {
token: token
}
vm.GET('common/v1/role',req).then((res) => {
vm.GET('portal/common/v1/role',req).then((res) => {
if(res.code == '000000') {
vm.changeIdType(res.data.idType)
vm.idType = res.data.idType
......
......@@ -9,7 +9,7 @@ export const envConfig = {
// baseUrl: 'https://test1-sc.yunqueyi.com/',
//baseUrl: 'https://uat-sc.yunqueyi.com/',
baseUrl: 'https://dev-sc.yunqueyi.com/portal/',
baseUrl: 'https://dev-sc.yunqueyi.com/',
qiniuFileUrl: "http://localhost:10201/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com",
......@@ -18,7 +18,7 @@ export const envConfig = {
yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html'
},
dev: {
baseUrl: 'https://dev-sc.yunqueyi.com/portal/',
baseUrl: 'https://dev-sc.yunqueyi.com/',
qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com",
......@@ -27,7 +27,7 @@ export const envConfig = {
yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html'
},
test: {
baseUrl: 'https://test1-sc.yunqueyi.com/portal/',
baseUrl: 'https://test1-sc.yunqueyi.com/',
qiniuFileUrl: "https://test1-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com",
......@@ -36,7 +36,7 @@ export const envConfig = {
yuequeyiIndexUrl: 'https://test1.yunqueyi.com/pica_index.html'
},
uat: {
baseUrl: 'https://uat-sc.yunqueyi.com/portal/',
baseUrl: 'https://uat-sc.yunqueyi.com/',
qiniuFileUrl: "https://uat-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://videos.yunqueyi.com", // 视频
qiniuImgUrl: "https://file.yunqueyi.com",
......@@ -45,7 +45,7 @@ export const envConfig = {
yuequeyiIndexUrl: 'https://uat.yunqueyi.com/pica_index.html'
},
pro: {
baseUrl: 'https://sc.yunqueyi.com/portal/',
baseUrl: 'https://sc.yunqueyi.com/',
qiniuFileUrl: "https://sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://videos.yunqueyi.com",
qiniuImgUrl: "https://file.yunqueyi.com",
......
......@@ -298,7 +298,7 @@ let validateRepeatWord = function(rule, value, callback, message) {
idType: vm.idType // 1内部 2外部
}
if(vm.itemName != value) {
vm.GET('portalComponent/checkComponentName',req).then((res) => {
vm.GET('portal/portalComponent/checkComponentName',req).then((res) => {
if(res.code == '000000') {
if(res.data.resultFlag == 2) {
callback(new Error(message))
......@@ -315,7 +315,7 @@ let validateRepeatWord = function(rule, value, callback, message) {
let validateModuleName = function(rule, value, callback, message) {
for(let i = 0;i<vm.componentList.moduleModelList.length;i++) {
if(vm.componentList.moduleModelList[i].openFlag == 2) {
vm.GET('portalComponent/checkModuleName',{name: value}).then((res) => {
vm.GET('portal/portalComponent/checkModuleName',{name: value}).then((res) => {
if(res.code == '000000') {
if(res.data.resultFlag > 0) {
callback(new Error(message))
......@@ -464,7 +464,7 @@ export default {
componentBasicInfo() {
if(vm.componentId) {
openLoading(vm)
vm.GET('portalComponent/queryPortalComponentById',{id: vm.componentId}).then((res) => {
vm.GET('portal/portalComponent/queryPortalComponentById',{id: vm.componentId}).then((res) => {
closeLoading(vm)
if( res.code == '000000') {
vm.portalComponent = res.data.portalComponent
......@@ -497,7 +497,7 @@ export default {
},
// 获取证书下拉列表
getCertificateList() {
vm.GET('portalComponent/CertificateList').then((res) => {
vm.GET('portal/portalComponent/CertificateList').then((res) => {
if( res.code == '000000') {
vm.certificateIdSelect = res.data.certificateList
}
......@@ -507,9 +507,9 @@ export default {
storageAndNext(flag) {
vm.itemName = vm.portalComponent.name
if(vm.componentId) { // 编辑
vm.submitBasicData(flag,'portalComponent/updatePortalComponent')
vm.submitBasicData(flag,'portal/portalComponent/updatePortalComponent')
}else{ // 新增
vm.submitBasicData(flag,'portalComponent/insertPortalComponent')
vm.submitBasicData(flag,'portal/portalComponent/insertPortalComponent')
}
},
submitBasicData(flag,url) {
......@@ -540,38 +540,24 @@ export default {
vm.isStorage = false
},
submitBasic(flag,url) {
let req = {
token: vm._token,
name: vm.portalComponent.name,
idType: vm.idType // 1内部 2外部
}
vm.GET('portalComponent/checkComponentName',req).then((res) => {
if(res.code == '000000') {
if(res.data.resultFlag == 2) {
return
}else {
vm.portalComponent.idType = vm.idType
vm.portalComponent.id = vm.componentId
vm.POST(url,{ model: vm.portalComponent }).then((res) => {
if( res.code == '000000') {
if(!vm.componentId) {
vm.componentId = res.data
}
if(flag == 2) {
vm.stepNum = 2
vm.getTemplateData()
vm.getModuleData()
vm.getTestListData()
vm.getCourseData()
} else {
vm.$message.info("暂存成功!")
}
}
})
vm.portalComponent.idType = vm.idType
vm.portalComponent.id = vm.componentId
vm.POST(url,{ model: vm.portalComponent }).then((res) => {
if( res.code == '000000') {
if(!vm.componentId) {
vm.componentId = res.data
}
if(flag == 2) {
vm.stepNum = 2
vm.getTemplateData()
vm.getModuleData()
vm.getTestListData()
vm.getCourseData()
} else {
vm.$message.info("暂存成功!")
}
}
})
},
// 上传组件图片
beforeAvatarUpload(file) {
......@@ -603,7 +589,7 @@ export default {
},
// 获取考试下拉列表
getTestListData() {
vm.GET('portalComponent/OnlineExamList').then((res) => {
vm.GET('portal/portalComponent/OnlineExamList').then((res) => {
if( res.code == '000000') {
vm.testIdSelect = res.data.onlineExamList
}
......@@ -629,7 +615,7 @@ export default {
},
// 获取课程下拉列表
getCourseData() {
vm.GET('portalComponent/CourseList').then((res) => {
vm.GET('portal/portalComponent/CourseList').then((res) => {
if( res.code == '000000') {
vm.courseIdSelect = res.data.courseList
}
......@@ -655,7 +641,7 @@ export default {
},
// 获取默认模板
getTemplateData() {
vm.GET('portalComponent/TempletConfigList').then((res) => {
vm.GET('portal/portalComponent/TempletConfigList').then((res) => {
if( res.code == '000000') {
vm.templateDataList = res.data.templetConfigModelList
}
......@@ -663,7 +649,7 @@ export default {
},
// 通过编辑获取模块信息
getModuleData() {
vm.GET('portalComponent/ModuleList',{componentId: vm.componentId}).then((res) => {
vm.GET('portal/portalComponent/ModuleList',{componentId: vm.componentId}).then((res) => {
if( res.code == '000000') {
vm.componentList.moduleModelList = res.data.moduleModelList
}
......@@ -690,38 +676,72 @@ export default {
removeTab(targetName) {
for(let i = 0;i<vm.componentList.moduleModelList.length;i++) {
if((targetName - 1) == i) {
if(vm.componentList.moduleModelList[i].id) {
if(vm.componentList.moduleModelList[i].templetModelList) {
vm.$confirm('删除模块会将改模块下已有模板同时删除,确认需要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
vm.GET('portalComponent/deletePortalModuleById',{id:vm.componentList.moduleModelList[i].id}).then((res) => {
// if(vm.componentList.moduleModelList[i].id) {
// if(vm.componentList.moduleModelList[i].templetModelList) {
// vm.$confirm('删除模块会将改模块下已有模板同时删除,确认需要删除吗?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// vm.GET('portal/portalComponent/deletePortalModuleById',{id:vm.componentList.moduleModelList[i].id}).then((res) => {
// if( res.code == '000000') {
// vm.$message.info('成功删除模块!')
// }
// vm.getModuleData()
// vm.firstTab = i + ''
// })
// }).catch(() => {
// vm.$message({
// type: 'info',
// message: '已取消删除'
// })
// })
// }else {
// vm.GET('portal/portalComponent/deletePortalModuleById',{id:vm.componentList.moduleModelList[i].id}).then((res) => {
// if( res.code == '000000') {
// vm.$message.info('成功删除模块!')
// }
// vm.getModuleData()
// vm.firstTab = i + ''
// })
// }
// }else {
// vm.componentList.moduleModelList.splice(i,1)
// vm.firstTab = i + ''
// }
if(vm.componentList.moduleModelList[i].templetModelList) {
vm.$confirm('删除模块会将改模块下已有模板同时删除,确认需要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if(vm.componentList.moduleModelList[i].id) {
vm.GET('portal/portalComponent/deletePortalModuleById',{id:vm.componentList.moduleModelList[i].id}).then((res) => {
if( res.code == '000000') {
vm.$message.info('成功删除模块!')
}
vm.getModuleData()
vm.firstTab = i + ''
})
}).catch(() => {
vm.$message({
type: 'info',
message: '已取消删除'
})
})
}else {
vm.GET('portalComponent/deletePortalModuleById',{id:vm.componentList.moduleModelList[i].id}).then((res) => {
if( res.code == '000000') {
vm.$message.info('成功删除模块!')
}else {
vm.componentList.moduleModelList.splice(i,1)
vm.firstTab = i + ''
}
vm.getModuleData()
vm.firstTab = i + ''
}).catch(() => {
vm.$message({
type: 'info',
message: '已取消删除'
})
})
}
}else {
vm.componentList.moduleModelList.splice(i,1)
vm.firstTab = i + ''
vm.GET('portal/portalComponent/deletePortalModuleById',{id:vm.componentList.moduleModelList[i].id}).then((res) => {
if( res.code == '000000') {
vm.$message.info('成功删除模块!')
}
vm.getModuleData()
vm.firstTab = i + ''
})
}
break
}
......@@ -793,7 +813,7 @@ export default {
for(let i = 0; i < vm.componentList.moduleModelList.length; i++) {
if(index == i) {
if(vm.componentList.moduleModelList[i].templetModelList[index1].id) {
vm.GET('portalComponent/deletePortalTemplateById',{id: vm.componentList.moduleModelList[i].templetModelList[index1].id}).then((res) => {
vm.GET('portal/portalComponent/deletePortalTemplateById',{id: vm.componentList.moduleModelList[i].templetModelList[index1].id}).then((res) => {
if( res.code == '000000') {
vm.$message.info('成功删除模板!')
vm.getModuleData()
......@@ -839,7 +859,7 @@ export default {
for(let q = 0; q < vm.componentList.moduleModelList[i].templetModelList[j].partModelList.length;q++){
if(index2 == q) {
if(vm.componentList.moduleModelList[i].templetModelList[j].partModelList[q].partContentModelList[index3].id) {
vm.GET('portalComponent/deletePortalPartById',{id: vm.componentList.moduleModelList[i].templetModelList[j].partModelList[q].partContentModelList[index3].id}).then((res) => {
vm.GET('portal/portalComponent/deletePortalPartById',{id: vm.componentList.moduleModelList[i].templetModelList[j].partModelList[q].partContentModelList[index3].id}).then((res) => {
if( res.code == '000000') {
vm.$message.info('成功删除模板元件内容!')
vm.getModuleData()
......@@ -925,7 +945,7 @@ export default {
}
},
finishModule(req, flag) {
vm.POST('portalComponent/insertOrUpdatePortalModule',{model: vm.componentList.moduleModelList,status: flag}).then((res) => {
vm.POST('portal/portalComponent/insertOrUpdatePortalModule',{model: vm.componentList.moduleModelList,status: flag}).then((res) => {
if( res.code == '000000') {
vm.enableComponent(req, flag)
}
......@@ -933,7 +953,7 @@ export default {
},
// 启用
enableComponent(req, flag) {
vm.GET('portalComponent/disableOrStart',req).then((res) => {
vm.GET('portal/portalComponent/disableOrStart',req).then((res) => {
if(res.code == "000000") {
if(flag == 2) {
vm.$router.push({ path: 'item-component' })
......@@ -951,7 +971,7 @@ export default {
// 从资源包中添加模块
addFromModule() {
vm.columnFormVisible = true
vm.GET('portalComponent/ModuleList',{openFlag: 2}).then((res) => {
vm.GET('portal/portalComponent/ModuleList',{openFlag: 2}).then((res) => {
if( res.code == '000000') {
vm.resourceArray = res.data.moduleModelList
for(let i = 0; i < vm.componentList.moduleModelList.length; i++) {
......
......@@ -151,7 +151,7 @@ export default {
search() {
vm.searchParam.idType = vm.idType
openLoading(vm)
vm.GET('portalComponent/queryPortalComponent',vm.searchParam).then((res) => {
vm.GET('portal/portalComponent/queryPortalComponent',vm.searchParam).then((res) => {
closeLoading(vm)
if( res.code == '000000' ) {
vm.tableData = res.data.queryList
......@@ -180,7 +180,7 @@ export default {
token: vm._token,
componentId: row.id
}
vm.GET('portalComponent/componentEditRange',req).then((res) => {
vm.GET('portal/portalComponent/componentEditRange',req).then((res) => {
if(res.code == "000000") {
vm.$router.push({path: 'create-component',query: {id:row.id,status: row.status,resultFlag: res.data.resultFlag}})
}
......@@ -208,7 +208,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
vm.GET('portalComponent/disableOrStart',req).then((res) => {
vm.GET('portal/portalComponent/disableOrStart',req).then((res) => {
if(res.code == "000000") {
vm.$message({
type: 'success',
......@@ -239,7 +239,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
vm.GET('portalComponent/deleteComponentById',{id: row.id}).then((res) => {
vm.GET('portal/portalComponent/deleteComponentById',{id: row.id}).then((res) => {
if(res.code == "000000") {
vm.$message({
type: 'success',
......
......@@ -83,7 +83,7 @@ export default {
},
// 获取系统消息数据
getSystemData() {
vm.GET('portalMessage/queryPortalMessageInfo',{token: vm._token, pageNo: 1, pageSize: 15}).then((res) => {
vm.GET('portal/portalMessage/queryPortalMessageInfo',{token: vm._token, pageNo: 1, pageSize: 15}).then((res) => {
if( res.code == '000000') {
vm.messageList = res.data.portalMessageModels
vm.count = res.data.count
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册