Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
zhwy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 19bc7c7d
authored
Jan 17, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交接龙
1 parent
dadb1e91
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
58 deletions
api/module/questionnaire.js
packageActivity/pages/redEnvelope/index/index.js
packageActivity/pages/solitaire/index/index.js
packageEquity/pages/freecard/freecard.js
packageMine/pages/questionnaire/components/Finish/Finish.js
api/module/questionnaire.js
View file @
19bc7c7
...
...
@@ -24,7 +24,14 @@ module.exports = {
*/
receiveQuestionnaireRedEnvelope
(
data
=
{})
{
return
api
.
post
({
// method: 'marketing.api.activityRedEnvelope.questionnaire.binding',
method
:
'marketing.api.activityRedEnvelope.questionnaire.binding'
,
projectName
,
...
data
})
},
/**绑定红包 */
bindRedEnvelopeLink
(
data
=
{})
{
return
api
.
post
({
method
:
'marketing.api.self.red.envelope.banding.link'
,
projectName
,
...
data
...
...
packageActivity/pages/redEnvelope/index/index.js
View file @
19bc7c7
...
...
@@ -45,7 +45,8 @@ Page({
userInfo
}
=
this
.
data
,
{
activityId
,
merchantId
merchantId
,
linkId
}
=
this
.
options
,
{
sessionId
}
=
wx
.
p
.
storage
.
get
()
...
...
@@ -63,10 +64,12 @@ Page({
unionId
,
openid
,
phone
}))
})),
query
=
`activityId=
${
activityId
}
&merchantId=
${
merchantId
}
&sessionId=
${
sessionId
}
&userInfo=
${
user
}
`
if
(
linkId
)
query
+=
`&linkId=
${
linkId
}
`
this
.
setData
({
// url: `${domain}/scrm-wx-red-packet/#/redEnvelope?activityId=${activityId}&merchantId=${merchantId}&sessionId=${sessionId}&userInfo=${user}` //测试、预发布、生产
url
:
`
${
domain
}
/dj-scrm-wx-work-main-lwk/#/?
activityId=
${
activityId
}
&merchantId=
${
merchantId
}
&sessionId=
${
sessionId
}
&userInfo=
${
user
}
`
//开发环境
url
:
`
${
domain
}
/dj-scrm-wx-work-main-lwk/#/?
${
query
}
`
//开发环境
})
}
},
...
...
packageActivity/pages/solitaire/index/index.js
View file @
19bc7c7
...
...
@@ -38,40 +38,47 @@ Page({
if
(
options
.
isLogin
)
this
.
getGroupEnterInfo
(
options
)
else
this
.
jumpLoading
()
//直接打开时跳转、防止sessionId失效
},
getGroupEnterInfo
(
options
)
{
try
{
const
_this
=
this
wx
.
getGroupEnterInfo
({
async
success
({
iv
,
encryptedData
})
{
const
{
data
,
code
,
message
}
=
await
wx
.
p
.
api
.
userApi
.
getOpengid
({
async
getGroupEnterInfo
(
options
)
{
const
res
=
await
wx
.
p
.
router
.
intercept
()
if
(
!
res
)
{
const
{
userInfo
}
=
this
.
data
if
(
!
userInfo
.
nickName
)
return
this
.
getNickNameAndHeadUrl
()
try
{
const
_this
=
this
wx
.
getGroupEnterInfo
({
async
success
({
iv
,
encryptedData
})
if
(
code
==
0
&&
data
)
{
console
.
log
(
'openGid:'
,
data
)
const
res
=
await
wx
.
p
.
api
.
userApi
.
openGIdtoChatId
({
merchantId
:
options
.
merchantId
,
openGid
:
'GtsOh6zJoHmautQCAxaxaUzIxYNo'
||
data
})
{
const
{
data
,
code
,
message
}
=
await
wx
.
p
.
api
.
userApi
.
getOpengid
({
iv
,
encryptedData
})
console
.
log
(
'chatId:'
,
res
.
data
)
options
.
chatId
=
res
.
data
||
''
this
.
options
=
options
if
(
code
==
0
&&
data
)
{
console
.
log
(
'openGid:'
,
data
)
const
res
=
await
wx
.
p
.
api
.
userApi
.
openGIdtoChatId
({
merchantId
:
options
.
merchantId
,
openGid
:
'GtsOh6zJoHmautQCAxaxaUzIxYNo'
||
data
})
console
.
log
(
'chatId:'
,
res
.
data
)
options
.
chatId
=
res
.
data
||
''
this
.
options
=
options
_this
.
getSolitaireUserInfo
(
options
)
}
else
throw
message
},
fail
(
err
)
{
_this
.
getSolitaireUserInfo
(
options
)
}
else
throw
message
},
fail
(
err
)
{
_this
.
getSolitaireUserInfo
(
options
)
}
})
}
catch
(
error
)
{
if
(
error
)
wx
.
p
.
wxApi
.
showToast
(
error
)
}
})
}
catch
(
error
)
{
if
(
error
)
wx
.
p
.
wxApi
.
showToast
(
error
)
}
}
},
/**获取用户接龙信息 */
...
...
packageEquity/pages/freecard/freecard.js
View file @
19bc7c7
...
...
@@ -203,6 +203,13 @@ Page({
}
else
{
if
(
!
data
.
isReceiveFlag
)
{
/**用户是否已添加福利官 true:是;false:否; */
// const {
// sourceType
// } = await wx.p.api.solitaireApi.getActivityRedEnvelopeDetail({
// id: equityFreeCardId
// })
// console.log(sourceType)
// /**sourceType 0-自研,1-外采 */
if
(
!
data
.
isAddWelfareOfficerFlag
)
{
wx
.
p
.
router
.
switchTab
(
'/pages/tab/mine/index'
,
{
isMemberShow
:
true
,
...
...
packageMine/pages/questionnaire/components/Finish/Finish.js
View file @
19bc7c7
...
...
@@ -27,41 +27,47 @@ Component({
}
if
(
data
.
activityType
==
3
)
{
const
{
sourceType
}
=
await
wx
.
p
.
api
.
solitaireApi
.
getActivityRedEnvelopeDetail
({
id
:
data
.
activityId
})
/**sourceType 0-自研,1-外采 */
if
(
sourceType
==
1
)
{
userInfo
}
=
wx
.
p
.
router
.
getPageInstance
().
data
// const response = await wx.p.api.questionnaireApi.receiveQuestionnaireRedEnvelope({
// questionnaireId: data.id,
// activityRedEnvelopeId: data.activityId,
// nickName: userInfo.nickName
// })
// if (response.isActivityRedEnvelopeFlag && !response.isReceiveFlag) {
const
{
userInfo
}
=
wx
.
p
.
router
.
getPageInstance
().
data
,
res
=
await
wx
.
p
.
api
.
questionnaireApi
.
receiveQuestionnaireRedEnvelope
({
activityId
:
data
.
activityId
,
bindingSource
:
1
,
wechatName
:
userInfo
.
nickName
,
businessId
:
data
.
id
})
this
.
setData
({
jumpOption
:
{
url
:
res
.
link
,
type
:
data
.
activityType
}
sourceType
}
=
await
wx
.
p
.
api
.
solitaireApi
.
getActivityRedEnvelopeDetail
({
id
:
data
.
activityId
}),
/**sourceType 0-自研,1-外采 */
res
=
await
wx
.
p
.
api
.
questionnaireApi
.
bindRedEnvelopeLink
({
activityId
:
data
.
activityId
,
bindingSource
:
1
,
wechatName
:
userInfo
.
nickName
,
businessId
:
data
.
id
})
this
.
countDown
()
}
else
{
this
.
setData
({
if
(
sourceType
==
1
)
{
this
.
setData
({
jumpOption
:
{
url
:
res
.
link
,
type
:
data
.
activityType
}
})
}
else
this
.
setData
({
jumpOption
:
{
url
:
'/packageActivity/pages/redEnvelope/index/index'
,
type
:
1
,
options
:
{
activityId
:
data
.
activityId
,
merchantId
:
data
.
merchantId
merchantId
:
data
.
merchantId
,
linkId
:
res
.
id
}
}
})
this
.
countDown
()
}
// } else this.countDown()
}
else
{
if
(
data
.
activityType
==
2
)
{
options
.
couponId
=
data
.
activityId
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment