需求:小程序端代码要同时同步到服务器与 git 远程仓库,此前前端仅存在于本地目录(无 remote,从未推送), 服务器与 gitcode 上只有后端。现并入本仓库,复用现有「push 即部署」链路,一次推送双端落地。 - 新增 uniapp/:小程序端源码全量快照(150 文件 / 1.2M) pages(13 页面) · components(fc-navbar/fc-tabbar/fc-post-card/fc-empty) · common(api·utils·mock·assets·store·config) · static(74 图标 + 3 轮播插画 + LOGO) · docs(01-04 交付文档) · tests(零依赖全链路用例) · tools(图标/主题/轮播配图生成脚本) - 明确排除:AGENTS.md(含后台密码、服务器 root 密码、小程序 AppSecret,切勿入库)、 unpackage/(构建产物,由 uniapp/.gitignore 忽略)、node_modules、.DS_Store、*.log - .gitignore 新增 /uniapp/AGENTS.md 兜底(与根 /AGENTS.md、/fluniapp/ 同一约定) - README.md 增补「本项目结构 + 部署链路」章节,说明 uniapp/ 为源码快照、 小程序真正上线仍需微信开发者工具 cli upload 说明:本次为源码快照,未携带前端本地仓库历史——其历史提交中含 AGENTS.md 凭据, 若做 subtree 合并会把密码永久写入本仓库历史,故采用快照方式。
210 行
4.1 KiB
Vue
210 行
4.1 KiB
Vue
<script>
|
||
export default {
|
||
onLaunch: function () {
|
||
console.log('App Launch')
|
||
},
|
||
onShow: function () {
|
||
console.log('App Show')
|
||
},
|
||
onHide: function () {
|
||
console.log('App Hide')
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style>
|
||
/* ============================================================
|
||
* 全局基础样式 · 生态绿(Eco Green)
|
||
* ========================================================== */
|
||
page {
|
||
--fc-primary: #00e070;
|
||
--fc-primary-ink: #04301e;
|
||
--fc-primary-light: #5cf3a6;
|
||
--fc-primary-lighter: #e4fdf0;
|
||
--fc-bg: #f2fef7;
|
||
--fc-text: #04291c;
|
||
--fc-text-secondary: #3f6b57;
|
||
--fc-border: #d6f3e3;
|
||
--fc-price: #e0891b;
|
||
|
||
background-color: var(--fc-bg);
|
||
color: var(--fc-text);
|
||
font-size: 28rpx;
|
||
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||
-webkit-font-smoothing: antialiased;
|
||
}
|
||
|
||
view,
|
||
text,
|
||
scroll-view,
|
||
swiper,
|
||
image {
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
/* 通用容器 */
|
||
.fc-page {
|
||
min-height: 100vh;
|
||
background: var(--fc-bg);
|
||
padding-bottom: 120rpx;
|
||
}
|
||
|
||
.fc-card {
|
||
background: #ffffff;
|
||
border-radius: 24rpx;
|
||
padding: 30rpx;
|
||
margin: 24rpx;
|
||
box-shadow: 0 6rpx 24rpx rgba(4, 48, 30, 0.08);
|
||
}
|
||
|
||
/* 主按钮 */
|
||
.fc-btn {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
height: 88rpx;
|
||
border-radius: 999rpx;
|
||
font-size: 30rpx;
|
||
font-weight: 600;
|
||
color: var(--fc-primary-ink);
|
||
background: linear-gradient(135deg, #00e070 0%, #00c860 55%, #00b85c 100%);
|
||
box-shadow: 0 8rpx 24rpx rgba(0, 168, 85, 0.28);
|
||
}
|
||
.fc-btn--ghost {
|
||
background: #ffffff;
|
||
color: var(--fc-primary-text);
|
||
border: 2rpx solid var(--fc-primary);
|
||
box-shadow: none;
|
||
}
|
||
.fc-btn--disabled {
|
||
background: #d6f3e3;
|
||
color: #ffffff;
|
||
box-shadow: none;
|
||
}
|
||
|
||
/* 标签 */
|
||
.fc-tag {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
padding: 4rpx 14rpx;
|
||
border-radius: 999rpx;
|
||
font-size: 22rpx;
|
||
background: var(--fc-primary-lighter);
|
||
color: var(--fc-primary-text);
|
||
}
|
||
|
||
/* 价格 */
|
||
.fc-price {
|
||
color: var(--fc-price);
|
||
font-weight: 700;
|
||
}
|
||
.fc-price__symbol {
|
||
font-size: 24rpx;
|
||
}
|
||
|
||
/* 渐变占位图(无外链图片时使用) */
|
||
.fc-thumb {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
border-radius: 20rpx;
|
||
background: linear-gradient(135deg, #d9fbe9 0%, #b6f3d4 50%, #8fecbd 100%);
|
||
font-size: 56rpx;
|
||
color: #ffffff;
|
||
}
|
||
|
||
.fc-safe-bottom {
|
||
height: env(safe-area-inset-bottom);
|
||
}
|
||
|
||
/* 文本截断 */
|
||
.fc-ellipsis {
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
}
|
||
.fc-ellipsis-2 {
|
||
display: -webkit-box;
|
||
-webkit-line-clamp: 2;
|
||
-webkit-box-orient: vertical;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.fc-empty {
|
||
padding: 120rpx 0;
|
||
text-align: center;
|
||
color: var(--fc-text-secondary);
|
||
font-size: 26rpx;
|
||
}
|
||
|
||
@keyframes fc-shimmer {
|
||
0% { opacity: 0.55; }
|
||
50% { opacity: 1; }
|
||
100% { opacity: 0.55; }
|
||
}
|
||
.fc-skeleton {
|
||
animation: fc-shimmer 1.2s ease-in-out infinite;
|
||
background: #e6fbf1;
|
||
border-radius: 16rpx;
|
||
}
|
||
|
||
/* ============================================================
|
||
* 图标(图片)与 LOGO
|
||
* 所有图标均为 static/icons/ 下的图片,可在后台
|
||
* 「系统设置 → LOGO 与图标」中替换。
|
||
* ========================================================== */
|
||
.fc-icon {
|
||
display: block;
|
||
width: 40rpx;
|
||
height: 40rpx;
|
||
flex-shrink: 0;
|
||
}
|
||
.fc-icon--xs { width: 30rpx; height: 30rpx; }
|
||
.fc-icon--sm { width: 36rpx; height: 36rpx; }
|
||
.fc-icon--md { width: 48rpx; height: 48rpx; }
|
||
.fc-icon--lg { width: 64rpx; height: 64rpx; }
|
||
.fc-icon--xl { width: 88rpx; height: 88rpx; }
|
||
|
||
/* 徽章图标(图片自带圆角底色) */
|
||
.fc-icon--badge {
|
||
width: 96rpx;
|
||
height: 96rpx;
|
||
border-radius: 28rpx;
|
||
}
|
||
.fc-icon--badge-sm {
|
||
width: 76rpx;
|
||
height: 76rpx;
|
||
border-radius: 22rpx;
|
||
}
|
||
|
||
/* LOGO(图片自带 21.9% 圆角,CSS 圆角与之对齐避免裁切) */
|
||
.fc-logo {
|
||
display: block;
|
||
}
|
||
.fc-logo--sm {
|
||
width: 60rpx;
|
||
height: 60rpx;
|
||
border-radius: 13rpx;
|
||
}
|
||
.fc-logo--md {
|
||
width: 96rpx;
|
||
height: 96rpx;
|
||
border-radius: 21rpx;
|
||
}
|
||
.fc-logo--lg {
|
||
width: 140rpx;
|
||
height: 140rpx;
|
||
border-radius: 31rpx;
|
||
box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.12);
|
||
}
|
||
|
||
/* 图标 + 文字 的行内组合 */
|
||
.fc-inline {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
.fc-inline__text {
|
||
margin-left: 10rpx;
|
||
}
|
||
</style>
|