@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.
- package/package.json +1 -1
- package/src/ad/README.md +9 -48
- package/src/ad/banner/index.js +297 -34
- package/src/ad/banner/index.wxml +41 -22
- package/src/ad/banner/index.wxss +55 -91
- package/src/ad/display/index.js +21 -5
- package/src/ad/display/index.wxml +4 -1
- package/src/ad/splash/index.js +181 -101
- package/src/ad/splash/index.wxml +32 -17
- package/src/ad/splash/index.wxss +69 -78
- package/src/ad/utils.js +13 -5
package/src/ad/splash/index.wxss
CHANGED
|
@@ -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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
height: 100vh;
|
|
59
|
+
inset: 0;
|
|
60
|
+
z-index: 1;
|
|
61
|
+
width: 100%;
|
|
62
|
+
height: 100%;
|
|
64
63
|
}
|
|
65
64
|
|
|
66
|
-
.bi-splash-
|
|
67
|
-
|
|
68
|
-
left:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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-
|
|
76
|
+
.bi-splash-ad__disclosure {
|
|
76
77
|
position: absolute;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
padding:
|
|
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-
|
|
102
|
+
.bi-splash-ad__combined-control {
|
|
89
103
|
position: absolute;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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:
|
|
101
|
-
|
|
102
|
-
text-align: center;
|
|
108
|
+
font-size: 24rpx;
|
|
109
|
+
white-space: nowrap;
|
|
103
110
|
}
|
|
104
111
|
|
|
105
|
-
.bi-splash-
|
|
106
|
-
display:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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-
|
|
121
|
-
width:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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-
|
|
133
|
-
|
|
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-
|
|
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
|
-
|
|
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
|
/**
|