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

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