您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

equityList.vue 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <view v-if="listData.length>0">
  3. <view v-for="(item, index) in listData" :key="index" @click="onClick(item)" :data-code="item" class="item"
  4. 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;">
  5. <view style="display: flex; flex-direction: column; flex: 1;">
  6. <text>{{ item.productName }}</text>
  7. </view>
  8. <view>></view>
  9. </view>
  10. </view>
  11. <view v-else class="no">暂无权益</view>
  12. </template>
  13. <script setup lang='ts'>
  14. import {
  15. getItem
  16. } from "@/utils/storage";
  17. import {
  18. ref
  19. } from 'vue';
  20. import {
  21. request
  22. } from "@/utils/network/request.js";
  23. let listData = ref([])
  24. //卡券渠道类型获取单项权益列表
  25. request("a867bb01c200466b8715f3bb98be3eb9", {
  26. type: 2,
  27. data: {
  28. couponAgencyType: ['TUHU', 'ZFB'],
  29. mobile: getItem('mobile').toString()
  30. },
  31. method: "POST",
  32. showLoading: true,
  33. }).then((item) => {
  34. let res = JSON.parse(item.bizContent)
  35. console.log(res, '=========');
  36. listData.value = res.data
  37. })
  38. function onClick(singId: any) {
  39. uni.navigateTo({
  40. url: '/subpackage/service/equity/equity?singleEquityId=' + singId.singleEquityId +
  41. '&couponAgencyType=' + singId.couponAgencyType + '&couponId=' + singId.couponId,
  42. })
  43. }
  44. </script>
  45. <style lang='scss' scoped>
  46. .no{
  47. text-align: center;
  48. margin-top: 200rpx;
  49. }
  50. </style>