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

220 lines
4.5 KiB

3 weeks ago
1 week ago
3 weeks ago
1 week ago
3 weeks ago
2 weeks ago
4 days ago
1 week ago
4 days ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
3 weeks ago
1 week ago
2 weeks ago
1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
3 weeks ago
2 weeks ago
1 week ago
3 weeks ago
1 week ago
3 weeks ago
1 week ago
3 weeks ago
4 days ago
3 weeks ago
1 week ago
4 days ago
1 week ago
3 weeks ago
1 week ago
3 weeks 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(!uni.getStorageSync('token')){
  126. this.$utils.toLogin()
  127. return
  128. }
  129. this.$store.commit('getUserInfo', () => {
  130. uni.navigateTo({
  131. url: '/pages/index/index'
  132. })
  133. })
  134. },
  135. }
  136. }
  137. </script>
  138. <style lang="scss" scoped>
  139. .content_now{
  140. display: flex;
  141. flex-direction: column;
  142. align-items: center;
  143. justify-content: center;
  144. text-align: center;
  145. position: fixed;
  146. top: 55%;
  147. transform: translate(0, -50%);
  148. padding: 0 70rpx;
  149. box-sizing: border-box;
  150. width: 100%;
  151. --color2 : #000;
  152. .title-desc{
  153. font-size: 26rpx;
  154. }
  155. .desc{
  156. font-size: 26rpx;
  157. margin-top: 30rpx;
  158. }
  159. .mian-btn{
  160. border-color: $uni-color-primary;
  161. color: $uni-color-primary;
  162. }
  163. .active{
  164. background-color: $uni-color-primary;
  165. color: #fff;
  166. }
  167. .checkbox{
  168. margin-top: 470rpx;
  169. view{
  170. line-height: 50rpx;
  171. }
  172. .privacy{
  173. color: #1e52ff;
  174. }
  175. }
  176. .uni-color-btn{
  177. width: 80%;
  178. }
  179. .flex-center {
  180. display: flex;
  181. justify-content: center;
  182. align-items: center;
  183. font-size: 26rpx;
  184. }
  185. }
  186. .checkboxPopupContent{
  187. padding: 40rpx;
  188. display: flex;
  189. flex-wrap: wrap;
  190. view{
  191. color: #1e52ff;
  192. line-height: 50rpx;
  193. }
  194. }
  195. </style>