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">
<section class="dispatch block">
<!--<div class="sorry-tips">
<p>虚拟商品不支持退换货,抱歉!</p>
</div>-->
<div class="sub-block payment-type">
<h3>
<p>支付方式</p>
<span>在线支付</span>
</h3>
</div>
<div class="sub-block delivery-id">
<h3>
<p>发送时间</p>
<span>自动发货</span>
</h3>
<h4>在您支付成功后,系统将立即为您发送二维码,您可以在订单中查看。</h4>
</div>
</section>
{{#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>
</div>-->
<div class="sub-block payment-type">
<h3>
<p>支付方式</p>
<span>在线支付</span>
</h3>
</div>
<div class="sub-block delivery-id">
<h3>
<p>发送时间</p>
<span>自动发货</span>
</h3>
<h4>在您支付成功后,系统将立即为您发送二维码,您可以在订单中查看。</h4>
</div>
</section>
<section class="block tickets-mobile">
<input type="text" name="mobile" placeholder="手机号" id="mobile">
<span class="mobile-tips">(必填)</span>
</section>
<section class="block tickets-mobile">
<input type="text" name="mobile" placeholder="手机号" id="mobile">
<span class="mobile-tips">(必填)</span>
</section>
<section class="block goods-bottom">
{{#each goods}}
{{> tickets/good}}
{{/each}}
</section>
<section class="block goods-bottom">
{{#each goods}}
{{> tickets/good}}
{{/each}}
</section>
<section class="block dispatch">
<div class="yoho-coin">
<ul class="sale-invoice">
<li class="coin" data-yoho-coin="{{yohoCoinCompute.yohoCoin}}" data-yoho-coin-click={{yohoCoinCompute.yohoCoinClick}}>
<span class="title">有货币</span>
<span class="desc msg">{{yohoCoinCompute.yohoCoinMsg}}</span>
<span class="yoho-coin-help">?</span>
{{#if yohoCoinCompute.useYohoCoin}}
<span class="coin-check">
<i class="iconfont checkbox icon-cb-radio"></i>
</span>
{{else}}
<span class="coin-check">
<i class="iconfont checkbox icon-radio"></i>
</span>
{{/if}}
</li>
</ul>
</div>
<div class="sub-block delivery-id">
<h3>
<p>发票</p>
</h3>
<h4>
如需开具发票,请于我们的客服联系<br>
客服电话:400-889-9646。
</h4>
</div>
</section>
<section class="block dispatch">
<div class="yoho-coin">
<ul class="sale-invoice">
<li class="coin" data-yoho-coin="{{yohoCoinCompute.yohoCoin}}" data-yoho-coin-click={{yohoCoinCompute.yohoCoinClick}}>
<span class="title">有货币</span>
<span class="desc msg">{{yohoCoinCompute.yohoCoinMsg}}</span>
<span class="yoho-coin-help">?</span>
{{#if yohoCoinCompute.useYohoCoin}}
<span class="coin-check">
<i class="iconfont checkbox icon-cb-radio"></i>
</span>
{{else}}
<span class="coin-check">
<i class="iconfont checkbox icon-radio"></i>
</span>
{{/if}}
</li>
</ul>
</div>
<div class="sub-block delivery-id">
<h3>
<p>发票</p>
</h3>
<h4>
如需开具发票,请于我们的客服联系<br>
客服电话:400-889-9646。
</h4>
</div>
</section>
<section class="price-cal block">
<ul class="total">
{{#cartPayData}}
<li>
<p>{{promotion}}</p>
<span>{{promotion_amount}}</span>
</li>
{{/cartPayData}}
</ul>
<div class="price-cost">
实付金额
<span>¥{{price}}</span>
<section class="price-cal block">
<ul class="total">
{{#cartPayData}}
<li>
<p>{{promotion}}</p>
<span>{{promotion_amount}}</span>
</li>
{{/cartPayData}}
</ul>
<div class="price-cost">
实付金额
<span>¥{{price}}</span>
</div>
</section>
<div class="bill">
您需要支付:<span>¥{{price}}</span>
<a href="javascript:;" id="ticketsConfirm">确认</a>
</div>
</section>
<div class="bill">
您需要支付:<span>¥{{price}}</span>
<a href="javascript:;" id="ticketsConfirm">确认</a>
</div>
<!--有货币使用弹框提示-->
<div class="yoho-coin-help-dialog-bg hide"></div>
<div class="yoho-coin-help-dialog hide">
<div class="yoho-coin-title">有货币使用条件:</div>
<div class="yoho-coin-content">
<p>1.订单金额大于20元(含)</p>
<p>2.有货币数量大于{{yohoCoinCompute.yoho_coin_pay_rule.num_limit}}个(含)</p>
<p>3.有货币支付不得超过每笔订单应付金额的{{yohoCoinCompute.yoho_coin_pay_rule.max_pay_rate_desc}}</p>
<p>备注:使用有货币数量为{{yohoCoinCompute.yoho_coin_pay_rule.num_limit}}的整数倍,100有货币抵1元。</p>
<!--有货币使用弹框提示-->
<div class="yoho-coin-help-dialog-bg hide"></div>
<div class="yoho-coin-help-dialog hide">
<div class="yoho-coin-title">有货币使用条件:</div>
<div class="yoho-coin-content">
<p>1.订单金额大于20元(含)</p>
<p>2.有货币数量大于{{yohoCoinCompute.yoho_coin_pay_rule.num_limit}}个(含)</p>
<p>3.有货币支付不得超过每笔订单应付金额的{{yohoCoinCompute.yoho_coin_pay_rule.max_pay_rate_desc}}</p>
<p>备注:使用有货币数量为{{yohoCoinCompute.yoho_coin_pay_rule.num_limit}}的整数倍,100有货币抵1元。</p>
</div>
<div class="yoho-coin-footer">知道了</div>
</div>
<div class="yoho-coin-footer">知道了</div>
</div>
<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}}">
<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);
... ...