From 9ba18f5245f7fdf8be30090889522516d672afc1 Mon Sep 17 00:00:00 2001 From: xiangshunpu Date: Sat, 19 Jun 2021 20:51:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD=EF=BC=8C?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=8E=A5=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 2 +- app.wxss | 44 ++++++++++++++ components/detail-clinch/detail-clinch.wxml | 22 +++---- components/detail-clinch/detail-clinch.wxss | 59 ------------------- components/detail-present/detail-present.js | 7 ++- components/detail-present/detail-present.wxml | 41 ++++++++++++- components/detail-present/detail-present.wxss | 39 +++++++++++- pages/look-detail/look-detail.js | 45 +++++++++++++- project.config.json | 2 +- utils/api.js | 7 ++- 10 files changed, 190 insertions(+), 78 deletions(-) diff --git a/app.js b/app.js index 6f9571c..3c7e166 100644 --- a/app.js +++ b/app.js @@ -11,7 +11,7 @@ App({ wx.login({ success: res => { // 发送 res.code 到后台换取 openId, sessionKey, unionId - $api.getOpenid(res.code) + $api.getUserAuth(res.code) .then(res => { //请求成功 console.log(res) diff --git a/app.wxss b/app.wxss index e6a29c9..d65a6c7 100644 --- a/app.wxss +++ b/app.wxss @@ -121,4 +121,48 @@ overflow: hidden; white-space: nowrap; text-overflow: ellipsis; +} + +.table-title { + font-size: 30rpx; + font-weight: bold; + color: #F69F06; + line-height: 90rpx; +} + +.table-box { + background-color: #ffffff; + padding: 0 30rpx 50rpx 30rpx; + margin-top: 20rpx; +} + +.table{ + border: 1px solid #E1E1E1; +} + +.table-item{ + border-bottom: 1px solid #E1E1E1; + font-size: 26rpx; + display: flex; +} + +.table-item:last-of-type { + border: none; +} + +.table-lable{ + padding-left: 30rpx; + display: flex; + align-items: center; + width: 186rpx; + color: #838B99; + border-right: 1px solid #E1E1E1; + background: rgba(225, 225, 225, 0.2); +} + +.table-info{ + padding: 20rpx 30rpx; + line-height: 50rpx; + color: #262936; + flex: 1; } \ No newline at end of file diff --git a/components/detail-clinch/detail-clinch.wxml b/components/detail-clinch/detail-clinch.wxml index 71368be..9f24d1b 100644 --- a/components/detail-clinch/detail-clinch.wxml +++ b/components/detail-clinch/detail-clinch.wxml @@ -1,12 +1,14 @@ - - 基本信息 - - - {{item.lable}} - - - {{item.info}} + + 基本信息 + + + + {{item.lable}} + + + {{item.info}} + @@ -17,7 +19,7 @@ - 竞拍记录: - 点击查看 + 竞拍记录: + 点击查看 \ No newline at end of file diff --git a/components/detail-clinch/detail-clinch.wxss b/components/detail-clinch/detail-clinch.wxss index e2351ba..c3f31ce 100644 --- a/components/detail-clinch/detail-clinch.wxss +++ b/components/detail-clinch/detail-clinch.wxss @@ -1,63 +1,4 @@ /* components/detail-clinch/detail-clinch.wxss */ -.clinch { - background-color: #ffffff; - padding: 0 30rpx 50rpx 30rpx; - margin-top: 20rpx; -} - -.title { - font-size: 30rpx; - font-weight: bold; - color: #F69F06; - line-height: 90rpx; -} - -.box { - width: 100%; - display: flex; - border: 1px solid #E1E1E1; -} - -.lable { - background: rgba(225, 225, 225, 0.2); - border-right: 1px solid #E1E1E1; - width: 186rpx; - display: flex; - flex-direction: column; -} - -.lable-item { - display: flex; - border-bottom: 1px solid #E1E1E1; - height: 90rpx; - align-items: center; - padding-left: 28rpx; - font-size: 26rpx; - color: #838B99; -} - -.lable-item:last-of-type { - border: none; -} - -.info { - flex: 1; -} - -.info-item { - display: flex; - height: 90rpx; - align-items: center; - padding-left: 38rpx; - font-size: 26rpx; - color: #262936; - border-bottom: 1px solid #E1E1E1; -} - -.info-item:last-of-type { - border: none; -} - .message{ margin-top: 20rpx; background-color: #ffffff; diff --git a/components/detail-present/detail-present.js b/components/detail-present/detail-present.js index 15cc1f6..c094384 100644 --- a/components/detail-present/detail-present.js +++ b/components/detail-present/detail-present.js @@ -1,10 +1,15 @@ // components/detai-present/detai-present.js Component({ + options: { + addGlobalClass: true + }, /** * 组件的属性列表 */ properties: { - + info: { + type: Object + }, }, /** diff --git a/components/detail-present/detail-present.wxml b/components/detail-present/detail-present.wxml index e19512f..9290b4c 100644 --- a/components/detail-present/detail-present.wxml +++ b/components/detail-present/detail-present.wxml @@ -1,2 +1,41 @@ -components/detai-present/detai-present.wxml + + 项目详情 + + + + {{item.lable}} + + + {{item.info}} + + + + + + + 销售情况 + + + + {{item.lable}} + + + {{item.info}} + + + + + + + 预售明细 + 预售/去化/去化率 + 取证时间 + + + {{item.msg}} + {{item.booking}} + {{item.timer}} + + + \ No newline at end of file diff --git a/components/detail-present/detail-present.wxss b/components/detail-present/detail-present.wxss index 4d68216..19f646c 100644 --- a/components/detail-present/detail-present.wxss +++ b/components/detail-present/detail-present.wxss @@ -1 +1,38 @@ -/* components/detai-present/detai-present.wxss */ \ No newline at end of file +/* components/detai-present/detai-present.wxss */ +.table-column { + border: 1px solid #E1E1E1; + border-bottom: none; + margin-top: 26rpx; +} + +.column-item { + display: flex; + font-size: 26rpx; +} + +.column-item>view { + border-bottom: 1px solid #E1E1E1; + padding: 30rpx 0; + text-align: center; + flex: 1; +} + +.column-item>view:nth-child(2) { + border-left: 1px solid #E1E1E1; + border-right: 1px solid #E1E1E1; +} + +.column-head { + background: rgba(225, 225, 225, 0.2); + color: #838B99; +} + +.column-item .column-info { + font-weight: bold; + color: #262936; +} + +.column-item .column-info:nth-child(1) { + text-decoration: underline; + color: #036EF3; +} \ No newline at end of file diff --git a/pages/look-detail/look-detail.js b/pages/look-detail/look-detail.js index b13bf14..f0e9f4e 100644 --- a/pages/look-detail/look-detail.js +++ b/pages/look-detail/look-detail.js @@ -55,7 +55,50 @@ Page({ ], message: [] }, - presentInfo:{}, + presentInfo:{ + detail:[{ + lable: '项目状态', + info: '在售' + },{ + lable: '楼盘名称', + info: '海纳九龙' + },{ + lable: '项目公司', + info: '重庆筑品房地产开发有限公司' + },{ + lable: '经营企业', + info: '融信34 + 金科35 + 荣安33' + },{ + lable: '首开时间', + info: '2021/02/01' + }], + list:[{ + lable: '合计预售', + info: '120套' + },{ + lable: '去化', + info: '37套' + },{ + lable: '去化率', + info: '56%' + },{ + lable: '预售住宅均价', + info: '10000元/m' + },{ + lable: '预售商业均价', + info: '12000元/m' + }], + more:[{ + msg:'2021XXX号', + booking:'72/34/56%', + timer:'2020/01/02' + }, + { + msg:'2021XXX号', + booking:'48/34/46%', + timer:'2020/01/02' + }] + }, basisInfo:{}, seniorInfo:{}, }, diff --git a/project.config.json b/project.config.json index 222bfa0..3c6c017 100644 --- a/project.config.json +++ b/project.config.json @@ -4,7 +4,7 @@ "ignore": [] }, "setting": { - "urlCheck": true, + "urlCheck": false, "es6": true, "enhance": false, "postcss": true, diff --git a/utils/api.js b/utils/api.js index e699e78..9682a92 100644 --- a/utils/api.js +++ b/utils/api.js @@ -1,4 +1,4 @@ -const baseURL = 'https://some-domain.com/api/' +const baseURL = 'http://139.159.180.147:9002/' const GET = 'GET'; const POST = 'POST'; const PUT = 'PUT'; @@ -9,7 +9,7 @@ const DELETE = 'DELETE'; function request(method, url, data) { return new Promise(function (resolve, reject) { let header = { - 'content-type': 'application/json', + 'content-type': 'application/json' }; wx.request({ url: baseURL + url, @@ -36,7 +36,8 @@ function request(method, url, data) { const API = { - getOpenid: (data) => request(GET, `jsapi/mini?jsCode=${data}`), + getOpenid: (data) => request(GET, `auth/oauth/token?grant_type=password&username=${data.admin}&password=${data.password}`), + getUserAuth: (data) => request(POST, `auth/social/token`, data) }; module.exports = { API: API