Browse Source

meger & update code

kevin.T 2 months ago
parent
commit
3bec0c4fc4

+ 4 - 0
packages/merchant/src/assets/svgs/edit.svg

@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="27" height="27" viewBox="0 0 27 27" fill="none">
+  <path d="M6.65234 19.5989L12.8697 18.4809L8.97266 13.7585L6.65234 19.5989ZM9.6292 13.2206L13.5368 17.9351L22.8945 10.257L18.9896 5.54252L9.6292 13.2206ZM25.2597 6.84769L22.8181 3.89721C22.4199 3.41205 21.6658 3.36195 21.1385 3.78646L19.7173 4.94662L23.6223 9.66898L25.0435 8.50883C25.5603 8.08432 25.6578 7.33285 25.2597 6.84769Z" fill="#2357E9"/>
+  <path d="M20.3052 23.5641H6.84473C4.38994 23.5641 2.40186 21.5733 2.40186 19.1212V9.10693C2.40186 6.65215 4.39258 4.66406 6.84473 4.66406H8.15254C8.85391 4.66406 9.4208 5.23096 9.4208 5.93232C9.4208 6.63369 8.85391 7.20059 8.15254 7.20059H6.84473C5.79004 7.20059 4.93574 8.05488 4.93574 9.10957V19.1238C4.93574 20.1785 5.79004 21.0328 6.84473 21.0328H20.3052C21.3599 21.0328 22.2142 20.1785 22.2142 19.1238V15.6434C22.2142 14.942 22.7811 14.3751 23.4824 14.3751C24.1838 14.3751 24.7507 14.942 24.7507 15.6434V19.1238C24.748 21.576 22.76 23.5641 20.3052 23.5641Z" fill="#BDD2EF"/>
+</svg>

+ 3 - 0
packages/merchant/src/assets/svgs/wechat-green.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="27" height="27" viewBox="0 0 27 27" fill="none">
+  <path d="M17.5146 9.71837C17.7787 9.71837 18.0391 9.73769 18.297 9.76572C17.5944 6.52757 14.0952 4.12109 10.1014 4.12109C5.63602 4.12109 1.97803 7.13309 1.97803 10.9574C1.97803 13.1646 3.19528 14.9774 5.22862 16.3834L4.41628 18.8021L7.25573 17.3926C8.2724 17.5913 9.08719 17.7962 10.1014 17.7962C10.3562 17.7962 10.6085 17.7838 10.8595 17.7639C10.7006 17.2269 10.6084 16.6638 10.6084 16.08C10.6085 12.5684 13.656 9.71837 17.5146 9.71837ZM13.1476 7.53865C13.7594 7.53865 14.1643 7.93733 14.1643 8.54223C14.1643 9.14463 13.7594 9.5483 13.1476 9.5483C12.5384 9.5483 11.9279 9.14463 11.9279 8.54223C11.9279 7.93733 12.5384 7.53865 13.1476 7.53865ZM7.46254 9.54827C6.85327 9.54827 6.23903 9.1446 6.23903 8.54221C6.23903 7.93731 6.85327 7.53862 7.46254 7.53862C8.07114 7.53862 8.47671 7.93731 8.47671 8.54221C8.47671 9.14463 8.07114 9.54827 7.46254 9.54827ZM24.929 15.9835C24.929 12.7696 21.679 10.1501 18.0291 10.1501C14.1643 10.1501 11.1205 12.7696 11.1205 15.9835C11.1205 19.202 14.1643 21.8159 18.0291 21.8159C18.8377 21.8159 19.6538 21.6153 20.4661 21.4135L22.6945 22.6207L22.0833 20.6123C23.7143 19.4013 24.929 17.7962 24.929 15.9835ZM15.789 14.9774C15.3847 14.9774 14.9767 14.5793 14.9767 14.1731C14.9767 13.7726 15.3847 13.3695 15.789 13.3695C16.4032 13.3695 16.8056 13.7726 16.8056 14.1731C16.8056 14.5793 16.4032 14.9774 15.789 14.9774ZM20.2568 14.9774C19.8557 14.9774 19.4501 14.5793 19.4501 14.1731C19.4501 13.7726 19.8557 13.3695 20.2568 13.3695C20.8661 13.3695 21.2735 13.7726 21.2735 14.1731C21.2735 14.5793 20.8661 14.9774 20.2568 14.9774Z" fill="#13AC5C"/>
+</svg>

+ 5 - 0
packages/merchant/src/core/libs/net-images.ts

@@ -14,4 +14,9 @@ export enum NetImages {
   CyclingRankingsHeaderBg = 'https://image.zhuchaohui.com/zhucaohui/2351014a57a0df427516c4993876ade7e3695ce33b1f227c52c8381aa631ba02.png',
   AgentMineHeaderBg = 'https://image.zhuchaohui.com/zhucaohui/41b23de6a07428168216ecd366548711dd299cf23f9d5244492777bdd007c576.png',
   筑巢荟 = 'https://image.zhuchaohui.com/zhucaohui/31c992b5c7a315d3cceebf8ae168f18b7c559e6676973d2e1b488ecabd6856a5.png',
+
+  mobile = 'https://image.zhuchaohui.com/zhucaohui/df511f76c98454d98080e6c538c78efad8fbadf2c6df004aa947bd5be4cf41a8.png',
+  weChat = 'https://image.zhuchaohui.com/zhucaohui/4b4b3a43cf9ffac2bc82ec0d9ba55a223976a60476903090e4f18ecfaf608fd8.png',
+  email = 'https://image.zhuchaohui.com/zhucaohui/baff6d2aebfab27ae1b4e0f5c8dbc77782ab19644411d67d06ac1e38c8984e7e.png',
+  personalBio = 'https://image.zhuchaohui.com/zhucaohui/88bea48324705ffbad14c9504b649d7f65a345a25804aabf49b1ae814714efcf.png',
 }

+ 4 - 0
packages/merchant/src/core/libs/svgs.ts

@@ -45,6 +45,8 @@ import scan from '@/assets/svgs/scan.svg'
 import business from '@/assets/svgs/business.svg'
 import businessLogo from '@/assets/svgs/business-logo.svg'
 import logoWhite from '@/assets/svgs/logo-white.svg'
+import edit from '@/assets/svgs/edit.svg'
+import wechatGreen from '@/assets/svgs/wechat-green.svg'
 export {
   polygon16,
   frame,
@@ -93,4 +95,6 @@ export {
   business,
   businessLogo,
   logoWhite,
+  edit,
+  wechatGreen,
 }

+ 8 - 0
packages/merchant/src/pages.json

@@ -238,6 +238,14 @@
       }
     },
     {
+      "path": "pages/mine/agent/business-card/edit-card",
+      "type": "page",
+      "style": {
+        "navigationBarTitleText": "编辑名片",
+        "navigationBarBackgroundColor": "#ffffff"
+      }
+    },
+    {
       "path": "pages/mine/agent/business-card/index",
       "type": "page",
       "style": {

+ 113 - 0
packages/merchant/src/pages/mine/agent/business-card/edit-card.vue

@@ -0,0 +1,113 @@
+<route lang="json">
+{
+  "style": {
+    "navigationBarTitleText": "编辑名片",
+    "navigationBarBackgroundColor": "#ffffff"
+  }
+}
+</route>
+<script setup lang="ts">
+import { businessLogo, logoWhite, edit, wechatGreen } from '@/core/libs/svgs'
+import { NetImages } from '@/core/libs/net-images'
+import BottomAppBar from '@/components/bottom-app-bar.vue'
+import { storeToRefs } from 'pinia'
+import { useUserStore } from '@/store/user'
+
+const { userInfo } = storeToRefs(useUserStore())
+const infos = ref<any[]>(['公司', '职位', '手机', '微信', '邮箱'])
+const submitUpload = () => {
+  console.log('submitUpload')
+}
+</script>
+<template>
+  <div class="p-[16px] bg-[#FFF]">
+    <div class="h-185px p-20px relative rounded-[10px] color-[#ffffff] bg-[#2357E9]">
+      <wd-img
+        :src="businessLogo"
+        width="78px"
+        height="27px"
+        mode="widthFix"
+        custom-class="absolute top-[-20px] left-[-24px]"
+      />
+      <div class="absolute top-[-1px] left-[0px] z-10">
+        <wd-img
+          :src="logoWhite"
+          width="17px"
+          height="17px"
+          round
+          custom-class="absolute top-[3px] left-[7px] bg-[#0cbe7d]"
+        />
+        <wd-img
+          :src="NetImages.筑巢荟"
+          width="40px"
+          height="17px"
+          custom-class="absolute top-[5px] left-[7px]"
+        />
+      </div>
+      <div class="h-65px flex justify-between items-center mb-10px">
+        <div class="font-size-22px fw-400">
+          李世东
+          <text class="font-size-12px ml-10px">平台经纪人</text>
+        </div>
+        <wd-img
+          :src="`https://image.zhuchaohui.com/zhucaohui/d0533ae0ab4fa6de2526e7088b346f5ff4c82a9e7b5622b75d9db3de64377471.jpg`"
+          round
+          width="65px"
+          height="65px"
+        />
+      </div>
+      <div class="flex items-center">
+        <wd-icon name="phone" size="15px" color="#ffffff" />
+        <div class="font-size-12px ml-10px">13888888888</div>
+      </div>
+      <div class="flex items-center">
+        <wd-icon name="phone" size="15px" color="#ffffff" />
+        <div class="font-size-12px ml-10px">13888888888</div>
+      </div>
+      <div class="flex items-center">
+        <wd-icon name="phone" size="15px" color="#ffffff" />
+        <div class="font-size-12px ml-10px">13888888888</div>
+      </div>
+      <div class="flex items-center">
+        <wd-icon name="phone" size="15px" color="#ffffff" />
+        <div class="font-size-12px ml-10px">13888888888</div>
+      </div>
+    </div>
+    <!-- 名片样式 -->
+    <wd-cell title="名片样式" is-link to="/pages/index/index" />
+    <div class="pt-[30px] flex justify-between items-center">
+      <div class="w-76px h-42px border-[1px] border-solid border-[#E2E4ED]"></div>
+      <div class="w-76px h-42px border-[1px] border-solid border-[#E2E4ED]"></div>
+      <div class="w-76px h-42px border-[1px] border-solid border-[#E2E4ED]"></div>
+    </div>
+    <!-- 展示信息 -->
+    <wd-cell title="展示信息" is-link />
+    <div class="pt-[30px] pb-[15px] mb-[15px] flex items-center overflow-x-auto">
+      <div
+        class="selectItem inline-block px-18px py-4px rounded-[2px] bg-[#F3F6FF] mr-10px whitespace-nowrap font-size-14px lh-[24px] fw-400"
+        v-for="(it, index) in infos"
+        :key="index"
+      >
+        {{ it }}
+      </div>
+    </div>
+    <wd-gap bg-color="#F2F3F6"></wd-gap>
+    <!-- 基本数据 -->
+
+    <!-- 保存 按钮 -->
+    <BottomAppBar fixed placeholder>
+      <wd-button
+        type="primary"
+        :round="false"
+        block
+        style="backdrop-filter: blur(10px)"
+        class="mt-20px"
+        @click="submitUpload"
+      >
+        保存
+      </wd-button>
+    </BottomAppBar>
+  </div>
+</template>
+
+<style lang="scss" scoped></style>

+ 47 - 2
packages/merchant/src/pages/mine/agent/business-card/index.vue

@@ -7,8 +7,18 @@
 }
 </route>
 <script setup lang="ts">
-import { businessLogo, logoWhite } from '@/core/libs/svgs'
+import { businessLogo, logoWhite, edit, wechatGreen } from '@/core/libs/svgs'
 import { NetImages } from '@/core/libs/net-images'
+import BottomAppBar from '@/components/bottom-app-bar.vue'
+
+const submitUpload = () => {
+  console.log('submitUpload')
+}
+const toEditPage = () => {
+  uni.navigateTo({
+    url: '/pages/mine/agent/business-card/edit-card',
+  })
+}
 </script>
 <template>
   <div class="p-[16px]">
@@ -60,9 +70,44 @@ import { NetImages } from '@/core/libs/net-images'
           <div class="font-size-12px ml-10px">13888888888</div>
         </div>
       </div>
-      <div class="h-100px color-[#7F88A0] font-size-12px fw-400">
+      <div class="h-75px pt-[25px] px-[12px] color-[#7F88A0] font-size-12px fw-400 lh-[19px]">
         你好,我是筑巢荟平台经纪人李世东,这个是我的名片,请惠存!
       </div>
     </div>
+    <!-- 按钮 -->
+    <div class="pt-[30px] flex justify-between items-center">
+      <div
+        class="inline-flex py-[10px] px-[24px] rounded-[8px] border-[1px] border-solid border-[#E2E4ED] color-[#2357E9] lh-[24px]"
+        @click="toEditPage"
+      >
+        <wd-img :src="edit" width="27px" height="27px" custom-class="mr-8px" mode="widthFix" />
+        编辑名片
+      </div>
+      <div
+        class="inline-flex py-[10px] px-[24px] rounded-[8px] border-[1px] border-solid border-[#E2E4ED] color-[#13AC5C] lh-[24px]"
+      >
+        <wd-img
+          :src="wechatGreen"
+          width="27px"
+          height="27px"
+          custom-class="mr-8px"
+          mode="widthFix"
+        />
+        微信分享
+      </div>
+    </div>
+    <!-- 保存 按钮 -->
+    <BottomAppBar fixed placeholder>
+      <wd-button
+        type="primary"
+        :round="false"
+        block
+        style="backdrop-filter: blur(10px)"
+        class="mt-20px"
+        @click="submitUpload"
+      >
+        保存到本地
+      </wd-button>
+    </BottomAppBar>
   </div>
 </template>

+ 1 - 0
packages/merchant/src/types/uni-pages.d.ts

@@ -27,6 +27,7 @@ interface NavigateToOptions {
        "/pages/agent/tasks/detail/index" |
        "/pages/common/auth/change-password/index" |
        "/pages/common/orders/detail/index" |
+       "/pages/mine/agent/business-card/edit-card" |
        "/pages/mine/agent/business-card/index" |
        "/pages/mine/agent/invite/index" |
        "/pages/mine/agent/settings/index" |