123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <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> <text>¥{{item.discountPrice * 0.01}}</text></text> -->
- <text><text>111</text> <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>
|