Showing
9 changed files
with
242 additions
and
24 deletions
@@ -18,18 +18,18 @@ class Yohobuy | @@ -18,18 +18,18 @@ class Yohobuy | ||
18 | { | 18 | { |
19 | 19 | ||
20 | // /* 正式环境 */ | 20 | // /* 正式环境 */ |
21 | -// const API_URL = 'http://api2.open.yohobuy.com/'; | ||
22 | -// const API_URL2 = 'http://api.open.yohobuy.com/'; | ||
23 | -// const SERVICE_URL = 'http://service.api.yohobuy.com/'; | ||
24 | -// const YOHOBUY_URL = 'http://www.yohobuy.com/'; | 21 | + // const API_URL = 'http://api2.open.yohobuy.com/'; |
22 | + // const API_URL2 = 'http://api.open.yohobuy.com/'; | ||
23 | + // const SERVICE_URL = 'http://service.api.yohobuy.com/'; | ||
24 | + // const YOHOBUY_URL = 'http://www.yohobuy.com/'; | ||
25 | 25 | ||
26 | /* 测试环境 */ | 26 | /* 测试环境 */ |
27 | - const API_URL = 'http://test2.open.yohobuy.com/'; | ||
28 | - const SERVICE_URL = 'http://test.service.api.yohobuy.com/'; | ||
29 | - const YOHOBUY_URL = 'http://www.yohobuy.com/'; | ||
30 | - const API_URL_MYCENTER = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的个人中心接口URL | ||
31 | - const API_URL_SHOPINGCART = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的购物车接口URL | ||
32 | - const API_URL_PRODUCTDETAIL = 'http://172.16.6.145:8080/'; // 商品详情页 | 27 | + const API_URL = 'http://test2.open.yohobuy.com/'; |
28 | + const SERVICE_URL = 'http://test.service.api.yohobuy.com/'; | ||
29 | + const YOHOBUY_URL = 'http://www.yohobuy.com/'; | ||
30 | + const API_URL_MYCENTER = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的个人中心接口URL | ||
31 | + const API_URL_SHOPINGCART = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的购物车接口URL | ||
32 | + const API_URL_PRODUCTDETAIL = 'http://172.16.6.145:8080/'; // 商品详情页 | ||
33 | 33 | ||
34 | /** | 34 | /** |
35 | * 私钥列表 | 35 | * 私钥列表 |
@@ -214,7 +214,7 @@ function tsAnimate() { | @@ -214,7 +214,7 @@ function tsAnimate() { | ||
214 | 214 | ||
215 | setTimeout(tsAnimate, 3000); | 215 | setTimeout(tsAnimate, 3000); |
216 | 216 | ||
217 | -$('.home-header .search-btn').on('touchstart', function() { | 217 | +$('.home-header .iconfont').on('touchstart', function() { |
218 | $(this).addClass('highlight'); | 218 | $(this).addClass('highlight'); |
219 | }).on('touchend touchcancel', function() { | 219 | }).on('touchend touchcancel', function() { |
220 | $(this).removeClass('highlight'); | 220 | $(this).removeClass('highlight'); |
@@ -83,6 +83,28 @@ $addressForm.on('submit', function() { | @@ -83,6 +83,28 @@ $addressForm.on('submit', function() { | ||
83 | if (isSubmiting) { | 83 | if (isSubmiting) { |
84 | return false; | 84 | return false; |
85 | } | 85 | } |
86 | + | ||
87 | + // 简单的表单校验 | ||
88 | + if (!$(this).find('[name="consignee"]').val()) { | ||
89 | + tip.show('收件人不能为空'); | ||
90 | + $(this).find('[name="consignee"]').focus(); | ||
91 | + return false; | ||
92 | + } | ||
93 | + if (!$(this).find('[name="mobile"]').val()) { | ||
94 | + tip.show('手机号不能为空'); | ||
95 | + $(this).find('[name="mobile"]').focus(); | ||
96 | + return false; | ||
97 | + } | ||
98 | + if (!$(this).find('[name="area_code"]').val() || !$(this).find('[name="area"]').val()) { | ||
99 | + tip.show('省市区不能为空'); | ||
100 | + return false; | ||
101 | + } | ||
102 | + if (!$(this).find('[name="address"]').val()) { | ||
103 | + tip.show('地址不能为空'); | ||
104 | + $(this).find('[name="address"]').focus(); | ||
105 | + return false; | ||
106 | + } | ||
107 | + | ||
86 | isSubmiting = true; | 108 | isSubmiting = true; |
87 | $.ajax({ | 109 | $.ajax({ |
88 | method: 'POST', | 110 | method: 'POST', |
@@ -75,10 +75,10 @@ | @@ -75,10 +75,10 @@ | ||
75 | font-size: 40rem / $pxConvertRem; | 75 | font-size: 40rem / $pxConvertRem; |
76 | line-height: 90rem / $pxConvertRem; | 76 | line-height: 90rem / $pxConvertRem; |
77 | } | 77 | } |
78 | + } | ||
78 | 79 | ||
79 | - &.highlight { | ||
80 | - background: rgba(200,200,200,.4); | ||
81 | - } | 80 | + .iconfont.highlight { |
81 | + background: rgba(200,200,200,.4); | ||
82 | } | 82 | } |
83 | } | 83 | } |
84 | 84 |
@@ -30,6 +30,7 @@ $basicBtnC:#eb0313; | @@ -30,6 +30,7 @@ $basicBtnC:#eb0313; | ||
30 | left: pxToRem(30px); | 30 | left: pxToRem(30px); |
31 | right: auto; | 31 | right: auto; |
32 | } | 32 | } |
33 | +<<<<<<< HEAD | ||
33 | 34 | ||
34 | .good-detail-page { | 35 | .good-detail-page { |
35 | overflow: hidden; | 36 | overflow: hidden; |
@@ -108,10 +109,168 @@ $basicBtnC:#eb0313; | @@ -108,10 +109,168 @@ $basicBtnC:#eb0313; | ||
108 | bottom: pxToRem(40px); | 109 | bottom: pxToRem(40px); |
109 | .swiper-pagination-bullet { | 110 | .swiper-pagination-bullet { |
110 | margin-right: 2px; | 111 | margin-right: 2px; |
112 | +======= | ||
113 | +.feedback-list { | ||
114 | + padding-top: pxToRem(30px); | ||
115 | + background-color: #f0f0f0; | ||
116 | + | ||
117 | + .nodata{ | ||
118 | + height: pxToRem(88px); | ||
119 | + background-color: #fff; | ||
120 | + padding:0 pxToRem(28px); | ||
121 | + span,a{ | ||
122 | + line-height: pxToRem(88px); | ||
123 | + font-size: pxToRem(28px); | ||
124 | + } | ||
125 | + span{ | ||
126 | + color:$mainFontC; | ||
127 | + } | ||
128 | + a{ | ||
129 | + float: right; | ||
130 | + color: $subFontC; | ||
131 | + span.iconfont{ | ||
132 | + color:inherit; | ||
133 | + } | ||
134 | + } | ||
135 | + } | ||
136 | + .nav-tab{ | ||
137 | + width: 100%; | ||
138 | + } | ||
139 | + | ||
140 | + .nav-tab { | ||
141 | + height: pxToRem(60px); | ||
142 | + padding: pxToRem(10px) 0; | ||
143 | + background-color: #fff; | ||
144 | + border-top: 1px solid $borderC; | ||
145 | + border-bottom: 1px solid $borderC; | ||
146 | + } | ||
147 | + | ||
148 | + .comment-nav, .consult-nav { | ||
149 | + box-sizing: border-box; | ||
150 | + float: left; | ||
151 | + width: 50%; | ||
152 | + height: pxToRem(60px); | ||
153 | + line-height: pxToRem(60px); | ||
154 | + font-size: pxToRem(28px); | ||
155 | + text-align: center; | ||
156 | + color: #ccc; | ||
157 | + | ||
158 | + &.focus { | ||
159 | + color: #000; | ||
160 | + } | ||
161 | + } | ||
162 | + .comment-nav { | ||
163 | + border-right: 1px solid #ccc; | ||
164 | + } | ||
165 | + .content{ | ||
166 | + .content-main{ | ||
167 | + background-color: #fff; | ||
168 | + border-bottom: 1px solid $borderC; | ||
169 | + &.comment-content-main{ | ||
170 | + .user-name{ | ||
171 | + font-size: pxToRem(24px); | ||
172 | + line-height: pxToRem(62px); | ||
173 | + color:$mainFontC; | ||
174 | + padding-left: pxToRem(28px); | ||
175 | + padding-right: pxToRem(18px); | ||
176 | + } | ||
177 | + .goods-spec, | ||
178 | + .comment-time{ | ||
179 | + font-size: pxToRem(24px); | ||
180 | + line-height: pxToRem(62px); | ||
181 | + } | ||
182 | + .detail-content{ | ||
183 | + // font-size: pxToRem(28px); | ||
184 | + // line-height: pxToRem(36px); | ||
185 | + font-size: pxToRem(24px); | ||
186 | + line-height: pxToRem(62px); | ||
187 | + color:$mainFontC; | ||
188 | + padding-left: pxToRem(28px); | ||
189 | + padding-right: pxToRem(18px); | ||
190 | + } | ||
191 | + .goods-spec, | ||
192 | + .comment-time{ | ||
193 | + font-size: pxToRem(24px); | ||
194 | + line-height: pxToRem(62px); | ||
195 | + } | ||
196 | + .detail-content{ | ||
197 | + font-size: pxToRem(28px); | ||
198 | + line-height: pxToRem(36px); | ||
199 | + } | ||
200 | + .goods-spec, | ||
201 | + .detail-content{ | ||
202 | + color:$mainFontC; | ||
203 | + } | ||
204 | + .detail-content, | ||
205 | + .comment-time{ | ||
206 | + padding-left: pxToRem(28px); | ||
207 | + | ||
208 | + } | ||
209 | + .detail-content{ | ||
210 | + padding-right: pxToRem(28px); | ||
211 | + padding-left: pxToRem(28px); | ||
212 | + } | ||
213 | + .detail-content{ | ||
214 | + padding-right: pxToRem(28px); | ||
215 | + } | ||
216 | + .comment-time{ | ||
217 | + color:#c1c1c1; | ||
218 | + } | ||
219 | + } | ||
220 | + &.consult-content-main{ | ||
221 | + padding-right: pxToRem(28px); | ||
222 | + padding-left: pxToRem(28px); | ||
223 | + padding-top: pxToRem(20px); | ||
224 | + padding-bottom: pxToRem(20px); | ||
225 | + .question{ | ||
226 | + font-size: pxToRem(24px); | ||
227 | + color:$mainFontC; | ||
228 | + span{ | ||
229 | + display: block; | ||
230 | + float: left; | ||
231 | + font-size: inherit; | ||
232 | + padding-right: pxToRem(15px); | ||
233 | + } | ||
234 | + p{ | ||
235 | + overflow: hidden; | ||
236 | + } | ||
237 | + } | ||
238 | + .time{ | ||
239 | + font-size: pxToRem(22px); | ||
240 | + color:$subFontC; | ||
241 | + } | ||
242 | + .answer{ | ||
243 | + font-size: pxToRem(24px); | ||
244 | + line-height: pxToRem(36px); | ||
245 | + color:$subFontC; | ||
246 | + margin-top: pxToRem(14px); | ||
247 | + span{ | ||
248 | + display: block; | ||
249 | + float: left; | ||
250 | + font-size: inherit; | ||
251 | + color:$mainFontC; | ||
252 | + padding-right: pxToRem(15px); | ||
253 | +>>>>>>> 94393aa29a7f2704e60f85d3aa6ac8b379aa612d | ||
111 | } | 254 | } |
112 | .swiper-pagination-bullet-active { | 255 | .swiper-pagination-bullet-active { |
113 | background-color: #000; | 256 | background-color: #000; |
114 | } | 257 | } |
258 | +<<<<<<< HEAD | ||
259 | +======= | ||
260 | + } | ||
261 | + } | ||
262 | + &.no-item{ | ||
263 | + font-size: pxToRem(28px); | ||
264 | + text-align: center; | ||
265 | + height: pxToRem(200px); | ||
266 | + line-height: pxToRem(200px); | ||
267 | + color: $subFontC; | ||
268 | + span{ | ||
269 | + font-size: inherit; | ||
270 | + } | ||
271 | + } | ||
272 | + } | ||
273 | +>>>>>>> 94393aa29a7f2704e60f85d3aa6ac8b379aa612d | ||
115 | 274 | ||
116 | } | 275 | } |
117 | 276 |
@@ -21,15 +21,15 @@ | @@ -21,15 +21,15 @@ | ||
21 | </div> | 21 | </div> |
22 | <div class="my-link clearfix {{^isLogin}}no-login{{/isLogin}}"> | 22 | <div class="my-link clearfix {{^isLogin}}no-login{{/isLogin}}"> |
23 | <a class="link-item" href="/home/favorite"> | 23 | <a class="link-item" href="/home/favorite"> |
24 | - {{#if product_favorite_total}}{{product_favorite_total}}{{/if}} | 24 | + {{#isLogin}}{{product_favorite_total}}{{/isLogin}} |
25 | <p>收藏的商品</p> | 25 | <p>收藏的商品</p> |
26 | </a> | 26 | </a> |
27 | <a class="link-item" href="/home/favorite?tab=brand"> | 27 | <a class="link-item" href="/home/favorite?tab=brand"> |
28 | - {{#if brand_favorite_total}}{{brand_favorite_total}}{{/if}} | 28 | + {{#isLogin}}{{brand_favorite_total}}{{/isLogin}} |
29 | <p>收藏的品牌</p> | 29 | <p>收藏的品牌</p> |
30 | </a> | 30 | </a> |
31 | <a class="link-item" href="/home/"> | 31 | <a class="link-item" href="/home/"> |
32 | - {{#if product_browse}}{{product_browse}}{{/if}} | 32 | + {{#isLogin}}{{product_browse}}{{/isLogin}} |
33 | <p>浏览记录</p> | 33 | <p>浏览记录</p> |
34 | </a> | 34 | </a> |
35 | </div> | 35 | </div> |
@@ -47,14 +47,23 @@ | @@ -47,14 +47,23 @@ | ||
47 | </div> | 47 | </div> |
48 | {{/goodsDiscount}} | 48 | {{/goodsDiscount}} |
49 | 49 | ||
50 | -<div class="feedback-list-page "> | 50 | +<div class="feedback-list "> |
51 | {{# feedbacks}} | 51 | {{# feedbacks}} |
52 | + {{#if nodata}} | ||
53 | + <div class="nodata"> | ||
54 | + <span>暂无商品评价和咨询</span> | ||
55 | + <a class="go-consult">我要咨询<i class="iconfont"><span class="iconfont"></span></a> | ||
56 | + </div> | ||
57 | + {{else}} | ||
58 | + | ||
52 | <ul id="nav-tab" class="nav-tab clearfix"> | 59 | <ul id="nav-tab" class="nav-tab clearfix"> |
53 | <li class="comment-nav focus">{{commentName}}({{commentsNum}})</li> | 60 | <li class="comment-nav focus">{{commentName}}({{commentsNum}})</li> |
54 | <li class="consult-nav">{{consultName}}({{consultsNum}})</li> | 61 | <li class="consult-nav">{{consultName}}({{consultsNum}})</li> |
55 | </ul> | 62 | </ul> |
56 | <div id="feedback-content" > | 63 | <div id="feedback-content" > |
64 | + | ||
57 | <div class="comment-content content "> | 65 | <div class="comment-content content "> |
66 | + {{#if commentsNum}} | ||
58 | <div class="comment-content-main content-main"> | 67 | <div class="comment-content-main content-main"> |
59 | {{# comments}} | 68 | {{# comments}} |
60 | <span class="user-name"> | 69 | <span class="user-name"> |
@@ -71,11 +80,19 @@ | @@ -71,11 +80,19 @@ | ||
71 | </span> | 80 | </span> |
72 | {{/ comments}} | 81 | {{/ comments}} |
73 | </div> | 82 | </div> |
83 | + {{else}} | ||
84 | + <div class="comment-content-main content-main no-item"> | ||
85 | + <span class="iconfont"></span>暂无评论 | ||
86 | + </div> | ||
87 | + {{/if}} | ||
74 | <div class="comment-content-footer"> | 88 | <div class="comment-content-footer"> |
75 | <a href="{{moreComments}}">查看更多 <span class="iconfont"></span></a> | 89 | <a href="{{moreComments}}">查看更多 <span class="iconfont"></span></a> |
76 | </div> | 90 | </div> |
77 | </div> | 91 | </div> |
92 | + | ||
93 | + | ||
78 | <div class="consult-content content hide "> | 94 | <div class="consult-content content hide "> |
95 | + {{#if consultsNum}} | ||
79 | <div class="consult-content-main content-main"> | 96 | <div class="consult-content-main content-main"> |
80 | {{# consults}} | 97 | {{# consults}} |
81 | <div class="question"> | 98 | <div class="question"> |
@@ -94,10 +111,24 @@ | @@ -94,10 +111,24 @@ | ||
94 | {{/ consults}} | 111 | {{/ consults}} |
95 | </div> | 112 | </div> |
96 | <div class="consult-content-footer"> | 113 | <div class="consult-content-footer"> |
97 | - <a href="{{moreComments}}">查看更多 <span class="iconfont"></span></a> | 114 | + <a href="{{moreConsults}}"> |
115 | + 查看更多 | ||
116 | + <span class="iconfont"></span></a> | ||
98 | </div> | 117 | </div> |
118 | + {{else}} | ||
119 | + <div class="comment-content-main content-main no-item"> | ||
120 | + <span class="iconfont"></span>暂无咨询 | ||
121 | + </div> | ||
122 | + <div class="consult-content-footer"> | ||
123 | + <a href="{{gotoConsults}}"> | ||
124 | + 我要咨询 | ||
125 | + <span class="iconfont"></span></a> | ||
126 | + </div> | ||
127 | + {{/if}} | ||
128 | + | ||
99 | </div> | 129 | </div> |
100 | </div> | 130 | </div> |
131 | + {{/if}} | ||
101 | {{/ feedbacks}} | 132 | {{/ feedbacks}} |
102 | </div> | 133 | </div> |
103 | 134 |
@@ -48,11 +48,11 @@ class HomeController extends AbstractAction | @@ -48,11 +48,11 @@ class HomeController extends AbstractAction | ||
48 | 'myIndexPage' => true, | 48 | 'myIndexPage' => true, |
49 | 'pageFooter' => true | 49 | 'pageFooter' => true |
50 | ); | 50 | ); |
51 | - echo $this->getRequest()->getActionName(); | 51 | + // echo $this->getRequest()->getActionName(); |
52 | $uid = $this->getUid(); | 52 | $uid = $this->getUid(); |
53 | if ($uid) { | 53 | if ($uid) { |
54 | $data['isLogin'] = true; | 54 | $data['isLogin'] = true; |
55 | - $uid = 8826435; | 55 | + $uid = 8826435; |
56 | $data += \Index\UserModel::getUserProfileData($uid); | 56 | $data += \Index\UserModel::getUserProfileData($uid); |
57 | $data += \Index\UserModel::getInfoNumData($uid); | 57 | $data += \Index\UserModel::getInfoNumData($uid); |
58 | 58 |
@@ -13,6 +13,10 @@ class DetailController extends AbstractAction | @@ -13,6 +13,10 @@ class DetailController extends AbstractAction | ||
13 | */ | 13 | */ |
14 | public function indexAction() | 14 | public function indexAction() |
15 | { | 15 | { |
16 | + $commentsNum = 0; | ||
17 | + $consultsNum = 0; | ||
18 | + $nodate =0; | ||
19 | + | ||
16 | $data = array ( | 20 | $data = array ( |
17 | 'goodsDetailPage' => true, | 21 | 'goodsDetailPage' => true, |
18 | 'pageHeader' => array ( | 22 | 'pageHeader' => array ( |
@@ -66,12 +70,14 @@ SHOE BQT KEN BLOCK', | @@ -66,12 +70,14 @@ SHOE BQT KEN BLOCK', | ||
66 | ), | 70 | ), |
67 | 'goodsDiscount'=>'【summer final sale】满¥499立享6.8折', | 71 | 'goodsDiscount'=>'【summer final sale】满¥499立享6.8折', |
68 | 'feedbacks'=>array( | 72 | 'feedbacks'=>array( |
69 | - 'commentsNum'=>2, | ||
70 | - 'consultsNum'=>10, | 73 | + 'commentsNum'=>0, |
74 | + 'consultsNum'=>0, | ||
75 | + 'nodata' =>0, | ||
71 | 'commentName'=>'商品评价', | 76 | 'commentName'=>'商品评价', |
72 | 'consultName' =>'购买咨询', | 77 | 'consultName' =>'购买咨询', |
73 | 'moreComments'=>'http://www.baidu.com', | 78 | 'moreComments'=>'http://www.baidu.com', |
74 | 'moreConsults'=>'http://www.baidu.com', | 79 | 'moreConsults'=>'http://www.baidu.com', |
80 | + 'gotoConsults'=>'http://www.baidu.com', | ||
75 | 'comments'=>array( | 81 | 'comments'=>array( |
76 | array( | 82 | array( |
77 | 'userName'=>'Lynnic', | 83 | 'userName'=>'Lynnic', |
@@ -241,7 +247,7 @@ SHOE BQT KEN BLOCK', | @@ -241,7 +247,7 @@ SHOE BQT KEN BLOCK', | ||
241 | 247 | ||
242 | public function commentsAction(){ | 248 | public function commentsAction(){ |
243 | $data = array( | 249 | $data = array( |
244 | - 'goodsCommentsPage' =>true, | 250 | + 'goodsCommentsPage' =>true, |
245 | 'pageHeader' => array ( | 251 | 'pageHeader' => array ( |
246 | 'navBack' => 'sss ', | 252 | 'navBack' => 'sss ', |
247 | // 'navHome' => 'sss ', | 253 | // 'navHome' => 'sss ', |
-
Please register or login to post a comment