mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
修改
This commit is contained in:
201
src/api/cesource/index.js
Normal file
201
src/api/cesource/index.js
Normal file
@@ -0,0 +1,201 @@
|
||||
import axios from 'axios'
|
||||
import qs from 'qs'
|
||||
import { Notification, MessageBox, Message } from 'element-ui'
|
||||
import store from '@/store'
|
||||
import { getToken } from '@/utils/token'
|
||||
import errorCode from '@/utils/errorCode'
|
||||
/**
|
||||
*request请求 axios.request(config)
|
||||
*requestJson请求 axios.request(config)
|
||||
*get请求 axios.get(url[, config])
|
||||
*post请求 axios.post(url[, data[, config]])
|
||||
*postJson请求 axios.post(url[, data[, config]])
|
||||
*put请求 axios.put(url[, data[, config]])
|
||||
*putJson请求 axios.put(url[, data[, config]])
|
||||
*patch请求 axios.patch(url[, data[, config]])
|
||||
*patchJson请求 axios.patch(url[, data[, config]])
|
||||
*delete请求 axios.delete(url[, config])
|
||||
*/
|
||||
|
||||
const ReLoginUrl="/login";
|
||||
const TokenName='XBOE-Access-Token';
|
||||
/**axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded'**/
|
||||
//只是用于发送json对象数据时使用post,put,patch
|
||||
const jsonRequest=axios.create({
|
||||
headers:{'Content-Type':'application/json;charset=utf-8'},
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: process.env.VUE_APP_CESOURCE_BASE_API,
|
||||
//超时
|
||||
timeout: 10000,
|
||||
});
|
||||
//发送json对象的拦截器
|
||||
jsonRequest.interceptors.request.use(config => {
|
||||
//是否需要设置 token
|
||||
const isToken = (config.headers || {}).isToken === false
|
||||
if (getToken() && !isToken) {
|
||||
config.headers[TokenName] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
}
|
||||
return config
|
||||
}, error => {
|
||||
console.log(error)
|
||||
Promise.reject(error)
|
||||
})
|
||||
|
||||
// 响应拦截器
|
||||
jsonRequest.interceptors.response.use(res => {
|
||||
|
||||
const code = res.data.status || 200;
|
||||
if(code===200){
|
||||
return res.data
|
||||
}else{
|
||||
if(code === 401){
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = this.webBaseUrl + ReLoginUrl;
|
||||
})
|
||||
}else if(code===403){
|
||||
var msg='当前操作没有权限';
|
||||
Message({message: msg, type: 'error'});
|
||||
return Promise.reject(new Error(msg))
|
||||
}else{
|
||||
//Message({message: res.data.message, type: 'error'});
|
||||
//console.log('err:' + res.data.error);
|
||||
return res.data;
|
||||
//return Promise.reject(new Error(res.data.message))
|
||||
}
|
||||
}
|
||||
},
|
||||
error => {
|
||||
console.log('err' + error)
|
||||
let { message } = error;
|
||||
if (message == "Network Error") {
|
||||
message = "后端接口连接异常";
|
||||
}
|
||||
else if (message.includes("timeout")) {
|
||||
message = "系统接口请求超时";
|
||||
}
|
||||
else if (message.includes("Request failed with status code")) {
|
||||
message = "系统接口" + message.substr(message.length - 3) + "异常";
|
||||
}
|
||||
Message({
|
||||
message: message,
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
//用于普通的发送请求
|
||||
const formRequest=axios.create({
|
||||
headers:{'Content-Type':'application/x-www-form-urlencoded'},
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: process.env.VUE_APP_CESOURCE_BASE_API,
|
||||
//超时
|
||||
timeout: 10000,
|
||||
})
|
||||
//发送json对象的拦截器
|
||||
formRequest.interceptors.request.use(config => {
|
||||
//是否需要设置 token
|
||||
const isToken = (config.headers || {}).isToken === false
|
||||
if (getToken() && !isToken) {
|
||||
config.headers[TokenName] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
}
|
||||
return config
|
||||
}, error => {
|
||||
console.log(error)
|
||||
Promise.reject(error)
|
||||
});
|
||||
formRequest.interceptors.response.use(res => {
|
||||
const code = res.data.status || 200;
|
||||
if(code===200){
|
||||
return res.data
|
||||
}else{
|
||||
if(code === 401){
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = this.webBaseUrl + ReLoginUrl;
|
||||
})
|
||||
}else if(code===403){
|
||||
var msg='当前操作没有权限';
|
||||
Message({message: msg, type: 'error'});
|
||||
return Promise.reject(new Error(msg))
|
||||
}else{
|
||||
//Message({message: res.data.message, type: 'error'});
|
||||
//console.log('err' + res.data.error);
|
||||
return res.data
|
||||
}
|
||||
}
|
||||
},
|
||||
error => {
|
||||
console.log('err' + error)
|
||||
let { message } = error;
|
||||
if (message == "Network Error") {
|
||||
message = "后端接口连接异常";
|
||||
}
|
||||
else if (message.includes("timeout")) {
|
||||
message = "系统接口请求超时";
|
||||
}
|
||||
else if (message.includes("Request failed with status code")) {
|
||||
message = "系统接口" + message.substr(message.length - 3) + "异常";
|
||||
}
|
||||
Message({
|
||||
message: message,
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
//request请求
|
||||
const request=function(cfg){
|
||||
if(cfg.data){
|
||||
cfg.data=qs.stringify(cfg.data);
|
||||
}
|
||||
};
|
||||
//requestJson请求
|
||||
const requestJson=jsonRequest.request;
|
||||
//get请求
|
||||
const get=formRequest.request;
|
||||
//post请求
|
||||
const post=function(url,data,config){
|
||||
if(data){
|
||||
data=qs.stringify(data);
|
||||
}
|
||||
return formRequest.post(url,data,config);
|
||||
}
|
||||
//postJson请求
|
||||
const postJson=jsonRequest.post;
|
||||
//put请求
|
||||
const put=function(url,data,config){
|
||||
if(data){
|
||||
data=qs.stringify(data);
|
||||
}
|
||||
return formRequest.put(url,data,config);
|
||||
}
|
||||
//putJson请求
|
||||
const putJson=jsonRequest.put;
|
||||
//patch请求
|
||||
const patch=function(url,data,config){
|
||||
if(data){
|
||||
data=qs.stringify(data);
|
||||
}
|
||||
return formRequest.patch(url,data,config);
|
||||
}
|
||||
//patchJson请求
|
||||
const patchJson=jsonRequest.patch;
|
||||
//delete请求
|
||||
const del=formRequest.delete;
|
||||
|
||||
|
||||
export default {
|
||||
request,
|
||||
requestJson,
|
||||
get,
|
||||
post,
|
||||
postJson,
|
||||
put,
|
||||
putJson,
|
||||
patch,
|
||||
patchJson,
|
||||
del
|
||||
}
|
||||
201
src/api/event/index.js
Normal file
201
src/api/event/index.js
Normal file
@@ -0,0 +1,201 @@
|
||||
import axios from 'axios'
|
||||
import qs from 'qs'
|
||||
import { Notification, MessageBox, Message } from 'element-ui'
|
||||
import store from '@/store'
|
||||
import { getToken } from '@/utils/token'
|
||||
import errorCode from '@/utils/errorCode'
|
||||
/**
|
||||
*request请求 axios.request(config)
|
||||
*requestJson请求 axios.request(config)
|
||||
*get请求 axios.get(url[, config])
|
||||
*post请求 axios.post(url[, data[, config]])
|
||||
*postJson请求 axios.post(url[, data[, config]])
|
||||
*put请求 axios.put(url[, data[, config]])
|
||||
*putJson请求 axios.put(url[, data[, config]])
|
||||
*patch请求 axios.patch(url[, data[, config]])
|
||||
*patchJson请求 axios.patch(url[, data[, config]])
|
||||
*delete请求 axios.delete(url[, config])
|
||||
*/
|
||||
|
||||
const ReLoginUrl="/login";
|
||||
const TokenName='XBOE-Access-Token';
|
||||
/**axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded'**/
|
||||
//只是用于发送json对象数据时使用post,put,patch
|
||||
const jsonRequest=axios.create({
|
||||
headers:{'Content-Type':'application/json;charset=utf-8'},
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: process.env.VUE_APP_STAT_BASE_API,
|
||||
//超时
|
||||
timeout: 10000,
|
||||
});
|
||||
//发送json对象的拦截器
|
||||
jsonRequest.interceptors.request.use(config => {
|
||||
//是否需要设置 token
|
||||
const isToken = (config.headers || {}).isToken === false
|
||||
if (getToken() && !isToken) {
|
||||
config.headers[TokenName] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
}
|
||||
return config
|
||||
}, error => {
|
||||
console.log(error)
|
||||
Promise.reject(error)
|
||||
})
|
||||
|
||||
// 响应拦截器
|
||||
jsonRequest.interceptors.response.use(res => {
|
||||
|
||||
const code = res.data.status || 200;
|
||||
if(code===200){
|
||||
return res.data
|
||||
}else{
|
||||
if(code === 401){
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = this.webBaseUrl + ReLoginUrl;
|
||||
})
|
||||
}else if(code===403){
|
||||
var msg='当前操作没有权限';
|
||||
Message({message: msg, type: 'error'});
|
||||
return Promise.reject(new Error(msg))
|
||||
}else{
|
||||
//Message({message: res.data.message, type: 'error'});
|
||||
//console.log('err:' + res.data.error);
|
||||
return res.data;
|
||||
//return Promise.reject(new Error(res.data.message))
|
||||
}
|
||||
}
|
||||
},
|
||||
error => {
|
||||
console.log('err' + error)
|
||||
let { message } = error;
|
||||
if (message == "Network Error") {
|
||||
message = "后端接口连接异常";
|
||||
}
|
||||
else if (message.includes("timeout")) {
|
||||
message = "系统接口请求超时";
|
||||
}
|
||||
else if (message.includes("Request failed with status code")) {
|
||||
message = "系统接口" + message.substr(message.length - 3) + "异常";
|
||||
}
|
||||
Message({
|
||||
message: message,
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
//用于普通的发送请求
|
||||
const formRequest=axios.create({
|
||||
headers:{'Content-Type':'application/x-www-form-urlencoded'},
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: process.env.VUE_APP_STAT_BASE_API,
|
||||
//超时
|
||||
timeout: 10000,
|
||||
})
|
||||
//发送json对象的拦截器
|
||||
formRequest.interceptors.request.use(config => {
|
||||
//是否需要设置 token
|
||||
const isToken = (config.headers || {}).isToken === false
|
||||
if (getToken() && !isToken) {
|
||||
config.headers[TokenName] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
}
|
||||
return config
|
||||
}, error => {
|
||||
console.log(error)
|
||||
Promise.reject(error)
|
||||
});
|
||||
formRequest.interceptors.response.use(res => {
|
||||
const code = res.data.status || 200;
|
||||
if(code===200){
|
||||
return res.data
|
||||
}else{
|
||||
if(code === 401){
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = this.webBaseUrl + ReLoginUrl;
|
||||
})
|
||||
}else if(code===403){
|
||||
var msg='当前操作没有权限';
|
||||
Message({message: msg, type: 'error'});
|
||||
return Promise.reject(new Error(msg))
|
||||
}else{
|
||||
//Message({message: res.data.message, type: 'error'});
|
||||
//console.log('err' + res.data.error);
|
||||
return res.data
|
||||
}
|
||||
}
|
||||
},
|
||||
error => {
|
||||
console.log('err' + error)
|
||||
let { message } = error;
|
||||
if (message == "Network Error") {
|
||||
message = "后端接口连接异常";
|
||||
}
|
||||
else if (message.includes("timeout")) {
|
||||
message = "系统接口请求超时";
|
||||
}
|
||||
else if (message.includes("Request failed with status code")) {
|
||||
message = "系统接口" + message.substr(message.length - 3) + "异常";
|
||||
}
|
||||
Message({
|
||||
message: message,
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
//request请求
|
||||
const request=function(cfg){
|
||||
if(cfg.data){
|
||||
cfg.data=qs.stringify(cfg.data);
|
||||
}
|
||||
};
|
||||
//requestJson请求
|
||||
const requestJson=jsonRequest.request;
|
||||
//get请求
|
||||
const get=formRequest.request;
|
||||
//post请求
|
||||
const post=function(url,data,config){
|
||||
if(data){
|
||||
data=qs.stringify(data);
|
||||
}
|
||||
return formRequest.post(url,data,config);
|
||||
}
|
||||
//postJson请求
|
||||
const postJson=jsonRequest.post;
|
||||
//put请求
|
||||
const put=function(url,data,config){
|
||||
if(data){
|
||||
data=qs.stringify(data);
|
||||
}
|
||||
return formRequest.put(url,data,config);
|
||||
}
|
||||
//putJson请求
|
||||
const putJson=jsonRequest.put;
|
||||
//patch请求
|
||||
const patch=function(url,data,config){
|
||||
if(data){
|
||||
data=qs.stringify(data);
|
||||
}
|
||||
return formRequest.patch(url,data,config);
|
||||
}
|
||||
//patchJson请求
|
||||
const patchJson=jsonRequest.patch;
|
||||
//delete请求
|
||||
const del=formRequest.delete;
|
||||
|
||||
|
||||
export default {
|
||||
request,
|
||||
requestJson,
|
||||
get,
|
||||
post,
|
||||
postJson,
|
||||
put,
|
||||
putJson,
|
||||
patch,
|
||||
patchJson,
|
||||
del
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import ajax from '@/utils/xajax.js'
|
||||
// import ajax from '@/utils/xajax.js'
|
||||
import ajax from '../cesource/index.js';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import ajax from '@/utils/xajax.js'
|
||||
|
||||
// import ajax from '@/utils/xajax.js'
|
||||
import ajax from '../cesource/index.js';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -75,7 +75,10 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="course-resources">
|
||||
资源位
|
||||
<img :src="fileBaseUrl + resonimg.image" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -117,6 +120,7 @@ import editItems from '@/components/Article/editItems.vue';
|
||||
import "quill/dist/quill.core.css";
|
||||
import "quill/dist/quill.snow.css";
|
||||
import "quill/dist/quill.bubble.css";
|
||||
import apiPlace from "@/api/modules/place.js"
|
||||
export default {
|
||||
components: { portalHeader, portalFooter,interactBar,comments,timeShow,author,editItems,portalFloatTools},
|
||||
computed: {
|
||||
@@ -124,6 +128,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
resonimg:{},
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
noData:true,
|
||||
shareInfo:{
|
||||
name:'',
|
||||
@@ -160,11 +166,22 @@ export default {
|
||||
"scroll",
|
||||
this.handleScroll
|
||||
);
|
||||
this.couresreso();
|
||||
},
|
||||
beforeDestroy(){
|
||||
window.removeEventListener("scroll",this.handleScroll);
|
||||
},
|
||||
methods: {
|
||||
couresreso(){
|
||||
let key = 'article';
|
||||
apiPlace.detail(key).then(res=>{
|
||||
console.log(res)
|
||||
let lmj = JSON.parse(res.result.content)
|
||||
// console.log(lmj)
|
||||
this.resonimg = lmj[0]
|
||||
console.log(this.resonimg.image)
|
||||
})
|
||||
},
|
||||
handleScroll() {
|
||||
let el_anking = document.querySelector('#articleAnking');
|
||||
//console.log(el_anking.clientWidth,'clientWidth');
|
||||
@@ -241,7 +258,13 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.course-resources{
|
||||
width: 410px;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.write-art{
|
||||
width: 410px;
|
||||
|
||||
@@ -121,10 +121,16 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="course-resources">
|
||||
资源位
|
||||
<img :src="fileBaseUrl + resonimg.image" alt="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<el-row :gutter="10">
|
||||
|
||||
@@ -154,6 +160,7 @@ import apiUser from '@/api/system/user.js';
|
||||
import apiSearchterm from '@/api/modules/searchterm.js';
|
||||
import articleImage from '@/components/Article/articleImage.vue';
|
||||
import editItems from '@/components/Article/editItems.vue';
|
||||
import apiPlace from "@/api/modules/place.js"
|
||||
export default {
|
||||
name: 'index',
|
||||
components: { editItems,portalHeader, portalFooter,articleImage, portalFloatTools, interactBar, timeShow, author },
|
||||
@@ -169,6 +176,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
resonimg:{},
|
||||
moreState:1,// 1 加载更多 2 加载中 3无数据
|
||||
searchRecords: [],
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
@@ -212,11 +220,22 @@ export default {
|
||||
"scroll",
|
||||
this.handleScroll
|
||||
);
|
||||
this.couresreso();
|
||||
},
|
||||
beforeDestroy(){
|
||||
window.removeEventListener("scroll",this.handleScroll);
|
||||
},
|
||||
methods: {
|
||||
couresreso(){
|
||||
let key = 'article';
|
||||
apiPlace.detail(key).then(res=>{
|
||||
console.log(res)
|
||||
let lmj = JSON.parse(res.result.content)
|
||||
// console.log(lmj)
|
||||
this.resonimg = lmj[0]
|
||||
console.log(this.resonimg.image)
|
||||
})
|
||||
},
|
||||
emitInput(val){
|
||||
this.articleList.keyword = val;
|
||||
this.isSeach =true;
|
||||
@@ -400,6 +419,13 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.course-resources{
|
||||
width: 410px;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.article-banner{
|
||||
height: 240px;
|
||||
background: url('/images/article-banner.png');
|
||||
|
||||
@@ -145,6 +145,10 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="course-resources">
|
||||
资源位
|
||||
<img :src="fileBaseUrl + resonimg.image" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -170,6 +174,7 @@ import apiDict from "@/api/modules/dict.js"
|
||||
import {encrypt} from '@/utils/jsencrypt.js';
|
||||
import cookies from 'vue-cookies'
|
||||
import {cutFullName} from "@/utils/tools.js";
|
||||
import apiPlace from "@/api/modules/place.js"
|
||||
import portalFloatTools from "@/components/PortalFloatTools.vue";
|
||||
export default {
|
||||
name: 'atticle',
|
||||
@@ -179,6 +184,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
resonimg:{},
|
||||
Internet:3,//1是成功 2是是失败 3是检测中
|
||||
noData:true,
|
||||
zoomShow:true,
|
||||
@@ -216,12 +223,23 @@ export default {
|
||||
this.getAnkingData();
|
||||
this.getPopularity();
|
||||
this.getPositive();
|
||||
this.couresreso();
|
||||
window.addEventListener(
|
||||
"scroll",
|
||||
this.handleScroll
|
||||
);
|
||||
},
|
||||
methods: {
|
||||
couresreso(){
|
||||
let key = 'case';
|
||||
apiPlace.detail(key).then(res=>{
|
||||
console.log(res)
|
||||
let lmj = JSON.parse(res.result.content)
|
||||
// console.log(lmj)
|
||||
this.resonimg = lmj[0]
|
||||
console.log(this.resonimg.image)
|
||||
})
|
||||
},
|
||||
retest(){
|
||||
this.Internet=3;
|
||||
let $this=this;
|
||||
@@ -475,6 +493,13 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.course-resources{
|
||||
width: 410px;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.pdftext{
|
||||
// padding: 0 20px;
|
||||
span{
|
||||
|
||||
@@ -183,8 +183,15 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="course-resources">
|
||||
资源位
|
||||
<img :src="fileBaseUrl + resonimg.image" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<el-row :gutter="10">
|
||||
@@ -223,6 +230,7 @@ import apiSearchterm from "@/api/modules/searchterm.js";
|
||||
import { deepClone } from "../../../utils";
|
||||
import apiDict from "@/api/modules/dict.js";
|
||||
import {cutFullName} from "@/utils/tools.js";
|
||||
import apiPlace from "@/api/modules/place.js"
|
||||
export default {
|
||||
name: "index",
|
||||
components: {
|
||||
@@ -253,6 +261,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
resonimg:{},
|
||||
speciData:[],
|
||||
moreState: 1, // 1 加载更多 2 加载中 3无数据
|
||||
isSeach: false,
|
||||
@@ -319,6 +329,7 @@ export default {
|
||||
this.getdomain();
|
||||
// this.getCaseData();
|
||||
this.search();
|
||||
this.couresreso();
|
||||
window.addEventListener("scroll", this.handleScroll);
|
||||
|
||||
},
|
||||
@@ -336,6 +347,16 @@ export default {
|
||||
window.removeEventListener("scroll", this.handleScroll);
|
||||
},
|
||||
methods: {
|
||||
couresreso(){
|
||||
let key = 'case';
|
||||
apiPlace.detail(key).then(res=>{
|
||||
console.log(res)
|
||||
let lmj = JSON.parse(res.result.content)
|
||||
// console.log(lmj)
|
||||
this.resonimg = lmj[0]
|
||||
console.log(this.resonimg.image)
|
||||
})
|
||||
},
|
||||
specialized(){
|
||||
let $this=this;
|
||||
apiCase.majorTypes().then(res =>{
|
||||
@@ -712,6 +733,13 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.course-resources{
|
||||
width: 410px;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.case-banner{
|
||||
height: 240px;
|
||||
background: url('/images/case-banner.png');
|
||||
|
||||
@@ -256,6 +256,10 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="course-resources">
|
||||
资源位
|
||||
<img :src="fileBaseUrl + resonimg.image" alt="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -287,6 +291,7 @@ import courseImage from "@/components/Course/courseImage.vue";
|
||||
import { courseType, getType, toScore,formatDate } from "@/utils/tools.js";
|
||||
import { deepClone, param } from "../../../utils";
|
||||
import apiSearchterm from "@/api/modules/searchterm.js";
|
||||
import apiPlace from "@/api/modules/place.js"
|
||||
export default {
|
||||
name: "index",
|
||||
components: {
|
||||
@@ -304,6 +309,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
resonimg:{},
|
||||
formatDate,
|
||||
audiences:[],//当前用户的受众
|
||||
couretitle: "",
|
||||
@@ -418,11 +424,23 @@ export default {
|
||||
}
|
||||
|
||||
this.searchterm();
|
||||
this.couresreso();
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener("scroll", this.handleScroll);
|
||||
},
|
||||
methods: {
|
||||
couresreso(){
|
||||
let key = 'course';
|
||||
apiPlace.detail(key).then(res=>{
|
||||
console.log(res)
|
||||
let lmj = JSON.parse(res.result.content)
|
||||
// console.log(lmj)
|
||||
this.resonimg = lmj[0]
|
||||
console.log(this.resonimg.image)
|
||||
})
|
||||
},
|
||||
jumUX() {
|
||||
window.open("https://m.qingxuetang.com/x/?appId=qxtcorp306130", "_blank");
|
||||
},
|
||||
@@ -816,6 +834,13 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.course-resources{
|
||||
width: 410px;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.course-card{
|
||||
// height: 196px;
|
||||
position: relative;
|
||||
|
||||
@@ -184,6 +184,10 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="course-resources">
|
||||
资源位
|
||||
<img :src="fileBaseUrl + resonimg.image" alt="">
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<!-- <div style="margin-bottom:15px;padding: 0">
|
||||
<el-button style="height: 100%;height: 37px;border-radius: 0; width: 100%;" @click="$refs.addQuestion.askQuestionDialog = true" type="primary">提问题</el-button>
|
||||
@@ -241,6 +245,7 @@ import apiUser from "@/api/system/user.js";
|
||||
import apiPraise from "@/api/modules/praises.js";
|
||||
import apiFavorites from "@/api/modules/favorites.js";
|
||||
import apiMessage from "@/api/system/message.js";
|
||||
import apiPlace from "@/api/modules/place.js"
|
||||
export default {
|
||||
name: "answer",
|
||||
components: {
|
||||
@@ -259,6 +264,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
resonimg:{},
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
qaFormCheckedShow: false,
|
||||
checked: false,
|
||||
// sex:null,
|
||||
@@ -300,11 +307,21 @@ export default {
|
||||
this.$watermark.set(this.userInfo.name + this.userInfo.loginName);
|
||||
window.addEventListener("scroll", this.handleScroll);
|
||||
this.getAnkingData();
|
||||
this.couresreso();
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener("scroll", this.handleScroll);
|
||||
},
|
||||
methods: {
|
||||
couresreso(){
|
||||
let key = 'qa';
|
||||
apiPlace.detail(key).then(res=>{
|
||||
console.log(res)
|
||||
let lmj = JSON.parse(res.result.content)
|
||||
this.resonimg = lmj[0]
|
||||
console.log(this.resonimg.image)
|
||||
})
|
||||
},
|
||||
handleScroll() {
|
||||
let innerHeight = document.querySelector("#answer-detail").clientHeight;
|
||||
let outerHeight = document.documentElement.clientHeight;
|
||||
@@ -742,6 +759,13 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.course-resources{
|
||||
width: 410px;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
::v-deep .checked-show{
|
||||
.el-dialog__header{
|
||||
padding:0;
|
||||
|
||||
@@ -103,8 +103,14 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="course-resources">
|
||||
资源位
|
||||
<img :src="fileBaseUrl + resonimg.image" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -138,6 +144,7 @@ import addQuestion from '@/components/Qa/addQuestion.vue';
|
||||
import apiQa from '@/api/modules/qa.js';
|
||||
import apiUser from '@/api/system/user.js';
|
||||
import apiSearchterm from '@/api/modules/searchterm.js';
|
||||
import apiPlace from "@/api/modules/place.js"
|
||||
export default {
|
||||
name: 'qaindex',
|
||||
components: { portalHeader, portalFooter, portalFloatTools, WxEditor, addQuestion, author, interactBar, timeShow },
|
||||
@@ -158,6 +165,7 @@ export default {
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
resonimg:{},
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
loading: false,
|
||||
answer:{
|
||||
@@ -197,11 +205,21 @@ export default {
|
||||
this.getAnkingData();
|
||||
window.addEventListener("scroll", this.handleScroll);
|
||||
this.searchterm();
|
||||
this.couresreso();
|
||||
},
|
||||
beforeDestroy(){
|
||||
window.removeEventListener("scroll",this.handleScroll);
|
||||
},
|
||||
methods: {
|
||||
couresreso(){
|
||||
let key = 'qa';
|
||||
apiPlace.detail(key).then(res=>{
|
||||
console.log(res)
|
||||
let lmj = JSON.parse(res.result.content)
|
||||
this.resonimg = lmj[0]
|
||||
console.log(this.resonimg.image)
|
||||
})
|
||||
},
|
||||
emitInput(val){
|
||||
this.queryKeyWord = val;
|
||||
this.isSeach =true;
|
||||
@@ -410,6 +428,13 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.course-resources{
|
||||
width: 410px;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.qa-banner{
|
||||
height: 240px;
|
||||
background: url('/images/qa-banner.png');
|
||||
|
||||
Reference in New Issue
Block a user