Browse Source

供需详情

zhaoxiaohai 3 years ago
parent
commit
57767f19bc

+ 0 - 39
pages/tabbar-pages/supplyAndDemand/particulars.js

@@ -146,43 +146,4 @@ Page({
     onShareAppMessage: function () {
 
     },
-    /* 页面滑动 */
-    onPageScroll: function (e) {
-        const that = this;
-        const query = wx.createSelectorQuery()
-        query.select('#Description').boundingClientRect(function (fres) {
-            if (fres.top > that.data.Heitop) that.setData({
-                Heitop: fres.top
-            });
-            if (that.data.ceiling) {
-                if (fres.top > 15) {
-                    that.setData({
-                        ceiling: false
-                    })
-                    if (!that.data.ceiling) console.log('false', fres.top)
-                }
-            } else {
-                if (fres.top < 15) {
-                    that.setData({
-                        ceiling: true
-                    })
-                    if (that.data.ceiling) console.log('true', fres.top)
-                }
-            }
-        })
-        query.selectViewport().scrollOffset()
-        query.exec(function (res) {
-            // console.log(res)
-        })
-
-        /*         if (this.data.ceiling) {
-                    if (e.scrollTop == 0) this.setData({
-                        ceiling: false
-                    })
-                } else {
-                    if (e.scrollTop != 0) this.setData({
-                        ceiling: true
-                    })
-                } */
-    }
 })

+ 23 - 24
pages/tabbar-pages/supplyAndDemand/particulars.wxml

@@ -1,8 +1,8 @@
-<view class="header-box">
+<view class="box">
     <!-- 供需标题和用户信息 -->
     <view class="title-and-usercenter">
-        <view class="title-and-userMessage {{ceiling?'box-ceiling':''}}">
-            <view class="header-title {{ceiling?'u-line-1':''}}">【{{particulars.ftype}}】{{particulars.ftitle}}</view>
+        <view class="title-and-userMessage">
+            <view class="header-title">【{{particulars.ftype}}】{{particulars.ftitle}}</view>
             <view class="header-userMessage">
                 <view class="header-userMessage-img">
                     <image wx:if="{{particulars.headportraiturl}}" src="{{particulars.headportraiturl}}" mode="aspectFit"></image>
@@ -15,30 +15,29 @@
                 <van-button wx:else color="#4DC2D4" style="margin-left: 16rpx;" custom-class="custom-NoSlotBut details-custom-slotBut">{{particulars.fstatus}}</van-button>
             </view>
         </view>
-        <view style="height: {{ceiling?Heitop+20:0}}rpx;"></view>
+    </view>
+    <scroll-view scroll-y style="flex: 1; height: 1px;">
         <!-- 产品详情 -->
-        <view id='Description' style="margin-top: 15px;">
-            <view style="overflow-wrap: break-word; margin-bottom: 15rpx;">{{particulars.fcontent}}</view>
+        <view class="header-box">
+            <view style="overflow-wrap: break-word;">{{particulars.fcontent}}</view>
             <view class="detailed-description">
                 <image wx:for="{{particulars.attinfos}}" src="{{item.fobsurl}}" mode="widthFix" catchtap="previewImage"></image>
             </view>
         </view>
-    </view>
-</view>
-
-<!-- 更多推荐 -->
-<My_CenterTheTitle title='其他推荐'></My_CenterTheTitle>
-
-<!-- 列表 -->
-<My_SupplyAndDemandItemBox wx:for="{{recommendationList}}" title="【{{item.ftype}}】{{item.ftitle}}" time="{{item.checkdate}}" imageList="{{item.attinfos}}" data-index="{{index}}" bindtap="jumpForDetails">
-    <!-- 内容信息插槽 -->
-    <view slot="dataAndBut">
-        <view class="dataAndBut">
-            <view class="dataAndBut_data">
-                浏览次数:{{item.freadtimes}}次 意向沟通人数:{{item.fcommunicationtimes}}次
+        <!-- 更多推荐 -->
+        <My_CenterTheTitle title='其他推荐'></My_CenterTheTitle>
+        <!-- 列表 -->
+        <My_SupplyAndDemandItemBox wx:for="{{recommendationList}}" title="【{{item.ftype}}】{{item.ftitle}}" time="{{item.checkdate}}" imageList="{{item.attinfos}}" data-index="{{index}}" bindtap="jumpForDetails">
+            <!-- 内容信息插槽 -->
+            <view slot="dataAndBut">
+                <view class="dataAndBut">
+                    <view class="dataAndBut_data">
+                        浏览次数:{{item.freadtimes}}次 意向沟通人数:{{item.fcommunicationtimes}}次
+                    </view>
+                    <van-button wx:if="{{item.fstatus == '待对接'}}" color="#4DC2D4" style="margin-left: 16rpx;" custom-class="custom-slotBut" catchtap="contact">一键联系</van-button>
+                    <van-button wx:else color="#4DC2D4" style="margin-left: 16rpx;" custom-class="custom-NoSlotBut" catchtap="stop">{{item.fstatus}}</van-button>
+                </view>
             </view>
-            <van-button wx:if="{{item.fstatus == '待对接'}}" color="#4DC2D4" style="margin-left: 16rpx;" custom-class="custom-slotBut" catchtap="contact">一键联系</van-button>
-            <van-button wx:else color="#4DC2D4" style="margin-left: 16rpx;" custom-class="custom-NoSlotBut" catchtap="stop">{{item.fstatus}}</van-button>
-        </view>
-    </view>
-</My_SupplyAndDemandItemBox>
+        </My_SupplyAndDemandItemBox>
+    </scroll-view>
+</view>

+ 13 - 20
pages/tabbar-pages/supplyAndDemand/particulars.wxss

@@ -1,38 +1,31 @@
+page {
+    padding-bottom: 0 !important;
+}
+
+.box {
+    display: flex;
+    flex-direction: column;
+    height: 100vh;
+}
+
 /* 盒子 */
 .header-box {
     width: 100vw;
     background-color: #ffffff;
-    padding: 20rpx 24rpx 30rpx;
+    padding: 0 24rpx 30rpx;
     border-radius: 0px 0px 20rpx 20rpx;
     box-sizing: border-box;
 }
 
-/* 吸顶样式 */
-.box-ceiling {
-    position: fixed !important;
-    top: 0;
-    left: 0;
-    padding: 10rpx 24rpx 5rpx !important;
+.title-and-usercenter {
+    padding: 20rpx 24rpx 16rpx;
     background-color: #ffffff;
-    box-sizing: border-box;
-    box-shadow: 0 3rpx 8rpx 0rpx rgba(0, 0, 0, .2);
-    margin-left: 0 !important;
-    z-index: 999999;
-}
-
-.box-ceiling .but-box {
-    bottom: 5rpx;
-}
-
-.box-ceiling .details-custom-slotBut {
-    margin-right: 34rpx !important;
 }
 
 .title-and-userMessage {
     position: relative;
     width: 100%;
     margin-left: 6rpx;
-    margin-bottom: 15rpx;
 }
 
 .but-box {