Commit 437deddc88263abef92981d4697da36ed77e6f2f

Authored by 伽蓝
1 parent 45fcde48
Exists in master

feat:接口替换

src/component/Tabbar4.vue
... ... @@ -10,11 +10,11 @@
10 10 <img v-else src="../assets/tabbar4/tab2_off.png" alt="">
11 11 <p>每日一习</p>
12 12 </div>
13   - <div class="tab" :class="active=='rank'?'active':''" @click="handleRank">
  13 + <!-- <div class="tab" :class="active=='rank'?'active':''" @click="handleRank">
14 14 <img v-if="active=='rank'" src="../assets/rank/rank_on.png" alt="">
15 15 <img v-else src="../assets/rank/rank.png" alt="">
16 16 <p>排行榜</p>
17   - </div>
  17 + </div> -->
18 18 <div class="tab" :class="active=='fruit'?'active':''" @click="handleFruit">
19 19 <img v-if="active=='fruit'" src="../assets/tabbar4/fruit_on.png" alt="">
20 20 <img v-else src="../assets/tabbar4/fruit_off.png" alt="">
... ...
src/main.js
... ... @@ -10,6 +10,8 @@ Vue.prototype.Moment = Moment;
10 10 // Vue.prototype.yanxueUrl = 'https://yanxue.myjxt.com';
11 11 // Vue.prototype.dataUrl = 'http://47.110.50.251:9010'
12 12 Vue.prototype.dataUrl = 'https://proxy.shunzhi.net/consulte'
  13 +// Vue.prototype.kqUrl = 'http://47.110.50.251:9092/'
  14 +Vue.prototype.kqUrl = 'https://proxy.shunzhi.net/achieve'
13 15  
14 16 import yxAxios from '@/https/yxAxios'
15 17 Vue.prototype.yxAxios = yxAxios;
... ...
src/router/index.js
... ... @@ -42,6 +42,7 @@ import pageDetails from &#39;@/views/Yanxue/pageDetails.vue&#39; //研学成果
42 42 import rank from '@/views/answerRank/rank.vue' //排行榜
43 43 import ans_rank from '@/views/answerRank/ans_rank.vue' //答题排行榜
44 44 import brush_questions from '@/views/answerRank/brush_questions.vue' //刷题记录
  45 +import stars from '@/views/answerRank/stars.vue' //五星少年
45 46  
46 47 Vue.use(VueRouter)
47 48 const [routerPush, routerReplace] = [VueRouter.prototype.push, VueRouter.prototype.replace];
... ... @@ -325,6 +326,14 @@ const routes = [{
325 326 }
326 327 },
327 328 {
  329 + path: '/stars',
  330 + name: 'stars',
  331 + component: stars,
  332 + meta: {
  333 + title: '五星少年'
  334 + }
  335 + },
  336 + {
328 337 path: '/YanxueDetail',
329 338 name: 'YanxueDetail',
330 339 component: YanxueDetail,
... ...
src/views/Service/AbroadDetail.vue
... ... @@ -159,6 +159,9 @@ export default {
159 159 duration: 0,
160 160 forbidClick: true,
161 161 });
  162 +
  163 + this.addReadNum(this.courseId)
  164 +
162 165 this.mgop({
163 166 api: 'mgop.sz.hswsy.GetCourseDetail', // 必须
164 167 host: 'https://mapi.zjzwfw.gov.cn/',
... ... @@ -304,6 +307,21 @@ export default {
304 307 backHome () {
305 308 this.$router.push({ name: "ServiceKQ" });
306 309 },
  310 + //添加浏览量
  311 + addReadNum(courseId) {
  312 + this.yxAxios
  313 + .post(`${this.kqUrl}/visitRecord/setCourseVisit`, {
  314 + courseId: courseId,
  315 + userId: JSON.parse(localStorage.getItem('userInfo')).userId
  316 + })
  317 + .then((res) => {
  318 + if (res.data.success) {
  319 + console.log("阅读量成功");
  320 + } else {
  321 + console.log("阅读量失败");
  322 + }
  323 + });
  324 + }
307 325 },
308 326 components: {
309 327 AbroadDes,
... ...
src/views/Service/ServiceKQ.vue
... ... @@ -52,6 +52,8 @@ export default {
52 52 console.log('非浙里办渠道访问,显示测试用户数据')
53 53 this.centerNo = '2021111017103639979048000010279'
54 54 localStorage.setItem('centerNo', '2021111017103639979048000010279')
  55 + let userInfo = JSON.stringify({'userId': 10})
  56 + localStorage.setItem('userInfo', userInfo)
55 57 this.getUserInfo()
56 58 }
57 59 }
... ...
src/views/Yanxue/achievementsOne.vue
... ... @@ -58,19 +58,30 @@ export default {
58 58 this.$router.push({ name: "chooseSchoolOne" });
59 59 },
60 60 getData() {
  61 + let schoolId = this.$route.query.schoolId?this.$route.query.schoolId: ''
  62 +
61 63 this.yxAxios
62   - .post(`${this.dataUrl}/sys/yx/consultList`, {
63   - page: 1,
64   - pageSize: 999,
65   - schoolId: this.$route.query.schoolId*1
66   - })
  64 + .get(`${this.kqUrl}/schoolConsult/consultList?pageNum=1&pageSize=999&schoolId=`+schoolId)
67 65 .then((res) => {
68   - if (res.data.success) {
  66 + if (res.data.code == 200) {
69 67 this.newsList = res.data.data.list;
70 68 } else {
71 69 this.$message.warning(res.data.message);
72 70 }
73 71 });
  72 + // this.yxAxios
  73 + // .post(`${this.dataUrl}/sys/yx/consultList`, {
  74 + // page: 1,
  75 + // pageSize: 999,
  76 + // schoolId: this.$route.query.schoolId*1
  77 + // })
  78 + // .then((res) => {
  79 + // if (res.data.success) {
  80 + // this.newsList = res.data.data.list;
  81 + // } else {
  82 + // this.$message.warning(res.data.message);
  83 + // }
  84 + // });
74 85 },
75 86 },
76 87 mounted() {
... ...
src/views/Yanxue/chooseSchoolOne.vue
... ... @@ -13,7 +13,7 @@
13 13 :key="i"
14 14 @click="toActive(v)"
15 15 >
16   - {{ v.schoolName }}
  16 + {{ v.name }}
17 17 </div>
18 18 </div>
19 19 </div>
... ... @@ -37,25 +37,35 @@ export default {
37 37 toActive(v) {
38 38 this.$router.push({
39 39 name: "achievementsOne",
40   - query: { schoolId: v.id },
  40 + query: { schoolId: v.num },
41 41 });
42 42 },
43 43 //切换
44 44 tabsChange() {},
45 45 getList() {
46 46 this.yxAxios
47   - .post(`${this.dataUrl}/sys/yx/schoolList`, {
48   - page: 1,
49   - pageSize: 999,
50   - schoolType: this.tabsName +1
51   - })
  47 + .get(`${this.kqUrl}/schoolConsult/schoolList?schoolType=`+ (this.tabsName +1))
52 48 .then((res) => {
53   - if (res.data.success) {
54   - this.schoolList = res.data.data.list;
  49 + if (res.data.code == 200) {
  50 + this.schoolList = res.data.data;
  51 + console.log(this.schoolList)
55 52 } else {
56 53 this.$message.warning(res.data.message);
57 54 }
58 55 });
  56 + // this.yxAxios
  57 + // .post(`${this.dataUrl}/sys/yx/schoolList`, {
  58 + // page: 1,
  59 + // pageSize: 999,
  60 + // schoolType: this.tabsName +1
  61 + // })
  62 + // .then((res) => {
  63 + // if (res.data.success) {
  64 + // this.schoolList = res.data.data.list;
  65 + // } else {
  66 + // this.$message.warning(res.data.message);
  67 + // }
  68 + // });
59 69 },
60 70 },
61 71 mounted() {
... ...
src/views/Yanxue/pageDetails.vue
... ... @@ -45,11 +45,9 @@ export default {
45 45 //获取数据
46 46 getTable() {
47 47 this.yxAxios
48   - .post(`${this.dataUrl}/sys/yx/getConsultDetail`, {
49   - id: this.$route.query.dataId,
50   - })
  48 + .get(`${this.kqUrl}/schoolConsult/consultDetails?consultId=`+this.$route.query.dataId)
51 49 .then((res) => {
52   - if (res.data.success) {
  50 + if (res.data.code == 200) {
53 51 this.imgUrl = res.data.data.imgUrl;
54 52 if (!res.data.data.background) {
55 53 this.background = res.data.data.imgUrl;
... ... @@ -63,6 +61,25 @@ export default {
63 61 this.$message.warning(res.data.message);
64 62 }
65 63 });
  64 + // this.yxAxios
  65 + // .post(`${this.dataUrl}/sys/yx/getConsultDetail`, {
  66 + // id: this.$route.query.dataId,
  67 + // })
  68 + // .then((res) => {
  69 + // if (res.data.success) {
  70 + // this.imgUrl = res.data.data.imgUrl;
  71 + // if (!res.data.data.background) {
  72 + // this.background = res.data.data.imgUrl;
  73 + // } else {
  74 + // this.background = res.data.data.background;
  75 + // }
  76 + // let arr = JSON.parse(res.data.data.modelList);
  77 + // this.modelList = arr;
  78 + // // this.showFrame();
  79 + // } else {
  80 + // this.$message.warning(res.data.message);
  81 + // }
  82 + // });
66 83 },
67 84 //打开图片
68 85 openImg(x, y, v) {
... ... @@ -76,8 +93,9 @@ export default {
76 93 //添加浏览量
77 94 addReadNum() {
78 95 this.yxAxios
79   - .post(`${this.dataUrl}/sys/yx/updateRead`, {
80   - id: this.$route.query.dataId,
  96 + .post(`${this.kqUrl}/visitRecord/setConsultVisit`, {
  97 + consultId: this.$route.query.dataId,
  98 + userId: JSON.parse(localStorage.getItem('userInfo')).userId
81 99 })
82 100 .then((res) => {
83 101 if (res.data.success) {
... ... @@ -86,6 +104,17 @@ export default {
86 104 console.log("阅读量失败");
87 105 }
88 106 });
  107 + // this.yxAxios
  108 + // .post(`${this.dataUrl}/sys/yx/updateRead`, {
  109 + // id: this.$route.query.dataId,
  110 + // })
  111 + // .then((res) => {
  112 + // if (res.data.success) {
  113 + // console.log("阅读量成功");
  114 + // } else {
  115 + // console.log("阅读量失败");
  116 + // }
  117 + // });
89 118 },
90 119 //视频
91 120 showFrame() {
... ...
src/views/answerRank/stars.vue 0 → 100644
... ... @@ -0,0 +1,206 @@
  1 +<template>
  2 + <div class="bck">
  3 + <div class="box">
  4 + <div class="box_L">
  5 + <div class="L_top">
  6 + <div class="pic">
  7 + <img src="@/assets/rank/tx.png" />
  8 + </div>
  9 + <div class="font_box">
  10 + <div class="font_name">熊初墨</div>
  11 + <div class="font_sch">柯桥实验小学元培学院</div>
  12 + </div>
  13 + </div>
  14 + <div class="L_mid">
  15 + <div class="mid_item">
  16 + <div>
  17 + <span class="strong_font">23</span>
  18 + <span>分</span>
  19 + </div>
  20 + <div class="grey_font">已完成题数</div>
  21 + </div>
  22 + <div class="mid_item">
  23 + <div>
  24 + <span class="strong_font">50</span>
  25 + <span>%</span>
  26 + </div>
  27 + <div class="grey_font">正确率</div>
  28 + </div>
  29 + </div>
  30 + <div class="yellowFont">*积分可用于兑换各种福利</div>
  31 + </div>
  32 +
  33 + <div class="box_R">
  34 + <div class="box_R_item">
  35 + <div class="title">
  36 + <div>排行榜</div>
  37 + <span>RANKS</span>
  38 + </div>
  39 + <div class="imgBox">
  40 + <img src="@/assets/rank/jb.png" />
  41 + </div>
  42 + </div>
  43 + <div class="box_R_item">
  44 + <div class="title">
  45 + <div>刷题记录</div>
  46 + <span>RECORD</span>
  47 + </div>
  48 + <div class="imgBox">
  49 + <img src="@/assets/rank/qz.png" />
  50 + </div>
  51 + </div>
  52 + </div>
  53 + </div>
  54 +
  55 + <div class="card">
  56 +
  57 + </div>
  58 + </div>
  59 +</template>
  60 +
  61 +<script>
  62 +export default {
  63 + data() {
  64 + return {};
  65 + },
  66 +};
  67 +</script>
  68 +
  69 +<style lang="scss" scoped>
  70 +.bck {
  71 + position: absolute;
  72 + width: 100vw;
  73 + min-height: 100vh;
  74 + background-image: url("../../assets/rank/red_rank.png");
  75 + -moz-background-size: 100% 100%;
  76 + background-size: 100% 100%;
  77 +
  78 + .box {
  79 + display: flex;
  80 + justify-content: space-between;
  81 + margin: 5vw 3vw;
  82 +
  83 + .box_L {
  84 + width: 45vw;
  85 + height: 350px;
  86 + background-color: #fff;
  87 + border-radius: 30px;
  88 + padding: 3vw 2vw;
  89 + box-sizing: border-box;
  90 + display: flex;
  91 + flex-wrap: wrap;
  92 + align-content: space-between;
  93 +
  94 + .L_top {
  95 + width: 100%;
  96 + display: flex;
  97 + justify-content: space-between;
  98 +
  99 + .pic {
  100 + display: flex;
  101 + align-items: center;
  102 +
  103 + img {
  104 + width: 13vw;
  105 + height: 13vw;
  106 + }
  107 + }
  108 + .font_box {
  109 + width: 25vw;
  110 + display: flex;
  111 + align-content: space-between;
  112 + flex-wrap: wrap;
  113 +
  114 + .font_name {
  115 + font-size: 30px;
  116 + color: #333333;
  117 + }
  118 + .font_sch {
  119 + font-size: 27px;
  120 + color: #999;
  121 + white-space: nowrap; //文本强制不换行;
  122 + text-overflow: ellipsis; //文本溢出显示省略号;
  123 + overflow: hidden; //溢出的部分隐藏;
  124 + }
  125 + }
  126 + }
  127 +
  128 + .L_mid {
  129 + width: 100%;
  130 + display: flex;
  131 + justify-content: space-between;
  132 +
  133 + .mid_item {
  134 + width: 100%;
  135 + text-align: center;
  136 + font-size: 25px;
  137 +
  138 + .grey_font {
  139 + color:#999;
  140 + font-size: 25px;
  141 + margin-top: 5px;
  142 + }
  143 +
  144 + .strong_font {
  145 + font-size: 50px;
  146 + font-weight: bold;
  147 + }
  148 + }
  149 + }
  150 +
  151 + .yellowFont {
  152 + width: 100%;
  153 + font-size: 24px;
  154 + color: #ff7a1c;
  155 + text-align: center;
  156 + }
  157 + }
  158 + .box_R {
  159 + width: 45vw;
  160 + height: 350px;
  161 + display: flex;
  162 + flex-wrap: wrap;
  163 + align-content: space-between;
  164 +
  165 + .box_R_item {
  166 + width: 100%;
  167 + height: 170px;
  168 + border-radius: 30px;
  169 + display: flex;
  170 + justify-content: space-between;
  171 + padding: 20px 30px;
  172 + box-sizing: border-box;
  173 +
  174 + .title {
  175 + font-size: 30px;
  176 + color: #000000;
  177 +
  178 + span {
  179 + color: #999999;
  180 + font-size: 22px;
  181 + }
  182 + }
  183 +
  184 + .imgBox {
  185 + display: flex;
  186 + align-items: center;
  187 +
  188 + img {
  189 + width: 110px;
  190 + height: 110px;
  191 + }
  192 + }
  193 + }
  194 + }
  195 + }
  196 +
  197 + .card {
  198 + width: 100%;
  199 + min-height: 800px;
  200 + background-color: #fff;
  201 + border-radius: 30px;
  202 + padding: 2vw;
  203 + box-sizing: border-box;
  204 + }
  205 +}
  206 +</style>
0 207 \ No newline at end of file
... ...