1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <template>
- <view v-if="listData.length>0">
- <view v-for="(item, index) in listData" :key="index" @click="onClick(item)" :data-code="item" class="item"
- style="justify-content: flex-start; display: flex; font-size: 28rpx; min-height: 20px; background-color: #22dbc8; color: white; border-radius: 20rpx; padding: 20px; margin: 20px;">
- <view style="display: flex; flex-direction: column; flex: 1;">
- <text>{{ item.productName }}</text>
- </view>
- <view>></view>
- </view>
- </view>
- <view v-else class="no">暂无权益</view>
- </template>
- <script setup lang='ts'>
- import {
- getItem
- } from "@/utils/storage";
- import {
- ref
- } from 'vue';
- import {
- request
- } from "@/utils/network/request.js";
-
- let listData = ref([])
-
- //卡券渠道类型获取单项权益列表
- request("a867bb01c200466b8715f3bb98be3eb9", {
- type: 2,
- data: {
- couponAgencyType: ['TUHU', 'ZFB'],
- mobile: getItem('mobile').toString()
- },
- method: "POST",
- showLoading: true,
- }).then((item) => {
- let res = JSON.parse(item.bizContent)
- console.log(res, '=========');
- listData.value = res.data
- })
-
- function onClick(singId: any) {
- uni.navigateTo({
- url: '/subpackage/service/equity/equity?singleEquityId=' + singId.singleEquityId +
- '&couponAgencyType=' + singId.couponAgencyType + '&couponId=' + singId.couponId,
- })
- }
- </script>
- <style lang='scss' scoped>
- .no{
- text-align: center;
- margin-top: 200rpx;
- }
- </style>
|