zhaoxiaohai 3 лет назад
Родитель
Сommit
9d37b1c2f9

+ 19 - 0
app.js

@@ -4,6 +4,23 @@ import {
 const _Http = new ApiModel();
 App({
     onLaunch() {
+        //判断是否存在登录
+        _Http.basic({
+            "accesstoken": wx.getStorageSync('userData').token,
+            "classname": "customer.usercenter.usermsg.usermsg",
+            "method": "query_usermsg",
+            "content": {}
+        }).then(res => {
+            console.log("onLaunch", res)
+            if (res.msg == '成功') {
+                this.globalData.isLogin = true;
+                setTimeout(()=>{
+                    this.initSocket();//存在登录 链接webSocket
+                },500)
+            } else {
+            }
+        })
+        
         /* 计算tabbar+iphone安全距离  tabbar页面+100rpx*/
         let safeAreaBottom = 0,
             capsule = wx.getMenuButtonBoundingClientRect(),
@@ -43,6 +60,7 @@ App({
         })
     },
     initSocket() {
+        console.log('链接initSocket')
         let that = this;
         this.globalData.SocketTask = wx.connectSocket({
             url: 'wss://www.buwanjia.com/bwj/webSocket/' + wx.getStorageSync('userData').token,
@@ -79,6 +97,7 @@ App({
         })
     },
     globalData: {
+        isLogin: false,
         myNavBorHeight: 0, //自定义头部导航高度
         safeAreaBottom: 0, //底部安全距离
         msgFcount: "", //徽标数量

+ 1 - 5
app.json

@@ -23,7 +23,7 @@
         ]
     },
     "pages": [
-        "pages/portal/index",
+        "pages/tabbar-pages/home/index",
         "pages/login/index",
         "pages/userCenter/index",
         "pages/teamManagement/index",
@@ -31,9 +31,7 @@
         "pages/productManagement/index",
         "pages/storeMessage/index",
         "pages/productManagement/change",
-        "pages/tabbar-pages/home/index",
         "pages/tabbar-pages/customer-service-staff/index",
-        "pages/tabbar-pages/supplyAndDemand/index",
         "pages/tabbar-pages/message/index",
         "pages/tabbar-pages/user/index",
         "pages/tradeShow/index",
@@ -50,11 +48,9 @@
         "pages/annunciate/newAndChange",
         "pages/annunciate/details",
         "pages/annunciate/glanceover",
-        "pages/portal/details",
         "pages/chatRoom/index",
         "pages/chatRoom/dialogbox",
         "pages/chatRoom/history",
-        "pages/portal/search",
         "pages/chatRoom/create",
         "pages/chatRoom/stats",
         "pages/scanQRCodes/register",

+ 5 - 0
components/My_SupplyAndDemandList/index.js

@@ -2,6 +2,8 @@ import {
     ApiModel
 } from '../../utils/api';
 const _Http = new ApiModel();
+import queryLogin from '../../utils/isLogin';
+
 Component({
     options: {
         addGlobalClass: true,
@@ -26,6 +28,7 @@ Component({
     methods: {
         /* 跳转详情页 */
         toDetailPage(e) {
+            if (!queryLogin()) return;
             const {
                 item
             } = e.currentTarget.dataset;
@@ -35,6 +38,7 @@ Component({
         },
         /* 马上拨打 */
         callUp(e) {
+            if (!queryLogin()) return;
             const {
                 phone,
                 id
@@ -52,6 +56,7 @@ Component({
             this.triggerEvent('shareCallBack', item);
             this.record(3, item.tsupplyanddemandid)
         },
+        /* 处理记录 */
         record(type, id) {
             _Http.basic({
                 "accesstoken": wx.getStorageSync('userData').token,

+ 1 - 1
components/My_navBar/index.wxml

@@ -6,7 +6,7 @@
             <van-icon name="arrow-down" />
         </view>
         <view wx:else  class="header_user_choice" bindtap="toLogin">
-            游客-登录
+            游客-登录
         </view>
     </view>
 </view>

+ 4 - 1
custom-tab-bar/index.js

@@ -2,6 +2,8 @@ import {
     ApiModel
 } from "../utils/api";
 const _Http = new ApiModel();
+import queryLogin from '../utils/isLogin';
+
 Component({
     /**
      * 组件的属性列表
@@ -60,6 +62,7 @@ Component({
     methods: {
         /* tabbar */
         onChange(event) {
+            if (!queryLogin()) return;
             if (this.data.phoneNumber == '') this.setData({
                 phoneNumber: wx.getStorageSync('servicehotline')
             });
@@ -98,7 +101,7 @@ Component({
                 "method": "unReadMessageCount",
                 "content": {}
             }).then(res => {
-                if(res.data='登陆状态已过期,请重新登陆!') return;
+                if (res.data = '登陆状态已过期,请重新登陆!') return;
                 if (res.msg != '成功') return console.log('未读消息数量查询失败')
                 const fcount = (res.data[0].fcount == 0) ? '' : res.data[0].fcount;
                 getApp().globalData.msgFcount = fcount;

+ 26 - 25
pages/login/index.js

@@ -61,30 +61,30 @@ Page({
     },
     viewRules() {
         wx.downloadFile({
-          url: 'https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/PrivacyPolicy.docx',
-          success:(res)=>{
-              console.log(res)
-              wx.openDocument({
-                filePath: res.tempFilePath,
-                fail: (err) => {
-                    console.log(err)
-                    wx.showToast({
-                        title: '读取失败,请稍后再试',
-                        icon: "none"
-                    })
-                }
-            })
-          },
-          fail:(err)=>{
-              console.log(err)
-              wx.showToast({
-                title: '读取失败,请稍后再试',
-                icon: "none"
-            })
-          }
+            url: 'https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/PrivacyPolicy.docx',
+            success: (res) => {
+                console.log(res)
+                wx.openDocument({
+                    filePath: res.tempFilePath,
+                    fail: (err) => {
+                        console.log(err)
+                        wx.showToast({
+                            title: '读取失败,请稍后再试',
+                            icon: "none"
+                        })
+                    }
+                })
+            },
+            fail: (err) => {
+                console.log(err)
+                wx.showToast({
+                    title: '读取失败,请稍后再试',
+                    icon: "none"
+                })
+            }
         })
         return
-        
+
     },
     /**
      * 生命周期函数--监听页面加载
@@ -137,6 +137,7 @@ Page({
             console.log('WebSocket连接已关闭!readyState=' + that.globalData.SocketTask.readyState)
             that.globalData.socketEstablish = false;
         });
+        getApp().globalData.isLogin = true;
         //建立链接
         getApp().initSocket();
     },
@@ -210,9 +211,9 @@ Page({
             name
         } = e.currentTarget.dataset;
         if (name == "login") {
-            if(!this.data.rulesChecked) return wx.showToast({
-              title: '请勾选同意协议后登录',
-              icon:"none"
+            if (!this.data.rulesChecked) return wx.showToast({
+                title: '请勾选同意协议后登录',
+                icon: "none"
             })
             //登录页面提交信息
             this.loginSubmit()

+ 0 - 115
pages/portal/details.js

@@ -1,115 +0,0 @@
-import {
-    ApiModel
-} from "../../utils/api"
-const _Http = new ApiModel();
-Page({
-
-    /**
-     * 页面的初始数据
-     */
-    data: {
-        recommendationList: []
-    },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad: function (options) {
-        //供需详情
-        _Http.basic({
-            "classname": "publicmethod.homepage.homepage",
-            "method": "query_supplyanddemandMain",
-            "content": {
-                "tsupplyanddemandid": options.tsupplyanddemandid,
-                "tagentsid": options.tagentsid
-            }
-        }).then(res => {
-            res.data[0].checkdate = res.data[0].checkdate.slice(0, res.data[0].checkdate.lastIndexOf('.'));
-            this.setData({
-                particulars: res.data[0]
-            })
-        });
-        //门户供需列表
-        _Http.basic({
-            "classname": "publicmethod.homepage.homepage",
-            "method": "query_supplyanddemandList",
-            "content": {
-                "getdatafromdbanyway": true,
-                "pageNumber": 1,
-                "pageSize": 8,
-                "siteid": "BWJ",
-                "where": {
-                    "ftype": ""
-                }
-            }
-        }).then(res => {
-            if (res.msg != '成功') return wx.showToast({
-                title: res.data,
-                icon: "none"
-            });
-            for (let i = 0; i < res.data.length; i++) {
-                res.data[i].checkdate = res.data[i].checkdate.slice(0, res.data[i].checkdate.lastIndexOf('.'));
-            }
-            this.setData({
-                recommendationList: res.data
-            })
-        })
-    },
-    jumpForDetails(e) {
-        const {
-            index
-        } = e.currentTarget.dataset;
-        const data = this.data.recommendationList[index];
-        wx.navigateTo({
-            url: './details?tagentsid=' + data.tagentsid + '&tsupplyanddemandid=' + data.tsupplyanddemandid,
-        })
-    },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload: function () {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh: function () {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function () {
-
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage: function () {
-
-    }
-})

+ 0 - 3
pages/portal/details.json

@@ -1,3 +0,0 @@
-{
-  "usingComponents": {}
-}

+ 0 - 43
pages/portal/details.wxml

@@ -1,43 +0,0 @@
-<view class="box">
-    <!-- 供需标题和用户信息 -->
-    <view class="title-and-usercenter">
-        <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>
-                    <image wx:else src="/static/tacitly-approve/MRuserImg.png" mode="aspectFit"></image>
-                </view>
-                <view class="header-userMessage-textMsg">{{particulars.createby}} {{particulars.checkdate}}</view>
-            </view>
-            <!-- <view class="but-box">
-                <van-button wx:if="{{particulars.fstatus == '待对接'}}" color="#4DC2D4" style="margin-left: 16rpx;" custom-class="custom-slotBut details-custom-slotBut">一键联系</van-button>
-                <van-button wx:else color="#4DC2D4" style="margin-left: 16rpx;" custom-class="custom-NoSlotBut details-custom-slotBut">{{particulars.fstatus}}</van-button>
-            </view> -->
-        </view>
-    </view>
-    <scroll-view scroll-y style="flex: 1; height: 1px;">
-        <!-- 产品详情 -->
-        <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>
-        <!-- 更多推荐 -->
-        <My_CenterTheTitle title='其他推荐'></My_CenterTheTitle>
-        <!-- 列表 -->
-        <My_SupplyAndDemandItemBox wx:for="{{recommendationList}}" title="[{{item.ftype}}]{{item.ftitle}}" time="{{item.checkdate}}" imageList="{{item.attinfos}}" data-index="{{index}}" type='{{item.ftype}}' content="{{item.fcontent}}" 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>
-        </My_SupplyAndDemandItemBox>
-    </scroll-view>
-</view>

+ 0 - 1
pages/portal/details.wxss

@@ -1 +0,0 @@
-/* @import "/pages/tabbar-pages/supplyAndDemand/particulars.wxss" */

+ 0 - 423
pages/portal/index.js

@@ -1,423 +0,0 @@
-import {
-    ApiModel
-} from "../../utils/api"
-const _Http = new ApiModel();
-import {
-    TestVerify
-} from "../../utils/verify";
-const _Verify = new TestVerify();
-const processingData = require("../../utils/processingData");
-Page({
-    /**
-     * 页面的初始数据
-     */
-    data: {
-        tabsActive: 0, //tabs选中项
-        annunciateList: [], //通告列表
-        sadClassify: [], //供需分类
-        sadList: [], //供需列表
-        brandSelect: 0, //品牌关注榜选择
-        brandList0: [],
-        brandList1: [],
-        recruitName: "", //招商用户名
-        recruitPhone: "", //招商手机号
-        region: [], //地址
-        recruitExplain: "", //备注
-        newProductIndex1: 0,
-        newProductIndex2: 0,
-        repetitionSubmit: false, //是否重复提交招商表单
-        tiveList: [], //直播列表
-        portal_middle_1: '',
-    },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad: function (options) {
-        //获取管理端发布通告
-        _Http.basic({
-            "classname": "publicmethod.homepage.homepage",
-            "method": "getNewestNoticeList",
-            "content": {}
-        }).then(res => {
-            console.log(res)
-            if (res.msg != '成功') {
-                wx.showToast({
-                    title: res.data,
-                    icon: "none"
-                });
-            } else {
-                processingData.imageType(res.data, 'cover');
-                let list = [];
-                if (res.data.length > 3) {
-                    list = res.data.slice(0, 3)
-                } else {
-                    list = res.data;
-                }
-                this.setData({
-                    annunciateList: list
-                })
-            }
-        });
-        //获取供需分类
-        _Http.basic({
-            "classname": "publicmethod.homepage.homepage",
-            "method": "query_typeselectList",
-            "content": {
-                "siteid": "BWJ"
-            }
-        }).then(res => {
-            if (res.msg != '成功') {
-                wx.showToast({
-                    title: res.data,
-                    icon: "none"
-                });
-            } else {
-                res.data.unshift({
-                    ftype: "全部"
-                })
-                // return console.log(res.data)
-                this.setData({
-                    sadClassify: res.data
-                })
-            }
-        });
-        //获取全部供需列表 
-        this.query_supplyanddemandList('');
-        //获取直播列表
-        _Http.basic({
-            "classname": "publicmethod.live.live",
-            "method": "getHomeLive",
-            "content": {
-                "getdatafromdbanyway": true,
-                "livestatus": "live"
-            }
-        }, false).then(res => {
-            console.log("直播列表", res)
-            if (res.msg != '成功') {
-                wx.showToast({
-                    title: res.data,
-                    icon: "none"
-                });
-            } else {
-                this.setData({
-                    tiveList: res.data
-                })
-            }
-        })
-        //获取轮播图
-        setTimeout(() => {
-            this.getBanner()
-        }, 300)
-        //新发布商品
-        this.getHotProductsList();
-        // 获取品牌关注榜
-        this.getHotAgentsList('沙发布')
-    },
-    /* 品牌关注榜切换 */
-    concernsChange(e) {
-        const {
-            index
-        } = e.target.dataset;
-        this.setData({
-            brandSelect: index
-        })
-    },
-    /* 去报名展会 */
-    toApply() {
-        const data = this.data.portal_middle_1;
-        wx.navigateTo({
-            url: '/pages/scanQRCodes/register?id=' + data[0].fdataid,
-        })
-    },
-    /* 获取轮播图 */
-    getBanner() {
-        let imgList = wx.getStorageSync('bannerDataList');
-        console.log("imgList", imgList)
-        if (imgList != "") {
-            const bannerList = imgList.filter(value => value.flocation == 'portal_head');
-            const portal_middle_1 = imgList.filter(value => value.flocation == 'portal_middle_1');
-            /* const portal_middle_2 = imgList.filter(value => value.flocation == 'portal_middle_2');
-            const portal_middle_3 = imgList.filter(value => value.flocation == 'portal_middle_3');
-            const portal_middle_4 = imgList.filter(value => value.flocation == 'portal_middle_4'); */
-            console.log(portal_middle_1)
-            this.setData({
-                swiperBannerList: bannerList[0].banner,
-                portal_middle_1: portal_middle_1[0].banner
-            });
-            /* portal_middle_2: portal_middle_2[0].banner,
-                portal_middle_3: portal_middle_3[0].banner,
-                portal_middle_4: portal_middle_4[0].banner, */
-        } else {
-            setTimeout(() => {
-                this.getBanner()
-            }, 500)
-        }
-    },
-    //跳转通过详情页
-    toAnnunciateDetails(e) {
-        const {
-            index
-        } = e.currentTarget.dataset;
-        wx.navigateTo({
-            url: '/pages/annunciate/details?id=' + this.data.annunciateList[index].tnoticeid + '&type=2',
-        })
-    },
-    //表单提交
-    submitForm() {
-        if (this.data.repetitionSubmit) {
-            wx.showModal({
-                title: "提示",
-                content: "已提交过信息,是否继续",
-                success: (res) => {
-                    if (!res.confirm) return;
-                    this.insertBusiness()
-                }
-            })
-        } else {
-            this.insertBusiness();
-        }
-    },
-    insertBusiness() {
-        let add = {
-            "province": "",
-            "city": "",
-            "county": "",
-        }
-        if (this.data.region.length > 0) {
-            const a1 = this.data.region;
-            add.province = a1[0]
-            add.city = a1[1]
-            add.county = a1[2]
-        }
-        _Http.basic({
-            "classname": "publicmethod.homepage.homepage",
-            "method": "insertBusiness",
-            "content": {
-                "province": add.province,
-                "city": add.city,
-                "county": add.county,
-                "fname": this.data.recruitName,
-                "fphone": this.data.recruitPhone,
-                "fnote": this.data.recruitExplain
-            }
-        }).then(res => {
-            if (res.msg != '成功') return wx.showToast({
-                title: res.data,
-                icon: "none"
-            });
-            wx.showToast({
-                title: "提交成功"
-            });
-            this.setData({
-                repetitionSubmit: true,
-                recruitExplain: '',
-                recruitName: "",
-                recruitPhone: "",
-                region: []
-            })
-        })
-    },
-    //手机号码
-    phoneNumber(e) {
-        if (!_Verify.phoneNumber(e.detail.value)) return wx.showToast({
-            title: '请输入11位手机号码',
-            icon: "none"
-        });
-        this.setData({
-            recruitPhone: e.detail.value
-        })
-    },
-    //招商表单输入
-    recruitInput(e) {
-        const {
-            name
-        } = e.currentTarget.dataset;
-        this.setData({
-            [name]: _Verify.Eliminate(e.detail.value)
-        })
-    },
-    //省市区选择器
-    bindRegionChange: function (e) {
-        console.log('picker发送选择改变,携带值为', e.detail.value)
-        this.setData({
-            region: e.detail.value
-        })
-    },
-    //新发布商品
-    getHotProductsList() {
-        let arr = ["窗帘", "沙发布"];
-        for (let i = 0; i < arr.length; i++) {
-            _Http.basic({
-                "classname": "publicmethod.homepage.homepage",
-                "method": "getNewProduct",
-                "content": {
-                    "getdatafromdbanyway": true,
-                    "fprodclassname": arr[i],
-                }
-            }).then(res => {
-                if (res.msg != '成功') return wx.showToast({
-                    title: res.data,
-                    icon: "none"
-                });
-                if (i == 0) {
-                    this.setData({
-                        newProduct1: res.data
-                    })
-                } else {
-                    this.setData({
-                        newProduct2: res.data
-                    })
-                }
-            })
-        };
-    },
-    /* 获取品牌关注榜 */
-    getHotAgentsList(ftype) {
-        _Http.basic({
-            "classname": "publicmethod.homepage.homepage",
-            "method": "getHotAgentsList",
-            "content": {
-                "ftype": ftype
-            }
-        }, false).then(res => {
-            console.log("获取品牌关注榜", res)
-            if (res.msg != '成功') return wx.showToast({
-                title: res.data,
-                icon: "none"
-            });
-            if (ftype == '沙发布') {
-                this.setData({
-                    brandList0: res.data
-                })
-            } else if (ftype == '窗帘布') {
-                this.setData({
-                    brandList1: res.data
-                })
-            }
-        })
-        if (ftype == '沙发布') this.getHotAgentsList('窗帘布')
-    },
-    /* 跳转供需详情 */
-    toDetails(e) {
-        const {
-            index
-        } = e.currentTarget.dataset;
-        const data = this.data.sadList[index];
-        wx.navigateTo({
-            url: './details?tagentsid=' + data.tagentsid + '&tsupplyanddemandid=' + data.tsupplyanddemandid,
-        })
-    },
-    /* 搜索 */
-    toSearch() {
-        wx.navigateTo({
-            url: './search',
-        })
-    },
-    /* 供需分类切换 */
-    tabsOnChange(e) {
-        const {
-            title,
-            index
-        } = e.detail;
-        this.setData({
-            tabsActive: index
-        })
-        console.log(title)
-        if (title == '全部') {
-            this.query_supplyanddemandList('')
-        } else {
-            this.query_supplyanddemandList(title);
-        }
-    },
-    /* 拉取供需分类列表 */
-    query_supplyanddemandList(type) {
-        _Http.basic({
-            "classname": "publicmethod.homepage.homepage",
-            "method": "query_supplyanddemandList",
-            "content": {
-                "getdatafromdbanyway": true,
-                "pageNumber": 1,
-                "pageSize": 20,
-                "siteid": "BWJ",
-                "where": {
-                    "ftype": type
-                }
-            }
-        }, false).then(res => {
-            if (res.msg != '成功') return wx.showToast({
-                title: res.data,
-                icon: "none"
-            });
-            this.setData({
-                sadList: processingData.annunciateCheckdate(res.data)
-            })
-        })
-    },
-    /* 新品轮播图 */
-    newProduct1(e) {
-        this.setData({
-            newProductIndex1: e.detail.current
-        })
-    },
-    newProduct2(e) {
-        this.setData({
-            newProductIndex2: e.detail.current
-        })
-    },
-    /* 跳转登录 */
-    toLogin() {
-        wx.navigateTo({
-            url: '/pages/login/index',
-        })
-        // getApp().getUserProfile();
-    },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload: function () {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh: function () {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function () {
-
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage: function () {
-
-    }
-})

+ 0 - 7
pages/portal/index.json

@@ -1,7 +0,0 @@
-{
-  "usingComponents": {
-    "van-empty": "@vant/weapp/empty/index",
-    "portalLice": "/components/My_LiveList/live",
-    "supplyanddemandList": "./supplyanddemandList/index"
-  }
-}

+ 0 - 182
pages/portal/index.wxml

@@ -1,182 +0,0 @@
-<!-- 搜索 -->
-<view class="search" bindtap="toSearch">
-    <image src="/static/icon-09.png" />搜索关键字
-</view>
-<!-- 轮播图 -->
-<My_BannerSwiper swiperBannerList="{{swiperBannerList}}"></My_BannerSwiper>
-<!-- 最新通告 -->
-<view class="annunciate" wx:if="{{annunciateList.length!=0}}">
-    <!-- 标题 -->
-    <view class="annunciate_title">
-        <view class="annunciate_decorate"></view>
-        <view class="annunciate_text">最新通告</view>
-    </view>
-    <!-- 内容 -->
-    <view class="annunciate_content">
-        <swiper class="annunciate_content_swiper" autoplay circular indicator-dots indicator-color='rgba(216,216,216,.58)' indicator-active-color='#57C7D3'>
-            <swiper-item wx:key="index" wx:for="{{annunciateList}}">
-                <image wx:if="{{item.attinfos[0]}}" src="{{item.attinfos[0].fobsurl}}"></image>
-                <image src="/static/annunciate/cover.png"></image>
-            </swiper-item>
-        </swiper>
-        <view class="annunciate_show">
-            <view class="annunciate_item" wx:key="index" wx:for="{{annunciateList}}" data-index="{{index}}" bindtap="toAnnunciateDetails">
-                <view class="annunciate_item_title u-line-1">{{item.ftitle}}</view>
-                <view class="annunciate_item_count">
-                    <image src="/static/icon-14.png"></image>
-                    浏览 {{item.freadcount}}
-                </view>
-            </view>
-        </view>
-    </view>
-</view>
-<view wx:if="{{portal_middle_1!=''}}" style="margin:20px auto 0; height: 90px; width: 351px; overflow: hidden; border-radius: 10rpx; box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.05);">
-    <image src="{{portal_middle_1[0].attinfos[0].fobsurl}}" bindtap="toApply" mode="aspectFill" style="height: 100%; width: 100%;"></image>
-</view>
-<!-- 广告位1 -->
-<!-- <My_BannerSwiper type="advertising" marTop='40' swiperBannerList="{{portal_middle_1}}" /> -->
-<!-- 品牌关注榜 -->
-<view class="annunciate" style="padding-top: 40rpx;">
-    <!-- 标题 -->
-    <view class="annunciate_title">
-        <view class="annunciate_decorate"></view>
-        <view class="annunciate_text">品牌关注榜</view>
-    </view>
-    <view class="concerns-box">
-        <view class="concerns-head" bindtap="concernsChange">
-            <view class="label {{brandSelect==0?'active':''}}" data-index="0">窗帘布</view>
-            <view class="label {{brandSelect==1?'active':''}}" data-index="1">沙发布</view>
-        </view>
-        <view class="concerns-content" hidden="{{brandSelect!=0}}">
-            <view class="concerns-content-item u-line-1" wx:for="{{brandList0}}" wx:if="{{index<10}}">
-                <view class="img">
-                    <image src="/static/portal/icon-{{index}}.png" mode="heightFix"></image>
-                </view>{{item.fname}}
-            </view>
-        </view>
-        <view class="concerns-content" hidden="{{brandSelect!=1}}">
-            <view class="concerns-content-item u-line-1" wx:for="{{brandList1}}" wx:if="{{index<10}}">
-                <view class="img">
-                    <image src="/static/portal/icon-{{index}}.png" mode="heightFix"></image>
-                </view>{{item.fname}}
-            </view>
-        </view>
-    </view>
-</view>
-<!-- 直播列表 -->
-<view class="annunciate" style="padding-top: 40rpx;">
-    <!-- 标题 -->
-    <view class="annunciate_title">
-        <view class="annunciate_decorate"></view>
-        <view class="annunciate_text">正在直播</view>
-    </view>
-    <portalLice list='{{tiveList}}' />
-    <van-empty wx:if="{{tiveList.length==0}}" description="暂无直播" />
-</view>
-
-<!-- 广告位1 -->
-<!-- <My_BannerSwiper type="advertising" marTop='40' swiperBannerList="{{portal_middle_2}}" /> -->
-<!-- 供需 -->
-<van-tabs active="{{ tabsActive }}" color='#00C1D2' line-width='15' line-height='3' custom-class='tabs-custom-class' tab-class='tabs-tab-class' tab-active-class='tabs-tab-active-class' bind:change="tabsOnChange">
-    <van-tab wx:key="index" wx:for="{{sadClassify}}" title="{{item.ftype}}" />
-</van-tabs>
-<!-- 列表展示区 -->
-<block>
-    <supplyanddemandList list='{{sadList}}'></supplyanddemandList>
-    <van-empty wx:if="{{1>sadList.length}}" description="暂无数据" />
-</block>
-<!-- 展厅照片 -->
-<!-- <view class="exhibition-hall">
-    <image src="{{portal_middle_3[0].attinfos[0].fobsurl}}" mode="aspectFill"></image>
-</view> -->
-<!-- 招商表单 -->
-<view class="annunciate" style="margin-top: 20rpx;">
-    <!-- 标题 -->
-    <view class="annunciate_title">
-        <view class="annunciate_decorate"></view>
-        <view class="annunciate_text">我要咨询</view>
-    </view>
-    <!-- 招商表单 -->
-    <view class="recruit-box">
-        <!-- 姓名,手机 -->
-        <view class="recruit-row">
-            <label for="name" class="recruit-row-title">
-                您的姓名
-            </label>
-            <view class="recruit-row-input">
-                <input id='name' placeholder="请输入姓名" value="{{recruitName}}" data-name="recruitName" bindinput="recruitInput" placeholder-class="placeholder-class" type="text" />
-            </view>
-            <label for="phone" class="recruit-row-title" style="margin-left: 22rpx;">
-                您的手机
-            </label>
-            <view class="recruit-row-input">
-                <input id='phone' placeholder="请输入手机号" value="{{recruitPhone}}" bindblur="phoneNumber" placeholder-class="placeholder-class" type="number" />
-            </view>
-        </view>
-        <!-- 选择地区 -->
-        <view class="recruit-row" style="margin-top: 20rpx;">
-            <view class="recruit-row-title">
-                您的地址
-            </view>
-            <picker mode="region" bindchange="bindRegionChange" value="{{region}}">
-                <view class="recruit-row-picker">
-                    <block wx:if="{{region.length>1}}">
-                        <text wx:key="index" wx:for="{{region}}" style="margin-right: 8rpx;">{{item}}</text>
-                    </block>
-                    <block wx:else>省、市、区</block>
-                    <van-icon name="arrow-down" />
-                </view>
-            </picker>
-        </view>
-        <!-- 备注 -->
-        <view class="recruit-row" style="margin-top: 20rpx;">
-            <view class="recruit-row-title">
-                备注
-            </view>
-            <view class="textarea">
-                <textarea maxlength='-1' value="{{recruitExplain}}" data-name="recruitExplain" bindinput="recruitInput" placeholder-style="color: rgba(0, 0, 0, 0.25);" placeholder='请输入备注'></textarea>
-            </view>
-        </view>
-        <!-- 提交 -->
-        <view class="recruit-row" style="margin-top: 110rpx;">
-            <view class="recruit-row-title"></view>
-            <van-button custom-class='submit-custom-class' bindtap="submitForm">马上提交</van-button>
-        </view>
-    </view>
-</view>
-<!-- 新品推荐 -->
-<view class="new-product">
-    <view>
-        <view class="new-product-title">
-            <view></view> 窗帘布新品 <view></view>
-        </view>
-        <swiper class="new-product-swiper" circular current='{{newProductIndex1}}' indicator-dots indicator-color='rgba(216,216,216,.58)' indicator-active-color='#57C7D3' bindchange='newProduct1'>
-            <swiper-item wx:key="index" wx:for="{{newProduct1}}">
-                <image wx:if="{{item.attinfos[0]}}" src="{{item.attinfos[0].fobsurl}}" mode="aspectFill"></image>
-                <image wx:else src="/static/annunciate/cover.png" mode="aspectFill"></image>
-            </swiper-item>
-        </swiper>
-        <view class="new-product-name u-line-1"><text wx:if="{{newProduct1[newProductIndex1].fprodname}}">{{newProduct1[newProductIndex1].fprodname}}</text><text wx:if="{{newProduct1[newProductIndex1].fbrand}}">[{{newProduct1[newProductIndex1].fbrand}}]</text></view>
-    </view>
-    <view>
-        <view class="new-product-title">
-            <view></view> 沙发布新品 <view></view>
-        </view>
-        <swiper class="new-product-swiper" circular current='{{newProductIndex2}}' indicator-dots indicator-color='rgba(216,216,216,.58)' indicator-active-color='#57C7D3' bindchange='newProduct2'>
-            <swiper-item wx:key="index" wx:for="{{newProduct2}}">
-                <image wx:if="{{item.attinfos[0]}}" src="{{item.attinfos[0].fobsurl}}" mode="aspectFill"></image>
-                <image wx:else src="/static/annunciate/cover.png" mode="aspectFill"></image>
-            </swiper-item>
-        </swiper>
-        <view class="new-product-name u-line-1"><text wx:if="{{newProduct2[newProductIndex2].fprodname!=null}}">{{newProduct2[newProductIndex2].fprodname}}</text><text wx:if="{{newProduct2[newProductIndex2].fbrand!=null}}">[{{newProduct2[newProductIndex2].fbrand}}]</text></view>
-    </view>
-</view>
-<!-- 招商图片 -->
-<!-- <view class="attract-investment">
-    <image src="{{portal_middle_4[0].attinfos[0].fobsurl}}" mode="aspectFill"></image>
-</view> -->
-<view style="height: 50px;"></view>
-<!-- 吸底 -->
-<view class="footer">
-    <van-button custom-class='footer-button' bindtap="toLogin">欢迎登录布万家</van-button>
-</view>

+ 0 - 492
pages/portal/index.wxss

@@ -1,492 +0,0 @@
-page {
-    background-color: #ffffff;
-}
-
-/* 搜索 */
-.search {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    width: 702rpx;
-    height: 60rpx;
-    background: rgba(0, 0, 0, 0.05);
-    border-radius: 30rpx;
-    margin: 20rpx auto 0;
-    font-size: 28rpx;
-    color: rgba(0, 0, 0, 0.3);
-}
-
-.search image {
-    width: 26rpx;
-    height: 26rpx;
-    margin-right: 8rpx;
-}
-
-/* 通告 */
-.annunciate {
-    width: 100vw;
-    background-color: #ffffff;
-    padding-top: 20rpx;
-    overflow: hidden;
-}
-
-.annunciate_title {
-    display: flex;
-    align-items: center;
-    height: 48rpx;
-    line-height: 48rpx;
-}
-
-.annunciate_decorate {
-    width: 8rpx;
-    height: 36rpx;
-    background: #57C7D3;
-    border-radius: 4rpx;
-    margin-left: 30rpx;
-}
-
-.annunciate_text {
-    font-size: 32rpx;
-    font-family: PingFangSC-Medium, PingFang SC;
-    font-weight: 550;
-    color: #000000;
-    margin-left: 10rpx;
-}
-
-.annunciate_content {
-    display: flex;
-    width: 100%;
-    padding: 0 26rpx 0 40rpx;
-    margin-top: 20rpx;
-}
-
-.annunciate_content_swiper {
-    width: 162rpx;
-    height: 162rpx;
-    border-radius: 10rpx;
-    overflow: hidden;
-    flex-shrink: 0;
-}
-
-.annunciate_content_swiper image {
-    width: 100%;
-    height: 100%;
-}
-
-.annunciate_show {
-    display: flex;
-    flex-direction: column;
-    justify-content: space-between;
-    margin-left: 20rpx;
-}
-
-.annunciate_item {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    height: 40rpx;
-    font-size: 28rpx;
-    color: #000000;
-}
-
-.annunciate_item_title {
-    width: 380rpx;
-}
-
-.annunciate_item_count {
-    height: 28rpx;
-    font-size: 20rpx;
-    color: #333333;
-    line-height: 28rpx;
-    flex-shrink: 0;
-}
-
-.annunciate_item_count image {
-    width: 16rpx;
-    height: 14rpx;
-}
-
-/* 新 品牌关注 */
-.concerns-box {
-    width: 670rpx;
-    border-radius: 10rpx;
-    overflow: hidden;
-    margin: 30rpx auto 0;
-}
-
-.concerns-head {
-    display: flex;
-    width: 100%;
-}
-
-.concerns-head .label {
-    width: 50%;
-    height: 76rpx;
-    line-height: 76rpx;
-    text-align: center;
-    background-color: #F5F5F5;
-    font-size: 32rpx;
-    color: #333333;
-}
-
-.concerns-head .active {
-    background: #55C3D0 !important;
-    font-family: PingFangSC-Medium, PingFang SC !important;
-    color: #FFFFFF !important;
-}
-
-.concerns-content {
-    float: left;
-    width: 100%;
-    height: 340rpx;
-    box-sizing: border-box;
-    border: 4rpx solid #55C3D0;
-    border-radius: 0px 0px 10rpx 10rpx;
-    padding-top: 6rpx;
-}
-
-.concerns-content-item {
-    float: left;
-    width: 50%;
-    height: 40rpx;
-    line-height: 40rpx;
-    padding-left: 40rpx;
-    box-sizing: border-box;
-    font-size: 28rpx;
-    color: #333333;
-    margin-top: 20rpx;
-}
-
-.concerns-content-item .img {
-    float: left;
-    width: 46rpx;
-    height: 32rpx;
-    margin-right: 20rpx;
-    margin-top: 4rpx;
-    text-align: center;
-}
-
-.concerns-content-item .img image {
-    height: 32rpx;
-}
-
-/* 新品推荐 */
-.new-product {
-    display: flex;
-    justify-content: space-between;
-    width: 100vw;
-    padding: 0 40rpx;
-    box-sizing: border-box;
-    margin-top: 30rpx;
-}
-
-.new-product>view {
-    width: 320rpx;
-    height: 406rpx;
-    margin-top: 0px;
-}
-
-.new-product-title {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    height: 74rpx;
-    width: 316rpx;
-    background-color: #333333;
-    font-size: 32rpx;
-    color: #FFFFFF;
-    border: 2rpx solid #000000;
-    border-bottom: 0;
-    border-radius: 10rpx 10rpx 0 0;
-}
-
-.new-product-title>view {
-    width: 12rpx;
-    height: 12rpx;
-    background: #FFFFFF;
-    border-radius: 50%;
-    margin: 0 10rpx;
-}
-
-.new-product-swiper {
-    width: 316rpx;
-    height: 264rpx;
-    border: 2rpx solid #000000;
-    border-top: 0;
-    border-bottom: 0;
-}
-
-.new-product-swiper swiper-item,
-.new-product-swiper image {
-    width: 100%;
-    height: 100%;
-}
-
-.new-product-name {
-    width: 316rpx !important;
-    height: 60rpx;
-    line-height: 60rpx;
-    font-size: 28rpx;
-    color: #000000;
-    background-color: #F5F5F5;
-    text-align: center;
-    border: 2rpx solid #000000;
-    border-top: 0;
-    border-radius: 0 0 10rpx 10rpx;
-}
-
-/* tabs */
-.tabs-custom-class {
-    margin-top: 20rpx;
-}
-
-.tabs-tab-class {
-    min-width: 170rpx !important;
-    font-size: 32rpx !important;
-    color: #000000 !important;
-}
-
-.tabs-tab-active-class {
-    font-size: 36rpx !important;
-    font-family: PingFangSC-Medium, PingFang SC !important;
-    font-weight: 550 !important;
-    color: #00C1D2 !important;
-}
-
-/* 展厅照片 */
-.exhibition-hall,
-.attract-investment {
-    width: 702rpx;
-    height: 392rpx;
-    margin: 30rpx auto 0;
-    border-radius: 10rpx;
-    overflow: hidden;
-}
-
-.exhibition-hall image,
-.attract-investment image {
-    width: 100%;
-    height: 100%;
-}
-
-.attract-investment {
-    height: 294rpx;
-    margin-top: 40rpx;
-}
-
-/* 品牌关注榜选项 */
-.option-box {
-    position: absolute;
-    height: 280rpx;
-    width: 162rpx;
-    top: 66rpx;
-    left: 46rpx;
-    overflow: hidden;
-}
-
-.option {
-    position: absolute;
-    width: 180rpx;
-    height: 450rpx;
-    background-color: #F7F8F8;
-    transform: rotate(30deg);
-}
-
-.op-top {
-    top: -78rpx;
-    left: -129rpx;
-}
-
-.op-bot {
-    bottom: -78rpx;
-    right: -129rpx;
-}
-
-.opavtion {
-    background-color: #4DC2D4 !important;
-}
-
-/*品牌类型 */
-.brand-type {
-    position: absolute;
-    width: 64rpx;
-    height: 88rpx;
-    font-size: 32rpx;
-    color: rgba(0, 0, 0, .2);
-    z-index: 99;
-    pointer-events: none;
-}
-
-.type-top {
-    top: 20rpx;
-    left: 20rpx;
-}
-
-.type-bot {
-    display: flex;
-    flex-wrap: wrap;
-    align-items: flex-end;
-    bottom: 20rpx;
-    right: 20rpx;
-}
-
-.typeavtion {
-    font-family: PingFangSC-Medium, PingFang SC;
-    font-weight: 550;
-    color: #FFFFFF;
-}
-
-/* 轮播 */
-.option-swiper {
-    position: absolute;
-    width: 380rpx;
-    height: 280rpx;
-    top: 66rpx;
-    left: 240rpx;
-}
-
-.option-swiper swiper-item {
-    display: flex;
-    flex-wrap: wrap;
-    flex-direction: column;
-    align-items: space-between;
-    width: 100%;
-    height: 100%;
-}
-
-.brand-item {
-    width: 47%;
-    height: 40rpx;
-    font-size: 28rpx;
-    font-family: PingFangSC-Regular, PingFang SC;
-    color: #333333;
-    line-height: 40rpx;
-    margin-bottom: 20rpx;
-}
-
-.brand-item>text {
-    font-size: 32rpx;
-    font-family: PangMenZhengDao !important;
-    margin-right: 5rpx;
-}
-
-.brand-item:nth-of-type(5n) {
-    margin-bottom: 0;
-}
-
-.brand-item:nth-of-type(n+6) {
-    margin-left: 20rpx;
-}
-
-/* 招商表单 */
-.recruit-box {
-    width: 702rpx;
-    height: 434rpx;
-    background: #FFFFFF;
-    box-shadow: 0px 0px 10rpx 0rpx rgba(170, 170, 170, 0.1);
-    border-radius: 10rpx;
-    border: 2rpx solid rgba(151, 151, 151, 0.2);
-    margin: 30rpx auto 0;
-    padding: 40rpx 0 0 30rpx;
-    box-sizing: border-box;
-}
-
-.recruit-row {
-    display: flex;
-    height: 52rpx;
-    line-height: 52rpx;
-    font-size: 24rpx;
-    color: rgba(0, 0, 0, 0.45);
-}
-
-.recruit-row-title {
-    width: 96rpx;
-    height: 44rpx;
-    text-align: right;
-    margin-right: 8rpx;
-}
-
-.recruit-row-input {
-    width: 206rpx;
-    height: 52rpx;
-    background: #FFFFFF;
-    border-radius: 4rpx;
-    border: 2rpx solid #D9D9D9;
-    box-sizing: border-box;
-    padding-left: 8rpx;
-}
-
-.placeholder-class {
-    font-size: 24rpx !important;
-    color: rgba(0, 0, 0, 0.25);
-    line-height: 46rpx !important;
-}
-
-.recruit-row-picker {
-    min-width: 206rpx;
-    max-width: 538rpx;
-    height: 52rpx;
-    line-height: 51rpx;
-    background: #FFFFFF;
-    border-radius: 4rpx;
-    border: 2rpx solid #D9D9D9;
-    font-size: 24rpx;
-    font-family: PingFangSC-Regular, PingFang SC;
-    color: rgba(0, 0, 0, 0.25);
-    text-indent: 0.5em;
-    padding-right: 10rpx;
-    box-sizing: border-box;
-}
-
-.recruit-row .textarea {
-    width: 528rpx;
-    height: 134rpx;
-    line-height: 24rpx;
-    background: #FFFFFF;
-    border-radius: 4rpx;
-    border: 2rpx solid #D9D9D9;
-    padding: 4rpx 0 0 8rpx;
-}
-
-.recruit-row .textarea textarea {
-    width: 100%;
-    height: 100%;
-}
-
-.submit-custom-class {
-    width: 164rpx !important;
-    height: 56rpx !important;
-    background: #4DC2D4 !important;
-    border-radius: 10rpx !important;
-    font-size: 28rpx !important;
-    font-family: PingFangSC-Medium, PingFang SC !important;
-    font-weight: 500;
-    color: #FFFFFF !important;
-    padding: 0 !important;
-}
-
-/* 吸底 */
-.footer {
-    display: flex;
-    justify-content: center;
-    position: fixed;
-    width: 100vw;
-    padding: 30rpx 0;
-    background-color: #ffffff;
-    z-index: 9999;
-    bottom: 0;
-    left: 0;
-    box-shadow: 0px -4px 16px 0px rgba(0, 0, 0, 0.05);
-}
-
-.footer .footer-button {
-    width: 356rpx !important;
-    height: 78rpx !important;
-    background: linear-gradient(180deg, #FFDC00 0%, #FFB600 100%) !important;
-    box-shadow: 2rpx 2rpx 8rpx 0px rgba(0, 0, 0, 0.12) !important;
-    border-radius: 39rpx;
-    font-size: 36rpx !important;
-    font-family: PingFangSC-Medium, PingFang SC !important;
-    font-weight: 550 !important;
-    color: #FFFFFF;
-}

+ 0 - 158
pages/portal/search.js

@@ -1,158 +0,0 @@
-import {
-    TestVerify
-} from "../../utils/verify";
-import {
-    ApiModel
-} from "../../utils/api"
-const _Http = new ApiModel();
-const _Verify = new TestVerify();
-const processingData = require("../../utils/processingData.js");
-Page({
-
-    /**
-     * 页面的初始数据
-     */
-    data: {
-        tabsList: ['通告', '供需', '直播'],
-        ftype: 3, //1:直播,2:供需,3:通告
-        annunciateList: [], //通告列表
-        liveList: [], //直播列表
-        supplyanddemandList: [], //供需列表
-        showPlaceholder: true, //是否显示占位图
-    },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad: function (options) {
-
-    },
-    //切换搜索类型
-    tabsSelectedIitem({
-        detail
-    }) {
-        let ftype = this.data.ftype;
-        switch (detail) {
-            case "通告":
-                ftype = 3;
-                break;
-            case "供需":
-                ftype = 2;
-                break;
-            case "直播":
-                ftype = 1;
-                break;
-        }
-        if (ftype == this.data.ftype) return;
-        this.setData({
-            ftype
-        });
-        this.isPlaceholder()
-    },
-    /* 搜索关键字 */
-    searchContent(e) {
-        let {
-            value
-        } = e.detail;
-        value = _Verify.Eliminate(value.trim());
-        if (value) {
-            _Http.basic({
-                "classname": "publicmethod.homepage.homepage",
-                "method": "searchPortalInfo",
-                "content": {
-                    "getdatafromdbanyway": true,
-                    "keyStr": value,
-                    "ftype": ""
-                }
-            }).then(res => {
-                if (res.msg != '成功') return wx.showToast({
-                    title: res.data,
-                    icon: 'none'
-                })
-                let annunciateList = res.data.TNOTICE,
-                    supplyanddemandList = res.data.tsupplyanddemand;
-                if (annunciateList.length != 0) annunciateList = processingData.annunciateCheckdate(annunciateList);
-                if (supplyanddemandList.length != 0) supplyanddemandList = processingData.annunciateCheckdate(supplyanddemandList);
-                this.setData({
-                    annunciateList,
-                    liveList: res.data.tlive,
-                    supplyanddemandList
-                })
-                this.isPlaceholder()
-            })
-        } else {
-            this.setData({
-                annunciateList: [],
-                liveList: [],
-                supplyanddemandList: []
-            })
-            this.isPlaceholder()
-        }
-    },
-    /* 是否显示占位图 */
-    isPlaceholder() {
-        let showPlaceholder = false;
-        switch (this.data.ftype) {
-            case 3:
-                showPlaceholder = (this.data.annunciateList.length == 0) ? true : false;
-                break;
-            case 2:
-                showPlaceholder = (this.data.supplyanddemandList.length == 0) ? true : false;
-                break;
-            case 1:
-                showPlaceholder = (this.data.liveList.length == 0) ? true : false;
-                break;
-        }
-        this.setData({
-            showPlaceholder
-        })
-    },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide: function () {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload: function () {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh: function () {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function () {
-
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage: function () {
-
-    }
-})

+ 0 - 9
pages/portal/search.json

@@ -1,9 +0,0 @@
-{
-  "usingComponents": {
-    "My_RoundedCornerButtonTabs": "../../components/My_RoundedCornerButtonTabs/index",
-    "van-empty": "@vant/weapp/empty/index",
-    "portalLice": "/components/My_LiveList/live",
-    "supplyanddemandList": "./supplyanddemandList/index",
-    "annunciateList": "/pages/annunciate/annunciateList/index"
-  }
-}

+ 0 - 23
pages/portal/search.wxml

@@ -1,23 +0,0 @@
-<!-- 搜索框 -->
-<view class="search-box">
-    <image src="/static/icon-09.png" />
-    <input type="text" placeholder="搜索关键字" placeholder-class="placeholder" confirm-type='search' bindconfirm='searchContent' />
-</view>
-<!-- tbas -->
-<view class="tabs">
-    <My_RoundedCornerButtonTabs list='{{tabsList}}' bindtabsSelectedIitem='tabsSelectedIitem'></My_RoundedCornerButtonTabs>
-</view>
-<!-- 直播 -->
-<view hidden="{{ftype!=1}}">
-    <portalLice wx:if="{{liveList.length!=0}}" list='{{liveList}}'></portalLice>
-</view>
-<!-- 供需 -->
-<view hidden="{{ftype!=2}}">
-    <supplyanddemandList list='{{supplyanddemandList}}'></supplyanddemandList>
-</view>
-<!-- 通告 -->
-<view hidden="{{ftype!=3}}">
-    <annunciateList list='{{annunciateList}}' ftype="2" />
-</view>
-<!-- 占位图 -->
-<van-empty wx:if="{{showPlaceholder}}" image="search" description="暂无内容" />

+ 0 - 41
pages/portal/search.wxss

@@ -1,41 +0,0 @@
-/* pages/portal/search.wxss */
-@import "./index.wxss";
-
-.search-box {
-    display: flex;
-    align-items: center;
-    width: 702rpx;
-    height: 60rpx;
-    background: rgba(0, 0, 0, 0.05);
-    border-radius: 30rpx;
-    margin: 20rpx auto 60rpx;
-    overflow: hidden;
-    padding: 0 20rpx;
-    box-sizing: border-box;
-}
-
-.search-box image {
-    width: 26rpx;
-    height: 26rpx;
-    flex-shrink: 0;
-    margin-right: 10rpx;
-}
-
-.search-box input {
-    flex: 1;
-    height: 100%;
-    font-size: 28rpx !important;
-}
-
-.placeholder {
-    font-size: 28rpx !important;
-    color: #000000 !important;
-    opacity: .3 !important;
-}
-
-/* tabs */
-.tabs {
-    width: 100vw;
-    padding-left: 40rpx;
-    box-sizing: border-box;
-}

+ 0 - 37
pages/portal/supplyanddemandList/index.js

@@ -1,37 +0,0 @@
-// pages/portal/annunciateList/index.js
-Component({
-    options: {
-        addGlobalClass: true
-    },
-    /**
-     * 组件的属性列表
-     */
-    properties: {
-        list: {
-            type: Array
-        }
-    },
-
-    /**
-     * 组件的初始数据
-     */
-    data: {
-
-    },
-
-    /**
-     * 组件的方法列表
-     */
-    methods: {
-        /* 跳转供需详情 */
-        toDetails(e) {
-            const {
-                index
-            } = e.currentTarget.dataset;
-            const data = this.data.list[index];
-            wx.navigateTo({
-                url: '/pages/portal/details?tagentsid=' + data.tagentsid + '&tsupplyanddemandid=' + data.tsupplyanddemandid,
-            })
-        },
-    }
-})

+ 0 - 4
pages/portal/supplyanddemandList/index.json

@@ -1,4 +0,0 @@
-{
-    "component": true,
-    "usingComponents": {}
-}

+ 0 - 29
pages/portal/supplyanddemandList/index.wxml

@@ -1,29 +0,0 @@
-<view class="ann-box" style="margin-left: 44rpx;" wx:key="index" wx:for="{{list}}" data-index="{{index}}" catchtap="toDetails">
-    <view class="ann-img" wx:if="{{item.attinfos[0].fobsurl}}">
-        <image src="{{item.attinfos[0].fobsurl}}" mode="aspectFill"></image>
-    </view>
-    <view class="ann-img" wx:else>
-        <image wx:if="{{item.ftype=='摄影摄像'}}" src="https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/WeChat/supplyAndDemand/icon-01.png" mode="aspectFit"></image>
-        <image wx:elif="{{item.ftype=='产品策划'}}" src="https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/WeChat/supplyAndDemand/icon-02.png" mode="aspectFit"></image>
-        <image wx:elif="{{item.ftype=='平面设计'}}" src="https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/WeChat/supplyAndDemand/icon-03.png" mode="aspectFit"></image>
-        <image wx:elif="{{item.ftype=='寻找面料'}}" src="https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/WeChat/supplyAndDemand/icon-04.png" mode="aspectFit"></image>
-        <image wx:elif="{{item.ftype=='商业培训'}}" src="https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/WeChat/supplyAndDemand/icon-05.png" mode="aspectFit"></image>
-        <image wx:elif="{{item.ftype=='寻找主播'}}" src="https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/WeChat/supplyAndDemand/icon-06.png" mode="aspectFit"></image>
-        <image wx:elif="{{item.ftype=='面料设计'}}" src="https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/WeChat/supplyAndDemand/icon-07.png" mode="aspectFit"></image>
-        <image wx:else src="/static/supplyAndDemand/default.jpg" mode="aspectFit"></image>
-    </view>
-    <view class="ann-text">
-        <view class="ann-text-title  u-line-1">[{{item.ftype}}]{{item.ftitle}}</view>
-        <view class="ann-text-center u-line-2">{{item.fcontent}}</view>
-        <view class="ann-text-bottom u-line-1" style="margin-top: 22rpx;">
-            <view class="userMsg" style="flex: 1;">
-                <view class="img">
-                    <image wx:if="{{item.headportraiturl}}" src="{{item.headportraiturl}}"></image>
-                    <image wx:else src="https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/WeChat/userCenter/userImg.png"></image>
-                </view>
-                <view>{{item.createby}} {{item.checkdate}}</view>
-            </view>
-            <view style="flex-shrink: 0;">{{item.freadtimes}}次浏览</view>
-        </view>
-    </view>
-</view>

+ 0 - 1
pages/portal/supplyanddemandList/index.wxss

@@ -1 +0,0 @@
-@import "/pages/annunciate/index.wxss";

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

@@ -4,6 +4,7 @@ import {
 const _Http = new ApiModel();
 const handleList = require("../../../utils/processingData");
 const analyze = require("../../../components/My_TwoDimensionalCode/analyze");
+import queryLogin from '../../../utils/isLogin';
 let shareTime = null;
 Page({
     /**
@@ -52,8 +53,15 @@ Page({
         })
         this.supplyanddemandList()
     },
+    toRelease() {
+        if (!queryLogin()) return;
+        wx.navigateTo({
+            url: '/pages/tabbar-pages/home/release/index',
+        })
+    },
     /* 宫格区跳转 */
     gridJumpPage(e) {
+        if (!queryLogin()) return;
         const {
             name
         } = e.target.dataset;

+ 1 - 1
pages/tabbar-pages/home/index.wxml

@@ -25,6 +25,6 @@
     <CusTabBar id="gxshuju" />
 </view>
 <!-- 贴边按钮 -->
-<navigator class="welt" url="/pages/tabbar-pages/home/release/index">
+<navigator class="welt" url='#' bindtap="toRelease">
 
 </navigator>

+ 3 - 1
pages/tabbar-pages/home/sdDetalis.js

@@ -4,7 +4,7 @@ import {
 const _Http = new ApiModel();
 const handleList = require("../../../utils/processingData");
 let shareTime = null;
-
+import queryLogin from '../../../utils/isLogin';
 Page({
 
     /**
@@ -70,11 +70,13 @@ Page({
     },
     /* 电话联系 */
     callUp(e) {
+        if (!queryLogin()) return;
         wx.makePhoneCall({
             phoneNumber: e.currentTarget.dataset.phone
         })
     },
     toLinkUp(e) {
+        if (!queryLogin()) return;
         const {
             tsupplyanddemandid,
             tenterprise_userid

+ 0 - 317
pages/tabbar-pages/supplyAndDemand/index.js

@@ -1,317 +0,0 @@
-import {
-    ApiModel
-} from "../../../utils/api";
-const _Http = new ApiModel();
-const handleList = require("../../../utils/processingData");
-Page({
-    /**
-     * 页面的初始数据
-     */
-    data: {
-        isOnShow: true, //是否触发onshow中的刷新列表
-        searchFocus: false, //我的需求搜索框焦点
-        searchText: "", //我的需求搜索内容
-        pageNumber: 1, //获取第几页
-        pageTotal: 2, //全部分页数量
-        active: 0, //tabs 选中下标
-        ftypeList: [], //分类列表
-        ftype: "全部", //当前查询分类
-        ifShowCommunicationOfNumber: false,
-        /* 供需列表 */
-        productList: [],
-        //轮播图列表
-        swiperBannerList: [],
-        imdialogs: [], //沟通列表
-    },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad: function (options) {
-        /* 获取所有信息分类 */
-        _Http.basic({
-            "accesstoken": wx.getStorageSync('userData').token,
-            "classname": "enterprise.system.supplyanddemand",
-            "method": "query_typeselectList",
-            "content": {}
-        }).then(res => {
-            console.log("分类", res)
-            if (res.msg != '成功') return wx.showToast({
-                title: res.data,
-                icon: "none"
-            });
-            for (let i = 0; i < res.data.length; i++) {
-                let attinfos = [];
-                for (let k = 0; k < res.data[i].attinfos.length; k++) {
-                    if (res.data[i].attinfos[k].ftype == 'default') {
-                        attinfos.unshift(res.data[i].attinfos[k])
-                    } else if (res.data[i].attinfos[k].ftype == 'click') {
-                        attinfos.push(res.data[i].attinfos[k])
-                    }
-                };
-                res.data[i].attinfos = attinfos;
-            };
-            /* 添加全部 */
-            res.data.unshift({
-                ftype: "全部",
-                attinfos: [{
-                    fobsurl: "/static/supplyAndDemand/all.png",
-                    ftype: "default"
-                }, {
-                    fobsurl: "/static/supplyAndDemand/all-c.png",
-                    ftype: "click"
-                }]
-            });
-            this.setData({
-                ftypeList: res.data
-            });
-        });
-        /* 获取轮播图 */
-        const bannerList = wx.getStorageSync('bannerDataList').filter(value => value.flocation == 'supplyanddemand_head');
-        this.setData({
-            swiperBannerList: bannerList[0].banner
-        });
-    },
-
-    /* tabs切换接口 */
-    getList() {
-        if (this.data.active == 0) return this.getSupplyAndDemand();
-        if (this.data.active == 1) return this.getSupplyAndDemand(true);
-        if (this.data.active == 2) return this.myNeed();
-    },
-    /* 宫格区点击事件 */
-    switchScreenType(even) {
-        let {
-            type
-        } = even.currentTarget.dataset;
-        if (type == this.data.ftype) return;
-        this.InitializeDataPaging();
-        this.setData({
-            ftype: type
-        });
-        this.getSupplyAndDemand()
-    },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
-
-    },
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow: function () {
-        this.getTabBar().init();
-        //获取列表
-        if (this.data.isOnShow) {
-            this.getList();
-        } else {
-            this.setData({
-                isOnShow: true
-            })
-        }
-        this.getTabBar().setData({
-            'tabbarList[3].fcount': getApp().globalData.msgFcount
-        })
-    },
-
-    postDemand() {
-        wx.navigateTo({
-            url: '/pages/announceDemand/index',
-        })
-    },
-    /* 阻止冒泡 */
-    stop() {
-        /* 所有供需列表中,已过期或已解决 不做操作 */
-    },
-    /* 供需下架 */
-    soldOut(e) {
-        const that = this;
-        const {
-            index
-        } = e.target.dataset;
-        wx.showModal({
-            title: '提示',
-            content: '是否确定下架该需求',
-            success: function (res) {
-                if (res.confirm) {
-                    _Http.basic({
-                        "accesstoken": wx.getStorageSync('userData').token,
-                        "classname": "customer.supplyanddemand.supplyanddemand",
-                        "method": "updatesupplyanddemandstatus",
-                        "content": {
-                            "tsupplyanddemandid": that.data.productList[index].tsupplyanddemandid,
-                            "fstatus": "已解决"
-                        }
-                    }).then(res => {
-                        if (res.msg != "成功") return;
-                        let productList = that.data.productList;
-                        productList[index].fstatus = "已解决"
-                        that.setData({
-                            productList
-                        })
-                        wx.showToast({
-                            title: "下架成功"
-                        })
-                    })
-                }
-            }
-        });
-    },
-    /* 获取供需列表 */
-    getSupplyAndDemand(fstatus, condition = '') {
-        const ftype = (this.data.ftype != '全部') ? this.data.ftype : "";
-        let where = {
-            "condition": this.data.searchText, //模糊搜索
-            "ftype": ftype, //数据类型
-            "fissupply": 0, // 0需 1供
-            "fstatus": ""
-        };
-        /* 暂时不分供需 */
-        if (fstatus) {
-            where = {
-                "condition": this.data.searchText, //模糊搜索
-                "ftype": ftype, //数据类型
-                "fissupply": 0, // 0需 1供
-                "fstatus": "对接中"
-            }
-        };
-        _Http.basic({
-            "accesstoken": wx.getStorageSync('userData').token,
-            "classname": "customer.supplyanddemand.supplyanddemand",
-            "method": "query_supplyanddemandList",
-            "content": {
-                "getdatafromdbanyway": true,
-                "pageNumber": this.data.pageNumber,
-                "pageSize": 20,
-                "where": where
-            }
-        },false).then(res => {
-            console.log("供需列表", res)
-            if (res.msg != "成功") return wx.showToast({
-                title: res.data,
-                icon: "none"
-            })
-            this.returnList(res);
-        })
-    },
-    /* tabs */
-    tabsChange(even) {
-        this.setData({
-            active: even.detail.index
-        })
-        /* 初始化分页 */
-        this.InitializeDataPaging();
-        this.getList();
-    },
-    /* 我的需求 */
-    myNeed() {
-        //全部加载完成退出请求
-        _Http.basic({
-            "accesstoken": wx.getStorageSync('userData').token,
-            "classname": "customer.supplyanddemand.supplyanddemand",
-            "method": "query_mysupplyanddemandList",
-            "content": {
-                "getdatafromdbanyway": true,
-                "pageNumber": this.data.pageNumber,
-                "pageSize": 20,
-                "where": {
-                    "condition": this.data.searchText,
-                    "ftype": "",
-                    "fissupply": "0"
-                }
-            }
-        }).then(res => {
-            if (res.msg != "成功") return wx.showToast({
-                title: res.data,
-            })
-            this.returnList(res);
-        })
-    },
-    /* 返回列表 */
-    returnList(res) {
-        let data = handleList.checkdate(res.data)
-        let productList = handleList.imageType(data, 'default');
-        //替换或拼接
-        if (res.pageNumber != 1) {
-            productList = this.data.productList.concat(productList);
-        }
-        this.setData({
-            productList,
-            pageTotal: res.pageTotal,
-        });
-    },
-    /* 我的需求搜索框获得焦点 */
-    needSearchFocus() {
-        this.setData({
-            searchFocus: true
-        })
-    },
-    /* 我的需求搜索框失去焦点 */
-    needSearchBlur(e) {
-        const {
-            value
-        } = e.detail;
-        //数据比较,防止重复查询
-        if (value == this.data.searchText) return this.setData({
-            searchFocus: false,
-        });
-        this.setData({
-            searchFocus: false,
-            searchText: value
-        })
-        this.InitializeDataPaging();
-        if (this.data.active == 0) {
-            this.getSupplyAndDemand();
-        } else {
-            this.myNeed();
-        }
-    },
-    /* 初始化分页数据 */
-    InitializeDataPaging() {
-        this.setData({
-            pageTotal: 2,
-            pageNumber: 1
-        })
-    },
-    /**
-     * 生命周期函数--监听页面隐藏
-     */
-    onHide: function () {
-        this.setData({
-            isOnShow: true
-        })
-    },
-
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload: function () {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh: function () {
-
-    },
-
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function () {
-        this.setData({
-            pageNumber: this.data.pageNumber + 1
-        })
-        if (this.data.pageNumber <= this.data.pageTotal) this.getList();
-    },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage: function () {
-
-    }
-})

+ 0 - 7
pages/tabbar-pages/supplyAndDemand/index.json

@@ -1,7 +0,0 @@
-{
-    "navigationStyle": "custom",
-    "usingComponents": {
-        "My_SupplyAndDemandItemBox": "/components/My_SupplyAndDemandItemBox/index",
-        "My_SupplyAndDemandList": "/components/My_SupplyAndDemandList/index"
-    }
-}

+ 0 - 121
pages/tabbar-pages/supplyAndDemand/index.wxml

@@ -1,121 +0,0 @@
-<!-- 自定义头部 -->
-<My_navBar></My_navBar>
-<!-- 轮播图 -->
-<My_BannerSwiper swiperBannerList="{{swiperBannerList}}"></My_BannerSwiper>
-<!-- tabs切换栏 -->
-<view style="min-height: 70vh;">
-    <view class="tabs_box">
-        <van-tabs active="{{ active }}" bind:change="tabsChange" custom-class="tabs-custom-class" tab-active-class="tabs-active-class" ellipsis="{{false}}" line-width="30px" color="#4DC2D4" title-active-color="#4DC2D4" swipeable>
-            <view style="height: 10rpx;"></view>
-            <van-tab title="所有信息">
-                <!-- 搜索 -->
-                <view class="my-need-search">
-                    <input class="my-need-search-input {{searchFocus?'my-need-search-inputfocus':''}}" confirm-type="search" placeholder="搜索关键字" type="text" bindfocus="needSearchFocus" bindblur="needSearchBlur" bindconfirm='needSearchBlur' />
-                    <view class="my-need-search-but">
-                        <van-icon name="search" />
-                    </view>
-                </view>
-                <!-- 宫格 -->
-                <view class="grid_box">
-                    <view class="grid_item" wx:for="{{ftypeList}}" wx:key="index" data-type="{{item.ftype}}" bindtap="switchScreenType">
-                        <view class="grid_item_image" wx:if="{{ftype==item.ftype}}">
-                            <image src="{{item.attinfos[1].fobsurl}}"></image>
-                        </view>
-                        <view wx:else class="grid_item_image">
-                            <image src="{{item.attinfos[0].fobsurl}}"></image>
-                        </view>
-                        <view class="grid_item_title u-line-1">{{item.ftype}}</view>
-                    </view>
-                </view>
-                <!-- 列表 -->
-                <My_SupplyAndDemandItemBox data-index="{{index}}" bindtap="jumpForDetails" wx:for="{{productList}}" wx:key="index" title="[{{item.ftype}}]{{item.ftitle}}" time="{{item.checkdate}}" imageList="{{item.attinfos}}" type='{{item.ftype}}' content="{{item.fcontent}}" bindstopOnShow="stopOnShow">
-                    <!-- 内容信息插槽 -->
-                    <view slot="dataAndBut">
-                        <view class="dataAndBut">
-                            <view class="dataAndBut_data">
-                                浏览次数:{{item.freadtimes}}次 沟通人数:{{item.fcommunicationtimes}}次
-                            </view>
-                            <!-- <view class="dataAndBut_but">
-                            <van-button wx:if="{{item.fstatus == '待对接'}}" color="#4DC2D4" style="margin-left: 16rpx;" custom-class="custom-slotBut" data-item="{{item}}" catchtap="toLinkUp">一键联系</van-button>
-                            <van-button wx:else color="#4DC2D4" style="margin-left: 16rpx;" custom-class="custom-NoSlotBut" catchtap="stop">{{item.fstatus}}</van-button>
-                        </view> -->
-                        </view>
-                    </view>
-                </My_SupplyAndDemandItemBox>
-            </van-tab>
-            <van-tab title="正在对接">
-                <view class="abutting-joint-box" wx:for="{{productList}}" wx:key="index">
-                    <view class="abutting-joint-titleAndMsg">
-                        <view class="abutting-joint-title u-line-1">[{{item.ftype}}]{{item.ftitle}}</view>
-                        <view class="abutting-joint-msg u-line-1"><text wx:if="{{item.imdialogs[0].funreadmsgcount!=0}}" style="color: #FF0000; opacity: .5;">[{{item.imdialogs[0].funreadmsgcount}}条]</text>
-                            <view style="display: inline-block;" wx:if="{{item.imdialogs[0].latestnews.length!=0}}">{{item.imdialogs[0].latestnews[0].fname}}:<text wx:if="{{item.imdialogs[0].latestnews[0].fmessagetype=='text'}}">{{item.imdialogs[0].latestnews[0].message.data.fcontent}}</text>
-                                <text wx:else>[图片]</text>
-                            </view>
-                        </view>
-                    </view>
-                    <view class="abutting-joint-timeAndBut">
-                        <view class="abutting-joint-time">{{item.checkdate}}</view>
-                        <van-button custom-class="abutting-joint-but" data-fdatastatus="2" data-timdialogid="{{item.imdialogs[0].timdialogid}}" catchtap="toLinkUpPage"><text class="abutting-joint-but-text">继续沟通</text></van-button>
-                    </view>
-                </view>
-                <view style="width: 100vw; height: 30rpx;"></view>
-            </van-tab>
-            <van-tab title="我的需求">
-                <!-- 搜索 -->
-                <view class="my-need-search">
-                    <input class="my-need-search-input {{searchFocus?'my-need-search-inputfocus':''}}" confirm-type="search" placeholder="搜索关键字" type="text" bindfocus="needSearchFocus" bindblur="needSearchBlur" bindconfirm='needSearchBlur' />
-                    <view class="my-need-search-but">
-                        <van-icon name="search" />
-                    </view>
-                </view>
-                <!-- 列表 -->
-                <My_SupplyAndDemandItemBox wx:for="{{productList}}" wx:key="index" title="【{{item.ftype}}】{{item.ftitle}}" time="{{item.checkdate}}" imageList="{{item.attinfos}}" data-index="{{index}}" bindtap="jumpForDetails" type='{{item.ftype}}' content="{{item.fcontent}}" bindstopOnShow="stopOnShow">
-                    <!-- 我的需求左上状态插槽 -->
-                    <view slot="myState" class="myState">
-                        <view class="myShowState {{item.fstatus=='正在对接'?'myNoSoldOut':''}}{{item.fstatus=='对接中'?'myNoSoldOut':''}} {{item.fstatus=='待对接'?'myNoSoldOut':''}}">
-                            <view wx:if="{{item.fstatus=='已解决'}}">已下架</view>
-                            <view wx:elif="{{item.fstatus=='新建'}}">未上架</view>
-                            <view wx:elif="{{item.fstatus=='待对接'}}">上架中</view>
-                            <view wx:elif="{{item.fstatus=='对接中'}}">对接中</view>
-                            <view wx:elif="{{item.fstatus=='正在对接'}}">对接中</view>
-                            <view wx:else>已下架</view>
-                        </view>
-                    </view>
-                    <!-- 下架按钮插槽 -->
-                    <view slot="soldOutBut">
-                        <van-button data-index="{{index}}" plain color="#4DC2D4" custom-class="soldOutBut" catchtap="soldOut">下架</van-button>
-                    </view>
-                    <!-- 内容信息插槽 -->
-                    <view slot="dataAndBut">
-                        <view class="dataAndBut">
-                            <view class="dataAndBut_data">
-                                浏览次数:{{item.freadtimes}} 沟通人数:{{item.fcommunicationtimes}}次
-                            </view>
-                            <view class="dataAndBut_but">
-                                <van-button color="#4DC2D4" data-item="{{item}}" style="margin-left: 16rpx;" custom-class="custom-slotBut" catchtap="showCommunicationOfNumber">沟通详情</van-button>
-                                <van-button color="#4DC2D4" data-index="{{index}}" style="margin-left: 16rpx;" custom-class="custom-slotBut" catchtap="productEdit">编辑</van-button>
-                            </view>
-                        </view>
-                    </view>
-                </My_SupplyAndDemandItemBox>
-            </van-tab>
-        </van-tabs>
-    </view>
-    <!-- 触底展示 -->
-<My_pageReachBottom dummyStatus="{{productList.length>=1}}" loadMore="{{pageNumber>=pageTotal}}"></My_pageReachBottom>
-</view>
-<!-- 我的需求弹框 -->
-<van-action-sheet show="{{ ifShowCommunicationOfNumber }}" bind:close="endShowCommunicationOfNumber">
-    <view class="CommunicationOfNumber">
-        <view class="CommunicationOfNumber-title">沟通列表</view>
-        <view class="CommunicationOfNumber-list">
-            <view wx:for="{{imdialogs}}" wx:key="index">{{item.createdate}}<text data-timdialogid="{{item.timdialogid}}" data-fdatastatus="{{item.fdatastatus}}" catchtap="toLinkUpPage" class="text">用户:{{item.fname}}</text><text wx:if="{{item.fdatastatus==0}}">发起联系,遗憾未达成合作</text><text wx:elif='{{item.fdatastatus==1}}'>发起联系,恭喜达成合作</text><text wx:else>发起联系,正在对接中</text></view>
-        </view>
-    </view>
-    <view style="height: 50px;"></view>
-</van-action-sheet>
-
-<!-- 安全距离 -->
-<view style="height: 34px;"></view>
-<!-- 右侧吸附固定按钮 -->
-<My_fixedButton bindclick='postDemand' />

+ 0 - 87
pages/tabbar-pages/supplyAndDemand/index.wxss

@@ -1,87 +0,0 @@
-
-
-/* tabs选中项样式 */
-.tabs-active-class {
-    font-family: PingFangSC-Medium, PingFang SC !important;
-    font-size: 32rpx !important;
-    font-weight: 600 !important;
-}
-
-
-
-
-
-
-.custom-NoSlotBut {
-    height: 44rpx !important;
-    background: linear-gradient(180deg, #D3D3D3 0%, #A7A8A8 100%) !important;
-    box-shadow: 0px 0px 12rpx 0px rgba(0, 0, 0, 0.1) !important;
-    border-radius: 10rpx !important;
-    color: #FFFFFF;
-    padding: 0 14rpx !important;
-    border: 0 !important;
-}
-
-/* 正在对接样式 */
-.abutting-joint-box {
-    width: 702rpx;
-    background: #FFFFFF;
-    border-radius: 20rpx;
-    padding: 0 14rpx;
-    box-sizing: border-box;
-    margin: 0 auto;
-}
-
-.abutting-joint-titleAndMsg {
-    height: 105rpx;
-    padding: 16rpx;
-    padding-top: 20rpx;
-    margin-top: 20rpx;
-    box-sizing: border-box;
-    border-bottom: 2rpx solid rgba(151, 151, 151, 0.2);
-}
-
-.abutting-joint-title {
-    font-size: 28rpx;
-    color: #000000;
-}
-
-.abutting-joint-msg {
-    font-size: 24rpx;
-    color: rgba(0, 0, 0, 0.5);
-    margin-top: 5rpx;
-}
-
-/* 时间和按钮 */
-.abutting-joint-timeAndBut {
-    display: flex;
-    height: 62rpx;
-    justify-content: space-between;
-    align-items: center;
-    padding-left: 16rpx;
-    box-sizing: border-box;
-}
-
-.abutting-joint-time {
-    font-size: 24rpx;
-    color: rgba(0, 0, 0, 0.3);
-}
-
-.abutting-joint-but {
-    width: 108rpx !important;
-    height: 44rpx !important;
-    background: linear-gradient(180deg, #84E3EC 0%, #4DC2D4 100%) !important;
-    box-shadow: 0px 0px 12rpx 0px rgba(0, 0, 0, 0.1) !important;
-    border-radius: 10rpx !important;
-    margin-right: 6rpx;
-}
-
-.abutting-joint-but-text {
-    position: absolute;
-    display: block;
-    font-size: 20rpx;
-    font-weight: 500;
-    color: #FFFFFF !important;
-    top: 0;
-    left: 13rpx;
-}

+ 17 - 0
utils/isLogin.js

@@ -0,0 +1,17 @@
+export default function queryLogin() {
+    let time = null;
+    if (!getApp().globalData.isLogin) {
+        wx.showToast({
+            title: '您当前还未登录,将自动跳转到登录界面',
+            icon: "none",
+            duration:2000
+        })
+        clearTimeout(time);
+        time = setTimeout(() => {
+            wx.navigateTo({
+                url: '/pages/login/index',
+            })
+        },2000)
+    }
+    return getApp().globalData.isLogin;
+}