cash-protocol.tsx 946 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import request from '@/helpers/request'
  2. import { state } from '@/state'
  3. import { defineComponent } from 'vue'
  4. // 预览协议 - 原生实名认证使用
  5. export default defineComponent({
  6. name: 'preview-protocol',
  7. data() {
  8. return {
  9. protocolHTML: '' as any
  10. }
  11. },
  12. async mounted() {
  13. try {
  14. // 判断是否有协议内容
  15. if (!this.protocolHTML) {
  16. const { data } = await request.get(
  17. state.platformApi + '/open/userContractRecord/queryLatestContractTemplate',
  18. {
  19. params: {
  20. contractType: 'WITHDRAW'
  21. }
  22. }
  23. )
  24. this.protocolHTML = data.contractTemplateContent || ''
  25. }
  26. } catch {
  27. //
  28. }
  29. },
  30. render() {
  31. return (
  32. <div id="mProtocol">
  33. <div
  34. style="font-size: 14px;padding: 12px;color: #333;line-height: 1.4;"
  35. v-html={this.protocolHTML}
  36. ></div>
  37. </div>
  38. )
  39. }
  40. })