Bladeren bron

完成首页我的关注搜索!

release/210823_需求对对碰
王饶冀 3 jaren geleden
bovenliggende
commit
a1bb0eb072
2 gewijzigde bestanden met toevoegingen van 17 en 4 verwijderingen
  1. 9
    4
      pages/index/index.js
  2. 8
    0
      pages/myModule/components/myAttention/myAttention.js

+ 9
- 4
pages/index/index.js Bestand weergeven

@@ -71,7 +71,11 @@ Page({
onRefresh: true,
},
onLoad() {
this.getListData();
},
onShow(){
// console.log(`会触发吗?`)
this.toSearch();
},
toggleMore() {
this.selectComponent('#item').toggle();
@@ -190,9 +194,7 @@ Page({
{ page, size, keyword, type, isInterest: 0 }
).then(res => {
// console.log(res);
this.setData({
listLoading: false
})
let tempListData = this.data.listData;
if (res.status == 0) {
let datas = res.data;
@@ -226,6 +228,9 @@ Page({
})
}
}
this.setData({
listLoading: false
})
}).catch(error => {
console.log(error, 'error appletLogin')
})

+ 8
- 0
pages/myModule/components/myAttention/myAttention.js Bestand weergeven

@@ -1,5 +1,6 @@
// pages/myModule/components/myCollect/myAttention.js
const $request = require('../../../../utils/request.js');
const app = getApp()
Page({

/**
@@ -105,11 +106,18 @@ Page({
).then(res => {
console.log(res);
if (res.status == 0) {
const businessCommunicationCustomer = wx.getStorageSync('businessCommunicationCustomer');
if(businessCommunicationCustomer){
businessCommunicationCustomer.attentionTypeIds = selectedTags.join(',');
wx.setStorageSync('businessCommunicationCustomer',businessCommunicationCustomer);
app.globalData.businessCommunicationCustomer = businessCommunicationCustomer;
}
wx.showToast({
title: '保存成功',
icon: 'success',
duration: 2000
})
wx.navigateBack()
}
wx.hideLoading()
}).catch(error => {

Laden…
Annuleren
Opslaan