
diff --git a/src/main.js b/src/main.js
index 51c6a8d..6acd26e 100644
--- a/src/main.js
+++ b/src/main.js
@@ -10,6 +10,8 @@ Vue.prototype.Moment = Moment;
// Vue.prototype.yanxueUrl = 'https://yanxue.myjxt.com';
// Vue.prototype.dataUrl = 'http://47.110.50.251:9010'
Vue.prototype.dataUrl = 'https://proxy.shunzhi.net/consulte'
+// Vue.prototype.kqUrl = 'http://47.110.50.251:9092/'
+Vue.prototype.kqUrl = 'https://proxy.shunzhi.net/achieve'
import yxAxios from '@/https/yxAxios'
Vue.prototype.yxAxios = yxAxios;
diff --git a/src/router/index.js b/src/router/index.js
index 7fd7efd..8e02693 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -42,6 +42,7 @@ import pageDetails from '@/views/Yanxue/pageDetails.vue' //研学成果
import rank from '@/views/answerRank/rank.vue' //排行榜
import ans_rank from '@/views/answerRank/ans_rank.vue' //答题排行榜
import brush_questions from '@/views/answerRank/brush_questions.vue' //刷题记录
+import stars from '@/views/answerRank/stars.vue' //五星少年
Vue.use(VueRouter)
const [routerPush, routerReplace] = [VueRouter.prototype.push, VueRouter.prototype.replace];
@@ -325,6 +326,14 @@ const routes = [{
}
},
{
+ path: '/stars',
+ name: 'stars',
+ component: stars,
+ meta: {
+ title: '五星少年'
+ }
+ },
+ {
path: '/YanxueDetail',
name: 'YanxueDetail',
component: YanxueDetail,
diff --git a/src/views/Service/AbroadDetail.vue b/src/views/Service/AbroadDetail.vue
index 904479b..61150d7 100644
--- a/src/views/Service/AbroadDetail.vue
+++ b/src/views/Service/AbroadDetail.vue
@@ -159,6 +159,9 @@ export default {
duration: 0,
forbidClick: true,
});
+
+ this.addReadNum(this.courseId)
+
this.mgop({
api: 'mgop.sz.hswsy.GetCourseDetail', // 必须
host: 'https://mapi.zjzwfw.gov.cn/',
@@ -304,6 +307,21 @@ export default {
backHome () {
this.$router.push({ name: "ServiceKQ" });
},
+ //添加浏览量
+ addReadNum(courseId) {
+ this.yxAxios
+ .post(`${this.kqUrl}/visitRecord/setCourseVisit`, {
+ courseId: courseId,
+ userId: JSON.parse(localStorage.getItem('userInfo')).userId
+ })
+ .then((res) => {
+ if (res.data.success) {
+ console.log("阅读量成功");
+ } else {
+ console.log("阅读量失败");
+ }
+ });
+ }
},
components: {
AbroadDes,
diff --git a/src/views/Service/ServiceKQ.vue b/src/views/Service/ServiceKQ.vue
index 561ad07..37bc9e8 100644
--- a/src/views/Service/ServiceKQ.vue
+++ b/src/views/Service/ServiceKQ.vue
@@ -52,6 +52,8 @@ export default {
console.log('非浙里办渠道访问,显示测试用户数据')
this.centerNo = '2021111017103639979048000010279'
localStorage.setItem('centerNo', '2021111017103639979048000010279')
+ let userInfo = JSON.stringify({'userId': 10})
+ localStorage.setItem('userInfo', userInfo)
this.getUserInfo()
}
}
diff --git a/src/views/Yanxue/achievementsOne.vue b/src/views/Yanxue/achievementsOne.vue
index f281364..3969cb5 100644
--- a/src/views/Yanxue/achievementsOne.vue
+++ b/src/views/Yanxue/achievementsOne.vue
@@ -58,19 +58,30 @@ export default {
this.$router.push({ name: "chooseSchoolOne" });
},
getData() {
+ let schoolId = this.$route.query.schoolId?this.$route.query.schoolId: ''
+
this.yxAxios
- .post(`${this.dataUrl}/sys/yx/consultList`, {
- page: 1,
- pageSize: 999,
- schoolId: this.$route.query.schoolId*1
- })
+ .get(`${this.kqUrl}/schoolConsult/consultList?pageNum=1&pageSize=999&schoolId=`+schoolId)
.then((res) => {
- if (res.data.success) {
+ if (res.data.code == 200) {
this.newsList = res.data.data.list;
} else {
this.$message.warning(res.data.message);
}
});
+ // this.yxAxios
+ // .post(`${this.dataUrl}/sys/yx/consultList`, {
+ // page: 1,
+ // pageSize: 999,
+ // schoolId: this.$route.query.schoolId*1
+ // })
+ // .then((res) => {
+ // if (res.data.success) {
+ // this.newsList = res.data.data.list;
+ // } else {
+ // this.$message.warning(res.data.message);
+ // }
+ // });
},
},
mounted() {
diff --git a/src/views/Yanxue/chooseSchoolOne.vue b/src/views/Yanxue/chooseSchoolOne.vue
index b98ac0a..0eded7a 100644
--- a/src/views/Yanxue/chooseSchoolOne.vue
+++ b/src/views/Yanxue/chooseSchoolOne.vue
@@ -13,7 +13,7 @@
:key="i"
@click="toActive(v)"
>
- {{ v.schoolName }}
+ {{ v.name }}