|
@@ -52,6 +52,7 @@
|
|
|
|
|
|
<script>
|
|
|
import maleAvatar from "@/assets/image/maleAvatar.jpg";
|
|
|
+import { mapState } from "vuex";
|
|
|
export default {
|
|
|
name: "page-personal",
|
|
|
components: {},
|
|
@@ -68,7 +69,6 @@ export default {
|
|
|
"margin-right": "0.2rem"
|
|
|
},
|
|
|
faceUrl: "",
|
|
|
- userName: "test@test.com",
|
|
|
menus: [
|
|
|
{ title: "考试成绩", icon: "photo-o", to: "exam-history" },
|
|
|
{ title: "收藏", icon: "photo-o", to: "collection" },
|
|
@@ -78,6 +78,11 @@ export default {
|
|
|
]
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapState({
|
|
|
+ user: state => state.user
|
|
|
+ })
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.getDailyPoints();
|
|
|
this.getAllPoints();
|
|
@@ -86,7 +91,7 @@ export default {
|
|
|
// 获取今日分数
|
|
|
getDailyPoints() {
|
|
|
let path = {
|
|
|
- userName: "testuser-zirKBELIlg"
|
|
|
+ userName: this.user.userName
|
|
|
};
|
|
|
this.$_http
|
|
|
.get(this.$pathParams(this.$_API.JTXT_GET_USER_DAIYL_POINTS, path))
|
|
@@ -101,7 +106,7 @@ export default {
|
|
|
// 查询总积分
|
|
|
getAllPoints() {
|
|
|
let path = {
|
|
|
- userName: "testuser-zirKBELIlg"
|
|
|
+ userName: this.user.userName
|
|
|
};
|
|
|
this.$_http
|
|
|
.get(this.$pathParams(this.$_API.JTXT_GET_USER_ALL_POINTS, path))
|