fix: ai隐藏样式

master
xjs 2025-04-27 15:19:46 +08:00
parent b37c3dc1b4
commit 9a79f7cc88
3 changed files with 23 additions and 7 deletions

View File

@ -1,5 +1,7 @@
<template>
<view class="mx-5 rounded-lg bg-white px-[32rpx] py-[56rpx]">
<view
:class="`mx-5 rounded-lg bg-white px-[32rpx] ${userStore.userInfo.openid ? 'py-[56rpx]' : 'py-[26rpx]'}`"
>
<view
class="flex items-center justify-between mx-[34rpx] py-[26rpx]"
style="border-bottom: 2rpx solid #ededed"
@ -22,7 +24,7 @@
<image
class="w-[74%] h-[50rpx]"
mode="widthFix"
src="https://api.static.ycymedu.com/images/homepageheadtmp.png"
src="https://api.static.ycymedu.com/pagefirstloginbg.png"
/>
</view>
<view class="mt-[56rpx] flex items-center justify-between" v-if="userStore.userInfo.openid">
@ -42,7 +44,7 @@
</view>
<view class="flex items-center justify-between mt-[26rpx]" v-else>
<button
class="h-[88rpx]! w-full! text-[#fff]! text-[30rpx]! bg-[#1580FF]! font-normal flex! items-center! justify-center! rounded-[8rpx]!"
class="h-[78rpx]! w-full! text-[#fff]! text-[30rpx]! bg-[#1580FF]! font-normal flex! items-center! justify-center! rounded-[8rpx]!"
@click="navigatorToLogin"
>
登录/注册

View File

@ -3,7 +3,7 @@
<view
class="pt-[16rpx] px-[32rpx] mt-[20rpx] flex items-center justify-center bg-[#fff] pb-safe sticky bottom-0 z-999"
@click="toAiAssistant"
v-if="userStore.userInfo.isShowAi"
v-if="aiShow"
>
<view
class="rounded-[8rpx] border-[#1580FF] border-[2rpx] border-solid w-full py-[14rpx] flex items-center justify-center"
@ -19,8 +19,22 @@
</template>
<script setup lang="ts">
import { useUserStore } from '@/store'
const userStore = useUserStore()
import { sysDictType } from '@/service/index/api'
const aiShow = ref(true)
sysDictType({ id: 619330547859525 }).then((res) => {
const { code, result } = res
const { status } = result as { status: number }
if (code === 200) {
if (status === 1) {
aiShow.value = false
} else {
aiShow.value = true
}
}
})
const props = defineProps({
pageId: {
type: Number,

View File

@ -57,7 +57,7 @@ const initState = {
batchDataUrl: '',
batchName: '',
wishList: [],
isShowAi: false,
isShowAi: true,
}
export const useUserStore = defineStore(