u-agreement.vue 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <style scoped lang="scss">
  2. .agreement-content {
  3. width: 100%;;
  4. display: inline-block;
  5. flex-direction: column;
  6. .agreement-url {
  7. display: inline-block;
  8. color: blue;
  9. // #ifdef H5
  10. cursor: pointer;
  11. // #endif
  12. }
  13. }
  14. </style>
  15. <template>
  16. <view class="up-agreement">
  17. <up-modal v-model:show="show" showCancelButton @confirm="confirm" @cancel="close" confirmText="阅读并同意">
  18. <view class="agreement-content">
  19. <slot>
  20. 我们非常重视您的个人信息和隐私保护。为了更好地保障您的个人权益,在您使用我们的产品前,
  21. 请务必审慎阅读《<text class="agreement-url" @click="urlClick('urlProtocol')">用户协议</text>》
  22. 和《<text class="agreement-url" @click="urlClick('urlPrivacy')">隐私政策</text>》内的所有条款,
  23. 尤其是:1.我们对您的个人信息的收集/保存/使用/对外提供/保护等规则条款,以及您的用户权利等条款;2. 约定我们的限制责任、免责
  24. 条款;3.其他以颜色或加粗进行标识的重要条款。如您对以上协议有任何疑问,请先不要同意,您点击“同意并继续”的行为即表示您已阅读
  25. 完毕并同意以上协议的全部内容。
  26. </slot>
  27. </view>
  28. </up-modal>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. name: 'up-agreement',
  34. props: {
  35. urlProtocol: {
  36. type: String,
  37. default: '/pages/user_agreement/agreement/info?title=用户协议'
  38. },
  39. urlPrivacy: {
  40. type: String,
  41. default: '/pages/user_agreement/agreement/info?title=隐私政策'
  42. },
  43. },
  44. emits: ['confirm'],
  45. data() {
  46. return {
  47. show: false
  48. }
  49. },
  50. methods: {
  51. close() {
  52. // #ifdef H5
  53. window.opener = null;
  54. window.close();
  55. // #endif
  56. // #ifdef APP-PLUS
  57. plus.runtime.quit();
  58. // #endif
  59. },
  60. confirm() {
  61. this.show = false;
  62. this.$emit('confirm', 1);
  63. },
  64. showModal() {
  65. this.show = true;
  66. },
  67. urlClick(type) {
  68. uni.navigateTo({
  69. url: this[type]
  70. });
  71. }
  72. }
  73. }
  74. </script>