瑶都万能墙
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.

155 lines
2.7 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="login">
  3. <view class="logo">
  4. <image src="/static/image/logo.jpg"
  5. mode=""></image>
  6. </view>
  7. <view class="title">
  8. 欢迎使用瑶都万能墙
  9. </view>
  10. <view class="btn mt"
  11. @click="wxLogin">
  12. <view class="icon">
  13. <image src="../static/auth/wx.png" mode=""></image>
  14. </view>
  15. <view class="">
  16. 微信授权登录
  17. </view>
  18. </view>
  19. <!-- <view class="btn b2">
  20. 使用短信验证登录
  21. </view> -->
  22. <view class="config">
  23. <uv-checkbox-group
  24. v-model="checkboxValue"
  25. shape="circle">
  26. <view class="content">
  27. <view
  28. style="display: flex;">
  29. <uv-checkbox
  30. size="40rpx"
  31. icon-size="30rpx"
  32. activeColor="#5baaff"
  33. :name="1"
  34. ></uv-checkbox>
  35. 阅读并同意我们的<text @click="openConfigDetail('getPrivacyPolicy')">服务协议与隐私条款</text>
  36. </view>
  37. <view class="">
  38. 以及<text @click="openConfigDetail('getUserAgreement')">个人信息保护指引</text>
  39. </view>
  40. </view>
  41. </uv-checkbox-group>
  42. </view>
  43. <configPopup ref="popup"></configPopup>
  44. </view>
  45. </template>
  46. <script>
  47. import configPopup from '@/components/config/configPopup.vue';
  48. export default {
  49. name : 'Login',
  50. data() {
  51. return {
  52. checkboxValue : []
  53. }
  54. },
  55. methods: {
  56. wxLogin(){
  57. if(!this.checkboxValue.length){
  58. return uni.showToast({
  59. title: '请先同意隐私协议',
  60. icon:'none'
  61. })
  62. }
  63. this.$store.commit('login')
  64. },
  65. //打开应用配置
  66. openConfigDetail(key){
  67. this.$refs.popup.open(key)
  68. }
  69. }
  70. }
  71. </script>
  72. <style scoped lang="scss">
  73. .login{
  74. display: flex;
  75. justify-content: center;
  76. align-items: center;
  77. height: 80vh;
  78. flex-direction: column;
  79. position: relative;
  80. .logo{
  81. height: 140rpx;
  82. width: 140rpx;
  83. background-color: #ddd;
  84. border-radius: 30rpx;
  85. image{
  86. width: 100%;
  87. height: 100%;
  88. border-radius: 30rpx;
  89. }
  90. margin-bottom: 20rpx;
  91. }
  92. .title{
  93. position: relative;
  94. font-weight: 900;
  95. font-size: 45rpx;
  96. &::after{
  97. content: '';
  98. position: absolute;
  99. left: 0;
  100. top: 100%;
  101. display: block;
  102. height: 8rpx;
  103. width: 210rpx;
  104. background: linear-gradient(to right,$uni-color, #fff);
  105. }
  106. }
  107. .btn{
  108. width: 80%;
  109. height: 100rpx;
  110. background-color: $uni-color;
  111. color: #fff;
  112. display: flex;
  113. justify-content: center;
  114. align-items: center;
  115. margin: 20rpx 0;
  116. border-radius: 20rpx;
  117. .icon{
  118. margin-right: 10rpx;
  119. image{
  120. width: 40rpx;
  121. height: 35rpx;
  122. }
  123. }
  124. }
  125. .b2{
  126. background-color: #3c69f122;
  127. color: #3c69f1;
  128. }
  129. .mt{
  130. margin-top: 200rpx;
  131. }
  132. .config{
  133. position: absolute;
  134. bottom: 0;
  135. font-size: 22rpx;
  136. text-align: center;
  137. line-height: 40rpx;
  138. text{
  139. color: $uni-color;
  140. }
  141. }
  142. }
  143. </style>