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

equityInfo.vue 1.3KB

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