嗨森逛PC管理端
 
 
 
 
high-web/src/app/services/activate.service.ts

82 lines
2.2 KiB

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';
@Injectable({
providedIn: 'root'
})
export class ActivateService {
constructor(
private http: HttpClient,
private common: CommonsService
) { }
/**
* @params paramsObject
* @params callBack
* @return ArrayList
* @author sum1dream
* @description 查询活动列表
* @date 2021/9/27 5:53 下午
* @version: 1.0.0
*/
public getList(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'activity/getList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/**
* @params params
* @author sum1dream
* @description 编辑活动基本信息
* @date 2021/9/28 2:37 下午
* @version: 1.0.0
*/
public editActivityInfo(params: object, callBack) {
this.http.post(environment.baseUrl + 'activity/editActivityInfo', params).subscribe(data => {
callBack(data);
});
}
/**
* @params id
* @author sum1dream
* @description 根据id查询活动基本信息详情
* @date 2021/9/28 2:39 下午
* @version: 1.0.0
*/
public getDetailById(id: number, callBack) {
this.http.get(environment.baseUrl + 'activity/getDetailById?activityId=' + id).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName getWinLotteryList
* @Description //查询活动中奖记录
* @Date 17:54 2021/9/30
* @Param mod
**/
public getWinLotteryList(param: object, callBack) {
this.http.get(environment.baseUrl + 'activity/getWinLotteryList?' + this.common.getWhereCondition(param)).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName editActivityInfo
* @Description //新增中奖名次
* @Date 15:43 2021/9/30
* @Param mod
**/
public editActivityAward(params: object, callBack) {
this.http.post(environment.baseUrl + 'activityAward/editActivityAward', params).subscribe(data => {
callBack(data);
});
}
}