Commit f4fedaf2 authored by zhaofei's avatar zhaofei

s

parents 006653cb 78167428
<view class="url-task">
<button size="small" type="primary" text="{{true}}" onTap="onOpenDialog" >{{taskData.title || '编辑任务'}}</button>
<task-dialog
<!-- <task-dialog
visible="{{visible}}"
a:if="{{visible}}"
onClose="onClose"
......@@ -10,5 +10,8 @@
hasItems="{{hasItems}}"
hasLink="{{hasLink}}"
taskData="{{taskData}}"
/>
/> -->
<input a:if="{{hasLink}}" style="width: 250px" onChange="onChange" data-name="link" defaultValue="{{link}}" name="link" placeholder="请输入跳转链接"/>
<items-config a:if="{{hasItems}}" itemIds="{{itemIds}}" onUpdate="onItemIdsChange"/>
</view>
Component({
mixins: [],
data: {
visible: false
taskRateType: 1,
times: '',
title: '',
link: '',
itemIds: '',
value: ''
},
props: {
hasLink: false,
......@@ -19,22 +24,27 @@ Component({
},
didMount() {
},
didUpdate() {},
didUnmount() {},
didUpdate() { },
didUnmount() { },
methods: {
onClose() {
onUpdate() {
const { onUpdate, dataName, type } = this.props;
let taskData = { ...this.props.taskData, ...this.data, type };
onUpdate && onUpdate(taskData, dataName);
},
onChange(e) {
const { value } = e.detail;
const { name } = e.target.dataset;
this.setData({
visible: false
[name]: value
})
this.onUpdate()
},
onOpenDialog() {
onItemIdsChange(ids) {
this.setData({
visible: true
itemIds: ids
})
this.onUpdate()
},
onUpdate(taskData) {
const { onUpdate, dataName } = this.props;
onUpdate && onUpdate(taskData, dataName);
}
},
});
{
"component": true,
"usingComponents": {
"task-dialog": "/components/dialog/task-dialog/task-dialog"
"task-dialog": "/components/dialog/task-dialog/task-dialog",
"items-config": "/components/task/items-config/items-config"
}
}
\ No newline at end of file
......@@ -32,7 +32,7 @@ Component({
<%- taskKeys.includes(activityConfigList[i].key) && activityConfigList[i].key !== 'label' ? `${activityConfigList[i].key}:{
value:${activityConfigList[i].value ? activityConfigList[i].value : 0},
taskRateType:TASK_RATE_TYPE.${activityConfigList[i].taskRateType},
times:${activityConfigList[i].times ? activityConfigList[i].times : 1}
times:${activityConfigList[i].times ? activityConfigList[i].times : 1},
},` : '' %><% } %>
},
// tasks: {
......
/** @format */
module.exports = {
parser: '@typescript-eslint/parser',
extends: ['prettier/@typescript-eslint', 'plugin:prettier/recommended'],
parserOptions: {
ecmaVersion: 2019,
sourceType: 'module'
},
env: {
browser: true,
node: true
}
}
.tea
.DS_Store
debug.log
node_modules
\ No newline at end of file
module.exports = {
"printWidth": 120,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"arrowParens": "avoid",
"insertPragma": true,
"tabWidth": 2,
"useTabs": false
};
\ No newline at end of file
# 安装依赖
```bash
yarn
```
# 编译ts代码
```bash
➜ npm start
```
# 启动mockServr
```bash
➜ npm run mock
```
## 库表规范
http://cf.dui88.com/pages/viewpage.action?pageId=63937755
## sdk 接口文档说明
http://cf.dui88.com/pages/viewpage.action?pageId=66194323
{
"runtime": "nodejs8",
"version": "1.0"
}
\ No newline at end of file
/** @format */
export interface IConfig {
vipCallBackUrl: string;
}
export declare const getConfig: (context: IContext<{}>) => IConfig;
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.getConfig = void 0;
var online_1 = require("./online");
var test_1 = require("./test");
var configs = {
online: online_1.cfg,
test: test_1.cfg,
mock: test_1.cfg
};
// 根据服务环境获取配置
exports.getConfig = function (context) {
var env = context.env;
return configs[env] || configs.online;
};
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,mCAAwC;AACxC,+BAAoC;AAMpC,IAAM,OAAO,GAAG;IACd,MAAM,cAAA;IACN,IAAI,YAAA;IACJ,IAAI,EAAE,UAAI;CACX,CAAA;AAED,aAAa;AACA,QAAA,SAAS,GAAG,UAAC,OAAqB;IAC7C,IAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;IACvB,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAA;AACvC,CAAC,CAAA"}
\ No newline at end of file
/** @format */
import { IConfig } from './index';
export declare const cfg: IConfig;
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.cfg = void 0;
var constants_1 = require("../constants");
exports.cfg = {
vipCallBackUrl: "https://m.duanqu.com/?_ariver_appid=" + constants_1.appId
};
//# sourceMappingURL=online.js.map
\ No newline at end of file
{"version":3,"file":"online.js","sourceRoot":"","sources":["../../src/config/online.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,0CAAoC;AAGvB,QAAA,GAAG,GAAY;IAC1B,cAAc,EAAE,yCAAuC,iBAAO;CAC/D,CAAA"}
\ No newline at end of file
/** @format */
import { IConfig } from './index';
export declare const cfg: IConfig;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cfg = void 0;
exports.cfg = {
vipCallBackUrl: process.env.vipLink
};
//# sourceMappingURL=test.js.map
\ No newline at end of file
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../src/config/test.ts"],"names":[],"mappings":";;;AAGa,QAAA,GAAG,GAAY;IAC1B,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO;CACpC,CAAA"}
\ No newline at end of file
/** @format */
export declare const BusinessError: {
ERROR_UPDATE_RETRY: {
code: string;
defaultMsg: string;
};
ERROR_NO_ACTIVITY: {
code: string;
defaultMsg: string;
};
ERROR_ACTIVITY_NOSTART: {
code: string;
defaultMsg: string;
};
ERROR_ACTIVITY_OVER: {
code: string;
defaultMsg: string;
};
ERROR_NO_USER: {
code: string;
defaultMsg: string;
};
ERROR_NO_VIP: {
code: string;
defaultMsg: string;
};
ERROR_TASK_NORECEIVE: {
code: string;
defaultMsg: string;
};
ERROR_TASK_ALREADYRECEIVE: {
code: string;
defaultMsg: string;
};
ERROR_TASK_COMPLETE: {
code: string;
defaultMsg: string;
};
ERROR_INVALID_INVITE_ID: {
code: string;
defaultMsg: string;
};
ERROR_NO_CREDITS: {
code: string;
defaultMsg: string;
};
ERROR_TASK_LIMIT: {
code: string;
defaultMsg: string;
};
ERROR_AREADY_INVITE_SUCCESS: {
code: string;
defaultMsg: string;
};
ERROR_NO_INVITE_SELF: {
code: string;
defaultMsg: string;
};
ERROR_FORBIDDEN_OPE: {
code: string;
defaultMsg: string;
};
ERROR_RECEIVE_PRIZE: {
code: string;
defaultMsg: string;
};
ERROR_SEND_PRIZE: {
code: string;
defaultMsg: string;
};
ERROR_NO_PRIZE: {
code: string;
defaultMsg: string;
};
ERROR_NO_STOCK: {
code: string;
defaultMsg: string;
};
ERROR_PRIZE_EXPIRED: {
code: string;
defaultMsg: string;
};
ERROR_CHEATING: {
code: string;
defaultMsg: string;
};
ERROR_NEW_VIP: {
code: string;
defaultMsg: string;
};
};
export declare const CODE_TYPES: {
PARAMS_ERROR: import("taobao-mini-sdk/lib/utils/codetypes").CodeType;
SYSTEM_ERROR: import("taobao-mini-sdk/lib/utils/codetypes").CodeType;
SUCCESS: import("taobao-mini-sdk/lib/utils/codetypes").CodeType;
} & {
ERROR_UPDATE_RETRY: {
code: string;
defaultMsg: string;
};
ERROR_NO_ACTIVITY: {
code: string;
defaultMsg: string;
};
ERROR_ACTIVITY_NOSTART: {
code: string;
defaultMsg: string;
};
ERROR_ACTIVITY_OVER: {
code: string;
defaultMsg: string;
};
ERROR_NO_USER: {
code: string;
defaultMsg: string;
};
ERROR_NO_VIP: {
code: string;
defaultMsg: string;
};
ERROR_TASK_NORECEIVE: {
code: string;
defaultMsg: string;
};
ERROR_TASK_ALREADYRECEIVE: {
code: string;
defaultMsg: string;
};
ERROR_TASK_COMPLETE: {
code: string;
defaultMsg: string;
};
ERROR_INVALID_INVITE_ID: {
code: string;
defaultMsg: string;
};
ERROR_NO_CREDITS: {
code: string;
defaultMsg: string;
};
ERROR_TASK_LIMIT: {
code: string;
defaultMsg: string;
};
ERROR_AREADY_INVITE_SUCCESS: {
code: string;
defaultMsg: string;
};
ERROR_NO_INVITE_SELF: {
code: string;
defaultMsg: string;
};
ERROR_FORBIDDEN_OPE: {
code: string;
defaultMsg: string;
};
ERROR_RECEIVE_PRIZE: {
code: string;
defaultMsg: string;
};
ERROR_SEND_PRIZE: {
code: string;
defaultMsg: string;
};
ERROR_NO_PRIZE: {
code: string;
defaultMsg: string;
};
ERROR_NO_STOCK: {
code: string;
defaultMsg: string;
};
ERROR_PRIZE_EXPIRED: {
code: string;
defaultMsg: string;
};
ERROR_CHEATING: {
code: string;
defaultMsg: string;
};
ERROR_NEW_VIP: {
code: string;
defaultMsg: string;
};
};
export declare const TBERROR: {
USER_PERMISSION_EXCEED_MAX_RIGHT_COUNT_IN_DAY: string;
COUPON_INVALID_OR_DELETED: string;
APPLY_OWNSELF_COUPON: string;
APPLY_SINGLE_COUPON_COUNT_EXCEED_LIMIT: string;
NO_RIGHT_QUANTITY: string;
ERRORA_3_567: string;
'Invalid session': string;
};
export declare const DRAW_STATUS: {
WAITAWARD: number;
PROCESSING: number;
SUCCESS: number;
FAIL: number;
EXPIRED: number;
RETRY: number;
};
export declare const appId = 3000000027100865;
export declare const C_APP_NAME: string;
export declare const TAOBAO_SUCCESS_ORDER_STATUS: string[];
export declare const enum ACTIVITY_STATUS {
NORMAL = 1,
DELETE = 2
}
export declare const enum DELETE_STATUS {
NORMAL = 1,
DELETE = 2
}
export declare const TASK_RATE_TYPE: {
FOREVER: number;
EVERYDAY: number;
NOLIMIT: number;
};
export declare const TASK_STATUS: {
WAIT_DO: number;
WAIT_RECEIVE: number;
DONE: number;
};
export declare const PRIZE_TYPE: {
ENAME: number;
CREDITS: number;
OBJECT: number;
THANKS: number;
};
export declare const PRIZE_DATA_TYPE: {
RANKING: number;
PROBABILITY: number;
};
export declare enum SWICH_TOCK {
LIMIT = 1,
NO_LIMIT = 2
}
export declare const SHIP_STATUS: {
NO_ADDRESS: number;
NO_SHIP: number;
HAS_SHIP: number;
};
export declare enum STAT_TYPE {
DOJOIN = 1,
CLICK_TASK_INVITE = 2,
CLICK_DOHELP = 3,
DOHELP = 4,
CLICK_TASK_ORDER = 5,
FINISH_TASK_ORDER = 6,
CLICK_TASK_COLLECT = 7,
FINISH_TASK_COLLECT = 8,
FINISH_TASK_GROUP = 9
}
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.STAT_TYPE = exports.SHIP_STATUS = exports.SWICH_TOCK = exports.PRIZE_DATA_TYPE = exports.PRIZE_TYPE = exports.TASK_STATUS = exports.TASK_RATE_TYPE = exports.TAOBAO_SUCCESS_ORDER_STATUS = exports.C_APP_NAME = exports.appId = exports.DRAW_STATUS = exports.TBERROR = exports.CODE_TYPES = exports.BusinessError = void 0;
var sdk_1 = require("./sdk");
exports.BusinessError = {
// 更新重试失败(用于并发更新)
ERROR_UPDATE_RETRY: {
code: "210001",
defaultMsg: "\u7CFB\u7EDF\u9519\u8BEF"
},
// 活动不存在
ERROR_NO_ACTIVITY: {
code: "220001",
defaultMsg: "\u6D3B\u52A8\u4E0D\u5B58\u5728"
},
// 活动未开始
ERROR_ACTIVITY_NOSTART: {
code: "220002",
defaultMsg: "\u6D3B\u52A8\u672A\u5F00\u59CB"
},
// 活动已结束
ERROR_ACTIVITY_OVER: {
code: "220003",
defaultMsg: "\u6D3B\u52A8\u5DF2\u7ED3\u675F"
},
// 用户不存在
ERROR_NO_USER: {
code: "310002",
defaultMsg: "\u7528\u6237\u4E0D\u5B58\u5728"
},
// 非店铺会员
ERROR_NO_VIP: {
code: "310003",
defaultMsg: '非店铺会员'
},
// 暂无次数可领取
ERROR_TASK_NORECEIVE: {
code: "430001",
defaultMsg: "\u8BE5\u4EFB\u52A1\u6682\u65E0\u9886\u53D6\u6B21\u6570"
},
// 任务奖励已领取
ERROR_TASK_ALREADYRECEIVE: {
code: "430002",
defaultMsg: "\u4EFB\u52A1\u5956\u52B1\u5DF2\u9886\u53D6"
},
// 任务已完成
ERROR_TASK_COMPLETE: {
code: "430003",
defaultMsg: "\u4EFB\u52A1\u5DF2\u5B8C\u6210"
},
ERROR_INVALID_INVITE_ID: {
code: "430004",
defaultMsg: "\u9080\u8BF7\u7801\u65E0\u6548"
},
ERROR_NO_CREDITS: {
code: "430005",
defaultMsg: "\u4EFB\u52A1\u6240\u9700\u79EF\u5206\u4E0D\u8DB3"
},
ERROR_TASK_LIMIT: {
code: "430006",
defaultMsg: "\u4ECA\u65E5\u8BE5\u4EFB\u52A1\u6B21\u6570\u8D85\u9650"
},
ERROR_AREADY_INVITE_SUCCESS: {
code: "430007",
defaultMsg: "\u5DF2\u7ECF\u6210\u529F\u9080\u8BF7\u8FC7"
},
ERROR_NO_INVITE_SELF: {
code: "430008",
defaultMsg: "\u81EA\u5DF1\u4E0D\u80FD\u7ED9\u81EA\u5DF1\u52A9\u529B"
},
ERROR_FORBIDDEN_OPE: {
code: "530001",
defaultMsg: "\u975E\u6CD5\u64CD\u4F5C"
},
ERROR_RECEIVE_PRIZE: {
code: "630002",
defaultMsg: "\u5956\u52B1\u5DF2\u9886\u53D6"
},
ERROR_SEND_PRIZE: {
code: "730001",
defaultMsg: "\u53D1\u5956\u5931\u8D25"
},
ERROR_NO_PRIZE: {
code: "730002",
defaultMsg: "\u5956\u54C1\u4E0D\u5B58\u5728"
},
ERROR_NO_STOCK: {
code: "730003",
defaultMsg: "\u5E93\u5B58\u4E0D\u8DB3"
},
ERROR_PRIZE_EXPIRED: {
code: "740001",
defaultMsg: "\u5956\u54C1\u5DF2\u8D85\u8FC7\u9886\u53D6\u65F6\u95F4"
},
ERROR_CHEATING: {
code: "740002",
defaultMsg: "\u5DF2\u7ECF\u4E3A\u5176\u4ED6\u4EBA\u52A9\u529B\u8FC7\u5566"
},
ERROR_NEW_VIP: {
code: "740003",
defaultMsg: "\u4E0D\u662F\u65B0\u4F1A\u5458"
}
};
exports.CODE_TYPES = Object.assign({}, sdk_1.DEFAULT_CODE_TYPES, exports.BusinessError);
// tb 接口返回部分错误
exports.TBERROR = {
USER_PERMISSION_EXCEED_MAX_RIGHT_COUNT_IN_DAY: '今日领取达到上限,明日再来领取哦',
COUPON_INVALID_OR_DELETED: '权益无效或者被删除,请联系商家',
APPLY_OWNSELF_COUPON: '不能领取自己家店铺权益',
APPLY_SINGLE_COUPON_COUNT_EXCEED_LIMIT: '请至卡券包删除无用权益再领取',
NO_RIGHT_QUANTITY: '权益库存不足,请联系商家',
ERRORA_3_567: '领取失败,为风险用户',
'Invalid session': '订购应用已过期,请联系商家处理'
};
// 领取奖品状态
exports.DRAW_STATUS = {
// 待领取
WAITAWARD: 1,
// 处理中
PROCESSING: 2,
// 领取成功
SUCCESS: 3,
// 领取失败
FAIL: 4,
// 已过期
EXPIRED: 5,
// 重新领取
RETRY: 6
};
exports.appId = 3000000027100865;
// C端的APP NAME
exports.C_APP_NAME = "promotioncenter-" + exports.appId;
// 订单状态
exports.TAOBAO_SUCCESS_ORDER_STATUS = [
'WAIT_SELLER_SEND_GOODS',
'SELLER_CONSIGNED_PART',
'WAIT_BUYER_CONFIRM_GOODS',
'TRADE_BUYER_SIGNED',
'TRADE_FINISHED',
'PAID_FORBID_CONSIGN'
];
//任务频率类型常量
exports.TASK_RATE_TYPE = {
FOREVER: 1,
EVERYDAY: 2,
NOLIMIT: 3
};
//任务状态
exports.TASK_STATUS = {
WAIT_DO: 1,
WAIT_RECEIVE: 2,
DONE: 3 // 已完成
};
// 奖品类型
exports.PRIZE_TYPE = {
ENAME: 1,
CREDITS: 2,
OBJECT: 3,
THANKS: 5
};
// 奖品分类
exports.PRIZE_DATA_TYPE = {
RANKING: 1,
PROBABILITY: 2 // 概率
};
// 奖品是否限制库存
var SWICH_TOCK;
(function (SWICH_TOCK) {
SWICH_TOCK[SWICH_TOCK["LIMIT"] = 1] = "LIMIT";
SWICH_TOCK[SWICH_TOCK["NO_LIMIT"] = 2] = "NO_LIMIT";
})(SWICH_TOCK = exports.SWICH_TOCK || (exports.SWICH_TOCK = {}));
//物流状态
exports.SHIP_STATUS = {
NO_ADDRESS: 1,
NO_SHIP: 2,
HAS_SHIP: 3
};
// 记录数据
var STAT_TYPE;
(function (STAT_TYPE) {
STAT_TYPE[STAT_TYPE["DOJOIN"] = 1] = "DOJOIN";
STAT_TYPE[STAT_TYPE["CLICK_TASK_INVITE"] = 2] = "CLICK_TASK_INVITE";
STAT_TYPE[STAT_TYPE["CLICK_DOHELP"] = 3] = "CLICK_DOHELP";
STAT_TYPE[STAT_TYPE["DOHELP"] = 4] = "DOHELP";
STAT_TYPE[STAT_TYPE["CLICK_TASK_ORDER"] = 5] = "CLICK_TASK_ORDER";
STAT_TYPE[STAT_TYPE["FINISH_TASK_ORDER"] = 6] = "FINISH_TASK_ORDER";
STAT_TYPE[STAT_TYPE["CLICK_TASK_COLLECT"] = 7] = "CLICK_TASK_COLLECT";
STAT_TYPE[STAT_TYPE["FINISH_TASK_COLLECT"] = 8] = "FINISH_TASK_COLLECT";
STAT_TYPE[STAT_TYPE["FINISH_TASK_GROUP"] = 9] = "FINISH_TASK_GROUP"; // 成功加入群聊
})(STAT_TYPE = exports.STAT_TYPE || (exports.STAT_TYPE = {}));
//# sourceMappingURL=constants.js.map
\ No newline at end of file
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,6BAA0C;AAE7B,QAAA,aAAa,GAAG;IAC3B,iBAAiB;IACjB,kBAAkB,EAAE;QAClB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,0BAAM;KACnB;IACD,QAAQ;IACR,iBAAiB,EAAE;QACjB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,gCAAO;KACpB;IACD,QAAQ;IACR,sBAAsB,EAAE;QACtB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,gCAAO;KACpB;IACD,QAAQ;IACR,mBAAmB,EAAE;QACnB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,gCAAO;KACpB;IACD,QAAQ;IACR,aAAa,EAAE;QACb,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,gCAAO;KACpB;IACD,QAAQ;IACR,YAAY,EAA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CAAC;CACV,CAAA;AAED,OAAO;AACM,QAAA,eAAe,GAAG;IAC7B,OAAO,EAAE,CAAC;IACV,WAAW,EAAE,CAAC,CAAC,KAAK;CACrB,CAAA;AAED,WAAW;AACX,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,6CAAS,CAAA;IACT,mDAAY,CAAA;AACd,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB;AAED,MAAM;AACO,QAAA,WAAW,GAAG;IACzB,UAAU,EAAE,CAAC;IACb,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,CAAC;CACZ,CAAA;AAED,OAAO;AACP,IAAY,SAUX;AAVD,WAAY,SAAS;IACnB,6CAAU,CAAA;IACV,mEAAqB,CAAA;IACrB,yDAAgB,CAAA;IAChB,6CAAU,CAAA;IACV,iEAAoB,CAAA;IACpB,mEAAqB,CAAA;IACrB,qEAAsB,CAAA;IACtB,uEAAuB,CAAA;IACvB,mEAAqB,CAAA,CAAC,SAAS;AACjC,CAAC,EAVW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAUpB"}
\ No newline at end of file
/** @format */
import { AwardsService } from '../service';
import { CodeType } from 'taobao-mini-sdk/lib/utils/codetypes';
export interface IPrizeListParams {
activityId: string;
}
export interface IReceiveOjectParams {
activityId: string;
id: string;
name: string;
phone: string;
province: string;
city: string;
area: string;
addressDetail: string;
}
export interface IReceiveEnameParams {
activityId: string;
id: string;
}
export default class AwardsController {
/**
* 我的奖品列表
*/
getMyPrizeList(context: IContext<IPrizeListParams>, {}: {}, [awardSer]: [AwardsService]): Promise<IResult<{
list: IAwards[];
}>>;
/**
* 领取实物
*/
receiveObjectPrize(context: IContext<IReceiveOjectParams>, {}: {}, [awardSer]: [AwardsService]): Promise<IResult<boolean>>;
/**
* 权益重新领取
*/
receiveEnamePrize(context: IContext<IReceiveEnameParams>, {}: {}, [awardSer]: [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<CodeType | IAwards, true>>;
/**
* 概率抽奖
*/
drawLotteryPrize(context: IContext<IParams>, { userInfo }: IControllerInfos, [awardSer]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
id: number | CodeType;
type: number;
name: string;
image: string;
}, true>>;
}
This diff is collapsed.
{"version":3,"file":"awards.controller.js","sourceRoot":"","sources":["../../src/controller/awards.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,0CAAkF;AAClF,8BAAqC;AACrC,sCAA0C;AAC1C,0CAAmF;AACnF,kCAA2C;AAuB3C;IAAA;IA6IA,CAAC;IA5IC;;OAEG;IAIG,yCAAc,GAApB,UACE,OAAmC,EACnC,EAAE,EACF,EAA2B;YAA1B,QAAQ,QAAA;;;;;;wBAGP,MAAM,GAEJ,OAAO,OAFH,EACE,UAAU,GAChB,OAAO,gBADS,CACT;wBACE,qBAAM,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,QAAA,EAAE,UAAU,YAAA,EAAE,CAAC,EAAA;;wBAA9D,MAAM,GAAG,SAAqD;wBAClE,sBAAO,kBAAY,CAAC,OAAO,CAAC;gCAC1B,IAAI,EAAE,MAAM;6BACb,CAAC,EAAA;;;;KACH;IAED;;OAEG;IAIG,6CAAkB,GAAxB,UACE,OAAsC,EACtC,EAAE,EACF,EAA2B;YAA1B,QAAQ,QAAA;;;;;;wBAEL,KAAuE,OAAO,CAAC,IAAI,EAAjF,QAAQ,cAAA,EAAE,IAAI,UAAA,EAAE,IAAI,UAAA,EAAE,aAAa,mBAAA,EAAE,EAAE,QAAA,EAAE,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,UAAU,gBAAA,CAAiB;wBAE1E,qBAAM,QAAQ,CAAC,kBAAkB,CAAC,EAAE,EAAE;gCACjD,UAAU,YAAA;gCACV,QAAQ,UAAA;gCAC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AAI,MAAA;4BACJ,KAAK,OAAA;4BACL,IAAI,MAAA;4BACJ,KAAK,OAAA;4BACL,QAAQ,UAAA;4BACR,SAAS,EAAE,gBAAQ,EAAE;yBACtB,CAAA;wBAGc,qBAAM,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAA;;wBAAxC,MAAM,GAAG,SAA+B;wBAE9C,sBAAO,kBAAY,CAAC,OAAO,CAAC;gCAC1B,EAAE,EAAE,MAAM;gCACV,IAAI,MAAA;gCACJ,IAAI,MAAA;gCACJ,KAAK,OAAA;6BACN,CAAC,EAAA;;;;KACH;IArID;QAHC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,oBAAQ,CAAC,CAAC,uBAAa,CAAC,CAAC;;;;0DAczB;IAQD;QAHC,uBAAW,CAAC,CAAC,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;QAC/F,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,oBAAQ,CAAC,CAAC,uBAAa,CAAC,CAAC;;;;8DAsBzB;IAQD;QAHC,uBAAW,CAAC,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;QACjC,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,oBAAQ,CAAC,CAAC,uBAAa,CAAC,CAAC;;;;6DAYzB;IAQD;QAHC,uBAAW,CAAC,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;QAC5C,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,uBAAa,CAAC,CAAC;;;;4DAiEzB;IACH,uBAAC;CAAA,AA7ID,IA6IC;kBA7IoB,gBAAgB"}
\ No newline at end of file
/** @format */
import { BaseService } from '../service';
export default class BaseController {
/**
* 活动基本信息
*/
getActivityBaseInfoById(context: IContext<{
activityId: string;
}>, {}: {}, [baseService]: [BaseService]): Promise<IResult<IActivityInfo>>;
/**
* 获取商品列表
*/
getItemListByItemIds(context: IContext<{
itemIds: string;
}>, { session }: IControllerInfos, [baseService]: [BaseService]): Promise<IResult<ITaoBaoItems[]>>;
}
"use strict";
/** @format */
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var constants_1 = require("./../constants");
var decorator_1 = require("../decorator");
var sdk_1 = require("../sdk");
var service_1 = require("../service");
var BaseController = /** @class */ (function () {
function BaseController() {
}
/**
* 活动基本信息
*/
BaseController.prototype.getActivityBaseInfoById = function (context, _a, _b) {
var baseService = _b[0];
return __awaiter(this, void 0, void 0, function () {
var activityId, activityInfo;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
activityId = context.data.activityId;
// 参数校验
if (!activityId) {
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.PARAMS_ERROR, "activityId\u5FC5\u586B")];
}
return [4 /*yield*/, baseService.getBaseInfo(activityId)];
case 1:
activityInfo = _c.sent();
return [2 /*return*/, sdk_1.resultsModel.success(activityInfo)];
}
});
});
};
/**
* 获取商品列表
*/
BaseController.prototype.getItemListByItemIds = function (context, _a, _b) {
var session = _a.session;
var baseService = _b[0];
return __awaiter(this, void 0, void 0, function () {
var itemIds, list;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
itemIds = context.data.itemIds;
return [4 /*yield*/, baseService.getItemListByIds(itemIds, session)];
case 1:
list = _c.sent();
return [2 /*return*/, sdk_1.resultsModel.success(list)];
}
});
});
};
__decorate([
decorator_1.paramsCheck(['activityId']),
decorator_1.services([service_1.BaseService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], BaseController.prototype, "getActivityBaseInfoById", null);
__decorate([
decorator_1.paramsCheck(['itemIds']),
decorator_1.services([service_1.BaseService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], BaseController.prototype, "getItemListByItemIds", null);
return BaseController;
}());
exports.default = BaseController;
//# sourceMappingURL=base.controller.js.map
\ No newline at end of file
{"version":3,"file":"base.controller.js","sourceRoot":"","sources":["../../src/controller/base.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,4CAA2C;AAC3C,0CAAoD;AAEpD,8BAAqC;AAErC,sCAAwC;AACxC;IAAA;IAuCA,CAAC;IAtCC;;OAEG;IAGG,gDAAuB,GAA7B,UACE,OAEE,EACF,EAAE,EACF,EAA4B;YAA3B,WAAW,QAAA;;;;;;wBAEJ,UAAU,GAAK,OAAO,CAAC,IAAI,WAAjB,CAAiB;wBACnC,OAAO;wBACP,IAAI,CAAC,UAAU,EAAE;4BACf,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,wBAAc,CAAC,EAAA;yBACnE;wBAEoB,qBAAM,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,EAAA;;wBAAxD,YAAY,GAAG,SAAyC;wBAC9D,sBAAO,kBAAY,CAAC,OAAO,CAAC,YAAY,CAAC,EAAA;;;;KAC1C;IAED;;OAEG;IAGG,6CAAoB,GAA1B,UACE,OAAsC,EACtC,EAA6B,EAC7B,EAA4B;YAD1B,OAAO,aAAA;YACR,WAAW,QAAA;;;;;;wBAEJ,OAAO,GAAK,OAAO,CAAC,IAAI,QAAjB,CAAiB;wBAEnB,qBAAM,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,EAAA;;wBAA3D,IAAI,GAAG,SAAoD;wBAEjE,sBAAO,kBAAY,CAAC,OAAO,CAAC,IAAI,CAAC,EAAA;;;;KAClC;IAhCD;QAFC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;iEAgBvB;IAOD;QAFC,uBAAW,CAAC,CAAC,SAAS,CAAC,CAAC;QACxB,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;8DAWvB;IACH,qBAAC;CAAA,AAvCD,IAuCC;kBAvCoB,cAAc"}
\ No newline at end of file
export declare const getGameInfo: any;
export declare const doLike: any;
export declare const getGamePrize: any;
export declare const getEntryStatus: any;
export declare const getSurpriseVideo: any;
This diff is collapsed.
{"version":3,"file":"game.controller.js","sourceRoot":"","sources":["../../src/controller/game.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAgG;AAEhG,8BAAqC;AACrC,0CAAiM;AACjM,sCAAsF;AACtF,kCAAqD;AACrD,IAAM,YAAY,GAAG,IAAI,kBAAY,EAAE,CAAC;AAE3B,QAAA,WAAW,GAAG,sBAAU,CACnC;IACE,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;IAC3B,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IAC9B,oBAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;CAC/B,EACD,CAAE,qBAAW,EAAE,uBAAa,EAAE,uBAAa,EAAE,uBAAa,CAAE,CAC7D,CAAC,UACA,OAAgB,EAChB,EAAqB,EACrB,EAA0H;QADxH,QAAQ,cAAA,EAAE,OAAO,aAAA;QACjB,WAAW,QAAA,EAAE,aAAa,QAAA,EAAE,aAAa,QAAA,EA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a,qBAAM,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,MAAM,QAAA,EAAE,CAAC,EAAA;;oBAAjE,WAAW,GAAG,SAAmD;oBAEvE,QAAQ,GAAG,WAAW,IAAI,WAAW,CAAC,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,CAAA;;yBAIpE,sBAAO,YAAY,CAAC,OAAO,CAAC;wBAC1B,GAAG,EAAE,MAAM;wBACX,IAAI,MAAA;wBACJ,IAAI,MAAA;wBACJ,KAAK,OAAA;wBACL,QAAQ,UAAA;qBACT,CAAC,EAAA;;;;CAEH,CAAC,CAAA;AAEW,QAAA,cAAc,GAAG,sBAAU,CACtC,EAAE,CACH,CAAC;;;QAEM,QAAQ,GAAG,IAAI,IAAI,CAAC,+BAAmB,CAAC,CAAC,OAAO,EAAE,CAAC;QAEzD,sBAAO,YAAY,CAAC,OAAO,CAAC;gBAC1B,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,QAAQ;aAC/B,CAAC,EAAA;;KAEH,CAAC,CAAA;AAGW,QAAA,gBAAgB,GAAG,sBAAU,CACxC,EAAE,CACH,CAAC,UAAO,OAAgB;;;;oBAEH,qBAAM,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,MAAM,EAAG,0DAA0D,EAAE,CAAC,EAAA;;gBAA9H,WAAW,GAAG,SAAgH;gBAIpI,sBAAO,YAAY,CAAC,OAAO,CAAC;wBAC1B,QAAQ,EAAE,WAAW,IAAI,WAAW,CAAC,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG;qBAClE,CAAC,EAAA;;;KAEH,CAAC,CAAA"}
\ No newline at end of file
export declare const doRecord: any;
export declare const doClickSurpriseBtn: any;
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.doClickSurpriseBtn = exports.doRecord = void 0;
var decorator_1 = require("../decorator");
var sdk_1 = require("../sdk");
var constants_1 = require("../constants");
var service_1 = require("../service");
var resultsModel = new sdk_1.ResultsModel();
exports.doRecord = decorator_1.decorators([
decorator_1.paramsCheck(['activityId', 'type']),
decorator_1.actvityTimeCheck,
decorator_1.userCheck({ intercept: true })
], [service_1.RecordService])(function (context, _a, _b) {
var recordService = _b[0];
return __awaiter(void 0, void 0, void 0, function () {
var type, mapper;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
type = context.data.type;
mapper = {
// 点击分享
share: constants_1.RECORD_TYPE.SHARE,
// 点击助力
help: constants_1.RECORD_TYPE.ClICK_HELP,
// 点击任务按钮
task: constants_1.RECORD_TYPE.CLICK_TASK,
// 点击挑战2按钮
game2: constants_1.RECORD_TYPE.GAME2,
// 点击立即购买按钮
clickGoods: constants_1.RECORD_TYPE.ORDER_TASK
};
if (!mapper[type]) return [3 /*break*/, 2];
return [4 /*yield*/, recordService.addRecord(mapper[type])];
case 1:
_c.sent();
_c.label = 2;
case 2: return [2 /*return*/, resultsModel.success(true)];
}
});
});
});
exports.doClickSurpriseBtn = decorator_1.decorators([
decorator_1.paramsCheck(['activityId']),
decorator_1.actvityTimeCheck,
decorator_1.userCheck({ intercept: true })
], [service_1.UserService])(function (context, _a, _b) {
var userInfo = _a.userInfo;
var userService = _b[0];
return __awaiter(void 0, void 0, void 0, function () {
var _id;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
_id = userInfo._id;
return [4 /*yield*/, userService.updateUser(_id, {
game2unLockSurpriseClicked: true
})];
case 1:
_c.sent();
return [2 /*return*/, resultsModel.success(true)];
}
});
});
});
//# sourceMappingURL=record.controller.js.map
\ No newline at end of file
{"version":3,"file":"record.controller.js","sourceRoot":"","sources":["../../src/controller/record.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAqF;AAErF,8BAAqC;AACrC,0CAA0C;AAC1C,sCAAuD;AAEvD,IAAM,YAAY,GAAG,IAAI,kBAAY,EAAE,CAAC;AAG3B,QAAA,QAAQ,GAAG,sBAAU,CAChC;IACE,uBAAW,CAAC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AY,CAAC,OAAO,CAAC,IAAI,CAAC,EAAA;;;;CAElC,CAAC,CAAA"}
\ No newline at end of file
/** @format */
import { UserService, AccessService, TaskService, StatService } from '../service';
export default class Share {
/**
* 完成分享
*/
doHelp(context: IContext<IParams>, { userInfo, vipInfo, activityInfo }: IControllerInfos, [userService, taskService, accessService, statService]: [UserService, TaskService, AccessService, StatService]): Promise<IResult<boolean>>;
}
"use strict";
/** @format */
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var constants_1 = require("./../constants");
var check_1 = require("../decorator/check");
var services_1 = require("../decorator/services");
var sdk_1 = require("../sdk");
var utils_1 = require("../utils");
var service_1 = require("../service");
var Share = /** @class */ (function () {
function Share() {
}
/**
* 完成分享
*/
Share.prototype.doHelp = function (context, _a, _b) {
var userInfo = _a.userInfo, vipInfo = _a.vipInfo, activityInfo = _a.activityInfo;
var userService = _b[0], taskService = _b[1], accessService = _b[2], statService = _b[3];
return __awaiter(this, void 0, void 0, function () {
var _c, inviteId, activityId, openId, inviteUserInfo, inviteCompleteList, tasks, value, isNewVip, isValidShare, today, inviteUserId;
var _d;
return __generator(this, function (_e) {
switch (_e.label) {
case 0:
console.log(process.env, 'process.env');
_c = context.data, inviteId = _c.inviteId, activityId = _c.activityId;
openId = context.openId;
if (openId === inviteId)
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.ERROR_NO_INVITE_SELF)];
if (userInfo.isCheating)
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.ERROR_CHEATING)];
return [4 /*yield*/, userService.getUserInfoByOpenId(inviteId)
// inviteId的用户信息查询不到, 则inviteId无效
];
case 1:
inviteUserInfo = _e.sent();
// inviteId的用户信息查询不到, 则inviteId无效
if (!inviteUserInfo)
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.ERROR_INVALID_INVITE_ID)];
inviteCompleteList = taskService.getCompleteTaskByUserTaskInfo('invites', inviteUserInfo);
// 邀请成功列表有该用户信息
if (inviteCompleteList.some(function (v) { return v.openId === openId; })) {
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.ERROR_AREADY_INVITE_SUCCESS)];
}
tasks = activityInfo.tasks;
value = (tasks || {}).invites.value;
isNewVip = userService.checkNewVip(userInfo, vipInfo);
if (!isNewVip)
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.ERROR_NEW_VIP)
// 满足邀请标准的条件, 根据需求变化
];
isValidShare = [isNewVip].every(function (v) { return !!v; });
today = utils_1.getToday();
if (!isValidShare) return [3 /*break*/, 5];
inviteUserId = inviteUserInfo._id;
// 增加邀请人的待领取次数和邀请记录
return [4 /*yield*/, userService.updateUser(userInfo._id, {
$set: {
isCheating: true,
'member.newMember': true,
'member.bememberTime': Date.now(),
'member.bememberDay': today,
inviteId: inviteId
}
})];
case 2:
// 增加邀请人的待领取次数和邀请记录
_e.sent();
return [4 /*yield*/, statService.addStat(constants_1.STAT_TYPE.DOHELP, userInfo, {
inviteId: inviteId
})];
case 3:
_e.sent();
return [4 /*yield*/, userService.updateUser(inviteUserId, {
$inc: {
'remainTimes.invites': +value
},
$push: (_d = {},
_d["taskInfo." + today + ".invites"] = { openId: openId, createTime: Date.now() },
_d)
})];
case 4:
_e.sent();
_e.label = 5;
case 5: return [2 /*return*/, sdk_1.resultsModel.success(true)];
}
});
});
};
__decorate([
check_1.paramsCheck(['activityId', 'inviteId']),
check_1.activityTimeCheck,
check_1.vipCheck({ intercept: true }),
services_1.services([service_1.UserService, service_1.TaskService, service_1.AccessService, service_1.StatService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], Share.prototype, "doHelp", null);
return Share;
}());
exports.default = Share;
//# sourceMappingURL=share.controller.js.map
\ No newline at end of file
{"version":3,"file":"share.controller.js","sourceRoot":"","sources":["../../src/controller/share.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,4CAAsD;AACtD,4CAAwF;AACxF,kDAAgD;AAEhD,8BAAqC;AACrC,kCAAmC;AACnC,sCAAiF;AAEjF;IAAA;IAwEA,CAAC;IAvEC;;OAEG;IAKG,sBAAM,GAAZ,UACE,OAA0B,EAC1B,EAAqD,EACrD,EAA8G;YAD5G,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,YAAY,kBAAA;YAChC,WAAW,QAAA,EAAE,WAAW,QAAA,EAAE,aAAa,QAAA,EAAE,WAAW,QAAA;;;;;;;wBAErD,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,aAAa,CAAC,CAAA;wBACjC,KAA2B,OAAO,CAAC,IAAI,EAArC,QAAQ,cAAA,EAAE,UAAU,gBAAA,CAAiB;wBACrC,MAAM,GAAK,OAAO,OAAZ,CAAY;wBAE1B,IAAI,MAAM,KAAK,QAAQ;4BAAE,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,oBAAoB,CAAC,EAAA;wBACnF,IAAI,QAAQ,CAAC,UAAU;4BAAE,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,cAAc,CAAC,EAAA;wBAC3C,qBAAM,WAAW,CAAC,mBAAmB,CAAC,QAAQ,CAAC;4BACjF,iCAAiC;0BADgD;;wBAA3E,cAAc,GAAc,SAA+C;wBACjF,iCAAiC;wBACjC,IAAI,CAAC,cAAc;4BAAE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AS,CAAC,MAAM,EAAE,QAAQ,EAAE;gCACpD,QAAQ,UAAA;6BACT,CAAC,EAAA;;wBAFF,SAEE,CAAA;wBACF,qBAAM,WAAW,CAAC,UAAU,CAAC,YAAY,EAAE;gCACzC,IAAI,EAAE;oCACJ,qBAAqB,EAAE,CAAC,KAAK;iCAC9B;gCACD,KAAK;oCACH,GAAC,cAAY,KAAK,aAAU,IAAG,EAAE,MAAM,QAAA,EAAE,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE;uCAClE;6BACF,CAAC,EAAA;;wBAPF,SAOE,CAAA;;4BAGJ,sBAAO,kBAAY,CAAC,OAAO,CAAC,IAAI,CAAC,EAAA;;;;KAClC;IA/DD;QAJC,mBAAW,CAAC,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QACvC,yBAAiB;QACjB,gBAAQ,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC7B,mBAAQ,CAAC,CAAC,qBAAW,EAAE,qBAAW,EAAE,uBAAa,EAAE,qBAAW,CAAC,CAAC;;;;uCAgEhE;IACH,YAAC;CAAA,AAxED,IAwEC;kBAxEoB,KAAK"}
\ No newline at end of file
/** @format */
import { StatService } from '../service';
export interface IGetStatsParams {
activityId: string;
startDay: string;
endDay: string;
}
export interface IAddStatsParams {
activityId: string;
type: number;
}
/** @format */
export default class StatController {
/**
* 增加埋点记录
*/
addStat(context: IContext<IAddStatsParams>, { userInfo }: IControllerInfos, [statService]: [StatService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<boolean, true>>;
/**
* 统计数据
*/
getStats(context: IContext<IGetStatsParams>): 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>>;
}
This diff is collapsed.
{"version":3,"file":"stat.controller.js","sourceRoot":"","sources":["../../src/controller/stat.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;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KvB;IAiIH,qBAAC;CAAA,AA1ID,IA0IC;kBA1IoB,cAAc"}
\ No newline at end of file
/** @format */
import { UserService, BaseService } from '../service';
export default class Task {
getTaskList(context: Context, { userInfo, vipInfo }: IControllerInfos, [userService]: [UserService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
/**
* 完成关注店铺任务
*/
doFollowTask(context: Context, { userInfo }: IControllerInfos, [userService, baseService]: [UserService, BaseService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}
"use strict";
/** @format */
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var constants_1 = require("./../constants");
var check_1 = require("../decorator/check");
var services_1 = require("../decorator/services");
var sdk_1 = require("../sdk");
var utils_1 = require("../utils");
var service_1 = require("../service");
// {
// "handler": "doFollowTask",
// "data": {
// "activityId": "5f213791964f9706aa59b192"
// }
// }
var Task = /** @class */ (function () {
function Task() {
}
Task.prototype.getTaskList = function (context, _a, _b) {
var userInfo = _a.userInfo, vipInfo = _a.vipInfo;
var userService = _b[0];
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_c) {
console.log(userInfo, userService, 'userInfo');
return [2 /*return*/, sdk_1.resultsModel.success([])];
});
});
};
/**
* 完成关注店铺任务
*/
Task.prototype.doFollowTask = function (context, _a, _b) {
var userInfo = _a.userInfo;
var userService = _b[0], baseService = _b[1];
return __awaiter(this, void 0, void 0, function () {
var activityId, remainTimes, _id, taskInfo, follow, flag, newFollow, hasFollowed, today, tasks, value, followInfo, error_1;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
activityId = context.data.activityId;
remainTimes = userInfo.remainTimes, _id = userInfo._id, taskInfo = userInfo.taskInfo, follow = userInfo.follow;
flag = follow.flag, newFollow = follow.newFollow;
hasFollowed = flag || newFollow;
if (hasFollowed)
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.ERROR_TASK_COMPLETE)];
today = utils_1.getToday();
return [4 /*yield*/, baseService.getBaseInfo(activityId)
// 获取关注店铺奖励
];
case 1:
tasks = (_c.sent()).tasks;
value = (tasks || {}).attentionStore.value;
followInfo = __assign(__assign({}, follow), { newFollow: true, followTime: Date.now(), followDay: today });
// 记录数据
taskInfo[today] = taskInfo[today] || {};
taskInfo[today].follow = 1;
// 增加待领取次数
remainTimes.follow += value;
_c.label = 2;
case 2:
_c.trys.push([2, 4, , 5]);
return [4 /*yield*/, userService.updateUser(_id, {
remainTimes: remainTimes,
follow: followInfo,
taskInfo: taskInfo
})];
case 3:
_c.sent();
return [2 /*return*/, sdk_1.resultsModel.success(true)];
case 4:
error_1 = _c.sent();
console.log('error', error_1);
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.SYSTEM_ERROR)];
case 5: return [2 /*return*/];
}
});
});
};
__decorate([
check_1.paramsCheck(['activityId']),
check_1.userCheck({ intercept: true }),
services_1.services([service_1.UserService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], Task.prototype, "getTaskList", null);
__decorate([
check_1.paramsCheck(['activityId']),
check_1.activityTimeCheck,
services_1.services([service_1.UserService, service_1.BaseService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], Task.prototype, "doFollowTask", null);
return Task;
}());
exports.default = Task;
//# sourceMappingURL=task.controller copy.js.map
\ No newline at end of file
{"version":3,"file":"task.controller copy.js","sourceRoot":"","sources":["../../src/controller/task.controller copy.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,4CAA2C;AAC3C,4CAA8E;AAC9E,kDAAgD;AAEhD,8BAA4C;AAC5C,kCAAqD;AACrD,sCAAqD;AAErD,IAAI;AACJ,+BAA+B;AAC/B,cAAc;AACd,+CAA+C;AAC/C,MAAM;AACN,IAAI;AACJ;IAAA;IAkEA,CAAC;IA9DO,0BAAW,GAAjB,UAAkB,OAAgB,EAAE,EAAuC,EAAE,EAA4B;YAAnE,QAAQ,cAAA,EAAE,OAAO,aAAA;YAAuB,WAAW,QAAA;;;gBACvF,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC,CAAA;gBAE9C,sBAAO,kBAAY,CAAC,OAAO,CAAC,EAAE,CAAC,EAAA;;;KAChC;IAED;;OAEG;IAIG,2BAAY,GAAlB,UACE,OAAgB,EAChB,EAA8B,EAC9B,EAAsD;YADpD,QAAQ,cAAA;YACT,WAAW,QAAA,EAAE,WAAW,QAAA;;;;;;wBAEjB,UAAU,GAAK,OAAO,CAAC,IAAI,WAAjB,CAAiB;wBAE7B,WAAW,GAA4B,QAAQ,YAApC,EAAE,GAAG,GAAuB,QAAQ,IAA/B,EAAE,QAAQ,GAAa,QAAQ,SAArB,EAAE,MAAM,GAAK,QAAQ,OAAb,CAAa;wBAE7C,IAAI,GAAgB,MAAM,KAAtB,EAAE,SAAS,GAAK,MAAM,UAAX,CAAW;wBAG5B,WAAW,GAAG,IAAI,IAAI,SAAS,CAAA;wBACrC,IAAI,WAAW;4BAAE,sBAAO,kBAAY,CAAC,KAAK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qBAAW,CAAC,CAAC;;;;4CAkDpC;IACH,WAAC;CAAA,AAlED,IAkEC;kBAlEoB,IAAI"}
\ No newline at end of file
/** @format */
import { TaskService, BaseService, StatService } from '../service';
import { ITaskInfo } from '../service/task.service';
export default class Task {
/**
* 任务列表
*/
getTaskList(context: IContext<{
activityId: string;
}>, { userInfo, activityInfo, session }: IControllerInfos, [taskService]: [TaskService]): Promise<IResult<ITaskInfo[]>>;
/**
* 完成关注店铺任务
*/
doFollowTask(context: IContext<{
activityId: string;
}>, { userInfo, activityInfo }: IControllerInfos, [TaskService]: [TaskService]): Promise<IResult<boolean>>;
/**
* 积分兑换次数
*/
doExchangeCreditsTask(context: IContext<IParams>, { userInfo, activityInfo, session }: IControllerInfos, [taskService]: [TaskService]): Promise<IResult<boolean>>;
/**
* 浏览商品
*/
doBrowseGoodsTask(context: IContext<IParams>, { userInfo, activityInfo }: IControllerInfos, [taskService]: [TaskService]): Promise<IResult<boolean>>;
/**
* 收藏商品
*/
doCollectGoodsTask(context: IContext<IParams>, { userInfo, activityInfo }: IControllerInfos, [taskService, statService]: [TaskService, StatService]): Promise<IResult<boolean>>;
/**
* 浏览链接
*/
doJumpLinkTask(context: IContext<IParams>, { userInfo, activityInfo }: IControllerInfos, [taskService, statService]: [TaskService, StatService]): Promise<IResult<boolean>>;
/**
* 领取任务奖励
*/
receiveTaskRewards(context: IContext<IParams>, { userInfo, activityInfo }: IControllerInfos, [taskService]: [TaskService]): Promise<IResult<boolean>>;
/**
* 获取收藏商品列表
*/
getCollectGoodsList(context: IContext<IParams>, { session, userInfo }: IControllerInfos, [baseService, taskService]: [BaseService, TaskService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
collected: boolean;
itemId: string;
name: string;
price: string;
url: string;
image: string;
desc: string;
}[], true>>;
/**
* 获取收藏商品列表
*/
getOrderGoodsList(context: IContext<IParams>, { session, userInfo }: IControllerInfos, [baseService, taskService]: [BaseService, TaskService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
ordered: boolean;
itemId: string;
name: string;
price: string;
url: string;
image: string;
desc: string;
}[], true>>;
}
This diff is collapsed.
This diff is collapsed.
/** @format */
import { UserService } from '../service';
export default class Task {
getTaskList(context: Context, { userInfo }: {
userInfo: any;
}, [userService]: [UserService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
doFollowTask(context: Context, [userService]: [UserService]): Promise<void>;
}
"use strict";
/** @format */
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var check_1 = require("../decorator/check");
var services_1 = require("../decorator/services");
var sdk_1 = require("../sdk");
var service_1 = require("../service");
// 5f213791964f9706aa59b192
var Task = /** @class */ (function () {
function Task() {
}
Task.prototype.getTaskList = function (context, _a, _b) {
var userInfo = _a.userInfo;
var userService = _b[0];
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_c) {
console.log(userInfo, userService, 'userInfo');
return [2 /*return*/, sdk_1.resultsModel.success([])];
});
});
};
Task.prototype.doFollowTask = function (context, _a) {
var userService = _a[0];
return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_b) {
return [2 /*return*/];
}); });
};
__decorate([
check_1.params(['activityId']),
check_1.userCheck({ intercept: true }),
services_1.services([service_1.UserService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], Task.prototype, "getTaskList", null);
__decorate([
check_1.params(['activityId']),
check_1.activityTimeCheck,
services_1.services([service_1.UserService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Array]),
__metadata("design:returntype", Promise)
], Task.prototype, "doFollowTask", null);
return Task;
}());
exports.default = Task;
// console.log(exportHandlers(Task))
// export default exportHandlers(Task)
//# sourceMappingURL=tasktest.js.map
\ No newline at end of file
{"version":3,"file":"tasktest.js","sourceRoot":"","sources":["../../src/controller/tasktest.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGd,4CAAyE;AACzE,kDAAgD;AAEhD,8BAA4C;AAE5C,sCAAuD;AAWvD,2BAA2B;AAC3B;IAAA;IAaA,CAAC;IATO,0BAAW,GAAjB,UAAkB,OAAgB,EAAE,EAAY,EAAE,EAA4B;YAAxC,QAAQ,cAAA;YAAK,WAAW,QAAA;;;gBAC5D,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC,CAAA;gBAC9C,sBAAO,kBAAY,CAAC,OAAO,CAAC,EAAE,CAAC,EAAA;;;KAChC;IAKK,2BAAY,GAAlB,UAAmB,OAAgB,EAAE,EAA4B;YAA3B,WAAW,QAAA;;;;KAAoB;IARrE;QAHC,cAAM,CAAC,CAAC,YAAY,CAAC,CAAC;QACtB,iBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,mBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;2CAIvB;IAKD;QAHC,cAAM,CAAC,CAAC,YAAY,CAAC,CAAC;QACtB,yBAAiB;QACjB,mBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;4CAC6C;IACvE,WAAC;CAAA,AAbD,IAaC;kBAboB,IAAI;AAezB,oCAAoC;AAEpC,sCAAsC"}
\ No newline at end of file
/** @format */
import { UserService, AccessService } from '../service';
export interface IVipParams {
activityId: string;
callbackUrl?: string;
inviteId?: string;
}
export interface ILoginParams {
activityId: string;
userNick: string;
avatar: string;
isFollow: boolean;
inviteId?: string;
}
export default class User {
/**
* 登录接口, 初始化/更新用户信息
*/
login(context: IContext<ILoginParams>, { userInfo, vipInfo, activityInfo }: IControllerInfos, [userService, accessService]: [UserService, AccessService]): Promise<IResult<{
openId: string;
}>>;
/**
* 获取会员信息
*/
getVipInfo(context: IContext<IVipParams>, { session, activityUserNick }: IControllerInfos, [userService]: [UserService]): Promise<IResult<IVipInfo>>;
}
"use strict";
/** @format */
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var decorator_1 = require("../decorator");
var sdk_1 = require("../sdk");
var service_1 = require("../service");
var vip_1 = require("../utils/package/vip");
var User = /** @class */ (function () {
function User() {
}
/**
* 登录接口, 初始化/更新用户信息
*/
User.prototype.login = function (context, _a, _b) {
var userInfo = _a.userInfo, vipInfo = _a.vipInfo, activityInfo = _a.activityInfo;
var userService = _b[0], accessService = _b[1];
return __awaiter(this, void 0, void 0, function () {
var openId, isFollow;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
openId = context.openId;
isFollow = context.data.isFollow;
if (!!userInfo) return [3 /*break*/, 2];
return [4 /*yield*/, userService.initUserData(vipInfo, activityInfo)];
case 1:
userInfo = _c.sent();
return [3 /*break*/, 4];
case 2: return [4 /*yield*/, userService.updateUserData(vipInfo, userInfo, activityInfo)];
case 3:
userInfo = _c.sent();
_c.label = 4;
case 4:
// access表
return [4 /*yield*/, accessService.addAccess(userInfo)];
case 5:
// access表
_c.sent();
return [2 /*return*/, sdk_1.resultsModel.success({
openId: openId
})];
}
});
});
};
/**
* 获取会员信息
*/
User.prototype.getVipInfo = function (context, _a, _b) {
var session = _a.session, activityUserNick = _a.activityUserNick;
var userService = _b[0];
return __awaiter(this, void 0, void 0, function () {
var callbackUrl, result;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
callbackUrl = context.data.callbackUrl;
return [4 /*yield*/, userService.getShopVip(session, callbackUrl || vip_1.formatVipCbUrl(context), activityUserNick)];
case 1:
result = _c.sent();
return [2 /*return*/, sdk_1.resultsModel.success(result)];
}
});
});
};
__decorate([
decorator_1.paramsCheck(['activityId', 'userNick', 'avatar', 'isFollow']),
decorator_1.activityTimeCheck,
decorator_1.services([service_1.UserService, service_1.AccessService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], User.prototype, "login", null);
__decorate([
decorator_1.paramsCheck(['activityId']),
decorator_1.services([service_1.UserService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], User.prototype, "getVipInfo", null);
return User;
}());
exports.default = User;
//# sourceMappingURL=user.controller.js.map
\ No newline at end of file
{"version":3,"file":"user.controller.js","sourceRoot":"","sources":["../../src/controller/user.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,0CAAuE;AAEvE,8BAAqC;AACrC,sCAAuD;AAEvD,4CAAqD;AAcrD;IAAA;IA6CA,CAAC;IA5CC;;OAEG;IAIG,oBAAK,GAAX,UACE,OAA+B,EAC/B,EAAqD,EACrD,EAA0D;YADxD,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,YAAY,kBAAA;YAChC,WAAW,QAAA,EAAE,aAAa,QAAA;;;;;;wBAEnB,MAAM,GAAK,OAAO,OAAZ,CAAY;wBAElB,QAAQ,GAAK,OAAO,CAAC,IAAI,SAAjB,CAAi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;
export declare const USER_DB_NAME: string;
export declare const AWARDS_DB_NAME: string;
export declare const STAT_DB_NAME: string;
export declare const ERROR_LOG_DB_NAME: string;
export declare const SELLER_INFO_DB_NAME: string;
export declare const PRIZE_CONFIG_DB_NAME: string;
export declare const ACTIVITY_CONFIG_DB_NAME: string;
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ACTIVITY_CONFIG_DB_NAME = exports.PRIZE_CONFIG_DB_NAME = exports.SELLER_INFO_DB_NAME = exports.ERROR_LOG_DB_NAME = exports.STAT_DB_NAME = exports.AWARDS_DB_NAME = exports.USER_DB_NAME = exports.ACCESS_DB_NAME = void 0;
exports.ACCESS_DB_NAME = 'c_user_access';
exports.USER_DB_NAME = 'c_user';
exports.AWARDS_DB_NAME = 'c_awards_info';
exports.STAT_DB_NAME = 'c_stats';
exports.ERROR_LOG_DB_NAME = 'error_log';
exports.SELLER_INFO_DB_NAME = 'a_seller_info';
exports.PRIZE_CONFIG_DB_NAME = 'b_prize_config';
exports.ACTIVITY_CONFIG_DB_NAME = 'b_activity_config';
//# sourceMappingURL=db.js.map
\ No newline at end of file
{"version":3,"file":"db.js","sourceRoot":"","sources":["../src/db.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAED,QAAA,cAAc,GAAW,eAAe,CAAA;AAExC,QAAA,YAAY,GAAW,QAAQ,CAAA;AAE/B,QAAA,cAAc,GAAW,eAAe,CAAA;AAExC,QAAA,YAAY,GAAW,SAAS,CAAA;AAEhC,QAAA,iBAAiB,GAAW,WAAW,CAAA;AAEvC,QAAA,mBAAmB,GAAW,eAAe,CAAA;AAE7C,QAAA,oBAAoB,GAAW,gBAAgB,CAAA;AAE/C,QAAA,uBAAuB,GAAW,mBAAmB,CAAA"}
\ No newline at end of file
export declare const paramsCheck: (params: string[]) => (target: Object, name: string, descriptor: PropertyDescriptor) => void;
export declare const userCheck: ({ intercept }: {
intercept?: boolean;
}) => (target: any, name: string, descriptor: PropertyDescriptor) => void;
export declare const vipCheck: ({ intercept }: {
intercept?: boolean;
}) => (target: any, name: string, descriptor: PropertyDescriptor) => void;
export declare const activityTimeCheck: (target: any, name: string, descriptor: PropertyDescriptor) => void;
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.activityTimeCheck = exports.vipCheck = exports.userCheck = exports.paramsCheck = void 0;
/** @format */
var sdk_1 = require("../sdk");
var constants_1 = require("../constants");
var service_1 = require("../service");
var utils_1 = require("../utils");
var vip_1 = require("../utils/package/vip");
// 检验参数是否存在
exports.paramsCheck = function (params) {
return function (target, name, descriptor) {
var method = descriptor.value;
descriptor.value = function () {
var _a;
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var context = args[0], _b = args[1], otherArgs = _b === void 0 ? {} : _b;
var dataKeys = Object.keys(context.data);
for (var i = 0; i < params.length; i++) {
var param = params[i];
if (!dataKeys.includes(param) || ((_a = context.data) === null || _a === void 0 ? void 0 : _a[param]) === '')
return sdk_1.resultsModel.error(constants_1.CODE_TYPES.PARAMS_ERROR, "\u7F3A\u5C11" + param + "\u53C2\u6570");
}
return method.apply(target, [context, __assign({}, otherArgs)]);
};
};
};
// 检验用户是否存在
exports.userCheck = function (_a) {
var _b = _a.intercept, intercept = _b === void 0 ? true : _b;
return function (target, name, descriptor) {
var method = descriptor.value;
descriptor.value = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return __awaiter(this, void 0, void 0, function () {
var context, _a, otherArgs, userService, userInfo;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
context = args[0], _a = args[1], otherArgs = _a === void 0 ? {} : _a;
userService = new service_1.UserService(context);
return [4 /*yield*/, userService.getUserInfo()];
case 1:
userInfo = _b.sent();
if (!userInfo && intercept)
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.ERROR_NO_USER)];
return [2 /*return*/, method.apply(target, [context, __assign(__assign({}, otherArgs), { userInfo: userInfo })])];
}
});
});
};
};
};
// 是否是会员
exports.vipCheck = function (_a) {
var _b = _a.intercept, intercept = _b === void 0 ? true : _b;
return function (target, name, descriptor) {
var method = descriptor.value;
descriptor.value = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return __awaiter(this, void 0, void 0, function () {
var context, _a, otherArgs, userService, _b, session, userNick, vipInfo;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
context = args[0], _a = args[1], otherArgs = _a === void 0 ? {} : _a;
userService = new service_1.UserService(context);
return [4 /*yield*/, utils_1.getSellerSession(context)];
case 1:
_b = _c.sent(), session = _b.session, userNick = _b.userNick;
return [4 /*yield*/, userService.getShopVip(session, vip_1.formatVipCbUrl(context), userNick)];
case 2:
vipInfo = _c.sent();
console.log(vipInfo, intercept, 'intercept');
if (!vipInfo.isVip && intercept)
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.ERROR_NO_VIP, '非店铺会员', vipInfo)];
return [2 /*return*/, method.apply(target, [context, __assign(__assign({}, otherArgs), { vipInfo: vipInfo, session: session })])];
}
});
});
};
};
};
// 活动时间校验
exports.activityTimeCheck = function (target, name, descriptor) {
var method = descriptor.value;
descriptor.value = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return __awaiter(this, void 0, void 0, function () {
var context, _a, otherArgs, activityId, baseService, activityInfo, startTime, endTime, currentTime;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
context = args[0], _a = args[1], otherArgs = _a === void 0 ? {} : _a;
activityId = context.data.activityId;
if (!activityId)
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.PARAMS_ERROR, "\u7F3A\u5C11\u6D3B\u52A8id")];
baseService = new service_1.BaseService(context);
return [4 /*yield*/, baseService.getBaseInfo(activityId)
// 活动不存在
];
case 1:
activityInfo = _b.sent();
// 活动不存在
if (!activityInfo) {
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.ERROR_NO_ACTIVITY)];
}
startTime = activityInfo.startTime, endTime = activityInfo.endTime;
currentTime = Date.now();
if (currentTime < startTime) {
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.ERROR_ACTIVITY_NOSTART, "\u6D3B\u52A8\u672A\u5F00\u59CB")];
}
if (currentTime > endTime) {
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.ERROR_ACTIVITY_OVER, "\u6D3B\u52A8\u5DF2\u7ED3\u675F")];
}
return [2 /*return*/, method.apply(target, [context, __assign(__assign({}, otherArgs), { activityInfo: activityInfo })])];
}
});
});
};
};
//# sourceMappingURL=check.js.map
\ No newline at end of file
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/decorator/check.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,8BAAqC;AACrC,0CAAyC;AACzC,sCAAqD;AACrD,kCAA2C;AAE3C,4CAAqD;AACrD,WAAW;AACE,QAAA,WAAW,GAAG,UAAC,MAAgB;IAC1C,OAAO,UAAU,MAAc,EAAE,IAAY,EAAE,UAA8B;QAC3E,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAA;QAE/B,UAAU,CAAC,KAAK,GAAG;;YAAU,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YAClC,IAAA,OAAO,GAAoB,IAAI,GAAxB,EAAE,KAAkB,IAAI,GAAR,EAAd,SAAS,mBAAG,EAAE,KAAA,CAAQ;YACtC,IAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YAC1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,M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"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
/** @format */
__exportStar(require("./check"), exports);
__exportStar(require("./services"), exports);
__exportStar(require("./noCatch"), exports);
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decorator/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,cAAc;AACd,0CAAuB;AACvB,6CAA0B;AAC1B,4CAAyB"}
\ No newline at end of file
/** @format */
export declare const log: (target: Object, name: string, descriptor: PropertyDescriptor) => void;
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.log = void 0;
exports.log = function (target, name, descriptor) {
var oldValue = descriptor.value;
descriptor.value = function () {
var context = arguments[0];
var data = JSON.stringify(context.data);
console.log("---------\u51FD\u6570: " + context.fcName + "." + context.cloud.dataspace.context.handler + "------------");
console.log("---------\u8BF7\u6C42\u53C2\u6570: " + data + "------------");
return oldValue.apply(this, arguments);
};
};
//# sourceMappingURL=log.js.map
\ No newline at end of file
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/decorator/log.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAED,QAAA,GAAG,GAAG,UAAC,MAAc,EAAE,IAAY,EAAE,UAA8B;IAC9E,IAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAA;IACjC,UAAU,CAAC,KAAK,GAAG;QACjB,IAAM,OAAO,GAAY,SAAS,CAAC,CAAC,CAAC,CAAA;QACrC,IAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QACzC,OAAO,CAAC,GAAG,CAAC,4BAAgB,OAAO,CAAC,MAAM,SAAI,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,iBAAc,CAAC,CAAA;QACpG,OAAO,CAAC,GAAG,CAAC,wCAAkB,IAAI,iBAAc,CAAC,CAAA;QAEjD,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;IACxC,CAAC,CAAA;AACH,CAAC,CAAA"}
\ No newline at end of file
/** @format */
export declare const noCatch: (target: any, name: string, descriptor: PropertyDescriptor) => void;
"use strict";
/** @format */
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.noCatch = void 0;
exports.noCatch = function (target, name, descriptor) {
var method = descriptor.value;
descriptor.value = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return __awaiter(this, void 0, void 0, function () {
var context, _a, otherArgs;
return __generator(this, function (_b) {
context = args[0], _a = args[1], otherArgs = _a === void 0 ? {} : _a;
return [2 /*return*/, method.apply(this, [context, __assign(__assign({}, otherArgs), { noCatch: true })])];
});
});
};
};
//# sourceMappingURL=noCatch.js.map
\ No newline at end of file
{"version":3,"file":"noCatch.js","sourceRoot":"","sources":["../../src/decorator/noCatch.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,QAAA,OAAO,GAAG,UAAC,MAAW,EAAE,IAAY,EAAE,UAA8B;IAC/E,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAA;IAC/B,UAAU,CAAC,KAAK,GAAG;QAAgB,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,yBAAc;;;;;gBACxC,OAAO,GAAoB,IAAI,GAAxB,EAAE,KAAkB,IAAI,GAAR,EAAd,SAAS,mBAAG,EAAE,KAAA,CAAQ;gBACtC,sBAAO,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,OAAO,wBAAO,SAAS,KAAE,OAAO,EAAE,IAAI,IAAG,CAAC,EAAA;;;KACtE,CAAA;AACH,CAAC,CAAA"}
\ No newline at end of file
declare type Constructor = new (...args: any[]) => {};
export declare const services: (services: Constructor[], vipNeed?: boolean) => (target: Object, name: string, descriptor: PropertyDescriptor) => void;
export {};
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.services = void 0;
/** @format */
var service_1 = require("../service");
var utils_1 = require("../utils");
var sdk_1 = require("../sdk");
var constants_1 = require("../constants");
var vip_1 = require("../utils/package/vip");
function initBaseInfo(context, baseInfos, vipNeed) {
var _a, _b, _c;
if (vipNeed === void 0) { vipNeed = true; }
return __awaiter(this, void 0, void 0, function () {
var handler, userService, userInfo, _d, session, userNick, vipInfo;
return __generator(this, function (_e) {
switch (_e.label) {
case 0:
handler = (_c = (_b = (_a = context === null || context === void 0 ? void 0 : context.cloud) === null || _a === void 0 ? void 0 : _a.dataspace) === null || _b === void 0 ? void 0 : _b.context) === null || _c === void 0 ? void 0 : _c.handler;
userService = new service_1.UserService(context);
if (!!baseInfos.userInfo) return [3 /*break*/, 2];
return [4 /*yield*/, userService.getUserInfo()];
case 1:
userInfo = _e.sent();
baseInfos.userInfo = userInfo;
_e.label = 2;
case 2:
if (!!baseInfos.session) return [3 /*break*/, 4];
return [4 /*yield*/, utils_1.getSellerSession(context)];
case 3:
_d = _e.sent(), session = _d.session, userNick = _d.userNick;
baseInfos.session = session;
baseInfos.activityUserNick = userNick;
_e.label = 4;
case 4:
if (!(!baseInfos.vipInfo && vipNeed && handler !== 'getVipInfo')) return [3 /*break*/, 6];
return [4 /*yield*/, userService.getShopVip(baseInfos.session, vip_1.formatVipCbUrl(context), baseInfos.activityUserNick)];
case 5:
vipInfo = _e.sent();
baseInfos.vipInfo = vipInfo;
_e.label = 6;
case 6: return [2 /*return*/, baseInfos];
}
});
});
}
// 注入服务
exports.services = function (services, vipNeed) {
return function (target, name, descriptor) {
var method = descriptor.value;
descriptor.value = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return __awaiter(this, void 0, void 0, function () {
var context, _a, otherArgs, servicesInstance, baseInfos, ret, error_1;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
context = args[0], _a = args[1], otherArgs = _a === void 0 ? {} : _a;
servicesInstance = services.map(function (v) { return new v(context); });
return [4 /*yield*/, initBaseInfo(context, otherArgs, vipNeed)];
case 1:
baseInfos = _b.sent();
utils_1.logFn(context);
// 默认全局try catch 如果有noCatch参数则直接执行
if (baseInfos.noCatch) {
delete baseInfos.noCatch;
return [2 /*return*/, method.apply(target, [context, baseInfos, servicesInstance])];
}
_b.label = 2;
case 2:
_b.trys.push([2, 4, , 6]);
return [4 /*yield*/, method.apply(target, [context, baseInfos, servicesInstance])];
case 3:
ret = _b.sent();
return [3 /*break*/, 6];
case 4:
error_1 = _b.sent();
console.log('error', error_1);
return [4 /*yield*/, utils_1.recordErrorLog(context, baseInfos, error_1.toString(), error_1.stack)];
case 5:
_b.sent();
ret = sdk_1.resultsModel.error(constants_1.CODE_TYPES.SYSTEM_ERROR);
return [3 /*break*/, 6];
case 6: return [2 /*return*/, ret];
}
});
});
};
};
};
//# sourceMappingURL=services.js.map
\ No newline at end of file
{"version":3,"file":"services.js","sourceRoot":"","sources":["../../src/decorator/services.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,sCAAwC;AACxC,kCAAkE;AAClE,8BAAqC;AACrC,0CAAyC;AACzC,4CAAqD;AACrD,SAAe,YAAY,CAAC,OAA0B,EAAE,SAA2B,EAAE,OAAuB;;IAAvB,wBAAA,EAAA,cAAuB;;;;;;oBACpG,OAAO,qBAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK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AgB,GAAG,QAAQ,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,IAAI,CAAC,CAAC,OAAO,CAAC,EAAd,CAAc,CAAC,CAAA;4BACtB,qBAAM,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,EAAA;;4BAA7E,SAAS,GAAqB,SAA+C;4BAEnF,aAAK,CAAC,OAAO,CAAC,CAAA;4BAEd,mCAAmC;4BACnC,IAAI,SAAS,CAAC,OAAO,EAAE;gCACrB,OAAO,SAAS,CAAC,OAAO,CAAA;gCACxB,sBAAO,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC,EAAA;6BACpE;;;;4BAGO,qBAAM,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC,EAAA;;4BAAxE,GAAG,GAAG,SAAkE,CAAA;;;;4BAExE,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,OAAK,CAAC,CAAA;4BAC3B,qBAAM,sBAAc,CAAC,OAAO,EAAE,SAAS,EAAE,OAAK,CAAC,QAAQ,EAAE,EAAE,OAAK,CAAC,KAAK,CAAC,EAAA;;4BAAvE,SAAuE,CAAA;4BACvE,GAAG,GAAG,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,CAAC,CAAA;;gCAEnD,sBAAO,GAAG,EAAA;;;;SACX,CAAA;IACH,CAAC,CAAA;AACH,CAAC,CAAA"}
\ No newline at end of file
/** @format */
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, activityInfo, session }: IControllerInfos, [taskService]: [import("./service").TaskService]) => Promise<IResult<import("./service/task.service").ITaskInfo[]>>;
receiveTaskRewards: (context: IContext<IParams>, { userInfo, activityInfo }: IControllerInfos, [taskService]: [import("./service").TaskService]) => Promise<IResult<boolean>>;
getActivityBaseInfoById: (context: IContext<{
activityId: string;
}>, {}: {}, [baseService]: [import("./service").BaseService]) => Promise<IResult<IActivityInfo>>;
getItemListByItemIds: (context: IContext<{
itemIds: string;
}>, { session }: IControllerInfos, [baseService]: [import("./service").BaseService]) => Promise<IResult<ITaoBaoItems[]>>;
getMyPrizeList: (context: IContext<import("./controller/awards.controller").IPrizeListParams>, {}: {}, [awardSer]: [import("./service").AwardsService]) => Promise<IResult<{
list: 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<import("taobao-mini-sdk/lib/utils/codetypes").CodeType | IAwards, true>>;
doHelp: (context: IContext<IParams>, { userInfo, vipInfo, activityInfo }: IControllerInfos, [userService, taskService, accessService, statService]: [import("./service/user.service").default, import("./service").TaskService, import("./service").AccessService, import("./service").StatService]) => Promise<IResult<boolean>>;
getStats: (context: IContext<import("./controller/stat.controller").IGetStatsParams>) => 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>>;
doFollowTask: (context: IContext<{
activityId: string;
}>, { userInfo, activityInfo }: IControllerInfos, [TaskService]: [import("./service").TaskService]) => Promise<IResult<boolean>>;
doJumpLinkTask: (context: IContext<IParams>, { userInfo, activityInfo }: IControllerInfos, [taskService, statService]: [import("./service").TaskService, import("./service").StatService]) => Promise<IResult<boolean>>;
doCollectGoodsTask: (context: IContext<IParams>, { userInfo, activityInfo }: IControllerInfos, [taskService, statService]: [import("./service").TaskService, import("./service").StatService]) => Promise<IResult<boolean>>;
getCollectGoodsList: (context: IContext<IParams>, { session, userInfo }: IControllerInfos, [baseService, taskService]: [import("./service").BaseService, import("./service").TaskService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
collected: boolean;
itemId: string;
name: string;
price: string;
url: string;
image: string;
desc: string;
}[], true>>;
getOrderGoodsList: (context: IContext<IParams>, { session, userInfo }: IControllerInfos, [baseService, taskService]: [import("./service").BaseService, import("./service").TaskService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
ordered: boolean;
itemId: string;
name: string;
price: string;
url: string;
image: string;
desc: string;
}[], true>>;
};
export default _default;
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
// import { exportHandlers } from './utils'
var user_controller_1 = require("./controller/user.controller");
var task_controller_1 = require("./controller/task.controller");
var base_controller_1 = require("./controller/base.controller");
var awards_controller_1 = require("./controller/awards.controller");
var share_controller_1 = require("./controller/share.controller");
var stat_controller_1 = require("./controller/stat.controller");
var _a = new user_controller_1.default(), login = _a.login, getVipInfo = _a.getVipInfo;
var _b = new task_controller_1.default(), getTaskList = _b.getTaskList, receiveTaskRewards = _b.receiveTaskRewards, getCollectGoodsList = _b.getCollectGoodsList, // 获取收藏商品列表,包含收藏状态
doFollowTask = _b.doFollowTask, doJumpLinkTask = _b.doJumpLinkTask, doBrowseGoodsTask = _b.doBrowseGoodsTask, doCollectGoodsTask = _b.doCollectGoodsTask, getOrderGoodsList = _b.getOrderGoodsList, doExchangeCreditsTask = _b.doExchangeCreditsTask;
var _c = new base_controller_1.default(), getActivityBaseInfoById = _c.getActivityBaseInfoById, getItemListByItemIds = _c.getItemListByItemIds;
var _d = new awards_controller_1.default(), getMyPrizeList = _d.getMyPrizeList, receiveObjectPrize = _d.receiveObjectPrize, receiveEnamePrize = _d.receiveEnamePrize, drawLotteryPrize = _d.drawLotteryPrize;
var doHelp = new share_controller_1.default().doHelp;
var getStats = new stat_controller_1.default().getStats;
exports.default = {
login: login,
getVipInfo: getVipInfo,
getTaskList: getTaskList,
receiveTaskRewards: receiveTaskRewards,
getActivityBaseInfoById: getActivityBaseInfoById,
getItemListByItemIds: getItemListByItemIds,
getMyPrizeList: getMyPrizeList,
receiveObjectPrize: receiveObjectPrize,
receiveEnamePrize: receiveEnamePrize,
doHelp: doHelp,
getStats: getStats,
doFollowTask: doFollowTask,
doJumpLinkTask: doJumpLinkTask,
doCollectGoodsTask: doCollectGoodsTask,
getCollectGoodsList: getCollectGoodsList,
getOrderGoodsList: getOrderGoodsList
};
//# 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,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,KAUF,IAAI,yBAAc,EAAE,EATtB,WAAW,iBAAA,EACX,kBAAkB,wBAAA,EAClB,mBAAmB,yBAAA,EAAE,kBAAkB;AACvC,YAAY,kBAAA,EACZ,cAAc,oBAAA,EACd,iBAAiB,uBAAA,EACjB,kBAAkB,wBAAA,EAClB,iBAAiB,uBAAA,EACjB,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,oBAAoB,sBAAA;IACpB,cAAc,gBAAA;IACd,kBAAkB,oBAAA;IAClB,iBAAiB,mBAAA;IACjB,MAAM,QAAA;IACN,QAAQ,UAAA;IACR,YAAY,cAAA;IACZ,cAAc,gBAAA;IACd,kBAAkB,oBAAA;IAClB,mBAAmB,qBAAA;IACnB,iBAAiB,mBAAA;CAClB,CAAA"}
\ No newline at end of file
/** @format */
declare namespace AAA {
interface IContext extends Context {
data: {
activityId: string;
};
}
}
//# sourceMappingURL=base.controller.js.map
\ No newline at end of file
{"version":3,"file":"base.controller.js","sourceRoot":"","sources":["../../src/model/base.controller.ts"],"names":[],"mappings":""}
\ No newline at end of file
/** @format */
/** @format */
declare namespace getActivityBaseInfoById {
type Context = IContext<{
activityId: string;
}>;
interface Result extends IResult {
data: IActivityInfo;
}
}
/** @format */
//# sourceMappingURL=base.js.map
\ No newline at end of file
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/model/base.ts"],"names":[],"mappings":"AAAA,cAAc"}
\ No newline at end of file
/** @format */
import Utils from 'taobao-mini-sdk/lib/utils/index';
import TBAPI from 'taobao-mini-sdk/lib/service/TBAPI';
declare const DEFAULT_CODE_TYPES: {
PARAMS_ERROR: import("taobao-mini-sdk/lib/utils/codetypes").CodeType;
SYSTEM_ERROR: import("taobao-mini-sdk/lib/utils/codetypes").CodeType;
SUCCESS: import("taobao-mini-sdk/lib/utils/codetypes").CodeType;
}, getStartTimestamp: (day: string) => number, getEndTimestamp: (day: string) => number;
declare const resultsModel: import("taobao-mini-sdk/lib/utils/resultmodel").ResultsModel;
export declare const TBAPIS: typeof TBAPI;
export declare const BaseDao: any;
export declare const transformBeijingDate: typeof Utils.transformBeijingDate;
export declare const dateFormatter: typeof Utils.dateFormatter;
export { DEFAULT_CODE_TYPES, resultsModel, getStartTimestamp, getEndTimestamp };
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEndTimestamp = exports.getStartTimestamp = exports.resultsModel = exports.DEFAULT_CODE_TYPES = exports.dateFormatter = exports.transformBeijingDate = exports.BaseDao = exports.TBAPIS = void 0;
var index_1 = require("taobao-mini-sdk/lib/utils/index");
var base_dao_1 = require("taobao-mini-sdk/lib/dao/base.dao");
var TBAPI_1 = require("taobao-mini-sdk/lib/service/TBAPI");
var MockConfig = require('../mockServer/sdk');
var DEFAULT_CODE_TYPES = index_1.default.DEFAULT_CODE_TYPES, cloudDateFormatter = index_1.default.dateFormatter, cloudTransformBeijingDate = index_1.default.transformBeijingDate, getStartTimestamp = index_1.default.getStartTimestamp, getEndTimestamp = index_1.default.getEndTimestamp, ResultsModel = index_1.default.ResultsModel;
exports.DEFAULT_CODE_TYPES = DEFAULT_CODE_TYPES;
exports.getStartTimestamp = getStartTimestamp;
exports.getEndTimestamp = getEndTimestamp;
var resultsModel = new ResultsModel();
exports.resultsModel = resultsModel;
var env = process.argv[2];
console.log("env", env);
exports.TBAPIS = env === 'mock' ? MockConfig.TBAPIS : TBAPI_1.default;
exports.BaseDao = env === 'mock' ? MockConfig.BaseDao : base_dao_1.BaseDao;
exports.transformBeijingDate = env === 'mock' ? MockConfig.transformBeijingDate : cloudTransformBeijingDate;
exports.dateFormatter = env === 'mock' ? MockConfig.dateFormatter : cloudDateFormatter;
//# sourceMappingURL=sdk.js.map
\ No newline at end of file
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,yDAAmD;AACnD,6DAA0E;AAC1E,2DAAqD;AACrD,IAAI,UAAU,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;AAG3C,IAAA,kBAAkB,GAMhB,eAAK,mBANW,EACH,kBAAkB,GAK/B,eAAK,cAL0B,EACX,yBAAyB,GAI7C,eAAK,qBAJwC,EAC/C,iBAAiB,GAGf,eAAK,kBAHU,EACjB,eAAe,GAEb,eAAK,gBAFQ,EACf,YAAY,GACV,eAAK,aADK,CACL;AAgBA,gDAAkB;AAAgB,8CAAiB;AAAE,0CAAe;AAd7E,IAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAA;AAcV,oCAAY;AAZzC,IAAI,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACzB,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;AAEV,QAAA,MAAM,GAAiB,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,eAAK,CAAA;AAEjE,QAAA,OAAO,GAAG,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,kBAAY,CAAA;AAE5D,QAAA,oBAAoB,GAC/B,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC,yBAAyB,CAAA;AAEjE,QAAA,aAAa,GAA+B,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,kBAAkB,CAAA"}
\ No newline at end of file
/** @format */
declare const TBAPIS: any, DEFAULT_CODE_TYPES: any, resultsModel: any, dateFormatter: any, getStartTimestamp: any, getEndTimestamp: any, transformBeijingDate: any, BaseDao: any;
export { TBAPIS, DEFAULT_CODE_TYPES, resultsModel, dateFormatter, getStartTimestamp, getEndTimestamp, transformBeijingDate, BaseDao };
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseDao = exports.transformBeijingDate = exports.getEndTimestamp = exports.getStartTimestamp = exports.dateFormatter = exports.resultsModel = exports.DEFAULT_CODE_TYPES = exports.TBAPIS = void 0;
var _a = require('./sdk'), TBAPIS = _a.TBAPIS, DEFAULT_CODE_TYPES = _a.DEFAULT_CODE_TYPES, resultsModel = _a.resultsModel, dateFormatter = _a.dateFormatter, getStartTimestamp = _a.getStartTimestamp, getEndTimestamp = _a.getEndTimestamp, transformBeijingDate = _a.transformBeijingDate, BaseDao = _a.BaseDao;
exports.TBAPIS = TBAPIS;
exports.DEFAULT_CODE_TYPES = DEFAULT_CODE_TYPES;
exports.resultsModel = resultsModel;
exports.dateFormatter = dateFormatter;
exports.getStartTimestamp = getStartTimestamp;
exports.getEndTimestamp = getEndTimestamp;
exports.transformBeijingDate = transformBeijingDate;
exports.BaseDao = BaseDao;
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAER,IAAA,KASF,OAAO,CAAC,OAAO,CAAC,EARlB,MAAM,YAAA,EACN,kBAAkB,wBAAA,EAClB,YAAY,kBAAA,EACZ,aAAa,mBAAA,EACb,iBAAiB,uBAAA,EACjB,eAAe,qBAAA,EACf,oBAAoB,0BAAA,EACpB,OAAO,aACW,CAAA;AAGlB,wBAAM;AACN,gDAAkB;AAClB,oCAAY;AACZ,sCAAa;AACb,8CAAiB;AACjB,0CAAe;AACf,oDAAoB;AACpB,0BAAO"}
\ No newline at end of file
/** @format */
import { BaseDao } from 'taobao-mini-sdk/lib/dao/base.dao';
import TBAPIS from 'taobao-mini-sdk/lib/service/TBAPI';
declare const DEFAULT_CODE_TYPES: {
PARAMS_ERROR: import("taobao-mini-sdk/lib/utils/codetypes").CodeType;
SYSTEM_ERROR: import("taobao-mini-sdk/lib/utils/codetypes").CodeType;
SUCCESS: import("taobao-mini-sdk/lib/utils/codetypes").CodeType;
}, dateFormatter: (thisDate: Date, fmt?: string) => string, transformBeijingDate: (day: string | number) => Date, getStartTimestamp: (day: string) => number, getEndTimestamp: (day: string) => number;
declare const resultsModel: import("taobao-mini-sdk/lib/utils/resultmodel").ResultsModel;
export { DEFAULT_CODE_TYPES, resultsModel, BaseDao, TBAPIS, dateFormatter, transformBeijingDate, getStartTimestamp, getEndTimestamp };
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEndTimestamp = exports.getStartTimestamp = exports.transformBeijingDate = exports.dateFormatter = exports.TBAPIS = exports.BaseDao = exports.resultsModel = exports.DEFAULT_CODE_TYPES = void 0;
var index_1 = require("taobao-mini-sdk/lib/utils/index");
var base_dao_1 = require("taobao-mini-sdk/lib/dao/base.dao");
Object.defineProperty(exports, "BaseDao", { enumerable: true, get: function () { return base_dao_1.BaseDao; } });
var TBAPI_1 = require("taobao-mini-sdk/lib/service/TBAPI");
exports.TBAPIS = TBAPI_1.default;
var MockConfig = require('./mockServer/sdk');
var DEFAULT_CODE_TYPES = index_1.default.DEFAULT_CODE_TYPES, dateFormatter = index_1.default.dateFormatter, transformBeijingDate = index_1.default.transformBeijingDate, getStartTimestamp = index_1.default.getStartTimestamp, getEndTimestamp = index_1.default.getEndTimestamp, ResultsModel = index_1.default.ResultsModel;
exports.DEFAULT_CODE_TYPES = DEFAULT_CODE_TYPES;
exports.dateFormatter = dateFormatter;
exports.transformBeijingDate = transformBeijingDate;
exports.getStartTimestamp = getStartTimestamp;
exports.getEndTimestamp = getEndTimestamp;
var resultsModel = new ResultsModel();
exports.resultsModel = resultsModel;
var mock = process.argv[2];
console.log("mock", mock);
//# sourceMappingURL=sdk.cloud.js.map
\ No newline at end of file
{"version":3,"file":"sdk.cloud.js","sourceRoot":"","sources":["../../src/sdk/sdk.cloud.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,yDAAmD;AACnD,6DAA0D;AAqBxD,wFArBO,kBAAO,OAqBP;AApBT,2DAAsD;AAqBpD,iBArBK,eAAM,CAqBL;AApBR,IAAI,UAAU,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;AAG1C,IAAA,kBAAkB,GAMhB,eAAK,mBANW,EAClB,aAAa,GAKX,eAAK,cALM,EACb,oBAAoB,GAIlB,eAAK,qBAJa,EACpB,iBAAiB,GAGf,eAAK,kBAHU,EACjB,eAAe,GAEb,eAAK,gBAFQ,EACf,YAAY,GACV,eAAK,aADK,CACL;AAQP,gDAAkB;AAIlB,sCAAa;AACb,oDAAoB;AACpB,8CAAiB;AACjB,0CAAe;AAbjB,IAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAA;AAOrC,oCAAY;AALd,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AAC1B,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA"}
\ No newline at end of file
/** @format */
declare const BaseDao: any, TBAPI: any, Utils: any;
declare const DEFAULT_CODE_TYPES: any, dateFormatter: any, transformBeijingDate: any, getStartTimestamp: any, getEndTimestamp: any, ResultsModel: any;
declare const resultsModel: any;
declare const TBAPIS: any;
declare let default_sdk: {
DEFAULT_CODE_TYPES: any;
resultsModel: any;
dateFormatter: any;
getStartTimestamp: any;
getEndTimestamp: any;
};
declare let Config: {
DEFAULT_CODE_TYPES: any;
resultsModel: any;
dateFormatter: any;
getStartTimestamp: any;
getEndTimestamp: any;
};
declare let mock: string;
/** @format */
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
// 特别注意以下的引用方式,需要.default
var _a = require('taobao-mini-sdk/lib/index').default, BaseDao = _a.BaseDao, TBAPI = _a.TBAPI, Utils = _a.Utils;
var _b = Utils.default, DEFAULT_CODE_TYPES = _b.DEFAULT_CODE_TYPES, dateFormatter = _b.dateFormatter, transformBeijingDate = _b.transformBeijingDate, getStartTimestamp = _b.getStartTimestamp, getEndTimestamp = _b.getEndTimestamp, ResultsModel = _b.ResultsModel;
var resultsModel = new ResultsModel();
var TBAPIS = TBAPI.default;
var default_sdk = {
DEFAULT_CODE_TYPES: DEFAULT_CODE_TYPES,
resultsModel: resultsModel,
dateFormatter: dateFormatter,
getStartTimestamp: getStartTimestamp,
getEndTimestamp: getEndTimestamp
};
var Config = __assign({}, default_sdk);
var mock = process.argv[2];
console.log("mock", mock, Config);
// 云函数环境
if (mock !== 'mock') {
Config = Object.assign({}, default_sdk, {
BaseDao: BaseDao,
TBAPIS: TBAPIS,
transformBeijingDate: transformBeijingDate,
resultsModel: resultsModel
});
}
// 本地环境
else {
var MockConfig = require('./mockServer/sdk');
Config = Object.assign({}, default_sdk, MockConfig);
console.log(Config);
}
console.log(Config);
module.exports = Config;
//# sourceMappingURL=sdk.js.map
\ No newline at end of file
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../src/sdk/sdk.ts"],"names":[],"mappings":"AAAA,cAAc;;;;;;;;;;;;AAEd,yBAAyB;AACnB,IAAA,KAA4B,OAAO,CAAC,2BAA2B,CAAC,CAAC,OAAO,EAAtE,OAAO,aAAA,EAAE,KAAK,WAAA,EAAE,KAAK,WAAiD,CAAA;AAExE,IAAA,KAOF,KAAK,CAAC,OAAO,EANf,kBAAkB,wBAAA,EAClB,aAAa,mBAAA,EACb,oBAAoB,0BAAA,EACpB,iBAAiB,uBAAA,EACjB,eAAe,qBAAA,EACf,YAAY,kBACG,CAAA;AAEjB,IAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAA;AAEvC,IAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAA;AAE5B,IAAI,WAAW,GAAG;IAChB,kBAAkB,oBAAA;IAClB,YAAY,cAAA;IACZ,aAAa,eAAA;IACb,iBAAiB,mBAAA;IACjB,eAAe,iBAAA;CAChB,CAAA;AAED,IAAI,MAAM,gBACL,WAAW,CACf,CAAA;AAED,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AAC1B,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;AACjC,QAAQ;AACR,IAAI,IAAI,KAAK,MAAM,EAAE;IACnB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,WAAW,EAAE;QACtC,OAAO,SAAA;QACP,MAAM,QAAA;QACN,oBAAoB,sBAAA;QACpB,YAAY,cAAA;KACb,CAAC,CAAA;CACH;AACD,OAAO;KACF;IACH,IAAI,UAAU,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;IAC5C,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,WAAW,EAAE,UAAU,CAAC,CAAA;IACnD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;CACpB;AACD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;AACnB,MAAM,CAAC,OAAO,GAAG,MAAM,CAAA"}
\ No newline at end of file
//# sourceMappingURL=sdk.local.js.map
\ No newline at end of file
{"version":3,"file":"sdk.local.js","sourceRoot":"","sources":["../../src/sdk/sdk.local.ts"],"names":[],"mappings":""}
\ No newline at end of file
/** @format */
import { BaseDao } from 'taobao-mini-sdk/lib/dao/base.dao';
import TBAPI from 'taobao-mini-sdk/lib/service/TBAPI';
declare const DEFAULT_CODE_TYPES: {
PARAMS_ERROR: import("taobao-mini-sdk/lib/utils/codetypes").CodeType;
SYSTEM_ERROR: import("taobao-mini-sdk/lib/utils/codetypes").CodeType;
SUCCESS: import("taobao-mini-sdk/lib/utils/codetypes").CodeType;
}, dateFormatter: (thisDate: Date, fmt?: string) => string, transformBeijingDate: (day: string | number) => Date, getStartTimestamp: (day: string) => number, getEndTimestamp: (day: string) => number;
declare const resultsModel: import("taobao-mini-sdk/lib/utils/resultmodel").ResultsModel;
export { DEFAULT_CODE_TYPES, resultsModel, BaseDao, TBAPI, dateFormatter, transformBeijingDate, getStartTimestamp, getEndTimestamp };
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEndTimestamp = exports.getStartTimestamp = exports.transformBeijingDate = exports.dateFormatter = exports.TBAPI = exports.BaseDao = exports.resultsModel = exports.DEFAULT_CODE_TYPES = void 0;
// 特别注意以下的引用方式,需要.default
var index_1 = require("taobao-mini-sdk/lib/utils/index");
var base_dao_1 = require("taobao-mini-sdk/lib/dao/base.dao");
Object.defineProperty(exports, "BaseDao", { enumerable: true, get: function () { return base_dao_1.BaseDao; } });
var TBAPI_1 = require("taobao-mini-sdk/lib/service/TBAPI");
exports.TBAPI = TBAPI_1.default;
var DEFAULT_CODE_TYPES = index_1.default.DEFAULT_CODE_TYPES, dateFormatter = index_1.default.dateFormatter, transformBeijingDate = index_1.default.transformBeijingDate, getStartTimestamp = index_1.default.getStartTimestamp, getEndTimestamp = index_1.default.getEndTimestamp, ResultsModel = index_1.default.ResultsModel;
exports.DEFAULT_CODE_TYPES = DEFAULT_CODE_TYPES;
exports.dateFormatter = dateFormatter;
exports.transformBeijingDate = transformBeijingDate;
exports.getStartTimestamp = getStartTimestamp;
exports.getEndTimestamp = getEndTimestamp;
var resultsModel = new ResultsModel();
exports.resultsModel = resultsModel;
//# sourceMappingURL=sdk1.js.map
\ No newline at end of file
{"version":3,"file":"sdk1.js","sourceRoot":"","sources":["../src/sdk1.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,yBAAyB;AACzB,yDAAmD;AACnD,6DAA0D;AAiBxD,wFAjBO,kBAAO,OAiBP;AAhBT,2DAAqD;AAiBnD,gBAjBK,eAAK,CAiBL;AAdL,IAAA,kBAAkB,GAMhB,eAAK,mBANW,EAClB,aAAa,GAKX,eAAK,cALM,EACb,oBAAoB,GAIlB,eAAK,qBAJa,EACpB,iBAAiB,GAGf,eAAK,kBAHU,EACjB,eAAe,GAEb,eAAK,gBAFQ,EACf,YAAY,GACV,eAAK,aADK,CACL;AAKP,gDAAkB;AAIlB,sCAAa;AACb,oDAAoB;AACpB,8CAAiB;AACjB,0CAAe;AAVjB,IAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAA;AAIrC,oCAAY"}
\ No newline at end of file
/** @format */
declare const BaseDao: any, TBAPI: any, Utils: any;
declare const DEFAULT_CODE_TYPES: any, dateFormatter: any, transformBeijingDate: any, getStartTimestamp: any, getEndTimestamp: any, ResultsModel: any;
declare const TBAPIS: any;
declare let default_sdk: {
DEFAULT_CODE_TYPES: any;
ResultsModel: any;
dateFormatter: any;
getStartTimestamp: any;
getEndTimestamp: any;
};
declare let Config: any;
declare let mock: string;
/** @format */
// 特别注意以下的引用方式,需要.default
var _a = require('taobao-mini-sdk/lib/index').default, BaseDao = _a.BaseDao, TBAPI = _a.TBAPI, Utils = _a.Utils;
var _b = Utils.default, DEFAULT_CODE_TYPES = _b.DEFAULT_CODE_TYPES, dateFormatter = _b.dateFormatter, transformBeijingDate = _b.transformBeijingDate, getStartTimestamp = _b.getStartTimestamp, getEndTimestamp = _b.getEndTimestamp, ResultsModel = _b.ResultsModel;
var TBAPIS = TBAPI.default;
var default_sdk = {
DEFAULT_CODE_TYPES: DEFAULT_CODE_TYPES,
ResultsModel: ResultsModel,
dateFormatter: dateFormatter,
getStartTimestamp: getStartTimestamp,
getEndTimestamp: getEndTimestamp
};
var Config;
var mock = process.argv[2];
console.log("mock", mock);
// 云函数环境
if (mock !== 'mock') {
Config = Object.assign({}, default_sdk, {
BaseDao: BaseDao,
TBAPIS: TBAPIS,
transformBeijingDate: transformBeijingDate
});
}
// 本地环境
else {
var MockConfig = require('./mockServer/sdk');
Config = Object.assign({}, default_sdk, MockConfig);
console.log(Config);
}
module.exports = Config;
//# sourceMappingURL=sdkqq.js.map
\ No newline at end of file
{"version":3,"file":"sdkqq.js","sourceRoot":"","sources":["../src/sdkqq.ts"],"names":[],"mappings":"AAAA,cAAc;AAEd,yBAAyB;AACnB,IAAA,KAA4B,OAAO,CAAC,2BAA2B,CAAC,CAAC,OAAO,EAAtE,OAAO,aAAA,EAAE,KAAK,WAAA,EAAE,KAAK,WAAiD,CAAA;AACxE,IAAA,KAOF,KAAK,CAAC,OAAO,EANf,kBAAkB,wBAAA,EAClB,aAAa,mBAAA,EACb,oBAAoB,0BAAA,EACpB,iBAAiB,uBAAA,EACjB,eAAe,qBAAA,EACf,YAAY,kBACG,CAAA;AACjB,IAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAA;AAE5B,IAAI,WAAW,GAAG;IAChB,kBAAkB,oBAAA;IAClB,YAAY,cAAA;IACZ,aAAa,eAAA;IACb,iBAAiB,mBAAA;IACjB,eAAe,iBAAA;CAChB,CAAA;AAED,IAAI,MAAM,CAAA;AAEV,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AAC1B,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;AACzB,QAAQ;AACR,IAAI,IAAI,KAAK,MAAM,EAAE;IACnB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,WAAW,EAAE;QACtC,OAAO,SAAA;QACP,MAAM,QAAA;QACN,oBAAoB,sBAAA;KACrB,CAAC,CAAA;CACH;AACD,OAAO;KACF;IACH,IAAI,UAAU,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;IAC5C,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,WAAW,EAAE,UAAU,CAAC,CAAA;IACnD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;CACpB;AACD,MAAM,CAAC,OAAO,GAAG,MAAM,CAAA"}
\ No newline at end of file
/**
* 访问明细
*
* @format
*/
export default class UserAccessService {
context: IContext<IParams>;
accessdao: IBaseDao;
constructor(context: IContext<IParams>);
/**
* 增加访问记录
* @param {是否关注店铺} isFollow
*/
addAccess(userInfo: IUserInfo): Promise<number>;
getAccessCount(): Promise<number>;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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