cards.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <view class="pass-box">
  3. <en-nav ></en-nav>
  4. <view class="login-box" :style="{'height':'calc(100vh - '+navHeight+'px)'}" >
  5. <view class="login-top">
  6. <view class="login-title">
  7. <text class="title-item sys-color-black sys-weight-600">个性卡牌</text>
  8. </view>
  9. <view class="card-text">
  10. <text class="sys-color-gray-9">请使用本人</text>
  11. <text class="sys-color-green">真实照片</text>
  12. <text class="sys-color-gray-9">,否则部分功能可能会受限</text>
  13. </view>
  14. <view class="card-img" :style="{'height':'calc(100vh - '+navHeight+'px - 278rpx - 270rpx - env(safe-area-inset-bottom)'}">
  15. <view class="add-box">
  16. <image class="add-img" src="/static/img/common/add.png" mode="aspectFill"></image>
  17. </view>
  18. </view>
  19. <view class="card-agreement">
  20. <login-agreement :type="2"></login-agreement>
  21. </view>
  22. </view>
  23. <view class="login-bottom">
  24. <view class="login-but sys-color-white sys-background-black sys-selected-but" @click="setNextStep" :class="{'sys-unselected-but':!isOK}">下一步</view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. import EnNav from "@/components/en-utils/en-nav/en-nav";
  31. import tools from "@/service/tools";
  32. import LoginAgreement from "@/pages/login/model/loginAgreement";
  33. export default {
  34. components: {LoginAgreement, EnNav},
  35. data() {
  36. return {
  37. navHeight:40,
  38. isOK:false,
  39. isShakeBut:false,
  40. nickname:'',
  41. password:'',
  42. }
  43. },
  44. watch:{
  45. },
  46. methods: {
  47. setNextStep(){
  48. if(this.isOK){
  49. uni.navigateTo({
  50. 'url':'/pages/perfect/cards'
  51. })
  52. }else {
  53. tools.error('请完善信息')
  54. this.isShakeBut=true
  55. setTimeout(()=>{
  56. this.isShakeBut=false
  57. },500)
  58. }
  59. },
  60. verifyIsOK(){
  61. this.isOK = this.nickname!=='' && this.password.length>=6;
  62. },
  63. setNavHeight(navHeight){
  64. this.navHeight=navHeight+41
  65. },
  66. }
  67. }
  68. </script>
  69. <style scoped lang="scss">
  70. @import "/static/css/shake.css";
  71. .login-box{
  72. padding: 82rpx 80rpx 0 80rpx;
  73. box-sizing: border-box;
  74. position: relative;
  75. .login-top{
  76. .login-title{
  77. padding-bottom: 24rpx;
  78. .title-item{
  79. font-size: 48rpx;
  80. }
  81. }
  82. .card-text{
  83. padding-bottom: 16rpx;
  84. text{
  85. font-size: 28rpx;
  86. }
  87. }
  88. .card-img{
  89. width: calc(100vw - 160rpx);
  90. background: #F6F6F6;
  91. border-radius: 20rpx;
  92. position: relative;
  93. .add-box{
  94. position: absolute;
  95. top: 50%;
  96. left: 50%;
  97. transform: translate(-50%,-50%);
  98. .add-img{
  99. margin: auto auto;
  100. width: 84rpx;
  101. height: 84rpx;
  102. }
  103. }
  104. }
  105. .card-agreement{
  106. margin-top: 32rpx;
  107. }
  108. }
  109. .login-bottom{
  110. padding-bottom: calc(58rpx + env(safe-area-inset-bottom));
  111. position: absolute;
  112. bottom: 0;
  113. left: 68rpx;
  114. width:calc(100vw - 136rpx);
  115. .login-but{
  116. margin-top: 120rpx;
  117. }
  118. }
  119. }
  120. </style>