Files
kenyanghui 171003556d aiinvite2.1: 拆约(原邀悦圈)小程序 + Express/SQLite 后端
- wechat-miniprogram: 原生小程序,品牌化拆约+玄龙logo,API 指向 https://xhermes.aibay.asia
- yaoyue-sever: Express 单文件 server.js + better-sqlite3,GLM glm-5.3-flash(thinking disabled)
- 排除 node_modules/.env/*.db
2026-11-11 23:25:28 +08:00

39 lines
1.3 KiB
JavaScript

const automator = require('miniprogram-automator');
(async () => {
const mp = await automator.connect({ wsEndpoint: 'ws://localhost:9420' });
mp.on('console', msg => {
console.log(' [' + msg.type + ']', msg.args.join(' ').substring(0, 250));
});
// 用 reLaunch 干净进入编辑模式
const page = await mp.reLaunch('/pages/create-activity/index?mode=edit&id=8055ec9d-4d9e-4786-9f8e-f6938b595430');
await new Promise(r => setTimeout(r, 4000));
const data = await page.data();
console.log('mode:', data.mode);
console.log('form.title:', data.form?.title);
console.log('form.description:', data.form?.description?.substring(0, 40));
console.log('form.location:', data.form?.location);
// 找提交按钮
const allEls = await page.$$('button');
console.log('\n所有按钮:');
for (const el of allEls) {
const text = await el.text();
console.log(' "' + text + '"');
}
// 找导航栏的"使用模板"
const allViews = await page.$$('view');
let found = 0;
for (const v of allViews) {
if (found > 5) break;
const text = await v.text();
if (text.includes('模板') || text.includes('编辑') || text.includes('创建')) {
console.log(' view文本:', text.substring(0, 30));
found++;
}
}
await mp.close();
})();