【PT.SCC实名制管理系统】24.10.01 -30天,考勤打卡小程序
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.

178 lines
3.7 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <div class="login">
  3. <!-- logo -->
  4. <div class="logo">
  5. 打卡系统
  6. </div>
  7. <!-- 标题 -->
  8. <view class="login-title">工程项目打卡系统</view>
  9. <!-- 使用说明 -->
  10. <view class="usage-notice">
  11. <text class="notice-icon"></text>
  12. <text class="notice-text">仅限公司内部人员使用</text>
  13. <text class="notice-desc">请确保您是本公司员工未经授权禁止使用</text>
  14. </view>
  15. <!-- 登录按钮 -->
  16. <view @click="login" class="login-btn">
  17. <uni-icons type="weixin" size="30" color="#fff"></uni-icons>
  18. <text class="wx">微信登录</text>
  19. </view>
  20. <!-- 隐私政策 -->
  21. <view class="privacy">
  22. <uv-radio-group>
  23. <uv-checkbox-group v-model="consent">
  24. <uv-checkbox :size="30" shape="circle" active-color="#05C160" :name="privacy"></uv-checkbox>
  25. </uv-checkbox-group>
  26. 已同意
  27. <!-- <text class="privacy-title">隐私政策</text> -->
  28. <text class="privacy-title" @click="$refs.popup.open('bottom')">服务条款</text>
  29. </uv-radio-group>
  30. </view>
  31. <uv-popup ref="popup" :round="30" :customStyle="{height: '50vh'}">
  32. <view class="content">
  33. <uv-parse :content="content"></uv-parse>
  34. </view>
  35. </uv-popup>
  36. <!-- 隐私政策弹框 -->
  37. <PrivacyAgreementPoup></PrivacyAgreementPoup>
  38. </div>
  39. </template>
  40. <script>
  41. import PrivacyAgreementPoup from '@/components/PrivacyAgreementPoup/PrivacyAgreementPoup.vue'
  42. import txt from './txt.js'
  43. export default {
  44. name : "Login",
  45. components : { PrivacyAgreementPoup },
  46. data() {
  47. return {
  48. consent : [],
  49. content : '',
  50. }
  51. },
  52. onLoad() {
  53. this.content = txt.txt.replaceAll('\n', '<br>')
  54. },
  55. methods: {
  56. login() {
  57. if(this.consent.length <= 0){
  58. return uni.showToast({
  59. icon: "none",
  60. title: "请勾选隐私协议"
  61. })
  62. }
  63. this.$store.commit('login')
  64. }
  65. }
  66. }
  67. </script>
  68. <style lang="scss" scoped>
  69. .login {
  70. display: flex;
  71. flex-direction: column;
  72. justify-content: center;
  73. align-items: center;
  74. min-height: 100vh;
  75. background: white;
  76. // logo
  77. .logo {
  78. display: flex;
  79. align-items: center;
  80. justify-content: center;
  81. padding: 20rpx 0rpx;
  82. width: 40%;
  83. color: white;
  84. background: linear-gradient(180deg, #4C9EEA, #6DB9FF);
  85. border-radius: 45rpx 13rpx 45rpx 13rpx;
  86. font-size: 60rpx;
  87. }
  88. // 标题
  89. .login-title {
  90. font-size: 40rpx;
  91. font-weight: bold;
  92. margin: 20rpx 0rpx;
  93. }
  94. // 使用说明
  95. .usage-notice {
  96. display: flex;
  97. flex-direction: column;
  98. align-items: center;
  99. width: 80%;
  100. margin: 40rpx 0rpx;
  101. padding: 30rpx 20rpx;
  102. background: linear-gradient(135deg, #fff3e0, #ffecb3);
  103. border: 2rpx solid #ff9800;
  104. border-radius: 20rpx;
  105. box-shadow: 0rpx 4rpx 12rpx rgba(255, 152, 0, 0.2);
  106. .notice-icon {
  107. font-size: 32rpx;
  108. margin-bottom: 10rpx;
  109. }
  110. .notice-text {
  111. font-size: 28rpx;
  112. font-weight: bold;
  113. color: #e65100;
  114. margin-bottom: 8rpx;
  115. text-align: center;
  116. }
  117. .notice-desc {
  118. font-size: 22rpx;
  119. color: #bf360c;
  120. text-align: center;
  121. line-height: 1.4;
  122. }
  123. }
  124. //登录按钮
  125. .login-btn {
  126. display: flex;
  127. justify-content: center;
  128. align-items: center;
  129. width: 70%;
  130. background: #05C160;
  131. height: 90rpx;
  132. border-radius: 45rpx;
  133. color: white;
  134. margin-top: 200rpx;
  135. .wx {
  136. margin-left: 10rpx;
  137. }
  138. }
  139. //隐私政策
  140. .privacy {
  141. display: flex;
  142. align-items: center;
  143. margin-top: 20rpx;
  144. &::v-deep .uv-checkbox-group {
  145. align-items: center !important;
  146. justify-content: center !important;
  147. flex-wrap : nowrap !important;
  148. }
  149. .privacy-title {
  150. color: #05C160;
  151. }
  152. }
  153. .content{
  154. padding: 30rpx 20rpx;
  155. overflow: scroll;
  156. height: 100%;
  157. box-sizing: border-box;
  158. }
  159. }
  160. </style>