qinyan 1 year ago
parent
commit
8f107ec9bd
38 changed files with 99 additions and 101 deletions
  1. 1 1
      src/dict/apis.ts
  2. 6 7
      src/modules-ctx/matchCtx/index.ts
  3. 0 3
      src/modules/collocation/module/actions/init.ts
  4. 4 5
      src/modules/match/index.ts
  5. 2 2
      src/modules/match/module/actions/design.ts
  6. 3 0
      src/modules/match/module/actions/init.ts
  7. 2 2
      src/modules/match/module/actions/match.ts
  8. 2 2
      src/modules/match/module/helper.ts
  9. 2 2
      src/modules/match/module/http.ts
  10. 2 2
      src/modules/match/module/stores/design.ts
  11. 0 5
      src/pages/collocation/index.ts
  12. 0 0
      src/pages/match/Design/components/DesignListModel.tsx
  13. 0 0
      src/pages/match/Design/components/OperationModal.tsx
  14. 4 4
      src/pages/match/Design/components/Thumbnail.tsx
  15. 11 11
      src/pages/match/Design/index.tsx
  16. 0 0
      src/pages/match/Editor/components/Canvas3d.tsx
  17. 6 6
      src/pages/match/Editor/components/Header/index.tsx
  18. 0 0
      src/pages/match/Editor/components/RightPanel/Mat/Group.a.tsx
  19. 0 0
      src/pages/match/Editor/components/RightPanel/Mat/MatItem.tsx
  20. 14 14
      src/pages/match/Editor/components/RightPanel/Mat/index.tsx
  21. 0 0
      src/pages/match/Editor/components/RightPanel/Product/ProductItem.tsx
  22. 13 13
      src/pages/match/Editor/components/RightPanel/Product/index.tsx
  23. 0 0
      src/pages/match/Editor/components/RightPanel/components/PanelCard.tsx
  24. 0 0
      src/pages/match/Editor/components/RightPanel/components/PanelGroup.tsx
  25. 0 0
      src/pages/match/Editor/components/RightPanel/components/PanelItem.tsx
  26. 0 0
      src/pages/match/Editor/components/RightPanel/components/Tools.tsx
  27. 3 3
      src/pages/match/Editor/components/RightPanel/index.tsx
  28. 0 0
      src/pages/match/Editor/components/SourcePanel/index.tsx
  29. 6 6
      src/pages/match/Editor/index.tsx
  30. 2 2
      src/pages/match/Marchant/Category.tsx
  31. 3 6
      src/pages/match/Marchant/Shoplogo.tsx
  32. 3 3
      src/pages/match/Marchant/index.tsx
  33. 4 1
      src/pages/match/components/AvatarDropDown.tsx
  34. 0 0
      src/pages/match/components/BasicLayout.tsx
  35. 0 0
      src/pages/match/components/FormItem.tsx
  36. 5 0
      src/pages/match/index.ts
  37. 0 0
      src/pages/match/router.ts
  38. 1 1
      vue.config.js

+ 1 - 1
src/dict/apis.ts

@@ -1,6 +1,6 @@
 // const baseURL = "https://www.3dqueen.cloud";
 // const baseURL = "http://192.168.110.180:8910";
-// baseURL: "http://192.168.110.115:53931",
+// const baseURL = "http://192.168.110.115:53931";
 const baseURL = "http://192.168.110.227:54879";
 
 const baseVersion = "/cloud/v1";

+ 6 - 7
src/modules-ctx/collocationCtx/index.ts → src/modules-ctx/matchCtx/index.ts

@@ -1,11 +1,12 @@
-import { initCollocation } from "@/modules/collocation";
+import { Dict_Apis } from "@/dict/apis";
 import { initAuthDef } from "@/modules/_default/auth";
+import { initMatch } from "@/modules/match";
 import { initQueditor } from "@queenjs-modules/queditor";
 import { initExpViewer } from "@queenjs-modules/queentree-explorer-viewer";
 import { ModuleRoot } from "queenjs";
 import "../storage";
 
-export class CollocationCtxModule extends ModuleRoot {
+export class MatchCtxModule extends ModuleRoot {
   store = {};
   onReady() {
     const auth = initAuthDef();
@@ -23,16 +24,14 @@ export class CollocationCtxModule extends ModuleRoot {
       },
     });
 
-    initCollocation({
+    initMatch({
       config: {
         httpConfig: {
-          // baseURL: "http://192.168.110.115:53931",
-          baseURL: "http://192.168.110.226:62293",
+          baseURL: Dict_Apis.match,
         },
       },
     });
   }
 }
 
-export const { initCollocationCtx, useCollocationCtx } =
-  CollocationCtxModule.hook("CollocationCtx");
+export const { initMatchCtx, useMatchCtx } = MatchCtxModule.hook("MatchCtx");

+ 0 - 3
src/modules/collocation/module/actions/init.ts

@@ -1,3 +0,0 @@
-import { CollocationModule } from "../..";
-
-export const initAction = CollocationModule.action("once", {});

+ 4 - 5
src/modules/collocation/index.ts → src/modules/match/index.ts

@@ -1,19 +1,19 @@
 import { initExpViewer } from "@queenjs-modules/queentree-explorer-viewer";
 import { PageListController, UploadController } from "@queenjs/controllers";
 import { ModuleRoot } from "queenjs";
-import { collocationAction } from "./module/actions/collocation";
+import { matchAction } from "./module/actions/match";
 import { designAction } from "./module/actions/design";
 import { initAction } from "./module/actions/init";
 import { helper } from "./module/helper";
 import { https } from "./module/http";
 import { designStore } from "./module/stores/design";
 
-export class CollocationModule extends ModuleRoot {
+export class MatchModule extends ModuleRoot {
   config = this.setConfig({});
   https = this.createHttps([https]);
   store = this.createStore(designStore);
   helper = this.createHelper(helper);
-  actions = this.createActions([initAction, collocationAction, designAction]);
+  actions = this.createActions([initAction, matchAction, designAction]);
 
   controls = {
     listCtrl: new PageListController(this.config?.httpConfig),
@@ -33,5 +33,4 @@ export class CollocationModule extends ModuleRoot {
   }
 }
 
-export const { initCollocation, useCollocation } =
-  CollocationModule.hook("Collocation");
+export const { initMatch, useMatch } = MatchModule.hook("Match");

+ 2 - 2
src/modules/collocation/module/actions/design.ts → src/modules/match/module/actions/design.ts

@@ -1,8 +1,8 @@
 import { ScenePackageSource } from "@queenjs-modules/queditor/module/objects/scenePack";
 import { queenApi } from "queenjs";
-import { CollocationModule } from "../..";
+import { MatchModule } from "../..";
 
-export const designAction = CollocationModule.action({
+export const designAction = MatchModule.action({
   async delDesign(item: IStyle) {
     const result = await queenApi.showConfirm({
       title: "删除提示",

+ 3 - 0
src/modules/match/module/actions/init.ts

@@ -0,0 +1,3 @@
+import { MatchModule } from "../..";
+
+export const initAction = MatchModule.action("once", {});

+ 2 - 2
src/modules/collocation/module/actions/collocation.ts → src/modules/match/module/actions/match.ts

@@ -1,7 +1,7 @@
 import { queenApi } from "queenjs";
-import { CollocationModule } from "../..";
+import { MatchModule } from "../..";
 
-export const collocationAction = CollocationModule.action({
+export const matchAction = MatchModule.action({
   async queryStyleDetail(id: string) {
     const res = await this.https.getStyleDetail(id);
     this.store.setDesignDetail(res.result);

+ 2 - 2
src/modules/collocation/module/helper.ts → src/modules/match/module/helper.ts

@@ -1,6 +1,6 @@
-import { CollocationModule } from "..";
+import { MatchModule } from "..";
 
-export const helper = CollocationModule.helper({
+export const helper = MatchModule.helper({
   findMatById(matId: string) {
     // TODO use queditor source
     const source = this.store.designDetail.scenePack.source;

+ 2 - 2
src/modules/collocation/module/http.ts → src/modules/match/module/http.ts

@@ -1,6 +1,6 @@
-import { CollocationModule } from "..";
+import { MatchModule } from "..";
 
-export const https = CollocationModule.http({
+export const https = MatchModule.http({
   getStyleDetail(id: string) {
     return this.request(`match/style/detail/${id}`, {
       method: "GET",

+ 2 - 2
src/modules/collocation/module/stores/design.ts → src/modules/match/module/stores/design.ts

@@ -1,6 +1,6 @@
-import { CollocationModule } from "../..";
+import { MatchModule } from "../..";
 
-export const designStore = CollocationModule.store({
+export const designStore = MatchModule.store({
   state: () => ({
     editType: "mat",
     designDetail: {

+ 0 - 5
src/pages/collocation/index.ts

@@ -1,5 +0,0 @@
-import { startApp } from "@/App";
-import { initCollocationCtx } from "@/modules-ctx/collocationCtx";
-import router from "./router";
-
-startApp(router, [initCollocationCtx]);

+ 0 - 0
src/pages/collocation/Design/components/DesignListModel.tsx → src/pages/match/Design/components/DesignListModel.tsx


+ 0 - 0
src/pages/collocation/Design/components/OperationModal.tsx → src/pages/match/Design/components/OperationModal.tsx


+ 4 - 4
src/pages/collocation/Design/components/Thumbnail.tsx → src/pages/match/Design/components/Thumbnail.tsx

@@ -1,4 +1,4 @@
-import { useCollocation } from "@/modules/collocation";
+import { useMatch } from "@/modules/match";
 import { css } from "@linaria/core";
 import { IconAddImg } from "@queenjs/icons";
 import { Image } from "@queenjs/ui";
@@ -14,7 +14,7 @@ export default defineComponent({
   },
   emits: ["update:value"],
   setup(props, { emit }) {
-    const collocation = useCollocation();
+    const match = useMatch();
     const modal = useModal();
 
     const state = reactive({
@@ -22,7 +22,7 @@ export default defineComponent({
     }) as any;
 
     const selectDesign = async () => {
-      collocation.showModal(<DesignListModel />, {
+      match.showModal(<DesignListModel />, {
         // title: "选择模型",
         width: "800px",
         onOk: async (v: any) => {
@@ -52,7 +52,7 @@ export default defineComponent({
           return false;
         }
       }
-      const res = await collocation.controls.uploader.uploadFile(
+      const res = await match.controls.uploader.uploadFile(
         blob,
         "thumbnail"
       );

+ 11 - 11
src/pages/collocation/Design/index.tsx → src/pages/match/Design/index.tsx

@@ -1,4 +1,4 @@
-import { useCollocation } from "@/modules/collocation";
+import { useMatch } from "@/modules/match";
 import { css } from "@linaria/core";
 import { Image } from "@queenjs/ui";
 import { Button, Space, Table } from "ant-design-vue";
@@ -9,7 +9,7 @@ import OperationModal from "./components/OperationModal";
 
 export default defineComponent({
   setup() {
-    const collocation = useCollocation();
+    const match = useMatch();
 
     const columns: ColumnsType = [
       {
@@ -53,7 +53,7 @@ export default defineComponent({
               <Button
                 danger
                 type="text"
-                onClick={() => collocation.actions.delDesign(record)}
+                onClick={() => match.actions.delDesign(record)}
               >
                 删除
               </Button>
@@ -64,23 +64,23 @@ export default defineComponent({
     ];
 
     onMounted(() => {
-      collocation.controls.listCtrl.loadPage(1, 20);
+      match.controls.listCtrl.loadPage(1, 20);
     });
 
     const showAddDesign = async () => {
-      const values: IStyle = await collocation.showModal(<OperationModal />, {
+      const values: IStyle = await match.showModal(<OperationModal />, {
         title: "添加可定制款式",
         width: "500px",
       });
       if (!values) return;
-      await collocation.actions.addDesign(values);
+      await match.actions.addDesign(values);
     };
 
     const showEdit = async (record: IStyle) => {
-      const res = await collocation.https.getStyleDetail(record._id);
+      const res = await match.https.getStyleDetail(record._id);
       if (!res) return false;
 
-      const values: IStyle = await collocation.showModal(
+      const values: IStyle = await match.showModal(
         <OperationModal data={res.result} />,
         {
           title: "编辑可定制款式",
@@ -90,12 +90,12 @@ export default defineComponent({
       if (!values) return;
 
       values._id = res.result._id;
-      await collocation.https.updateStyle(values);
-      collocation.controls.listCtrl.fresh();
+      await match.https.updateStyle(values);
+      match.controls.listCtrl.fresh();
     };
 
     return () => {
-      const listCtrl = collocation.controls.listCtrl;
+      const listCtrl = match.controls.listCtrl;
       return (
         <div class={DesignStyle}>
           <div class="mb-20px table_header">

+ 0 - 0
src/pages/collocation/Editor/components/Canvas3d.tsx → src/pages/match/Editor/components/Canvas3d.tsx


+ 6 - 6
src/pages/collocation/Editor/components/Header/index.tsx → src/pages/match/Editor/components/Header/index.tsx

@@ -1,4 +1,4 @@
-import { useCollocation } from "@/modules/collocation";
+import { useMatch } from "@/modules/match";
 import { css } from "@linaria/core";
 import { IconClose } from "@queenjs/icons";
 import { Radio, RadioChangeEvent, Space } from "ant-design-vue";
@@ -9,7 +9,7 @@ import { useRouter } from "vue-router";
 export default defineComponent({
   setup() {
     const router = useRouter();
-    const collocation = useCollocation();
+    const match = useMatch();
 
     async function close() {
       if (history.state.canSave) {
@@ -28,10 +28,10 @@ export default defineComponent({
     const changeGroup = (e: RadioChangeEvent) => {
       switch (e.target.value) {
         case "add":
-          collocation.actions.addMatchCategory();
+          match.actions.addMatchCategory();
           break;
         default:
-          collocation.store.setEditType(e.target.value);
+          match.store.setEditType(e.target.value);
           break;
       }
     };
@@ -44,8 +44,8 @@ export default defineComponent({
             <Radio.Group
               buttonStyle="solid"
               optionType="button"
-              value={collocation.store.editType}
-              options={collocation.store.menuOptions.options}
+              value={match.store.editType}
+              options={match.store.menuOptions.options}
               onChange={(e) => changeGroup(e)}
             />
           </div>

+ 0 - 0
src/pages/collocation/Editor/components/RightPanel/Mat/Group.a.tsx → src/pages/match/Editor/components/RightPanel/Mat/Group.a.tsx


+ 0 - 0
src/pages/collocation/Editor/components/RightPanel/Mat/MatItem.tsx → src/pages/match/Editor/components/RightPanel/Mat/MatItem.tsx


+ 14 - 14
src/pages/collocation/Editor/components/RightPanel/Mat/index.tsx → src/pages/match/Editor/components/RightPanel/Mat/index.tsx

@@ -1,4 +1,4 @@
-import { useCollocation } from "@/modules/collocation";
+import { useMatch } from "@/modules/match";
 import { useQueditor } from "@queenjs-modules/queditor";
 import { List } from "@queenjs/ui";
 import { queenApi } from "queenjs";
@@ -10,7 +10,7 @@ import MatItem from "./MatItem";
 export default defineComponent({
   setup() {
     const queditor = useQueditor();
-    const collocation = useCollocation();
+    const match = useMatch();
 
     queditor.controls.drager.on(
       "drop:selfDrop",
@@ -54,7 +54,7 @@ export default defineComponent({
     }
 
     function findmatsGroup(target: MatsMatchComp) {
-      const currGroup = collocation.store.menuOptions.sourceData.mat.find(
+      const currGroup = match.store.menuOptions.sourceData.mat.find(
         (r: MatsMatchComp) =>
           r.name == target.name && r.productId == target.productId
       );
@@ -64,13 +64,13 @@ export default defineComponent({
     const handleChange = (key: string, matsGroup: MatsMatchComp) => {
       switch (key) {
         case "rename":
-          collocation.actions.renameMatGroup();
+          match.actions.renameMatGroup();
           break;
         case "lock":
-          collocation.actions.lockMatGroup();
+          match.actions.lockMatGroup();
           break;
         case "clear":
-          collocation.actions.clearMatGroup(matsGroup);
+          match.actions.clearMatGroup(matsGroup);
           break;
       }
     };
@@ -81,12 +81,12 @@ export default defineComponent({
           title="部件库"
           onSave={() => {
             console.error(queditor.store.pack);
-            collocation.store.designDetail.scenePack.source =
+            match.store.designDetail.scenePack.source =
               queditor.store.pack;
-            collocation.actions.saveDesign();
+            match.actions.saveDesign();
           }}
         >
-          {collocation.store.menuOptions.sourceData?.mat.map(
+          {match.store.menuOptions.sourceData?.mat.map(
             (matsGroup: MatsMatchComp, index: number) => {
               return (
                 <PanelGroup
@@ -100,20 +100,20 @@ export default defineComponent({
                   tools={["rename", "lock", "clear"]}
                   target={matsGroup}
                   onChange={(key) => handleChange(key, matsGroup)}
-                  onSelect={collocation.actions.switchMatsGroup}
+                  onSelect={match.actions.switchMatsGroup}
                 >
                   <List data={matsGroup.matIds || []} columns={5} gap="5px">
                     {{
                       item: (matId: string, index: number) => {
                         const currentMats =
-                          collocation.helper.findMatById(matId);
+                          match.helper.findMatById(matId);
                         return (
                           <MatItem
                             key={matId}
                             mat={currentMats}
                             active={index == matsGroup.index}
                             onClick={() =>
-                              collocation.actions.switchMatsGroupIndex(
+                              match.actions.switchMatsGroupIndex(
                                 matsGroup,
                                 index
                               )
@@ -121,13 +121,13 @@ export default defineComponent({
                             onAction={(key: string) => {
                               switch (key) {
                                 case "delete":
-                                  collocation.actions.deleteGroupMat(
+                                  match.actions.deleteGroupMat(
                                     matsGroup,
                                     index
                                   );
                                   break;
                                 case "rename":
-                                  collocation.actions.renameGroupMat(
+                                  match.actions.renameGroupMat(
                                     currentMats
                                   );
                                   break;

+ 0 - 0
src/pages/collocation/Editor/components/RightPanel/Product/ProductItem.tsx → src/pages/match/Editor/components/RightPanel/Product/ProductItem.tsx


+ 13 - 13
src/pages/collocation/Editor/components/RightPanel/Product/index.tsx → src/pages/match/Editor/components/RightPanel/Product/index.tsx

@@ -1,4 +1,4 @@
-import { useCollocation } from "@/modules/collocation";
+import { useMatch } from "@/modules/match";
 import { List } from "@queenjs/ui";
 import { Button } from "ant-design-vue";
 import { defineComponent } from "vue";
@@ -9,18 +9,18 @@ import ProductItem from "./ProductItem";
 
 export default defineComponent({
   setup() {
-    const collocation = useCollocation();
+    const match = useMatch();
 
     const handleChange = (key: string, prodGroup: ProductMatching) => {
       switch (key) {
         case "rename":
-          collocation.actions.renameProductGroup(prodGroup);
+          match.actions.renameProductGroup(prodGroup);
           break;
         case "delete":
-          collocation.actions.deleteProductGroup(prodGroup);
+          match.actions.deleteProductGroup(prodGroup);
           break;
         case "clear":
-          collocation.actions.clearProductGroup();
+          match.actions.clearProductGroup();
           break;
       }
     };
@@ -39,37 +39,37 @@ export default defineComponent({
     function editCategory(key: string) {
       switch (key) {
         case "rename":
-          collocation.actions.renameMatchCategory();
+          match.actions.renameMatchCategory();
           break;
         case "delete":
-          collocation.actions.deleteMatchCategory();
+          match.actions.deleteMatchCategory();
           break;
       }
     }
 
     return () => {
-      const { menuOptions, editType } = collocation.store;
+      const { menuOptions, editType } = match.store;
       const currentType = menuOptions.options.find((o) => o.value == editType);
 
       return (
         <PanelCard
           title={currentType?.label}
-          onSave={collocation.actions.saveDesign}
+          onSave={match.actions.saveDesign}
           suffix={
             <Tools tools={["rename", "delete"]} onChange={editCategory} />
           }
         >
           <div class="mb-10px">
-            <a class="text-14px" onClick={collocation.actions.addCategoryGroup}>
+            <a class="text-14px" onClick={match.actions.addCategoryGroup}>
               添加分组
             </a>
           </div>
-          {collocation.store.currentGroupList?.length == 0 && (
+          {match.store.currentGroupList?.length == 0 && (
             <div class="my-30px text-gray-500 text-center text-12px">
               暂无分组
             </div>
           )}
-          {collocation.store.currentGroupList?.map(
+          {match.store.currentGroupList?.map(
             (prodGroup: ProductMatching, index: number) => {
               return (
                 <PanelGroup
@@ -92,7 +92,7 @@ export default defineComponent({
                             key={productId}
                             ratio={14 / 9}
                             active={prodGroup.index == index}
-                            data={collocation.helper.findProductById(productId)}
+                            data={match.helper.findProductById(productId)}
                             onClick={() =>
                               switchProductGroupIndex(prodGroup, index)
                             }

+ 0 - 0
src/pages/collocation/Editor/components/RightPanel/components/PanelCard.tsx → src/pages/match/Editor/components/RightPanel/components/PanelCard.tsx


+ 0 - 0
src/pages/collocation/Editor/components/RightPanel/components/PanelGroup.tsx → src/pages/match/Editor/components/RightPanel/components/PanelGroup.tsx


+ 0 - 0
src/pages/collocation/Editor/components/RightPanel/components/PanelItem.tsx → src/pages/match/Editor/components/RightPanel/components/PanelItem.tsx


+ 0 - 0
src/pages/collocation/Editor/components/RightPanel/components/Tools.tsx → src/pages/match/Editor/components/RightPanel/components/Tools.tsx


+ 3 - 3
src/pages/collocation/Editor/components/RightPanel/index.tsx → src/pages/match/Editor/components/RightPanel/index.tsx

@@ -1,14 +1,14 @@
-import { useCollocation } from "@/modules/collocation";
+import { useMatch } from "@/modules/match";
 import { defineComponent } from "vue";
 import Mat from "./Mat";
 import Product from "./Product";
 
 export default defineComponent({
   setup() {
-    const collocation = useCollocation();
+    const match = useMatch();
 
     return () => {
-      const { editType } = collocation.store;
+      const { editType } = match.store;
 
       if (editType == "mat") return <Mat />;
       return <Product />;

+ 0 - 0
src/pages/collocation/Editor/components/SourcePanel/index.tsx → src/pages/match/Editor/components/SourcePanel/index.tsx


+ 6 - 6
src/pages/collocation/Editor/index.tsx → src/pages/match/Editor/index.tsx

@@ -1,4 +1,4 @@
-import { useCollocation } from "@/modules/collocation";
+import { useMatch } from "@/modules/match";
 import { useExpViewer } from "@queenjs-modules/queentree-explorer-viewer";
 import { defineComponent, onMounted } from "vue";
 import { useRoute } from "vue-router";
@@ -9,7 +9,7 @@ export default defineComponent({
   setup() {
     const { params } = useRoute();
 
-    const collocatin = useCollocation();
+    const match = useMatch();
     const expViewer = useExpViewer();
 
     const { queditor } = expViewer.modules;
@@ -36,11 +36,11 @@ export default defineComponent({
     onMounted(() => init());
 
     const init = async () => {
-      collocatin.store.setEditType("mat");
-      await collocatin.actions.queryStyleDetail(params.id as string);
-      queditor.actions.initPack(collocatin.store.designDetail.scenePack.source);
+      match.store.setEditType("mat");
+      await match.actions.queryStyleDetail(params.id as string);
+      queditor.actions.initPack(match.store.designDetail.scenePack.source);
       queditor.store.setCurrScene(0);
-      expViewer.store.setEditNodeUid(collocatin.store.designDetail._id);
+      expViewer.store.setEditNodeUid(match.store.designDetail._id);
     };
 
     return () => (

+ 2 - 2
src/pages/collocation/Marchant/Category.tsx → src/pages/match/Marchant/Category.tsx

@@ -1,4 +1,4 @@
-import { useCollocation } from "@/modules/collocation";
+import { useMatch } from "@/modules/match";
 import { css } from "@linaria/core";
 import { IconDelete } from "@queenjs/icons";
 import { Button, Switch } from "ant-design-vue";
@@ -12,7 +12,7 @@ export default defineComponent({
   },
   emits: ["change"],
   setup(props, { emit }) {
-    const collocation = useCollocation();
+    const match = useMatch();
 
     const addCate = async () => {
       if (props.value && props.value.length >= 5) {

+ 3 - 6
src/pages/collocation/Marchant/Shoplogo.tsx → src/pages/match/Marchant/Shoplogo.tsx

@@ -3,7 +3,7 @@ import { defineComponent } from "vue";
 import { any } from "vue-types";
 import { Image } from "@queenjs/ui";
 import { Button } from "ant-design-vue";
-import { useCollocation } from "@/modules/collocation";
+import { useMatch } from "@/modules/match";
 import { queenApi } from "queenjs";
 
 export default defineComponent({
@@ -12,15 +12,12 @@ export default defineComponent({
   },
   emits: ["update.value"],
   setup(props, { emit }) {
-    const collocation = useCollocation();
+    const match = useMatch();
 
     const uploadThumbnail = async () => {
       const [Blob] = await queenApi.selectFile({ accept: "image/*" });
 
-      const res = await collocation.controls.uploader.uploadFile(
-        Blob,
-        "avatar"
-      );
+      const res = await match.controls.uploader.uploadFile(Blob, "avatar");
       emit("update.value", res);
     };
 

+ 3 - 3
src/pages/collocation/Marchant/index.tsx → src/pages/match/Marchant/index.tsx

@@ -1,4 +1,4 @@
-import { useCollocation } from "@/modules/collocation";
+import { useMatch } from "@/modules/match";
 import { css } from "@linaria/core";
 import { Button, Form, Input } from "ant-design-vue";
 import { queenApi } from "queenjs";
@@ -8,7 +8,7 @@ import Shoplogo from "./Shoplogo";
 
 export default defineComponent({
   setup() {
-    const collocation = useCollocation();
+    const match = useMatch();
 
     const formRef = ref();
 
@@ -20,7 +20,7 @@ export default defineComponent({
     };
 
     const update = async (values: any) => {
-      // await collocation.actions.updateMerchant(values);
+      // await match.actions.updateMerchant(values);
       // queenApi.messageSuccess("商城信息更新成功");
     };
 

+ 4 - 1
src/pages/collocation/components/AvatarDropDown.tsx → src/pages/match/components/AvatarDropDown.tsx

@@ -29,7 +29,10 @@ export default defineComponent({
         <>
           {userInfo._id ? (
             <Dropdown placement="bottom" overlay={menu}>
-              <Avatar size={36} src={userInfo.avatar} />
+              <div class="inline-flex items-center">
+                <Avatar size={36} src={userInfo.avatar} />
+                <span class="ml-15px">{userInfo.name}</span>
+              </div>
             </Dropdown>
           ) : (
             <Button type="primary" size="small" onClick={() => login()}>

+ 0 - 0
src/pages/collocation/components/BasicLayout.tsx → src/pages/match/components/BasicLayout.tsx


+ 0 - 0
src/pages/collocation/components/FormItem.tsx → src/pages/match/components/FormItem.tsx


+ 5 - 0
src/pages/match/index.ts

@@ -0,0 +1,5 @@
+import { startApp } from "@/App";
+import { initMatchCtx } from "@/modules-ctx/matchCtx";
+import router from "./router";
+
+startApp(router, [initMatchCtx]);

+ 0 - 0
src/pages/collocation/router.ts → src/pages/match/router.ts


+ 1 - 1
vue.config.js

@@ -12,7 +12,7 @@ const publicPath = "./";
 module.exports = defineConfig({
   pages: {
     index: {
-      entry: "src/pages/collocation/index.ts",
+      entry: "src/pages/match/index.ts",
       title: "定制搭配",
     },
     login: {