Authored by xuqi

submit with coin

@@ -122,7 +122,7 @@ const compute = (uid, yohoCoin) => { @@ -122,7 +122,7 @@ const compute = (uid, yohoCoin) => {
122 * 提交订单api调用 122 * 提交订单api调用
123 * @param number uid user id 123 * @param number uid user id
124 * @param number address_id 地址id 124 * @param number address_id 地址id
125 - * @param number yohoCoin 使用的有货币 125 + * @param number use_yoho_coin 使用的有货币(元)
126 * @param string invoices_title 发票抬头 126 * @param string invoices_title 发票抬头
127 * @param int invoices_type_id 发票内容 127 * @param int invoices_type_id 发票内容
128 * @param string remark 备注 128 * @param string remark 备注
@@ -137,7 +137,7 @@ const _submit = (uid, other) => { @@ -137,7 +137,7 @@ const _submit = (uid, other) => {
137 method: 'app.Shopping.submit', 137 method: 'app.Shopping.submit',
138 uid: uid, 138 uid: uid,
139 address_id: other.address_id, 139 address_id: other.address_id,
140 - yohoCoin: other.yohoCoin, 140 + use_yoho_coin: other.use_yoho_coin,
141 remark: other.remark, 141 remark: other.remark,
142 isPrintPrice: other.isPrintPrice, 142 isPrintPrice: other.isPrintPrice,
143 delivery_time: other.delivery_time, 143 delivery_time: other.delivery_time,
@@ -163,20 +163,15 @@ const _submit = (uid, other) => { @@ -163,20 +163,15 @@ const _submit = (uid, other) => {
163 */ 163 */
164 const submit = (uid, other) => { 164 const submit = (uid, other) => {
165 let theOther = {}; 165 let theOther = {};
166 - let coin = other.coin;  
167 166
168 Object.assign(theOther, other, { 167 Object.assign(theOther, other, {
169 delivery_time: 2, // 平时和周末都送货 168 delivery_time: 2, // 平时和周末都送货
170 delivery_way: 1, // 普通快递 169 delivery_way: 1, // 普通快递
171 payment_id: 1, // 支付宝 170 payment_id: 1, // 支付宝
172 - payment_type: 1 // 在线支付 171 + payment_type: 1, // 在线支付
  172 + use_yoho_coin: other.coin / 100 // 有货币稀释
173 }); 173 });
174 174
175 - // 有货币稀释  
176 - if (coin) {  
177 - coin = coin / 100;  
178 - }  
179 -  
180 return _submit(uid, theOther).then(result => result); 175 return _submit(uid, theOther).then(result => result);
181 }; 176 };
182 177