1:修改bootstap/css在线引入路劲

2:新增api产品列表下的简牛话费列表
ymt-dev
游梦婷 10 months ago
parent 16732b508b
commit ff98e5da6d
  1. 2
      src/app/admin/api-product/api-product-routing.module.ts
  2. 3
      src/app/admin/api-product/api-product.module.ts
  3. 38
      src/app/admin/api-product/jianniu-list/jianniu-list.component.html
  4. 0
      src/app/admin/api-product/jianniu-list/jianniu-list.component.scss
  5. 42
      src/app/admin/api-product/jianniu-list/jianniu-list.component.ts
  6. 2
      src/app/admin/system/menu/menu.component.html
  7. 2
      src/app/admin/system/system-role-show/system-role-show.component.html
  8. 11
      src/app/services/api-product.service.ts

@ -1,10 +1,12 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { JianniuListComponent } from './jianniu-list/jianniu-list.component';
import {ListComponent} from './list/list.component';
const routes: Routes = [
{ path: 'list', component: ListComponent },
{path: 'jianniu-list',component:JianniuListComponent}
];
@NgModule({

@ -3,6 +3,7 @@ import {CommonModule} from '@angular/common';
import {ApiProductRoutingModule} from './api-product-routing.module';
import {ListComponent} from './list/list.component';
import { JianniuListComponent } from './jianniu-list/jianniu-list.component';
import {SeparateModule} from '../../common/separate/separate.module';
import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
import {RegionSelectorModule} from '../../common/region-selector/region-selector.module';
@ -12,7 +13,7 @@ import {FormsModule, ReactiveFormsModule} from '@angular/forms';
@NgModule({
declarations: [ListComponent],
declarations: [ListComponent,JianniuListComponent],
imports: [
CommonModule,
ApiProductRoutingModule,

@ -0,0 +1,38 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<div class="inner-content">
<span>共计 {{total}} 条数据</span>
<nz-table
class="table"
#ajaxTable
nzBordered
nzShowSizeChanger
[nzData]="requestData"
[nzLoading]="loading"
[nzTotal]="total"
[(nzPageSize)]="pageSize"
>
<thead nzSingleSort>
<tr>
<th nzWidth="90px">编号</th>
<th >产品ID</th>
<th>标题</th>
<th>规格ID </th>
<th>面值</th>
<th>成本价</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i + 1}}</td>
<td>{{data.goodsId}}</td>
<td>{{data.title}}</td>
<td>{{data.goodsOptionId}}</td>
<td>{{data.officialPrice}}元</td>
<td>{{data.platPrice}}元</td>
</tr>
</tbody>
</nz-table>
</div>

@ -0,0 +1,42 @@
import { Component, OnInit } from '@angular/core';
import { ApiProductService } from '../../../services/api-product.service';
import { NzMessageService } from 'ng-zorro-antd';
@Component({
selector: 'app-jianniu-list',
templateUrl: './jianniu-list.component.html',
styleUrls: ['./jianniu-list.component.scss']
})
export class JianniuListComponent implements OnInit {
total: number; // 总计
loading = true;
requestData = []; // 列表数据
pageNum = 1; // 页码
pageSize = 10; // 条码
constructor(
private apiProduct: ApiProductService,
private message: NzMessageService,
) { }
ngOnInit() {
this.getRequest();
}
// 查询列表
public getRequest() {
this.apiProduct.jNiuGoodsList( data => {
this.loading = false;
if (data['return_code'] === '000000') {
this.requestData = data['return_data'];
this.total = data['return_data'].length;
} else {
this.message.error(data['return_msg']);
}
});
}
}

@ -1,4 +1,4 @@
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.0/css/bootstrap.min.css">
<!--面包屑-->
<nz-breadcrumb>

@ -1,4 +1,4 @@
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.0/css/bootstrap.min.css">
<!--面包屑 -->
<nz-breadcrumb>
<nz-breadcrumb-item>

@ -303,4 +303,15 @@ export class ApiProductService {
});
}
/**
* @description:
* @param {*} callBack
* @return {*}
*/
public jNiuGoodsList( callBack) {
this.http.get(environment.baseUrl + 'apiProduct/jNiuGoodsList').subscribe(data => {
callBack(data);
});
}
}

Loading…
Cancel
Save