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 = {
// 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', // 测试环境
}

12
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 }

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

@ -23,7 +23,15 @@
</view>
<!--关联链接 //1 报需求 2 来活动-->
<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}}">
<image src="/images/common/link.png" class="icon-link"></image>
<view>关联链接</view>

2
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') {

21
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{

4
pages/user/myFavorite/index.wxml

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

2
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; */
}

6
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
}
]
}

Loading…
Cancel
Save