|
@@ -7,12 +7,16 @@
|
|
<van-image
|
|
<van-image
|
|
class="userHeaderImg"
|
|
class="userHeaderImg"
|
|
fit="cover"
|
|
fit="cover"
|
|
|
|
+ round
|
|
:src="maleAvatar"
|
|
:src="maleAvatar"
|
|
:show-error="true"
|
|
:show-error="true"
|
|
:error-icon="maleAvatar"
|
|
:error-icon="maleAvatar"
|
|
/>
|
|
/>
|
|
- <div class="userName">
|
|
|
|
- {{ userInfo.userName }}
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <div class="userName">
|
|
|
|
+ {{ userInfo.userName }}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="userGroup">组织:{{ userInfo.group }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="userCardLine"></div>
|
|
<div class="userCardLine"></div>
|
|
@@ -23,7 +27,6 @@
|
|
<span class="todayScoreNum">{{ todayPoints }}</span>
|
|
<span class="todayScoreNum">{{ todayPoints }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div style="height: 1rem"></div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 积分 -->
|
|
<!-- 积分 -->
|
|
@@ -35,16 +38,30 @@
|
|
<!-- 菜单 -->
|
|
<!-- 菜单 -->
|
|
<div class="menu-box">
|
|
<div class="menu-box">
|
|
<div class="menuCard">
|
|
<div class="menuCard">
|
|
- <van-grid>
|
|
|
|
|
|
+ <!-- <van-grid>
|
|
<van-grid-item
|
|
<van-grid-item
|
|
v-for="(item, index) in menus"
|
|
v-for="(item, index) in menus"
|
|
:key="index"
|
|
:key="index"
|
|
- :icon="item.icon"
|
|
|
|
:text="item.title"
|
|
:text="item.title"
|
|
@click="clickGridIcon(item)"
|
|
@click="clickGridIcon(item)"
|
|
- />
|
|
|
|
- </van-grid>
|
|
|
|
- <div style="height: 3rem"></div>
|
|
|
|
|
|
+ >
|
|
|
|
+ <van-image slot="icon" :src="item.src" />
|
|
|
|
+ </van-grid-item>
|
|
|
|
+ </van-grid> -->
|
|
|
|
+ <div
|
|
|
|
+ :class="{
|
|
|
|
+ 'menu-card-item': true,
|
|
|
|
+ 'menu-card-item-border': index !== 0 && index !== 4
|
|
|
|
+ }"
|
|
|
|
+ v-for="(item, index) in menus"
|
|
|
|
+ :key="index"
|
|
|
|
+ @click="clickGridIcon(item)"
|
|
|
|
+ >
|
|
|
|
+ <div class="menu-card-item-img">
|
|
|
|
+ <van-image width="100%" height="100%" :src="item.src" />
|
|
|
|
+ </div>
|
|
|
|
+ <span class="menu-card-item-title">{{ item.title }}</span>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -70,11 +87,37 @@ export default {
|
|
},
|
|
},
|
|
faceUrl: "",
|
|
faceUrl: "",
|
|
menus: [
|
|
menus: [
|
|
- { 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: "" }
|
|
|
|
|
|
+ {
|
|
|
|
+ title: "考试成绩",
|
|
|
|
+ icon: "photo-o",
|
|
|
|
+ to: "exam-history",
|
|
|
|
+ src: require("@/assets/image/personal/testScore.png")
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: "收藏",
|
|
|
|
+ icon: "photo-o",
|
|
|
|
+ to: "collection",
|
|
|
|
+ src: require("@/assets/image/personal/collect.png")
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: "排行榜",
|
|
|
|
+ icon: "photo-o",
|
|
|
|
+ to: "rank",
|
|
|
|
+ src: require("@/assets/image/personal/leaderboard .png")
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: "使用手册",
|
|
|
|
+ icon: "photo-o",
|
|
|
|
+ to: "user-manual",
|
|
|
|
+ src: require("@/assets/image/personal/manual.png")
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: "积分兑换",
|
|
|
|
+ icon: "photo-o",
|
|
|
|
+ to: "",
|
|
|
|
+ src: require("@/assets/image/personal/redeem.png")
|
|
|
|
+ }
|
|
|
|
+ // { title: "我要编辑", icon: "photo-o", to: "", src: require("@/assets/image/personal/toEdit.png") }
|
|
]
|
|
]
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -84,6 +127,7 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
|
|
+ console.log(this.userInfo);
|
|
this.getDailyPoints();
|
|
this.getDailyPoints();
|
|
this.getAllPoints();
|
|
this.getAllPoints();
|
|
},
|
|
},
|
|
@@ -97,7 +141,6 @@ export default {
|
|
.get(this.$pathParams(this.$_API.JTXT_GET_USER_DAIYL_POINTS, path))
|
|
.get(this.$pathParams(this.$_API.JTXT_GET_USER_DAIYL_POINTS, path))
|
|
.then(res => {
|
|
.then(res => {
|
|
this.todayPoints = res.data;
|
|
this.todayPoints = res.data;
|
|
- console.log("--this.todayPoints--" + this.todayPoints);
|
|
|
|
})
|
|
})
|
|
.catch(() => {
|
|
.catch(() => {
|
|
this.$store.commit("toggleLoading", false);
|
|
this.$store.commit("toggleLoading", false);
|
|
@@ -112,7 +155,6 @@ export default {
|
|
.get(this.$pathParams(this.$_API.JTXT_GET_USER_ALL_POINTS, path))
|
|
.get(this.$pathParams(this.$_API.JTXT_GET_USER_ALL_POINTS, path))
|
|
.then(res => {
|
|
.then(res => {
|
|
this.allPoints = res.data;
|
|
this.allPoints = res.data;
|
|
- console.log("--user--" + this.allPoints);
|
|
|
|
})
|
|
})
|
|
.catch(() => {
|
|
.catch(() => {
|
|
this.$store.commit("toggleLoading", false);
|
|
this.$store.commit("toggleLoading", false);
|
|
@@ -120,7 +162,6 @@ export default {
|
|
},
|
|
},
|
|
// 点击宫格图标
|
|
// 点击宫格图标
|
|
clickGridIcon(item) {
|
|
clickGridIcon(item) {
|
|
- console.log("---click--" + JSON.stringify(item));
|
|
|
|
this.$router.push({
|
|
this.$router.push({
|
|
name: item.to,
|
|
name: item.to,
|
|
params: { userId: "testuser-zirKBELIlg" }
|
|
params: { userId: "testuser-zirKBELIlg" }
|
|
@@ -146,12 +187,6 @@ export default {
|
|
box-shadow: 0 0 4px 2px rgba(139, 163, 198, 0.3);
|
|
box-shadow: 0 0 4px 2px rgba(139, 163, 198, 0.3);
|
|
-webkit-box-shadow: 0 0 4px 2px rgba(139, 163, 198, 0.3);
|
|
-webkit-box-shadow: 0 0 4px 2px rgba(139, 163, 198, 0.3);
|
|
border-radius: 0.1rem;
|
|
border-radius: 0.1rem;
|
|
- .userHeaderImg {
|
|
|
|
- width: 2.5rem;
|
|
|
|
- height: 2.5rem;
|
|
|
|
- border-radius: 0.1rem;
|
|
|
|
- margin-right: 0.5rem;
|
|
|
|
- }
|
|
|
|
.userCardLine {
|
|
.userCardLine {
|
|
border-bottom: 1px solid #f1f1f1;
|
|
border-bottom: 1px solid #f1f1f1;
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -161,14 +196,21 @@ export default {
|
|
.userInfo {
|
|
.userInfo {
|
|
padding: 0.5rem 0;
|
|
padding: 0.5rem 0;
|
|
display: flex;
|
|
display: flex;
|
|
- flex-direction: row;
|
|
|
|
- justify-content: flex-start;
|
|
|
|
- }
|
|
|
|
- .userName {
|
|
|
|
- display: flex;
|
|
|
|
- flex-direction: row;
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
|
+ // justify-content: space-between;
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
+ .userHeaderImg {
|
|
|
|
+ width: 2.5rem;
|
|
|
|
+ height: 2.5rem;
|
|
|
|
+ margin-right: 0.5rem;
|
|
|
|
+ }
|
|
|
|
+ .userName {
|
|
|
|
+ font-size: 0.8rem;
|
|
|
|
+ }
|
|
|
|
+ .userGroup {
|
|
|
|
+ margin-top: 0.5rem;
|
|
|
|
+ font-size: 0.65rem;
|
|
|
|
+ color: #333;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.flexRowStartCenter {
|
|
.flexRowStartCenter {
|
|
display: flex;
|
|
display: flex;
|
|
@@ -219,10 +261,32 @@ export default {
|
|
.menuCard {
|
|
.menuCard {
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
width: 100%;
|
|
width: 100%;
|
|
- padding: 1rem 0.5rem;
|
|
|
|
|
|
+ padding: 1rem 0.5rem 0;
|
|
box-shadow: 0 0 4px 2px rgba(139, 163, 198, 0.3);
|
|
box-shadow: 0 0 4px 2px rgba(139, 163, 198, 0.3);
|
|
-webkit-box-shadow: 0 0 4px 2px rgba(139, 163, 198, 0.3);
|
|
-webkit-box-shadow: 0 0 4px 2px rgba(139, 163, 198, 0.3);
|
|
border-radius: 0.1rem;
|
|
border-radius: 0.1rem;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
+ .menu-card-item {
|
|
|
|
+ width: 23%;
|
|
|
|
+ // height: 3rem;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ align-items: center;
|
|
|
|
+ margin-bottom: 1rem;
|
|
|
|
+ .menu-card-item-img {
|
|
|
|
+ width: 2.5rem;
|
|
|
|
+ height: 2.5rem;
|
|
|
|
+ }
|
|
|
|
+ .menu-card-item-title {
|
|
|
|
+ font-size: 0.65rem;
|
|
|
|
+ margin-top: 0.25rem;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // .menu-card-item-border {
|
|
|
|
+ // border: 1px solid #e6e6e6;
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|