Authored by 毕凯

Merge branch 'master' into release/6.0.1

... ... @@ -160,7 +160,7 @@ class BuyNowController {
sku_type: req.body.sku_type,
buy_number: req.body.buy_number,
coupon_code: req.body.coupon_code,
address_id: parseInt(crypto.decrypt('', req.body.address_id), 10),
address_id: parseInt(crypto.decrypt('', req.body.address_id), 10) || 0,
delivery_time: req.body.delivery_time,
delivery_way: req.body.delivery_way,
use_yoho_coin: req.body.use_yoho_coin,
... ...
... ... @@ -58,6 +58,10 @@ const submitTicket = (req, res) => {
};
indexModel.submitTicket(params).then(result => {
if (result === {}) {
result.message = '人太多啦,稍后再试!';
}
// 提交成功清除Cookie
res.cookie('order-info', null, actCkOpthn);
res.json(result);
... ...
... ... @@ -103,6 +103,18 @@ class BuyNowModel extends global.yoho.BaseModel {
* @param {*} params
*/
submit(params) {
if (!params.address_id) {
return Promise.resolve({ code: 401, message: '配送地址不能为空' });
}
if (!params.delivery_time) {
return Promise.resolve({ code: 402, message: '请选择配送时间' });
}
if (!params.delivery_way) {
return Promise.resolve({ code: 403, message: '请选择配送方式' });
}
let finalParams = {
method: 'app.Buynow.submit',
uid: params.uid,
... ...
<div class="order-ensure-page yoho-page tickets-confirm-page">
{{#unless goods.length}}
<p style="text-align: center;background-color: #fff;font-size: 20px;line-height: 60px;margin-top: 100px;}">人太多啦,稍后再试!</p>
{{else}}
<section class="dispatch block">
<!--<div class="sorry-tips">
<p>虚拟商品不支持退换货,抱歉!</p>
... ... @@ -93,4 +96,5 @@
<input type="hidden" name="ticketsPage" id="ticketsPage" value="1">
<input type="hidden" name="productSku" id="productSku" value="{{productSku}}">
<input type="hidden" name="buyNumber" id="buyNumber" value="{{buyNumber}}">
{{/unless}}
</div>
\ No newline at end of file
... ...
... ... @@ -69,7 +69,8 @@ module.exports = (env) => {
autoprefixer: false,
loaders: {
css: cssLoader(env, 'vue')
}
},
esModule: false
}
}],
}, {
... ...
// require('index.css');
const Vue = require('vue');
const Logistics = require('home/refund/logistics.vue');
const LogisticsCompany = require('home/refund/logistics-company.vue');
... ...
... ... @@ -23,7 +23,7 @@ let functions = {
if (addRestult.code === 401) {
window.location.href = '//m.yohobuy.com/signin.html?refer=' + window.location.href;
}
tip.show(addRestult.message);
tip.show(addRestult.message || '人太多啦,稍后再试!');
} else {
$('#productSku').val(productSku);
$('#buyNumber').val(buyNumber);
... ...