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 ea35192c
authored
Sep 07, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改
1 parent
eb45aed8
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
4 deletions
api/environment.js
api/wechantApi.js
components/UserInfo/UserInfo.js
components/UserInfo/UserInfo.wxml
mixins/menuMixin.js
pages/tab/index/index.wxml
api/environment.js
View file @
ea35192
...
@@ -43,6 +43,7 @@ const domain = {
...
@@ -43,6 +43,7 @@ const domain = {
const
pathEnum
=
{
const
pathEnum
=
{
sso
:
'/rop-scrm-sso/'
,
sso
:
'/rop-scrm-sso/'
,
wechant
:
'rop-scrm-wechant'
}
}
module
.
exports
=
{
module
.
exports
=
{
index
,
index
,
...
...
api/wechantApi.js
0 → 100644
View file @
ea35192
import
api
from
'./request'
const
path
=
'scrm.api.wechat.'
module
.
exports
=
{
/**根据openId获取用户信息 */
getUserInfo
(
data
)
{
return
api
.
post
({
method
:
`
${
path
}
auth.userProfile.getUserInfo`
,
...
data
},
true
)
},
}
components/UserInfo/UserInfo.js
View file @
ea35192
...
@@ -20,6 +20,7 @@ Component({
...
@@ -20,6 +20,7 @@ Component({
* 组件的方法列表
* 组件的方法列表
*/
*/
methods
:
{
methods
:
{
// 添加微信
addWechat
()
{
addWechat
()
{
console
.
log
(
112
,
this
.
data
.
showWechant
)
console
.
log
(
112
,
this
.
data
.
showWechant
)
this
.
setData
({
this
.
setData
({
...
@@ -27,6 +28,7 @@ Component({
...
@@ -27,6 +28,7 @@ Component({
})
})
console
.
log
(
this
.
data
.
showWechant
)
console
.
log
(
this
.
data
.
showWechant
)
},
},
// 保存名片
addPhone
()
{
addPhone
()
{
let
_this
=
this
,
let
_this
=
this
,
{
{
...
@@ -53,7 +55,8 @@ Component({
...
@@ -53,7 +55,8 @@ Component({
}
}
})
})
},
},
/**授权位置成功 */
/**授权通讯录成功 */
authSuccess
()
{
authSuccess
()
{
this
.
setData
({
this
.
setData
({
flag
:
true
,
flag
:
true
,
...
@@ -68,5 +71,11 @@ Component({
...
@@ -68,5 +71,11 @@ Component({
flag
:
true
flag
:
true
})
})
},
},
/** 拨打电话 */
callPhone
()
{
wx
.
makePhoneCall
({
phoneNumber
:
'18925261040'
,
})
}
}
}
})
})
\ No newline at end of file
\ No newline at end of file
components/UserInfo/UserInfo.wxml
View file @
ea35192
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<view class="btn-group">
<view class="btn-group">
<view class="phone-btn">
<view class="phone-btn">
<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">拨打电话</view>
<view class="phone-text"
bindtap="callPhone"
>拨打电话</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>
...
...
mixins/menuMixin.js
View file @
ea35192
...
@@ -12,7 +12,7 @@ module.exports = Behavior({
...
@@ -12,7 +12,7 @@ module.exports = Behavior({
const
curIntroduceIndex
=
e
.
currentTarget
.
dataset
.
index
;
const
curIntroduceIndex
=
e
.
currentTarget
.
dataset
.
index
;
switch
(
curIntroduceIndex
)
{
switch
(
curIntroduceIndex
)
{
case
3
:
case
3
:
wx
.
$router
.
go
(
'
pages.
addTransform'
);
wx
.
$router
.
go
(
'addTransform'
);
break
break
default
:
default
:
this
.
setData
({
this
.
setData
({
...
...
pages/tab/index/index.wxml
View file @
ea35192
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
</block>
</block>
</view>
</view>
<
!-- <view wx:if="{{!hasUserInfo}}" class="user-profile" bindtap="getUserProfile"></view> --
>
<
view wx:if="{{!hasUserInfo}}" class="user-profile" bindtap="getUserProfile"></view
>
<!-- 服务咨询 -->
<!-- 服务咨询 -->
<view bindtap="goConsult">
<view bindtap="goConsult">
<image mode="widthFix" class="icon-consult" webp src="{{IMGURL}}home/custom.png"></image>
<image mode="widthFix" class="icon-consult" webp src="{{IMGURL}}home/custom.png"></image>
...
...
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