<view class="jishiqi" v-if="!Newtata">
<image src="../../../static/center/hehehe.gif"></image>
</view>
hehehe.gif
设置的倒计时
想让他离开当前页面停止计时,结束此任务
setTimeoutDiy: setTimeout(() => {
this.Newtata = true;
this.NewTask()
}, 28000), //28S
生命周期中
if (this.setTimeoutDiy) {
clearTimeout(this.setTimeoutDiy);
this.setTimeoutDiy = null;
}
接口拿到的文档,,放到视图view中
若是使用直接封装好的方法
<!-- content -->
<view class="sh-sh-rich text-indent">
<view v-html="content"></view>
<!-- <rich-text :nodes="content"></rich-text> -->
</view>
<!--
浏览器视屏
-可以播放视屏
只是没有办法显示计时器
直接跳转的链接进入新闻页
<view class="">
<web-view :src="url"></web-view>
</view> -->```
const regex = new RegExp('<img', 'gi');
that.content = item.content.replace(regex, <img style="width: 100%;height:400upx border-radius: 8Px;margin-left: -12%;"
);
// 控制内容图片 防止脱离文档流
// that.content = item.content
// .replace(/<img([\s\w"-=/.:;]+)((?:(height="[^"]+")))/ig, '<img1')
// .replace(/<img([\s\w"-=/.:;]+)((?:(style="[^"]+")))/ig, '<img1')
// .replace(/<img([\s\w"-=/.:;]+)/ig,
// '<img$1 style="width: 100%;height:400upx border-radius: 8Px;margin-left: -12%;"');