jiayubo 3 ヶ月 前
コミット
17692627ae
共有3 個のファイルを変更した12 個の追加17 個の削除を含む
  1. 5 5
      api/home.js
  2. 3 3
      components/Services/services.vue
  3. 4 9
      pages/index.vue

+ 5 - 5
api/home.js

@@ -1,10 +1,10 @@
 import request from '../utils/request'
 
-export function slideshow(slideshowId) {
-    return request({
-        url: `/web/core/slideshow/${slideshowId}`,
-        method: 'get',
-    })
+export function slideshow(slideshowType) {
+  return request({
+    url: `/web/core/slideshow/type/${slideshowType}`,
+    method: 'get',
+  })
 }
 
 //设置当前地址

+ 3 - 3
components/Services/services.vue

@@ -36,7 +36,7 @@
             <view class="demo-price-distance">
               <view class="demo-price-distance-text-1">
                 <text class="demo-price-distance-text-2">¥</text>
-                <text class="demo-price-distance-text">130</text>
+                <text class="demo-price-distance-text">{{ item.businessPrice }}</text>
               </view>
               <button class="demo-price-distance-button" @click="goToDetail(item)">抢购</button>
             </view>
@@ -70,7 +70,7 @@
           <view class="demo-price-distance">
             <view class="demo-price-distance-text-1">
               <text class="demo-price-distance-text-2">¥</text>
-              <text class="demo-price-distance-text">130</text>
+              <text class="demo-price-distance-text">{{ item.businessPrice }}</text>
             </view>
             <button class="demo-price-distance-button" @click="goToDetail(item)">抢购</button>
           </view>
@@ -267,7 +267,7 @@ const goToDetail = async (item) => {
     color: #FFFFFF;
     font-size: 30rpx;
     padding: 0;
-    margin-left: 132rpx;
+    margin-left: 70rpx;
   }
 }
 

+ 4 - 9
pages/index.vue

@@ -73,7 +73,6 @@ const rightList = ref([])
 const leftList = ref([])
 const list3 = ref(['']) // Initialize with at least one empty item
 const ValueZone = ref(['']) // Initialize with at least one empty item
-const hotList = ref([])
 const ValueZoneSwiper = ref([''])
 const userType = uni.getStorageSync('userType') || 1; //读取本地存储
 const text1 = ref('');
@@ -216,21 +215,17 @@ onReachBottom(() => {
 
 const getBanners = async () => {
   try {
-    const res = await slideshow(21)
+    const res = await slideshow(10)
     if (res.code === 200 && res.data.picture) {
       list3.value = res.data.picture.split(',')
     }
 
-    const value_res = await slideshow(111)
+    const value_res = await slideshow(20)
     if (value_res.code === 200 && value_res.data.picture) {
       ValueZone.value = value_res.data.picture.split(',')
     }
-
-    const hot_res = await slideshow(11)
-    if (hot_res.code === 200 && hot_res.data.picture) {
-      hotList.value = hot_res.data.picture.split(',')
-    }
-    const hot_node = await slideshow(22)
+    
+    const hot_node = await slideshow(30)
     if (hot_node.code === 200 && hot_node.data.picture) {
       ValueZoneSwiper.value = hot_node.data.picture.split(',')
     }