feat(index): 新版本更新通知(What's New)弹窗
- 复用 ui-modal(position:center) + ui-btn,不新建组件,风格统一且自动跟随暗黑 - config.js 新增 releaseNotes 数组(每条一行短句),复用已有 version 字段 - 首页 _checkUpdateNote() 在 onShow 检测 storage 版本 vs config.version, 不一致则居中弹通知并写回 storage 防重复;onCloseUpdateNote 关闭 - 绿色渐变徽章 + sparkleWhite 图标 + 版本标题 + 要点列表 + 知道了按钮 - 纯通知不重启应用;发版时改 version 同步更新 releaseNotes 即可
This commit is contained in:
@@ -179,4 +179,22 @@
|
||||
></ui-btn>
|
||||
<text class="picker-cancel" bindtap="onCloseCircuitPicker">取消</text>
|
||||
</ui-modal>
|
||||
|
||||
<!-- 新版本更新通知(What's New),首次进入当期版本弹一次 -->
|
||||
<ui-modal visible="{{showUpdateNote}}" position="center" bind:close="onCloseUpdateNote">
|
||||
<view class="update-note">
|
||||
<view class="update-note__badge">
|
||||
<image class="update-note__icon" src="{{icons.sparkleWhite}}" mode="aspectFit"></image>
|
||||
</view>
|
||||
<text class="update-note__title">版本更新 {{updateNoteVersion}}</text>
|
||||
<text class="update-note__date" wx:if="{{updateNoteDate}}">更新于 {{updateNoteDate}}</text>
|
||||
<view class="update-note__list">
|
||||
<view class="update-note__item" wx:for="{{updateNoteItems}}" wx:key="*this">
|
||||
<text class="update-note__dot">·</text>
|
||||
<text class="update-note__text">{{item}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<ui-btn variant="primary" size="lg" block text="知道了" bindtap="onCloseUpdateNote" custom-style="border-radius:16rpx;margin-top:28rpx;"></ui-btn>
|
||||
</view>
|
||||
</ui-modal>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user