yuminge-app/yun-min-program-plugin-master/packageH/article/periodicalWatch/periodicalWatch.wxml

141 lines
5.9 KiB
Plaintext

<!--packageH/article/periodicalWatch/periodicalWatch.wxml-->
<wxs module="util">
// var asinfo = function (str) {
// if(str){
// return str.replace(getRegExp('class="bjh=p" ','g'),'')
// }
// }
var inOf = function (str) {
if (str) {
// var strin = asinfo(str)
return str.replace(getRegExp('<img ', 'g'), '<img style="width:100%;height:auto;"')
}
};
module.exports.inOf = inOf;
</wxs>
<view class="periodicalWatch">
<!-- data-ind="{{ind}}}" bindtouchstart="touchstart" bindtouchend="touchend" -->
<swiper style="height:{{heightTop}}" bindchange="bindchangeTap" circular="{{false}}" current="{{ind}}">
<block wx:for="{{article_data}}" wx:key=' index'>
<swiper-item>
<view class="articleBox">
<view class="head">
<view class="headLeft">
<view class="title">{{ item.has_one_article.title }}</view>
<view class="titleLis">P{{index + 1}}</view>
</view>
<!-- <view class="headRight">
<image src="{{item.has_one_article.article_logo}}"></image>
</view> -->
</view>
<view class="contenBox">
<!-- <rich-text
nodes="<div style='overflow:hidden;width:100%;white-space:normal;'>{{util.inOf(item.has_one_article.content)}}</div>">
</rich-text> -->
<mp-html content="{{item.has_one_article.content}}"></mp-html>
<!-- <div style="overflow:hidden;width:100%;white-space:pre-wrap;"></div> -->
</view>
<view class='article' wx:if="{{item.has_one_article.advs_type != 0}}" bindtap='toAdv' data-link="{{item.has_one_article.advs_link}}">
<view>
<text class='head-title'>{{item.has_one_article.advs_title}}</text>
</view>
<view wx:if="{{item.has_one_article.advs_img}}">
<image class='thumb' src="{{item.has_one_article.advs_img}}" mode="widthFix"></image>
</view>
<view>
<text class='info'>{{item.has_one_article.advs_title_footer}}</text>
</view>
</view>
<view class="service" catchtap="severShowTap">
<icon class="iconfont icon-member_kefu"></icon>
客服
</view>
<view class="previous">
<view class="txt">往期杂志</view>
<view class="previousLis" wx:for="{{before_journal}}" wx:key='index' catchtap="tapLIst"
data-id="{{item.id}}">
{{item.title}}</view>
<view class="tapLoad" wx:if="{{loading}}" catchtap="taploadMore">
加载更多
<icon class="iconfont icon-member-bottom"></icon>
</view>
</view>
</view>
</swiper-item>
</block>
</swiper>
<view class="pos">
<view class="circle" catchtap="toGoBtn" data-key="home">
<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/images/periodical/home.png"></image>
</view>
<view class="circle" catchtap="toGoBtn" data-key="list">
<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/images/periodical/list.png"></image>
</view>
<view class="circle" catchtap="shareTap">
<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/images/periodical/share.png"></image>
</view>
</view>
<van-popup show="{{show}}" position="bottom" overlay="{{true}}">
<view class="shareBox">
<view class="shareTop">
<view class="share">
<view class="sharePos">
<button open-type="share"></button>
</view>
<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/images/periodical/shareFir.png"></image>
<view class="span">微信好友</view>
</view>
<view class="share" catchtap="getPoste">
<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/images/periodical/poster.png"></image>
<view class="span">生成海报</view>
</view>
</view>
<view style="width: 100%; height: 0.28rem; background: transparent;"></view>
<view class="cancel" catchtap="shareTapCancel">取消</view>
</view>
</van-popup>
</view>
<van-popup custom-style="border-radius: 38rpx;" show="{{severShow}}" overlay="{{true}}">
<view class="pop-content">
<view class="pop-top" style="justify-content: {{code==1?'space-between':'center'}};">
<view class="left">
<view class="wrap">
<view>
<view class="image" style="postion:relative">
<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/kf_online_contect@2x.png"></image>
</view>
<view>在线联系</view>
<button open-type="contact" bindcontact="handleContact"
style="postion:absolute;width:100%;height:80rpx;opacity:0;top:-140rpx;"></button>
</view>
</view>
</view>
<view style="display:flex;" wx:if="{{service_mobile}}">
<view class="line"></view>
</view>
<view class="right" wx:if="{{!service_mobile==''}}">
<view class="wrap" bindtap="callPhone">
<view>
<view class="image">
<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/kf_tel_contect@2x.png"></image>
</view>
<view>联系电话</view>
<view style="margin-top:16rpx">{{service_mobile}}</view>
</view>
</view>
</view>
</view>
<view class="pop-bottom" wx:if="{{!service_QRcode==''}}">
<view class="image">
<image src="{{service_QRcode}}" show-menu-by-longpress></image>
</view>
</view>
<icon class="iconfont icon-close11" catchtap="closePop"></icon>
</view>
</van-popup>
<van-popup show="{{postShow}}" custom-style="width: 640rpx;" round bind:close="onClose">
<div class="postBox">
<image src="{{posterImg}}" catchtap="checkImg" mode="widthFix"></image>
</div>
</van-popup>