From a695868484e6ba3ef87099efad9bdfcaf74c70fa Mon Sep 17 00:00:00 2001 From: aBin Date: Fri, 19 Nov 2021 18:00:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=BB=98=E8=AE=A4=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E4=B8=8A=E6=AC=A1=E9=80=80=E5=87=BA=E9=A1=B9=E7=9B=AE=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E8=A7=92=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 6 +-- .env.production | 6 +-- CHANGELOG.md | 3 +- src/apis/role.js | 27 +++++++++++ src/components/Globals/Globals.vue | 75 ++++++++++++++++++++---------- src/components/Guide/Guide.vue | 3 +- src/components/Roles/Roles.vue | 8 +++- src/pages/project/project.vue | 53 ++++++++++----------- src/store/role/mutations.js | 1 - 9 files changed, 119 insertions(+), 63 deletions(-) diff --git a/.env.development b/.env.development index 403eac1..d16578a 100644 --- a/.env.development +++ b/.env.development @@ -1,4 +1,4 @@ VUE_APP_NODE_ENV=development -VUE_APP_BASE_URL=https://www.tall.wiki/ -VUE_APP_API_URL=https://www.tall.wiki/gateway -VUE_APP_MSG_URL=wss://www.tall.wiki/websocket/message/v4.0/ws +VUE_APP_BASE_URL=https://test.tall.wiki/ +VUE_APP_API_URL=https://test.tall.wiki/gateway +VUE_APP_MSG_URL=wss://test.tall.wiki/websocket/message/v4.0/ws diff --git a/.env.production b/.env.production index 9a99c2b..ed91693 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,4 @@ VUE_APP_NODE_ENV=production -VUE_APP_BASE_URL=https://www.tall.wiki/ -VUE_APP_API_URL=https://www.tall.wiki/gateway -VUE_APP_MSG_URL=wss://www.tall.wiki/websocket/message/v4.0/ws +VUE_APP_BASE_URL=https://test.tall.wiki/ +VUE_APP_API_URL=https://test.tall.wiki/gateway +VUE_APP_MSG_URL=wss://test.tall.wiki/websocket/message/v4.0/ws diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b3d54e..f9d4921 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 0.1.0 (2021-11-08) +# 0.1.0 (2021-11-19) ### 🌟 新功能 范围|描述|commitId @@ -25,6 +25,7 @@ - | 面变化首页变化 | [5e860f1](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/5e860f1) - | 模拟接口测试 | [69e7931](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/69e7931) - | 配置默认插件接口 | [f0c177d](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/f0c177d) + - | 切换角色时,取消显示多角色下拉框 | [4a57c0c](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/4a57c0c) - | 全局插件及默认插件位置修改 | [6c80d08](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/6c80d08) - | 任务进行中状态数字 | [27b7326](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/27b7326) - | 任务状态时间显示 | [56f5183](https://dd.tall.wiki/gitea/wally/tall-mui-3-project/commits/56f5183) diff --git a/src/apis/role.js b/src/apis/role.js index 1918c36..fad984a 100644 --- a/src/apis/role.js +++ b/src/apis/role.js @@ -12,10 +12,37 @@ export const queryMustShow = { }, }; +export const queryLastRoleChoose = { + async index(params) { + try { + /* #endif */ + const data = await uni.$u.http.post(`${url}/carbasics/v4.0/role/queryLastRoleChoose`, params); + return data; + } catch (error) { + throw new Error(error); + } + }, +}; + +export const saveRoleRecord = { + async index(params) { + try { + /* #endif */ + await uni.$u.http.post(`${url}/carbasics/v4.0/role/saveRoleRecord`, params); + } catch (error) { + throw new Error(error); + } + }, +}; + const install = (Vue, vm) => { vm.$u.api = { ...vm.$u.api } || {}; // 根据项目id查找所有体验角色 vm.$u.api.queryMustShow = params => queryMustShow.index(params); + // 根据项目id查找上次退出项目时所选择的角色 + vm.$u.api.queryLastRoleChoose = params => queryLastRoleChoose.index(params); + // 保存当前用户在当前项目最后一次选择的角色 + vm.$u.api.saveRoleRecord = params => saveRoleRecord.index(params); // 根据项目id查找角色 vm.$u.api.findShowRole = param => vm.$u.post(`${uni.$t.domain}/role/show`, param); // 根据项目id查找所有成员 diff --git a/src/components/Globals/Globals.vue b/src/components/Globals/Globals.vue index a728653..3e1b38a 100644 --- a/src/components/Globals/Globals.vue +++ b/src/components/Globals/Globals.vue @@ -1,12 +1,17 @@