新增订单管理

This commit is contained in:
唐明明
2023-07-10 17:25:27 +08:00
parent e37f23be46
commit ae5827a6fd
9 changed files with 436 additions and 41 deletions

View File

@@ -5,6 +5,7 @@
*/
import store from '@/store'
import { router } from '@/router/index.js'
// 基础配置
const config = {
@@ -142,12 +143,12 @@ const loginHint = () => {
uni.showModal({
title: '登录提示',
content: '您的登录信息已过期,请重新登录',
confirmColor: '#8b64fd',
confirmColor: '#da2b56',
showCancel:false,
success: res=> {
loginHintState = false
if (res.confirm) uni.reLaunch({
url: '/index/index'
if (res.confirm) router.replaceAll({
name: 'Login'
})
}
})

View File

@@ -39,21 +39,25 @@ const buy = data => {
})
}
// 核验列表
const codes = code => {
// 订单列表初始化
const orderInit = () => {
return request({
url : "empower/code",
data : { code },
method : "POST",
url : "empower/order/init",
})
}
// 确认核验
const sign = item_id => {
// 订单列表
const orderList = data => {
return request({
url : "empower/code/sign",
data : { item_id },
method : "POST",
url : "empower/order/index",
data
})
}
// 取消订单
const orderCancel = order => {
return request({
url : "empower/order/" + order + "/cancel",
})
}
@@ -62,7 +66,8 @@ export {
info,
buyInit,
buy,
codes,
sign
orderInit,
orderList,
orderCancel
}