├── README.md
├── app.js
├── app.json
├── app.wxss
├── pages
├── common
│ ├── footer.wxml
│ ├── head.wxml
│ ├── liuyan.wxml
│ └── weui.wxss
├── company
│ ├── company.js
│ ├── company.json
│ ├── company.wxml
│ └── company.wxss
├── detail
│ ├── detail.js
│ ├── detail.json
│ ├── detail.wxml
│ └── detail.wxss
├── index
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── logs
│ ├── logs.js
│ ├── logs.json
│ ├── logs.wxml
│ └── logs.wxss
├── news
│ ├── news.js
│ ├── news.json
│ ├── news.wxml
│ └── news.wxss
├── projectcon
│ ├── projectcon.js
│ ├── projectcon.json
│ ├── projectcon.wxml
│ └── projectcon.wxss
└── ucenter
│ └── index
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── project.config.json
├── sitemap.json
├── utils
└── util.js
└── vimg
├── 1.jpg
├── 2.jpg
├── 3.jpg
├── 4.jpg
└── 5.jpg
/README.md:
--------------------------------------------------------------------------------
1 | # laraveladmin-xcx(如果帮助了你,请给个Star)
2 | laravel-admin 前端 微信小程序(模版样式是随便弄了一个,将就看)
3 |
4 | 开箱即用,当前已发布小程序首页,项目列表,项目内容,文章列表,文章内容,登录,留言等
5 |
6 |
7 | #安装方式
8 |
9 | $git clone https://github.com/imnotdoubi/laraveladmin-xcx
10 |
11 | #具体操作
12 | 请一定要先配置 https://github.com/imnotdoubi/laravel-admin ,因为是根据这个来做的
13 | 如果你不想配置,可以将小程序里面的获取数据链接改为自己的
14 |
15 |
16 | #后台部分截图
17 | 
18 | 
19 | 
20 | 
21 | 
22 |
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | //app.js
2 | App({
3 | onLaunch: function () {
4 | // 展示本地存储能力
5 | var logs = wx.getStorageSync('logs') || []
6 | logs.unshift(Date.now())
7 | wx.setStorageSync('logs', logs)
8 |
9 | // 登录
10 | wx.login({
11 | success: res => {
12 | // 发送 res.code 到后台换取 openId, sessionKey, unionId
13 | }
14 | })
15 | // 获取用户信息
16 | wx.getSetting({
17 | success: res => {
18 | if (res.authSetting['scope.userInfo']) {
19 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
20 | wx.getUserInfo({
21 | success: res => {
22 | // 可以将 res 发送给后台解码出 unionId
23 | this.globalData.userInfo = res.userInfo
24 |
25 | // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
26 | // 所以此处加入 callback 以防止这种情况
27 | if (this.userInfoReadyCallback) {
28 | this.userInfoReadyCallback(res)
29 | }
30 | }
31 | })
32 | }
33 | }
34 | })
35 | },
36 | globalData: {
37 | userInfo: null
38 | }
39 | })
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/index/index",
4 | "pages/news/news",
5 | "pages/projectcon/projectcon",
6 | "pages/company/company",
7 | "pages/detail/detail",
8 | "pages/ucenter/index/index",
9 | "pages/authorize/index",
10 | "pages/logs/logs"
11 | ],
12 | "window": {
13 | "backgroundTextStyle": "light",
14 | "navigationBarBackgroundColor": "#fff",
15 | "navigationBarTitleText": "WeChat",
16 | "navigationBarTextStyle": "black"
17 | },
18 | "sitemapLocation": "sitemap.json"
19 | }
--------------------------------------------------------------------------------
/app.wxss:
--------------------------------------------------------------------------------
1 | /**app.wxss**/
2 | .container {
3 | height: 100%;
4 | display: flex;
5 | flex-direction: column;
6 | align-items: center;
7 | justify-content: space-between;
8 | padding: 200rpx 0;
9 | box-sizing: border-box;
10 | }
11 | .header{ height:44px; line-height:44px; background:#ff5000; position:relative;}
12 | .header strong{ margin:0 44px; display:block; text-align:center; font-size:18px;color:#fff;}
13 |
14 | .header .h_search_pic{ position:absolute; right:0; top:0;}
15 | .header .h_search_pic{ width:44px; height:44px; float:left; text-indent:-9999px;border-left:1px solid rgba(0,0,0,0.2);}
16 | .header .h_search_pic{ background:url(http://www.lar-admin.test/web/m/images/header_pic.jpg) no-repeat 0 -44px; }
17 |
18 | .in_news_hd{ height:30px; line-height:28px; background-color:#f7f7f7; cursor:pointer;}
19 | .in_news_hd ul view{ float:left; width:20%; text-align:center; border-top:1px solid #f7f7f7; border-bottom:1px solid #f7f7f7;}
20 | .in_news_hd ul li.current{border-bottom:1px solid #ff5000; color:#ff5000;}
21 |
22 | .in_news_bd{ text-align:left;}
23 | .in_news_bd ul li{ margin:0 5px; padding:14px 0; border-bottom:1px solid #e9e9e9; cursor:pointer;}
24 | .in_news_bd ul li .text1{ float:left; width:120px; height:90px; overflow:hidden;}
25 | .in_news_bd ul li image{ width:120px; height:90px;}
26 | .in_news_bd ul li .text{ margin-left:130px; line-height:24px; height:72px; overflow:hidden;}
27 |
28 |
29 |
30 | .in_news_bd ul li i{ display:block; margin-left:130px; line-height:18px; font-style:normal; color:#999; height:18px;}
31 |
32 |
33 | .footer{ line-height:26px; padding:14px 0 60px 0; font-family:"微软雅黑"; color:#333; text-align:center;}
34 |
35 | .f_nav{ height:44px; background-color:#fff; position:fixed; left:0; bottom:0; width:100%; line-height:18px; text-align:center; }
36 | .f_nav ul li{ float:left; width:25%;}
37 | .f_nav ul li navigatora{ color:#333; display:block; height:40px; padding-top:4px;}
38 | .f_nav ul li icon{ height:22px; width:24px; display:block; margin:0 auto;}
39 | .f_nav ul li icon.icon1{ background:url(http://www.lar-admin.test/web/m/images/f_nav.jpg) no-repeat;}
40 | .f_nav ul li icon.icon2{ background:url(http://www.lar-admin.test/web/m/images/f_nav.jpg) no-repeat 0 -22px;}
41 | .f_nav ul li icon.icon3{ background:url(http://www.lar-admin.test/web/m/images/f_nav.jpg) no-repeat 0 -44px;}
42 | .f_nav ul li icon.icon4{ background:url(http://www.lar-admin.test/web/m/images/f_nav.jpg) no-repeat 0 -66px;}
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/pages/common/footer.wxml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 | - 首页
11 | - 项目
12 | - 资讯
13 | - 我的
14 |
15 |
16 |
--------------------------------------------------------------------------------
/pages/common/head.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/pages/common/liuyan.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 我要留言
4 |
30 |
31 |
--------------------------------------------------------------------------------
/pages/common/weui.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * weui.js v1.1.0 (https://github.com/weui/weui-wxss)
3 | * Copyright 2016, wechat ui team
4 | * MIT license
5 | */
6 | page {
7 | line-height: 1.6;
8 | font-family: -apple-system-font, "Helvetica Neue", sans-serif;
9 | }
10 | icon {
11 | vertical-align: middle;
12 | }
13 | .weui-cells {
14 | position: relative;
15 | margin-top: 1.17647059em;
16 | background-color: #FFFFFF;
17 | line-height: 1.41176471;
18 | font-size: 17px;
19 | }
20 | .weui-cells:before {
21 | content: " ";
22 | position: absolute;
23 | left: 0;
24 | top: 0;
25 | right: 0;
26 | height: 1px;
27 | border-top: 1rpx solid #D9D9D9;
28 | color: #D9D9D9;
29 | }
30 | .weui-cells:after {
31 | content: " ";
32 | position: absolute;
33 | left: 0;
34 | bottom: 0;
35 | right: 0;
36 | height: 1px;
37 | border-bottom: 1rpx solid #D9D9D9;
38 | color: #D9D9D9;
39 | }
40 | .weui-cells__title {
41 | margin-top: .77em;
42 | margin-bottom: .3em;
43 | padding-left: 15px;
44 | padding-right: 15px;
45 | color: #999999;
46 | font-size: 14px;
47 | }
48 | .weui-cells_after-title {
49 | margin-top: 0;
50 | }
51 | .weui-cells__tips {
52 | margin-top: .3em;
53 | color: #999999;
54 | padding-left: 15px;
55 | padding-right: 15px;
56 | font-size: 14px;
57 | }
58 | .weui-cell {
59 | padding: 10px 15px;
60 | position: relative;
61 | display: -webkit-box;
62 | display: -webkit-flex;
63 | display: flex;
64 | -webkit-box-align: center;
65 | -webkit-align-items: center;
66 | align-items: center;
67 | }
68 | .weui-cell:before {
69 | content: " ";
70 | position: absolute;
71 | left: 0;
72 | top: 0;
73 | right: 0;
74 | height: 1px;
75 | border-top: 1rpx solid #D9D9D9;
76 | color: #D9D9D9;
77 | left: 15px;
78 | }
79 | .weui-cell:first-child:before {
80 | display: none;
81 | }
82 | .weui-cell_active {
83 | background-color: #ECECEC;
84 | }
85 | .weui-cell_primary {
86 | -webkit-box-align: start;
87 | -webkit-align-items: flex-start;
88 | align-items: flex-start;
89 | }
90 | .weui-cell__bd {
91 | -webkit-box-flex: 1;
92 | -webkit-flex: 1;
93 | flex: 1;
94 | }
95 | .weui-cell__ft {
96 | text-align: right;
97 | color: #999999;
98 | }
99 | .weui-cell_access {
100 | color: inherit;
101 | }
102 | .weui-cell__ft_in-access {
103 | padding-right: 13px;
104 | position: relative;
105 | }
106 | .weui-cell__ft_in-access:after {
107 | content: " ";
108 | display: inline-block;
109 | height: 6px;
110 | width: 6px;
111 | border-width: 2px 2px 0 0;
112 | border-color: #C8C8CD;
113 | border-style: solid;
114 | -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
115 | transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
116 | position: relative;
117 | top: -2px;
118 | position: absolute;
119 | top: 50%;
120 | margin-top: -4px;
121 | right: 2px;
122 | }
123 | .weui-cell_link {
124 | color: #586C94;
125 | font-size: 14px;
126 | }
127 | .weui-cell_link:active {
128 | background-color: #ECECEC;
129 | }
130 | .weui-cell_link:first-child:before {
131 | display: block;
132 | }
133 | .weui-icon-radio {
134 | margin-left: 3.2px;
135 | margin-right: 3.2px;
136 | }
137 | .weui-icon-checkbox_circle,
138 | .weui-icon-checkbox_success {
139 | margin-left: 4.6px;
140 | margin-right: 4.6px;
141 | }
142 | .weui-check__label:active {
143 | background-color: #ECECEC;
144 | }
145 | .weui-check {
146 | position: absolute;
147 | left: -9999px;
148 | }
149 | .weui-check__hd_in-checkbox {
150 | padding-right: 0.35em;
151 | }
152 | .weui-cell__ft_in-radio {
153 | padding-left: 0.35em;
154 | }
155 | .weui-cell_input {
156 | padding-top: 0;
157 | padding-bottom: 0;
158 | }
159 | .weui-label {
160 | width: 105px;
161 | word-wrap: break-word;
162 | word-break: break-all;
163 | }
164 | .weui-input {
165 | height: 2.58823529em;
166 | min-height: 2.58823529em;
167 | line-height: 2.58823529em;
168 | }
169 | .weui-toptips {
170 | position: fixed;
171 | -webkit-transform: translateZ(0);
172 | transform: translateZ(0);
173 | top: 0;
174 | left: 0;
175 | right: 0;
176 | padding: 5px;
177 | font-size: 14px;
178 | text-align: center;
179 | color: #FFFFFF;
180 | z-index: 5000;
181 | word-wrap: break-word;
182 | word-break: break-all;
183 | }
184 | .weui-toptips_warn {
185 | background-color: #E64340;
186 | }
187 | .weui-textarea {
188 | display: block;
189 | width: 100%;
190 | }
191 | .weui-textarea-counter {
192 | color: #B2B2B2;
193 | text-align: right;
194 | }
195 | .weui-textarea-counter_warn {
196 | color: #E64340;
197 | }
198 | .weui-cell_warn {
199 | color: #E64340;
200 | }
201 | .weui-form-preview {
202 | position: relative;
203 | background-color: #FFFFFF;
204 | }
205 | .weui-form-preview:before {
206 | content: " ";
207 | position: absolute;
208 | left: 0;
209 | top: 0;
210 | right: 0;
211 | height: 1px;
212 | border-top: 1rpx solid #D9D9D9;
213 | color: #D9D9D9;
214 | }
215 | .weui-form-preview:after {
216 | content: " ";
217 | position: absolute;
218 | left: 0;
219 | bottom: 0;
220 | right: 0;
221 | height: 1px;
222 | border-bottom: 1rpx solid #D9D9D9;
223 | color: #D9D9D9;
224 | }
225 | .weui-form-preview__value {
226 | font-size: 14px;
227 | }
228 | .weui-form-preview__value_in-hd {
229 | font-size: 26px;
230 | }
231 | .weui-form-preview__hd {
232 | position: relative;
233 | padding: 10px 15px;
234 | text-align: right;
235 | line-height: 2.5em;
236 | }
237 | .weui-form-preview__hd:after {
238 | content: " ";
239 | position: absolute;
240 | left: 0;
241 | bottom: 0;
242 | right: 0;
243 | height: 1px;
244 | border-bottom: 1rpx solid #D9D9D9;
245 | color: #D9D9D9;
246 | left: 15px;
247 | }
248 | .weui-form-preview__bd {
249 | padding: 10px 15px;
250 | font-size: .9em;
251 | text-align: right;
252 | color: #999999;
253 | line-height: 2;
254 | }
255 | .weui-form-preview__ft {
256 | position: relative;
257 | line-height: 50px;
258 | display: -webkit-box;
259 | display: -webkit-flex;
260 | display: flex;
261 | }
262 | .weui-form-preview__ft:after {
263 | content: " ";
264 | position: absolute;
265 | left: 0;
266 | top: 0;
267 | right: 0;
268 | height: 1px;
269 | border-top: 1rpx solid #D5D5D6;
270 | color: #D5D5D6;
271 | }
272 | .weui-form-preview__item {
273 | overflow: hidden;
274 | }
275 | .weui-form-preview__label {
276 | float: left;
277 | margin-right: 1em;
278 | min-width: 4em;
279 | color: #999999;
280 | text-align: justify;
281 | text-align-last: justify;
282 | }
283 | .weui-form-preview__value {
284 | display: block;
285 | overflow: hidden;
286 | word-break: normal;
287 | word-wrap: break-word;
288 | }
289 | .weui-form-preview__btn {
290 | position: relative;
291 | display: block;
292 | -webkit-box-flex: 1;
293 | -webkit-flex: 1;
294 | flex: 1;
295 | color: #3CC51F;
296 | text-align: center;
297 | }
298 | .weui-form-preview__btn:after {
299 | content: " ";
300 | position: absolute;
301 | left: 0;
302 | top: 0;
303 | width: 1px;
304 | bottom: 0;
305 | border-left: 1rpx solid #D5D5D6;
306 | color: #D5D5D6;
307 | }
308 | .weui-form-preview__btn:first-child:after {
309 | display: none;
310 | }
311 | .weui-form-preview__btn_active {
312 | background-color: #EEEEEE;
313 | }
314 | .weui-form-preview__btn_default {
315 | color: #999999;
316 | }
317 | .weui-form-preview__btn_primary {
318 | color: #0BB20C;
319 | }
320 | .weui-cell_select {
321 | padding: 0;
322 | }
323 | .weui-select {
324 | position: relative;
325 | padding-left: 15px;
326 | padding-right: 30px;
327 | height: 2.58823529em;
328 | min-height: 2.58823529em;
329 | line-height: 2.58823529em;
330 | border-right: 1rpx solid #D9D9D9;
331 | }
332 | .weui-select:before {
333 | content: " ";
334 | display: inline-block;
335 | height: 6px;
336 | width: 6px;
337 | border-width: 2px 2px 0 0;
338 | border-color: #C8C8CD;
339 | border-style: solid;
340 | -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
341 | transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
342 | position: relative;
343 | top: -2px;
344 | position: absolute;
345 | top: 50%;
346 | right: 15px;
347 | margin-top: -4px;
348 | }
349 | .weui-select_in-select-after {
350 | padding-left: 0;
351 | }
352 | .weui-cell__hd_in-select-after,
353 | .weui-cell__bd_in-select-before {
354 | padding-left: 15px;
355 | }
356 | .weui-cell_vcode {
357 | padding-right: 0;
358 | }
359 | .weui-vcode-img {
360 | margin-left: 5px;
361 | height: 2.58823529em;
362 | vertical-align: middle;
363 | }
364 | .weui-vcode-btn {
365 | display: inline-block;
366 | height: 2.58823529em;
367 | margin-left: 5px;
368 | padding: 0 0.6em 0 0.7em;
369 | border-left: 1px solid #E5E5E5;
370 | line-height: 2.58823529em;
371 | vertical-align: middle;
372 | font-size: 17px;
373 | color: #3CC51F;
374 | white-space: nowrap;
375 | }
376 | .weui-vcode-btn:active {
377 | color: #52a341;
378 | }
379 | .weui-cell_switch {
380 | padding-top: 6px;
381 | padding-bottom: 6px;
382 | }
383 | .weui-uploader__hd {
384 | display: -webkit-box;
385 | display: -webkit-flex;
386 | display: flex;
387 | padding-bottom: 10px;
388 | -webkit-box-align: center;
389 | -webkit-align-items: center;
390 | align-items: center;
391 | }
392 | .weui-uploader__title {
393 | -webkit-box-flex: 1;
394 | -webkit-flex: 1;
395 | flex: 1;
396 | }
397 | .weui-uploader__info {
398 | color: #B2B2B2;
399 | }
400 | .weui-uploader__bd {
401 | margin-bottom: -4px;
402 | margin-right: -9px;
403 | overflow: hidden;
404 | }
405 | .weui-uploader__file {
406 | float: left;
407 | margin-right: 9px;
408 | margin-bottom: 9px;
409 | }
410 | .weui-uploader__img {
411 | display: block;
412 | width: 79px;
413 | height: 79px;
414 | }
415 | .weui-uploader__file_status {
416 | position: relative;
417 | }
418 | .weui-uploader__file_status:before {
419 | content: " ";
420 | position: absolute;
421 | top: 0;
422 | right: 0;
423 | bottom: 0;
424 | left: 0;
425 | background-color: rgba(0, 0, 0, 0.5);
426 | }
427 | .weui-uploader__file-content {
428 | position: absolute;
429 | top: 50%;
430 | left: 50%;
431 | -webkit-transform: translate(-50%, -50%);
432 | transform: translate(-50%, -50%);
433 | color: #FFFFFF;
434 | }
435 | .weui-uploader__input-box {
436 | float: left;
437 | position: relative;
438 | margin-right: 9px;
439 | margin-bottom: 9px;
440 | width: 77px;
441 | height: 77px;
442 | border: 1px solid #D9D9D9;
443 | }
444 | .weui-uploader__input-box:before,
445 | .weui-uploader__input-box:after {
446 | content: " ";
447 | position: absolute;
448 | top: 50%;
449 | left: 50%;
450 | -webkit-transform: translate(-50%, -50%);
451 | transform: translate(-50%, -50%);
452 | background-color: #D9D9D9;
453 | }
454 | .weui-uploader__input-box:before {
455 | width: 2px;
456 | height: 39.5px;
457 | }
458 | .weui-uploader__input-box:after {
459 | width: 39.5px;
460 | height: 2px;
461 | }
462 | .weui-uploader__input-box:active {
463 | border-color: #999999;
464 | }
465 | .weui-uploader__input-box:active:before,
466 | .weui-uploader__input-box:active:after {
467 | background-color: #999999;
468 | }
469 | .weui-uploader__input {
470 | position: absolute;
471 | z-index: 1;
472 | top: 0;
473 | left: 0;
474 | width: 100%;
475 | height: 100%;
476 | opacity: 0;
477 | }
478 | .weui-article {
479 | padding: 20px 15px;
480 | font-size: 15px;
481 | }
482 | .weui-article__section {
483 | margin-bottom: 1.5em;
484 | }
485 | .weui-article__h1 {
486 | font-size: 18px;
487 | font-weight: 400;
488 | margin-bottom: .9em;
489 | }
490 | .weui-article__h2 {
491 | font-size: 16px;
492 | font-weight: 400;
493 | margin-bottom: .34em;
494 | }
495 | .weui-article__h3 {
496 | font-weight: 400;
497 | font-size: 15px;
498 | margin-bottom: .34em;
499 | }
500 | .weui-article__p {
501 | margin: 0 0 .8em;
502 | }
503 | .weui-msg {
504 | padding-top: 36px;
505 | text-align: center;
506 | }
507 | .weui-msg__link {
508 | display: inline;
509 | color: #586C94;
510 | }
511 | .weui-msg__icon-area {
512 | margin-bottom: 30px;
513 | }
514 | .weui-msg__text-area {
515 | margin-bottom: 25px;
516 | padding: 0 20px;
517 | }
518 | .weui-msg__title {
519 | margin-bottom: 5px;
520 | font-weight: 400;
521 | font-size: 20px;
522 | }
523 | .weui-msg__desc {
524 | font-size: 14px;
525 | color: #999999;
526 | }
527 | .weui-msg__opr-area {
528 | margin-bottom: 25px;
529 | }
530 | .weui-msg__extra-area {
531 | margin-bottom: 15px;
532 | font-size: 14px;
533 | color: #999999;
534 | }
535 | @media screen and (min-height: 438px) {
536 | .weui-msg__extra-area {
537 | position: fixed;
538 | left: 0;
539 | bottom: 0;
540 | width: 100%;
541 | text-align: center;
542 | }
543 | }
544 | .weui-flex {
545 | display: -webkit-box;
546 | display: -webkit-flex;
547 | display: flex;
548 | }
549 | .weui-flex__item {
550 | -webkit-box-flex: 1;
551 | -webkit-flex: 1;
552 | flex: 1;
553 | }
554 | .weui-btn {
555 | margin-top: 15px;
556 | }
557 | .weui-btn:first-child {
558 | margin-top: 0;
559 | }
560 | .weui-btn-area {
561 | margin: 1.17647059em 15px 0.3em;
562 | }
563 | .weui-agree {
564 | display: block;
565 | padding: .5em 15px;
566 | font-size: 13px;
567 | }
568 | .weui-agree__text {
569 | color: #999999;
570 | }
571 | .weui-agree__link {
572 | display: inline;
573 | color: #586C94;
574 | }
575 | .weui-agree__checkbox {
576 | position: absolute;
577 | left: -9999px;
578 | }
579 | .weui-agree__checkbox-icon {
580 | position: relative;
581 | top: 2px;
582 | display: inline-block;
583 | border: 1px solid #D1D1D1;
584 | background-color: #FFFFFF;
585 | border-radius: 3px;
586 | width: 11px;
587 | height: 11px;
588 | }
589 | .weui-agree__checkbox-icon-check {
590 | position: absolute;
591 | top: 1px;
592 | left: 1px;
593 | }
594 | .weui-footer {
595 | color: #999999;
596 | font-size: 14px;
597 | text-align: center;
598 | }
599 | .weui-footer_fixed-bottom {
600 | position: fixed;
601 | bottom: .52em;
602 | left: 0;
603 | right: 0;
604 | }
605 | .weui-footer__links {
606 | font-size: 0;
607 | }
608 | .weui-footer__link {
609 | display: inline-block;
610 | vertical-align: top;
611 | margin: 0 .62em;
612 | position: relative;
613 | font-size: 14px;
614 | color: #586C94;
615 | }
616 | .weui-footer__link:before {
617 | content: " ";
618 | position: absolute;
619 | left: 0;
620 | top: 0;
621 | width: 1px;
622 | bottom: 0;
623 | border-left: 1rpx solid #C7C7C7;
624 | color: #C7C7C7;
625 | left: -0.65em;
626 | top: .36em;
627 | bottom: .36em;
628 | }
629 | .weui-footer__link:first-child:before {
630 | display: none;
631 | }
632 | .weui-footer__text {
633 | padding: 0 .34em;
634 | font-size: 12px;
635 | }
636 | .weui-grids {
637 | border-top: 1rpx solid #D9D9D9;
638 | border-left: 1rpx solid #D9D9D9;
639 | overflow: hidden;
640 | }
641 | .weui-grid {
642 | position: relative;
643 | float: left;
644 | padding: 20px 10px;
645 | width: 33.33333333%;
646 | box-sizing: border-box;
647 | border-right: 1rpx solid #D9D9D9;
648 | border-bottom: 1rpx solid #D9D9D9;
649 | }
650 | .weui-grid_active {
651 | background-color: #ECECEC;
652 | }
653 | .weui-grid__icon {
654 | display: block;
655 | width: 28px;
656 | height: 28px;
657 | margin: 0 auto;
658 | }
659 | .weui-grid__label {
660 | margin-top: 5px;
661 | display: block;
662 | text-align: center;
663 | color: #000000;
664 | font-size: 14px;
665 | white-space: nowrap;
666 | text-overflow: ellipsis;
667 | overflow: hidden;
668 | }
669 | .weui-loading {
670 | margin: 0 5px;
671 | width: 20px;
672 | height: 20px;
673 | display: inline-block;
674 | vertical-align: middle;
675 | -webkit-animation: weuiLoading 1s steps(12, end) infinite;
676 | animation: weuiLoading 1s steps(12, end) infinite;
677 | background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat;
678 | background-size: 100%;
679 | }
680 | @-webkit-keyframes weuiLoading {
681 | 0% {
682 | -webkit-transform: rotate3d(0, 0, 1, 0deg);
683 | transform: rotate3d(0, 0, 1, 0deg);
684 | }
685 | 100% {
686 | -webkit-transform: rotate3d(0, 0, 1, 360deg);
687 | transform: rotate3d(0, 0, 1, 360deg);
688 | }
689 | }
690 | @keyframes weuiLoading {
691 | 0% {
692 | -webkit-transform: rotate3d(0, 0, 1, 0deg);
693 | transform: rotate3d(0, 0, 1, 0deg);
694 | }
695 | 100% {
696 | -webkit-transform: rotate3d(0, 0, 1, 360deg);
697 | transform: rotate3d(0, 0, 1, 360deg);
698 | }
699 | }
700 | .weui-badge {
701 | display: inline-block;
702 | padding: .15em .4em;
703 | min-width: 8px;
704 | border-radius: 18px;
705 | background-color: #F43530;
706 | color: #FFFFFF;
707 | line-height: 1.2;
708 | text-align: center;
709 | font-size: 12px;
710 | vertical-align: middle;
711 | }
712 | .weui-badge_dot {
713 | padding: .4em;
714 | min-width: 0;
715 | }
716 | .weui-loadmore {
717 | width: 65%;
718 | margin: 1.5em auto;
719 | line-height: 1.6em;
720 | font-size: 14px;
721 | text-align: center;
722 | }
723 | .weui-loadmore__tips {
724 | display: inline-block;
725 | vertical-align: middle;
726 | }
727 | .weui-loadmore_line {
728 | border-top: 1px solid #E5E5E5;
729 | margin-top: 2.4em;
730 | }
731 | .weui-loadmore__tips_in-line {
732 | position: relative;
733 | top: -0.9em;
734 | padding: 0 .55em;
735 | background-color: #FFFFFF;
736 | color: #999999;
737 | }
738 | .weui-loadmore__tips_in-dot {
739 | position: relative;
740 | padding: 0 .16em;
741 | width: 4px;
742 | height: 1.6em;
743 | }
744 | .weui-loadmore__tips_in-dot:before {
745 | content: " ";
746 | position: absolute;
747 | top: 50%;
748 | left: 50%;
749 | margin-top: -1px;
750 | margin-left: -2px;
751 | width: 4px;
752 | height: 4px;
753 | border-radius: 50%;
754 | background-color: #E5E5E5;
755 | }
756 | .weui-panel {
757 | background-color: #FFFFFF;
758 | margin-top: 10px;
759 | position: relative;
760 | overflow: hidden;
761 | }
762 | .weui-panel:first-child {
763 | margin-top: 0;
764 | }
765 | .weui-panel:before {
766 | content: " ";
767 | position: absolute;
768 | left: 0;
769 | top: 0;
770 | right: 0;
771 | height: 1px;
772 | border-top: 1rpx solid #E5E5E5;
773 | color: #E5E5E5;
774 | }
775 | .weui-panel:after {
776 | content: " ";
777 | position: absolute;
778 | left: 0;
779 | bottom: 0;
780 | right: 0;
781 | height: 1px;
782 | border-bottom: 1rpx solid #E5E5E5;
783 | color: #E5E5E5;
784 | }
785 | .weui-panel__hd {
786 | padding: 14px 15px 10px;
787 | color: #999999;
788 | font-size: 13px;
789 | position: relative;
790 | }
791 | .weui-panel__hd:after {
792 | content: " ";
793 | position: absolute;
794 | left: 0;
795 | bottom: 0;
796 | right: 0;
797 | height: 1px;
798 | border-bottom: 1rpx solid #E5E5E5;
799 | color: #E5E5E5;
800 | left: 15px;
801 | }
802 | .weui-media-box {
803 | padding: 15px;
804 | position: relative;
805 | }
806 | .weui-media-box:before {
807 | content: " ";
808 | position: absolute;
809 | left: 0;
810 | top: 0;
811 | right: 0;
812 | height: 1px;
813 | border-top: 1rpx solid #E5E5E5;
814 | color: #E5E5E5;
815 | left: 15px;
816 | }
817 | .weui-media-box:first-child:before {
818 | display: none;
819 | }
820 | .weui-media-box__title {
821 | font-weight: 400;
822 | font-size: 17px;
823 | width: auto;
824 | overflow: hidden;
825 | text-overflow: ellipsis;
826 | white-space: nowrap;
827 | word-wrap: normal;
828 | word-wrap: break-word;
829 | word-break: break-all;
830 | }
831 | .weui-media-box__desc {
832 | color: #999999;
833 | font-size: 13px;
834 | line-height: 1.2;
835 | overflow: hidden;
836 | text-overflow: ellipsis;
837 | display: -webkit-box;
838 | -webkit-box-orient: vertical;
839 | -webkit-line-clamp: 2;
840 | }
841 | .weui-media-box__info {
842 | margin-top: 15px;
843 | padding-bottom: 5px;
844 | font-size: 13px;
845 | color: #CECECE;
846 | line-height: 1em;
847 | list-style: none;
848 | overflow: hidden;
849 | }
850 | .weui-media-box__info__meta {
851 | float: left;
852 | padding-right: 1em;
853 | }
854 | .weui-media-box__info__meta_extra {
855 | padding-left: 1em;
856 | border-left: 1px solid #CECECE;
857 | }
858 | .weui-media-box__title_in-text {
859 | margin-bottom: 8px;
860 | }
861 | .weui-media-box_appmsg {
862 | display: -webkit-box;
863 | display: -webkit-flex;
864 | display: flex;
865 | -webkit-box-align: center;
866 | -webkit-align-items: center;
867 | align-items: center;
868 | }
869 | .weui-media-box__thumb {
870 | width: 100%;
871 | height: 100%;
872 | vertical-align: top;
873 | }
874 | .weui-media-box__hd_in-appmsg {
875 | margin-right: .8em;
876 | width: 60px;
877 | height: 60px;
878 | line-height: 60px;
879 | text-align: center;
880 | }
881 | .weui-media-box__bd_in-appmsg {
882 | -webkit-box-flex: 1;
883 | -webkit-flex: 1;
884 | flex: 1;
885 | min-width: 0;
886 | }
887 | .weui-media-box_small-appmsg {
888 | padding: 0;
889 | }
890 | .weui-cells_in-small-appmsg {
891 | margin-top: 0;
892 | }
893 | .weui-cells_in-small-appmsg:before {
894 | display: none;
895 | }
896 | .weui-progress {
897 | display: -webkit-box;
898 | display: -webkit-flex;
899 | display: flex;
900 | -webkit-box-align: center;
901 | -webkit-align-items: center;
902 | align-items: center;
903 | }
904 | .weui-progress__bar {
905 | -webkit-box-flex: 1;
906 | -webkit-flex: 1;
907 | flex: 1;
908 | }
909 | .weui-progress__opr {
910 | margin-left: 15px;
911 | font-size: 0;
912 | }
913 | .weui-navbar {
914 | display: -webkit-box;
915 | display: -webkit-flex;
916 | display: flex;
917 | position: absolute;
918 | z-index: 500;
919 | top: 0;
920 | width: 100%;
921 | border-bottom: 1rpx solid #CCCCCC;
922 | }
923 | .weui-navbar__item {
924 | position: relative;
925 | display: block;
926 | -webkit-box-flex: 1;
927 | -webkit-flex: 1;
928 | flex: 1;
929 | padding: 13px 0;
930 | text-align: center;
931 | font-size: 0;
932 | }
933 | .weui-navbar__item.weui-bar__item_on {
934 | color: #1AAD19;
935 | }
936 | .weui-navbar__slider {
937 | position: absolute;
938 | content: " ";
939 | left: 0;
940 | bottom: 0;
941 | width: 6em;
942 | height: 3px;
943 | background-color: #1AAD19;
944 | -webkit-transition: -webkit-transform .3s;
945 | transition: -webkit-transform .3s;
946 | transition: transform .3s;
947 | transition: transform .3s, -webkit-transform .3s;
948 | }
949 | .weui-navbar__title {
950 | display: inline-block;
951 | font-size: 15px;
952 | max-width: 8em;
953 | width: auto;
954 | overflow: hidden;
955 | text-overflow: ellipsis;
956 | white-space: nowrap;
957 | word-wrap: normal;
958 | }
959 | .weui-tab {
960 | position: relative;
961 | height: 100%;
962 | }
963 | .weui-tab__panel {
964 | box-sizing: border-box;
965 | height: 100%;
966 | padding-top: 50px;
967 | overflow: auto;
968 | -webkit-overflow-scrolling: touch;
969 | }
970 | .weui-search-bar {
971 | position: relative;
972 | padding: 8px 10px;
973 | display: -webkit-box;
974 | display: -webkit-flex;
975 | display: flex;
976 | box-sizing: border-box;
977 | background-color: #EFEFF4;
978 | border-top: 1rpx solid #D7D6DC;
979 | border-bottom: 1rpx solid #D7D6DC;
980 | }
981 | .weui-icon-search {
982 | margin-right: 8px;
983 | font-size: inherit;
984 | }
985 | .weui-icon-search_in-box {
986 | position: absolute;
987 | left: 10px;
988 | top: 7px;
989 | }
990 | .weui-search-bar__text {
991 | display: inline-block;
992 | font-size: 14px;
993 | vertical-align: middle;
994 | }
995 | .weui-search-bar__form {
996 | position: relative;
997 | -webkit-box-flex: 1;
998 | -webkit-flex: auto;
999 | flex: auto;
1000 | border-radius: 5px;
1001 | background: #FFFFFF;
1002 | border: 1rpx solid #E6E6EA;
1003 | }
1004 | .weui-search-bar__box {
1005 | position: relative;
1006 | padding-left: 30px;
1007 | padding-right: 30px;
1008 | width: 100%;
1009 | box-sizing: border-box;
1010 | z-index: 1;
1011 | }
1012 | .weui-search-bar__input {
1013 | height: 28px;
1014 | line-height: 28px;
1015 | font-size: 14px;
1016 | }
1017 | .weui-icon-clear {
1018 | position: absolute;
1019 | top: 0;
1020 | right: 0;
1021 | padding: 7px 8px;
1022 | font-size: 0;
1023 | }
1024 | .weui-search-bar__label {
1025 | position: absolute;
1026 | top: 0;
1027 | right: 0;
1028 | bottom: 0;
1029 | left: 0;
1030 | z-index: 2;
1031 | border-radius: 3px;
1032 | text-align: center;
1033 | color: #9B9B9B;
1034 | background: #FFFFFF;
1035 | line-height: 28px;
1036 | }
1037 | .weui-search-bar__cancel-btn {
1038 | margin-left: 10px;
1039 | line-height: 28px;
1040 | color: #09BB07;
1041 | white-space: nowrap;
1042 | }
1043 |
--------------------------------------------------------------------------------
/pages/company/company.js:
--------------------------------------------------------------------------------
1 | // pages/company/company.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | listxm: [],
9 | isLoadingMore: false,
10 | currentPage: 1,
11 | info: '',
12 | tabTxt:[],
13 | index:0,
14 | tabtouzi: [],
15 | index2: 0
16 | },
17 |
18 | bindChangeLanmu(e) {
19 | var that = this
20 | that.setData({
21 | index: e.detail.value
22 | })
23 |
24 | this.data.index = this.data.tabTxt[e.detail.value].id
25 | this.data.currentPage = 1
26 | this.data.info = ''
27 |
28 | this.loadCompanys()
29 |
30 | },
31 |
32 |
33 |
34 | bindChangeTouzi(e) {
35 | this.setData({
36 | index2: e.detail.value
37 | })
38 |
39 | this.data.index2 = this.data.tabtouzi[e.detail.value].id
40 | this.data.currentPage = 1
41 | this.data.info = ''
42 | this.loadCompanys()
43 | },
44 |
45 | /**
46 | * 生命周期函数--监听页面加载
47 | */
48 | onLoad: function (options) {
49 | var that = this//不要漏了这句,很重要
50 |
51 | wx.showLoading({
52 | title: '项目加载中...'
53 | })
54 | that.loadCompanys()
55 |
56 | },
57 |
58 | loadCompanys: function () {
59 | var that = this
60 | var cpage = that.data.currentPage
61 |
62 | wx.request({
63 | url: 'http://www.lar-admin.test/api/comm/' + that.data.index +'/' + that.data.index2 + '?page=' + cpage,
64 | success: (res) => {
65 |
66 | if (res.data.message === 'success') {
67 |
68 | if (res.data.listxm.length == 0) {
69 | that.setData({
70 | isLoadingMore: false,
71 | info: '没有更多项目'
72 | });
73 | }
74 | if(cpage == 1){
75 | that.setData({
76 | listxm: res.data.listxm,
77 |
78 | })
79 | }else{
80 | that.setData({
81 | listxm: that.data.listxm.concat(res.data.listxm),
82 |
83 | })
84 | }
85 |
86 | } else {
87 | that.setData({
88 | info: '加载项目列表失败,请重试'
89 | })
90 | }
91 | wx.hideLoading()
92 | }
93 | })
94 | },
95 | //点击跳转到项目内容
96 | postProject: function (event) {
97 | wx.navigateTo({
98 | url: '/pages/projectcon/projectcon?id=' + event.currentTarget.dataset.id,
99 | })
100 | },
101 |
102 | /**
103 | * 生命周期函数--监听页面显示
104 | */
105 | onShow: function () {
106 | var that = this//不要漏了这句,很重要
107 | wx.request({
108 | url: 'http://www.lar-admin.test/api/indexfl/3',
109 | headers: {
110 | 'Content-Type': 'application/json'
111 | },
112 | success: function (res) {
113 |
114 | that.setData({
115 | tabTxt: res.data,
116 | })
117 | }
118 | }),
119 | wx.request({
120 | url: 'http://www.lar-admin.test/api/indexfl/4',
121 | headers: {
122 | 'Content-Type': 'application/json'
123 | },
124 | success: function (res) {
125 | that.setData({
126 | tabtouzi: res.data,
127 | })
128 | }
129 | })
130 | },
131 | /**
132 | * 页面上拉触底事件的处理函数
133 | */
134 | onReachBottom: function () {
135 | var that = this
136 | that.data.currentPage++
137 | if (that.data.isLoadingMore && that.data.currentPage > 2) {
138 | // 最多只能加载3页
139 | that.setData({
140 | isLoadingMore: false,
141 | info: '没有更多项目了'
142 | })
143 |
144 | return
145 | }
146 | that.data.isLoadingMore = true
147 | that.loadCompanys()
148 | },
149 |
150 |
151 | })
--------------------------------------------------------------------------------
/pages/company/company.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "项目列表页面",
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/company/company.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{tabTxt[index].typename}}
12 |
13 |
14 |
15 |
16 |
17 | {{tabtouzi[index2].title}}
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | -
28 |
29 |
30 | {{item.combrand}}
31 | \n投资金额:{{item.size}}
32 |
33 |
34 |
35 |
36 |
37 | {{info}}
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/pages/company/company.wxss:
--------------------------------------------------------------------------------
1 | @import "../common/weui.wxss";
2 |
3 | .banrd_list{ text-align:left;}
4 | .banrd_list ul li{ margin:0 3px; padding:14px 0; border-bottom:1px solid #e9e9e9; cursor:pointer;}
5 | .banrd_list ul li .text1{ float:left; width:120px; height:90px; overflow:hidden;}
6 | .banrd_list ul li image{ width:120px; height:90px;}
7 | .banrd_list ul li .text{ margin-left:130px; line-height:24px; height:92px; overflow:hidden;}
8 |
9 | .banrd_list ul li i{ display:block; margin-left:130px; line-height:18px; font-style:normal; color:#999; height:18px;}
10 | .banrd_list ul li .text strong{ display:block; height:24px; line-height:24px; overflow:hidden;}
11 |
12 |
13 | .clear{
14 | clear: both;
15 | overflow: hidden;
16 | }
17 |
18 | .tabTit{
19 | height:90rpx;
20 | line-height: 90rpx;
21 | border-bottom: solid 1px #eee;
22 | position:fixed;
23 | top:0;
24 | width: 750rpx;
25 | z-index: 1;
26 | background: #fff;
27 | font-size:15px;
28 | text-align: center;
29 | }
30 |
31 |
32 |
33 | .tabTit .active{
34 | color:#e64340;
35 | background: #fff;
36 | }
37 |
38 | .tabTit .active image{
39 | transform: rotate(180deg);
40 | background: none;
41 | }
42 |
43 | .tabTit image{
44 | width:26rpx;
45 | height:26rpx;
46 | vertical-align: middle;
47 | margin-left: 5px;
48 |
49 | }
50 |
51 | .tabLayer{
52 | box-shadow: 0 5px 5px rgba(0,0,0,.15);
53 | width:750rpx;
54 | overflow: hidden;
55 | position: fixed;
56 | top:90rpx;
57 | z-index: 1;
58 | background: #fff;
59 | padding-bottom: 40rpx;
60 | border-bottom: solid 1px #eee;
61 | text-align: center;
62 | }
63 | .tabLayer text{
64 | width:210rpx;
65 | height:60rpx;
66 | line-height:60rpx;
67 | float:left;
68 | border: solid 1px #eee;
69 | margin:20rpx 0 0 26rpx;
70 | font-size:15px;
71 | }
72 | .tabLayer .active{
73 | color:#e64340;
74 | border-color:#e64340;
75 | }
76 |
77 | .flex1 {
78 | flex: 1;
79 | overflow: hidden;
80 | display: block;
81 | }
82 |
83 | /*弹性盒模型*/
84 | .box {
85 | display: -webkit-box;
86 | display: -webkit-flex;
87 | display: -ms-flexbox;
88 | display: flex;
89 | }
90 |
91 | navigator{
92 | display:inline;
93 | }
94 |
95 |
96 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/pages/detail/detail.js:
--------------------------------------------------------------------------------
1 | //index.js
2 | //获取应用实例
3 | const app = getApp()
4 |
5 | Page({
6 | data: {
7 | article: {},
8 | info: ''
9 | },
10 | //取消返回
11 | bindCancel: function () {
12 | wx.navigateBack({})
13 | },
14 | onLoad: function (options) {
15 | var that = this
16 | wx.request({
17 | url: 'http://www.lar-admin.test/api/article/' + options.id,
18 | headers: {
19 | 'Content-Type': 'application/json'
20 | },
21 | success: function (res) {
22 | that.setData({
23 | article: res.data.article
24 | })
25 | var wxParse = require('../components/wxParse/wxParse.js')
26 | wxParse.wxParse('article_content', 'html', that.data.article.content, that, 1)
27 | },
28 | fail: function () {
29 | that.data.info = '获取文章详情数据失败'
30 | },
31 | complete: function () {
32 | wx.hideLoading()
33 | }
34 |
35 | })
36 |
37 | },
38 | /**
39 | * 用户点击右上角分享
40 | */
41 | onShareAppMessage: function () {
42 | let id = this.data.article.id
43 | let title = this.data.article.title
44 | return {
45 | title: "我不是逗逼-"+title,
46 | path: '/pages/detail/detail?id='+id
47 | }
48 | },
49 |
50 |
51 | formSubmit: function (e) {
52 | //console.log(e.detail.value);
53 | if (e.detail.value.xingming.length == 0 || e.detail.value.xingming.length >= 8) {
54 | wx.showToast({
55 | title: '姓名不能为空或过长!',
56 | icon: 'loading',
57 | duration: 1000
58 | })
59 | setTimeout(function () {
60 | wx.hideToast()
61 | }, 1000)
62 | } else if (e.detail.value.dianhua.length == 0 || e.detail.value.dianhua.length >= 12) {
63 | wx.showToast({
64 | title: '电话不能为空或过长!',
65 | icon: 'loading',
66 | duration: 1000
67 | })
68 | setTimeout(function () {
69 | wx.hideToast()
70 | }, 1000)
71 | } else {
72 | wx.request({
73 | url: 'http://www.lar-admin.test/api/iphonexx',
74 | header: {
75 | "Content-Type": "application/x-www-form-urlencoded"
76 | },
77 | method: "get",
78 | data: {
79 | xingming: e.detail.value.xingming,
80 | dianhua: e.detail.value.dianhua,
81 | neirong: e.detail.value.neirong,
82 | wangzhi: e.detail.value.wangzhi
83 | },
84 | success: function (res) {
85 |
86 | var tishi = res.data.msg;
87 | if (res.data.status == 0) {
88 | wx.showToast({
89 | title: '提交失败!!!',
90 | icon: 'loading',
91 | duration: 1500
92 | })
93 | } else {
94 |
95 | wx.showToast ({
96 |
97 | title: tishi,
98 | icon: 'success',
99 | duration: 1000
100 | })
101 | }
102 | }
103 | })
104 | }
105 | }
106 |
107 |
108 |
109 | })
110 |
--------------------------------------------------------------------------------
/pages/detail/detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "navigationBarTitleText": "文章详情页面",
4 | "usingComponents": {}
5 | }
--------------------------------------------------------------------------------
/pages/detail/detail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{article.title}}
11 | 更新时间:{{article.created_at}} 阅读:{{article.hits}}次
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | {{info}}
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/pages/detail/detail.wxss:
--------------------------------------------------------------------------------
1 | /* pages/detail/detail.wxss */
2 |
3 | @import "../components/wxParse/wxParse.wxss";
4 |
5 | .xm_wz .titlenr{ font-size:18px; text-align:center; padding-top:10px;}
6 | .news_cn_time{ text-align:center; color:#999; padding-bottom:10px;}
7 | .content{ margin:0 10px; padding:10px 0; line-height:180%;}
8 |
9 | .info {
10 | color: gray;
11 | opacity: .8;
12 | margin-bottom: 20rpx;
13 | }
14 |
15 | .liuyan_bt{ background:#f6f6f6 url(http://www.lar-admin.test/web/m/images/bt.jpg) no-repeat 10px center; padding-left:20px; font-weight:bold; font-size:14px; height:40px; line-height:40px;}
16 |
17 | .form-box{
18 | width:100%;
19 | background-color: #fff;
20 | margin-top: 20rpx;
21 | }
22 | .row-wrap{
23 | width: 720rpx;
24 | height: 88rpx;
25 | line-height: 88rpx;
26 | margin-left: 30rpx;
27 | border-bottom: 1rpx solid #f4f4f4;
28 | display: flex;
29 | font-size: 28rpx;
30 | /*justify-content: space-between;*/
31 | }
32 | .row-wrap .label{
33 | width: 160rpx;
34 | color: #000
35 | }
36 | .row-wrap .label-right{
37 | flex: 1;
38 | height: 88rpx;
39 | line-height: 88rpx;
40 | }
41 | .row-wrap .label-right input{
42 | height: 100%;
43 | font-size: 28rpx;
44 | padding-right: 30rpx;
45 | }
46 | .row-wrap .right-box{
47 | margin-right: 30rpx;
48 | }
49 | .arrow-right{
50 | width: 15rpx;
51 | height: 24rpx;
52 | }
53 |
54 | page{
55 | height: 100%;
56 | }
57 | .container{
58 | background-color: #f5f5f9;
59 | justify-content: initial;
60 | }
61 |
62 | .save-btn,
63 | .cancel-btn{
64 | width: 690rpx;
65 | height: 80rpx;
66 | line-height: 80rpx;
67 | text-align: center;
68 | margin-top:30rpx;
69 | border-radius: 6rpx;
70 | box-sizing: border-box;
71 | }
72 | .save-btn{
73 | background-color: #e64340;
74 | color:#fff;
75 | }
76 | button[type="default"]{
77 | background-color: #ffffff;
78 | color:#000;
79 | }
80 | .addr-details{
81 | height: auto;
82 | padding: 30rpx 0;
83 | margin-left:30rpx;
84 | border-bottom: 1rpx solid #f4f4f4;
85 | display: flex;
86 | font-size: 28rpx;
87 | }
88 | .addr-details .label{
89 | margin:auto 0 auto 0;
90 | width: 160rpx;
91 | color: #000
92 | }
93 | .addr-details textarea{
94 | box-sizing: border-box;
95 | width: 480rpx;
96 | overflow: scroll;
97 | }
--------------------------------------------------------------------------------
/pages/index/index.js:
--------------------------------------------------------------------------------
1 | //index.js
2 | //获取应用实例
3 | const app = getApp()
4 |
5 | Page({
6 | data: {
7 | //轮播
8 | imgUrls: [
9 | {
10 | link: '/',
11 | url: 'http://www.lar-admin.test/web/m/images/flash/3.jpg'
12 | }, {
13 | link: '/',
14 | url: 'http://www.lar-admin.test/web/m/images/flash/2.jpg'
15 | }
16 | ],
17 | indicatorDots: true, //小点
18 | indicatorColor: "white",//指示点颜色
19 | activeColor: "coral",//当前选中的指示点颜色
20 | autoplay: true, //是否自动轮播
21 | vertical: false,
22 | interval: 2000, //间隔时间
23 | duration: 500, //滑动时间
24 | currentData: 0,
25 |
26 |
27 | },
28 | //事件处理函数
29 | bindViewTap: function() {
30 | wx.navigateTo({
31 | url: '../logs/logs'
32 | })
33 | },
34 | onLoad: function () {
35 | var that = this//不要漏了这句,很重要
36 |
37 | wx.request({
38 | url: 'http://www.lar-admin.test/api/indexfl/1',
39 | headers: {
40 | 'Content-Type': 'application/json'
41 | },
42 | success: function (res) {
43 |
44 | //将获取到的json数据,存在名字叫lanmu的这个数组中
45 | that.setData({
46 | lanmu: res.data.arcs,
47 | //res代表success函数的事件对,data是固定的,arcs是是上面json数据中arcs
48 |
49 | })
50 | }
51 | }),
52 | wx.request({
53 | url: 'http://www.lar-admin.test/api/indexdy/1',
54 | headers: {
55 | 'Content-Type': 'application/json'
56 | },
57 | success: function (res) {
58 | that.setData({
59 | hotpp: res.data.hotpp,
60 | })
61 | }
62 | }),
63 | wx.request({
64 | url: 'http://www.lar-admin.test/api/indexdy/2',
65 | headers: {
66 | 'Content-Type': 'application/json'
67 | },
68 | success: function (res) {
69 | that.setData({
70 | hotjmzn: res.data.hotwz,
71 | })
72 | }
73 | }),
74 | wx.request({
75 | url: 'http://www.lar-admin.test/api/indexdy/3',
76 | headers: {
77 | 'Content-Type': 'application/json'
78 | },
79 | success: function (res) {
80 | that.setData({
81 | hotcygs: res.data.hotwz,
82 | })
83 | }
84 | })
85 | },
86 | //点击跳转到文章
87 | postDetail: function (event) {
88 | wx.navigateTo({
89 | url: '/pages/detail/detail?id=' + event.currentTarget.dataset.id,
90 | })
91 | },
92 |
93 | //点击跳转到项目内容
94 | postProject: function (event) {
95 | wx.navigateTo({
96 | url: '/pages/projectcon/projectcon?id=' + event.currentTarget.dataset.id,
97 | })
98 | },
99 | //获取当前滑块的index tag 切换
100 | indextag: function (e) {
101 | var that = this;
102 | that.setData({
103 | currentData: e.detail.current
104 | })
105 | },
106 | //点击切换,滑块index赋值
107 | indexCheck: function (e) {
108 | var that = this;
109 |
110 | if (that.data.currentData === e.target.dataset.current) {
111 | return false;
112 | } else {
113 | that.setData({
114 | currentData: e.target.dataset.current
115 | })
116 | }
117 | }
118 |
119 | })
120 |
--------------------------------------------------------------------------------
/pages/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | "navigationBarTitleText": "首页-云海天发布"
4 | }
5 |
6 |
--------------------------------------------------------------------------------
/pages/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 搜索项目
7 |
8 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | - {{item.typename}}
25 |
26 | - 更多
27 |
28 |
29 |
30 |
31 | 热门项目更多
32 |
33 |
34 | -
35 | {{item.combrand}}{{item.size}}
36 |
37 |
38 |
39 |
40 |
41 |
42 | 加盟资讯更多
43 |
44 |
45 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | -
60 |
61 |
62 | {{item.title}}
63 | \n{{item.description}}
64 |
65 | {{item.created_at}} = {{item.hits}} 人阅读
66 |
67 |
68 |
69 |
70 |
71 | -
72 |
73 |
74 | {{item.title}}
75 | {{item.description}}
76 |
77 | {{item.created_at}} = {{item.hits}} 人阅读
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 | 内容声明:以上所展示的信息均由我不是逗逼发布,感谢您的参与和支持,喜欢请给个Stars !
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/pages/index/index.wxss:
--------------------------------------------------------------------------------
1 | /**index.wxss**/
2 | .viewport{
3 | max-width:640px; margin:0 auto; text-align:left; position:relative;
4 | }
5 | .clearfix:after {content: "."; display: block; height: 0; clear: both; visibility: hidden;}
6 | .clearfix {zoom:1;}
7 | address, caption, cite, code, dfn, em, strong, th, var, optgroup { font-style:normal; font-weight:inherit; }
8 | b,strong{ font-weight:bold;}
9 |
10 |
11 |
12 | .logo{ line-height:0; position:relative;}
13 | .logo navigator{ background:url(http://www.lar-admin.test/web/m/images/in_search.jpg) no-repeat center center; width:30px; height:30px; display:block; position:absolute; right:0; top:5px; text-indent:-9999px;}
14 |
15 | .scroll_wrap {position:relative;display:block;width:100%;float:left;margin:0 auto;}
16 |
17 |
18 | .nav{ padding:6px 7px 0 7px;}
19 | .nav ul li{ width:20%; float:left;box-sizing:border-box; margin-bottom:6px; text-align:center; padding-top:4px;}
20 | .nav ul li i{ display:block; width:44px; height:44px; margin:0 auto; background-image:url(http://www.lar-admin.test/web/m/images/nav.jpg); background-repeat:no-repeat; background-size:44px 440px;border-radius:50%;}
21 |
22 | .nav .clearfix.nav_1 { background-position:0 0;}
23 | .nav ul li.nav_2 i{ background-position:0 -44px;}
24 | .nav ul li.nav_3 i{ background-position:0 -88px;}
25 | .nav ul li.nav_4 i{ background-position:0 -132px;}
26 | .nav ul li.nav_5 i{ background-position:0 -176px;}
27 | .nav ul li.nav_6 i{ background-position:0 -220px;}
28 | .nav ul li.nav_7 i{ background-position:0 -264px;}
29 | .nav ul li.nav_8 i{ background-position:0 -308px;}
30 | .nav ul li.nav_9 i{ background-position:0 -352px;}
31 | .nav ul li.nav_10 i{ background-position:0 -396px;}
32 |
33 |
34 |
35 | .tab{float: left; width: 33.3333%;text-align: center;padding: 10rpx 0; }
36 | .topTabSwiper{border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; zoom: 1;}
37 | .topTabSwiper:after{content: ""; clear: both;display: block;}
38 | .tabBorer{border-bottom: 1px solid #f00; color: #f00;}
39 | .swiper{width: 100%; height: 330px;}
40 | .swiper_con{text-align: center; width: 100%; height: 100%; padding: 80rpx 0;}
41 |
42 |
43 | .in_project { background-color:#fff; }
44 | .in_tit{ padding:0 10px; height:40px; line-height:40px;}
45 | .in_tit strong{ background:url(http://www.lar-admin.test/web/m/images/bt.jpg) no-repeat left center; padding-left:16px; font-size:14px;}
46 | .in_tit strong i{ font-style:normal; color:#ff5000;}
47 | .in_tit navigator{ float:right;}
48 | /* .in_project ul { padding:0 10px;} */
49 | .in_project ul li{ width:50%; float:left; text-align:center; box-sizing:border-box; overflow:hidden; padding:0 10px; font-family:"微软雅黑"; padding-bottom:12px;}
50 | /* .in_project ul li span{ display:block; line-height:0;} */
51 | .in_project ul li image{ width:100%;}
52 | .in_project ul li strong{ display:block; height:20px; overflow:hidden; line-height:20px; padding-top:4px;}
53 | .in_project ul li i{ font-style:normal; color:#ff5000;line-height:20px;}
54 |
55 |
56 | .in_news{ background-color:#fff; }
57 |
58 | .tishi1{ background-color:#fff;padding:10px;}
59 | .tishi{ padding:10px; line-height:15px; font-size:10px; color:#666; background-color:#fef2f2; border:1px solid #fdbab0;}
60 |
--------------------------------------------------------------------------------
/pages/logs/logs.js:
--------------------------------------------------------------------------------
1 | //logs.js
2 | const util = require('../../utils/util.js')
3 |
4 | Page({
5 | data: {
6 | logs: []
7 | },
8 | onLoad: function () {
9 | this.setData({
10 | logs: (wx.getStorageSync('logs') || []).map(log => {
11 | return util.formatTime(new Date(log))
12 | })
13 | })
14 | }
15 | })
16 |
--------------------------------------------------------------------------------
/pages/logs/logs.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "查看启动日志",
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/logs/logs.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{index + 1}}. {{log}}
5 |
6 |
7 |
--------------------------------------------------------------------------------
/pages/logs/logs.wxss:
--------------------------------------------------------------------------------
1 | .log-list {
2 | display: flex;
3 | flex-direction: column;
4 | padding: 40rpx;
5 | }
6 | .log-item {
7 | margin: 10rpx;
8 | }
9 |
--------------------------------------------------------------------------------
/pages/news/news.js:
--------------------------------------------------------------------------------
1 | // pages/news/news.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | listwz: [],
9 | isLoadingMore: false,
10 | currentPage: 1,
11 | info: '',
12 | index:0
13 | },
14 |
15 | /**
16 | * 生命周期函数--监听页面加载
17 | */
18 | onLoad: function (options) {
19 | var that = this//不要漏了这句,很重要
20 |
21 | wx.request({
22 | url: 'http://www.lar-admin.test/api/indexfl/2',
23 | headers: {
24 | 'Content-Type': 'application/json'
25 | },
26 | success: function (res) {
27 |
28 | //将获取到的json数据,存在名字叫lanmu的这个数组中
29 | that.setData({
30 | lanmu: res.data.arcs,
31 | //res代表success函数的事件对,data是固定的,arcs是是上面json数据中arcs
32 |
33 | })
34 | }
35 | }),
36 |
37 | wx.showLoading({
38 | title: '文章加载中...'
39 | })
40 |
41 | },
42 |
43 | //点击跳转到指定栏目
44 | clickfl: function (e) {
45 |
46 | this.data.index = e.currentTarget.dataset.id
47 | this.data.currentPage = 1
48 |
49 | this.loadArticles()
50 |
51 | //
52 | },
53 |
54 |
55 | loadArticles: function () {
56 | var that = this
57 |
58 | wx.request({
59 | url: 'http://www.lar-admin.test/api/news/' + that.data.index +'?page=' + that.data.currentPage,
60 | success: (res) => {
61 | var listwz = [];
62 | if (res.data.message === 'success') {
63 | if (res.data.listwz.length == 0) {
64 | that.setData({
65 | isLoadingMore: false,
66 | info: '没有更多文章'
67 | });
68 | }
69 |
70 | // for (var i = 0; i < res.data.listwz.length; i++) {
71 | // listwz.push(res.data.listwz[i]);
72 | // }
73 |
74 | // that.setData({
75 | // listwz: listwz
76 | // });
77 |
78 | if (that.data.currentPage == 1){
79 | that.setData({
80 | listwz: res.data.listwz
81 | })
82 | }else{
83 | that.setData({
84 | listwz: that.data.listwz.concat(res.data.listwz)
85 | })
86 | }
87 |
88 | } else {
89 | that.setData({
90 | info: '加载文章列表失败,请重试'
91 | })
92 | }
93 | wx.hideLoading()
94 | }
95 | })
96 | },
97 |
98 | //点击跳转到文章
99 | postDetail: function (event) {
100 | wx.navigateTo({
101 | url: '/pages/detail/detail?id=' + event.currentTarget.dataset.id,
102 | })
103 | },
104 |
105 | /**
106 | * 生命周期函数--监听页面显示
107 | */
108 | onShow: function () {
109 | this.loadArticles()
110 | },
111 |
112 | /**
113 | * 生命周期函数--监听页面隐藏
114 | */
115 | onHide: function () {
116 |
117 | },
118 |
119 |
120 | onUnload: function () {
121 |
122 | },
123 |
124 | /**
125 | * 页面上拉触底事件的处理函数
126 | */
127 | onReachBottom: function () {
128 | var that = this
129 | that.data.currentPage++
130 |
131 | if (that.data.isLoadingMore && that.data.currentPage > 2) {
132 | // 最多只能加载3页
133 | that.setData({
134 | isLoadingMore: false,
135 | info: '没有更多文章了'
136 | })
137 |
138 | return
139 | }
140 | that.data.isLoadingMore = true
141 | that.loadArticles()
142 | },
143 |
144 | /**
145 | * 用户点击右上角分享
146 | */
147 | onShareAppMessage: function () {
148 |
149 | }
150 | })
--------------------------------------------------------------------------------
/pages/news/news.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "资讯列表-云海天发布"
3 | }
--------------------------------------------------------------------------------
/pages/news/news.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{item.typename}}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | -
18 |
19 |
20 | {{item.title}}
21 | \n{{item.description}}
22 |
23 | {{item.created_at}} = {{item.hits}} 人阅读
24 |
25 |
26 | {{info}}
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/pages/news/news.wxss:
--------------------------------------------------------------------------------
1 | /* pages/gushi/news.wxss */
2 |
3 |
4 | .info {
5 | color: gray;
6 | opacity: .8;
7 | margin-bottom: 20rpx;
8 | }
9 |
10 | .info.loading {
11 | width: 70rpx;
12 | height: 70rpx;
13 | }
14 |
15 |
16 | .online-title {
17 | height: 0.4rem;
18 | line-height: 0.4rem;
19 | text-align: center;
20 | font-size: 0.13rem;
21 | overflow: hidden;
22 | }
--------------------------------------------------------------------------------
/pages/projectcon/projectcon.js:
--------------------------------------------------------------------------------
1 | // pages/projectcon/projectcon.js
2 | const app = getApp()
3 |
4 | Page({
5 | data: {
6 | xmcom: {},
7 | info: ''
8 | },
9 |
10 | onLoad: function (options) {
11 | var that = this
12 | wx.request({
13 | url: 'http://www.lar-admin.test/api/xmcon/' + options.id,
14 | headers: {
15 | 'Content-Type': 'application/json'
16 | },
17 | success: function (res) {
18 | that.setData({
19 | xmcom: res.data.xmcom
20 | })
21 | var wxParse = require('../components/wxParse/wxParse.js')
22 | wxParse.wxParse('xmcom_content', 'html', that.data.xmcom.content, that, 1)
23 | },
24 | fail: function () {
25 | that.data.info = '获取项目详情数据失败'
26 | },
27 | complete: function () {
28 | wx.hideLoading()
29 | }
30 |
31 | })
32 |
33 | },
34 | /**
35 | * 用户点击右上角分享
36 | */
37 | onShareAppMessage: function () {
38 | let id = this.data.xmcom.id
39 | let title = this.data.xmcom.combrand
40 | return {
41 | title: "我不是逗逼-" + title,
42 | path: '/pages/projectcon/projectcon?id=' + id
43 | }
44 | },
45 | //取消返回
46 | bindCancel: function () {
47 | wx.navigateBack({})
48 | },
49 |
50 | formSubmit: function (e) {
51 | //console.log(e.detail.value);
52 | var xingming = e.detail.value.xingming;
53 | var dianhua = e.detail.value.dianhua;
54 | var neirong = e.detail.value.neirong;
55 |
56 | if (xingming == "" || xingming.length >= 8) {
57 | wx.showModal({
58 | title: '提示',
59 | content: '姓名不能为空或过长',
60 | showCancel: false
61 | })
62 | return
63 | }else if (dianhua == "" || dianhua.length >= 12) {
64 | wx.showModal({
65 | title: '提示',
66 | content: '姓名不能为空或过长',
67 | showCancel: false
68 | })
69 | return
70 | }
71 |
72 | // if (dianhua == "" || dianhua >= 12) {
73 | // wx.showToast({
74 | // title: '电话不能为空或过长!',
75 | // icon: 'loading',
76 | // duration: 1000
77 | // })
78 | // setTimeout(function () {
79 | // wx.hideToast()
80 | // }, 1000)
81 | // } else if (e.detail.value.dianhua.length == 0 || e.detail.value.dianhua.length >= 12) {
82 | // wx.showToast({
83 | // title: '电话不能为空或过长!',
84 | // icon: 'loading',
85 | // duration: 1000
86 | // })
87 | // setTimeout(function () {
88 | // wx.hideToast()
89 | // }, 1000)
90 | // }
91 | else {
92 | wx.request({
93 | url: 'http://www.lar-admin.test/api/iphonexx',
94 | header: {
95 | "Content-Type": "application/x-www-form-urlencoded"
96 | },
97 | method: "get",
98 | data: {
99 | xingming: e.detail.value.xingming,
100 | dianhua: e.detail.value.dianhua,
101 | neirong: e.detail.value.neirong,
102 | wangzhi: e.detail.value.wangzhi
103 | },
104 | success: function (res) {
105 |
106 | var tishi = res.data.msg;
107 | if (res.data.status == 0) {
108 | wx.showToast({
109 | title: '提交失败!!!',
110 | icon: 'loading',
111 | duration: 1500
112 | })
113 | } else {
114 |
115 | wx.showToast({
116 |
117 | title: tishi,
118 | icon: 'success',
119 | duration: 1000
120 | })
121 | }
122 | }
123 | })
124 | }
125 | }
126 |
127 | })
128 |
--------------------------------------------------------------------------------
/pages/projectcon/projectcon.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "项目详情页面",
3 | "usingComponents": {}
4 |
5 | }
--------------------------------------------------------------------------------
/pages/projectcon/projectcon.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | {{xmcom.combrand}}
19 | \n{{xmcom.comname}}
20 | \n投资金额:{{xmcom.size}}(不包括房租,装修)
21 | \n地区:{{xmcom.province}}
22 | \n保证费:{{xmcom.capital}}万
23 | \n意向加盟:{{xmcom.hits}}人
24 |
25 |
26 |
27 | {{xmcom.combrand}}项目介绍
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/pages/projectcon/projectcon.wxss:
--------------------------------------------------------------------------------
1 | /* pages/projectcon/projectcon.wxss */
2 | @import "../components/wxParse/wxParse.wxss";
3 | .pic{ position:relative; }
4 | .pic image{display:block;margin:0 auto;position:relative;}
5 |
6 | .barnd_js{ padding:5px 10px 10px 10px; border-bottom:1px solid #e2e2e2; position:relative;}
7 |
8 | .barnd_js .open_ly{ position:absolute; right:10px; top:5px; padding:0 5px; height:26px; line-height:26px; border:2px solid #ff5000; color:#ff5000;border-radius:3px;}
9 |
10 | .barnd_js text{ font-size:18px; font-weight:bold; line-height:26px;}
11 |
12 | .barnd_js text i{ font-size:18px; font-weight:bold; color:#ff5000; padding-right:5px; font-style:normal;}
13 |
14 | .barnd_js1 text{ width:50%; float:left; line-height:26px;box-sizing:border-box; padding:0 10px; border-right:1px solid #e2e2e2; border-bottom:1px solid #e2e2e2; }
15 |
16 | .xm_wz text{ font-size:18px; text-align:center; padding-top:10px;}
17 |
18 | .content{ margin:0 10px; padding:10px 0; line-height:180%;}
19 |
20 | .qiye_tit{ border-bottom:1px solid #e2e2e2; line-height:40px;background:url(http://www.lar-admin.test/web/m/images/bt.jpg) no-repeat 10px center; padding-left:22px; font-size:14px; font-weight:bold; margin-right:10px;}
21 |
22 |
23 | .info {
24 | color: gray;
25 | opacity: .8;
26 | margin-bottom: 20rpx;
27 | }
28 |
29 | .liuyan_bt{ background:#f6f6f6 url(http://www.lar-admin.test/web/m/images/bt.jpg) no-repeat 10px center; padding-left:20px; font-weight:bold; font-size:14px; height:40px; line-height:40px;}
30 | .liuyan_bt i{ font-size:12px; font-weight:100; color:#999; font-style:normal; padding-left:5px;}
31 |
32 | .form-box{
33 | width:100%;
34 | background-color: #fff;
35 | margin-top: 20rpx;
36 | }
37 | .row-wrap{
38 | width: 720rpx;
39 | height: 88rpx;
40 | line-height: 88rpx;
41 | margin-left: 30rpx;
42 | border-bottom: 1rpx solid #f4f4f4;
43 | display: flex;
44 | font-size: 28rpx;
45 | /*justify-content: space-between;*/
46 | }
47 | .row-wrap .label{
48 | width: 160rpx;
49 | color: #000
50 | }
51 | .row-wrap .label-right{
52 | flex: 1;
53 | height: 88rpx;
54 | line-height: 88rpx;
55 | }
56 | .row-wrap .label-right input{
57 | height: 100%;
58 | font-size: 28rpx;
59 | padding-right: 30rpx;
60 | }
61 | .row-wrap .right-box{
62 | margin-right: 30rpx;
63 | }
64 | .arrow-right{
65 | width: 15rpx;
66 | height: 24rpx;
67 | }
68 |
69 | page{
70 | height: 100%;
71 | }
72 | .container{
73 | background-color: #f5f5f9;
74 | justify-content: initial;
75 | }
76 |
77 | .save-btn,
78 | .cancel-btn{
79 | width: 690rpx;
80 | height: 80rpx;
81 | line-height: 80rpx;
82 | text-align: center;
83 | margin-top:30rpx;
84 | border-radius: 6rpx;
85 | box-sizing: border-box;
86 | }
87 | .save-btn{
88 | background-color: #e64340;
89 | color:#fff;
90 | }
91 | button[type="default"]{
92 | background-color: #ffffff;
93 | color:#000;
94 | }
95 | .addr-details{
96 | height: auto;
97 | padding: 30rpx 0;
98 | margin-left:30rpx;
99 | border-bottom: 1rpx solid #f4f4f4;
100 | display: flex;
101 | font-size: 28rpx;
102 | }
103 | .addr-details .label{
104 | margin:auto 0 auto 0;
105 | width: 160rpx;
106 | color: #000
107 | }
108 | .addr-details textarea{
109 | box-sizing: border-box;
110 | width: 480rpx;
111 | overflow: scroll;
112 | }
113 |
114 |
--------------------------------------------------------------------------------
/pages/ucenter/index/index.js:
--------------------------------------------------------------------------------
1 | const app = getApp()
2 |
3 | Page({
4 | data: {
5 | },
6 |
7 | onLoad() {
8 | let that = this;
9 |
10 | // 查看是否授权
11 | wx.getSetting({
12 | success(res) {
13 | if (res.authSetting['scope.userInfo']) {
14 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称
15 | wx.getUserInfo({
16 | success(res) {
17 | console.log('成功');
18 | that.checkToken();
19 | }
20 | })
21 | }
22 | }
23 | })
24 |
25 | },
26 |
27 | bindGetUserInfo: function (e) {
28 |
29 | if (!e.detail.userInfo) {
30 | return;
31 | }
32 | wx.setStorageSync('userInfo', e.detail.userInfo)
33 | this.login();
34 | },
35 |
36 | login:function() {
37 | let that = this;
38 | that.checkToken();
39 |
40 | wx.login({
41 | success(res) {
42 | if (res.code) {
43 | wx.request({
44 | url: 'http://www.lar-admin.test/api/user/onLogin',
45 |
46 | data: {
47 | code: res.code
48 | },
49 | success(res) {
50 | if (res.data.code == 777777) {
51 | // 去注册
52 | that.registerUser();
53 |
54 | wx.showToast({
55 | title: '成功',
56 | icon: 'success',
57 | duration: 1000
58 | })
59 |
60 | return;
61 | }
62 |
63 | return ;
64 | }
65 | });
66 | }
67 | }
68 | });
69 | },
70 | checkToken:function () {
71 |
72 | let that = this;
73 | let token = wx.getStorageSync('token');
74 | let oid = wx.getStorageSync('oid');
75 | if (token) {
76 |
77 | wx.request({
78 | url: 'http://www.lar-admin.test/api/user/checktoken',
79 | data: {
80 | token: token,
81 | oid: oid
82 | },
83 | success: function (res) {
84 | if (res.data.code == 777779) {
85 | // 回到原来的地方放
86 | //wx.navigateBack();
87 | return;
88 |
89 | }
90 | else {
91 |
92 | wx.removeStorageSync('token');
93 |
94 | wx.showModal({
95 | title: '提示',
96 | content: '登录过期,重新登录',
97 | success: function (res) {
98 | if (res.confirm) {
99 | console.log('确定');
100 | that.login();
101 | } else {
102 | console.log('取消');
103 | wx.navigateTo({
104 | url: "/pages/ucenter/index/index"
105 | })
106 | }
107 |
108 | }
109 |
110 | })
111 |
112 | return;
113 |
114 | }
115 | }
116 | })
117 | return;
118 | }
119 | },
120 |
121 | registerUser: function () {
122 | var that = this;
123 | wx.login({
124 | success: function (res) {
125 | var code = res.code; // 微信登录接口返回的 code 参数,下面注册接口需要用到
126 | wx.getUserInfo({
127 | success: function (res) {
128 | var iv = res.iv;
129 | var encryptedData = res.encryptedData;
130 | // 下面开始调用注册接口
131 | wx.request({
132 | url: 'http://www.lar-admin.test/api/user/register',
133 | data: {
134 | code: code,
135 | encryptedData: encryptedData,
136 | iv: iv
137 | }, // 设置请求的 参数
138 | success: (res) => {
139 | // console.log(res.data.nickname)
140 | wx.setStorageSync('token', res.data.token);
141 | wx.setStorageSync('oid', res.data.oid);
142 | wx.navigateBack();
143 | }
144 | })
145 | }
146 | })
147 | }
148 | })
149 | },
150 | onShow: function () {
151 |
152 | var that = this;
153 |
154 | var userInfo = wx.getStorageSync('userInfo');
155 | var token = wx.getStorageSync('token')
156 | console.log(userInfo)
157 | if (userInfo) {
158 | that.setData({
159 | userInfo: userInfo,
160 | token : token
161 | })
162 | }
163 |
164 | },
165 | navigateBack: function () {
166 | wx.navigateBack();
167 | }
168 |
169 |
170 |
171 |
172 | })
--------------------------------------------------------------------------------
/pages/ucenter/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "我的"
3 |
4 | }
--------------------------------------------------------------------------------
/pages/ucenter/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{ userInfo.nickName }}
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/pages/ucenter/index/index.wxss:
--------------------------------------------------------------------------------
1 | page {
2 | min-height: 100%;
3 | }
4 | .container{
5 | min-height: 100%;
6 | background-color: #f4f4f4;
7 | font-size: 24rpx;
8 | }
9 |
10 |
11 | .userinfo {
12 | display: flex;
13 | flex-direction: column;
14 | width: 750rpx;
15 | z-index: 100;
16 | margin-top: 100rpx;
17 | align-items: center;
18 | justify-content: center;
19 | }
20 |
21 | .userinfo .userinfo-avatar {
22 | display: block;
23 | width: 160rpx;
24 | height: 160rpx;
25 | margin: 20rpx 0;
26 | border: 5rpx solid #eee;
27 | border-radius: 50%;
28 | }
29 |
30 | .userinfo .userinfo-avatar-no {
31 | display: block;
32 | width: 160rpx;
33 | height: 160rpx;
34 | margin: 20rpx 0;
35 | border: 5rpx solid #eee;
36 | border-radius: 5%;
37 | }
38 |
39 | .userinfo .userinfo-text{
40 | display: flex;
41 | flex-direction: column;
42 | align-items: center;
43 | justify-content: center;
44 | }
45 |
46 | .userinfo .userinfo-text .userinfo-nickname {
47 | font-size: 28rpx;
48 | font-weight: bold;
49 | color: #333;
50 | }
51 |
52 |
53 |
54 |
55 |
56 |
57 | .my-item{
58 | width: 30%;
59 | background: url(https://cdn.it120.cc/images/weappshop/arrow-right.png) no-repeat 750rpx center;
60 | background-size: 16rpx auto,750rpx auto;
61 | margin: 20rpx 0;
62 | border-bottom: 1px solid #f4f4f4;
63 | height: 80rpx;
64 | line-height: 100rpx;
65 | padding-left: 100rpx;
66 | }
67 |
68 | .version {
69 | width:100%;
70 | height: 30rpx;
71 | line-height: 30rpx;
72 | font-size: 24rpx;
73 | text-align: center;
74 | }
75 |
--------------------------------------------------------------------------------
/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "项目配置文件",
3 | "packOptions": {
4 | "ignore": []
5 | },
6 | "setting": {
7 | "urlCheck": false,
8 | "es6": true,
9 | "postcss": false,
10 | "minified": false,
11 | "newFeature": true,
12 | "coverView": true,
13 | "autoAudits": false,
14 | "checkInvalidKey": true,
15 | "checkSiteMap": true,
16 | "uploadWithSourceMap": true,
17 | "babelSetting": {
18 | "ignore": [],
19 | "disablePlugins": [],
20 | "outputPath": ""
21 | }
22 | },
23 | "compileType": "miniprogram",
24 | "libVersion": "2.8.0",
25 | "appid": "wx2db5012af575bf98",
26 | "projectname": "test",
27 | "debugOptions": {
28 | "hidedInDevtools": []
29 | },
30 | "isGameTourist": false,
31 | "simulatorType": "wechat",
32 | "simulatorPluginLibVersion": {},
33 | "condition": {
34 | "search": {
35 | "current": -1,
36 | "list": []
37 | },
38 | "conversation": {
39 | "current": -1,
40 | "list": []
41 | },
42 | "game": {
43 | "currentL": -1,
44 | "list": []
45 | },
46 | "miniprogram": {
47 | "current": -1,
48 | "list": []
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/sitemap.json:
--------------------------------------------------------------------------------
1 | {
2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
3 | "rules": [{
4 | "action": "allow",
5 | "page": "*"
6 | }]
7 | }
--------------------------------------------------------------------------------
/utils/util.js:
--------------------------------------------------------------------------------
1 | const formatTime = date => {
2 | const year = date.getFullYear()
3 | const month = date.getMonth() + 1
4 | const day = date.getDate()
5 | const hour = date.getHours()
6 | const minute = date.getMinutes()
7 | const second = date.getSeconds()
8 |
9 | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
10 | }
11 |
12 | const formatNumber = n => {
13 | n = n.toString()
14 | return n[1] ? n : '0' + n
15 | }
16 |
17 | module.exports = {
18 | formatTime: formatTime
19 | }
20 |
--------------------------------------------------------------------------------
/vimg/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imnotdoubi/laraveladmin-xcx/9a9c2472386ca524afba7d70ed888288cdb40e58/vimg/1.jpg
--------------------------------------------------------------------------------
/vimg/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imnotdoubi/laraveladmin-xcx/9a9c2472386ca524afba7d70ed888288cdb40e58/vimg/2.jpg
--------------------------------------------------------------------------------
/vimg/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imnotdoubi/laraveladmin-xcx/9a9c2472386ca524afba7d70ed888288cdb40e58/vimg/3.jpg
--------------------------------------------------------------------------------
/vimg/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imnotdoubi/laraveladmin-xcx/9a9c2472386ca524afba7d70ed888288cdb40e58/vimg/4.jpg
--------------------------------------------------------------------------------
/vimg/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imnotdoubi/laraveladmin-xcx/9a9c2472386ca524afba7d70ed888288cdb40e58/vimg/5.jpg
--------------------------------------------------------------------------------