web-africa-h5/pages/market/activity-zone/detail.vue

59 lines
1.0 KiB
Vue
Raw Normal View History

2025-03-21 14:49:01 +08:00
<template>
<view>
<view class="img-box">
<image :src="detail.actCover" mode="widthFix"></image>
</view>
<view class="content-box">
<view class="d-c-c f36 mb40">{{detail.actName}}</view>
<view class="" v-html="detail.actExplain"></view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
pkId: '',
detail:{
actCover:'',
actExplain:'',
actName:""
}
}
},
onLoad(e) {
this.pkId = e.pkId;
this.getData();
},
methods: {
getData() {
let self = this;
self._post('activity/api/base/activity-detail', {
pkId: self.pkId
}, res => {
self.detail = res.rows[0] || {};
self.detail.actExplain= self.detail.actExplain.replace(/<img/g, '<img style="max-width:100%;height:auto"');
})
}
}
}
</script>
<style lang="scss">
page{
background-color: #A60C02;
}
.img-box{
padding: 28rpx 22rpx 60rpx 22rpx;
image{
width: 100%;
border-radius: 20rpx;
}
}
.content-box{
padding: 0 40rpx 60rpx 38rpx;
color: #FBF0CF;
font-size: 24rpx;
}
</style>