@@ -69,6 +69,7 @@ App({ | |||
this.globalData.businessCommunicationCustomer = businessCommunicationCustomer; | |||
this.globalData.customerId = businessCommunicationCustomer.customerId; | |||
} | |||
console.log(`初始化拿到的缓存`,this.globalData) | |||
} | |||
} | |||
}) |
@@ -46,7 +46,7 @@ | |||
<image class="browse-img" src="/images/home/browse-icon.png" /> | |||
{{ item.pageView || 0}}浏览量 | |||
</view> | |||
<view class="fl list-collect-view" wx:if="{{ pageStatus == 'detatil' }}" bindtap="productCollect"> | |||
<view class="fl list-collect-view" wx:if="{{ pageStatus == 'detatil' && app.globalData.customerId != item.globalData }}" 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 /> | |||
收藏 |
@@ -15,7 +15,7 @@ Page({ | |||
}, | |||
{ | |||
text: "我关注的", | |||
value: "my1" | |||
value: "my" | |||
}, | |||
{ | |||
text: "工商类", | |||
@@ -84,7 +84,6 @@ Page({ | |||
}, | |||
// 点击搜索 | |||
toSearch(e) { | |||
console.log(this.data.keyword) | |||
this.setData({ | |||
listData: [], | |||
onRefresh: true, | |||
@@ -97,10 +96,6 @@ Page({ | |||
// tab切换 | |||
tabChange(e) { | |||
let dataset = e.currentTarget.dataset; | |||
// if(dataset.value == 'my1'){ | |||
// console.log(this.selectComponent('#shouquan')); | |||
// return | |||
// } | |||
// 如果实在加载中点击无效 | |||
if (this.data.listLoading) { | |||
return | |||
@@ -188,6 +183,9 @@ Page({ | |||
if (type == 'all') { | |||
type = ""; | |||
} | |||
if(currentTab == 'my' ){ | |||
type = app.globalData.businessCommunicationCustomer.attentionTypeIds; | |||
} | |||
$request.get('/businessCommunicationDemand/getDemandByKeywordOrType.action', | |||
{ page, size, keyword, type, isInterest: 0 } | |||
).then(res => { |
@@ -45,16 +45,19 @@ | |||
<view wx:else> | |||
<view class="not-data" wx:if="{{ listData.length < 1 }}"> | |||
<image class="not-data-img" src="/images/home/not-data.png" /> | |||
<view class="not-info" wx:if="{{ currentTab == 'all ' }}"> | |||
抱歉,暂无任何需求 | |||
</view> | |||
<view class="not-info" wx:else> | |||
抱歉,暂无任何需求 | |||
<view class="not-info" wx:if="{{ currentTab == 'all' }}">抱歉,暂无任何需求</view> | |||
<view class="not-info" wx:elif="{{ currentTab == 'my' }}"> | |||
<view>您尚未设置关注类型喜好</view> | |||
<view style="margin-bottom: 10rpx;">设置后将为您进行需求推荐~</view> | |||
<van-button class="set-attention-btn" color="#5e73e5" round bind:click="setAttention"> | |||
设置关注类型喜好 | |||
</van-button> | |||
</view> | |||
<view class="not-info" wx:else>抱歉,暂无任何需求</view> | |||
</view> | |||
<view wx:else> | |||
<view class="list-view" wx:for="{{ listData }}" wx:key="*this"> | |||
<listItem item="{{ item }}" bind:getItem="goDetails"/> | |||
<listItem item="{{ item }}" bind:getItem="goDetails" /> | |||
</view> | |||
<view class="text-center" wx:if="{{ itemLoading }}"> | |||
<van-loading size="24px">加载中...</van-loading> |