refactor: 重命名 customer-mobile 为 cashier-customer
统一收银相关项目命名: - cashier-mobile: 收银端(店员使用) - cashier-customer: 顾客端(顾客使用) 更新所有相关配置和引用
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<script setup>
|
||||
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
|
||||
|
||||
onLaunch(() => {
|
||||
console.log('顾客端启动')
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
console.log('顾客端显示')
|
||||
})
|
||||
|
||||
onHide(() => {
|
||||
console.log('顾客端隐藏')
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* 全局样式 */
|
||||
page {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,9 @@
|
||||
import { createSSRApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
return {
|
||||
app
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "收银顾客端",
|
||||
"appid": "__UNI__CUSTOMER001",
|
||||
"description": "睿核科技顾客端移动端",
|
||||
"versionName": "1.0.0",
|
||||
"versionCode": "100",
|
||||
"transformPx": false,
|
||||
"app-plus": {
|
||||
"usingComponents": true,
|
||||
"splashscreen": {
|
||||
"alwaysShowBeforeRender": true,
|
||||
"waiting": true,
|
||||
"autoclose": true,
|
||||
"delay": 0
|
||||
}
|
||||
},
|
||||
"mp-weixin": {
|
||||
"appid": "",
|
||||
"setting": {
|
||||
"urlCheck": false
|
||||
},
|
||||
"usingComponents": true
|
||||
},
|
||||
"h5": {
|
||||
"title": "顾客端",
|
||||
"router": {
|
||||
"mode": "hash"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "cashier-customer",
|
||||
"version": "1.0.0",
|
||||
"description": "顾客端移动端 - uni-app",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
"dev:h5": "uni",
|
||||
"dev:mp-weixin": "uni --platform mp-weixin",
|
||||
"dev:app": "uni --platform app",
|
||||
"build:h5": "uni build",
|
||||
"build:mp-weixin": "uni build --platform mp-weixin",
|
||||
"build:app": "uni build --platform app"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dcloudio/uni-app": "3.0.0",
|
||||
"vue": "^3.3.0",
|
||||
"vuex": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dcloudio/types": "^3.3.0",
|
||||
"@dcloudio/uni-cli-shared": "3.0.0",
|
||||
"@dcloudio/vite-plugin-uni": "3.0.0",
|
||||
"vite": "^4.4.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"pages": [
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "首页"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/order/order",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的订单"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/member/member",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员中心"
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "顾客端",
|
||||
"navigationBarBackgroundColor": "#F8F8F8",
|
||||
"backgroundColor": "#F8F8F8"
|
||||
},
|
||||
"tabBar": {
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/order/order",
|
||||
"text": "订单"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/member/member",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="header">
|
||||
<text class="title">欢迎光临</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="menu-list">
|
||||
<view v-for="item in menuList" :key="item.id" class="menu-item" @click="goToDetail(item)">
|
||||
<image :src="item.image" class="menu-image" mode="aspectFill" />
|
||||
<text class="menu-name">{{ item.name }}</text>
|
||||
<text class="menu-price">¥{{ item.price }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
const menuList = ref([
|
||||
{ id: 1, name: '招牌奶茶', price: '18.00', image: '/static/logo.png' },
|
||||
{ id: 2, name: '美式咖啡', price: '22.00', image: '/static/logo.png' },
|
||||
{ id: 3, name: '芝士蛋糕', price: '28.00', image: '/static/logo.png' }
|
||||
])
|
||||
|
||||
const goToDetail = (item) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/order/order?id=${item.id}`
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.container {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.menu-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
width: calc(50% - 10rpx);
|
||||
background: #fff;
|
||||
border-radius: 12rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.menu-image {
|
||||
width: 100%;
|
||||
height: 200rpx;
|
||||
}
|
||||
|
||||
.menu-name {
|
||||
display: block;
|
||||
padding: 10rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.menu-price {
|
||||
display: block;
|
||||
padding: 0 10rpx 10rpx;
|
||||
color: #ff0000;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="header">
|
||||
<text class="title">会员中心</text>
|
||||
</view>
|
||||
<view class="member-info">
|
||||
<view class="avatar-section">
|
||||
<image src="/static/logo.png" class="avatar" />
|
||||
<text class="nickname">张三</text>
|
||||
<text class="level">黄金会员</text>
|
||||
</view>
|
||||
<view class="stats">
|
||||
<view class="stat-item">
|
||||
<text class="stat-value">100</text>
|
||||
<text class="stat-label">积分</text>
|
||||
</view>
|
||||
<view class="stat-item">
|
||||
<text class="stat-value">5</text>
|
||||
<text class="stat-label">优惠券</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
// 会员中心逻辑
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.container {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.member-info {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.avatar-section {
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 60rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.nickname {
|
||||
display: block;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.level {
|
||||
display: block;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.stats {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.stat-item {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
display: block;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #007AFF;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
display: block;
|
||||
color: #999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user