Procházet zdrojové kódy

feat(portrait): 我的画像页迁移五维画像并支持全屏编辑,后端新增每日自动更新任务

liaoxg před 4 dny
rodič
revize
7d83cfd3d5

+ 77 - 0
cfc-backend/src/main/java/com/etotem/cfc/task/PortraitDailyUpdateTask.java

@@ -0,0 +1,77 @@
+package com.etotem.cfc.task;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.etotem.cfc.entity.User;
+import com.etotem.cfc.mapper.UserMapper;
+import com.etotem.cfc.service.PortraitService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 每日自动更新用户画像。
+ * <p>
+ * 基于「原画像 + 最新使用数据」由 AI 重新生成({@link PortraitService#regeneratePortrait}):
+ * 用户手动编辑过的画像同样以编辑后的内容作为"原画像"参与生成,不会被直接丢弃;
+ * 尚未生成过画像(portrait_prompt 为空)的用户跳过——首次画像由前端打开"我的画像"页面时触发生成。
+ * 为避免 AI 网关单日负载过大,每日最多处理 200 个用户。
+ */
+@Slf4j
+@Component
+public class PortraitDailyUpdateTask {
+
+    /** 单日最多刷新用户数,防止 AI 网关过载 */
+    private static final int DAILY_LIMIT = 200;
+
+    @Resource
+    private PortraitService portraitService;
+
+    @Resource
+    private UserMapper userMapper;
+
+    /**
+     * 每天 04:45 执行(避开 00:05/01:00/02:00/03:00/03:30/04:00/05:00 的既有任务)
+     */
+    @Scheduled(cron = "0 45 4 * * ?")
+    public void dailyRefresh() {
+        log.info("开始执行每日用户画像自动更新任务");
+        try {
+            // 仅刷新已经生成过画像的用户(有原画像可作参考);@TableLogic 自动过滤已删除
+            List<User> users = userMapper.selectList(
+                    new LambdaQueryWrapper<User>()
+                            .isNotNull(User::getPortraitPrompt)
+                            .last("LIMIT " + DAILY_LIMIT)
+            );
+            if (users.isEmpty()) {
+                log.info("每日用户画像自动更新:暂无需要更新的用户");
+                return;
+            }
+
+            int successCount = 0;
+            int failureCount = 0;
+            int skipCount = 0;
+            for (User user : users) {
+                String currentPortrait = user.getPortraitPrompt();
+                if (currentPortrait == null || currentPortrait.trim().isEmpty()) {
+                    skipCount++;
+                    continue;
+                }
+                try {
+                    // regeneratePortrait 以旧画像为上下文 + 最新使用数据重新生成,AI 失败时回退旧画像(安全空操作)
+                    portraitService.regeneratePortrait(user.getId(), null);
+                    successCount++;
+                } catch (Exception e) {
+                    failureCount++;
+                    log.warn("每日用户画像更新失败: userId={}", user.getId(), e);
+                }
+            }
+            log.info("每日用户画像自动更新完成: 待处理={}, 成功={}, 失败={}, 跳过={}",
+                    users.size(), successCount, failureCount, skipCount);
+        } catch (Exception e) {
+            log.error("每日用户画像自动更新任务执行失败", e);
+        }
+    }
+}

+ 39 - 132
cfc-frontend/pages/profile-main/profile.vue

@@ -102,33 +102,6 @@
         </view>
       </view>
 
-      <!-- 用户画像 - 五维能量概览 -->
-      <view class="portrait-section" v-if="portrait">
-        <view class="section-header-row">
-          <text class="section-title">🧭 用户画像</text>
-          <text class="section-sub">{{ portrait.tierLabel }}</text>
-        </view>
-        <view class="portrait-summary">
-          <text class="portrait-desc">{{ portrait.summary }}</text>
-        </view>
-        <view class="portrait-dimensions">
-          <view class="portrait-dim-item" v-for="dim in portrait.dims" :key="dim.code">
-            <view class="portrait-dim-header">
-              <view class="portrait-dim-icon" :style="{ background: dim.color }">{{ dim.icon }}</view>
-              <text class="portrait-dim-name">{{ dim.name }}</text>
-              <text class="portrait-dim-score">{{ dim.score }}</text>
-            </view>
-            <view class="portrait-dim-bar-track">
-              <view class="portrait-dim-bar-fill" :style="{ width: dim.score + '%', background: dim.color }"></view>
-            </view>
-            <text class="portrait-dim-desc">{{ dim.desc }}</text>
-          </view>
-        </view>
-        <view class="portrait-tip" v-if="portrait.tip">
-          <text class="portrait-tip-text">{{ portrait.tip }}</text>
-        </view>
-      </view>
-
       <!-- 个人成就统计 -->
       <view class="achievement-section">
         <view class="section-header-row">
@@ -292,6 +265,11 @@
 
       <!-- 设置 + 退出 -->
       <view class="bottom-menu-section">
+        <view class="menu-row" @click="goToMessageHistory">
+          <text class="menu-row-icon">📨</text>
+          <text class="menu-row-text">历史消息</text>
+          <text class="menu-row-arrow">›</text>
+        </view>
         <view class="menu-row" @click="goToSettings">
           <text class="menu-row-icon">⚙️</text>
           <text class="menu-row-text">设置</text>
@@ -330,7 +308,8 @@ import {
   cartCount, getOrderCounts, getReferralSummary,
   getProfileStats, getMyReferrer, getTeamConsumption,
   getTeacherInfo, getTeacherPendingTasks, getTeacherUnreadCount,
-  getReferralCode, extractReferralCode, getShareQrCode, getEnergySandbox
+  getReferralCode, extractReferralCode, getShareQrCode, getEnergySandbox,
+  vendorStatus
 } from '../../utils/api.js'
 
 export default {
@@ -366,10 +345,8 @@ export default {
       pendingTasks: 0,
       unreadMessages: 0,
       teacherStatus: 'pending',
+      isVendor: false,
       profileProgress: 0,
-      // 五维能量
-      dimensionScores: { body: 0, mind: 0, wisdom: 0, action: 0, wealth: 0 },
-      portrait: null,
       myReferrer: null,
       // 分享推广码
       showSharePoster: false,
@@ -426,6 +403,9 @@ export default {
     this.isSwitchedChild = uni.getStorageSync('isSwitchedChild') || false
     this.nickname = (uni.getStorageSync('userInfo') || {}).nickname || ''
 
+    // 服务商身份判断(成就区「我的团队」入口按此分发)
+    this.checkVendorStatus()
+
     // 规划师加载额外数据
     if (role === 'teacher') {
       this.loadTeacherStatus()
@@ -436,6 +416,15 @@ export default {
     }
   },
   methods: {
+    // 服务商身份:vendorStatus 返回 approved 即为已通过审核的服务商
+    checkVendorStatus() {
+      var self = this
+      vendorStatus().then(function(res) {
+        self.isVendor = !!(res && res.data && res.data.vendorStatus === 'approved')
+      }).catch(function() {
+        self.isVendor = false
+      })
+    },
     loadTeacherStatus() {
       var self = this
       getTeacherInfo().then(function(res) {
@@ -472,7 +461,6 @@ export default {
       this.loadProfileStats()
       this.loadReferralEarnings()
       this.loadTeamInfo()
-      this.loadDimensionEnergy()
     },
     loadUserInfo() {
       var self = this
@@ -562,39 +550,6 @@ export default {
       }).catch(function() {})
     },
 
-    loadDimensionEnergy() {
-      var self = this
-      getEnergySandbox('family').then(function(res) {
-        if (res && res.code === 200 && res.data) {
-          var d = res.data.familyData || null
-          if (!d) {
-            if (res.data.personalData) {
-              // 个人数据模式:使用个人数据
-              d = res.data.personalData
-            } else {
-              self.portrait = null
-              return
-            }
-          }
-          if (!d || typeof d !== 'object') return
-          
-          // 设置五维能量分数
-          self.dimensionScores = {
-            body: d.bodyScore ?? d.body_score ?? 0,
-            mind: d.mindScore ?? d.mind_score ?? 0,
-            wisdom: d.wisdomScore ?? d.wisdom_score ?? 0,
-            action: d.actionScore ?? d.action_score ?? 0,
-            wealth: d.wealthScore ?? d.wealth_score ?? 0
-          }
-          
-          // 生成用户画像
-          self.portrait = self.mapToPortrait(d)
-        }
-      }).catch(function(e) {
-        console.error('获取五维能量沙盘失败', e)
-        self.portrait = null
-      })
-    },
     loadReferralEarnings() {
       var self = this
       getReferralSummary().then(function(res) {
@@ -701,72 +656,6 @@ export default {
       return { label: '我们家的能量', overall: Number(overall), dims: dims }
     },
 
-    mapToPortrait(d) {
-      // 计算总分和平均分
-      var scores = { body: 0, mind: 0, wisdom: 0, action: 0, wealth: 0 }
-      var dims = []
-      var total = 0
-      var count = 0
-      
-      var defs = [
-        { key: 'body', label: '身', color: '#FF8C42', desc: '身体健康状况,体质好坏的综合反映' },
-        { key: 'mind', label: '心', color: '#FF6B9D', desc: '情绪与心理状态,情绪波动与心理平衡' },
-        { key: 'wisdom', label: '智', color: '#6366F1', desc: '智力与知识水平,认知能力与知识储备' },
-        { key: 'action', label: '行', color: '#10B981', desc: '行动力与执行力,计划与行动的落实情况' },
-        { key: 'wealth', label: '富', color: '#F59E0B', desc: '财富与资源,物质丰富程度与创富能力' }
-      ]
-      
-      for (var i = 0; i < defs.length; i++) {
-        var raw = d[defs[i].key + 'Score']
-        var n = 0
-        if (raw != null && !isNaN(raw)) {
-          n = Math.max(0, Math.min(100, Number(raw)))
-        }
-        scores[defs[i].key] = n
-        total += n
-        count++
-        dims.push({
-          code: defs[i].key,
-          name: defs[i].label,
-          score: n,
-          color: defs[i].color,
-          desc: defs[i].desc
-        })
-      }
-      
-      var overall = count > 0 ? Math.round(total / count) : 0
-      
-      // 确定等级和描述
-      var tierLabel = ''
-      var summary = ''
-      var tip = ''
-      
-      if (overall >= 80) {
-        tierLabel = '卓越守护者'
-        summary = '你的五维能量处于卓越水平,身心健康,知行合一。家庭成员都受益于你的正向能量场。'
-        tip = '保持当前的良好习惯,继续关注家庭成员的需求'
-      } else if (overall >= 60) {
-        tierLabel = '进取者'
-        summary = '你的五维能量处于良好水平,各方面有所提升,但仍有提升空间。'
-        tip = '可以尝试在其中一个维度上突破瓶颈,带动全家进步'
-      } else if (overall >= 40) {
-        tierLabel = '探索者'
-        summary = '你的五维能量处于起步水平,正在探索和学习中。这是成长的起点。'
-        tip = '从关注最容易改进的维度开始,每一点进步都很重要'
-      } else {
-        tierLabel = '起步者'
-        summary = '你的五维能量处于起始水平,正处于开始关注全家健康的阶段。'
-        tip = '从现在开始,每天关注一项小健康行动,逐步建立五维能量基础'
-      }
-      
-      return {
-        overall: overall,
-        tierLabel: tierLabel,
-        summary: summary,
-        dims: dims,
-        tip: tip
-      }
-    },
     async loadReferralCode() {
       if (this.referralCodeLoaded) return
       var self = this
@@ -783,7 +672,22 @@ export default {
       uni.navigateTo({ url: '/pages/service-center/index' })
     },
     goTeamTree() {
-      uni.navigateTo({ url: '/pages/profile/team-tree' })
+      // 服务商 → 服务商团队;非服务商 → 引导申请
+      if (this.isVendor) {
+        uni.navigateTo({ url: '/pages/vendor/team-system/team-system' })
+        return
+      }
+      uni.showModal({
+        title: '提示',
+        content: '您不是平台服务提供商,是否申请成为服务提供商',
+        confirmText: '去申请',
+        cancelText: '取消',
+        success: function(res) {
+          if (res.confirm) {
+            uni.navigateTo({ url: '/pages/profile/service-role-apply' })
+          }
+        }
+      })
     },
     goLogin: function() {
       uni.navigateTo({ url: '/pages/login/login' })
@@ -852,6 +756,9 @@ export default {
     goToAddress: function() {
       uni.navigateTo({ url: '/pages/shop/address/address' })
     },
+    goToMessageHistory: function() {
+      uni.navigateTo({ url: '/pages/profile/message-history' })
+    },
     goToSettings: function() {
       uni.showActionSheet({
         itemList: ['完善信息', '家庭成员', '隐私政策', '用户协议', '我的画像', '提醒设置'],

+ 308 - 45
cfc-frontend/pages/profile/portrait-edit.vue

@@ -1,43 +1,87 @@
 <template>
-  <view class="portrait-edit-page">
-    <view class="section">
-      <view class="section-title">我的画像描述</view>
-      <view class="hint">请输入你的个人画像描述,AI 会根据这些信息提供更有针对性的建议(最多 2000 字)</view>
+  <view class="portrait-edit-page" :class="{ 'no-scroll': editing }" v-if="!editing">
+    <!-- 五维画像(原我的页面内容迁移至此) -->
+    <view class="section" v-if="portrait">
+      <view class="section-header-row">
+        <text class="section-title">🧭 用户画像</text>
+        <text class="section-sub">{{ portrait.tierLabel }}</text>
+      </view>
+      <view class="portrait-summary">
+        <text class="portrait-desc">{{ portrait.summary }}</text>
+      </view>
+      <view class="portrait-dimensions">
+        <view class="portrait-dim-item" v-for="dim in portrait.dims" :key="dim.code">
+          <view class="portrait-dim-header">
+            <view class="portrait-dim-icon" :style="{ background: dim.color }">{{ dim.icon }}</view>
+            <text class="portrait-dim-name">{{ dim.name }}</text>
+            <text class="portrait-dim-score">{{ dim.score }}</text>
+          </view>
+          <view class="portrait-dim-bar-track">
+            <view class="portrait-dim-bar-fill" :style="{ width: dim.score + '%', background: dim.color }"></view>
+          </view>
+          <text class="portrait-dim-desc">{{ dim.desc }}</text>
+        </view>
+      </view>
+      <view class="portrait-tip" v-if="portrait.tip">
+        <text class="portrait-tip-text">{{ portrait.tip }}</text>
+      </view>
+    </view>
 
-      <textarea
-        class="portrait-textarea"
-        :value="portraitPrompt"
-        placeholder="例如:我家孩子 8 岁,偏瘦,挑食,容易积食,睡眠不足..."
-        maxlength="2000"
-        @input="onInput"
-        auto-height
-      ></textarea>
-      <view class="char-count">{{ portraitPrompt.length }}/2000</view>
+    <!-- 画像描述(可编辑) -->
+    <view class="section">
+      <view class="section-header-row">
+        <text class="section-title">我的画像描述</text>
+        <text class="edit-btn" @click="enterEdit">编辑</text>
+      </view>
+      <view class="hint">AI 会根据这些信息提供更有针对性的建议(最多 2000 字)。每日自动基于最新使用情况更新。 </view>
+      <view class="portrait-prompt-text" v-if="portraitPrompt">{{ portraitPrompt }}</view>
+      <view class="portrait-prompt-empty" v-else>暂无画像描述,点击「编辑」填写或由 AI 自动生成</view>
     </view>
 
+    <!-- 参考指标(自动生成) -->
     <view class="section" v-if="renderedSnapshot">
       <view class="section-title">参考指标(自动生成)</view>
       <view class="snapshot-text">{{ renderedSnapshot }}</view>
     </view>
+  </view>
 
-    <view class="save-bar">
-      <button class="save-btn" :loading="saving" @click="onSave">保存</button>
+  <!-- 全屏编辑模式 -->
+  <view class="editor-fullscreen" v-else>
+    <view class="editor-topbar">
+      <text class="editor-cancel" @click="cancelEdit">取消</text>
+      <text class="editor-title">编辑画像</text>
+      <text class="editor-save" @click="saveEdit">保存</text>
+    </view>
+    <view class="editor-body">
+      <textarea
+        class="editor-textarea"
+        :value="editingText"
+        placeholder="例如:我家孩子 8 岁,偏瘦,挑食,容易积食,睡眠不足..."
+        maxlength="2000"
+        :focus="editing"
+        @input="onEditInput"
+      ></textarea>
+      <view class="char-count">{{ editingText.length }}/2000</view>
     </view>
   </view>
 </template>
 
 <script>
-import { getPortrait, editPortrait } from '../../utils/api.js'
+import { getPortrait, editPortrait, getEnergySandbox } from '../../utils/api.js'
 export default {
   data() {
     return {
+      portrait: null,
       portraitPrompt: '',
       renderedSnapshot: '',
-      saving: false
+      saving: false,
+      editing: false,
+      editingText: ''
     }
   },
   onLoad() {
     this.loadPortrait()
+    this.loadEnergy()
   },
   methods: {
     async loadPortrait() {
@@ -51,16 +95,110 @@ export default {
         console.error('加载画像失败', e)
       }
     },
-    onInput(e) {
-      this.portraitPrompt = e.detail.value
+    loadEnergy() {
+      var self = this
+      getEnergySandbox('family').then(function(res) {
+        if (res && res.code === 200 && res.data) {
+          var d = res.data.familyData || null
+          if (!d && res.data.personalData) {
+            // 个人数据模式:使用个人数据
+            d = res.data.personalData
+          }
+          if (!d || typeof d !== 'object') return
+          self.portrait = self.mapToPortrait(d)
+        }
+      }).catch(function(e) {
+        console.error('获取五维能量沙盘失败', e)
+        self.portrait = null
+      })
+    },
+    mapToPortrait(d) {
+      // 计算总分和平均分
+      var scores = { body: 0, mind: 0, wisdom: 0, action: 0, wealth: 0 }
+      var dims = []
+      var total = 0
+      var count = 0
+
+      var defs = [
+        { key: 'body', label: '身', icon: '💪', color: '#FF8C42', desc: '身体健康状况,体质好坏的综合反映' },
+        { key: 'mind', label: '心', icon: '💖', color: '#FF6B9D', desc: '情绪与心理状态,情绪波动与心理平衡' },
+        { key: 'wisdom', label: '智', icon: '📚', color: '#6366F1', desc: '智力与知识水平,认知能力与知识储备' },
+        { key: 'action', label: '行', icon: '🚀', color: '#10B981', desc: '行动力与执行力,计划与行动的落实情况' },
+        { key: 'wealth', label: '富', icon: '💰', color: '#F59E0B', desc: '财富与资源,物质丰富程度与创富能力' }
+      ]
+
+      for (var i = 0; i < defs.length; i++) {
+        var raw = d[defs[i].key + 'Score']
+        var n = 0
+        if (raw != null && !isNaN(raw)) {
+          n = Math.max(0, Math.min(100, Number(raw)))
+        }
+        scores[defs[i].key] = n
+        total += n
+        count++
+        dims.push({
+          code: defs[i].key,
+          name: defs[i].label,
+          icon: defs[i].icon,
+          score: n,
+          color: defs[i].color,
+          desc: defs[i].desc
+        })
+      }
+
+      var overall = count > 0 ? Math.round(total / count) : 0
+
+      // 确定等级和描述
+      var tierLabel = ''
+      var summary = ''
+      var tip = ''
+
+      if (overall >= 80) {
+        tierLabel = '卓越守护者'
+        summary = '你的五维能量处于卓越水平,身心健康,知行合一。家庭成员都受益于你的正向能量场。'
+        tip = '保持当前的良好习惯,继续关注家庭成员的需求'
+      } else if (overall >= 60) {
+        tierLabel = '进取者'
+        summary = '你的五维能量处于良好水平,各方面有所提升,但仍有提升空间。'
+        tip = '可以尝试在其中一个维度上突破瓶颈,带动全家进步'
+      } else if (overall >= 40) {
+        tierLabel = '探索者'
+        summary = '你的五维能量处于起步水平,正在探索和学习中。这是成长的起点。'
+        tip = '从关注最容易改进的维度开始,每一点进步都很重要'
+      } else {
+        tierLabel = '起步者'
+        summary = '你的五维能量处于起始水平,正处于开始关注全家健康的阶段。'
+        tip = '从现在开始,每天关注一项小健康行动,逐步建立五维能量基础'
+      }
+
+      return {
+        overall: overall,
+        tierLabel: tierLabel,
+        summary: summary,
+        dims: dims,
+        tip: tip
+      }
+    },
+    enterEdit() {
+      this.editingText = this.portraitPrompt
+      this.editing = true
     },
-    async onSave() {
+    cancelEdit() {
+      this.editing = false
+      this.editingText = ''
+    },
+    onEditInput(e) {
+      this.editingText = e.detail.value
+    },
+    async saveEdit() {
       this.saving = true
       try {
-        const res = await editPortrait({ portraitPrompt: this.portraitPrompt })
+        const res = await editPortrait({ portraitPrompt: this.editingText })
         if (res.code === 200) {
           uni.showToast({ title: '保存成功', icon: 'success' })
-          this.loadPortrait()
+          this.portraitPrompt = this.editingText
+          this.editing = false
+          this.editingText = ''
         } else {
           uni.showToast({ title: res.message || '保存失败', icon: 'none' })
         }
@@ -77,43 +215,126 @@ export default {
 <style scoped>
 .portrait-edit-page {
   padding: 24rpx;
-  padding-bottom: 160rpx;
+  padding-bottom: 60rpx;
   min-height: 100vh;
   background: #f5f5f5;
   box-sizing: border-box;
 }
+.no-scroll {
+  overflow: hidden;
+  height: 100vh;
+}
 .section {
   background: #fff;
   border-radius: 16rpx;
   padding: 24rpx;
   margin-bottom: 24rpx;
 }
+.section-header-row {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  margin-bottom: 12rpx;
+}
 .section-title {
   font-size: 32rpx;
   font-weight: bold;
-  margin-bottom: 12rpx;
   color: #333;
 }
+.section-sub {
+  font-size: 24rpx;
+  color: #F97316;
+}
 .hint {
   font-size: 24rpx;
   color: #999;
   margin-bottom: 16rpx;
+  line-height: 1.5;
 }
-.portrait-textarea {
-  width: 100%;
-  min-height: 500rpx;
-  border: 1rpx solid #eee;
-  border-radius: 8rpx;
-  padding: 16rpx;
-  font-size: 28rpx;
-  box-sizing: border-box;
+.edit-btn {
+  font-size: 26rpx;
+  color: #F97316;
+  padding: 6rpx 24rpx;
+  border: 1rpx solid #F97316;
+  border-radius: 30rpx;
+}
+.portrait-summary {
+  margin-bottom: 16rpx;
+}
+.portrait-desc {
+  font-size: 26rpx;
+  color: #555;
   line-height: 1.6;
 }
-.char-count {
-  text-align: right;
+.portrait-dimensions {
+  margin-bottom: 12rpx;
+}
+.portrait-dim-item {
+  margin-bottom: 20rpx;
+}
+.portrait-dim-header {
+  display: flex;
+  align-items: center;
+  margin-bottom: 8rpx;
+}
+.portrait-dim-icon {
+  width: 44rpx;
+  height: 44rpx;
+  line-height: 44rpx;
+  text-align: center;
+  border-radius: 50%;
+  font-size: 24rpx;
+  margin-right: 12rpx;
+}
+.portrait-dim-name {
+  font-size: 28rpx;
+  color: #333;
+  flex: 1;
+}
+.portrait-dim-score {
+  font-size: 28rpx;
+  font-weight: bold;
+  color: #333;
+}
+.portrait-dim-bar-track {
+  height: 16rpx;
+  background: #eee;
+  border-radius: 8rpx;
+  overflow: hidden;
+  margin-bottom: 8rpx;
+}
+.portrait-dim-bar-fill {
+  height: 100%;
+  border-radius: 8rpx;
+}
+.portrait-dim-desc {
   font-size: 22rpx;
   color: #999;
+  line-height: 1.5;
+  display: block;
+}
+.portrait-tip {
   margin-top: 8rpx;
+  background: rgba(249, 115, 22, 0.08);
+  border-radius: 12rpx;
+  padding: 16rpx 20rpx;
+}
+.portrait-tip-text {
+  font-size: 24rpx;
+  color: #d97706;
+  line-height: 1.5;
+}
+.portrait-prompt-text {
+  font-size: 28rpx;
+  color: #333;
+  white-space: pre-wrap;
+  line-height: 1.7;
+  word-break: break-all;
+}
+.portrait-prompt-empty {
+  font-size: 26rpx;
+  color: #999;
+  line-height: 1.6;
 }
 .snapshot-text {
   font-size: 26rpx;
@@ -121,24 +342,66 @@ export default {
   white-space: pre-wrap;
   line-height: 1.6;
 }
-.save-bar {
+
+/* ===== 全屏编辑模式 ===== */
+.editor-fullscreen {
   position: fixed;
+  top: 0;
   left: 0;
   right: 0;
   bottom: 0;
-  padding: 20rpx 24rpx;
-  padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
+  width: 100%;
+  height: 100%;
   background: #fff;
-  box-shadow: 0 -4rpx 16rpx rgba(0, 0, 0, 0.08);
+  z-index: 999;
+  display: flex;
+  flex-direction: column;
   box-sizing: border-box;
-  z-index: 100;
 }
-.save-btn {
-  background: #F97316;
-  color: #fff;
-  border-radius: 44rpx;
+.editor-topbar {
   height: 88rpx;
-  line-height: 88rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 0 24rpx;
+  border-bottom: 1rpx solid #f0f0f0;
+  flex-shrink: 0;
+}
+.editor-cancel {
+  font-size: 30rpx;
+  color: #666;
+}
+.editor-title {
   font-size: 32rpx;
+  font-weight: bold;
+  color: #333;
+}
+.editor-save {
+  font-size: 30rpx;
+  color: #F97316;
+  font-weight: bold;
+}
+.editor-body {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  min-height: 0;
+  position: relative;
+}
+.editor-textarea {
+  width: 100%;
+  height: calc(100vh - 88rpx);
+  padding: 24rpx;
+  font-size: 30rpx;
+  line-height: 1.6;
+  box-sizing: border-box;
+  color: #333;
+}
+.char-count {
+  position: absolute;
+  right: 24rpx;
+  bottom: 16rpx;
+  font-size: 22rpx;
+  color: #999;
 }
-</style>
+</style>