Sfoglia il codice sorgente

fix: AdminNoticeController LambdaQueryWrapper eq方法参数类型错误

iwt 1 mese fa
parent
commit
b4ce9f49bd

+ 1 - 1
cfc-backend/src/main/java/com/etotem/cfc/controller/admin/AdminNoticeController.java

@@ -29,7 +29,7 @@ public class AdminNoticeController {
         String type = body.get("type") != null ? body.get("type").toString() : null;
 
         LambdaQueryWrapper<Notice> q = new LambdaQueryWrapper<>();
-        q.eq("status", "deleted").ne(1, 0);
+        q.ne(Notice::getStatus, "deleted");
         if (status != null && !status.isEmpty()) q.eq(Notice::getStatus, status);
         if (type != null && !type.isEmpty()) q.eq(Notice::getType, type);
         q.orderByDesc(Notice::getCreatedAt);

+ 5 - 1
cfc-frontend/pages/profile-main/profile.vue

@@ -5,8 +5,9 @@
     <view v-if="!isLoggedIn" class="login-prompt">
       <text class="prompt-icon">👤</text>
       <text class="prompt-title">登录浠艾福</text>
-      <text class="prompt-desc">登录后查看个人资料、积分记录</text>
+      <text class="prompt-desc">登录后查看个人资料、积分记录、能量数据与家庭管理</text>
       <button class="login-btn" @click="goLogin">登录 / 注册</button>
+      <text class="skip-link" @click="goSkip">暂不登录,先逛逛 ›</text>
     </view>
 
     <!-- 已登录 -->
@@ -461,6 +462,9 @@ export default {
     goLogin: function() {
       uni.navigateTo({ url: '/pages/login/login' })
     },
+    goSkip: function() {
+      uni.switchTab({ url: '/pages/index-home/index' })
+    },
     goToEditInfo: function() {
       uni.navigateTo({ url: '/pages/user-edit/user-edit' })
     },

+ 67 - 1
cfc-frontend/pages/wealth/index.vue

@@ -201,7 +201,8 @@ import {
   getReferralCode,
   getReferralSummary,
   getCommissionSummary,
-  getVisibleFamilyMembers
+  getVisibleFamilyMembers,
+  productList
 } from '../../utils/api.js'
 
 export default {
@@ -286,6 +287,7 @@ export default {
     var token = uni.getStorageSync('token')
     if (!token) {
       this.isLoggedIn = false
+      this.loadGuestProducts()
       this._watchPageReady()
       return
     }
@@ -454,6 +456,17 @@ export default {
     goToCart() {
       uni.navigateTo({ url: '/pages/shop/cart/cart' })
     },
+    loadGuestProducts() {
+      var self = this
+      productList({ page: 1, size: 4, sort: 'sales' }).then(function(res) {
+        if (res.code === 200 && res.data && res.data.records) {
+          self.guestProducts = res.data.records.slice(0, 4)
+        }
+      }).catch(function() {})
+    },
+    goProductDetail(id) {
+      uni.navigateTo({ url: '/pages/shop/detail/detail?id=' + id })
+    },
     onServiceClick(action) {
       if (this[action]) {
         this[action]()
@@ -804,4 +817,57 @@ export default {
 .login-prompt .login-btn::after {
   border: none;
 }
+
+/* 品牌定位语 */
+.brand-strap {
+  margin: 16rpx 30rpx 0;
+  padding: 20rpx 28rpx;
+  background: linear-gradient(135deg, #FFFBEB, rgba(245,158,11,0.12));
+  border-radius: 16rpx;
+  border-left: 4rpx solid #F59E0B;
+}
+.brand-strap-text {
+  font-size: 26rpx;
+  color: #92400E;
+  font-weight: 500;
+}
+
+/* 商城精选预览 */
+.product-scroll {
+  white-space: nowrap;
+  padding: 0 30rpx;
+}
+.product-list {
+  display: inline-flex;
+  gap: 20rpx;
+}
+.product-card {
+  width: 220rpx;
+  flex-shrink: 0;
+  background: #fff;
+  border-radius: 16rpx;
+  overflow: hidden;
+  box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
+}
+.product-img {
+  width: 220rpx;
+  height: 220rpx;
+  background: #f5f5f5;
+}
+.product-name {
+  display: block;
+  padding: 12rpx 12rpx 4rpx;
+  font-size: 24rpx;
+  color: #333;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.product-price {
+  display: block;
+  padding: 4rpx 12rpx 12rpx;
+  font-size: 26rpx;
+  font-weight: bold;
+  color: #F59E0B;
+}
 </style>