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

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