Преглед изворни кода

feat(material): 联系商家

EvilDragon пре 6 месеци
родитељ
комит
52a5174d2f

BIN
src/assets/pngs/abc.png


BIN
src/assets/pngs/calculator.png


+ 7 - 0
src/assets/svgs/close.svg

@@ -0,0 +1,7 @@
+<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="&#229;&#143;&#137;&#229;&#143;&#137;">
+<circle id="Ellipse 77" cx="15" cy="15" r="14.2" stroke="white" stroke-width="1.6"/>
+<path id="Vector 12" d="M21.6664 9.44434L8.88867 21.111" stroke="white" stroke-width="1.6" stroke-linecap="round"/>
+<path id="Vector 13" d="M21.1113 21.6667L9.44466 8.88892" stroke="white" stroke-width="1.6" stroke-linecap="round"/>
+</g>
+</svg>

+ 9 - 0
src/assets/svgs/material-dealers.svg

@@ -0,0 +1,9 @@
+<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="Frame">
+<g id="Vector">
+<path d="M14.7176 30.8779H9.02668V27.0361C9.03352 26.5132 8.61311 26.0825 8.09016 26.0757C7.56721 26.0688 7.13655 26.4893 7.12971 27.0122V30.8745H4.2928C4.21076 27.9863 4.50129 23.7925 5.67707 22.5244C5.91975 22.2646 6.11799 22.2339 6.26496 22.2339L6.59651 22.2373C8.06282 22.2476 9.59065 22.2646 10.8553 19.7969C11.098 19.3286 10.9168 18.751 10.452 18.5015C9.99055 18.2588 9.42317 18.4365 9.18049 18.8945C9.17707 18.8979 9.17365 18.9048 9.17365 18.9082C8.44563 20.3301 7.91242 20.3164 6.6136 20.313L6.26496 20.3096C5.52326 20.3096 4.83967 20.6206 4.29621 21.2085C2.00959 23.6694 2.38899 31.0591 2.44026 31.8931C2.4676 32.3955 2.88117 32.792 3.38703 32.7954H14.721C15.2508 32.7886 15.678 32.3545 15.6712 31.8247C15.661 31.3052 15.2405 30.8813 14.7176 30.8779ZM31.8006 18.3921H18.515C17.9886 18.3955 17.5648 18.8228 17.5648 19.3525V31.835C17.5614 32.3613 17.9852 32.792 18.5115 32.7954H31.7972C32.3236 32.792 32.7474 32.3613 32.7474 31.835V19.3525C32.7508 18.8262 32.327 18.3955 31.8006 18.3921ZM26.1063 20.313V25.1152H24.2093V20.313H26.1063ZM30.8504 30.8779H19.4617V20.3164H22.3089V26.0757C22.3055 26.6021 22.7293 27.0327 23.2557 27.0361H27.053C27.5794 27.0327 28.0032 26.6021 28.0032 26.0757V20.313H30.8504V30.8779ZM23.2591 8.79102C23.7889 8.78418 24.2161 8.3501 24.2093 7.82031C24.2025 7.29736 23.7821 6.87695 23.2591 6.87012H20.4119V4.94922C20.4119 3.35986 19.1336 2.06787 17.5648 2.06787H11.8704C10.3016 2.06787 9.02326 3.35986 9.02326 4.94922V7.83057C9.02326 13.2139 11.5252 17.4316 14.7176 17.4316C17.7186 17.4316 20.1043 13.7061 20.3846 8.79102H23.2591ZM10.9237 4.94922C10.9202 4.42285 11.3441 3.99219 11.8738 3.98877H17.5682C18.0946 3.99219 18.5184 4.42285 18.5184 4.94922V6.87012H10.9237V4.94922ZM14.7176 15.5142C13.053 15.5142 11.18 12.8003 10.9202 8.79443H18.5115C18.2586 12.7969 16.3856 15.5142 14.7176 15.5142Z" fill="black" fill-opacity="0.85"/>
+<path d="M14.7176 30.8779H9.02668V27.0361C9.03352 26.5132 8.61311 26.0825 8.09016 26.0757C7.56721 26.0688 7.13655 26.4893 7.12971 27.0122V30.8745H4.2928C4.21076 27.9863 4.50129 23.7925 5.67707 22.5244C5.91975 22.2646 6.11799 22.2339 6.26496 22.2339L6.59651 22.2373C8.06282 22.2476 9.59065 22.2646 10.8553 19.7969C11.098 19.3286 10.9168 18.751 10.452 18.5015C9.99055 18.2588 9.42317 18.4365 9.18049 18.8945C9.17707 18.8979 9.17365 18.9048 9.17365 18.9082C8.44563 20.3301 7.91242 20.3164 6.6136 20.313L6.26496 20.3096C5.52326 20.3096 4.83967 20.6206 4.29621 21.2085C2.00959 23.6694 2.38899 31.0591 2.44026 31.8931C2.4676 32.3955 2.88117 32.792 3.38703 32.7954H14.721C15.2508 32.7886 15.678 32.3545 15.6712 31.8247C15.661 31.3052 15.2405 30.8813 14.7176 30.8779ZM31.8006 18.3921H18.515C17.9886 18.3955 17.5648 18.8228 17.5648 19.3525V31.835C17.5614 32.3613 17.9852 32.792 18.5115 32.7954H31.7972C32.3236 32.792 32.7474 32.3613 32.7474 31.835V19.3525C32.7508 18.8262 32.327 18.3955 31.8006 18.3921ZM26.1063 20.313V25.1152H24.2093V20.313H26.1063ZM30.8504 30.8779H19.4617V20.3164H22.3089V26.0757C22.3055 26.6021 22.7293 27.0327 23.2557 27.0361H27.053C27.5794 27.0327 28.0032 26.6021 28.0032 26.0757V20.313H30.8504V30.8779ZM23.2591 8.79102C23.7889 8.78418 24.2161 8.3501 24.2093 7.82031C24.2025 7.29736 23.7821 6.87695 23.2591 6.87012H20.4119V4.94922C20.4119 3.35986 19.1336 2.06787 17.5648 2.06787H11.8704C10.3016 2.06787 9.02326 3.35986 9.02326 4.94922V7.83057C9.02326 13.2139 11.5252 17.4316 14.7176 17.4316C17.7186 17.4316 20.1043 13.7061 20.3846 8.79102H23.2591ZM10.9237 4.94922C10.9202 4.42285 11.3441 3.99219 11.8738 3.98877H17.5682C18.0946 3.99219 18.5184 4.42285 18.5184 4.94922V6.87012H10.9237V4.94922ZM14.7176 15.5142C13.053 15.5142 11.18 12.8003 10.9202 8.79443H18.5115C18.2586 12.7969 16.3856 15.5142 14.7176 15.5142Z" fill="black" fill-opacity="0.65"/>
+<path d="M14.7176 30.8779H9.02668V27.0361C9.03352 26.5132 8.61311 26.0825 8.09016 26.0757C7.56721 26.0688 7.13655 26.4893 7.12971 27.0122V30.8745H4.2928C4.21076 27.9863 4.50129 23.7925 5.67707 22.5244C5.91975 22.2646 6.11799 22.2339 6.26496 22.2339L6.59651 22.2373C8.06282 22.2476 9.59065 22.2646 10.8553 19.7969C11.098 19.3286 10.9168 18.751 10.452 18.5015C9.99055 18.2588 9.42317 18.4365 9.18049 18.8945C9.17707 18.8979 9.17365 18.9048 9.17365 18.9082C8.44563 20.3301 7.91242 20.3164 6.6136 20.313L6.26496 20.3096C5.52326 20.3096 4.83967 20.6206 4.29621 21.2085C2.00959 23.6694 2.38899 31.0591 2.44026 31.8931C2.4676 32.3955 2.88117 32.792 3.38703 32.7954H14.721C15.2508 32.7886 15.678 32.3545 15.6712 31.8247C15.661 31.3052 15.2405 30.8813 14.7176 30.8779ZM31.8006 18.3921H18.515C17.9886 18.3955 17.5648 18.8228 17.5648 19.3525V31.835C17.5614 32.3613 17.9852 32.792 18.5115 32.7954H31.7972C32.3236 32.792 32.7474 32.3613 32.7474 31.835V19.3525C32.7508 18.8262 32.327 18.3955 31.8006 18.3921ZM26.1063 20.313V25.1152H24.2093V20.313H26.1063ZM30.8504 30.8779H19.4617V20.3164H22.3089V26.0757C22.3055 26.6021 22.7293 27.0327 23.2557 27.0361H27.053C27.5794 27.0327 28.0032 26.6021 28.0032 26.0757V20.313H30.8504V30.8779ZM23.2591 8.79102C23.7889 8.78418 24.2161 8.3501 24.2093 7.82031C24.2025 7.29736 23.7821 6.87695 23.2591 6.87012H20.4119V4.94922C20.4119 3.35986 19.1336 2.06787 17.5648 2.06787H11.8704C10.3016 2.06787 9.02326 3.35986 9.02326 4.94922V7.83057C9.02326 13.2139 11.5252 17.4316 14.7176 17.4316C17.7186 17.4316 20.1043 13.7061 20.3846 8.79102H23.2591ZM10.9237 4.94922C10.9202 4.42285 11.3441 3.99219 11.8738 3.98877H17.5682C18.0946 3.99219 18.5184 4.42285 18.5184 4.94922V6.87012H10.9237V4.94922ZM14.7176 15.5142C13.053 15.5142 11.18 12.8003 10.9202 8.79443H18.5115C18.2586 12.7969 16.3856 15.5142 14.7176 15.5142Z" fill="black" fill-opacity="0.45"/>
+</g>
+</g>
+</svg>

+ 4 - 0
src/core/libs/pngs.ts

@@ -8,6 +8,8 @@ import designer from '@/assets/pngs/designer.png'
 import taskCenterBg from '@/assets/pngs/task-center-bg.png'
 import iconCamera from '@/assets/pngs/icon-camera.png'
 import iconWallet from '@/assets/pngs/icon-wallet.png'
+import abc from '@/assets/pngs/abc.png'
+import calculator from '@/assets/pngs/calculator.png'
 
 export {
   scheduleCardBg,
@@ -20,4 +22,6 @@ export {
   taskCenterBg,
   iconCamera,
   iconWallet,
+  abc,
+  calculator,
 }

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

@@ -24,6 +24,8 @@ import mineActive from '@/assets/svgs/mine-active.svg'
 import mine from '@/assets/svgs/mine.svg'
 import publish from '@/assets/svgs/publish.svg'
 import order from '@/assets/svgs/order.svg'
+import close from '@/assets/svgs/close.svg'
+import materialDealers from '@/assets/svgs/material-dealers.svg'
 export {
   polygon16,
   frame,
@@ -51,4 +53,6 @@ export {
   mine,
   publish,
   order,
+  close,
+  materialDealers,
 }

+ 58 - 5
src/pages/material/index.vue

@@ -5,29 +5,31 @@
 <script setup lang="ts">
 import Card from '@/components/card.vue'
 import SectionHeading from '@/components/section-heading.vue'
-import { designer, settled, treaty } from '@/core/libs/pngs'
+import { abc, calculator, treaty } from '@/core/libs/pngs'
 import { getMaterialDealers } from '@/core/libs/requests'
+import { materialDealers, close } from '@/core/libs/svgs'
 
 const { data, run } = useRequest(getMaterialDealers)
+const dealerPanelState = ref(false)
 const pieces = ref([
   {
     title: '材料小课堂',
     desc: '全方位了解',
-    icon: designer,
+    icon: abc,
     class: 'col-start-1 row-start-1',
     // iconSize: 102,
   },
   {
     title: '积分计算机',
     desc: '积分小帮手',
-    icon: settled,
+    icon: calculator,
     class: 'col-start-2 row-start-1',
     // iconSize: 68,
   },
   {
     title: '推荐材料商',
     desc: '我们将优先洽谈大家推荐的材料商',
-    icon: treaty,
+    icon: materialDealers,
     class: 'col-start-1 row-start-2 col-end-3',
     // iconSize: 44,
     isMore: true,
@@ -85,7 +87,11 @@ onMounted(() => {
       <SectionHeading title="自营品牌" custom-class="mx-3.5"></SectionHeading>
       <div class="my-6 flex px-1.75">
         <template v-for="(it, i) in data" :key="i">
-          <Card custom-class="mx-1.75" :style="{ width: 'calc(50vw - 96rpx)' }">
+          <Card
+            custom-class="mx-1.75"
+            :style="{ width: 'calc(50vw - 96rpx)' }"
+            @click="dealerPanelState = true"
+          >
             <div class="flex flex-col items-center">
               <wd-img
                 width="78"
@@ -112,6 +118,53 @@ onMounted(() => {
         </template>
       </div>
     </view>
+
+    <!-- <wd-action-sheet v-model="dealerPanelState">
+      <div class="relative absolute">
+        <div class="absolute top--4">x</div>
+      </div>
+      <view style="padding: 15px 15px 150px 15px">内容</view>
+    </wd-action-sheet> -->
+    <wd-overlay :show="dealerPanelState" @click="dealerPanelState = false">
+      <view class="wrapper bg-amber/50 flex flex-col justify-end h-full">
+        <div class="w-full flex justify-end mb-4">
+          <div class="mr-3.5">
+            <wd-button type="text" custom-class="w-8! h-8! p-0!" size="small">
+              <wd-img :src="close" width="28" height="28" custom-class="vertical-bottom"></wd-img>
+            </wd-button>
+          </div>
+        </div>
+        <div class="bg-neutral-100 rounded-tl-2xl rounded-tr-2xl p-3.5" @click.stop="">
+          <div class="flex flex-col">
+            <template v-for="(it, i) in [{}]" :key="i">
+              <div class="bg-white rounded-2.5 p-3.5 flex items-center">
+                <div class="text-black/40 flex-1 border-r-2 border-r-[#f6f6f6] border-r-solid">
+                  <div
+                    class="text-black/90 text-lg font-normal font-['PingFang SC'] leading-normal"
+                  >
+                    曲江新区店
+                  </div>
+                  <div>
+                    <wd-icon name="location" size="15"></wd-icon>
+                    <span
+                      class="text-black/40 text-xs font-normal font-['PingFang SC'] leading-normal"
+                    >
+                      西安市曲江路精彩世家 387 号
+                    </span>
+                  </div>
+                </div>
+                <wd-button type="text" size="small" custom-class=" bg-[#f2f2f2]! p-0! ml-4">
+                  <wd-img width="28" height="28"></wd-img>
+                </wd-button>
+                <wd-button type="text" size="small" custom-class=" bg-[#f2f2f2]! p-0! ml-4">
+                  <wd-img width="28" height="28"></wd-img>
+                </wd-button>
+              </div>
+            </template>
+          </div>
+        </div>
+      </view>
+    </wd-overlay>
   </view>
 </template>