普兆健康管家前端代码仓库
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.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
  1. <template>
  2. <view class="page_view">
  3. <image class="bg" :src="configList.login_bg" mode="aspectFill"></image>
  4. <view class="content flex flex-column">
  5. <image class="logo" :src="configList.login_logo" mode="widthFix"></image>
  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="#7451DE"
  17. :name="1"
  18. ></uv-checkbox>
  19. </uv-checkbox-group>
  20. <view class="desc">
  21. 我已阅读并同意
  22. <text class="highlight" @click="$refs.modal.open('user_ys', '服务协议与隐私条款')">服务协议与隐私条款</text>
  23. <text class="highlight" @click="$refs.modal.open('user_bh', '个人信息保护指引')">个人信息保护指引</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. }
  76. .bg,
  77. .content {
  78. width: 100%;
  79. height: 100%;
  80. }
  81. .content {
  82. position: absolute;
  83. top: 0;
  84. justify-content: flex-end;
  85. padding: 0 58rpx 208rpx 58rpx;
  86. box-sizing: border-box;
  87. }
  88. .logo {
  89. width: 366rpx;
  90. height: auto;
  91. }
  92. .btn {
  93. width: 100%;
  94. border-radius: 44rpx;
  95. padding: 23rpx 0;
  96. font-size: 30rpx;
  97. line-height: 1.4;
  98. font-family: PingFang SC;
  99. &-login {
  100. margin-top: 116rpx;
  101. padding: 24rpx 0;
  102. font-weight: 600;
  103. color: #FFFFFF;
  104. background-image: linear-gradient(to right, #007FFF, #644CFF, #BE76F7);
  105. box-shadow: 12rpx 12rpx 36rpx 0 rgba(0, 0, 0, 0.06),
  106. -8rpx -8rpx 26rpx 0 #FFFFFF,
  107. 8rpx 8rpx 14rpx 0 rgba(0, 0, 0, 0.07);
  108. }
  109. &-cancel {
  110. margin-top: 24rpx;
  111. font-weight: 400;
  112. color: $uni-color;
  113. border: 1rpx solid $uni-color;
  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>