工单小程序2024-11-20
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.

152 lines
2.7 KiB

1 year 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. @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. 使用短信验证登录
  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="$refs.popup.open('getPrivacyPolicy')">服务协议与隐私条款</text>
  35. </view>
  36. <view class="">
  37. 以及<text @click="$refs.popup.open('getUserAgreement')">个人信息保护指引</text>
  38. </view>
  39. </view>
  40. </uv-checkbox-group>
  41. </view>
  42. <configPopup ref="popup"></configPopup>
  43. </view>
  44. </template>
  45. <script>
  46. export default {
  47. name : 'Login',
  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: 140rpx;
  80. width: 140rpx;
  81. background-color: #ddd;
  82. border-radius: 30rpx;
  83. image{
  84. width: 80rpx;
  85. height: 80rpx;
  86. }
  87. margin-bottom: 20rpx;
  88. }
  89. .title{
  90. position: relative;
  91. font-weight: 900;
  92. font-size: 45rpx;
  93. &::after{
  94. content: '';
  95. position: absolute;
  96. left: 0;
  97. top: 100%;
  98. display: block;
  99. height: 8rpx;
  100. width: 210rpx;
  101. background: linear-gradient(to right,$uni-color, #fff);
  102. }
  103. }
  104. .btn{
  105. width: 80%;
  106. height: 100rpx;
  107. background-color: $uni-color;
  108. color: #fff;
  109. display: flex;
  110. justify-content: center;
  111. align-items: center;
  112. margin: 20rpx 0;
  113. border-radius: 20rpx;
  114. .icon{
  115. margin-right: 10rpx;
  116. image{
  117. width: 40rpx;
  118. height: 35rpx;
  119. }
  120. }
  121. }
  122. .b2{
  123. background-color: rgba($uni-color, 0.2);
  124. color: $uni-color;
  125. }
  126. .mt{
  127. margin-top: 200rpx;
  128. }
  129. .config{
  130. position: absolute;
  131. bottom: 0;
  132. font-size: 24rpx;
  133. text-align: center;
  134. line-height: 40rpx;
  135. text{
  136. color: $uni-color;
  137. }
  138. }
  139. }
  140. </style>