├── .gitignore
├── api.md
├── app.js
├── app.json
├── app.wxss
├── index
├── index.js
├── index.wxml
└── index.wxss
├── login.js
├── pages
├── about
│ ├── about.js
│ ├── about.json
│ ├── about.wxml
│ └── about.wxss
├── business
│ ├── business.js
│ ├── business.json
│ ├── business.wxml
│ └── business.wxss
├── category
│ ├── category.js
│ ├── category.wxml
│ └── category.wxss
├── favorite
│ ├── favorite.js
│ ├── favorite.json
│ ├── favorite.wxml
│ └── favorite.wxss
├── feedback
│ ├── feedback.js
│ ├── feedback.json
│ ├── feedback.wxml
│ └── feedback.wxss
├── goods
│ ├── goods.js
│ ├── goods.wxml
│ └── goods.wxss
├── goods_detail
│ ├── goods_detail.js
│ ├── goods_detail.wxml
│ └── goods_detail.wxss
├── history
│ ├── history.js
│ ├── history.json
│ ├── history.wxml
│ └── history.wxss
├── img
│ ├── home-t.png
│ ├── home.png
│ ├── home1.png
│ ├── home_banner.png
│ ├── my.png
│ └── my1.png
├── index
│ ├── index.js
│ ├── index.wxml
│ └── index.wxss
├── my
│ ├── my.js
│ ├── my.wxml
│ └── my.wxss
└── search
│ ├── search.js
│ ├── search.json
│ ├── search.wxml
│ └── search.wxss
├── project.config.json
├── readme.md
├── readme_files
├── 1.jpg
├── 2.jpg
└── 3.jpg
└── util.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
--------------------------------------------------------------------------------
/api.md:
--------------------------------------------------------------------------------
1 | # api地址
2 |
3 | ## 房产
4 |
5 | ### https://heiliuer.com
6 |
7 | #### [001] 获取房产列表(分页)
8 |
9 | [GET] /api/wxapp/house
10 |
11 |
12 | #### [002] 获取房产详情
13 |
14 | [GET] /api/wxapp/house/:id
15 |
16 | #### [003] 关于我们
17 |
18 | [GET] /api/wxapp/about
19 |
20 | #### [004] 足迹-增加
21 |
22 | [POST] /api/wxapp/user_track
23 |
24 | request body:
25 | ```json
26 | {
27 | "houseId":"xxxxx"
28 | }
29 | ```
30 |
31 | #### [005] 足迹-列表 (分页)
32 |
33 | [GET] /api/wxapp/user_track
34 |
35 |
36 | #### [006] 收藏-增加
37 |
38 | [POST] /api/wxapp/favorite
39 |
40 | request body:
41 | ```json
42 | {
43 | "houseId":"xxxxx"
44 | }
45 | ```
46 |
47 | #### [007] 收藏-列表 (分页)
48 |
49 | [GET] /api/wxapp/favorite
50 |
51 |
52 | #### [008] 反馈-增加
53 |
54 | [POST] /api/wxapp/feedback
55 |
56 | request body:
57 | ```json
58 | {
59 | "content":"反馈内容"
60 | }
61 | ```
62 |
63 | #### [009] 反馈-列表 (分页)
64 |
65 | [GET] /api/wxapp/feedback
66 |
67 |
68 | #### [009] 房产-搜索 (分页)
69 |
70 | [GET] /api/wxapp/search
71 |
72 | query params:
73 | ```json
74 | {
75 | "key":"关键字"
76 | }
77 | ```
78 |
79 |
80 |
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | const {login} = require('./login')
2 |
3 | App({
4 | onLaunch: function() {
5 | login()
6 | }
7 | })
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/index/index",
4 | "pages/my/my",
5 | "pages/search/search",
6 | "pages/goods/goods",
7 | "pages/category/category",
8 | "pages/about/about",
9 | "pages/goods_detail/goods_detail",
10 | "pages/feedback/feedback",
11 | "pages/business/business",
12 | "pages/favorite/favorite",
13 | "pages/history/history"
14 | ],
15 | "window": {
16 | "backgroundTextStyle": "light",
17 | "navigationBarBackgroundColor": "#33ba99",
18 | "navigationBarTitleText": "浦悦地产",
19 | "navigationBarTextStyle": "black",
20 | "enablePullDownRefresh":false
21 | },
22 | "tabBar": {
23 | "color":"#000",
24 | "selectedColor":"#F00",
25 | "list": [
26 | {
27 | "pagePath": "pages/index/index",
28 | "text": "首页",
29 | "iconPath": "pages/img/home.png",
30 | "selectedIconPath": "pages/img/home1.png"
31 | },
32 | {
33 | "pagePath": "pages/my/my",
34 | "text": "我的",
35 | "iconPath": "pages/img/my.png",
36 | "selectedIconPath": "pages/img/my1.png"
37 | }
38 | ]
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app.wxss:
--------------------------------------------------------------------------------
1 | /**app.wxss 公用css**/
2 | @font-face {
3 | font-family: 'iconfont'; /* project id 609296 */
4 | src: url('//at.alicdn.com/t/font_609296_ojp6mdpzy3at6gvi.eot');
5 | src: url('//at.alicdn.com/t/font_609296_ojp6mdpzy3at6gvi.eot?#iefix') format('embedded-opentype'),
6 | url('//at.alicdn.com/t/font_609296_ojp6mdpzy3at6gvi.woff') format('woff'),
7 | url('//at.alicdn.com/t/font_609296_ojp6mdpzy3at6gvi.ttf') format('truetype'),
8 | url('//at.alicdn.com/t/font_609296_ojp6mdpzy3at6gvi.svg#iconfont') format('svg');
9 | }
10 | .iconfont {
11 | font-family:"iconfont" !important;
12 | font-size:16px;
13 | font-style:normal;
14 | -webkit-font-smoothing: antialiased;
15 | -moz-osx-font-smoothing: grayscale;
16 | }
17 | .icon-dianhua2:before { content: "\e604"; }
18 |
19 | .icon-huidaodingbu:before { content: "\e600"; }
20 |
21 | .icon-home:before { content: "\e620"; }
22 |
23 | .icon-zuji:before { content: "\e601"; }
24 |
25 | .icon-tubiao102:before { content: "\e629"; }
26 |
27 | .icon-yijianfankui1:before { content: "\e616"; }
28 |
29 | .icon-grid:before { content: "\e64a"; }
30 |
31 | .icon-94:before { content: "\e674"; }
32 |
33 | .icon-dianhua:before { content: "\e6d0"; }
34 |
35 | .icon-shoucang9:before { content: "\e60f"; }
36 |
37 | .icon-caidan:before { content: "\e780"; }
38 |
39 | .icon-sousuo:before { content: "\e617"; }
40 |
41 | .icon-iconset0413:before { content: "\e724"; }
42 |
43 | .icon-iconfontjiantou2:before { content: "\e634"; }
44 |
45 | .icon-weibiaoti12:before { content: "\e61e"; }
46 |
47 | .icon-grid1:before { content: "\e635";}
48 |
49 | .icon-fangzihouse129:before { content: "\e644"; }
50 |
51 | .icon-dianhua1:before { content: "\e6a3"; }
52 |
53 | .icon-xiangxiajiantou:before { content: "\e630"; }
54 |
55 | .icon-zuji1:before { content: "\e638"; }
56 |
57 | .icon-fangzi:before { content: "\e614"; }
58 |
59 | .icon-zufang:before { content: "\e66e"; }
60 |
61 | .icon-listview:before { content: "\e67b"; }
62 |
63 | .icon-shoucang:before { content: "\e65f"; }
64 |
65 | .icon-sanjiaodown:before { content: "\e6b5"; }
66 |
67 | .icon-dianhua3:before { content: "\e74c"; }
68 |
69 | .icon-jiaoyinzujifangke:before { content: "\e87e"; }
70 |
71 | .icon-listview1:before { content: "\e62c"; }
72 |
73 | .icon-fangzi1:before { content: "\e6d3"; }
74 |
75 | .icon-caidan1:before { content: "\e607"; }
76 |
77 | .icon-caidan11:before { content: "\e611"; }
78 |
79 | .icon-haofangtuo400iconfonthaiwaidichan:before { content: "\e681"; }
80 |
81 | .icon-haofangtuo400iconfonthaofangtuo:before { content: "\e683"; }
82 |
83 | .icon-haofangtuo400iconfontjibenxinxi:before { content: "\e685"; }
84 |
85 | .icon-haofangtuo400iconfontshenqingershoufangshikan:before { content: "\e695"; }
86 |
87 | .icon-haofangtuo400iconfontwodeershoufang:before { content: "\e6a1"; }
88 |
89 | .icon-fankuiyijian:before { content: "\e649"; }
90 |
91 | .icon-yijianfankui2:before { content: "\e619"; }
92 |
93 | .icon-sousuo1:before { content: "\e641"; }
94 |
95 | .icon-haofangtuo400iconfontdianhuaanniu:before { content: "\e6c7"; }
96 |
97 | .icon-youjiantou1:before { content: "\e628"; }
98 |
99 | .icon-shoucang1:before { content: "\e631"; }
100 |
101 | .icon-jiatingfang:before { content: "\e632"; }
102 |
103 | .icon-yixingfangchan:before { content: "\e618"; }
104 |
105 | .icon-star:before { content: "\e639"; }
106 |
107 | .icon-fenxiang-1:before { content: "\e60b"; }
108 |
109 | .icon-shoucang2:before { content: "\e62a"; }
110 |
111 | .icon-900caidan_shouye:before { content: "\e680"; }
112 |
113 | .icon-yijianfankui:before { content: "\e60e"; }
114 |
115 | .icon-icon-test:before { content: "\e64e"; }
116 |
117 | .icon-icon-test1:before { content: "\e64f"; }
118 |
119 | .icon-grid2:before { content: "\e624"; }
120 |
121 | .icon-shangjia:before { content: "\e63a"; }
122 |
123 | .icon-zuji2:before { content: "\e61d"; }
124 |
125 | .icon-zufang1:before { content: "\e622"; }
126 |
127 | .icon-fangyuan:before { content: "\e610"; }
128 |
129 | .icon-wodefangjian:before { content: "\e61a"; }
130 |
131 | .icon-guanyuwomen:before { content: "\e68d"; }
132 |
133 | .icon-shangxiajiantou:before { content: "\e6b7"; }
134 |
135 | .icon-haofangtuoiconfont_dianpushoucang:before { content: "\e704"; }
136 |
137 | .icon-haofangtuoiconfont_dianpu:before { content: "\e705"; }
138 |
139 | .icon-haofangtuoiconfont_fangyuanguanli:before { content: "\e706"; }
140 |
141 | .icon-share:before { content: "\e6fb"; }
142 |
143 | .icon-ziyuan:before { content: "\e637"; }
144 |
145 | .icon-shangjiantou:before { content: "\e605"; }
146 |
147 | .icon-xiajiantou:before { content: "\e606"; }
148 |
149 | .icon-laba:before { content: "\e8c1"; }
150 |
151 | .icon-boshiweb_yijianfankui:before { content: "\e62d"; }
152 |
153 | .icon-house:before { content: "\e657"; }
154 |
155 | .icon-zuji3:before { content: "\e602"; }
156 |
157 | .icon-laba1:before { content: "\e62b"; }
158 |
159 | .icon-home1:before { content: "\e69c"; }
160 |
161 | .icon-zuixinfangyuan:before { content: "\e656"; }
162 |
163 | .icon-shoucang3:before { content: "\e7a7"; }
164 |
165 | .icon-laba2:before { content: "\e643"; }
166 |
167 | .icon-huidaodingbu1:before { content: "\e88d"; }
168 |
169 | .icon-xiangxiajiantoucuxiao:before { content: "\e8c8"; }
170 |
171 | .icon-laba3:before { content: "\e621"; }
172 |
173 | .icon-fangzi2:before { content: "\e615"; }
174 |
175 | .icon-arrow-bottom:before { content: "\e765"; }
176 |
177 | .icon-shoucang4:before { content: "\e670"; }
178 |
179 | .icon-shoucang5:before { content: "\e603"; }
180 |
181 | .icon-sousuo2:before { content: "\e633"; }
182 |
183 | .icon-fenxiang:before { content: "\e648"; }
184 |
185 | .icon-loufang:before { content: "\e61b"; }
186 |
187 | .icon-sousuo3:before { content: "\e61c"; }
188 |
189 | .icon-collection-b:before { content: "\e60d"; }
190 |
191 | .icon-shoucang6:before { content: "\e78c"; }
192 |
193 | .icon-icon-:before { content: "\e61f"; }
194 |
195 | .icon-shoucang7:before { content: "\e694"; }
196 |
197 | .icon-fangjian:before { content: "\e613"; }
198 |
199 | .icon-zhuyefangzi:before { content: "\e6a5"; }
200 |
201 | .icon-shoucang8:before { content: "\e623"; }
202 |
203 | .icon-tubiaozhizuomobandefuben-:before { content: "\e612"; }
204 |
205 | .icon-zhcc_xiangshangjiantou:before { content: "\e688"; }
206 |
207 | .icon-zhcc_xiangxiajiantou:before { content: "\e689"; }
208 |
209 | .icon-fangzi3:before { content: "\e8ff"; }
210 |
211 | .icon-xiangxiajiantou1:before { content: "\e98f"; }
212 |
213 |
214 |
215 |
216 |
217 | .weui-tabbar{
218 | height: 60rpx !important;
219 | }
220 | .index-loading{
221 | margin:0;
222 | text-align: center;
223 | height: 100rpx;
224 | line-height: 100rpx;
225 | }
226 | button::after {
227 | border-radius: 0;
228 | border: none;
229 | }
230 | .index-f-phone{
231 | background-color: #fff;
232 | width: 80rpx;
233 | height: 80rpx;
234 | color: #000;
235 | border-radius: 40rpx;
236 | position: fixed;
237 | bottom: 80rpx;
238 | right: 30rpx;
239 | border: 1rpx solid #eee;
240 | line-height: 44rpx;
241 | }
242 | .index-f-phone .iconfont{
243 | font-size: 58rpx;
244 | position: absolute;
245 | top:14rpx;
246 | left: 10rpx;
247 | color: rgba(99, 91, 102, 0.91);
248 | }
249 |
250 | page{
251 | font-size:28rpx;
252 | height: 100%;
253 | background-color: #fff;
254 | font-family: -apple-system-font, Helvetica Neue, Helvetica, sans-serif;
255 | }
256 |
257 | .lf {
258 | float: left;
259 | }
260 | .rt {
261 | float: right;
262 | }
263 | .cf:after {
264 | content: "";
265 | display: table;
266 | height: 0;
267 | clear: both;
268 | visibility: hidden;
269 | }
270 | .index-tc{
271 | width: 100%;
272 | height: 16rpx;
273 | background-color: #f3f3f3;
274 | }
275 | /*100%列表*/
276 | .index-con-m,.index-con-new{
277 | width: 750rpx;
278 | box-sizing: border-box;
279 | padding-left:30rpx;
280 | padding-right: 30rpx;
281 | display: block;
282 | margin-top: 80rpx;
283 | }
284 | .index-con-new{
285 | margin-top: 110rpx;
286 | }
287 | .index-con-m .index-con-t-con{
288 | width:100%;
289 | padding: 34rpx 0;
290 | box-sizing: border-box;
291 | }
292 | .index-con-m image{
293 | width: 210rpx;
294 | height:160rpx ;
295 | }
296 | .index-con-m .index-con-mc{
297 | width: 480rpx;
298 | height:160rpx ;
299 | box-sizing: border-box;
300 | padding-left: 20rpx;
301 | }
302 | .index-con-m .index-con-mc-title,.index-con-new .index-con-mc-title{
303 | display: -webkit-box;
304 | font-size:28rpx;
305 | color:#000000;
306 | line-height: 40rpx;
307 | }
308 | .index-con-m .index-con-mc-address,.index-con-new .index-con-mc-address{
309 | display: block;
310 | color: #666;
311 | font-size: 26rpx;
312 | padding: 6rpx 0;
313 | }
314 | .index-con-m .index-con-mc-price,.index-con-new .index-con-mc-price{
315 | color: red;
316 | font-size: 24rpx;
317 | }
318 | .index-con-m .index-con-mc-price i,.index-con-new .index-con-mc-price i{
319 | font-size: 30rpx;
320 | }
321 | /*goods 100%class切换*/
322 | .index-con-new image{
323 | width: 330rpx;
324 | height: 300rpx;
325 | }
326 | .index-con-new .index-con-t-con{
327 | width: 330rpx;
328 | box-sizing: border-box;
329 | padding-top: 20rpx;
330 | }
331 | .index-con-new .index-con-t-con:nth-child(2n-1){
332 | margin-right: 30rpx;
333 | }
334 | .index-con-new .index-con-mc{
335 | width: 330rpx;
336 | padding-bottom: 20rpx;
337 | }
338 |
339 |
340 | .ui-border-b:before {
341 | border-bottom: 1px solid #e9e9e9;
342 | content: '';
343 | display: block;
344 | width: 100%;
345 | position: absolute;
346 | left: 0;
347 | bottom: 0;
348 | -webkit-transform-origin: left bottom
349 | }
350 |
351 | @media screen and (-webkit-min-device-pixel-ratio: 2) {
352 | .ui-border-b:before {
353 | -webkit-transform: scaleY(0.5)
354 | }
355 | }
356 |
357 | @media screen and (-webkit-min-device-pixel-ratio: 3) {
358 | .ui-border-b:before {
359 | -webkit-transform: scaleY(0.3333)
360 | }
361 | }
362 |
363 | .ui-border-t:before {
364 | border-top: 1px solid #e9e9e9;
365 | content: '';
366 | display: block;
367 | width: 100%;
368 | position: absolute;
369 | left: 0;
370 | top: 0;
371 | -webkit-transform-origin: left top
372 | }
373 |
374 | @media screen and (-webkit-min-device-pixel-ratio: 2) {
375 | .ui-border-t:before {
376 | -webkit-transform: scaleY(0.5)
377 | }
378 | }
379 |
380 | @media screen and (-webkit-min-device-pixel-ratio: 3) {
381 | .ui-border-t:before {
382 | -webkit-transform: scaleY(0.3333)
383 | }
384 | }
385 |
386 | .ui-border-l:before {
387 | border-left: 1px solid #e9e9e9;
388 | content: '';
389 | display: block;
390 | bottom: 0;
391 | position: absolute;
392 | left: 0;
393 | top: 0;
394 | -webkit-transform-origin: left top
395 | }
396 |
397 | @media screen and (-webkit-min-device-pixel-ratio: 2) {
398 | .ui-border-l:before {
399 | -webkit-transform: scaleX(0.5)
400 | }
401 | }
402 |
403 | @media screen and (-webkit-min-device-pixel-ratio: 3) {
404 | .ui-border-l:before {
405 | -webkit-transform: scaleX(0.3333)
406 | }
407 | }
408 |
409 | .ui-border-r:before {
410 | border-right: 1px solid #e9e9e9;
411 | content: '';
412 | display: block;
413 | bottom: 0;
414 | position: absolute;
415 | right: 0;
416 | top: 0;
417 | -webkit-transform-origin: right top
418 | }
419 |
420 | @media screen and (-webkit-min-device-pixel-ratio: 2) {
421 | .ui-border-r:before {
422 | -webkit-transform: scaleX(0.5)
423 | }
424 | }
425 |
426 | @media screen and (-webkit-min-device-pixel-ratio: 3) {
427 | .ui-border-r:before {
428 | -webkit-transform: scaleX(0.3333)
429 | }
430 | }
431 |
432 | .ui-border-t,
433 | .ui-border-l,
434 | .ui-border-b,
435 | .ui-border-r,
436 | .ui-border-tb {
437 | position: relative
438 | }
439 |
440 | .ui-border-tb:before {
441 | border-top: 1px solid #e9e9e9;
442 | content: '';
443 | display: block;
444 | width: 100%;
445 | position: absolute;
446 | left: 0;
447 | top: 0;
448 | -webkit-transform-origin: left top
449 | }
450 |
451 | @media screen and (-webkit-min-device-pixel-ratio: 2) {
452 | .ui-border-tb:before {
453 | -webkit-transform: scaleY(0.5)
454 | }
455 | }
456 |
457 | @media screen and (-webkit-min-device-pixel-ratio: 3) {
458 | .ui-border-tb:before {
459 | -webkit-transform: scaleY(0.3333)
460 | }
461 | }
462 |
463 | .ui-border-tb:after {
464 | border-bottom: 1px solid #e9e9e9;
465 | content: '';
466 | display: block;
467 | width: 100%;
468 | position: absolute;
469 | left: 0;
470 | bottom: 0;
471 | -webkit-transform-origin: left bottom
472 | }
473 |
474 | @media screen and (-webkit-min-device-pixel-ratio: 2) {
475 | .ui-border-tb:after {
476 | -webkit-transform: scaleY(0.5)
477 | }
478 | }
479 |
480 | @media screen and (-webkit-min-device-pixel-ratio: 3) {
481 | .ui-border-tb:after {
482 | -webkit-transform: scaleY(0.3333)
483 | }
484 | }
485 |
486 | .ui-border:before {
487 | content: "";
488 | width: 100%;
489 | height: 100%;
490 | position: absolute;
491 | top: 0;
492 | left: 0;
493 | border: 1px solid #e9e9e9;
494 | -webkit-transform-origin: 0 0;
495 | padding: 1px;
496 | -webkit-box-sizing: border-box;
497 | pointer-events: none;
498 | z-index: 10;
499 | pointer-events: none
500 | }
501 |
502 | @media screen and (-webkit-min-device-pixel-ratio: 2) {
503 | .ui-border:before {
504 | width: 200%;
505 | height: 200%;
506 | -webkit-transform: scale(0.5)
507 | }
508 | }
509 |
510 | @media screen and (-webkit-min-device-pixel-ratio: 3) {
511 | .ui-border:before {
512 | width: 300%;
513 | height: 300%;
514 | -webkit-transform: scale(0.3333)
515 | }
516 | }
517 |
518 |
519 |
--------------------------------------------------------------------------------
/index/index.js:
--------------------------------------------------------------------------------
1 | const app = getApp()
2 |
3 | Page({
4 | data: {
5 |
6 | },
7 | onLoad: function () {
8 | console.log('https://mp.weixin.qq.com/debug/wxadoc/dev/devtools/devtools.html')
9 | },
10 | })
11 |
--------------------------------------------------------------------------------
/index/index.wxml:
--------------------------------------------------------------------------------
1 | 欢迎使用代码片段,可在控制台查看代码片段的说明和文档
--------------------------------------------------------------------------------
/index/index.wxss:
--------------------------------------------------------------------------------
1 | .intro {
2 | margin: 30px;
3 | text-align: center;
4 | }
--------------------------------------------------------------------------------
/login.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by 丸子 on 2018/4/7.
3 | */
4 | const {relativeurl} = require('./util')
5 |
6 | module.exports.saveToken = function(token) {
7 | try {
8 | wx.setStorageSync('token', token)
9 | } catch (e) {}
10 | }
11 | // 登录
12 | module.exports.login = function () {
13 | wx.login({
14 | success: function (res) {
15 | if (res.code) {
16 | //发起网络请求
17 | wx.request({
18 | method: "POST",
19 | url: relativeurl + 'api/wxapp/session/login',
20 | data: {
21 | code: res.code,
22 | },
23 | success(res){
24 | if(res.data.status == 0){
25 | const {token} = res.data.data
26 | exports.saveToken(token)
27 | }
28 | }
29 | })
30 | } else {
31 | console.log('登录失败!' + res.errMsg)
32 | }
33 | }
34 | })
35 | }
36 | // 获取存储token 查看用户是否登录
37 | module.exports.getToken = function () {
38 | try {
39 | var token = (wx.getStorageSync('token') || '').trim()
40 | return token
41 | } catch (e) {
42 | }
43 | return ''
44 | }
--------------------------------------------------------------------------------
/pages/about/about.js:
--------------------------------------------------------------------------------
1 | //index.js
2 | //获取应用实例
3 | const {requestData} = require('../../util')
4 |
5 | Page({
6 | requestData,
7 | onLoad(){
8 | this.requestData()
9 | }
10 | })
11 |
--------------------------------------------------------------------------------
/pages/about/about.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "关于我们"
3 | }
--------------------------------------------------------------------------------
/pages/about/about.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 公司简介
4 | 发布时间:2018年1月1日
5 |
6 | {{requestData.desc}}
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/pages/about/about.wxss:
--------------------------------------------------------------------------------
1 | page{
2 | background-color: #f3f3f3;
3 | }
4 | .about{
5 | width: 100%;
6 | box-sizing: border-box;
7 | padding: 20rpx 30rpx;
8 | }
9 | .about text:first-child{
10 | font-weight: bold;
11 | padding: 10rpx 0;
12 | color: #000;
13 | }
14 | .about text:nth-child(2){
15 | display: block;
16 | color: #aaa;
17 | padding: 20rpx 0
18 | }
19 | .about view{
20 | background-color: #fff;
21 | color: #000;
22 | padding: 20rpx;
23 | text-indent:56rpx;
24 | line-height: 56rpx;
25 | border-radius: 4rpx;
26 | }
--------------------------------------------------------------------------------
/pages/business/business.js:
--------------------------------------------------------------------------------
1 | //index.js
2 | //获取应用实例
3 | const {calling, requestData} = require('../../util')
4 |
5 |
6 | Page({
7 | requestData,
8 | calling(){
9 | calling(this.data.pageData.contact.phone[0])
10 | },
11 | onLoad(){
12 | this.requestData()
13 | }
14 | })
--------------------------------------------------------------------------------
/pages/business/business.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "用户反馈"
3 | }
--------------------------------------------------------------------------------
/pages/business/business.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{requestData.name}}
4 |
5 |
6 | 店铺介绍
7 |
8 |
9 |
10 | 公司信息
11 |
12 |
13 | 名称:{{requestData.name}}
14 |
15 |
16 | 联系人:{{requestData.contact.personName}}
17 |
18 |
19 | 联系方式:
20 | {{requestData.contact.phone[0]}}
21 |
22 |
23 | 公司地址:
24 | {{requestData.address}}
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/pages/business/business.wxss:
--------------------------------------------------------------------------------
1 | .business{
2 | width: 100%;
3 | box-sizing: border-box;
4 | }
5 | .business-top{
6 | width: 100%;
7 | height: 300rpx;
8 | padding-top: 160rpx;
9 | box-sizing: border-box;
10 | font-size: 34rpx;
11 | font-weight: bold;
12 | text-align: center;
13 | }
14 | .business-con-title{
15 | width: 100%;
16 | box-sizing: border-box;
17 | height: 88rpx;
18 | line-height: 88rpx;
19 | padding: 0 30rpx;
20 | }
21 | .business-con-title text{
22 | width: 140rpx;
23 | display: inline-block;
24 | }
25 |
--------------------------------------------------------------------------------
/pages/category/category.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by 丸子 on 2018-03-31.
3 | */
4 | const {relativeurl} = require('../../util')
5 |
6 | Page({
7 | data: {
8 | date: true,
9 | price: null
10 | },
11 | toggleListActive(event){
12 | const vm = this
13 | const {type} = event.currentTarget.dataset
14 | if (type == "date") {
15 | vm.setData({
16 | price: null,
17 | date: !vm.data.date
18 | })
19 | } else if (type == "price") {
20 | vm.setData({
21 | date: null,
22 | price: !vm.data.price
23 | })
24 | }
25 | vm._index_curPage = 1
26 | vm._index_loaded=false
27 | vm.requestSearch()
28 | },
29 | toggleListStyle(){
30 | var vm = this
31 | vm.setData({
32 | isList: !vm.data.isList
33 | })
34 | },
35 | requestSearch() {
36 | var vm = this
37 | if (vm.data.loading || vm._index_loaded) {
38 | return
39 | }
40 | vm.setData({
41 | loading: true
42 | })
43 | vm._index_curPage = vm._index_curPage || 1
44 | const {date, price} = vm.data
45 | wx.request({
46 | method: "GET",
47 | url: relativeurl + 'api/wxapp/search',
48 | dataType: 'json',
49 | data: {
50 | sort: {
51 | createTime: date,
52 | averagePrice: price
53 | },
54 | categoryId: vm.data.id,
55 | page: vm._index_curPage,
56 | limit: 10
57 | },
58 | header: {},
59 | success(res) {
60 | if (res.statusCode == 200) {
61 | const {docs, page, pages} = res.data.data
62 | const goodsList = (vm.data.goodsList || []).concat(docs)
63 | if (page >= pages) {
64 | vm._index_loaded = true
65 | vm.setData({
66 | loaded: true
67 | })
68 | }
69 | vm.setData({goodsList})
70 | vm._index_curPage++
71 | } else {
72 | wx.showModal({
73 | title: '提示',
74 | content: '请求出错',
75 | showCancel: false,
76 | success: function (res) {
77 | if (res.confirm) {
78 | }
79 | }
80 | })
81 | }
82 | },
83 | fail() {
84 | wx.showModal({
85 | title: '提示',
86 | content: '请求出错',
87 | showCancel: false,
88 | success: function (res) {
89 | if (res.confirm) {
90 | }
91 | }
92 | })
93 | },
94 | complete() {
95 | vm.setData({
96 | loading: false
97 | })
98 | },
99 | })
100 | },
101 | onShareAppMessage(res) {
102 | const vm = this
103 | return {
104 | title: '蒲悦地产',
105 | path: '/pages/index/index',
106 | form: 'menu',
107 | success: function (res) {
108 | // 转发成功
109 | },
110 | fail: function (res) {
111 | // 转发失败
112 | }
113 | }
114 | },
115 | onLoad(param) {
116 | var vm = this
117 | vm.setData({
118 | id: param.id
119 | })
120 | vm.requestSearch()
121 | }
122 | })
123 |
--------------------------------------------------------------------------------
/pages/category/category.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 日期
4 |
5 |
6 |
7 | 价格
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 | {{item.name}}
20 | {{item.mark}}
21 |
22 | 均价¥ {{item.averagePrice}}
23 |
24 |
25 |
26 |
27 | 正在加载...
28 | 没有更多数据了...
29 |
30 |
--------------------------------------------------------------------------------
/pages/category/category.wxss:
--------------------------------------------------------------------------------
1 | .goods-title{
2 | height: 80rpx;
3 | line-height: 80rpx;
4 | width: 750rpx;
5 | position: fixed;
6 | top: 0;
7 | left: 0;
8 | background-color: #fff;
9 | z-index: 999;
10 | }
11 | .goods-title .toggle-list{
12 | display: inline-block;
13 | width: 33.333%;
14 | text-align: center;
15 | font-size: 30rpx;
16 | height: 80rpx;
17 | line-height: 80rpx;
18 | position: relative;
19 | }
20 | .iconfont-list{
21 | display: inline-block;
22 | width: 33.333%;
23 | text-align: center;
24 | height: 80rpx;
25 | line-height: 80rpx;
26 | }
27 | .goods-title .toggle-list .iconfont{
28 | font-size: 24rpx;
29 | position: absolute;
30 | top:-8rpx;
31 | right: 56rpx;
32 | }
33 | .goods-title .toggle-list .iconfont{
34 | color: #333;
35 | }
36 | .goods-title .toggle-list.up, .goods-title .toggle-list.up .icon-zhcc_xiangshangjiantou:before{
37 | color:red;
38 | }
39 | .goods-title .toggle-list.down, .goods-title .toggle-list.down .icon-zhcc_xiangxiajiantou:before{
40 | color:red;
41 | }
42 | .icon-listview:before {
43 | content:"\e67b";
44 | font-size: 36rpx;
45 | color: #000;
46 | font-weight: bold;
47 | }
48 |
49 | .icon-grid2:before {
50 | content: "\e624";
51 | color: #000;
52 | font-size: 34rpx;
53 | }
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/pages/favorite/favorite.js:
--------------------------------------------------------------------------------
1 | //index.js
2 | //获取应用实例
3 | const {relativeurl} = require('../../util')
4 | const {getToken} = require('../../login')
5 | const app = getApp()
6 | Page({
7 | data: {
8 | currPage: 1,//页码
9 | totalPage: 5,// 总页码
10 | },
11 | tapName: function (event) {
12 | },
13 | requestDataList: function () {
14 | var vm = this
15 | //如果全局变量loading(该方法是否执行完毕) 或者是这个方法内的变量_index_loaded(是否最后一页)任意一个不为true的话,直接跳出该方法
16 | if (vm.data.loading || vm._index_loaded) {
17 | return
18 | }
19 | //赋值全部变量的loading为true
20 | vm.setData({
21 | loading: true
22 | })
23 | //当前页码值默认为1
24 | vm._index_curPage = vm._index_curPage || 1
25 | wx.request({
26 | method: "GET",
27 | url: relativeurl + 'api/wxapp/favorite',
28 | dataType: 'json',
29 | header: {
30 | 'Authorization': 'JWT ' + getToken()
31 | },
32 | data: {
33 | page: vm._index_curPage,
34 | limit: 10
35 | },
36 | success(res) {
37 | if (res.statusCode == 200) {
38 | const {docs, page, pages} = res.data.data
39 | const dataList = (vm.data.dataList || []).concat(docs)
40 | if (page >= pages) {
41 | vm._index_loaded = true
42 | vm.setData({
43 | loaded: true
44 | })
45 | }
46 | vm.setData({dataList})
47 | vm._index_curPage++
48 | } else {
49 | wx.showModal({
50 | title: '提示',
51 | content: '请求出错',
52 | showCancel: false,
53 | success: function (res) {
54 | if (res.confirm) {
55 | }
56 | }
57 | })
58 | }
59 | },
60 | fail() {
61 | wx.showModal({
62 | title: '提示',
63 | content: '请求出错',
64 | showCancel: false,
65 | success: function (res) {
66 | if (res.confirm) {
67 | }
68 | }
69 | })
70 | },
71 | complete() {
72 | vm.setData({
73 | loading: false
74 | })
75 | }
76 | })
77 | },
78 |
79 | onLoad: function () {
80 | this.requestDataList()
81 | },
82 | })
83 |
--------------------------------------------------------------------------------
/pages/favorite/favorite.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "我的收藏"
3 | }
--------------------------------------------------------------------------------
/pages/favorite/favorite.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 | {{item.house.name}}
11 | {{item.house.mark}}
12 |
13 | 均价¥ {{item.house.averagePrice}}
14 |
15 |
16 |
17 |
18 | 正在加载...
19 | 没有更多数据了...
20 |
21 |
--------------------------------------------------------------------------------
/pages/favorite/favorite.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Meatball-o/pydc-wx_wxapp/0e204d330726798c533521f20a5f7518f800f37e/pages/favorite/favorite.wxss
--------------------------------------------------------------------------------
/pages/feedback/feedback.js:
--------------------------------------------------------------------------------
1 | //index.js
2 | const {getToken} = require("../../login.js")
3 | //获取应用实例
4 | const {relativeurl} = require('../../util')
5 |
6 | var app = getApp()
7 | Page({
8 | data: {
9 | con: '',
10 | wx:'',
11 | email:''
12 | },
13 | onLoad: function () {
14 | },
15 | //事件
16 | bindInputCon(event) {
17 | var vm=this
18 | setTimeout(function () {
19 | vm.setData({
20 | con:event.detail.value
21 | })
22 | })
23 | },
24 | bindInputEmail(event) {
25 | var vm=this
26 | setTimeout(function () {
27 | vm.setData({
28 | email:event.detail.value
29 | })
30 | })
31 | },
32 | bindInputWx(event) {
33 | var vm=this
34 | setTimeout(function () {
35 | vm.setData({
36 | wx:event.detail.value
37 | })
38 | })
39 | },
40 | submitFeedback() {
41 | var vm = this
42 | wx.showLoading({
43 | title: '加载中',
44 | })
45 | wx.request({
46 | method: "GET",
47 | url: relativeurl + 'api/wxapp/feedback',
48 | dataType: 'json',
49 | data: {
50 | con:vm.data.con,
51 | wx:vm.data.wx,
52 | email:vm.data.email,
53 | },
54 | header: {
55 | 'Authorization': 'JWT ' + getToken()
56 | },
57 | success(res) {
58 | const {success,msg}=res.data
59 | if(success){
60 | wx.showModal({
61 | title: '提示',
62 | cancelText:'回首页',
63 | content: '反馈成功,感谢您的反馈!',
64 | success: function(res) {
65 | if (res.confirm) {
66 | console.log('用户点击确定')
67 | } else if (res.cancel) {
68 | wx.navigateBack({
69 | delta: 2
70 | })
71 | }
72 | }
73 | })
74 | }else{
75 | wx.showModal({
76 | title: '提示',
77 | content: msg||'请求出错',
78 | showCancel: false,
79 | success: function (res) {
80 | if (res.confirm) {
81 | }
82 | }
83 | })
84 | }
85 | },
86 | complete(){
87 | wx.hideLoading()
88 | }
89 | })
90 | },
91 | })
--------------------------------------------------------------------------------
/pages/feedback/feedback.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "关于商家"
3 | }
--------------------------------------------------------------------------------
/pages/feedback/feedback.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
17 |
18 |
--------------------------------------------------------------------------------
/pages/feedback/feedback.wxss:
--------------------------------------------------------------------------------
1 | page{
2 | background-color: #f3f3f3;
3 | }
4 | .feedback{
5 | width: 100%;
6 | box-sizing: border-box;
7 | padding: 0 30rpx;
8 |
9 | }
10 | .feedback textarea{
11 | background-color: #fff;
12 | width: 100%;
13 | border-radius: 10rpx;
14 | box-sizing: border-box;
15 | margin-top: 20rpx;
16 | padding: 20rpx;
17 | }
18 | .feedback-con{
19 | margin-top: 40rpx;
20 | width: 100%;
21 | box-sizing: border-box;
22 | }
23 | .feedback-con view{
24 | position: relative;
25 | height: 80rpx;
26 | line-height: 80rpx;
27 | padding: 0 40rpx;
28 | background-color: #fff;
29 | }
30 | .feedback-con view input{
31 | display: inline-block;
32 | position: absolute;
33 | top:14rpx;
34 | left: 200rpx;
35 | }
36 | .feedback button{
37 | height: 80rpx;
38 | line-height: 80rpx;
39 | color: #fff;
40 | text-align: center;
41 | width: 80%;
42 | margin-left: 10%;
43 | margin-top: 40rpx;
44 | }
--------------------------------------------------------------------------------
/pages/goods/goods.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by 丸子 on 2018-03-31.
3 | */
4 | const {relativeurl} = require('../../util')
5 |
6 | Page({
7 | data: {
8 | date: true,
9 | price: null
10 | },
11 | toggleListActive(event){
12 | const vm = this
13 | const {type} = event.currentTarget.dataset
14 | if (type == "date") {
15 | vm.setData({
16 | price: null,
17 | date: !vm.data.date
18 | })
19 | } else if (type == "price") {
20 | vm.setData({
21 | date: null,
22 | price: !vm.data.price
23 | })
24 | }
25 | vm._index_curPage = 1
26 | vm._index_loaded=false
27 | vm.requestSearch()
28 | },
29 | toggleListStyle(){
30 | var vm = this
31 | vm.setData({
32 | isList: !vm.data.isList
33 | })
34 | },
35 | tapName: function (event) {
36 | },
37 | requestSearch() {
38 | var vm = this
39 | //如果全局变量loading(该方法是否执行完毕) 或者是这个方法内的变量_index_loaded(是否最后一页)任意一个不为true的话,直接跳出该方法
40 | if (vm.data.loading || vm._index_loaded) {
41 | return
42 | }
43 | //赋值全部变量的loading为true
44 | vm.setData({
45 | loading: true
46 | })
47 | //当前页码值默认为1
48 | vm._index_curPage = vm._index_curPage || 1
49 | const {date, price} = vm.data
50 | wx.request({
51 | method: "GET",
52 | url: relativeurl + 'api/wxapp/search',
53 | dataType: 'json',
54 | data: {
55 | sort: {
56 | createTime: date,
57 | averagePrice: price
58 | },
59 | key: vm.data.key || '',
60 | page: vm._index_curPage,
61 | limit: 10
62 | },
63 | header: {},
64 | success(res) {
65 | if (res.statusCode == 200) {
66 | const {docs, page, pages} = res.data.data
67 | const goodsList = (vm.data.goodsList || []).concat(docs)
68 | if (page >= pages) {
69 | vm._index_loaded = true
70 | vm.setData({
71 | loaded: true
72 | })
73 | }
74 | vm.setData({goodsList})
75 | vm._index_curPage++
76 | } else {
77 | wx.showModal({
78 | title: '提示',
79 | content: '请求出错',
80 | showCancel: false,
81 | success: function (res) {
82 | if (res.confirm) {
83 | }
84 | }
85 | })
86 | }
87 | },
88 | fail() {
89 | wx.showModal({
90 | title: '提示',
91 | content: '请求出错',
92 | showCancel: false,
93 | success: function (res) {
94 | if (res.confirm) {
95 | }
96 | }
97 | })
98 | },
99 | complete: function () {
100 | vm.setData({
101 | loading: false
102 | })
103 | },
104 | })
105 | },
106 | onShareAppMessage(res) {
107 | const vm = this
108 | return {
109 | title: '蒲悦地产',
110 | path: '/pages/index/index',
111 | form: 'menu',
112 | success: function (res) {
113 | // 转发成功
114 | },
115 | fail: function (res) {
116 | // 转发失败
117 | }
118 | }
119 | },
120 | onLoad(param) {
121 | var vm = this
122 | vm.setData({
123 | key: param.key
124 | })
125 | vm.requestSearch()
126 | }
127 | })
128 |
--------------------------------------------------------------------------------
/pages/goods/goods.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 日期
4 |
5 |
6 |
7 | 价格
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 | {{item.name}}
20 | {{item.mark}}
21 |
22 | 均价¥ {{item.averagePrice}}
23 |
24 |
25 |
26 |
27 | 正在加载...
28 | 没有更多数据了...
29 |
30 |
--------------------------------------------------------------------------------
/pages/goods/goods.wxss:
--------------------------------------------------------------------------------
1 | .goods-title{
2 | height: 80rpx;
3 | line-height: 80rpx;
4 | width: 750rpx;
5 | position: fixed;
6 | top: 0;
7 | left: 0;
8 | background-color: #fff;
9 | z-index: 999;
10 | }
11 | .goods-title .toggle-list{
12 | display: inline-block;
13 | width: 33.333%;
14 | text-align: center;
15 | font-size: 30rpx;
16 | height: 80rpx;
17 | line-height: 80rpx;
18 | position: relative;
19 | }
20 | .iconfont-list{
21 | display: inline-block;
22 | width: 33.333%;
23 | text-align: center;
24 | height: 80rpx;
25 | line-height: 80rpx;
26 | }
27 | .goods-title .toggle-list .iconfont{
28 | font-size: 24rpx;
29 | position: absolute;
30 | top:-8rpx;
31 | right: 56rpx;
32 | }
33 | .goods-title .toggle-list .iconfont{
34 | color: #333;
35 | }
36 |
37 | .goods-title .toggle-list.up, .goods-title .toggle-list.up .icon-zhcc_xiangshangjiantou:before{
38 | color:red;
39 | }
40 | .goods-title .toggle-list.down, .goods-title .toggle-list.down .icon-zhcc_xiangxiajiantou:before{
41 | color:red;
42 | }
43 | .icon-listview:before {
44 | content:"\e67b";
45 | font-size: 36rpx;
46 | color: #000;
47 | font-weight: bold;
48 | }
49 |
50 | .icon-grid2:before {
51 | content: "\e624";
52 | color: #000;
53 | font-size: 34rpx;
54 | }
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/pages/goods_detail/goods_detail.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by 丸子 on 2018-03-31.
3 | */
4 | const {calling, relativeurl} = require('../../util')
5 | const {getToken} = require('../../login')
6 | Page({
7 | data: {
8 | indicatorDots: true,
9 | autoplay: true,
10 | interval: 5000,
11 | duration: 500,
12 | favoriteOn: false
13 | },
14 | // 数据
15 | calling(){
16 | calling(this.data.pageData.contact.phone[0])
17 | },
18 | requestDataList() {
19 | wx.showLoading({
20 | title: '加载中',
21 | })
22 | var vm = this
23 | var id = vm.data.id || "5ac73e97dd8fa225082fa9af"
24 | vm.setData({
25 | loading: true
26 | })
27 | wx.request({
28 | method: "GET",
29 | url: relativeurl + 'api/wxapp/house/' + id,
30 | dataType: 'json',
31 | header: {
32 | 'Authorization': 'JWT ' + getToken()
33 | },
34 | success: function (res) {
35 | const houseDetail = res.data.data
36 | const {favoriteOn} = houseDetail
37 | vm.setData({
38 | houseDetail,
39 | favoriteOn
40 | })
41 | wx.setNavigationBarTitle({
42 | title: vm.data.houseDetail.name//页面标题为路由参数
43 | })
44 | },
45 | complete() {
46 | vm.setData({
47 | loadingImg: false
48 | })
49 | wx.hideLoading()
50 | }
51 | })
52 | },
53 | onShareAppMessage(res) {
54 | wx.showLoading({
55 | title: '加载中',
56 | })
57 | const vm = this
58 | return {
59 | title: '蒲悦地产',
60 | path: '/pages/index/index',
61 | form: 'menu',
62 | success: function (res) {
63 | // 转发成功
64 | },
65 | fail: function (res) {
66 | // 转发失败
67 | },
68 | complete(){
69 | wx.hideLoading()
70 | }
71 | }
72 | },
73 | requestFavorite() {
74 | var vm = this
75 | wx.showLoading({
76 | title: '加载中',
77 | })
78 | wx.request({
79 | method: "POST",
80 | url: relativeurl + 'api/wxapp/favorite',
81 | dataType: 'json',
82 | header: {
83 | 'Authorization': 'JWT ' + getToken()
84 | },
85 | data: {
86 | houseId: vm.data.id
87 | },
88 | success: function (res) {
89 | const {success, msg} = res.data
90 | if (!success) {
91 | wx.showModal({
92 | title: '提示',
93 | content: msg || '请求出错',
94 | showCancel: false,
95 | success: function (res) {
96 | if (res.confirm) {
97 | }
98 | }
99 | })
100 | return
101 | }
102 | var {favoriteOn} = res.data.data
103 | vm.setData({favoriteOn})
104 | if (favoriteOn) {
105 | wx.showToast({
106 | title: '收藏成功',
107 | icon: 'success',
108 | duration: 1200
109 | })
110 | } else {
111 | wx.showToast({
112 | title: '取消收藏成功',
113 | icon: 'success',
114 | duration: 1200
115 | })
116 | }
117 | },
118 | complete() {
119 | vm.setData({
120 | loadingImg: false
121 | })
122 | wx.hideLoading()
123 | }
124 | })
125 | },
126 | previewImage(event) {
127 | var vm = this
128 | var url = event.currentTarget.dataset.url
129 | var imgArr = vm.data.houseDetail.images.map(function (img, index) {
130 | return img.url
131 | })
132 | // houseDetail = houseDetail.split(",")
133 | wx.previewImage({
134 | current: url, // 当前显示图片的http链接
135 | urls: imgArr // 需要预览的图片http链接列表
136 | })
137 | },
138 | addTrack(){
139 | wx.showLoading({
140 | title: '加载中',
141 | })
142 | var vm = this
143 | wx.request({
144 | method: "POST",
145 | url: relativeurl + 'api/wxapp/user_track',
146 | dataType: 'json',
147 | header: {
148 | 'Authorization': 'JWT ' + getToken()
149 | },
150 | data: {
151 | houseId: vm.data.id
152 | },
153 | success: function (res) {
154 | },
155 | complete(){
156 | wx.hideLoading()
157 | }
158 | })
159 | },
160 | onLoad(param) {
161 | var vm = this
162 | vm.setData({
163 | id: param.id
164 | })
165 | this.addTrack()
166 | this.requestDataList()
167 | }
168 | })
--------------------------------------------------------------------------------
/pages/goods_detail/goods_detail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{houseDetail.name}}
9 |
10 |
11 | 818万
12 | 售价
13 |
14 |
15 | 3室2厅2卫
16 | 户型
17 |
18 |
19 | 105.75
20 | 面积
21 |
22 |
23 |
24 |
25 | 单价:
26 | 8888
27 |
28 |
29 | 单价:
30 | 8888
31 |
32 |
33 | 单价:
34 | 8888
35 |
36 |
37 | 单价:
38 | 8888
39 |
40 |
41 | 地铁:
42 |
43 | 1号线香蜜湖站
44 | (距离约381米)
45 |
46 | 1号线香蜜湖站
47 | (距离约381米)
48 |
49 | 1号线香蜜湖站
50 | (距离约381米)
51 |
52 |
53 |
54 |
55 |
56 |
57 | 教育配套:
58 | 黄埔学校(初中部)
59 |
60 |
61 |
62 |
63 | 在售户型
64 |
65 |
66 |
67 |
68 |
69 | 0室1厅1卫 33㎡
70 | 参考总价:76万
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | 房源特色
79 |
80 | 房源特色
81 | 小区位于福田区景田深南大道与香梅路交汇处,地理位置优越,地段好,步行便可到达地铁口,周边有多个公交站点,交通方便,周围设施齐全
82 |
83 |
84 | 房源特色
85 | 小区位于福田区景田深南大道与香梅路交汇处,地理位置优越,地段好,步行便可到达地铁口,周边有多个公交站点,交通方便,周围设施齐全
86 |
87 |
88 |
89 |
90 |
99 | 正在加载...
100 |
101 |
102 |
103 |
106 |
--------------------------------------------------------------------------------
/pages/goods_detail/goods_detail.wxss:
--------------------------------------------------------------------------------
1 | .goods_detail>swiper{
2 | width: 750rpx;
3 | height: 562rpx;
4 | }
5 | .goods_detail swiper image{
6 | width: 750rpx;
7 | height: 562rpx;
8 | }
9 | .goods-d-text{
10 | width: 100%;
11 | box-sizing: border-box;
12 | padding-bottom: 100rpx;
13 | }
14 | .goods-d-text-title{
15 | width: 100%;
16 | display: inline-block;
17 | margin: 30rpx 0;
18 | padding: 0 30rpx;
19 | box-sizing: border-box;
20 | font-size: 34rpx;
21 | font-weight: bold;
22 | }
23 | .goods-d-explain{
24 | width: 94%;
25 | margin:0 3%;
26 | padding: 30rpx 0;
27 | box-sizing: border-box;
28 | }
29 | .goods-d-explain view{
30 | width: 33%;
31 | display: inline-block;
32 | text-align: center;
33 | }
34 | .goods-d-explain view>text{
35 | display: block;
36 | color: #aaa;
37 | }
38 | .goods-d-explain view>text:first-child{
39 | font-size: 32rpx;
40 | padding-bottom: 10rpx;
41 | color: red;
42 | }
43 | .goods-d-con{
44 | width: 100%;
45 | box-sizing: border-box;
46 | padding: 30rpx;
47 | }
48 | .goods-d-con view{
49 | display: inline-block;
50 | width: 50%;
51 | padding-bottom: 20rpx;
52 | }
53 | .goods-d-con view:last-child{
54 | width: 80%;
55 | }
56 | .goods-d-con-view > text:first-child{
57 | color: #aaa;
58 | }
59 | .goods-d-con view:last-child text:first-child{
60 | height: 40rpx;
61 | line-height: 40rpx;
62 | }
63 | .goods-d-jy{
64 | width: 100%;
65 | height: 88rpx;
66 | box-sizing: border-box;
67 | padding: 0 30rpx;
68 | line-height: 88rpx;
69 | }
70 | .goods-d-jy text:first-child{
71 | color: #aaa;
72 | }
73 | .goods-d-characteristic{
74 | width: 100%;
75 | }
76 | .goods-d-characteristic-t{
77 | width: 100%;
78 | box-sizing: border-box;
79 | height: 88rpx;
80 | line-height: 88rpx;
81 | font-size: 32rpx;
82 | font-weight: bold;
83 | padding: 0 30rpx;
84 | display: inline-block;
85 | }
86 | .goods-d-characteristic view{
87 | width: 690rpx;
88 | margin: 0 30rpx;
89 | padding: 20rpx 0;
90 | box-sizing: border-box;
91 | }
92 | .goods-d-characteristic view text:first-child{
93 | display: block;
94 | height: 65rpx;
95 | line-height: 55rpx;
96 | color: #aaa;
97 | }
98 | .goods-d-footer{
99 | width: 100%;
100 | height: 100rpx;
101 | line-height: 100rpx;
102 | position: fixed;
103 | bottom: 0;
104 | left: 0;
105 | background-color: #fff;
106 | }
107 | .goods-d-footer-left{
108 | width: 16%;
109 | display: inline-block;
110 | text-align: center;
111 | }
112 | .goods-d-footer-left text{
113 | display: block;
114 | font-size: 40rpx;
115 | color: #666666;
116 | }
117 | .goods-d-footer-right{
118 | width: 84%;
119 | }
120 | .goods-d-footer-right navigator{
121 | width: 50%;
122 | height: 100rpx;
123 | line-height: 100rpx;
124 | background-color: #e03236;
125 | display: block;
126 | text-align: center;
127 | font-size: 36rpx;
128 | color: #fff;
129 | }
130 | .goods-d-footer-right button{
131 | display: inline-block;
132 | border-radius: 0;
133 | width: 50%;
134 | color: #fff;
135 | height: 100rpx;
136 | line-height: 100rpx;
137 | }
138 | .goods-d-footer-right button:first-child{
139 | background-color:#F5C545 ;
140 | border:none ;
141 | }
142 | .index-loadingImg{
143 | display: block;
144 | position: fixed;
145 | top:50%;
146 | left: 50%;
147 | z-index: 111;
148 | }
149 | .goods-d-footer-left .active{
150 | color: #F5C545;
151 | }
152 | .sell-door{
153 | width: 750rpx;
154 | }
155 | .sell-door-con{
156 | width: 100%;
157 | padding:30rpx;
158 | box-sizing: border-box;
159 | }
160 | .sell-door-con-ov{
161 | display: flex;
162 | background-color: white;
163 | overflow-y: hidden;
164 | -webkit-overflow-scrolling:touch;
165 | }
166 | .sell-door-list{
167 | float: left;
168 | width: 296rpx;
169 | height: 321rpx;
170 | padding-right: 20rpx;
171 | }
172 | .sell-door-list:last-child{
173 | padding-right:0;
174 | }
175 | .sell-door-list image{
176 | float: left;
177 | width: 296rpx;
178 | height: 222rpx;
179 | }
180 | .sell-door-list-explain text{
181 | display: inline-block;
182 | }
183 | .sell-door-list-explain text:first-child{
184 | padding: 8rpx 0;
185 | }
186 | .sell-door-list-explain text:last-child{
187 | font-size: 24rpx;
188 | color: red;
189 | }
190 |
191 |
192 |
--------------------------------------------------------------------------------
/pages/history/history.js:
--------------------------------------------------------------------------------
1 | //index.js
2 | //获取应用实例
3 | const {relativeurl} = require('../../util')
4 | const {getToken} = require('../../login')
5 | const app = getApp()
6 | Page({
7 | data: {
8 | currPage: 1,//页码
9 | totalPage: 5,// 总页码
10 | },
11 | tapName: function (event) {
12 | },
13 | requestDataList: function () {
14 | var vm = this
15 | //如果全局变量loading(该方法是否执行完毕) 或者是这个方法内的变量_index_loaded(是否最后一页)任意一个不为true的话,直接跳出该方法
16 | if (vm.data.loading || vm._index_loaded) {
17 | return
18 | }
19 | //赋值全部变量的loading为true
20 | vm.setData({
21 | loading: true
22 | })
23 | //当前页码值默认为1
24 | vm._index_curPage = vm._index_curPage || 1
25 | wx.request({
26 | method: "GET",
27 | url: relativeurl + 'api/wxapp/user_track',
28 | dataType: 'json',
29 | header: {
30 | 'Authorization': 'JWT ' + getToken()
31 | },
32 | data: {
33 | page: vm._index_curPage,
34 | limit: 10
35 | },
36 | success(res) {
37 | if (res.statusCode == 200) {
38 | const {docs, page, pages} = res.data.data
39 | const dataList = (vm.data.dataList || []).concat(docs)
40 | if (page >= pages) {
41 | vm._index_loaded = true
42 | vm.setData({
43 | loaded: true
44 | })
45 | }
46 | vm.setData({dataList})
47 | vm._index_curPage++
48 | } else {
49 | wx.showModal({
50 | title: '提示',
51 | content: '请求出错',
52 | showCancel: false,
53 | success: function (res) {
54 | if (res.confirm) {
55 | }
56 | }
57 | })
58 | }
59 | },
60 | fail() {
61 | wx.showModal({
62 | title: '提示',
63 | content: '请求出错',
64 | showCancel: false,
65 | success: function (res) {
66 | if (res.confirm) {
67 | }
68 | }
69 | })
70 | },
71 | complete() {
72 | vm.setData({
73 | loading: false
74 | })
75 | }
76 | })
77 | },
78 |
79 | onLoad: function () {
80 | this.requestDataList()
81 | },
82 | })
83 |
--------------------------------------------------------------------------------
/pages/history/history.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "我的收藏"
3 | }
--------------------------------------------------------------------------------
/pages/history/history.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 | {{item.house.name}}
11 | {{item.house.mark}}
12 |
13 | 均价¥ {{item.house.averagePrice}}
14 |
15 |
16 |
17 |
18 | 正在加载...
19 | 没有更多数据了...
20 |
21 |
--------------------------------------------------------------------------------
/pages/history/history.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Meatball-o/pydc-wx_wxapp/0e204d330726798c533521f20a5f7518f800f37e/pages/history/history.wxss
--------------------------------------------------------------------------------
/pages/img/home-t.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Meatball-o/pydc-wx_wxapp/0e204d330726798c533521f20a5f7518f800f37e/pages/img/home-t.png
--------------------------------------------------------------------------------
/pages/img/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Meatball-o/pydc-wx_wxapp/0e204d330726798c533521f20a5f7518f800f37e/pages/img/home.png
--------------------------------------------------------------------------------
/pages/img/home1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Meatball-o/pydc-wx_wxapp/0e204d330726798c533521f20a5f7518f800f37e/pages/img/home1.png
--------------------------------------------------------------------------------
/pages/img/home_banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Meatball-o/pydc-wx_wxapp/0e204d330726798c533521f20a5f7518f800f37e/pages/img/home_banner.png
--------------------------------------------------------------------------------
/pages/img/my.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Meatball-o/pydc-wx_wxapp/0e204d330726798c533521f20a5f7518f800f37e/pages/img/my.png
--------------------------------------------------------------------------------
/pages/img/my1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Meatball-o/pydc-wx_wxapp/0e204d330726798c533521f20a5f7518f800f37e/pages/img/my1.png
--------------------------------------------------------------------------------
/pages/index/index.js:
--------------------------------------------------------------------------------
1 | //index.js
2 | //获取应用实例
3 | const {calling, relativeurl} = require('../../util')
4 |
5 | Page({
6 | data: {
7 | // 是否显示面板指示点
8 | indicatorDots: true,
9 | autoplay: true,
10 | interval: 3000,
11 | duration: 500,
12 | },
13 | tapName(event) {
14 | },
15 | requestHomeData: function () {
16 | var vm = this
17 | wx.showLoading({
18 | title: "加载中"
19 | })
20 | wx.request({
21 | method: "GET",
22 | url: relativeurl + 'api/wxapp/home',
23 | dataType: 'json',
24 | header: {
25 | 'content-type': 'application/json' // 默认值
26 | },
27 | success(res) {
28 | wx.hideLoading()
29 | if (res.statusCode == 200) {
30 | var homeData = res.data.data
31 | vm.setData({
32 | homeData
33 | }
34 | )
35 | } else {
36 | wx.hideLoading()
37 | wx.showModal({
38 | title: '提示',
39 | content: '请求出错',
40 | showCancel: false,
41 | success: function (res) {
42 | if (res.confirm) {
43 | }
44 | }
45 | })
46 | }
47 | },
48 | fail() {
49 | wx.hideLoading()
50 | wx.showModal({
51 | title: '提示',
52 | content: '请求出错',
53 | showCancel: false,
54 | success: function (res) {
55 | if (res.confirm) {
56 | }
57 | }
58 | })
59 | }
60 | })
61 | },
62 | ce(){
63 | console.log(111);
64 | },
65 | ce1(){
66 | console.log(222);
67 | },
68 | requestFavoriteList() {
69 | var vm = this
70 | //如果全局变量loading(该方法是否执行完毕) 或者是这个方法内的变量_index_loaded(是否最后一页)任意一个不为true的话,直接跳出该方法
71 | if (vm.data.loading || vm._index_loaded) {
72 | return
73 | }
74 | //赋值全部变量的loading为true
75 | vm.setData({
76 | loading: true
77 | })
78 | //当前页码值默认为1
79 | vm._index_curPage = vm._index_curPage || 1
80 |
81 | wx.request({
82 | method: "GET",
83 | url: relativeurl + 'api/wxapp/home/user_like',
84 | dataType: 'json',
85 | data: {
86 | page: vm._index_curPage,
87 | limit: 10
88 | },
89 | header: {},
90 | success(res) {
91 | if (res.statusCode == 200) {
92 | const {docs, page, pages} = res.data.data
93 | const favoriteList = (vm.data.favoriteList || []).concat(docs)
94 | if (page >= pages) {
95 | vm._index_loaded = true
96 | vm.setData({
97 | loaded: true
98 | })
99 | }
100 | vm.setData({favoriteList})
101 | vm._index_curPage++
102 | } else {
103 | wx.showModal({
104 | title: '提示',
105 | content: '请求出错',
106 | showCancel: false,
107 | success: function (res) {
108 | if (res.confirm) {
109 | }
110 | }
111 | })
112 | }
113 | },
114 | fail() {
115 | wx.showModal({
116 | title: '提示',
117 | content: '请求出错',
118 | showCancel: false,
119 | success: function (res) {
120 | if (res.confirm) {
121 | }
122 | }
123 | })
124 | },
125 | complete() {
126 | vm.setData({
127 | loading: false
128 | })
129 | }
130 | })
131 | },
132 | calling(){
133 | calling(this.data.pageData.contact.phone[0])
134 | },
135 | onShareAppMessage(res) {
136 | wx.showLoading({
137 | title: '加载中',
138 | })
139 | const vm = this
140 | return {
141 | title: '蒲悦地产',
142 | path: '/pages/index/index',
143 | form: 'menu',
144 | success: function (res) {
145 | // 转发成功
146 | },
147 | fail: function (res) {
148 | // 转发失败
149 | },
150 | complete(){
151 | wx.hideLoading()
152 | }
153 | }
154 | },
155 | onLoad() {
156 | this.requestHomeData()
157 | }
158 | })
159 |
--------------------------------------------------------------------------------
/pages/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 请输入区域,版块或楼盘
9 |
10 |
11 |
12 |
13 |
14 |
15 |
20 |
21 | {{item.name}}
22 |
23 |
24 |
25 | 关于我们
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
38 |
45 |
46 | {{item.name}}
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | 为您推荐
67 |
68 | 查看更多
69 |
70 |
75 |
77 |
78 | {{item.name}}
79 | {{item.mark}}
80 |
81 | 均价¥
82 | {{item.sell/10000}}
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 | 猜您喜欢
92 |
93 |
97 |
98 |
99 | {{item.name}}
100 | {{item.mark}}
101 |
102 | 均价¥ {{item.sell/10000}}
103 |
104 |
105 |
106 |
107 | 正在加载...
108 | 没有更多数据了...
109 |
110 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/pages/index/index.wxss:
--------------------------------------------------------------------------------
1 | /**index.wxss**/
2 | .index-banner{
3 | width:750rpx;
4 | box-sizing: border-box;
5 | height: 306rpx;
6 | padding:30rpx;
7 | }
8 | .index-banner image{
9 | width:100%;
10 | box-sizing: border-box;
11 | height: 276rpx;
12 | }
13 | .index-head {
14 | width: 750rpx;
15 | height: 400rpx;
16 | box-sizing: border-box;
17 | }
18 | .index-head image{
19 | width: 750rpx;
20 | height: 400rpx;
21 | }
22 | .index-head .index-head-txt {
23 | position: absolute;
24 | top:28rpx;
25 | left: 0;
26 | width: 72%;
27 | background: rgba(245, 245, 245, .6);
28 | height: 56rpx;
29 | line-height: 60rpx;
30 | border-radius:28rpx;
31 | margin-left: 14%;
32 | text-align: center;
33 | color: #fff;
34 | z-index: 111;
35 | }
36 | .index-head .index-head-txt .iconfont{
37 | position: absolute;
38 | left:80rpx;
39 | top:-2rpx;
40 |
41 | }
42 | .index-nav .index-nav-con{
43 | width: 100%;
44 | margin: 10rpx 0;
45 | }
46 | .index-nav .index-nav-con .index-con-t-con{
47 | width: 25%;
48 | padding: 26rpx 0 ;
49 | display: inline-block;
50 | font-size: 26rpx;
51 | text-align: center;
52 | }
53 | .index-nav .index-nav-con .index-con-t-con .iconfont{
54 | font-size: 44rpx;
55 | width: 74rpx;
56 | height: 74rpx;
57 | border-radius: 50%;
58 | color: #fff;
59 | margin: 0 auto;
60 | margin-bottom: 14rpx;
61 | box-sizing: border-box;
62 | padding-top: 14rpx;
63 | }
64 | .index-nav .index-nav-con .index-con-t-con:first-child view{
65 | background-color: #E98071;
66 | }
67 | .index-nav .index-nav-con .index-con-t-con:nth-child(2) view{
68 | background-color: #F4C765;
69 | }
70 | .index-nav .index-nav-con .index-con-t-con:nth-child(3) view{
71 | background-color: #91CDE1;
72 | }
73 | .index-nav .index-nav-con .index-con-t-con:nth-child(4) view{
74 | background-color: #B2D55D;
75 | }
76 | .index-nav .index-nav-con .index-con-t-con:nth-child(5) view{
77 | background-color: #8C9BBB;
78 | }
79 | .index-nav .index-nav-con .index-con-t-con:nth-child(6) view{
80 | background-color: #EE9469;
81 | font-weight: bold;
82 | }
83 | .index-nav .index-nav-con .index-con-t-con:nth-child(7) view{
84 | background-color: #8CC9BC;
85 | font-weight: bold;
86 | }
87 | .index-nav .index-nav-con .index-con-t-con:last-child view{
88 | background-color: #F095A3;
89 | }
90 | .index-nav .index-nav-con .index-con-t-con:first-child view:before { content: "\e610"; }
91 | .index-nav .index-nav-con .index-con-t-con:nth-child(2) view:before { content: "\e615"; }
92 | .index-nav .index-nav-con .index-con-t-con:nth-child(3) view:before { content: "\e683"; }
93 | .index-nav .index-nav-con .index-con-t-con:nth-child(4) view:before { content: "\e6a5"; }
94 | .index-nav .index-nav-con .index-con-t-con:nth-child(5) view:before { content: "\e620"; }
95 | .index-nav .index-nav-con .index-con-t-con:nth-child(6) view:before { content: "\e64e"; }
96 | .index-nav .index-nav-con .index-con-t-con:nth-child(7) view:before { content: "\e64f"; }
97 | .index-nav .index-nav-con .index-con-t-con image{
98 | height: 240rpx;
99 | width: 40%;
100 | }
101 | .slide-image{
102 | width: 100%;
103 | height: 300rpx;
104 | }
105 |
106 | /*列表通用*/
107 | .index-con-b-title{
108 | width: 100%;
109 | box-sizing: border-box;
110 | position: relative;
111 | }
112 | .index-con-b-title text{
113 | height: 100rpx;
114 | line-height: 112rpx;
115 | vertical-align: middle;
116 | }
117 | .index-con-b-title .iconfont{
118 | position: absolute;
119 | top: -2rpx;
120 | right: 0;
121 | }
122 | .index-con-b-title navigator{
123 | height: 100rpx;
124 | line-height: 112rpx;
125 | vertical-align: middle;
126 | padding-right: 40rpx;
127 |
128 | }
129 | .index-con-b-title text:first-child{
130 | font-weight: bold;
131 | font-size: 36rpx;
132 | }
133 | /*50%列表*/
134 | .index-con-t{
135 | width: 750rpx;
136 | box-sizing: border-box;
137 | padding-left:30rpx;
138 | padding-right: 30rpx;
139 | display: block;
140 | }
141 | .index-con-t .index-con-t-con{
142 | display: inline-block;
143 | width: 330rpx;
144 | margin-bottom: 15rpx;
145 | background-color: #fff;
146 | }
147 | .index-con-t .index-con-t-con image{
148 | width: 330rpx;
149 | height: 330rpx;
150 | }
151 | .index-con-t .index-con-t-con:nth-child(2n){
152 | margin-right:30rpx;
153 | }
154 | .index-con-c .index-con-title{
155 | display: inline-block;
156 | font-size: 26rpx;
157 |
158 | }
159 | .index-con-c .index-con-address{
160 | display: block;
161 | font-size: 24rpx;
162 | margin: 8rpx 0 12rpx 0;
163 | color: #666;
164 | }
165 | .index-con-c .index-con-price{
166 | display: inline-block;
167 | font-size: 24rpx;
168 | color: red;
169 | }
170 | .index-con-c .index-con-price text:last-child{
171 | font-size: 30rpx;
172 | }
173 | .index-xw-p{
174 | width: 750rpx;
175 | height: 88rpx;
176 | line-height: 88rpx;
177 | box-sizing: border-box;
178 | padding: 0 30rpx;
179 | position: relative;
180 | }
181 | .index-xw{
182 | width: 566rpx;
183 | height: 88rpx;
184 | line-height: 94rpx;
185 | padding-left: 26rpx;
186 | }
187 | .index-xw-p .iconfont:first-child{
188 | font-weight: bold;
189 | color: red;
190 | position: absolute;
191 | top:0rpx;
192 | }
--------------------------------------------------------------------------------
/pages/my/my.js:
--------------------------------------------------------------------------------
1 | var {getToken} = require("../../login")
2 | var {relativeurl} = require("../../util")
3 | Page({
4 | data: {
5 | },
6 | onShareAppMessage: function (res) {
7 | wx.showLoading({
8 | title: '加载中',
9 | })
10 | const vm = this
11 | return {
12 | title: '蒲悦地产',
13 | path: '/pages/index/index',
14 | form: 'menu',
15 | success: function (res) {
16 | // 转发成功
17 | },
18 | fail: function (res) {
19 | // 转发失败
20 | },
21 | complete(){
22 | wx.hideLoading()
23 | }
24 | }
25 | },
26 | requestUserInfo(res) {
27 | wx.showLoading({
28 | title: '加载中',
29 | })
30 | var vm = this
31 | wx.request({
32 | method: "PUT",
33 | url: relativeurl + 'api/wxapp/wxuser',
34 | dataType: 'json',
35 | header: {
36 | 'Authorization': 'JWT ' + getToken()
37 | },
38 | data: {
39 | userInfo:res.userInfo
40 | },
41 | success: function (res) {
42 | },
43 | complete(){
44 | wx.hideLoading()
45 | }
46 | })
47 | },
48 | getUserInfo:function () {
49 | var vm=this
50 | wx.getUserInfo({
51 | success: function(res) {
52 | var userInfo = res.userInfo
53 | var nickName = userInfo.nickName
54 | var avatarUrl = userInfo.avatarUrl
55 | var gender = userInfo.gender //性别 0:未知、1:男、2:女
56 | var province = userInfo.province
57 | var city = userInfo.city
58 | var country = userInfo.country
59 | var _res=res
60 | vm.setData({
61 | userInfo:res.userInfo
62 | })
63 | vm.requestUserInfo(res)
64 | }
65 | })
66 | },
67 | onLoad:function () {
68 | this.getUserInfo()
69 | }
70 | })
--------------------------------------------------------------------------------
/pages/my/my.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{userInfo.nickName}}
6 |
7 |
8 |
9 |
10 | 我的收藏
11 |
12 |
13 |
14 |
15 | 我的足迹
16 |
17 |
18 |
19 |
20 | 关于我们
21 |
22 |
23 |
24 |
25 | 用户反馈
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/pages/my/my.wxss:
--------------------------------------------------------------------------------
1 | .my{
2 | width: 100%;
3 | box-sizing: border-box;
4 | padding: 0 30rpx;
5 | }
6 | .my navigator{
7 | height: 88rpx;
8 | line-height: 88rpx;
9 | position: relative;
10 | padding-left: 60rpx;
11 | font-size: 32rpx;
12 | }
13 | .my navigator .iconfont:first-child{
14 | position: absolute;
15 | top:-2rpx;
16 | left: 0rpx;
17 | font-weight: bold;
18 | }
19 | .favorite .iconfont:first-child{
20 | font-size: 42rpx;
21 | color: #E98071;
22 | }
23 | .history .iconfont:first-child{
24 | font-size: 40rpx;
25 | color: #B2D55D;
26 | }
27 | .business .iconfont:first-child{
28 | font-size: 35rpx;
29 | color: #F095A3;
30 | }
31 | .feedback .iconfont:first-child{
32 | font-size: 35rpx;
33 | color: #8CC9BC;
34 | }
35 |
36 | .personal-info{
37 | width: 750rpx;
38 | height: 360rpx;
39 | margin: 0 auto;
40 | text-align: center;
41 | position: relative;
42 | }
43 | .personal-info .s-image{
44 | width: 120rpx;
45 | height: 120rpx;
46 | border-radius: 60rpx;
47 | margin: 0 auto;
48 | position: absolute;
49 | z-index: 99;
50 | top: 100rpx;
51 | left: 30rpx;
52 | }
53 | .personal-info .py-name{
54 | width: 660rpx;
55 | box-sizing: border-box;
56 | position: absolute;
57 | text-align: left;
58 | z-index: 90;
59 | top: 100rpx;
60 | left: 90rpx;
61 | height: 120rpx;
62 | line-height: 120rpx;
63 | padding-left: 80rpx;
64 | background-color: rgba(255, 255, 255, 0.32);
65 | }
66 | .personal-info .b-image{
67 | width: 750rpx;
68 | height: 360rpx;
69 | background-position: center;
70 | background-size: cover;
71 | -webkit-filter: blur(10px);
72 | filter: blur(10px);
73 | filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius=10, MakeShadow=false);
74 | }
--------------------------------------------------------------------------------
/pages/search/search.js:
--------------------------------------------------------------------------------
1 | //index.js
2 | //获取应用实例
3 | const {relativeurl} = require('../../util')
4 | const app = getApp()
5 |
6 | Page({
7 | data:{
8 | key:""
9 | },
10 | bindInput(event) {
11 | var vm=this
12 | setTimeout(function () {
13 | vm.setData({
14 | key:event.detail.value
15 | })
16 | })
17 | },
18 | bindconfirm(event){
19 | vm.setData({
20 | value:event.detail.value
21 | })
22 | }
23 | })
24 |
--------------------------------------------------------------------------------
/pages/search/search.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "搜索"
3 | }
--------------------------------------------------------------------------------
/pages/search/search.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 搜索
7 |
8 |
9 |
--------------------------------------------------------------------------------
/pages/search/search.wxss:
--------------------------------------------------------------------------------
1 | page{
2 | background-color: #fff;
3 | }
4 | .search-con{
5 | width: 100%;
6 | height: 100rpx;
7 | box-sizing: border-box;
8 | padding-top: 7px;
9 | background-color: #eee;
10 | position: relative;
11 | }
12 | .search-con .iconfont{
13 | position: absolute;
14 | top: 30rpx;
15 | left: 60rpx;
16 | font-size: 40rpx;
17 | }
18 | .search-con input{
19 | width: 78%;
20 | background-color: #fff;
21 | margin-left: 5%;
22 | box-sizing: border-box;
23 | padding: 0 20rpx 0 66rpx;
24 | height: 72rpx;
25 | line-height:72rpx;
26 | border-top-left-radius:6rpx;
27 | border-bottom-left-radius:6rpx;
28 | }
29 | .search-con navigator{
30 | width: 12%;
31 | background-color: #fff;
32 | box-sizing: border-box;
33 | height: 72rpx;
34 | text-align: center;
35 | line-height:72rpx;
36 | font-size: 26rpx;
37 | border-top-right-radius:6rpx;
38 | border-bottom-right-radius:6rpx;
39 | margin-left: -8rpx;
40 | }
--------------------------------------------------------------------------------
/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "项目配置文件。",
3 | "setting": {
4 | "urlCheck": true,
5 | "es6": true,
6 | "postcss": true,
7 | "minified": true,
8 | "newFeature": true
9 | },
10 | "compileType": "miniprogram",
11 | "libVersion": "1.9.91",
12 | "appid": "wx5bb62716f33eafb6",
13 | "projectname": "%E6%B5%A6%E6%82%A6%E5%9C%B0%E4%BA%A7",
14 | "condition": {
15 | "search": {
16 | "current": -1,
17 | "list": []
18 | },
19 | "conversation": {
20 | "current": -1,
21 | "list": []
22 | },
23 | "game": {
24 | "currentL": -1,
25 | "list": []
26 | },
27 | "miniprogram": {
28 | "current": -1,
29 | "list": []
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # 蒲悦地产
2 | ## 效果图
3 | 
4 | 
5 | 
--------------------------------------------------------------------------------
/readme_files/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Meatball-o/pydc-wx_wxapp/0e204d330726798c533521f20a5f7518f800f37e/readme_files/1.jpg
--------------------------------------------------------------------------------
/readme_files/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Meatball-o/pydc-wx_wxapp/0e204d330726798c533521f20a5f7518f800f37e/readme_files/2.jpg
--------------------------------------------------------------------------------
/readme_files/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Meatball-o/pydc-wx_wxapp/0e204d330726798c533521f20a5f7518f800f37e/readme_files/3.jpg
--------------------------------------------------------------------------------
/util.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by 丸子 on 2018/4/7.
3 | */
4 | //接口请求路径
5 | module.exports.relativeurl = 'https://heiliuer.com/pydc_test/'
6 | const relativeurl = module.exports.relativeurl
7 | module.exports.calling = function (phoneNum) {
8 | wx.makePhoneCall({
9 | phoneNumber: phoneNum,
10 | success: function () {
11 | console.log("拨打电话成功!")
12 | },
13 | fail: function () {
14 | console.log("拨打电话失败!")
15 | }
16 | })
17 | }
18 | module.exports.requestData = function () {
19 | var vm = this
20 | wx.showLoading({
21 | title: '加载中',
22 | })
23 | vm.setData({
24 | loading: true
25 | })
26 | wx.request({
27 | method: "GET",
28 | url: relativeurl + 'api/wxapp/about',
29 | dataType: 'json',
30 | header: {},
31 | success(res) {
32 | wx.hideLoading()
33 | if (res.statusCode == 200) {
34 | var requestData = res.data.data
35 | vm.setData({
36 | requestData
37 | }
38 | )
39 | } else {
40 | wx.showModal({
41 | title: '提示',
42 | content: '请求出错',
43 | showCancel: false,
44 | success: function (res) {
45 | if (res.confirm) {
46 | }
47 | }
48 | })
49 | }
50 | },
51 | fail() {
52 | wx.hideLoading()
53 | wx.showModal({
54 | title: '提示',
55 | content: '请求出错',
56 | showCancel: false,
57 | success: function (res) {
58 | if (res.confirm) {
59 | }
60 | }
61 | })
62 | },
63 | complete() {
64 | wx.hideLoading()
65 | }
66 | })
67 | }
--------------------------------------------------------------------------------