|  | @@ -3,190 +3,191 @@ import Cookies from "js-cookie";
 | 
	
		
			
				|  |  |  import { getToken } from "@/utils/auth"
 | 
	
		
			
				|  |  |  let userInfor = getToken()
 | 
	
		
			
				|  |  |  let UserCode = '',
 | 
	
		
			
				|  |  | -    UserType = '',
 | 
	
		
			
				|  |  | -    SessionID = ''
 | 
	
		
			
				|  |  | +  UserType = '',
 | 
	
		
			
				|  |  | +  SessionID = ''
 | 
	
		
			
				|  |  |  if (userInfor) {
 | 
	
		
			
				|  |  | -    userInfor = JSON.parse(getToken())
 | 
	
		
			
				|  |  | -    UserCode = userInfor.user_code;
 | 
	
		
			
				|  |  | -    UserType = userInfor.user_type;
 | 
	
		
			
				|  |  | -    SessionID = userInfor.session_id;
 | 
	
		
			
				|  |  | +  userInfor = JSON.parse(getToken())
 | 
	
		
			
				|  |  | +  UserCode = userInfor.user_code;
 | 
	
		
			
				|  |  | +  UserType = userInfor.user_type;
 | 
	
		
			
				|  |  | +  SessionID = userInfor.session_id;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export function getStaticContent(MethodName, data) {
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}`,
 | 
	
		
			
				|  |  | -        method: 'post',
 | 
	
		
			
				|  |  | -        data
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}`,
 | 
	
		
			
				|  |  | +    method: 'post',
 | 
	
		
			
				|  |  | +    data
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  export function LearnWebSI(MethodName, data) {
 | 
	
		
			
				|  |  | -    let userInfor = JSON.parse(getToken());
 | 
	
		
			
				|  |  | -    let UserCode = "",
 | 
	
		
			
				|  |  | -        UserType = "",
 | 
	
		
			
				|  |  | -        SessionID = "";
 | 
	
		
			
				|  |  | -    if (userInfor) {
 | 
	
		
			
				|  |  | -        UserCode = userInfor.user_code;
 | 
	
		
			
				|  |  | -        UserType = userInfor.user_type;
 | 
	
		
			
				|  |  | -        SessionID = userInfor.session_id;
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSLearnWebSI/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | -        method: 'post',
 | 
	
		
			
				|  |  | -        data,
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  let userInfor = JSON.parse(getToken());
 | 
	
		
			
				|  |  | +  let UserCode = "",
 | 
	
		
			
				|  |  | +    UserType = "",
 | 
	
		
			
				|  |  | +    SessionID = "";
 | 
	
		
			
				|  |  | +  if (userInfor) {
 | 
	
		
			
				|  |  | +    UserCode = userInfor.user_code;
 | 
	
		
			
				|  |  | +    UserType = userInfor.user_type;
 | 
	
		
			
				|  |  | +    SessionID = userInfor.session_id;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSLearnWebSI/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | +    method: 'post',
 | 
	
		
			
				|  |  | +    data,
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  // 根据id获取文件信息 
 | 
	
		
			
				|  |  |  export function GetFillemessage(MethodName, data) {
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}`,
 | 
	
		
			
				|  |  | -        method: 'post',
 | 
	
		
			
				|  |  | -        data,
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}`,
 | 
	
		
			
				|  |  | +    method: 'post',
 | 
	
		
			
				|  |  | +    data,
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  export function getContent(MethodName, UserCode, UserType, SessionID, data) {
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | -        method: 'post',
 | 
	
		
			
				|  |  | -        data
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSFileServer/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | +    method: 'post',
 | 
	
		
			
				|  |  | +    data
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  // 验证是否登录
 | 
	
		
			
				|  |  |  export function VerifyLogin(data) {
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSTCServer/login?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | -        method: "post",
 | 
	
		
			
				|  |  | -        data,
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSTCServer/login?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | +    method: "post",
 | 
	
		
			
				|  |  | +    data,
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  // 查询学习资料列表
 | 
	
		
			
				|  |  |  export function materiallist(data) {
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSTCServer/material/list?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | -        method: "post",
 | 
	
		
			
				|  |  | -        data,
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSTCServer/material/list?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | +    method: "post",
 | 
	
		
			
				|  |  | +    data,
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  // 查询学习资料详情
 | 
	
		
			
				|  |  |  export function materialdetail(data) {
 | 
	
		
			
				|  |  | -    let userInfor = getToken()
 | 
	
		
			
				|  |  | -    let UserCode = '',
 | 
	
		
			
				|  |  | -        UserType = '',
 | 
	
		
			
				|  |  | -        SessionID = ''
 | 
	
		
			
				|  |  | -    if (userInfor) {
 | 
	
		
			
				|  |  | -        userInfor = JSON.parse(getToken())
 | 
	
		
			
				|  |  | -        UserCode = userInfor.user_code;
 | 
	
		
			
				|  |  | -        UserType = userInfor.user_type;
 | 
	
		
			
				|  |  | -        SessionID = userInfor.session_id;
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSTCServer/material/detail?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | -        method: "post",
 | 
	
		
			
				|  |  | -        data,
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  let userInfor = getToken()
 | 
	
		
			
				|  |  | +  let UserCode = '',
 | 
	
		
			
				|  |  | +    UserType = '',
 | 
	
		
			
				|  |  | +    SessionID = ''
 | 
	
		
			
				|  |  | +  if (userInfor) {
 | 
	
		
			
				|  |  | +    userInfor = JSON.parse(getToken())
 | 
	
		
			
				|  |  | +    UserCode = userInfor.user_code;
 | 
	
		
			
				|  |  | +    UserType = userInfor.user_type;
 | 
	
		
			
				|  |  | +    SessionID = userInfor.session_id;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSTCServer/material/detail?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | +    method: "post",
 | 
	
		
			
				|  |  | +    data,
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  // 上传附件(课程资源)
 | 
	
		
			
				|  |  |  export function attachmentinsert(data) {
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSTCServer/attachment/insert?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | -        method: "post",
 | 
	
		
			
				|  |  | -        data,
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSTCServer/attachment/insert?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | +    method: "post",
 | 
	
		
			
				|  |  | +    data,
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  // 下架学习资料  /material/outOfStockAction
 | 
	
		
			
				|  |  |  export function materialoutOfStockAction(data) {
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSTCServer/material/outOfStockAction?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | -        method: "post",
 | 
	
		
			
				|  |  | -        data,
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSTCServer/material/outOfStockAction?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | +    method: "post",
 | 
	
		
			
				|  |  | +    data,
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  // 上架学习资料  /material/inStockAction
 | 
	
		
			
				|  |  |  export function materialinStockAction(data) {
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSTCServer/material/inStockAction?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | -        method: "post",
 | 
	
		
			
				|  |  | -        data,
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSTCServer/material/inStockAction?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | +    method: "post",
 | 
	
		
			
				|  |  | +    data,
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  // 删除学习资料/material/delete
 | 
	
		
			
				|  |  |  export function materialdelete(data) {
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSTCServer/material/delete?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | -        method: "post",
 | 
	
		
			
				|  |  | -        data,
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSTCServer/material/delete?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | +    method: "post",
 | 
	
		
			
				|  |  | +    data,
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  // 更新学习资料
 | 
	
		
			
				|  |  |  export function materialupdate(data) {
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSTCServer/material/update?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | -        method: "post",
 | 
	
		
			
				|  |  | -        data,
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSTCServer/material/update?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | +    method: "post",
 | 
	
		
			
				|  |  | +    data,
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  // 插入学习资料
 | 
	
		
			
				|  |  |  export function materialinsert(data) {
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSTCServer/material/insert?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | -        method: "post",
 | 
	
		
			
				|  |  | -        data,
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSTCServer/material/insert?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | +    method: "post",
 | 
	
		
			
				|  |  | +    data,
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  // 查询企业信息 (机构信息)
 | 
	
		
			
				|  |  |  export function usertenant(data) {
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSTCServer/user/tenant?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | -        method: "post",
 | 
	
		
			
				|  |  | -        data,
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSTCServer/user/tenant?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | +    method: "post",
 | 
	
		
			
				|  |  | +    data,
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  // 收藏 /material/favorite/insert
 | 
	
		
			
				|  |  |  export function materialfavoriteinsert(data) {
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSTCServer/material/favorite/insert?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | -        method: "post",
 | 
	
		
			
				|  |  | -        data,
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSTCServer/material/favorite/insert?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | +    method: "post",
 | 
	
		
			
				|  |  | +    data,
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  // 取消收藏/material/favorite/delete
 | 
	
		
			
				|  |  |  export function materialfavoritedelete(data) {
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSTCServer/material/favorite/delete?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | -        method: "post",
 | 
	
		
			
				|  |  | -        data,
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSTCServer/material/favorite/delete?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | +    method: "post",
 | 
	
		
			
				|  |  | +    data,
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  // 浏览次数计数/material/visit
 | 
	
		
			
				|  |  |  export function materialvisit(data) {
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSTCServer/material/visit?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | -        method: "post",
 | 
	
		
			
				|  |  | -        data,
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSTCServer/material/visit?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | +    method: "post",
 | 
	
		
			
				|  |  | +    data,
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  // 查询作者列表 /material/teacher/list
 | 
	
		
			
				|  |  |  export function teacherlist(data) {
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSTCServer/material/teacher/list?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | -        method: "post",
 | 
	
		
			
				|  |  | -        data,
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSTCServer/material/teacher/list?UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | +    method: "post",
 | 
	
		
			
				|  |  | +    data,
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  // 消息部分
 | 
	
		
			
				|  |  |  export function getLearnWebContent(MethodName, data) {
 | 
	
		
			
				|  |  | -    let userInfor = getToken();
 | 
	
		
			
				|  |  | -    let UserCode = '',
 | 
	
		
			
				|  |  | -        UserType = '',
 | 
	
		
			
				|  |  | -        SessionID = ''
 | 
	
		
			
				|  |  | -    if (userInfor) {
 | 
	
		
			
				|  |  | -        let user = JSON.parse(getToken());
 | 
	
		
			
				|  |  | -        UserCode = user.user_code;
 | 
	
		
			
				|  |  | -        UserType = user.user_type;
 | 
	
		
			
				|  |  | -        SessionID = user.session_id;
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -    return request({
 | 
	
		
			
				|  |  | -        url: `/GCLSLearnWebSI/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | -        method: 'post',
 | 
	
		
			
				|  |  | -        data
 | 
	
		
			
				|  |  | -    })
 | 
	
		
			
				|  |  | +  let userInfor = getToken();
 | 
	
		
			
				|  |  | +  let UserCode = '',
 | 
	
		
			
				|  |  | +    UserType = '',
 | 
	
		
			
				|  |  | +    SessionID = ''
 | 
	
		
			
				|  |  | +  if (userInfor) {
 | 
	
		
			
				|  |  | +    let user = JSON.parse(getToken());
 | 
	
		
			
				|  |  | +    UserCode = user.user_code;
 | 
	
		
			
				|  |  | +    UserType = user.user_type;
 | 
	
		
			
				|  |  | +    SessionID = user.session_id;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +  return request({
 | 
	
		
			
				|  |  | +    url: `/GCLSLearnWebSI/ServiceInterface?MethodName=${MethodName}&UserCode=${UserCode}&UserType=${UserType}&SessionID=${SessionID}`,
 | 
	
		
			
				|  |  | +    method: 'post',
 | 
	
		
			
				|  |  | +    data
 | 
	
		
			
				|  |  | +  })
 | 
	
		
			
				|  |  |  }
 |