Kaynağa Gözat

Update 小程序添加demo账号调整界面用于审核

YueYunyun 1 yıl önce
ebeveyn
işleme
815b8e2b04

+ 2 - 1
UI/XYH.APP/src/components/comment.vue

@@ -6,6 +6,7 @@ import dayjs from "dayjs"
 import relativeTime from "dayjs/plugin/relativeTime" // 导入插件
 import relativeTime from "dayjs/plugin/relativeTime" // 导入插件
 import { checkUrl } from "@/core/utils"
 import { checkUrl } from "@/core/utils"
 import "dayjs/locale/zh-cn" // 导入本地化语言
 import "dayjs/locale/zh-cn" // 导入本地化语言
+import appStore from "@/stores"
 dayjs.extend(relativeTime) // 使用插件
 dayjs.extend(relativeTime) // 使用插件
 dayjs.locale("zh-cn") // 使用本地化语言
 dayjs.locale("zh-cn") // 使用本地化语言
 const props = withDefaults(
 const props = withDefaults(
@@ -172,7 +173,7 @@ function init() {
 onMounted(init)
 onMounted(init)
 </script>
 </script>
 <template>
 <template>
-  <view v-if="ready">
+  <view v-if="ready &&appStore.amProfileStore.notDemo()">
     <vb-cell-group :title="`评论 ${commentCount} 条`">
     <vb-cell-group :title="`评论 ${commentCount} 条`">
       <view v-if="commentCount == 0" class="h-80px d-fc text-gray-6">暂无评论</view>
       <view v-if="commentCount == 0" class="h-80px d-fc text-gray-6">暂无评论</view>
       <template v-else>
       <template v-else>

+ 4 - 9
UI/XYH.APP/src/components/searchBar.vue

@@ -1,4 +1,6 @@
 <script setup lang="ts">
 <script setup lang="ts">
+import appStore from '@/stores'
+
 const props = withDefaults(
 const props = withDefaults(
   defineProps<{
   defineProps<{
     height?: string | number
     height?: string | number
@@ -108,7 +110,7 @@ function search() {
 
 
 </script>
 </script>
 <template>
 <template>
-  <view class="bg-white px-15 pt-15" :style="style">
+  <view  v-if="appStore.amProfileStore.notDemo()" class="bg-white px-15 pt-15" :style="style">
     <view v-if="queryTypeData && queryTypeData.length" class="d-fc mb-10">
     <view v-if="queryTypeData && queryTypeData.length" class="d-fc mb-10">
       <uni-data-checkbox
       <uni-data-checkbox
         v-model="queryType"
         v-model="queryType"
@@ -175,14 +177,7 @@ function search() {
           </view>
           </view>
         </template>
         </template>
       </view>
       </view>
-        
       </scroll-view>
       </scroll-view>
     </view>
     </view>
   </view>
   </view>
-</template>
-
-<style>
-.search-tab-item{
-  
-}
-</style>
+</template>

+ 4 - 0
UI/XYH.APP/src/pages-sub/activity/applyAudit.vue

@@ -79,6 +79,7 @@ import apis from "@/api"
 import route from "@/route"
 import route from "@/route"
 import configs from "@/core/config"
 import configs from "@/core/config"
 import { checkUrl } from "@/core/utils"
 import { checkUrl } from "@/core/utils"
+import appStore from "@/stores"
 
 
 const wHeight = uni.getWindowInfo().windowHeight
 const wHeight = uni.getWindowInfo().windowHeight
 const topHeight = ref(25)
 const topHeight = ref(25)
@@ -107,6 +108,9 @@ const isCost = function (item: any) {
   return item.costStatus == "1"
   return item.costStatus == "1"
 }
 }
 function onGoAmDetail(item: any) {
 function onGoAmDetail(item: any) {
+  if (!appStore.amProfileStore.notDemo()) {
+    return 
+  }
   route.navigate("alumnusDetail", { id: item.amId })
   route.navigate("alumnusDetail", { id: item.amId })
 }
 }
 function onConfirmApply(item: any) {
 function onConfirmApply(item: any) {

+ 4 - 0
UI/XYH.APP/src/pages-sub/activity/applyList.vue

@@ -47,6 +47,7 @@ import apis from "@/api"
 import route from "@/route"
 import route from "@/route"
 import configs from "@/core/config"
 import configs from "@/core/config"
 import { checkUrl } from "@/core/utils"
 import { checkUrl } from "@/core/utils"
+import appStore from "@/stores"
 
 
 
 
 const wHeight = uni.getWindowInfo().windowHeight
 const wHeight = uni.getWindowInfo().windowHeight
@@ -74,6 +75,9 @@ const isCost = function (item: any) {
 }
 }
 
 
 function onGoAmDetail(item: any) {
 function onGoAmDetail(item: any) {
+  if (!appStore.amProfileStore.notDemo()) {
+    return 
+  }
   route.navigate("alumnusDetail", { id: item.amId })
   route.navigate("alumnusDetail", { id: item.amId })
 }
 }
 function loadActivity() {
 function loadActivity() {

+ 1 - 1
UI/XYH.APP/src/pages-sub/activity/edit.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <view v-if="appStore.amProfileStore.isAudit()" class="page-container">
+  <view v-if="appStore.amProfileStore.notDemo()" class="page-container">
     <view v-if="activityId" class="mb-15">
     <view v-if="activityId" class="mb-15">
       <view class="text-center text-danger" v-if="form.isClose == 1">活动已关闭</view>
       <view class="text-center text-danger" v-if="form.isClose == 1">活动已关闭</view>
       <view class="text-center text-danger" v-else-if="form.auditStatus == 2">活动未通过审核,修改后重新发布</view>
       <view class="text-center text-danger" v-else-if="form.auditStatus == 2">活动未通过审核,修改后重新发布</view>

+ 1 - 1
UI/XYH.APP/src/pages-sub/activity/myActivity.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <view>
+  <view v-if="appStore.amProfileStore.notDemo()">
     <SearchBar
     <SearchBar
       v-model:query-type="queryType"
       v-model:query-type="queryType"
       v-model:search-input-value="searchInputValue"
       v-model:search-input-value="searchInputValue"

+ 1 - 1
UI/XYH.APP/src/pages-sub/friend/components/follow.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <view class="">
+  <view v-if="appStore.amProfileStore.notDemo()" class="">
     <SearchBar
     <SearchBar
       v-model:query-type="queryType"
       v-model:query-type="queryType"
       v-model:search-input-value="searchInputValue"
       v-model:search-input-value="searchInputValue"

+ 1 - 1
UI/XYH.APP/src/pages-sub/help/edit.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <view v-if="appStore.amProfileStore.isAudit()" class="page-container">
+  <view v-if="appStore.amProfileStore.notDemo()" class="page-container">
     <view v-if="helpId">
     <view v-if="helpId">
       <view class="text-center text-danger mb-5" v-if="form.isClose == 1">互助已关闭</view>
       <view class="text-center text-danger mb-5" v-if="form.isClose == 1">互助已关闭</view>
       <view class="text-center text-danger mb-5" v-else-if="form.auditStatus == 2">互助未通过审核,修改后重新发布</view>
       <view class="text-center text-danger mb-5" v-else-if="form.auditStatus == 2">互助未通过审核,修改后重新发布</view>

+ 1 - 1
UI/XYH.APP/src/pages-sub/help/myHelp.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <view>
+  <view v-if="appStore.amProfileStore.notDemo()">
     <SearchBar
     <SearchBar
       v-model:search-input-value="searchInputValue"
       v-model:search-input-value="searchInputValue"
       v-model:search-type="searchType"
       v-model:search-type="searchType"

+ 1 - 1
UI/XYH.APP/src/pages/account/login.vue

@@ -177,7 +177,7 @@ onLoad(() => {
         </view>
         </view>
       </view>
       </view>
       <view v-else class="">
       <view v-else class="">
-        <vb-button @click="handleWechatAuth" round block size="large" style="margin-top: 20px;">微信授权登录</vb-button>
+        <vb-button @click="handleWechatAuth" round block size="large" style="margin-top: 20px;">快捷登录</vb-button>
         <vb-button @click="handleManualAuth" plain round block size="large" custom-class="mt-20">手动登录</vb-button>
         <vb-button @click="handleManualAuth" plain round block size="large" custom-class="mt-20">手动登录</vb-button>
       </view>
       </view>
       <view class="d-flex justify-center mt-30 privacy">
       <view class="d-flex justify-center mt-30 privacy">

+ 0 - 1
UI/XYH.APP/src/pages/activity/index.vue

@@ -1,7 +1,6 @@
 <template>
 <template>
   <view class="">
   <view class="">
     <SearchBar
     <SearchBar
-      v-if="appStore.amProfileStore.isAudit()"
       v-model:search-input-value="searchInputValue"
       v-model:search-input-value="searchInputValue"
       v-model:search-type="searchType"
       v-model:search-type="searchType"
       v-model:search-dropdown-value="searchDropdownValue"
       v-model:search-dropdown-value="searchDropdownValue"

+ 5 - 5
UI/XYH.APP/src/pages/alumnus/index.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <view v-if="appStore.amProfileStore.isAudit()">
+  <view>
     <SearchBar
     <SearchBar
       v-model:search-input-value="searchInputValue"
       v-model:search-input-value="searchInputValue"
       v-model:search-type="searchType"
       v-model:search-type="searchType"
@@ -20,7 +20,7 @@
       custom-class="mx-15 pt-10"
       custom-class="mx-15 pt-10"
     >
     >
       <template #item="{ item }">
       <template #item="{ item }">
-        <vb-cell-group v-if="item.amId != myAmId">
+        <vb-cell-group v-if="item.amId != myAmId && appStore.amProfileStore.notDemo()">
           <view class="am-book d-flex p-10" @click="onClick(item)">
           <view class="am-book d-flex p-10" @click="onClick(item)">
             <view class="avatar px-5">
             <view class="avatar px-5">
               <view class="w-70px h-70px br-round bg-gray-3 pos-r">
               <view class="w-70px h-70px br-round bg-gray-3 pos-r">
@@ -83,9 +83,6 @@
       </template>
       </template>
     </vb-list>
     </vb-list>
   </view>
   </view>
-  <view v-else>
-    <view class="d-fc text-gray-5 mt-50">功能正在开发中...</view>
-  </view>
 </template>
 </template>
 
 
 <script lang="ts" setup>
 <script lang="ts" setup>
@@ -148,6 +145,9 @@ function getLastLogin(item: any) {
   return dayjs(item.loginDate).fromNow()
   return dayjs(item.loginDate).fromNow()
 }
 }
 function onClick(item: any) {
 function onClick(item: any) {
+  if (!appStore.amProfileStore.notDemo()) {
+    return 
+  }
   route.navigate("alumnusDetail", { id: item.amId, userId: item.userId })
   route.navigate("alumnusDetail", { id: item.amId, userId: item.userId })
 }
 }
 
 

+ 4 - 4
UI/XYH.APP/src/pages/help/index.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <view v-if="appStore.amProfileStore.isAudit()">
+  <view>
     <SearchBar
     <SearchBar
       v-model:search-input-value="searchInputValue"
       v-model:search-input-value="searchInputValue"
       v-model:search-type="searchType"
       v-model:search-type="searchType"
@@ -24,9 +24,9 @@
       </template>
       </template>
     </vb-list>
     </vb-list>
   </view>
   </view>
-  <view v-else>
-    <view class="d-fc text-gray-5 mt-50">功能正在开发中...</view>
-  </view>
+  <!-- <view v-else>
+    <view class="d-fc text-gray-5 mt-50">暂无数据,等待平台发布互助信息......</view>
+  </view> -->
 </template>
 </template>
 
 
 <script lang="ts" setup>
 <script lang="ts" setup>

+ 1 - 1
UI/XYH.APP/src/pages/index/welcome.vue

@@ -18,7 +18,7 @@ onLoad(() => {
   if (!appStore.authStore.isAuthenticated) {
   if (!appStore.authStore.isAuthenticated) {
     //console.log("跳转到登录页面")
     //console.log("跳转到登录页面")
     route.reLaunch("login")
     route.reLaunch("login")
-  } else if (appStore.authStore.getAuditStatus() != 1) {
+  } else if (appStore.authStore.getAuditStatus() != 1 || appStore.authStore.getAuditStatus() == 9) {
     const params = route.getRouteParams("welcome");
     const params = route.getRouteParams("welcome");
     if (params?.isFirst) {
     if (params?.isFirst) {
       console.log("未审核校友跳转到信息编辑页面")
       console.log("未审核校友跳转到信息编辑页面")

+ 3 - 3
UI/XYH.APP/src/pages/mine/index.vue

@@ -112,7 +112,7 @@ onShow(init)
 
 
       </view>
       </view>
     </view>
     </view>
-    <view v-if="ready" class="d-flex mb-15 bg-white py-15">
+    <view v-if="ready && appStore.amProfileStore.notDemo()" class="d-flex mb-15 bg-white py-15">
       <view class="w-100 flex-column d-fc text-vb" @click="route.navigate('followMe')">
       <view class="w-100 flex-column d-fc text-vb" @click="route.navigate('followMe')">
         <view class="fs-20 font-bold mb-5">
         <view class="fs-20 font-bold mb-5">
           {{ followCount }}
           {{ followCount }}
@@ -137,7 +137,7 @@ onShow(init)
       </view>
       </view>
     </view>
     </view>
     <view v-if="ready" class="">
     <view v-if="ready" class="">
-      <vb-cell-group inset v-if="appStore.amProfileStore.isAudit()">
+      <vb-cell-group inset v-if="appStore.amProfileStore.notDemo()">
         <vb-cell icon="user-s" icon-class="text-vb" is-link @click="route.navigate('profileEdit')">
         <vb-cell icon="user-s" icon-class="text-vb" is-link @click="route.navigate('profileEdit')">
           <template #title>
           <template #title>
             <text class="me-10">完善个人资料</text>
             <text class="me-10">完善个人资料</text>
@@ -172,7 +172,7 @@ onShow(init)
           </template>
           </template>
         </vb-cell>
         </vb-cell>
       </vb-cell-group>
       </vb-cell-group>
-      <vb-cell-group inset  v-if="appStore.amProfileStore.isAudit()">
+      <vb-cell-group inset v-if="appStore.amProfileStore.notDemo()">
         <vb-cell
         <vb-cell
           icon="like-s"
           icon="like-s"
           icon-class="text-vb"
           icon-class="text-vb"

+ 4 - 0
UI/XYH.APP/src/pages/news/index.vue

@@ -34,6 +34,9 @@
       </vb-list>
       </vb-list>
     </view>
     </view>
   </view>
   </view>
+  <!-- <view v-else>
+    <view class="d-fc text-gray-5 mt-50">暂无数据,等待平台发布资讯信息...</view>
+  </view> -->
   
   
 </template>
 </template>
 
 
@@ -44,6 +47,7 @@ import ListCard from "@/components/listCard.vue"
 import SearchBar from "@/components/searchBar.vue"
 import SearchBar from "@/components/searchBar.vue"
 import route from "@/route"
 import route from "@/route"
 import configs from "@/core/config"
 import configs from "@/core/config"
+import appStore from "@/stores"
 
 
 
 
 dayjs.locale("zh-cn") // 使用本地化语言
 dayjs.locale("zh-cn") // 使用本地化语言

+ 7 - 3
UI/XYH.APP/src/stores/_profile.ts

@@ -28,8 +28,11 @@ export const useAmProfileStore = defineStore("amProfile", () => {
     return amInfo.value
     return amInfo.value
   }
   }
 
 
-  function isAudit()  {
-    return  appStore.authStore.isAuthenticated && amInfo.value.auditStatus == 1
+  // function isAudit()  {
+  //   return appStore.authStore.isAuthenticated && amInfo.value.auditStatus == 1
+  // }
+  function notDemo() {
+    return amInfo.value.name != "demo" && appStore.authStore.isAuthenticated && amInfo.value.auditStatus == 1
   }
   }
   function getProfileProgress() {
   function getProfileProgress() {
     let count = 0,
     let count = 0,
@@ -71,9 +74,10 @@ export const useAmProfileStore = defineStore("amProfile", () => {
     getProfileProgress,
     getProfileProgress,
     loadProfile,
     loadProfile,
     getProfileInfo,
     getProfileInfo,
-    isAudit,
+    //isAudit,
     updateProfile,
     updateProfile,
     updatePrivacy,
     updatePrivacy,
     clean,
     clean,
+    notDemo,
   }
   }
 })
 })