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-26 09:23:12 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c93465b81aecea97a3dda1d54cd94fa2f1060a40
c93465b8
1 parent
ac1358e3
refactor(AdPage): 替换手动刷新按钮为步骤说明
将手动刷新按钮和重试按钮替换为网络连接异常的步骤说明,并更新相关样式
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
54 deletions
src/pages/AdPage/index.less
src/pages/AdPage/index.vue
src/pages/AdPage/index.less
View file @
c93465b
...
...
@@ -191,40 +191,22 @@
line-height: 1.5;
}
.refresh-buttons {
display: flex;
gap: 20rpx;
justify-content: center;
}
.refresh-button {
flex: 1;
padding: 24rpx 32rpx;
background: linear-gradient(135deg, #007aff, #0056cc);
color: white;
.refresh-steps {
text-align: left;
background: #f8f9fa;
border-radius: 12rpx;
font-size: 32rpx;
font-weight: 600;
text-align: center;
&:active {
background: linear-gradient(135deg, #0056cc, #003d99);
transform: scale(0.98);
}
padding: 32rpx;
margin-top: 20rpx;
}
.retry-button-small {
flex: 1;
padding: 24rpx 32rpx;
background: #f0f0f0;
color: #666;
border-radius: 12rpx;
font-size: 32rpx;
text-align: center;
.step-item {
font-size: 30rpx;
color: #333;
line-height: 1.6;
margin-bottom: 16rpx;
&:active {
background: #e0e0e0;
transform: scale(0.98);
&:last-child {
margin-bottom: 0;
}
}
...
...
src/pages/AdPage/index.vue
View file @
c93465b
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-09-2
5 21:22:49
* @LastEditTime: 2025-09-2
6 08:14:03
* @FilePath: /lls_program/src/pages/AdPage/index.vue
* @Description: 广告页面
-->
...
...
@@ -24,11 +24,11 @@
<view v-if="showManualRefresh" class="manual-refresh-container">
<view class="refresh-content">
<view class="refresh-icon">⚠️</view>
<view class="refresh-title">
加载遇到问题
</view>
<view class="refresh-subtitle">
网络可能不稳定,请尝试刷新页面
</view>
<view class="refresh-
button
s">
<view class="
refresh-button" @tap="manualRefresh">刷新页面
</view>
<view class="
retry-button-small" @tap="retryLoadImage">重试
</view>
<view class="refresh-title">
网络连接异常
</view>
<view class="refresh-subtitle">
请检查网络连接后重新进入小程序
</view>
<view class="refresh-
step
s">
<view class="
step-item">1. 点击右上角 ⋯ 菜单
</view>
<view class="
step-item">2. 选择"重新进入小程序"
</view>
</view>
</view>
</view>
...
...
@@ -181,22 +181,6 @@ const retryLoadImage = () => {
};
/**
* 手动刷新页面
*/
const manualRefresh = () => {
// 重置所有状态
retryCount.value = 0;
imageLoading.value = true;
imageLoadError.value = false;
isTimeout.value = false;
showManualRefresh.value = false;
loading.value = true;
// 重新初始化页面
initializePage();
};
/**
* 开始加载超时检测
*/
const startLoadingTimeout = () => {
...
...
@@ -204,7 +188,7 @@ const startLoadingTimeout = () => {
if (loadingTimeout.value) {
clearTimeout(loadingTimeout.value);
}
// 设置10秒超时
loadingTimeout.value = setTimeout(() => {
if (imageLoading.value) {
...
...
@@ -249,7 +233,7 @@ const initializePage = async () => {
try {
// 开始超时检测
startLoadingTimeout();
// 执行静默授权
await performSilentAuth();
...
...
Please
register
or
login
to post a comment