提交会员充值 千猪api 肯德基

pull/1/head
袁野 2 years ago
parent f21bd84fd3
commit 218762cf7b
  1. 10
      src/app/admin/api-merchants/list/list.component.html
  2. 6
      src/app/admin/api-merchants/list/list.component.ts
  3. 4
      src/app/admin/config-manage/brand/brand.component.html
  4. 9
      src/app/admin/config-manage/brand/brand.component.ts
  5. 4
      src/app/admin/config-manage/config-manage-routing.module.ts
  6. 8
      src/app/admin/config-manage/config-manage.module.ts
  7. 9
      src/app/admin/config-manage/goods-type/goods-type.component.html
  8. 4
      src/app/admin/config-manage/goods-type/goods-type.component.ts
  9. 1
      src/app/admin/merchant-store/store-edit/store-edit.component.ts
  10. 2
      src/app/admin/recharge-order/user/user.component.html
  11. 128
      src/app/services/api-product.service.ts
  12. 3
      src/app/services/config.service.ts
  13. 4
      src/environments/environment.ts

@ -206,7 +206,7 @@
</nz-table>
</nz-modal>
<nz-modal [(nzVisible)]="configVisible" nzTitle="产品配置" (nzOnCancel)="configVisible = false" (nzOnOk)="handleOkConfig()">
<nz-modal [(nzVisible)]="configVisible" nzTitle="产品配置" (nzOnCancel)="handleCancelConfig()" (nzOnOk)="handleOkConfig()">
<form nz-form [formGroup]="configValidateForm" class="login-form">
<nz-form-item *ngIf="!edit">
<nz-form-label [nzSpan]="6" nzRequired>选择产品</nz-form-label>
@ -252,9 +252,8 @@
<th nzWidth="90px">折扣金额</th>
<th nzWidth="120px">运营商</th>
<th nzWidth="90px">充值类型</th>
<th nzWidth="120px">创建时间</th>
<th nzRight nzWidth="80px">状态</th>
<th nzRight nzWidth="160px">操作</th>
<th nzWidth="80px">状态</th>
<th nzRight nzWidth="100px">操作</th>
</tr>
</thead>
<tbody>
@ -264,8 +263,7 @@
<td>{{data.discountPrice}}</td>
<td>{{data.operatorType | rechargePrice}}</td>
<td>{{data.phoneRechargeType== 1? '快充':'慢充'}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td nzRight>{{data.configStatus== 101? '正常':'下架中'}}</td>
<td>{{data.configStatus== 101? '正常':'下架中'}}</td>
<td nzRight class="table-td-operation">
<a *ngIf="data.configStatus != 101" (click)="getEditConfigProduct(data.apiConfigProductId)">编辑</a>
<a style="margin-left: 20px;" (click)='getEditConfigProductStatus(data.apiConfigProductId , data.configStatus)'>{{data.configStatus === 101 ? '下线': '上线'}}</a>

@ -405,6 +405,7 @@ export class ListComponent implements OnInit {
this.apiMerchants.configApiProduct(this.configValidateForm.value , data => {
if (data['return_code'] === '000000') {
this.configVisible = false;
this.configValidateForm.reset();
this.message.success('提交成功');
} else {
this.message.error(data['return_msg']);
@ -462,4 +463,9 @@ export class ListComponent implements OnInit {
});
}
handleCancelConfig() {
this.configVisible = false;
this.configValidateForm.reset();
}
}

@ -69,14 +69,14 @@
<td>{{i+1}}</td>
<td>{{data.title}}</td>
<td>
<img class="head_img" src="{{WEB_SERVE_URL + data.img}}" onerror="this.src='../../../../assets/admin/navigation/icon.png'" alt="">
<img class="head_img" src="{{imageUrl + data.img}}" onerror="this.src='../../../../assets/admin/navigation/icon.png'" alt="">
</td>
<td>{{data.createdTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.updatedTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td nzRight="0px" class="table-td-operation">
<a (click)="getEdit(data.id)">编辑</a>
<nz-divider nzType="vertical"></nz-divider>
<a (click)="getDetail(data.id)">删除</a>
<a (click)="showDeleteConfirm(data.id)">删除</a>
</td>
</tbody>
</nz-table>

@ -21,8 +21,8 @@ function getBase64(file: File): Promise<string | ArrayBuffer | null> {
styleUrls: ['./brand.component.scss']
})
export class BrandComponent implements OnInit {
WEB_SERVE_URL = environment.baseUrl;
imageUrl = environment.imageUrl;
searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据
total: number; // 页码
@ -38,6 +38,7 @@ export class BrandComponent implements OnInit {
previewVisible = false;
goodTypData;
constructor(
private form: FormBuilder,
private config: ConfigService,
@ -107,7 +108,6 @@ export class BrandComponent implements OnInit {
}
// 修改
public getEdit(id?: number): void {
this.validateForm.reset();
@ -167,18 +167,19 @@ export class BrandComponent implements OnInit {
this.validateForm.value.id = this.id;
this.config.updateBrand(this.validateForm.value, data => {
if (data['return_code'] === '000000') {
this.message.success('修改成功');
this.isVisible = false;
this.message.success('修改成功');
this.getRequest(true, this.searchForm.value);
} else {
this.message.create('error', data['return_msg']);
}
});
} else {
console.log('123');
this.config.insertBrand(this.validateForm.value, data => {
if (data['return_code'] === '000000') {
this.message.success('添加成功');
this.isVisible = false;
this.message.success('添加成功');
this.getRequest(true, this.searchForm.value);
} else {
this.message.create('error', data['return_msg']);

@ -2,11 +2,15 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {GoodsTypeComponent} from './goods-type/goods-type.component';
import {BrandComponent} from './brand/brand.component';
import {ThirdProductComponent} from './third-product/third-product.component';
import {MemberProductComponent} from './member-product/member-product.component';
const routes: Routes = [
{ path: 'goods-type', component: GoodsTypeComponent },
{ path: 'brand', component: BrandComponent },
{ path: 'third-product', component: ThirdProductComponent },
{ path: 'member-product', component: MemberProductComponent },
];
@NgModule({

@ -9,10 +9,13 @@ import {SeparateModule} from '../../common/separate/separate.module';
import {FormsModule, ReactiveFormsModule} from '_@angular_forms@9.0.7@@angular/forms';
import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
import {RegionSelectorModule} from '../../common/region-selector/region-selector.module';
import { ThirdProductComponent } from './third-product/third-product.component';
import {AppCommonModule} from "../../app-common.module";
import { MemberProductComponent } from './member-product/member-product.component';
@NgModule({
declarations: [GoodsTypeComponent, BrandComponent],
declarations: [GoodsTypeComponent, BrandComponent, ThirdProductComponent, MemberProductComponent],
imports: [
CommonModule,
ConfigManageRoutingModule,
@ -21,7 +24,8 @@ import {RegionSelectorModule} from '../../common/region-selector/region-selector
ReactiveFormsModule,
FormsModule,
BreadcrumbModule,
RegionSelectorModule
RegionSelectorModule,
AppCommonModule
]
})
export class ConfigManageModule { }

@ -59,7 +59,7 @@
<td>{{i+1}}</td>
<td>{{data.title}}</td>
<td>
<img class="head_img" src="{{WEB_SERVE_URL + data.img}}" onerror="this.src='../../../../assets/admin/navigation/icon.png'" alt="">
<img class="head_img" src="{{imageUrl + data.img}}" onerror="this.src='../../../../assets/admin/navigation/icon.png'" alt="">
</td>
<td>{{data.createdTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.updatedTime | date: 'yyyy-MM-dd HH:mm'}}</td>
@ -80,6 +80,13 @@
<input nz-input placeholder="请输入标题..." [formControlName]="'title'" />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4">使用业务</nz-form-label>
<nz-form-control [nzSpan]="12">
<input nz-input placeholder="请输入使用业务..." [formControlName]="'userService'" />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>图片</nz-form-label>
<nz-form-control [nzSpan]="20" nzErrorTip="请上传图片!">

@ -23,6 +23,7 @@ function getBase64(file: File): Promise<string | ArrayBuffer | null> {
export class GoodsTypeComponent implements OnInit {
WEB_SERVE_URL = environment.baseUrl;
imageUrl = environment.imageUrl;
searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据
total: number; // 页码
@ -36,6 +37,7 @@ export class GoodsTypeComponent implements OnInit {
imgFile = [];
previewImage: string | undefined = '';
previewVisible = false;
constructor(
private form: FormBuilder,
private config: ConfigService,
@ -57,6 +59,7 @@ export class GoodsTypeComponent implements OnInit {
});
this.validateForm = this.fb.group({
title: [null, [Validators.required]],
userService: [null],
});
this.getRequest(true, this.searchForm.value);
}
@ -96,7 +99,6 @@ export class GoodsTypeComponent implements OnInit {
}
// 修改
public getEdit(id?: number): void {
this.id = id;

@ -199,6 +199,7 @@ export class StoreEditComponent implements OnInit {
map: map
});
positionPicker.on('success', positionResult => {
console.log(positionResult);
positionResult['latitude'] = positionResult.position.lat;
positionResult['longitude'] = positionResult.position.lng;
positionResult['regionId'] = positionResult.regeocode.addressComponent.adcode;

@ -93,7 +93,7 @@
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td nzRight="0px" class="table-td-operation">
<a (click)="getEdit(data.id)">编辑</a>
<a nz-dropdown [nzDropdownMenu]="menu">更多</a>
<a nz-dropdown [nzDropdownMenu]="menu">Sum1Dream</a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li class="li-a" nz-menu-item><a (click)="generateRechargeAgentQrCode(data.id)">生成二维码</a></li>

@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import {HttpClient} from '_@angular_common@9.0.7@@angular/common/http';
import {CommonsService} from './commons.service';
import {environment} from "../../environments/environment";
import {environment} from '../../environments/environment';
@Injectable({
providedIn: 'root'
@ -94,4 +94,130 @@ export class ApiProductService {
});
}
/**
* @Author Sum1Dream
* @methodName getStarbucksProducts
* @Description // 查询星巴克产品
* @Date 13:53 2022/6/30
* @Param callBack
*/
public getStarbucksProducts(callBack) {
this.http.get(environment.baseUrl + 'apiProduct/getStarbucksProducts').subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName insertProductConfig
* @Description // 新增第三方产品配置
* @Date 14:22 2022/6/30
* @Param params: object, callBack
*/
public productConfig(params: object, callBack) {
this.http.post(environment.baseUrl + 'bsProductConfig/productConfig', params).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName insertProductConfig
* @Description // 新增第三方产品配置
* @Date 14:22 2022/6/30
* @Param params: object, callBack
*/
public updateProductConfig(params: object, callBack) {
this.http.post(environment.baseUrl + 'bsProductConfig/updateProductConfig', params).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param paramsObject
* @param callBack
*/
public getProductConfig(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'bsProductConfig/getProductConfig?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/**
* id查询产品详情
*
* @param id id
* @param callBack
*/
public findProductConfig(id: number, callBack) {
this.http.get(environment.baseUrl + 'bsProductConfig/findProductConfig?id=' + id).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName findStarbucksProducts
* @Description // 查询产品详情
* @Date 10:29 2022/7/1
* @Param id: number, callBack
*/
public findStarbucksProducts(id: number, callBack) {
this.http.get(environment.baseUrl + 'bsProductConfig/findStarbucksProducts?id=' + id).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName getListApiMemberProduct
* @Description // 查询会员产品列表
* @Date 10:38 2022/7/12
* @Param paramsObject: object, callBack
*/
public getListApiMemberProduct(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'apiMemberProduct/getListApiMemberProduct?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName insertMemberProduct
* @Description // 新增会员产品
* @Date 10:39 2022/7/12
* @Param params: object, callBack
*/
public insertMemberProduct(params: object, callBack) {
this.http.post(environment.baseUrl + 'apiMemberProduct/insertMemberProduct', params).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName updateMemberProduct
* @Description // 修改会员产品
* @Date 10:40 2022/7/12
* @Param params: object, callBack
*/
public updateMemberProduct(params: object, callBack) {
this.http.post(environment.baseUrl + 'apiMemberProduct/updateMemberProduct', params).subscribe(data => {
callBack(data);
});
}
/**
* id查询详情
*
* @param id id
* @param callBack
*/
public findMemberProductById(id: number, callBack) {
this.http.get(environment.baseUrl + 'apiMemberProduct/findById?id=' + id).subscribe(data => {
callBack(data);
});
}
}

@ -97,6 +97,7 @@ export class ConfigService {
*/
public insertBrand(params: object, callBack) {
this.http.post(environment.baseUrl + 'highBrand/insertBrand', params).subscribe(data => {
callBack(data);
});
}
@ -133,7 +134,7 @@ export class ConfigService {
* @param callBack
*/
public getByDelete(params: object, callBack) {
this.http.get(environment.baseUrl + 'highBrand/getByDelete' , params).subscribe(data => {
this.http.post(environment.baseUrl + 'highBrand/getByDelete' , params).subscribe(data => {
callBack(data);
});
}

@ -6,8 +6,8 @@ export const environment = {
production: false,
// baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'http://localhost:9302/filesystem/',
baseUrl: 'https://hsg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://hsg.dctpay.com/filesystem/',
baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=',
inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=',
};

Loading…
Cancel
Save