From 51e2b884c845a136bf949b5749fadab7df26c539 Mon Sep 17 00:00:00 2001 From: slj Date: Mon, 29 Nov 2021 18:01:00 +0800 Subject: [PATCH] bug --- config.js | 2 +- models/user.js | 12 +++++++++++- pages/topics/attract/oceanDetail/index.wxml | 10 +++++++++- pages/user/index.js | 2 +- pages/user/myFavorite/index.js | 21 +++++++++++---------- pages/user/myFavorite/index.wxml | 4 ++-- pages/user/myFavorite/index.wxss | 2 +- project.private.config.json | 6 ++++++ 8 files changed, 42 insertions(+), 17 deletions(-) diff --git a/config.js b/config.js index ba42733..a7c1b78 100644 --- a/config.js +++ b/config.js @@ -1,5 +1,5 @@ const config = { - // api_url: 'http://10.10.11.214:7101/fqsb', // 服务器地址 + // api_url: 'http://10.10.11.107:7101/fqsb', // 服务器地址 // api_url: 'https://shibeirencai.elinkit.com.cn:7101/fqsb' // 正式环境 api_url: 'https://dingoa.elinkit.com.cn/fqsb', // 测试环境 } diff --git a/models/user.js b/models/user.js index 1511eb9..f5316fd 100644 --- a/models/user.js +++ b/models/user.js @@ -18,7 +18,8 @@ const UserConst = { user_saveWhistleComment_url:'/api/whistle/saveComment' ,// 吹哨评价 user_updatePhone_url:'/api/miniuser/updatephone',//更新电话号码 navigate_user_url:'/api/miniuser/wxregisterbyparams', - whistle_message_url:'/api/whistle/getnoread' + whistle_message_url:'/api/whistle/getnoread', + user_myCollect_url:'/api/collect/collectionListNew' } class UserModel extends HTTP { constructor () { @@ -254,6 +255,15 @@ class UserModel extends HTTP { } this.request(params) } + + getCollectList(page, success) { + let params = { + url: `${UserConst.user_myCollect_url}?pageNo=${page}&pageSize=10`, + method: Method.GET, + success: success + } + this.request(params) + } } export { UserModel } \ No newline at end of file diff --git a/pages/topics/attract/oceanDetail/index.wxml b/pages/topics/attract/oceanDetail/index.wxml index 0e30d6d..a07f46c 100644 --- a/pages/topics/attract/oceanDetail/index.wxml +++ b/pages/topics/attract/oceanDetail/index.wxml @@ -23,7 +23,15 @@ - 点击“关联链接”填报需求 + + 点击“关联链接” + + 填报需求 + + + 来活动 + + 关联链接 diff --git a/pages/user/index.js b/pages/user/index.js index 8cb3948..80e9cec 100644 --- a/pages/user/index.js +++ b/pages/user/index.js @@ -343,7 +343,7 @@ Page({ const { type } = e.currentTarget.dataset - console.log(type) + console.log('type-->',type) if (this.data.isAuth) { if (type === 'myInfo') { diff --git a/pages/user/myFavorite/index.js b/pages/user/myFavorite/index.js index 7b1ebd0..2bb5c2e 100644 --- a/pages/user/myFavorite/index.js +++ b/pages/user/myFavorite/index.js @@ -32,20 +32,20 @@ Page({ }, fetchMyFavoriteList () { let page = this.data.currentPage; - let type = this.data.type; - userModel.getMyFavoriteList(page,type,res => { - const datas = res.result.list; + userModel.getCollectList(page,res=> { + console.log('我的收藏--->',res) + const datas = res.result.records; let tempDatas = []; datas.forEach(item => { tempDatas.push({ topicId: item.contentId, title: item.title, topicImg: item.image, - userIcon: item.groupAvator, - userName: item.author, + // userIcon: item.groupAvator, + // userName: item.author, time: item.createTime, - commentNum: item.commentNum || '', - type: item.type + // commentNum: item.commentNum || '', + type: item.typeCode }) }) if (page == 1) { @@ -69,7 +69,7 @@ Page({ }) } } - console.log(this.data.list) + console.log('this.data.list-->',this.data.list) wx.stopPullDownRefresh() }) }, @@ -94,6 +94,7 @@ Page({ this.fetchMyFavoriteList() }, clickListItem (e) { + // console.log('点击--',e) if (e.detail.id) { let id = e.detail.id let type = e.detail.type; @@ -102,9 +103,9 @@ Page({ url: '/pages/resource/detail/index?id=' + id }) return; - }else if(type == '4'){ + }else if(type == '5'){ wx.navigateTo({ - url: '/pages/topics/rent/detail/index?id=' + id + url: `/pages/topics/activity/activityDetail/index?activityId=${id}`, }) return; }else{ diff --git a/pages/user/myFavorite/index.wxml b/pages/user/myFavorite/index.wxml index 599f0c1..41aa738 100644 --- a/pages/user/myFavorite/index.wxml +++ b/pages/user/myFavorite/index.wxml @@ -1,5 +1,5 @@ - + diff --git a/pages/user/myFavorite/index.wxss b/pages/user/myFavorite/index.wxss index 067ecd8..168e5bd 100644 --- a/pages/user/myFavorite/index.wxss +++ b/pages/user/myFavorite/index.wxss @@ -34,7 +34,7 @@ page{ .content{ width:100%; flex: 1; - margin-top:80rpx; + /* margin-top:80rpx; */ /* height: calc(100% - 80rpx); */ /* overflow: scroll; */ } diff --git a/project.private.config.json b/project.private.config.json index 8c06b63..c6292d3 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -152,6 +152,12 @@ "pathName": "pages/topics/activity/activitySign/index", "query": "activityId=572afdf78246358d3fc6dfcb4341eb66", "scene": null + }, + { + "name": "个人中心", + "pathName": "pages/user/index", + "query": "", + "scene": null } ] }