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
2938eda6
Commit
2938eda6
authored
Sep 14, 2020
by
qinhaitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:
🐛
vip bug
parent
ddd7a2a0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
12 deletions
+15
-12
services.js
v2.0/dist/decorator/services.js
+12
-10
services.js.map
v2.0/dist/decorator/services.js.map
+1
-1
services.ts
v2.0/src/decorator/services.ts
+2
-1
No files found.
v2.0/dist/decorator/services.js
View file @
2938eda6
...
...
@@ -44,33 +44,35 @@ var sdk_1 = require("../sdk");
var
constants_1
=
require
(
"../constants"
);
var
vip_1
=
require
(
"../utils/package/vip"
);
function
initBaseInfo
(
context
,
baseInfos
)
{
var
_a
,
_b
,
_c
;
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
userService
,
userInfo
,
_a
,
session
,
userNick
,
vipInfo
;
return
__generator
(
this
,
function
(
_
b
)
{
switch
(
_
b
.
label
)
{
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
=
_
b
.
sent
();
userInfo
=
_
e
.
sent
();
baseInfos
.
userInfo
=
userInfo
;
_
b
.
label
=
2
;
_
e
.
label
=
2
;
case
2
:
if
(
!!
baseInfos
.
session
)
return
[
3
/*break*/
,
4
];
return
[
4
/*yield*/
,
utils_1
.
getSellerSession
(
context
)];
case
3
:
_
a
=
_b
.
sent
(),
session
=
_a
.
session
,
userNick
=
_a
.
userNick
;
_
d
=
_e
.
sent
(),
session
=
_d
.
session
,
userNick
=
_d
.
userNick
;
baseInfos
.
session
=
session
;
baseInfos
.
activityUserNick
=
userNick
;
_
b
.
label
=
4
;
_
e
.
label
=
4
;
case
4
:
if
(
!
(
!
baseInfos
.
vipInfo
&&
context
.
fcName
!==
'getVipInfo'
))
return
[
3
/*break*/
,
6
];
if
(
!
(
!
baseInfos
.
vipInfo
&&
handler
!==
'getVipInfo'
))
return
[
3
/*break*/
,
6
];
return
[
4
/*yield*/
,
userService
.
getShopVip
(
baseInfos
.
session
,
vip_1
.
formatVipCbUrl
(
context
),
baseInfos
.
activityUserNick
)];
case
5
:
vipInfo
=
_
b
.
sent
();
vipInfo
=
_
e
.
sent
();
baseInfos
.
vipInfo
=
vipInfo
;
_
b
.
label
=
6
;
_
e
.
label
=
6
;
case
6
:
return
[
2
/*return*/
,
baseInfos
];
}
});
...
...
v2.0/dist/decorator/services.js.map
View file @
2938eda6
{"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,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AC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,IAAI,CAAC,CAAC,OAAO,CAAC,EAAd,CAAc,CAAC,CAAA;4BACtB,qBAAM,YAAY,CAAC,OAAO,EAAE,SAAS,CAAC,EAAA;;4BAApE,SAAS,GAAqB,SAAsC;4BAE1E,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
v2.0/src/decorator/services.ts
View file @
2938eda6
...
...
@@ -5,6 +5,7 @@ import { resultsModel } from '../sdk'
import
{
CODE_TYPES
}
from
'../constants'
import
{
formatVipCbUrl
}
from
'../utils/package/vip'
async
function
initBaseInfo
(
context
:
IContext
<
IParams
>
,
baseInfos
:
IControllerInfos
)
{
const
handler
=
context
?.
cloud
?.
dataspace
?.
context
?.
handler
const
userService
=
new
UserService
(
context
)
if
(
!
baseInfos
.
userInfo
)
{
...
...
@@ -18,7 +19,7 @@ async function initBaseInfo(context: IContext<IParams>, baseInfos: IControllerIn
baseInfos
.
activityUserNick
=
userNick
}
if
(
!
baseInfos
.
vipInfo
&&
context
.
fcName
!==
'getVipInfo'
)
{
if
(
!
baseInfos
.
vipInfo
&&
handler
!==
'getVipInfo'
)
{
const
vipInfo
=
await
userService
.
getShopVip
(
baseInfos
.
session
,
formatVipCbUrl
(
context
),
baseInfos
.
activityUserNick
)
baseInfos
.
vipInfo
=
vipInfo
}
...
...
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