|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="mine-index">
|
|
|
<div class="mine-header">
|
|
|
- <div class="user-info-box">
|
|
|
+ <div class="user-info-box" @click="handleUserInfoClick">
|
|
|
<el-avatar
|
|
|
class="avatar"
|
|
|
:size="54"
|
|
|
@@ -9,7 +9,8 @@
|
|
|
/>
|
|
|
<div class="user-info">
|
|
|
<div class="user-name">
|
|
|
- <span>{{ userInfo?.nickname || userInfo?.name }}</span>
|
|
|
+ <span v-if="curRole === 0">{{ userInfo?.nickname }}</span>
|
|
|
+ <span v-else>{{ userInfo?.name }}</span>
|
|
|
<span class="score" v-if="curRole !== 0">5.0分</span>
|
|
|
</div>
|
|
|
<div class="user-day">这是您使用飞鸟有味的第15天</div>
|
|
|
@@ -54,6 +55,7 @@
|
|
|
import { onActivated, ref, computed, onMounted } from "vue";
|
|
|
import { useRouter } from "vue-router";
|
|
|
import { useStore } from "vuex";
|
|
|
+import wx from "weixin-js-sdk";
|
|
|
import { ActionSheet } from "vant";
|
|
|
import { SET_USER_CUR_ROLE } from "@/store/modules/app/type";
|
|
|
|
|
|
@@ -200,7 +202,9 @@ const gardenInfoItems = ref([
|
|
|
]);
|
|
|
|
|
|
onActivated(() => {
|
|
|
- getStatistics();
|
|
|
+ if(curRole.value !== 0){
|
|
|
+ getStatistics();
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
const getStatistics = () => {
|
|
|
@@ -234,6 +238,12 @@ const handleCellClick = (item) => {
|
|
|
const changeToggle = () => {
|
|
|
show.value = true;
|
|
|
};
|
|
|
+
|
|
|
+const handleUserInfoClick = () => {
|
|
|
+ wx.miniProgram.navigateTo({
|
|
|
+ url: `/pages/subPages/user_info/index?route_path=/mine`,
|
|
|
+ });
|
|
|
+}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.mine-index {
|