ソースを参照

feat:添加角色编辑页面

wangsisi 1 週間 前
コミット
fe62298a46

+ 1 - 1
src/views/old_mini/agri_services/components/servicesHall.vue

@@ -46,7 +46,7 @@
                             <div class="content-t">
                                 <img class="content-img" :src="item.bgUrl" alt="" />
                                 <div class="content-info">
-                                    <div class="content-name">{{ item.storeName }} <span>{{ item.score||0 }}分</span></div>
+                                    <div class="content-name">{{ item.storeName }} <span>{{ item.score || 5 }}分</span></div>
                                     <div class="content-text">
                                         <div class="text-item van-ellipsis">
                                             <span>服务类型:</span>

+ 13 - 3
src/views/old_mini/mine/index.vue

@@ -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 {