Parcourir la source

feat(app): 小程序定位及替换宣传页

EvilDragon il y a 4 mois
Parent
commit
08b031318c

+ 15 - 17
packages/app/src/pages/home/about/index.vue

@@ -1,28 +1,26 @@
-<route lang="yaml">
-style:
-  navigationStyle: custom
-  navigationBarTitleText: 1分钟快速了解筑巢荟
+<route lang="json">
+{
+  "style": {
+    "navigationStyle": "custom",
+    "navigationBarTitleText": "1分钟快速了解筑巢荟"
+  }
+}
 </route>
 <script setup lang="ts">
+import NavbarEvo from '@/components/navbar-evo.vue'
 const imgs = ref([
-  'https://image.zhuchaohui.com/zhucaohui/063c850a39885990836a8fad13575fcd5a5fc4c54b6127d9323be603d80053ae.jpg',
+  'https://image.zhuchaohui.com/zhucaohui/9da47a2ee9863786851bea968c4693e1d3540c7bbcac0ba53a3b1d90c203c1c2.png',
+  'https://image.zhuchaohui.com/zhucaohui/65f8902cee44826abd8e97ce4940dee459fcaaa2f5f3535016b670dd0006953b.png',
+  'https://image.zhuchaohui.com/zhucaohui/a43e3377643811fbb182b82758962153f93b30cec62e2c389f93f3a157bba6a6.png',
+  'https://image.zhuchaohui.com/zhucaohui/7f212c009d75cb2fd1c89f5934e5bbc97042344dcc2a9818894edcd7bb33dfe6.png',
+  'https://image.zhuchaohui.com/zhucaohui/a81c225a5ad394aaba99594f1410c0865f94c8e941e0c0f868d62fb8111a3c5f.png',
 ])
-const handleClickLeft = () => {
-  uni.navigateBack()
-}
 </script>
 <template>
   <div>
-    <wd-navbar
-      left-arrow
-      fixed
-      safe-area-inset-top
-      custom-class="bg-transparent"
-      title="1分钟快速了解筑巢荟"
-      @click-left="handleClickLeft"
-    ></wd-navbar>
+    <NavbarEvo dark transparent title="1分钟快速了解筑巢荟"></NavbarEvo>
     <template v-for="(it, i) in imgs" :key="i">
-      <wd-img width="100%" :src="it" mode="widthFix"></wd-img>
+      <wd-img width="100%" :src="it" mode="widthFix" custom-class="vertical-bottom"></wd-img>
     </template>
   </div>
 </template>

+ 0 - 2
packages/app/src/pages/home/components/banner.vue

@@ -14,8 +14,6 @@ const handleClick = ({ index }: { index: number }) => {
   const banner = banners.value[index]
   console.log(banner)
   if (banner.bannerDetailsType === '2') {
-    console.log(banner.bannerLinkUrl)
-    // 包含htt或者https的链接直接跳转
     if (banner.bannerLinkUrl?.startsWith('http')) {
       router.push(`/pages/common/webview/index?url=${banner.bannerLinkUrl}`)
     } else {

+ 20 - 1
packages/app/src/pages/material/index.vue

@@ -75,6 +75,20 @@ function handleClick(e) {
 function onChange(e) {
   console.log(e)
 }
+const handleGo = ({ name, address }) => {
+  uni.openLocation({
+    latitude: 34.2593042818515,
+    longitude: 109.01031190070307,
+    address,
+    name,
+    success: function () {
+      console.log('success')
+    },
+    fail: (fail) => {
+      console.log(fail)
+    },
+  })
+}
 onMounted(async () => {
   await run()
   await setMaterialDealerData()
@@ -252,7 +266,12 @@ onMounted(async () => {
                 >
                   <wd-img width="28" height="28" :src="phone"></wd-img>
                 </wd-button>
-                <wd-button type="text" size="small" custom-class=" bg-[#f2f2f2]! p-0! ml-4">
+                <wd-button
+                  type="text"
+                  size="small"
+                  custom-class=" bg-[#f2f2f2]! p-0! ml-4"
+                  @click="handleGo({ name: shopName, address: shopAddr })"
+                >
                   <wd-img width="28" height="28" :src="router"></wd-img>
                 </wd-button>
               </div>

+ 15 - 17
packages/app/src/pages/material/mini-class/index.vue

@@ -1,28 +1,26 @@
-<route lang="yaml">
-style:
-  navigationStyle: custom
-  navigationBarTitleText: 材料小课堂
+<route lang="json">
+{
+  "style": {
+    "navigationStyle": "custom",
+    "navigationBarTitleText": "材料小课堂"
+  }
+}
 </route>
 <script setup lang="ts">
+import NavbarEvo from '@/components/navbar-evo.vue'
 const imgs = ref([
-  'https://image.zhuchaohui.com/zhucaohui/ce3bacd03a3c8b4ffe65d9cf81111324475413b5d22e26749c868104cc40dafd.jpg',
+  'https://image.zhuchaohui.com/zhucaohui/9ecc362603763716ae5958193f8fe8c03f62000dd789a91c7f5323017eda2274.png',
+  'https://image.zhuchaohui.com/zhucaohui/c2458b6a9ea61953c40d329e1ce9ff7592da7c4d0f31241bd3c98f76f18ec65f.png',
+  'https://image.zhuchaohui.com/zhucaohui/4f1b8ea9dcbcf51c18fb2435712a0d51c24830a6f70c93938a3bef8ebf410c03.png',
+  'https://image.zhuchaohui.com/zhucaohui/4dd78ed62c7b40bb63a28f6a484cbd6f625bb00b087446ef97f398b4ae6d7611.png',
+  'https://image.zhuchaohui.com/zhucaohui/f39ad760767abc012d0b710fb4c95dc72767c8c45cab9a2e80e7e5d0633433a9.png',
 ])
-const handleClickLeft = () => {
-  uni.navigateBack()
-}
 </script>
 <template>
   <div>
-    <wd-navbar
-      left-arrow
-      fixed
-      safe-area-inset-top
-      custom-class="bg-transparent"
-      title="材料小课堂"
-      @click-left="handleClickLeft"
-    ></wd-navbar>
+    <NavbarEvo dark transparent title="材料小课堂"></NavbarEvo>
     <template v-for="(it, i) in imgs" :key="i">
-      <wd-img width="100%" :src="it" mode="widthFix"></wd-img>
+      <wd-img width="100%" :src="it" mode="widthFix" custom-class="vertical-bottom"></wd-img>
     </template>
   </div>
 </template>

+ 4 - 13
packages/app/src/pages/material/settled-in/index.vue

@@ -2,25 +2,16 @@
 { "style": { "navigationStyle": "custom" } }
 </route>
 <script setup lang="ts">
+import NavbarEvo from '@/components/navbar-evo.vue'
 const imgs = ref([
-  'https://image.zhuchaohui.com/zhucaohui/35d920447457fde77faf216fabaeca9215c474f4b5d5aa2270bf42a0a7894733.jpg',
+  'https://image.zhuchaohui.com/zhucaohui/2550ff2eaa430a01135344f20645987fca8dc389d89ce3b654522204c4b21428.png',
 ])
-const handleClickLeft = () => {
-  uni.navigateBack()
-}
 </script>
 <template>
   <div>
-    <wd-navbar
-      left-arrow
-      fixed
-      safe-area-inset-top
-      custom-class="bg-transparent"
-      title="材料商入驻"
-      @click-left="handleClickLeft"
-    ></wd-navbar>
+    <NavbarEvo dark transparent title="材料商入驻"></NavbarEvo>
     <template v-for="(it, i) in imgs" :key="i">
-      <wd-img width="100%" :src="it" mode="widthFix"></wd-img>
+      <wd-img width="100%" :src="it" mode="widthFix" custom-class="vertical-bottom"></wd-img>
     </template>
   </div>
 </template>