From 9b939846f9f7658ccf3e1b44109e423828bb5f80 Mon Sep 17 00:00:00 2001 From: Vinjor Date: Tue, 15 Oct 2024 18:47:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 3 +++ .env.front | 3 +++ .env.prod | 3 +++ .env.stage | 3 +++ .env.static | 3 +++ src/api/company/staff/index.js | 7 +++++++ src/views/company/staff/index.vue | 20 +++++++++++++++++++- 7 files changed, 41 insertions(+), 1 deletion(-) diff --git a/.env.dev b/.env.dev index 361e8ea..b787fdf 100644 --- a/.env.dev +++ b/.env.dev @@ -26,3 +26,6 @@ VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab # 大屏设计器服务 VUE_APP_BIG_SCREEN_SERVER = 'http://127.0.0.1:3000' + +#小程序推广码前缀 +VUE_APP_REPAIR_PREX = 'https://www.lighting-it.cn/share?inviteId=' diff --git a/.env.front b/.env.front index 0645d43..f1cb6a2 100644 --- a/.env.front +++ b/.env.front @@ -24,3 +24,6 @@ VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab # 大屏设计器服务 VUE_APP_BIG_SCREEN_SERVER = 'http://127.0.0.1:3000' + +#小程序推广码前缀 +VUE_APP_REPAIR_PREX = 'https://www.lighting-it.cn/share?inviteId=' diff --git a/.env.prod b/.env.prod index 94ceef2..0b6ddda 100644 --- a/.env.prod +++ b/.env.prod @@ -28,3 +28,6 @@ VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab # 大屏设计器服务 VUE_APP_BIG_SCREEN_SERVER = 'http://127.0.0.1:3000' + +#小程序推广码前缀 +VUE_APP_REPAIR_PREX = 'https://www.lighting-it.cn/share?inviteId=' diff --git a/.env.stage b/.env.stage index 187edf7..4d423e6 100644 --- a/.env.stage +++ b/.env.stage @@ -26,3 +26,6 @@ VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab # 大屏设计器服务 VUE_APP_BIG_SCREEN_SERVER = 'http://127.0.0.1:3000' + +#小程序推广码前缀 +VUE_APP_REPAIR_PREX = 'https://www.lighting-it.cn/share?inviteId=' diff --git a/.env.static b/.env.static index 44418ae..3610890 100644 --- a/.env.static +++ b/.env.static @@ -26,3 +26,6 @@ VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab # 大屏设计器服务 VUE_APP_BIG_SCREEN_SERVER = 'http://127.0.0.1:3000' + +#小程序推广码前缀 +VUE_APP_REPAIR_PREX = 'https://www.lighting-it.cn/share?inviteId=' diff --git a/src/api/company/staff/index.js b/src/api/company/staff/index.js index db55bd3..843473a 100644 --- a/src/api/company/staff/index.js +++ b/src/api/company/staff/index.js @@ -33,6 +33,13 @@ export function getStaff(id) { method: 'get' }) } +// 设置推广码 +export function setStaffUnicode() { + return request({ + url: '/company/staff/setStaffUnicode', + method: 'get' + }) +} // 获得企业管理-员工信息 export function getStaffById(id) { diff --git a/src/views/company/staff/index.vue b/src/views/company/staff/index.vue index 33934e6..2d329e6 100644 --- a/src/views/company/staff/index.vue +++ b/src/views/company/staff/index.vue @@ -85,6 +85,10 @@ v-hasPermi="['company:staff:create']" >新增 + 设置推广码 + @@ -107,7 +111,7 @@ @@ -274,12 +278,26 @@ export default { handleResetPassword(row) { this.$refs['staffResetPassword'].open(row) }, + /** 设置推广码 */ + async setStaffUnicodeMethod() { + try { + this.loading = true + const res = await StaffApi.setStaffUnicode() + } finally { + this.loading = false + } + }, /** 查询列表 */ async getList() { try { this.loading = true const res = await StaffApi.getStaffPage(this.queryParams) this.list = res.data.records + for (let i = 0; i < this.list.length; i++) { + if(this.list[i].uniqueCode){ + this.list[i].uniqueCode = process.env.VUE_APP_REPAIR_PREX+this.list[i].uniqueCode + } + } this.total = res.data.total } finally { this.loading = false