start.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <view class="start">
  3. <view class="background"></view>
  4. <view class="popup">
  5. <view class="title">温馨提示</view>
  6. <scroll-view :scroll-y="true" class="content">
  7. <text>欢迎使用满园春线上商城。我们非常重视您的用户权益和个人信息的保护,在您使用满园春线上商城服务前,请认真阅读</text>
  8. <text class="money" @click="goUser">《用户协议》</text>
  9. <text>和</text>
  10. <text class="money" @click="goYs">《隐私政策》</text>
  11. <text>
  12. 全部条款。我们将通过上述协议向您说明我们如何为您提供服务并保障您的用户权益,
  13. 如何收集、使用、保存、共享和保护您的相关信息,以及我们为您提供的访问、更正、删除和申诉您信息相关问题的方式。
  14. 我们会严格按照您的授权,在上述协议约定的范围内收集、存储和使用您的注册信息、设备信息、位置信息、日志信息或其他经您授权的信息。
  15. 您点击“同意并继续”视为您已同意上述协议的全部内容
  16. </text>
  17. </scroll-view>
  18. <view class="button flex">
  19. <text class="disagree" @click="disagree">不同意</text>
  20. <text class="agree" @click="agree">同意并继续</text>
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. data() {
  28. return {};
  29. },
  30. onLoad() {
  31. let agree = uni.getStorageSync('agree');
  32. if (agree) {
  33. // this.agree()
  34. uni.redirectTo({ url: '/pages/index/index' });
  35. }
  36. },
  37. methods: {
  38. //前往用户协议
  39. goUser() {
  40. uni.navigateTo({ url: './agreement' });
  41. },
  42. goYs() {
  43. uni.navigateTo({ url: './privacy' });
  44. },
  45. //不同意
  46. disagree() {
  47. plus.runtime.quit();
  48. },
  49. //同意
  50. agree() {
  51. uni.setStorageSync('agree', true);
  52. uni.switchTab({
  53. url: '/pages/index/index',
  54. success(e) {
  55. console.log(e);
  56. },
  57. fail(e) {
  58. console.log(e);
  59. }
  60. });
  61. }
  62. }
  63. };
  64. </script>
  65. <style lang="scss">
  66. .money {
  67. color: $base-color;
  68. }
  69. .disagree {
  70. padding: 10rpx 30rpx;
  71. font-size: 28rpx;
  72. width: 200rpx;
  73. height: 64rpx;
  74. color: $base-color;
  75. border-radius: 999rpx;
  76. border: 2rpx solid $base-color;
  77. }
  78. .agree {
  79. padding: 10rpx 30rpx;
  80. width: 210rpx;
  81. height: 64rpx;
  82. font-size: 28rpx;
  83. color: #fff;
  84. background-color: $base-color;
  85. border-radius: 999rpx;
  86. border: 2rpx solid $base-color;
  87. }
  88. .button {
  89. position: absolute;
  90. left: 0;
  91. right: 0;
  92. bottom: 0;
  93. z-index: 0;
  94. display: flex;
  95. padding: 24rpx;
  96. justify-content: center;
  97. text-align: center;
  98. justify-content: space-around;
  99. }
  100. .content {
  101. position: absolute;
  102. left: 0;
  103. right: 0;
  104. top: 100rpx;
  105. bottom: 120rpx;
  106. z-index: 0;
  107. font-size: 28rpx;
  108. padding: 0 50rpx;
  109. line-height: 44rpx;
  110. }
  111. .title {
  112. font-size: 36rpx;
  113. padding: 20rpx 50rpx;
  114. }
  115. .background {
  116. position: fixed;
  117. left: 0;
  118. right: 0;
  119. top: 0;
  120. bottom: 0;
  121. z-index: 0;
  122. background-color: rgba(0, 0, 0, 0.4);
  123. }
  124. .popup {
  125. position: absolute;
  126. z-index: 0;
  127. left: 50%;
  128. top: 50%;
  129. transform: translate3d(-50%, -50%, 0);
  130. width: 600rpx;
  131. height: 700rpx;
  132. background-color: #fff;
  133. border-radius: 30rpx;
  134. }
  135. </style>