鸿宇研学生前端代码
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.

153 lines
2.7 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
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_view">
  3. <view class="flex flex-column content">
  4. <image class="logo" :src="configList.config_logo" mode="widthFix"></image>
  5. <view class="name">{{ configList.app_name }}</view>
  6. <button class="btn btn-login flex" @click="wxLogin" > </button>
  7. <button class="btn btn-cancel flex" @click="onCancel">取消登录</button>
  8. <view class="agreement">
  9. <uv-checkbox-group
  10. v-model="checkboxValue"
  11. shape="circle"
  12. >
  13. <uv-checkbox
  14. size="36rpx"
  15. icon-size="36rpx"
  16. activeColor="#00A9FF"
  17. :name="1"
  18. ></uv-checkbox>
  19. </uv-checkbox-group>
  20. <view class="desc">
  21. 我已阅读并同意
  22. <text class="highlight" @click="$refs.modal.open('service_agreement', '服务协议')">服务协议</text>
  23. <text class="highlight" @click="$refs.modal.open('privacy_policy', '隐私政策')">隐私政策</text>
  24. </view>
  25. </view>
  26. </view>
  27. <agreementConfirmPopup ref="popup" @confirm="onConfirmAgreement"></agreementConfirmPopup>
  28. <agreementModal ref="modal" @confirm="onConfirmAgreement"></agreementModal>
  29. </view>
  30. </template>
  31. <script>
  32. import agreementConfirmPopup from './agreementConfirmPopup.vue'
  33. import agreementModal from '@/pages_order/components/agreementModal.vue'
  34. export default {
  35. name : 'Login',
  36. components: {
  37. agreementConfirmPopup,
  38. agreementModal,
  39. },
  40. data() {
  41. return {
  42. checkboxValue : []
  43. }
  44. },
  45. methods: {
  46. wxLogin(){
  47. if(!this.checkboxValue.length){
  48. this.openAgreementConfirmPopup()
  49. return
  50. }
  51. this.$store.commit('login')
  52. },
  53. openAgreementConfirmPopup() {
  54. this.$refs.popup.open()
  55. },
  56. onConfirmAgreement(confirm) {
  57. if (confirm) {
  58. this.checkboxValue = [1]
  59. } else {
  60. this.checkboxValue = []
  61. }
  62. },
  63. onCancel() {
  64. uni.reLaunch({
  65. url: '/pages/index/index'
  66. })
  67. },
  68. }
  69. }
  70. </script>
  71. <style scoped lang="scss">
  72. .page_view {
  73. width: 100vw;
  74. height: 100vh;
  75. padding: 320rpx 116rpx 0 116rpx;
  76. box-sizing: border-box;
  77. background: #E5F2F9;
  78. }
  79. .content {
  80. width: 100%;
  81. }
  82. .logo {
  83. width: 248rpx;
  84. height: auto;
  85. }
  86. .name {
  87. margin-top: 20rpx;
  88. font-family: Alimama ShuHeiTi;
  89. font-size: 56rpx;
  90. font-weight: 700;
  91. color: #000000;
  92. }
  93. .btn {
  94. width: 100%;
  95. border-radius: 44rpx;
  96. padding: 21rpx 0;
  97. font-size: 30rpx;
  98. line-height: 1.4;
  99. font-family: PingFang SC;
  100. border: 2rpx solid $uni-color;
  101. &-login {
  102. margin-top: 222rpx;
  103. font-weight: 600;
  104. color: #FFFFFF;
  105. background: $uni-color;
  106. }
  107. &-cancel {
  108. margin-top: 24rpx;
  109. font-weight: 400;
  110. color: $uni-color;
  111. background: transparent;
  112. }
  113. }
  114. .agreement {
  115. margin-top: 24rpx;
  116. display: flex;
  117. .desc {
  118. font-family: PingFang SC;
  119. font-size: 24rpx;
  120. font-weight: 400;
  121. line-height: 1.4;
  122. color: #8B8B8B;
  123. }
  124. .highlight {
  125. color: $uni-color;
  126. }
  127. }
  128. </style>