feat: 修改样式功能
This commit is contained in:
parent
dd34def217
commit
3e1c6c309b
@ -3,7 +3,7 @@
|
|||||||
"appid" : "__UNI__F199FF4",
|
"appid" : "__UNI__F199FF4",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.5",
|
"versionName" : "1.0.5",
|
||||||
"versionCode" : 101,
|
"versionCode" : 102,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|||||||
@ -159,7 +159,7 @@ defineExpose({ reload: loadTop3 });
|
|||||||
|
|
||||||
.card-image-wrap {
|
.card-image-wrap {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: 92%;
|
height: 96%;
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -177,7 +177,7 @@ defineExpose({ reload: loadTop3 });
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 105%;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -217,6 +217,7 @@ import { doubleTapLike } from '@/utils/likeHelper.js';
|
|||||||
import LenticularCard from '@/components/lenticular/LenticularCard.vue';
|
import LenticularCard from '@/components/lenticular/LenticularCard.vue';
|
||||||
import { useLenticularCraftTiltPreview } from '@/composables/useLenticularCraftTiltPreview.js';
|
import { useLenticularCraftTiltPreview } from '@/composables/useLenticularCraftTiltPreview.js';
|
||||||
import { buildLenticularLayers } from '@/utils/castloveMintForm.js';
|
import { buildLenticularLayers } from '@/utils/castloveMintForm.js';
|
||||||
|
import { LenticularEngine, DEFAULT_PHYSICS } from '@/utils/lenticular-engine.js';
|
||||||
|
|
||||||
const goBack = () => {
|
const goBack = () => {
|
||||||
// 获取页面栈
|
// 获取页面栈
|
||||||
@ -767,12 +768,10 @@ function simulateLenticularTilt(assetId, x, y) {
|
|||||||
// 初始化光栅引擎
|
// 初始化光栅引擎
|
||||||
function initLenticularEngine() {
|
function initLenticularEngine() {
|
||||||
if (lenticularEngine.value) return;
|
if (lenticularEngine.value) return;
|
||||||
import('@/utils/lenticular-engine.js').then(({ LenticularEngine, DEFAULT_PHYSICS }) => {
|
|
||||||
const physics = { ...DEFAULT_PHYSICS, parallaxDepth: 18 };
|
const physics = { ...DEFAULT_PHYSICS, parallaxDepth: 18 };
|
||||||
physics.gyroSimEnabled = false;
|
physics.gyroSimEnabled = false;
|
||||||
lenticularPhysics.value = physics;
|
lenticularPhysics.value = physics;
|
||||||
lenticularEngine.value = new LenticularEngine(physics);
|
lenticularEngine.value = new LenticularEngine(physics);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 为每个资产初始化 transforms 为空(居中状态)
|
// 为每个资产初始化 transforms 为空(居中状态)
|
||||||
|
|||||||
@ -56,7 +56,7 @@ const onTop3DataLoaded = (items) => {
|
|||||||
z-index: 100;
|
z-index: 100;
|
||||||
padding: 0 16rpx;
|
padding: 0 16rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
top:16rpx;
|
/* top:16rpx; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-swiper {
|
.banner-swiper {
|
||||||
@ -64,7 +64,7 @@ const onTop3DataLoaded = (items) => {
|
|||||||
height: 392rpx;
|
height: 392rpx;
|
||||||
border-radius: 24rpx;
|
border-radius: 24rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
bottom: 24rpx;
|
/* bottom: 24rpx; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-activity-img {
|
.banner-activity-img {
|
||||||
|
|||||||
@ -148,16 +148,13 @@ onMounted(() => {
|
|||||||
isComponentMounted = true
|
isComponentMounted = true
|
||||||
// 监听点赞事件,实时更新点赞数
|
// 监听点赞事件,实时更新点赞数
|
||||||
uni.$on('assetLiked', ({ asset_id, data }) => {
|
uni.$on('assetLiked', ({ asset_id, data }) => {
|
||||||
console.log('[CreationGrid] 收到点赞事件', asset_id, data)
|
|
||||||
// 触发动画
|
// 触发动画
|
||||||
likingMap.value = { ...likingMap.value, [asset_id]: true }
|
likingMap.value = { ...likingMap.value, [asset_id]: true }
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
likingMap.value = { ...likingMap.value, [asset_id]: false }
|
likingMap.value = { ...likingMap.value, [asset_id]: false }
|
||||||
}, 600)
|
}, 600)
|
||||||
const idx = creationList.value.findIndex(c => c.id === asset_id)
|
const idx = creationList.value.findIndex(c => c.id === asset_id)
|
||||||
console.log('[CreationGrid] 卡片索引:', idx, '总卡片数:', creationList.value.length)
|
|
||||||
if (idx !== -1 && data && typeof data.new_like_count === 'number') {
|
if (idx !== -1 && data && typeof data.new_like_count === 'number') {
|
||||||
console.log('[CreationGrid] 更新点赞数:', creationList.value[idx].like_count, '->', data.new_like_count)
|
|
||||||
creationList.value[idx].like_count = data.new_like_count
|
creationList.value[idx].like_count = data.new_like_count
|
||||||
creationList.value = [...creationList.value]
|
creationList.value = [...creationList.value]
|
||||||
}
|
}
|
||||||
@ -167,7 +164,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
isComponentMounted = false
|
isComponentMounted = false
|
||||||
uni.off('assetLiked')
|
uni.$off('assetLiked')
|
||||||
})
|
})
|
||||||
|
|
||||||
defineExpose({ loadMore })
|
defineExpose({ loadMore })
|
||||||
@ -234,8 +231,6 @@ defineExpose({ loadMore })
|
|||||||
}
|
}
|
||||||
|
|
||||||
.creation-info {
|
.creation-info {
|
||||||
position: relative;
|
|
||||||
z-index: 2;
|
|
||||||
padding: 16rpx;
|
padding: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -316,7 +316,7 @@ onUnmounted(() => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100vh - 64rpx);
|
height: calc(100vh - 64rpx);
|
||||||
/* margin-top: 160rpx; */
|
/* margin-top: 160rpx; */
|
||||||
padding: 256rpx 24rpx 0;
|
padding: 240rpx 24rpx 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,8 @@
|
|||||||
<!-- 返回按钮 -->
|
<!-- 返回按钮 -->
|
||||||
<view class="back-button" @touchstart.stop="handleCloseTouchStart"
|
<view class="back-button" @touchstart.stop="handleCloseTouchStart"
|
||||||
@touchend.stop="handleCloseTouchEnd" @click="handleCloseClick">
|
@touchend.stop="handleCloseTouchEnd" @click="handleCloseClick">
|
||||||
<text class="back-icon">←</text>
|
<!-- <text class="back-icon">←</text> -->
|
||||||
|
<image class="back-icon" src="/static/starbookcontent/tuichu.png" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- Tab 切换 -->
|
<!-- Tab 切换 -->
|
||||||
@ -562,7 +563,7 @@ const handleCloseClick = (e) => {
|
|||||||
/* 返回按钮 */
|
/* 返回按钮 */
|
||||||
.back-button {
|
.back-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
right: 0;
|
||||||
width: 64rpx;
|
width: 64rpx;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -572,9 +573,11 @@ const handleCloseClick = (e) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.back-icon {
|
.back-icon {
|
||||||
font-size: 48rpx;
|
/* font-size: 48rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #fff;
|
color: #fff; */
|
||||||
|
width: 32rpx;
|
||||||
|
height: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tab 样式 */
|
/* Tab 样式 */
|
||||||
|
|||||||
@ -54,7 +54,6 @@ export function doubleTapLike(assetId, exhibitionId, callback) {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
likeAssetApi(assetId).then(res => {
|
likeAssetApi(assetId).then(res => {
|
||||||
console.log('[likeHelper] 点赞成功', res);
|
|
||||||
// 记录点赞
|
// 记录点赞
|
||||||
try {
|
try {
|
||||||
const storage = uni.getStorageSync(LIKE_STORAGE_KEY) || {};
|
const storage = uni.getStorageSync(LIKE_STORAGE_KEY) || {};
|
||||||
@ -64,7 +63,6 @@ export function doubleTapLike(assetId, exhibitionId, callback) {
|
|||||||
console.error('存储点赞记录失败:', e);
|
console.error('存储点赞记录失败:', e);
|
||||||
}
|
}
|
||||||
// 触发全局点赞成功事件
|
// 触发全局点赞成功事件
|
||||||
console.log('[likeHelper] 触发 assetLiked 事件', { asset_id: assetId, exhibition_id: actualExhibitionId, data: res.data });
|
|
||||||
uni.$emit('assetLiked', {
|
uni.$emit('assetLiked', {
|
||||||
asset_id: assetId,
|
asset_id: assetId,
|
||||||
exhibition_id: actualExhibitionId,
|
exhibition_id: actualExhibitionId,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user