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

239 lines
4.9 KiB

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 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. const accountInfo = wx.getAccountInfoSync();
  78. let envVersion = accountInfo.miniProgram.envVersion;
  79. import { mapState } from 'vuex'
  80. export default {
  81. data() {
  82. return {
  83. isActive : null,
  84. checkboxValue : [],
  85. configObj : {},
  86. keys : ['user_ys_one', 'user_ys_two', 'user_xy_three', 'user_xy_four'],
  87. privacyPolicyList : [],
  88. }
  89. },
  90. computed : {
  91. },
  92. onLoad() {
  93. uni.$on('initConfig', data => {
  94. this.configObj = data
  95. })
  96. this.getPrivacyPolicyList()
  97. this.$store.commit('login')
  98. },
  99. onShow() {
  100. },
  101. methods: {
  102. setActive(value){
  103. this.isActive = value
  104. },
  105. getPrivacyPolicyList(){
  106. this.$api('privacyPolicyList', res => {
  107. if(res.code == 200){
  108. this.privacyPolicyList = res.result
  109. }
  110. })
  111. },
  112. next(){
  113. if(!this.isActive){
  114. uni.showToast({
  115. title:'请选择',
  116. icon: 'none'
  117. })
  118. return
  119. }
  120. if(!this.checkboxValue.length){
  121. uni.showToast({
  122. title:'请同意隐私政策',
  123. icon: 'none'
  124. })
  125. // this.$refs.popup.openkeys()
  126. return
  127. }
  128. if(this.isActive == '未满18岁'){
  129. uni.showModal({
  130. title: '未满18岁禁止浏览',
  131. })
  132. return
  133. }
  134. if(!uni.getStorageSync('token')){
  135. this.$utils.toLogin()
  136. return
  137. }
  138. if(['release'].includes(envVersion)){
  139. if(!this.userInfo.nickName || !this.userInfo.headImage){
  140. uni.navigateTo({
  141. url: '/pages_order/auth/wxUserInfo'
  142. })
  143. return
  144. }
  145. }
  146. this.$store.commit('getUserInfo', () => {
  147. uni.navigateTo({
  148. url: '/pages/index/index'
  149. })
  150. })
  151. },
  152. }
  153. }
  154. </script>
  155. <style lang="scss" scoped>
  156. .content_now{
  157. display: flex;
  158. flex-direction: column;
  159. align-items: center;
  160. justify-content: center;
  161. text-align: center;
  162. position: fixed;
  163. top: 55%;
  164. transform: translate(0, -50%);
  165. padding: 0 70rpx;
  166. box-sizing: border-box;
  167. width: 100%;
  168. --color2 : #000;
  169. .title-desc{
  170. font-size: 26rpx;
  171. }
  172. .desc{
  173. font-size: 26rpx;
  174. margin-top: 30rpx;
  175. }
  176. .mian-btn{
  177. border-color: $uni-color-primary;
  178. color: $uni-color-primary;
  179. }
  180. .active{
  181. background-color: $uni-color-primary;
  182. color: #fff;
  183. }
  184. .checkbox{
  185. margin-top: 470rpx;
  186. view{
  187. line-height: 50rpx;
  188. }
  189. .privacy{
  190. color: #1e52ff;
  191. }
  192. }
  193. .uni-color-btn{
  194. width: 80%;
  195. }
  196. .flex-center {
  197. display: flex;
  198. justify-content: center;
  199. align-items: center;
  200. font-size: 26rpx;
  201. }
  202. }
  203. .checkboxPopupContent{
  204. padding: 40rpx;
  205. display: flex;
  206. flex-wrap: wrap;
  207. view{
  208. color: #1e52ff;
  209. line-height: 50rpx;
  210. }
  211. }
  212. </style>