Browse Source

bug修改

master
slj 4 years ago
parent
commit
52fd1e0524
  1. 1
      pages/topics/activity/cell/index.js
  2. 2
      pages/topics/activity/cell/index.wxml
  3. 12
      pages/topics/activity/cell/index.wxss
  4. 8
      pages/topics/activity/index.js
  5. 5
      pages/topics/activity/index.wxml
  6. 2
      pages/topics/attract/ocean/index.js
  7. 15
      pages/topics/index.js
  8. 2
      pages/topics/index.wxml
  9. 2
      pages/topics/lease/index.wxss
  10. 2
      pages/user/index.js

1
pages/topics/activity/cell/index.js

@ -29,7 +29,6 @@ Component({
onTap() { onTap() {
this.triggerEvent('clickListItem', { activityId: this.properties.activityId }) this.triggerEvent('clickListItem', { activityId: this.properties.activityId })
}, },
touchstart: function (e) { touchstart: function (e) {
let {nickName} = store.readUserInfo() let {nickName} = store.readUserInfo()
if (e.currentTarget.dataset.name === nickName) { if (e.currentTarget.dataset.name === nickName) {

2
pages/topics/activity/cell/index.wxml

@ -4,7 +4,7 @@
<view class="content"> <view class="content">
<view class="left"> <view class="left">
<view class="left-top"> <view class="left-top">
<view class="cell_title">{{title}}</view> <view class="cell_title {{readed ? 'cell_title_readed':''}}">{{title}}</view>
</view> </view>
<view class="left-bottom"> <view class="left-bottom">
<view class="left-bottom-userInfo"> <view class="left-bottom-userInfo">

12
pages/topics/activity/cell/index.wxss

@ -5,6 +5,7 @@
justify-content: space-between; justify-content: space-between;
/* width: 70%; */ /* width: 70%; */
flex:1; flex:1;
height: 100%;
} }
.leftActive{ .leftActive{
display: flex; display: flex;
@ -16,7 +17,7 @@
display: flex; display: flex;
flex: row; flex: row;
justify-content: space-between; justify-content: space-between;
padding: 5px 0; padding: 5px 0 0 0;
} }
.left-bottom-userInfo{ .left-bottom-userInfo{
display: flex; display: flex;
@ -79,8 +80,8 @@ image{
border-radius: 5px; border-radius: 5px;
} }
.cell_title { .cell_title {
font-weight: 300; font-weight: 400;
font-size: 34rpx; font-size: 17px;
color: #000; color: #000;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
@ -124,7 +125,7 @@ image{
margin-left: -120px; margin-left: -120px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
padding: 60rpx 20rpx 40rpx 20rpx; padding: 30rpx 20rpx 30rpx 20rpx;
align-items: center; align-items: center;
} }
.del { .del {
@ -144,4 +145,7 @@ image{
.touch-move-active .del { .touch-move-active .del {
-webkit-transform: translateX(0); -webkit-transform: translateX(0);
transform: translateX(0); transform: translateX(0);
}
.cell_title_readed {
color: #9C9C9C;
} }

8
pages/topics/activity/index.js

@ -27,14 +27,16 @@ Component({
*/ */
methods: { methods: {
clickListItem(e) { clickListItem(e) {
console.log(e) // console.log(e)
const activityId = e.detail.activityId; const activityId = e.currentTarget.dataset.id;
const index = e.currentTarget.dataset.index;
this.triggerEvent('quitEvent',{id:activityId,index:index});
wx.navigateTo({ wx.navigateTo({
url: `/pages/topics/activity/activityDetail/index?activityId=${activityId}`, url: `/pages/topics/activity/activityDetail/index?activityId=${activityId}`,
}) })
}, },
deleteTopic(e){ deleteTopic(e){
this.triggerEvent('deleteTopic', { id: e.detail.id }) this.triggerEvent('deleteTopic', { id: e.detail.id })
} },
} }
}) })

5
pages/topics/activity/index.wxml

@ -7,8 +7,11 @@
activityImg="{{item.activityImg}}" activityImg="{{item.activityImg}}"
time="{{item.time}}" time="{{item.time}}"
commentNum="{{item.commentNum}}" commentNum="{{item.commentNum}}"
bind:clickListItem="clickListItem"
dataIndex="{{item.dataIndex}}" dataIndex="{{item.dataIndex}}"
data-id="{{item.activityId}}"
data-index="{{index}}"
readed="{{item.readed}}"
bind:tap="clickListItem"
/> />
</block> </block>
</view> </view>

2
pages/topics/attract/ocean/index.js

@ -120,7 +120,7 @@ Page({
}, },
//海洋人才赋能中心点击列表cell获取id,进入页面 //海洋人才赋能中心点击列表cell获取id,进入页面
clickListItem(e) { clickListItem(e) {
//console.log(e.detail) console.log(e)
const { const {
id, id,
index index

15
pages/topics/index.js

@ -235,7 +235,6 @@ Page({
var th = this; var th = this;
var page = th.data.page; var page = th.data.page;
var list = th.data.centerList; var list = th.data.centerList;
if (th.data.typeList.length == 0) { if (th.data.typeList.length == 0) {
topicModel.getResourceTypeList(res => { topicModel.getResourceTypeList(res => {
this.setData({ this.setData({
@ -243,7 +242,6 @@ Page({
}) })
}) })
} }
topicModel.getResourceList('', page, res => { topicModel.getResourceList('', page, res => {
if (res.result.records.length > 0) { if (res.result.records.length > 0) {
list = list.concat(res.result.records); list = list.concat(res.result.records);
@ -392,6 +390,7 @@ Page({
commentNum: item.commentNum, commentNum: item.commentNum,
dataIndex: index + ((page - 1) * 10), dataIndex: index + ((page - 1) * 10),
isTouchMove: false, isTouchMove: false,
readed: item.isRead == 0 ? false : true
}) })
}) })
@ -409,5 +408,15 @@ Page({
}) })
}, },
changeActivityStatus:function(e){
console.log("我是被子组件触发的",e);
const {
id,
index
} = e.detail
this.setData({
[`activityList[${index}].readed`]: true
})
console.log(this.data.activityList)
}
}) })

2
pages/topics/index.wxml

@ -28,7 +28,7 @@
</van-tab> </van-tab>
<van-tab title="来活动" name="5"> <van-tab title="来活动" name="5">
<block wx:if="{{tab == '5'}}"> <block wx:if="{{tab == '5'}}">
<activity list="{{activityList}}" /> <activity list="{{activityList}}" bind:quitEvent="changeActivityStatus"/>
</block> </block>
</van-tab> </van-tab>
<!-- <van-tab title="报需求" name="3"> <!-- <van-tab title="报需求" name="3">

2
pages/topics/lease/index.wxss

@ -1,9 +1,11 @@
/* pages/topics/rentHouse/index.wxss */ /* pages/topics/rentHouse/index.wxss */
.con{ .con{
width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
background-size: 100% 100%;
} }
.img{ .img{
width: 200px; width: 200px;

2
pages/user/index.js

@ -218,7 +218,7 @@ Page({
isAuth: false isAuth: false
}) })
} }
console.log("isAuth--",this.data.isAuth);
// wx.redirectTo({ // wx.redirectTo({
// url: '/pages/weChatAuth/index', // url: '/pages/weChatAuth/index',
// }) // })

Loading…
Cancel
Save