Authored by 郝肖肖

微信支付成功 数据处理

@@ -9,10 +9,7 @@ @@ -9,10 +9,7 @@
9 const headerModel = require('../../../doraemon/models/simple-header'); 9 const headerModel = require('../../../doraemon/models/simple-header');
10 const PayData = require('../models/pay'); 10 const PayData = require('../models/pay');
11 const PayHelpers = require('../helpers/payment'); 11 const PayHelpers = require('../helpers/payment');
12 -const paySign = require('../helpers/pay/sign');  
13 -const helpers = global.yoho.helpers;  
14 const _ = require('lodash'); 12 const _ = require('lodash');
15 -const md5 = require('md5');  
16 const integerTest = /^\d+$/; 13 const integerTest = /^\d+$/;
17 14
18 /** 15 /**
@@ -32,8 +29,6 @@ const online = (req, res, next) => { @@ -32,8 +29,6 @@ const online = (req, res, next) => {
32 29
33 PayData.getPayInfo(uid, orderCode).then(result => { 30 PayData.getPayInfo(uid, orderCode).then(result => {
34 let order = result.order; 31 let order = result.order;
35 - let promotion = order.promotion_formulas;  
36 - let coin = 0;  
37 let amount = _.toNumber(order.payment_amount); 32 let amount = _.toNumber(order.payment_amount);
38 let header = headerModel.setSimpleHeaderData() || {}; 33 let header = headerModel.setSimpleHeaderData() || {};
39 34
@@ -42,7 +37,7 @@ const online = (req, res, next) => { @@ -42,7 +37,7 @@ const online = (req, res, next) => {
42 return next(); 37 return next();
43 } 38 }
44 39
45 - result.order.payment_name = (result.order.payment_type === 1 ? '在线支付' : '货到付款'); 40 + result.order.payment_name = (parseInt(result.order.payment_type, 10) === 1 ? '在线支付' : '货到付款');
46 41
47 if (amount > 0) { 42 if (amount > 0) {
48 res.render('pay', Object.assign({ 43 res.render('pay', Object.assign({
@@ -53,21 +48,9 @@ const online = (req, res, next) => { @@ -53,21 +48,9 @@ const online = (req, res, next) => {
53 username: decodeURIComponent(req.user.name) || '' 48 username: decodeURIComponent(req.user.name) || ''
54 }, result)); 49 }, result));
55 } else { 50 } else {
56 - _.forEach(promotion, p => {  
57 - if (p.promotion === 'YOHO币') {  
58 - coin = parseInt(parseFloat(p.payment_amount.substring(2, p.payment_amount.length)) * 100, 10);  
59 - }  
60 - });  
61 res.render('pay-success', { 51 res.render('pay-success', {
62 - content: {  
63 - amount: order.payment_amount,  
64 - orderNum: order.order_code,  
65 - coin: coin,  
66 - orderHref: helpers.urlFormat('/me/order/detail', {  
67 - orderCode: order.order_code  
68 - }),  
69 - walkHref: helpers.urlFormat('/')  
70 - } 52 + simpleHeader: header,
  53 + order: order
71 }); 54 });
72 } 55 }
73 56
@@ -123,23 +106,16 @@ const weixinQr = (req, res, next) => { @@ -123,23 +106,16 @@ const weixinQr = (req, res, next) => {
123 return next(); 106 return next();
124 } 107 }
125 108
126 - PayData.orderDetail(uid, code).then(result => {  
127 - if (result && result.data) {  
128 - return result.data;  
129 - } else {  
130 - return {};  
131 - }  
132 - }).then(order => { 109 + PayData.orderDetail(uid, code).then(d => {
  110 + d = d && d.data || {};
133 res.render('weixin-pay', { 111 res.render('weixin-pay', {
134 module: 'shopping', 112 module: 'shopping',
135 page: 'wxpay', 113 page: 'wxpay',
136 title: '微信扫码支付页面', 114 title: '微信扫码支付页面',
137 simpleHeader: header, 115 simpleHeader: header,
138 - choosePayUrl: helpers.urlFormat('/shopping/pay', {  
139 - order_code: order.order_code  
140 - }), 116 + choosePayUrl: `//www.yohobuy.com/shopping/pay?ordercode=${d.order_code}`,
141 qrcodeUrl: qrcodeUrl, 117 qrcodeUrl: qrcodeUrl,
142 - order: order 118 + order: d
143 }); 119 });
144 }).catch(next); 120 }).catch(next);
145 }; 121 };
@@ -155,32 +131,8 @@ const weixinPayState = (req, res) => { @@ -155,32 +131,8 @@ const weixinPayState = (req, res) => {
155 }); 131 });
156 } 132 }
157 133
158 - PayData.orderDetail(uid, code).then(result => {  
159 - let data = {};  
160 -  
161 - result = result && result.data || {};  
162 - if (result.is_cancel === 'Y') {  
163 - data = {  
164 - code: 401,  
165 - message: '订单已取消'  
166 - };  
167 - } else if (result.payment_status === 'Y') {  
168 - let payParams = {  
169 - orderCode: code,  
170 - totalFee: _.round(parseFloat(result.payment_amount), 2)  
171 - };  
172 -  
173 - data = {  
174 - code: 200,  
175 - data: {  
176 - href: helpers.urlFormat('/shopping/pay/callback/wechat', Object.assign(payParams, {  
177 - sign: md5(paySign.raw(Object.assign({tradeStatus: 'Y'}, payParams)))  
178 - }))  
179 - }  
180 - };  
181 - }  
182 -  
183 - return res.json(data); 134 + PayHelpers.getWxSign(uid, code).then(d => {
  135 + return res.json(d);
184 }).catch(() => { 136 }).catch(() => {
185 return res.json({}); 137 return res.json({});
186 }); 138 });
@@ -195,6 +147,7 @@ const callback = (req, res, next) => { @@ -195,6 +147,7 @@ const callback = (req, res, next) => {
195 let type = req.params.type; 147 let type = req.params.type;
196 let payId = PayData.payments[type]; 148 let payId = PayData.payments[type];
197 let query = req.query; 149 let query = req.query;
  150 + let header = headerModel.setSimpleHeaderData() || {};
198 151
199 if (!payId) { 152 if (!payId) {
200 return next(); 153 return next();
@@ -202,35 +155,14 @@ const callback = (req, res, next) => { @@ -202,35 +155,14 @@ const callback = (req, res, next) => {
202 155
203 PayHelpers.afterPay(query, payId, req.user).then(result => { 156 PayHelpers.afterPay(query, payId, req.user).then(result => {
204 if (result.code === 200 && result.data && result.data.order) { 157 if (result.code === 200 && result.data && result.data.order) {
205 - let order = result.data.order;  
206 - let promotion = order.promotion_formulas;  
207 - let coin = 0;  
208 -  
209 -  
210 - _.forEach(promotion, p => {  
211 - if (p.promotion === 'YOHO币') {  
212 - coin = parseInt(parseFloat(p.promotion_amount.substring(2, p.promotion_amount.length)) * 100, 10);  
213 - }  
214 - });  
215 -  
216 res.render('pay-success', { 158 res.render('pay-success', {
217 - defaultHeader: false,  
218 - bcNavFocus: 3,  
219 - content: {  
220 - cost: order.payment_amount,  
221 - orderNum: order.order_code,  
222 - coin: coin,  
223 - orderHref: helpers.urlFormat('/me/order/detail', {  
224 - orderCode: order.order_code  
225 - }),  
226 - walkHref: helpers.urlFormat('/')  
227 - } 159 + simpleHeader: header,
  160 + order: result.data.order
228 }); 161 });
229 } else { 162 } else {
230 res.render('pay-fail', { 163 res.render('pay-fail', {
231 - defaultHeader: false,  
232 - payName: result.payName,  
233 - bcNavFocus: 3 164 + simpleHeader: header,
  165 + payName: result.payName
234 }); 166 });
235 } 167 }
236 }).catch(next); 168 }).catch(next);
@@ -42,8 +42,6 @@ const Wechat = { @@ -42,8 +42,6 @@ const Wechat = {
42 unifiedOrder.sign = _.toUpper(signStr); 42 unifiedOrder.sign = _.toUpper(signStr);
43 43
44 return this.unifiedOrder(unifiedOrder).then(result => { 44 return this.unifiedOrder(unifiedOrder).then(result => {
45 - console.log(result);  
46 -  
47 if (result && result.xml) { 45 if (result && result.xml) {
48 let data = result.xml || {}; 46 let data = result.xml || {};
49 47
@@ -77,7 +75,6 @@ const Wechat = { @@ -77,7 +75,6 @@ const Wechat = {
77 body: xml, 75 body: xml,
78 timeout: 1000 76 timeout: 1000
79 }).then(result => { 77 }).then(result => {
80 - console.log(result);  
81 if (result) { 78 if (result) {
82 return common.xml2Obj(result); 79 return common.xml2Obj(result);
83 } else { 80 } else {
@@ -17,6 +17,8 @@ const co = Promise.coroutine; @@ -17,6 +17,8 @@ const co = Promise.coroutine;
17 const logger = global.yoho.logger; 17 const logger = global.yoho.logger;
18 const md5 = require('md5'); 18 const md5 = require('md5');
19 const paySign = require('./pay/sign'); 19 const paySign = require('./pay/sign');
  20 +const helpers = global.yoho.helpers;
  21 +const _ = require('lodash');
20 22
21 const Payment = { 23 const Payment = {
22 pay(user, order, payType, protocol) { 24 pay(user, order, payType, protocol) {
@@ -48,7 +50,7 @@ const Payment = { @@ -48,7 +50,7 @@ const Payment = {
48 return result; 50 return result;
49 } 51 }
50 52
51 - let method = paymentPars[0] * 1; 53 + let method = parseInt(paymentPars[0], 10);
52 54
53 if (method === PayData.payments.wechat) { 55 if (method === PayData.payments.wechat) {
54 // 如果是微信支付,不需要调用获取支付方式详情接口 56 // 如果是微信支付,不需要调用获取支付方式详情接口
@@ -145,7 +147,7 @@ const Payment = { @@ -145,7 +147,7 @@ const Payment = {
145 if (payResult && payResult.payResult === 200) { 147 if (payResult && payResult.payResult === 200) {
146 if (payResult.orderCode) { 148 if (payResult.orderCode) {
147 logger.info('pay back confirm'); 149 logger.info('pay back confirm');
148 - yield PayData.sendPayConfirm(payResult.orderCode, payId, user.uid); 150 + PayData.sendPayConfirm(payResult.orderCode, payId, user.uid);
149 } 151 }
150 152
151 payData = yield PayData.procOrderData(payResult, user.uid); 153 payData = yield PayData.procOrderData(payResult, user.uid);
@@ -184,6 +186,40 @@ const Payment = { @@ -184,6 +186,40 @@ const Payment = {
184 186
185 return payData; 187 return payData;
186 })(); 188 })();
  189 + },
  190 +
  191 + getWxSign(uid, code) {
  192 + return PayData.orderDetail(uid, code).then(result => {
  193 + let data = {};
  194 +
  195 + result = (result.code === 200 ? result.data : {});
  196 +
  197 + if (result.is_cancel === 'Y') {
  198 + return {
  199 + code: 401,
  200 + message: '订单已取消'
  201 + };
  202 + }
  203 +
  204 + if (result.payment_status === 'Y') {
  205 + let payParams = {
  206 + orderCode: code,
  207 + tradeStatus: 'Y',
  208 + totalFee: _.round(parseFloat(result.payment_amount), 2)
  209 + };
  210 +
  211 + data = {
  212 + code: 200,
  213 + data: {
  214 + href: helpers.urlFormat('/shopping/pay/callback/wechat', Object.assign(payParams, {
  215 + sign: md5(paySign.raw(payParams))
  216 + }))
  217 + }
  218 + };
  219 + }
  220 +
  221 + return data;
  222 + });
187 } 223 }
188 }; 224 };
189 225
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
7 'use strict'; 7 'use strict';
8 8
9 const api = global.yoho.API; 9 const api = global.yoho.API;
  10 +const serviceApi = global.yoho.ServiceAPI;
10 11
11 // 获取支付宝等平台支付方式列表 12 // 获取支付宝等平台支付方式列表
12 const getPayProvider = () => { 13 const getPayProvider = () => {
@@ -100,6 +101,19 @@ const updateOrderPayment = (code, payment, uid) => { @@ -100,6 +101,19 @@ const updateOrderPayment = (code, payment, uid) => {
100 }); 101 });
101 }; 102 };
102 103
  104 +/**
  105 + * [获取资源数据]
  106 + * @param {[type]} code [资源位code]
  107 + * @return {[type]} [{}]
  108 + */
  109 +const getResourceData = (code) => {
  110 + return serviceApi.get('operations/api/v5/resource/get', {
  111 + content_code: code
  112 + }, {
  113 + cache: true
  114 + });
  115 +};
  116 +
103 module.exports = { 117 module.exports = {
104 getPayProvider, 118 getPayProvider,
105 getPaymentInfo, 119 getPaymentInfo,
@@ -109,5 +123,6 @@ module.exports = { @@ -109,5 +123,6 @@ module.exports = {
109 sendPayConfirm, 123 sendPayConfirm,
110 sendMessage, 124 sendMessage,
111 orderDetail, 125 orderDetail,
112 - updateOrderPayment 126 + updateOrderPayment,
  127 + getResourceData
113 }; 128 };
@@ -12,7 +12,8 @@ const co = Promise.coroutine; @@ -12,7 +12,8 @@ const co = Promise.coroutine;
12 const payHelpersBank = require('./../helpers/bank'); 12 const payHelpersBank = require('./../helpers/bank');
13 const logger = global.yoho.logger; 13 const logger = global.yoho.logger;
14 const _ = require('lodash'); 14 const _ = require('lodash');
15 - 15 +const helpers = global.yoho.helpers;
  16 +const FRAUD_CONTENT_CODE = '78d0fb6c97d691863286edcb4d8abfa9';
16 const payments = { 17 const payments = {
17 alipay: 2, 18 alipay: 2,
18 wechat: 21, 19 wechat: 21,
@@ -169,9 +170,7 @@ const getPaymentInfo = (id) => { @@ -169,9 +170,7 @@ const getPaymentInfo = (id) => {
169 */ 170 */
170 const setOrderPayBank = (code, payment, bankCode) => { 171 const setOrderPayBank = (code, payment, bankCode) => {
171 return co(function *() { 172 return co(function *() {
172 - let data = yield payApi.setOrderPayBank(code, payment, bankCode);  
173 -  
174 - return data; 173 + return yield payApi.setOrderPayBank(code, payment, bankCode);
175 })(); 174 })();
176 }; 175 };
177 176
@@ -183,9 +182,7 @@ const setOrderPayBank = (code, payment, bankCode) => { @@ -183,9 +182,7 @@ const setOrderPayBank = (code, payment, bankCode) => {
183 */ 182 */
184 const updateOrderPayBank = (code, payment, bankCode) => { 183 const updateOrderPayBank = (code, payment, bankCode) => {
185 return co(function *() { 184 return co(function *() {
186 - let data = yield payApi.updateOrderPayBank(code, payment, bankCode);  
187 -  
188 - return data; 185 + return yield payApi.updateOrderPayBank(code, payment, bankCode);
189 })(); 186 })();
190 }; 187 };
191 188
@@ -214,48 +211,61 @@ const procOrderData = (payResult, uid) => { @@ -214,48 +211,61 @@ const procOrderData = (payResult, uid) => {
214 let result = {code: 400, message: ''}; 211 let result = {code: 400, message: ''};
215 212
216 if (!orderCode) { 213 if (!orderCode) {
217 - result.message = '未查到订单信息,订单状态更新失败!'; 214 + result.message = '订单不存在';
218 return result; 215 return result;
219 } 216 }
220 217
221 - let orderInfo = yield orderDetail(uid, orderCode); 218 + return Promise.all([orderDetail(uid, orderCode), payApi.getResourceData(FRAUD_CONTENT_CODE)]).then(procData => {
  219 + let orderInfo = procData[0].code === 200 && procData[0].data;
  220 + let fraudData = _.result(_.find(procData[1].data, {template_name: 'text'}), 'data') || {};
  221 + let resultOrder;
222 222
223 - if (orderInfo && orderInfo.data) {  
224 - let order = orderInfo.data;  
225 - let amount = order.payment_amount; 223 + if (!orderInfo) {
  224 + result.message = '订单不存在!';
  225 + return result;
  226 + }
226 227
227 - if (order.is_cancel === 'Y') {  
228 - logger.warn('front pay success but order is cancel.', {payResult: payResult, order: order}); 228 + let amount = orderInfo.payment_amount;
229 229
230 - payApi.sendMessage(order.mobile, 'error_sms', '支付成功,但订单已取消,订单号为' + orderCode); 230 + if (orderInfo.is_cancel === 'Y') {
  231 + logger.warn('front pay success but order is cancel.', {payResult: payResult, order: orderInfo});
231 return {code: 417, message: '支付成功,但订单已取消,需联系客服!'}; 232 return {code: 417, message: '支付成功,但订单已取消,需联系客服!'};
232 } 233 }
233 234
234 - if (order.payment_status === 'N') { 235 + if (orderInfo.payment_status === 'N') {
235 logger.warn('front pay success but may be notify fail'); 236 logger.warn('front pay success but may be notify fail');
236 } 237 }
237 238
238 if (_.round(parseFloat(amount), 2) !== _.round(parseFloat(payResult.totalFee), 2)) { 239 if (_.round(parseFloat(amount), 2) !== _.round(parseFloat(payResult.totalFee), 2)) {
239 - logger.warn('front pay success but the amount is not same.', {payResult: payResult, order: order}); 240 + logger.warn('front pay success but the amount is not same.', {payResult: payResult, order: orderInfo});
240 return { 241 return {
241 code: 415, 242 code: 415,
242 message: '支付金额与订单金额不一致,订单状态更新失败!' 243 message: '支付金额与订单金额不一致,订单状态更新失败!'
243 }; 244 };
244 } 245 }
245 246
  247 + resultOrder = {
  248 + paymentTypes: (orderInfo.payment_type === 1 ? '在线支付' : '货到付款'),
  249 + multiPackage: orderInfo.is_multi_package === 'Y',
  250 + ordersUrl: helpers.urlFormat('/home/orders'),
  251 + vipUrl: helpers.urlFormat('/help/detail', {id: 9}),
  252 + returnGoodsUrl: helpers.urlFormat('/help/detail', {id: 49}),
  253 + yohoCoinUrl: helpers.urlFormat('/help/detail', {id: 105, contId: 233}),
  254 + detailUrl: helpers.urlFormat('/home/orders/detail', {
  255 + orderCode: orderInfo.order_code
  256 + }),
  257 + packageTitle: orderInfo.package_title || '商品需要品牌商调货',
  258 + fraudTip: fraudData.text || ''
  259 + };
246 return { 260 return {
247 code: 200, 261 code: 200,
248 message: '支付成功,请等待发货', 262 message: '支付成功,请等待发货',
249 data: { 263 data: {
250 - order: order 264 + order: Object.assign(orderInfo, resultOrder)
251 } 265 }
252 }; 266 };
253 267
254 - } else {  
255 - result.message = '未查到订单信息,订单状态更新失败!';  
256 - }  
257 -  
258 - return result; 268 + });
259 })(); 269 })();
260 }; 270 };
261 271
1 -{{> settle-header}}  
2 -<div class="pay-page pay-fail-page blk-page">  
3 - <div class="center-content">  
4 - {{> bc-nav}}  
5 - <div class="pay-fail-group">  
6 - <div class="pay-fail-bg"></div>  
7 - <p class="pay-fail-info big">抱歉!订单支付失败,请立即联系客服</p>  
8 - <p class="pay-fail-info small">I'm sorry! Order failed to pay, please contact customer service</p>  
9 - <p class="pay-fail-info small">感谢您选择{{payName}}支付方式,我们的客服随后会和您确认订单</p>  
10 - <p class="pay-fail-info medium">客服电话:<span class='blue'>400-889-9646</span></p>  
11 - <a href="/" class="go-to-home">  
12 - <span class="btn">返回BLK首页</span>  
13 - </a> 1 +<div class="pay-notice-wechatqrcodereturn-page yoho-page clearfix">
  2 + <div class="wechatqrcodereturn">
  3 + <div class="pay-title">
  4 + <div class="step5"></div>
  5 + <ul>
  6 + <li><span>查看购物车</span></li>
  7 + <li><span>填写订单</span></li>
  8 + <li class="end"><span>付款,完成购买</span></li>
  9 + </ul>
  10 + </div>
  11 +
  12 + <div class="pay-wechat-return">
  13 + <p class="payerror">
  14 + 很抱歉,订单支付失败,请立即联系客服!
  15 + </p>
  16 + <p class="arrival-time">
  17 + 客服电话:
  18 + <b class="tell-phone">
  19 + 400-889-9646
  20 + </b>
  21 + </p>
  22 + </div>
  23 +
  24 + <div class="cart-bigbtns">
  25 + <span class="btn-type">
  26 + <a href="/">返回首页</a>
  27 + </span>
  28 + </div>
  29 +
  30 + <div class="we-alert">
  31 + <span class="we-font">感谢您选择 {{payName}} 的方式,我们的客服随后会和您确认订单。</span>
14 </div> 32 </div>
15 </div> 33 </div>
16 </div> 34 </div>
1 -{{> settle-header}}  
2 -<div class="pay-page pay-success-page blk-page">  
3 - <div class="center-content">  
4 - {{> bc-nav}}  
5 - {{# content}}  
6 - <div class="order-info clearfix">  
7 - <div class="left">  
8 - <p class="success-tip">  
9 - 恭喜您,购买完成!您已成功支付  
10 - {{#if cost}}  
11 - {{round cost 2}} 1 +<div class="pay-notice-page yoho-page">
  2 +{{# order}}
  3 + <div class="order-wrap">
  4 + <h1><i class="pay-sure-icon"></i>恭喜您,购买完成!您已成功支付<span class="red">{{payment_amount}}</span>元!</h1>
12 5
13 - {{#if coin}}  
14 - ,有货币{{coin}}  
15 - {{/if}}  
16 - {{^}}  
17 - 有货币{{coin}}  
18 - {{/if}}  
19 -  
20 - </p>  
21 - <p class="order-num">订单编号:{{orderNum}}</p>  
22 - {{#if cost}}  
23 - <p class="payment-online">在线支付:¥{{round cost 2}}</p>  
24 - {{/if}}  
25 - {{#if coin}}  
26 - <p class="payment-coin">有货币支付:{{coin}}</p>  
27 - {{/if}}  
28 - </div>  
29 -  
30 - <div class="btns right">  
31 - <a class="btn go-check-order" href="{{https orderHref}}">查看订单详情</a>  
32 - <a class="btn" href="{{https walkHref}}">继续逛逛</a> 6 + <div class="order-info">
  7 + <ul>
  8 + <li><span class="l-b">订单号: {{order_code}}</span></li>
  9 + <li><span class="l-b">在线金额: {{payment_amount}}</span></li>
  10 + <li>
  11 + <span class="l-b back-yoho-coin">共返有货币:{{yoho_give_coin}}</span>
  12 + <a href="{{yohoCoinUrl}}" class="notice-link" target="_blank">有货币能做什么>></a>
  13 + </li>
  14 + <li>
  15 + <span class="l-b">获得VIP累计金额:{{payment_amount}}</span>
  16 + <a href="{{vipUrl}}" class="notice-link" target="_blank">查看VIP特权>></a>
  17 + </li>
  18 + <li class="opt-btns">
  19 + <a href="{{detailUrl}}">查看订单详情</a>
  20 + <a href="/">继续逛逛</a>
  21 + </li>
  22 + </ul>
33 </div> 23 </div>
34 </div> 24 </div>
35 25
36 - <div class="tip-info">  
37 - <p class="title">温馨提示:</p> 26 + <div class="extra-wrap">
  27 + <h5>温馨提示:</h5>
  28 + {{#if multiPackage}}
38 <p> 29 <p>
39 - 1.当订单发货后,您可以登录<a class="blue" href="/me/order">订单中心</a>查询快递发货详情。  
40 - 2.YOHO!BLK有货支持“开箱验货”和“15天退换货保障”收货后请当面验货,如果发现商品有任何问题请致电客服电话400-889-9646,  
41 - <a class="blue" href="/help?id=43">“退换货政策”</a>请点击查看。<em class="blue">3.尊敬的用户:近期为网络诈骗高发期,YOHO!BLK有货郑重声明,不会以任何形式索取客户的账户信息或引导转账,敬请提高警惕,谨防诈骗</em> 30 + 1.{{packageTitle}}至有货仓库,预计3-5日内发货给您。<br>
  31 + 2.当订单发货后,您可以登录<a href="{{ordersUrl}}" class="notice-link" target="_blank">订单中心</a>查询快递发货详情。<br>
  32 + 3.YOHO!BUY有货支持 “开箱验货” 和 “15天退换货保障”,收货后请当面验货,如果发现商品有任何问题请致电客服电话400-889-9646,
  33 + <a href="{{returnGoodsUrl}}" class="notice-link" target="_blank">“退换货政策”</a> 请点击查看。<br>
  34 + 4.VIP金额的累计,将在您订单签收15天后积累到您的账户,请您知悉。<br>
  35 + 5.购买商品及参与促销活动赠送的有货币,将在您订单签收7天后积累到您的账户,您可以在个人中心-我的有货币中查看。<br>
  36 + {{#if fraudTip}}
  37 + <span class="red">6.{{{fraudTip}}}</span>
  38 + {{/if}}
42 </p> 39 </p>
  40 + {{^}}
  41 + <p>
  42 + 1.当订单发货后,您可以登录<a href="{{ordersUrl}}" class="notice-link" target="_blank">订单中心</a>查询快递发货详情。<br>
  43 + 2.YOHO!BUY有货支持 “开箱验货” 和 “15天退换货保障”,收货后请当面验货,如果发现商品有任何问题请致电客服电话400-889-9646,
  44 + <a href="{{returnGoodsUrl}}" class="notice-link" target="_blank">“退换货政策”</a> 请点击查看。<br>
  45 + 3.VIP金额的累计,将在您订单签收15天后积累到您的账户,请您知悉。<br>
  46 + 4.购买商品及参与促销活动赠送的有货币,将在您订单签收7天后积累到您的账户,您可以在个人中心-我的有货币中查看。<br>
  47 + {{#if fraudTip}}
  48 + <span class="red">5.{{{fraudTip}}}</span>
  49 + {{/if}}
  50 + </p>
  51 + {{/if}}
43 </div> 52 </div>
44 - {{/ content}}  
45 - </div> 53 +{{/order}}
46 </div> 54 </div>
1 @import "pay"; 1 @import "pay";
2 @import "wxpay"; 2 @import "wxpay";
3 @import "cashondelivery"; 3 @import "cashondelivery";
  4 +@import "wechatqrcodereturn";
  5 +@import "notice";
  1 +.pay-notice-page {
  2 + width: 990px;
  3 + margin: 0 auto;
  4 + padding: 30px 0;
  5 + font-size: 14px;
  6 + color: #444;
  7 +
  8 + .red {
  9 + color: #ce0b24;
  10 + }
  11 +
  12 + .order-wrap {
  13 + padding: 40px 50px;
  14 + background-color: #f5f5f5;
  15 + border: 1px solid #e0e0e0;
  16 +
  17 + > h1 {
  18 + font-size: 28px;
  19 + line-height: 1;
  20 +
  21 + .pay-sure-icon {
  22 + display: inline-block;
  23 + width: 32px;
  24 + height: 32px;
  25 + margin-right: 20px;
  26 + background: resolve('pay/pay-sure-icon.png');
  27 + vertical-align: text-bottom;
  28 + }
  29 + }
  30 + }
  31 +
  32 + .order-info {
  33 + margin-top: 40px;
  34 + border-top: 1px solid #e0e0e0;
  35 + padding-top: 30px;
  36 + position: relative;
  37 +
  38 + li {
  39 + padding-bottom: 18px;
  40 +
  41 + .l-b {
  42 + display: inline-block;
  43 + width: 200px;
  44 + }
  45 +
  46 + .back-yoho-coin:after {
  47 + content: '';
  48 + display: inline-block;
  49 + width: 14px;
  50 + height: 14px;
  51 + background: resolve('cart/yoho-coin.png');
  52 + margin-left: 6px;
  53 + vertical-align: bottom;
  54 + }
  55 +
  56 + .notice-link {
  57 + color: #0883d1;
  58 + }
  59 + }
  60 +
  61 + .opt-btns {
  62 + padding-top: 10px;
  63 + padding-bottom: 0;
  64 +
  65 + > a {
  66 + width: 120px;
  67 + height: 32px;
  68 + line-height: 32px;
  69 + color: #fff;
  70 + background-color: #3a3a3a;
  71 + display: inline-block;
  72 + text-align: center;
  73 + margin-right: 54px;
  74 + }
  75 + }
  76 +
  77 + &:after {
  78 + content: '';
  79 + width: 450px;
  80 + height: 170px;
  81 + background: resolve('pay/qr-img.png');
  82 + position: absolute;
  83 + top: 30px;
  84 + right: 0;
  85 + }
  86 + }
  87 +
  88 + .extra-wrap {
  89 + padding: 30px 40px;
  90 + line-height: 2;
  91 + color: #bbb;
  92 + border: 1px solid #e0e0e0;
  93 + margin-top: 30px;
  94 +
  95 + .notice-link {
  96 + color: #0883d1;
  97 + }
  98 + }
  99 +
  100 + .best-for-you {
  101 + margin-top: 30px;
  102 +
  103 + .top-title {
  104 + font-weight: 300;
  105 + border-bottom: 1px solid #e0e0e0;
  106 +
  107 + span {
  108 + font-size: 18px;
  109 + display: inline-block;
  110 + padding: 0 4px;
  111 + height: 40px;
  112 + border-bottom: 3px solid #4a4a4a;
  113 + }
  114 +
  115 + .change-btn {
  116 + float: right;
  117 + font-size: 16px;
  118 + line-height: 18px;
  119 + cursor: pointer;
  120 + display: none;
  121 +
  122 + &:after {
  123 + content: '';
  124 + width: 13px;
  125 + height: 13px;
  126 + margin-left: 8px;
  127 + display: inline-block;
  128 + vertical-align: middle;
  129 + background: resolve('pay/change-icon.png');
  130 + }
  131 + }
  132 + }
  133 +
  134 + .product-wrap {
  135 + margin-top: 30px;
  136 + overflow: hidden;
  137 +
  138 + ul {
  139 + width: 3010px;
  140 + height: 307px;
  141 + overflow: hidden;
  142 + }
  143 +
  144 + li {
  145 + width: 190px;
  146 + margin-right: 10px;
  147 + font-size: 12px;
  148 + font-weight: bold;
  149 + line-height: 1.5;
  150 + float: left;
  151 + text-align: center;
  152 + }
  153 +
  154 + .thumb {
  155 + height: 256px;
  156 + }
  157 +
  158 + .name {
  159 + padding: 0 10px;
  160 + margin-top: 10px;
  161 + overflow: hidden;
  162 + text-overflow: ellipsis;
  163 + white-space: nowrap;
  164 + }
  165 + }
  166 + }
  167 +}
  1 +.wechatqrcodereturn {
  2 + width: 990px;
  3 + margin: 0 auto;
  4 + font-size: 12px;
  5 + font-family: Arial,helvetica,sans-serif;
  6 +
  7 + .pay-title {
  8 + height: 65px;
  9 + overflow: hidden;
  10 + padding: 20px 0px 0px 0px;
  11 + margin: 0px auto;
  12 + border-bottom: 2px solid #000000;
  13 +
  14 + ul {
  15 + width: 446px;
  16 + height: 12px;
  17 + float: right;
  18 + list-style: none;
  19 + padding: 0;
  20 + margin: 0;
  21 + background: resolve(pay/pay-list.png) no-repeat top right;
  22 + }
  23 +
  24 + li {
  25 + width: 176px;
  26 + height: 12px;
  27 + text-align: center;
  28 + color: #999;
  29 + float: left;
  30 +
  31 + span {
  32 + display: block;
  33 + height: 15px;
  34 + padding: 15px 0px 0px 0px;
  35 + line-height: 15px;
  36 + }
  37 +
  38 + }
  39 +
  40 + .end {
  41 + width: 93px;
  42 + height: 18px;
  43 + color: #000;
  44 +
  45 + span {
  46 + text-align: right;
  47 + }
  48 + }
  49 + }
  50 +
  51 + .step5 {
  52 + height: 33px;
  53 + width: 97px;
  54 + overflow: hidden;
  55 + background-image: resolve(pay/finsh.png);
  56 + float: left;
  57 + }
  58 +
  59 + .pay-wechat-return {
  60 + overflow: hidden;
  61 + padding-top: 10px;
  62 + }
  63 +
  64 + .payerror {
  65 + margin: 50px 0 0 300px;
  66 + font-size: 14px;
  67 + font-weight: bold;
  68 + color: #000;
  69 + padding-left: 25px;
  70 + line-height: 21px;
  71 + background: resolve(pay/pay-fail.png) no-repeat;
  72 + }
  73 +
  74 + .arrival-time {
  75 + margin: 10px 0 0 325px;
  76 + color: #666;
  77 + }
  78 +
  79 + .tell-phone {
  80 + color: #e8044f;
  81 + font-weight: bold;
  82 + font-size: 16px;
  83 + }
  84 +
  85 + .cart-bigbtns {
  86 + span {
  87 + margin-right: 5px;
  88 + }
  89 + }
  90 +
  91 + .btn-type {
  92 + display: inline-block;
  93 + height: 35px;
  94 + padding: 0 0 0 2px;
  95 + overflow: hidden;
  96 + font-size: 14px;
  97 + margin: 40px 0 0 320px;
  98 +
  99 + a {
  100 + display: inline-block;
  101 + height: 35px;
  102 + line-height: 32px;
  103 + padding: 0 20px;
  104 + background: resolve(pay/btnby.png) no-repeat;
  105 + border: none;
  106 + overflow: visible;
  107 + cursor: pointer;
  108 + margin: 0;
  109 + color: #666;
  110 + }
  111 + }
  112 +
  113 + .we-font {
  114 + margin: 20px 0 0 320px;
  115 + height: 36px;
  116 + line-height: 36px;
  117 + padding-left: 16px;
  118 + color: #999;
  119 + display: block;
  120 + background: resolve(pay/pay-plaint.png) no-repeat 1px;
  121 + }
  122 +}