You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong_qianduan/pages/activity/presaleRule.vue

76 lines
1.4 KiB

10 months ago
<template>
<view class="presale">
<view class="p" v-html="content"></view>
10 months ago
</view>
</template>
<script>
import * as Api from '@/api/help'
10 months ago
export default {
data() {
return {
content: '',
type: 4
}
},
onLoad(op) {
9 months ago
let title = ''
if (op.type == 5) {
title = '预售规则'
}
if (op.type == 6) {
title = '排行榜规则'
}
if (op.type == 7) {
title = '优惠券规则'
}
10 months ago
uni.setNavigationBarTitle({
9 months ago
title: title
10 months ago
})
this.type = op.type
this.getCarouselList(op.type)
},
onShow() {},
methods: {
// 获取预售规则
getCarouselList(type) {
const app = this;
9 months ago
let rule=''
if (app.type == 5) {
rule = 'presale_rule'
}
if (app.type == 6) {
rule = 'rank_rule'
}
if (app.type == 7) {
rule = 'coupon_rule'
}
Api.getAgreement({
9 months ago
type: rule
10 months ago
})
.then(result => {
let content = result.data.detail.content;
9 months ago
if (content) {
content = content.replace(/style=""/g, '').replace(/<img src=/g,
'<img style="width: 100%; display:block" src=')
}
this.content = content
10 months ago
})
.finally(() => app.isLoading = false)
},
}
}
</script>
10 months ago
<style lang="scss" scoped>
10 months ago
.presale {
padding: 40rpx;
9 months ago
10 months ago
.p {
10 months ago
font-size: 26rpx;
line-height: 50rpx;
10 months ago
color: #212121;
}
10 months ago
}
</style>