login.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <template>
  2. <view class="login">
  3. <statusBar :item='navBarData'></statusBar>
  4. <view class="img">
  5. <image src="http://43.139.158.220:5007/img/static/yym/image7.png" mode="aspectFill"></image>
  6. </view>
  7. <view class="mid">
  8. <!-- <radio value="r1" @click="radioCheck" size="10" :checked="isOK" /> -->
  9. <view class="" style="position: relative;padding-left:30rpx;">
  10. 我已阅读并同意<text>《教育小程序服务条款》</text>和 <text>《 隐私协议》</text>新用户自动注册
  11. <view class="quan" @click="isDui">
  12. <image v-if="isShow" class="dui" src="http://43.139.158.220:5007/img/static/yym/dui.png" mode="aspectFill"></image>
  13. </view>
  14. </view>
  15. </view>
  16. <button class="btn" @click="gotoIndex">一键登录</button>
  17. <view class="footer" @click="goto">
  18. <text>手机号登录/账号密码登录</text>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. data() {
  25. return {
  26. isOK: false,
  27. navBarData: {
  28. title: '首页',
  29. btn: 1 //判断是否显示返回按钮
  30. },
  31. isMsg:0,
  32. isShow:false
  33. };
  34. },
  35. methods: {
  36. gotoIndex() {
  37. const value = uni.setStorageSync('login', '1');
  38. uni.switchTab({
  39. url: '/pages/index/index'
  40. })
  41. // if(this.isMsg==1){
  42. // uni.setStorageSync('msgLogin', '1');
  43. // uni.switchTab({
  44. // url: '/pages/message/message'
  45. // })
  46. // }else{
  47. // const value = uni.setStorageSync('login', '1');
  48. // uni.switchTab({
  49. // url: '/pages/index/index'
  50. // })
  51. // }
  52. },
  53. goto() {
  54. uni.navigateTo({
  55. url: "/pages/login_two/login_two"
  56. })
  57. },
  58. radioCheck() {
  59. this.isOK = !this.isOK
  60. },
  61. isDui(){
  62. this.isShow=!this.isShow
  63. }
  64. },
  65. onLoad(opt) {
  66. console.log(opt);
  67. this.isMsg=opt.id
  68. }
  69. }
  70. </script>
  71. <style lang="scss">
  72. .login {
  73. background-color: #ffffff;
  74. height: 100vh;
  75. .img {
  76. // padding: 10vh 0;
  77. padding-top: 10vh;
  78. margin-bottom: 10vh;
  79. width: 750rpx;
  80. display: flex;
  81. justify-content: center;
  82. image {
  83. width: 200rpx;
  84. height: 200rpx;
  85. border-radius: 50%;
  86. }
  87. }
  88. .mid {
  89. display: flex;
  90. justify-content: flex-start;
  91. width: 750rpx;
  92. padding: 0rpx 50rpx;
  93. font-size: 13px;
  94. .quan {
  95. position: absolute;
  96. flex-shrink: 0;
  97. top: 0;
  98. left: -10rpx;
  99. width: 32rpx;
  100. height: 32rpx;
  101. border-radius: 50%;
  102. margin-top: 5rpx;
  103. margin-right: 10rpx;
  104. border: 1px #bdbdbd solid;
  105. display: flex;
  106. justify-content: center;
  107. align-items: center;
  108. .dui {
  109. width: 32rpx;
  110. height: 32rpx;
  111. }
  112. }
  113. text {
  114. color: #4a97f2;
  115. }
  116. }
  117. .btn {
  118. background-color: #0056a8;
  119. color: #ffffff;
  120. border-radius: 30px;
  121. margin: 30rpx 55rpx;
  122. // padding: 0rpx 10rpx;
  123. font-size: 16px;
  124. }
  125. .footer {
  126. display: flex;
  127. justify-content: center;
  128. font-size: 14px;
  129. margin: auto;
  130. color: #666666;
  131. }
  132. }
  133. </style>