halfScreen.vue 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <view>
  3. <uni-popup ref="loginPop" type="bottom" border-radius="10px 10px 0 0" background-color="#ffffff" :mask-click="false">
  4. <view class="login-popup">
  5. <view class="login-title">
  6. <view class="login-logo">
  7. <view class="logo"><image src="/static/rank/avatar.jpeg" mode="widthFix"></image></view>
  8. <view class="name">蓝微Star</view>
  9. </view>
  10. <view class="login-close" @click="closeLogin"><text class="cuIcon-close"></text></view>
  11. </view>
  12. <view class="login-desc">为了更好的为您提供服务,本次操作需要您关联手机号码</view>
  13. <view class="login-footer">
  14. <view :class="checkTrueState?'checkBox active':'checkBox'" @click="checkTrue">
  15. <text class="cuIcon-check"></text>
  16. </view>
  17. <view @click="checkTrue">我已阅读并同意</view>
  18. <text @click="toWeb('privacy')">用户协议、</text><text @click="toWeb('privacy')">隐私协议</text>
  19. </view>
  20. <view class="logi-btn">
  21. <button class="u-button full" @click="getUserInfo" v-if="checkTrueState">快捷一键登录</button>
  22. <button class="u-button full" @click="toLoginCheck" v-else>快捷登录</button>
  23. <button class="u-button" @click="closeLogin">暂不登录</button>
  24. </view>
  25. </view>
  26. </uni-popup>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data() {
  32. return {
  33. checkTrueState:false
  34. }
  35. },
  36. methods: {
  37. closeLogin(){
  38. uni.showTabBar()
  39. this.$refs.loginPop.close()
  40. },
  41. checkTrue(){
  42. this.checkTrueState = !this.checkTrueState;
  43. },
  44. toWeb(type){
  45. },
  46. toLoginCheck(){
  47. if (!this.checkTrueState) {
  48. uni.showToast({
  49. title: "请先阅读同意用户协议",
  50. icon:"none"
  51. })
  52. return ;
  53. }
  54. },
  55. getUserInfo(){
  56. },
  57. open() {
  58. uni.hideTabBar();
  59. this.$nextTick(()=>{
  60. this.$refs.loginPop.open()
  61. })
  62. }
  63. }
  64. }
  65. </script>
  66. <style>
  67. .login-popup{padding: 20rpx;min-height: 30vh;}
  68. .login-popup .login-title{display: flex;align-items: center;justify-content: space-between;}
  69. .login-popup .login-title .login-logo{display: flex;align-items: center;gap: 15rpx;}
  70. .login-popup .login-title .login-logo image{width: 50rpx;height: 50rpx;border-radius: 100%;}
  71. .login-popup .login-title .name{font-weight: bold;font-family: "bluevBold";color: #000;font-size: 28rpx;}
  72. .login-desc{line-height: 2;color: #666;font-size: 24rpx;margin: 20rpx 0;text-align: center;}
  73. .login-footer{font-size: 28rpx;color: #666;height: 20%;display: flex;align-items: center;justify-content: center;}
  74. .login-footer text{color: #85DFFE;}
  75. .checkBox{width: 36upx;height: 36upx;margin-right: 20upx;border: 2upx solid #85DFFE;position: relative;border-radius: 36upx;display: flex;align-items: center;justify-content: center;}
  76. .checkBox text{display: block;color: #fff;}
  77. .checkBox.active{background-color: #85DFFE;}
  78. .checkBox.active text{color: #fff;}
  79. .logi-btn{width: 60%;margin: 20upx auto;height: 40%;}
  80. .logi-btn .u-button{font-size: 28upx;height: 80upx;border-radius: 40upx;line-height: 80upx;margin-top: 40upx;color: #333;border: 2upx solid rgba(33, 34, 38, 1);background-color: #fff;}
  81. .logi-btn .u-button::after{border: 0;}
  82. .logi-btn .u-button.full{background-color: rgba(33, 34, 38, 1);color: #fff;}
  83. </style>