活动模板修改

This commit is contained in:
lf 2024-06-24 10:39:45 +08:00
parent 5537f28fd3
commit 0d50e3d06a
4 changed files with 29 additions and 12 deletions

View File

@ -61,7 +61,8 @@
mode="" mode=""
></image> ></image>
</view> </view>
<view class="f24 mt30 mlr30" style="color: #2b6da8"> <rich-text v-if="contentMsg" :nodes="contentMsg"></rich-text>
<view v-else class="f24 mt30 mlr30" style="color: #2b6da8">
<view>1.活动时间2023年11月1日至2023年12月 31</view> <view>1.活动时间2023年11月1日至2023年12月 31</view>
<view class="mt20"> <view class="mt20">
2.活动内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容 2.活动内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容此为文字内容
@ -195,6 +196,7 @@ export default {
ismask: false, ismask: false,
isz: 1, isz: 1,
activity_code: '', activity_code: '',
contentMsg: '',
} }
}, },
onLoad(options) { onLoad(options) {
@ -251,6 +253,8 @@ export default {
this.freeNum = lottery_count - use_lottery_count this.freeNum = lottery_count - use_lottery_count
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
this.lottery_code = lottery_code this.lottery_code = lottery_code
// eslint-disable-next-line camelcase
this.contentMsg = activity_info.activity_description
} else { } else {
uni.showToast({ uni.showToast({
title: res.data.message, title: res.data.message,

View File

@ -120,7 +120,9 @@ import api, { imgUrl } from './api'
const istrue = ref<boolean>(false) const istrue = ref<boolean>(false)
const list = reactive<any>([]) const list = reactive<any>([])
const query = reactive<any>({}) const query = reactive<any>({
activity_code: 'quanyi',
})
const dui = (item) => { const dui = (item) => {
uni.navigateTo({ uni.navigateTo({
@ -141,7 +143,7 @@ function getData() {
const params = { const params = {
page: 1, page: 1,
page_size: 10, page_size: 10,
activity_code: query.activity_code, activity_code: query.activity_code || 'quanyi',
} }
api.getCouponList(params).then((res: any) => { api.getCouponList(params).then((res: any) => {
if (res.code === 200) { if (res.code === 200) {

View File

@ -95,6 +95,7 @@
<view class="bold f40" style="color: #3d3d3d">宝贝详情</view> <view class="bold f40" style="color: #3d3d3d">宝贝详情</view>
<!-- <view v-html="info.introduce" class="ql-editor"></view> --> <!-- <view v-html="info.introduce" class="ql-editor"></view> -->
<view class="flex_column flex_items mt20"> <view class="flex_column flex_items mt20">
<template v-if="info.images && info.images.length">
<image <image
v-for="(item, index) in info.images" v-for="(item, index) in info.images"
:key="index" :key="index"
@ -102,6 +103,10 @@
style="width: 100%" style="width: 100%"
mode="widthFix" mode="widthFix"
></image> ></image>
</template>
<template v-else>
<rich-text v-if="contentMsg" :nodes="contentMsg"></rich-text>
</template>
</view> </view>
</view> </view>
<view style="height: 130rpx; width: 100%"></view> <view style="height: 130rpx; width: 100%"></view>
@ -243,6 +248,7 @@ const list = reactive<any>([
const current = ref<number>(0) const current = ref<number>(0)
const curindex = ref<number>(0) const curindex = ref<number>(0)
const info = reactive<any>({}) const info = reactive<any>({})
const contentMsg = ref<any>('')
let tags = reactive<any>([ let tags = reactive<any>([
{ {
tt: '10元', tt: '10元',
@ -285,7 +291,7 @@ function getData() {
.getProductDetail({ .getProductDetail({
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
product_id: product_id.value, product_id: product_id.value,
activity_code: route.activity_code, activity_code: route.activity_code || 'quanyi',
}) })
.then((res: any) => { .then((res: any) => {
uni.hideLoading() uni.hideLoading()
@ -294,6 +300,7 @@ function getData() {
// this.info.detail_image = JSON.parse(this.info.detail_image) // this.info.detail_image = JSON.parse(this.info.detail_image)
tags = [] tags = []
Object.assign(tags, [res.data.show_name]) Object.assign(tags, [res.data.show_name])
contentMsg.value = res.data.remark
istrue.value = true istrue.value = true
} else { } else {
uni.showToast({ uni.showToast({

View File

@ -55,7 +55,11 @@
> >
<view class="flex_between flex_items pb20 bbe9s"> <view class="flex_between flex_items pb20 bbe9s">
<view class="flex_start flex_items"> <view class="flex_start flex_items">
<image style="width: 104rpx; height: 104rpx; border-radius: 12rpx" mode=""></image> <image
:src="info.show_pic"
style="width: 104rpx; height: 104rpx; border-radius: 12rpx"
mode=""
></image>
<view class="flex_column f30 ml30" style="color: #333"> <view class="flex_column f30 ml30" style="color: #333">
<text class="bold">{{ info.show_name }}</text> <text class="bold">{{ info.show_name }}</text>
<view class="f24 mt15" style="color: #666"> <view class="f24 mt15" style="color: #666">