Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
410b9271
Commit
410b9271
authored
Oct 31, 2025
by
王炽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
66666
parent
1f7c6d7e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
3 deletions
+32
-3
integral.js
api/integral.js
+6
-0
sharepage.vue
pages/invate/sharepage.vue
+18
-2
integral.js
stores/integral.js
+8
-1
No files found.
api/integral.js
View file @
410b9271
...
...
@@ -59,3 +59,9 @@ export const assistInviteJSON = (invitationCode, wxUnionId) => api.post('/c/acti
//获取邀请记录列表接口
export
const
getInvitationListJSON
=
()
=>
api
.
get
(
'/c/activity/origin_invite/invitationList'
);
//邀请绑定接口
export
const
originInviteBindJSON
=
(
unionId
,
shareCode
)
=>
api
.
post
(
'/c/api/activity/originInviteBind'
,
{
unionId
,
shareCode
});
pages/invate/sharepage.vue
View file @
410b9271
...
...
@@ -131,12 +131,30 @@ onMounted(async() => {
const
initPage
=
async
()
=>
{
// 调用邀请活动首页接口
const
integralStore
=
useIntegralStore
();
// 获取邀请码参数
const
{
inviteCode
:
ivtCode
,
unionId
:
uid
}
=
initInviteParams
();
console
.
log
(
'originInviteBind---ivtCode--sharepage:'
,
ivtCode
);
console
.
log
(
'uid--sharepage:'
,
uid
);
// 调用邀请绑定接口
if
(
ivtCode
&&
uid
)
{
try
{
const
bindRes
=
await
integralStore
.
originInviteBind
(
uid
,
ivtCode
);
console
.
log
(
'邀请绑定接口返回:'
,
bindRes
);
}
catch
(
error
)
{
console
.
error
(
'调用邀请绑定接口失败:'
,
error
);
}
}
//获取邀请码和奖励
const
res
=
await
integralStore
.
getOriginInviteHome
();
console
.
log
(
'res--sharepage:'
,
res
);
// const unionId = uni.getStorageSync('unionId');
if
(
res
.
success
){
const
unclaimedPrize
=
res
.
data
?.
unclaimedPrize
;
if
(
res
.
data
?.
notLogin
){
...
...
@@ -152,8 +170,6 @@ const initPage = async () => {
}
if
(
isLogin
.
value
)
{
// 获取邀请码参数
const
{
inviteCode
:
ivtCode
,
unionId
:
uid
}
=
initInviteParams
();
console
.
log
(
111111111111111
);
// 如果有邀请码,调用助力接口
if
(
ivtCode
&&
isLogin
.
value
)
{
...
...
stores/integral.js
View file @
410b9271
import
{
defineStore
}
from
"pinia"
;
import
{
getSigninAndTaskInfoJSON
,
checkInJSON
,
getSeckillList
,
getPointsBenefitCouponJSON
,
queryTodoResultJSON
,
getOriginInviteHomeJSON
,
assistInviteJSON
,
getInvitationListJSON
}
from
"../api/integral"
;
import
{
getSigninAndTaskInfoJSON
,
checkInJSON
,
getSeckillList
,
getPointsBenefitCouponJSON
,
queryTodoResultJSON
,
getOriginInviteHomeJSON
,
assistInviteJSON
,
getInvitationListJSON
,
originInviteBindJSON
}
from
"../api/integral"
;
import
signinAndTaskInfoMock
from
'../mock/getSigninAndTaskInMock.json'
;
import
checkInMock
from
'../mock/checkIndata.json'
;
import
pointsBenefitCouponMock
from
'../mock/pointsBenefitCoupon.json'
;
...
...
@@ -18,6 +18,7 @@ export const useIntegralStore = defineStore("integral", {
_originInviteHome
:
null
,
// 新增:存储邀请活动首页数据
_assistInviteData
:
null
,
// 新增:存储邀请助力数据
_invitationList
:
null
,
// 新增:存储邀请记录列表数据
_originInviteBindData
:
null
,
// 新增:存储邀请绑定数据
};
},
actions
:
{
...
...
@@ -123,6 +124,11 @@ export const useIntegralStore = defineStore("integral", {
return
res
;
}
},
async
originInviteBind
(
unionId
,
shareCode
,
isdebug
=
false
)
{
const
res
=
await
originInviteBindJSON
(
unionId
,
shareCode
);
this
.
_originInviteBindData
=
res
;
return
res
;
},
},
getters
:
{
signinAndTaskInfo
:
(
state
)
=>
{
return
state
.
_signinAndTaskInfo
;
},
...
...
@@ -133,5 +139,6 @@ export const useIntegralStore = defineStore("integral", {
originInviteHome
:
(
state
)
=>
{
return
state
.
_originInviteHome
;
},
assistInviteData
:
(
state
)
=>
{
return
state
.
_assistInviteData
;
},
invitationList
:
(
state
)
=>
{
return
state
.
_invitationList
;
},
originInviteBindData
:
(
state
)
=>
{
return
state
.
_originInviteBindData
;
},
},
});
\ 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