zhaoxiaohai 3 년 전
부모
커밋
44c27dacd2

+ 1 - 0
components/My_LiveList/live.wxml

@@ -20,5 +20,6 @@
             <view wx:if="{{!isShow}}" class="explain u-line-1">{{item.faddress==null&&item.faddress=='null'?item.faddress:'暂无地址'}}</view>
             <view wx:else class="explain u-line-1">{{item.flocation!=null?item.flocation:'暂无地址'}}</view>
         </view>
+        <view class="live-item" style="opacity: 0;" wx:if="{{list.length%2!=0}}" />
     </view>
 </view>

+ 3 - 2
components/My_SupplyAndDemandList/index.wxml

@@ -5,13 +5,13 @@
         <view class="my-head-left">
             <!-- 用户信息 -->
             <view class="my-user">
-                <van-image custom-class="my-image-class" width="32rpx" height="32rpx" lazy-load src="{{item.headportraiturl}}" />
+                <van-image custom-class="my-image-class" width="32rpx" height="32rpx" lazy-load src="{{item.headportraiturl||'https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/WeChat/userCenter/userImg.png'}}" />
                 <text class="my-name u-line-1">{{item.checkby}}</text>
                 <text style="opacity: .7;">{{item.checkdate}}</text>
             </view>
             <!-- 用户地址 -->
             <view class="my-address u-line-1">
-                <van-icon name="location" />{{item.tposition==''||item.tposition==null?'暂无地址':item.tposition}}
+                <van-icon name="location" />{{item.tposition||'暂无地址'}}
             </view>
         </view>
         <!-- 电话联系 -->
@@ -23,6 +23,7 @@
     <view class="my-content u-line-2">
         {{item.fcontent}}
     </view>
+    <!-- 供需图片九宫格 -->
     <Images attinfos='{{item.attinfos}}' />
     <view class="my-footer">
         <view>浏览{{item.freadtimes}}</view>

+ 21 - 8
pages/tabbar-pages/home/index.js

@@ -32,7 +32,12 @@ Page({
         codeMsg: {}, //二维码信息
         MyModelShow: false, //二维码二次确认
         MyModelText: "", //提示框文本
-        shareObj: null,
+        shareObj: null, //分享数据
+        /* 分页 */
+        pageNumber: 1,
+        pageTotal: 1,
+        ftype: "",
+        condition: ""
     },
 
     /* 宫格区跳转 */
@@ -75,30 +80,35 @@ Page({
 
     /* 获取最新供需列表 */
     supplyanddemandList() {
+        if (this.data.pageNumber > this.data.pageTotal) return;
         _Http.basic({
             "classname": "publicmethod.homepage.homepage",
             "method": "query_supplyanddemandList",
             "content": {
                 "getdatafromdbanyway": true,
-                "pageNumber": 1,
-                "pageSize": 10,
+                "pageNumber": this.data.pageNumber,
+                "pageSize": this.data.pageNumber == 1 ? 10 : 20,
                 "siteid": "BWJ",
                 "where": {
-                    "ftype": "",
-                    "condition": "",
+                    "ftype": this.data.ftype,
+                    "condition": this.data.condition,
                     "fissupply": "0",
                     "fstatus": "待对接"
                 }
             }
         }).then(res => {
+            console.log('供需列表', res)
             if (res.msg != '成功') return wx.showToast({
                 title: res.data,
                 icon: "none"
             });
             if (res.data.length >= 1) {
-                const data = handleList.getYTD(res.data);
+                let data = handleList.getYTD(res.data),
+                    productList = null;
+                res.pageNumber == 1 ? productList = data : productList = this.data.productList.concat(data);
                 this.setData({
-                    productList: data
+                    productList,
+                    pageTotal: res.pageTotal
                 });
             }
         });
@@ -266,7 +276,10 @@ Page({
      * 页面上拉触底事件的处理函数
      */
     onReachBottom: function () {
-
+        this.setData({
+            pageNumber: this.data.pageNumber + 1
+        })
+        this.supplyanddemandList()
     },
     /* 回调 */
     shareCallBack({

+ 3 - 4
pages/tabbar-pages/home/sdDetalis.wxml

@@ -6,9 +6,8 @@
 <van-sticky>
     <view class="sticky">
         <view class="user-time">
-            <image class="user-img" wx:if="{{detalis.headportraiturl}}" src="{{detalis.headportraiturl}}" mode="aspectFit" />
-            <image class="user-img" wx:else src="https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/WeChat/userCenter/userImg.png" mode="aspectFit" />
-            <text class="user-name u-line-1">{{detalis.createby}}{{detalis.createby}}{{detalis.createby}}</text>
+            <image class="user-img" src="{{detalis.headportraiturl||'https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/WeChat/userCenter/userImg.png'}}" mode="aspectFit" />
+            <text class="user-name u-line-1">{{detalis.createby}}</text>
             <text class="checkdate">{{detalis.checkdate}}</text>
         </view>
         <view>
@@ -19,7 +18,7 @@
 </van-sticky>
 <!-- 供需内容 -->
 <view class="content">{{detalis.fcontent}}</view>
-<!-- 图片列表 -->
+<!-- 图片 -->
 <view style="width: 100vw; background-color: #fff;">
     <Images attinfos='{{detalis.attinfos}}' />
 </view>

+ 19 - 6
pages/tabbar-pages/liveBroadcast/index.js

@@ -3,7 +3,7 @@ import {
 } from "../../../utils/api";
 const _Http = new ApiModel();
 Page({
-    options:{
+    options: {
         addGlobalClass: true,
     },
 
@@ -12,21 +12,29 @@ Page({
      */
     data: {
         tiveList: [], //直播列表
+        pageNumber: 1,
+        pageTotal: 1,
     },
 
     /**
      * 生命周期函数--监听页面加载
      */
     onLoad(options) {
-        //获取直播列表
+        this.getHomeLive();
+    },
+    //获取直播列表
+
+    getHomeLive() {
+        if (this.data.pageNumber > this.data.pageTotal) return;
         _Http.basic({
             "classname": "publicmethod.live.live",
             "method": "getHomeLive",
             "content": {
                 "getdatafromdbanyway": true,
-                "livestatus": ""
+                "livestatus": "",
+                'pageNumber': this.data.pageNumber
             }
-        }, false).then(res => {
+        }).then(res => {
             console.log("直播列表", res)
             if (res.msg != '成功') {
                 wx.showToast({
@@ -34,8 +42,10 @@ Page({
                     icon: "none"
                 });
             } else {
+                let tiveList=(res.pageNumber == 1) ? res.data : this.data.tiveList.concat(res.data);
                 this.setData({
-                    tiveList: res.data
+                    tiveList,
+                    pageTotal: res.data
                 })
             }
         })
@@ -81,7 +91,10 @@ Page({
      * 页面上拉触底事件的处理函数
      */
     onReachBottom() {
-
+        this.setData({
+            pageNumber: this.data.pageNumber + 1
+        })
+        this.getHomeLive();
     },
 
     /**

+ 5 - 1
pages/tabbar-pages/liveBroadcast/index.wxml

@@ -5,4 +5,8 @@
 <LiveList list='{{tiveList}}' />
 
 <!-- 占位 -->
-<view style="height: 90rpx; width: 50rpx;" />
+<view style="height: 90rpx; width: 50rpx;" />
+
+<!-- 贴边 -->
+<navigator url="/pages/liveStreaming/index" class="welt">
+</navigator>

+ 12 - 1
pages/tabbar-pages/liveBroadcast/index.wxss

@@ -1,4 +1,15 @@
-.list-box{
+.list-box {
     width: 720rpx !important;
     justify-content: space-around !important;
+}
+
+.welt {
+    position: fixed;
+    right: 0;
+    top: 65%;
+    width: 240rpx;
+    height: 82rpx;
+    background: #00C1D2;
+    box-shadow: 0px 6rpx 6rpx 0px rgba(0, 0, 0, 0.1);
+    border-radius: 41rpx 0px 0px 41rpx;
 }