Bladeren bron

首页添加分享

release/210823_需求对对碰
王饶冀 3 jaren geleden
bovenliggende
commit
ac77419929
2 gewijzigde bestanden met toevoegingen van 17 en 7 verwijderingen
  1. BIN
      images/home/ShareApp.png
  2. 17
    7
      pages/index/index.js

BIN
images/home/ShareApp.png Bestand weergeven


+ 17
- 7
pages/index/index.js Bestand weergeven

// 当前登录用户已设置的关注类型 // 当前登录用户已设置的关注类型
attentionTypeIds: "", attentionTypeIds: "",
// 用来判断关注显示按钮 // 用来判断关注显示按钮
paramIsInterest:0,
customerId:null,
paramIsInterest: 0,
customerId: null,
}, },
onLoad() { onLoad() {
}, },
const businessCommunicationCustomer = wx.getStorageSync('businessCommunicationCustomer') || null; const businessCommunicationCustomer = wx.getStorageSync('businessCommunicationCustomer') || null;
if (businessCommunicationCustomer) { if (businessCommunicationCustomer) {
let attentionTypeIds = businessCommunicationCustomer.attentionTypeIds; let attentionTypeIds = businessCommunicationCustomer.attentionTypeIds;
if(attentionTypeIds){
if (attentionTypeIds) {
attentionTypeIds = attentionTypeIds.split(','); attentionTypeIds = attentionTypeIds.split(',');
} }
this.setData({ this.setData({
attentionTypeIds, attentionTypeIds,
customerId:businessCommunicationCustomer.customerId
customerId: businessCommunicationCustomer.customerId
}) })
} }
}, },
type = app.globalData.businessCommunicationCustomer.attentionTypeIds; type = app.globalData.businessCommunicationCustomer.attentionTypeIds;
} }
let paramIsInterest = 0; let paramIsInterest = 0;
if(isInterest){
if (isInterest) {
paramIsInterest = isInterest; paramIsInterest = isInterest;
} }
this.setData({ this.setData({
this.setData({ this.setData({
listLoading: false listLoading: false
}) })
if(this.data.attentionTypeIds && this.data.currentTab == 'my'){
if(this.data.attentionTypeIds.length > 0 && this.data.total == 0){
if (this.data.attentionTypeIds && this.data.currentTab == 'my') {
if (this.data.attentionTypeIds.length > 0 && this.data.total == 0) {
this.getListData(1); this.getListData(1);
} }
} }
} }
}) })
}, },
/**
* 用户点击右上角分享
*/
onShareAppMessage(){
return {
title: "分享你一个需求交流平台!推荐你一起来关注~",
imageUrl: '/image/home/ShareApp.png',
path: 'pages/index/index'
}
},
}) })

Laden…
Annuleren
Opslaan