init: 汇率换算工具小程序骨架

- 两个页面:首页(双向换算)+ 汇率总览(一对多)
- 基础项目结构和配置
- AppID 待填入

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
manpengan
2026-03-18 15:44:39 +08:00
commit 6b60379b0c
15 changed files with 162 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
node_modules/
miniprogram_npm/
.DS_Store

14
README.md Normal file
View File

@@ -0,0 +1,14 @@
# 汇率换算工具 (currency-converter)
微信小程序,个人主体,实时汇率换算工具。
## 功能
- 双向汇率换算(经典模式)
- 汇率总览(一对多)
- 主流 20-30 种货币
- 数据来源open.er-api.com免费 API
## 开发
用微信开发者工具打开项目根目录,在 `project.config.json` 中填入 AppID。

7
miniprogram/app.js Normal file
View File

@@ -0,0 +1,7 @@
App({
globalData: {},
onLaunch() {
console.log('App launched');
},
});

17
miniprogram/app.json Normal file
View File

@@ -0,0 +1,17 @@
{
"pages": [
"pages/index/index",
"pages/overview/overview"
],
"window": {
"navigationBarTitleText": "汇率换算",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black",
"backgroundColor": "#F5F5F5",
"backgroundTextStyle": "dark"
},
"style": "v2",
"componentFramework": "glass-easel",
"sitemapLocation": "sitemap.json",
"lazyCodeLoading": "requiredComponents"
}

31
miniprogram/app.wxss Normal file
View File

@@ -0,0 +1,31 @@
page {
background-color: #F5F5F5;
color: #333333;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-size: 28rpx;
line-height: 1.6;
}
.container {
padding: 32rpx;
}
.card {
background-color: #FFFFFF;
border-radius: 16rpx;
padding: 32rpx;
margin-bottom: 24rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
}
.page-title {
font-size: 40rpx;
font-weight: 700;
margin-bottom: 16rpx;
}
.page-subtitle {
font-size: 26rpx;
color: #999999;
margin-bottom: 32rpx;
}

View File

@@ -0,0 +1,7 @@
Page({
data: {},
onLoad() {
console.log('Index page loaded');
},
});

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,8 @@
<view class="container">
<view class="page-title">汇率换算</view>
<view class="page-subtitle">实时汇率,主流货币换算</view>
<view class="card">
<view class="placeholder-text">功能开发中</view>
</view>
</view>

View File

@@ -0,0 +1,6 @@
.placeholder-text {
color: #999999;
font-size: 28rpx;
text-align: center;
padding: 48rpx 0;
}

View File

@@ -0,0 +1,7 @@
Page({
data: {},
onLoad() {
console.log('Overview page loaded');
},
});

View File

@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "汇率总览",
"usingComponents": {}
}

View File

@@ -0,0 +1,8 @@
<view class="container">
<view class="page-title">汇率总览</view>
<view class="page-subtitle">一个基准货币对所有主流货币</view>
<view class="card">
<view class="placeholder-text">功能开发中</view>
</view>
</view>

View File

@@ -0,0 +1,6 @@
.placeholder-text {
color: #999999;
font-size: 28rpx;
text-align: center;
padding: 48rpx 0;
}

8
miniprogram/sitemap.json Normal file
View File

@@ -0,0 +1,8 @@
{
"rules": [
{
"action": "allow",
"page": "*"
}
]
}

33
project.config.json Normal file
View File

@@ -0,0 +1,33 @@
{
"miniprogramRoot": "miniprogram/",
"appid": "",
"projectname": "currency-converter",
"description": "汇率换算工具",
"setting": {
"urlCheck": true,
"es6": true,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": true,
"coverView": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}
},
"compileType": "miniprogram",
"condition": {}
}