|
|
- <template>
- <view class="head">
- <view class="headImage">
- <image :src="image" mode=""></image>
- </view>
- <view class="info">
- <view class="name">
- {{ name }}
- </view>
- <view class="tips">
- {{ tips }}
- </view>
- </view>
- <view class="right">
- <view class="phone"
- @click="callPhone">
- <image src="/static/image/home/phone.png" mode=""></image>
- {{ phone }}
- </view>
- </view>
- </view>
- </template>
-
- <script>
- export default {
- props : {
- name : {
- default : '倾心.'
- },
- tips : {
- default : '手机号:1300000000'
- },
- phone : {
- default : '联系老板'
- },
- image : {
- default : '/static/image/center/headImage.png'
- },
- phoneCall : {
-
- }
- },
- data() {
- return {
-
- }
- },
- methods: {
- callPhone(){
- uni.makePhoneCall({
- phoneNumber: this.phoneCall,
- success() {
- console.log('安卓拨打成功');
- },
- fail() {
- console.log('安卓拨打失败');
- }
- })
- },
- }
- }
- </script>
-
- <style scoped lang="scss">
- .head {
- display: flex;
- align-items: center;
- position: relative;
-
- image {
- width: 100%;
- height: 100%;
- }
-
- .headImage {
- width: 80rpx;
- height: 80rpx;
- background-size: 100% 100%;
- overflow: hidden;
- border-radius: 50%;
- margin-right: 40rpx;
- }
-
- .info {
- font-size: 28rpx;
-
- .name {
- font-size: 32rpx;
- display: flex;
- padding-bottom: 10rpx;
-
- view {
- display: flex;
- font-size: 20rpx;
- align-items: center;
- padding-left: 20rpx;
- }
- }
-
- .tips {
- font-size: 26rpx;
- }
- }
- .right{
- margin-left: auto;
- .phone{
- background-color: rgba($uni-color, 0.2);
- color: $uni-color;
- padding: 8rpx 16rpx;
- border-radius: 10rpx;
- image{
- width: 24rpx;
- height: 24rpx;
- }
- }
- }
- }
- </style>
|