123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471 |
- <template>
- <view class="container">
- <!--header-->
- <view class="tui-header-box" :style="{ height: height + 'px', background: '#C74547', color:'#ffffff'}">
- <view class="tui-header" :style="{ paddingTop: top + 'px', opacity: 1.024 }">资讯</view>
- <view class="tui-header-icon-left" :style="{ marginTop: top + 'px' }">
- <view class="tui-icon-box" :style="{ backgroundColor: 'rgba(0, 0, 0, 0)' }" @tap="back">
- <tui-icon name="arrowleft" :size="30" :color="opcity >= 1 ? '#fff' : '#fff'"></tui-icon>
- </view>
- </view>
-
- <view class="tui-header-icon-right" :style="{ marginTop: top + 'px' }">
- <view class="tui-icon-box tui-icon-ml" :style="{backgroundColor: 'rgba(0, 0, 0, 0)'}" @click="popup">
- <tui-icon name="share" :size="20" :color="opcity >= 1 ? '#fff' : '#fff'"></tui-icon>
- </view>
- </view>
- </view>
- <!--header-->
-
- <view class="tui-center" :style="{ marginTop: height + 'px' }">
- <view class="tui-pro-time" style="width: 100%;padding: 10px 0;">
- <text style="float: left;margin-left: 50px;">2020.7.29</text>
- <text style="float: right;margin-right: 50px;">229 人看过</text>
- </view>
- <view class="tui-pro-content">
- <view class="tui-pro-tit">【本溪历史的今天】7月29日</view>
- <view>
- <view class="tui-pro-price">
- <text class="tui-sale-price">我们每天都会这样子复制粘贴然后进行测</br>试看看字符是不是够用会不会撑开我们每天都会这样子复制粘贴然后进行测</text>
- </view>
- </view>
- </view>
-
- </view>
-
- <!--底部分享弹窗-->
- <tui-bottom-popup :show="popupShow" @close="popup">
- <view class="tui-share">
- <view class="tui-share-title">分享到</view>
- <scroll-view scroll-x style="padding-right:20rpx">
- <view class="tui-share-top">
- <view class="tui-share-item" :class="[shareList[0].share.length-1===index?'tui-item-last':'']" v-for="(item,index) in shareList[0].share"
- :key="index" @tap="popup">
- <view class="tui-share-icon" hover-class="tui-hover" :hover-stay-time="150">
- <tui-icon :name="item.icon" :color="item.color" :size="item.size?item.size:36"></tui-icon>
- </view>
- <view class="tui-share-text">{{item.name}}</view>
- </view>
- <view class="tui-empty">!</view>
- </view>
-
- </scroll-view>
-
- <scroll-view scroll-x class="tui-mt">
- <view class="tui-share-bottom">
- <view class="tui-share-item" :class="[shareList[1].operate.length-1===index?'tui-item-last':'']" v-for="(item,index) in shareList[1].operate"
- :key="index" @tap="popup">
- <view class="tui-share-icon" hover-class="tui-hover" :hover-stay-time="150">
- <tui-icon :name="item.icon" color="#404040" :size="item.size" :bold="index===2"></tui-icon>
- </view>
- <view class="tui-share-text">{{item.name}}</view>
- </view>
- </view>
-
- </scroll-view>
- <view class="tui-btn-cancle" @tap="popup">取消</view>
- </view>
- </tui-bottom-popup>
- <!--底部分享弹窗-->
- </view>
- </template>
- <script>
- import tuiButton from "@/components/thorui/tui-button/tui-button"
- import tuiIcon from "@/components/thorui/tui-icon/tui-icon"
- import tuiBadge from "@/components/thorui/tui-badge/tui-badge"
- import tuiTag from "@/components/thorui/tui-tag/tui-tag"
- import tuiNomore from "@/components/thorui/tui-nomore/tui-nomore"
- import tuiTopDropdown from "@/components/thorui/tui-top-dropdown/tui-top-dropdown"
- import tuiBottomPopup from "@/components/thorui/tui-bottom-popup/tui-bottom-popup"
- import tuiNumberbox from "@/components/thorui/tui-numberbox/tui-numberbox"
-
- export default {
- components:{
- tuiButton,
- tuiIcon,
- tuiBadge,
- tuiTag,
- tuiNomore,
- tuiTopDropdown,
- tuiBottomPopup,
- tuiNumberbox
- },
- data() {
- return {
- height: 64, //header高度
- top: 26, //标题图标距离顶部距离
- scrollH: 0, //滚动总高度
- opcity: 0,
- iconOpcity: 0.5,
- bannerIndex: 0,
- shareList: [{
- share: [{
- name: "QQ",
- icon: "qq",
- color: "#07BDFD",
- size: 34
- }, {
- name: "微信",
- icon: "wechat",
- color: "#80D640"
- }, {
- name: "朋友圈",
- icon: "moments",
- color: "#80D640",
- size: 32
- }, {
- name: "支付宝",
- icon: "alipay",
- color: "#00AAEE"
- }, {
- name: "新浪微博",
- icon: "sina",
- color: "#F9C718"
- }, {
- name: "小程序",
- icon: "applets",
- color: "#2BA348"
- }, {
- name: "钉钉",
- icon: "dingtalk",
- color: "#2DA0F1"
- }, {
- name: "浏览器打开",
- icon: "explore-fill",
- color: "#1695F7"
- }, {
- name: "邮件",
- icon: "mail-fill",
- color: "#2868E5"
- }]
- }, {
- operate: [{
- name: "投诉",
- icon: "warning",
- size: 30
- }, {
- name: "复制链接",
- icon: "link",
- size: 28
- }, {
- name: "刷新",
- icon: "refresh",
- size: 30
- }, {
- name: "搜索内容",
- icon: "search-2",
- size: 28
- }]
- }],
- menuShow: false,
- popupShow: false,
- value: 1,
- collected: false
- };
- },
- onLoad: function(options) {
- let obj = {};
- // #ifdef MP-WEIXIN
- obj = wx.getMenuButtonBoundingClientRect();
- // #endif
- // #ifdef MP-BAIDU
- obj = swan.getMenuButtonBoundingClientRect();
- // #endif
- // #ifdef MP-ALIPAY
- my.hideAddToDesktopMenu();
- // #endif
- setTimeout(() => {
- uni.getSystemInfo({
- success: res => {
- this.width = obj.left || res.windowWidth;
- this.height = obj.top ? obj.top + obj.height + 8 : res.statusBarHeight + 44;
- this.top = obj.top ? obj.top + (obj.height - 32) / 2 : res.statusBarHeight + 6;
- this.scrollH = res.windowWidth;
- }
- });
- }, 0);
- },
- methods: {
- popup: function() {
- this.popupShow = !this.popupShow
- },
- back: function() {
- uni.navigateBack();
- },
- },
- onPageScroll(e) {
- let scroll = e.scrollTop <= 0 ? 0 : e.scrollTop;
- let opcity = scroll / this.scrollH;
- if (this.opcity >= 1 && opcity >= 1) {
- return;
- }
- this.opcity = opcity;
- this.iconOpcity = 0.5 * (1 - opcity < 0 ? 0 : 1 - opcity);
- }
- };
- </script>
- <style>
- page {
- background-color: #f7f7f7;
- }
- .container {
- width: 100%;
- }
- .tui-header-box {
- width: 100%;
- left: 0;
- top: 0;
- z-index: 995;
- position: fixed;
- top: 0;
- }
- .tui-header {
- width: 100%;
- font-size: 18px;
- line-height: 18px;
- font-weight: 500;
- height: 32px;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .tui-header-icon-left {
- position: fixed;
- top: 0;
- left: 10px;
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- height: 32px;
- transform: translateZ(0);
- z-index: 9999;
- }
- .tui-header-icon-right {
- position: fixed;
- top: 0;
- right: 10px;
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- height: 32px;
- transform: translateZ(0);
- z-index: 9999;
- }
- .tui-header-icon-left .tui-badge {
- background: #e41f19 !important;
- position: absolute;
- right: -4px;
- }
-
- .tui-header-icon-right .tui-badge {
- background: #e41f19 !important;
- position: absolute;
- right: -4px;
- }
- .tui-icon-ml {
- margin-left: 20rpx;
- }
- .tui-icon-box {
- position: relative;
- height: 20px !important;
- width: 20px !important;
- padding: 6px !important;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .tui-banner-swiper {
- position: relative;
- }
- .tui-banner-tag {
- position: absolute;
- color: #fff;
- bottom: 30rpx;
- right: 0;
- }
- .tui-slide-image {
- width: 100%;
- display: block;
- }
- /*内容*/
- .tui-center {
- width: 100%;
- height: 100%;
- background: #fff;
- }
- .tui-pro-price {
- padding-top: 18rpx;
- }
- .tui-sale-price {
- font-size: 26rpx;
- font-weight: 500;
- color: #b5b5b5;
- }
- .tui-pro-content {
- width: 100%;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- box-sizing: border-box;
- padding: 20rpx;
- }
- .tui-pro-tit {
- color: #2e2e2e;
- font-size: 34rpx;
- word-break: break-all;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- }
- /*内容日期浏览*/
- .tui-pro-time {
- font-size: 26rpx;
- font-weight: 500;
- color: #b5b5b5;
- }
- /*header 下拉选择*/
-
- .top-dropdown {
- margin-top: 360rpx;
- padding: 0 40rpx;
- box-sizing: border-box;
- }
-
- .tui-share-box {
- padding: 0 50rpx;
- box-sizing: border-box;
- }
-
- .tui-drop-input-box {
- padding: 50rpx;
- box-sizing: border-box;
- }
-
- .tui-animation {
- display: inline-block;
- transform: rotate(0deg);
- transition: all 0.2s;
- }
-
- .tui-animation-show {
- transform: rotate(180deg);
- }
-
- .tui-selected-list {
- background-color: #fff;
- border-radius: 20rpx;
- overflow: hidden;
- transform: translateZ(0);
- }
-
- .tui-dropdown-scroll {
- height: 400rpx;
- }
-
- .tui-cell-class {
- display: flex;
- align-items: center;
- padding: 26rpx 30rpx !important;
- }
-
- .tui-ml-20 {
- margin-left: 20rpx;
- }
-
- .tui-share {
- background: #e8e8e8;
- position: relative;
- padding-bottom: env(safe-area-inset-bottom);
- }
-
- .tui-share-title {
- font-size: 26rpx;
- color: #7E7E7E;
- text-align: center;
- line-height: 26rpx;
- padding: 20rpx 0 50rpx 0;
- }
-
- .tui-share-top,
- .tui-share-bottom {
- min-width: 101%;
- padding: 0 20rpx 0 30rpx;
- white-space: nowrap;
- }
-
- .tui-mt {
- margin-top: 30rpx;
- padding-bottom: 150rpx;
- }
-
- .tui-share-item {
- width: 126rpx;
- display: inline-block;
- margin-right: 24rpx;
- text-align: center;
- }
-
- .tui-item-last {
- margin: 0;
- }
-
- .tui-empty {
- display: inline-block;
- width: 30rpx;
- visibility: hidden;
- }
-
- .tui-share-icon {
- display: flex;
- align-items: center;
- justify-content: center;
- background: #fafafa;
- height: 126rpx;
- width: 126rpx;
- border-radius: 32rpx;
- }
-
- .tui-share-text {
- font-size: 24rpx;
- color: #7E7E7E;
- line-height: 24rpx;
- padding: 20rpx 0;
- white-space: nowrap;
- }
-
- .tui-btn-cancle {
- width: 100%;
- height: 100rpx;
- position: absolute;
- left: 0;
- bottom: 0;
- background: #f6f6f6;
- font-size: 36rpx;
- color: #3e3e3e;
- display: flex;
- align-items: center;
- justify-content: center;
- padding-bottom: env(safe-area-inset-bottom);
- }
-
- .tui-hover {
- background: rgba(0, 0, 0, 0.2)
- }
- </style>
|