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

164 lines
2.9 KiB

9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
1 week ago
9 months ago
9 months ago
9 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. onLoad(query) {
  55. if (query.shareId) {
  56. uni.setStorageSync('shareId', query.shareId)
  57. }
  58. if(query.isTokenPath && uni.getStorageSync('token')){
  59. this.qux()
  60. }
  61. },
  62. methods: {
  63. qux(){
  64. uni.reLaunch({
  65. url: '/pages/index/index'
  66. })
  67. },
  68. wxLogin(){
  69. if(!this.checkboxValue.length){
  70. return uni.showToast({
  71. title: '请先同意隐私协议',
  72. icon:'none'
  73. })
  74. }
  75. this.$store.commit('login')
  76. },
  77. //打开应用配置
  78. openConfigDetail(key){
  79. this.$refs.popup.open(key)
  80. }
  81. }
  82. }
  83. </script>
  84. <style scoped lang="scss">
  85. .login{
  86. display: flex;
  87. justify-content: center;
  88. align-items: center;
  89. height: 80vh;
  90. flex-direction: column;
  91. position: relative;
  92. .logo{
  93. height: 140rpx;
  94. width: 140rpx;
  95. image{
  96. width: 140rpx;
  97. height: 140rpx;
  98. border-radius: 50%;
  99. }
  100. margin-bottom: 20rpx;
  101. }
  102. .title{
  103. position: relative;
  104. font-weight: 900;
  105. font-size: 45rpx;
  106. &::after{
  107. content: '';
  108. position: absolute;
  109. left: 0;
  110. top: 100%;
  111. display: block;
  112. height: 8rpx;
  113. width: 210rpx;
  114. background: linear-gradient(to right,$uni-color, #fff);
  115. }
  116. }
  117. .btn{
  118. width: 80%;
  119. height: 100rpx;
  120. background-color: $uni-color;
  121. color: #fff;
  122. display: flex;
  123. justify-content: center;
  124. align-items: center;
  125. margin: 20rpx 0;
  126. border-radius: 20rpx;
  127. .icon{
  128. margin-right: 10rpx;
  129. image{
  130. width: 40rpx;
  131. height: 35rpx;
  132. }
  133. }
  134. }
  135. .b2{
  136. background-color: rgba($uni-color, 0.2);
  137. color: $uni-color;
  138. }
  139. .mt{
  140. margin-top: 200rpx;
  141. }
  142. .config{
  143. position: absolute;
  144. bottom: 0;
  145. font-size: 22rpx;
  146. text-align: center;
  147. line-height: 40rpx;
  148. text{
  149. color: $uni-color;
  150. }
  151. }
  152. }
  153. </style>