<template>
	<view class="content">
		<!-- <view class="item" v-for="(item,index) in state.list" :key='index'> -->
		<view class="item">
			<view class="title">
				<view>
					<!-- <text><text>{{item.productName}}</text>&nbsp;&nbsp;<text>¥{{item.discountPrice * 0.01}}</text></text> -->
					<text><text>111</text>&nbsp;&nbsp;<text>¥11</text></text>
				</view>
				<text class="add">加购</text>
			</view>

		</view>
	</view>
</template>

<script setup lang="ts">
	import { onLoad, onShow } from "@dcloudio/uni-app";
	import { reactive } from "vue";
	import { equityProductsApi } from "@/utils/network/api.js";
	import { stringToJson } from "@/utils/network/encryption";
	import { request } from "@/utils/network/request";
	import { etcQYAction } from "@/utils/network/api.js";
	import { fileURL } from "@/datas/fileURL.js";
	import navBar from "@/components/nav-bar/nav-bar2.vue";
	import navBgCar from "./components/nav-bg-car4";
	// import { setItem } from "@/utils/storage";
	import { msg } from "@/utils/utils";
	import {
		checkOrderStatus,
		wechatAppID,
		wechatPayConfigId,
		wechatSecret,
		addProduct,
		queryDetails,
		getOpenidApi
	} from "@/utils/network/api";
	import {
		getItem,
		StorageKeys,
		setItem
	} from "@/utils/storage";
	const imgURL = `${fileURL}image/`;

	const state = reactive({
		list: [],  //权益数据
	})

	onLoad((option : any) => {
		// getList();

		console.log("option", option)
	})
	const getList = () => {
		const options = {
			type: 2,
			data: {
				"promoteId": state.promoteId,
			},
			method: 'POST',
			showLoading: true,
		}
		request(equityProductsApi, options).then((res) => {
			const data = stringToJson(res.bizContent);
			state.list = data.data
			console.log("222", data.data)
		})
	}
</script>

<style scoped lang="scss">
	.content {
		width: 100%;
	}

	.item {
		width: 90%;
		margin: 20rpx auto;
		background-color: rgb(41, 199, 207);
		border-radius: 20rpx;
		padding: 20rpx;
		box-sizing: border-box;
		color: white;
		font-size: 32rpx;

	}

	.item>.title {
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.add {
		background: white;
		border-radius: 10rpx;
		padding: 4rpx 6rpx;
		color: #000;
	}
</style>