init: 汇率换算工具小程序骨架
- 两个页面:首页(双向换算)+ 汇率总览(一对多) - 基础项目结构和配置 - AppID 待填入 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
node_modules/
|
||||||
|
miniprogram_npm/
|
||||||
|
.DS_Store
|
||||||
14
README.md
Normal file
14
README.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# 汇率换算工具 (currency-converter)
|
||||||
|
|
||||||
|
微信小程序,个人主体,实时汇率换算工具。
|
||||||
|
|
||||||
|
## 功能
|
||||||
|
|
||||||
|
- 双向汇率换算(经典模式)
|
||||||
|
- 汇率总览(一对多)
|
||||||
|
- 主流 20-30 种货币
|
||||||
|
- 数据来源:open.er-api.com(免费 API)
|
||||||
|
|
||||||
|
## 开发
|
||||||
|
|
||||||
|
用微信开发者工具打开项目根目录,在 `project.config.json` 中填入 AppID。
|
||||||
7
miniprogram/app.js
Normal file
7
miniprogram/app.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
App({
|
||||||
|
globalData: {},
|
||||||
|
|
||||||
|
onLaunch() {
|
||||||
|
console.log('App launched');
|
||||||
|
},
|
||||||
|
});
|
||||||
17
miniprogram/app.json
Normal file
17
miniprogram/app.json
Normal 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
31
miniprogram/app.wxss
Normal 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;
|
||||||
|
}
|
||||||
7
miniprogram/pages/index/index.js
Normal file
7
miniprogram/pages/index/index.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Page({
|
||||||
|
data: {},
|
||||||
|
|
||||||
|
onLoad() {
|
||||||
|
console.log('Index page loaded');
|
||||||
|
},
|
||||||
|
});
|
||||||
3
miniprogram/pages/index/index.json
Normal file
3
miniprogram/pages/index/index.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
8
miniprogram/pages/index/index.wxml
Normal file
8
miniprogram/pages/index/index.wxml
Normal 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>
|
||||||
6
miniprogram/pages/index/index.wxss
Normal file
6
miniprogram/pages/index/index.wxss
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
.placeholder-text {
|
||||||
|
color: #999999;
|
||||||
|
font-size: 28rpx;
|
||||||
|
text-align: center;
|
||||||
|
padding: 48rpx 0;
|
||||||
|
}
|
||||||
7
miniprogram/pages/overview/overview.js
Normal file
7
miniprogram/pages/overview/overview.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Page({
|
||||||
|
data: {},
|
||||||
|
|
||||||
|
onLoad() {
|
||||||
|
console.log('Overview page loaded');
|
||||||
|
},
|
||||||
|
});
|
||||||
4
miniprogram/pages/overview/overview.json
Normal file
4
miniprogram/pages/overview/overview.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"navigationBarTitleText": "汇率总览",
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
||||||
8
miniprogram/pages/overview/overview.wxml
Normal file
8
miniprogram/pages/overview/overview.wxml
Normal 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>
|
||||||
6
miniprogram/pages/overview/overview.wxss
Normal file
6
miniprogram/pages/overview/overview.wxss
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
.placeholder-text {
|
||||||
|
color: #999999;
|
||||||
|
font-size: 28rpx;
|
||||||
|
text-align: center;
|
||||||
|
padding: 48rpx 0;
|
||||||
|
}
|
||||||
8
miniprogram/sitemap.json
Normal file
8
miniprogram/sitemap.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"action": "allow",
|
||||||
|
"page": "*"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
33
project.config.json
Normal file
33
project.config.json
Normal 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": {}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user