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

157 lines
3.0 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 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" @click="$refs.popup.openkeys()">
  23. <uv-checkbox-group v-model="checkboxValue">
  24. <view class="flex-center">
  25. <uv-checkbox
  26. size="40rpx"
  27. icon-size="30rpx"
  28. disabled
  29. activeColor="#ecb864"
  30. :name="1"></uv-checkbox>
  31. <text>已同意</text>
  32. <text @click="$refs.popup.open('privacyAgreement')">隐私政策</text>
  33. </view>
  34. </uv-checkbox-group>
  35. </view>
  36. <view class="uni-color-btn"
  37. @click="next">
  38. 立即开启
  39. </view>
  40. <text class="second-color">{{ configObj.bg_title }}</text>
  41. </view>
  42. <configPopup ref="popup"
  43. required
  44. :keys="keys"
  45. @success="checkboxValue = [1]"/>
  46. </view>
  47. </template>
  48. <script>
  49. import { mapState } from 'vuex'
  50. export default {
  51. data() {
  52. return {
  53. isActive : null,
  54. checkboxValue : [],
  55. configObj : {},
  56. keys : ['user_ys_one', 'user_ys_two', 'user_xy_three', 'user_xy_four'],
  57. }
  58. },
  59. computed : {
  60. },
  61. onLoad() {
  62. uni.$on('initConfig', data => {
  63. this.configObj = data
  64. })
  65. },
  66. onShow() {
  67. },
  68. methods: {
  69. setActive(value){
  70. this.isActive = value
  71. },
  72. next(){
  73. if(!this.isActive){
  74. uni.showToast({
  75. title:'请选择',
  76. icon: 'none'
  77. })
  78. return
  79. }
  80. if(!this.checkboxValue.length){
  81. // uni.showToast({
  82. // title:'请同意隐私政策',
  83. // icon: 'none'
  84. // })
  85. this.$refs.popup.openkeys()
  86. return
  87. }
  88. if(!uni.getStorageSync('token')){
  89. this.$utils.toLogin()
  90. return
  91. }
  92. this.$store.commit('getUserInfo', () => {
  93. uni.navigateTo({
  94. url: '/pages/index/index'
  95. })
  96. })
  97. },
  98. }
  99. }
  100. </script>
  101. <style lang="scss" scoped>
  102. .content_now{
  103. display: flex;
  104. flex-direction: column;
  105. align-items: center;
  106. justify-content: center;
  107. text-align: center;
  108. position: fixed;
  109. top: 55%;
  110. transform: translate(0, -50%);
  111. padding: 0 70rpx;
  112. box-sizing: border-box;
  113. width: 100%;
  114. --color2 : #000;
  115. .title-desc{
  116. font-size: 26rpx;
  117. }
  118. .desc{
  119. font-size: 26rpx;
  120. margin-top: 30rpx;
  121. }
  122. .mian-btn{
  123. border-color: $uni-color-primary;
  124. color: $uni-color-primary;
  125. }
  126. .active{
  127. background-color: $uni-color-primary;
  128. color: #fff;
  129. }
  130. .checkbox{
  131. margin-top: 460rpx;
  132. }
  133. .uni-color-btn{
  134. width: 80%;
  135. }
  136. .flex-center {
  137. display: flex;
  138. justify-content: center;
  139. align-items: center;
  140. font-size: 26rpx;
  141. }
  142. }
  143. </style>