Xiao_123 il y a 6 mois
Parent
commit
e8a7941063

+ 3 - 1
components/SwiperAd/index.vue

@@ -12,10 +12,11 @@
       >
 				<swiper-item v-for="(item, index) in list" :key="'swiperItem'+index" style="border-radius: 10px;">
           <image
-            :mode="strType ? props.mode : item.mode"
+            :mode="props.mode"
             :src="strType ? item : item[props.imgUrlKey]"
              :style="`width: ${props.width}; height: ${props.height};`"
             @error="imageError"
+            @click="emit('click', item)"
           ></image>
 				</swiper-item>
 			</swiper>
@@ -24,6 +25,7 @@
 </template>
 
 <script setup>
+const emit = defineEmits(['click'])
 const props = defineProps({
   list: { type: Array, default: () => [] },
   indicatorDots: { type: Boolean, default: true }, // 是否显示面板指示点

+ 12 - 4
pages/index/crowdsourcing.vue

@@ -13,7 +13,7 @@
 				<view class="content-top">
 					<view class="content-top-carousel">
 						<view class="content-top-carousel-box">
-							<SwiperAd :list="swiperAdList"></SwiperAd>
+							<SwiperAd :list="swiperAdList" :strType="false" @click="handleToDetails"></SwiperAd>
 						</view>
 					</view>
 					<view class="content-top-recommend">
@@ -63,9 +63,10 @@ onLoad(() => {
 	getList()
 })
 const swiperAdList = [
-  'https://minio.menduner.com/dev/menduner/banner/IHG.gif',
-  'https://minio.menduner.com/dev/menduner/banner/Marriott.jpg',
-  'https://minio.menduner.com/dev/menduner/banner/UrCove.jpg'
+  { src: 'https://minio.menduner.com/dev/menduner/banner/IHG.gif', id: '577540545828753408' },
+  { src: 'https://minio.menduner.com/dev/menduner/banner/Marriott.jpg', id: '734173233779183616' },
+  { src: 'https://minio.menduner.com/dev/menduner/banner/UrCove.jpg', id: '277182701256183808' },
+  { src: 'https://minio.menduner.com/dev/menduner/miniProgram/Grand-Mercure.jpg', id: '120281807903133696' }
 ]
 const items = reactive([])
 const pageInfo = ref({
@@ -78,6 +79,13 @@ const total = ref(0)
 
 const more = ref('more')
 
+// 跳转企业详情
+const handleToDetails = ({ id }) => {
+  if (!id) return
+  uni.navigateTo({
+    url: `/pagesB/companyDetail/index?id=${id}`
+  })
+}
 
 const loadingMore = (e) => {
 	if (total.value === items.length) {

+ 15 - 4
pages/index/position.vue

@@ -4,7 +4,7 @@
     <view class="box defaultBgc">
       <scroll-view class="scrollBox" scroll-y="true" @scrolltolower="loadingMore" style="position:relative;">
         <view>
-          <SwiperAd :list="swiperAdList"></SwiperAd>
+          <SwiperAd :list="swiperAdList" :strType="false" @click="handleToDetails"></SwiperAd>
           <!-- 五宫格菜单 -->
           <view class="white-bgc ss-p-t-10">
             <uni-grid :column="5" @change="handleGrid" :showBorder="false">
@@ -94,9 +94,10 @@ onLoad(() => {
 const inputDialog = ref()
 const more = ref('more')
 const swiperAdList = [
-  'https://minio.menduner.com/dev/menduner/banner/IHG.gif',
-  'https://minio.menduner.com/dev/menduner/banner/Marriott.jpg',
-  'https://minio.menduner.com/dev/menduner/banner/UrCove.jpg'
+  { src: 'https://minio.menduner.com/dev/menduner/banner/IHG.gif', id: '577540545828753408' },
+  { src: 'https://minio.menduner.com/dev/menduner/banner/Marriott.jpg', id: '734173233779183616' },
+  { src: 'https://minio.menduner.com/dev/menduner/banner/UrCove.jpg', id: '277182701256183808' },
+  { src: 'https://minio.menduner.com/dev/menduner/miniProgram/Grand-Mercure.jpg', id: '120281807903133696' }
 ]
 const filterList = ref([
   { label: '城市', dictType: 'areaTreeDataExtend', key: 'areaIds', map: { text: 'name', value: 'id' } },
@@ -115,12 +116,22 @@ const gridList = [
   { label: '联系我们', icon: '/static/img/contact.png', path: '' }
 ]
 
+// 跳转企业详情
+const handleToDetails = ({ id }) => {
+  if (!id) return
+  uni.navigateTo({
+    url: `/pagesB/companyDetail/index?id=${id}`
+  })
+}
+
 const handleGrid = (e) => {
   // uni.showToast({
   //   icon: 'none',
   //   title: '请前往网页版门墩儿查看'
   // })
   // inputDialog.value.open()
+
+  // wx79f9c2db3c3a35e3
 }
 
 // 

+ 1 - 1
pagesB/companyDetail/index.vue

@@ -4,7 +4,7 @@
       <view class="f-horizon">
         <image class="r-avatar" style="width: 80px; height: 80px;" :src="info.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
         <view class="f-straight ss-m-l-10" style="flex: 1;position: relative;">
-          <view class="title-des ellipsis font-weight-bold" style="max-width: 45vw;">{{ info.anotherName }}</view>
+          <view class="title-des font-weight-bold" style="max-width: 45vw;">{{ info.anotherName }}</view>
           <!-- <view class="ss-m-b-5">
             <uni-icons :color="statusInfo.color" size="20" custom-prefix="iconfont"  :type="statusInfo.mdi" />
             <span :style="{'color': statusInfo.color,'font-size': '14px'}" class="font-weight-bold">{{ statusInfo.label }}</span>