前人工作区变更归档(元审计遗留处置·冰朔授权'交给你来处理'·不否定过去原则):hololake-phase-b-staging删除组/WORK区/submodule指针/0826壳源/neural-chain/skills-mirror/codex恢复帧/.zcode本地配置等140项原样冻结入库——不删除不修改不评判,作为历史一环保留;WX-SECRETS回执经查仅含公开AppID无AppSecret,安全

This commit is contained in:
冰朔 2026-09-01 22:18:31 +08:00
commit a40f29c12e
2442 changed files with 596545 additions and 6601 deletions

View file

@ -0,0 +1,60 @@
// 编辑页:新建/编辑条目(原型:写回本地假数据)
Page({
data: {
id: null,
title: '',
content: '',
tagStr: '',
visibility: 'private',
aiReadable: true
},
onLoad(query) {
if (query.id) {
const n = getApp().globalData.notes.find(x => x.id === query.id)
if (n) {
this.setData({
id: n.id, title: n.title, content: n.content,
tagStr: n.tags.join(','),
visibility: n.visibility, aiReadable: n.aiReadable
})
wx.setNavigationBarTitle({ title: '编辑条目' })
}
}
},
onTitle(e) { this.setData({ title: e.detail.value }) },
onContent(e) { this.setData({ content: e.detail.value }) },
onTags(e) { this.setData({ tagStr: e.detail.value }) },
onVis(e) { this.setData({ visibility: e.detail.value ? 'public' : 'private' }) },
onAI(e) { this.setData({ aiReadable: e.detail.value }) },
onSave() {
if (!this.data.title.trim()) {
wx.showToast({ title: '标题不能为空', icon: 'none' })
return
}
const app = getApp()
const tags = this.data.tagStr.split(/[,,]/).map(t => t.trim()).filter(Boolean)
const now = new Date()
const stamp = `${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')} ${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}`
if (this.data.id) {
const n = app.globalData.notes.find(x => x.id === this.data.id)
Object.assign(n, {
title: this.data.title, content: this.data.content, tags,
visibility: this.data.visibility, aiReadable: this.data.aiReadable, updatedAt: stamp
})
} else {
app.globalData.notes.unshift({
id: 'n' + Date.now(),
title: this.data.title, content: this.data.content, tags,
summary: this.data.content.replace(/[#*\-\n]/g, ' ').slice(0, 40),
visibility: this.data.visibility, aiReadable: this.data.aiReadable,
updatedAt: stamp
})
}
wx.showToast({ title: '已保存(原型)' })
setTimeout(() => wx.navigateBack(), 600)
}
})

View file

@ -0,0 +1,3 @@
{
"navigationBarTitleText": "新建条目"
}

View file

@ -0,0 +1,34 @@
<!-- 编辑页 -->
<view class="page">
<view class="card">
<input class="e-title" placeholder="标题" placeholder-class="ph"
value="{{title}}" bindinput="onTitle" />
<textarea class="e-content" placeholder="内容(支持简单 Markdown:## 小标题、- 列表、**加粗**)"
placeholder-class="ph" value="{{content}}" bindinput="onContent"
maxlength="5000" auto-height />
<input class="e-tags" placeholder="标签,用逗号分隔(如:读书, 思维)"
placeholder-class="ph" value="{{tagStr}}" bindinput="onTags" />
</view>
<view class="card">
<view class="row">
<view>
<view class="row-title">🌐 公开</view>
<view class="row-desc">公开条目可被其他访问者浏览</view>
</view>
<switch checked="{{visibility === 'public'}}" bindchange="onVis" color="#14b8a6" />
</view>
<view class="row">
<view>
<view class="row-title">🤖 AI 可读</view>
<view class="row-desc">允许 AI 问答把本条目作为语料;关闭后 AI 永不读取</view>
</view>
<switch checked="{{aiReadable}}" bindchange="onAI" color="#14b8a6" />
</view>
</view>
<view class="save-wrap">
<button class="btn-primary save" bindtap="onSave">保存</button>
</view>
</view>

View file

@ -0,0 +1,34 @@
/* 编辑页样式 */
.e-title {
font-size: 34rpx;
font-weight: 700;
color: #f1f5f9;
margin-bottom: 20rpx;
}
.e-content {
width: 100%;
min-height: 380rpx;
font-size: 28rpx;
color: #cbd5e1;
line-height: 1.7;
}
.e-tags {
margin-top: 24rpx;
font-size: 26rpx;
color: #5eead4;
border-top: 1rpx solid #1e293b;
padding-top: 24rpx;
}
.ph { color: #475569; }
.row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 14rpx 0;
}
.row-title { font-size: 30rpx; color: #f1f5f9; font-weight: 600; }
.row-desc { font-size: 23rpx; color: #64748b; margin-top: 6rpx; max-width: 520rpx; }
.save-wrap { padding: 30rpx 24rpx 60rpx; }
.save { width: 100%; }