@tplc/business 0.4.184 → 0.4.185

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.4.185](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.184...v0.4.185) (2025-08-04)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * map scale ([6dc2249](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6dc22499f4f7c2d0a6ed0d04f925fd1025248399))
11
+ * map修改样式 ([8ffc1aa](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/8ffc1aa582e93ae622084fb6cbdc8ad5f5618cf0))
12
+
5
13
  ### [0.4.184](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.183...v0.4.184) (2025-08-02)
6
14
 
7
15
 
@@ -75,22 +75,17 @@
75
75
  />
76
76
  </view>
77
77
  </view>
78
+ <!-- loading 加载地球gif -->
79
+ <view class="absolute top-0 left-0 w-full h-full flex-center z-2" v-if="isLoading">
80
+ <image src="./images/earth.gif" class="w-137rpx h-120rpx mt--180rpx" />
81
+ </view>
78
82
  </view>
79
83
  </view>
80
84
  </template>
81
85
 
82
86
  <script lang="ts" setup>
83
87
  import { FORM_KEY } from '@tplc/business/constants'
84
- import {
85
- reactive,
86
- inject,
87
- ref,
88
- useAttrs,
89
- watch,
90
- onMounted,
91
- getCurrentInstance,
92
- onUnmounted,
93
- } from 'vue'
88
+ import { reactive, inject, ref, useAttrs, watch, getCurrentInstance, onUnmounted } from 'vue'
94
89
  import { getJsonFromStr, transformValueUnit } from '../../utils/transform'
95
90
  import { MapItem, MapMarker } from './types'
96
91
  import useAutoHeight from '../../hooks/useAutoHeight'
@@ -111,6 +106,7 @@ const attrs = useAttrs()
111
106
  const { proxy } = getCurrentInstance()!
112
107
  const mapContext = ref<UniApp.MapContext>()
113
108
  const { userLatLon, getLocation } = useLocation()
109
+ const isLoading = ref(false)
114
110
  const props = withDefaults(defineProps<LcbListProps & LcbListInfo>(), {
115
111
  mapTagMode: 'multiple',
116
112
  })
@@ -126,6 +122,7 @@ const callout: MapMarker['callout'] = {
126
122
  borderColor: themeColor,
127
123
  bgColor: '#ffffff',
128
124
  color: themeColor,
125
+ // anchorY: 10,
129
126
  }
130
127
  const selectedTag = ref<string[]>([])
131
128
  const info = reactive({
@@ -160,20 +157,26 @@ const getData = debounce(() => {
160
157
  if (!southwest) return
161
158
  mapContext.value?.getCenterLocation({
162
159
  async success({ latitude, longitude }) {
163
- const { data = [] } = (await uni.$lcb.http.post('/productInfoMap/list', {
164
- ...props.baseParam,
165
- ...form?.value,
166
- mapLatitude: latitude,
167
- mapLongitude: longitude,
168
- mapScale: currentScale.value,
169
- mapCornerLongitude: southwest.longitude,
170
- mapCornerLatitude: southwest.latitude,
171
- productTypeList: selectedTag.value.length ? selectedTag.value : undefined,
172
- })) as {
160
+ isLoading.value = true
161
+ const { data = [] } = (await uni.$lcb.http.post(
162
+ '/productInfoMap/list',
163
+ {
164
+ ...props.baseParam,
165
+ ...form?.value,
166
+ mapLatitude: latitude,
167
+ mapLongitude: longitude,
168
+ mapScale: currentScale.value,
169
+ mapCornerLongitude: southwest.longitude,
170
+ mapCornerLatitude: southwest.latitude,
171
+ productTypeList: selectedTag.value.length ? selectedTag.value : undefined,
172
+ },
173
+ true,
174
+ )) as {
173
175
  data: MapItem[]
174
176
  }
175
177
  list.value = data as any
176
178
  getCurrentData(data)
179
+ isLoading.value = false
177
180
  },
178
181
  })
179
182
  },
@@ -202,6 +205,7 @@ const getConfig = async () => {
202
205
  ...form?.value,
203
206
  ...getJsonFromStr(props.mapConfigParams),
204
207
  })
208
+ mapContext.value = uni.createMapContext('map', proxy)
205
209
  mapContext.value?.moveToLocation({
206
210
  latitude: mapLatitude,
207
211
  longitude: mapLongitude,
@@ -280,13 +284,14 @@ const getCurrentData = (markers: MapItem[]) => {
280
284
  const isCurrent = index === 0
281
285
  return {
282
286
  id: index,
283
- iconPath: './images/transparent.png',
287
+ iconPath: '/static/images/transparent.png',
284
288
  width: 1,
285
289
  height: 1,
286
290
  poiId: current.productId,
287
291
  latitude: current.latitude,
288
292
  longitude: current.longitude,
289
293
  // alpha: 0.5,
294
+ // label: current.mapPriceTips,
290
295
  callout: {
291
296
  ...callout,
292
297
  content: current.mapPriceTips,
@@ -309,9 +314,9 @@ watch(
309
314
  deep: true,
310
315
  },
311
316
  )
312
- onMounted(() => {
313
- mapContext.value = uni.createMapContext('map', proxy)
314
- })
317
+ // onMounted(() => {
318
+ // mapContext.value = uni.createMapContext('map', proxy)
319
+ // })
315
320
 
316
321
  onUnmounted(() => {
317
322
  mapContext.value = undefined
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.184",
3
+ "version": "0.4.185",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],