Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
lls_program
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-09-28 14:06:17 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5475de94aab7af6d3f19217310d3bdbdb6187293
5475de94
1 parent
f1e0345a
fix(AdPage): 添加默认广告图片并在加载失败时显示
当广告图片URL为空时显示默认图片,避免空白页面
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
src/pages/AdPage/index.vue
src/pages/AdPage/index.vue
View file @
5475de9
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-09-2
6 17:20:49
* @LastEditTime: 2025-09-2
8 14:03:53
* @FilePath: /lls_program/src/pages/AdPage/index.vue
* @Description: 广告页面
-->
...
...
@@ -36,7 +36,7 @@
<!-- 背景图片 -->
<image
v-show="!imageLoading && !imageLoadError"
:src="adImageUrl"
:src="adImageUrl
|| defaultAdImage
"
class="ad-background"
mode="scaleToFill"
@tap="handleImageClick"
...
...
@@ -75,6 +75,9 @@ import { getMyFamiliesAPI } from "@/api/family";
import { silentAuth } from "@/utils/authRedirect";
import "./index.less";
// 默认广告图片
const defaultAdImage = 'https://cdn.ipadbiz.cn/space_34093/%E5%BC%95%E5%AF%BC%E9%A1%B51_Fu2ZY_Tm6TL1OzbyrqQkeVRAdVfU.jpg?imageMogr2/strip/quality/60';
// 定义响应式数据
const adImageUrl = ref('');
const loading = ref(true);
...
...
Please
register
or
login
to post a comment