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

167 lines
2.9 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months 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. <button class="btn btn-cancel" :plain="true" :hairline="false" @click="onCancel">
  18. 暂不登录
  19. </button>
  20. <view class="agreement">
  21. <uv-checkbox-group
  22. v-model="checkboxValue"
  23. shape="circle">
  24. <view>
  25. <uv-checkbox
  26. size="32rpx"
  27. icon-size="32rpx"
  28. activeColor="#07C160"
  29. :name="1"
  30. :customStyle="{
  31. display: 'inline-block',
  32. marginRight: '20rpx',
  33. }"
  34. ></uv-checkbox>
  35. <text style="vertical-align: super;">
  36. 我已阅读<text class="highlight" @click="openModal">裂变星小程序用户注册协议裂变星小程序隐私保护协议</text>
  37. </text>
  38. </view>
  39. </uv-checkbox-group>
  40. </view>
  41. </view>
  42. </view>
  43. <agreementModal ref="modal" @confirm="onConfirmAggrement"></agreementModal>
  44. </view>
  45. </template>
  46. <script>
  47. import { mapState } from 'vuex'
  48. import agreementModal from './agreementModal.vue'
  49. export default {
  50. name : 'Login',
  51. components: {
  52. agreementModal
  53. },
  54. data() {
  55. return {
  56. checkboxValue : []
  57. }
  58. },
  59. computed: {
  60. ...mapState(['configList'])
  61. },
  62. methods: {
  63. wxLogin(){
  64. if(!this.checkboxValue.length){
  65. return uni.showToast({
  66. title: '请先同意隐私协议',
  67. icon:'none'
  68. })
  69. }
  70. this.$store.commit('login')
  71. },
  72. openModal() {
  73. this.$refs.modal.open()
  74. },
  75. onConfirmAggrement(confirm) {
  76. if (confirm) {
  77. this.checkboxValue = [1]
  78. } else {
  79. this.checkboxValue = []
  80. }
  81. },
  82. onCancel() {
  83. uni.reLaunch({
  84. url: '/pages/index/index'
  85. })
  86. },
  87. }
  88. }
  89. </script>
  90. <style scoped lang="scss">
  91. .page {
  92. background-color: $uni-fg-color;
  93. position: relative;
  94. width: 100vw;
  95. height: 100vh;
  96. }
  97. .logo {
  98. width: 148rpx;
  99. height: 148rpx;
  100. margin-top: 96rpx;
  101. }
  102. .title {
  103. color: #333333;
  104. font-size: 32rpx;
  105. font-weight: 900;
  106. margin-top: 20rpx;
  107. }
  108. .operation {
  109. position: absolute;
  110. bottom: 452rpx;
  111. left: 0;
  112. width: 100vw;
  113. padding: 0 60rpx;
  114. box-sizing: border-box;
  115. }
  116. .btn {
  117. width: 100%;
  118. height: auto;
  119. border-radius: 45rpx;
  120. background-color: #07C160;
  121. color: #FFFFFF;
  122. border: none;
  123. padding: 25rpx 0;
  124. box-sizing: border-box;
  125. font-size: 28rpx;
  126. line-height: 1;
  127. margin: 0;
  128. &-cancel {
  129. color: #c7c7c7;
  130. background-color: transparent;
  131. border: 1rpx solid #c7c7c7;
  132. margin-top: 60rpx;
  133. }
  134. }
  135. .agreement {
  136. margin-top: 41rpx;
  137. color: #474747;
  138. font-size: 24rpx;
  139. line-height: 32rpx;
  140. .highlight {
  141. color: #05D9A2;
  142. }
  143. }
  144. </style>