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
98205196
Commit
98205196
authored
Sep 25, 2020
by
韦凯德
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opt: 临时解决我的奖品页接口问题
parent
c59b521b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
index.axml
c_client/client/pages/index/index.axml
+1
-1
myprize.js
c_client/client/pages/myprize/myprize.js
+14
-11
No files found.
c_client/client/pages/index/index.axml
View file @
98205196
...
...
@@ -3,7 +3,7 @@
<navigator open-type="navigate" url="/pages/myprize/myprize" class="index-myprize-btn">我的奖品</navigator>
<view class="index-page__title">{{title}}</view>
<view class="index-page__content">{{content}}</view>
<view class="index-page__tips">
AM
接口只支持PC端预览,手机淘宝预览需要使用云函数模式</view>
<view class="index-page__tips">
mock
接口只支持PC端预览,手机淘宝预览需要使用云函数模式</view>
<view class="index-start-btn" onTap="doStart">开始</view>
<navigator open-type="navigate" url="/pages/tbccDemo/tbccDemo" class="index-tbcc-btn">tbcc demo</navigator>
<navigator style="{{{'marginTop':'16rpx'}}}" open-type="navigate" url="/pages/goodsPage/goodsPage?itemId=617724147979,617724563528" class="index-tbcc-btn">商品集合页面</navigator>
...
...
c_client/client/pages/myprize/myprize.js
View file @
98205196
...
...
@@ -65,7 +65,8 @@ Page({
if
(
type
!=
'noLoading'
)
{
my
.
showLoading
();
}
const
{
success
,
data
,
message
}
=
await
API
.
getMyPrizeList
({
activityId
}).
catch
(
res
=>
{
const
{
success
,
data
}
=
await
API
.
getMyPrizeList
({
activityId
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
);
this
.
setData
({
myPrizeList
:
[]
})
...
...
@@ -123,7 +124,9 @@ Page({
flag
=
true
;
const
{
activityId
}
=
app
;
const
{
item
}
=
e
.
target
.
dataset
;
const
userAddress
=
await
getUserAddress
({
joinTag
:
" "
})
const
userAddress
=
await
getUserAddress
().
catch
(
err
=>
{
commonToast
(
err
&&
err
.
errorMessage
);
});
my
.
hideLoading
();
if
(
!
userAddress
)
return
const
{
name
,
telNumber
,
provinceName
,
cityName
,
cityCode
,
countyName
,
detailInfo
,
streetName
}
=
userAddress
||
{};
...
...
@@ -158,11 +161,11 @@ Page({
},
// 领取实物
async
receiveObjectPrize
(
params
)
{
const
{
success
,
data
,
message
}
=
await
API
.
receiveObjectPrize
(
params
)
||
{}
const
{
success
,
data
}
=
await
API
.
receiveObjectPrize
(
params
).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
)
})
||
{}
if
(
success
&&
data
)
{
commonToast
(
'领取成功'
)
}
else
{
commonToast
(
message
)
}
this
.
getMyPrize
()
},
...
...
@@ -186,11 +189,11 @@ Page({
const
{
activityId
}
=
app
;
const
{
item
}
=
e
.
target
.
dataset
;
console
.
log
(
item
,
'领取积分'
)
const
{
success
,
data
,
message
}
=
await
API
.
receiveEnamePrize
({
activityId
,
id
:
item
.
_id
})
||
{};
const
{
success
,
data
}
=
await
API
.
receiveEnamePrize
({
activityId
,
id
:
item
.
_id
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
)
})
||
{};
if
(
success
&&
data
)
{
commonToast
(
'领取成功'
)
}
else
{
commonToast
(
message
)
}
flag
=
false
this
.
getMyPrize
()
...
...
@@ -199,13 +202,13 @@ Page({
//获取用户vip信息
async
getUserInfo
()
{
const
{
activityId
}
=
app
;
const
{
success
,
data
,
message
}
=
await
API
.
getVipInfo
({
activityId
})
||
{};
const
{
success
,
data
}
=
await
API
.
getVipInfo
({
activityId
}).
catch
(
res
=>
{
commonToast
(
res
&&
res
.
message
)
})
||
{};
console
.
log
(
data
,
'用户vip信息'
);
if
(
success
&&
data
)
{
app
.
isVip
=
(
data
&&
data
.
isVip
)
||
false
;
app
.
vipLink
=
(
data
&&
data
.
url
)
||
''
;
}
else
{
commonToast
(
message
)
}
},
});
\ No newline at end of file
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