jiuyiUniapp/jiuyi2/common/js/order.js

34 lines
541 B
JavaScript

// 工具库
import util from '@/common/js/util.js'
// api
import api from '@/api/index.js'
const order = {
/**
* 订单支付
* @param {Object} event 事件对象
*/
orderPay: (event) => {
return new Promise((resolve, reject) => {
api.shop.orderPay({
query: {
...event.query,
},
data: [
event.orderId,
],
}).then(rs => {
if (res.code == 200) {
resolve(res.data)
return
}
util.alert({
content: res.msg,
showCancel: false,
})
})
})
}
}
export default order