Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinhaitao
taobao-mini-template
Commits
ca89e37c
Commit
ca89e37c
authored
Aug 28, 2020
by
qinhaitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:
🐛
线上地址
parent
51e6ce0d
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
54 additions
and
32 deletions
+54
-32
index.d.ts
v2.0/dist/config/index.d.ts
+1
-1
online.d.ts
v2.0/dist/config/online.d.ts
+1
-1
online.js
v2.0/dist/config/online.js
+4
-2
online.js.map
v2.0/dist/config/online.js.map
+1
-1
test.d.ts
v2.0/dist/config/test.d.ts
+1
-1
test.js
v2.0/dist/config/test.js
+3
-1
test.js.map
v2.0/dist/config/test.js.map
+1
-1
constants.d.ts
v2.0/dist/constants.d.ts
+1
-0
constants.js
v2.0/dist/constants.js
+3
-2
constants.js.map
v2.0/dist/constants.js.map
+1
-1
user.controller.js
v2.0/dist/controller/user.controller.js
+7
-7
user.controller.js.map
v2.0/dist/controller/user.controller.js.map
+1
-1
check.js
v2.0/dist/decorator/check.js
+5
-2
check.js.map
v2.0/dist/decorator/check.js.map
+1
-1
index.ts
v2.0/src/config/index.ts
+1
-1
online.ts
v2.0/src/config/online.ts
+4
-2
test.ts
v2.0/src/config/test.ts
+3
-1
constants.ts
v2.0/src/constants.ts
+3
-1
user.controller.ts
v2.0/src/controller/user.controller.ts
+7
-3
check.ts
v2.0/src/decorator/check.ts
+5
-2
No files found.
v2.0/dist/config/index.d.ts
View file @
ca89e37c
/** @format */
/** @format */
interface
Iconfig
{
interface
Iconfig
{
VIP_CALLBACK_URL
:
string
;
generateVipCallBackUrl
(
activityId
?:
string
)
:
string
;
}
}
export
declare
const
getConfig
:
(
context
:
Context
)
=>
Iconfig
;
export
declare
const
getConfig
:
(
context
:
Context
)
=>
Iconfig
;
export
{};
export
{};
v2.0/dist/config/online.d.ts
View file @
ca89e37c
/** @format */
/** @format */
declare
const
_default
:
{
declare
const
_default
:
{
VIP_CALLBACK_URL
:
string
;
generateVipCallBackUrl
(
activityId
:
string
)
:
string
;
};
};
export
default
_default
;
export
default
_default
;
v2.0/dist/config/online.js
View file @
ca89e37c
"use strict"
;
"use strict"
;
/** @format */
/** @format */
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
appId
=
'消费端ID'
;
var
constants_1
=
require
(
"../constants"
)
;
exports
.
default
=
{
exports
.
default
=
{
VIP_CALLBACK_URL
:
"https://m.duanqu.com/?_ariver_appid="
+
appId
generateVipCallBackUrl
:
function
(
activityId
)
{
return
"https://m.duanqu.com/?_ariver_appid="
+
constants_1
.
appId
+
"&query=activityId%3D"
+
activityId
;
}
};
};
//# sourceMappingURL=online.js.map
//# sourceMappingURL=online.js.map
\ No newline at end of file
v2.0/dist/config/online.js.map
View file @
ca89e37c
{"version":3,"file":"online.js","sourceRoot":"","sources":["../../src/config/online.ts"],"names":[],"mappings":";AAAA,cAAc;;AAEd,IAAM,KAAK,GAAG,OAAO,CAAA;AAErB,kBAAe;IACb,gBAAgB,EAAE,yCAAuC,KAAO;CACjE,CAAA"}
{"version":3,"file":"online.js","sourceRoot":"","sources":["../../src/config/online.ts"],"names":[],"mappings":";AAAA,cAAc;;AAEd,0CAAoC;AAEpC,kBAAe;IACb,sBAAsB,EAAtB,UAAuB,UAAkB;QACvC,OAAO,yCAAuC,iBAAK,4BAAuB,UAAY,CAAA;IACxF,CAAC;CACF,CAAA"}
\ No newline at end of file
\ No newline at end of file
v2.0/dist/config/test.d.ts
View file @
ca89e37c
declare
const
_default
:
{
declare
const
_default
:
{
VIP_CALLBACK_URL
:
string
;
generateVipCallBackUrl
()
:
string
;
};
};
/** @format */
/** @format */
export
default
_default
;
export
default
_default
;
v2.0/dist/config/test.js
View file @
ca89e37c
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
/** @format */
/** @format */
exports
.
default
=
{
exports
.
default
=
{
VIP_CALLBACK_URL
:
'testUrl'
generateVipCallBackUrl
:
function
()
{
return
"
\
u5BA2
\
u6237
\
u7AEF
\
u751F
\
u6210
\
u7684
\
u9884
\
u89C8
\
u5730
\
u5740"
;
}
};
};
//# sourceMappingURL=test.js.map
//# sourceMappingURL=test.js.map
\ No newline at end of file
v2.0/dist/config/test.js.map
View file @
ca89e37c
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../src/config/test.ts"],"names":[],"mappings":";;AAAA,cAAc;AACd,kBAAe;IACb,gBAAgB,EAAE,SAAS;CAC5B,CAAA"}
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../src/config/test.ts"],"names":[],"mappings":";;AAAA,cAAc;AACd,kBAAe;IACb,sBAAsB;QACpB,OAAO,8DAAY,CAAA;IACrB,CAAC;CACF,CAAA"}
\ No newline at end of file
\ No newline at end of file
v2.0/dist/constants.d.ts
View file @
ca89e37c
...
@@ -176,6 +176,7 @@ export declare const DRAW_STATUS: {
...
@@ -176,6 +176,7 @@ export declare const DRAW_STATUS: {
EXPIRED
:
number
;
EXPIRED
:
number
;
RETRY
:
number
;
RETRY
:
number
;
};
};
export
declare
const
appId
=
"${
\
u9700
\
u8981
\
u8865
\
u5145}"
;
export
declare
const
C_APP_NAME
:
string
;
export
declare
const
C_APP_NAME
:
string
;
export
declare
const
TAOBAO_SUCCESS_ORDER_STATUS
:
string
[];
export
declare
const
TAOBAO_SUCCESS_ORDER_STATUS
:
string
[];
export
declare
const
enum
ACTIVITY_STATUS
{
export
declare
const
enum
ACTIVITY_STATUS
{
...
...
v2.0/dist/constants.js
View file @
ca89e37c
"use strict"
;
"use strict"
;
/** @format */
/** @format */
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
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
.
DRAW_STATUS
=
exports
.
TBERROR
=
exports
.
CODE_TYPES
=
exports
.
BusinessError
=
void
0
;
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"
);
var
sdk_1
=
require
(
"./sdk"
);
exports
.
BusinessError
=
{
exports
.
BusinessError
=
{
// 更新重试失败(用于并发更新)
// 更新重试失败(用于并发更新)
...
@@ -116,8 +116,9 @@ exports.DRAW_STATUS = {
...
@@ -116,8 +116,9 @@ exports.DRAW_STATUS = {
// 重新领取
// 重新领取
RETRY
:
6
RETRY
:
6
};
};
exports
.
appId
=
'${需要补充}'
;
// C端的APP NAME
// C端的APP NAME
exports
.
C_APP_NAME
=
'promotioncenter-${需要补充}'
;
exports
.
C_APP_NAME
=
"promotioncenter-"
+
exports
.
appId
;
// 订单状态
// 订单状态
exports
.
TAOBAO_SUCCESS_ORDER_STATUS
=
[
exports
.
TAOBAO_SUCCESS_ORDER_STATUS
=
[
'WAIT_SELLER_SEND_GOODS'
,
'WAIT_SELLER_SEND_GOODS'
,
...
...
v2.0/dist/constants.js.map
View file @
ca89e37c
{"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,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,OAAO;KACpB;IACD,UAAU;IACV,oBAAoB,EAAE;QACpB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,wDAAW;KACxB;IACD,UAAU;IACV,yBAAyB,EAAE;QACzB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,4CAAS;KACtB;IACD,QAAQ;IACR,mBAAmB,EAAE;QACnB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,gCAAO;KACpB;IACD,uBAAuB,EAAE;QACvB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,gCAAO;KACpB;IACD,gBAAgB,EAAE;QAChB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,kDAAU;KACvB;IACD,gBAAgB,EAAE;QAChB,IAAI,EAAE,QAAQ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ACnD,wBAAwB;IACxB,uBAAuB;IACvB,0BAA0B;IAC1B,oBAAoB;IACpB,gBAAgB;IAChB,qBAAqB;CACtB,CAAA;AAcD,UAAU;AACG,QAAA,cAAc,GAAG;IAC5B,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,CAAC;CACX,CAAA;AAED,MAAM;AACO,QAAA,WAAW,GAAG;IACzB,OAAO,EAAE,CAAC;IACV,YAAY,EAAE,CAAC;IACf,IAAI,EAAE,CAAC,CAAC,MAAM;CACf,CAAA;AAED,OAAO;AACM,QAAA,UAAU,GAAG;IACxB,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,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"}
{"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,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X;AAHD,WAAY,UAAU;IACpB,6CAAS,CAAA;IACT,mDAAY,CAAA;AACd,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB"}
\ No newline at end of file
\ No newline at end of file
v2.0/dist/controller/user.controller.js
View file @
ca89e37c
...
@@ -95,15 +95,15 @@ var User = /** @class */ (function () {
...
@@ -95,15 +95,15 @@ var User = /** @class */ (function () {
var
session
=
_a
.
session
,
activityUserNick
=
_a
.
activityUserNick
;
var
session
=
_a
.
session
,
activityUserNick
=
_a
.
activityUserNick
;
var
userService
=
_b
[
0
];
var
userService
=
_b
[
0
];
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
callbackUrl
,
VIP_CALLBACK_URL
,
result
;
var
_c
,
callbackUrl
,
activityId
,
generateVipCallBackUrl
,
result
;
return
__generator
(
this
,
function
(
_
c
)
{
return
__generator
(
this
,
function
(
_
d
)
{
switch
(
_
c
.
label
)
{
switch
(
_
d
.
label
)
{
case
0
:
case
0
:
callbackUrl
=
context
.
data
.
callbackUrl
;
_c
=
context
.
data
,
callbackUrl
=
_c
.
callbackUrl
,
activityId
=
_c
.
activityId
;
VIP_CALLBACK_URL
=
config_1
.
getConfig
(
context
).
VIP_CALLBACK_URL
;
generateVipCallBackUrl
=
config_1
.
getConfig
(
context
).
generateVipCallBackUrl
;
return
[
4
/*yield*/
,
userService
.
getShopVip
(
session
,
activityUserNick
,
callbackUrl
||
VIP_CALLBACK_URL
)];
return
[
4
/*yield*/
,
userService
.
getShopVip
(
session
,
activityUserNick
,
callbackUrl
||
generateVipCallBackUrl
(
activityId
)
)];
case
1
:
case
1
:
result
=
_
c
.
sent
();
result
=
_
d
.
sent
();
return
[
2
/*return*/
,
sdk_1
.
resultsModel
.
success
(
result
)];
return
[
2
/*return*/
,
sdk_1
.
resultsModel
.
success
(
result
)];
}
}
});
});
...
...
v2.0/dist/controller/user.controller.js.map
View file @
ca89e37c
{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Aa,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,EAAA;;wBADtD,UAAU;wBACV,SAAsD,CAAA;wBAEtD,sBAAO,kBAAY,CAAC,OAAO,CAAC;gCAC1B,MAAM,QAAA;6BACP,CAAC,EAAA;;;;KACH;IACD;;OAEG;IAGG,yBAAU,GAAhB,UACE,OAAoB,EACpB,EAA+C,EAC/C,EAA4B;YAD1B,OAAO,aAAA,EAAE,gBAAgB,sBAAA;YAC1B,WAAW,QAAA;;;;;;wBAEN,KAA8B,OAAO,CAAC,IAAI,EAAxC,WAAW,iBAAA,EAAE,UAAU,gBAAA,CAAiB;wBACxC,sBAAsB,GAAK,kBAAS,CAAC,OAAO,CAAC,uBAAvB,CAAuB;wBACtC,qBAAM,WAAW,CAAC,UAAU,CACzC,OAAO,EACP,gBAAgB,EAChB,WAAW,IAAI,sBAAsB,CAAC,UAAU,CAAC,CAClD,EAAA;;wBAJK,MAAM,GAAG,SAId;wBAED,sBAAO,kBAAY,CAAC,OAAO,CAAC,MAAM,CAAC,EAAA;;;;KACpC;IAzCD;QAHC,uBAAW,CAAC,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QAC7D,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,EAAE,uBAAa,CAAC,CAAC;;;;qCAsBtC;IAMD;QAFC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;0CAevB;IACH,WAAC;CAAA,AAjDD,IAiDC;kBAjDoB,IAAI"}
\ No newline at end of file
\ No newline at end of file
v2.0/dist/decorator/check.js
View file @
ca89e37c
...
@@ -53,6 +53,7 @@ var sdk_1 = require("../sdk");
...
@@ -53,6 +53,7 @@ var sdk_1 = require("../sdk");
var
constants_1
=
require
(
"../constants"
);
var
constants_1
=
require
(
"../constants"
);
var
service_1
=
require
(
"../service"
);
var
service_1
=
require
(
"../service"
);
var
utils_1
=
require
(
"../utils"
);
var
utils_1
=
require
(
"../utils"
);
var
config_1
=
require
(
"../config"
);
// 检验参数是否存在
// 检验参数是否存在
exports
.
paramsCheck
=
function
(
params
)
{
exports
.
paramsCheck
=
function
(
params
)
{
return
function
(
target
,
name
,
descriptor
)
{
return
function
(
target
,
name
,
descriptor
)
{
...
@@ -113,16 +114,18 @@ exports.vipCheck = function (_a) {
...
@@ -113,16 +114,18 @@ exports.vipCheck = function (_a) {
args
[
_i
]
=
arguments
[
_i
];
args
[
_i
]
=
arguments
[
_i
];
}
}
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
context
,
_a
,
otherArgs
,
userService
,
session
,
vipInfo
;
var
context
,
_a
,
otherArgs
,
activityId
,
generateVipCallBackUrl
,
userService
,
session
,
vipInfo
;
return
__generator
(
this
,
function
(
_b
)
{
return
__generator
(
this
,
function
(
_b
)
{
switch
(
_b
.
label
)
{
switch
(
_b
.
label
)
{
case
0
:
case
0
:
context
=
args
[
0
],
_a
=
args
[
1
],
otherArgs
=
_a
===
void
0
?
{}
:
_a
;
context
=
args
[
0
],
_a
=
args
[
1
],
otherArgs
=
_a
===
void
0
?
{}
:
_a
;
activityId
=
context
.
data
.
activityId
;
generateVipCallBackUrl
=
config_1
.
getConfig
(
context
).
generateVipCallBackUrl
;
userService
=
new
service_1
.
UserService
(
context
);
userService
=
new
service_1
.
UserService
(
context
);
return
[
4
/*yield*/
,
utils_1
.
getSellerSession
(
context
)];
return
[
4
/*yield*/
,
utils_1
.
getSellerSession
(
context
)];
case
1
:
case
1
:
session
=
(
_b
.
sent
()).
session
;
session
=
(
_b
.
sent
()).
session
;
return
[
4
/*yield*/
,
userService
.
getShopVip
(
session
,
callbackUrl
)];
return
[
4
/*yield*/
,
userService
.
getShopVip
(
session
,
callbackUrl
||
generateVipCallBackUrl
(
activityId
)
)];
case
2
:
case
2
:
vipInfo
=
_b
.
sent
();
vipInfo
=
_b
.
sent
();
if
(
!
vipInfo
.
isVip
&&
intercept
)
if
(
!
vipInfo
.
isVip
&&
intercept
)
...
...
v2.0/dist/decorator/check.js.map
View file @
ca89e37c
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/decorator/check.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,8BAAqC;AACrC,0CAAyC;AACzC,sCAAqD;AACrD,kCAA2C;AAE3C,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,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACtC,IAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;gBACvB,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;oBAAE,OAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,iBAAK,KAAK,iBAAI,CAAC,CAAA;aAClG;YACD,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,eAAO,SAAS,EAAG,CAAC,CAAA;QAC1D,CAAC,CAAA;IACH,CAAC,CAAA;AACH,CAAC,CAAA;AAED,WAAW;AACE,QAAA,SAAS,GA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,IAAG,CAAC,EAAA;;;;KACvE,CAAA;AACH,CAAC,CAAA"}
\ No newline at end of file
\ No newline at end of file
v2.0/src/config/index.ts
View file @
ca89e37c
...
@@ -4,7 +4,7 @@ import online from './online'
...
@@ -4,7 +4,7 @@ import online from './online'
import
test
from
'./test'
import
test
from
'./test'
interface
Iconfig
{
interface
Iconfig
{
VIP_CALLBACK_URL
:
string
generateVipCallBackUrl
(
activityId
?:
string
)
:
string
}
}
const
configs
=
{
const
configs
=
{
...
...
v2.0/src/config/online.ts
View file @
ca89e37c
/** @format */
/** @format */
const
appId
=
'消费端ID
'
import
{
appId
}
from
'../constants
'
export
default
{
export
default
{
VIP_CALLBACK_URL
:
`https://m.duanqu.com/?_ariver_appid=
${
appId
}
`
generateVipCallBackUrl
(
activityId
:
string
)
{
return
`https://m.duanqu.com/?_ariver_appid=
${
appId
}
&query=activityId%3D
${
activityId
}
`
}
}
}
v2.0/src/config/test.ts
View file @
ca89e37c
/** @format */
/** @format */
export
default
{
export
default
{
VIP_CALLBACK_URL
:
'testUrl'
generateVipCallBackUrl
()
{
return
`客户端生成的预览地址`
}
}
}
v2.0/src/constants.ts
View file @
ca89e37c
...
@@ -119,8 +119,10 @@ export const DRAW_STATUS = {
...
@@ -119,8 +119,10 @@ export const DRAW_STATUS = {
RETRY
:
6
RETRY
:
6
}
}
export
const
appId
=
'${需要补充}'
// C端的APP NAME
// C端的APP NAME
export
const
C_APP_NAME
:
string
=
'promotioncenter-${需要补充}'
export
const
C_APP_NAME
:
string
=
`promotioncenter-
${
appId
}
`
// 订单状态
// 订单状态
export
const
TAOBAO_SUCCESS_ORDER_STATUS
:
string
[]
=
[
export
const
TAOBAO_SUCCESS_ORDER_STATUS
:
string
[]
=
[
...
...
v2.0/src/controller/user.controller.ts
View file @
ca89e37c
...
@@ -60,9 +60,13 @@ export default class User {
...
@@ -60,9 +60,13 @@ export default class User {
{
session
,
activityUserNick
}:
IControllerInfos
,
{
session
,
activityUserNick
}:
IControllerInfos
,
[
userService
]:
[
UserService
]
[
userService
]:
[
UserService
]
)
{
)
{
const
{
callbackUrl
}
=
context
.
data
const
{
callbackUrl
,
activityId
}
=
context
.
data
const
{
VIP_CALLBACK_URL
}
=
getConfig
(
context
)
const
{
generateVipCallBackUrl
}
=
getConfig
(
context
)
const
result
=
await
userService
.
getShopVip
(
session
,
activityUserNick
,
callbackUrl
||
VIP_CALLBACK_URL
)
const
result
=
await
userService
.
getShopVip
(
session
,
activityUserNick
,
callbackUrl
||
generateVipCallBackUrl
(
activityId
)
)
return
resultsModel
.
success
(
result
)
return
resultsModel
.
success
(
result
)
}
}
...
...
v2.0/src/decorator/check.ts
View file @
ca89e37c
...
@@ -3,7 +3,7 @@ import { resultsModel } from '../sdk'
...
@@ -3,7 +3,7 @@ import { resultsModel } from '../sdk'
import
{
CODE_TYPES
}
from
'../constants'
import
{
CODE_TYPES
}
from
'../constants'
import
{
UserService
,
BaseService
}
from
'../service'
import
{
UserService
,
BaseService
}
from
'../service'
import
{
getSellerSession
}
from
'../utils'
import
{
getSellerSession
}
from
'../utils'
import
{
getConfig
}
from
'../config'
// 检验参数是否存在
// 检验参数是否存在
export
const
paramsCheck
=
(
params
:
string
[])
=>
{
export
const
paramsCheck
=
(
params
:
string
[])
=>
{
return
function
(
target
:
Object
,
name
:
string
,
descriptor
:
PropertyDescriptor
)
{
return
function
(
target
:
Object
,
name
:
string
,
descriptor
:
PropertyDescriptor
)
{
...
@@ -46,9 +46,12 @@ export const vipCheck = ({ intercept = true, callbackUrl = '' }) => {
...
@@ -46,9 +46,12 @@ export const vipCheck = ({ intercept = true, callbackUrl = '' }) => {
descriptor
.
value
=
async
function
(...
args
:
any
[])
{
descriptor
.
value
=
async
function
(...
args
:
any
[])
{
const
[
context
,
otherArgs
=
{}]
=
args
const
[
context
,
otherArgs
=
{}]
=
args
const
{
activityId
}
=
context
.
data
const
{
generateVipCallBackUrl
}
=
getConfig
(
context
)
const
userService
=
new
UserService
(
context
)
const
userService
=
new
UserService
(
context
)
const
{
session
}
=
await
getSellerSession
(
context
)
const
{
session
}
=
await
getSellerSession
(
context
)
const
vipInfo
=
await
userService
.
getShopVip
(
session
,
callbackUrl
)
const
vipInfo
=
await
userService
.
getShopVip
(
session
,
callbackUrl
||
generateVipCallBackUrl
(
activityId
)
)
if
(
!
vipInfo
.
isVip
&&
intercept
)
return
resultsModel
.
error
(
CODE_TYPES
.
ERROR_NO_VIP
,
'非店铺会员'
,
vipInfo
)
if
(
!
vipInfo
.
isVip
&&
intercept
)
return
resultsModel
.
error
(
CODE_TYPES
.
ERROR_NO_VIP
,
'非店铺会员'
,
vipInfo
)
return
method
.
apply
(
target
,
[
context
,
{
...
otherArgs
,
vipInfo
,
session
}])
return
method
.
apply
(
target
,
[
context
,
{
...
otherArgs
,
vipInfo
,
session
}])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment