风险测评小程序前端代码仓库
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.

161 lines
3.0 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. <template>
  2. <view class="page_view">
  3. <image class="bg" :src="configList.login_bg" mode="widthFix"></image>
  4. <view class="content flex flex-column">
  5. <image class="logo" :src="configList.app_logo" mode="widthFix"></image>
  6. <!-- <image class="logo" src="@/static/image/icon.png" mode="widthFix"></image> -->
  7. <view class="name">{{ configList.app_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. <view>
  12. <uv-checkbox-group
  13. v-model="checkboxValue"
  14. shape="circle"
  15. >
  16. <uv-checkbox
  17. size="36rpx"
  18. icon-size="36rpx"
  19. activeColor="#014FA2"
  20. :name="1"
  21. ></uv-checkbox>
  22. </uv-checkbox-group>
  23. </view>
  24. <view class="desc">
  25. 阅读并同意我们的
  26. <text class="highlight" @click="$refs.modal.open('config_privacy', '服务协议与隐私条款')">服务协议与隐私条款</text>
  27. 以及
  28. <text class="highlight" @click="$refs.modal.open('config_agreement', '个人信息保护指引')">个人信息保护指引</text>
  29. </view>
  30. </view>
  31. </view>
  32. <agreementConfirmPopup ref="popup" @confirm="onConfirmAgreement"></agreementConfirmPopup>
  33. <agreementModal ref="modal" @confirm="onConfirmAgreement"></agreementModal>
  34. </view>
  35. </template>
  36. <script>
  37. import agreementConfirmPopup from './agreementConfirmPopup.vue'
  38. import agreementModal from '@/pages_order/components/agreementModal.vue'
  39. export default {
  40. name : 'Login',
  41. components: {
  42. agreementConfirmPopup,
  43. agreementModal,
  44. },
  45. data() {
  46. return {
  47. checkboxValue : []
  48. }
  49. },
  50. methods: {
  51. wxLogin(){
  52. if(!this.checkboxValue.length){
  53. this.openAgreementConfirmPopup()
  54. return
  55. }
  56. this.$store.commit('login')
  57. },
  58. openAgreementConfirmPopup() {
  59. this.$refs.popup.open()
  60. },
  61. onConfirmAgreement(confirm) {
  62. if (confirm) {
  63. this.checkboxValue = [1]
  64. } else {
  65. this.checkboxValue = []
  66. }
  67. },
  68. onCancel() {
  69. uni.reLaunch({
  70. url: '/pages/index/index'
  71. })
  72. },
  73. }
  74. }
  75. </script>
  76. <style scoped lang="scss">
  77. .page_view {
  78. width: 100vw;
  79. height: 100vh;
  80. }
  81. .bg {
  82. width: 100%;
  83. height: auto;
  84. }
  85. .content {
  86. transform: translateY(-8rpx);
  87. width: 100%;
  88. padding: 0 78rpx;
  89. box-sizing: border-box;
  90. }
  91. .logo {
  92. width: 100rpx;
  93. height: auto;
  94. }
  95. .name {
  96. margin-top: 20rpx;
  97. font-size: 36rpx;
  98. font-weight: 700;
  99. color: #000000;
  100. }
  101. .btn {
  102. width: 100%;
  103. border-radius: 44rpx;
  104. padding: 23rpx 0;
  105. font-size: 32rpx;
  106. line-height: 1.4;
  107. font-family: PingFang SC;
  108. &-login {
  109. margin-top: 97rpx;
  110. color: #FFFFFF;
  111. background: #014FA2;
  112. border: 2rpx solid #014FA2;
  113. }
  114. &-cancel {
  115. margin-top: 66rpx;
  116. color: #999999;
  117. border: 2rpx solid #999999;
  118. }
  119. }
  120. .agreement {
  121. margin-top: 24rpx;
  122. width: 100%;
  123. display: flex;
  124. justify-content: flex-start;
  125. .desc {
  126. font-family: PingFang SC;
  127. font-size: 22rpx;
  128. font-weight: 400;
  129. line-height: 1.4;
  130. color: #000000;
  131. }
  132. .highlight {
  133. color: $uni-color;
  134. }
  135. }
  136. </style>