提交 bb69f3dc 作者: 方治民

fix: 修复审核账号判断错误用法问题

上级 c99a795a
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
import Navigate from '@/utils/page/navigate' import Navigate from '@/utils/page/navigate'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore(); const userStore = useUserStore();
const accountInfo = userStore.getUserInfo.username;
// 下拉刷新 // 下拉刷新
onPullDownRefresh(() => { onPullDownRefresh(() => {
getGoodsList() getGoodsList()
...@@ -236,7 +235,7 @@ ...@@ -236,7 +235,7 @@
type: 3, type: 3,
}).then((res) => { }).then((res) => {
const { records } = res; const { records } = res;
if(accountInfo == 'test'){ if(userStore.isAuditMode){
let arrData = []; let arrData = [];
for(let i = 0; i < records.length; i++){ for(let i = 0; i < records.length; i++){
if(!testLimitContent.includes(records[i].id)){ if(!testLimitContent.includes(records[i].id)){
...@@ -404,14 +403,14 @@ ...@@ -404,14 +403,14 @@
</view> </view>
</view> </view>
</view> </view>
<view v-if="accountInfo != 'test'" class="codefun-flex-row codefun-justify-between codefun-items-baseline codefun-mt-24"> <view v-if="!userStore.isAuditMode" class="codefun-flex-row codefun-justify-between codefun-items-baseline codefun-mt-24">
<text class="font_5 text_8">灵活用工</text> <text class="font_5 text_8">灵活用工</text>
<text class="font_6 text_9" @click="onViewMoreFlexibleEmployment">更多</text> <text class="font_6 text_9" @click="onViewMoreFlexibleEmployment">更多</text>
</view> </view>
</view> </view>
</view> </view>
<view class="codefun-flex-col group_8"> <view class="codefun-flex-col group_8">
<view v-if="accountInfo != 'test'" class="codefun-flex-col section_4 flex gap-4"> <view v-if="!userStore.isAuditMode" class="codefun-flex-col section_4 flex gap-4">
<navigator <navigator
v-for="service in pageData.flexibleEmploymentServices" v-for="service in pageData.flexibleEmploymentServices"
:key="service.id" :key="service.id"
...@@ -439,7 +438,7 @@ ...@@ -439,7 +438,7 @@
</view> </view>
</navigator> </navigator>
</view> </view>
<view v-if="accountInfo != 'test'" class="codefun-flex-col codefun-mt-24"> <view v-if="!userStore.isAuditMode" class="codefun-flex-col codefun-mt-24">
<view class="codefun-flex-row codefun-justify-between codefun-items-center group_11"> <view class="codefun-flex-row codefun-justify-between codefun-items-center group_11">
<text class="font_5 text_18">助农金融</text> <text class="font_5 text_18">助农金融</text>
<text class="font_6 text_19" @click="onViewAllFinancialProducts">全部</text> <text class="font_6 text_19" @click="onViewAllFinancialProducts">全部</text>
...@@ -534,8 +533,8 @@ ...@@ -534,8 +533,8 @@
</view> </view>
</view> </view>
<view class="codefun-flex-col codefun-mt-24"> <view class="codefun-flex-col codefun-mt-24">
<text v-if="accountInfo != 'test'" class="codefun-self-start font_5">一站式解决农机问题</text> <text v-if="!userStore.isAuditMode" class="codefun-self-start font_5">一站式解决农机问题</text>
<view v-if="accountInfo != 'test'" class="codefun-flex-col codefun-self-stretch section_11"> <view v-if="!userStore.isAuditMode" class="codefun-flex-col codefun-self-stretch section_11">
<view class="codefun-flex-row equal-division_3"> <view class="codefun-flex-row equal-division_3">
<view <view
v-for="service in pageData.farmMachineryServices" v-for="service in pageData.farmMachineryServices"
......
...@@ -10,7 +10,6 @@ import { useUserStore } from '@/store/modules/user' ...@@ -10,7 +10,6 @@ import { useUserStore } from '@/store/modules/user'
import { getList as getVideoList } from '@/api/model/knowledgeVideo' import { getList as getVideoList } from '@/api/model/knowledgeVideo'
const userStore = useUserStore() const userStore = useUserStore()
const accountInfo = userStore.getUserInfo.username;
onShow(() => { onShow(() => {
// 获取金刚区菜单数据 // 获取金刚区菜单数据
getZoomList() getZoomList()
...@@ -742,7 +741,7 @@ onHide(() => { ...@@ -742,7 +741,7 @@ onHide(() => {
</view> </view>
</view> </view>
<fui-fab v-if="accountInfo != 'test'" position="right" distance="10" bottom="240" width="96" @click="handlePublish"> <fui-fab v-if="!userStore.isAuditMode" position="right" distance="10" bottom="240" width="96" @click="handlePublish">
<view class="text-white text-center"> <view class="text-white text-center">
<image style="width: 52rpx;height:52rpx;" src="/static/images/nongchang/work_icon.png" /> <image style="width: 52rpx;height:52rpx;" src="/static/images/nongchang/work_icon.png" />
<view style="font-size: 18rpx;margin-top: -16rpx;">找人干活</view> <view style="font-size: 18rpx;margin-top: -16rpx;">找人干活</view>
......
...@@ -19,7 +19,6 @@ const model = reactive({ ...@@ -19,7 +19,6 @@ const model = reactive({
// 湖南省人民政府 // 湖南省人民政府
location: '112.982931,28.116698', location: '112.982931,28.116698',
}) })
const accountInfo = userStore.getUserInfo.username;
// 位置获取频率控制 // 位置获取频率控制
const lastLocationTime = ref(0) const lastLocationTime = ref(0)
...@@ -314,7 +313,7 @@ function getServiceItems() { ...@@ -314,7 +313,7 @@ function getServiceItems() {
}).then((res) => { }).then((res) => {
const { records } = res const { records } = res
pageData.serviceItems = [] pageData.serviceItems = []
if(accountInfo == 'test'){ if(userStore.isAuditMode){
let arrData = []; let arrData = [];
for(let i = 0; i < records.length; i++){ for(let i = 0; i < records.length; i++){
if(!testLimitContent.includes(records[i].id)){ if(!testLimitContent.includes(records[i].id)){
...@@ -608,7 +607,7 @@ export default { ...@@ -608,7 +607,7 @@ export default {
<!-- <text class="text" style="font-family: alimamashuheiti">湖南省</text> --> <!-- <text class="text" style="font-family: alimamashuheiti">湖南省</text> -->
</view> </view>
<!-- ai助手 --> <!-- ai助手 -->
<FuiMovableView v-if="accountInfo != 'test'" direction="vertical" top="650" right="-12" zIndex="99999"> <FuiMovableView v-if="!userStore.isAuditMode" direction="vertical" top="650" right="-12" zIndex="99999">
<view class="h-80rpx flex items-center" @click="openAITools"> <view class="h-80rpx flex items-center" @click="openAITools">
<image class="w-117rpx h-118rpx" src="/static/images/codefun/ai.png" alt="" /> <image class="w-117rpx h-118rpx" src="/static/images/codefun/ai.png" alt="" />
</view> </view>
......
...@@ -10,6 +10,7 @@ export interface UserInfo { ...@@ -10,6 +10,7 @@ export interface UserInfo {
phone: string phone: string
avatar: string avatar: string
realname: string realname: string
username: string
} }
interface UserState { interface UserState {
...@@ -59,7 +60,8 @@ export const useUserStore = defineStore({ ...@@ -59,7 +60,8 @@ export const useUserStore = defineStore({
isAuditMode(): boolean { isAuditMode(): boolean {
return ( return (
['10000000001', '13000000000', '13012345678'].includes(this.getUserInfo?.phone) || ['10000000001', '13000000000', '13012345678'].includes(this.getUserInfo?.phone) ||
!this.getUserInfo?.phone !this.getUserInfo?.phone ||
this.getUserInfo?.username === 'test'
) )
}, },
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论