feat: add account deletion, announcements and subscription renewal
Support personal records and persistent smoking visibility. Add upload quota preflight, file cleanup, privacy entry, image caching and revision-based page refresh across the backend, admin and mini program.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
const { tryLoginRenewal } = require('../../utils/subscribe');
|
||||
const { uploadReference } = require('../../utils/file-media');
|
||||
const { itemsOf, totalOf } = require('../../utils/list-pagination');
|
||||
const { withDataCache } = require('../../utils/page-cache');
|
||||
@@ -5,7 +6,6 @@ const { getLayout } = require('../../utils/layout');
|
||||
// pages/profile/profile.js - 与原网站一致的个人中心
|
||||
const { api, getImageUrl } = require('../../utils/request');
|
||||
const { saveScrollPosition, resetScrollOnTabShow } = require('../../utils/scroll-pos');
|
||||
const { requestSubscribe } = require('../../utils/subscribe');
|
||||
const { guardStorageSpace } = require('../../utils/storage-guard');
|
||||
|
||||
function formatStorageBytes(bytes) {
|
||||
@@ -16,6 +16,7 @@ function formatStorageBytes(bytes) {
|
||||
}
|
||||
|
||||
Page(withDataCache({
|
||||
onLoginSubscribeTap: function() { return tryLoginRenewal(); },
|
||||
onResize: function() { this.setData(getLayout()); },
|
||||
data: {
|
||||
scrollTop: 0,
|
||||
@@ -904,8 +905,6 @@ Page(withDataCache({
|
||||
const { inviteMessage } = this.data;
|
||||
if (!inviteTargetId) { wx.showToast({ title: '请输入对方ID', icon: 'none' }); return; }
|
||||
if (!/^[0-9]{6}$/.test(inviteTargetId)) { wx.showToast({ title: 'ID为6位数字', icon: 'none' }); return; }
|
||||
// 邀请成功且对方接受时,需要通知邀请人,提前申请一次性订阅授权
|
||||
requestSubscribe('notify').catch(function() {});
|
||||
try {
|
||||
wx.showLoading({ title: '发送中...' });
|
||||
const res = await api.invitePartner({ target_user_id: inviteTargetId, message: inviteMessage });
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<view class="app-shell j-handwritten-page" style="{{layoutStyle}}">
|
||||
<view capture-bind:tap="onLoginSubscribeTap" class="app-shell j-handwritten-page" style="{{layoutStyle}}">
|
||||
<launch-transition />
|
||||
<!-- pages/profile/profile.wxml -->
|
||||
<view wx:if="{{!showEditProfileModal && !showEditPartnerModal}}" class="j-fixed-header"><view class="j-fixed-heading" style="height:{{barHeight}}px;padding-right:{{navSide}}px;"><text class="j-eyebrow">MY CORNER</text><text class="j-page-title">我的小角落</text></view></view>
|
||||
|
||||
@@ -325,7 +325,7 @@ scroll-view.page-bg { height: 100vh; overflow-y: scroll; -webkit-overflow-scroll
|
||||
.profile-stats-retry { text-align:center; color:#B74768; font-size:22rpx; padding:24rpx 0 0; }
|
||||
|
||||
/* 存储空间入口卡片。 */
|
||||
.j-storage-card { margin-top:32rpx; padding:26rpx 30rpx; background:#FFFDF8; border:1rpx solid #F1DCE4; border-radius:32rpx; }
|
||||
.j-storage-card { margin-top:32rpx; padding:26rpx 30rpx; background:linear-gradient(135deg,#FFF7F9,#FBE8EF); border:1rpx solid #F1DCE4; border-radius:32rpx; }
|
||||
.j-storage-top { display:flex; justify-content:space-between; align-items:baseline; }
|
||||
.j-storage-label { font-family:'Kaiti SC','STKaiti','KaiTi',cursive; font-size:28rpx; color:#64424D; }
|
||||
.j-storage-val { font-size:26rpx; font-weight:600; color:#B74768; }
|
||||
@@ -335,12 +335,12 @@ scroll-view.page-bg { height: 100vh; overflow-y: scroll; -webkit-overflow-scroll
|
||||
.j-storage-hint { font-size:22rpx; color:#A39386; }
|
||||
.j-storage-cta { font-size:24rpx; color:#B74768; font-weight:500; }
|
||||
|
||||
/* 会员(无限空间)卡片:玫红渐变,突出「无限空间」与到期时间。 */
|
||||
.j-storage-vip { background:linear-gradient(135deg,#FF9EB5,#B74768); border:1rpx solid rgba(255,255,255,.4); border-radius:32rpx; }
|
||||
.j-storage-vip .j-storage-label { color:#FFF; }
|
||||
.j-storage-vip .j-storage-val.j-vip { color:#FFF; font-size:28rpx; }
|
||||
.j-storage-vip .j-storage-hint { color:rgba(255,255,255,.9); }
|
||||
.j-storage-vip .j-storage-cta { color:#FFF; }
|
||||
/* 延续玫粉色系,降低饱和度,深色文字保持清晰。 */
|
||||
.j-storage-vip { background:linear-gradient(135deg,#F8D6E1,#E9A9BF); border:1rpx solid #E8B5C7; border-radius:32rpx; }
|
||||
.j-storage-vip .j-storage-label { color:#6E3549; }
|
||||
.j-storage-vip .j-storage-val.j-vip { color:#6E3549; font-size:28rpx; }
|
||||
.j-storage-vip .j-storage-hint { color:#704052; }
|
||||
.j-storage-vip .j-storage-cta { color:#6E3549; }
|
||||
|
||||
/* 本人与对方资料卡共用完整样式,整卡点击编辑。 */
|
||||
.j-body > .j-profile-summary,
|
||||
|
||||
Reference in New Issue
Block a user