Merge remote-tracking branch 'origin/main'

main
Connor 2024-06-05 20:03:58 +08:00
commit 5907aebbce
4 changed files with 158 additions and 101 deletions

View File

@ -12,7 +12,7 @@ export function listInfo(query) {
// 查询活动详情详细 // 查询活动详情详细
export function getInfo(id) { export function getInfo(id) {
return request({ return request({
url: '/activityInfo/info/' + id, url: '/activityInfo/info/app/' + id,
method: 'get' method: 'get'
}) })
} }

View File

@ -4,6 +4,7 @@ import store from './store' // store
import { install } from './plugins' // plugins import { install } from './plugins' // plugins
import './permission.js' // permission import './permission.js' // permission
import iconConfig from './utils/icon/icon.js' import iconConfig from './utils/icon/icon.js'
// main.js // main.js
import uviewPlus from 'uview-plus' import uviewPlus from 'uview-plus'
import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi' import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi'

View File

@ -40,7 +40,7 @@
</view> </view>
</view> </view>
<!-- 列表信息 --> <!-- 列表信息 -->
<view > <view>
<ActiInfoList v-model="actiInfoList" @scrolltolower="scrolltolower"></ActiInfoList> <ActiInfoList v-model="actiInfoList" @scrolltolower="scrolltolower"></ActiInfoList>
</view> </view>
@ -52,7 +52,7 @@ import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/activityI
import ActiInfoList from '../common/activityList/index.vue' import ActiInfoList from '../common/activityList/index.vue'
import { onShow, onLoad } from '@dcloudio/uni-app' import { onShow, onLoad } from '@dcloudio/uni-app'
import { getDicts } from "@/api/system/dict/data" import { getDicts } from "@/api/system/dict/data"
import { ref, reactive, getCurrentInstance,toRefs } from 'vue' import { ref, reactive, getCurrentInstance, toRefs } from 'vue'
import { useStore } from 'vuex'; import { useStore } from 'vuex';
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const iconConfig = proxy.iconConfig; const iconConfig = proxy.iconConfig;
@ -157,8 +157,10 @@ function getList() {
queryParams.value.params = {}; queryParams.value.params = {};
listInfo(queryParams.value).then(response => { listInfo(queryParams.value).then(response => {
console.log(response);
actiInfoList.value = response.rows; actiInfoList.value = response.rows;
response.rows.forEach(item => {
actiInfoList.value.push(item)
})
total.value = response.total; total.value = response.total;
}); });
} }
@ -170,15 +172,31 @@ onShow(() => {
console.log('Page onShow') console.log('Page onShow')
}) })
const scrolltolower = () => { // dataisLoading
console.log("scrolltolower"); const isLoading = ref(false);
actiInfoList.value.push({
title: '怎么评论爱德华·艾尔加这位音乐家及其他的作品,欢迎大家发表自己的看法?', const scrolltolower = async () => {
startTime: '2023-05-01 15:00', //
endTime: '2023-05-01 16:00', if (queryParams.value.pageNum * queryParams.value.pageSize < total.value) {
state: '2', //
addrs: '天津电子信息职业技术学院操场东面' if (isLoading.value) return;
}) isLoading.value = true;
queryParams.value.pageNum += 1;
try {
const response = await listInfo(queryParams.value);
// 使Array.prototype.push.applyactiInfoList
Array.prototype.push.apply(actiInfoList.value, response.rows);
console.log(actiInfoList.value);
} catch (error) {
console.error("加载更多数据时发生错误:", error);
} finally {
isLoading.value = false;
}
} else {
//
console.log("没有更多数据了");
}
}; };
@ -190,10 +208,7 @@ function toESearch() {
</script> </script>
<style lang="scss"> <style lang="scss">
.fixed-header { .fixed-header {}
}
.leftinfo { .leftinfo {

View File

@ -33,12 +33,14 @@
</view> </view>
</view> </view>
<view class="infox"> <view class="infox">
<view class="infoavatar"><up-avatar size="60rpx" :src="QNDomain + actiInfoList.launchAvatarsurl"></up-avatar> <view class="infoavatar">
<up-avatar size="60rpx" :src="QNDomain+actiInfoList.avatarInfo"/>
<view style="margin-left: 24rpx;">
<view class="launchName">{{ actiInfoList.nickName }}</view>
<view class="launchAddres">{{ actiInfoList.infoSchool }}</view>
</view> </view>
<view>
<view class="launchName">{{ actiInfoList.launchName }}</view>
<view class="launchAddres">{{ actiInfoList.launchAddres }}</view>
</view> </view>
<view class="elroll">已报名{{ actiInfoList.elroll }}</view> <view class="elroll">已报名{{ actiInfoList.elroll }}</view>
</view> </view>
<view class="infox2"> <view class="infox2">
@ -49,6 +51,7 @@
</template> </template>
<script setup> <script setup>
import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/activityInfo/info"; import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/activityInfo/info";
import { getDicts } from "@/api/system/dict/data"
import { onShow, onLoad } from '@dcloudio/uni-app' import { onShow, onLoad } from '@dcloudio/uni-app'
import { ref, reactive, getCurrentInstance,toRefs } from 'vue' import { ref, reactive, getCurrentInstance,toRefs } from 'vue'
import { useStore } from 'vuex'; import { useStore } from 'vuex';
@ -64,6 +67,7 @@ const style = ref({
}) })
const activityState = ref([])//
const open = ref(false) const open = ref(false)
const title = ref('确认签到'); const title = ref('确认签到');
const content = ref('请您确认活动签到,祝您玩的愉快!'); const content = ref('请您确认活动签到,祝您玩的愉快!');
@ -74,12 +78,20 @@ const bgColor = ref('');
const store = useStore() const store = useStore()
const QNDomain = store.state.user.QNDomain const QNDomain = store.state.user.QNDomain
const actiInfoList = ref({}); const actiInfoList = ref({});
function getAvatar (){
console.log("头像:",QNDomain + actiInfoList.value.avatarInfo)
return QNDomain + actiInfoList.value.avatarInfo
}
onLoad((options) => { onLoad((options) => {
const _id = options.id const _id = options.id
getInfo(_id).then(response => { getInfo(_id).then(response => {
actiInfoList.value = response.data; actiInfoList.value = response.data;
console.log("actiInfoList:",actiInfoList.value); console.log("actiInfoList:",actiInfoList.value);
}); });
getDicts('activity_state').then(e => {
activityState.value = e.data
})
}) })
const leftClick = () => { const leftClick = () => {
proxy.$tab.navigateBack(1) proxy.$tab.navigateBack(1)
@ -101,7 +113,6 @@ const btnClick = () => {
} }
const toimage = (url) => { const toimage = (url) => {
console.log(QNDomain);
if (typeof url === 'string') { if (typeof url === 'string') {
let info = url.split(","); let info = url.split(",");
// 使mapdomainName // 使mapdomainName
@ -125,7 +136,10 @@ function cancel() {
open.value = !open.value open.value = !open.value
} }
const getDictLabelByValue = (state) => {
const dict = activityState.value.find((dict) => dict.dictValue === state);
return dict ? dict : '未知状态';
};
</script> </script>
<style lang="scss"> <style lang="scss">
.navbarcenter { .navbarcenter {
@ -195,6 +209,30 @@ function cancel() {
height: 80rpx; height: 80rpx;
margin: 0 auto; margin: 0 auto;
.btnText {
font-weight: 400;
width: 120rpx;
font-size: 30rpx;
color: #00CCBE !important;
}
}
.state2 {
width: 686rpx;
height: 80rpx;
margin: 0 auto;
.btnText {
font-weight: 400;
width: 120rpx;
font-size: 30rpx;
color: #00CCBE !important;
}
}
.state3 {
width: 686rpx;
height: 80rpx;
margin: 0 auto;
.btnText { .btnText {
font-weight: 400; font-weight: 400;
width: 120rpx; width: 120rpx;
@ -225,6 +263,9 @@ function cancel() {
background-color: white; background-color: white;
/* 背景色设置为白色,防止透明背景导致内容重叠可见 */ /* 背景色设置为白色,防止透明背景导致内容重叠可见 */
z-index: 10; z-index: 10;
.infoavatar{
display: flex;
}
} }
.infox2 { .infox2 {