feat(miniprogram): 温润东方风全面 UI 重设计
73 文件变更,覆盖全部 40 个页面 SCSS + TabBar 图标 + 组件样式。 统一赤陶主色 #C4623A + 暖米背景 + 衬线标题字体 + 12px 圆角体系。
This commit is contained in:
44
apps/miniprogram/test-sel2.cjs
Normal file
44
apps/miniprogram/test-sel2.cjs
Normal file
@@ -0,0 +1,44 @@
|
||||
const automator = require('miniprogram-automator');
|
||||
|
||||
(async () => {
|
||||
const mp = await automator.connect({ wsEndpoint: 'ws://127.0.0.1:9420' });
|
||||
await mp.switchTab('/pages/index/index');
|
||||
await new Promise(r => setTimeout(r, 3000));
|
||||
const page = await mp.currentPage();
|
||||
console.log('page path:', page.path);
|
||||
|
||||
// Try waitFor for elements
|
||||
try {
|
||||
await page.waitFor('.index-page', { timeout: 5000 });
|
||||
console.log('index-page: found');
|
||||
} catch (e) {
|
||||
console.log('index-page:', e.message);
|
||||
}
|
||||
|
||||
// Try generic view selector
|
||||
const views = await page.$$('view');
|
||||
console.log('total view elements:', views.length);
|
||||
|
||||
// Get text from first few views
|
||||
for (let i = 0; i < Math.min(views.length, 30); i++) {
|
||||
try {
|
||||
const text = await views[i].textContent();
|
||||
if (text && text.trim().length > 0) {
|
||||
console.log(' view[' + i + ']:', text.trim().substring(0, 60).replace(/\s+/g, ' '));
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
|
||||
// Try text selector
|
||||
try {
|
||||
const el = await page.$('text');
|
||||
if (el) console.log('text element found');
|
||||
} catch {}
|
||||
|
||||
// Get page size
|
||||
const size = await page.size();
|
||||
console.log('page size:', JSON.stringify(size));
|
||||
|
||||
await mp.close();
|
||||
process.exit(0);
|
||||
})()
|
||||
Reference in New Issue
Block a user