Browse Source

Merge branch 'cfclub' of https://git.iwintrue.com/liaoxg/cfc into cfclub

Xiaogang Liao 1 month ago
parent
commit
9a6b414e9f

+ 6 - 0
cfc-backend/src/main/java/com/etotem/cfc/controller/MarketController.java

@@ -87,6 +87,9 @@ public class MarketController {
             @RequestBody ApplyPackageDTO dto,
             @RequestAttribute("userId") Long userId) {
         Long familyId = membershipService.getUserFamilyId(userId);
+        if (familyId == null) {
+            return Result.noFamily("请先创建或加入家庭");
+        }
         dto.setPackageId(id);
         TaskPlanInstance instance = planService.applyPackage(dto, familyId);
         return Result.success(instance);
@@ -99,6 +102,9 @@ public class MarketController {
     @PostMapping("/plans")
     public Result<List<TaskPlanInstance>> getMyPlans(@RequestAttribute("userId") Long userId) {
         Long familyId = membershipService.getUserFamilyId(userId);
+        if (familyId == null) {
+            return Result.noFamily("请先创建或加入家庭");
+        }
         List<TaskPlanInstance> plans = planService.getFamilyPlans(familyId);
         return Result.success(plans);
     }

+ 3 - 0
cfc-backend/src/main/java/com/etotem/cfc/controller/PackagePaymentController.java

@@ -36,6 +36,9 @@ public class PackagePaymentController {
             @RequestAttribute("userId") Long userId,
             @RequestBody Map<String, Object> params) {
         Long familyId = membershipService.getUserFamilyId(userId);
+        if (familyId == null) {
+            return Result.noFamily("请先创建或加入家庭");
+        }
         Long packageId = Long.valueOf(params.get("packageId").toString());
         String payMethod = params.get("payMethod") != null ? params.get("payMethod").toString() : "wechat";
         Long couponId = params.get("couponId") != null ? Long.valueOf(params.get("couponId").toString()) : null;

+ 9 - 0
cfc-backend/src/main/java/com/etotem/cfc/controller/family/BindController.java

@@ -39,6 +39,9 @@ public class BindController {
                                         @RequestBody BindGuideDTO dto) {
         try {
             Long familyId = membershipService.getUserFamilyId(userId);
+            if (familyId == null) {
+                return Result.noFamily("请先创建或加入家庭");
+            }
             boolean success = guideFamilyService.confirmBind(dto.getGuideId(), familyId,
                 dto.getServiceType(), dto.getServicePrice());
             return Result.success(success);
@@ -54,6 +57,9 @@ public class BindController {
     @PostMapping("/guides")
     public Result<List<Map<String, Object>>> getBoundGuides(@RequestAttribute("userId") Long userId) {
         Long familyId = membershipService.getUserFamilyId(userId);
+        if (familyId == null) {
+            return Result.noFamily("请先创建或加入家庭");
+        }
         List<GuideFamily> bindings = guideFamilyService.getGuidesByFamily(familyId);
         
         List<Map<String, Object>> result = bindings.stream().map(binding -> {
@@ -78,6 +84,9 @@ public class BindController {
     public Result<Boolean> unbind(@RequestAttribute("userId") Long userId,
                                     @RequestBody Map<String, Object> params) {
         Long familyId = membershipService.getUserFamilyId(userId);
+        if (familyId == null) {
+            return Result.noFamily("请先创建或加入家庭");
+        }
         Long id = Long.valueOf(params.get("id").toString());
         try {
             GuideFamily gf = guideFamilyService.unbindAndGet(id, familyId);

+ 21 - 0
cfc-backend/src/main/java/com/etotem/cfc/controller/subscription/SubscriptionController.java

@@ -57,6 +57,9 @@ public class SubscriptionController {
      */
     @PostMapping("/status")
     public Result<Map<String, Object>> getSubscriptionStatus(@RequestAttribute Long familyId) {
+        if (familyId == null) {
+            return Result.noFamily("请先创建或加入家庭");
+        }
         MemberSubscription sub = subscriptionService.getActiveSubscription(familyId);
 
         Map<String, Object> data = new HashMap<>();
@@ -97,6 +100,9 @@ public class SubscriptionController {
     public Result<Object> createOrder(@RequestAttribute Long familyId,
                                       @RequestAttribute("userId") Long userId,
                                       @RequestBody Map<String, Object> body) {
+        if (familyId == null) {
+            return Result.noFamily("请先创建或加入家庭");
+        }
         String level = (String) body.get("level");
         if (level == null) {
             return Result.error("缺少level参数");
@@ -144,6 +150,9 @@ public class SubscriptionController {
                                    @RequestParam Integer amount,
                                    @RequestParam String paymentType,
                                    @RequestParam(required = false) String transactionId) {
+        if (familyId == null) {
+            return Result.noFamily("请先创建或加入家庭");
+        }
         if (!testMode) {
             return Result.error("仅测试模式可用,正式订阅请走 /create 虚拟支付");
         }
@@ -157,6 +166,9 @@ public class SubscriptionController {
      */
     @PostMapping("/cancel")
     public Result<Void> cancel(@RequestAttribute Long familyId) {
+        if (familyId == null) {
+            return Result.noFamily("请先创建或加入家庭");
+        }
         subscriptionService.cancelSubscription(familyId);
         return Result.success(null);
     }
@@ -167,6 +179,9 @@ public class SubscriptionController {
     @PostMapping("/auto-renew")
     public Result<Void> setAutoRenew(@RequestAttribute Long familyId,
                                       @RequestBody Map<String, Object> body) {
+        if (familyId == null) {
+            return Result.noFamily("请先创建或加入家庭");
+        }
         Object enabledObj = body.get("enabled");
         int enabled = 0;
         if (enabledObj != null) {
@@ -182,6 +197,9 @@ public class SubscriptionController {
      */
     @PostMapping("/benefits/my")
     public Result<List<Map<String, Object>>> getMyBenefits(@RequestAttribute Long familyId) {
+        if (familyId == null) {
+            return Result.noFamily("请先创建或加入家庭");
+        }
         MemberSubscription sub = subscriptionService.getActiveSubscription(familyId);
         if (sub == null) {
             return Result.success(new ArrayList<>());
@@ -211,6 +229,9 @@ public class SubscriptionController {
     @PostMapping("/benefit/check")
     public Result<Map<String, Object>> checkBenefit(@RequestAttribute Long familyId,
                                                       @RequestBody Map<String, Object> body) {
+        if (familyId == null) {
+            return Result.noFamily("请先创建或加入家庭");
+        }
         String benefitCode = (String) body.get("benefitCode");
         if (benefitCode == null || benefitCode.isEmpty()) {
             return Result.error("缺少benefitCode");

+ 1 - 1
cfc-frontend/pages/discover-detail/product-detail/product-detail.vue

@@ -109,7 +109,7 @@
       </view>
     </view>
 
-    <ContentSharePoster :show="showPoster" :title="product.name" :coverImage="product.coverImage" :qrCodeBase64="posterQrCode" typeLabel="好物推荐" :dimensionCode="posterDimension" :priceText="priceText" :summary="product.intro" ctaText="长按识别二维码 · 查看商品" :inviteText="posterInviteText" @close="showPoster = false" />
+    <ContentSharePoster :show="showPoster" :title="product.name" :coverImage="getImageUrl(product.coverImage)" :qrCodeBase64="posterQrCode" typeLabel="好物推荐" :dimensionCode="posterDimension" :priceText="priceText" :summary="product.intro" ctaText="长按识别二维码 · 查看商品" :inviteText="posterInviteText" @close="showPoster = false" />
   </view>
 </template>
 

+ 1 - 1
cfc-web/.last_build_commit

@@ -1 +1 @@
-f06e875b12a3ebab241fd5c70bb940a7d411b129
+0afe6f03a250e8f7f6d157b681be4ce6bce42deb

+ 2 - 2
cfc-web/package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "cfc-web",
-  "version": "1.0.824",
+  "version": "1.0.826",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "cfc-web",
-      "version": "1.0.824",
+      "version": "1.0.826",
       "dependencies": {
         "@wangeditor/editor": "^5.1.23",
         "@wangeditor/editor-for-vue": "^1.0.2",

+ 1 - 1
cfc-web/package.json

@@ -1,6 +1,6 @@
 {
   "name": "cfc-web",
-  "version": "1.0.825",
+  "version": "1.0.827",
   "private": true,
   "scripts": {
     "dev": "vue-cli-service serve",

+ 44 - 0
cfc-web/public/CHANGELOG-v1.0.md

@@ -4,6 +4,50 @@
 
 ---
 
+## v1.0.827 (2026-08-06)
+
+### Bug 修复
+- 商品海报分享未携带封面图(coverImage 未转完整 URL)
+- 移除无家庭时的创建或加入家庭弹窗(5001 仅拒绝请求)
+
+### 其他
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+
+
+## v1.0.826 (2026-08-06)
+
+### Bug 修复
+- 分享海报封面图按原比例绘制(contain 居中),不再拉伸变形
+- 报名弹窗点击家庭成员/添加报名人即关闭(.self 修饰符在 mp-weixin 被丢弃,改用 @click.stop)
+- 活动报名弹窗重复导致点击家庭成员关闭弹窗
+- checkout.vue methods 间缺逗号语法错误
+
+### 其他
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+
+### 文档
+- 新增滔达福项目总体介绍PPT成品(V1/V2)
+- AI创新项目大赛新增行业应用场景,五维能量标签更新为身智富行心
+
+
 ## v1.0.825 (2026-08-05)
 
 ### Bug 修复

+ 45 - 1
cfc-web/public/CHANGELOG.md

@@ -1,6 +1,6 @@
 # 更新日志
 
-> 当前版本: v1.0.825
+> 当前版本: v1.0.827
 
 ## 历史版本
 
@@ -8,6 +8,50 @@
 
 ---
 
+## v1.0.827 (2026-08-06)
+
+### Bug 修复
+- 商品海报分享未携带封面图(coverImage 未转完整 URL)
+- 移除无家庭时的创建或加入家庭弹窗(5001 仅拒绝请求)
+
+### 其他
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+
+
+## v1.0.826 (2026-08-06)
+
+### Bug 修复
+- 分享海报封面图按原比例绘制(contain 居中),不再拉伸变形
+- 报名弹窗点击家庭成员/添加报名人即关闭(.self 修饰符在 mp-weixin 被丢弃,改用 @click.stop)
+- 活动报名弹窗重复导致点击家庭成员关闭弹窗
+- checkout.vue methods 间缺逗号语法错误
+
+### 其他
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+
+### 文档
+- 新增滔达福项目总体介绍PPT成品(V1/V2)
+- AI创新项目大赛新增行业应用场景,五维能量标签更新为身智富行心
+
+
 ## v1.0.825 (2026-08-05)
 
 ### Bug 修复