Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
ai-card
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 a897bff2
authored
Sep 09, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改
1 parent
1ae7e4b6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
17 deletions
components/PhoneNumber/PhoneNumber.js
pages/tab/index/index.js
pages/template/menu/menu.wxml
components/PhoneNumber/PhoneNumber.js
View file @
a897bff
...
@@ -19,12 +19,9 @@ Component({
...
@@ -19,12 +19,9 @@ Component({
methods
:
{
methods
:
{
// 获取手机号
// 获取手机号
getPhoneNumber
({
detail
})
{
getPhoneNumber
({
detail
})
{
console
.
log
(
detail
);
getApp
()
getApp
()
.
login
(
true
)
.
login
(
true
)
.
then
(({
data
})
=>
{
.
then
(({
data
})
=>
{
console
.
log
(
data
,
"----------"
);
// wx.$util.setSessionId(data.sessionId)
if
(
if
(
detail
.
errMsg
&&
detail
.
errMsg
&&
detail
.
errMsg
==
"getPhoneNumber:fail user deny"
detail
.
errMsg
==
"getPhoneNumber:fail user deny"
...
@@ -33,15 +30,19 @@ Component({
...
@@ -33,15 +30,19 @@ Component({
}
}
delete
detail
.
errMsg
;
delete
detail
.
errMsg
;
if
(
detail
.
iv
&&
detail
.
encryptedData
)
{
if
(
detail
.
iv
&&
detail
.
encryptedData
)
{
console
.
log
(
"1111"
);
ssoApi
.
authUserPhone
(
detail
).
then
(({
data
,
code
,
message
})
=>
{
detail
.
sessionId
=
data
.
sessionId
;
if
(
code
==
0
)
{
console
.
log
(
detail
);
wx
.
$util
.
setUserInfo
(
data
);
ssoApi
.
authUserPhone
(
detail
).
then
(({
data
,
code
})
=>
{
wx
.
$util
.
setSessionId
(
data
.
sessionId
);
console
.
log
(
data
);
// 其他操作
wx
.
$util
.
setUserInfo
(
data
);
this
.
triggerEvent
(
"getPhoneNumber"
);
wx
.
$util
.
setSessionId
(
data
.
sessionId
);
}
else
{
// 其他操作
wx
.
showToast
({
this
.
triggerEvent
(
"getPhoneNumber"
);
title
:
message
,
icon
:
'none'
,
duration
:
2000
})
}
});
});
}
}
});
});
...
...
pages/tab/index/index.js
View file @
a897bff
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2022-08-30 11:26:21
* @Date: 2022-08-30 11:26:21
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2022-09-09
09:57:16
* @LastEditTime: 2022-09-09
14:41:59
*/
*/
// pages/tab/index/index.js
// pages/tab/index/index.js
import
{
menuMixin
}
from
"../../../mixins/index"
;
import
{
menuMixin
}
from
"../../../mixins/index"
;
...
@@ -85,7 +85,6 @@ Page({
...
@@ -85,7 +85,6 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
console
.
log
(
this
.
data
.
hasUserInfo
);
wx
.
$util
.
showLoading
(
'加载中...'
)
wx
.
$util
.
showLoading
(
'加载中...'
)
getApp
()
getApp
()
.
login
()
.
login
()
...
@@ -112,8 +111,8 @@ Page({
...
@@ -112,8 +111,8 @@ Page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
()
{
onShow
()
{
console
.
log
(
wx
.
$trackData
,
wx
.
get
Launch
OptionsSync
())
console
.
log
(
wx
.
$trackData
,
wx
.
get
Enter
OptionsSync
())
const
options
=
wx
.
get
Launch
OptionsSync
()
const
options
=
wx
.
get
Enter
OptionsSync
()
wx
.
$trackData
=
options
.
query
wx
.
$trackData
=
options
.
query
console
.
log
(
options
.
query
,
'--------------'
)
console
.
log
(
options
.
query
,
'--------------'
)
if
(
wx
.
$trackData
.
merchant
)
{
if
(
wx
.
$trackData
.
merchant
)
{
...
...
pages/template/menu/menu.wxml
View file @
a897bff
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
</view>
</view>
</block>
</block>
</view>
</view>
<view>
<view
class="isFullSucreen"
>
<block wx:if="{{curIntroduceIndex === 0}}">
<block wx:if="{{curIntroduceIndex === 0}}">
<template is="cube" data="{{IMGURL, hasPhoneNumber}}"></template>
<template is="cube" data="{{IMGURL, hasPhoneNumber}}"></template>
</block>
</block>
...
...
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