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 { withDataCache } = require('../../utils/page-cache');
const { getLayout } = require('../../utils/layout');
// pages/pet/achievements.js
const { api } = require('../../utils/request');
Page(withDataCache({
Page(withRecordAccess(withDataCache({
onLoginSubscribeTap: function() { return tryLoginRenewal(); },
onResize: function() { this.setData(getLayout()); },
data: { loading: true, loadError: false,
@@ -63,4 +64,4 @@ Page(withDataCache({
goBack: function() {
wx.navigateBack();
}
}, {"loadAchievements": ["petAchievements"]}));
}, {"loadAchievements": ["petAchievements"]})));
+1 -1
View File
@@ -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/pet/achievements.wxml -->
<app-nav title="宠物成就" back="{{true}}" />
+3 -2
View File
@@ -1,3 +1,4 @@
const { withRecordAccess } = require('../../utils/record-access');
const { tryLoginRenewal } = require('../../utils/subscribe');
const { withDataCache } = require('../../utils/page-cache');
const { getLayout } = require('../../utils/layout');
@@ -20,7 +21,7 @@ const BREED_EMOJIS = {
const STAGE_NAMES = ['', '幼犬期', '少年期', '青年期', '成年期', '终极期'];
Page(withDataCache({
Page(withRecordAccess(withDataCache({
onLoginSubscribeTap: function() { return tryLoginRenewal(); },
onResize: function() { this.setData(getLayout()); },
data: { loading: true, loadError: false, needsBinding: false,
@@ -324,4 +325,4 @@ Page(withDataCache({
},
stopPropagation: function() {}
}, {"loadPetInfo": ["coupleInfo", "petInfo"]}));
}, {"loadPetInfo": ["coupleInfo", "petInfo"]})));
+1 -1
View File
@@ -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/pet/pet.wxml -->
<app-nav title="宠物养成" back="{{true}}" />