Commit aa90a275 authored by qinhaitao's avatar qinhaitao

perf: ️ 更改eport方式利于 导航

parent 702942cc
/** @format */ /** @format */
import { AwardsService } from '../service'; import { AwardsService } from '../service';
interface IPrizeListParams { export interface IPrizeListParams {
activityId: string; activityId: string;
} }
interface IReceiveOjectParams { export interface IReceiveOjectParams {
activityId: string; activityId: string;
_id: string; _id: string;
name: string; name: string;
...@@ -13,7 +13,7 @@ interface IReceiveOjectParams { ...@@ -13,7 +13,7 @@ interface IReceiveOjectParams {
area: string; area: string;
addressdetail: string; addressdetail: string;
} }
interface IReceiveEnameParams { export interface IReceiveEnameParams {
activityId: string; activityId: string;
_id: string; _id: string;
} }
...@@ -45,4 +45,3 @@ export default class AwardsController { ...@@ -45,4 +45,3 @@ export default class AwardsController {
image: string; image: string;
}, true>>; }, true>>;
} }
export {};
/** @format */ /** @format */
interface IStatsParams { export interface IStatsParams {
activityId: string; activityId: string;
startDay: string; startDay: string;
endDay: string; endDay: string;
...@@ -9,6 +9,5 @@ export default class StatController { ...@@ -9,6 +9,5 @@ export default class StatController {
/** /**
* 统计数据 * 统计数据
*/ */
getStats(context: IContext<IStatsParams>): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<string | boolean | object | object[] | number[] | string[], false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any[], true>>; getStats(context: IContext<IStatsParams>): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any[], true> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<string | boolean | object | string[] | object[] | number[], false>>;
} }
export {};
/** @format */ /** @format */
import { UserService, AccessService } from '../service'; import { UserService, AccessService } from '../service';
interface IVipParams { export interface IVipParams {
activityId: string; activityId: string;
callbackUrl?: string; callbackUrl?: string;
} }
interface ILoginParams { export interface ILoginParams {
activityId: string; activityId: string;
userNick: string; userNick: string;
avatar: string; avatar: string;
...@@ -23,4 +23,3 @@ export default class User { ...@@ -23,4 +23,3 @@ export default class User {
*/ */
getVipInfo(context: IContext<IVipParams>, { session, activityUserNick }: IControllerInfos, [userService]: [UserService]): Promise<IResult<IVipInfo>>; getVipInfo(context: IContext<IVipParams>, { session, activityUserNick }: IControllerInfos, [userService]: [UserService]): Promise<IResult<IVipInfo>>;
} }
export {};
/** @format */ /** @format */
declare const _default: {}; declare const _default: {
login: (context: IContext<import("./controller/user.controller").ILoginParams>, { userInfo, vipInfo, activityInfo }: IControllerInfos, [userService, accessService]: [import("./service/user.service").default, import("./service").AccessService]) => Promise<IResult<{
openId: string;
}>>;
getVipInfo: (context: IContext<import("./controller/user.controller").IVipParams>, { session, activityUserNick }: IControllerInfos, [userService]: [import("./service/user.service").default]) => Promise<IResult<IVipInfo>>;
getTaskList: (context: IContext<{
activityId: string;
}>, { userInfo, vipInfo, activityInfo, session }: IControllerInfos, [taskService]: [import("./service").TaskService]) => Promise<IResult<import("./service/task.service").ITaskInfo[]>>;
receiveTaskRewards: (context: IContext<IParams>, { userInfo }: IControllerInfos, [taskService]: [import("./service").TaskService]) => Promise<IResult<boolean>>;
getActivityBaseInfoById: (context: IContext<{
activityId: string;
}>, {}: {}, [baseService]: [import("./service").BaseService]) => Promise<IResult<IActivityInfo>>;
getMyPrizeList: (context: IContext<import("./controller/awards.controller").IPrizeListParams>, {}: {}, [awardSer]: [import("./service").AwardsService]) => Promise<IResult<IAwards[]>>;
receiveObjectPrize: (context: IContext<import("./controller/awards.controller").IReceiveOjectParams>, {}: {}, [awardSer]: [import("./service").AwardsService]) => Promise<IResult<boolean>>;
receiveEnamePrize: (context: IContext<import("./controller/awards.controller").IReceiveEnameParams>, {}: {}, [awardSer]: [import("./service").AwardsService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<string | boolean | object | object[] | number[] | string[], false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{}, true>>;
doHelp: (context: IContext<IParams>, { userInfo, vipInfo, activityInfo }: IControllerInfos, [userService, taskService, accessService]: [import("./service/user.service").default, import("./service").TaskService, import("./service").AccessService]) => Promise<IResult<boolean>>;
getStats: (context: IContext<import("./controller/stat.controller").IStatsParams>) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<string | boolean | object | object[] | number[] | string[], false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any[], true>>;
};
export default _default; export default _default;
"use strict"; "use strict";
/** @format */ /** @format */
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
var utils_1 = require("./utils"); // import { exportHandlers } from './utils'
var user_controller_1 = require("./controller/user.controller"); var user_controller_1 = require("./controller/user.controller");
var task_controller_1 = require("./controller/task.controller"); var task_controller_1 = require("./controller/task.controller");
var base_controller_1 = require("./controller/base.controller"); var base_controller_1 = require("./controller/base.controller");
var awards_controller_1 = require("./controller/awards.controller"); var awards_controller_1 = require("./controller/awards.controller");
var share_controller_1 = require("./controller/share.controller"); var share_controller_1 = require("./controller/share.controller");
var stat_controller_1 = require("./controller/stat.controller"); var stat_controller_1 = require("./controller/stat.controller");
exports.default = utils_1.exportHandlers([ var _a = new user_controller_1.default(), login = _a.login, getVipInfo = _a.getVipInfo;
user_controller_1.default, var _b = new task_controller_1.default(), getTaskList = _b.getTaskList, receiveTaskRewards = _b.receiveTaskRewards, getCollectGoodsList = _b.getCollectGoodsList, // 获取收藏商品列表,包含收藏状态
task_controller_1.default, doFollowTask = _b.doFollowTask, doJumpLinkTask = _b.doJumpLinkTask, doBrowseGoodsTask = _b.doBrowseGoodsTask, doCollectGoodsTask = _b.doCollectGoodsTask, doExchangeCreditsTask = _b.doExchangeCreditsTask;
base_controller_1.default, var _c = new base_controller_1.default(), getActivityBaseInfoById = _c.getActivityBaseInfoById, getItemListByItemIds = _c.getItemListByItemIds;
awards_controller_1.default, var _d = new awards_controller_1.default(), getMyPrizeList = _d.getMyPrizeList, receiveObjectPrize = _d.receiveObjectPrize, receiveEnamePrize = _d.receiveEnamePrize, drawLotteryPrize = _d.drawLotteryPrize;
share_controller_1.default, var doHelp = new share_controller_1.default().doHelp;
stat_controller_1.default var getStats = new stat_controller_1.default().getStats;
]); exports.default = {
login: login,
getVipInfo: getVipInfo,
getTaskList: getTaskList,
receiveTaskRewards: receiveTaskRewards,
getActivityBaseInfoById: getActivityBaseInfoById,
getMyPrizeList: getMyPrizeList,
receiveObjectPrize: receiveObjectPrize,
receiveEnamePrize: receiveEnamePrize,
doHelp: doHelp,
getStats: getStats
};
//# sourceMappingURL=index.js.map //# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,cAAc;;AAEd,iCAAwC;AACxC,gEAAyD;AACzD,gEAAyD;AACzD,gEAAyD;AACzD,oEAA6D;AAC7D,kEAA2D;AAC3D,gEAAyD;AAEzD,kBAAe,sBAAc,CAAC;IAC5B,yBAAc;IACd,yBAAc;IACd,yBAAc;IACd,2BAAgB;IAChB,0BAAe;IACf,yBAAc;CACf,CAAC,CAAA"} {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,cAAc;;AAEd,2CAA2C;AAC3C,gEAAyD;AACzD,gEAAyD;AACzD,gEAAyD;AACzD,oEAA6D;AAC7D,kEAA2D;AAC3D,gEAAyD;AAEnD,IAAA,KAAwB,IAAI,yBAAc,EAAE,EAA1C,KAAK,WAAA,EAAE,UAAU,gBAAyB,CAAA;AAC5C,IAAA,KASF,IAAI,yBAAc,EAAE,EARtB,WAAW,iBAAA,EACX,kBAAkB,wBAAA,EAClB,mBAAmB,yBAAA,EAAE,kBAAkB;AACvC,YAAY,kBAAA,EACZ,cAAc,oBAAA,EACd,iBAAiB,uBAAA,EACjB,kBAAkB,wBAAA,EAClB,qBAAqB,2BACC,CAAA;AAElB,IAAA,KAAoD,IAAI,yBAAc,EAAE,EAAtE,uBAAuB,6BAAA,EAAE,oBAAoB,0BAAyB,CAAA;AAExE,IAAA,KAA8E,IAAI,2BAAgB,EAAE,EAAlG,cAAc,oBAAA,EAAE,kBAAkB,wBAAA,EAAE,iBAAiB,uBAAA,EAAE,gBAAgB,sBAA2B,CAAA;AAElG,IAAA,MAAM,GAAK,IAAI,0BAAe,EAAE,OAA1B,CAA0B;AAEhC,IAAA,QAAQ,GAAK,IAAI,yBAAc,EAAE,SAAzB,CAAyB;AAEzC,kBAAe;IACb,KAAK,OAAA;IACL,UAAU,YAAA;IACV,WAAW,aAAA;IACX,kBAAkB,oBAAA;IAClB,uBAAuB,yBAAA;IACvB,cAAc,gBAAA;IACd,kBAAkB,oBAAA;IAClB,iBAAiB,mBAAA;IACjB,MAAM,QAAA;IACN,QAAQ,UAAA;CACT,CAAA"}
\ No newline at end of file \ No newline at end of file
...@@ -7,11 +7,11 @@ import { PRIZE_TYPE, PRIZE_DATA_TYPE, DRAW_STATUS } from '../constants' ...@@ -7,11 +7,11 @@ import { PRIZE_TYPE, PRIZE_DATA_TYPE, DRAW_STATUS } from '../constants'
import { getToday, logger } from '../utils' import { getToday, logger } from '../utils'
import { CodeType } from 'taobao-mini-sdk/lib/utils/codetypes' import { CodeType } from 'taobao-mini-sdk/lib/utils/codetypes'
interface IPrizeListParams { export interface IPrizeListParams {
activityId: string activityId: string
} }
interface IReceiveOjectParams { export interface IReceiveOjectParams {
activityId: string activityId: string
_id: string _id: string
name: string name: string
...@@ -22,7 +22,7 @@ interface IReceiveOjectParams { ...@@ -22,7 +22,7 @@ interface IReceiveOjectParams {
addressdetail: string addressdetail: string
} }
interface IReceiveEnameParams { export interface IReceiveEnameParams {
activityId: string activityId: string
_id: string _id: string
} }
......
...@@ -5,7 +5,7 @@ import { resultsModel, dateFormatter, transformBeijingDate, BaseDao } from '../s ...@@ -5,7 +5,7 @@ import { resultsModel, dateFormatter, transformBeijingDate, BaseDao } from '../s
import { CODE_TYPES } from '../constants' import { CODE_TYPES } from '../constants'
import * as xlsx from 'node-xlsx' import * as xlsx from 'node-xlsx'
interface IStatsParams { export interface IStatsParams {
activityId: string activityId: string
startDay: string startDay: string
endDay: string endDay: string
......
...@@ -5,11 +5,11 @@ import { services, paramsCheck, activityTimeCheck } from '../decorator' ...@@ -5,11 +5,11 @@ import { services, paramsCheck, activityTimeCheck } from '../decorator'
import { resultsModel } from '../sdk' import { resultsModel } from '../sdk'
import { UserService, AccessService } from '../service' import { UserService, AccessService } from '../service'
import { getConfig } from '../config' import { getConfig } from '../config'
interface IVipParams { export interface IVipParams {
activityId: string activityId: string
callbackUrl?: string callbackUrl?: string
} }
interface ILoginParams { export interface ILoginParams {
activityId: string activityId: string
userNick: string userNick: string
avatar: string avatar: string
......
/** @format */ /** @format */
import { exportHandlers } from './utils' // import { exportHandlers } from './utils'
import UserController from './controller/user.controller' import UserController from './controller/user.controller'
import TaskController from './controller/task.controller' import TaskController from './controller/task.controller'
import BaseController from './controller/base.controller' import BaseController from './controller/base.controller'
...@@ -8,11 +8,35 @@ import AwardsController from './controller/awards.controller' ...@@ -8,11 +8,35 @@ import AwardsController from './controller/awards.controller'
import ShareController from './controller/share.controller' import ShareController from './controller/share.controller'
import StatController from './controller/stat.controller' import StatController from './controller/stat.controller'
export default exportHandlers([ const { login, getVipInfo } = new UserController()
UserController, const {
TaskController, getTaskList,
BaseController, receiveTaskRewards,
AwardsController, getCollectGoodsList, // 获取收藏商品列表,包含收藏状态
ShareController, doFollowTask,
StatController doJumpLinkTask,
]) doBrowseGoodsTask,
doCollectGoodsTask,
doExchangeCreditsTask
} = new TaskController()
const { getActivityBaseInfoById, getItemListByItemIds } = new BaseController()
const { getMyPrizeList, receiveObjectPrize, receiveEnamePrize, drawLotteryPrize } = new AwardsController()
const { doHelp } = new ShareController()
const { getStats } = new StatController()
export default {
login,
getVipInfo,
getTaskList,
receiveTaskRewards,
getActivityBaseInfoById,
getMyPrizeList,
receiveObjectPrize,
receiveEnamePrize,
doHelp,
getStats
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment