vhall-mini-sdk 0.3.0 → 0.3.1

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 ADDED
@@ -0,0 +1,44 @@
1
+ # Changelog
2
+
3
+ 本项目所有重要变更均记录于此文件。
4
+
5
+ 格式遵循 [Keep a Changelog](https://keepachangelog.com/),版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
6
+
7
+ ## [0.3.1] - 2026-08-13
8
+
9
+ ### 修复
10
+
11
+ - 修复公告关闭事件定义重复问题。
12
+
13
+ ## [0.3.0] - 2026-08-13
14
+
15
+ ### 新增
16
+
17
+ - 直播和回放场景下新增 <span style="color:red">公告</span> 能力。
18
+
19
+ - VhallMiniSdk增加 <span style="color:red">VERSION</span> 属性,实例增加 <span style="color:red">version</span> 属性, 方便获取当前SDK版本号。
20
+
21
+ ### 变更
22
+
23
+ - SDK 错误页支持直播模式(mode,0:竖屏,1:横屏)初始0或1,不用空值,业务侧无需额外调用 setData 即可正常展示。
24
+
25
+ ### 修复
26
+
27
+ - 修复某些场景下商城奖励计时不动以及计时不准确的问题。
28
+
29
+ ## [0.2.1] - 2026-08-06
30
+
31
+ ### 变更
32
+
33
+ - SDK和几个插件都去掉了具名导出,避免默认导出和具名导出混用带来的问题。
34
+
35
+ ```js
36
+ // 旧
37
+ import { MallRewardServer } from ...
38
+ // 新
39
+ import MallRewardServer from ...
40
+ ```
41
+
42
+ ### 修复
43
+
44
+ - 修复某些场景下收不到消息的问题。
@@ -1 +1 @@
1
- .announ-banner{align-items:center;background:rgba(0,0,0,.5);border-radius:40rpx;box-sizing:border-box;color:#fff;display:flex;font-size:24rpx;left:12rpx;padding:0 12rpx;position:fixed;right:12rpx;top:180rpx;z-index:99}.announ-banner-icon{color:#fff;flex-shrink:0;height:32rpx;margin-right:16rpx;position:relative;width:34rpx}.mode-1 .announ-banner-icon{color:#fb3a32}.announ-banner-icon__box{background:currentColor;border-bottom-left-radius:4rpx;border-top-left-radius:4rpx;height:14rpx;left:3rpx;position:absolute;top:9rpx;width:7rpx;z-index:2}.announ-banner-icon__body{background:currentColor;border-radius:4rpx 6rpx 6rpx 4rpx;-webkit-clip-path:polygon(0 20%,0 80%,78% 100%,78% 0);clip-path:polygon(0 20%,0 80%,78% 100%,78% 0);height:28rpx;left:8rpx;position:absolute;top:2rpx;width:15rpx}.announ-banner-icon__wave{background:currentColor;border-radius:4rpx;position:absolute}.announ-banner-icon__wave--top{height:4rpx;right:4rpx;top:5rpx;transform:rotate(-32deg);width:9rpx}.announ-banner-icon__wave--mid{height:4rpx;right:1rpx;top:14rpx;width:11rpx}.announ-banner-icon__wave--bottom{bottom:5rpx;height:4rpx;right:4rpx;transform:rotate(32deg);width:9rpx}.announ-banner-text-wrap{align-items:center;display:flex;flex:1;height:100%;overflow:hidden;padding:6rpx 0}.announ-banner-text{animation:announ-banner-scroll linear infinite;display:inline-block;padding-left:100%;white-space:nowrap}.announ-banner--static .announ-banner-text{animation:none;padding-left:0}.announ-banner-close{flex-shrink:0;font-size:32rpx;margin-left:16rpx}.announ-banner.mode-1{background:linear-gradient(59.32deg,#ffebe9,#edecff 107.06%);border-radius:0;color:#262626;left:0;max-width:none;padding:16rpx 12rpx;right:0;top:calc(56.25vw + 85rpx);transform:none;width:100%}@keyframes announ-banner-scroll{0%{transform:translateX(0)}to{transform:translateX(-100%)}}
1
+ .announ-banner{align-items:center;background:rgba(0,0,0,.5);border-radius:40rpx;box-sizing:border-box;color:#fff;display:flex;font-size:24rpx;left:12rpx;padding:0 12rpx;position:fixed;right:12rpx;top:180rpx;z-index:99}.announ-banner-icon{color:#fff;flex-shrink:0;height:32rpx;margin-right:16rpx;position:relative;width:34rpx}.mode-1 .announ-banner-icon{color:#fb3a32}.announ-banner-icon__box{background:currentColor;border-bottom-left-radius:4rpx;border-top-left-radius:4rpx;height:14rpx;left:3rpx;position:absolute;top:9rpx;width:7rpx;z-index:2}.announ-banner-icon__body{background:currentColor;border-radius:4rpx 6rpx 6rpx 4rpx;-webkit-clip-path:polygon(0 20%,0 80%,78% 100%,78% 0);clip-path:polygon(0 20%,0 80%,78% 100%,78% 0);height:28rpx;left:8rpx;position:absolute;top:2rpx;width:15rpx}.announ-banner-icon__wave{background:currentColor;border-radius:4rpx;position:absolute}.announ-banner-icon__wave--top{height:4rpx;right:4rpx;top:5rpx;transform:rotate(-32deg);width:9rpx}.announ-banner-icon__wave--mid{height:4rpx;right:1rpx;top:14rpx;width:11rpx}.announ-banner-icon__wave--bottom{bottom:5rpx;height:4rpx;right:4rpx;transform:rotate(32deg);width:9rpx}.announ-banner-text-wrap{align-items:center;display:flex;flex:1;height:100%;overflow:hidden;padding:6rpx 0}.announ-banner-text{animation:announ-banner-scroll linear infinite;display:inline-block;padding-left:100%;white-space:nowrap}.announ-banner--static .announ-banner-text{animation:none;padding-left:0}.announ-banner-close{flex-shrink:0;font-size:32rpx;margin-left:16rpx}.announ-banner.mode-1{background:linear-gradient(59.32deg,#ffebe9,#edecff 107.06%);border-radius:0;color:#262626;font-size:28rpx;left:0;max-width:none;padding:16rpx 12rpx;right:0;top:calc(56.25vw + 85rpx);transform:none;width:100%}@keyframes announ-banner-scroll{0%{transform:translateX(0)}to{transform:translateX(-100%)}}
@@ -1,8 +1,8 @@
1
1
  <movable-area class="drag-area">
2
2
  <movable-view wx:if="{{showIcon}}" class="drag-view" direction="all" x="{{x}}" y="{{y}}" damping="{{40}}" out-of-bounds="{{false}}" bindchange="onDragChange" bindtouchstart="onTouchStart" bindtouchend="onTouchEnd">
3
3
  <view class="announ-icon mode-{{mode}}" bindtap="onTapIcon">
4
- <image wx:if="{{mode === 1}}" class="announ-icon-img" src="https://cnstatic01.e.vhall.com/common-static/images/mp/announ_icon_2.png" mode="aspectFit" />
5
- <image wx:else class="announ-icon-img" src="https://cnstatic01.e.vhall.com/common-static/images/mp/announ_icon_1.png" mode="aspectFit" />
4
+ <image wx:if="{{mode === 1}}" class="announ-icon-img" src="https://t-alistatic01.e.vhall.com/common-static/saas-wap/static/img/notice-icon.a86f1993.png" mode="aspectFit" />
5
+ <image wx:else class="announ-icon-img" src="https://t-alistatic01.e.vhall.com/common-static/images/mp/announ_icon.png" mode="aspectFit" />
6
6
  <text wx:if="{{mode !== 1}}" class="announ-icon-text">公告</text>
7
7
  <view wx:if="{{badge > 0}}" class="announ-icon-badge">{{badge > 99 ? '99+' : badge}}</view>
8
8
  </view>
@@ -204,7 +204,7 @@ Component({
204
204
  this.setData({ showBanner: false });
205
205
  },
206
206
 
207
- // 用户手动关闭当前 banner:记录该公告 id,同一条不再自动弹(新公告仍展示)
207
+ // 用户手动关闭当前 banner
208
208
  handleBannerClose() {
209
209
  this.clearTimer();
210
210
  this.setData({ showBanner: false });
@@ -219,10 +219,5 @@ Component({
219
219
  handlePopupClose() {
220
220
  this.setData({ showPopup: false });
221
221
  },
222
-
223
- // 关闭顶部滚动条(用户手动关闭)
224
- handleBannerClose() {
225
- this.closeAnnouncement();
226
- },
227
222
  },
228
223
  });
@@ -104,7 +104,7 @@ Component({
104
104
  memberLevel: {
105
105
  type: Object,
106
106
  value: null,
107
- },
107
+ },
108
108
  },
109
109
  data: {
110
110
  roleName: {
@@ -152,11 +152,11 @@ Component({
152
152
  const item = (memberLevel.custom_list || []).find((item) => item.level == level);
153
153
  icon = item?.icon || '';
154
154
  } else {
155
- icon = `https://cnstatic01.e.vhall.com/common-static/images/mp/vip/vip${level}.png`;
155
+ icon = `https://t-alistatic01.e.vhall.com/common-static/images/mp/vip/vip${level}.png`;
156
156
  }
157
157
 
158
158
  this.setData({ memberLevelIcon: icon });
159
- },
159
+ },
160
160
  preview(event) {
161
161
  const index = event.currentTarget.dataset.index;
162
162
  const imgList = this.data.chatItem.data.image_urls;
@@ -186,8 +186,8 @@ Component({
186
186
  // 构建正则表达式来匹配 @ 昵称和表情
187
187
  const atPattern =
188
188
  atNames.length > 0 ?
189
- atNames.map((name) => this._escapeRegExp(name)).join('|') :
190
- '';
189
+ atNames.map((name) => this._escapeRegExp(name)).join('|') :
190
+ '';
191
191
  const facePattern = Object.keys(faceArr)
192
192
  .map(this._escapeRegExp)
193
193
  .join('|');