You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

equityInfo.vue 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 { singleEquityDetailNew } 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. singleEquityId.value = options.singleEquityId
  23. couponAgencyType.value = options.couponAgencyType
  24. //卡券渠道类型获取单项权益列表
  25. requestNew(singleEquityDetailNew, {
  26. type: 2,
  27. data: {
  28. singleEquityId: singleEquityId.value
  29. },
  30. method: "POST",
  31. showLoading: true,
  32. }).then((item) => {
  33. let res = item
  34. console.log(res, '=========');
  35. richText.value = res.productIntro
  36. couponId.value = res.couponId
  37. })
  38. })
  39. function onClick() {
  40. uni.navigateTo({
  41. url: '/subpackage/service/equity/equity?singleEquityId=' + singleEquityId.value +
  42. "&couponAgencyType=" + couponAgencyType.value + "&couponId=" + couponId.value,
  43. })
  44. }
  45. </script>
  46. <style lang='scss' scoped>
  47. .copy-btn {
  48. background-color: #4caf50;
  49. color: #fff;
  50. border: none;
  51. width: 100%;
  52. padding: 10rpx 0;
  53. border-radius: 10rpx;
  54. font-size: 24rpx;
  55. box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2);
  56. }
  57. </style>