diff --git a/src/app/admin/order/oil-station-order/oil-station-order.component.ts b/src/app/admin/order/oil-station-order/oil-station-order.component.ts index d91c4da..3edf638 100644 --- a/src/app/admin/order/oil-station-order/oil-station-order.component.ts +++ b/src/app/admin/order/oil-station-order/oil-station-order.component.ts @@ -11,7 +11,7 @@ import {LocalStorageService} from '../../../services/local-storage.service'; import {CommonsService} from '../../../services/commons.service'; import {WebsocketService} from '../../../services/websocket.service'; import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; -import {MerchantStoreService} from "../../../services/merchant-store.service"; +import {MerchantStoreService} from '../../../services/merchant-store.service'; @Component({ selector: 'app-oil-station-order', diff --git a/src/app/app-common.module.ts b/src/app/app-common.module.ts index 4e53997..c089a56 100644 --- a/src/app/app-common.module.ts +++ b/src/app/app-common.module.ts @@ -47,7 +47,8 @@ import { PriceStatusPipe, GasStaffStatusPipe, PayStatusPipe, - ChlidRechargeStatusPipe + ChlidRechargeStatusPipe, + SourceTypePipe } from './pipes'; import {OilCardStatusPipe} from './pipes'; import {OilTypePipe} from './pipes/store/oil-type.pipe'; @@ -100,6 +101,7 @@ const PIPES = [ OilPriceTaskPriceTypePipe, PayStatusPipe, ChlidRechargeStatusPipe, + SourceTypePipe, ]; diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 30b8329..31a72a3 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -4,139 +4,149 @@ import {NavigationComponent} from './admin/navigation/navigation.component'; import {InitGuardService} from './services/init-guard.service'; const routes: Routes = [ - {path: '', pathMatch: 'full', redirectTo: 'adminLogin'}, - { - path: 'adminLogin', - loadChildren: () => import('./admin/login/login.module').then(m => m.LoginModule) - }, - { - path: 'admin', component: NavigationComponent, - children: [ - { - path: 'index', - loadChildren: () => import('./admin/index/index.module').then(m => m.IndexModule), - canActivate: [InitGuardService] - }, - { - path: 'user', - loadChildren: () => import('./admin/user/user.module').then(m => m.UserModule), - canActivate: [InitGuardService] - }, - { - path: 'merchant', - loadChildren: () => import('./admin/merchant/merchant.module').then(m => m.MerchantModule), - canActivate: [InitGuardService] - }, - { - path: 'merchantStore', - loadChildren: () => import('./admin/merchant-store/merchant-store.module').then(m => m.MerchantStoreModule), - canActivate: [InitGuardService] - }, - { - path: 'coupon', - loadChildren: () => import('./admin/coupon/coupon.module').then(m => m.CouponModule), - canActivate: [InitGuardService] - }, - { - path: 'company', - loadChildren: () => import('./admin/company/company.module').then(m => m.CompanyModule), - canActivate: [InitGuardService] - }, - { - path: 'price', - loadChildren: () => import('./admin/price/price.module').then(m => m.PriceModule), - canActivate: [InitGuardService] - }, - { - path: 'audit', - loadChildren: () => import('./admin/audit/audit.module').then(m => m.AuditModule), - canActivate: [InitGuardService] - }, - { - path: 'order', - loadChildren: () => import('./admin/order/order.module').then(m => m.OrderModule), - canActivate: [InitGuardService] - }, - { - path: 'discount', - loadChildren: () => import('./admin/discount/discount.module').then(m => m.DiscountModule), - canActivate: [InitGuardService] - }, - { - path: 'system', - loadChildren: () => import('./admin/system/system.module').then(m => m.SystemModule), - canActivate: [InitGuardService] - }, - { - path: 'agent', - loadChildren: () => import('./admin/agent/agent.module').then(m => m.AgentModule), - canActivate: [InitGuardService] - }, - { - path: 'rechargeOrder', - loadChildren: () => import('./admin/recharge-order/recharge-order.module').then(m => m.RechargeOrderModule), - canActivate: [InitGuardService] - }, - { - path: 'cms', - loadChildren: () => import('./admin/cms/cms.module').then(m => m.CmsModule), - canActivate: [InitGuardService] - }, - { - path: 'activate', - loadChildren: () => import('./admin/activate/activate.module').then(m => m.ActivateModule), - canActivate: [InitGuardService] - }, - { - path: 'config-manage', - loadChildren: () => import('./admin/config-manage/config-manage.module').then(m => m.ConfigManageModule), - canActivate: [InitGuardService] - }, - { - path: 'discount-package', - loadChildren: () => import('./admin/discount-package/discount-package.module').then(m => m.DiscountPackageModule), - canActivate: [InitGuardService] - }, - { - path: 'tuanyou-agent', - loadChildren: () => import('./admin/tuanyou-agent/tuanyou-agent.module').then(m => m.TuanyouAgentModule), - canActivate: [InitGuardService] - }, - { - path: 'company-amount', - loadChildren: () => import('./admin/company-amount/company-amount.module').then(m => m.CompanyAmountModule), - canActivate: [InitGuardService] - }, - { - path: 'oil-card', - loadChildren: () => import('./admin/oil-card/oil-card.module').then(m => m.OilCardModule), - canActivate: [InitGuardService] - }, - { - path: 'gz-sinopec', - loadChildren: () => import('./admin/gz-sinopec/gz-sinopec.module').then(m => m.GzSinopecModule), - canActivate: [InitGuardService] - }, - { - path: 'gas-staff', - loadChildren: () => import('./admin/gas-staff/gas-staff.module').then(m => m.GasStaffModule), - canActivate: [InitGuardService] - }, - { - path: 'gas-oil-price', - loadChildren: () => import('./admin/gas-oil-price/gas-oil-price.module').then(m => m.GasOilPriceModule), - canActivate: [InitGuardService] - }, - ], - }, + {path: '', pathMatch: 'full', redirectTo: 'adminLogin'}, + { + path: 'adminLogin', + loadChildren: () => import('./admin/login/login.module').then(m => m.LoginModule) + }, + { + path: 'admin', component: NavigationComponent, + children: [ + { + path: 'index', + loadChildren: () => import('./admin/index/index.module').then(m => m.IndexModule), + canActivate: [InitGuardService] + }, + { + path: 'user', + loadChildren: () => import('./admin/user/user.module').then(m => m.UserModule), + canActivate: [InitGuardService] + }, + { + path: 'merchant', + loadChildren: () => import('./admin/merchant/merchant.module').then(m => m.MerchantModule), + canActivate: [InitGuardService] + }, + { + path: 'merchantStore', + loadChildren: () => import('./admin/merchant-store/merchant-store.module').then(m => m.MerchantStoreModule), + canActivate: [InitGuardService] + }, + { + path: 'coupon', + loadChildren: () => import('./admin/coupon/coupon.module').then(m => m.CouponModule), + canActivate: [InitGuardService] + }, + { + path: 'company', + loadChildren: () => import('./admin/company/company.module').then(m => m.CompanyModule), + canActivate: [InitGuardService] + }, + { + path: 'price', + loadChildren: () => import('./admin/price/price.module').then(m => m.PriceModule), + canActivate: [InitGuardService] + }, + { + path: 'audit', + loadChildren: () => import('./admin/audit/audit.module').then(m => m.AuditModule), + canActivate: [InitGuardService] + }, + { + path: 'order', + loadChildren: () => import('./admin/order/order.module').then(m => m.OrderModule), + canActivate: [InitGuardService] + }, + { + path: 'discount', + loadChildren: () => import('./admin/discount/discount.module').then(m => m.DiscountModule), + canActivate: [InitGuardService] + }, + { + path: 'system', + loadChildren: () => import('./admin/system/system.module').then(m => m.SystemModule), + canActivate: [InitGuardService] + }, + { + path: 'agent', + loadChildren: () => import('./admin/agent/agent.module').then(m => m.AgentModule), + canActivate: [InitGuardService] + }, + { + path: 'rechargeOrder', + loadChildren: () => import('./admin/recharge-order/recharge-order.module').then(m => m.RechargeOrderModule), + canActivate: [InitGuardService] + }, + { + path: 'cms', + loadChildren: () => import('./admin/cms/cms.module').then(m => m.CmsModule), + canActivate: [InitGuardService] + }, + { + path: 'activate', + loadChildren: () => import('./admin/activate/activate.module').then(m => m.ActivateModule), + canActivate: [InitGuardService] + }, + { + path: 'config-manage', + loadChildren: () => import('./admin/config-manage/config-manage.module').then(m => m.ConfigManageModule), + canActivate: [InitGuardService] + }, + { + path: 'discount-package', + loadChildren: () => import('./admin/discount-package/discount-package.module').then(m => m.DiscountPackageModule), + canActivate: [InitGuardService] + }, + { + path: 'tuanyou-agent', + loadChildren: () => import('./admin/tuanyou-agent/tuanyou-agent.module').then(m => m.TuanyouAgentModule), + canActivate: [InitGuardService] + }, + { + path: 'company-amount', + loadChildren: () => import('./admin/company-amount/company-amount.module').then(m => m.CompanyAmountModule), + canActivate: [InitGuardService] + }, + { + path: 'oil-card', + loadChildren: () => import('./admin/oil-card/oil-card.module').then(m => m.OilCardModule), + canActivate: [InitGuardService] + }, + { + path: 'gz-sinopec', + loadChildren: () => import('./admin/gz-sinopec/gz-sinopec.module').then(m => m.GzSinopecModule), + canActivate: [InitGuardService] + }, + { + path: 'gas-staff', + loadChildren: () => import('./admin/gas-staff/gas-staff.module').then(m => m.GasStaffModule), + canActivate: [InitGuardService] + }, + { + path: 'gas-oil-price', + loadChildren: () => import('./admin/gas-oil-price/gas-oil-price.module').then(m => m.GasOilPriceModule), + canActivate: [InitGuardService] + }, + { + path: 'api-product', + loadChildren: () => import('./admin/api-product/api-product.module').then(m => m.ApiProductModule), + canActivate: [InitGuardService] + }, + { + path: 'api-merchants', + loadChildren: () => import('./admin/api-merchants/api-merchants.module').then(m => m.ApiMerchantsModule), + canActivate: [InitGuardService] + }, + ], + }, ]; @NgModule({ - imports: [RouterModule.forRoot(routes)], - exports: [RouterModule], - providers: [ - // { provide: RouteReuseStrategy, useClass: RouteStrategyService } - ], + imports: [RouterModule.forRoot(routes)], + exports: [RouterModule], + providers: [ + // { provide: RouteReuseStrategy, useClass: RouteStrategyService } + ], }) export class AppRoutingModule { } diff --git a/src/app/pipes/index.ts b/src/app/pipes/index.ts index 78e6433..f07ed70 100644 --- a/src/app/pipes/index.ts +++ b/src/app/pipes/index.ts @@ -37,3 +37,4 @@ export * from './recharge-price/recharge-platform.pipe'; export * from './recharge-price/price-status.pipe'; export * from './pay-status.pipe'; export * from './chlid-recharge-status.pipe'; +export * from './apiMerchant/source-type.pipe'; diff --git a/src/app/services/commons.service.ts b/src/app/services/commons.service.ts index c98d14a..b6f2d36 100644 --- a/src/app/services/commons.service.ts +++ b/src/app/services/commons.service.ts @@ -388,4 +388,18 @@ export class CommonsService { }); } + /** + * 发送充值短信验证码 + * + * @param phone 手机号 + * @param merchantId 手机号 + * @param price 手机号 + * @param callBack 回调 + */ + public sendRechargeSmsCode(phone: string, merchantId: number, price: string, callBack) { + this.http.get(environment.baseUrl + 'sendSms/sendRechargeSmsCodeByMchId?phone=' + phone + '&merchantId=' + merchantId + '&price=' + price).subscribe(data => { + callBack(data); + }); + } + } diff --git a/src/app/services/order.service.ts b/src/app/services/order.service.ts index b6613fc..d4005cc 100644 --- a/src/app/services/order.service.ts +++ b/src/app/services/order.service.ts @@ -8,6 +8,7 @@ import {CommonsService} from './commons.service'; }) export class OrderService { + constructor( private http: HttpClient, private common: CommonsService