commit
This commit is contained in:
+1
@@ -55,6 +55,7 @@ public class ClientActivityController {
|
|||||||
$condition
|
$condition
|
||||||
""");
|
""");
|
||||||
Cnd cnd = Cnd.NEW();
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.and(Cnd.likeEX("t1.title", pageForm.getSearchKeyword()));
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
Pagination pagination = clientActivityService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
Pagination pagination = clientActivityService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
return Result.success(pagination);
|
return Result.success(pagination);
|
||||||
|
|||||||
@@ -127,6 +127,17 @@
|
|||||||
"selectedColor": "#f45a5a"
|
"selectedColor": "#f45a5a"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/activity/rank/index",
|
||||||
|
"text": "排行榜",
|
||||||
|
"iconfont": {
|
||||||
|
"text": "\ue64d",
|
||||||
|
"selectedText": "\ue64d",
|
||||||
|
"fontSize": "17px",
|
||||||
|
"color": "#333",
|
||||||
|
"selectedColor": "#f45a5a"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/profile/index",
|
"pagePath": "pages/profile/index",
|
||||||
"text": "我的",
|
"text": "我的",
|
||||||
|
|||||||
@@ -8,6 +8,9 @@
|
|||||||
shape="round"
|
shape="round"
|
||||||
class="search-input"
|
class="search-input"
|
||||||
@onSearch="handleSearch"
|
@onSearch="handleSearch"
|
||||||
|
@onSubmit="handleSearch"
|
||||||
|
@submit="handleSearch"
|
||||||
|
@search="handleSearch"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page-container">
|
<view class="page-container">
|
||||||
|
|
||||||
|
<t-dropdown-menu class="top-dropdown">
|
||||||
|
<t-dropdown-item :options="actOptions" :value="activityId"/>
|
||||||
|
</t-dropdown-menu>
|
||||||
|
|
||||||
<view class="rank-header">
|
<view class="rank-header">
|
||||||
<view class="title-container">
|
<view class="title-container">
|
||||||
<view class="title">活动排行榜</view>
|
<view class="title">活动排行榜</view>
|
||||||
@@ -75,17 +80,27 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted } from 'vue';
|
import {ref, onMounted, computed} from 'vue';
|
||||||
import { Toast } from 'tdesign-mobile-vue';
|
import { Toast } from 'tdesign-mobile-vue';
|
||||||
import { useRequest } from "@/utils/request";
|
import { useRequest } from "@/utils/request";
|
||||||
import {onLoad} from "@dcloudio/uni-app";
|
import {onLoad} from "@dcloudio/uni-app";
|
||||||
|
|
||||||
// 排行榜数据
|
// 排行榜数据
|
||||||
|
const actList = ref([])
|
||||||
const rankList = ref([]);
|
const rankList = ref([]);
|
||||||
const activityId = ref([]);
|
const activityId = ref(null);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const refresherTriggered = ref(false);
|
const refresherTriggered = ref(false);
|
||||||
|
|
||||||
|
const actOptions = computed(() => {
|
||||||
|
return actList.value.map(item => {
|
||||||
|
return {
|
||||||
|
value: item.id,
|
||||||
|
label: item.title
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
// 获取排行榜数据
|
// 获取排行榜数据
|
||||||
const getRankData = async () => {
|
const getRankData = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
@@ -110,6 +125,22 @@ const getRankData = async () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
async function listMineAct() {
|
||||||
|
try {
|
||||||
|
const {data, code, msg} = await useRequest().get('/client/activity/list-mine-act')
|
||||||
|
if (code === 0) {
|
||||||
|
actList.value = data
|
||||||
|
if (actList.value.length && activityId.value == null) {
|
||||||
|
activityId.value = actList.value[0].id
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Toast.error(msg)
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
Toast.error(e.message)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 刷新
|
// 刷新
|
||||||
const handleRefresh = () => {
|
const handleRefresh = () => {
|
||||||
if (loading.value) {
|
if (loading.value) {
|
||||||
@@ -122,12 +153,13 @@ const handleRefresh = () => {
|
|||||||
};
|
};
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
if (option.id) {
|
if (option.id) {
|
||||||
activityId.value=option.id
|
activityId.value = Number(option.id)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 页面加载时获取数据
|
// 页面加载时获取数据
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
getRankData();
|
await listMineAct()
|
||||||
|
await getRankData()
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -441,7 +473,7 @@ onMounted(() => {
|
|||||||
.refresh-btn {
|
.refresh-btn {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 30rpx;
|
right: 30rpx;
|
||||||
bottom: 40rpx;
|
bottom: 140rpx;
|
||||||
width: 90rpx;
|
width: 90rpx;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<view class="menu-item" @click="navigateTo('/pages/activity/team/index')">
|
<view class="menu-item" @click="navigateTo('/pages/activity/team/index')">
|
||||||
<view class="menu-icon-wrapper yellow-bg">
|
<view class="menu-icon-wrapper yellow-bg">
|
||||||
<view class="menu-icon team-icon"></view>
|
<view class="menu-icon team-icon"></view>
|
||||||
<view class="badge">3</view>
|
<!-- <view class="badge">3</view>-->
|
||||||
</view>
|
</view>
|
||||||
<view class="menu-text">我的团队</view>
|
<view class="menu-text">我的团队</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
</t-swiper>
|
</t-swiper>
|
||||||
<t-empty
|
<t-empty
|
||||||
v-if="actList.length === 0"
|
v-if="actList.length === 0"
|
||||||
description="暂无精彩瞬间"
|
description="暂无近期活动"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
Reference in New Issue
Block a user