Browse Source

H5-购物车:接口请求403优化

panyong 3 years ago
parent
commit
4d82ac46b6

+ 1 - 1
htmldev/dashboard/src/api/request.js

@@ -102,7 +102,7 @@ request.interceptors.response.use(response => {
   if (code === 301 && url) {
     Vue.cookie.delete('afhousewechatToken')
     location.replace(url)
-  } else if (code === 403) {
+  } else if (code === 403 && router.currentRoute.name !== 'Login') {
     router.replace({
       path: '/login',
       query: {

+ 2 - 2
htmldev/dashboard/src/views/sell/pay/api/index.js

@@ -4,7 +4,7 @@ import request from '@/api/request'
  * 获取预付款
  * @param id 酒吧ID
  */
-export const apiBarList = (id) => request({
+export const apiAdvanceList = (id) => request({
   method: 'GET',
   url: '/api/v1/user/prepare/order/list',
   params: {
@@ -31,5 +31,5 @@ export const apiCouponList = (id) => request({
 export const apiAddOrder = (postData) => request({
   method: 'POST',
   url: '/api/v1/user/order/add',
-  data: postData
+  data: JSON.stringify(postData)
 })

+ 0 - 8
htmldev/dashboard/src/views/show/plan/api/index.js

@@ -1,13 +1,5 @@
 import request from '@/api/request'
 
-/**
- * 获取酒吧列表
- */
-export const apiBarList = () => request({
-  method: 'GET',
-  url: '/api/v1/bar/list'
-})
-
 /**
  * 酒吧所有演出计划
  * @param id 酒吧ID