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:
@@ -1,3 +1,4 @@
|
||||
const { withRecordAccess } = require('../../utils/record-access');
|
||||
const { tryLoginRenewal } = require('../../utils/subscribe');
|
||||
const { uploadReference } = require('../../utils/file-media');
|
||||
const { withDataCache } = require('../../utils/page-cache');
|
||||
@@ -7,7 +8,7 @@ const { api, getImageUrl, API_BASE, uploadFileCompat } = require('../../utils/re
|
||||
const { createSwipeBack } = require('../../utils/util');
|
||||
const { guardStorageSpace } = require('../../utils/storage-guard');
|
||||
const COOLDOWN = 5000;
|
||||
Page(withDataCache({
|
||||
Page(withRecordAccess(withDataCache({
|
||||
onLoginSubscribeTap: function() { return tryLoginRenewal(); },
|
||||
onResize: function() { this.setData(getLayout()); },
|
||||
data: { loading: true, loadError: false, item: null, logs: [], logsPage: 1, logsTotal: 0, logsHasMore: false, logsLoading: false, logsError: false, freqLabel: '', typeLabel: '', myStreak: 0, partnerStreak: 0, showCheckModal: false, checkPhoto: '', checkNote: '', lastActionTime: 0, detailId: 0, myAvatar: '', partnerAvatar: '', myName: '我', partnerName: 'TA' },
|
||||
@@ -223,4 +224,4 @@ Page(withDataCache({
|
||||
goBack: function() { wx.navigateBack(); },
|
||||
goHome: function() { wx.switchTab({ url: '/pages/index/index' }); },
|
||||
goProfile: function() { wx.switchTab({ url: '/pages/profile/profile' }); }
|
||||
}, {"loadDetail": ["checkinDetail", "coupleInfo"]}));
|
||||
}, {"loadDetail": ["checkinDetail", "coupleInfo"]})));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<view capture-bind:tap="onLoginSubscribeTap" class="app-shell app-shell--secondary" style="{{layoutStyle}}">
|
||||
<view wx:if="{{!recordAccessBlocked}}" capture-bind:tap="onLoginSubscribeTap" class="app-shell app-shell--secondary" style="{{layoutStyle}}">
|
||||
<launch-transition />
|
||||
<!-- pages/checkin-detail/checkin-detail.wxml - 打卡详情 -->
|
||||
<app-nav title="打卡详情" back="{{true}}" />
|
||||
|
||||
Reference in New Issue
Block a user