Selaa lähdekoodia

fix: 问题修复

szr190 2 kuukautta sitten
vanhempi
commit
2dbcd71c03

+ 1 - 1
src/base/common/charge.vue

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <view class="common-details-container" v-if="chargeInfo?.title">
3 3
     <view class="common-header-wrapper">
4
-      <image :src="content.image" mode="scaleToFill" />
4
+      <image :src="content.image" mode="aspectFill" />
5 5
     </view>
6 6
     <view class="common-content-wrapper">
7 7
       <view class="common-card">

+ 1 - 1
src/base/common/driversHome.vue

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <view class="common-details-container" v-if="driverInfo?.title">
3 3
     <view class="common-header-wrapper">
4
-      <image :src="content.image" mode="scaleToFill" />
4
+      <image :src="content.image" mode="aspectFill" />
5 5
     </view>
6 6
     <view class="common-content-wrapper">
7 7
       <view class="common-card">

+ 1 - 1
src/base/common/join.vue

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <view class="common-details-container" v-if="content?.intro || content?.image">
3 3
     <view class="common-header-wrapper join">
4
-      <image :src="content.image" mode="scaleToFill" />
4
+      <image :src="content.image" mode="aspectFill" />
5 5
     </view>
6 6
     <view class="common-content-wrapper">
7 7
       <view class="common-card">

+ 1 - 1
src/base/common/nursingRoom.vue

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <view class="common-details-container" v-if="boyInfo?.title">
3 3
     <view class="common-header-wrapper">
4
-      <image :src="content.image" mode="scaleToFill" />
4
+      <image :src="content.image" mode="aspectFill" />
5 5
     </view>
6 6
     <view class="common-content-wrapper">
7 7
       <view class="common-card">

+ 1 - 1
src/base/common/refuel.vue

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <view class="common-details-container" v-if="refuelInfo?.title">
3 3
     <view class="common-header-wrapper">
4
-      <image :src="content.image" mode="scaleToFill" />
4
+      <image :src="content.image" mode="aspectFill" />
5 5
     </view>
6 6
     <view class="common-content-wrapper">
7 7
       <view class="common-card">

+ 1 - 1
src/base/common/repair.vue

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <view class="common-details-container" v-if="carInfo?.title">
3 3
     <view class="common-header-wrapper">
4
-      <image :src="content.image" mode="scaleToFill" />
4
+      <image :src="content.image" mode="aspectFill" />
5 5
     </view>
6 6
     <view class="common-content-wrapper">
7 7
       <view class="common-card">

+ 2 - 2
src/base/common/spot.vue

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <view class="common-details-container">
3 3
     <view class="common-header-wrapper">
4
-      <image :src="content.image" mode="scaleToFill" />
4
+      <image :src="content.image" mode="aspectFill" />
5 5
     </view>
6 6
     <view class="common-content-wrapper">
7 7
       <view class="common-card">
@@ -13,7 +13,7 @@
13 13
         <view class="common-sub-title">
14 14
           <view class="text">地址:{{ content?.address }}</view>
15 15
           <view class="sub-img-wrap" @click="goToNavigation(content?.longitude, content?.latitude, content?.title)">
16
-            <image :src="minioUrl + '/icon_go.png'" mode="scaleToFill" />
16
+            <image :src="minioUrl + '/icon_go.png'" mode="aspectFill" />
17 17
           </view>
18 18
         </view>
19 19
       </view>

+ 8 - 5
src/base/shop/details.vue

@@ -1,27 +1,30 @@
1 1
 <template>
2 2
   <view class="common-details-container">
3 3
     <view class="common-header-wrapper">
4
-      <image :src="content.image" mode="scaleToFill" />
4
+      <image :src="content.image" mode="aspectFill" />
5 5
     </view>
6 6
     <view class="common-content-wrapper">
7 7
       <view class="common-card">
8 8
         <view class="common-card-title">{{ details.title }}</view>
9 9
         <view class="common-card-rate">
10
-          <uni-rate allow-half :value="content.rate" disabled disabledColor="#ff5702" color="#ddd" activeColor="#ff5702" />
11
-          <text>{{ content.rate }}</text>
10
+          <uni-rate allow-half :value="content.rate || 0" disabled disabledColor="#ff5702" color="#ddd" activeColor="#ff5702" />
11
+          <text v-if="content.rate">{{ (Number(content.rate) || 0).toFixed(1) }}</text>
12 12
         </view>
13 13
         <view class="common-sub-title">营业时间: {{ details.businessAt }}</view>
14 14
       </view>
15 15
       <view class="common-card">
16 16
         <view class="common-card-title">店铺简介</view>
17
-        <view class="common-card-content">
17
+        <view class="common-card-content" v-if="content?.intro">
18 18
           <u-parse :html="content?.intro" />
19 19
         </view>
20
+        <view class="common-card-content" v-else>
21
+          <u-empty text="暂无简介" />
22
+        </view>
20 23
         <view class="common-card-title u-margin-top-30">精品推荐</view>
21 24
         <view class="common-card-list" v-if="content.facilities?.length > 0">
22 25
           <view class="card-list-item" v-for="(item, index) in content.facilities" :key="index">
23 26
             <view class="item-img-wrap">
24
-              <image :src="item.img" mode="scaleToFill" />
27
+              <image :src="item.img" mode="aspectFill" />
25 28
             </view>
26 29
             <view class="list-text">{{ item.name }}</view>
27 30
           </view>

+ 4 - 4
src/base/shop/detailsShop.vue

@@ -1,14 +1,14 @@
1 1
 <template>
2 2
   <view class="common-details-container">
3 3
     <view class="common-header-wrapper">
4
-      <image :src="content.image" mode="scaleToFill" />
4
+      <image :src="content.image" mode="aspectFill" />
5 5
     </view>
6 6
     <view class="common-content-wrapper">
7 7
       <view class="common-card">
8 8
         <view class="common-card-title">{{ details.title }}</view>
9 9
         <view class="common-card-rate">
10
-          <uni-rate allow-half :value="content.rate" disabled disabledColor="#ff5702" color="#ddd" activeColor="#ff5702" />
11
-          <text>{{ content.rate }}</text>
10
+          <uni-rate allow-half :value="content.rate || 0" disabled disabledColor="#ff5702" color="#ddd" activeColor="#ff5702" />
11
+          <text>{{ (Number(content.rate) || 0).toFixed(1) }}</text>
12 12
         </view>
13 13
         <view class="common-sub-title">营业时间: {{ details.businessAt }}</view>
14 14
       </view>
@@ -24,7 +24,7 @@
24 24
         <view class="common-card-list" v-if="content.facilities?.length > 0">
25 25
           <view class="card-list-item" v-for="(item, index) in content.facilities" :key="index">
26 26
             <view class="item-img-wrap">
27
-              <image :src="item.img" mode="scaleToFill" />
27
+              <image :src="item.img" mode="aspectFill" />
28 28
             </view>
29 29
             <view class="list-text">{{ item.name }}</view>
30 30
           </view>

+ 5 - 5
src/base/suggest/index.vue

@@ -5,28 +5,28 @@
5 5
         <view class="title">尊敬的顾客</view>
6 6
         <view class="sub-title">欢迎您对我们服务区提出建议反馈,我们会对您的问题进行全程跟踪</view>
7 7
       </view>
8
-      <image class="header-logo" :src="minioUrl + '/icon_kefubz_01.png'" mode="scaleToFill" />
8
+      <image class="header-logo" :src="minioUrl + '/icon_kefubz_01.png'" mode="aspectFill" />
9 9
     </view>
10 10
     <view class="suggest-block-wrapper">
11 11
       <view class="block-item" @click="toSuggest">
12 12
         <view class="b-title">投诉建议</view>
13 13
         <view class="b-sub-title">提交您建议,将有专业人士为您跟进处理</view>
14
-        <image class="bottom-img" :src="minioUrl + '/icon_kefubz_02.png'" mode="scaleToFill" />
14
+        <image class="bottom-img" :src="minioUrl + '/icon_kefubz_02.png'" mode="aspectFill" />
15 15
       </view>
16 16
       <view class="block-item" @click="toRecord">
17 17
         <view class="b-title">反馈记录</view>
18 18
         <view class="b-sub-title">查看您的反馈记录</view>
19
-        <image class="bottom-img" :src="minioUrl + '/icon_kefubz_3.png'" mode="scaleToFill" />
19
+        <image class="bottom-img" :src="minioUrl + '/icon_kefubz_3.png'" mode="aspectFill" />
20 20
       </view>
21 21
     </view>
22 22
     <HyCard title="常见问题">
23 23
       <view class="suggest-list-wrapper">
24 24
         <view class="list-item" v-for="(item, index) in questionList" :key="index" @click="toDetails(item.id)">
25 25
           <view class="text">{{ item.title }}</view>
26
-          <image :src="minioUrl + '/icon_kefubz_05.png'" mode="scaleToFill" />
26
+          <image :src="minioUrl + '/icon_kefubz_05.png'" mode="aspectFill" />
27 27
         </view>
28 28
         <view class="refresh-wrap" @click="tapRefresh">
29
-          <image :src="minioUrl + '/icon_kefubz_04.png'" mode="scaleToFill" />
29
+          <image :src="minioUrl + '/icon_kefubz_04.png'" mode="aspectFill" />
30 30
           <text>换一换</text>
31 31
         </view>
32 32
       </view>

+ 1 - 1
src/components/HySelect.vue

@@ -3,7 +3,7 @@
3 3
     <!-- 下拉选择触发区域 -->
4 4
     <view class="custom-select" @tap="toggleDropdown">
5 5
       <text class="select-text">{{ selectedOptionText || placeholder }}</text>
6
-      <image class="select-icon" :class="{ rotate: dropdownVisible }" :src="minioUrl + '/icon_bottom_arrow.png'" mode="scaleToFill" />
6
+      <image class="select-icon" :class="{ rotate: dropdownVisible }" :src="minioUrl + '/icon_bottom_arrow.png'" mode="aspectFill" />
7 7
     </view>
8 8
 
9 9
     <!-- 下拉菜单 -->

+ 223 - 0
src/components/HySelectPopup.vue

@@ -0,0 +1,223 @@
1
+<template>
2
+  <view class="select-container">
3
+    <!-- 下拉选择触发区域 -->
4
+    <view class="custom-select" @tap="toggleDropdown">
5
+      <text class="select-text">{{ selectedOptionText || placeholder }}</text>
6
+      <image class="select-icon" :class="{ rotate: dropdownVisible }" :src="minioUrl + '/icon_bottom_arrow.png'" mode="aspectFill" />
7
+    </view>
8
+
9
+    <!-- 弹窗形式的下拉菜单 -->
10
+    <u-popup v-model="dropdownVisible" mode="center" border-radius="12" :mask-close-able="true" @close="closeDropdown">
11
+      <view class="popup-menu">
12
+        <view class="popup-header">
13
+          <text class="popup-title">选择服务区</text>
14
+          <u-icon name="close" color="#999" size="32" @tap="closeDropdown"></u-icon>
15
+        </view>
16
+        <view class="popup-content">
17
+          <view
18
+            class="dropdown-item"
19
+            v-for="item in parkList"
20
+            :key="item.id"
21
+            :class="{ selected: selectedValue === item.id }"
22
+            @tap="selectItem(item)"
23
+          >
24
+            <text>{{ item.name }}</text>
25
+            <u-icon v-if="selectedValue === item.id" name="checkmark" color="#2979ff" size="32"></u-icon>
26
+          </view>
27
+        </view>
28
+      </view>
29
+    </u-popup>
30
+  </view>
31
+</template>
32
+
33
+<script setup lang="ts">
34
+import { ref, computed, watch } from 'vue'
35
+import { getParkWebAPI } from '@/api/system'
36
+import { useGlobal } from '@/composables/index'
37
+const { minioUrl } = useGlobal()
38
+
39
+// 定义组件接收的props
40
+const props = defineProps({
41
+  // 当前选中的值
42
+  modelValue: {
43
+    type: String,
44
+    default: ''
45
+  },
46
+  // 占位符文本
47
+  placeholder: {
48
+    type: String,
49
+    default: '请选择'
50
+  }
51
+})
52
+
53
+// 定义组件触发的事件
54
+const emit = defineEmits(['update:modelValue', 'change'])
55
+
56
+// 内部状态
57
+const dropdownVisible = ref(false)
58
+const selectedValue = ref(props.modelValue)
59
+
60
+const parkList = ref([]) as any
61
+
62
+// 计算当前选中的选项文本
63
+const selectedOptionText = computed(() => {
64
+  const selected = parkList.value.find((item: any) => item.id === selectedValue.value)
65
+  return selected ? selected.name : ''
66
+})
67
+
68
+// 获取全部园区楼宇
69
+const getParkWeb = async () => {
70
+  const res = await getParkWebAPI()
71
+  if (res.code === 200) {
72
+    parkList.value = res.rows
73
+
74
+    // 当数据加载完成且没有选中值时,默认选择第一项
75
+    if (parkList.value.length > 0 && !selectedValue.value) {
76
+      const firstItem = parkList.value[0]
77
+      selectedValue.value = firstItem.id
78
+
79
+      // 存储到本地缓存
80
+      uni.setStorageSync('parkId', firstItem.id)
81
+
82
+      // 触发事件通知父组件
83
+      emit('update:modelValue', firstItem.id)
84
+      emit('change', firstItem)
85
+    }
86
+  }
87
+}
88
+
89
+getParkWeb()
90
+
91
+// 监听modelValue变化,同步内部状态
92
+watch(
93
+  () => props.modelValue,
94
+  (newValue) => {
95
+    selectedValue.value = newValue
96
+  }
97
+)
98
+
99
+// 切换下拉菜单显示/隐藏
100
+const toggleDropdown = () => {
101
+  dropdownVisible.value = !dropdownVisible.value
102
+}
103
+
104
+// 关闭下拉菜单
105
+const closeDropdown = () => {
106
+  dropdownVisible.value = false
107
+}
108
+
109
+// 选择选项
110
+const selectItem = (item: { id: string; name: string }) => {
111
+  // 存储到本地缓存
112
+  uni.setStorageSync('parkId', item.id)
113
+  selectedValue.value = item.id
114
+  dropdownVisible.value = false
115
+
116
+  // 触发事件通知父组件
117
+  emit('update:modelValue', item.id)
118
+  emit('change', item)
119
+}
120
+</script>
121
+
122
+<style lang="scss" scoped>
123
+.select-container {
124
+  position: relative;
125
+  z-index: 100;
126
+  .custom-select {
127
+    width: 100%;
128
+    height: 60rpx;
129
+    display: flex;
130
+    align-items: center;
131
+    justify-content: space-between;
132
+    // padding: 0 20rpx;
133
+    cursor: pointer;
134
+    transition: background-color 0.2s;
135
+
136
+    .select-text {
137
+      font-size: 30rpx;
138
+      color: #3b3c3b;
139
+      font-weight: 600;
140
+      overflow: hidden;
141
+      text-overflow: ellipsis;
142
+      white-space: nowrap;
143
+      flex: 1;
144
+    }
145
+
146
+    .select-icon {
147
+      width: 13rpx;
148
+      height: 10rpx;
149
+      margin-left: 10rpx;
150
+      transition: transform 0.2s;
151
+    }
152
+
153
+    .select-icon.rotate {
154
+      transform: rotate(180deg);
155
+    }
156
+  }
157
+}
158
+
159
+/* 弹窗样式 */
160
+.popup-menu {
161
+  width: 600rpx;
162
+  background-color: #fff;
163
+  border-radius: 12rpx;
164
+  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
165
+  overflow: hidden;
166
+
167
+  .popup-header {
168
+    height: 80rpx;
169
+    padding: 0 24rpx;
170
+    display: flex;
171
+    align-items: center;
172
+    justify-content: space-between;
173
+    border-bottom: 1rpx solid #f0f0f0;
174
+
175
+    .popup-title {
176
+      font-size: 32rpx;
177
+      color: #333;
178
+      font-weight: 600;
179
+    }
180
+  }
181
+
182
+  .popup-content {
183
+    max-height: 500rpx;
184
+    overflow-y: auto;
185
+    padding: 15rpx;
186
+    width: 100%;
187
+
188
+    .dropdown-item {
189
+      height: 80rpx;
190
+      padding: 0 24rpx;
191
+      display: flex;
192
+      align-items: center;
193
+      justify-content: space-between;
194
+      cursor: pointer;
195
+      transition: background-color 0.2s;
196
+
197
+      &:last-child {
198
+        border-bottom: none;
199
+      }
200
+
201
+      &.selected {
202
+        background-color: #f0f7ff;
203
+        color: #007aff;
204
+        border-radius: 8rpx;
205
+        text {
206
+          color: #007aff;
207
+          font-weight: 500;
208
+        }
209
+      }
210
+
211
+      text {
212
+        font-size: 26rpx;
213
+        color: #1d2129;
214
+      }
215
+
216
+      .check-icon {
217
+        width: 32rpx;
218
+        height: 32rpx;
219
+      }
220
+    }
221
+  }
222
+}
223
+</style>

+ 1 - 1
src/components/HyService.vue

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <view class="service-item-wrapper">
3 3
     <view class="item-left-wrap">
4
-      <image :src="item.content.image" mode="scaleToFill" />
4
+      <image :src="item.content.image" mode="aspectFill" />
5 5
       <text>{{ item.title }}</text>
6 6
     </view>
7 7
     <view class="item-right-wrap" :style="{ backgroundImage: `url(${minioUrl}/bg_service_03.png)` }">

+ 3 - 3
src/components/HyShopItem.vue

@@ -2,14 +2,14 @@
2 2
 <template>
3 3
   <view class="shop-item-wrapper" @click="navigateToDetails(item)">
4 4
     <view class="item-left-wrap">
5
-      <image :src="item.content?.image" mode="scaleToFill" />
5
+      <image :src="item.content?.image" mode="aspectFill" />
6 6
     </view>
7 7
     <view class="item-right-wrap">
8 8
       <view class="top">
9 9
         <view class="title u-line-1">{{ item.title }}</view>
10 10
         <view class="rate-box">
11
-          <uni-rate allow-half :value="item.content?.rate" disabled color="#ddd" disabledColor="#ff5702" activeColor="#ff5702" size="20" />
12
-          <text class="rate-text">{{ item.content?.rate }}</text>
11
+          <uni-rate allow-half :value="item.content?.rate || 0" disabled color="#ddd" disabledColor="#ff5702" activeColor="#ff5702" size="20" />
12
+          <text class="rate-text">{{ (Number(item.content?.rate) || 0).toFixed(1) }}</text>
13 13
         </view>
14 14
         <view class="price" v-if="price">¥{{ item.content?.price }}/人</view>
15 15
       </view>

+ 1 - 1
src/components/HyStation.vue

@@ -4,7 +4,7 @@
4 4
       <view class="station-card-wrap">
5 5
         <view class="card-header">
6 6
           <view class="text">{{ item.name }}</view>
7
-          <image :src="minioUrl + '/icon_sm_jiayou.png'" mode="scaleToFill" />
7
+          <image :src="minioUrl + '/icon_sm_jiayou.png'" mode="aspectFill" />
8 8
         </view>
9 9
         <view class="card-bottom">
10 10
           <view class="price-box">

+ 1 - 1
src/composables/index.ts

@@ -6,7 +6,7 @@ export const useGlobal = () => {
6 6
   // 文件路径前缀
7 7
   const pathPre: string = import.meta.env.VITE_OSS_URL + import.meta.env.VITE_BARREL_URL
8 8
   // Minio地址配置
9
-  const minioUrl: string = pathPre + '/app'
9
+  const minioUrl: string = pathPre + 'app'
10 10
   // 整数最大值
11 11
   const numberMax: number = 9999999999
12 12
   // 小数最大值

+ 13 - 9
src/pages/index.vue

@@ -268,7 +268,7 @@ const callPhone = (phone: string) => {
268 268
 <template>
269 269
   <mescroll-body
270 270
     @init="mescrollInit"
271
-    :down="{ use: true, minAngle: angle }"
271
+    :down="{ use: false, minAngle: angle }"
272 272
     :bottombar="false"
273 273
     :up="{ bgColor: '#f6f7fb', textColor: '#999', empty: { use: false } }"
274 274
     @down="downCallback"
@@ -279,12 +279,12 @@ const callPhone = (phone: string) => {
279 279
       <view class="header-bg" :style="{ backgroundImage: 'url(' + minioUrl + '/index_bg.png)' }"></view>
280 280
       <!-- header -->
281 281
       <view class="index-header-wrapper">
282
-        <image :src="minioUrl + '/logo.png'" mode="scaleToFill" class="logo" />
282
+        <image :src="minioUrl + '/logo.png'" mode="aspectFill" class="logo" />
283 283
         <view class="header-right-wrap">
284 284
           <view class="top-title-box">
285 285
             <HySelect v-model="selectedValue" @change="handleParkChange" />
286 286
           </view>
287
-          <image class="star-img" :src="minioUrl + '/star.png'" mode="scaleToFill" />
287
+          <image class="star-img" :src="minioUrl + '/star.png'" mode="aspectFill" />
288 288
           <view class="bottom-box">
289 289
             <!-- 天气 -->
290 290
             <iframe
@@ -306,7 +306,7 @@ const callPhone = (phone: string) => {
306 306
       <view class="index-nav-wrapper">
307 307
         <view class="nav-item" v-for="(item, index) in navList" :key="index" @click="navClick(item)">
308 308
           <view class="nav-image">
309
-            <image :src="item.image" mode="scaleToFill" :style="{ width: item.w, height: item.h }" />
309
+            <image :src="item.image" mode="aspectFill" :style="{ width: item.w, height: item.h }" />
310 310
           </view>
311 311
           <view class="nav-item-text">{{ item.text }}</view>
312 312
         </view>
@@ -385,7 +385,7 @@ const callPhone = (phone: string) => {
385 385
         <view class="index-shop-wrapper" v-if="shopList.length > 0">
386 386
           <view class="shop-item" v-for="(item, index) in shopList" :key="index" @click="navigateToShopDetail(item.id)">
387 387
             <view class="img-wrap">
388
-              <image :src="item.content.image" mode="scaleToFill" />
388
+              <image :src="item.content.image" mode="aspectFill" />
389 389
             </view>
390 390
             <view class="item-text u-line-1">{{ item.title }}</view>
391 391
           </view>
@@ -399,7 +399,7 @@ const callPhone = (phone: string) => {
399 399
         <view class="index-spot-wrapper" v-if="scenicList.length > 0">
400 400
           <view class="spot-item" v-for="(item, index) in scenicList" :key="index" @click="navigateToSpot(item.id)">
401 401
             <view class="spot-img-wrap">
402
-              <image :src="item.content.image" mode="scaleToFill" />
402
+              <image :src="item.content.image" mode="aspectFill" />
403 403
             </view>
404 404
             <view class="spot-right-wrap">
405 405
               <view class="right-header">
@@ -411,7 +411,7 @@ const callPhone = (phone: string) => {
411 411
               </view>
412 412
               <view class="right-location-box">
413 413
                 <view class="left">
414
-                  <image class="icon-address" :src="minioUrl + '/icon_address.png'" mode="scaleToFill" />
414
+                  <image class="icon-address" :src="minioUrl + '/icon_address.png'" mode="aspectFill" />
415 415
                   <view class="address-text-wrap"
416 416
                     >距您<text>{{ item.content.distance }}</text
417 417
                     >公里,驾车预计<text>{{ item.content.driveTime }}</text
@@ -419,7 +419,7 @@ const callPhone = (phone: string) => {
419 419
                   >
420 420
                 </view>
421 421
                 <view class="right-go-icon" @click.stop="goToNavigation(item.content.longitude, item.content.latitude, item.title)">
422
-                  <image :src="minioUrl + '/icon_go.png'" mode="scaleToFill" />
422
+                  <image :src="minioUrl + '/icon_go.png'" mode="aspectFill" />
423 423
                 </view>
424 424
               </view>
425 425
             </view>
@@ -715,10 +715,14 @@ const callPhone = (phone: string) => {
715 715
     margin-top: 26rpx;
716 716
     display: flex;
717 717
     align-items: center;
718
-    justify-content: space-between;
718
+    // justify-content: space-between;
719 719
     .shop-item {
720 720
       display: flex;
721 721
       flex-direction: column;
722
+      margin-right: 28rpx;
723
+      &:last-child {
724
+        margin-right: 0;
725
+      }
722 726
       .img-wrap {
723 727
         width: 104rpx;
724 728
         height: 104rpx;

+ 5 - 5
src/pages/my.vue

@@ -30,28 +30,28 @@ const callPhone = (phone: string) => {
30 30
 <template>
31 31
   <view class="my-container" :style="{ backgroundImage: `url(${minioUrl + '/my_bg.png'})` }">
32 32
     <view class="my-header-wrapper">
33
-      <image :src="minioUrl + '/icon_default_user.png'" mode="scaleToFill" />
33
+      <image :src="minioUrl + '/icon_default_user.png'" mode="aspectFill" />
34 34
       <text class="user-name-text">{{ userInfo.user.mobile || userInfo.user.username }}</text>
35 35
     </view>
36 36
     <HyCard>
37 37
       <view class="my-list-item" @click="toPage('/base/suggest/record')">
38 38
         <view class="list-left">
39
-          <image :src="minioUrl + '/icon_feed.png'" mode="scaleToFill" style="width: 42rpx; height: 42rpx" />
39
+          <image :src="minioUrl + '/icon_feed.png'" mode="aspectFill" style="width: 42rpx; height: 42rpx" />
40 40
           <text class="text">我的反馈</text>
41 41
         </view>
42 42
         <view class="list-right">
43
-          <image :src="minioUrl + '/icon_right.png'" mode="scaleToFill" />
43
+          <image :src="minioUrl + '/icon_right.png'" mode="aspectFill" />
44 44
         </view>
45 45
       </view>
46 46
       <view class="my-list-item" @click="callPhone('0532-88886666')">
47 47
         <view class="list-left">
48
-          <image :src="minioUrl + '/icon_phone.png'" mode="scaleToFill" style="width: 42rpx; height: 42rpx" />
48
+          <image :src="minioUrl + '/icon_phone.png'" mode="aspectFill" style="width: 42rpx; height: 42rpx" />
49 49
           <text class="text">客服热线:0532-88886666</text>
50 50
         </view>
51 51
       </view>
52 52
       <view class="my-list-item">
53 53
         <view class="list-left">
54
-          <image :src="minioUrl + '/icon_time.png'" mode="scaleToFill" style="width: 42rpx; height: 42rpx" />
54
+          <image :src="minioUrl + '/icon_time.png'" mode="aspectFill" style="width: 42rpx; height: 42rpx" />
55 55
           <text class="text">咨询时间:09:00-22:00</text>
56 56
         </view>
57 57
       </view>

+ 3 - 3
src/pages/service.vue

@@ -58,7 +58,7 @@ const goToNavigation = (longitude: string, latitude: string, name: string) => {
58 58
         <view class="service-item">
59 59
           <view class="item-header-wrap">
60 60
             <view class="header-img-box">
61
-              <image :src="item.content.image" mode="scaleToFill" />
61
+              <image :src="item.content.image" mode="aspectFill" />
62 62
               <view class="header-status-tag" :class="{ 'open-tag': item.content.status !== '建设中' }">{{ item.content.status }}</view>
63 63
             </view>
64 64
             <view class="header-right-box">
@@ -71,11 +71,11 @@ const goToNavigation = (longitude: string, latitude: string, name: string) => {
71 71
               <view class="address-wrap">
72 72
                 <view class="block">
73 73
                   <view class="t">{{ item.content.startLocation }}</view>
74
-                  <image class="icon-arrive" :src="minioUrl + '/icon_arrive.png'" mode="scaleToFill" />
74
+                  <image class="icon-arrive" :src="minioUrl + '/icon_arrive.png'" mode="aspectFill" />
75 75
                   <view class="t">{{ item.content.endLocation }}</view>
76 76
                 </view>
77 77
                 <view class="icon-go" @click="goToNavigation(item.content.endLongitude, item.content.endLatitude, item.content.title)">
78
-                  <image :src="minioUrl + '/icon_blue_go.png'" mode="scaleToFill" />
78
+                  <image :src="minioUrl + '/icon_blue_go.png'" mode="aspectFill" />
79 79
                 </view>
80 80
               </view>
81 81
             </view>

+ 1 - 1
src/uni_modules/vk-uview-ui/components/u-image/u-image.vue

@@ -44,7 +44,7 @@
44 44
  * @tutorial https://uviewui.com/components/image.html
45 45
  * @property {String} src 图片地址
46 46
  * @property {String} mode 裁剪模式,见官网说明
47
- * 	@value scaleToFill		不保持纵横比缩放图片,使图片的宽高完全拉伸至填满 image 元素
47
+ * 	@value aspectFill		不保持纵横比缩放图片,使图片的宽高完全拉伸至填满 image 元素
48 48
  * 	@value aspectFit			保持纵横比缩放图片,使图片的长边能完全显示出来。也就是说,可以完整地将图片显示出来。
49 49
  * 	@value aspectFill			保持纵横比缩放图片,只保证图片的短边能完全显示出来。也就是说,图片通常只在水平或垂直方向是完整的,另一个方向将会发生截取。
50 50
  * 	@value widthFix				宽度不变,高度自动变化,保持原图宽高比不变

+ 1 - 1
src/uni_modules/vk-uview-ui/components/u-tabbar/u-tabbar.vue

@@ -32,7 +32,7 @@
32 32
 					<u-icon
33 33
 						:size="midButton && item.midButton ? midButtonSize : iconSize"
34 34
 						:name="elIconPath(index)"
35
-						img-mode="scaleToFill"
35
+						img-mode="aspectFill"
36 36
 						:color="elColor(index)"
37 37
 						:custom-prefix="item.customIcon ? 'custom-icon' : 'uicon'"
38 38
 					></u-icon>