123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <template>
- <view class="content">
- <rich-text :nodes="couContent" ></rich-text>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- couContent: '',
- }
- },
- onLoad(opt) {
- this.getDetailData();
-
- },
- methods: {
- getDetailData() {
- uni.showLoading({
- title: '加载中'
- })
- let url = 'worldKeepCar/worldDistribution/queryDistributionIndexDetail',
- params = {
-
- }
- this.$http(url, params, 'GET').then(res => {
- uni.hideLoading();
- var data = res.data
-
-
- // 处理 undefined和null转为空白字符串
-
- for (const key in data) {
- data[key] = this.$praseStrEmpty(data[key])
- }
-
- this.detailData = data
- if (this.detailData.tSSetting.activityRules) {
- this.couContent = this.detailData.tSSetting.activityRules.replace(/\<p/gi, '<p style="display: inline-block"');
- }
-
-
-
- })
- },
- }
- }
- </script>
- <style scoped>
- .content {
- background: #FFFFFF;
- min-height: 100vh;
- padding: 30rpx 24rpx;
-
- }
-
-
- </style>
|