auth.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <template>
  2. <view class="flex-col section">
  3. <cu-custom bgColor="#fff"><view slot="content" style="color: #FFFFFF">UU睡眠</view></cu-custom>
  4. <view class="flex-col items-center group_3 space-y-20">
  5. <text class="text_2 text_3">UU睡眠</text>
  6. <text class="font_1 text_2">AI时代,全家人的睡眠健康顾问</text>
  7. </view>
  8. <view class="flex-col group_4 space-y-20">
  9. <text class="font_2 text_4">为了保证用户安全和更好的用户体验,请确认授权以下信息</text>
  10. <view class="flex-row items-center group_5 space-x-6">
  11. <view class="section_5"></view>
  12. <text class="font_3 text_5">获取你的昵称、头像、地区、性别</text>
  13. </view>
  14. <view class="flex-row items-center group_5 space-x-6">
  15. <view class="section_5"></view>
  16. <text class="font_3 text_5">获取你的手机号码</text>
  17. </view>
  18. </view>
  19. <view class="flex-col justify-start items-center self-end button" @click="getUserProfile"><text class="font_2 text_6">确认授权</text></view>
  20. </view>
  21. </template>
  22. <script>
  23. import Storage from '@/utils/storage'
  24. export default {
  25. data() {
  26. return {
  27. };
  28. },
  29. methods: {
  30. getUserProfile(e) {
  31. wx.getUserProfile({
  32. desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
  33. success: (res) => {
  34. const data = {
  35. gender: res.userInfo.gender,
  36. nickName: res.userInfo.nickName,
  37. }
  38. Storage.setItem("agreeLogin", true)
  39. Storage.setItem("myWeixinInfo", res.userInfo)
  40. // this.hasAuth = true;
  41. this.toAutoLogin()
  42. }
  43. })
  44. }
  45. }
  46. }
  47. </script>
  48. <style lang="scss">
  49. .section {
  50. padding-bottom: 20.5rem;
  51. backdrop-filter: blur(0.19rem);
  52. background-image: url('https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/649415135a7e3f0310661c1e/649415b654fe0000116ae544/16876231037161018927.png');
  53. background-size: 100% 100%;
  54. background-repeat: no-repeat;
  55. .section_2 {
  56. padding: 1.13rem 0.44rem 0.38rem;
  57. background-color: #ffffff4d;
  58. .group {
  59. padding: 0 0.5rem;
  60. .image {
  61. width: 1.06rem;
  62. height: 0.69rem;
  63. }
  64. .image_2 {
  65. width: 0.94rem;
  66. height: 0.69rem;
  67. }
  68. .image_3 {
  69. width: 1.5rem;
  70. height: 0.72rem;
  71. }
  72. }
  73. .space-x-6-reverse {
  74. & > view:not(:last-child),
  75. & > text:not(:last-child),
  76. & > image:not(:last-child) {
  77. margin-right: 0.38rem;
  78. }
  79. }
  80. .group_2 {
  81. padding: 0.63rem 0 0.38rem;
  82. .text {
  83. font-size: 1.16rem;
  84. }
  85. .section_3 {
  86. padding: 0.38rem 0.75rem;
  87. background-color: #ffffff99;
  88. border-radius: 1rem;
  89. border: solid 0.031rem #00000014;
  90. .image-wrapper {
  91. width: 1.19rem;
  92. .image_5 {
  93. width: 1.19rem;
  94. height: 0.44rem;
  95. }
  96. .image_4 {
  97. width: 1.13rem;
  98. height: 1.06rem;
  99. }
  100. }
  101. .section_4 {
  102. background-color: #00000033;
  103. width: 0.063rem;
  104. height: 1.16rem;
  105. }
  106. }
  107. .space-x-11 {
  108. & > view:not(:first-child),
  109. & > text:not(:first-child),
  110. & > image:not(:first-child) {
  111. margin-left: 0.69rem;
  112. }
  113. }
  114. .pos {
  115. position: absolute;
  116. right: 0;
  117. top: 50%;
  118. transform: translateY(-50%);
  119. }
  120. }
  121. }
  122. .space-y-22 {
  123. & > view:not(:first-child),
  124. & > text:not(:first-child),
  125. & > image:not(:first-child) {
  126. margin-top: 1.38rem;
  127. }
  128. }
  129. .group_3 {
  130. padding: 4rem 0;
  131. .text_2 {
  132. opacity: 0.76;
  133. }
  134. .text_3 {
  135. color: #ffffff;
  136. font-size: 1.88rem;
  137. font-family: PingFangSC;
  138. line-height: 1.72rem;
  139. }
  140. }
  141. .space-y-20 {
  142. & > view:not(:first-child),
  143. & > text:not(:first-child),
  144. & > image:not(:first-child) {
  145. margin-top: 1.25rem;
  146. }
  147. }
  148. .font_1 {
  149. font-size: 1.13rem;
  150. font-family: PingFangSC;
  151. line-height: 1.06rem;
  152. color: #ffffff;
  153. }
  154. .group_4 {
  155. margin: 0.25rem 1.25rem 0;
  156. padding-top: 1.38rem;
  157. border-top: solid 0.063rem #ffffff4d;
  158. .text_4 {
  159. margin: 0 0.5rem;
  160. line-height: 1.19rem;
  161. }
  162. .group_5 {
  163. padding: 0 0.44rem;
  164. .section_5 {
  165. background-color: #ffffff99;
  166. border-radius: 50%;
  167. width: 0.13rem;
  168. height: 0.13rem;
  169. }
  170. .font_3 {
  171. font-size: 0.75rem;
  172. font-family: PingFangSC;
  173. line-height: 0.69rem;
  174. color: #ffffff;
  175. }
  176. .text_5 {
  177. opacity: 0.6;
  178. }
  179. }
  180. .space-x-6 {
  181. & > view:not(:first-child),
  182. & > text:not(:first-child),
  183. & > image:not(:first-child) {
  184. margin-left: 0.38rem;
  185. }
  186. }
  187. }
  188. .button {
  189. margin-right: 0.81rem;
  190. margin-top: 2.5rem;
  191. padding: 0.5rem 0;
  192. background-image: linear-gradient(90deg, #0a1ecf 0%, #5611f7f5 100%);
  193. border-radius: 1rem;
  194. width: 20.94rem;
  195. .text_6 {
  196. line-height: 0.94rem;
  197. }
  198. }
  199. .font_2 {
  200. font-size: 1rem;
  201. font-family: PingFangSC;
  202. color: #ffffff;
  203. }
  204. }
  205. </style>