百富门答题小程序
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.

227 lines
4.6 KiB

4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
3 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
4 months ago
3 months ago
3 months ago
3 months ago
4 months ago
3 months ago
4 months ago
  1. <template>
  2. <view class="home">
  3. <image src="/static/image/bg/X1.png"
  4. class="page-bg"
  5. mode="aspectFill"></image>
  6. <view class="content_now">
  7. <view class="title">
  8. Genius Journey Club
  9. </view>
  10. <view class="title-desc">
  11. 欢迎您的到来
  12. </view>
  13. <view class="desc">
  14. 使用小程序请确认您已满18周岁
  15. </view>
  16. <view class="mian-btn"
  17. :class="{active:isActive === '未满18岁'}"
  18. @click="setActive('未满18岁')">{{ '未满18岁' }}</view>
  19. <view class="mian-btn"
  20. :class="{active:isActive === '已满18岁'}"
  21. @click="setActive('已满18岁')">{{ '已满18岁' }}</view>
  22. <view class="checkbox">
  23. <uv-checkbox-group v-model="checkboxValue">
  24. <view class="flex-center"
  25. style="flex-wrap: wrap;">
  26. <uv-checkbox
  27. size="40rpx"
  28. icon-size="30rpx"
  29. activeColor="#ecb864"
  30. :name="1"></uv-checkbox>
  31. <view>
  32. 我已仔细阅读并已同意以下
  33. </view>
  34. <view @click="$refs.popup.openContent(item.details)"
  35. v-for="(item, index) in privacyPolicyList"
  36. :key="item.id"
  37. class="privacy"
  38. v-if="index < 3"
  39. > {{ item.title }} </view>
  40. <text
  41. class="privacy"
  42. v-if="privacyPolicyList.length > 3"
  43. @click="$refs.checkboxPopup.open('bottom')">
  44. {{ privacyPolicyList.length }}项条款
  45. </text>
  46. <!-- <text @click="$refs.popup.open('user_ys_one')">全球隐私声明1</text>
  47. <text @click="$refs.popup.open('user_ys_two')">全球隐私声明2</text>
  48. <text @click="$refs.popup.open('user_xy_three')">全球隐私声明3</text>
  49. -->
  50. <!-- <text @click="$refs.popup.open('user_xy_four')">全球隐私声明4</text> -->
  51. </view>
  52. </uv-checkbox-group>
  53. </view>
  54. <view class="uni-color-btn"
  55. @click="next">
  56. 立即开启
  57. </view>
  58. <text class="second-color">{{ configObj.bg_title }}</text>
  59. </view>
  60. <!-- <configPopup ref="popup"
  61. required
  62. :keys="keys"
  63. @success="checkboxValue = [1]"/> -->
  64. <uv-popup ref="checkboxPopup"
  65. :round="30">
  66. <view class="checkboxPopupContent">
  67. <view @click="$refs.popup.openContent(item.details)"
  68. v-for="item in privacyPolicyList"
  69. :key="item.id"
  70. > {{ item.title }} </view>
  71. </view>
  72. </uv-popup>
  73. <configPopup ref="popup"/>
  74. </view>
  75. </template>
  76. <script>
  77. import { mapState } from 'vuex'
  78. export default {
  79. data() {
  80. return {
  81. isActive : null,
  82. checkboxValue : [],
  83. configObj : {},
  84. keys : ['user_ys_one', 'user_ys_two', 'user_xy_three', 'user_xy_four'],
  85. privacyPolicyList : [],
  86. }
  87. },
  88. computed : {
  89. },
  90. onLoad() {
  91. uni.$on('initConfig', data => {
  92. this.configObj = data
  93. })
  94. this.getPrivacyPolicyList()
  95. },
  96. onShow() {
  97. },
  98. methods: {
  99. setActive(value){
  100. this.isActive = value
  101. },
  102. getPrivacyPolicyList(){
  103. this.$api('privacyPolicyList', res => {
  104. if(res.code == 200){
  105. this.privacyPolicyList = res.result
  106. }
  107. })
  108. },
  109. next(){
  110. if(!this.isActive){
  111. uni.showToast({
  112. title:'请选择',
  113. icon: 'none'
  114. })
  115. return
  116. }
  117. if(!this.checkboxValue.length){
  118. uni.showToast({
  119. title:'请同意隐私政策',
  120. icon: 'none'
  121. })
  122. // this.$refs.popup.openkeys()
  123. return
  124. }
  125. if(this.isActive == '未满18岁'){
  126. uni.showModal({
  127. title: '未满18岁禁止浏览',
  128. })
  129. return
  130. }
  131. if(!uni.getStorageSync('token')){
  132. this.$utils.toLogin()
  133. return
  134. }
  135. this.$store.commit('getUserInfo', () => {
  136. uni.navigateTo({
  137. url: '/pages/index/index'
  138. })
  139. })
  140. },
  141. }
  142. }
  143. </script>
  144. <style lang="scss" scoped>
  145. .content_now{
  146. display: flex;
  147. flex-direction: column;
  148. align-items: center;
  149. justify-content: center;
  150. text-align: center;
  151. position: fixed;
  152. top: 55%;
  153. transform: translate(0, -50%);
  154. padding: 0 70rpx;
  155. box-sizing: border-box;
  156. width: 100%;
  157. --color2 : #000;
  158. .title-desc{
  159. font-size: 26rpx;
  160. }
  161. .desc{
  162. font-size: 26rpx;
  163. margin-top: 30rpx;
  164. }
  165. .mian-btn{
  166. border-color: $uni-color-primary;
  167. color: $uni-color-primary;
  168. }
  169. .active{
  170. background-color: $uni-color-primary;
  171. color: #fff;
  172. }
  173. .checkbox{
  174. margin-top: 470rpx;
  175. view{
  176. line-height: 50rpx;
  177. }
  178. .privacy{
  179. color: #1e52ff;
  180. }
  181. }
  182. .uni-color-btn{
  183. width: 80%;
  184. }
  185. .flex-center {
  186. display: flex;
  187. justify-content: center;
  188. align-items: center;
  189. font-size: 26rpx;
  190. }
  191. }
  192. .checkboxPopupContent{
  193. padding: 40rpx;
  194. display: flex;
  195. flex-wrap: wrap;
  196. view{
  197. color: #1e52ff;
  198. line-height: 50rpx;
  199. }
  200. }
  201. </style>