diff --git a/.env b/.env index cae7d7d..31ec578 100644 --- a/.env +++ b/.env @@ -14,4 +14,4 @@ DB_PASSWORD=lingxi_crm_pass DB_ROOT_PASSWORD=lingxi_crm_root_pass # Backend config -API_BASE_URL=http://localhost:${SERVER_PORT}/api +API_BASE_URL=http://localhost:11001/api diff --git a/README.md b/README.md index c47b9a8..c906565 100644 --- a/README.md +++ b/README.md @@ -56,8 +56,8 @@ docker compose up -d --build - **后端接口**:[http://localhost:11001/api](http://localhost:11001/api) > **默认体验账号:** -> 邮箱:`1655064994@qq.com` -> 密码:`1655064994` +> 邮箱:`xinmi@local.com` +> 密码:`12345678` ## 💻 本地开发环境 @@ -83,6 +83,28 @@ npm install npm run dev ``` + + +### 截图 + +![image-20260609182703805](images/image-20260609182703805.png) + +![image-20260609185946181](images/image-20260609185946181.png) + +![image-20260609185955487](images/image-20260609185955487.png) + +![image-20260609190003855](images/image-20260609190003855.png) + +![image-20260609190010073](images/image-20260609190010073.png) + +![image-20260609190018913](images/image-20260609190018913.png) + +![image-20260609190026708](images/image-20260609190026708.png) + +![image-20260609190034478](images/image-20260609190034478.png) + +![image-20260609190041452](images/image-20260609190041452.png) + ## 📄 许可证 [MIT License](LICENSE) diff --git a/docs/docs/project/devops/deploy-cloudserver.md b/docs/docs/project/devops/deploy-cloudserver.md index 90435f5..5cfaa32 100644 --- a/docs/docs/project/devops/deploy-cloudserver.md +++ b/docs/docs/project/devops/deploy-cloudserver.md @@ -484,7 +484,7 @@ file: mail: smtp: smtp.qq.com secret: dhsepilzlvoaceij // 改成自己的QQ邮箱SMTP服务的授权码 - sender: 1655064994@qq.com // 改成自己的QQ邮箱 + sender: xinmi@local.com // 改成自己的QQ邮箱 ``` **如何开启邮箱的 SMTP 服务并获取授权码?** diff --git a/docs/docs/project/docs/deploy-guide.md b/docs/docs/project/docs/deploy-guide.md index bc535e7..b8f1247 100644 --- a/docs/docs/project/docs/deploy-guide.md +++ b/docs/docs/project/docs/deploy-guide.md @@ -51,7 +51,7 @@ file: mail: smtp: smtp.qq.com secret: dhsepilzlvoaceij // 改成自己的QQ邮箱SMTP服务的授权码 - sender: 1655064994@qq.com // 改成自己的QQ邮箱 + sender: xinmi@local.com // 改成自己的QQ邮箱 ``` **如何开启邮箱的 SMTP 服务并获取授权码?** diff --git a/images/image-20260609171158803.png b/images/image-20260609171158803.png new file mode 100644 index 0000000..957ec5f Binary files /dev/null and b/images/image-20260609171158803.png differ diff --git a/images/image-20260609171236000.png b/images/image-20260609171236000.png new file mode 100644 index 0000000..5a1fc08 Binary files /dev/null and b/images/image-20260609171236000.png differ diff --git a/images/image-20260609182703805.png b/images/image-20260609182703805.png new file mode 100644 index 0000000..ebdfdcd Binary files /dev/null and b/images/image-20260609182703805.png differ diff --git a/images/image-20260609185946181.png b/images/image-20260609185946181.png new file mode 100644 index 0000000..11a7143 Binary files /dev/null and b/images/image-20260609185946181.png differ diff --git a/images/image-20260609185955487.png b/images/image-20260609185955487.png new file mode 100644 index 0000000..70930b8 Binary files /dev/null and b/images/image-20260609185955487.png differ diff --git a/images/image-20260609190003855.png b/images/image-20260609190003855.png new file mode 100644 index 0000000..07c1ecd Binary files /dev/null and b/images/image-20260609190003855.png differ diff --git a/images/image-20260609190010073.png b/images/image-20260609190010073.png new file mode 100644 index 0000000..a88564a Binary files /dev/null and b/images/image-20260609190010073.png differ diff --git a/images/image-20260609190018913.png b/images/image-20260609190018913.png new file mode 100644 index 0000000..39f7d37 Binary files /dev/null and b/images/image-20260609190018913.png differ diff --git a/images/image-20260609190026708.png b/images/image-20260609190026708.png new file mode 100644 index 0000000..45ddc4c Binary files /dev/null and b/images/image-20260609190026708.png differ diff --git a/images/image-20260609190034478.png b/images/image-20260609190034478.png new file mode 100644 index 0000000..30de833 Binary files /dev/null and b/images/image-20260609190034478.png differ diff --git a/images/image-20260609190041452.png b/images/image-20260609190041452.png new file mode 100644 index 0000000..5b09593 Binary files /dev/null and b/images/image-20260609190041452.png differ diff --git a/server/config.docker.yaml b/server/config.docker.yaml index b51a73f..97c6bad 100644 --- a/server/config.docker.yaml +++ b/server/config.docker.yaml @@ -35,7 +35,7 @@ file: mail: smtp: smtp.qq.com secret: dhsepilzlvoaceij - sender: 1655064994@qq.com + sender: xinmi@local.com # 支付宝支付服务配置 alipay: diff --git a/server/config.yaml b/server/config.yaml index 288b957..589fd65 100644 --- a/server/config.yaml +++ b/server/config.yaml @@ -35,7 +35,7 @@ file: mail: smtp: smtp.qq.com secret: dhsepilzlvoaceij - sender: 1655064994@qq.com + sender: xinmi@local.com # 支付宝支付服务配置 alipay: diff --git a/server/db/crm.sql b/server/db/crm.sql index 932862f..a093e31 100644 --- a/server/db/crm.sql +++ b/server/db/crm.sql @@ -46,27 +46,9 @@ INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `rema INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20002, '电动车交易2', 89880.00, '2023-01-28', '2023-01-30', '无备注', 2, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0); INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20003, '电动车交易3', 89880.00, '2023-01-28', '2023-01-30', '无备注', 3, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0); INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20004, '电动车交易4', 89880.00, '2023-01-28', '2023-01-30', '无备注', 4, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 1674901109); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20005, '电动车交易5', 89880.00, '2023-01-28', '2023-01-30', '无备注', 5, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20006, '电动车交易6', 89880.00, '2023-01-28', '2023-01-30', '无备注', 6, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20007, '电动车交易7', 89880.00, '2023-01-28', '2023-01-30', '无备注', 7, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20008, '电动车交易8', 89880.00, '2023-01-28', '2023-01-30', '无备注', 8, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20009, '电动车交易9', 89880.00, '2023-01-28', '2023-01-30', '无备注', 9, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 1674901130); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20010, '电动车交易10', 89880.00, '2023-01-28', '2023-01-30', '无备注', 10, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20011, '电动车交易11', 89880.00, '2023-01-28', '2023-01-30', '无备注', 11, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20012, '电动车交易12', 89880.00, '2023-01-28', '2023-01-30', '无备注', 12, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20013, '电动车交易13', 89880.00, '2023-01-28', '2023-01-30', '无备注', 13, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20014, '电动车交易14', 89880.00, '2023-01-28', '2023-01-30', '无备注', 14, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20015, '电动车交易15', 89880.00, '2023-01-28', '2023-01-30', '无备注', 15, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20016, '电动车交易16', 89880.00, '2023-01-28', '2023-01-30', '无备注', 16, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20017, '电动车交易17', 89880.00, '2023-01-28', '2023-01-30', '无备注', 17, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20018, '电动车交易18', 89880.00, '2023-01-28', '2023-01-30', '无备注', 18, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20019, '电动车交易19', 89880.00, '2023-01-28', '2023-01-30', '无备注', 19, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20020, '电动车交易20', 89880.00, '2023-01-28', '2023-01-30', '无备注', 20, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20021, '电动车交易21', 89880.00, '2023-01-28', '2023-01-30', '无备注', 21, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20022, '电动车交易22', 89880.00, '2023-01-28', '2023-01-30', '无备注', 22, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20023, '电动车交易23', 89880.00, '2023-01-28', '2023-01-30', '无备注', 23, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 2, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20024, '电动车交易24', 89880.00, '2023-01-28', '2023-01-30', '无备注', 24, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0); -INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20025, '电动车交易25', 89880.00, '2023-01-28', '2023-01-30', '无备注', 25, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 10, \"price\": 1498, \"total\": 14980}, {\"id\": 2, \"name\": \"电动车2\", \"type\": 1, \"unit\": \"台\", \"count\": 20, \"price\": 1498, \"total\": 29960}, {\"id\": 3, \"name\": \"电动车3\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1498, \"total\": 44940}]', 1, 29, 1674900672, 0); +INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20005, '智能家居采购', 150000.00, '2026-06-01', '2026-12-31', '长期合作伙伴', 1, '[{\"id\": 7, \"name\": \"智能锁A1\", \"type\": 1, \"unit\": \"把\", \"count\": 100, \"price\": 800, \"total\": 80000}, {\"id\": 8, \"name\": \"智能网关\", \"type\": 1, \"unit\": \"台\", \"count\": 100, \"price\": 700, \"total\": 70000}]', 1, 29, 1717924318, 0); +INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20006, '云服务年度订阅', 50000.00, '2026-01-01', '2026-12-31', 'SaaS服务', 2, '[{\"id\": 9, \"name\": \"云空间1TB\", \"type\": 2, \"unit\": \"年\", \"count\": 10, \"price\": 5000, \"total\": 50000}]', 1, 29, 1717924318, 0); +INSERT INTO `contract` (`id`, `name`, `amount`, `begin_time`, `over_time`, `remarks`, `cid`, `productlist`, `status`, `creator`, `created`, `updated`) VALUES (20007, '办公设备更新', 45000.00, '2026-06-10', '2026-06-20', '批量采购', 3, '[{\"id\": 1, \"name\": \"电动车1\", \"type\": 1, \"unit\": \"台\", \"count\": 30, \"price\": 1500, \"total\": 45000}]', 2, 29, 1717924318, 0); COMMIT; -- ---------------------------- @@ -90,37 +72,17 @@ CREATE TABLE `customer` ( `updated` bigint DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`), KEY `idx_creator` (`creator`) -) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8mb3; +) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8mb3; -- ---------------------------- -- Records of customer -- ---------------------------- BEGIN; INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (1, '北京文化有限公司1', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 0); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (2, '北京文化有限公司2', '线上注册', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 1674899808); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (3, '北京文化有限公司3', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 0); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (4, '北京文化有限公司4', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '互联网', '普通客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 1674900143); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (5, '北京文化有限公司5', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 0); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (6, '北京文化有限公司6', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 2, 29, 1674899545, 0); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (7, '北京文化有限公司7', '搜索引擎', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 2, 29, 1674899545, 1674900036); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (8, '北京文化有限公司8', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '互联网', '非优先客户', '', '北京市,朝阳区', '望京东园615号', 2, 29, 1674899545, 1674899824); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (9, '北京文化有限公司9', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 0); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (10, '北京文化有限公司10', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '文化传媒', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 1674899838); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (11, '北京文化有限公司11', '促销', '13050803360', 'bjwenhua@gmail.com', '互联网', '非优先客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 1674900100); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (12, '北京文化有限公司12', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 2, 29, 1674899545, 0); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (13, '北京文化有限公司13', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 0); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (14, '北京文化有限公司14', '邮件咨询', '13050803360', 'bjwenhua@gmail.com', '文化传媒', '非优先客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 1674899962); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (15, '北京文化有限公司15', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 2, 29, 1674899545, 0); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (16, '北京文化有限公司16', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 0); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (17, '北京文化有限公司17', '转介绍', '13050803360', 'bjwenhua@gmail.com', '文化传媒', '非优先客户', '', '北京市,朝阳区', '望京东园615号', 2, 29, 1674899545, 1674900109); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (18, '北京文化有限公司18', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 2, 29, 1674899545, 0); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (19, '北京文化有限公司19', '线上注册', '13050803360', 'bjwenhua@gmail.com', '政府', '普通客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 1674900124); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (20, '北京文化有限公司20', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 2, 29, 1674899545, 0); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (21, '北京文化有限公司21', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '物流运输', '普通客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 1674899902); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (22, '北京文化有限公司22', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 0); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (23, '北京文化有限公司23', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 2, 29, 1674899545, 0); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (24, '北京文化有限公司24', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '房地产', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 1674899914); -INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (25, '北京文化有限公司25', '电话咨询', '13050803360', 'bjwenhua@gmail.com', '金融业', '重点客户', '', '北京市,朝阳区', '望京东园615号', 1, 29, 1674899545, 0); +INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (2, '上海科技贸易公司', '线上注册', '13812345678', 'sh-tech@163.com', '互联网', '重点客户', '意向强烈', '上海市,浦东新区', '张江高科园区', 1, 29, 1717924318, 0); +INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (3, '广州国际贸易有限责任公司', '搜索引擎', '13987654321', 'gz-trade@qq.com', '外贸', '普通客户', '咨询中', '广东省,广州市', '天河区中信大厦', 1, 29, 1717924318, 0); +INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (4, '深圳电子技术有限公司', '线下展会', '13500001111', 'sz-elec@gmail.com', '制造业', '重点客户', '老客户推荐', '广东省,深圳市', '南山区科技园', 1, 29, 1717924318, 0); +INSERT INTO `customer` (`id`, `name`, `source`, `phone`, `email`, `industry`, `level`, `remarks`, `region`, `address`, `status`, `creator`, `created`, `updated`) VALUES (5, '杭州电子商务有限公司', '促销活动', '13722223333', 'hz-ec@outlook.com', '零售业', '普通客户', '新成交', '浙江省,杭州市', '余杭区阿里园区旁', 1, 29, 1717924318, 0); COMMIT; -- ---------------------------- @@ -145,7 +107,7 @@ CREATE TABLE `mail_config` ( -- Records of mail_config -- ---------------------------- BEGIN; -INSERT INTO `mail_config` (`id`, `stmp`, `port`, `auth_code`, `email`, `status`, `creator`, `created`, `updated`) VALUES (11, 'smtp.qq.com', 465, 'zrzxsebacrpfdaeg', '200300666@qq.com', 2, 29, 1674901189, 1674901237); +INSERT INTO `mail_config` (`id`, `stmp`, `port`, `auth_code`, `email`, `status`, `creator`, `created`, `updated`) VALUES (11, 'smtp.qq.com', 465, 'zrzxsebacrpfdaeg', 'xinmi@local.com', 2, 29, 1674901189, 1674901237); COMMIT; -- ---------------------------- @@ -161,25 +123,14 @@ CREATE TABLE `notice` ( `updated` bigint DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`), KEY `idx_creator` (`creator`) -) ENGINE=InnoDB AUTO_INCREMENT=154 DEFAULT CHARSET=utf8mb3; +) ENGINE=InnoDB AUTO_INCREMENT=155 DEFAULT CHARSET=utf8mb3; -- ---------------------------- -- Records of notice -- ---------------------------- BEGIN; INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (133, '你订阅了专业版', 2, 0, 1674803772, 0); -INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (142, '你登录了账号', 2, 29, 1674819114, 0); -INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (143, '你登录了账号', 2, 29, 1674821501, 0); -INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (144, '你登录了账号', 2, 29, 1674821522, 0); -INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (145, '你登录了账号', 2, 29, 1674821570, 0); -INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (146, '你登录了账号', 2, 29, 1674821584, 0); -INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (147, '你登录了账号', 2, 29, 1674821635, 0); -INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (148, '你登录了账号', 2, 29, 1674821669, 0); -INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (149, '你登录了账号', 2, 29, 1674872716, 0); -INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (150, '你登录了账号', 2, 29, 1674872767, 0); -INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (151, '你登录了账号', 2, 29, 1674874711, 0); -INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (152, '你登录了账号', 2, 29, 1674899094, 0); -INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (153, '你登录了账号', 2, 29, 1674904112, 0); +INSERT INTO `notice` (`id`, `content`, `status`, `creator`, `created`, `updated`) VALUES (154, '欢迎使用新米CRM系统!', 2, 29, 1717924318, 0); COMMIT; -- ---------------------------- @@ -200,18 +151,17 @@ CREATE TABLE `product` ( `updated` bigint DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`), KEY `idx_creator` (`creator`) -) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=utf8mb3; +) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8mb3; -- ---------------------------- -- Records of product -- ---------------------------- BEGIN; -INSERT INTO `product` (`id`, `name`, `type`, `unit`, `code`, `price`, `description`, `status`, `creator`, `created`, `updated`) VALUES (1, '电动车1', 1, '台', '004', 1498.00, '代驾折叠电动车电动自行车成人代步外卖锂电池小型轻便电瓶车迷你便携电单车 G2/汽车电芯-能量回收-6Ah约60km', 1, 29, 1671191995, 0); -INSERT INTO `product` (`id`, `name`, `type`, `unit`, `code`, `price`, `description`, `status`, `creator`, `created`, `updated`) VALUES (2, '电动车2', 1, '台', '004', 1498.00, '代驾折叠电动车电动自行车成人代步外卖锂电池小型轻便电瓶车迷你便携电单车 G2/汽车电芯-能量回收-6Ah约60km', 1, 29, 1671191995, 0); -INSERT INTO `product` (`id`, `name`, `type`, `unit`, `code`, `price`, `description`, `status`, `creator`, `created`, `updated`) VALUES (3, '电动车3', 1, '台', '004', 1498.00, '代驾折叠电动车电动自行车成人代步外卖锂电池小型轻便电瓶车迷你便携电单车 G2/汽车电芯-能量回收-6Ah约60km', 2, 29, 1671191995, 0); -INSERT INTO `product` (`id`, `name`, `type`, `unit`, `code`, `price`, `description`, `status`, `creator`, `created`, `updated`) VALUES (4, '电动车4', 1, '台', '004', 1498.00, '代驾折叠电动车电动自行车成人代步外卖锂电池小型轻便电瓶车迷你便携电单车 G2/汽车电芯-能量回收-6Ah约60km', 2, 29, 1671191995, 0); -INSERT INTO `product` (`id`, `name`, `type`, `unit`, `code`, `price`, `description`, `status`, `creator`, `created`, `updated`) VALUES (5, '电动车5', 1, '台', '004', 1498.00, '代驾折叠电动车电动自行车成人代步外卖锂电池小型轻便电瓶车迷你便携电单车 G2/汽车电芯-能量回收-6Ah约60km', 1, 29, 1671191995, 0); -INSERT INTO `product` (`id`, `name`, `type`, `unit`, `code`, `price`, `description`, `status`, `creator`, `created`, `updated`) VALUES (6, '电动车6', 1, '台', '004', 1498.00, '代驾折叠电动车电动自行车成人代步外卖锂电池小型轻便电瓶车迷你便携电单车 G2/汽车电芯-能量回收-6Ah约60km', 1, 29, 1671191995, 0); +INSERT INTO `product` (`id`, `name`, `type`, `unit`, `code`, `price`, `description`, `status`, `creator`, `created`, `updated`) VALUES (1, '电动车1', 1, '台', '004', 1498.00, '代驾折叠电动车', 1, 29, 1671191995, 0); +INSERT INTO `product` (`id`, `name`, `type`, `unit`, `code`, `price`, `description`, `status`, `creator`, `created`, `updated`) VALUES (7, '智能锁A1', 1, '把', 'SL001', 800.00, '指纹/密码/蓝牙多种解锁方式', 1, 29, 1717924318, 0); +INSERT INTO `product` (`id`, `name`, `type`, `unit`, `code`, `price`, `description`, `status`, `creator`, `created`, `updated`) VALUES (8, '智能网关', 1, '台', 'GW001', 700.00, '支持Zigbee/WiFi/蓝牙', 1, 29, 1717924318, 0); +INSERT INTO `product` (`id`, `name`, `type`, `unit`, `code`, `price`, `description`, `status`, `creator`, `created`, `updated`) VALUES (9, '云空间1TB', 2, '年', 'CS001', 5000.00, '企业级云存储服务', 1, 29, 1717924318, 0); +INSERT INTO `product` (`id`, `name`, `type`, `unit`, `code`, `price`, `description`, `status`, `creator`, `created`, `updated`) VALUES (10, '技术咨询服务', 2, '次', 'SR001', 1000.00, '一小时专家在线咨询', 1, 29, 1717924318, 0); COMMIT; -- ---------------------------- @@ -233,7 +183,7 @@ CREATE TABLE `subscribe` ( -- Records of subscribe -- ---------------------------- BEGIN; -INSERT INTO `subscribe` (`id`, `uid`, `version`, `expired`, `created`, `updated`) VALUES (4, 29, 2, 1701895772, 1674803772, 0); +INSERT INTO `subscribe` (`id`, `uid`, `version`, `expired`, `created`, `updated`) VALUES (4, 29, 2, 1735660800, 1674803772, 0); COMMIT; -- ---------------------------- @@ -255,7 +205,7 @@ CREATE TABLE `user` ( -- Records of user -- ---------------------------- BEGIN; -INSERT INTO `user` (`id`, `email`, `password`, `name`, `status`, `created`, `updated`) VALUES (29, '1655064994@qq.com', '$2a$10$62yO.fxSfNlstacxZfTtdO2uuR9YKG6hykuVTBIMc06CEJ3BWW/Ny', '', 1, 1671191625, 0); +INSERT INTO `user` (`id`, `email`, `password`, `name`, `status`, `created`, `updated`) VALUES (29, 'xinmi@local.com', '$2b$10$CwWU/aIv/vgj7UnkpD1cW.O4oKuoCNWg3/srt3SUs5PXzmwZdi40e', '管理员', 1, 1671191625, 0); COMMIT; SET FOREIGN_KEY_CHECKS = 1; diff --git a/web/.env.dev b/web/.env.dev index 53072a9..b72045a 100644 --- a/web/.env.dev +++ b/web/.env.dev @@ -1,3 +1,3 @@ # .env.development -VITE_API_BASE_URL=http://127.0.0.1:8000/api -VITE_FILE_UPLOAD_URL=http://127.0.0.1:8000/api/common/file/upload \ No newline at end of file +VITE_API_BASE_URL=http://localhost:11001/api +VITE_FILE_UPLOAD_URL=http://localhost:11001/api/common/file/upload \ No newline at end of file diff --git a/web/.env.prod b/web/.env.prod index 8e38570..6409836 100644 --- a/web/.env.prod +++ b/web/.env.prod @@ -1,3 +1,3 @@ # .env.production -VITE_API_BASE_URL=https://zocrm.cloud/api -VITE_FILE_UPLOAD_URL=https://zocrm.cloud/api/common/file/upload \ No newline at end of file +VITE_API_BASE_URL=http://localhost:11001/api +VITE_FILE_UPLOAD_URL=http://localhost:11001/api/common/file/upload \ No newline at end of file diff --git a/web/Dockerfile b/web/Dockerfile index b4051e5..c75cf31 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -10,10 +10,6 @@ RUN npm install COPY . . -# Set the production API URL -ARG VITE_API_BASE_URL -ENV VITE_API_BASE_URL=${VITE_API_BASE_URL} - RUN npm run build FROM nginx:alpine diff --git a/web/src/axios/index.js b/web/src/axios/index.js index d6bc0a4..e4a7b82 100644 --- a/web/src/axios/index.js +++ b/web/src/axios/index.js @@ -1,15 +1,18 @@ import axios from 'axios'; import { message } from 'ant-design-vue'; -axios.defaults.baseURL = import.meta.env.VITE_API_BASE_URL +console.log('DEBUG: import.meta.env.VITE_API_BASE_URL =', import.meta.env.VITE_API_BASE_URL); const request = axios.create({ - // timeout: 5000,` + baseURL: import.meta.env.VITE_API_BASE_URL || '/api', + // timeout: 5000, headers: { 'Content-Type': 'application/json;charset=UTF-8' } }) +console.log('DEBUG: axios baseURL =', request.defaults.baseURL); + request.interceptors.request.use(config => { config.headers['uid'] = localStorage.getItem('uid') config.headers['token'] = localStorage.getItem('token') diff --git a/web/src/views/Login.vue b/web/src/views/Login.vue index 8b1a023..e8b8090 100644 --- a/web/src/views/Login.vue +++ b/web/src/views/Login.vue @@ -44,7 +44,7 @@ import { initDatabase } from '../api/common'; // 初始化数据库(只会在生产环境中初始化) onMounted(() => { - if (formData.email == '1655064994@qq.com') { + if (formData.email == 'xinmi@local.com') { message.loading('正在初始化数据...', 2.5).then(() => { initDatabase().then((res) => { if (res.data.code == 0) { @@ -61,8 +61,8 @@ onMounted(() => { const router = useRouter() const formData = reactive({ - email: '1655064994@qq.com', - password: '1655064994', + email: 'xinmi@local.com', + password: '12345678', remember: true, })