feat: 初始化 uni-app 移动端项目

- cashier-mobile: 收银系统移动端(uni-app)
- customer-mobile: 顾客端移动端(uni-app)
- 包含基础页面结构:首页、订单、会员
- 更新 AGENTS.md 配置
This commit is contained in:
2026-06-04 08:31:05 +08:00
parent a8d6fafb71
commit a7e056643e
17 changed files with 620 additions and 25 deletions
+74
View File
@@ -0,0 +1,74 @@
<template>
<view class="container">
<view class="header">
<text class="title">收银台</text>
</view>
<view class="content">
<view class="input-area">
<input
v-model="amount"
type="digit"
placeholder="请输入金额"
class="amount-input"
/>
</view>
<button @click="createOrder" class="submit-btn">创建订单</button>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue'
const amount = ref('')
const createOrder = () => {
if (!amount.value) {
uni.showToast({ title: '请输入金额', icon: 'none' })
return
}
// TODO: 调用创建订单 API
uni.showLoading({ title: '创建中...' })
setTimeout(() => {
uni.hideLoading()
uni.showToast({ title: '创建成功', icon: 'success' })
amount.value = ''
}, 1000)
}
</script>
<style scoped>
.container {
padding: 20rpx;
}
.header {
text-align: center;
margin-bottom: 40rpx;
}
.title {
font-size: 36rpx;
font-weight: bold;
}
.input-area {
margin-bottom: 40rpx;
}
.amount-input {
height: 80rpx;
border: 2rpx solid #ddd;
border-radius: 8rpx;
padding: 0 20rpx;
font-size: 32rpx;
}
.submit-btn {
background-color: #007AFF;
color: white;
border-radius: 8rpx;
}
</style>
+39
View File
@@ -0,0 +1,39 @@
<template>
<view class="container">
<view class="header">
<text class="title">会员管理</text>
</view>
<view class="member-list">
<view v-for="member in members" :key="member.id" class="member-item">
<text class="member-name">{{ member.name }}</text>
<text class="member-phone">{{ member.phone }}</text>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue'
const members = ref([
{ id: 1, name: '张三', phone: '138****8888' },
{ id: 2, name: '李四', phone: '139****9999' }
])
</script>
<style scoped>
.container {
padding: 20rpx;
}
.member-list {
margin-top: 20rpx;
}
.member-item {
display: flex;
justify-content: space-between;
padding: 20rpx;
border-bottom: 1rpx solid #eee;
}
</style>
+45
View File
@@ -0,0 +1,45 @@
<template>
<view class="container">
<view class="header">
<text class="title">订单列表</text>
</view>
<view class="order-list">
<view v-for="order in orders" :key="order.id" class="order-item">
<text class="order-no">{{ order.orderNo }}</text>
<text class="order-amount">¥{{ order.amount }}</text>
<text class="order-status">{{ order.status }}</text>
</view>
</view>
</view>
</template>
<script setup>
import { ref } from 'vue'
const orders = ref([
{ id: 1, orderNo: 'O202401010001', amount: '199.99', status: '已完成' },
{ id: 2, orderNo: 'O202401010002', amount: '99.99', status: '待支付' }
])
</script>
<style scoped>
.container {
padding: 20rpx;
}
.order-list {
margin-top: 20rpx;
}
.order-item {
display: flex;
justify-content: space-between;
padding: 20rpx;
border-bottom: 1rpx solid #eee;
}
.order-amount {
color: #ff0000;
font-weight: bold;
}
</style>