diff --git a/models/topic.js b/models/topic.js
index dcc5a77..0ea3c5c 100644
--- a/models/topic.js
+++ b/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
}
diff --git a/pages/home/index.js b/pages/home/index.js
index d9086e2..01104e0 100644
--- a/pages/home/index.js
+++ b/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: {
@@ -11,9 +13,9 @@ Page({
banners: [],
hots: [],
list: [],
- show:false,
+ show: false,
// url:"../../images/ad.jpg",
- web:'https://wx.vzan.com/live/TpForm?zbid=860533452&oId=213742&type=0&v=1623841891714'
+ web: 'https://wx.vzan.com/live/TpForm?zbid=860533452&oId=213742&type=0&v=1623841891714'
// web:'http://www.rencaibeichu.cn'
},
onLoad: function () {
@@ -35,8 +37,8 @@ Page({
})
},
/**
- * 页面相关事件处理函数--监听用户下拉动作
- */
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
onPullDownRefresh: function () {
this.setData({
currPage: 1,
@@ -46,7 +48,7 @@ Page({
this.fetchHomeBanner()
this.fetchHomeHot()
wx.vibrateShort({
- success () {
+ success() {
//console.log('震动')
}
})
@@ -66,7 +68,7 @@ Page({
// 获取首页列表
- fetchHomeList () {
+ fetchHomeList() {
let page = this.data.currPage
homeModel.getHomeList(page, res => {
this.setData({
@@ -82,7 +84,7 @@ Page({
image: item.titlePic,
showTop: item.isTop == 1 ? true : false,
time: dayjs(item.createTime).toNow(),
- type:item.type,
+ type: item.type,
readed: item.isRead == 0 ? false : true
})
})
@@ -112,8 +114,8 @@ Page({
})
},
-
- fetchHomeBanner () {
+
+ fetchHomeBanner() {
this.setData({
banners: []
})
@@ -126,7 +128,8 @@ Page({
tempBanners.push({
id: item.id,
image: item.titlePic,
- title: item.title
+ title: item.title,
+ type: item.type
})
})
this.setData({
@@ -134,7 +137,7 @@ Page({
})
})
},
- fetchHomeHot () {
+ fetchHomeHot() {
this.setData({
hots: []
})
@@ -146,7 +149,8 @@ Page({
datas.forEach(item => {
tempHots.push({
id: item.id,
- title: item.title
+ title: item.title,
+ type: item.type
})
})
this.setData({
@@ -155,60 +159,84 @@ Page({
})
},
// Banner/Hot/List事件
- tapSwiperItem (e) {
- //console.log(e.detail)
- if(e.detail.id == '987a8433d925f36d3690fab91fe9e137'){
+ tapSwiperItem(e) {
+ console.log(e)
+ const {
+ id,
+ type
+ } = e.detail
+ if (e.detail.id == '987a8433d925f36d3690fab91fe9e137') {
this.jump()
- }else{
- this.gotoArticePage(e.detail.id)
+ } else {
+ // this.gotoArticePage(e.detail.id)
+ if (type == 0) {
+ this.gotoArticePage(id)
+ } else {
+ this.gotoActivityPage(id)
+ }
}
-
+
},
- tapFocusItem (e) {
+ 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)
+ }
},
-
+
//点击列表cell获取id,进入页面
- clickListItem (e) {
+ clickListItem(e) {
//console.log(e.detail)
- console.log('点击---',e)
- const {id, index,type} = e.detail
+ console.log('点击---', e)
+ const {
+ id,
+ index,
+ type
+ } = e.detail
this.setData({
[`list[${index}].readed`]: true
})
//type 文章/活动标识0-文章,1-活动
- if(type==0){
- this.gotoArticePage(id)
- }
- else{
- this.gotoActivityPage(id)
- }
+ if (type == 0) {
+ this.gotoArticePage(id)
+ } else {
+ this.gotoActivityPage(id)
+ }
},
//文章 0
- gotoArticePage (id) {
+ gotoArticePage(id) {
wx.navigateTo({
url: `/pages/article/index?id=${id}`,
})
},
//活动 1
- gotoActivityPage (id) {
+ gotoActivityPage(id) {
wx.navigateTo({
url: `/pages/topics/activity/activityDetail/index?activityId=${id}`,
})
},
- onClose(){
+ onClose() {
this.setData({
- show:false
+ show: false
})
},
- jump:function(){
+ jump: function () {
this.setData({
- show:false
+ show: false
})
wx.navigateTo({
url: '/pages/resource/navigate/index?url=' + encodeURIComponent(this.data.web)
})
}
-})
+})
\ No newline at end of file
diff --git a/pages/topics/lease/index.js b/pages/topics/lease/index.js
index 0aedacc..b30a24e 100644
--- a/pages/topics/lease/index.js
+++ b/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)
},
})
diff --git a/pages/topics/lease/index.wxml b/pages/topics/lease/index.wxml
index 3de0205..4dcd952 100644
--- a/pages/topics/lease/index.wxml
+++ b/pages/topics/lease/index.wxml
@@ -1,8 +1,14 @@
-
-
+ -->
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/topics/lease/index.wxss b/pages/topics/lease/index.wxss
index 4e29736..8e7c3f1 100644
--- a/pages/topics/lease/index.wxss
+++ b/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;
diff --git a/pages/topics/loan/index.wxml b/pages/topics/loan/index.wxml
index 3cf28d9..db77ce9 100644
--- a/pages/topics/loan/index.wxml
+++ b/pages/topics/loan/index.wxml
@@ -1,5 +1,5 @@
-
+
',data)
topicModel.addTalents(data, res => {
const id = res.result;
if (res.code === 200) {