feat: 初始化魔兽世界金币价格查询小程序项目

添加基础项目结构,包括页面、组件和配置文件
实现金币价格展示和价格走势图功能
添加筛选功能支持按区服和阵营筛选
This commit is contained in:
2025-12-17 18:50:55 +08:00
parent e00649ddc9
commit 5f8f6287f8
24 changed files with 39459 additions and 1 deletions
+27
View File
@@ -0,0 +1,27 @@
<template>
<div>
<router-view />
</div>
</template>
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/* 全局样式 */
page {
background-color: #f5f5f5;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
</style>
+11
View File
@@ -0,0 +1,11 @@
import Vue from 'vue'
import App from './App'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
+63
View File
@@ -0,0 +1,63 @@
{
"name": "魔兽世界金币价格查询",
"appid": "",
"description": "魔兽世界各区金币价格查询小程序",
"versionName": "1.0.0",
"versionCode": 1,
"transformPx": true,
"mp-weixin": {
"appid": "",
"setting": {
"urlCheck": false,
"es6": true,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": false,
"coverView": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": true,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"minifyWXML": true,
"showES6CompileOption": false,
"useIsolateContext": true,
"useCompilerV2": true,
"userConfirmedUseCompilerV2": true
},
"usingComponents": true,
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于获取附近的金币价格"
}
}
},
"quickapp": {},
"h5": {
"devServer": {
"port": 8080,
"disableHostCheck": true
},
"title": "魔兽世界金币价格查询",
"domain": ""
}
}
+34
View File
@@ -0,0 +1,34 @@
{
"pages": [
{
"path": "pages/gold-price/index",
"style": {
"navigationBarTitleText": "魔兽世界金币价格查询",
"navigationBarBackgroundColor": "#1989fa",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": true
}
}
],
"globalStyle": {
"navigationBarBackgroundColor": "#1989fa",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "魔兽世界金币价格查询",
"backgroundColor": "#F8F8F8"
},
"uniIdRouter": {},
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#3cc51f",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [
{
"pagePath": "pages/gold-price/index",
"iconPath": "static/icon_home.png",
"selectedIconPath": "static/icon_home_selected.png",
"text": "金币价格"
}
]
}
}
+215
View File
@@ -0,0 +1,215 @@
<template>
<view class="container">
<view class="header">
<text class="title">魔兽世界金币价格查询</text>
</view>
<view class="content">
<!-- 铁血1区 -->
<view class="server-section">
<view class="server-title">
<text>铁血1区</text>
</view>
<view class="faction-section">
<view class="faction-title">
<text>联盟</text>
</view>
<view class="price-table">
<view class="table-header">
<view class="table-cell">排名</view>
<view class="table-cell">价格</view>
<view class="table-cell">数量</view>
</view>
<view class="table-row" v-for="(price, index) in alliancePrices1" :key="index">
<view class="table-cell">{{ index + 1 }}</view>
<view class="table-cell">{{ price.price }}</view>
<view class="table-cell">{{ price.amount }}</view>
</view>
</view>
</view>
<view class="faction-section">
<view class="faction-title">
<text>部落</text>
</view>
<view class="price-table">
<view class="table-header">
<view class="table-cell">排名</view>
<view class="table-cell">价格</view>
<view class="table-cell">数量</view>
</view>
<view class="table-row" v-for="(price, index) in hordePrices1" :key="index">
<view class="table-cell">{{ index + 1 }}</view>
<view class="table-cell">{{ price.price }}</view>
<view class="table-cell">{{ price.amount }}</view>
</view>
</view>
</view>
</view>
<!-- 铁血2区 -->
<view class="server-section">
<view class="server-title">
<text>铁血2区</text>
</view>
<view class="faction-section">
<view class="faction-title">
<text>联盟</text>
</view>
<view class="price-table">
<view class="table-header">
<view class="table-cell">排名</view>
<view class="table-cell">价格</view>
<view class="table-cell">数量</view>
</view>
<view class="table-row" v-for="(price, index) in alliancePrices2" :key="index">
<view class="table-cell">{{ index + 1 }}</view>
<view class="table-cell">{{ price.price }}</view>
<view class="table-cell">{{ price.amount }}</view>
</view>
</view>
</view>
<view class="faction-section">
<view class="faction-title">
<text>部落</text>
</view>
<view class="price-table">
<view class="table-header">
<view class="table-cell">排名</view>
<view class="table-cell">价格</view>
<view class="table-cell">数量</view>
</view>
<view class="table-row" v-for="(price, index) in hordePrices2" :key="index">
<view class="table-cell">{{ index + 1 }}</view>
<view class="table-cell">{{ price.price }}</view>
<view class="table-cell">{{ price.amount }}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
// 模拟数据,后期从后端获取
alliancePrices1: [
{ price: '0.012元/金', amount: '100,000' },
{ price: '0.013元/金', amount: '50,000' },
{ price: '0.014元/金', amount: '20,000' }
],
hordePrices1: [
{ price: '0.011元/金', amount: '150,000' },
{ price: '0.012元/金', amount: '80,000' },
{ price: '0.013元/金', amount: '30,000' }
],
alliancePrices2: [
{ price: '0.015元/金', amount: '70,000' },
{ price: '0.016元/金', amount: '40,000' },
{ price: '0.017元/金', amount: '15,000' }
],
hordePrices2: [
{ price: '0.014元/金', amount: '90,000' },
{ price: '0.015元/金', amount: '50,000' },
{ price: '0.016元/金', amount: '25,000' }
]
}
},
onLoad() {
// 页面加载时从后端获取数据
this.loadPriceData()
},
methods: {
loadPriceData() {
// 后期从后端获取数据的方法
console.log('加载价格数据...')
// 这里可以添加axios请求或者uni.request请求
}
}
}
</script>
<style scoped>
.container {
min-height: 100vh;
background-color: #f5f5f5;
}
.header {
background-color: #1989fa;
color: white;
padding: 20rpx;
text-align: center;
}
.title {
font-size: 36rpx;
font-weight: bold;
}
.content {
padding: 20rpx;
}
.server-section {
background-color: white;
border-radius: 10rpx;
padding: 20rpx;
margin-bottom: 20rpx;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
}
.server-title {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 20rpx;
color: #333;
border-bottom: 2rpx solid #eee;
padding-bottom: 10rpx;
}
.faction-section {
margin-bottom: 20rpx;
}
.faction-title {
font-size: 28rpx;
font-weight: bold;
margin-bottom: 10rpx;
color: #666;
}
.price-table {
border-radius: 5rpx;
overflow: hidden;
}
.table-header {
display: flex;
background-color: #f0f0f0;
font-weight: bold;
border-bottom: 2rpx solid #eee;
}
.table-row {
display: flex;
border-bottom: 1rpx solid #f0f0f0;
}
.table-cell {
flex: 1;
padding: 15rpx;
text-align: center;
font-size: 24rpx;
}
.table-row:last-child {
border-bottom: none;
}
</style>