108 lines
2.9 KiB
Vue
Raw Normal View History

2024-04-20 14:58:10 +08:00
<template>
2024-07-30 18:16:46 +08:00
<view style="background-color: #F1F2F8;letter-spacing: 1rpx;min-height: 100vh;">
2024-04-20 14:58:10 +08:00
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
2024-07-30 18:16:46 +08:00
<view style="width: 83%;font-weight: bold;">
<text>我的活动</text>
2024-04-20 14:58:10 +08:00
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
2024-07-30 18:16:46 +08:00
<view style="padding: 30rpx;">
2024-08-19 18:15:03 +08:00
<view v-for="(item,index) in list"
2024-07-30 18:16:46 +08:00
style="background-color: #FFF;border-radius: 20rpx;margin-bottom: 20rpx;">
<view style="padding: 20rpx">
<view>
<view @click="openUrl('/pages/packageB/event/event_info?id='+item.id)"
style="background-color: #FFF;border-radius: 20rpx;">
<view class="tn-flex tn-flex-row-between"
style="padding:20rpx 20rpx 10rpx 10rpx;position: relative;">
<view style="margin-left: 10rpx;">
2024-08-19 18:15:03 +08:00
<image :src="apiImgUrl+item.activity_image" mode="aspectFill"
2024-07-30 18:16:46 +08:00
style="width: 250rpx;height: 180rpx;border-radius: 20rpx;"></image>
</view>
<view style="margin-left: 20rpx;width: 54%;">
<view class="tn-text-ellipsis-2" style="font-size: 32rpx;font-weight: bold;">
2024-08-19 18:15:03 +08:00
{{item.activity_name}}
2024-07-30 18:16:46 +08:00
</view>
<view style="font-size: 24rpx;margin: 20rpx 0rpx;color: #888888;">
<text class="tn-icon-time"></text>
2024-08-19 18:15:03 +08:00
<text>{{item.activity_start_time}}-{{item.activity_end_time}}</text>
2024-07-30 18:16:46 +08:00
</view>
<view class="tn-text-ellipsis" style="font-size:26rpx;color: #888888;">
<text class="tn-icon-location" style="vertical-align: middle;"></text>
2024-08-19 18:15:03 +08:00
<text style="vertical-align: middle;">{{item.activity_location}}</text>
2024-07-30 18:16:46 +08:00
</view>
</view>
</view>
2024-04-20 14:58:10 +08:00
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
2024-05-08 18:14:41 +08:00
import {
UserApplication
} from "@/util/api";
import store from "@/store";
2024-04-20 14:58:10 +08:00
export default {
data() {
return {
2024-04-24 18:03:24 +08:00
topCurrent: 0,
2024-05-08 18:14:41 +08:00
list: [],
apiImgUrl: this.$store.state.imgUrl,
2024-04-20 14:58:10 +08:00
}
},
2024-05-08 18:14:41 +08:00
onLoad() {
var uid = uni.getStorageSync('uid');
this.uid = uid;
this.getUserApplication();
},
2024-04-20 14:58:10 +08:00
methods: {
2024-05-08 18:14:41 +08:00
getUserApplication() {
UserApplication({
2024-05-15 17:54:48 +08:00
member_id: this.uid
2024-05-08 18:14:41 +08:00
})
.then(res => {
console.log(res);
if (res.code == 1) {
this.list = res.data;
}
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
2024-04-20 14:58:10 +08:00
openUrl(e) {
uni.navigateTo({
url: e
})
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
} else {
uni.redirectTo({
url: '/pages/index/index'
})
}
}
}
}
</script>
<style>
2024-05-21 18:16:48 +08:00
</style>