建材商城系统20241014
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.

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