28067
This commit is contained in:
@@ -44,16 +44,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-tips">
|
||||
<u-tabs
|
||||
:list="tabs"
|
||||
font-size="32"
|
||||
bg-color="transparent"
|
||||
inactive-color="#999999"
|
||||
:active-item-style="tabActive"
|
||||
:is-scroll="true"
|
||||
:current="currIndex"
|
||||
@change="i => currIndex = i">
|
||||
</u-tabs>
|
||||
<u-tabs :list="tabs" font-size="32" bg-color="transparent" inactive-color="#999999" :active-item-style="tabActive" :is-scroll="true" :current="currIndex" @change="(i) => (currIndex = i)"> </u-tabs>
|
||||
<div class="tab-content">
|
||||
<div class="rich-content" v-show="currIndex === 0">
|
||||
<u-parse :html="info.content"></u-parse>
|
||||
@@ -66,7 +57,7 @@
|
||||
</div>
|
||||
<p>{{ item.content }}</p>
|
||||
<div class="images" v-if="item.images.length">
|
||||
<image v-for="(img, i) in item.images" @click="preview(img.url, item.images)" :key="i" class="banner" :src="img.url" />
|
||||
<image v-for="(img, i) in item.images" @click="preview(img.url, item.images)" :key="i" class="banner" :src="img.url" v-if="i < 3" />
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length"></AiEmpty>
|
||||
@@ -88,30 +79,33 @@
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
appName:"活动详情",
|
||||
appName: '活动详情',
|
||||
data() {
|
||||
return {
|
||||
currIndex: 0,
|
||||
tabActive: {
|
||||
color: '#333333',
|
||||
fontSize: '16px'
|
||||
fontSize: '16px',
|
||||
},
|
||||
pageShow: false,
|
||||
id: '',
|
||||
current: 1,
|
||||
list: [],
|
||||
isMore: false,
|
||||
info: ''
|
||||
info: '',
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
tabs() {
|
||||
return [{
|
||||
name: '活动须知'
|
||||
}, {
|
||||
name: '活动动态'
|
||||
}]
|
||||
return [
|
||||
{
|
||||
name: '活动须知',
|
||||
},
|
||||
{
|
||||
name: '活动动态',
|
||||
},
|
||||
]
|
||||
},
|
||||
...mapState(['user', 'token']),
|
||||
|
||||
@@ -125,8 +119,8 @@
|
||||
return false
|
||||
}
|
||||
|
||||
return !(this.info.status === '2' && time > 24);
|
||||
}
|
||||
return !(this.info.status === '2' && time > 24)
|
||||
},
|
||||
},
|
||||
|
||||
onLoad(query) {
|
||||
@@ -145,7 +139,9 @@
|
||||
|
||||
methods: {
|
||||
getInfo(id) {
|
||||
this.$instance.post(`/app/appvillageactivityinfo/queryDetailById?id=${id}`).then(res => {
|
||||
this.$instance
|
||||
.post(`/app/appvillageactivityinfo/queryDetailById?id=${id}`)
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
this.info.url = res.data.url ? JSON.parse(res.data.url)[0].url : ''
|
||||
@@ -156,7 +152,8 @@
|
||||
}
|
||||
|
||||
this.$hideLoading()
|
||||
}).catch(() => {
|
||||
})
|
||||
.catch(() => {
|
||||
this.$hideLoading()
|
||||
})
|
||||
},
|
||||
@@ -203,12 +200,14 @@
|
||||
}
|
||||
|
||||
this.$loading()
|
||||
this.$instance.post('/app/appvillageactivityuser/report', {
|
||||
this.$instance
|
||||
.post('/app/appvillageactivityuser/report', {
|
||||
activityId: this.id,
|
||||
userId: this.$store.state.user.id,
|
||||
name: this.$store.state.user.nickName,
|
||||
phone: this.$store.state.user.phone
|
||||
}).then(res => {
|
||||
phone: this.$store.state.user.phone,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast('报名成功')
|
||||
this.getInfo(this.id)
|
||||
@@ -220,33 +219,35 @@
|
||||
|
||||
preview(url, imgs) {
|
||||
uni.previewImage({
|
||||
urls: imgs.map(v => v.url),
|
||||
current: url
|
||||
urls: imgs.map((v) => v.url),
|
||||
current: url,
|
||||
})
|
||||
},
|
||||
|
||||
getList(id) {
|
||||
if (this.isMore) return
|
||||
|
||||
this.$instance.post(`/app/appvillageactivitypost/list?activityId=${id}`, null, {
|
||||
this.$instance
|
||||
.post(`/app/appvillageactivitypost/list?activityId=${id}`, null, {
|
||||
params: {
|
||||
current: this.current,
|
||||
size: 10
|
||||
}
|
||||
}).then(res => {
|
||||
size: 10,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
if (this.current > 1) {
|
||||
this.list = [...this.list, ...res.data.records].map(v => {
|
||||
this.list = [...this.list, ...res.data.records].map((v) => {
|
||||
return {
|
||||
...v,
|
||||
images: v.images ? JSON.parse(v.images) : []
|
||||
images: v.images ? JSON.parse(v.images) : [],
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.list = res.data.records.map(v => {
|
||||
this.list = res.data.records.map((v) => {
|
||||
return {
|
||||
...v,
|
||||
images: v.images ? JSON.parse(v.images) : []
|
||||
images: v.images ? JSON.parse(v.images) : [],
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -264,14 +265,14 @@
|
||||
|
||||
call(phone) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phone
|
||||
phoneNumber: phone,
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -331,7 +332,7 @@
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 34px 0;
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
border-bottom: 1px solid #dddddd;
|
||||
|
||||
label {
|
||||
color: #999999;
|
||||
@@ -351,7 +352,7 @@
|
||||
|
||||
&.detail-info__item--phone {
|
||||
span {
|
||||
color: #4181FF;
|
||||
color: #4181ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -370,16 +371,16 @@
|
||||
line-height: 44px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
background: #42D784;
|
||||
background: #42d784;
|
||||
border-radius: 8px;
|
||||
font-size: 26px;
|
||||
|
||||
&.status1 {
|
||||
background: #1AAAFF;
|
||||
background: #1aaaff;
|
||||
}
|
||||
|
||||
&.status2 {
|
||||
background: #E4E4E4;
|
||||
background: #e4e4e4;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -394,7 +395,7 @@
|
||||
|
||||
i {
|
||||
font-style: normal;
|
||||
color: #4181FF;
|
||||
color: #4181ff;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
@@ -439,6 +440,9 @@
|
||||
margin: 0 4px 4px 0;
|
||||
border-radius: 16px;
|
||||
}
|
||||
image:nth-child(3n + 0) {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.dynamic-item__top {
|
||||
|
||||
Reference in New Issue
Block a user