拨号api

This commit is contained in:
jqtmviyu@gmail.com 2021-03-05 22:32:07 +08:00
parent ea33ee8b36
commit aa8b768eb6

View File

@ -3,12 +3,29 @@
<view class="user">
<!-- 1. 已登录 -->
<block v-if="userInfo.nickName">
<image class="user_avatar_bg" :src="userInfo.avatarUrl" mode="aspectFill"></image>
<u-avatar :src="userInfo.avatarUrl" mode="circle" :sex-icon="userInfo.gender===1? 'man' : 'woman'" show-sex="true" size="large" show-level="true" level-icon="level"></u-avatar>
<image
class="user_avatar_bg"
:src="userInfo.avatarUrl"
mode="aspectFill"
></image>
<u-avatar
:src="userInfo.avatarUrl"
mode="circle"
:sex-icon="userInfo.gender===1? 'man' : 'woman'"
show-sex="true"
size="large"
show-level="true"
level-icon="level"
></u-avatar>
<text class="user_nickName">{{userInfo.nickName}}</text>
</block>
<!-- 2. 未登录 -->
<button v-else open-type="getUserInfo" @getuserinfo="getUserInfo" class="user_btn">去登录</button>
<button
v-else
open-type="getUserInfo"
@getuserinfo="getUserInfo"
class="user_btn"
>去登录</button>
</view>
<!-- 3 菜单:宫格布局 -->
@ -59,6 +76,7 @@
icon="server-man"
title="联系客服"
value="400-618-40000"
@click="phoneCall"
></u-cell-item>
<u-cell-item
icon="integral-fill"
@ -83,6 +101,11 @@ export default {
getUserInfo({detail: {userInfo}}){
this.userInfo = userInfo
uni.setStorageSync("userInfo",userInfo)
},
phoneCall(){
uni.makePhoneCall({
phoneNumber: '114'
})
}
},
}