Browse Source

feat:调整渠道端

Jake 5 tháng trước cách đây
mục cha
commit
30479ab38d

+ 4 - 0
packages/assets/src/assets/svgs/filter_icon.svg

@@ -0,0 +1,4 @@
+<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M11.429 20.2508C11.1705 20.2508 10.912 20.1738 10.692 20.0253L7.6945 17.9958C7.282 17.7153 7.0345 17.2533 7.0345 16.7528V9.70178L2.2825 4.97178C1.8205 4.51528 1.683 3.82778 1.9305 3.22828C2.178 2.62878 2.761 2.23828 3.41 2.23828H16.445C17.094 2.23828 17.677 2.62878 17.9245 3.22828C18.172 3.82778 18.0345 4.51528 17.567 4.97178L12.749 9.72928V18.9308C12.749 19.4203 12.4795 19.8658 12.0505 20.0968C11.8525 20.2013 11.6435 20.2508 11.429 20.2508ZM3.4155 3.55828C3.2505 3.55828 3.1845 3.66828 3.157 3.72878C3.1295 3.79478 3.102 3.91578 3.2175 4.03128L8.162 8.95928C8.2885 9.08578 8.3545 9.25078 8.3545 9.42678V16.7528C8.3545 16.8133 8.382 16.8683 8.4315 16.9013L11.4235 18.9253V9.45428C11.4235 9.27828 11.495 9.10778 11.6215 8.98678L16.6375 4.03678C16.753 3.92128 16.7255 3.79478 16.698 3.73428C16.6705 3.67378 16.6045 3.56378 16.4395 3.56378H3.4155V3.55828Z" fill="#040000"/>
+<path d="M19.5139 11.6872H14.7894C14.4264 11.6872 14.1294 11.3902 14.1294 11.0272C14.1294 10.6642 14.4264 10.3672 14.7894 10.3672H19.5139C19.8769 10.3672 20.1739 10.6642 20.1739 11.0272C20.1739 11.3957 19.8769 11.6872 19.5139 11.6872ZM19.5139 15.3172H14.7894C14.4264 15.3172 14.1294 15.0202 14.1294 14.6572C14.1294 14.2942 14.4264 13.9972 14.7894 13.9972H19.5139C19.8769 13.9972 20.1739 14.2942 20.1739 14.6572C20.1739 15.0202 19.8769 15.3172 19.5139 15.3172ZM19.5139 18.9417H14.7894C14.4264 18.9417 14.1294 18.6447 14.1294 18.2817C14.1294 17.9187 14.4264 17.6217 14.7894 17.6217H19.5139C19.8769 17.6217 20.1739 17.9187 20.1739 18.2817C20.1739 18.6447 19.8769 18.9417 19.5139 18.9417Z" fill="#040000"/>
+</svg>

+ 3 - 0
packages/assets/src/svgs.ts

@@ -19,6 +19,8 @@ import pageHeaderBg from "./assets/svgs/pageHeaderBg";
 import scanIcon from "./assets/svgs/scan_icon.svg";
 import bookIcon from "./assets/svgs/book_icon.svg";
 import pageHeaderFilter from "./assets/svgs/pageHeaderFilter";
+import filterIcon from "./assets/svgs/filter_icon.svg";
+
 export {
   ts,
   pageHeaderBg,
@@ -41,4 +43,5 @@ export {
   router,
   scanIcon,
   bookIcon,
+  filterIcon,
 };

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

@@ -70,7 +70,6 @@
     {
       "path": "pages/designer/homepage",
       "type": "page",
-      "layout": "tabbar",
       "style": {
         "navigationBarTitleText": "个人主页",
         "navigationBarBackgroundColor": "#fff"

+ 4 - 0
packages/merchant/src/pages/designer/detail.vue

@@ -21,6 +21,9 @@ const tabs = ref([
   { label: '跟进记录', value: 'system' },
   { label: '圈子动态', value: 'interact' },
 ])
+const toHomePage = () => {
+  uni.navigateTo({ url: '/pages/designer/homepage' })
+}
 </script>
 
 <template>
@@ -57,6 +60,7 @@ const tabs = ref([
               </div>
               <div
                 class="text-black/60 text-xs font-normal font-['PingFang SC'] leading-snug flex items-center"
+                @click="toHomePage"
               >
                 <div>个人主页</div>
                 <wd-img width="13" height="13" :src="rightArrowIcon"></wd-img>

+ 2 - 3
packages/merchant/src/pages/designer/homepage.vue

@@ -1,5 +1,4 @@
 <route lang="yaml">
-layout: tabbar
 style:
   navigationBarTitleText: 个人主页
   navigationBarBackgroundColor: '#fff'
@@ -26,10 +25,10 @@ const tabs = ref([
 
 <template>
   <view>
-    <div class="aspect-[1/1] absolute left-0 right-0 top-0">
+    <div class="aspect-[1.13/1] absolute left-0 right-0 top-0">
       <wd-img width="100%" height="100%" :src="homepageBg" custom-class="vertical-top"></wd-img>
     </div>
-    <div class="flex flex-col relative mt-[200px]">
+    <div class="flex flex-col relative mt-[180px]">
       <div class="rounded-2xl flex items-center p-4">
         <div>
           <img class="w-16 h-16 rounded-full" src="https://via.placeholder.com/64x64" />

+ 61 - 11
packages/merchant/src/pages/designer/index.vue

@@ -6,8 +6,11 @@ style:
 
 <script setup lang="ts">
 import Card from '@/components/card.vue'
-import { vipIcon, rightArrowIcon } from '@designer-hub/assets/src/svgs'
+import DataForm from '@/components/data-form.vue'
+import { vipIcon, rightArrowIcon, filterIcon } from '@designer-hub/assets/src/svgs'
 const searchText = ref('')
+const publishState = ref(false)
+
 const msgs = ref([
   {
     title: '王磊回复了你',
@@ -20,6 +23,33 @@ const msgs = ref([
     content: '设计师李家豪刚刚点赞了你的设计圈点击前往查看',
   },
 ])
+const schema = ref({
+  user: {
+    type: 'TextField',
+    label: '设计师',
+  },
+  dateTime: {
+    type: 'TextField',
+    label: '时间',
+  },
+  type: {
+    type: 'TextField',
+    label: '类型',
+  },
+  remark: {
+    type: 'TextField',
+    label: '备注',
+  },
+  location: {
+    type: 'TextField',
+    label: '地址',
+  },
+  images: {
+    type: 'ImageUploader',
+    label: '图片',
+    max: 9,
+  },
+})
 const searchFocus = () => {
   console.log('focus')
 }
@@ -38,19 +68,31 @@ const searchChange = (e: any) => {
 const toDetail = async () => {
   await uni.navigateTo({ url: '/pages/designer/detail' })
 }
+const callPhone = (phoneNumber) => {
+  const link = document.createElement('a')
+  link.href = 'tel:' + phoneNumber
+  link.click()
+}
+const filterData = () => {
+  console.log('filter')
+}
 </script>
 
 <template>
   <view class="flex-grow">
-    <div>
-      <wd-search
-        v-model="searchText"
-        @focus="searchFocus"
-        @blur="searchBlur"
-        @search="search"
-        @cancel="cancelSearch"
-        @change="searchChange"
-      />
+    <div class="flex items-center justify-between bg-white pr-3.5">
+      <div class="flex-1">
+        <wd-search
+          v-model="searchText"
+          @focus="searchFocus"
+          @blur="searchBlur"
+          @search="search"
+          @cancel="cancelSearch"
+          @change="searchChange"
+          hide-cancel
+        />
+      </div>
+      <wd-img :src="filterIcon" width="22px" height="22px" @click="filterData"></wd-img>
     </div>
     <div class="p-3.5 gap-3.5 flex flex-col">
       <template v-for="({ title, createdAt, content }, i) in msgs" :key="i">
@@ -138,13 +180,14 @@ const toDetail = async () => {
                 class="px-3 py-1.5 rounded-[30px] border border-[#ff2d2d] justify-center items-center gap-1 flex"
                 style="border: 1px solid #ff2d2d"
               >
-                <div style="color: #ff2d2d" class="flex items-center">+</div>
+                <span style="color: #ff2d2d" class="flex items-center">+</span>
                 <div class="text-[#ff2d2d] text-xs font-normal font-['PingFang SC'] leading-none">
                   重点跟进
                 </div>
               </div>
               <div
                 class="px-5 py-1 bg-[#e1ecff] rounded-[30px] border border-[#2357e9] justify-center items-center gap-1 inline-flex"
+                @click="callPhone('13700000000')"
               >
                 <div
                   class="text-center text-[#2357e9] text-sm font-normal font-['PingFang SC'] leading-normal"
@@ -157,6 +200,7 @@ const toDetail = async () => {
               >
                 <div
                   class="text-center text-white text-sm font-normal font-['PingFang SC'] leading-normal"
+                  @click="publishState = true"
                 >
                   写跟进
                 </div>
@@ -167,6 +211,12 @@ const toDetail = async () => {
       </template>
     </div>
   </view>
+  <wd-action-sheet v-model="publishState" title="创建跟进" @close="publishState = false">
+    <view class="flex flex-col p-4">
+      <div><DataForm :schema="schema" direction="horizontal"></DataForm></div>
+      <div><wd-button block :round="false">提交</wd-button></div>
+    </view>
+  </wd-action-sheet>
 </template>
 
 <style scoped lang="scss"></style>

+ 7 - 1
packages/merchant/src/pages/home/index.vue

@@ -96,6 +96,9 @@ const { data } = useRequest(async () => ({ code: 0, msg: '', data: {} }) as IRes
 })
 const { data: circlesData, run } = useRequest(() => getCircles({}), { initialData: { list: [] } })
 console.log(data.value)
+const toDesigner = () => {
+  uni.navigateTo({ url: '/pages/designer/index' })
+}
 onShow(async () => {
   // await run()
   console.log(circlesData.value)
@@ -155,7 +158,10 @@ onShareAppMessage(() => ({}))
               ]"
               :key="label"
             >
-              <div class="h-12 bg-white rounded-lg shadow flex items-center hover:bg-[#fff6f5]">
+              <div
+                class="h-12 bg-white rounded-lg shadow flex items-center hover:bg-[#fff6f5]"
+                @click="toDesigner"
+              >
                 <div
                   class="w-1.5 h-12 rounded-tl-lg rounded-bl-lg shadow"
                   :style="{ background: color }"

+ 1 - 1
packages/merchant/src/types/auto-import.d.ts

@@ -93,7 +93,7 @@ declare global {
 // for type re-export
 declare global {
   // @ts-ignore
-  export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
+  export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
   import('vue')
 }
 // for vue template auto import