@@ -12,17 +12,22 @@ Component({ | |||
// index => 首页 detatil => 详情 homepage => 个人主页 | |||
pageStatus: { | |||
type: String, | |||
default: 'index', | |||
value: 'index', | |||
}, | |||
// 是否收藏 | |||
isCollect: { | |||
type: Boolean, | |||
default: false | |||
value:false, | |||
}, | |||
// 是否其他查看主页---用于是否显示聊一聊 | |||
isOther:{ | |||
type: Boolean, | |||
value:true, | |||
}, | |||
// 类名 | |||
listClass: { | |||
type: String, | |||
default: "", | |||
value: "", | |||
}, | |||
}, | |||
@@ -66,13 +71,13 @@ Component({ | |||
return | |||
} | |||
console.log(`点击了聊一聊`) | |||
wx.navigateTo({ | |||
url:"/pages/msgModule/wechat2/wechat2", | |||
success: function (res) { | |||
// 通过eventChannel向被打开页面传送数据 | |||
res.eventChannel.emit('customerid', { customerid }) | |||
} | |||
}) | |||
// wx.navigateTo({ | |||
// url:"/pages/msgModule/wechat2/wechat2", | |||
// success: function (res) { | |||
// // 通过eventChannel向被打开页面传送数据 | |||
// res.eventChannel.emit('customerid', { customerid }) | |||
// } | |||
// }) | |||
}, | |||
} | |||
}) |
@@ -44,14 +44,14 @@ | |||
</view> | |||
<view class="fl list-foot-text-lf"> | |||
<image class="browse-img" src="/images/home/browse-icon.png" /> | |||
{{ item.pageView }}浏览量 | |||
{{ item.pageView || 0}}浏览量 | |||
</view> | |||
<view class="fl list-collect-view" wx:if="{{ pageStatus == 'detatil' }}" bindtap="productCollect"> | |||
<image class="collect-img" src="/images/home/is-collect.png" wx:if="{{ isCollect }}" /> | |||
<image class="collect-img" src="/images/home/not-collect.png" wx:else /> | |||
收藏 | |||
</view> | |||
<view class="fr list-foot-text-chat" wx:if="{{ pageStatus != 'myRelease' }}" bindtap="goToChat"> | |||
<view class="fr list-foot-text-chat" wx:if="{{ pageStatus != 'myRelease' && isOther }}" bindtap="goToChat"> | |||
<image class="chat-img" src="/images/home/chat-icon.png" /> | |||
聊一聊 | |||
</view> |
@@ -1,4 +1,5 @@ | |||
// pages/index/components/homepage/homepage.js | |||
const app = getApp() | |||
const $request = require('../../../../utils/request.js'); | |||
const $util = require('../../../../utils/util.js'); | |||
Page({ |
@@ -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"/> | |||
<listItem item="{{ item }}" bind:getItem="goDetails" pageStatus="homepage" isOther="{{ isOther }}"/> | |||
</view> | |||
<view class="text-center" wx:if="{{ itemLoading }}"> | |||
<van-loading size="24px">加载中...</van-loading> | |||
@@ -72,7 +72,7 @@ | |||
round | |||
bind:click="footBtnClick" | |||
> | |||
立即沟通 | |||
{{ isOther ? '立即沟通' : '发布需求'}} | |||
</van-button> | |||
</view> | |||
</view> |
@@ -1,6 +1,7 @@ | |||
// pages/index/components/listDetails/Details.js | |||
const app = getApp() | |||
const $request = require('../../utils/request.js'); | |||
const $util = require('../../utils/util.js'); | |||
Page({ | |||
/** | |||
@@ -112,10 +113,11 @@ Page({ | |||
if (res1.confirm) { | |||
that.clearData(); | |||
console.log('用户点击确定') | |||
} else if (res1.cancel) { | |||
} else if (res1.cancel) { | |||
let listDetail = res.data; | |||
if (typeof listDetail.type == 'string') { | |||
listDetail.type = listDetail.type.split(','); | |||
listDetail.createdOn = $util.formatTime(new Date(el.createdOn), true); | |||
} | |||
that.clearData(); | |||
wx.navigateTo({ |