酒店桌布为微信小程序
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.

166 lines
3.0 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="login">
  3. <view class="logo">
  4. <image src="/static/logo.jpg" mode="aspectFill"></image>
  5. </view>
  6. <view class="title">
  7. 欢迎使用布周道
  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"
  19. @click="$utils.navigateTo('/pages_order/auth/loginAndRegisterAndForgetPassword')">
  20. 使用账号密码登录
  21. </view>
  22. <view class="btn b3"
  23. @click="qux">
  24. 取消登录
  25. </view>
  26. <view class="config">
  27. <uv-checkbox-group
  28. v-model="checkboxValue"
  29. shape="circle">
  30. <view class="content">
  31. <view
  32. style="display: flex;">
  33. <uv-checkbox
  34. size="40rpx"
  35. icon-size="30rpx"
  36. activeColor="#FD5100"
  37. :name="1"
  38. ></uv-checkbox>
  39. 阅读并同意我们的<text @click="openConfigDetail('getPrivacyPolicy')">服务协议与隐私条款</text>
  40. </view>
  41. <view class="">
  42. 以及<text @click="openConfigDetail('getUserAgreement')">个人信息保护指引</text>
  43. </view>
  44. </view>
  45. </uv-checkbox-group>
  46. </view>
  47. <configPopup ref="popup"></configPopup>
  48. </view>
  49. </template>
  50. <script>
  51. import configPopup from '@/components/config/configPopup.vue';
  52. export default {
  53. name : 'Login',
  54. data() {
  55. return {
  56. checkboxValue : []
  57. }
  58. },
  59. methods: {
  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. qux(){
  74. uni.reLaunch({
  75. url: '/pages/index/index'
  76. })
  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: 100vh;
  87. flex-direction: column;
  88. position: relative;
  89. background-color: #fff;
  90. .logo{
  91. height: 140rpx;
  92. width: 140rpx;
  93. image{
  94. width: 100%;
  95. height: 100%;
  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. .b3{
  137. background-color: #fff;
  138. color: $uni-color;
  139. box-sizing: border-box;
  140. }
  141. .mt{
  142. margin-top: 200rpx;
  143. }
  144. .config{
  145. // position: absolute;
  146. margin-top: 100rpx;
  147. font-size: 22rpx;
  148. text-align: center;
  149. line-height: 40rpx;
  150. text{
  151. color: $uni-color;
  152. }
  153. }
  154. }
  155. </style>