<template>
	<view class="app-container">
	<!-- 	<u-navbar leftText="返回" title="店铺活动管理" :autoBack="true" :placeholder="true">
			<view slot="right">
				<text class="nav-right"></text>
			</view>
		</u-navbar> -->
		<view class="list-item">
			<view class="list-item-title">{{levelList[0].activeName || ""}}</view>
			<view>
				<view class="Mytitle">
				</view>
				<view class="mytext" v-html="levelList[0].activeRequest">
				</view>
			</view>


		</view>
		<view class="yingfuDom">
			<view class="items">
				<view class="label">
					活动名称：
				</view>
				<view class="value">
					店铺周年庆
				</view>
			</view>
			<view class="items">
				<view class="label">
					活动内容：
				</view>
				<view class="value">
					消费满500元打8折
				</view>
			</view>
			<view class="items">
				<view class="label">
					活动地点：
				</view>
				<view class="value">
					南京市江宁区佳湖西路19号
				</view>
			</view>
			<view class="items">
				<view class="label">
					参与条件：
				</view>
				<view class="value">
					所有人可参加
				</view>
			</view>
			<view class="items">
				<view class="label">
					活动时间：
				</view>
				<view class="value">
					2024-10-01
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		listActivity,
	} from "../../api/jn/apply";
	export default {
		data() {
			return {
				// 表单参数
				form: {},
				levelList: [{activeName:"",activeRequest:""}],
				// 查询参数
				queryParams: {
					sbLevelName: null,
					pageNum: 1,
					pageSize: 10,
					activeState:"1"
				},
			};
		},
		onLoad() {
			this.getList();
		},
		methods: {
			onSearch() {
				this.getList();
			},
			onClear() {
				this.queryParams.sbLevelName = "";
				this.getList();
			},
			getList() {
				listActivity(this.queryParams).then((res) => {
					console.log(res);
						
					if(res.rows.length !=0){
						this.levelList = res.rows;
						
					}else{
						this.levelList = [{activeName:"",activeRequest:""}]
					}
				});
			},
			// 表单重置
			reset() {
				this.form = {
					id: null,
					activeName: null,
					activeStart: null,
					activeEnd: null,
					activeContent: null,
					activePoint: null,
					joinRequire: null,
					activeState: null,
					createId: null,
					createBy: null,
					createTime: null,
					updateId: null,
					updateBy: null,
					updateTime: null,
					remark: null,
					gridId: null,
					gridName: null,
					partId: null,
					partName: null,
				};
			},
		},
	};
</script>

<style lang="scss" scoped>
	.app-container {
		.list-item {
			background-color: #fff;
			border-radius: 16rpx;
			box-sizing: border-box;
			padding: 25rpx;
			margin-bottom: 30rpx;
			margin-top: 30rpx;



			.list-item-title {
				text-align: center;
				border-bottom: 1rpx solid #000000;
				font-size: 35rpx;
				font-weight: bold;
			}

			.Mytitle {
				font-size: 30rpx;
				margin: 20rpx 0;
				font-weight: 550;

			}

			.mytext {
				line-height: 2;
			}

			.item-cell {
				display: flex;
				align-items: center;

				.cell-lable {
					width: 200rpx;
					font-size: 28rpx;
					font-weight: 400;
					color: #9da2ab;
				}

				.cell-value {
					flex: 1;
					font-size: 28rpx;
					font-weight: 400;
					color: #2e2f31;
				}
			}

			.cell-btn {
				display: flex;
				flex-direction: row-reverse;
			}

			&>view:not(.cell-btn) {
				margin-bottom: 20rpx;
			}
		}

		&>.list-item:last-child {
			margin-bottom: 0;
		}
		
		.yingfuDom {
			padding: 20rpx 0;
			display: grid;
			grid-template-columns: 1fr;
			row-gap: 10rpx;
			.items{
				display: flex;
				align-items: center;
				.label {
					// display: flex;
					// align-items: center;
					// justify-content: center;
				}
				.value {
					// display: flex;
					// align-items: center;
					// justify-content: center;
				}
			}
		}

	}

	.list-item-box {

		display: flex;
		text-align: center;

		.list-item-box-top {
			font-size: 30rpx;
			font-weight: bold;
			margin-right: 20rpx;
		}

		.list-item-box-bottom {
			font-size: 30rpx;
			font-weight: bold;
		}

		.good {
			color: green;
		}
	}
</style>