天波h5前端应用
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.

145 line
4.4KB

  1. <!--
  2. * @Date: 2022-02-26 16:40:02
  3. * @LastEditors: JinxChen
  4. * @LastEditTime: 2022-02-28 17:00:19
  5. * @FilePath: \AntpayFrontEnd\src\components\AgreementDialog.vue
  6. * @description: 协议弹窗组件
  7. -->
  8. <template>
  9. <div>
  10. <van-dialog
  11. class="agreement-container"
  12. v-model="show"
  13. :title="title"
  14. confirm-button-color="#1989fa"
  15. :show-confirm-button="false"
  16. >
  17. <div class="agreement-content">
  18. <h5>一.开通需知及承诺</h5>
  19. <p v-show="isNewCustom">1.感谢用户使用支付宝花呗分期功能。</p>
  20. <p v-show="isNewCustom">
  21. 2.用户自愿开通4G电子学生证资费套餐服务({{count}}
  22. <!-- 24 -->
  23. 期)每月自动通过支付宝花呗分期支付资费(话费+流量)套餐费{{(price/count).toFixed(2)}}元/月。
  24. </p>
  25. <p v-show="isNewCustom">3.用户需连续使用该资费套餐24期,可据此领取4G电子学生证1台、电话卡1张。</p>
  26. <p style="white-space: pre-wrap">
  27. <span v-show="isNewCustom">4.</span>
  28. {{description}}
  29. </p>
  30. <p v-show="isOldCustom">5.协议期内,电子学生证非人为损坏或进水按“三包”政策进行免费维修或更换。如丢失或人为损坏,按优惠价重新购买。</p>
  31. <p v-show="isOldCustom">6.北京随手精灵科技有限公司接受电子学生证运营销售商委托采用支付宝花呗分期付代收业务货款。</p>
  32. <h5>二.用户承诺</h5>
  33. <p>1.用户已充分了解支付宝花呗付款条款(含支付宝花呗相关规则),充分阅读及理解本协议。</p>
  34. <p>2.用户已经签署业务订购回执,自愿购买并同意签署本协议。</p>
  35. <h5>三.法律适用与管辖</h5>
  36. <p>本协议之效力、解释、变更、执行与争议解决均适用中华人民共和国法律。因本协议产生的争议,均应依照中华人民共和国法律予以处理。</p>
  37. <p v-show="!isButtonShow">{{countDown}}秒后显示按钮</p>
  38. <div class="agreement-button" v-show="isButtonShow">
  39. <van-button type="warning" @click="onDisAgree" round>不同意</van-button>
  40. <van-button type="info" @click="onAgree" round>同意</van-button>
  41. </div>
  42. </div>
  43. </van-dialog>
  44. </div>
  45. </template>
  46. <script>
  47. export default {
  48. name:'agreement-dialog',
  49. props: {
  50. show: {
  51. default: true,
  52. type: Boolean
  53. },
  54. title: {
  55. default: '',
  56. type: String
  57. },
  58. isNewCustom: {
  59. default: true,
  60. type: Boolean
  61. },
  62. isOldCustom: {
  63. default: false,
  64. type: Boolean
  65. },
  66. count: {
  67. default: null,
  68. type: Number
  69. },
  70. price: {
  71. default: null,
  72. type: Number
  73. },
  74. description: {
  75. default: '',
  76. type: String
  77. },
  78. countDown: {
  79. default: 3,
  80. type: Number
  81. },
  82. isButtonShow: {
  83. default: false,
  84. type: Boolean
  85. },
  86. },
  87. data(){
  88. return {
  89. }
  90. },
  91. methods: {
  92. // 不同意
  93. onDisAgree() {
  94. this.$bus.$emit('getCheckStatus', false);
  95. this.$bus.$emit('closeButton', false);
  96. this.resetCountDown();
  97. },
  98. // 同意
  99. onAgree() {
  100. this.$bus.$emit('getCheckStatus', true);
  101. this.$bus.$emit('closeButton', false);
  102. this.resetCountDown();
  103. },
  104. // 重置倒计时和关闭弹窗
  105. resetCountDown() {
  106. this.countDown = 3;
  107. },
  108. }
  109. }
  110. </script>
  111. <style scoped lang="scss">
  112. .agreement-container {
  113. .agreement-content {
  114. height: 500px;
  115. padding: 5px 10px;
  116. border-top: 0.5px soild;
  117. border-bottom: 0.5px soild;
  118. text-align: left;
  119. overflow: scroll;
  120. h5 {
  121. padding: 5px;
  122. }
  123. p {
  124. padding: 5px;
  125. font-size: 14px;
  126. line-height: 20px;
  127. }
  128. .agreement-button {
  129. padding: 10px;
  130. display: flex;
  131. justify-content: space-around;
  132. align-items: center;
  133. .van-button {
  134. height: 30px;
  135. width: 120px;
  136. border-radius: 10px;
  137. }
  138. }
  139. }
  140. }
  141. </style>