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

158 lines
2.8 KiB

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