fix: 修改已知bug

This commit is contained in:
zerosaturation 2026-04-13 17:34:03 +08:00
parent b25046f051
commit 65ad41d1a4
8 changed files with 47 additions and 35 deletions

View File

@ -25,6 +25,10 @@
</template>
<script setup>
defineOptions({
inheritAttrs: false
})
const props = defineProps({
visible: {
type: Boolean,

View File

@ -101,6 +101,10 @@
</template>
<script setup>
defineOptions({
inheritAttrs: false
})
import { ref, onMounted } from 'vue';
import { getOssSignatureApi, createMintOrderApi } from '@/utils/api.js';
import ConfirmModal from '@/components/ConfirmModal.vue';
@ -477,13 +481,16 @@ const handleBack = async () => {
content: '确定要返回吗?未保存的数据将会丢失',
success: async (res) => {
if (res.confirm) {
resetForm();
uni.navigateBack();
uni.redirectTo({
url: '/pages/castlove/mall'
});
}
}
});
} else {
uni.navigateBack();
uni.redirectTo({
url: '/pages/castlove/mall'
});
}
};

View File

@ -432,7 +432,7 @@ const handleBack = () => {
}
.content-wrapper.fixed-category {
margin-top: 5rem;
margin-top: 192rpx;
}
/* 区域一:轮播图 */
@ -518,7 +518,7 @@ const handleBack = () => {
.category-section.fixed {
position: fixed;
top: 64rpx;
top: 96rpx;
left: 24rpx;
right: 24rpx;
z-index: 100;

View File

@ -264,34 +264,34 @@ const displayTabs = computed(() => {
// ,
if (currentRankingType.value === RANKING_TYPES.ACTIVITY) {
//
if (isLoadingActivities.value) {
return [{
name: '加载中...',
type: 'loading',
icon: null,
id: null
}];
}
// if (isLoadingActivities.value) {
// return [{
// name: '...',
// type: 'loading',
// icon: null,
// id: null
// }];
// }
//
if (activityLoadError.value) {
return [{
name: '加载失败',
type: 'error',
icon: null,
id: null
}];
}
// if (activityLoadError.value) {
// return [{
// name: '',
// type: 'error',
// icon: null,
// id: null
// }];
// }
//
if (activityList.value.length === 0) {
return [{
name: '暂无活动',
type: 'empty',
icon: null,
id: null
}];
}
// if (activityList.value.length === 0) {
// return [{
// name: '',
// type: 'empty',
// icon: null,
// id: null
// }];
// }
//
return activityList.value.map(activity => ({
@ -340,7 +340,7 @@ const fetchActivityList = async () => {
try {
isLoadingActivities.value = true;
activityLoadError.value = null;
const response = await getActivityListApi(starId, 1, 20);
const response = await getActivityListApi(starId, 1, 10);
if (response && response.code === 200 && response.data) {
activityList.value = response.data.activities || [];

View File

@ -257,7 +257,8 @@
</template>
<script setup>
import { ref, computed, onShow } from 'vue';
import { ref, computed } from 'vue';
import { onShow } from '@dcloudio/uni-app';
import { useStore } from 'vuex';
import { onReady } from "@dcloudio/uni-app";
import Header from '../components/Header.vue';

View File

@ -7,7 +7,7 @@ export function useBanner() {
const loadBannerActivities = async () => {
try {
const starId = uni.getStorageSync('star_id') || null
const res = await getActivityListApi(starId, 'active', 1, 3)
const res = await getActivityListApi(starId, 1, 10)
if (res.code === 200 && res.data?.activities) {
const activities = res.data.activities

View File

@ -40,9 +40,9 @@ const DEFAULT_BUBBLE_TEXTS = ['加油!', '一起努力!', '继续前进!']
* @param {number} pageSize - 每页数量
* @returns {Promise} 活动列表
*/
export async function fetchActivityList(starId, status = '', page = 1, pageSize = 10) {
export async function fetchActivityList(starId, page = 1, pageSize = 10) {
try {
const response = await getActivityListApi(starId, status, page, pageSize)
const response = await getActivityListApi(starId, page, pageSize)
if (response.code === 200 && response.data) {
return {
activities: response.data.activities || [],

View File

@ -484,7 +484,7 @@ export function getOriginalRankingApi(dimension = 'total', starId = null, page =
// ==================== 活动相关接口 ====================
// 获取活动列表
export function getActivityListApi(starId, status = '', page = 1, pageSize = 10) {
export function getActivityListApi(starId, page = 1, pageSize = 10) {
let url = `/api/v1/activities?star_id=${starId}&page=${page}&page_size=${pageSize}`
// if (status) {
// url += `&status=${status}`