Merge remote-tracking branch 'origin/hotfix/coupon'
Showing
37 changed files
with
282 additions
and
281 deletions
@@ -12,120 +12,100 @@ class ChannelConfig | @@ -12,120 +12,100 @@ class ChannelConfig | ||
12 | //首页 | 12 | //首页 |
13 | 'boys' => array( | 13 | 'boys' => array( |
14 | array( | 14 | array( |
15 | - 'sort' => 147, | 15 | + 'misort' => 44, |
16 | 'viewNum' => 5 | 16 | 'viewNum' => 5 |
17 | ), //休闲/运动鞋 | 17 | ), //休闲/运动鞋 |
18 | array( | 18 | array( |
19 | - 'sort' => 129, | 19 | + 'misort' => 11, |
20 | 'viewNum' => 5 | 20 | 'viewNum' => 5 |
21 | - ), //休闲裤 | 21 | + ), //T恤 |
22 | array( | 22 | array( |
23 | - 'sort' => 152, | 23 | + 'misort' => 28, |
24 | 'viewNum' => 5 | 24 | 'viewNum' => 5 |
25 | - ), //双肩包 | 25 | + ), //短裤 |
26 | array( | 26 | array( |
27 | - 'misort' => 11, | 27 | + 'misort' => 61, |
28 | 'viewNum' => 5 | 28 | 'viewNum' => 5 |
29 | - ), //T恤 | 29 | + ), //太阳镜/眼镜 |
30 | array( | 30 | array( |
31 | - 'sort' => 115, | 31 | + 'misort' => 26, |
32 | 'viewNum' => 5 | 32 | 'viewNum' => 5 |
33 | - ), //衬衫 | 33 | + ), //休闲裤 |
34 | array( | 34 | array( |
35 | - 'sort' => 130, | 35 | + 'misort' => 27, |
36 | 'viewNum' => 5 | 36 | 'viewNum' => 5 |
37 | ), //牛仔裤 | 37 | ), //牛仔裤 |
38 | array( | 38 | array( |
39 | - 'misort' => 60, | ||
40 | - 'viewNum' => 5 | ||
41 | - ), //帽子 | ||
42 | - array( | ||
43 | - 'sort' => 124, | 39 | + 'misort' => 49, |
44 | 'viewNum' => 5 | 40 | 'viewNum' => 5 |
45 | - ), //夹克 | 41 | + ), //双肩包 |
46 | array( | 42 | array( |
47 | - 'sort' => 119, | 43 | + 'misort' => 12, |
48 | 'viewNum' => 5 | 44 | 'viewNum' => 5 |
49 | - ), //卫衣 | 45 | + ), //衬衫 |
50 | array( | 46 | array( |
51 | - 'sort' => 162, | 47 | + 'misort' => 13, |
52 | 'viewNum' => 5 | 48 | 'viewNum' => 5 |
53 | - ), //手表 | 49 | + ), //polo |
54 | array( | 50 | array( |
55 | - 'sort' => 148, | 51 | + 'misort' => 60, |
56 | 'viewNum' => 5 | 52 | 'viewNum' => 5 |
57 | - ), //靴子 | 53 | + ), //帽子 |
58 | array( | 54 | array( |
59 | - 'misort' => 65, | 55 | + 'misort' => 46, |
60 | 'viewNum' => 5 | 56 | 'viewNum' => 5 |
61 | - ), //首饰 | 57 | + ), //凉鞋/拖鞋 |
62 | array( | 58 | array( |
63 | - 'sort' => 151, | 59 | + 'misort' => 66, |
64 | 'viewNum' => 5 | 60 | 'viewNum' => 5 |
65 | - ), //时装鞋 | 61 | + ), //配饰 |
66 | array( | 62 | array( |
67 | - 'misort' => 61, | 63 | + 'misort' => 65, |
68 | 'viewNum' => 5 | 64 | 'viewNum' => 5 |
69 | - ), //太阳镜/眼镜 | 65 | + ), //首饰 |
70 | array( | 66 | array( |
71 | - 'misort' => 39, | 67 | + 'misort' => 59, |
72 | 'viewNum' => 5 | 68 | 'viewNum' => 5 |
73 | - ), //袜子 | 69 | + ), //手表 |
74 | array( | 70 | array( |
75 | - 'sort' => 346, | 71 | + 'misort' => 48, |
76 | 'viewNum' => 5 | 72 | 'viewNum' => 5 |
77 | - ), //运动裤 | 73 | + ), //时装鞋 |
78 | array( | 74 | array( |
79 | - 'sort' => 131, | 75 | + 'misort' => 14, |
80 | 'viewNum' => 5 | 76 | 'viewNum' => 5 |
81 | - ), //短裤 | 77 | + ), //背心 |
82 | array( | 78 | array( |
83 | - 'misort' => 66, | 79 | + 'misort' => 19, |
84 | 'viewNum' => 5 | 80 | 'viewNum' => 5 |
85 | - ), //配饰 | 81 | + ), //西装 |
86 | array( | 82 | array( |
87 | 'misort' => 309, | 83 | 'misort' => 309, |
88 | 'viewNum' => 5 | 84 | 'viewNum' => 5 |
89 | ), //内裤 | 85 | ), //内裤 |
90 | array( | 86 | array( |
91 | - 'misort' => 30, | 87 | + 'misort' => 259, |
92 | 'viewNum' => 5 | 88 | 'viewNum' => 5 |
93 | - ), //打底裤/紧身裤 | 89 | + ), //美妆 |
94 | array( | 90 | array( |
95 | - 'sort' => 342, | 91 | + 'misort' => 237, |
96 | 'viewNum' => 5 | 92 | 'viewNum' => 5 |
97 | - ), //邮差包 | 93 | + ), //钱包/手包/卡包/钥匙包 |
98 | ), | 94 | ), |
99 | //女首上架分类 | 95 | //女首上架分类 |
100 | 'girls' => array( | 96 | 'girls' => array( |
101 | array( | 97 | array( |
102 | - 'misort' => 16, | ||
103 | - 'viewNum' => 4 | ||
104 | - ), // 卫衣 | ||
105 | - array( | ||
106 | - 'misort' => 12, | ||
107 | - 'viewNum' => 4 | ||
108 | - ), //衬衫 | ||
109 | - array( | ||
110 | - 'misort' => 44, | ||
111 | - 'viewNum' => 4 | ||
112 | - ), //休闲/运动鞋 | ||
113 | - array( | ||
114 | 'misort' => 11, | 98 | 'misort' => 11, |
115 | 'viewNum' => 4 | 99 | 'viewNum' => 4 |
116 | ), //T恤 | 100 | ), //T恤 |
117 | array( | 101 | array( |
118 | - 'misort' => 21, | ||
119 | - 'viewNum' => 4 | ||
120 | - ), //夹克 | ||
121 | - array( | ||
122 | - 'misort' => 257, | 102 | + 'misort' => 44, |
123 | 'viewNum' => 4 | 103 | 'viewNum' => 4 |
124 | - ), //毛衣/针织 | 104 | + ), //休闲/运动鞋 |
125 | array( | 105 | array( |
126 | - 'misort' => 22, | 106 | + 'misort' => 31, |
127 | 'viewNum' => 4 | 107 | 'viewNum' => 4 |
128 | - ), //大衣/风衣 | 108 | + ), //连衣裙 |
129 | array( | 109 | array( |
130 | 'misort' => 26, | 110 | 'misort' => 26, |
131 | 'viewNum' => 4 | 111 | 'viewNum' => 4 |
@@ -135,45 +115,65 @@ class ChannelConfig | @@ -135,45 +115,65 @@ class ChannelConfig | ||
135 | 'viewNum' => 4 | 115 | 'viewNum' => 4 |
136 | ), //牛仔裤 | 116 | ), //牛仔裤 |
137 | array( | 117 | array( |
138 | - 'misort' => 31, | 118 | + 'misort' => 12, |
139 | 'viewNum' => 4 | 119 | 'viewNum' => 4 |
140 | - ), //连衣裙 | 120 | + ), //衬衫 |
141 | array( | 121 | array( |
142 | 'misort' => 32, | 122 | 'misort' => 32, |
143 | 'viewNum' => 4 | 123 | 'viewNum' => 4 |
144 | ), //半身裙 | 124 | ), //半身裙 |
145 | array( | 125 | array( |
126 | + 'misort' => 28, | ||
127 | + 'viewNum' => 4 | ||
128 | + ), //短裤 | ||
129 | + array( | ||
130 | + 'misort' => 14, | ||
131 | + 'viewNum' => 4 | ||
132 | + ), //背心 | ||
133 | + array( | ||
134 | + 'misort' => 46, | ||
135 | + 'viewNum' => 4 | ||
136 | + ), //凉鞋/拖鞋 | ||
137 | + array( | ||
146 | 'misort' => 48, | 138 | 'misort' => 48, |
147 | 'viewNum' => 4 | 139 | 'viewNum' => 4 |
148 | ), //时装鞋 | 140 | ), //时装鞋 |
149 | array( | 141 | array( |
142 | + 'misort' => 50, | ||
143 | + 'viewNum' => 4 | ||
144 | + ), //单肩/手拎包 | ||
145 | + array( | ||
150 | 'misort' => 49, | 146 | 'misort' => 49, |
151 | 'viewNum' => 4 | 147 | 'viewNum' => 4 |
152 | ), //双肩包 | 148 | ), //双肩包 |
153 | array( | 149 | array( |
154 | - 'misort' => 50, | 150 | + 'misort' => 61, |
155 | 'viewNum' => 4 | 151 | 'viewNum' => 4 |
156 | - ), //手拎包/单肩包 | 152 | + ), //太阳镜/眼镜 |
157 | array( | 153 | array( |
158 | 'misort' => 60, | 154 | 'misort' => 60, |
159 | 'viewNum' => 4 | 155 | 'viewNum' => 4 |
160 | ), //帽子 | 156 | ), //帽子 |
161 | array( | 157 | array( |
158 | + 'misort' => 59, | ||
159 | + 'viewNum' => 4 | ||
160 | + ), //手表 | ||
161 | + array( | ||
162 | 'misort' => 65, | 162 | 'misort' => 65, |
163 | 'viewNum' => 4 | 163 | 'viewNum' => 4 |
164 | ), //首饰 | 164 | ), //首饰 |
165 | array( | 165 | array( |
166 | - 'misort' => 59, | 166 | + 'misort' => 363, |
167 | 'viewNum' => 4 | 167 | 'viewNum' => 4 |
168 | - ), //手表 | 168 | + ), //文胸 |
169 | array( | 169 | array( |
170 | - 'misort' => 61, | 170 | + 'misort' => 309, |
171 | 'viewNum' => 4 | 171 | 'viewNum' => 4 |
172 | - ), //太阳镜 | 172 | + ), //内裤 |
173 | array( | 173 | array( |
174 | - 'misort' => 66, | 174 | + 'misort' => 259, |
175 | 'viewNum' => 4 | 175 | 'viewNum' => 4 |
176 | - ), //配饰 | 176 | + ) //美妆 |
177 | ), | 177 | ), |
178 | //潮童上架分类 | 178 | //潮童上架分类 |
179 | 'kids' => array( | 179 | 'kids' => array( |
@@ -186,17 +186,17 @@ class ChannelConfig | @@ -186,17 +186,17 @@ class ChannelConfig | ||
186 | 'viewNum' => 4 | 186 | 'viewNum' => 4 |
187 | ), //衬衫 | 187 | ), //衬衫 |
188 | array( | 188 | array( |
189 | - 'misort' => 396, | 189 | + 'misort' => 451, |
190 | 'viewNum' => 4 | 190 | 'viewNum' => 4 |
191 | - ), //卫衣 | 191 | + ), //POLO |
192 | array( | 192 | array( |
193 | - 'misort' => 400, | 193 | + 'misort' => 371, |
194 | 'viewNum' => 4 | 194 | 'viewNum' => 4 |
195 | - ), //毛衣/针织 | 195 | + ), //连衣裙 |
196 | array( | 196 | array( |
197 | - 'misort' => 404, | 197 | + 'misort' => 370, |
198 | 'viewNum' => 4 | 198 | 'viewNum' => 4 |
199 | - ), //夹克 | 199 | + ), //半身裙 |
200 | array( | 200 | array( |
201 | 'misort' => 369, | 201 | 'misort' => 369, |
202 | 'viewNum' => 4 | 202 | 'viewNum' => 4 |
@@ -206,80 +206,72 @@ class ChannelConfig | @@ -206,80 +206,72 @@ class ChannelConfig | ||
206 | 'viewNum' => 4 | 206 | 'viewNum' => 4 |
207 | ), //牛仔裤 | 207 | ), //牛仔裤 |
208 | array( | 208 | array( |
209 | - 'misort' => 371, | ||
210 | - 'viewNum' => 4 | ||
211 | - ), //连衣裙 | ||
212 | - array( | ||
213 | - 'misort' => 370, | 209 | + 'misort' => 372, |
214 | 'viewNum' => 4 | 210 | 'viewNum' => 4 |
215 | - ), //半身裙 | 211 | + ), //短裤 |
216 | array( | 212 | array( |
217 | 'misort' => 368, | 213 | 'misort' => 368, |
218 | 'viewNum' => 4 | 214 | 'viewNum' => 4 |
219 | ), //休闲/运动鞋 | 215 | ), //休闲/运动鞋 |
220 | array( | 216 | array( |
221 | - 'misort' => 392, | 217 | + 'misort' => 382, |
222 | 'viewNum' => 4 | 218 | 'viewNum' => 4 |
223 | - ), //双肩包 | 219 | + ), //凉鞋/拖鞋 |
224 | array( | 220 | array( |
225 | - 'misort' => 414, | 221 | + 'misort' => 392, |
226 | 'viewNum' => 4 | 222 | 'viewNum' => 4 |
227 | - ), //帽子 | 223 | + ), //双肩包 |
228 | array( | 224 | array( |
229 | - 'misort' => 372, | 225 | + 'misort' => 429, |
230 | 'viewNum' => 4 | 226 | 'viewNum' => 4 |
231 | - ), //短裤 | 227 | + ), //太阳镜/眼镜 |
232 | array( | 228 | array( |
233 | - 'misort' => 384, | 229 | + 'misort' => 464, |
234 | 'viewNum' => 4 | 230 | 'viewNum' => 4 |
235 | - ), //打底裤/紧身裤 | 231 | + ), //雨伞/雨衣 |
236 | array( | 232 | array( |
237 | - 'misort' => 382, | 233 | + 'misort' => 386, |
238 | 'viewNum' => 4 | 234 | 'viewNum' => 4 |
239 | - ), //凉鞋/拖鞋 | 235 | + ), //背心 |
240 | array( | 236 | array( |
241 | - 'misort' => 402, | 237 | + 'misort' => 384, |
242 | 'viewNum' => 4 | 238 | 'viewNum' => 4 |
243 | - ), //马甲 | 239 | + ), //打底裤/紧身裤 |
244 | array( | 240 | array( |
245 | - 'misort' => 386, | 241 | + 'misort' => 448, |
246 | 'viewNum' => 4 | 242 | 'viewNum' => 4 |
247 | - ), //背心 | 243 | + ), //玩具娱乐 |
248 | array( | 244 | array( |
249 | - 'misort' => 406, | 245 | + 'misort' => 414, |
250 | 'viewNum' => 4 | 246 | 'viewNum' => 4 |
251 | - ), //大衣/风衣 | 247 | + ), //帽子 |
252 | array( | 248 | array( |
253 | - 'misort' => 430, | 249 | + 'misort' => 380, |
254 | 'viewNum' => 4 | 250 | 'viewNum' => 4 |
255 | - ), //羽绒服 | 251 | + ), //泳衣 |
256 | array( | 252 | array( |
257 | - 'misort' => 423, | 253 | + 'misort' => 419, |
258 | 'viewNum' => 4 | 254 | 'viewNum' => 4 |
259 | - ), //棉衣 | 255 | + ), //配饰 |
260 | array( | 256 | array( |
261 | 'misort' => 417, | 257 | 'misort' => 417, |
262 | 'viewNum' => 4 | 258 | 'viewNum' => 4 |
263 | - ), //套装 | 259 | + )//套装 |
264 | ), | 260 | ), |
265 | //创意生活上架分类 | 261 | //创意生活上架分类 |
266 | 'lifestyle' => array( | 262 | 'lifestyle' => array( |
267 | array( | 263 | array( |
268 | - 'sort' => 171, | ||
269 | - 'viewNum' => 5 | ||
270 | - ), //耳机 | ||
271 | - array( | ||
272 | - 'sort' => 398, | 264 | + 'misort' => 259, |
273 | 'viewNum' => 5 | 265 | 'viewNum' => 5 |
274 | - ), //智能装备 | 266 | + ), //美妆 |
275 | array( | 267 | array( |
276 | - 'sort' => 185, | 268 | + 'misort' => 266, |
277 | 'viewNum' => 5 | 269 | 'viewNum' => 5 |
278 | - ), //相机 | 270 | + ), //雨伞 |
279 | array( | 271 | array( |
280 | - 'misort' => 259, | 272 | + 'sort' => 171, |
281 | 'viewNum' => 5 | 273 | 'viewNum' => 5 |
282 | - ), //美妆 | 274 | + ), //耳机 |
283 | array( | 275 | array( |
284 | 'sort' => 267, | 276 | 'sort' => 267, |
285 | 'viewNum' => 5 | 277 | 'viewNum' => 5 |
@@ -289,25 +281,21 @@ class ChannelConfig | @@ -289,25 +281,21 @@ class ChannelConfig | ||
289 | 'viewNum' => 5 | 281 | 'viewNum' => 5 |
290 | ), //手机/ipad壳套 | 282 | ), //手机/ipad壳套 |
291 | array( | 283 | array( |
292 | - 'sort' => 211, | 284 | + 'misort' => 103, |
293 | 'viewNum' => 5 | 285 | 'viewNum' => 5 |
294 | ), //数码配件 | 286 | ), //数码配件 |
295 | array( | 287 | array( |
296 | - 'sort' => 292, | 288 | + 'misort' => 280, |
297 | 'viewNum' => 5 | 289 | 'viewNum' => 5 |
298 | - ), //玩偶 | 290 | + ), //玩具娱乐 |
299 | array( | 291 | array( |
300 | - 'sort' => 272, | ||
301 | - 'viewNum' => 5 | ||
302 | - ), //储物收纳 | ||
303 | - array( | ||
304 | - 'sort' => 183, | 292 | + 'sort' => 185, |
305 | 'viewNum' => 5 | 293 | 'viewNum' => 5 |
306 | - ), //居家用品 | 294 | + ), //相机 |
307 | array( | 295 | array( |
308 | - 'sort' => 273, | 296 | + 'misort' => 101, |
309 | 'viewNum' => 5 | 297 | 'viewNum' => 5 |
310 | - ), //厨具/餐具 | 298 | + ), //文具 |
311 | array( | 299 | array( |
312 | 'sort' => 271, | 300 | 'sort' => 271, |
313 | 'viewNum' => 5 | 301 | 'viewNum' => 5 |
@@ -25,6 +25,7 @@ class PayData | @@ -25,6 +25,7 @@ class PayData | ||
25 | { | 25 | { |
26 | $param = Yohobuy::param(); | 26 | $param = Yohobuy::param(); |
27 | $param['client_type'] = 'web'; | 27 | $param['client_type'] = 'web'; |
28 | + $param['uid'] = intval($uid); | ||
28 | $param['private_key'] = Yohobuy::$privateKeyList['web']; | 29 | $param['private_key'] = Yohobuy::$privateKeyList['web']; |
29 | $param['method'] = 'web.SpaceOrders.getOrderCountByUid'; | 30 | $param['method'] = 'web.SpaceOrders.getOrderCountByUid'; |
30 | 31 | ||
@@ -233,6 +234,8 @@ class PayData | @@ -233,6 +234,8 @@ class PayData | ||
233 | public static function pcpayNotify($orderCode, $payment, $amount, $bankName = '', $bankCode = '', $tradeNo = '', $bankBillNo = '') | 234 | public static function pcpayNotify($orderCode, $payment, $amount, $bankName = '', $bankCode = '', $tradeNo = '', $bankBillNo = '') |
234 | { | 235 | { |
235 | $param = Yohobuy::param(); | 236 | $param = Yohobuy::param(); |
237 | + $param['client_type'] = 'web'; | ||
238 | + $param['private_key'] = Yohobuy::$privateKeyList['web']; | ||
236 | $param['method'] = 'web.SpaceOrders.pcpayNotify'; | 239 | $param['method'] = 'web.SpaceOrders.pcpayNotify'; |
237 | $param['order_code'] = $orderCode; | 240 | $param['order_code'] = $orderCode; |
238 | $param['payment'] = $payment; | 241 | $param['payment'] = $payment; |
@@ -257,6 +260,8 @@ class PayData | @@ -257,6 +260,8 @@ class PayData | ||
257 | { | 260 | { |
258 | // 构建必传参数 | 261 | // 构建必传参数 |
259 | $param = Yohobuy::param(); | 262 | $param = Yohobuy::param(); |
263 | + $param['client_type'] = 'web'; | ||
264 | + $param['private_key'] = Yohobuy::$privateKeyList['web']; | ||
260 | $param['method'] = 'app.SpaceOrders.payConfirm'; | 265 | $param['method'] = 'app.SpaceOrders.payConfirm'; |
261 | $param['order_code'] = $orderCode; | 266 | $param['order_code'] = $orderCode; |
262 | $param['payment_id'] = $paymentId; | 267 | $param['payment_id'] = $paymentId; |
@@ -42,8 +42,6 @@ class Service extends PayAbstract | @@ -42,8 +42,6 @@ class Service extends PayAbstract | ||
42 | public function getPayRequestPars(Reqparams $params) | 42 | public function getPayRequestPars(Reqparams $params) |
43 | { | 43 | { |
44 | // $baseUrl = $this->getBaseNoticeUrl($params->isTest); | 44 | // $baseUrl = $this->getBaseNoticeUrl($params->isTest); |
45 | -// $loseTime = intval(($params->orderTime + 7200 - time()) / 60); | ||
46 | - // $loseTime = intval((strtotime(date("Y-m-d 10:00:00", strtotime("+1 day")))-time())/60); | ||
47 | UdpLog::info("【{$this->logProjectPrefix}-支付宝银行支付】,function:getPayRequestPars,参数", $params); | 45 | UdpLog::info("【{$this->logProjectPrefix}-支付宝银行支付】,function:getPayRequestPars,参数", $params); |
48 | $parameter = array( | 46 | $parameter = array( |
49 | 'service' => $this->config->service, | 47 | 'service' => $this->config->service, |
@@ -58,7 +56,7 @@ class Service extends PayAbstract | @@ -58,7 +56,7 @@ class Service extends PayAbstract | ||
58 | 'payment_type' => $this->config->payment_type, | 56 | 'payment_type' => $this->config->payment_type, |
59 | 'defaultbank' => $params->paymentParameter, | 57 | 'defaultbank' => $params->paymentParameter, |
60 | 'seller_email' => $this->config->sellerMail, | 58 | 'seller_email' => $this->config->sellerMail, |
61 | -// 'it_b_pay' => $loseTime . 'm' | 59 | + 'it_b_pay' => $params->payExpireMinute . 'm', |
62 | ); | 60 | ); |
63 | if ($this->config->anti_fishing['timestamp_enable']) { | 61 | if ($this->config->anti_fishing['timestamp_enable']) { |
64 | $anti_phishing_key = $this->getTimestamp(); | 62 | $anti_phishing_key = $this->getTimestamp(); |
@@ -47,8 +47,6 @@ class Service extends PayAbstract | @@ -47,8 +47,6 @@ class Service extends PayAbstract | ||
47 | { | 47 | { |
48 | UdpLog::info("【{$this->logProjectPrefix}-支付宝支付】,function:getPayRequestPars,参数", $params); | 48 | UdpLog::info("【{$this->logProjectPrefix}-支付宝支付】,function:getPayRequestPars,参数", $params); |
49 | // $baseUrl = $this->getBaseNoticeUrl($params->isTest); | 49 | // $baseUrl = $this->getBaseNoticeUrl($params->isTest); |
50 | -// $loseTime = intval(($params->orderTime + 7200 -time())/60); | ||
51 | -// $loseTime = intval((strtotime(date("Y-m-d 10:00:00", strtotime("+1 day")))-time())/60); //第二天十点 | ||
52 | $parameter = array( | 50 | $parameter = array( |
53 | 'service' => $this->config->service, | 51 | 'service' => $this->config->service, |
54 | 'partner' => $this->config->partner, | 52 | 'partner' => $this->config->partner, |
@@ -58,13 +56,14 @@ class Service extends PayAbstract | @@ -58,13 +56,14 @@ class Service extends PayAbstract | ||
58 | /* 业务参数 */ | 56 | /* 业务参数 */ |
59 | 'subject' => $params->goodsName, | 57 | 'subject' => $params->goodsName, |
60 | 'out_trade_no' => $params->orderCode, | 58 | 'out_trade_no' => $params->orderCode, |
61 | -// 'it_b_pay' => $loseTime . 'm', | 59 | + 'it_b_pay' => $params->payExpireMinute . 'm', |
62 | 'total_fee' => $params->totalFee / 100, //单位为元 | 60 | 'total_fee' => $params->totalFee / 100, //单位为元 |
63 | 'payment_type' => $this->config->payment_type, | 61 | 'payment_type' => $this->config->payment_type, |
64 | 'seller_email' => $this->config->sellerMail, | 62 | 'seller_email' => $this->config->sellerMail, |
65 | 'sign_id_ext' => $params->uid, | 63 | 'sign_id_ext' => $params->uid, |
66 | 'sign_name_ext' => $params->userName | 64 | 'sign_name_ext' => $params->userName |
67 | ); | 65 | ); |
66 | + | ||
68 | if ($this->config->anti_fishing['timestamp_enable']) { | 67 | if ($this->config->anti_fishing['timestamp_enable']) { |
69 | $anti_phishing_key = $this->getTimestamp(); | 68 | $anti_phishing_key = $this->getTimestamp(); |
70 | if (!empty($anti_phishing_key)) { | 69 | if (!empty($anti_phishing_key)) { |
@@ -11,17 +11,25 @@ namespace WebPlugin\Pay; | @@ -11,17 +11,25 @@ namespace WebPlugin\Pay; | ||
11 | class Reqparams | 11 | class Reqparams |
12 | { | 12 | { |
13 | 13 | ||
14 | - public function __construct($_orderCode, $_totalFee, $_goodName, $client_ip, $_orderTime, $_paymentParameter="", $_isTest=false, $uid=0, $userName='') | 14 | + public function __construct($_orderCode, $_totalFee, $_goodName, $client_ip, $_orderTime, $_paymentParameter="", $_isTest=false, $uid=0, $userName='', $_payExpire = '') |
15 | { | 15 | { |
16 | - $this->orderCode = $_orderCode; | ||
17 | - $this->totalFee = $_totalFee; | ||
18 | - $this->goodsName = $_goodName; | ||
19 | - $this->spbill_create_ip = $client_ip; | ||
20 | - $this->orderTime = $_orderTime; | ||
21 | - $this->paymentParameter = $_paymentParameter; | ||
22 | - $this->isTest = $_isTest; | ||
23 | - $this->uid = $uid; | ||
24 | - $this->userName = $userName; | 16 | + //到期时间,默认为当前时间加2个小时的时间戳 |
17 | + $_payExpire = empty($_payExpire) ? strtotime('+2 hours') : strtotime($_payExpire); | ||
18 | + $payExpireMinute = 0;//剩余分钟数 | ||
19 | + if ($_payExpire && ($expireTime = $_payExpire - time()) > 0) { | ||
20 | + $payExpireMinute = floor($expireTime / 60); | ||
21 | + } | ||
22 | + | ||
23 | + $this->orderCode = $_orderCode; | ||
24 | + $this->totalFee = $_totalFee; | ||
25 | + $this->goodsName = $_goodName; | ||
26 | + $this->spbill_create_ip = $client_ip; | ||
27 | + $this->orderTime = $_orderTime; | ||
28 | + $this->payExpireMinute = $payExpireMinute; | ||
29 | + $this->paymentParameter = $_paymentParameter; | ||
30 | + $this->isTest = $_isTest; | ||
31 | + $this->uid = $uid; | ||
32 | + $this->userName = $userName; | ||
25 | } | 33 | } |
26 | 34 | ||
27 | /** | 35 | /** |
@@ -337,7 +337,7 @@ | @@ -337,7 +337,7 @@ | ||
337 | <ul> | 337 | <ul> |
338 | <li> | 338 | <li> |
339 | <input checked name="juangroup" type="radio" value=""> | 339 | <input checked name="juangroup" type="radio" value=""> |
340 | - <label>直接输入优惠码: </label> | 340 | + <label>直接输入优惠券码: </label> |
341 | <input type="text" class="textbox" id="juancode" /> | 341 | <input type="text" class="textbox" id="juancode" /> |
342 | </li> | 342 | </li> |
343 | </ul> | 343 | </ul> |
@@ -269,7 +269,7 @@ | @@ -269,7 +269,7 @@ | ||
269 | <ul> | 269 | <ul> |
270 | <li> | 270 | <li> |
271 | <input name="juangroup" type="radio" value=""> | 271 | <input name="juangroup" type="radio" value=""> |
272 | - <label>直接输入优惠码: </label> | 272 | + <label>直接输入优惠券码: </label> |
273 | <input type="text" class="textbox" id="juancode" /> | 273 | <input type="text" class="textbox" id="juancode" /> |
274 | </li> | 274 | </li> |
275 | {{#each juanlist}} | 275 | {{#each juanlist}} |
@@ -269,7 +269,7 @@ | @@ -269,7 +269,7 @@ | ||
269 | <ul> | 269 | <ul> |
270 | <li> | 270 | <li> |
271 | <input name="juangroup" type="radio" value=""> | 271 | <input name="juangroup" type="radio" value=""> |
272 | - <label>直接输入优惠码: </label> | 272 | + <label>直接输入优惠券码: </label> |
273 | <input type="text" class="textbox" id="juancode" /> | 273 | <input type="text" class="textbox" id="juancode" /> |
274 | </li> | 274 | </li> |
275 | {{#each juanlist}} | 275 | {{#each juanlist}} |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
web-static/dist/yohobuy/0.0.27/index.css
0 → 100644
This diff could not be displayed because it is too large.
web-static/dist/yohobuy/0.0.27/index.js
0 → 100644
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
web-static/dist/yohobuy/0.0.28/index.css
0 → 100644
This diff could not be displayed because it is too large.
web-static/dist/yohobuy/0.0.28/index.js
0 → 100644
This diff could not be displayed because it is too large.
web-static/dist/yohobuy/0.0.28/lib.js
0 → 100644
This diff could not be displayed because it is too large.
@@ -772,7 +772,6 @@ $('.to-play input.submit').click(function() { | @@ -772,7 +772,6 @@ $('.to-play input.submit').click(function() { | ||
772 | redEnvelopes = $('.use-envelopes input:checked').attr('data-use'), | 772 | redEnvelopes = $('.use-envelopes input:checked').attr('data-use'), |
773 | $juangroupInput = $('.play-juan.is-select input[name="juangroup"]:checked'), | 773 | $juangroupInput = $('.play-juan.is-select input[name="juangroup"]:checked'), |
774 | codeVal = $juangroupInput.val(), | 774 | codeVal = $juangroupInput.val(), |
775 | - promotionVal = $juangroupInput.closest('li').find('#juancode').val(); | ||
776 | juanCode = !!codeVal ? codeVal : $juangroupInput.closest('li').find('#juancode').val(); | 775 | juanCode = !!codeVal ? codeVal : $juangroupInput.closest('li').find('#juancode').val(); |
777 | 776 | ||
778 | $loading.show(); | 777 | $loading.show(); |
@@ -798,7 +797,6 @@ $('.to-play input.submit').click(function() { | @@ -798,7 +797,6 @@ $('.to-play input.submit').click(function() { | ||
798 | paymentType: paymentType, | 797 | paymentType: paymentType, |
799 | remark: remark, | 798 | remark: remark, |
800 | couponCode: juanCode, | 799 | couponCode: juanCode, |
801 | - promotionCode: promotionVal, | ||
802 | yohoCoin: yohoCoin, | 800 | yohoCoin: yohoCoin, |
803 | isPreContact: ytoTrue(isPreContact), | 801 | isPreContact: ytoTrue(isPreContact), |
804 | isPrintPrice: ytoTrue(isPrintPrice), | 802 | isPrintPrice: ytoTrue(isPrintPrice), |
@@ -370,19 +370,16 @@ var Order = { | @@ -370,19 +370,16 @@ var Order = { | ||
370 | var expressVal = $('.express-list input[name="carriagegroup"]:checked').val(); | 370 | var expressVal = $('.express-list input[name="carriagegroup"]:checked').val(); |
371 | var biVal = $('#biprice.is-select').val(); | 371 | var biVal = $('#biprice.is-select').val(); |
372 | var codeVal = $juangroupInput.val(); | 372 | var codeVal = $juangroupInput.val(); |
373 | - var promotionVal = $juangroupInput.closest('li').find('#juancode').val(); | ||
374 | var cartType = $('.address-manage').attr('cart-type'); | 373 | var cartType = $('.address-manage').attr('cart-type'); |
375 | var redEnvelopes = $('.use-envelopes input:checked').attr('data-use'); | 374 | var redEnvelopes = $('.use-envelopes input:checked').attr('data-use'); |
376 | var resultData; | 375 | var resultData; |
377 | 376 | ||
378 | codeVal = codeVal ? codeVal : $juangroupInput.closest('li').find('#juancode').val(); | 377 | codeVal = codeVal ? codeVal : $juangroupInput.closest('li').find('#juancode').val(); |
379 | - | ||
380 | 378 | ||
381 | resultData = { | 379 | resultData = { |
382 | cartType: cartType, | 380 | cartType: cartType, |
383 | deliveryWay: expressVal, | 381 | deliveryWay: expressVal, |
384 | couponCode: codeVal, | 382 | couponCode: codeVal, |
385 | - promotionCode: promotionVal, | ||
386 | yohoCoin: biVal | 383 | yohoCoin: biVal |
387 | 384 | ||
388 | //redEnvelopes: e.$useEnvelopesInput.length > 0 ? ~~e.$hasEnvelopes.text().substring(1) : '0' | 385 | //redEnvelopes: e.$useEnvelopesInput.length > 0 ? ~~e.$hasEnvelopes.text().substring(1) : '0' |
@@ -199,13 +199,19 @@ class ItemModel | @@ -199,13 +199,19 @@ class ItemModel | ||
199 | 199 | ||
200 | if (!empty($banner['brandId'])) { | 200 | if (!empty($banner['brandId'])) { |
201 | $domainBrand = BrandsModel::getBrandByDomain($banner['brandDomain']); | 201 | $domainBrand = BrandsModel::getBrandByDomain($banner['brandDomain']); |
202 | - if (empty($domainBrand['type']) || $domainBrand['type'] !== 2) { | ||
203 | - //多品店不显示 | ||
204 | - $banner = array(); | ||
205 | - } else { | ||
206 | - $basisData = ShopModel::basisTemplate($domainBrand['shopId']); | ||
207 | - $banner['bgImg'] = empty($basisData['shopTopBanner']['banner']) ? | ||
208 | - $banner['bgImg'] : $basisData['shopTopBanner']['banner']; | 202 | + if (!empty($domainBrand['type']) && !empty($domainBrand['shopId'])) { |
203 | + switch (intval($domainBrand['type'])) { | ||
204 | + case 1: | ||
205 | + //多品店不显示 | ||
206 | + $banner = array(); | ||
207 | + break; | ||
208 | + case 2: | ||
209 | + //单品店显示新版的店铺banner | ||
210 | + $basisData = ShopModel::basisTemplate($domainBrand['shopId']); | ||
211 | + $banner['bgImg'] = empty($basisData['shopTopBanner']['banner']) ? | ||
212 | + $banner['bgImg'] : $basisData['shopTopBanner']['banner']; | ||
213 | + break; | ||
214 | + } | ||
209 | } | 215 | } |
210 | } | 216 | } |
211 | 217 |
@@ -426,7 +426,10 @@ class ShopModel | @@ -426,7 +426,10 @@ class ShopModel | ||
426 | } | 426 | } |
427 | } | 427 | } |
428 | 428 | ||
429 | - return $result; | 429 | + return array( |
430 | + 'title' => empty($result[0]['title']) ? '' : $result[0]['title'], | ||
431 | + 'list'=> $result | ||
432 | + ); | ||
430 | } | 433 | } |
431 | 434 | ||
432 | /** | 435 | /** |
@@ -571,13 +574,8 @@ class ShopModel | @@ -571,13 +574,8 @@ class ShopModel | ||
571 | $list = self::$fun(self::getResourceData($list), $parameters); | 574 | $list = self::$fun(self::getResourceData($list), $parameters); |
572 | switch ($fun) { | 575 | switch ($fun) { |
573 | case 'shopTopBanner': | 576 | case 'shopTopBanner': |
574 | - $data[$fun] = $list; | ||
575 | - break; | ||
576 | case 'signboard': | 577 | case 'signboard': |
577 | - $data[$fun] = array( | ||
578 | - 'title' => isset($list[0]['title']) ? $list[0]['title'] : '', | ||
579 | - 'list'=> $list | ||
580 | - ); | 578 | + $data[$fun] = $list; |
581 | break; | 579 | break; |
582 | } | 580 | } |
583 | } | 581 | } |
@@ -169,9 +169,10 @@ class PayModel | @@ -169,9 +169,10 @@ class PayModel | ||
169 | $orderCount = 0; | 169 | $orderCount = 0; |
170 | $orders = PayData::getOrderCountByUid($uid); | 170 | $orders = PayData::getOrderCountByUid($uid); |
171 | 171 | ||
172 | - if (isset($orders['data']) && !empty($orders['data'])) { | ||
173 | - $orderCount = $orders['data']['total']; | 172 | + if (!empty($orders['data']['count'])) { |
173 | + $orderCount = $orders['data']['count']; | ||
174 | } | 174 | } |
175 | + | ||
175 | $result['isOldUser'] = (intval($orderCount) > self::OLD_USER_LIMIT) ? true : false; | 176 | $result['isOldUser'] = (intval($orderCount) > self::OLD_USER_LIMIT) ? true : false; |
176 | // 订单数(用于订单统计) | 177 | // 订单数(用于订单统计) |
177 | $result['orderCount'] = $orderCount; | 178 | $result['orderCount'] = $orderCount; |
@@ -282,7 +283,10 @@ class PayModel | @@ -282,7 +283,10 @@ class PayModel | ||
282 | $paymentParameter = $alipayToken; | 283 | $paymentParameter = $alipayToken; |
283 | } | 284 | } |
284 | 285 | ||
285 | - $reqParams = new Reqparams($orderCode, $totalFee, '有货订单号:' . $orderCode, '', $orderDetail['data']['create_time'], $paymentParameter, $isTest, $uid, $userName); | 286 | + $reqParams = new Reqparams( |
287 | + $orderCode, $totalFee, '有货订单号:' . $orderCode, '', $orderDetail['data']['create_time'], | ||
288 | + $paymentParameter, $isTest, $uid, $userName, $orderDetail['data']['pay_expire'] | ||
289 | + ); | ||
286 | $reqPars = $payService->getPayRequestPars($reqParams); | 290 | $reqPars = $payService->getPayRequestPars($reqParams); |
287 | if (empty($reqPars)) { | 291 | if (empty($reqPars)) { |
288 | $result['error'] = true; | 292 | $result['error'] = true; |
@@ -173,9 +173,10 @@ class PaymentModel | @@ -173,9 +173,10 @@ class PaymentModel | ||
173 | //查询用户订单数接口 | 173 | //查询用户订单数接口 |
174 | $orders = PayData::getOrderCountByUid($uid); | 174 | $orders = PayData::getOrderCountByUid($uid); |
175 | 175 | ||
176 | - if (isset($orders['data']) && !empty($orders['data'])) { | ||
177 | - $orderCount = $orders['data']['total']; | 176 | + if (!empty($orders['data']['count'])) { |
177 | + $orderCount = $orders['data']['count']; | ||
178 | } | 178 | } |
179 | + | ||
179 | $result['isOldUser'] = (intval($orderCount) > self::OLD_USER_LIMIT) ? true : false; | 180 | $result['isOldUser'] = (intval($orderCount) > self::OLD_USER_LIMIT) ? true : false; |
180 | // 订单数(用于订单统计) | 181 | // 订单数(用于订单统计) |
181 | $result['orderCount'] = $orderCount; | 182 | $result['orderCount'] = $orderCount; |
@@ -324,14 +325,28 @@ class PaymentModel | @@ -324,14 +325,28 @@ class PaymentModel | ||
324 | $input->SetBody('有货订单号:' . $orderCode); | 325 | $input->SetBody('有货订单号:' . $orderCode); |
325 | $input->SetOut_trade_no('YOHOBuy_' . $orderCode); // 商户订单号 | 326 | $input->SetOut_trade_no('YOHOBuy_' . $orderCode); // 商户订单号 |
326 | $input->SetTotal_fee($totalFee); | 327 | $input->SetTotal_fee($totalFee); |
327 | - $input->SetTime_start(date("YmdHis")); | ||
328 | - $input->SetTime_expire(date("YmdHis", time() + 600)); | 328 | + //到期时间 |
329 | + if (!empty($orderDetail['data']['pay_expire']) && ($payExpireTime = strtotime($orderDetail['data']['pay_expire']))) { | ||
330 | + $payExpireTime = $payExpireTime; | ||
331 | + } else { | ||
332 | + $payExpireTime = time(); | ||
333 | + } | ||
334 | + | ||
335 | + $input->SetTime_start(date("YmdHis", strtotime('-2 hours', $payExpireTime))); | ||
336 | + //最短失效时间间隔必须大于5分钟 [https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=9_1] | ||
337 | + $input->SetTime_expire(date("YmdHis", $payExpireTime + 300)); | ||
329 | $input->SetTrade_type("NATIVE"); | 338 | $input->SetTrade_type("NATIVE"); |
330 | $input->SetProduct_id($orderCode); | 339 | $input->SetProduct_id($orderCode); |
331 | $notify = new WxPayNativePay(); | 340 | $notify = new WxPayNativePay(); |
332 | $payResult = $notify->GetPayUrl($input); | 341 | $payResult = $notify->GetPayUrl($input); |
342 | + //错误信息,EQ:超时 | ||
343 | + if (!empty($payResult['return_code']) && $payResult['return_code'] === 'FAIL') { | ||
344 | + self::$code['message'] = $payResult['return_msg']; | ||
345 | + break; | ||
346 | + } | ||
333 | 347 | ||
334 | - if ($payResult['result_code'] === 'FAIL') { | 348 | + //错误信息,EQ:多次涮新 |
349 | + if (!empty($payResult['result_code']) && $payResult['result_code'] === 'FAIL') { | ||
335 | self::$code['message'] = $payResult['err_code_des']; | 350 | self::$code['message'] = $payResult['err_code_des']; |
336 | break; | 351 | break; |
337 | } | 352 | } |
@@ -521,7 +536,10 @@ class PaymentModel | @@ -521,7 +536,10 @@ class PaymentModel | ||
521 | $paymentParameter = $alipayToken; | 536 | $paymentParameter = $alipayToken; |
522 | } | 537 | } |
523 | 538 | ||
524 | - $reqParams = new Reqparams($orderCode, $totalFee, '有货订单号:' . $orderCode, '', $orderDetail['data']['create_time'], $paymentParameter, $isTest, $uid, $userName); | 539 | + $reqParams = new Reqparams( |
540 | + $orderCode, $totalFee, '有货订单号:' . $orderCode, '', $orderDetail['data']['create_time'], | ||
541 | + $paymentParameter, $isTest, $uid, $userName, $orderDetail['data']['pay_expire'] | ||
542 | + ); | ||
525 | $reqPars = $payService->getPayRequestPars($reqParams); | 543 | $reqPars = $payService->getPayRequestPars($reqParams); |
526 | UdpLog::info( | 544 | UdpLog::info( |
527 | "【支付-参数】,function:getPayData,orderCode:{$orderCode},接口返回", | 545 | "【支付-参数】,function:getPayData,orderCode:{$orderCode},接口返回", |
@@ -7,7 +7,7 @@ use WebPlugin\UdpLog; | @@ -7,7 +7,7 @@ use WebPlugin\UdpLog; | ||
7 | 7 | ||
8 | /** | 8 | /** |
9 | * 购物车相关的控制器 | 9 | * 购物车相关的控制器 |
10 | - * | 10 | + * |
11 | * @name IndexController | 11 | * @name IndexController |
12 | * @package Cart | 12 | * @package Cart |
13 | * @copyright yoho.inc | 13 | * @copyright yoho.inc |
@@ -24,13 +24,13 @@ class IndexController extends WebAction | @@ -24,13 +24,13 @@ class IndexController extends WebAction | ||
24 | { | 24 | { |
25 | $uid = $this->getUid(false); | 25 | $uid = $this->getUid(false); |
26 | $shoppingKey = Helpers::getShoppingKeyByCookie(); | 26 | $shoppingKey = Helpers::getShoppingKeyByCookie(); |
27 | - | 27 | + |
28 | // 显示一次并清除已删除的COOKIE记录 | 28 | // 显示一次并清除已删除的COOKIE记录 |
29 | $cartDelList = $this->getCookie('cart-del-list'); | 29 | $cartDelList = $this->getCookie('cart-del-list'); |
30 | if (!empty($cartDelList)) { | 30 | if (!empty($cartDelList)) { |
31 | $this->setCookie('cart-del-list', ''); | 31 | $this->setCookie('cart-del-list', ''); |
32 | } | 32 | } |
33 | - | 33 | + |
34 | $this->setTitle('购物车', true, ' | '); | 34 | $this->setTitle('购物车', true, ' | '); |
35 | $this->setSimpleHeader(); | 35 | $this->setSimpleHeader(); |
36 | $this->_view->display('cart', array( | 36 | $this->_view->display('cart', array( |
@@ -39,10 +39,10 @@ class IndexController extends WebAction | @@ -39,10 +39,10 @@ class IndexController extends WebAction | ||
39 | 'uid' => $uid ? $uid : '', | 39 | 'uid' => $uid ? $uid : '', |
40 | )); | 40 | )); |
41 | } | 41 | } |
42 | - | 42 | + |
43 | /** | 43 | /** |
44 | * 购物车商品选择与取消 | 44 | * 购物车商品选择与取消 |
45 | - * | 45 | + * |
46 | * @param string skuList 商品sku列表,json格式,如{"744403":1,"777777":3} | 46 | * @param string skuList 商品sku列表,json格式,如{"744403":1,"777777":3} |
47 | * @param bool hasPromotion 标识是不是有promotion_id参数, 后端会去调用不同的接口 | 47 | * @param bool hasPromotion 标识是不是有promotion_id参数, 后端会去调用不同的接口 |
48 | * @return json | 48 | * @return json |
@@ -61,10 +61,10 @@ class IndexController extends WebAction | @@ -61,10 +61,10 @@ class IndexController extends WebAction | ||
61 | 61 | ||
62 | $this->echoJson($result); | 62 | $this->echoJson($result); |
63 | } | 63 | } |
64 | - | 64 | + |
65 | /** | 65 | /** |
66 | * 修改购物车商品数量 | 66 | * 修改购物车商品数量 |
67 | - * | 67 | + * |
68 | * @param int sku 商品到尺码的编吗 | 68 | * @param int sku 商品到尺码的编吗 |
69 | * @param int increaseNum 增加1 | 69 | * @param int increaseNum 增加1 |
70 | * @param int decreaseNum 减少1 | 70 | * @param int decreaseNum 减少1 |
@@ -76,12 +76,12 @@ class IndexController extends WebAction | @@ -76,12 +76,12 @@ class IndexController extends WebAction | ||
76 | 76 | ||
77 | if ($this->isAjax()) { | 77 | if ($this->isAjax()) { |
78 | $shoppingKey = Helpers::getShoppingKeyByCookie(); | 78 | $shoppingKey = Helpers::getShoppingKeyByCookie(); |
79 | - | 79 | + |
80 | $uid = $this->getUid(false); | 80 | $uid = $this->getUid(false); |
81 | $sku = $this->post('sku', 0); | 81 | $sku = $this->post('sku', 0); |
82 | $increaseNum = $this->post('increaseNum', null); | 82 | $increaseNum = $this->post('increaseNum', null); |
83 | $decreaseNum = $this->post('decreaseNum', null); | 83 | $decreaseNum = $this->post('decreaseNum', null); |
84 | - | 84 | + |
85 | $result = CartModel::modifyProductNum($uid, $sku, $increaseNum, $decreaseNum, $shoppingKey); | 85 | $result = CartModel::modifyProductNum($uid, $sku, $increaseNum, $decreaseNum, $shoppingKey); |
86 | if (!empty($result['code']) && $result['code'] == 200) { | 86 | if (!empty($result['code']) && $result['code'] == 200) { |
87 | $this->setShoppingCookie($uid); | 87 | $this->setShoppingCookie($uid); |
@@ -90,10 +90,10 @@ class IndexController extends WebAction | @@ -90,10 +90,10 @@ class IndexController extends WebAction | ||
90 | 90 | ||
91 | $this->echoJson($result); | 91 | $this->echoJson($result); |
92 | } | 92 | } |
93 | - | 93 | + |
94 | /** | 94 | /** |
95 | * 移出购物车 | 95 | * 移出购物车 |
96 | - * | 96 | + * |
97 | * @param string skuList 商品sku列表,json格式,如[{"product_sku":1047193,"buy_number":1,"promotion_id":0}] | 97 | * @param string skuList 商品sku列表,json格式,如[{"product_sku":1047193,"buy_number":1,"promotion_id":0}] |
98 | * @param bool hasPromotion 标识是不是有promotion_id参数, 后端会去调用不同的接口 | 98 | * @param bool hasPromotion 标识是不是有promotion_id参数, 后端会去调用不同的接口 |
99 | * @return json | 99 | * @return json |
@@ -112,15 +112,15 @@ class IndexController extends WebAction | @@ -112,15 +112,15 @@ class IndexController extends WebAction | ||
112 | $this->setShoppingCookie($uid); | 112 | $this->setShoppingCookie($uid); |
113 | } | 113 | } |
114 | } | 114 | } |
115 | - | 115 | + |
116 | $this->echoJson($result); | 116 | $this->echoJson($result); |
117 | } | 117 | } |
118 | 118 | ||
119 | /** | 119 | /** |
120 | * 移入收藏夹 | 120 | * 移入收藏夹 |
121 | - * | 121 | + * |
122 | * 支持批量移入收藏夹 | 122 | * 支持批量移入收藏夹 |
123 | - * | 123 | + * |
124 | * @param string 商品sku列表,json格式,如{"744403":1,"777777":3} | 124 | * @param string 商品sku列表,json格式,如{"744403":1,"777777":3} |
125 | * @param bool hasPromotion 标识是不是有promotion_id参数, 后端会去调用不同的接口 | 125 | * @param bool hasPromotion 标识是不是有promotion_id参数, 后端会去调用不同的接口 |
126 | * @return json | 126 | * @return json |
@@ -141,32 +141,32 @@ class IndexController extends WebAction | @@ -141,32 +141,32 @@ class IndexController extends WebAction | ||
141 | 141 | ||
142 | $this->echoJson($result); | 142 | $this->echoJson($result); |
143 | } | 143 | } |
144 | - | 144 | + |
145 | /** | 145 | /** |
146 | * 检查是否收藏 | 146 | * 检查是否收藏 |
147 | - * | 147 | + * |
148 | * @param string sknList 商品productId列表,如["123123","123412"] | 148 | * @param string sknList 商品productId列表,如["123123","123412"] |
149 | */ | 149 | */ |
150 | public function checkFavAction() | 150 | public function checkFavAction() |
151 | { | 151 | { |
152 | $result = array('code' => 200, 'message' => '是否收藏', 'data' => array()); | 152 | $result = array('code' => 200, 'message' => '是否收藏', 'data' => array()); |
153 | - | 153 | + |
154 | if ($this->isAjax()) { | 154 | if ($this->isAjax()) { |
155 | $uid = $this->getUid(false); | 155 | $uid = $this->getUid(false); |
156 | $pidList = $this->post('pidList', ''); | 156 | $pidList = $this->post('pidList', ''); |
157 | $result['data'] = CartModel::checkUserIsFav($uid, $pidList); | 157 | $result['data'] = CartModel::checkUserIsFav($uid, $pidList); |
158 | } | 158 | } |
159 | - | 159 | + |
160 | $this->echoJson($result); | 160 | $this->echoJson($result); |
161 | } | 161 | } |
162 | - | 162 | + |
163 | /** | 163 | /** |
164 | * 凑单商品异步请求 | 164 | * 凑单商品异步请求 |
165 | */ | 165 | */ |
166 | public function getTogetherProductAction() | 166 | public function getTogetherProductAction() |
167 | { | 167 | { |
168 | - $result = array('code' => 200, 'data' => array(), 'message' => '凑单商品'); | ||
169 | - | 168 | + $result = array('code' => 200, 'data' => array(), 'message' => '凑单商品'); |
169 | + | ||
170 | if ($this->isAjax()) { | 170 | if ($this->isAjax()) { |
171 | $page = $this->get('page', 1); | 171 | $page = $this->get('page', 1); |
172 | $result = CartModel::getTogetherProduct($page); | 172 | $result = CartModel::getTogetherProduct($page); |
@@ -181,15 +181,15 @@ class IndexController extends WebAction | @@ -181,15 +181,15 @@ class IndexController extends WebAction | ||
181 | public function getHistroyProductAction() | 181 | public function getHistroyProductAction() |
182 | { | 182 | { |
183 | $result = array('code' => 200, 'data' => array(), 'message' => '浏览记录'); | 183 | $result = array('code' => 200, 'data' => array(), 'message' => '浏览记录'); |
184 | - | 184 | + |
185 | // 按照产品把明扬的指示,去掉最近浏览记录 | 185 | // 按照产品把明扬的指示,去掉最近浏览记录 |
186 | $this->echoJson($result); exit(); | 186 | $this->echoJson($result); exit(); |
187 | - | 187 | + |
188 | do { | 188 | do { |
189 | if (!$this->isAjax()) { | 189 | if (!$this->isAjax()) { |
190 | break; | 190 | break; |
191 | } | 191 | } |
192 | - | 192 | + |
193 | $page = $this->get('page', 1); | 193 | $page = $this->get('page', 1); |
194 | // $uid = $this->getUid(false); | 194 | // $uid = $this->getUid(false); |
195 | // if ($uid) { | 195 | // if ($uid) { |
@@ -197,7 +197,7 @@ class IndexController extends WebAction | @@ -197,7 +197,7 @@ class IndexController extends WebAction | ||
197 | // $result = CartModel::getBrowseProduct($uid, $udid, $page); | 197 | // $result = CartModel::getBrowseProduct($uid, $udid, $page); |
198 | // break; | 198 | // break; |
199 | // } | 199 | // } |
200 | - | 200 | + |
201 | $sknList = $this->getCookie('_browseskn'); | 201 | $sknList = $this->getCookie('_browseskn'); |
202 | if (empty($sknList)) { | 202 | if (empty($sknList)) { |
203 | break; | 203 | break; |
@@ -209,7 +209,7 @@ class IndexController extends WebAction | @@ -209,7 +209,7 @@ class IndexController extends WebAction | ||
209 | 209 | ||
210 | $this->echoJson($result); | 210 | $this->echoJson($result); |
211 | } | 211 | } |
212 | - | 212 | + |
213 | /** | 213 | /** |
214 | * 确认订单 | 214 | * 确认订单 |
215 | */ | 215 | */ |
@@ -217,67 +217,67 @@ class IndexController extends WebAction | @@ -217,67 +217,67 @@ class IndexController extends WebAction | ||
217 | { | 217 | { |
218 | $type = $this->get('type', 1); | 218 | $type = $this->get('type', 1); |
219 | $refer = Helpers::url('/cart/index/orderEnsure', array('type' => $type)); | 219 | $refer = Helpers::url('/cart/index/orderEnsure', array('type' => $type)); |
220 | - | 220 | + |
221 | // 审判用户是否已登录 | 221 | // 审判用户是否已登录 |
222 | $this->auditJumpLogin(false, $refer); | 222 | $this->auditJumpLogin(false, $refer); |
223 | - | 223 | + |
224 | $this->setTitle('填写订单', true, ' | '); | 224 | $this->setTitle('填写订单', true, ' | '); |
225 | $this->setSimpleHeader(); | 225 | $this->setSimpleHeader(); |
226 | - | 226 | + |
227 | $cartType = ($type == 2) ? 'advance' : 'ordinary'; | 227 | $cartType = ($type == 2) ? 'advance' : 'ordinary'; |
228 | $isAdvanceCart = ($type == 2) ? true : false; | 228 | $isAdvanceCart = ($type == 2) ? true : false; |
229 | $uid = $this->getUid(false); | 229 | $uid = $this->getUid(false); |
230 | - | 230 | + |
231 | $orderEnsure = CartModel::cartPay($uid, $cartType, $isAdvanceCart); | 231 | $orderEnsure = CartModel::cartPay($uid, $cartType, $isAdvanceCart); |
232 | if (empty($orderEnsure)) { | 232 | if (empty($orderEnsure)) { |
233 | $this->go(Helpers::url('/shopping/cart')); | 233 | $this->go(Helpers::url('/shopping/cart')); |
234 | } | 234 | } |
235 | 235 | ||
236 | $this->_view->display('order-ensure', array( | 236 | $this->_view->display('order-ensure', array( |
237 | - 'orderEnsurePage' => true, | 237 | + 'orderEnsurePage' => true, |
238 | 'orderEnsure' => $orderEnsure, | 238 | 'orderEnsure' => $orderEnsure, |
239 | )); | 239 | )); |
240 | } | 240 | } |
241 | - | 241 | + |
242 | /** | 242 | /** |
243 | * 异步获取地址信息 | 243 | * 异步获取地址信息 |
244 | - * | 244 | + * |
245 | * @return json | 245 | * @return json |
246 | */ | 246 | */ |
247 | public function getAddressAction() | 247 | public function getAddressAction() |
248 | { | 248 | { |
249 | $result = array('code' => 200, 'data' => array(), 'message' => '地址信息'); | 249 | $result = array('code' => 200, 'data' => array(), 'message' => '地址信息'); |
250 | - | 250 | + |
251 | if ($this->isAjax()) { | 251 | if ($this->isAjax()) { |
252 | $uid = $this->getUid(false); | 252 | $uid = $this->getUid(false); |
253 | $result['data'] = CartModel::userAddressList($uid); | 253 | $result['data'] = CartModel::userAddressList($uid); |
254 | } | 254 | } |
255 | - | 255 | + |
256 | $this->echoJson($result); | 256 | $this->echoJson($result); |
257 | } | 257 | } |
258 | - | 258 | + |
259 | /** | 259 | /** |
260 | * 设置为默认的地址 | 260 | * 设置为默认的地址 |
261 | - * | 261 | + * |
262 | * @param int id 地址ID | 262 | * @param int id 地址ID |
263 | * @return json | 263 | * @return json |
264 | */ | 264 | */ |
265 | public function setDefaultAddressAction() | 265 | public function setDefaultAddressAction() |
266 | { | 266 | { |
267 | $result = array(); | 267 | $result = array(); |
268 | - | 268 | + |
269 | if ($this->isAjax()) { | 269 | if ($this->isAjax()) { |
270 | $uid = $this->getUid(false); | 270 | $uid = $this->getUid(false); |
271 | $addressId = $this->post('id'); | 271 | $addressId = $this->post('id'); |
272 | $result = CartModel::setDefaultAddress($uid, $addressId); | 272 | $result = CartModel::setDefaultAddress($uid, $addressId); |
273 | } | 273 | } |
274 | - | 274 | + |
275 | $this->echoJson($result); | 275 | $this->echoJson($result); |
276 | } | 276 | } |
277 | - | 277 | + |
278 | /** | 278 | /** |
279 | * 保存地址信息 | 279 | * 保存地址信息 |
280 | - * | 280 | + * |
281 | * @param int $id 地址ID ,当修改操作的时候需要传,添加时候不需要传 | 281 | * @param int $id 地址ID ,当修改操作的时候需要传,添加时候不需要传 |
282 | * @param string $address 地址信息 | 282 | * @param string $address 地址信息 |
283 | * @param int $areaCode 城市码 | 283 | * @param int $areaCode 城市码 |
@@ -292,7 +292,7 @@ class IndexController extends WebAction | @@ -292,7 +292,7 @@ class IndexController extends WebAction | ||
292 | public function saveAddressAction() | 292 | public function saveAddressAction() |
293 | { | 293 | { |
294 | $result = array(); | 294 | $result = array(); |
295 | - | 295 | + |
296 | if ($this->isAjax()) { | 296 | if ($this->isAjax()) { |
297 | $uid = $this->getUid(false); | 297 | $uid = $this->getUid(false); |
298 | $id = $this->post('id', null); | 298 | $id = $this->post('id', null); |
@@ -312,38 +312,38 @@ class IndexController extends WebAction | @@ -312,38 +312,38 @@ class IndexController extends WebAction | ||
312 | } | 312 | } |
313 | } | 313 | } |
314 | } | 314 | } |
315 | - | 315 | + |
316 | $this->echoJson($result); | 316 | $this->echoJson($result); |
317 | } | 317 | } |
318 | - | 318 | + |
319 | /** | 319 | /** |
320 | * 删除地址 | 320 | * 删除地址 |
321 | - * | 321 | + * |
322 | * @param int id 地址ID | 322 | * @param int id 地址ID |
323 | */ | 323 | */ |
324 | public function delAddressAction() | 324 | public function delAddressAction() |
325 | { | 325 | { |
326 | $result = array(); | 326 | $result = array(); |
327 | - | 327 | + |
328 | if ($this->isAjax()) { | 328 | if ($this->isAjax()) { |
329 | $uid = $this->getUid(false); | 329 | $uid = $this->getUid(false); |
330 | $addressId = $this->post('id'); | 330 | $addressId = $this->post('id'); |
331 | $result = CartModel::delAddress($uid, $addressId); | 331 | $result = CartModel::delAddress($uid, $addressId); |
332 | } | 332 | } |
333 | - | 333 | + |
334 | $this->echoJson($result); | 334 | $this->echoJson($result); |
335 | } | 335 | } |
336 | - | 336 | + |
337 | /** | 337 | /** |
338 | * 获取省市区县信息列表 | 338 | * 获取省市区县信息列表 |
339 | - * | 339 | + * |
340 | * @param int id | 340 | * @param int id |
341 | * @return json | 341 | * @return json |
342 | */ | 342 | */ |
343 | public function getAreaListAction() | 343 | public function getAreaListAction() |
344 | { | 344 | { |
345 | $result = array('code' => 200, 'message' => '地区信息', 'data' => array()); | 345 | $result = array('code' => 200, 'message' => '地区信息', 'data' => array()); |
346 | - | 346 | + |
347 | if ($this->isAjax()) { | 347 | if ($this->isAjax()) { |
348 | $id = $this->get('id', 0); | 348 | $id = $this->get('id', 0); |
349 | $result['data'] = CartModel::getAreaList($id); | 349 | $result['data'] = CartModel::getAreaList($id); |
@@ -351,16 +351,16 @@ class IndexController extends WebAction | @@ -351,16 +351,16 @@ class IndexController extends WebAction | ||
351 | 351 | ||
352 | $this->echoJson($result); | 352 | $this->echoJson($result); |
353 | } | 353 | } |
354 | - | 354 | + |
355 | /** | 355 | /** |
356 | * 获取优惠券列表 | 356 | * 获取优惠券列表 |
357 | - * | 357 | + * |
358 | * @return json | 358 | * @return json |
359 | */ | 359 | */ |
360 | public function getCouponListAction() | 360 | public function getCouponListAction() |
361 | { | 361 | { |
362 | $result = array('code' => 200, 'message' => '优惠券信息', 'data' => array()); | 362 | $result = array('code' => 200, 'message' => '优惠券信息', 'data' => array()); |
363 | - | 363 | + |
364 | if ($this->isAjax()) { | 364 | if ($this->isAjax()) { |
365 | $uid = $this->getUid(false); | 365 | $uid = $this->getUid(false); |
366 | $result['data'] = CartModel::getCouponList($uid); | 366 | $result['data'] = CartModel::getCouponList($uid); |
@@ -368,10 +368,10 @@ class IndexController extends WebAction | @@ -368,10 +368,10 @@ class IndexController extends WebAction | ||
368 | 368 | ||
369 | $this->echoJson($result); | 369 | $this->echoJson($result); |
370 | } | 370 | } |
371 | - | 371 | + |
372 | /** | 372 | /** |
373 | * 购物车选择改变字段,重新运算订单数据 | 373 | * 购物车选择改变字段,重新运算订单数据 |
374 | - * | 374 | + * |
375 | * @param string $cartType 购物车类型,ordinary表示普通, advance表示预售 | 375 | * @param string $cartType 购物车类型,ordinary表示普通, advance表示预售 |
376 | * @param int $deliveryWay 配送方式,1表示普通快递,2表示顺丰速运 | 376 | * @param int $deliveryWay 配送方式,1表示普通快递,2表示顺丰速运 |
377 | * @param int $paymentType 支付方式,1表示在线支付,2表示货到付款 | 377 | * @param int $paymentType 支付方式,1表示在线支付,2表示货到付款 |
@@ -390,17 +390,18 @@ class IndexController extends WebAction | @@ -390,17 +390,18 @@ class IndexController extends WebAction | ||
390 | $paymentType = $this->post('paymentType', 1); | 390 | $paymentType = $this->post('paymentType', 1); |
391 | $couponCode = $this->post('couponCode', null); | 391 | $couponCode = $this->post('couponCode', null); |
392 | $yohoCoin = $this->post('yohoCoin', null); | 392 | $yohoCoin = $this->post('yohoCoin', null); |
393 | + $promotionCode = $this->post('promotionCode', null); | ||
393 | $redEnvelopes = $this->post('redEnvelopes', null); | 394 | $redEnvelopes = $this->post('redEnvelopes', null); |
394 | $uid = $this->getUid(false); | 395 | $uid = $this->getUid(false); |
395 | - $result = CartModel::orderCompute($uid, $cartType, $deliveryWay, $paymentType, $couponCode, $yohoCoin, $redEnvelopes); | 396 | + $result = CartModel::orderCompute($uid, $cartType, $deliveryWay, $paymentType, $couponCode, $promotionCode, $yohoCoin, $redEnvelopes); |
396 | } | 397 | } |
397 | 398 | ||
398 | $this->echoJson($result); | 399 | $this->echoJson($result); |
399 | } | 400 | } |
400 | - | 401 | + |
401 | /** | 402 | /** |
402 | * 确认结算订单 | 403 | * 确认结算订单 |
403 | - * | 404 | + * |
404 | * @param int $addressId 地址ID | 405 | * @param int $addressId 地址ID |
405 | * @param int $cartType 购物车类型ID | 406 | * @param int $cartType 购物车类型ID |
406 | * @param int $deliveryTimeId 寄送时间ID | 407 | * @param int $deliveryTimeId 寄送时间ID |
@@ -426,71 +427,47 @@ class IndexController extends WebAction | @@ -426,71 +427,47 @@ class IndexController extends WebAction | ||
426 | if (!$this->isAjax()) { | 427 | if (!$this->isAjax()) { |
427 | break; | 428 | break; |
428 | } | 429 | } |
429 | - | 430 | + |
430 | // 判断用户是否登录 | 431 | // 判断用户是否登录 |
431 | $uid = $this->getUid(false); | 432 | $uid = $this->getUid(false); |
432 | if (!$uid) { | 433 | if (!$uid) { |
433 | $result['message'] = '请先登录'; | 434 | $result['message'] = '请先登录'; |
434 | break; | 435 | break; |
435 | } | 436 | } |
436 | - | 437 | + |
437 | $addressId = $this->post('addressId', null); | 438 | $addressId = $this->post('addressId', null); |
438 | $cartType = $this->post('cartType', 'ordinary'); // 默认普通购物车 | 439 | $cartType = $this->post('cartType', 'ordinary'); // 默认普通购物车 |
439 | $deliveryTimeId = $this->post('deliveryTimeId', 1); // 默认只工作日配送 | 440 | $deliveryTimeId = $this->post('deliveryTimeId', 1); // 默认只工作日配送 |
440 | $deliveryWayId = $this->post('deliveryWayId', 1); // 默认普通快递 | 441 | $deliveryWayId = $this->post('deliveryWayId', 1); // 默认普通快递 |
441 | $invoiceTitle = $this->post('invoiceTitle', null); // 发票抬头 | 442 | $invoiceTitle = $this->post('invoiceTitle', null); // 发票抬头 |
442 | - $invoiceId = $this->post('invoiceId', null); // 发票类型 | 443 | + $invoiceId = $this->post('invoiceId', null); // 发票类型 |
443 | $paymentId = $this->post('paymentId', 15); // 支付ID | 444 | $paymentId = $this->post('paymentId', 15); // 支付ID |
444 | $paymentType = $this->post('paymentType', 1); // 默认在线支付 | 445 | $paymentType = $this->post('paymentType', 1); // 默认在线支付 |
445 | $remark = $this->post('remark', ''); // 备注信息 | 446 | $remark = $this->post('remark', ''); // 备注信息 |
446 | - $couponCode = $this->post('couponCode', null); // 优惠码 | 447 | + $couponCode = $this->post('couponCode', null); // 优惠券 |
448 | + $promotionCode = $this->post('promotionCode', null); // 优惠码 | ||
447 | $yohoCoin = $this->post('yohoCoin', 1); // YOHO币 | 449 | $yohoCoin = $this->post('yohoCoin', 1); // YOHO币 |
448 | $isPreContact = $this->post('isPreContact', false); // 送货前是否联系 | 450 | $isPreContact = $this->post('isPreContact', false); // 送货前是否联系 |
449 | $isPrintPrice = $this->post('isPrintPrice', true); // 是否打印价格 | 451 | $isPrintPrice = $this->post('isPrintPrice', true); // 是否打印价格 |
450 | $redEnvelopes = $this->post('redEnvelopes', null); | 452 | $redEnvelopes = $this->post('redEnvelopes', null); |
451 | - | 453 | + |
452 | // 调用下单接口 | 454 | // 调用下单接口 |
453 | - $result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceTitle, $invoiceId, | ||
454 | - $paymentId, $paymentType, $remark, $couponCode, $yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes); | 455 | + $result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTimeId, $deliveryWayId, $invoiceTitle, $invoiceId, |
456 | + $paymentId, $paymentType, $remark, $couponCode, $promotionCode, $yohoCoin, $isPreContact, $isPrintPrice, $redEnvelopes); | ||
455 | // 判断是否下单成功 | 457 | // 判断是否下单成功 |
456 | if (empty($result['data']['order_code'])) { | 458 | if (empty($result['data']['order_code'])) { |
457 | UdpLog::info('【结算信息】判断是否下单成功','order_code'.$result['data']['order_code']); | 459 | UdpLog::info('【结算信息】判断是否下单成功','order_code'.$result['data']['order_code']); |
458 | break; | 460 | break; |
459 | } | 461 | } |
460 | - | 462 | + |
461 | // 跳转到支付的URL链接 | 463 | // 跳转到支付的URL链接 |
462 | $result['data']['payUrl'] = Helpers::url('/shopping/pay', array('ordercode' => $result['data']['order_code'])); | 464 | $result['data']['payUrl'] = Helpers::url('/shopping/pay', array('ordercode' => $result['data']['order_code'])); |
463 | } | 465 | } |
464 | while (false); | 466 | while (false); |
465 | - | ||
466 | -// $result = CartModel::orderSub($uid, $addressId, $cartType, $deliveryTime, $deliveryWay, $invoiceTitle, $invoiceId, $paymentId, $paymentType, $remark, $couponCode, $yohoCoin); | ||
467 | -// | ||
468 | - // 记录下单异常的数据 | ||
469 | - if (empty($result)) { | ||
470 | - $message = 'uid:' . $uid . ',addressId:' . $addressId . ',cartType:' . $cartType . ',deliveryTime:' . $deliveryTime | ||
471 | - . ',deliveryWay:' . $deliveryWay . 'invoiceTitle:' . $invoiceTitle . ',invoiceId:' . $invoiceId . ',yohoCoin:' . $yohoCoin | ||
472 | - . ',paymentId:' . $paymentId . ',paymentType:' . $paymentType . ',remark:' . $remark . ',couponCode:' . $couponCode . "\n"; | ||
473 | - UdpLog::info('【下单】下单异常数据','message:'.$message,'返回:'.json_encode($result)); | ||
474 | - } | ||
475 | -// // 返回数据 | ||
476 | -// else { | ||
477 | -// // 提交成功清除Cookie | ||
478 | -// $this->setCookie('order-info', null); | ||
479 | -// | ||
480 | -// $this->echoJson($result); | ||
481 | -// } | ||
482 | -// | ||
483 | -// if ($uid && !empty($result['data'])) { | ||
484 | -// try { | ||
485 | -// UnionTrans::set($uid, $result['data']['order_code'], $result['data']['order_amount']); | ||
486 | -// } catch (Exception $e) { | ||
487 | -// // do nothing | ||
488 | -// } | ||
489 | -// } | ||
490 | - | 467 | + |
491 | $this->echoJson($result); | 468 | $this->echoJson($result); |
492 | } | 469 | } |
493 | - | 470 | + |
494 | /** | 471 | /** |
495 | * 加入购物车 | 472 | * 加入购物车 |
496 | * | 473 | * |
@@ -534,12 +511,12 @@ class IndexController extends WebAction | @@ -534,12 +511,12 @@ class IndexController extends WebAction | ||
534 | 511 | ||
535 | $this->echoJson($result); | 512 | $this->echoJson($result); |
536 | } | 513 | } |
537 | - | 514 | + |
538 | /** | 515 | /** |
539 | * 获取商品信息 | 516 | * 获取商品信息 |
540 | */ | 517 | */ |
541 | public function getProductInfoAction() | 518 | public function getProductInfoAction() |
542 | - { | 519 | + { |
543 | $productId = $this->get('productId'); | 520 | $productId = $this->get('productId'); |
544 | $uid = $this->getUid(); | 521 | $uid = $this->getUid(); |
545 | $vipLevel = -1; | 522 | $vipLevel = -1; |
@@ -552,10 +529,10 @@ class IndexController extends WebAction | @@ -552,10 +529,10 @@ class IndexController extends WebAction | ||
552 | } | 529 | } |
553 | $this->_view->display('goods-detail', $data); | 530 | $this->_view->display('goods-detail', $data); |
554 | } | 531 | } |
555 | - | 532 | + |
556 | /** | 533 | /** |
557 | * 获取购物车商品总数 | 534 | * 获取购物车商品总数 |
558 | - * | 535 | + * |
559 | * @return jsonp | 536 | * @return jsonp |
560 | */ | 537 | */ |
561 | public function countAction() | 538 | public function countAction() |
@@ -564,10 +541,10 @@ class IndexController extends WebAction | @@ -564,10 +541,10 @@ class IndexController extends WebAction | ||
564 | $uid = $this->getUid(false); | 541 | $uid = $this->getUid(false); |
565 | $shoppingKey = Helpers::getShoppingKeyByCookie(); | 542 | $shoppingKey = Helpers::getShoppingKeyByCookie(); |
566 | $result = CartModel::getCartCount($uid, $shoppingKey); | 543 | $result = CartModel::getCartCount($uid, $shoppingKey); |
567 | - | 544 | + |
568 | $this->helpJsonCallbackResult($callback, 200, '总数', $result); | 545 | $this->helpJsonCallbackResult($callback, 200, '总数', $result); |
569 | } | 546 | } |
570 | - | 547 | + |
571 | /** | 548 | /** |
572 | * 设置购物车COOKIE信息 | 549 | * 设置购物车COOKIE信息 |
573 | */ | 550 | */ |
@@ -585,5 +562,5 @@ class IndexController extends WebAction | @@ -585,5 +562,5 @@ class IndexController extends WebAction | ||
585 | ))); | 562 | ))); |
586 | } | 563 | } |
587 | } | 564 | } |
588 | - | ||
589 | -} | ||
565 | + | ||
566 | +} |
@@ -5,7 +5,7 @@ use Shopping\PayModel; | @@ -5,7 +5,7 @@ use Shopping\PayModel; | ||
5 | use WebPlugin\Pay\PayFactory; | 5 | use WebPlugin\Pay\PayFactory; |
6 | use WebPlugin\Pay\Rspparams; | 6 | use WebPlugin\Pay\Rspparams; |
7 | use WebPlugin\Pay\weixin\PayNotifyCallBack; | 7 | use WebPlugin\Pay\weixin\PayNotifyCallBack; |
8 | - | 8 | +use WebPlugin\UdpLog; |
9 | /** | 9 | /** |
10 | * 支付Notice | 10 | * 支付Notice |
11 | */ | 11 | */ |
@@ -24,6 +24,7 @@ class NoticeController extends WebAction | @@ -24,6 +24,7 @@ class NoticeController extends WebAction | ||
24 | public function alipaynoticeAction() | 24 | public function alipaynoticeAction() |
25 | { | 25 | { |
26 | $res = $this->getParseResponse($_POST, 2); | 26 | $res = $this->getParseResponse($_POST, 2); |
27 | + UdpLog::info("【支付宝异步】,function:alipaynoticeAction,参数", array('pars' => $_POST, 'res' => $res)); | ||
27 | if ($res->payResult != -1) { | 28 | if ($res->payResult != -1) { |
28 | $this->payResultProc($res, 2); | 29 | $this->payResultProc($res, 2); |
29 | echo "success"; | 30 | echo "success"; |
@@ -37,6 +38,7 @@ class NoticeController extends WebAction | @@ -37,6 +38,7 @@ class NoticeController extends WebAction | ||
37 | public function alipayreturnAction() | 38 | public function alipayreturnAction() |
38 | { | 39 | { |
39 | $res = $this->getParseResponse($_GET, 2); | 40 | $res = $this->getParseResponse($_GET, 2); |
41 | + UdpLog::info("【支付宝同步】,function:alipayreturnAction,参数", array('pars' => $_GET, 'res' => $res)); | ||
40 | $dealResult = $this->payResultProc($res, 2); | 42 | $dealResult = $this->payResultProc($res, 2); |
41 | $dealResult['payData'] = array('payWay' => '支付宝'); | 43 | $dealResult['payData'] = array('payWay' => '支付宝'); |
42 | $this->commonShowResult($dealResult); | 44 | $this->commonShowResult($dealResult); |
@@ -48,6 +50,7 @@ class NoticeController extends WebAction | @@ -48,6 +50,7 @@ class NoticeController extends WebAction | ||
48 | public function alibarcodenoticeAction() | 50 | public function alibarcodenoticeAction() |
49 | { | 51 | { |
50 | $res = $this->getParseResponse($_POST, 17); | 52 | $res = $this->getParseResponse($_POST, 17); |
53 | + UdpLog::info("【支付宝二维码支付异步】,function:alibarcodenoticeAction,参数", array('pars' => $_POST, 'res' => $res)); | ||
51 | if ($res->payResult != -1) { | 54 | if ($res->payResult != -1) { |
52 | $this->payResultProc($res, 17); | 55 | $this->payResultProc($res, 17); |
53 | echo "success"; | 56 | echo "success"; |
@@ -61,6 +64,7 @@ class NoticeController extends WebAction | @@ -61,6 +64,7 @@ class NoticeController extends WebAction | ||
61 | public function alibarcodereturnAction() | 64 | public function alibarcodereturnAction() |
62 | { | 65 | { |
63 | $res = $this->getParseResponse($_GET, 17); | 66 | $res = $this->getParseResponse($_GET, 17); |
67 | + UdpLog::info("【支付宝二维码支付同步】,function:alibarcodereturnAction,参数", array('pars' => $_GET, 'res' => $res)); | ||
64 | $dealResult = $this->payResultProc($res, 17); | 68 | $dealResult = $this->payResultProc($res, 17); |
65 | $dealResult['payData'] = array('payWay' => '支付宝'); | 69 | $dealResult['payData'] = array('payWay' => '支付宝'); |
66 | $this->commonShowResult($dealResult); | 70 | $this->commonShowResult($dealResult); |
@@ -225,6 +229,7 @@ class NoticeController extends WebAction | @@ -225,6 +229,7 @@ class NoticeController extends WebAction | ||
225 | $uid = $this->getSession(self::SESSION_UID_KEY); | 229 | $uid = $this->getSession(self::SESSION_UID_KEY); |
226 | $this->setSession(self::SESSION_UID_KEY, null); | 230 | $this->setSession(self::SESSION_UID_KEY, null); |
227 | } | 231 | } |
232 | + UdpLog::info("【微信扫码支付结果商户通知地址】,function:wechatqrcodenotifyAction"); | ||
228 | $notify = new PayNotifyCallBack($uid); | 233 | $notify = new PayNotifyCallBack($uid); |
229 | $notify->handle(false); | 234 | $notify->handle(false); |
230 | } | 235 | } |
@@ -248,6 +253,7 @@ class NoticeController extends WebAction | @@ -248,6 +253,7 @@ class NoticeController extends WebAction | ||
248 | $payment = PayModel::getPaymentById(21); | 253 | $payment = PayModel::getPaymentById(21); |
249 | $payService = PayFactory::factory($payment); | 254 | $payService = PayFactory::factory($payment); |
250 | $res = $payService->parseResponse(array('orderCode' => $orderCode)); | 255 | $res = $payService->parseResponse(array('orderCode' => $orderCode)); |
256 | + UdpLog::info("【微信扫码支付返回】,function:wechatqrcodereturnAction,参数", array('pars' => $_GET, 'res' => $res)); | ||
251 | $dealResult = $this->payResultProc($res, 21); | 257 | $dealResult = $this->payResultProc($res, 21); |
252 | $dealResult['payData'] = array('payWay' => '微信扫码支付'); | 258 | $dealResult['payData'] = array('payWay' => '微信扫码支付'); |
253 | } while (false); | 259 | } while (false); |
@@ -95,7 +95,7 @@ class IndexController extends WebAction | @@ -95,7 +95,7 @@ class IndexController extends WebAction | ||
95 | 95 | ||
96 | //调用模型获得品牌页数据 | 96 | //调用模型获得品牌页数据 |
97 | $data = BrandsModel::getBrandSearchData($condition, $options); | 97 | $data = BrandsModel::getBrandSearchData($condition, $options); |
98 | - | 98 | + $data['signboard'] = isset($result['signboard']) ? $result['signboard'] : '';//水牌 |
99 | //统计前三个商品 | 99 | //统计前三个商品 |
100 | $skn=array(); | 100 | $skn=array(); |
101 | $arr=array(); | 101 | $arr=array(); |
@@ -315,7 +315,6 @@ class IndexController extends WebAction | @@ -315,7 +315,6 @@ class IndexController extends WebAction | ||
315 | */ | 315 | */ |
316 | public function shopHome($shopId) | 316 | public function shopHome($shopId) |
317 | { | 317 | { |
318 | - $domain = $this->param('named'); | ||
319 | // 设置头部数据 | 318 | // 设置头部数据 |
320 | $this->setWebNavHeader(); | 319 | $this->setWebNavHeader(); |
321 | $misort = $this->get('misort'); | 320 | $misort = $this->get('misort'); |
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" | @@ -50,7 +50,7 @@ application.template.ext = ".phtml" | ||
50 | application.assets.path = ROOT_PATH "/assets/web" | 50 | application.assets.path = ROOT_PATH "/assets/web" |
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | -application.version = "0.0.26" | 53 | +application.version = "0.0.28" |
54 | 54 | ||
55 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
56 | application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证" | 56 | application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证" |
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" | @@ -50,7 +50,7 @@ application.template.ext = ".phtml" | ||
50 | application.assets.path = ROOT_PATH "/assets/web" | 50 | application.assets.path = ROOT_PATH "/assets/web" |
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | -application.version = "0.0.26" | 53 | +application.version = "0.0.28" |
54 | 54 | ||
55 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
56 | application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证" | 56 | application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证" |
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" | @@ -50,7 +50,7 @@ application.template.ext = ".phtml" | ||
50 | application.assets.path = ROOT_PATH "/assets/web" | 50 | application.assets.path = ROOT_PATH "/assets/web" |
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | -application.version = "0.0.26" | 53 | +application.version = "0.0.28" |
54 | 54 | ||
55 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
56 | application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证" | 56 | application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证" |
@@ -50,7 +50,7 @@ application.template.ext = ".phtml" | @@ -50,7 +50,7 @@ application.template.ext = ".phtml" | ||
50 | application.assets.path = ROOT_PATH "/assets/web" | 50 | application.assets.path = ROOT_PATH "/assets/web" |
51 | 51 | ||
52 | ; 应用的版本号 | 52 | ; 应用的版本号 |
53 | -application.version = "0.0.26" | 53 | +application.version = "0.0.28" |
54 | 54 | ||
55 | ; 网站SEO信息 | 55 | ; 网站SEO信息 |
56 | application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证" | 56 | application.seo.title = "YOHO!有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证" |
-
Please register or login to post a comment