start.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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>欢迎使用正一商城APP。我们非常重视您的用户权益和个人信息的保护,在您使用正一商城APP服务前,请认真阅读</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. console.log(uni.getStorageSync('agree'),'2222232');
  35. uni.redirectTo({ url: '/pages/index/index' });
  36. }
  37. },
  38. methods: {
  39. //前往用户协议
  40. goUser() {
  41. uni.navigateTo({ url: './agreement' });
  42. },
  43. goYs() {
  44. uni.navigateTo({ url: './privacy' });
  45. },
  46. //不同意
  47. disagree() {
  48. plus.runtime.quit();
  49. },
  50. //同意
  51. agree() {
  52. uni.setStorageSync('agree', true);
  53. uni.switchTab({
  54. url: '/pages/index/index',
  55. success(e) {
  56. console.log(e);
  57. },
  58. fail(e) {
  59. console.log(e);
  60. }
  61. });
  62. }
  63. }
  64. };
  65. </script>
  66. <style lang="scss">
  67. .money {
  68. color: $base-color;
  69. }
  70. .disagree {
  71. padding: 10rpx 30rpx;
  72. font-size: 28rpx;
  73. width: 200rpx;
  74. height: 64rpx;
  75. color: $base-color;
  76. border-radius: 999rpx;
  77. border: 2rpx solid $base-color;
  78. }
  79. .agree {
  80. padding: 10rpx 30rpx;
  81. width: 210rpx;
  82. height: 64rpx;
  83. font-size: 28rpx;
  84. color: #fff;
  85. background-color: $base-color;
  86. border-radius: 999rpx;
  87. border: 2rpx solid $base-color;
  88. }
  89. .button {
  90. position: absolute;
  91. left: 0;
  92. right: 0;
  93. bottom: 0;
  94. z-index: 0;
  95. display: flex;
  96. padding: 24rpx;
  97. justify-content: center;
  98. text-align: center;
  99. justify-content: space-around;
  100. }
  101. .content {
  102. position: absolute;
  103. left: 0;
  104. right: 0;
  105. top: 100rpx;
  106. bottom: 120rpx;
  107. z-index: 0;
  108. font-size: 28rpx;
  109. padding: 0 50rpx;
  110. line-height: 44rpx;
  111. }
  112. .title {
  113. font-size: 36rpx;
  114. padding: 20rpx 50rpx;
  115. }
  116. .background {
  117. position: fixed;
  118. left: 0;
  119. right: 0;
  120. top: 0;
  121. bottom: 0;
  122. z-index: 0;
  123. background-color: rgba(0, 0, 0, 0.4);
  124. }
  125. .popup {
  126. position: absolute;
  127. z-index: 0;
  128. left: 50%;
  129. top: 50%;
  130. transform: translate(-50%, -50%);
  131. width: 600rpx;
  132. height: 700rpx;
  133. background-color: #fff;
  134. border-radius: 30rpx;
  135. }
  136. </style>