@tplc/business 0.3.38 → 0.3.40

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,15 @@
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.3.40](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.39...v0.3.40) (2025-02-12)
6
+
7
+ ### [0.3.39](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.38...v0.3.39) (2025-02-12)
8
+
9
+
10
+ ### ✨ Features | 新功能
11
+
12
+ * vip完善样式 ([1aa72cb](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/1aa72cba21e651469afcf841733a6e9ff5b40a48))
13
+
5
14
  ### [0.3.38](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.32...v0.3.38) (2025-02-12)
6
15
 
7
16
 
@@ -4,7 +4,7 @@
4
4
  class="flex flex-1 text-#333 rounded-16rpx bg-#F5F5F7 h-78rpx flex items-center px-3 text-[28rpx]"
5
5
  >
6
6
  <lcb-city-select :location="userLocation" v-model="addressCity">
7
- <view class="font-bold max-w-13 truncate">{{ addressCity?.addr || '附近' }}</view>
7
+ <view class="font-bold max-w-13 truncate">{{ addressCity?.addr || '全国' }}</view>
8
8
  </lcb-city-select>
9
9
  <view class="v-line"></view>
10
10
  <lcb-calendar v-model="dayRange">
@@ -70,7 +70,8 @@ const dayRange = ref([
70
70
  form.value.endDate ? dayjs(form.value.endDate).valueOf() : dayjs().add(1, 'day').valueOf(),
71
71
  ])
72
72
  const { translate } = useTranslate()
73
- const { getLocation, userLocation } = useLocation()
73
+ const { getLocation, userLocation, userLatLon } = useLocation()
74
+
74
75
  watch(
75
76
  () => addressCity.value,
76
77
  (val) => {
@@ -82,6 +83,18 @@ watch(
82
83
  }
83
84
  },
84
85
  )
86
+ watch(
87
+ () => userLatLon.value,
88
+ (val) => {
89
+ if (!val) return
90
+ form.value.userLatitude = val.latitude
91
+ form.value.userLongitude = val.longitude
92
+ },
93
+ {
94
+ immediate: true,
95
+ deep: true,
96
+ },
97
+ )
85
98
  watch(
86
99
  () => dayRange.value,
87
100
  (val) => {
@@ -34,7 +34,7 @@
34
34
  v-for="city in item.childHotAddress"
35
35
  @click="onAddrClick(city, item.categoryName.includes('字母'))"
36
36
  :style="{
37
- fontSize: city.addr.length > 4 ? '20rpx' : '24rpx',
37
+ fontSize: city?.addr?.length > 4 ? '20rpx' : '24rpx',
38
38
  }"
39
39
  >
40
40
  <view class="tag-view">
@@ -31,7 +31,7 @@
31
31
  <lcb-city-select :location="userLocation" v-model="addressCity">
32
32
  <view class="flex items-center gap-16rpx">
33
33
  <view class="text-30rpx font-bold max-w-13 truncate">
34
- {{ addressCity?.addr || '附近' }}
34
+ {{ addressCity?.addr || '全国' }}
35
35
  </view>
36
36
  <img
37
37
  class="w-30rpx h-30rpx"
@@ -4,7 +4,7 @@
4
4
  v-for="item in buttonList"
5
5
  :key="item.buttonName"
6
6
  @click="link({ item })"
7
- @refresh="$emit('refresh')"
7
+ @refresh="$emit('refresh', { item })"
8
8
  >
9
9
  <wd-button v-bind="getBtnProps(item)" :size="size">{{ item.buttonName }}</wd-button>
10
10
  </lcb-action-view>
@@ -29,7 +29,7 @@
29
29
  <view class="flex-1" v-if="!noIcons"></view>
30
30
  <BtnViews
31
31
  :button-list="buttonList"
32
- @refresh="emits('refresh')"
32
+ @refresh="emits('refresh', $event)"
33
33
  @cancel="emits('cancel')"
34
34
  :size="size"
35
35
  />
@@ -21,6 +21,7 @@ export interface IPageBtn {
21
21
  requestParam?: {
22
22
  orderNo: string
23
23
  }
24
+ refreshCurrentPage?: boolean
24
25
  jumpType?: 1 | 2 | 10 | 11 | 12 | 13 | 14 | 21 | 22 | 23 | 24 | 25 | 26 | 30 | 88
25
26
  jumpUrl: string
26
27
  requestUrl: string
@@ -44,6 +44,7 @@ export interface CurrentRightsDetail {
44
44
  userLevelName: string
45
45
  userLevelRightsList: UserLevelRightsList[]
46
46
  waitPoint: number
47
+ button?: LcbActionViewProps & { buttonName: string }
47
48
  }
48
49
 
49
50
  export interface UserLevelRightsList extends ActionView {
@@ -13,8 +13,8 @@
13
13
  :height="transformValueUnit(cardHeight)"
14
14
  radius="16rpx"
15
15
  />
16
- <view class="absolute text-center top-2 right-8 text-3">
17
- {{ translate('有效期至') }} {{ info.effectiveDate }}
16
+ <view class="absolute text-center top-2 right-4 text-3">
17
+ {{ info.effectiveDate }}
18
18
  </view>
19
19
  <!-- <view
20
20
  class="absolute leading-4.5 top-156rpx left-4 flex items-center gap-0.5"
@@ -23,7 +23,7 @@
23
23
  <view>{{ translate('消费积分') }} {{ info.sumPoint }}</view>
24
24
  <wd-icon classPrefix="lcb" name="xiangyou" size="24rpx" />
25
25
  </view> -->
26
- <view
26
+ <!-- <view
27
27
  class="absolute text-2.5 w-662rpx leading-64rpx top-256rpx left-2.5 flex items-center gap-0.5 px-2.5 box-border"
28
28
  @click="navigateTo('/pages-sub/vip/upgrade-guide')"
29
29
  >
@@ -32,7 +32,23 @@
32
32
  </view>
33
33
  <view>{{ translate('攻略') }}</view>
34
34
  <wd-icon classPrefix="lcb" name="xiangyou" size="24rpx" />
35
- </view>
35
+ </view> -->
36
+ <lcb-action-view
37
+ custom-class="absolute !text-2.5 !w-662rpx !leading-64rpx top-256rpx left-2.5 !flex items-center gap-0.5 !px-2.5 box-border"
38
+ :jump-type="2"
39
+ v-bind="
40
+ info.button || {
41
+ jumpType: 2,
42
+ jumpUrl: '/pages-sub/vip/upgrade-guide',
43
+ }
44
+ "
45
+ >
46
+ <view class="flex-1 truncate">
47
+ {{ info.upgradeTips }}
48
+ </view>
49
+ <view>{{ info.button?.buttonName || translate('攻略') }}</view>
50
+ <wd-icon classPrefix="lcb" name="xiangyou" size="24rpx" />
51
+ </lcb-action-view>
36
52
  </view>
37
53
  <lcb-img-nav
38
54
  :items="info.userLevelRightsList"
@@ -2,9 +2,11 @@ import { useTranslate } from '@tplc/wot'
2
2
  import { ref } from 'vue'
3
3
  import { getUserLocation, UserLocation } from './useLocation.api'
4
4
  const currentLocation = ref<UserLocation>()
5
+ const currentUserLatLon = ref<UniApp.GetLocationSuccess>()
5
6
  const useLocation = () => {
6
7
  const { translate } = useTranslate()
7
- const userLocation = ref<UserLocation | undefined>(currentLocation.value)
8
+ const userLocation = ref(currentLocation.value)
9
+ const userLatLon = ref(currentUserLatLon.value)
8
10
  // 正在获取经纬度
9
11
  const locationIng = ref(false)
10
12
  // 检查用户是否授权定位
@@ -56,6 +58,7 @@ const useLocation = () => {
56
58
  // type: 'gcj02',
57
59
  // type: 'wgs84',
58
60
  success: function (res) {
61
+ userLatLon.value = res
59
62
  getUserLocation({
60
63
  userLongitude: res.longitude.toString(),
61
64
  userLatitude: res.latitude.toString(),
@@ -77,7 +80,7 @@ const useLocation = () => {
77
80
  navigateToSettings()
78
81
  }
79
82
  }
80
- return { getLocation, locationIng, userLocation }
83
+ return { getLocation, locationIng, userLocation, userLatLon }
81
84
  }
82
85
 
83
86
  export default useLocation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.3.38",
3
+ "version": "0.3.40",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -19,6 +19,7 @@ export interface IPageBtn {
19
19
  requestParam?: {
20
20
  orderNo: string
21
21
  }
22
+ refreshCurrentPage?: boolean
22
23
  jumpType?: 1 | 2 | 10 | 11 | 12 | 13 | 14 | 21 | 22 | 23 | 24 | 25 | 26 | 30 | 88
23
24
  jumpUrl: string
24
25
  requestUrl: string
@@ -40,6 +40,9 @@ export interface CurrentRightsDetail {
40
40
  userLevelName: string
41
41
  userLevelRightsList: UserLevelRightsList[]
42
42
  waitPoint: number
43
+ button?: LcbActionViewProps & {
44
+ buttonName: string
45
+ }
43
46
  }
44
47
  export interface UserLevelRightsList extends ActionView {
45
48
  categoryId: string
@@ -13,5 +13,19 @@ declare const useLocation: () => {
13
13
  }
14
14
  | undefined
15
15
  >
16
+ userLatLon: import('vue').Ref<
17
+ | {
18
+ latitude: number
19
+ longitude: number
20
+ speed: number
21
+ accuracy: number
22
+ altitude: number
23
+ verticalAccuracy: number
24
+ horizontalAccuracy: number
25
+ address?: any
26
+ errMsg?: string | undefined
27
+ }
28
+ | undefined
29
+ >
16
30
  }
17
31
  export default useLocation