feat: require couple binding and refine miniapp settings

Gate record features and storage entry points with invitation guidance; enforce record access in the backend. Add homepage greetings, right-swipe profile dismissal, and move the smoking switch to settings. Simplify API base configuration and remove the unused legacy tab bar component.
This commit is contained in:
2026-11-04 21:27:03 +08:00
parent 41bcb793da
commit b854d2873e
67 changed files with 430 additions and 227 deletions
+3 -2
View File
@@ -1,10 +1,11 @@
const { withRecordAccess } = require('../../utils/record-access');
const { tryLoginRenewal } = require('../../utils/subscribe');
const { getLayout } = require('../../utils/layout');
Page({
Page(withRecordAccess({
onLoginSubscribeTap: function() { return tryLoginRenewal(); },
data:{},
onLoad(){this.setData(getLayout());},
onResize(){this.setData(getLayout());},
loadMore(){const card=this.selectComponent('#smoking');if(card)return card.loadMoreLogs();},
async onPullDownRefresh(){try{const card=this.selectComponent('#smoking');if(card)await card.load(true);}finally{wx.stopPullDownRefresh();}}
});
}));
@@ -1 +1 @@
<view capture-bind:tap="onLoginSubscribeTap" class="app-shell app-shell--secondary" style="{{layoutStyle}}"><launch-transition /><app-nav title="抽烟记录" back="{{true}}" /><scroll-view class="page-bg" scroll-y bindscrolltolower="loadMore" lower-threshold="120" show-scrollbar="{{false}}"><view class="c-body"><smoking-card id="smoking" detailed="{{true}}" /></view></scroll-view></view>
<view wx:if="{{!recordAccessBlocked}}" capture-bind:tap="onLoginSubscribeTap" class="app-shell app-shell--secondary" style="{{layoutStyle}}"><launch-transition /><app-nav title="抽烟记录" back="{{true}}" /><scroll-view class="page-bg" scroll-y bindscrolltolower="loadMore" lower-threshold="120" show-scrollbar="{{false}}"><view class="c-body"><smoking-card id="smoking" detailed="{{true}}" /></view></scroll-view></view>