123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- import request from '../utils/request.js'
- class order extends request {
- static async getOrderList(page = 1, pageSize = 10, orderStatus, writeOffStatus,foodOrder=2) {
- const res = await this.getRequest(`${this.BASE_URL}Order/index?page=${page}&pageSize=${pageSize}&orderStatus=${orderStatus}&pay=${writeOffStatus}&foodOrder=${foodOrder}`)
- return res.data
- }
- static async getDiscussOffOrderList(page = 1, pageSize = 10, orderStatus, writeOffStatus) {
- const res = await this.getRequest(`${this.BASE_URL}Order/index?page=${page}&pageSize=${pageSize}&orderStatus=${orderStatus}&pay=${writeOffStatus}`)
- return res.data
- }
- static async getAllOrderList(page = 1, pageSize = 10) {
- const res = await this.getRequest(`${this.BASE_URL}Order/index?page=${page}&pageSize=${pageSize}`)
- return res.data
- }
- static async getOrderById(id) {
- const res = await this.getRequest(`${this.BASE_URL}Order/read?id=${id}`)
- return res.data
- }
- static async payOrderAgain(data) {
- const res = await this.postRequest(`${this.BASE_URL}Order/payOrderAgain`,data)
- return res.data
- }
- static async refreshCode(data) {
- const res = await this.postRequest(`${this.BASE_URL}Order/changeCode`,data)
- return res.data
- }
-
- static async createOrder(data) {
- const res = await this.postRequest(`${this.BASE_URL}Order/createOrder`,data)
- return res.data
- }
- static async deleteOrder(id) {
- const res = await this.postRequest(`${this.BASE_URL}Order/deleteOrder?orderId=${id}`)
- return res.data
- }
- static async closeOrder(id) {
- const res = await this.postRequest(`${this.BASE_URL}Order/closeOrder?orderId=${id}`)
- return res
- }
- static async createFoodOrder(data) {
- const res = await this.postRequest(`${this.BASE_URL}Order/createFoodOrder`,data)
- return res.data
- }
- static async startServer(orderId) {
- const res = await this.postRequest(`${this.BASE_URL}Order/serverStart`,{orderId:orderId})
- return res.data
- }
- static async endServer(orderId) {
- const res = await this.postRequest(`${this.BASE_URL}Order/serverComplete`,{orderId:orderId})
- return res.data
- }
- static async payOrder(orderIdList){
- const res = await this.postRequest(`${this.BASE_URL}Order/xcxPay`,{orderIds:orderIdList})
- return res.data
- }
- static async createMasterOrder(data) {
- const res = await this.postRequest(`${this.BASE_URL}Order/payMasterOrder`,data)
- return res.data
- }
- static async couponList(data) {
- const res = await this.postRequest(`${this.COUPON_URL}/coupon/kd-sn-list`,data)
- return res.data
- }
- static async writeOffCoupon(data) {
- const res = await this.postRequest(`${this.COUPON_URL}/coupon/kd-coupon-writeOff`,data)
- return res.data
- }
- static async writeOffStaff(data) {
- const res = await this.postRequest(`${this.COUPON_URL}/coupon/kd-staff-auth`,data)
- return res.data
- }
- static async couponInfo(data) {
- const res = await this.postRequest(`${this.COUPON_URL}/coupon/kd-coupon-sn-info`,data)
- return res.data
- }
- }
- export default order
|