refactor: 确立独立子工程架构 (backend, admin, mpuniapp) 并同步更新 AGENTS.md 规范

这个提交包含在:
wikiboss
2026-09-20 17:05:22 +08:00
父节点 de3cf8b870
当前提交 9fa1d1fbd0
共有 1679 个文件被更改,包括 204798 次插入 和 16817 次删除

查看文件

@@ -0,0 +1,25 @@
const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isMP = platformInfo.startsWith('mp')
const PAGE_PATH = '/pages/API/rpx2px/rpx2px'
describe('API-rpx2px', () => {
if(isMP) {
it('not support', () => {
expect(1).toBe(1)
})
return
}
it('rpx2px', async () => {
page = await program.reLaunch(PAGE_PATH)
await page.waitFor('view');
const btnConvert = await page.$('#convert')
await btnConvert.tap()
await page.waitFor(100)
const data = await page.data('data')
expect(data.result).toBe(true)
});
});

查看文件

@@ -0,0 +1,73 @@
<template>
<!-- #ifdef APP -->
<scroll-view class="page-scroll-view">
<!-- #endif -->
<view class="page">
<page-head :title="data.title"></page-head>
<view>
<view class="item">
<text class="item-k">输入:</text>
<text class="item-v">{{data.rpxValue}}rpx</text>
</view>
<view class="item">
<text class="item-k">返回:</text>
<text class="item-v">{{data.pxValue}}px</text>
</view>
</view>
<view>
<button id="convert" @click="rpx2px">转换</button>
</view>
</view>
<!-- #ifdef APP -->
</scroll-view>
<!-- #endif -->
</template>
<script setup lang="uts">
type DataType = {
title: string;
rpxValue: number;
pxValue: number;
result: boolean;
}
const data = reactive({
title: 'rpx2px',
rpxValue: 750,
pxValue: 0,
result: false
} as DataType)
const rpx2px = () => {
data.pxValue = uni.rpx2px(data.rpxValue);
// 仅限自动化测试
const windowInfo = uni.getWindowInfo();
if (windowInfo.windowWidth == data.pxValue) {
data.result = true
}
}
defineExpose({
data
})
</script>
<style>
.page {
padding: 15px;
}
.item {
flex-direction: row;
}
.item-k {
width: 72px;
line-height: 2;
}
.item-v {
font-weight: bold;
line-height: 2;
}
</style>