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> </template>
<script setup> <script setup>
defineOptions({
inheritAttrs: false
})
const props = defineProps({ const props = defineProps({
visible: { visible: {
type: Boolean, type: Boolean,

View File

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

View File

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

View File

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

View File

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

View File

@ -7,7 +7,7 @@ export function useBanner() {
const loadBannerActivities = async () => { const loadBannerActivities = async () => {
try { try {
const starId = uni.getStorageSync('star_id') || null 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) { if (res.code === 200 && res.data?.activities) {
const activities = res.data.activities const activities = res.data.activities

View File

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