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 7210b752
authored
Sep 08, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
f98bab1d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
23 deletions
app.js
components/UserInfo/UserInfo.wxml
project.config.json
app.js
View file @
7210b75
...
@@ -3,7 +3,8 @@ import router from './router/index.js'
...
@@ -3,7 +3,8 @@ import router from './router/index.js'
import
util
from
'./utils/util.js'
import
util
from
'./utils/util.js'
import
'./utils/Track'
import
'./utils/Track'
import
{
import
{
ssoApi
ssoApi
,
wechantApi
}
from
'./api/api'
}
from
'./api/api'
App
({
App
({
onLaunch
:
function
()
{
onLaunch
:
function
()
{
...
@@ -33,27 +34,27 @@ App({
...
@@ -33,27 +34,27 @@ App({
appId
:
_this
.
globalData
.
appId
appId
:
_this
.
globalData
.
appId
}).
then
(
res
=>
{
}).
then
(
res
=>
{
wx
.
$authStatus
=
res
.
code
!=
0
wx
.
$authStatus
=
res
.
code
!=
0
if
(
returnResponse
)
{
util
.
setSessionId
(
res
.
data
.
sessionId
)
console
.
log
(
res
,
' ===='
)
const
openId
=
res
.
data
.
openId
resolve
(
res
)
wechantApi
.
getUserInfo
({
}
else
{
openId
util
.
setSessionId
(
res
.
data
.
sessionId
)
}).
then
(
result
=>
{
const
openId
=
res
.
data
.
openId
if
(
returnResponse
)
{
if
(
openId
)
{
console
.
log
(
res
,
' ===='
)
// ...
resolve
(
res
)
// wx.$util.setUserInfo(data)
}
else
{
// return
if
(
res
.
code
!=
-
1
)
{
}
if
(
res
.
code
==
0
)
{
if
(
res
.
code
!=
-
1
)
{
util
.
setUserInfo
(
res
.
data
)
if
(
res
.
code
==
0
)
{
// util.setSessionId(res.data.sessionId)
util
.
setUserInfo
(
res
.
data
)
}
else
{
// util.setSessionId(res.data.sessionId)
util
.
showToast
(
res
.
message
||
'网络异常'
)
}
else
{
}
util
.
showToast
(
res
.
message
||
'网络异常'
)
}
}
resolve
(
res
)
}
}
resolve
(
res
)
}
)
}
}).
catch
(()
=>
{
}).
catch
(()
=>
{
wx
.
$authStatus
=
true
wx
.
$authStatus
=
true
reject
()
reject
()
...
...
components/UserInfo/UserInfo.wxml
View file @
7210b75
...
@@ -30,9 +30,9 @@
...
@@ -30,9 +30,9 @@
<image class="user-bg" webp src="{{IMGURL}}home/user-bg.png" />
<image class="user-bg" webp src="{{IMGURL}}home/user-bg.png" />
</view>
</view>
<view class="btn-group">
<view class="btn-group">
<view class="phone-btn">
<view class="phone-btn"
bindtap="callPhone"
>
<image class="icon-dial" webp src="{{IMGURL}}home/icon-dial.png"></image>
<image class="icon-dial" webp src="{{IMGURL}}home/icon-dial.png"></image>
<view class="phone-text"
bindtap="callPhone"
>拨打电话</view>
<view class="phone-text">拨打电话</view>
</view>
</view>
<button class="btn-plain btn" bindtap="addPhone">保存名片</button>
<button class="btn-plain btn" bindtap="addPhone">保存名片</button>
<button class="btn-primary btn" open-type="share">分享名片</button>
<button class="btn-primary btn" open-type="share">分享名片</button>
...
...
project.config.json
View file @
7210b75
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
},
},
"compileType"
:
"miniprogram"
,
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.25.4"
,
"libVersion"
:
"2.25.4"
,
"appid"
:
"wx
c0e73a3d0afbcb06
"
,
"appid"
:
"wx
5d1208f9c8712943
"
,
"projectname"
:
"%E5%B9%BF%E8%81%94%E5%B0%8F%E7%A8%8B%E5%BA%8F%E6%A8%A1%E7%89%88"
,
"projectname"
:
"%E5%B9%BF%E8%81%94%E5%B0%8F%E7%A8%8B%E5%BA%8F%E6%A8%A1%E7%89%88"
,
"simulatorType"
:
"wechat"
,
"simulatorType"
:
"wechat"
,
"simulatorPluginLibVersion"
:
{},
"simulatorPluginLibVersion"
:
{},
...
...
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