diff --git a/api/house-info.js b/api/house-info.js index c47f889..7448f8d 100644 --- a/api/house-info.js +++ b/api/house-info.js @@ -21,6 +21,12 @@ export const updateHouseInfo = (data) => http.put('/house/info', data) // 删除房源信息 export const removeHouseInfo = (id) => http.delete('/house/info/' + id) + +// 收藏房源 +export const likeHouse = (data) => http.post('/house/like-log', data) +export const getLikeHouseList = () => http.get('/house/like-log') +export const getViewsHouseList = () => http.get('/house/views-log') + export default { pageHouseInfo, listHouseInfo, @@ -28,5 +34,8 @@ export default { getUserDetail, updateHouseInfo, removeHouseInfo, - addHouseInfo + addHouseInfo, + likeHouse, + getLikeHouseList, + getViewsHouseList } diff --git a/pages.json b/pages.json index 1b05c6d..a968801 100755 --- a/pages.json +++ b/pages.json @@ -99,12 +99,6 @@ "navigationBarTitleText": "身份认证", "enablePullDownRefresh": false } - }, { - "path": "certification/house/house", - "style": { - "navigationBarTitleText": "房产认证", - "enablePullDownRefresh": false - } }, { "path": "certification/education/education", "style": { @@ -263,78 +257,8 @@ "enablePullDownRefresh": false } - }, { - "path": "user/base/sex/sex", - "style": { - "navigationBarTitleText": "注册引导", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - }, - { - "path": "user/base/birthday/birthday", - "style": { - "navigationBarTitleText": "注册引导", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - - }, - { - "path": "user/base/height/height", - "style": { - "navigationBarTitleText": "注册引导", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - - }, - { - "path": "user/base/address/address", - "style": { - "navigationBarTitleText": "注册引导", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - - }, - { - "path": "user/base/yearpay/yearpay", - "style": { - "navigationBarTitleText": "注册引导", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - - }, - { - "path": "user/base/nickname/nickname", - "style": { - "navigationBarTitleText": "注册引导", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - - }, - { - "path": "user/base/avatar/avatar", - "style": { - "navigationBarTitleText": "注册引导", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - - }, - { - "path": "user/base/photo/photo", - "style": { - "navigationBarTitleText": "注册引导", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - - }, { + { "path": "feedback/feedback", "style": { "navigationBarTitleText": "意见反馈", @@ -552,13 +476,27 @@ "enablePullDownRefresh": false } - }, { + }, + { "path": "pages/house/house", "style": { "navigationBarTitleText": "房源列表", "enablePullDownRefresh": false } - + }, + { + "path": "pages/house/liked", + "style": { + "navigationBarTitleText": "收藏房源", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/house/views", + "style": { + "navigationBarTitleText": "浏览历史", + "enablePullDownRefresh": false + } } ], "globalStyle": { diff --git a/pages/house/liked.vue b/pages/house/liked.vue new file mode 100644 index 0000000..b27a99c --- /dev/null +++ b/pages/house/liked.vue @@ -0,0 +1,344 @@ + + + + \ No newline at end of file diff --git a/pages/house/views.vue b/pages/house/views.vue new file mode 100644 index 0000000..d7cfca2 --- /dev/null +++ b/pages/house/views.vue @@ -0,0 +1,344 @@ + + + + \ No newline at end of file diff --git a/pages/user/user.vue b/pages/user/user.vue index 6bf95cc..acd2e75 100644 --- a/pages/user/user.vue +++ b/pages/user/user.vue @@ -122,13 +122,13 @@ - + - + @@ -448,34 +448,9 @@ // uni.setStorageSync('gradeId',res.data.gradeId) // uni.setStorageSync('gradeName',res.data.gradeName) app.isLogin = true - - - // const roleName = res.data.roles[0].roleName - // app.roleName = roleName - // storage.set('roleName',roleName) - - // // 判断会员身份 - // const roleName = storage.get('roleName') - // if(roleName == '尊享会员'){ - // app.roleName = roleName - // return false - // } - // const exclusive = app.form.roles.filter(d => d.roleName == '尊享会员') - // const ordinary = app.form.roles.filter(d => d.roleName == '普通会员') - // if(ordinary){ - // console.log("111111: ",111111); - // app.roleName = '普通会员' - // storage.set('roleName',d.roleName) - // } - // if(exclusive){ - // console.log("222222: ",222222); - // app.roleName = '尊享会员' - // storage.set('roleName',d.roleName) - // } } else { app.isLogin = false - // app.handleLogout() } }) diff --git a/sub_pages/house/add.vue b/sub_pages/house/add.vue index 20d9e4d..65c3c59 100644 --- a/sub_pages/house/add.vue +++ b/sub_pages/house/add.vue @@ -1,7 +1,7 @@