Authored by xuqi

submit with coin

... ... @@ -122,7 +122,7 @@ const compute = (uid, yohoCoin) => {
* 提交订单api调用
* @param number uid user id
* @param number address_id 地址id
* @param number yohoCoin 使用的有货币
* @param number use_yoho_coin 使用的有货币(元)
* @param string invoices_title 发票抬头
* @param int invoices_type_id 发票内容
* @param string remark 备注
... ... @@ -137,7 +137,7 @@ const _submit = (uid, other) => {
method: 'app.Shopping.submit',
uid: uid,
address_id: other.address_id,
yohoCoin: other.yohoCoin,
use_yoho_coin: other.use_yoho_coin,
remark: other.remark,
isPrintPrice: other.isPrintPrice,
delivery_time: other.delivery_time,
... ... @@ -163,20 +163,15 @@ const _submit = (uid, other) => {
*/
const submit = (uid, other) => {
let theOther = {};
let coin = other.coin;
Object.assign(theOther, other, {
delivery_time: 2, // 平时和周末都送货
delivery_way: 1, // 普通快递
payment_id: 1, // 支付宝
payment_type: 1 // 在线支付
payment_type: 1, // 在线支付
use_yoho_coin: other.coin / 100 // 有货币稀释
});
// 有货币稀释
if (coin) {
coin = coin / 100;
}
return _submit(uid, theOther).then(result => result);
};
... ...