裂变星小程序-25.03.04
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.

150 lines
2.6 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. <template>
  2. <view class="page">
  3. <navbar title="登录" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="flex flex-column" style="justify-content: flex-start;">
  5. <image class="logo" :src="configList.logo_image" mode=""></image>
  6. <view class="title">
  7. {{ configList.logo_name }}
  8. </view>
  9. <view class="operation">
  10. <button
  11. :plain="true" :hairline="false"
  12. class="btn"
  13. @click="wxLogin"
  14. >
  15. 微信登录
  16. </button>
  17. <view class="agreement">
  18. <uv-checkbox-group
  19. v-model="checkboxValue"
  20. shape="circle">
  21. <view>
  22. <uv-checkbox
  23. size="32rpx"
  24. icon-size="32rpx"
  25. activeColor="#07C160"
  26. :name="1"
  27. :customStyle="{
  28. display: 'inline-block',
  29. marginRight: '20rpx',
  30. }"
  31. ></uv-checkbox>
  32. <text style="vertical-align: super;">
  33. 我已阅读<text class="highlight" @click="openModal">裂变星小程序用户注册协议裂变星小程序隐私保护协议</text>
  34. </text>
  35. </view>
  36. </uv-checkbox-group>
  37. </view>
  38. </view>
  39. </view>
  40. <agreementModal ref="modal" @confirm="onConfirmAggrement"></agreementModal>
  41. </view>
  42. </template>
  43. <script>
  44. import { mapState } from 'vuex'
  45. import agreementModal from './agreementModal.vue'
  46. export default {
  47. name : 'Login',
  48. components: {
  49. agreementModal
  50. },
  51. data() {
  52. return {
  53. checkboxValue : []
  54. }
  55. },
  56. computed: {
  57. ...mapState(['userInfo']),
  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. openModal() {
  70. this.$refs.modal.open()
  71. },
  72. onConfirmAggrement(confirm) {
  73. if (confirm) {
  74. this.checkboxValue = [1]
  75. } else {
  76. this.checkboxValue = []
  77. }
  78. },
  79. }
  80. }
  81. </script>
  82. <style scoped lang="scss">
  83. .page {
  84. background-color: $uni-fg-color;
  85. position: relative;
  86. width: 100vw;
  87. height: 100vh;
  88. }
  89. .logo {
  90. width: 148rpx;
  91. height: 148rpx;
  92. margin-top: 96rpx;
  93. }
  94. .title {
  95. color: #333333;
  96. font-size: 32rpx;
  97. font-weight: 900;
  98. margin-top: 20rpx;
  99. }
  100. .operation {
  101. position: absolute;
  102. bottom: 452rpx;
  103. left: 0;
  104. width: 100vw;
  105. padding: 0 60rpx;
  106. box-sizing: border-box;
  107. }
  108. .btn {
  109. width: 100%;
  110. height: auto;
  111. border-radius: 45rpx;
  112. background-color: #07C160;
  113. color: #FFFFFF;
  114. border: none;
  115. padding: 25rpx 0;
  116. box-sizing: border-box;
  117. font-size: 28rpx;
  118. line-height: 1;
  119. margin: 0;
  120. }
  121. .agreement {
  122. margin-top: 41rpx;
  123. color: #474747;
  124. font-size: 24rpx;
  125. line-height: 32rpx;
  126. .highlight {
  127. color: #05D9A2;
  128. }
  129. }
  130. </style>