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
37df3a49
Commit
37df3a49
authored
May 19, 2021
by
mqf_0707
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新API.fn问题
parent
a20574ac
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
11 deletions
+17
-11
.DS_Store
.DS_Store
+0
-0
myprize.js
c_client/client/pages/myprize/myprize.js
+2
-3
capiFn.js
c_client/client/tbcc-sdk-ts/lib/request/capiFn.js
+12
-5
capiFn.js.map
c_client/client/tbcc-sdk-ts/lib/request/capiFn.js.map
+1
-1
capiFn.ts
c_client/client/tbcc-sdk-ts/src/request/capiFn.ts
+2
-2
No files found.
.DS_Store
View file @
37df3a49
No preview for this file type
c_client/client/pages/myprize/myprize.js
View file @
37df3a49
...
@@ -125,11 +125,10 @@ Page({
...
@@ -125,11 +125,10 @@ Page({
const
{
activityId
}
=
app
;
const
{
activityId
}
=
app
;
const
success
=
type
===
PRIZE_TYPE
.
ENAME
?
(
await
API
.
fn
.
receiveEnamePrize
({
activityId
,
id
}))
:
const
success
=
type
===
PRIZE_TYPE
.
ENAME
?
(
await
API
.
fn
.
receiveEnamePrize
({
activityId
,
id
}))
:
type
===
PRIZE_TYPE
.
OBJECT
?
(
await
API
.
fn
.
receiveObjectPrize
({
activityId
,
id
}))
:
false
type
===
PRIZE_TYPE
.
OBJECT
?
(
await
API
.
fn
.
receiveObjectPrize
({
activityId
,
id
}))
:
false
if
(
success
)
{
if
(
success
)
{
commonToast
(
'领取成功'
)
commonToast
(
'领取成功'
)
this
.
getMyPrize
()
}
}
this
.
getMyPrize
()
},
},
// 积分
// 积分
async
handleGetIntergation
(
id
)
{
async
handleGetIntergation
(
id
)
{
...
@@ -153,7 +152,7 @@ Page({
...
@@ -153,7 +152,7 @@ Page({
// 复制编码
// 复制编码
async
handleCopyId
(
e
)
{
async
handleCopyId
(
e
)
{
const
{
text
}
=
e
.
target
.
dataset
||
{}
const
{
text
}
=
e
.
target
.
dataset
||
{}
await
setClipboard
(
{
text
}
)
await
setClipboard
(
text
)
commonToast
(
'复制成功'
)
commonToast
(
'复制成功'
)
},
},
/**
/**
...
...
c_client/client/tbcc-sdk-ts/lib/request/capiFn.js
View file @
37df3a49
...
@@ -55,18 +55,19 @@ var capiFn = function (apiList, request) {
...
@@ -55,18 +55,19 @@ var capiFn = function (apiList, request) {
return
{
return
{
receiveObjectPrize
:
function
(
params
)
{
receiveObjectPrize
:
function
(
params
)
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
_a
,
handle
,
method
,
ext
,
userAddress
,
_b
,
name
,
telNumber
,
provinceName
,
cityName
,
cityCode
,
countyName
,
detailInfo
,
streetName
,
confirmResult
;
var
_a
,
handle
,
method
,
ext
,
userAddress
,
_b
,
name
,
telNumber
,
provinceName
,
cityName
,
cityCode
,
countyName
,
detailInfo
,
streetName
,
confirmResult
,
_c
;
return
__generator
(
this
,
function
(
_
c
)
{
return
__generator
(
this
,
function
(
_
d
)
{
switch
(
_
c
.
label
)
{
switch
(
_
d
.
label
)
{
case
0
:
case
0
:
_a
=
utils_1
.
getRequestParams
(
apiList
[
'receiveObjectPrize'
]),
handle
=
_a
.
handle
,
method
=
_a
.
method
,
ext
=
_a
.
ext
;
_a
=
utils_1
.
getRequestParams
(
apiList
[
'receiveObjectPrize'
]),
handle
=
_a
.
handle
,
method
=
_a
.
method
,
ext
=
_a
.
ext
;
return
[
4
/*yield*/
,
tbFn_1
.
getUserAddress
().
catch
(
function
(
err
)
{
return
[
4
/*yield*/
,
tbFn_1
.
getUserAddress
().
catch
(
function
(
err
)
{
tb_1
.
commonToast
(
err
.
errorMessage
);
tb_1
.
commonToast
(
err
.
errorMessage
);
})];
})];
case
1
:
case
1
:
userAddress
=
_
c
.
sent
();
userAddress
=
_
d
.
sent
();
_b
=
userAddress
||
{},
name
=
_b
.
name
,
telNumber
=
_b
.
telNumber
,
provinceName
=
_b
.
provinceName
,
cityName
=
_b
.
cityName
,
cityCode
=
_b
.
cityCode
,
countyName
=
_b
.
countyName
,
detailInfo
=
_b
.
detailInfo
,
streetName
=
_b
.
streetName
;
_b
=
userAddress
||
{},
name
=
_b
.
name
,
telNumber
=
_b
.
telNumber
,
provinceName
=
_b
.
provinceName
,
cityName
=
_b
.
cityName
,
cityCode
=
_b
.
cityCode
,
countyName
=
_b
.
countyName
,
detailInfo
=
_b
.
detailInfo
,
streetName
=
_b
.
streetName
;
params
=
__assign
({
name
:
name
,
phone
:
telNumber
,
addressDetail
:
detailInfo
,
cityCode
:
cityCode
,
city
:
cityName
,
province
:
provinceName
,
area
:
countyName
,
streetName
:
streetName
},
params
);
params
=
__assign
({
name
:
name
,
phone
:
telNumber
,
addressDetail
:
detailInfo
,
cityCode
:
cityCode
,
city
:
cityName
,
province
:
provinceName
,
area
:
countyName
,
streetName
:
streetName
},
params
);
if
(
!
userAddress
)
return
[
3
/*break*/
,
3
];
return
[
4
/*yield*/
,
tb_1
.
commonConfirm
(
'提示'
,
'确认使用该收货地址:'
+
name
+
telNumber
+
userAddress
.
duibaAddress
.
address
,
function
()
{
return
[
4
/*yield*/
,
tb_1
.
commonConfirm
(
'提示'
,
'确认使用该收货地址:'
+
name
+
telNumber
+
userAddress
.
duibaAddress
.
address
,
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
result
;
var
result
;
...
@@ -86,7 +87,13 @@ var capiFn = function (apiList, request) {
...
@@ -86,7 +87,13 @@ var capiFn = function (apiList, request) {
});
});
})];
})];
case
2
:
case
2
:
confirmResult
=
_c
.
sent
();
_c
=
(
_d
.
sent
());
return
[
3
/*break*/
,
4
];
case
3
:
_c
=
false
;
_d
.
label
=
4
;
case
4
:
confirmResult
=
_c
;
return
[
2
/*return*/
,
confirmResult
];
return
[
2
/*return*/
,
confirmResult
];
}
}
});
});
...
...
c_client/client/tbcc-sdk-ts/lib/request/capiFn.js.map
View file @
37df3a49
{"version":3,"file":"capiFn.js","sourceRoot":"","sources":["../../src/request/capiFn.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAwD;AACxD,qCAA8C;AAC9C,kCAA4C;AAE5C,YAAY;AACZ,IAAM,MAAM,GAAG,UAAC,OAAO,EAAE,OAAO;IAC9B,OAAO;QACC,kBAAkB,EAAxB,UAAyB,MAAM;;;;;;4BACvB,KAA0B,wBAAgB,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,EAAvE,MAAM,YAAA,EAAE,MAAM,YAAA,EAAE,GAAG,SAAA,CAAqD;4BAClD,qBAAM,qBAAc,EAAE,CAAC,KAAK,CAAC,UAAA,GAAG;oCAC5D,gBAAW,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;gCAChC,CAAC,CAAC,EAAA;;4BAFI,WAAW,GAAa,SAE5B;4BAEI,KAA4F,WAAW,IAAI,EAAE,EAA3G,IAAI,UAAA,EAAE,SAAS,eAAA,EAAE,YAAY,kBAAA,EAAE,QAAQ,cAAA,EAAE,QAAQ,cAAA,EAAE,UAAU,gBAAA,EAAE,UAAU,gBAAA,EAAE,UAAU,gBAAA,CAAuB;4BACpH,MAAM,cACJ,IAAI,MAAA,EACJ,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,UAAU,EACzB,QAAQ,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;;;;;;4BAC/C,KAA0B,wBAAgB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,EAA5D,MAAM,YAAA,EAAE,MAAM,YAAA,EAAE,GAAG,SAAA,CAA0C;4BACtD,qBAAM,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE;oCAC3C,UAAU,YAAA;oCACV,IAAI,MAAA;iCACL,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,UAAA,GAAG;oCACf,gBAAW,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;gCAClC,CAAC,CAAC,EAAA;;4BALI,MAAM,GAAG,SAKb;4BACF,IAAI,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE;gCAC5B,sBAAO,IAAI,EAAC;6BACb;4BACD,sBAAO,KAAK,EAAC;;;;SACd;KACF,CAAA;AACH,CAAC,CAAC;AAEF,kBAAe,MAAM,CAAC"}
\ No newline at end of file
\ No newline at end of file
c_client/client/tbcc-sdk-ts/src/request/capiFn.ts
View file @
37df3a49
...
@@ -23,7 +23,7 @@ const capiFn = (apiList, request) => {
...
@@ -23,7 +23,7 @@ const capiFn = (apiList, request) => {
streetName
,
streetName
,
...
params
...
params
}
}
const
confirmResult
=
await
commonConfirm
(
'提示'
,
'确认使用该收货地址:'
+
name
+
telNumber
+
userAddress
.
duibaAddress
.
address
,
async
function
()
{
const
confirmResult
=
userAddress
?
(
await
commonConfirm
(
'提示'
,
'确认使用该收货地址:'
+
name
+
telNumber
+
userAddress
.
duibaAddress
.
address
,
async
function
()
{
const
result
=
await
request
(
handle
,
method
,
params
,
ext
).
catch
(
res
=>
{
const
result
=
await
request
(
handle
,
method
,
params
,
ext
).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
commonToast
(
res
&&
res
.
message
);
});
});
...
@@ -31,7 +31,7 @@ const capiFn = (apiList, request) => {
...
@@ -31,7 +31,7 @@ const capiFn = (apiList, request) => {
return
true
;
return
true
;
}
}
return
false
return
false
})
})
)
:
false
return
confirmResult
return
confirmResult
},
},
...
...
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