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

155 lines
2.8 KiB

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