소스 검색

提交代码~

release/210823_需求对对碰
王饶冀 3 년 전
부모
커밋
a195faec0b
4개의 변경된 파일15개의 추가작업 그리고 13개의 파일을 삭제
  1. 1
    0
      app.js
  2. 1
    1
      components/listItem/listItem.wxml
  3. 4
    6
      pages/index/index.js
  4. 9
    6
      pages/index/index.wxml

+ 1
- 0
app.js 파일 보기

@@ -69,6 +69,7 @@ App({
this.globalData.businessCommunicationCustomer = businessCommunicationCustomer;
this.globalData.customerId = businessCommunicationCustomer.customerId;
}
console.log(`初始化拿到的缓存`,this.globalData)
}
}
})

+ 1
- 1
components/listItem/listItem.wxml 파일 보기

@@ -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 />
收藏

+ 4
- 6
pages/index/index.js 파일 보기

@@ -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 => {

+ 9
- 6
pages/index/index.wxml 파일 보기

@@ -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>

Loading…
취소
저장