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
61d2afe5
Commit
61d2afe5
authored
Sep 12, 2025
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed
parent
ccc1dd89
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
16 deletions
+26
-16
act0915.vue
activity0915/act0915/act0915.vue
+15
-6
request.js
api/request.js
+2
-2
user.js
stores/user.js
+9
-8
No files found.
activity0915/act0915/act0915.vue
View file @
61d2afe5
...
...
@@ -175,7 +175,7 @@ const bannerList = ref([]) // Banner列表
const
loading
=
ref
(
true
)
// 加载状态
// 邀请相关数据
const
showMask
=
ref
(
fals
e
);
const
showMask
=
ref
(
tru
e
);
const
showDrawSucModal
=
ref
(
false
);
const
currentAwardName
=
ref
(
''
);
const
currentAwardImageUrl
=
ref
(
''
);
...
...
@@ -384,6 +384,7 @@ const fetchAct915HomeData = async () => {
console.log('检测到邀请码:', incomingCode)
// 根据登录状态决定助力处理方式
if (isLogin.value) {
showMask.value = false
// 已登录用户直接调用助力接口
console.log('用户已登录,直接调用助力接口')
await handleInvitationAssist(incomingCode);
...
...
@@ -401,6 +402,7 @@ const fetchAct915HomeData = async () => {
}
if (isLogin.value) {
console.warn('isLogin.value', isLogin.value)
showMask.value = false
}
}
...
...
@@ -721,26 +723,33 @@ onMounted(async () => {
// Phone authorization
const onGetPhoneNumber = async (e) => {
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
const options = currentPage.options;
const incomingCode = options.invitationCode;
if (e.detail.errMsg === 'getPhoneNumber:ok') {
try {
// console.warn('onGetPhoneNumber', e.detail)
// 隐藏授权弹窗
showMask.value = false;
userStore.phoneCallback(e.detail, null, null, async () => {
showMask.value = false;
// 重新获取用户信息(登录后)
await fetchAct915HomeData();
console.warn('授权后重新获取用户信息')
// 检查是否有邀请码需要处理助力
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
const options = currentPage.options;
const incomingCode = options.invitationCode;
if (incomingCode) {
// 使用统一的助力处理函数
await handleInvitationAssist(incomingCode);
}
}, {
wxLoginBusinessDTO: {
activityUserInvite915Code: incomingCode
}
})
} catch (error) {
console.error('授权后处理失败:', error)
...
...
api/request.js
View file @
61d2afe5
...
...
@@ -16,8 +16,8 @@ const {
// request.js
// 通常可以吧 baseUrl 单独放在一个 js 文件了
// const baseUrl = "http://172.16.230.108:7777/pmall";
//
const baseUrl = "https://momclub-uat.feihe.com/pmall";//测试环境
let
baseUrl
=
"https://momclub.feihe.com/pmall"
;
//生产环境
const
baseUrl
=
"https://momclub-uat.feihe.com/pmall"
;
//测试环境
//
let baseUrl = "https://momclub.feihe.com/pmall";//生产环境
// const baseUrl = "https://docs.dui88.com/mock/1956/api";//mock
// const baseUrl = "https://feihe.m.duibatest.com.cn/pmall"
...
...
stores/user.js
View file @
61d2afe5
...
...
@@ -71,13 +71,13 @@ export const useUserStore = defineStore("userInfo", {
* @param {Object} data : {encryptedData, iv, code}
* @returns
*/
async
phoneCallback
(
data
,
onOpenRegisterFn
=
()
=>
{
},
cb
,
cb2
)
{
async
phoneCallback
(
data
,
onOpenRegisterFn
=
()
=>
{
},
cb
=
null
,
cb2
=
null
,
invitationInfo
=
null
)
{
uni
.
login
({
provider
:
"weixin"
,
success
:
async
(
res
)
=>
{
// console.log('wxAutoLogin', res);
if
(
res
.
errMsg
===
"login:ok"
)
{
// 用户手机授权
// 用户手机授权
F
const
{
data
:
babyExistence
}
=
await
fetchAutoPhone
({
...
...
@@ -85,6 +85,7 @@ export const useUserStore = defineStore("userInfo", {
phoneIv
:
data
.
iv
,
code
:
data
.
code
,
codeLogin
:
res
.
code
,
...
invitationInfo
,
});
!
babyExistence
&&
onOpenRegisterFn
&&
onOpenRegisterFn
();
...
...
@@ -311,12 +312,12 @@ export const useUserStore = defineStore("userInfo", {
},
/**
*
* @param {sy使用}
* @returns
*/
async
normalAutoLogin
(
cb
=
null
)
{
/**
*
* @param {sy使用}
* @returns
*/
async
normalAutoLogin
(
cb
=
null
)
{
uni
.
login
({
provider
:
"weixin"
,
success
:
async
(
res
)
=>
{
...
...
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