Showing
6 changed files
with
118 additions
and
59 deletions
@@ -23,11 +23,11 @@ class Yohobuy | @@ -23,11 +23,11 @@ class Yohobuy | ||
23 | // const YOHOBUY_URL = 'http://www.yohobuy.com/'; | 23 | // const YOHOBUY_URL = 'http://www.yohobuy.com/'; |
24 | 24 | ||
25 | //java API | 25 | //java API |
26 | - const API_URL = 'http://apih5.yoho.cn/'; | ||
27 | - const API_URL2 = 'http://apih5.yoho.cn/'; | ||
28 | - const SERVICE_URL = 'http://serviceh5.yoho.cn/'; | ||
29 | - const YOHOBUY_URL = 'http://www.yohobuy.com/'; | ||
30 | - const API_OLD = 'http://api2.open.yohobuy.com/'; | 26 | + // const API_URL = 'http://apih5.yoho.cn/'; |
27 | + // const API_URL2 = 'http://apih5.yoho.cn/'; | ||
28 | + // const SERVICE_URL = 'http://serviceh5.yoho.cn/'; | ||
29 | + // const YOHOBUY_URL = 'http://www.yohobuy.com/'; | ||
30 | + // const API_OLD = 'http://api2.open.yohobuy.com/'; | ||
31 | 31 | ||
32 | // const API_URL = 'http://api.yoho.cn/'; | 32 | // const API_URL = 'http://api.yoho.cn/'; |
33 | // const API_URL2 = 'http://api.yoho.cn/'; | 33 | // const API_URL2 = 'http://api.yoho.cn/'; |
@@ -43,14 +43,13 @@ class Yohobuy | @@ -43,14 +43,13 @@ class Yohobuy | ||
43 | // const API_OLD = 'http://api2.open.yohobuy.com/'; | 43 | // const API_OLD = 'http://api2.open.yohobuy.com/'; |
44 | 44 | ||
45 | /* 测试环境 java API*/ | 45 | /* 测试环境 java API*/ |
46 | -// const API_URL = 'http://testapi.yoho.cn:28078/'; // 'http://devapi.yoho.cn:58078/'; | ||
47 | -// const API_URL = 'http://devapi.yoho.cn:58078/'; | ||
48 | -// const DEV_API_URL = 'http://devapi.yoho.cn:58078/'; | ||
49 | -// const SERVICE_URL = 'http://testservice.yoho.cn:28077/'; // 'http://devservice.yoho.cn:58077/'; | ||
50 | -// const DEV_SERVICE_URL = 'http://devservice.yoho.cn:58077/'; | ||
51 | -// const PRD_SERVICE_URL = 'http://serviceh5.yoho.cn/'; | ||
52 | -// const YOHOBUY_URL = 'http://www.yohobuy.com/'; | ||
53 | -// const API_OLD = 'http://test2.open.yohobuy.com/'; | 46 | + const API_URL = 'http://testapi.yoho.cn:28078/'; // 'http://devapi.yoho.cn:58078/'; |
47 | + const DEV_API_URL = 'http://devapi.yoho.cn:58078/'; | ||
48 | + const SERVICE_URL = 'http://testservice.yoho.cn:28077/'; // 'http://devservice.yoho.cn:58077/'; | ||
49 | + const DEV_SERVICE_URL = 'http://devservice.yoho.cn:58077/'; | ||
50 | + const PRD_SERVICE_URL = 'http://serviceh5.yoho.cn/'; | ||
51 | + const YOHOBUY_URL = 'http://www.yohobuy.com/'; | ||
52 | + const API_OLD = 'http://test2.open.yohobuy.com/'; | ||
54 | 53 | ||
55 | /* 测试环境 php API*/ | 54 | /* 测试环境 php API*/ |
56 | // const API_URL = 'http://test2.open.yohobuy.com/'; | 55 | // const API_URL = 'http://test2.open.yohobuy.com/'; |
@@ -2,18 +2,10 @@ var $ = require('jquery'), | @@ -2,18 +2,10 @@ var $ = require('jquery'), | ||
2 | loading = require('../plugin/loading'), | 2 | loading = require('../plugin/loading'), |
3 | dialog = require('./dialog'); | 3 | dialog = require('./dialog'); |
4 | 4 | ||
5 | -var $massagePage = $('.massage-page'), | ||
6 | - $page = $('.massage-page'), | ||
7 | - statu = 0, | 5 | +var $page = $('.massage-page'), |
8 | page = 1, | 6 | page = 1, |
9 | stopLoading = false; | 7 | stopLoading = false; |
10 | 8 | ||
11 | -$massagePage.on('touchend', 'p', function() { | ||
12 | - | ||
13 | -}).on('touchend', '.del', function() { | ||
14 | - | ||
15 | -}); | ||
16 | - | ||
17 | function massageAJAX(page) { | 9 | function massageAJAX(page) { |
18 | loading.showLoadingMask(); | 10 | loading.showLoadingMask(); |
19 | $.ajax({ | 11 | $.ajax({ |
1 | .massage-page{ | 1 | .massage-page{ |
2 | margin-top: .4rem; | 2 | margin-top: .4rem; |
3 | + padding-bottom:.6rem; | ||
3 | .massage-list{ | 4 | .massage-list{ |
4 | - padding: 1em 2em 1em 1em; | 5 | + padding: 1em 2em 1em 1.4em; |
5 | border-bottom: 1px solid #F8F8F8; | 6 | border-bottom: 1px solid #F8F8F8; |
6 | position: relative; | 7 | position: relative; |
7 | overflow: hidden; | 8 | overflow: hidden; |
@@ -19,17 +20,72 @@ | @@ -19,17 +20,72 @@ | ||
19 | top: .6rem; | 20 | top: .6rem; |
20 | color: #cccccc; | 21 | color: #cccccc; |
21 | } | 22 | } |
23 | + strong{ | ||
24 | + width: 8px; | ||
25 | + height: 8px; | ||
26 | + position: absolute; | ||
27 | + left: .4rem; | ||
28 | + top: 1rem; | ||
29 | + background: #f00; | ||
30 | + border-radius:50%; | ||
31 | + } | ||
22 | } | 32 | } |
23 | .massage-main{ | 33 | .massage-main{ |
24 | border-bottom: 1px solid #F8F8F8; | 34 | border-bottom: 1px solid #F8F8F8; |
25 | padding: 12px; | 35 | padding: 12px; |
26 | margin-left: 10px; | 36 | margin-left: 10px; |
27 | margin-bottom: 10px; | 37 | margin-bottom: 10px; |
28 | - h3{ | ||
29 | - line-height: 1.4rem; | 38 | + h6{ |
39 | + margin-bottom: .2rem; | ||
30 | } | 40 | } |
31 | span{ | 41 | span{ |
32 | color: #656565; | 42 | color: #656565; |
33 | } | 43 | } |
44 | + | ||
45 | + } | ||
46 | + .sale-btn{ | ||
47 | + background-color: #ea2622; | ||
48 | + color: #fff; | ||
49 | + padding: 5px 10px 5px 10px; | ||
50 | + } | ||
51 | + .coupon-item{ | ||
52 | + margin-left: 10px; | ||
53 | + padding-bottom: 10px; | ||
54 | + border-bottom: 1px solid #F8F8F8; | ||
55 | + margin-top: 10px; | ||
56 | + .coupon-img{ | ||
57 | + width: 3.2rem; | ||
58 | + height: auto; | ||
59 | + overflow: hidden; | ||
60 | + float: left; | ||
61 | + margin-right: .4rem; | ||
62 | + img{ | ||
63 | + width: 100%; | ||
64 | + height: auto; | ||
65 | + } | ||
66 | + } | ||
67 | + .coupon-info{ | ||
68 | + font-size: .55rem; | ||
69 | + span{ | ||
70 | + color: #f00; | ||
71 | + } | ||
72 | + } | ||
73 | + .coupon-action{ | ||
74 | + width: 110px; | ||
75 | + font-size: 12px; | ||
76 | + letter-spacing: 2px; | ||
77 | + margin: 3px 0 0 0; | ||
78 | + height: 35px; | ||
79 | + line-height: 35px; | ||
80 | + background: #ed0010; | ||
81 | + text-align: center; | ||
82 | + margin-left: 3.6rem; | ||
83 | + a{ | ||
84 | + display: block; | ||
85 | + color: #fff; | ||
86 | + width: 100%; | ||
87 | + height:100%; | ||
88 | + } | ||
89 | + } | ||
34 | } | 90 | } |
35 | } | 91 | } |
1 | {{#list}} | 1 | {{#list}} |
2 | <div class="massage-list" data-id="{{id}}"> | 2 | <div class="massage-list" data-id="{{id}}"> |
3 | + {{#if isNotReaded}} | ||
4 | + <strong></strong> | ||
5 | + {{/if}} | ||
3 | <p><a href="{{url}}">{{title}}</a></p> | 6 | <p><a href="{{url}}">{{title}}</a></p> |
4 | <span>{{time}}</span> | 7 | <span>{{time}}</span> |
5 | <i class="iconfont del"></i> | 8 | <i class="iconfont del"></i> |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | <div class="massage-page yoho-page"> | 2 | <div class="massage-page yoho-page"> |
3 | <div class="massage-main"> | 3 | <div class="massage-main"> |
4 | - <h3>{{title}}</h3> | 4 | + <h6>{{title}}</h6> |
5 | <span>{{sender}} 发送于{{time}}</span> | 5 | <span>{{sender}} 发送于{{time}}</span> |
6 | </div> | 6 | </div> |
7 | + {{#if text}} | ||
7 | <div class="massage-main"> | 8 | <div class="massage-main"> |
8 | {{# text}} | 9 | {{# text}} |
9 | <!-- 文本消息 --> | 10 | <!-- 文本消息 --> |
10 | <p>{{{content}}}</p> | 11 | <p>{{{content}}}</p> |
11 | {{/ text}} | 12 | {{/ text}} |
12 | - {{# coupons}} | ||
13 | - <!-- 优惠券消息 --> | ||
14 | - <div class="coupon-item"> | ||
15 | - <div class="coupon-img"> | ||
16 | - <img src="http://static.yohobuy.com/images/v2/activity/default_coupon.jpg"> | ||
17 | - </div> | ||
18 | - <div class="coupon-info"> | ||
19 | - <p>{{remark}}</p> | ||
20 | - {{#if url}} | ||
21 | - <p>面值:{{price}}</p> | ||
22 | - <p>有效期:{{useTime}}</p> | ||
23 | - {{^}} | ||
24 | - <p>使用时间:{{useTime}}</p> | ||
25 | - <p>领取时间:{{pickTime}}</p> | ||
26 | - {{/if}} | ||
27 | - </div> | ||
28 | - <div class="coupon-action"> | ||
29 | - {{#if url}} | ||
30 | - <a href="{{url}}" class="view-coupon-btn">立即查看</a> | ||
31 | - {{^}} | ||
32 | - <a{{#if canPick}} class="pick-coupon-btn" data-id="{{id}}"{{/if}}>立即领取</a> | ||
33 | - {{/if}} | ||
34 | - </div> | 13 | + </div> |
14 | + {{/if}} | ||
15 | + | ||
16 | + {{#if coupons}} | ||
17 | + {{# coupons}} | ||
18 | + <!-- 优惠券消息 --> | ||
19 | + <div class="coupon-item"> | ||
20 | + <div class="coupon-img"> | ||
21 | + <img src="http://static.yohobuy.com/images/v2/activity/default_coupon.jpg"> | ||
35 | </div> | 22 | </div> |
36 | - {{/ coupons}} | ||
37 | - {{# sale}} | ||
38 | - <!-- 促销消息 --> | ||
39 | - <div class="sale-img"> | ||
40 | - <img src="{{image}}"> | 23 | + <div class="coupon-info"> |
24 | + <p>{{remark}}</p> | ||
25 | + {{#if url}} | ||
26 | + <p>面值:<span>{{price}}</span></p> | ||
27 | + <p>有效期:{{useTime}}</p> | ||
28 | + {{^}} | ||
29 | + <p>使用时间:{{useTime}}</p> | ||
30 | + <p>领取时间:{{pickTime}}</p> | ||
31 | + {{/if}} | ||
41 | </div> | 32 | </div> |
42 | - <p>{{{content}}}</p> | ||
43 | - <a href="{{btnLink}}" class="sale-btn">{{btnName}}</a> | ||
44 | - {{/ sale}} | 33 | + <div class="coupon-action"> |
34 | + {{#if url}} | ||
35 | + <a href="{{url}}" class="view-coupon-btn">立即查看</a> | ||
36 | + {{^}} | ||
37 | + <a{{#if canPick}} class="pick-coupon-btn" data-id="{{id}}"{{/if}}>立即领取</a> | ||
38 | + {{/if}} | ||
39 | + </div> | ||
40 | + </div> | ||
41 | + {{/ coupons}} | ||
42 | + {{/if}} | ||
43 | + {{#if sale}} | ||
44 | + {{# sale}} | ||
45 | + <!-- 促销消息 --> | ||
46 | + <div class="sale-img"> | ||
47 | + <img src="{{image}}"> | ||
45 | </div> | 48 | </div> |
49 | + <br /> | ||
50 | + <br /> | ||
51 | + <p>{{{content}}}</p> | ||
52 | + <br /> | ||
53 | + <br /> | ||
54 | + <a href="{{btnLink}}" class="sale-btn">{{btnName}}</a> | ||
55 | + {{/ sale}} | ||
56 | + {{/if}} | ||
46 | </div> | 57 | </div> |
47 | {{> layout/footer}} | 58 | {{> layout/footer}} |
@@ -283,7 +283,6 @@ class HomeController extends AbstractAction | @@ -283,7 +283,6 @@ class HomeController extends AbstractAction | ||
283 | 283 | ||
284 | $messages['pageFooter'] = true; | 284 | $messages['pageFooter'] = true; |
285 | $messages['messagePage'] = true; | 285 | $messages['messagePage'] = true; |
286 | - | ||
287 | $this->_view->display('message', $messages); | 286 | $this->_view->display('message', $messages); |
288 | } | 287 | } |
289 | 288 | ||
@@ -335,7 +334,6 @@ class HomeController extends AbstractAction | @@ -335,7 +334,6 @@ class HomeController extends AbstractAction | ||
335 | $uid = $this->getUid(true); | 334 | $uid = $this->getUid(true); |
336 | $data = UserModel::getMessageDetail($uid, $id); | 335 | $data = UserModel::getMessageDetail($uid, $id); |
337 | $data['pageFooter'] = true; | 336 | $data['pageFooter'] = true; |
338 | - | ||
339 | $this->_view->display('message-main', $data); | 337 | $this->_view->display('message-main', $data); |
340 | } | 338 | } |
341 | 339 |
-
Please register or login to post a comment