fix(articleList): 修复未登录状态下标题显示问题并优化登录状态获取
- 将未登录状态下的标题显示从text标签改为div并使用v-html渲染完整标题 - 修改登录状态获取方式,使用Session存储替代uni.getStorageSync
This commit is contained in:
parent
2a851c74a0
commit
df0b47d766
|
|
@ -5,7 +5,7 @@ ENV = development
|
|||
# VITE_API_URL = http://123.60.153.169:8040/apih5
|
||||
# VITE_API_URL = https://4155gf93ll13.vicp.fun/apih5
|
||||
# VITE_API_URL = http://123.60.79.143:8041/apih5
|
||||
# VITE_API_URL =http://ukfba3.natappfree.cc/apih5
|
||||
# VITE_API_URL =http://localhost:8040/apih5
|
||||
VITE_API_URL = https://cankao.cs.com.cn/apih5
|
||||
|
||||
VITE_API_DATAV_URL = https://cankao.cs.com.cn/zzck_datav
|
||||
|
|
@ -9,11 +9,12 @@
|
|||
</view>
|
||||
<view class="listItemHeaderContent">
|
||||
<view v-if="!isLogin">
|
||||
<text :class="['listItemTitle']">{{ item.title.slice(0, 3) }}</text>
|
||||
<div :class="['listItemTitle']" v-html="item.title"></div>
|
||||
<!-- <text :class="['listItemTitle']">{{ item.title.slice(0, 3) }}</text>
|
||||
<text :class="['listItemTitle', isLogin ? '' : 'mohu']">
|
||||
{{ item.title.slice(3, item.title.length) }}
|
||||
</text></view
|
||||
>
|
||||
</text> -->
|
||||
</view>
|
||||
<view v-else>
|
||||
<view :class="['listItemTitle1']" v-html="item.title"> </view>
|
||||
</view>
|
||||
|
|
@ -54,9 +55,11 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { onShow, onLoad } from "@dcloudio/uni-app";
|
||||
import { Session } from "@/utils/storage";
|
||||
|
||||
const emit = defineEmits(["handleListJump", "onClick"]);
|
||||
const isLogin = ref(uni.getStorageSync("token"));
|
||||
// const isLogin = ref(uni.getStorageSync("token"));
|
||||
const isLogin = ref(Session.get("token"));
|
||||
|
||||
const props = defineProps({
|
||||
// 列表内容
|
||||
|
|
|
|||
Loading…
Reference in New Issue