From e7209ce566303a9bb2a9a591c2bfe90ee1aff2f9 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Tue, 5 Dec 2023 20:08:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/package-lock.json | 27 ++++++ admin/package.json | 2 + admin/src/api/land.ts | 5 + admin/src/api/product.ts | 7 +- admin/src/config/index.ts | 4 +- admin/src/views/land/edit.vue | 10 +- admin/src/views/product/edit.vue | 94 +++++++++++++++---- admin/yarn.lock | 10 ++ .../controller/user/UserController.php | 11 +++ app/adminapi/logic/land/LandLogic.php | 13 ++- app/adminapi/logic/user/UserLogic.php | 27 ++++++ app/common/model/user/User.php | 2 +- 12 files changed, 187 insertions(+), 25 deletions(-) diff --git a/admin/package-lock.json b/admin/package-lock.json index 228c77e7..0f3f2af2 100644 --- a/admin/package-lock.json +++ b/admin/package-lock.json @@ -21,6 +21,7 @@ "highlight.js": "^11.6.0", "nprogress": "^0.2.0", "pinia": "^2.0.14", + "uuid": "^9.0.1", "vue": "^3.2.37", "vue-clipboard3": "^2.0.0", "vue-echarts": "^6.2.3", @@ -34,6 +35,7 @@ "@types/lodash-es": "^4.17.6", "@types/node": "^16.11.41", "@types/nprogress": "^0.2.0", + "@types/uuid": "^9.0.7", "@vitejs/plugin-legacy": "^2.3.1", "@vitejs/plugin-vue": "^3.0.0", "@vitejs/plugin-vue-jsx": "^2.0.0", @@ -899,6 +901,12 @@ "@types/node": "*" } }, + "node_modules/@types/uuid": { + "version": "9.0.7", + "resolved": "https://registry.npmmirror.com/@types/uuid/-/uuid-9.0.7.tgz", + "integrity": "sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==", + "dev": true + }, "node_modules/@types/web-bluetooth": { "version": "0.0.14", "resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.14.tgz", @@ -7046,6 +7054,14 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmmirror.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", @@ -8097,6 +8113,12 @@ "@types/node": "*" } }, + "@types/uuid": { + "version": "9.0.7", + "resolved": "https://registry.npmmirror.com/@types/uuid/-/uuid-9.0.7.tgz", + "integrity": "sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==", + "dev": true + }, "@types/web-bluetooth": { "version": "0.0.14", "resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.14.tgz", @@ -13056,6 +13078,11 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, + "uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" + }, "v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmmirror.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", diff --git a/admin/package.json b/admin/package.json index 8b650313..2f814ffb 100644 --- a/admin/package.json +++ b/admin/package.json @@ -22,6 +22,7 @@ "highlight.js": "^11.6.0", "nprogress": "^0.2.0", "pinia": "^2.0.14", + "uuid": "^9.0.1", "vue": "^3.2.37", "vue-clipboard3": "^2.0.0", "vue-echarts": "^6.2.3", @@ -35,6 +36,7 @@ "@types/lodash-es": "^4.17.6", "@types/node": "^16.11.41", "@types/nprogress": "^0.2.0", + "@types/uuid": "^9.0.7", "@vitejs/plugin-legacy": "^2.3.1", "@vitejs/plugin-vue": "^3.0.0", "@vitejs/plugin-vue-jsx": "^2.0.0", diff --git a/admin/src/api/land.ts b/admin/src/api/land.ts index 91a62335..4b362fe9 100644 --- a/admin/src/api/land.ts +++ b/admin/src/api/land.ts @@ -38,4 +38,9 @@ export function apiLandDetail(params: any) { // 绑定产品 export function apiLandBind(params: any) { return request.post({ url: '/land.land/bind', params }) +} + +// 用户信息 +export function getUserInfo() { + return request.get({ url: '/auth.admin/mySelf' }) } \ No newline at end of file diff --git a/admin/src/api/product.ts b/admin/src/api/product.ts index b197a598..750651a7 100644 --- a/admin/src/api/product.ts +++ b/admin/src/api/product.ts @@ -2,7 +2,7 @@ import request from '@/utils/request' // 用户列表 export function getUserList(params: any) { - return request.get({ url: '/user.user/lists', params }, { ignoreCancelToken: true }) + return request.get({ url: '/user.user/datas', params }, { ignoreCancelToken: true }) } // 土地表列表 @@ -44,4 +44,9 @@ export function apiProductDetail(params: any) { // 绑定设备 export function apiProductBind(params: any) { return request.post({ url: '/land.product/bind', params }) +} + +// 用户信息 +export function getUserInfo() { + return request.get({ url: '/auth.admin/mySelf' }) } \ No newline at end of file diff --git a/admin/src/config/index.ts b/admin/src/config/index.ts index 10bbb3da..4bf4e940 100644 --- a/admin/src/config/index.ts +++ b/admin/src/config/index.ts @@ -2,8 +2,8 @@ const config = { terminal: 1, //终端 title: '后台管理系统', //网站默认标题 version: '1.6.0', //版本号 - baseUrl: `${import.meta.env.VITE_APP_BASE_URL || ''}/`, //请求接口域名 - // baseUrl: 'http://127.0.0.1:30005/', + // baseUrl: `${import.meta.env.VITE_APP_BASE_URL || ''}/`, //请求接口域名 + baseUrl: 'http://127.0.0.1:30005/', urlPrefix: 'adminapi', //请求默认前缀 timeout: 10 * 1000 //请求超时时长 } diff --git a/admin/src/views/land/edit.vue b/admin/src/views/land/edit.vue index 9e54d2f0..f8416602 100644 --- a/admin/src/views/land/edit.vue +++ b/admin/src/views/land/edit.vue @@ -92,7 +92,7 @@