嗨森逛PC管理端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
high-web/src/app/admin/merchant/merchant-detail/merchant-detail.component.ts

40 lines
1.1 KiB

import { Component, OnInit } from '@angular/core';
4 years ago
import {MerchantService} from '../../../services/merchant.service';
import {NzMessageService} from 'ng-zorro-antd';
import {ActivatedRoute} from '@angular/router';
4 years ago
import {environment} from '../../../../environments/environment';
@Component({
selector: 'app-merchant-detail',
templateUrl: './merchant-detail.component.html',
styleUrls: ['./merchant-detail.component.scss']
})
export class MerchantDetailComponent implements OnInit {
4 years ago
data: any = {};
id: number;
4 years ago
FILE_URL = environment.imageUrl;
4 years ago
constructor(
private merchant: MerchantService,
private message: NzMessageService, // 信息提示
private activatedRoute: ActivatedRoute,
) { }
ngOnInit(): void {
4 years ago
this.activatedRoute.queryParams.subscribe(queryParams => {
if (queryParams.merchantId != null) {
this.id = queryParams.merchantId;
this.getDetails(queryParams.merchantId);
}
});
}
4 years ago
// 查询详情
4 years ago
public getDetails(id: number) {
this.merchant.getMerchantById(id , data => {
this.data = data['return_data'];
});
}
}