From cca5a4d918c2c843d5912f04dbac8186b115f53f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=B9=8F?= Date: Thu, 22 Aug 2024 15:03:30 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E5=AE=8C=E6=88=90=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E7=9B=B8=E5=85=B3UI+=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +- api/lock.js | 12 ++ config/env.js | 2 +- pages.json | 16 ++- pages/home/home.vue | 224 +++++++++++++++++++++++++++++++++-- pages/mine/mine.vue | 3 +- pages/userInfo/userInfo.vue | 2 +- static/images/icon_add.png | Bin 0 -> 4447 bytes static/images/icon_lock.png | Bin 0 -> 1801 bytes static/images/icon_power.png | Bin 0 -> 2916 bytes stores/lock.js | 54 +++++++++ stores/user.js | 7 +- 12 files changed, 310 insertions(+), 16 deletions(-) create mode 100644 api/lock.js create mode 100644 static/images/icon_add.png create mode 100644 static/images/icon_lock.png create mode 100755 static/images/icon_power.png create mode 100644 stores/lock.js diff --git a/README.md b/README.md index 4b0a536..129604d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ #### HBuilderX + 微信开发者工具(推荐使用IntelliJ工具编写,HBuilderX代码提示等功能做的较差) ## 技术栈 + 运行方式 -#### Uni-app创建的vue3项目,vue3 + pinia + uview-plus +#### [uni-app](https://uniapp.dcloud.net.cn/)创建的vue3项目,目前并未使用uni-app x和uniCloud,主要使用vue3 + pinia + uview-plus #### 在HBuilderX中点击 文件 -> 导入 -> 从本地目录导入,选择项目目录即可导入项目 #### 运行只需执行`npm i` 安装依赖(node版本 v20.16),然后在HBuilderX中点击运行 -> 运行到微信开发者工具即可(运行前勾选运行时压缩代码) @@ -21,6 +21,6 @@ ## 公共方法 #### 示例在index页面中,后续添加公共方法会在文档中说明 -1. utils/request 请求方法(目前不了解服务端返回规则,仍需完善) +1. utils/request 请求方法 2. pinia 全局状态管理 -3. uview-plus Uni-app常用UI组件库,且提供很多常用api [官方文档](https://uiadmin.net/uview-plus/components/intro.html) +3. [uview-plus](https://uiadmin.net/uview-plus/components/intro.html) Uni-app常用UI组件库,且提供很多常用api diff --git a/api/lock.js b/api/lock.js new file mode 100644 index 0000000..d1f39b7 --- /dev/null +++ b/api/lock.js @@ -0,0 +1,12 @@ +import request from '../utils/request' + +// lock 锁模块 + +// 获取锁列表 +export function getLockListRequest(data) { + return request({ + url: '/lock/list', + method: 'POST', + data + }) +} diff --git a/config/env.js b/config/env.js index d42cdfb..e30867e 100644 --- a/config/env.js +++ b/config/env.js @@ -22,4 +22,4 @@ const PROD = { } // 更换环境的时候 切换导出就行 -export default DEV +export default PRE diff --git a/pages.json b/pages.json index a0cbc20..348bf49 100644 --- a/pages.json +++ b/pages.json @@ -9,10 +9,22 @@ }, "pages": [ { - "path": "pages/home/home" + "path": "pages/home/home", + "style": { + "navigationBarTitleText": "星星锁", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#63b8af", + "navigationStyle": "default" + } }, { - "path": "pages/mine/mine" + "path": "pages/mine/mine", + "style": { + "navigationBarTitleText": "星星锁", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#63b8af", + "navigationStyle": "default" + } }, { "path": "pages/index/index" diff --git a/pages/home/home.vue b/pages/home/home.vue index df0ef85..f6eeefa 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -1,45 +1,136 @@