chooseSchool.vue
1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!--
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-04-21 11:21:39
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-06-13 17:24:04
* @FilePath: /tswj/src/views/client/chooseSchool.vue
* @Description: 选择学校列表
-->
<template>
<div class="choose-school-page content-bg">
<div class="modify-top" />
<div class="wrapper-content">
<template v-for="(item, key) in schoolList" :key="key">
<ranking-item :item="item" :index-key="key" />
</template>
</div>
</div>
</template>
<script setup>
import RankingItem from '@/components/RankingItem/index'
// import { useGo } from '@/hooks/useGo'
import { killPages } from '@/hooks/useKeepAlive'
// import { onMounted } from 'vue';
import wx from 'weixin-js-sdk'
import { useRoute } from 'vue-router'
// import { wxJsAPI } from '@/api/wx/config'
// const go = useGo()
// 删除所有的 keep-alive 缓存
killPages();
// TAG:微信分享
// const $route = useRoute();
// wx.updateAppMessageShareData({
// title: '童声无界', // 分享标题
// desc: $route.meta.title, // 分享描述
// link: location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
// imgUrl: location.origin + location.pathname + 'images/weixin_logo.png', // 分享图标
// success: function () {
// // 用户确认分享后执行的回调函数
// console.warn('分享成功');
// },
// cancel: function () {
// // 用户取消分享后执行的回调函数
// console.warn('分享已取消');
// }
// })
</script>
<script>
import { kgListAPI } from '@/api/C/kg.js'
export default {
beforeRouteEnter (to, from, next) {
(async () => {
const { data } = await kgListAPI();
to.params.schoolList = data;
next();
})()
},
data () {
return {
schoolList: this.$route.params.schoolList
}
}
}
</script>
<style lang="less" scoped>
@import url('@css/content-bg.less');
.wrapper-content {
padding: 1rem 0 2rem
}
</style>