zjs_project пре 2 недеља
родитељ
комит
8eca601d24

+ 5 - 7
package-lock.json

@@ -570,6 +570,11 @@
         "fastq": "^1.6.0"
       }
     },
+    "@popperjs/core": {
+      "version": "npm:@sxzz/popperjs-es@2.11.7",
+      "resolved": "https://mirrors.huaweicloud.com/repository/npm/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
+      "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
+    },
     "@rollup/pluginutils": {
       "version": "4.2.1",
       "resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz",
@@ -2071,13 +2076,6 @@
         "lodash-unified": "^1.0.2",
         "memoize-one": "^6.0.0",
         "normalize-wheel-es": "^1.1.2"
-      },
-      "dependencies": {
-        "@popperjs/core": {
-          "version": "npm:@sxzz/popperjs-es@2.11.7",
-          "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
-          "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
-        }
       }
     },
     "emojis-list": {

+ 4 - 0
src/api/order.ts

@@ -43,3 +43,7 @@ export function orderSubmit(params?: any) {
 export function orderCheckout(params?: any) {
     return request.get({ url: '/order/checkout', params })
 }
+
+export function deskOrderedDishListAll(params?: any) {
+    return request.get({ url: '/orders/orderDishes', params }) //已点商品
+}

+ 1 - 1
src/config/index.ts

@@ -2,7 +2,7 @@ const config = {
     terminal: 1, //终端
     title: '后台管理系统', //网站默认标题
     version: '1.4.0', //版本号
-    baseUrl: `${import.meta.env.VITE_APP_BASE_URL || 'http://192.168.50.19:5555/elab-marketing-file'}/`, //请求接口域名 http://192.168.50.19:5555/elab-marketing-file
+    baseUrl: `${import.meta.env.VITE_APP_BASE_URL || 'https://gatewaytest1.elab-plus.com/elab-marketing-file'}/`, //请求接口域名 http://192.168.50.19:5555/elab-marketing-file
     urlPrefix: 'api', //请求默认前缀
     timeout: 10 * 1000 //请求超时时长
 }

+ 1 - 0
src/enums/requestEnums.ts

@@ -23,6 +23,7 @@ export enum RequestCodeEnum {
     TOKEN_EMPTY = 332, // TOKEN参数为空
     TOKEN_INVALID = 333, // TOKEN参数无效
     VERIFICATION_CODE_ERROR = 334, // 验证码错误
+    QUIT = 401, //登出
     NO_PERMISSTION = 403, //无相关权限
     REQUEST_404_ERROR = 404, //请求接口不存在
     SYSTEM_ERROR = 500 //系统错误

+ 2 - 0
src/utils/request/index.ts

@@ -22,6 +22,7 @@ const axiosHooks: AxiosHooks = {
         if (withToken) {
             const token = getToken()
             headers['like-admin'] = token
+            headers['token'] = token
         }
         // POST请求下如果无data,则将params视为data
         if (
@@ -75,6 +76,7 @@ const axiosHooks: AxiosHooks = {
 
             case RequestCodeEnum.TOKEN_INVALID:
             case RequestCodeEnum.TOKEN_EMPTY:
+            case RequestCodeEnum.QUIT:
                 clearAuthInfo()
                 router.push(PageEnum.LOGIN)
                 return Promise.reject()

+ 5 - 2
src/views/dish/lists/edit.vue

@@ -113,7 +113,7 @@ const formData = reactive<any>({
     visit: 0,
     sort: 0,
     isShow: 1,
-    summary: ''
+    summary: 0
 })
 
 const { removeTab } = useMultipleTabs()
@@ -131,7 +131,10 @@ const getDetails = async () => {
     })
     Object.keys(formData).forEach((key) => {
         //@ts-ignore
-        formData[key] = data[key]
+        formData[key] = data[key];
+        if(key=='summary'){
+            formData[key] = Number(formData[key])
+        }
     })
 }
 

+ 3 - 0
src/views/shop/info.vue

@@ -217,6 +217,9 @@ const getData = async () => {
         //@ts-ignore
         formData[key] = data[key]
     }
+    if(!formData.image){//不能是null,会报错
+        formData.image = '';
+    }
 }
 
 // 保存店铺信息