slj 4 years ago
parent
commit
48f496a0d1
  1. 3
      models/topic.js
  2. 46
      pages/home/index.js
  3. 2
      pages/topics/lease/index.js
  4. 10
      pages/topics/lease/index.wxml
  5. 9
      pages/topics/lease/index.wxss
  6. 2
      pages/topics/loan/index.wxml
  7. 2
      pages/topics/reportDemand/index.js

3
models/topic.js

@ -200,8 +200,7 @@ class TopicModel extends HTTP {
typeCode: datas.typeCode,
id: datas.id,
questionType: datas.questionType,
company: datas.company
workplace: datas.workplace
},
success: success
}

46
pages/home/index.js

@ -2,7 +2,9 @@
import dayjs from '../../utils/dayjs/index.js'
import relativeTime from '../../utils/dayjs/relativeTime.js'
dayjs.extend(relativeTime);
import { HomeModel } from '../../models/home.js'
import {
HomeModel
} from '../../models/home.js'
let homeModel = new HomeModel()
Page({
data: {
@ -126,7 +128,8 @@ Page({
tempBanners.push({
id: item.id,
image: item.titlePic,
title: item.title
title: item.title,
type: item.type
})
})
this.setData({
@ -146,7 +149,8 @@ Page({
datas.forEach(item => {
tempHots.push({
id: item.id,
title: item.title
title: item.title,
type: item.type
})
})
this.setData({
@ -156,17 +160,38 @@ Page({
},
// Banner/Hot/List事件
tapSwiperItem(e) {
//console.log(e.detail)
console.log(e)
const {
id,
type
} = e.detail
if (e.detail.id == '987a8433d925f36d3690fab91fe9e137') {
this.jump()
} else {
this.gotoArticePage(e.detail.id)
// this.gotoArticePage(e.detail.id)
if (type == 0) {
this.gotoArticePage(id)
} else {
this.gotoActivityPage(id)
}
}
},
tapFocusItem(e) {
// console.log(e)
const {
id,
title,
type
} = e.detail
//console.log(e.detail)
this.gotoArticePage(e.detail.id)
// this.gotoArticePage(e.detail.id)
//type 文章/活动标识0-文章,1-活动
if (type == 0) {
this.gotoArticePage(id)
} else {
this.gotoActivityPage(id)
}
},
@ -174,15 +199,18 @@ Page({
clickListItem(e) {
//console.log(e.detail)
console.log('点击---', e)
const {id, index,type} = e.detail
const {
id,
index,
type
} = e.detail
this.setData({
[`list[${index}].readed`]: true
})
//type 文章/活动标识0-文章,1-活动
if (type == 0) {
this.gotoArticePage(id)
}
else{
} else {
this.gotoActivityPage(id)
}
},

2
pages/topics/lease/index.js

@ -43,5 +43,7 @@ Component({
this.setData({
height:app.globalData.windowHeight - 44
})
console.log('windowHeight--->',app.globalData.windowHeight)
console.log('height--->',this.data.height)
},
})

10
pages/topics/lease/index.wxml

@ -1,8 +1,14 @@
<!--pages/topics/rentHouse/index.wxml-->
<!--pages/topics/loan/index.wxml-->
<view class="con"
<!-- <view class="con"
style="background: url({{imgUrl}}) no-repeat; background-size:cover;background-position-y:bottom;height:{{height}}px">
<view class="btnView">
<e-ibutton title="查看详情" bind:onTap="check" />
</view>
</view> -->
<view class="con" style="height:{{height}}px">
<image src="{{imgUrl}}" class="bg-image" style="height:{{height}}px"></image>
<view class="btnView">
<e-ibutton title="查看详情" bind:onTap="check" />
</view>
</view>

9
pages/topics/lease/index.wxss

@ -1,11 +1,16 @@
/* pages/topics/rentHouse/index.wxss */
.bg-image{
display: block;
width: 100%;
height: 100%;
/* background-color: rgba(0,0,0,.2); */
}
.con{
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
background-size: 100% 100%;
/* background-size: 100% 100%; */
}
.img{
width: 200px;

2
pages/topics/loan/index.wxml

@ -1,5 +1,5 @@
<!--pages/topics/loan/index.wxml-->
<view class="con" style="background: url({{imgUrl}}) no-repeat; background-size:cover;background-position-y:bottom;height:{{height}}px">
<view class="con" style="overflow:hidden;background: url({{imgUrl}}) no-repeat; background-size:cover;background-position-y:bottom;height:{{height}}px">
<!-- <view class="img">
<image src="{{detail.titlePic}}"></image>
</view>

2
pages/topics/reportDemand/index.js

@ -313,7 +313,7 @@ Page({
workplace: this.data.company,
name: this.data.username
}
console.log('报需求-->',data)
topicModel.addTalents(data, res => {
const id = res.result;
if (res.code === 200) {

Loading…
Cancel
Save