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.

Hetong.vue 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <template>
  2. <view class="hetong-container">
  3. <view class="check-content">
  4. <view class="posi">
  5. <u-checkbox-group>
  6. <u-checkbox v-model="checked" shape="circle">
  7. </u-checkbox>
  8. </u-checkbox-group>
  9. <view class="content">
  10. 我已阅读并同意 <text class="item-line" @click="isShow = true">{{`《${linkName}》`}}</text>
  11. <!-- 和<text class="item-line"
  12. @click="handleDialog('risk')">《风险提示告知书》</text> -->
  13. </view>
  14. </view>
  15. </view>
  16. <u-modal v-model="isShow" width='700rpx' :mask-close-able='true' :show-title='false' :show-confirm-button='false'>
  17. <view class="slot-content">
  18. <Protocol :url='typeUrl' />
  19. <!-- <ETCUserAgreement v-if='type=="etc"' /> -->
  20. </view>
  21. </u-modal>
  22. </view>
  23. </template>
  24. <script setup lang='ts'>
  25. import {
  26. ref,
  27. computed
  28. } from 'vue'
  29. import Protocol from './Protocol.vue'
  30. interface PropsType {
  31. modelValue: any
  32. link: any
  33. name: any
  34. }
  35. const props = defineProps < PropsType > ()
  36. const emit = defineEmits(['update:modelValue'])
  37. const checked = computed({
  38. get: function() {
  39. return props.modelValue
  40. },
  41. set: function(newValue) {
  42. emit('update:modelValue', newValue)
  43. },
  44. })
  45. //获取页面配置
  46. const isShow = ref(false)
  47. const typeUrl = ref('')
  48. const linkName = computed(() => {
  49. let name = ''
  50. typeUrl.value = props.link
  51. if (!props.name) {
  52. console.log(props.link);
  53. let arr = props.link.split('/')
  54. arr = arr[arr.length - 1].split('_')
  55. if (arr.length <= 1) {
  56. name = arr[0]
  57. } else {
  58. arr.splice(0, 1)
  59. arr = arr.join('_')
  60. arr = arr.split('.')
  61. arr.pop()
  62. name = arr.join('.')
  63. }
  64. }
  65. return props.name || name
  66. })
  67. function handleDialog(types) {
  68. isShow.value = true
  69. if (types == 'etc') {
  70. typeUrl.value = '/sett-minio/template/ETC用户协议(阳光行A).docx'
  71. } else {
  72. typeUrl.value = '/sett-minio/template/风险提示告知书.docx'
  73. }
  74. }
  75. </script>
  76. <!-- 签约管理 -->
  77. <style lang='scss' scoped>
  78. .sig-manage {
  79. height: 100vh;
  80. width: 100%;
  81. display: flex;
  82. justify-content: center;
  83. align-items: center;
  84. }
  85. .hetong-container {
  86. width: 100%;
  87. display: flex;
  88. flex-direction: column;
  89. }
  90. :deep(.u-checkbox__label) {
  91. margin: 0;
  92. margin-right: 5rpx;
  93. }
  94. .check-content {
  95. flex: 1 1 auto;
  96. .posi {
  97. bottom: 30rpx;
  98. left: 0;
  99. width: 100%;
  100. }
  101. }
  102. .content {
  103. display: inline;
  104. word-wrap: break-word;
  105. }
  106. .item-line {
  107. color: $u-type-primary;
  108. cursor: pointer;
  109. }
  110. .btn {
  111. height: 80rpx;
  112. opacity: 1;
  113. border-radius: 100rpx;
  114. margin: 20rpx;
  115. }
  116. .btn-text {
  117. color: #FFFFFF;
  118. font-size: 28rpx;
  119. }
  120. .nav-bg {
  121. /* background: linear-gradient(to right, #13E7C1, #43A1E0); */
  122. border: 1px solid #FFFFFF;
  123. background: #1AAC1B;
  124. }
  125. .btn-buttom {
  126. flex: 0 0 auto;
  127. }
  128. .slot-content {
  129. height: 82vh;
  130. overflow-y: auto;
  131. }
  132. </style>