This commit is contained in:
田岩
2025-07-22 17:11:31 +08:00
parent fb3636ea55
commit 8c94450cdd
4 changed files with 3 additions and 6 deletions
-1
View File
@@ -734,7 +734,6 @@
height: calc(100% - 832rpx); height: calc(100% - 832rpx);
padding: 12rpx 24rpx; padding: 12rpx 24rpx;
box-sizing: border-box; box-sizing: border-box;
.talking-scroll-list { .talking-scroll-list {
height: 100%; height: 100%;
} }
+3 -5
View File
@@ -83,8 +83,7 @@
const windowsInfo = uni.getWindowInfo() const windowsInfo = uni.getWindowInfo()
const nowWidth = ref(0); const nowWidth = ref(0);
const pages = getCurrentPages(); const pages = getCurrentPages();
const swiperCount = 4; // 总轮播项数量 const swiperCount = computed(() => mascotList.length)
let swiperIndex = ref(0); // 当前显示第1个(索引0 let swiperIndex = ref(0); // 当前显示第1个(索引0
const isAnimating = ref(false); // 标记动画是否进行中 const isAnimating = ref(false); // 标记动画是否进行中
@@ -98,7 +97,7 @@
const doct_click = (num) => { const doct_click = (num) => {
if (isAnimating.value) return; // 1. 如果动画正在进行,直接忽略点击 if (isAnimating.value) return; // 1. 如果动画正在进行,直接忽略点击
isAnimating.value = true; isAnimating.value = true;
let newIndex = (swiperIndex.value + num + swiperCount) % swiperCount; let newIndex = (swiperIndex.value + num + swiperCount.value) % swiperCount.value;
swiperIndex.value = newIndex; // 更新当前索引 swiperIndex.value = newIndex; // 更新当前索引
}; };
const select_it = () => { const select_it = () => {
@@ -116,7 +115,7 @@
common.msg('设置成功') common.msg('设置成功')
common.setValue('mascotState', false) common.setValue('mascotState', false)
setTimeout(() => { setTimeout(() => {
console.log('pages.length', pages.length);
if (pages.length >= 2) { if (pages.length >= 2) {
// 页面栈只有一页,没有返回页,那就返回首页 // 页面栈只有一页,没有返回页,那就返回首页
back_state.value = false; back_state.value = false;
@@ -137,7 +136,6 @@
Object.assign(mascotList, { Object.assign(mascotList, {
...body ...body
}) })
console.log(mascotList);
common.hideLoading() common.hideLoading()
}) })
}) })
Binary file not shown.

Before

Width:  |  Height:  |  Size: 299 KiB

After

Width:  |  Height:  |  Size: 327 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 KiB