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.
|
|
|
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);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 查询活动中奖记录
|
|
|
|
* @param param 参数
|
|
|
|
* @param callBack
|
|
|
|
*/
|
|
|
|
public getWinLotteryList(param: object, callBack) {
|
|
|
|
this.http.get(environment.baseUrl + 'activity/getWinLotteryList?' + this.common.getWhereCondition(param)).subscribe(data => {
|
|
|
|
callBack(data);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|