Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-limited-sell-miniapp
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
肖亚东
6 years ago
Commit
4b670ffeecc9ebb77897ad4ef83f223a292931a5
1 parent
c6c77299
新用户助力商品老用户不能助力处理
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
app/models/product/detail.js
app/pages/product/detail/detail.js
app/models/product/detail.js
View file @
4b670ff
...
...
@@ -50,13 +50,14 @@ export default {
* @param {*} params
* @returns
*/
addAssist
({
userId
,
helpUserId
,
helpUserName
,
helpUserImgUrl
,
limitProductCode
})
{
addAssist
({
userId
,
helpUserId
,
helpUser
YohoId
,
helpUser
Name
,
helpUserImgUrl
,
limitProductCode
})
{
return
api
.
get
({
url
:
''
,
data
:
{
method
:
'app.limitProduct.addHelpUserInfo'
,
userId
,
helpUserId
,
helpUserYohoId
,
helpUserName
,
helpUserImgUrl
,
limitProductCode
...
...
app/pages/product/detail/detail.js
View file @
4b670ff
...
...
@@ -11,6 +11,7 @@ import {
import
{
stringify
}
from
'../../../vendors/query-stringify'
;
import
wx
from
'../../../utils/wx'
;
let
app
=
getApp
();
let
router
=
global
.
router
;
...
...
@@ -541,6 +542,7 @@ Page(Object.assign({
detailModel
.
addAssist
({
userId
:
this
.
data
.
originUid
,
helpUserId
:
this
.
getUserWechatId
(),
helpUserYohoId
:
userInfo
.
uid
,
helpUserName
:
userInfo
.
wechat
.
nickName
?
userInfo
.
wechat
.
nickName
:
''
,
helpUserImgUrl
:
userInfo
.
wechat
.
avatarUrl
?
userInfo
.
wechat
.
avatarUrl
:
''
,
limitProductCode
:
this
.
data
.
limitProductCode
...
...
@@ -560,6 +562,13 @@ Page(Object.assign({
if
((
this
.
data
.
avatarList
.
length
+
1
)
===
this
.
data
.
assistLimit
)
{
detailModel
.
getLimitCode
(
this
.
data
.
originUid
,
this
.
data
.
limitProductCode
);
}
}
else
if
(
result
.
code
===
520
)
{
//此限定商品分享助力只限新客!
wx
.
hideLoading
();
wx
.
showModal
({
title
:
'提示'
,
content
:
result
.
message
,
showCancel
:
false
,
});
}
else
if
(
result
.
code
===
9001
)
{
this
.
setData
({
assistSuccess
:
ASSIST_SUCCESS
.
REPEAT
...
...
@@ -596,7 +605,7 @@ Page(Object.assign({
detailModel
.
addAssist
({
userId
:
this
.
data
.
originUid
,
helpUserId
:
this
.
getUserWechatId
(),
help
YohoId
:
this
.
data
.
uid
,
help
UserYohoId
:
userInfo
.
uid
,
helpUserName
:
userInfo
.
wechat
.
nickName
?
userInfo
.
wechat
.
nickName
:
''
,
helpUserImgUrl
:
userInfo
.
wechat
.
avatarUrl
?
userInfo
.
wechat
.
avatarUrl
:
''
,
limitProductCode
:
this
.
data
.
limitProductCode
...
...
@@ -623,6 +632,13 @@ Page(Object.assign({
this
.
setData
({
queueSuccess
:
QUEUE_SUCCESS
.
FULL
});
}
else
if
(
result
.
code
===
520
)
{
//此限定商品分享助力只限新客!
wx
.
hideLoading
();
wx
.
showModal
({
title
:
'提示'
,
content
:
result
.
message
,
showCancel
:
false
,
});
}
else
{
yas
.
report
(
YB_ASSIST_SUCCESS_L
,
{
ASSIST_RESULT
:
ASSIST_FAIL
,
...
...
Please
register
or
login
to post a comment