提交 bb69f3dc 作者: 方治民

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

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