diff --git a/img/apartment-icon.png b/img/apartment-icon.png new file mode 100644 index 0000000..7d32002 Binary files /dev/null and b/img/apartment-icon.png differ diff --git a/img/apartment-text.png b/img/apartment-text.png new file mode 100644 index 0000000..4915f6a Binary files /dev/null and b/img/apartment-text.png differ diff --git a/pages/askHousing/askHousing.js b/pages/askHousing/askHousing.js index e1bbc45..70a53fb 100644 --- a/pages/askHousing/askHousing.js +++ b/pages/askHousing/askHousing.js @@ -2132,10 +2132,16 @@ Page({ url: '/pages/user/user?tab=publish', }) } else { - wx.redirectTo({ - // url: '/pages/show/show?uniqid=' + res.data.uniqid + '&cityid=' + this.data.newcity.id, - url: '/pages/show/show?uniqid=' + res.data.uniqid + this.setData({ + popUpIs: "succeed-pop" }) + setTimeout(() => { + wx.redirectTo({ + // url: '/pages/show/show?uniqid=' + res.data.uniqid + '&cityid=' + this.data.newcity.id, + url: '/pages/show/show?uniqid=' + res.data.uniqid + }) + }, 2000) + } } if (res.code == 201) { diff --git a/pages/askHousing/askHousing.wxml b/pages/askHousing/askHousing.wxml index 9a95d5f..afa4b68 100644 --- a/pages/askHousing/askHousing.wxml +++ b/pages/askHousing/askHousing.wxml @@ -52,7 +52,7 @@ - + @@ -240,7 +240,7 @@ - + @@ -253,7 +253,9 @@ - + + + diff --git a/pages/common/common.wxml b/pages/common/common.wxml index 0de189e..0c10420 100644 --- a/pages/common/common.wxml +++ b/pages/common/common.wxml @@ -413,7 +413,12 @@ 发布成功 - + + + 2秒后自动跳转页面 + + + 完成房源认证更快租出去 @@ -434,19 +439,11 @@ 前往认证 暂不认证 - - - - - - - - 2秒后自动跳转页面 - + @@ -464,8 +461,12 @@ 房源数量已达上限 下架旧房源,便可发布新房源 - 房源管理 - + + + + + 房源管理 + \ No newline at end of file diff --git a/pages/edit/edit.wxss b/pages/edit/edit.wxss index f487d13..757a991 100644 --- a/pages/edit/edit.wxss +++ b/pages/edit/edit.wxss @@ -233,8 +233,8 @@ } .footer-btn .submit { - /* flex: 1; */ - width: 330rpx; + flex: 1; + /* width: 330rpx; */ display: flex; justify-content: center; align-items: center; diff --git a/pages/index/index.js b/pages/index/index.js index ac7f3cf..b4f0a02 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -51,7 +51,7 @@ Page({ title: "招室友", value: "attract", left: 436, - },], + }, ], tabValue: 0, }, @@ -91,6 +91,7 @@ Page({ // if (app.globalData.code) { if (app.globalData.config && app.globalData.config.lists) { this.get_list(); + this.getNewInit() this.setData({ initState: true }) @@ -100,6 +101,26 @@ Page({ }, 10) } }, + // 新初始化数据 + getNewInit() { + miucms.wxget(`${app.globalData.baseURL}/tenement/v2/api/home`).then(res => { + let data = res.data + console.log(data); + + let { + search, + apartment, + tabs + } = data + + this.setData({ + ...data + }) + + console.log("tabs", this.data.tabs); + }) + + }, get_list() { var that = this; @@ -198,4 +219,14 @@ Page({ [key]: value }) }, + + // 公共跳转 + publicJumps(e) { + let url = e.currentTarget.dataset.url + wx.navigateTo({ + url, + }) + + } + }) \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 1727486..f314c5e 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -2,6 +2,11 @@ 寄托香港租房 + + + + + @@ -129,12 +134,15 @@ - - iRent佐敦二期公寓 - 油尖旺中心品质公寓 + + {{ item.title }} + {{ item.propaganda }} - + + + + @@ -144,12 +152,46 @@ - {{ item.title }} - + {{ item.name }} + - - + + + + + + + + + + + iRent油麻地二期公寓 + 年轻有活力且超有玩趣的公寓 + + + 单人套间 + + HK$ + 7200 + /月 + + + + 更多 + + + + + + + 整租 + 大学附近 | 中城浸教公大理公 两房一厅,设备齐全拎包入住 + + + + + 2323 diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 2d460dd..4e4ca8a 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -582,11 +582,22 @@ .apartment-block .apartment-list .apartment-name { color: #000000; font-size: 24rpx; + width: 264rpx; + word-break: keep-all; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .apartment-block .apartment-list .apartment-introduce { color: #7f7f7f; font-size: 21rpx; + width: 264rpx; + word-break: keep-all; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + margin-bottom: 8rpx; } .apartment-block .apartment-list .apartment-image-list { @@ -610,7 +621,6 @@ } .tab-list .tab-item { - /* margin-right: 48rpx; */ padding: 0 24rpx; } @@ -632,7 +642,7 @@ .tab-list .tab-item.pitch::after { width: 30rpx; height: 30rpx; - /* content: ""; */ + content: ""; position: absolute; top: -9rpx; /* left: -4rpx; */ @@ -652,5 +662,128 @@ border-radius: 50%; z-index: -1; transition: left 0.1s; +} +.pinterest-list { + padding: 0 30rpx; + justify-content: space-between; + flex-wrap: wrap; +} + +.pinterest-list .pinterest-list-item { + width: 337.5rpx; + background-color: #fff; + border-radius: 24rpx 24rpx 14rpx 24rpx; + margin-bottom: 18rpx; +} + +.pinterest-list .pinterest-list-item.apartment { + padding-bottom: 36rpx; +} + +.pinterest-list .pinterest-list-item.apartment .apartment-top { + background: linear-gradient(-47.9699747981038deg, rgba(183, 220, 253, 1) -59%, rgba(213, 208, 239, 1) 29%, rgba(98, 177, 255, 1) 135%); + height: 45rpx; + border-radius: 24rpx 24rpx 0 0; +} + +.pinterest-list .pinterest-list-item.apartment .apartment-icon { + width: 30rpx; + height: 30rpx; + margin-right: 8rpx; +} + +.pinterest-list .pinterest-list-item.apartment .apartment-text { + width: 97.5rpx; + height: 31.5rpx; +} + +.pinterest-list .pinterest-list-item.apartment .apartment-img { + width: 337.5rpx; + height: 125rpx; +} + +.pinterest-list .pinterest-list-item.apartment .apartment-name { + font-size: 27rpx; + color: #000000; + font-weight: 650; + padding: 13.5rpx 15rpx; +} + +.pinterest-list .pinterest-list-item.apartment .apartment-introduce { + color: #aaaaaa; + font-size: 21rpx; + padding: 0 15rpx; +} + +.pinterest-list .pinterest-list-item.apartment .apartment-price { + margin-top: 6rpx; + margin-bottom: 18rpx; +} + +.pinterest-list .pinterest-list-item.apartment .apartment-price-item { + justify-content: space-between; + padding: 16.5rpx 0; + margin: 0 15rpx; +} + +.pinterest-list .pinterest-list-item.apartment .apartment-price-item:not(:last-of-type) { + border-bottom: 1rpx solid #ebebeb; +} + +.pinterest-list .pinterest-list-item.apartment .apartment-price-name { + color: #000000; + font-size: 22.5rpx; +} + +.pinterest-list .pinterest-list-item.apartment .apartment-price-cost { + font-size: 21rpx; + color: #555555; + justify-content: flex-end; +} + +.pinterest-list .pinterest-list-item.apartment .apartment-price-unit { + font-weight: 900; +} + +.pinterest-list .pinterest-list-item.apartment .apartment-price-number { + font-size: 24rpx; + color: #f95d5d; + font-weight: 900; + margin: 0 10rpx; +} + +.pinterest-list .pinterest-list-item.apartment .apartment-price-more { + margin: 0 auto; + font-size: 21rpx; + background-color: rgba(253, 223, 109, 1); + border-radius: 30rpx; + width: 84rpx; + height: 36rpx; +} + +.pinterest-list .pinterest-list-item.general {} + +.pinterest-list .pinterest-list-item.general .general-img { + width: 337.5rpx; + height: 253.5rpx; + border-radius: 24rpx 24rpx 0 0; +} + +.pinterest-list .pinterest-list-item.general .general-name { + font-size: 27rpx; + color: #000000; + line-height: 48rpx; + padding: 0 15rpx; +} + +.pinterest-list .pinterest-list-item.general .general-tag { + background-color: rgba(242, 242, 242, 1); + border: 1rpx solid rgba(235, 235, 235, 1); + border-radius: 8rpx; + height: 36rpx; + font-size: 21rpx; + color: #555555; + display: inline-flex; + margin-right: 15rpx; } \ No newline at end of file diff --git a/project.config.json b/project.config.json index aee61c0..9661965 100644 --- a/project.config.json +++ b/project.config.json @@ -42,7 +42,7 @@ }, "compileType": "miniprogram", "libVersion": "2.31.1", - "appid": "wxcf0a799771cf2ae6", + "appid": "wx9c68fbf7886ea9c4", "projectname": "%E5%AF%84%E6%89%98%E7%A7%9F%E6%88%BF", "simulatorType": "wechat", "simulatorPluginLibVersion": {}, diff --git a/utils/miucms.js b/utils/miucms.js index 841a0d6..46dbbc3 100644 --- a/utils/miucms.js +++ b/utils/miucms.js @@ -317,6 +317,51 @@ function request(url, data = {}, needGet = false) { }) } +const wxget = function (url, data = {}) { + return new Promise((resolve, reject) => { + var authorization = wx.getStorageSync('Authorization'); + wx.request({ + url: url, + data: data, + header: { + 'Cookie': 'miucms_session=' + authorization, + Authorization: authorization + }, + method: 'GET', + success: (res) => { + if (res.data.code == 200) { + resolve(res.data) + } else if (res.data.code == 401) { + // 需要授权 + // console.log(app) + app.globalData.user.uid = 0; + wx.showToast({ + icon: 'none', + title: res.data.message + }) + reject(res) + } else { + wx.hideLoading() + wx.showModal({ + title: '提示', + content: res.data.message, + }) + reject(res.data) + } + + }, + fail(res) { + wx.showModal({ + title: '提示', + content: res, + }) + reject(res) + } + }); + }) + +} + function closeAD(id) { // console.log(id) if (!app.globalData.config || !app.globalData.config.adv) { @@ -344,6 +389,7 @@ module.exports = { copy, sendData, request, + wxget, closeAD, clickAD, count,