@bi-nova/ui-weapp 1.1.3 → 1.2.0-beta.202608131817

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.
@@ -43,94 +43,102 @@
43
43
  position: relative;
44
44
  width: 100%;
45
45
  height: 100%;
46
+ background: #000000;
46
47
  }
47
48
 
48
49
  .bi-splash-ad__media {
50
+ position: absolute;
51
+ inset: 0;
52
+ display: block;
49
53
  width: 100%;
50
54
  height: 100%;
51
55
  }
52
56
 
53
- .bi-splash-ad__media--background {
54
- display: block;
55
- }
56
-
57
57
  .bi-splash-ad__video {
58
58
  position: absolute;
59
- z-index: 2;
60
- top: 0;
61
- left: 0;
62
- width: 100vw;
63
- height: 100vh;
59
+ inset: 0;
60
+ z-index: 1;
61
+ width: 100%;
62
+ height: 100%;
64
63
  }
65
64
 
66
- .bi-splash-ad__video--landscape {
67
- top: 50%;
68
- left: 50%;
69
- width: 100vw;
70
- max-width: 100vw;
71
- height: 500rpx;
72
- transform: translate(-50%, -50%);
65
+ .bi-splash-ad__bottom-image {
66
+ position: absolute;
67
+ left: 0;
68
+ right: 0;
69
+ bottom: 0;
70
+ display: block;
71
+ z-index: 3;
72
+ width: 100%;
73
+ height: auto;
73
74
  }
74
75
 
75
- .bi-splash-ad__content {
76
+ .bi-splash-ad__disclosure {
76
77
  position: absolute;
77
- left: 40rpx;
78
- right: 40rpx;
79
- bottom: 84rpx;
80
- z-index: 3;
81
- padding: 28rpx;
82
- border-radius: 24rpx;
83
- background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.76));
84
- color: #ffffff;
78
+ z-index: 4;
79
+ display: flex;
80
+ align-items: center;
81
+ min-height: 40rpx;
82
+ padding: 0 14rpx;
85
83
  box-sizing: border-box;
84
+ border-radius: 20rpx;
85
+ /*background: rgba(0, 0, 0, 0.42);*/
86
+ font-size: 20rpx;
87
+ line-height: 40rpx;
88
+ color: rgba(255, 255, 255);
89
+ }
90
+
91
+ .bi-splash-ad__disclosure-arrow {
92
+ flex-shrink: 0;
93
+ width: 8rpx;
94
+ height: 8rpx;
95
+ margin-top: -4rpx;
96
+ margin-left: 8rpx;
97
+ border-right: 2rpx solid rgba(255, 255, 255, 0.4);
98
+ border-bottom: 2rpx solid rgba(255, 255, 255, 0.4);
99
+ transform: rotate(45deg);
86
100
  }
87
101
 
88
- .bi-splash-ad__badge {
102
+ .bi-splash-ad__combined-control {
89
103
  position: absolute;
90
- right: 32rpx;
91
- bottom: 130rpx;
92
- z-index: 3;
93
- min-width: 72rpx;
94
- height: 38rpx;
95
- padding: 0 12rpx;
96
- box-sizing: border-box;
97
- border-radius: 19rpx;
98
- background: rgba(0, 0, 0, 0.52);
104
+ z-index: 99;
105
+ display: flex;
106
+ align-items: center;
99
107
  color: #ffffff;
100
- font-size: 20rpx;
101
- line-height: 38rpx;
102
- text-align: center;
108
+ font-size: 24rpx;
109
+ white-space: nowrap;
103
110
  }
104
111
 
105
- .bi-splash-ad__title {
106
- display: block;
107
- margin-bottom: 12rpx;
108
- font-size: 36rpx;
109
- font-weight: 600;
110
- line-height: 1.4;
112
+ .bi-splash-ad__combined-capsule {
113
+ display: flex;
114
+ align-items: center;
115
+ height: 100%;
116
+ padding: 0 20rpx;
117
+ box-sizing: border-box;
118
+ border: 1px solid rgba(255, 255, 255, 0.18);
119
+ border-radius: 999rpx;
120
+ background: rgba(0, 0, 0, 0.28);
111
121
  }
112
122
 
113
- .bi-splash-ad__description {
114
- display: block;
115
- margin-bottom: 20rpx;
116
- font-size: 26rpx;
117
- line-height: 1.6;
123
+ .bi-splash-ad__combined-disclosure,
124
+ .bi-splash-ad__combined-skip {
125
+ display: flex;
126
+ align-items: center;
127
+ justify-content: center;
128
+ height: 100%;
118
129
  }
119
130
 
120
- .bi-splash-ad__action {
121
- width: 100%;
122
- min-height: 0;
123
- padding: 18rpx 24rpx;
124
- border: none;
125
- border-radius: 16rpx;
126
- background: linear-gradient(135deg, #1677ff, #0f52ba);
127
- color: #ffffff;
128
- font-size: 26rpx;
129
- line-height: 1.4;
131
+ .bi-splash-ad__combined-divider {
132
+ width: 1rpx;
133
+ height: 28rpx;
134
+ margin: 0 18rpx;
135
+ background: rgba(255, 255, 255, 0.36);
130
136
  }
131
137
 
132
- .bi-splash-ad__action::after {
133
- display: none;
138
+ .bi-splash-ad__combined-countdown {
139
+ margin-left: 16rpx;
140
+ line-height: 1;
141
+ text-shadow: 0 1px 4rpx rgba(0, 0, 0, 0.32);
134
142
  }
135
143
 
136
144
  .bi-splash-ad__skip {
@@ -185,23 +193,6 @@
185
193
  border-radius: 24rpx;
186
194
  }
187
195
 
188
- .bi-splash-ad--pip .bi-splash-ad__content {
189
- left: 16rpx;
190
- right: 16rpx;
191
- bottom: 16rpx;
192
- padding: 16rpx;
193
- border-radius: 18rpx;
194
- }
195
-
196
- .bi-splash-ad--pip .bi-splash-ad__badge {
197
- display: none;
198
- }
199
-
200
- .bi-splash-ad--pip .bi-splash-ad__title {
201
- margin-bottom: 8rpx;
202
- font-size: 24rpx;
203
- }
204
-
205
196
  .bi-splash-ad__pip-mask {
206
197
  position: absolute;
207
198
  inset: 0;
package/src/ad/utils.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * @Author wutao
4
4
  * @Date 2026-04-17
5
5
  * @LastEditors wutao
6
- * @LastEditTime 2026-04-17
6
+ * @LastEditTime 2026-08-11 16:30:56
7
7
  */
8
8
 
9
9
  /**
@@ -14,7 +14,15 @@
14
14
  function getNavigationType(customAd) {
15
15
  if (!customAd) return 'none'
16
16
 
17
- if (customAd.appId || customAd.miniProgramAppId || customAd.jumpAppId) {
17
+ const actionType = customAd.action && customAd.action.type || customAd.jumpType || ''
18
+ const normalizedActionType = String(actionType).trim().toLowerCase()
19
+
20
+ if (normalizedActionType === 'miniprogram') return 'miniProgram'
21
+ if (normalizedActionType === 'internal') return 'internal'
22
+ if (normalizedActionType === 'web') return 'web'
23
+ if (normalizedActionType === 'none') return 'none'
24
+
25
+ if (customAd.appId || customAd.targetAppId || customAd.miniProgramAppId || customAd.jumpAppId) {
18
26
  return 'miniProgram'
19
27
  }
20
28
 
@@ -36,7 +44,7 @@ function getNavigationType(customAd) {
36
44
  */
37
45
  function getNavigationAppId(customAd) {
38
46
  if (!customAd) return ''
39
- return customAd.appId || customAd.miniProgramAppId || customAd.jumpAppId || ''
47
+ return customAd.action && customAd.action.appId || customAd.appId || customAd.targetAppId || customAd.miniProgramAppId || customAd.jumpAppId || ''
40
48
  }
41
49
 
42
50
  /**
@@ -46,7 +54,7 @@ function getNavigationAppId(customAd) {
46
54
  */
47
55
  function getNavigationPath(customAd) {
48
56
  if (!customAd) return ''
49
- return customAd.path || customAd.pagePath || customAd.jumpPath || customAd.targetUrl || ''
57
+ return customAd.action && customAd.action.path || customAd.path || customAd.targetPath || customAd.pagePath || customAd.jumpPath || customAd.targetUrl || ''
50
58
  }
51
59
 
52
60
  /**
@@ -56,7 +64,7 @@ function getNavigationPath(customAd) {
56
64
  */
57
65
  function getWebUrl(customAd) {
58
66
  if (!customAd) return ''
59
- return customAd.url || customAd.webUrl || customAd.h5Url || ''
67
+ return customAd.action && customAd.action.url || customAd.url || customAd.jumpUrl || customAd.webUrl || customAd.h5Url || ''
60
68
  }
61
69
 
62
70
  /**