瀏覽代碼

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

release/210823_需求对对碰
王饶冀 3 年之前
父節點
當前提交
058c3f1f99
共有 2 個檔案被更改,包括 6 行新增5 行删除
  1. 4
    3
      pages/index/index.js
  2. 2
    2
      pages/index/index.wxml

+ 4
- 3
pages/index/index.js 查看文件

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 查看文件

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

Loading…
取消
儲存