Bläddra i källkod

处理首页我关注的查询问题!

release/210823_需求对对碰
王饶冀 3 år sedan
förälder
incheckning
058c3f1f99
2 ändrade filer med 6 tillägg och 5 borttagningar
  1. 4
    3
      pages/index/index.js
  2. 2
    2
      pages/index/index.wxml

+ 4
- 3
pages/index/index.js Visa fil

let attentionTypeIds = businessCommunicationCustomer.attentionTypeIds; let attentionTypeIds = businessCommunicationCustomer.attentionTypeIds;
if (attentionTypeIds) { if (attentionTypeIds) {
attentionTypeIds = attentionTypeIds.split(','); attentionTypeIds = attentionTypeIds.split(',');
}else{
} else {
attentionTypeIds = []; attentionTypeIds = [];
} }
this.setData({ this.setData({
} }
}, },
onShow() { onShow() {
}, },
toggleMore() { toggleMore() {
this.selectComponent('#item').toggle(); this.selectComponent('#item').toggle();
if (currentTab == 'my') { if (currentTab == 'my') {
if (app.globalData.businessCommunicationCustomer) { if (app.globalData.businessCommunicationCustomer) {
type = app.globalData.businessCommunicationCustomer.attentionTypeIds; type = app.globalData.businessCommunicationCustomer.attentionTypeIds;
if(!type){
if (!type) {
this.setData({ this.setData({
listLoading: false listLoading: false
}) })
let paramIsInterest = 0; let paramIsInterest = 0;
if (isInterest) { if (isInterest) {
paramIsInterest = isInterest; paramIsInterest = isInterest;
type = "";
} }
this.setData({ this.setData({
paramIsInterest paramIsInterest

+ 2
- 2
pages/index/index.wxml Visa fil

</view> </view>
</view> </view>
<view wx:else> <view wx:else>
<view class="not-data clearfix" wx:if="{{ paramIsInterest == 1 }}">
<view class="not-data clearfix" wx:if="{{ paramIsInterest == 2 }}">
<view class="not-info-attention-type"> <view class="not-info-attention-type">
<view class="not-data-attention-view fl"> <view class="not-data-attention-view fl">
<image class="not-data-attention-img" src="/images/home/not-data-attention-img.png" /> <image class="not-data-attention-img" src="/images/home/not-data-attention-img.png" />
</van-button> </van-button>
</view> </view>
</view> </view>
<view class="view-interested" wx:if="{{ paramIsInterest == 1 }}">为您推荐以下内容</view>
<view class="view-interested" wx:if="{{ paramIsInterest == 2 }}">为您推荐以下内容</view>
<view class="list-view" wx:for="{{ listData }}" wx:key="index"> <view class="list-view" wx:for="{{ listData }}" wx:key="index">
<listItem item="{{ item }}" bind:getItem="goDetails" customerId="{{ customerId }}"/> <listItem item="{{ item }}" bind:getItem="goDetails" customerId="{{ customerId }}"/>
</view> </view>

Laddar…
Avbryt
Spara