14 changed files with 1069 additions and 233 deletions
@ -0,0 +1,45 @@ |
|||
import { request } from '@/utils/http' |
|||
|
|||
//标签列表
|
|||
export function memberTagList() { |
|||
return request.http({ |
|||
url: '/api/huiqitong/member_tag_list', |
|||
method: 'GET' |
|||
}) |
|||
} |
|||
|
|||
//会员列表
|
|||
export function memberCenter(data:any) { |
|||
return request.http({ |
|||
url: '/api/huiqitong/member_center', |
|||
method: 'GET', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
//会员详情
|
|||
export function memberCenterInfo(id: string) { |
|||
return request.http({ |
|||
url: '/api/huiqitong/member_center_info/'+id, |
|||
method: 'GET' |
|||
}) |
|||
} |
|||
|
|||
//入会申请
|
|||
export function memberApply(data:any) { |
|||
return request.http({ |
|||
url: '/api/huiqitong/member_apply', |
|||
method: 'POST', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
//我的入会申请
|
|||
export function myMemberApply() { |
|||
return request.http({ |
|||
url: '/api/huiqitong/my_member_apply', |
|||
method: 'POST', |
|||
}) |
|||
} |
|||
|
|||
|
|||
@ -0,0 +1,158 @@ |
|||
<template> |
|||
<image style="width: 100%;height: 352rpx;" :src="baseurl + detaildata.index_pic" mode=""></image> |
|||
<view class="container"> |
|||
<text class="headtxt">{{detaildata.title}}</text> |
|||
<text class="address">活动地点:{{detaildata.address}}</text> |
|||
<view class="adressnum"> |
|||
<text class="time">活动时间:{{detaildata.activity_time}}</text> |
|||
<view class="ydl"> |
|||
<text class="time">阅读量:</text> |
|||
<text class="value"> |
|||
{{detaildata.count}} |
|||
</text> |
|||
</view> |
|||
</view> |
|||
<view class="titlepart"> |
|||
<view class="icon"></view> |
|||
<text class="title">活动详情</text> |
|||
</view> |
|||
<u-parse :content="detaildata.content"></u-parse> |
|||
<text class="certetime">{{detaildata.create_time}}</text> |
|||
</view> |
|||
</template> |
|||
|
|||
<script setup> |
|||
import { |
|||
onLoad |
|||
} from '@dcloudio/uni-app'; |
|||
import { |
|||
ref |
|||
} from 'vue'; |
|||
import { |
|||
activityInfo |
|||
} from '@/api/index' |
|||
|
|||
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/') |
|||
const detaildata = ref({}) |
|||
|
|||
onLoad(async (param) => { |
|||
await activityInfo(param.id).then((res) => { |
|||
if (res.code === 1) { |
|||
detaildata.value = res.data |
|||
} |
|||
}) |
|||
}) |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
.container { |
|||
background-color: #FFFFFF; |
|||
height: calc(100vh - 352rpx); |
|||
width: 100%; |
|||
padding: 40rpx 40rpx 0 40rpx; |
|||
box-sizing: border-box; |
|||
overflow-y: auto; |
|||
|
|||
.titlepart { |
|||
margin-top: 40rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
margin-bottom: 30rpx; |
|||
|
|||
.icon { |
|||
width: 12rpx; |
|||
height: 32rpx; |
|||
border-radius: 0rpx 32rpx 32rpx 0rpx; |
|||
/* 蓝色渐变 */ |
|||
background: linear-gradient(0deg, #007FFF 0%, #99CCFF 100%); |
|||
} |
|||
|
|||
.title { |
|||
margin-left: 18rpx; |
|||
font-family: Source Han Sans; |
|||
font-size: 30rpx; |
|||
font-weight: 350; |
|||
line-height: 32rpx; |
|||
text-align: justify; |
|||
/* 浏览器可能不支持 */ |
|||
display: flex; |
|||
align-items: center; |
|||
letter-spacing: normal; |
|||
color: #0072FF; |
|||
} |
|||
} |
|||
|
|||
.headtxt { |
|||
font-family: Source Han Sans; |
|||
font-size: 36rpx; |
|||
font-weight: normal; |
|||
line-height: 48rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
letter-spacing: normal; |
|||
color: #0C092A; |
|||
} |
|||
|
|||
.address { |
|||
margin-top: 28rpx; |
|||
font-family: Source Han Sans; |
|||
font-size: 28rpx; |
|||
font-weight: 350; |
|||
line-height: 48rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
letter-spacing: normal; |
|||
color: #858494; |
|||
} |
|||
|
|||
.adressnum { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
|
|||
.time { |
|||
font-family: Source Han Sans; |
|||
font-size: 28rpx; |
|||
font-weight: 350; |
|||
line-height: 48rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
letter-spacing: normal; |
|||
color: #858494; |
|||
} |
|||
.ydl { |
|||
display: flex; |
|||
align-items: center; |
|||
.time { |
|||
font-family: Source Han Sans; |
|||
font-size: 28rpx; |
|||
font-weight: 350; |
|||
line-height: 48rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
letter-spacing: normal; |
|||
color: #858494; |
|||
} |
|||
.value { |
|||
font-family: Source Han Sans; |
|||
font-size: 28rpx; |
|||
font-weight: 350; |
|||
line-height: 48rpx; |
|||
text-align: right; |
|||
display: flex; |
|||
align-items: center; |
|||
letter-spacing: normal; |
|||
color: #007FFF |
|||
} |
|||
} |
|||
} |
|||
.certetime { |
|||
font-family: Roboto; |
|||
font-size: 28rpx; |
|||
font-weight: normal; |
|||
line-height: 80rpx; |
|||
letter-spacing: normal; |
|||
color: #A1A1A1; |
|||
} |
|||
} |
|||
</style> |
|||
@ -0,0 +1,182 @@ |
|||
<template> |
|||
<view class="container"> |
|||
<u-search @search="search" @clickIcon="clickIcon" @clear="clear" shape="square" placeholder="请输入搜索内容" |
|||
placeholderColor="#2a98ff" v-model="keyword" searchIcon="/static/img/search.png" searchIconSize="14" |
|||
:showAction="false" height="40" margin="40rpx 24rpx 24rpx 24rpx" bgColor="#FFFFFF"></u-search> |
|||
|
|||
<scroll-view scroll-y="auto" class="main" @scrolltolower="onloadmore"> |
|||
<view class="ztone" v-for="(item,index) in ztList" :key="index" @click="godetail(item.id)"> |
|||
<image style="width: 150rpx;height: 150rpx;border-radius: 8rpx;flex: 1;" :src="baseurl+item.index_pic" mode=""> |
|||
</image> |
|||
<view class="rightpart"> |
|||
<view class="splace"> |
|||
{{item.title}} |
|||
</view> |
|||
<view class="titlepart"> |
|||
<text class="title">{{item.activity_time}}</text> |
|||
<image style="width: 32rpx;height: 44rpx;" src="@/static/img/Icon.png" mode="aspectFill"> |
|||
</image> |
|||
</view> |
|||
<view class="ms"> |
|||
{{item.address}} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</scroll-view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script setup> |
|||
import { |
|||
ref |
|||
} from 'vue'; |
|||
import { activityList } from '@/api/index' |
|||
import { onShow } from '@dcloudio/uni-app'; |
|||
|
|||
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/') |
|||
|
|||
|
|||
// 响应式数据 |
|||
const keyword = ref(''); |
|||
const page = ref(1) |
|||
const pagesize = ref(7) |
|||
|
|||
const search = async (val) => { |
|||
page.value = 1 |
|||
pagesize.value = 7 |
|||
await getActivityList(keyword.value, page.value, pagesize.value) |
|||
} |
|||
|
|||
const clickIcon = async () => { |
|||
page.value = 1 |
|||
pagesize.value = 7 |
|||
await getActivityList(keyword.value, page.value, pagesize.value) |
|||
} |
|||
|
|||
const clear = async () => { |
|||
page.value = 1 |
|||
pagesize.value = 7 |
|||
await getActivityList(keyword.value, page.value, pagesize.value) |
|||
} |
|||
|
|||
const ztList = ref([]) |
|||
|
|||
const onloadmore = async () => { |
|||
page.value++ |
|||
let params = { |
|||
'title': keyword.value, |
|||
'page': page.value, |
|||
'limit': pagesize.value |
|||
} |
|||
await activityList(params).then((res) => { |
|||
ztList.value = [...ztList.value, ...res.data.data] |
|||
}) |
|||
} |
|||
|
|||
const godetail = (id) => { |
|||
uni.navigateTo({ |
|||
url: '/pages/index/active/activeDetail?id=' + id |
|||
}) |
|||
} |
|||
|
|||
const getActivityList = async (name, page, limit) => { |
|||
let params = { |
|||
'title': name, |
|||
'page': page, |
|||
'limit': limit |
|||
} |
|||
await activityList(params).then((res) => { |
|||
ztList.value = res.data.data |
|||
}) |
|||
} |
|||
|
|||
onShow(async() => { |
|||
await getActivityList('',1,7) |
|||
}) |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
.container { |
|||
background: linear-gradient(0deg, #F1F3F9 72%, rgba(129, 179, 222, 0.5) 88%); |
|||
height: 100vh; |
|||
width: 100%; |
|||
overflow-y: hidden; |
|||
|
|||
.main { |
|||
margin-top: 10rpx; |
|||
width: 100%; |
|||
height: 100%; |
|||
padding: 0 24rpx; |
|||
box-sizing: border-box; |
|||
|
|||
.ztone { |
|||
display: flex; |
|||
align-items: center; |
|||
width: 100%; |
|||
margin-top: 20rpx; |
|||
padding: 10rpx; |
|||
border-radius: 8rpx; |
|||
background: #FFFFFF; |
|||
box-sizing: border-box; |
|||
border: 2rpx solid rgba(0, 127, 255, 0.12); |
|||
|
|||
.rightpart { |
|||
width: 100%; |
|||
margin-left: 20rpx; |
|||
flex: 3; |
|||
display: grid; |
|||
|
|||
.titlepart { |
|||
width: 100%; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
|
|||
.title { |
|||
font-family: Source Han Sans; |
|||
font-size: 20rpx; |
|||
font-weight: 300; |
|||
line-height: normal; |
|||
display: flex; |
|||
align-items: flex-end; |
|||
letter-spacing: normal; |
|||
color: #666666; |
|||
margin-top: 20rpx; |
|||
} |
|||
} |
|||
|
|||
.splace { |
|||
font-family: Source Han Sans; |
|||
font-size: 28rpx; |
|||
font-weight: 500; |
|||
display: flex; |
|||
align-items: center; |
|||
letter-spacing: normal; |
|||
color: #0C092A; |
|||
} |
|||
|
|||
.ms { |
|||
margin-top: 8rpx; |
|||
font-family: Source Han Sans; |
|||
font-size: 20rpx; |
|||
font-weight: 300; |
|||
line-height: normal; |
|||
display: flex; |
|||
align-items: flex-end; |
|||
letter-spacing: normal; |
|||
color: #666666; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.hdzq { |
|||
width: 182rpx; |
|||
height: 80rpx; |
|||
position: fixed; |
|||
right: 0; |
|||
top: 70%; |
|||
margin-right: -14rpx; |
|||
} |
|||
</style> |
|||
Loading…
Reference in new issue