Review.js 445 B

123456789101112131415161718192021222324
  1. import moment from 'moment' // 时间库
  2. Component({
  3. mixins: [],
  4. data: {
  5. info:[]
  6. },
  7. props: {
  8. process:[],
  9. status:0
  10. },
  11. didMount() {
  12. if(this.props.process.length>0){
  13. let info=this.props.process[0];
  14. let time=info.time+'000';
  15. info.time=moment(Number(time)).format('YYYY-MM-DD HH:mm:ss')
  16. this.setData({
  17. info:[info]
  18. })
  19. }
  20. },
  21. didUpdate() {},
  22. didUnmount() {},
  23. methods: {},
  24. });