init: 毛孩子计划 小程序 + Go 后端 + 内嵌后台

- pets-fe: 微信原生小程序(首页/计划/记录/报告/社区/引导),
  服务端驱动、无假数据;弹层改用 scroll-view,打开时隐藏自定义 tabBar
- pets-be: Gin + GORM(MySQL, sundynix_ 前缀) + MinIO,统一响应/分页,
  微信 code2session 登录,provider-neutral AI(DeepSeek),go:embed React 后台
- 修复:分段选择类型不匹配(字符串 vs 数字)导致选不中

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Blizzard
2026-07-03 15:33:31 +08:00
commit 609f7d06cf
180 changed files with 15259 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
<nav-bar title="宠友圈"></nav-bar>
<scroll-view class="page-scroll" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}">
<view class="page-body">
<view class="page-title">
<view class="pt-h2">宠友圈</view>
<view class="pt-p">和宠友交流、晒宠、求助与经验分享。</view>
</view>
<scroll-view class="feed-tabs" scroll-x="true" enhanced="{{true}}" show-scrollbar="{{false}}">
<view wx:for="{{feedTabs}}" wx:key="*this"
class="feed-tab {{feedIdx === index ? 'active' : ''}}" data-index="{{index}}" bindtap="switchFeedTab">{{item}}</view>
</scroll-view>
<view class="compose-card" data-type="createPost" bindtap="openSheet">
<view class="post-avatar">{{pet.emoji}}</view>
<view class="compose-input">分享一下今天和 {{pet.name}} 的日常...</view>
<button class="btn btn-primary btn-small" catchtap="openSheet" data-type="createPost">发布</button>
</view>
<view wx:for="{{posts}}" wx:key="id" class="post-card">
<view class="post-head">
<view class="post-avatar">{{item.author_emoji}}</view>
<view class="post-user"><text class="pu-b">{{item.author_name}}</text><text class="pu-s">宠友</text></view>
<view wx:if="{{item.tag}}" class="tag {{item.tagClass}}">{{item.tag}}</view>
</view>
<view class="post-content">{{item.content}}</view>
<view wx:if="{{item.images.length}}" class="photo-grid">
<view wx:for="{{item.images}}" wx:for-item="img" wx:key="*this" class="photo-tile">{{img}}</view>
</view>
<view class="post-actions">
<view class="pa-btn {{item.liked ? 'liked' : ''}}" data-index="{{index}}" bindtap="likePost">{{item.liked ? '♥' : '♡'}} {{item.like_count}}</view>
<view class="pa-btn" data-id="{{item.id}}" bindtap="openComments">💬 {{item.comment_count}}</view>
<view class="pa-btn" data-type="sharePost" bindtap="openSheet">↗ 分享</view>
</view>
</view>
<view wx:if="{{posts.length === 0}}" class="empty-hint">还没有帖子,来发第一条吧 🐾</view>
</view>
</scroll-view>
<fab bind:tap="onFab"></fab>
<bottom-sheet show="{{sheetShow}}" type="{{sheetType}}" post-id="{{sheetPostId}}"
bind:close="closeSheet" bind:posted="onPosted" bind:commented="onCommented"></bottom-sheet>