
<block wx:if="{{loding}}">
    <view class="pack-center pages-loding">
        <image src="/static/icons/loding.gif" mode="widthFix"></image>
        <view>名片加载中...</view>
    </view>
</block>

<block wx:else>
    <!-- 没找到名片 -->
    <view class="pack-center pages-hint" wx:if="{{!cardNull}}">
        <image src="/static/images/card-null.png" mode="widthFix"></image>
        <view>暂时还没有找到TA的名片</view>
        <navigator class="null-hint-nav" open-type="switchTab" url="/pages/news/index">首页</navigator>
    </view>
    <!-- 展示名片 -->
    <view wx:else>
        <!-- 编辑按钮 -->
        <block wx:if="{{isOwner}}">
            <view class="card-ste" bindtap="cardSte">
                <image class="card-ste-icon" src="/static/icons/card_set.png"></image>
                <view class="card-ste-text">设置</view>
            </view>
        </block>
        <block wx:else>
            <view class="card-ste" bindtap="cardLike" wx:if="{{!isFavorite}}">
                <image class="card-ste-icon" src="/static/icons/favorite_icon.png"></image>
                <view class="card-ste-text">收藏</view>
            </view>
        </block>

        <!-- 名片信息 -->
        <view class="card">
            <card
                card-info="{{cardInfo}}"
                card-cover="{{cardBase.cover.showpath}}"
            ></card>
            <!-- 名片工具栏 -->
            <view class="card-tool" wx:if="{{!isOwner}}">
                <button class="card-tool-item" size="mini" open-type="share">分享名片</button>
                <button class="card-tool-item" size="mini" bindtap="addPhoneBook">存入通讯录</button>
            </view>
            <view class="card-tool" wx:else>
                <button class="card-tool-item" size="mini" open-type="share">分享名片</button>
            </view>
            <!-- 名片信息 -->
            <view class="card-scrool-info">
                <image class="card-scrool-code" bindtap="codeNav" src="/static/images/card_code.png" mode="heightFix"></image>
                <scroll-view class="card-scrool" scroll-x>
                    <view class="card-scrool-item" wx:if="{{cardBase.mobile != ''}}" bindtap="cardScroolNav" data-type="phone" data-info="{{cardBase.mobile}}">
                        <view class="card-scrool-title"><image src="/static/icons/card_scrool_icon_00.png"></image>拨打电话</view>
                        <view class="card-scrool-text">{{cardBase.mobile}}</view>
                    </view>
                    <view class="card-scrool-item" wx:if="{{cardBase.wechat != ''}}" bindtap="cardScroolNav" data-type="wechat" data-info="{{cardBase.wechat}}">
                        <view class="card-scrool-title"><image src="/static/icons/card_scrool_icon_01.png"></image>微信号</view>
                        <view class="card-scrool-text">{{cardBase.wechat}}</view>
                    </view>
                    <view class="card-scrool-item" wx:if="{{cardBase.email != ''}}" bindtap="cardScroolNav" data-type="email" data-info="{{cardBase.email}}">
                        <view class="card-scrool-title"><image src="/static/icons/card_scrool_icon_02.png"></image>电子邮箱</view>
                        <view class="card-scrool-text">{{cardBase.email}}</view>
                    </view>
                    <view class="card-scrool-item" wx:if="{{cardBase.address != ''}}" bindtap="cardScroolNav" data-type="address" data-info="{{cardBase.address}}">
                        <view class="card-scrool-title"><image src="/static/icons/card_scrool_icon_03.png"></image>联系地址</view>
                        <view class="card-scrool-text">{{cardBase.address}}</view>
                    </view>
                </scroll-view>
            </view>
        </view>

        <!-- 展示模块 -->
        <view class="models" wx:for="{{models}}" wx:key="models" wx:for-item="models" wx:if="{{models.is_show}}">
            <view class="models-title">{{models.title}}</view>
            <individual wx:if="{{models.name == 'individual'}}" individual-text="{{models.data}}"></individual>
            <enterprise wx:elif="{{models.name == 'enterprise'}}" enterprise-info="{{models.data}}"></enterprise>
            <colleagues wx:elif="{{models.name == 'colleagues'}}" colleagues-list="{{models.data}}" bindchangecard="changeCard"></colleagues>
            <dynamics wx:elif="{{models.name == 'dynamics'}}" dynamic-list="{{models.dynamics}}" bindchangedynamics="changedynamics"></dynamics>
            <photo wx:elif="{{models.name == 'photos'}}" photos="{{models.photos}}"></photo>
            <goods wx:elif="{{models.name == 'goods'}}" goods="{{models.goods}}" bindchangegood="changeGood"></goods>
        </view>
    </view>
</block>
