diff --git a/.gitignore b/.gitignore index dd873ba..afc13f6 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,7 @@ dist-ssr *.njsproj *.sln *.sw? +sub-operation-service/package-lock.json +main/package-lock.json +sub-operation-service/vite.config.js +main/.eslintrc.cjs diff --git a/main/.eslintrc.cjs b/main/.eslintrc.cjs index 388fc20..e1ca881 100644 --- a/main/.eslintrc.cjs +++ b/main/.eslintrc.cjs @@ -39,7 +39,12 @@ module.exports = { }, // 这里时配置规则的,自己看情况配置 rules: { - 'prettier/prettier': 'error', + 'prettier/prettier': [ + 'error', + { + endOfLine: 'auto', // 允许自动检测换行符 + }, + ], 'no-debugger': 'off', 'no-unused-vars': 'off', 'vue/multi-word-component-names': 'off', diff --git a/sub-operation-service/.env.development b/sub-operation-service/.env.development index ea21177..ac85243 100644 --- a/sub-operation-service/.env.development +++ b/sub-operation-service/.env.development @@ -3,7 +3,7 @@ VITE_PORT = 9526 VITE_APP_MIAN = 'daimp-front-main' VITE_APP_MIAN_URL = 'http://localhost:9000' VITE_APP_NAME = 'sub-operation-service' -VITE_APP_BASE_API = '/platform' +VITE_APP_BASE_API = '/apis' VITE_APP_BASE_URL = 'http://192.168.18.99:88' VITE_APP_UPLOAD_API = '/uploadApis' VITE_APP_UPLOAD_URL = 'http://192.168.18.99:9300' diff --git a/sub-operation-service/src/apis/agricultural.js b/sub-operation-service/src/apis/agricultural.js new file mode 100644 index 0000000..ff83237 --- /dev/null +++ b/sub-operation-service/src/apis/agricultural.js @@ -0,0 +1,19 @@ +import request from '@/utils/axios'; + +//农资 + +//获取农资分类查询数据 +export function transaction(params = {}) { + return request('goods/business/category/transactionType?type=1', { + method: 'GET', + params, + }); +} + +//获取农资列表数据 +export function agriculturalList(params) { + return request('goods/business/category/transactionGoodInfo', { + method: 'GET', + params, + }); +} \ No newline at end of file diff --git a/sub-operation-service/src/assets/images/userCenter/menu1-1.png b/sub-operation-service/src/assets/images/userCenter/menu1-1.png new file mode 100644 index 0000000..7c0e779 Binary files /dev/null and b/sub-operation-service/src/assets/images/userCenter/menu1-1.png differ diff --git a/sub-operation-service/src/assets/images/userCenter/menu1.png b/sub-operation-service/src/assets/images/userCenter/menu1.png new file mode 100644 index 0000000..ea12279 Binary files /dev/null and b/sub-operation-service/src/assets/images/userCenter/menu1.png differ diff --git a/sub-operation-service/src/assets/images/userCenter/menu2-1.png b/sub-operation-service/src/assets/images/userCenter/menu2-1.png new file mode 100644 index 0000000..03e88b5 Binary files /dev/null and b/sub-operation-service/src/assets/images/userCenter/menu2-1.png differ diff --git a/sub-operation-service/src/assets/images/userCenter/menu2.png b/sub-operation-service/src/assets/images/userCenter/menu2.png new file mode 100644 index 0000000..cf2e9a2 Binary files /dev/null and b/sub-operation-service/src/assets/images/userCenter/menu2.png differ diff --git a/sub-operation-service/src/assets/images/userCenter/menu3-1.png b/sub-operation-service/src/assets/images/userCenter/menu3-1.png new file mode 100644 index 0000000..b02c8ae Binary files /dev/null and b/sub-operation-service/src/assets/images/userCenter/menu3-1.png differ diff --git a/sub-operation-service/src/assets/images/userCenter/menu3.png b/sub-operation-service/src/assets/images/userCenter/menu3.png new file mode 100644 index 0000000..45d173a Binary files /dev/null and b/sub-operation-service/src/assets/images/userCenter/menu3.png differ diff --git a/sub-operation-service/src/components/costomImg.vue b/sub-operation-service/src/components/costomImg.vue index 8dbe864..989f648 100644 --- a/sub-operation-service/src/components/costomImg.vue +++ b/sub-operation-service/src/components/costomImg.vue @@ -79,24 +79,23 @@ const toPreview = () => { } .viewer-btn-warp { position: absolute; + top: 50%; + left: 0; display: none; width: 100%; text-align: center; - top: 50%; - left: 0; transform: translateY(-50%); } .viewer-btn { - background: $color-balck-mask; display: inline-block; padding: 4px 8px; + font-size: 14px; border-radius: 16px; color: $color-fff; - font-size: 14px; + background: $color-balck-mask; cursor: pointer; } } - .c-custom-img-warp:hover { .viewer-btn-warp { display: inline-block !important; diff --git a/sub-operation-service/src/components/page-layout/index.vue b/sub-operation-service/src/components/page-layout/index.vue index 13ebba5..cf5ec2e 100644 --- a/sub-operation-service/src/components/page-layout/index.vue +++ b/sub-operation-service/src/components/page-layout/index.vue @@ -19,30 +19,28 @@ const props = defineProps({ diff --git a/sub-operation-service/src/components/page-menu/index-bak.vue b/sub-operation-service/src/components/page-menu/index-bak.vue index 211e932..4e67376 100644 --- a/sub-operation-service/src/components/page-menu/index-bak.vue +++ b/sub-operation-service/src/components/page-menu/index-bak.vue @@ -49,17 +49,15 @@ const todo = (row, toggle) => { .page-menu { width: 100%; height: 100%; - &-item { - width: 100%; - @include flex-column(); padding: 16px; + width: 100%; cursor: pointer; - + @include flex-column; .menu { - @include flex-row(); - align-items: center; + @include flex-row; + align-items: center; .item-img, .item-title { vertical-align: middle; @@ -70,48 +68,42 @@ const todo = (row, toggle) => { height: 32px; } .item-title { - flex: 1; + padding-left: 8px; font-size: 20px; font-weight: 400; - padding-left: 8px; - @include ellipsis(); + flex: 1; + @include ellipsis; } .el-icon { color: $color-primary; } - &.active { color: $color-primary; } } - .sub-menu { - padding: 10px 0; display: block; - + padding: 10px 0; &.toggle { display: none; } - li { - padding: 16px; - @include flex-row(); align-items: center; - + padding: 16px; + @include flex-row; &::before { - @include icon-space(); + @include icon-space; + + margin-right: 22px; width: 5px; height: 5px; border-radius: 3px; - background-color: #000; - margin-right: 22px; + background-color: #000000; } - .sub-title { font-size: 16px; - @include ellipsis(); + @include ellipsis; } - &.active { &::before { background-color: $color-primary; diff --git a/sub-operation-service/src/components/page-menu/index.vue b/sub-operation-service/src/components/page-menu/index.vue index c5dfd6e..3870c26 100644 --- a/sub-operation-service/src/components/page-menu/index.vue +++ b/sub-operation-service/src/components/page-menu/index.vue @@ -57,20 +57,20 @@ const active = computed(() => { :deep(.el-sub-menu__title) { font-size: 20px; font-weight: 400; - &:hover { - background-color: #fff; color: $color-primary; + background-color: #ffffff; } } :deep(.el-menu-item) { - @include flex-row(); + @include flex-row; + align-items: center; padding: 0 16px !important; } :deep(.el-sub-menu .el-menu-item) { - font-size: 16px; padding-left: 50px !important; + font-size: 16px; &:hover { .icon-dot { background-color: $color-primary; @@ -81,7 +81,7 @@ const active = computed(() => { font-size: 20px; } :deep(.el-menu-item.is-active) { - background-color: #fff; + background-color: #ffffff; } &:not(.el-menu--collapse) { height: 100%; diff --git a/sub-operation-service/src/components/page-pagination/index.vue b/sub-operation-service/src/components/page-pagination/index.vue index 6a5a058..3a9de61 100644 --- a/sub-operation-service/src/components/page-pagination/index.vue +++ b/sub-operation-service/src/components/page-pagination/index.vue @@ -31,9 +31,9 @@ const emit = defineEmits(['current-change', 'size-change']); diff --git a/sub-operation-service/src/layouts/component/Header/index.vue b/sub-operation-service/src/layouts/component/Header/index.vue index 65a8baf..6d84170 100644 --- a/sub-operation-service/src/layouts/component/Header/index.vue +++ b/sub-operation-service/src/layouts/component/Header/index.vue @@ -115,11 +115,12 @@ const toHome = () => { }; const toUserCenter = () => { + console.info('toUserCenter', router); router.push('/sub-operation-service/userCenter'); }; const toCart = () => { - router.push('/sub-operation-service/userCenter-shoppingCart'); + router.push('/sub-operation-service/userCenter'); }; @@ -139,12 +140,12 @@ const toCart = () => { font-size: 20px; } .el-menu-item:hover { - background: none !important; color: $color-main; + background: none !important; } .el-menu-item:active { - background: none !important; color: $color-main; + background: none !important; } } } @@ -154,16 +155,16 @@ const toCart = () => { // height: 100%; // box-sizing: border-box; &-header { - width: 1200px; - height: 206px; overflow: hidden; margin: auto; + width: 1200px; + height: 206px; &-top { display: flex; - height: 44px; justify-content: space-between; align-items: center; padding: 0 32px; + height: 44px; &-left { line-height: 36px; .welcome-msg { @@ -171,15 +172,15 @@ const toCart = () => { color: $color-5a; } .left-link { - color: $color-main; + display: inline-block; margin: 0 10px; font-size: 12px; + color: $color-main; cursor: pointer; - display: inline-block; .iconfont { - color: $color-main; display: inline-block; margin-right: 2px; + color: $color-main; } .iconfont, span { @@ -189,16 +190,15 @@ const toCart = () => { } &-right { span { - color: $color-000; margin-left: 25px; - line-height: 36px; font-size: 12px; text-align: center; + color: $color-000; + line-height: 36px; cursor: pointer; &:nth-child(1) { margin-left: 0; } - &.block-icon { .iconfont { display: inline-block; @@ -210,10 +210,11 @@ const toCart = () => { } } span { - margin-left: 6px; display: inline-block; + margin-left: 6px; vertical-align: middle; } + color: $color-main; } } @@ -236,27 +237,26 @@ const toCart = () => { white-space: nowrap; } .search-warp { - width: 100%; - padding-left: 36px; position: relative; + padding-left: 36px; + width: 100%; .el-input { - flex-grow: 1; + width: 100%; height: 50px; font-size: 18px; - width: 100%; + flex-grow: 1; :deep(.el-input__wrapper) { padding-right: 100px; } } - .el-button { position: absolute; - right: 8px; top: 50%; - transform: translateY(-50%); - font-size: 18px; + right: 8px; padding: 0 24px; height: 42px; + font-size: 18px; + transform: translateY(-50%); } } } @@ -270,8 +270,8 @@ const toCart = () => { } &-right { margin-top: -10px; - width: 240px; padding-left: 20px; + width: 240px; p { text-align: center; } diff --git a/sub-operation-service/src/layouts/component/Main/index.vue b/sub-operation-service/src/layouts/component/Main/index.vue index de3bddf..09c10b8 100644 --- a/sub-operation-service/src/layouts/component/Main/index.vue +++ b/sub-operation-service/src/layouts/component/Main/index.vue @@ -35,14 +35,14 @@ const isReload = computed(() => SettingStore.isReload); display: flex; width: 100%; height: 100%; - @include scrollable(); - box-sizing: border-box; + @include scrollable; + box-sizing: border-box; &-inner { - width: 100%; padding: 10px; - box-sizing: border-box; + width: 100%; background-color: #f5f5f5; + box-sizing: border-box; } } diff --git a/sub-operation-service/src/layouts/component/UserMenu/index.vue b/sub-operation-service/src/layouts/component/UserMenu/index.vue index 99de0fa..947043f 100644 --- a/sub-operation-service/src/layouts/component/UserMenu/index.vue +++ b/sub-operation-service/src/layouts/component/UserMenu/index.vue @@ -69,22 +69,21 @@ const toHome = () => { div { box-sizing: border-box; } - .layout-user-centre-warp { - width: 320px; - text-align: center; display: inline-block; - height: 100vh; padding: 16px; + width: 320px; + height: 100vh; + text-align: center; .layout-user-centre { - height: calc(100% - 0px); - background: $color-fff; overflow: auto; + height: calc(100% - 0px); border-radius: 16px; + background: $color-fff; } .layout-user-centre-top { - width: 100%; padding: 8px; + width: 100%; .logo-warp { height: 74px; } @@ -95,7 +94,6 @@ div { .el-menu-item { font-size: 20px; font-weight: 400; - .iconfont { display: inline-block; vertical-align: middle; diff --git a/sub-operation-service/src/layouts/index.vue b/sub-operation-service/src/layouts/index.vue index 230e96e..dd707f2 100644 --- a/sub-operation-service/src/layouts/index.vue +++ b/sub-operation-service/src/layouts/index.vue @@ -12,17 +12,16 @@ import Main from './component/Main'; diff --git a/sub-operation-service/src/layouts/userCentre.vue b/sub-operation-service/src/layouts/userCentre.vue index 774e60d..8d29f79 100644 --- a/sub-operation-service/src/layouts/userCentre.vue +++ b/sub-operation-service/src/layouts/userCentre.vue @@ -15,13 +15,13 @@ const SettingStore = useSettingStore(); diff --git a/sub-operation-service/src/views/smartFarm/components/common.vue b/sub-operation-service/src/views/smartFarm/components/common.vue index 85d3899..6d16ef4 100644 --- a/sub-operation-service/src/views/smartFarm/components/common.vue +++ b/sub-operation-service/src/views/smartFarm/components/common.vue @@ -28,25 +28,25 @@ const props = defineProps({ height: calc(100vh - 230px); text-align: center; .ecommerce-common-content { - width: $width-main; - margin: auto; - height: 100%; display: inline-flex; justify-content: space-between; + margin: auto; + width: $width-main; + height: 100%; .left-menu, .common-content { + overflow-y: auto; + padding: 8px; height: calc(100% - 16px); border-radius: 8px; - padding: 8px; - overflow-y: auto; } .left-menu { width: 240px; background: $color-fff; } .common-content { - width: calc(100% - 240px); margin-left: 16px; + width: calc(100% - 240px); } } } diff --git a/sub-operation-service/src/views/smartFarm/components/leftMenu.vue b/sub-operation-service/src/views/smartFarm/components/leftMenu.vue index d04774e..d9d9446 100644 --- a/sub-operation-service/src/views/smartFarm/components/leftMenu.vue +++ b/sub-operation-service/src/views/smartFarm/components/leftMenu.vue @@ -24,7 +24,7 @@
-
-
+ + + +
+
+ + +
@@ -52,53 +59,53 @@ const toLink = (item) => {