diff --git a/common/api.js b/common/api.js
index 90fe50f..b8604cc 100644
--- a/common/api.js
+++ b/common/api.js
@@ -30,4 +30,9 @@ export const getHotList = (params, succCallback, errorCallback) => {
// 请求接口获得后台列表数据信息 = 推荐房源
export const getHouseListPage = (params, succCallback, errorCallback) => {
return request('/job-dev/house/applet/indexListPage', params,'GET',true, succCallback,errorCallback)
-};
\ No newline at end of file
+};
+
+// 获取公告通知
+export const getNiceInfo = (params, succCallback, errorCallback) => {
+ return request('/job-dev/house/applet/notice', params,'GET',true, succCallback,errorCallback)
+};
diff --git a/pages.json b/pages.json
index 6275506..a7a80f7 100644
--- a/pages.json
+++ b/pages.json
@@ -24,7 +24,7 @@
"path" : "pages/search/search",
"style" :
{
- "navigationBarTitleText" : "",
+ "navigationBarTitleText" : "搜索",
"enablePullDownRefresh" : false
}
},
@@ -35,6 +35,14 @@
"navigationBarTitleText" : "公告",
"enablePullDownRefresh" : false
}
+ },
+ {
+ "path" : "pages/homeDetails/homeDetails",
+ "style" :
+ {
+ "navigationBarTitleText" : "详情",
+ "enablePullDownRefresh" : false
+ }
}
],
"globalStyle": {
diff --git a/pages/homeDetails/homeDetails.vue b/pages/homeDetails/homeDetails.vue
new file mode 100644
index 0000000..1767b73
--- /dev/null
+++ b/pages/homeDetails/homeDetails.vue
@@ -0,0 +1,27 @@
+
+
+ 这是房子详情
+
+
+
+
+
+
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 49e7836..2df5c41 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1,6 +1,16 @@
-
+
+
+
+
+ 长沙
+
+
+
+
+
+
@@ -12,17 +22,7 @@
-
-
-
-
-
-
-
- 长沙
-
-
-
-
-
-
+
-
+
@@ -82,7 +72,7 @@
-
+
@@ -100,7 +90,7 @@
推荐房源
-
+
@@ -145,6 +135,7 @@
scrollPage: 1, //横向滚动
scrollSize: 20,
scrollTotal: null,
+ notice_id: '',
}
},
onLoad() {
@@ -153,6 +144,7 @@
this.getClassList();
this.getHotList();
this.getHouseListPage();
+ this.getNiceInfo();
// 让出导航栏和胶囊的位置
},
// 下拉刷新首页推荐房源
@@ -306,9 +298,22 @@
// 下拉刷新 首页推荐房源分页下拉加载,上拉刷新。如果加载完了提示 没有更多了
-
- // 上拉加载
+ getNiceInfo(){
+ this.$api.getNiceInfo().then(res => {
+ console.log(res,"tonggaos")
+ this.noticeList = res.result[0].title;
+ this.notice_id = res.result[0].id;
+ }).catch(err => {
+ console.log(err)
+ })
+ },
+ // 跳转详情页
+ toHomeDetails(id){
+ uni.navigateTo({
+ url: '/pages/homeDetails/homeDetails?id='+id
+ })
+ },
// 跳转 搜索页面
toSearch(){
uni.navigateTo({
@@ -331,6 +336,9 @@
/deep/ .u-sticky{
display: flex;
justify-content: center;
+ align-items: center;
+ height: 90rpx;
+ border-bottom: 1px solid #aaa9a5 ;
.sticky{
display: flex;
align-items: center;
@@ -433,7 +441,7 @@
// position: absolute;
width: 100%;
margin-top: 24rpx;
- height: 140rpx;
+ height: 210rpx;
.ant-menu-card {
// position: absolute;
// top: -40rpx;
diff --git a/pages/notice/notice.vue b/pages/notice/notice.vue
index 7aafc7d..f6ed127 100644
--- a/pages/notice/notice.vue
+++ b/pages/notice/notice.vue
@@ -1,7 +1,13 @@
-
+
- 这是一个公告页面
+
+ {{title}}
+
+
+
+
+
@@ -9,15 +15,44 @@
export default {
data() {
return {
-
+ state: '',
+ content: "",
+ title: "",
}
},
+ onLoad(options) {
+ console.log(options)
+ this.state = options.state;
+ this.getNoticeInfo(options.state);
+ },
methods: {
-
+ getNoticeInfo(state) {
+ this.$api.getNiceInfo({state}).then( res => {
+ this.title = res.result[0].title;
+ this.content = res.result[0].content;
+ }).catch(err => {
+ console.log(err)
+ })
+ },
}
}
-