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 = {
...
@@ -24,7 +24,14 @@ module.exports = {
*/
*/
receiveQuestionnaireRedEnvelope
(
data
=
{})
{
receiveQuestionnaireRedEnvelope
(
data
=
{})
{
return
api
.
post
({
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'
,
method
:
'marketing.api.self.red.envelope.banding.link'
,
projectName
,
projectName
,
...
data
...
data
...
...
packageActivity/pages/redEnvelope/index/index.js
View file @
19bc7c7
...
@@ -45,7 +45,8 @@ Page({
...
@@ -45,7 +45,8 @@ Page({
userInfo
userInfo
}
=
this
.
data
,
{
}
=
this
.
data
,
{
activityId
,
activityId
,
merchantId
merchantId
,
linkId
}
=
this
.
options
,
{
}
=
this
.
options
,
{
sessionId
sessionId
}
=
wx
.
p
.
storage
.
get
()
}
=
wx
.
p
.
storage
.
get
()
...
@@ -63,10 +64,12 @@ Page({
...
@@ -63,10 +64,12 @@ Page({
unionId
,
unionId
,
openid
,
openid
,
phone
phone
}))
})),
query
=
`activityId=
${
activityId
}
&merchantId=
${
merchantId
}
&sessionId=
${
sessionId
}
&userInfo=
${
user
}
`
if
(
linkId
)
query
+=
`&linkId=
${
linkId
}
`
this
.
setData
({
this
.
setData
({
// url: `${domain}/scrm-wx-red-packet/#/redEnvelope?activityId=${activityId}&merchantId=${merchantId}&sessionId=${sessionId}&userInfo=${user}` //测试、预发布、生产
// 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({
...
@@ -38,40 +38,47 @@ Page({
if
(
options
.
isLogin
)
this
.
getGroupEnterInfo
(
options
)
if
(
options
.
isLogin
)
this
.
getGroupEnterInfo
(
options
)
else
this
.
jumpLoading
()
//直接打开时跳转、防止sessionId失效
else
this
.
jumpLoading
()
//直接打开时跳转、防止sessionId失效
},
},
getGroupEnterInfo
(
options
)
{
async
getGroupEnterInfo
(
options
)
{
try
{
const
res
=
await
wx
.
p
.
router
.
intercept
()
const
_this
=
this
if
(
!
res
)
{
wx
.
getGroupEnterInfo
({
const
{
async
success
({
userInfo
iv
,
}
=
this
.
data
encryptedData
if
(
!
userInfo
.
nickName
)
return
this
.
getNickNameAndHeadUrl
()
})
{
try
{
const
{
const
_this
=
this
data
,
wx
.
getGroupEnterInfo
({
code
,
async
success
({
message
}
=
await
wx
.
p
.
api
.
userApi
.
getOpengid
({
iv
,
iv
,
encryptedData
encryptedData
})
})
{
if
(
code
==
0
&&
data
)
{
const
{
console
.
log
(
'openGid:'
,
data
)
data
,
const
res
=
await
wx
.
p
.
api
.
userApi
.
openGIdtoChatId
({
code
,
merchantId
:
options
.
merchantId
,
message
openGid
:
'GtsOh6zJoHmautQCAxaxaUzIxYNo'
||
data
}
=
await
wx
.
p
.
api
.
userApi
.
getOpengid
({
iv
,
encryptedData
})
})
console
.
log
(
'chatId:'
,
res
.
data
)
if
(
code
==
0
&&
data
)
{
options
.
chatId
=
res
.
data
||
''
console
.
log
(
'openGid:'
,
data
)
this
.
options
=
options
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
)
_this
.
getSolitaireUserInfo
(
options
)
}
else
throw
message
}
},
})
fail
(
err
)
{
}
catch
(
error
)
{
_this
.
getSolitaireUserInfo
(
options
)
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({
...
@@ -203,6 +203,13 @@ Page({
}
else
{
}
else
{
if
(
!
data
.
isReceiveFlag
)
{
if
(
!
data
.
isReceiveFlag
)
{
/**用户是否已添加福利官 true:是;false:否; */
/**用户是否已添加福利官 true:是;false:否; */
// const {
// sourceType
// } = await wx.p.api.solitaireApi.getActivityRedEnvelopeDetail({
// id: equityFreeCardId
// })
// console.log(sourceType)
// /**sourceType 0-自研,1-外采 */
if
(
!
data
.
isAddWelfareOfficerFlag
)
{
if
(
!
data
.
isAddWelfareOfficerFlag
)
{
wx
.
p
.
router
.
switchTab
(
'/pages/tab/mine/index'
,
{
wx
.
p
.
router
.
switchTab
(
'/pages/tab/mine/index'
,
{
isMemberShow
:
true
,
isMemberShow
:
true
,
...
...
packageMine/pages/questionnaire/components/Finish/Finish.js
View file @
19bc7c7
...
@@ -27,41 +27,47 @@ Component({
...
@@ -27,41 +27,47 @@ Component({
}
}
if
(
data
.
activityType
==
3
)
{
if
(
data
.
activityType
==
3
)
{
const
{
const
{
sourceType
userInfo
}
=
await
wx
.
p
.
api
.
solitaireApi
.
getActivityRedEnvelopeDetail
({
}
=
wx
.
p
.
router
.
getPageInstance
().
data
id
:
data
.
activityId
// const response = await wx.p.api.questionnaireApi.receiveQuestionnaireRedEnvelope({
})
// questionnaireId: data.id,
/**sourceType 0-自研,1-外采 */
// activityRedEnvelopeId: data.activityId,
if
(
sourceType
==
1
)
{
// nickName: userInfo.nickName
// })
// if (response.isActivityRedEnvelopeFlag && !response.isReceiveFlag) {
const
{
const
{
userInfo
sourceType
}
=
wx
.
p
.
router
.
getPageInstance
().
data
,
}
=
await
wx
.
p
.
api
.
solitaireApi
.
getActivityRedEnvelopeDetail
({
res
=
await
wx
.
p
.
api
.
questionnaireApi
.
receiveQuestionnaireRedEnvelope
({
id
:
data
.
activityId
activityId
:
data
.
activityId
,
}),
bindingSource
:
1
,
/**sourceType 0-自研,1-外采 */
wechatName
:
userInfo
.
nickName
,
res
=
await
wx
.
p
.
api
.
questionnaireApi
.
bindRedEnvelopeLink
({
businessId
:
data
.
id
activityId
:
data
.
activityId
,
})
bindingSource
:
1
,
this
.
setData
({
wechatName
:
userInfo
.
nickName
,
jumpOption
:
{
businessId
:
data
.
id
url
:
res
.
link
,
type
:
data
.
activityType
}
})
})
this
.
countDown
()
if
(
sourceType
==
1
)
{
}
else
{
this
.
setData
({
this
.
setData
({
jumpOption
:
{
url
:
res
.
link
,
type
:
data
.
activityType
}
})
}
else
this
.
setData
({
jumpOption
:
{
jumpOption
:
{
url
:
'/packageActivity/pages/redEnvelope/index/index'
,
url
:
'/packageActivity/pages/redEnvelope/index/index'
,
type
:
1
,
type
:
1
,
options
:
{
options
:
{
activityId
:
data
.
activityId
,
activityId
:
data
.
activityId
,
merchantId
:
data
.
merchantId
merchantId
:
data
.
merchantId
,
linkId
:
res
.
id
}
}
}
}
})
})
this
.
countDown
()
this
.
countDown
()
}
// } else this.countDown()
}
else
{
}
else
{
if
(
data
.
activityType
==
2
)
{
if
(
data
.
activityType
==
2
)
{
options
.
couponId
=
data
.
activityId
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