@tplc/business 0.4.179 → 0.4.181

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,33 @@
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.181](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.180...v0.4.181) (2025-08-01)
6
+
7
+
8
+ ### 🐛 Bug Fixes | Bug 修复
9
+
10
+ * map 兼容拖动 ([6bd504e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6bd504e2f46f1aee18208466531254909e25d928))
11
+
12
+ ### [0.4.180](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.176...v0.4.180) (2025-08-01)
13
+
14
+
15
+ ### 🚀 Chore | 构建/工程依赖/工具
16
+
17
+ * **release:** 0.4.177 ([92474f4](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/92474f43845c2fb1c6a669b6a7c9ecc5c873c96b))
18
+ * **release:** 0.4.178 ([08a207b](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/08a207b5fd87e6fd6f7745f142015b9efd949f81))
19
+ * **release:** 0.4.179 ([2286e1e](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/2286e1e05ccc696e8f9ce94cb6d68b7be2e7a7e8))
20
+
21
+
22
+ ### ✨ Features | 新功能
23
+
24
+ * action custom path ([75fc5be](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/75fc5be17e8e7822e3fcf4dd15a73827abb7c743))
25
+ * list 支持调整样式 ([37bf166](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/37bf1660d5b2acc33ab794b6b0a4aa3a6e82fbb5))
26
+ * 修改字段 ([c2dcf21](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/c2dcf218378009d27b8489a6f6bd20830613349e))
27
+ * 完成地图配置 ([17ffbc4](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/17ffbc423780ed30c097f695da8ddcb01e3fb828))
28
+ * 支持及定位 ([1f014bd](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1f014bdcd2ca74fe75fdb3833263fe64a77b6d5b))
29
+ * 新增map ([aef14fd](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/aef14fd48ed636fcef128a52873b87ad6637e59f))
30
+ * 获取地图类型 ([5d5f6dd](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/5d5f6dd3aae6b41bfbb4699b71bec7ff5e380fcf))
31
+
5
32
  ### [0.4.179](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.178...v0.4.179) (2025-07-31)
6
33
 
7
34
 
@@ -3,8 +3,6 @@
3
3
  <view class="flex-col flex w-full" :style="{ height }" v-if="height">
4
4
  <view class="flex-1 h-0 relative">
5
5
  <map
6
- :latitude="form.userLatitude"
7
- :longitude="form.userLongitude"
8
6
  :markers="info.covers"
9
7
  show-location
10
8
  show-compass
@@ -15,18 +13,12 @@
15
13
  @regionchange="onRegionChange"
16
14
  @callouttap="onCalloutTap"
17
15
  />
16
+ {{ form.mapLatitude }}
18
17
  <image
19
18
  src="./images/2.png"
20
19
  class="w-36rpx h-66rpx absolute left-0 top-0 m-auto bottom-0 right-0"
21
20
  />
22
21
  <!-- 重新定位到当前位置 -->
23
- <view
24
- class="absolute bottom-80 left-3 ox-border w-fit h-fit bg-white shadow-lg px-2 py-1 z-1 rounded-1 box-border text-2.5 text-center text-[var(--wot-color-theme)]"
25
- @click="getCurrentLocation"
26
- >
27
- <wd-icon name="dingwei" class-prefix="lcb" />
28
- <view class="mt-0.5 font-600">定位</view>
29
- </view>
30
22
  <view class="absolute top-3 right-2 flex flex-col gap-2">
31
23
  <view
32
24
  v-for="item in mapTags"
@@ -38,40 +30,51 @@
38
30
  {{ item.label }}
39
31
  </view>
40
32
  </view>
41
- <view class="absolute bottom-0 left-0 py-3 px-4 box-border w-full h-fit" v-if="list[current]">
42
- <lcb-action-view v-bind="list[current].link">
43
- <lcb-product-item
44
- v-bind="{
45
- ...list[current],
46
- ...attrs,
47
- }"
48
- :layoutType="layoutType"
49
- :coverImgStyle="{
50
- width: layoutType === 'vertical' ? '100%' : transformValueUnit(imageWidth),
51
- height: layoutType === 'vertical' ? transformValueUnit(imageHeight) : undefined,
52
- minHeight: layoutType !== 'vertical' ? transformValueUnit(imageHeight) : undefined,
53
- borderRadius: imageRadius ? transformValueUnit(imageRadius) : undefined,
54
- ...(attrs?.coverImgStyle ?? {}),
55
- }"
56
- :titleLineClamp="titleLineClamp"
33
+ <view class="absolute bottom-0 left-0 w-full h-fit py-3 px-4 box-border">
34
+ <view
35
+ class="box-border w-fit h-fit bg-white shadow-lg px-2 py-1 z-1 rounded-1 box-border text-2.5 text-center text-[var(--wot-color-theme)]"
36
+ @click="getCurrentLocation"
37
+ :class="list[current] ? 'mb-3' : 'mb-12'"
38
+ >
39
+ <wd-icon name="dingwei" class-prefix="lcb" />
40
+ <view class="mt-0.5 font-600">定位</view>
41
+ </view>
42
+ <view class="relative" v-if="list[current]">
43
+ <lcb-action-view v-bind="list[current].link">
44
+ <lcb-product-item
45
+ v-bind="{
46
+ ...list[current],
47
+ ...attrs,
48
+ ...$props,
49
+ }"
50
+ :layoutType="layoutType"
51
+ :coverImgStyle="{
52
+ width: layoutType === 'vertical' ? '100%' : transformValueUnit(imageWidth),
53
+ height: layoutType === 'vertical' ? transformValueUnit(imageHeight) : undefined,
54
+ minHeight: layoutType !== 'vertical' ? transformValueUnit(imageHeight) : undefined,
55
+ borderRadius: imageRadius ? transformValueUnit(imageRadius) : undefined,
56
+ ...(attrs?.coverImgStyle ?? {}),
57
+ }"
58
+ :titleLineClamp="titleLineClamp"
59
+ />
60
+ </lcb-action-view>
61
+ <wd-icon
62
+ class-prefix="lcb"
63
+ size="32"
64
+ name="youbian"
65
+ custom-class="icon right--4"
66
+ @click="onCurrentChange(1)"
67
+ v-if="list[current + 1]"
57
68
  />
58
- </lcb-action-view>
59
- <wd-icon
60
- class-prefix="lcb"
61
- size="32"
62
- name="youbian"
63
- custom-class="icon right-1"
64
- @click="onCurrentChange(1)"
65
- v-if="list[current + 1]"
66
- />
67
- <wd-icon
68
- class-prefix="lcb"
69
- size="32"
70
- name="zuobian"
71
- custom-class="icon left-1"
72
- @click="onCurrentChange(-1)"
73
- v-if="list[current - 1]"
74
- />
69
+ <wd-icon
70
+ class-prefix="lcb"
71
+ size="32"
72
+ name="zuobian"
73
+ custom-class="icon left--4"
74
+ @click="onCurrentChange(-1)"
75
+ v-if="list[current - 1]"
76
+ />
77
+ </view>
75
78
  </view>
76
79
  </view>
77
80
  </view>
@@ -125,6 +128,7 @@ const current = ref(0)
125
128
  const list = ref<MapItem[]>([])
126
129
  const mapScale = ref(14)
127
130
  const isConfig = ref(false)
131
+ const currentScale = ref(14)
128
132
 
129
133
  const onTagClick = (value: string) => {
130
134
  if (props.mapTagMode === 'single') {
@@ -144,19 +148,26 @@ const onTagClick = (value: string) => {
144
148
 
145
149
  const getData = debounce(() => {
146
150
  mapContext.value?.getRegion({
147
- async success(res) {
148
- const { data = [] } = (await uni.$lcb.http.post('/productInfoMap/list', {
149
- ...props.baseParam,
150
- ...form?.value,
151
- mapScale: mapScale.value,
152
- mapCornerLongitude: res.southwest.longitude,
153
- mapCornerLatitude: res.southwest.latitude,
154
- productTypeList: selectedTag.value.length ? selectedTag.value : undefined,
155
- })) as {
156
- data: MapItem[]
157
- }
158
- list.value = data as any
159
- getCurrentData(data)
151
+ success({ southwest }) {
152
+ if (!southwest) return
153
+ mapContext.value?.getCenterLocation({
154
+ async success({ latitude, longitude }) {
155
+ const { data = [] } = (await uni.$lcb.http.post('/productInfoMap/list', {
156
+ ...props.baseParam,
157
+ ...form?.value,
158
+ mapLatitude: latitude,
159
+ mapLongitude: longitude,
160
+ mapScale: currentScale.value,
161
+ mapCornerLongitude: southwest.longitude,
162
+ mapCornerLatitude: southwest.latitude,
163
+ productTypeList: selectedTag.value.length ? selectedTag.value : undefined,
164
+ })) as {
165
+ data: MapItem[]
166
+ }
167
+ list.value = data as any
168
+ getCurrentData(data)
169
+ },
170
+ })
160
171
  },
161
172
  })
162
173
  }, 50)
@@ -183,17 +194,21 @@ const getConfig = async () => {
183
194
  ...form?.value,
184
195
  ...getJsonFromStr(props.mapConfigParams),
185
196
  })
186
- form.value.userLatitude = mapLatitude
187
- form.value.userLongitude = mapLongitude
188
- mapScale.value = scale
197
+ mapContext.value?.moveToLocation({
198
+ latitude: mapLatitude,
199
+ longitude: mapLongitude,
200
+ })
201
+ getData()
189
202
  }
190
203
 
191
204
  watch(
192
205
  () => userLatLon.value,
193
206
  async (val, old) => {
194
207
  if (!val || JSON.stringify(val) === JSON.stringify(old)) return
195
- form.value.mapLatitude = val.latitude
196
- form.value.mapLongitude = val.longitude
208
+ mapContext.value?.moveToLocation({
209
+ latitude: val.latitude,
210
+ longitude: val.longitude,
211
+ })
197
212
  form.value.userLongitude = val.longitude
198
213
  form.value.userLatitude = val.latitude
199
214
  if (!isConfig.value) {
@@ -206,13 +221,15 @@ watch(
206
221
  },
207
222
  )
208
223
  const getCurrentLocation = async () => {
209
- getLocation(true)
224
+ mapContext.value?.moveToLocation({})
210
225
  }
211
226
  getLocation()
212
227
  const onRegionChange = (e: {
213
228
  type: string
214
229
  detail: {
230
+ causedBy: string
215
231
  scale: number
232
+ gesture: boolean
216
233
  centerLocation: {
217
234
  latitude: number
218
235
  longitude: number
@@ -220,9 +237,8 @@ const onRegionChange = (e: {
220
237
  }
221
238
  }) => {
222
239
  if (e.type === 'end') {
223
- form.value.mapLatitude = e.detail.centerLocation.latitude
224
- form.value.mapLongitude = e.detail.centerLocation.longitude
225
- mapScale.value = e.detail.scale
240
+ getData()
241
+ currentScale.value = e.detail.scale
226
242
  }
227
243
  }
228
244
  const onCurrentChange = (p: number) => {
@@ -286,7 +302,7 @@ onMounted(() => {
286
302
  getData()
287
303
  })
288
304
  </script>
289
- <style lang="scss" scoped>
305
+ <style lang="scss">
290
306
  .icon {
291
307
  position: absolute;
292
308
  top: 0;
@@ -295,6 +311,8 @@ onMounted(() => {
295
311
  margin: auto;
296
312
  color: #666;
297
313
  }
314
+ </style>
315
+ <style lang="scss" scoped>
298
316
  .map-tag {
299
317
  width: 140rpx;
300
318
  text-align: center;
@@ -304,6 +322,7 @@ onMounted(() => {
304
322
  background-color: #fff;
305
323
  box-shadow: 0 0 10rpx 0 rgba(0, 0, 0, 0.1);
306
324
  font-size: 28rpx;
325
+
307
326
  &.map-tag-active {
308
327
  font-weight: 600;
309
328
  background-color: var(--wot-color-theme);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.4.179",
3
+ "version": "0.4.181",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],