fix: 修改已知bug
This commit is contained in:
parent
b25046f051
commit
65ad41d1a4
@ -25,6 +25,10 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
defineOptions({
|
||||
inheritAttrs: false
|
||||
})
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
|
||||
@ -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'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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 || [];
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 || [],
|
||||
|
||||
@ -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}`
|
||||
|
||||
Loading…
Reference in New Issue
Block a user