cards.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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" @click="openPopup" :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. <en-popup ref="cardPopup">
  28. <template v-slot:popupInfo="{pagingData}">
  29. <view class="img-popup">
  30. <view class="popup-title sys-weight-600 sys-color-black">上传清晰的本人照片</view>
  31. <view class="popup-text sys-color-gray-9 ">
  32. 展示你真实有趣的一面
  33. </view>
  34. <view class="popup-img">
  35. <view class="popup-item">
  36. <image class="item-img" src="/static/img/perfect/img3.png" mode="widthFix"></image>
  37. <view class="item-describe">
  38. <image class="describe-img" src="/static/img/perfect/ok.png" mode="widthFix"></image>
  39. <view class="describe-text sys-color-white sys-weight-600" >半身/全身</view>
  40. </view>
  41. </view>
  42. <view class="popup-item">
  43. <image class="item-img" src="/static/img/perfect/img1.png" mode="widthFix"></image>
  44. <view class="item-describe">
  45. <image class="describe-img" src="/static/img/perfect/no.png" mode="widthFix"></image>
  46. <view class="describe-text sys-color-white sys-weight-600" >怼脸自拍</view>
  47. </view>
  48. </view>
  49. <view class="popup-item">
  50. <image class="item-img" src="/static/img/perfect/img2.png" mode="widthFix"></image>
  51. <view class="item-describe">
  52. <image class="describe-img" src="/static/img/perfect/no.png" mode="widthFix"></image>
  53. <view class="describe-text sys-color-white sys-weight-600" >网红非人</view>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="popup-but sys-color-white sys-background-black sys-selected-but" >从相册中选择</view>
  58. </view>
  59. </template>
  60. </en-popup>
  61. </view>
  62. </template>
  63. <script>
  64. import EnNav from "@/components/en-utils/en-nav/en-nav";
  65. import tools from "@/service/tools";
  66. import LoginAgreement from "@/pages/login/model/loginAgreement";
  67. import EnPopup from "@/components/en-utils/en-popup/en-popup";
  68. export default {
  69. components: {EnPopup, LoginAgreement, EnNav},
  70. data() {
  71. return {
  72. navHeight:40,
  73. isOK:false,
  74. isShakeBut:false,
  75. nickname:'',
  76. password:'',
  77. }
  78. },
  79. watch:{
  80. },
  81. methods: {
  82. openPopup(){
  83. this.$refs.cardPopup.open()
  84. },
  85. setNextStep(){
  86. if(this.isOK){
  87. uni.navigateTo({
  88. 'url':'/pages/perfect/cards'
  89. })
  90. }else {
  91. tools.error('请完善信息')
  92. this.isShakeBut=true
  93. setTimeout(()=>{
  94. this.isShakeBut=false
  95. },500)
  96. }
  97. },
  98. verifyIsOK(){
  99. this.isOK = this.nickname!=='' && this.password.length>=6;
  100. },
  101. setNavHeight(navHeight){
  102. this.navHeight=navHeight+41
  103. },
  104. }
  105. }
  106. </script>
  107. <style scoped lang="scss">
  108. @import "/static/css/shake.css";
  109. .pass-box{
  110. .login-box{
  111. padding: 82rpx 80rpx 0 80rpx;
  112. box-sizing: border-box;
  113. position: relative;
  114. .login-top{
  115. .login-title{
  116. padding-bottom: 24rpx;
  117. .title-item{
  118. font-size: 48rpx;
  119. }
  120. }
  121. .card-text{
  122. padding-bottom: 16rpx;
  123. text{
  124. font-size: 28rpx;
  125. }
  126. }
  127. .card-img{
  128. width: calc(100vw - 160rpx);
  129. background: #F6F6F6;
  130. border-radius: 20rpx;
  131. position: relative;
  132. .add-box{
  133. position: absolute;
  134. top: 50%;
  135. left: 50%;
  136. transform: translate(-50%,-50%);
  137. .add-img{
  138. margin: auto auto;
  139. width: 84rpx;
  140. height: 84rpx;
  141. }
  142. }
  143. }
  144. .card-agreement{
  145. margin-top: 32rpx;
  146. }
  147. }
  148. .login-bottom{
  149. padding-bottom: calc(58rpx + env(safe-area-inset-bottom));
  150. position: absolute;
  151. bottom: 0;
  152. left: 68rpx;
  153. width:calc(100vw - 136rpx);
  154. .login-but{
  155. margin-top: 120rpx;
  156. }
  157. }
  158. }
  159. .img-popup{
  160. margin-top: 40rpx;
  161. padding: 0 32rpx calc(58rpx + env(safe-area-inset-bottom)) 32rpx;
  162. .popup-title{
  163. font-size: 36rpx;
  164. }
  165. .popup-text{
  166. padding: 16rpx 0 32rpx;
  167. font-size: 28rpx;
  168. }
  169. .popup-img{
  170. display: flex;
  171. justify-content: space-between;
  172. .popup-item{
  173. display: inline-block;
  174. margin-right:10rpx;
  175. position: relative;
  176. .item-img{
  177. border-radius: 16rpx;
  178. width: calc((100vw - 80rpx)/3);
  179. height: 276rpx;
  180. }
  181. .item-describe{
  182. position: absolute;
  183. left: 32rpx;
  184. bottom: 20rpx;
  185. width: calc((100vw - 80rpx)/3 - 64rpx);
  186. height: 36rpx;
  187. border-radius: 200rpx;
  188. background: rgba(0,0,0,0.6);
  189. display: flex;
  190. justify-content: flex-start;
  191. .describe-img{
  192. width: 36rpx;
  193. height: 36rpx;
  194. }
  195. .describe-text{
  196. margin-left: 8rpx;
  197. font-size: 24rpx;
  198. line-height: 36rpx;
  199. }
  200. }
  201. }
  202. .popup-item:nth-of-type(3n+0){
  203. margin-right:0;
  204. }
  205. }
  206. .popup-but{
  207. margin-top: 58rpx;
  208. }
  209. }
  210. }
  211. </style>