1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- import request from '../utils/request.js'
- class order extends request {
- static async getOrderList(page = 1, pageSize = 10, orderStatus, writeOffStatus) {
- const res = await this.getRequest(`${this.BASE_URL}Order/index?page=${page}&pageSize=${pageSize}&orderStatus=${orderStatus}&writeOffStatus=${writeOffStatus}`)
- 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}&writeOffStatus=${writeOffStatus}&discussStatus=1`)
- 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
- }
- }
- export default order
|