slj 4 years ago
parent
commit
51e2b884c8
  1. 2
      config.js
  2. 12
      models/user.js
  3. 10
      pages/topics/attract/oceanDetail/index.wxml
  4. 2
      pages/user/index.js
  5. 21
      pages/user/myFavorite/index.js
  6. 4
      pages/user/myFavorite/index.wxml
  7. 2
      pages/user/myFavorite/index.wxss
  8. 6
      project.private.config.json

2
config.js

@ -1,5 +1,5 @@
const config = { 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://shibeirencai.elinkit.com.cn:7101/fqsb' // 正式环境
api_url: 'https://dingoa.elinkit.com.cn/fqsb', // 测试环境 api_url: 'https://dingoa.elinkit.com.cn/fqsb', // 测试环境
} }

12
models/user.js

@ -18,7 +18,8 @@ const UserConst = {
user_saveWhistleComment_url:'/api/whistle/saveComment' ,// 吹哨评价 user_saveWhistleComment_url:'/api/whistle/saveComment' ,// 吹哨评价
user_updatePhone_url:'/api/miniuser/updatephone',//更新电话号码 user_updatePhone_url:'/api/miniuser/updatephone',//更新电话号码
navigate_user_url:'/api/miniuser/wxregisterbyparams', 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 { class UserModel extends HTTP {
constructor () { constructor () {
@ -254,6 +255,15 @@ class UserModel extends HTTP {
} }
this.request(params) 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 } export { UserModel }

10
pages/topics/attract/oceanDetail/index.wxml

@ -23,7 +23,15 @@
</view> </view>
<!--关联链接 //1 报需求 2 来活动--> <!--关联链接 //1 报需求 2 来活动-->
<block wx:if="{{associationType}}"> <block wx:if="{{associationType}}">
<view class="link-title">点击“关联链接”填报需求</view> <view class="link-title">
点击“关联链接”
<block wx:if="{{associationType=='1'}}">
填报需求
</block>
<block wx:if="{{associationType=='2'}}">
来活动
</block>
</view>
<view class="link-bottom" bindtap="goLinkPage" data-association="{{associationType}}"> <view class="link-bottom" bindtap="goLinkPage" data-association="{{associationType}}">
<image src="/images/common/link.png" class="icon-link"></image> <image src="/images/common/link.png" class="icon-link"></image>
<view>关联链接</view> <view>关联链接</view>

2
pages/user/index.js

@ -343,7 +343,7 @@ Page({
const { const {
type type
} = e.currentTarget.dataset } = e.currentTarget.dataset
console.log(type) console.log('type-->',type)
if (this.data.isAuth) { if (this.data.isAuth) {
if (type === 'myInfo') { if (type === 'myInfo') {

21
pages/user/myFavorite/index.js

@ -32,20 +32,20 @@ Page({
}, },
fetchMyFavoriteList () { fetchMyFavoriteList () {
let page = this.data.currentPage; let page = this.data.currentPage;
let type = this.data.type; userModel.getCollectList(page,res=> {
userModel.getMyFavoriteList(page,type,res => { console.log('我的收藏--->',res)
const datas = res.result.list; const datas = res.result.records;
let tempDatas = []; let tempDatas = [];
datas.forEach(item => { datas.forEach(item => {
tempDatas.push({ tempDatas.push({
topicId: item.contentId, topicId: item.contentId,
title: item.title, title: item.title,
topicImg: item.image, topicImg: item.image,
userIcon: item.groupAvator, // userIcon: item.groupAvator,
userName: item.author, // userName: item.author,
time: item.createTime, time: item.createTime,
commentNum: item.commentNum || '', // commentNum: item.commentNum || '',
type: item.type type: item.typeCode
}) })
}) })
if (page == 1) { if (page == 1) {
@ -69,7 +69,7 @@ Page({
}) })
} }
} }
console.log(this.data.list) console.log('this.data.list-->',this.data.list)
wx.stopPullDownRefresh() wx.stopPullDownRefresh()
}) })
}, },
@ -94,6 +94,7 @@ Page({
this.fetchMyFavoriteList() this.fetchMyFavoriteList()
}, },
clickListItem (e) { clickListItem (e) {
// console.log('点击--',e)
if (e.detail.id) { if (e.detail.id) {
let id = e.detail.id let id = e.detail.id
let type = e.detail.type; let type = e.detail.type;
@ -102,9 +103,9 @@ Page({
url: '/pages/resource/detail/index?id=' + id url: '/pages/resource/detail/index?id=' + id
}) })
return; return;
}else if(type == '4'){ }else if(type == '5'){
wx.navigateTo({ wx.navigateTo({
url: '/pages/topics/rent/detail/index?id=' + id url: `/pages/topics/activity/activityDetail/index?activityId=${id}`,
}) })
return; return;
}else{ }else{

4
pages/user/myFavorite/index.wxml

@ -1,5 +1,5 @@
<!--pages/user/common/myFavorite/index.wxml--> <!--pages/user/common/myFavorite/index.wxml-->
<view class="title"> <!-- <view class="title">
<view class="option" bindtap="refresh" data-type="1"> <view class="option" bindtap="refresh" data-type="1">
<block wx:if="{{type == '1'}}"> <block wx:if="{{type == '1'}}">
<view class="text active">宣传栏</view> <view class="text active">宣传栏</view>
@ -26,7 +26,7 @@
<view class="text">赋能中心</view> <view class="text">赋能中心</view>
</block> </block>
</view> </view>
</view> </view> -->
<view class="content"> <view class="content">
<block wx:for="{{list}}" wx:key="{{index}}"> <block wx:for="{{list}}" wx:key="{{index}}">

2
pages/user/myFavorite/index.wxss

@ -34,7 +34,7 @@ page{
.content{ .content{
width:100%; width:100%;
flex: 1; flex: 1;
margin-top:80rpx; /* margin-top:80rpx; */
/* height: calc(100% - 80rpx); */ /* height: calc(100% - 80rpx); */
/* overflow: scroll; */ /* overflow: scroll; */
} }

6
project.private.config.json

@ -152,6 +152,12 @@
"pathName": "pages/topics/activity/activitySign/index", "pathName": "pages/topics/activity/activitySign/index",
"query": "activityId=572afdf78246358d3fc6dfcb4341eb66", "query": "activityId=572afdf78246358d3fc6dfcb4341eb66",
"scene": null "scene": null
},
{
"name": "个人中心",
"pathName": "pages/user/index",
"query": "",
"scene": null
} }
] ]
} }

Loading…
Cancel
Save