2023-11-30 10:56:05 +08:00
|
|
|
<template>
|
|
|
|
<view class="content">
|
|
|
|
<view class="container">
|
|
|
|
<view class="my-header">
|
|
|
|
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
|
2023-12-05 11:16:58 +08:00
|
|
|
<view class="my-text">{{title||"详情页"}}</view>
|
2023-11-30 10:56:05 +08:00
|
|
|
<view class="my-icons"></view>
|
|
|
|
</view>
|
|
|
|
<!-- 顶部区域 -->
|
2023-12-05 11:16:58 +08:00
|
|
|
<view style="text-align: center;">
|
|
|
|
<image src="../../static/imgs/xfyl.png" v-if="title == '消费有礼活动'"></image>
|
|
|
|
<image src="../../static/imgs/zkyx.png" v-if="title == '折扣营销活动'"></image>
|
|
|
|
<image src="../../static/imgs/mjyh.png" v-if="title == '满减营销活动'"></image>
|
|
|
|
<image src="../../static/imgs/xryl.png" v-if="title == '新人有礼活动'"></image>
|
|
|
|
<image src="../../static/imgs/yqyl.png" v-if="title == '推荐有礼活动'"></image>
|
|
|
|
</view>
|
|
|
|
<view class="center-box">
|
|
|
|
<view class="title-box">活动明细</view>
|
|
|
|
<view class="g-box" v-for="(item,index) in datas" :key="index" v-if="title == '消费有礼活动'">
|
|
|
|
<text>{{item.activeDescribe || ""}}</text>
|
|
|
|
</view>
|
|
|
|
<view class="g-box" v-for="(item,index) in datas" :key="index" v-if="title == '折扣营销活动'">
|
|
|
|
<text>{{item.discountActiveDescribe || ""}}</text>
|
|
|
|
</view>
|
|
|
|
<view class="g-box" v-for="(item,index) in datas" :key="index" v-if="title == '满减营销活动'">
|
|
|
|
<text>{{item.fullminusActiveDescribe || ""}}</text>
|
|
|
|
</view>
|
|
|
|
<view class="g-box" v-if="title == '新人有礼活动'">
|
|
|
|
<text>{{datas.newlywedsActiveDescribe || ""}}</text>
|
|
|
|
</view>
|
|
|
|
<view class="g-box" v-if="title == '推荐有礼活动'">
|
|
|
|
<text>{{datas.recommendActiveDescribeIn || ""}}</text>
|
|
|
|
<text>{{datas.recommendActiveDescribeOut || ""}}</text>
|
|
|
|
</view>
|
2023-11-30 10:56:05 +08:00
|
|
|
</view>
|
2023-12-05 11:16:58 +08:00
|
|
|
|
2023-11-30 10:56:05 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import request from '../../utils/request'
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
title: '',
|
|
|
|
datas: [],
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
|
|
|
|
},
|
2023-12-05 11:16:58 +08:00
|
|
|
onLoad(option) {
|
|
|
|
this.title = option.name
|
|
|
|
|
|
|
|
this.getData(option.name);
|
2023-11-30 10:56:05 +08:00
|
|
|
},
|
|
|
|
methods: {
|
2023-12-05 11:16:58 +08:00
|
|
|
getData(name) {
|
2023-12-05 11:21:21 +08:00
|
|
|
uni.showLoading({
|
2023-12-06 18:00:48 +08:00
|
|
|
//title: '加载中'
|
2023-12-05 11:21:21 +08:00
|
|
|
});
|
2023-12-05 11:16:58 +08:00
|
|
|
if (name == '消费有礼活动') {
|
|
|
|
request({
|
|
|
|
url: '/business/marketingActivity/activeConsumption/appletList',
|
|
|
|
method: 'get',
|
|
|
|
}).then(res => {
|
2023-12-05 11:21:21 +08:00
|
|
|
if (res.code == 200) {
|
|
|
|
this.datas = res.data
|
|
|
|
uni.hideLoading();
|
|
|
|
}
|
|
|
|
|
2023-12-05 11:16:58 +08:00
|
|
|
})
|
|
|
|
}
|
|
|
|
if (name == '折扣营销活动') {
|
|
|
|
request({
|
|
|
|
url: '/business/marketingActivity/activeDiscount/appletList',
|
|
|
|
method: 'get',
|
|
|
|
}).then(res => {
|
2023-12-05 11:21:21 +08:00
|
|
|
if (res.code == 200) {
|
|
|
|
this.datas = res.data
|
|
|
|
uni.hideLoading();
|
|
|
|
}
|
2023-12-05 11:16:58 +08:00
|
|
|
})
|
|
|
|
}
|
|
|
|
if (name == '推荐有礼活动') {
|
|
|
|
request({
|
|
|
|
url: '/business/marketingActivity/activeRecommend/applet',
|
|
|
|
method: 'get',
|
|
|
|
}).then(res => {
|
2023-12-05 11:21:21 +08:00
|
|
|
if (res.code == 200) {
|
|
|
|
this.datas = res.data
|
|
|
|
uni.hideLoading();
|
|
|
|
}
|
2023-12-05 11:16:58 +08:00
|
|
|
})
|
|
|
|
}
|
|
|
|
if (name == '新人有礼活动') {
|
|
|
|
request({
|
|
|
|
url: '/business/marketingActivity/activeNewlyweds/applet',
|
|
|
|
method: 'get',
|
|
|
|
}).then(res => {
|
2023-12-05 11:21:21 +08:00
|
|
|
if (res.code == 200) {
|
|
|
|
this.datas = res.data
|
|
|
|
uni.hideLoading();
|
|
|
|
}
|
2023-12-05 11:16:58 +08:00
|
|
|
})
|
|
|
|
}
|
|
|
|
if (name == '满减营销活动') {
|
|
|
|
request({
|
|
|
|
url: '/business/marketingActivity/activeFullminus/appletList',
|
|
|
|
method: 'get',
|
|
|
|
}).then(res => {
|
2023-12-05 11:21:21 +08:00
|
|
|
if (res.code == 200) {
|
|
|
|
this.datas = res.data
|
|
|
|
uni.hideLoading();
|
|
|
|
}
|
2023-12-05 11:16:58 +08:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-11-30 10:56:05 +08:00
|
|
|
},
|
|
|
|
goback() {
|
|
|
|
uni.navigateBack()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.content {
|
2023-12-05 11:16:58 +08:00
|
|
|
background: #ffffff;
|
|
|
|
height: 100vh;
|
|
|
|
}
|
|
|
|
|
|
|
|
image {
|
|
|
|
|
|
|
|
width: 95%;
|
|
|
|
height: 160px;
|
|
|
|
border-radius: 8px;
|
|
|
|
|
2023-11-30 10:56:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.container {
|
|
|
|
width: 100%;
|
2023-12-05 11:16:58 +08:00
|
|
|
|
|
|
|
background: #ffffff;
|
2023-11-30 10:56:05 +08:00
|
|
|
box-sizing: border-box;
|
|
|
|
padding-top: 88px;
|
2023-12-05 11:16:58 +08:00
|
|
|
padding-bottom: 20px;
|
2023-11-30 10:56:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.my-header {
|
|
|
|
width: 100%;
|
|
|
|
height: 88px;
|
|
|
|
background: #ffffff;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
color: #000;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 0px 15px;
|
|
|
|
padding-top: 40px;
|
|
|
|
|
|
|
|
.my-icons {
|
|
|
|
width: 20px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
position: fixed;
|
|
|
|
top: 0px;
|
|
|
|
}
|
2023-12-05 11:16:58 +08:00
|
|
|
|
|
|
|
.center-box {
|
|
|
|
border-radius: 8px;
|
|
|
|
background: #f4f5f6;
|
|
|
|
margin: 10px auto;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 10px;
|
|
|
|
width: 95%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.title-box {
|
|
|
|
font-size: 18px;
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.g-box {
|
|
|
|
box-sizing: border-box;
|
|
|
|
width: 100%;
|
|
|
|
padding: 4px 0px;
|
|
|
|
font-size: 14px;
|
|
|
|
color: #333333;
|
|
|
|
}
|
2023-12-05 11:21:21 +08:00
|
|
|
</style>
|