| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <template>
- <view>
- <view class="box">
- <p class="title">{{ list.title }}</p>
- <u-parse :content="content" :lazy-load="true" :show-with-animation="true"></u-parse>
- <!-- <div v-html="content"></div> -->
- </view>
- </view>
- </template>
- <script>
- import actApi from '@/api/home/index.js';
- export default {
- data() {
- return {
- primary:this.$theme.primary,
- list: '',
- content: '',
- settingFile:getApp().globalData.siteinfo
- };
- },
- onLoad(option) {
- actApi.Campaign({ id: option.id }).then(res => {
-
- if (res.status == 200) {
- this.list = res.data.artical;
- // this.content =res.data.artical.content
- this.content = res.data.artical.content.replace(/\<img src="/gi, `<img style='width:100%;display:block' src="${this.settingFile.root_rich_img}`);
- }
- });
- }
- };
- </script>
- <style lang="scss">
- page {
- background: #ffffff;
- padding-bottom: 140rpx;
- }
- .box {
- width: 100%;
- background-color: #ffffff;
- padding: 20rpx;
- box-sizing: border-box;
- .title {
- padding: 0 10rpx;
- height: 70rpx;
- line-height: 40rpx;
- font-size: 32rpx;
- text-align: center;
- font-weight: 700;
- }
- }
- </style>
|