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

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