city_card/packagecard/sharePage/sharePage.wxml
2023-07-15 14:25:28 +08:00

221 lines
18 KiB
Plaintext
Executable File

<view wx:if="{{active==0}}">
<view style="background-color:#F7F7F7;">
<view class="top-box">
<view class="card-container" style="padding-bottom:{{cardInfo.cardTemplateUseHeight/cardInfo.cardTemplateUseWidth*100+'%'}};">
<view class="card" style="padding-bottom:{{cardInfo.cardTemplateUseHeight/cardInfo.cardTemplateUseWidth*100+'%'}};">
<image alt="" class="card-bgImg" src="{{cardUrl}}{{cardInfo.cardTemplateUseBackgroundImage}}" wx:if="{{cardInfo.cardTemplateUseBackgroundImage}}"></image>
<view class="area-box" 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'}}" wx:for="{{areaList}}" wx:key="index">{{item.templateAreaFontValue}}</view>
<view data-cur="{{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.templateAreaType!='1'}}" wx:for="{{areaList}}" wx:key="index">
<image src="{{cardUrl}}{{item.templateAreaFile}}" style="width: 100%;height:100%"></image>
</view>
</view>
</view>
<view class="flex flex-direction">
<view class="mid">
<button class="mid-box" openType="share">
<image src="../../images/share-icon.png"></image>
<view class="mid-box-text">分享名片</view>
</button>
<view bindtap="includedCard" class="mid-box">
<image src="../../images/contact-icon.png"></image>
<view class="mid-box-text">加入卡包</view>
</view>
<view bindtap="showBarCode" class="mid-box">
<image src="../../images/code-icon.png"></image>
<view class="mid-box-text">名片码</view>
</view>
</view>
<view class="mid-btn">
<view bindtap="makeCall" class="mid-btn-box">
<image src="../../images/mid-btn-1.png"></image>
<view class="mid-btn-text">
<view class="text-top">电话</view>
<view class="text-bottom">{{phoneTxt}}</view>
</view>
</view>
<view bindtap="copyText" class="mid-btn-box" data-text="{{wechateTxt}}">
<image src="../../images/mid-btn-2.png"></image>
<view class="mid-btn-text">
<view class="text-top">微信</view>
<view class="text-bottom">{{wechateTxt}}</view>
</view>
</view>
<view bindtap="copyText" class="mid-btn-box" data-text="{{emailTxt}}">
<image src="../../images/mid-btn-3.png"></image>
<view class="mid-btn-text">
<view class="text-top">邮箱</view>
<view class="text-bottom">{{emailTxt}}</view>
</view>
</view>
<view bindtap="copyText" class="mid-btn-box" data-text="{{addressTxt}}">
<image src="../../images/mid-btn-4.png"></image>
<view class="mid-btn-text">
<view class="text-top">地址</view>
<view class="text-bottom">{{addressTxt}}</view>
</view>
</view>
</view>
<view class="good">
<view class="good-avatar">
<view class="avatar-list" wx:for="{{browUserList}}" wx:for-item="user" wx:key="index">
<image src="{{imgUrl}}{{user.creatorIcon}}" wx:if="{{user.creatorIcon}}"></image>
<image src="/images/ic_user_default.png" wx:if="{{!user.creatorIcon}}"></image>
</view>
</view>
<view class="good-click">
<view class="view-count">
<image mode="scaleToFill" src="/images/view-count.png"></image>
<text class="margin-left-sm text-center"> {{cardInfo.cardTemplateUseScansNumber>999?'999+':cardInfo.cardTemplateUseScansNumber}}</text>
</view>
<view class="view-count-no">
<image mode="scaleToFill" src="/images/share-count.png"></image>
<text class="margin-left-sm text-center">{{cardInfo.cardTemplateUseDispatchNumber>999?'999+':cardInfo.cardTemplateUseDispatchNumber}}</text>
</view>
</view>
</view>
<view style="background-color:#F7F7F7;" wx:if="{{dataList.length>0}}">
<view wx:for="{{dataList}}" wx:key="index">
<view class="flex flex-direction margin-sm">
<view bindtap="showMore" class="catelog-title margin-top-xs" data-idx="{{index}}" data-item="{{item}}" data-userid="{{tempUserId}}">
<view class="action">
<view class="title intro-title">
<text class="cuIcon-vipcard"></text>
<text> {{item.name}}</text>
</view>
</view>
<view class="action" wx:if="{{item.mode=='2'}}"> 更多 </view>
</view>
<view class="column-content">
<view class="column-box" wx:for="{{item.list}}" wx:for-index="idx" wx:for-item="it" wx:key="idx">
<view bindtap="showDetail" data-cid="{{item.cId}}" data-ctype="{{item.type}}" data-id="{{it.uid}}" wx:for="{{it.list}}" wx:for-index="i" wx:for-item="child" wx:key="i">
<view class="align-center" wx:if="{{child.dataType=='1'&&child.displayList}}">
<view class="bg-white">
<view class="cu-form-group">
<view class="padding-left-xs padding-right-xs margin-left-xs margin-right-xs" id="content" style="line-height:40rpx;"> {{child.value}} </view>
</view>
</view>
</view>
<view wx:if="{{child.dataType=='2'&&child.displayList}}">
<view class="cu-form-group padding-sm" wx:if="{{child.dataMode=='95bef6e2-0ab8-442f-b53d-b1f18130bae1'}}">
<view class="grid col-3 grid-square flex-sub">
<view catchtap="viewImg" class="bg-img" data-url="{{photo.path}}" wx:for="{{child.valueList}}" wx:for-item="photo" wx:key="d">
<image mode="scaleToFill" src="{{photo.path}}"></image>
</view>
</view>
</view>
<view wx:elif="{{child.dataMode=='bae3d6c1-8f6e-4e27-bba2-e42860758db7'||child.dataMode=='179441e3-5ad1-485b-b5af-421bdc383b5e'}}">
<swiper autoplay="{{child.dataMode=='179441e3-5ad1-485b-b5af-421bdc383b5e'}}" indicatorDots="{{true}}" style="width:100%;height:400rpx;margin-top:20rpx;">
<swiper-item style="width:100%;" wx:for="{{child.valueList}}" wx:for-index="pIndex" wx:for-item="photo" wx:key="pIndex">
<image mode="scaleToFill" src="{{photo.path}}" style="width:100%;border-radius:20rpx;height:400rpx;"></image>
</swiper-item>
</swiper>
</view>
<view wx:elif="{{child.dataMode=='121133b0-3596-46f4-a35f-7aaae79cf47a'}}">
<image mode="widthFix" src="{{photo.path}}" style="width:100%;border-radius:20rpx;margin-top:20rpx;" wx:for="{{child.valueList}}" wx:for-index="pIndex" wx:for-item="photo" wx:key="pIndex"></image>
</view>
</view>
<view wx:if="{{child.dataType=='4'&&child.displayList}}">
<view class="cu-form-group margin-top-sm padding-sm" style="border:1rpx solid #f9f9f9;border-radius:10rpx;">
<view class="grid col-{{count>3?count:1}} grid-square flex-sub">
<view catchtap="viewVideo" class="bg-img" data-url="{{video.path}}" style="height:280rpx;width:100%;padding-bottom:0px;" wx:for="{{child.valueList}}" wx:for-index="d" wx:for-item="video" wx:key="d">
<image mode="scaleToFill" src="{{video.imgPath}}" style="width:100%;height:100%;"></image>
<view class="{{count>3?'play-box-arrow-pos':'play-box-arrow-flex'}}">
<image mode="scaleToFill" src="/images/ic_video_play.png" style="width:32px;height:32px"></image>
</view>
</view>
</view>
</view>
</view>
<view style="width:100%;" wx:if="{{child.dataType=='3'&&child.displayList}}">
<view class="cu-form-group padding-sm">
<view class="flex align-center shadow-box margin-top-xs" style="width:100%;" wx:for="{{child.valueList}}" wx:for-index="a" wx:for-item="audio" wx:key="a">
<image mode="scaleToFill" src="/images/ic_user_default.png" style="width:80rpx;height:80rpx;"></image>
<view class="play-box">
<view class="flex justify-between align-center" style="width:80%;">
<text>{{audio.curDurationStr}}</text>
<slider activeColor="#1296db" backgroundColor="#cacaca" bindchange="slider4change" blockColor="#1296db" blockSize="14" class="flex-sub" data-a="{{a}}" data-i="{{i}}" data-idx="{{idx}}" data-index="{{index}}" data-item="{{audio}}" max="{{audio.duration}}" min="{{0}}" value="{{audio.curDuration}}"></slider>
<text>{{audio.totalDurationStr}}</text>
</view>
<view class="flex justify-between" style="width:80%;">
<image catchtap="rewind" data-a="{{a}}" data-i="{{i}}" data-idx="{{idx}}" data-index="{{index}}" data-item="{{audio}}" mode="scaleToFill" src="/images/ic_audio_rewind.png"></image>
<image catchtap="play" data-a="{{a}}" data-i="{{i}}" data-idx="{{idx}}" data-index="{{index}}" data-item="{{audio}}" mode="scaleToFill" src="{{audio.isPlay?'/images/ic_audio_playing.png':'/images/ic_audio_play.png'}}"></image>
<image catchtap="speed" data-a="{{a}}" data-i="{{i}}" data-idx="{{idx}}" data-index="{{index}}" data-item="{{audio}}" mode="scaleToFill" src="/images/ic_audio_speed.png"></image>
</view>
</view>
</view>
</view>
</view>
<view wx:if="{{child.dataType=='6'&&child.displayList}}">
<view class="padding-sm">
<view class="margin-top-xs" style="width:100%;" wx:for="{{child.valueList}}" wx:for-index="mindex" wx:for-item="m" wx:key="mindex">
<view class="flex justify-between">
<view></view>
<view></view>
</view>
<view style="border-radius:10rpx;overflow:hidden;margin-top:10rpx;">
<map enableRotate="{{false}}" enableScroll="{{false}}" enableTraffic="{{false}}" enableZoom="{{false}}" latitude="{{m.latitude}}" longitude="{{m.longitude}}" markers="{{[ {latitude:m.latitude,longitude:m.longitude} ]}}" scale="12" style="width:100%;height:300rpx;"></map>
</view>
</view>
</view>
</view>
<view wx:if="{{child.dataType=='7'&&child.displayList}}">
<view class="bg-white">
<view class="cu-form-group">
<view class="padding-left-xs padding-right-xs margin-left-xs margin-right-xs" id="content" style="line-height:40rpx;"> {{child.value}} </view>
</view>
</view>
</view>
<view wx:if="{{child.dataType=='8'&&child.displayList}}">
<view class="flex" style="flex-direction:row;">
<view class="cu-bar bg-white">
<view class="action">
<text class="cuIcon-vipcard"></text>
<text class="text-black">{{child.comment}}:</text>
<text class="margin-left-sm">{{child.selValue}}</text>
</view>
</view>
</view>
</view>
<view wx:if="{{child.dataType=='9'&&child.displayList}}">
<view class="cu-bar bg-white">
<view class="action">
<text class="cuIcon-vipcard"></text>
<text>{{child.comment}}</text>
</view>
</view>
<view class="cu-capsule radius" wx:for="{{child.dictionariesList}}" wx:for-index="ids" wx:for-item="ss" wx:key="ids">
<view class="cu-tag bg-blue radius padding-left-sm padding-right-sm" wx:if="{{ss.isSel}}"> {{ss.dataName}} </view>
</view>
</view>
</view>
<view bindtap="showDetail" data-cid="{{item.cId}}" data-ctype="{{item.type}}" data-id="{{it.uid}}" style="font-size:28rpx;text-align:right;margin-right:20rpx;color:#2b2b2b" wx:if="{{item.type=='dda5007c-5fb7-48f2-8537-3cb8ea298242'}}">详情 ></view>
</view>
</view>
</view>
</view>
</view>
<view style="margin-top:200rpx;width:100%;" wx:else>
<van-empty description="暂无数据"></van-empty>
</view>
</view>
</view>
<view bindtap="goHome" class="creat-card">
<image src="../../images/create-btn.png"></image>
</view>
</view>
<view bindtap="hideBarCode" class="bar-code" wx:if="{{isShowBarCode}}">
<view class="content">
<view class="code-title">一段话</view>
<image src="{{cardUrl}}{{cardInfo.cardTemplateUseBarcode}}"></image>
<view class="code-txt"> 有可能还会与其他内容重叠。元素的背景会延伸穿过内边距。不允许指定负边距值。 </view>
</view>
</view>
</view>
<view wx:if="{{active==1}}">
<web-view src="https://www.baidu.com" style="height:500rpx;"></web-view>
</view>
<van-tabbar active="{{active}}" bind:change="onChange" zIndex="9999">
<van-tabbar-item icon="/images/ic_card_normal.png" iconActive="/images/ic_card_sel.png">首页</van-tabbar-item>
<van-tabbar-item icon="/images/ic_serve_normal.png" iconActive="/images/ic_serve_sel.png">服务</van-tabbar-item>
</van-tabbar>