2 其他页面点击进入详情, 自己查看自己不显示推荐。自己查看别人的产品显示推荐! 3 调整首页tabbar间距 4 调整我的页面点击退出新加弹框 以及按钮相关样式。 5 调整 list块相关样式 6 修改tabbar选中颜色release/210823_需求对对碰
| @@ -97,4 +97,9 @@ | |||
| white-space:nowrap; | |||
| overflow:hidden; | |||
| text-overflow:ellipsis; | |||
| } | |||
| } | |||
| .my-tabbar .weui-bar__item_on .weui-tabbar__label{ | |||
| color: #5e73e5!important; | |||
| } | |||
| @@ -59,19 +59,20 @@ | |||
| color: #827de5; | |||
| border-radius: 16px; | |||
| border: solid 1px #827de5; | |||
| width: 96rpx; | |||
| height: 32rpx; | |||
| line-height: 32rpx; | |||
| font-size: 20rpx; | |||
| width: 106rpx; | |||
| height: 40rpx; | |||
| line-height: 38rpx; | |||
| font-size: 22rpx; | |||
| text-align: center; | |||
| margin-top: 15rpx; | |||
| margin-top: 12rpx; | |||
| margin-left: 15rpx; | |||
| box-sizing: border-box; | |||
| } | |||
| .list-home .home-img{ | |||
| width: 22rpx; | |||
| height: 23rpx; | |||
| position: relative; | |||
| top: 2rpx; | |||
| top: 3rpx; | |||
| } | |||
| /* 内容容器 */ | |||
| @@ -136,11 +137,11 @@ | |||
| width: 24rpx; | |||
| height: 24rpx; | |||
| position: relative; | |||
| top: 1rpx; | |||
| top: 4rpx; | |||
| } | |||
| .list-foot-text-chat { | |||
| height: 62rpx; | |||
| width: 180rpx; | |||
| height: 60rpx; | |||
| width: 160rpx; | |||
| background-color: #5e73e5; | |||
| box-shadow: -1px 3px 12px 4px | |||
| rgba(62, 95, 179, 0.14); | |||
| @@ -157,19 +158,21 @@ | |||
| left: -10rpx; | |||
| } | |||
| .list-collect-view .collect-img { | |||
| width: 22rpx; | |||
| height: 19rpx; | |||
| } | |||
| .list-collect-view { | |||
| color: #e16531; | |||
| font-size: 22rpx; | |||
| } | |||
| .list-collect-view .collect-img { | |||
| width: 26rpx; | |||
| height: 23rpx; | |||
| position: relative; | |||
| top: 1rpx; | |||
| top: 4rpx; | |||
| } | |||
| .is-details-page .list-foot-text-lf{ | |||
| margin-right: 20rpx; | |||
| margin-right: 16rpx; | |||
| } | |||
| /* 置顶 */ | |||
| @@ -58,6 +58,7 @@ Component({ | |||
| return | |||
| } | |||
| } | |||
| const url = e.detail.item.pagePath; | |||
| // wx.redirectTo({ url }); | |||
| wx.navigateTo({ | |||
| @@ -4,5 +4,6 @@ | |||
| list="{{list}}" | |||
| bindchange="tabChange" | |||
| current="{{currentIndex}}" | |||
| ext-class="my-tabbar" | |||
| /> | |||
| </view> | |||
| @@ -1 +1,2 @@ | |||
| /* components/tabbar/tabbar.wxss */ | |||
| /* components/tabbar/tabbar.wxss */ | |||
| @@ -33,12 +33,20 @@ Page({ | |||
| totalPageView: 0, | |||
| // 是他人主业还是个人主业 | |||
| isOther: false, | |||
| // 登录用户ID | |||
| loginCustomerId:"", | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad: function (options) { | |||
| const businessCommunicationCustomer = wx.getStorageSync('businessCommunicationCustomer') || null; | |||
| if (businessCommunicationCustomer) { | |||
| this.setData({ | |||
| loginCustomerId: businessCommunicationCustomer.customerId | |||
| }) | |||
| } | |||
| const eventChannel = this.getOpenerEventChannel() | |||
| // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 | |||
| eventChannel.on('customerid', data => { | |||
| @@ -55,6 +63,12 @@ Page({ | |||
| this.getListData(); | |||
| }) | |||
| }, | |||
| // 进入详情 | |||
| goDetails(e) { | |||
| wx.navigateTo({ | |||
| url: '/pages/index/components/listDetails/Details?businessCommunicationDemandId=' + e.detail, | |||
| }) | |||
| }, | |||
| saveHomeCollect() { | |||
| $request.post('/statisticsBusinessCommunicationDemand/saveHomeCollect.action', | |||
| { customerId: this.data.customerId } | |||
| @@ -54,7 +54,7 @@ | |||
| </view> | |||
| <view wx:else> | |||
| <view class="list-view" wx:for="{{ listData }}" wx:key="*this"> | |||
| <listItem item="{{ item }}" bind:getItem="goDetails" pageStatus="homepage" isOther="{{ isOther }}" /> | |||
| <listItem item="{{ item }}" bind:getItem="goDetails" pageStatus="homepage" isOther="{{ isOther }}" customerId="{{ loginCustomerId }}"/> | |||
| </view> | |||
| <view class="text-center" wx:if="{{ itemLoading }}"> | |||
| <van-loading size="24px">加载中...</van-loading> | |||
| @@ -122,7 +122,13 @@ Page({ | |||
| pageLoading: true, | |||
| }) | |||
| } | |||
| this.getListData(); | |||
| if(this.data.currentData.customerId == this.data.userCustomerId){ | |||
| this.setData({ | |||
| pageLoading: false, | |||
| }) | |||
| }else{ | |||
| this.getListData(); | |||
| } | |||
| }).catch(err => { | |||
| console.log(error, 'error appletLogin') | |||
| }) | |||
| @@ -7,21 +7,23 @@ | |||
| <view class="list-view"> | |||
| <listItem item="{{ currentData }}" pageStatus="detatil" isCollect="{{ isCollect }}" isShowCollect="{{ customerId != currentData.customerId }}" bind:changeCollect="changeCollect" customerId="{{ userCustomerId }}" /> | |||
| </view> | |||
| <view class="view-interested">你可能感兴趣的需求</view> | |||
| <view class="not-data" wx:if="{{ listData.length < 1 }}"> | |||
| <image class="not-data-img" src="/images/home/not-data.png" /> | |||
| <view class="not-info">没有更多感兴趣的需求</view> | |||
| </view> | |||
| <view wx:else> | |||
| <view class="list-view" wx:for="{{ listData }}" wx:key="*this"> | |||
| <listItem item="{{ item }}" bind:getItem="goDetails" customerId="{{ userCustomerId }}" /> | |||
| </view> | |||
| <view class="text-center" wx:if="{{ itemLoading }}"> | |||
| <van-loading size="24px">加载中...</van-loading> | |||
| <view wx:if="{{ userCustomerId != currentData.customerId }}"> | |||
| <view class="view-interested">你可能感兴趣的需求</view> | |||
| <view class="not-data" wx:if="{{ listData.length < 1 }}"> | |||
| <image class="not-data-img" src="/images/home/not-data.png" /> | |||
| <view class="not-info">没有更多感兴趣的需求</view> | |||
| </view> | |||
| <view class="list-finished text-center" wx:if="{{ isFinished }}"> | |||
| <image class="finished-img" src="/images/home/finished-icon.png" /> | |||
| 没有更多啦~ | |||
| <view wx:else> | |||
| <view class="list-view" wx:for="{{ listData }}" wx:key="*this"> | |||
| <listItem item="{{ item }}" bind:getItem="goDetails" customerId="{{ userCustomerId }}" /> | |||
| </view> | |||
| <view class="text-center" wx:if="{{ itemLoading }}"> | |||
| <van-loading size="24px">加载中...</van-loading> | |||
| </view> | |||
| <view class="list-finished text-center" wx:if="{{ isFinished }}"> | |||
| <image class="finished-img" src="/images/home/finished-icon.png" /> | |||
| 没有更多啦~ | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| @@ -55,7 +55,7 @@ Page({ | |||
| }, | |||
| ], | |||
| moreTab: "gengduo", | |||
| moreTitle: "更多", | |||
| moreTitle: "更多分类", | |||
| // list数据加载 | |||
| // list块加载 | |||
| listLoading: true, | |||
| @@ -127,7 +127,7 @@ Page({ | |||
| } | |||
| this.setData({ | |||
| currentTab: dataset.value, | |||
| moreTitle: "更多", | |||
| moreTitle: "更多分类", | |||
| moreTab: "gengduo" | |||
| }) | |||
| this.toSearch(); | |||
| @@ -157,7 +157,7 @@ Page({ | |||
| }, | |||
| // 进入详情 | |||
| goDetails(e) { | |||
| wx.reLaunch({ | |||
| wx.navigateTo({ | |||
| url: '/pages/index/components/listDetails/Details?businessCommunicationDemandId=' + e.detail, | |||
| }) | |||
| }, | |||
| @@ -284,7 +284,7 @@ Page({ | |||
| } | |||
| this.setData({ | |||
| currentTab: 'my', | |||
| moreTitle: "更多", | |||
| moreTitle: "更多分类", | |||
| moreTab: "gengduo" | |||
| }) | |||
| let customerid = app.globalData.customerId; | |||
| @@ -80,7 +80,7 @@ | |||
| } | |||
| .search-view .set-attention { | |||
| margin-top: 14rpx; | |||
| margin-top: -4rpx; | |||
| padding-left: 40rpx; | |||
| font-size: 24rpx; | |||
| color: #556fb5 !important; | |||
| @@ -111,7 +111,7 @@ | |||
| float: left; | |||
| box-sizing: border-box; | |||
| height: 70rpx; | |||
| padding: 0 13rpx; | |||
| padding: 0 15rpx; | |||
| } | |||
| .tab-view .tab-span { | |||
| @@ -24,7 +24,11 @@ Page({ | |||
| }) | |||
| } | |||
| }, | |||
| onShow(){ | |||
| this.setData({ | |||
| currentIndex: 2 | |||
| }) | |||
| }, | |||
| // 获取手机号授权 | |||
| getPhoneNumber(e) { | |||
| console.log(e); | |||
| @@ -250,7 +250,7 @@ Page({ | |||
| // 进入详情 | |||
| goDetails(e) { | |||
| let value = e.currentTarget.dataset.value; | |||
| wx.reLaunch({ | |||
| wx.navigateTo({ | |||
| url: '/pages/index/components/listDetails/Details?businessCommunicationDemandId=' + value, | |||
| }) | |||
| }, | |||
| @@ -460,6 +460,10 @@ Page({ | |||
| }) | |||
| } | |||
| }, | |||
| // 图片预览 | |||
| viewImg(e){ | |||
| }, | |||
| }) | |||
| @@ -45,7 +45,7 @@ | |||
| <image class='other-head-img' src='{{item.senderHeadPortrait}}'></image> | |||
| <view class='other-record-content-triangle'></view> | |||
| <view class='other-record-content'> | |||
| <image class='content-img' src="{{ mangerUrl + item.content }}"></image> | |||
| <image class='content-img' src="{{ mangerUrl + item.content }}" data-url="{{ mangerUrl + item.message }}" bindtap="viewImg"></image> | |||
| <view class="msg-isRead left">{{ item.isRead ? '已读' : '未读' }}</view> | |||
| </view> | |||
| </view> | |||
| @@ -57,7 +57,7 @@ | |||
| </view> | |||
| <view class='own-record'> | |||
| <view class='own-record-content'> | |||
| <image class='content-img' src="{{ mangerUrl + item.content }}"></image> | |||
| <image class='content-img' src="{{ mangerUrl + item.content }}" data-url="{{ mangerUrl + item.message }}" bindtap="viewImg"></image> | |||
| <view class="msg-isRead right"> | |||
| {{ item.isRead ? '已读' : '未读' }} | |||
| </view> | |||
| @@ -116,7 +116,7 @@ | |||
| <image class='other-head-img' src='{{receivebaseInfo.avatar}}'></image> | |||
| <view class='other-record-content-triangle'></view> | |||
| <view class='other-record-content'> | |||
| <image class='content-img' src="{{ mangerUrl + item.message }}"></image> | |||
| <image class='content-img' src="{{ mangerUrl + item.message }}" data-url="{{ mangerUrl + item.message }}" bindtap="viewImg"></image> | |||
| <view class="msg-isRead left">{{ item.isRead ? '已读' : '未读' }}</view> | |||
| </view> | |||
| </view> | |||
| @@ -128,7 +128,7 @@ | |||
| </view> | |||
| <view class='own-record'> | |||
| <view class='own-record-content'> | |||
| <image class='content-img' src="{{ mangerUrl + item.message }}"></image> | |||
| <image class='content-img' src="{{ mangerUrl + item.message }}" data-url="{{ mangerUrl + item.message }}" bindtap="viewImg"></image> | |||
| <view class="msg-isRead right">{{ item.isRead ? '已读' : '未读' }}</view> | |||
| </view> | |||
| <view class='own-record-content-triangle'></view> | |||
| @@ -349,4 +349,7 @@ page { | |||
| } | |||
| .msg-isRead.right { | |||
| left: -60rpx; | |||
| } | |||
| .content-img { | |||
| width: 450rpx; | |||
| } | |||
| @@ -65,7 +65,7 @@ Page({ | |||
| // 进入详情 | |||
| goDetails(e) { | |||
| wx.reLaunch({ | |||
| wx.navigateTo({ | |||
| url: '/pages/index/components/listDetails/Details?businessCommunicationDemandId=' + e.detail, | |||
| }) | |||
| }, | |||
| @@ -36,14 +36,14 @@ Page({ | |||
| if (app.globalData.businessCommunicationCustomer) { | |||
| this.setData({ | |||
| user: app.globalData.businessCommunicationCustomer, | |||
| isLogin:true | |||
| isLogin: true | |||
| }) | |||
| console.log(`------------------当前登录用户-----------------------`) | |||
| console.log(app.globalData.businessCommunicationCustomer); | |||
| console.log(`------------------当前登录用户-----------------------`) | |||
| } | |||
| }, | |||
| onShow(){ | |||
| onShow() { | |||
| this.setData({ | |||
| currentIndex: 3 | |||
| }) | |||
| @@ -90,20 +90,30 @@ Page({ | |||
| }) | |||
| }, | |||
| // 退出登录 | |||
| exitLogin(){ | |||
| wx.removeStorageSync('userInfo'); | |||
| wx.removeStorageSync('businessCommunicationCustomer'); | |||
| app.globalData.businessCommunicationCustomer = null; | |||
| app.globalData.customerId = null; | |||
| this.setData({ | |||
| user:{}, | |||
| isLogin:false | |||
| exitLogin() { | |||
| wx.showModal({ | |||
| title: '提示', | |||
| content: "是否确认退出账号?", | |||
| confirmText: "确认", | |||
| cancelText: "取消", | |||
| success(res) { | |||
| if (res.confirm) { | |||
| wx.removeStorageSync('userInfo'); | |||
| wx.removeStorageSync('businessCommunicationCustomer'); | |||
| app.globalData.businessCommunicationCustomer = null; | |||
| app.globalData.customerId = null; | |||
| this.setData({ | |||
| user: {}, | |||
| isLogin: false | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| }, | |||
| /** | |||
| * 用户点击右上角分享给朋友 | |||
| */ | |||
| onShareAppMessage() { | |||
| onShareAppMessage() { | |||
| return { | |||
| title: "分享你一个需求交流平台!推荐你一起来关注~", | |||
| imageUrl: '/images/home/ShareApp-index.png', | |||
| @@ -16,10 +16,10 @@ | |||
| <view class="user-name-box fl" wx:else> | |||
| <view class="user-name yichu fl">{{ user.nickName }}</view> | |||
| </view> | |||
| <view class="user-address fl">{{ user.province + (user.city ? '·' + user.city : '') }}</view> | |||
| <view class="user-address fl">{{ user.province + (user.city ? ' · ' + user.city : '') }}</view> | |||
| <view class="show-home-page fl" bindtap="goRouterPage" data-code="homepage"> | |||
| <image class="home-page-img" src="/images/home/home-page-icon.png" /> | |||
| 查 看 主 页 >> | |||
| 查看主页 >> | |||
| </view> | |||
| </view> | |||
| <view class="exit-view" bindtap="exitLogin"> | |||
| @@ -144,22 +144,33 @@ | |||
| .content .li-view .my-attention-img{ | |||
| width: 44rpx; | |||
| height: 41rpx; | |||
| top:7rpx; | |||
| } | |||
| .content .li-view .my-release-img{ | |||
| top: 10rpx; | |||
| top: 13rpx; | |||
| } | |||
| .content .li-view .my-collect-img{ | |||
| width: 41rpx; | |||
| height: 41rpx; | |||
| top: 9rpx; | |||
| top: 10rpx; | |||
| margin-left: 4rpx; | |||
| left: 0rpx; | |||
| } | |||
| .content .li-view .my-attention-img{ | |||
| top:10rpx; | |||
| margin-left: 1rpx; | |||
| } | |||
| .content .li-view .my-contact-img{ | |||
| width: 37rpx; | |||
| height: 35rpx; | |||
| top: 7rpx; | |||
| margin-left: 10rpx; | |||
| left: -5rpx; | |||
| } | |||
| .content .li-view .right-icon { | |||
| @@ -28,7 +28,7 @@ Page({ | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad() { | |||
| const eventChannel = this.getOpenerEventChannel() | |||
| if (eventChannel.on) { | |||
| // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 | |||