From b365bfccdbac925b19f04a0a81120ee0b09b1f1c Mon Sep 17 00:00:00 2001
From: "3075067877@qq.com" <3075067877@qq.com>
Date: Mon, 29 Jan 2024 11:33:31 +0800
Subject: [PATCH] change to nvue
---
uniapp_project_code/.hbuilderx/launch.json | 32 +-
uniapp_project_code/readme.md | 13 +
.../src/components/index/button_green_square.vue | 28 ++
.../src/components/index/keyboard/keyboard_box.vue | 270 +++++++++++
.../src/components/index/list_item.nvue | 222 +++++++++
.../src/components/index/page_standby.vue | 114 +++++
.../src/components/index/view_footer.nvue | 324 +++++++++++++
.../src/components/index/view_header.nvue | 62 +++
.../src/components/login/background_nvue.vue | 39 ++
.../src/components/login/button.vue | 6 +-
.../src/components/login/setting_mask.vue | 10 +-
uniapp_project_code/src/main.js | 28 ++
uniapp_project_code/src/manifest.json | 6 +-
uniapp_project_code/src/pages.json | 11 +-
uniapp_project_code/src/pages/index/index.nvue | 149 ++++++
uniapp_project_code/src/pages/index/index.vue | 12 -
uniapp_project_code/src/pages/login/index.vue | 8 +-
uniapp_project_code/src/pages/login/success.vue | 31 +-
uniapp_project_code/src/static/images/saoma.png | Bin 0 -> 438 bytes
uniapp_project_code/src/static/index/add_icon.png | Bin 0 -> 1959 bytes
.../src/static/index/camera_icon.png | Bin 0 -> 1550 bytes
uniapp_project_code/src/static/index/del_icon.png | Bin 0 -> 1064 bytes
.../src/static/index/del_icon_big.png | Bin 0 -> 958 bytes
.../src/static/index/delete_icon.png | Bin 0 -> 357 bytes
.../src/static/index/orange_arrow_right.png | Bin 0 -> 380 bytes
uniapp_project_code/src/static/index/qr_icon.png | Bin 0 -> 243 bytes
uniapp_project_code/src/static/index/vip_icon.png | Bin 0 -> 885 bytes
uniapp_project_code/src/static/index_person.png | Bin 0 -> 228363 bytes
uniapp_project_code/src/static/index_tips.png | Bin 0 -> 33472 bytes
uniapp_project_code/src/uni.scss | 8 +
uniapp_project_code/src/utils/util.js | 514 +++++++++++++++++++++
31 files changed, 1843 insertions(+), 44 deletions(-)
create mode 100644 uniapp_project_code/readme.md
create mode 100644 uniapp_project_code/src/components/index/button_green_square.vue
create mode 100644 uniapp_project_code/src/components/index/keyboard/keyboard_box.vue
create mode 100644 uniapp_project_code/src/components/index/list_item.nvue
create mode 100644 uniapp_project_code/src/components/index/page_standby.vue
create mode 100644 uniapp_project_code/src/components/index/view_footer.nvue
create mode 100644 uniapp_project_code/src/components/index/view_header.nvue
create mode 100644 uniapp_project_code/src/components/login/background_nvue.vue
create mode 100644 uniapp_project_code/src/pages/index/index.nvue
delete mode 100644 uniapp_project_code/src/pages/index/index.vue
create mode 100644 uniapp_project_code/src/static/images/saoma.png
create mode 100644 uniapp_project_code/src/static/index/add_icon.png
create mode 100644 uniapp_project_code/src/static/index/camera_icon.png
create mode 100644 uniapp_project_code/src/static/index/del_icon.png
create mode 100644 uniapp_project_code/src/static/index/del_icon_big.png
create mode 100644 uniapp_project_code/src/static/index/delete_icon.png
create mode 100644 uniapp_project_code/src/static/index/orange_arrow_right.png
create mode 100644 uniapp_project_code/src/static/index/qr_icon.png
create mode 100644 uniapp_project_code/src/static/index/vip_icon.png
create mode 100644 uniapp_project_code/src/static/index_person.png
create mode 100644 uniapp_project_code/src/static/index_tips.png
create mode 100644 uniapp_project_code/src/utils/util.js
diff --git a/uniapp_project_code/.hbuilderx/launch.json b/uniapp_project_code/.hbuilderx/launch.json
index 582561b..9b0d791 100644
--- a/uniapp_project_code/.hbuilderx/launch.json
+++ b/uniapp_project_code/.hbuilderx/launch.json
@@ -1,16 +1,20 @@
-{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
- // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
- "version": "0.0",
- "configurations": [{
- "app-plus" :
- {
- "launchtype" : "local"
- },
- "default" :
- {
- "launchtype" : "local"
- },
- "type" : "uniCloud"
- }
+{
+ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+ // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+ "version" : "0.0",
+ "configurations" : [
+ {
+ "app-plus" : {
+ "launchtype" : "local"
+ },
+ "default" : {
+ "launchtype" : "local"
+ },
+ "type" : "uniCloud"
+ },
+ {
+ "playground" : "standard",
+ "type" : "uni-app:app-android"
+ }
]
}
diff --git a/uniapp_project_code/readme.md b/uniapp_project_code/readme.md
new file mode 100644
index 0000000..56af1d6
--- /dev/null
+++ b/uniapp_project_code/readme.md
@@ -0,0 +1,13 @@
+### 项目说明
+
+### nvue页面注意事项
+
+1. Android 端在一个页面内使用大量圆角边框会造成性能问题,尤其是多个角的样式还不一样的话更耗费性能。应避免这类使用。
+2. nvue 页面的布局排列方向默认为竖排(column)
+3. nvue 页面只能使用flex布局
+4. nvue 页面控制显隐只可以使用v-if不可以使用v-show
+5. 在 App.vue 中定义的全局 js 变量不会在 nvue 页面生效。globalData和vuex是生效的。
+6. 不能在 style 中引入字体文件
+7. 不支持在 nvue 页面使用 typescript/ts。
+
+参考: https://uniapp.dcloud.net.cn/tutorial/page.html#nvue-%E5%BC%80%E5%8F%91%E4%B8%8E-vue-%E5%BC%80%E5%8F%91%E7%9A%84%E5%B8%B8%E8%A7%81%E5%8C%BA%E5%88%AB
\ No newline at end of file
diff --git a/uniapp_project_code/src/components/index/button_green_square.vue b/uniapp_project_code/src/components/index/button_green_square.vue
new file mode 100644
index 0000000..2b264ab
--- /dev/null
+++ b/uniapp_project_code/src/components/index/button_green_square.vue
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uniapp_project_code/src/components/index/keyboard/keyboard_box.vue b/uniapp_project_code/src/components/index/keyboard/keyboard_box.vue
new file mode 100644
index 0000000..ccbade9
--- /dev/null
+++ b/uniapp_project_code/src/components/index/keyboard/keyboard_box.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+ 输入条形码
+
+ {{inputValue||"请输入条形码"}}
+
+
+
+
+
+ {{getNumClick(i)}}
+
+
+
+
+ 确定
+
+
+
+
+
+
+
+
+
+
diff --git a/uniapp_project_code/src/components/index/list_item.nvue b/uniapp_project_code/src/components/index/list_item.nvue
new file mode 100644
index 0000000..c724945
--- /dev/null
+++ b/uniapp_project_code/src/components/index/list_item.nvue
@@ -0,0 +1,222 @@
+
+
+
+
+
+
+
+
+ 维他命柠檬茶锡兰风味250ml
+
+
+
+
+ 330ml
+
+ ¥4.90
+ ¥9.90
+
+
+
+
+ 1
+
+
+
+
+ 下单得积分
+ 50
+
+ ¥
+ 4.90
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uniapp_project_code/src/components/index/page_standby.vue b/uniapp_project_code/src/components/index/page_standby.vue
new file mode 100644
index 0000000..80be747
--- /dev/null
+++ b/uniapp_project_code/src/components/index/page_standby.vue
@@ -0,0 +1,114 @@
+
+
+
+ 欧轩智能场馆丛云店
+
+
+ 欢迎使用自助收银
+
+
+
+
+
+
+
+ 请扫描商品条形码
+
+
+
+
+ 欧轩智能场馆提供技术支持
+
+
+
+
+
+
+
diff --git a/uniapp_project_code/src/components/index/view_footer.nvue b/uniapp_project_code/src/components/index/view_footer.nvue
new file mode 100644
index 0000000..a4fe3d7
--- /dev/null
+++ b/uniapp_project_code/src/components/index/view_footer.nvue
@@ -0,0 +1,324 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uniapp_project_code/src/components/index/view_header.nvue b/uniapp_project_code/src/components/index/view_header.nvue
new file mode 100644
index 0000000..f0d2013
--- /dev/null
+++ b/uniapp_project_code/src/components/index/view_header.nvue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uniapp_project_code/src/components/login/background_nvue.vue b/uniapp_project_code/src/components/login/background_nvue.vue
new file mode 100644
index 0000000..39219fd
--- /dev/null
+++ b/uniapp_project_code/src/components/login/background_nvue.vue
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uniapp_project_code/src/components/login/button.vue b/uniapp_project_code/src/components/login/button.vue
index 7f48e8f..539f9b5 100644
--- a/uniapp_project_code/src/components/login/button.vue
+++ b/uniapp_project_code/src/components/login/button.vue
@@ -1,6 +1,8 @@
-
+
@@ -20,6 +22,6 @@
border-radius: 35upx;
background-image: linear-gradient(180deg, #FCDA9E 12%, #F7B23E 100%);
@include flcw(26.39upx, 69.38upx, #fff, 500);
-
+
}
\ No newline at end of file
diff --git a/uniapp_project_code/src/components/login/setting_mask.vue b/uniapp_project_code/src/components/login/setting_mask.vue
index 60259c9..3a5fe3b 100644
--- a/uniapp_project_code/src/components/login/setting_mask.vue
+++ b/uniapp_project_code/src/components/login/setting_mask.vue
@@ -1,7 +1,7 @@
-
+
平板信息配置
@@ -16,7 +16,13 @@
-
diff --git a/uniapp_project_code/src/main.js b/uniapp_project_code/src/main.js
index 0f3a925..6624936 100644
--- a/uniapp_project_code/src/main.js
+++ b/uniapp_project_code/src/main.js
@@ -8,3 +8,31 @@ export function createApp() {
app,
};
}
+
+// Vue 2 转 Vue 3, 在 main.js 中写入以下代码即可
+// function isPromise(obj) {
+// return (
+// !!obj &&
+// (typeof obj === "object" || typeof obj === "function") &&
+// typeof obj.then === "function"
+// );
+// }
+
+// uni.addInterceptor({
+// returnValue(res) {
+// if (!isPromise(res)) {
+// return res;
+// }
+// return new Promise((resolve, reject) => {
+// res.then((res) => {
+// if (res[0]) {
+// reject(res[0]);
+// } else {
+// resolve(res[1]);
+// }
+// });
+// });
+// },
+// });
+
+
diff --git a/uniapp_project_code/src/manifest.json b/uniapp_project_code/src/manifest.json
index 309b9ec..b5461b0 100644
--- a/uniapp_project_code/src/manifest.json
+++ b/uniapp_project_code/src/manifest.json
@@ -1,5 +1,5 @@
{
- "name" : "",
+ "name" : "欧轩收银端",
"appid" : "",
"description" : "",
"versionName" : "1.0.0",
@@ -65,8 +65,8 @@
"mp-toutiao" : {
"usingComponents" : true
},
- "uniStatistics": {
- "enable": false
+ "uniStatistics" : {
+ "enable" : false
},
"vueVersion" : "3"
}
diff --git a/uniapp_project_code/src/pages.json b/uniapp_project_code/src/pages.json
index e6b3f76..f7b5318 100644
--- a/uniapp_project_code/src/pages.json
+++ b/uniapp_project_code/src/pages.json
@@ -1,27 +1,28 @@
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
- "path": "pages/login/index",
+ "path": "pages/index/index",
"style": {
"navigationStyle": "custom"
}
},
{
- "path": "pages/login/success",
+ "path": "pages/login/index",
"style": {
"navigationStyle": "custom"
}
},
{
- "path": "pages/index/index",
+ "path": "pages/login/success",
"style": {
- "navigationBarTitleText": "uni-app"
+ "navigationStyle": "custom"
}
}
+
],
"globalStyle": {
"navigationBarTextStyle": "black",
- "navigationBarTitleText": "uni-app",
+ "navigationBarTitleText": "欧轩收银端",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
}
diff --git a/uniapp_project_code/src/pages/index/index.nvue b/uniapp_project_code/src/pages/index/index.nvue
new file mode 100644
index 0000000..d36419d
--- /dev/null
+++ b/uniapp_project_code/src/pages/index/index.nvue
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+ i
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uniapp_project_code/src/pages/index/index.vue b/uniapp_project_code/src/pages/index/index.vue
deleted file mode 100644
index f60ddc3..0000000
--- a/uniapp_project_code/src/pages/index/index.vue
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- 999
-
-
-
-
-
-
diff --git a/uniapp_project_code/src/pages/login/index.vue b/uniapp_project_code/src/pages/login/index.vue
index 92ffe7c..189dd72 100644
--- a/uniapp_project_code/src/pages/login/index.vue
+++ b/uniapp_project_code/src/pages/login/index.vue
@@ -11,7 +11,7 @@
*登录账号密码请从pc端后台管理【设备运营管理平板管理】里获取
-
+ 登录
@@ -23,6 +23,12 @@
import logoVue from '@/components/login/logo.vue';
import loginForm from '@/components/login/form.vue';
import loginButton from '@/components/login/button.vue';
+
+ import util from "@/utils/util.js"
+
+ function clickLogin(){
+ util.routeTo(`/pages/login/success`, 'nT');
+ }