12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <template>
- <view class="content" v-if="detail">
- <!-- <view class="titles">{{detail.bannerName}}</view> -->
- <view class="acitve-content">
- <u-parse :html="content" :tag-style="style"></u-parse>
- </view>
- </view>
- </template>
- <script>
- import { shopBannerDetail } from '@/api/video.js'
- export default {
- data() {
- return {
- detail: null,
- style: {
- p: 'margin-bottom:10px;'
- },
- bannerSn: null
- }
- },
- computed: {
- content() {
- return this.detail && this.detail.content
- }
- },
- onLoad(opts) {
- this.bannerSn = opts.sn
- this.getDetail()
- },
- methods: {
- getDetail(){
- uni.showLoading({
- title: "正在加载..."
- })
- shopBannerDetail({bannerSn:this.bannerSn}).then(res => {
- this.detail = res.data
- uni.setNavigationBarTitle({
- title: res.data.bannerName || '活动内容'
- })
- uni.hideLoading()
- })
- }
- }
- }
- </script>
- <style lang="less">
- .content{
- padding: 30rpx;
- .titles{
- text-align: center;
- padding: 20rpx 0;
- border-bottom: 1px solid #eee;
- font-weight: bold;
- }
- .acitve-content{
- padding: 20rpx 0;
- }
- }
- </style>
|