|
@@ -41,6 +41,7 @@
|
|
|
:key="index"
|
|
|
:icon="item.icon"
|
|
|
:text="item.title"
|
|
|
+ @click="clickGridIcon(item)"
|
|
|
/>
|
|
|
</van-grid>
|
|
|
<div style="height: 3rem"></div>
|
|
@@ -67,16 +68,42 @@ export default {
|
|
|
faceUrl: "",
|
|
|
userName: "test@test.com",
|
|
|
menus: [
|
|
|
- { title: "考试成绩", icon: "photo-o" },
|
|
|
- { title: "收藏", icon: "photo-o" },
|
|
|
- { title: "排行榜", icon: "photo-o" },
|
|
|
- { title: "使用手册", icon: "photo-o" },
|
|
|
- { title: "积分兑换", icon: "photo-o" }
|
|
|
+ { title: "考试成绩", icon: "photo-o", to: "exam-history" },
|
|
|
+ { title: "收藏", icon: "photo-o", to: "collection" },
|
|
|
+ { title: "排行榜", icon: "photo-o", to: "rank" },
|
|
|
+ { title: "使用手册", icon: "photo-o", to: "user-manual" },
|
|
|
+ { title: "积分兑换", icon: "photo-o", to: "" }
|
|
|
]
|
|
|
};
|
|
|
},
|
|
|
- computed: {},
|
|
|
- methods: {}
|
|
|
+ mounted() {
|
|
|
+ this.getDailyPoints();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 获取今日分数
|
|
|
+ getDailyPoints() {
|
|
|
+ let path = {
|
|
|
+ userName: "testuser-zirKBELIlg"
|
|
|
+ };
|
|
|
+ this.$_http
|
|
|
+ .get(this.$pathParams(this.$_API.JTXT_GET_USER_DAIYL_POINTS, path))
|
|
|
+ .then(res => {
|
|
|
+ this.contentObj = res.data;
|
|
|
+ console.log("--user--" + JSON.stringify(this.contentObj));
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$store.commit("toggleLoading", false);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 点击宫格图标
|
|
|
+ clickGridIcon(item) {
|
|
|
+ console.log("---click--" + JSON.stringify(item));
|
|
|
+ this.$router.push({
|
|
|
+ name: item.to,
|
|
|
+ params: { userId: "testuser-zirKBELIlg" }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|