/*
 * @Description  :
 * @Version      : 1.0
 * @Author       : Shiming
 * @Date         : 2021-12-14 20:39:34
 * @LastEditors  : Shiming
 * @LastEditTime : 2022-01-18 17:28:26
 * @FilePath     : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\onecar-publish\\publish-success\\publish-success.component.ts
 * Copyright (C) 2022 huzhenhong. All rights reserved.
 */

import { Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { NzMessageService } from 'ng-zorro-antd/message';

@Component({
  selector: 'publish-goods-publish-success',
  templateUrl: './publish-success.component.html',
  styleUrls: ['./publish-success.component.less']
})
export class PublishSuccessComponent {
  type = 'onecar';
  title = '下单成功！';
  change: any = 0;
  resourceObj: any = null;
  constructor(private route: ActivatedRoute, private router: Router, public msg: NzMessageService) {
    this.type = route.snapshot.queryParams.type || 'onecar';
  }
  ngOnInit() {
    console.log(this.change);
    if (this.change == 1) {
      this.title = '保存成功！';
    } else if (this.change == 2) {
      this.title = '下单成功！';
    }
  }
  continue() {
    window.location.reload();
  }

  view() {
    this.router.navigate(['/supply-management/index'], { queryParams: { type: this.type } });
  }
}
