Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

equityInfo.vue 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <view style="height: 100%;">
  3. <rich-text style="flex: 1" :nodes="richText" />
  4. </view>
  5. </template>
  6. <script setup lang='ts'>
  7. import {
  8. ref
  9. } from 'vue';
  10. import {
  11. requestNew
  12. } from "@/utils/network/request.js";
  13. import {
  14. onLoad
  15. } from '@dcloudio/uni-app'
  16. import { singleEquityDetail } from "@/utils/network/api.js";
  17. let richText = ref('')
  18. let singleEquityId = ref('')
  19. let couponAgencyType = ref('')
  20. let couponId = ref('')
  21. onLoad((options) => {
  22. console.log("参数",options)
  23. singleEquityId.value = options.singleEquityId
  24. couponAgencyType.value = options.couponAgencyType
  25. //卡券渠道类型获取单项权益列表
  26. requestNew(singleEquityDetail, {
  27. type: 2,
  28. data: {
  29. singleEquityId: singleEquityId.value
  30. },
  31. method: "POST",
  32. showLoading: true,
  33. }).then((item) => {
  34. let res = item
  35. console.log(res, '=========');
  36. richText.value = res.productIntro
  37. couponId.value = res.couponId
  38. })
  39. })
  40. function onClick() {
  41. uni.navigateTo({
  42. url: '/subpackage/service/equity/equity?singleEquityId=' + singleEquityId.value +
  43. "&couponAgencyType=" + couponAgencyType.value + "&couponId=" + couponId.value,
  44. })
  45. }
  46. </script>
  47. <style lang='scss' scoped>
  48. .copy-btn {
  49. background-color: #4caf50;
  50. color: #fff;
  51. border: none;
  52. width: 100%;
  53. padding: 10rpx 0;
  54. border-radius: 10rpx;
  55. font-size: 24rpx;
  56. box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2);
  57. }
  58. </style>