card-mini/pages/mine/myCardDetail/myCardDetail.wxml
2021-07-20 16:39:27 +08:00

70 lines
4.8 KiB
Plaintext

<cu-custom isCustom="{{false}}" isBack="{{true}}">
<view slot="content">名片</view>
</cu-custom>
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" wx:if="{{bindPhone == '0'}}">获取手机号</button>
<view class="card"
style="padding-bottom:{{(cardInfo.cardTemplateUseHeight / cardInfo.cardTemplateUseWidth) *100 +'%'}};">
<!-- 背景图 -->
<image src="{{cardUrl}}{{cardInfo.cardTemplateUseBackgroundImage}}" alt="" class="card-bgImg"
wx:if="{{cardInfo.cardTemplateUseBackgroundImage}}"></image>
<!-- 文字 -->
<view class="area-box" wx:for="{{areaList}}" data-cur="{{index}}" bindtap="giveFocus" wx:key="index"
style="position:absolute;top: {{(item.templateAreaTop / cardInfo.cardTemplateUseHeight) * 100 + '%'}};left:{{(item.templateAreaLeft / cardInfo.cardTemplateUseWidth) * 100 + '%'}};color:{{item.templateAreaFontColor}};width:{{(item.templateAreaWidth / cardInfo.cardTemplateUseWidth) * 100 + '%'}};height:{{(item.templateAreaHeight / cardInfo.cardTemplateUseHeight) * 100 + '%'}};font-size:{{item.templateAreaFontSize}};font-style:{{item.templateAreaFontStyle}};font-weight:{{item.templateAreaFontBold}};text-align:{{item.templateAreaFontCenter}}"
wx:if="{{item.templateAreaServerLink == '1'}}">
{{item.templateAreaFontValue}}
</view>
<!-- 图片 -->
<view wx:for="{{areaList}}" data-cur="{{index}}" bindtap="choosePhoto" wx:key="index"
style="position:absolute;top: {{(item.templateAreaTop / cardInfo.cardTemplateUseHeight) * 100 + '%'}};left:{{(item.templateAreaLeft / cardInfo.cardTemplateUseWidth) * 100 + '%'}};color:{{item.templateAreaFontColor}};width:{{(item.templateAreaWidth / cardInfo.cardTemplateUseWidth) * 100 + '%'}};height:{{(item.templateAreaHeight / cardInfo.cardTemplateUseHeight) * 100 + '%'}}"
wx:if="{{item.templateAreaServerLink == '2'}}">
<image src="{{cardUrl}}{{item.templateAreaFile}}" style="width: 100%;height:100%"></image>
</view>
<!-- 其他 -->
<view class="area-box" wx:for="{{areaList}}" data-cur="{{index}}" wx:key="index" bindtap="giveFocus"
style="position:absolute;top: {{(item.templateAreaTop / cardInfo.cardTemplateUseHeight) * 100 + '%'}};left:{{(item.templateAreaLeft / cardInfo.cardTemplateUseWidth) * 100 + '%'}};color:{{item.templateAreaFontColor}};width:{{(item.templateAreaWidth / cardInfo.cardTemplateUseWidth) * 100 + '%'}};height:{{(item.templateAreaHeight / cardInfo.cardTemplateUseHeight) * 100 + '%'}}"
wx:if="{{item.templateAreaServerLink != '1' && item.templateAreaServerLink != '2'}}">
<text wx:if="{{!item.templateAreaFile}}">{{item.templateAreaFontValue}}</text>
<image src="{{cardUrl}}{{item.templateAreaFile}}" wx:else></image>
<!-- <image src="{{cardUrl}}{{item.templateAreaFile}}" style="width: 100%;height:100%"></image> -->
</view>
</view>
<view class="card-title">适用行业:{{cardInfo.templateIndustryName}}</view>
<view class="card-info">
<view class="edit-card">
<view class="row" wx:for="{{areaList}}" wx:key="index"
wx:if="{{item.templateAreaServerLink != '2' && item.templateAreaType != '1'}}">
<view class="item-title">{{item.templateAreaName}}:</view>
<view class="item-input">
<input type="text" placeholder="请输入内容,最多{{item.templateAreaFontLength}}个字" bindinput="editInfo" data-num="{{index}}" bindblur="getFileId"
value="{{item.templateAreaFontValue}}" focus="{{item.focus}}"
wx:if="{{item.templateAreaServerLink != '1'}}" maxlength="{{item.templateAreaFontLength}}"></input>
<input type="text" placeholder="请输入内容,最多{{item.templateAreaFontLength}}个字" bindinput="editInfo" data-num="{{index}}"
value="{{item.templateAreaFontValue}}" focus="{{item.focus}}" maxlength="{{item.templateAreaFontLength}}" wx:else></input>
</view>
</view>
<view class="row" wx:for="{{areaList}}" wx:key="index"
wx:if="{{item.templateAreaServerLink == '2' && item.templateAreaType != '1'}}">
<view class="item-title">{{item.templateAreaName}}:</view>
<view class="item-input" bindtap="choosePhoto" data-cur="{{index}}">
<image src="{{cardUrl}}{{item.templateAreaFile}}" mode="widthFix"></image>
<text class="cuIcon-cameraadd"></text>
</view>
</view>
<!-- <view class="row" wx:for="{{areaList}}" wx:key="index" wx:if="{{item.templateAreaType == '9'}}">
<view class="item-title">二维码:</view>
<view class="item-input item-code-input" bindtap="choosePhoto" data-cur="{{index}}">
<image src="{{cardUrl}}route/file/download/true/{{item.templateAreaTitle}}"></image>
点击修改
</view>
</view> -->
</view>
</view>
<view class="share">
<view class="btn" bindtap="updateCard">修改</view>
<view class="btn" bindtap="setDefaultCard">置顶</view>
<view class="btn" bindtap="deleteCard">删除</view>
<!-- <button open-type="share">分享转发</button> -->
</view>