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
e6fd20dd
Commit
e6fd20dd
authored
Sep 04, 2020
by
qinhaitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor:
💡
优化参数
parent
53b7fac5
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
14 deletions
+14
-14
stat.controller.d.ts
v2.0/dist/controller/stat.controller.d.ts
+1
-1
index.d.ts
v2.0/dist/index.d.ts
+1
-1
user.service.d.ts
v2.0/dist/service/user.service.d.ts
+3
-3
user.service.js
v2.0/dist/service/user.service.js
+4
-4
user.service.js.map
v2.0/dist/service/user.service.js.map
+1
-1
user.service.ts
v2.0/src/service/user.service.ts
+4
-4
No files found.
v2.0/dist/controller/stat.controller.d.ts
View file @
e6fd20dd
...
...
@@ -18,5 +18,5 @@ export default class StatController {
/**
* 统计数据
*/
getStats
(
context
:
IContext
<
IGetStatsParams
>
):
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
any
[],
true
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
string
[]
|
object
[]
|
number
[],
fals
e
>>
;
getStats
(
context
:
IContext
<
IGetStatsParams
>
):
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
string
[]
|
object
[]
|
number
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
any
[],
tru
e
>>
;
}
v2.0/dist/index.d.ts
View file @
e6fd20dd
...
...
@@ -15,6 +15,6 @@ declare const _default: {
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
|
string
[]
|
object
[]
|
number
[],
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
]:
[
import
(
"./service/user.service"
).
default
,
import
(
"./service"
).
TaskService
,
import
(
"./service"
).
AccessService
])
=>
Promise
<
IResult
<
boolean
>>
;
getStats
:
(
context
:
IContext
<
import
(
"./controller/stat.controller"
).
IGetStatsParams
>
)
=>
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
any
[],
true
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
string
[]
|
object
[]
|
number
[],
fals
e
>>
;
getStats
:
(
context
:
IContext
<
import
(
"./controller/stat.controller"
).
IGetStatsParams
>
)
=>
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
string
[]
|
object
[]
|
number
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
any
[],
tru
e
>>
;
};
export
default
_default
;
v2.0/dist/service/user.service.d.ts
View file @
e6fd20dd
...
...
@@ -13,12 +13,12 @@ declare class UserService extends BaseService {
*/
getUserInfo
():
Promise
<
IUserInfo
>
;
/**
* @desc 根据
invite
Id获取用户详情
* @desc 根据
open
Id获取用户详情
* @desc 常用于助力分享码为用户openId, 被邀请人打开活动助力时需要获取邀请人的用户详情
* @param {
邀请人的openId} invite
Id
* @param {
openId} open
Id
* @returns 若用户不存在,返回null; 用户存在,返回用户信息(object对象)
*/
getUserInfoByOpenId
(
invite
Id
:
string
):
Promise
<
IUserInfo
>
;
getUserInfoByOpenId
(
open
Id
:
string
):
Promise
<
IUserInfo
>
;
/**
* @desc 获取是否是会员
* @param {调用淘宝接口的session} session
...
...
v2.0/dist/service/user.service.js
View file @
e6fd20dd
...
...
@@ -98,19 +98,19 @@ var UserService = /** @class */ (function (_super) {
});
};
/**
* @desc 根据
invite
Id获取用户详情
* @desc 根据
open
Id获取用户详情
* @desc 常用于助力分享码为用户openId, 被邀请人打开活动助力时需要获取邀请人的用户详情
* @param {
邀请人的openId} invite
Id
* @param {
openId} open
Id
* @returns 若用户不存在,返回null; 用户存在,返回用户信息(object对象)
*/
UserService
.
prototype
.
getUserInfoByOpenId
=
function
(
invite
Id
)
{
UserService
.
prototype
.
getUserInfoByOpenId
=
function
(
open
Id
)
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
activityId
,
record
;
return
__generator
(
this
,
function
(
_a
)
{
switch
(
_a
.
label
)
{
case
0
:
activityId
=
this
.
context
.
data
.
activityId
;
return
[
4
/*yield*/
,
this
.
userdao
.
findOne
({
openId
:
invite
Id
,
activityId
:
activityId
})];
return
[
4
/*yield*/
,
this
.
userdao
.
findOne
({
openId
:
open
Id
,
activityId
:
activityId
})];
case
1
:
record
=
_a
.
sent
();
return
[
2
/*return*/
,
record
];
...
...
v2.0/dist/service/user.service.js.map
View file @
e6fd20dd
This diff is collapsed.
Click to expand it.
v2.0/src/service/user.service.ts
View file @
e6fd20dd
...
...
@@ -28,14 +28,14 @@ class UserService extends BaseService {
}
/**
* @desc 根据
invite
Id获取用户详情
* @desc 根据
open
Id获取用户详情
* @desc 常用于助力分享码为用户openId, 被邀请人打开活动助力时需要获取邀请人的用户详情
* @param {
邀请人的openId} invite
Id
* @param {
openId} open
Id
* @returns 若用户不存在,返回null; 用户存在,返回用户信息(object对象)
*/
async
getUserInfoByOpenId
(
invite
Id
:
string
)
{
async
getUserInfoByOpenId
(
open
Id
:
string
)
{
let
{
activityId
}
=
this
.
context
.
data
let
record
=
await
this
.
userdao
.
findOne
<
IUserInfo
>
({
openId
:
inviteId
,
activityId
})
let
record
=
await
this
.
userdao
.
findOne
<
IUserInfo
>
({
openId
,
activityId
})
return
record
}
...
...
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