知识付费微信小程序
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.

153 lines
2.7 KiB

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