signIn.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <view>
  3. <view class="title">
  4. <image src="../../static/title.png"></image>
  5. </view>
  6. <view class="an" @click="to(1)">
  7. 账号密码登录
  8. </view>
  9. <!-- <view class="anTwo" @click="to(2)">
  10. 验证码登录
  11. </view> -->
  12. <view class="w">
  13. <u-checkbox-group v-model="checkboxValue1" @change="checkboxChange" style="display: flex; justify-content: center;">
  14. <u-checkbox shape="circle" ></u-checkbox>我已阅读并同意《用户协议》和 《隐私政策》
  15. </u-checkbox-group>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. data() {
  22. return {
  23. checkboxValue1: [],
  24. checkbox: '',
  25. }
  26. },
  27. onLoad() {
  28. },
  29. methods: {
  30. checkboxChange(n) {
  31. console.log('change', n, n.length);
  32. this.checkbox = n.length
  33. },
  34. to(type){
  35. if(this.checkbox != 1){
  36. this.$u.toast('请勾选下方同意')
  37. return
  38. }
  39. if(type == 1){
  40. // 跳转账号密码登录
  41. uni.navigateTo({
  42. url: `/pages/signIn/logOn?type=${type}`
  43. })
  44. }else{
  45. // 跳转验证码登录
  46. uni.navigateTo({
  47. url: `/pages/signIn/logOn?type=${type}`
  48. })
  49. }
  50. }
  51. }
  52. }
  53. </script>
  54. <style lang="scss" scoped>
  55. page{
  56. padding: 0 32rpx;
  57. /* background-color: #D9D9D9; */
  58. background-color: #fff !important;
  59. }
  60. .title{
  61. width: 372rpx;
  62. height: 208rpx;
  63. margin: 0 auto;
  64. margin-top: 118rpx;
  65. image{
  66. width: 100%;
  67. height: 100%;
  68. }
  69. }
  70. .inp{
  71. height: 100rpx;
  72. background: #ededed;
  73. border-radius: 64rpx;
  74. display: flex;
  75. align-items: center;
  76. padding-left: 95rpx;
  77. margin-bottom: 52rpx;
  78. position: relative;
  79. .i{
  80. position: absolute;
  81. right: 52rpx;
  82. }
  83. text{
  84. position: absolute;
  85. left: 96rpx;
  86. font-size: 32rpx;
  87. color: rgba(0,0,0,0.38);
  88. }
  89. }
  90. .an{
  91. width: 564rpx;
  92. height: 112rpx;
  93. color: #fff;
  94. background-color: #846FFE;
  95. text-align: center;
  96. line-height: 112rpx;
  97. margin: 0 auto;
  98. border-radius: 64rpx;
  99. font-size: 32rpx;
  100. margin-top: 236rpx;
  101. }
  102. .anTwo{
  103. width: 564rpx;
  104. height: 112rpx;
  105. color: #846FFE;
  106. // background-color: #846FFE;
  107. border: 2rpx solid #846FFE;
  108. text-align: center;
  109. line-height: 112rpx;
  110. margin: 0 auto;
  111. border-radius: 64rpx;
  112. font-size: 32rpx;
  113. margin-top: 50rpx;
  114. }
  115. .w{
  116. font-size: 25rpx;
  117. color: rgba(0,0,0,0.60);
  118. margin-top: 476rpx;
  119. }
  120. </style>