adjust.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <view>
  3. <car-common mytitle="调整照片" ref="common"></car-common>
  4. <view class="adjust-img">
  5. <vueCropper ref="cropper" :img="cropper.img " :outputSize="cropper.size" :outputType="cropper.outputType" :info="cropper.info"
  6. :canScale="cropper.canScale" :autoCrop="cropper.autoCrop" :autoCropWidth="cropper.autoCropWidth" :autoCropHeight="cropper.autoCropHeight"
  7. :fixed="cropper.fixed" :fixedBox="cropper.fixedBox" :fixedNumber="cropper.fixedNumber" @imgLoad="imgLoad" :enlarge="4"></vueCropper>
  8. </view>
  9. <view class="adjust-btn">
  10. <u-button type="primary" size="medium" shape="circle" @click="rotateRight()">旋转</u-button>
  11. <u-button type="error" size="medium" shape="circle" @click="submit()">确定</u-button>
  12. </view>
  13. <view class="adjust-text">
  14. <p>1.照片仅用于乘车时人脸识别设备的验证,请上传清晰现场拍摄的肩部半身照;</p>
  15. <p>2.可拖动、旋转或缩放照片,将人脸区域调整至轮廓框以内。</p>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. import api from './adjust.js'
  21. export default api;
  22. </script>
  23. <style>
  24. page{
  25. background-color: #000;
  26. }
  27. </style>
  28. <style scoped lang="scss">
  29. .adjust-img{
  30. position: relative;
  31. height: 240px;
  32. width: 240px;
  33. margin:50px auto;
  34. img{
  35. height: 100%;
  36. width: 100%;
  37. }
  38. }
  39. .adjust-btn{
  40. display: flex;
  41. justify-content: space-between;
  42. }
  43. .adjust-text{
  44. padding:60rpx;
  45. p{
  46. color:#888;
  47. margin-bottom: 10rpx;
  48. }
  49. }
  50. .adjust-icon{
  51. background-color: #fff;
  52. width: 20px;
  53. height: 20px;
  54. border-radius: 50%;
  55. position: absolute;
  56. right: -10px;
  57. top: -10px;
  58. text-align: center;
  59. }
  60. .adjust-icon2{
  61. background-color: #fff;
  62. width: 20px;
  63. height: 20px;
  64. border-radius: 50%;
  65. position: absolute;
  66. right: -10px;
  67. bottom: -10px;
  68. text-align: center;
  69. }
  70. </style>