This commit is contained in:
yanran200730
2023-06-09 15:49:47 +08:00
parent 9c45f25e8d
commit 164fe19a4a
11 changed files with 32 additions and 29 deletions

View File

@@ -26,9 +26,12 @@ instance.interceptors.request.use(config => {
} else if (/#url-/.test(location.hash)) { } else if (/#url-/.test(location.hash)) {
config.baseURL = location.hash.replace(/#url-/, '/') config.baseURL = location.hash.replace(/#url-/, '/')
} }
if (["/xsjr", "/omsapi", "/tfx"].includes(config.baseURL)) { if (["/omsapi"].includes(config.baseURL)) {
config.url = config.url.replace(/(app|auth|admin|api)\//, "") config.url = config.url.replace(/(app|auth|admin|api)\//, "")
} }
if (["/xsjr", "/tfx"].includes(config.baseURL)) {
config.url = config.url.replace(/(app|auth|admin|api)\//, "api/")
}
if (['/qxn', '/analysis'].includes(config.baseURL)) { if (['/qxn', '/analysis'].includes(config.baseURL)) {
config.url = config.url.replace(/(app|auth|admin)\//, "api/") config.url = config.url.replace(/(app|auth|admin)\//, "api/")
} }

View File

@@ -95,7 +95,7 @@ export default {
}, },
getInfo() { getInfo() {
this.instance.post(`/appvillageinfo/queryDetailById?id=${this.params.id}`).then(res => { this.instance.post(`/api/appvillageinfo/queryDetailById?id=${this.params.id}`).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.form = { this.form = {
...res.data ...res.data
@@ -109,7 +109,7 @@ export default {
onSubmit() { onSubmit() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
this.instance.post(`/appvillageinfo/addOrUpdate`, { this.instance.post(`/api/appvillageinfo/addOrUpdate`, {
...this.form, ...this.form,
fileIds: this.fileList.map(v => v.id), fileIds: this.fileList.map(v => v.id),
thumbUrl: this.form.thumbUrl.length ? JSON.stringify([{ thumbUrl: this.form.thumbUrl.length ? JSON.stringify([{

View File

@@ -44,7 +44,7 @@ export default {
methods: { methods: {
getInfo() { getInfo() {
this.instance.post(`/appvillageinfo/queryDetailById?id=${this.params.id}`).then(res => { this.instance.post(`/api/appvillageinfo/queryDetailById?id=${this.params.id}`).then(res => {
if (res?.data) { if (res?.data) {
this.info = res.data this.info = res.data
if (res.data.thumbUrl) { if (res.data.thumbUrl) {

View File

@@ -141,7 +141,7 @@ export default {
methods: { methods: {
getsaasList() { getsaasList() {
this.instance.post("/appSaas/page", null, { this.instance.post("/api/appSaas/page", null, {
params: {size: 10000} params: {size: 10000}
}).then(res => { }).then(res => {
if (res?.data) { if (res?.data) {
@@ -151,7 +151,7 @@ export default {
}, },
getCompanyList() { getCompanyList() {
this.instance.post("/appCorp/page", null, { this.instance.post("/api/appCorp/page", null, {
params: {saasId: this.dialogForm.saasId, size: 10000} params: {saasId: this.dialogForm.saasId, size: 10000}
}).then(res => { }).then(res => {
if (res?.data) { if (res?.data) {
@@ -173,7 +173,7 @@ export default {
}, },
getList() { getList() {
this.instance.post(`/appvillageinfo/list`, null, { this.instance.post(`/api/appvillageinfo/list`, null, {
params: { params: {
...this.search, ...this.search,
areaId: this.areaId areaId: this.areaId
@@ -216,7 +216,7 @@ export default {
saveSaas() { saveSaas() {
this.$refs.saasForm.validate(v => { this.$refs.saasForm.validate(v => {
if (v) { if (v) {
this.instance.post(`/appvillageinfo/sync?corpId=${this.dialogForm.corpId}&id=${this.dialogForm.id}&areaId=${this.dialogForm.areaId}`).then(res => { this.instance.post(`/api/appvillageinfo/sync?corpId=${this.dialogForm.corpId}&id=${this.dialogForm.id}&areaId=${this.dialogForm.areaId}`).then(res => {
if (res?.code == 0) { if (res?.code == 0) {
this.dialog = false; this.dialog = false;
this.$message.success("发布成功") this.$message.success("发布成功")

View File

@@ -130,7 +130,7 @@ export default {
}, },
methods: { methods: {
getsaasList() { getsaasList() {
this.instance.post("/appSaas/page", null, { this.instance.post("/api/appSaas/page", null, {
params: {size: 10000} params: {size: 10000}
}).then(res => { }).then(res => {
if (res?.data) { if (res?.data) {
@@ -143,7 +143,7 @@ export default {
this.getTableData() this.getTableData()
}, },
getTableData() { getTableData() {
this.instance.post("/appCorp/page", null, { this.instance.post("/api/appCorp/page", null, {
params: {...this.page, ...this.search} params: {...this.page, ...this.search}
}).then(res => { }).then(res => {
if (res?.data) { if (res?.data) {
@@ -161,7 +161,7 @@ export default {
this.dialogForm.saasName = item.name this.dialogForm.saasName = item.name
} }
}) })
this.instance.post("/appCorp/addOrUpdate", this.dialogForm).then(res => { this.instance.post("/api/appCorp/addOrUpdate", this.dialogForm).then(res => {
if (res?.code == 0) { if (res?.code == 0) {
this.dialog = false; this.dialog = false;
this.$message.success("保存成功") this.$message.success("保存成功")
@@ -179,7 +179,7 @@ export default {
}, },
handleDelete(ids) { handleDelete(ids) {
this.$confirm("是否要删除该Saas信息?").then(() => { this.$confirm("是否要删除该Saas信息?").then(() => {
this.instance.post("/appCorp/delete", null, { this.instance.post("/api/appCorp/delete", null, {
params: {ids} params: {ids}
}).then(res => { }).then(res => {
if (res?.code == 0) { if (res?.code == 0) {
@@ -191,7 +191,7 @@ export default {
}, },
handleSync(corpId) { handleSync(corpId) {
this.$confirm("是否确定同步该企业数据?").then(() => { this.$confirm("是否确定同步该企业数据?").then(() => {
this.instance.post("/appCorpStat/syncData?corpId=" + corpId, null, {}).then(res => { this.instance.post("/api/appCorpStat/syncData?corpId=" + corpId, null, {}).then(res => {
if (res?.code == 0) { if (res?.code == 0) {
this.getTableData(); this.getTableData();
this.$message.success("同步成功!"); this.$message.success("同步成功!");

View File

@@ -232,7 +232,7 @@ export default {
}, },
getInfo() { getInfo() {
this.myChart = echarts.init(document.getElementById("echart")); this.myChart = echarts.init(document.getElementById("echart"));
this.instance.post(`/appCorpStat/getLatestInfo?corpId=${this.params.corpId}`).then(res => { this.instance.post(`/api/appCorpStat/getLatestInfo?corpId=${this.params.corpId}`).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.info = res.data this.info = res.data
this.getCharInfo() this.getCharInfo()
@@ -240,7 +240,7 @@ export default {
}) })
}, },
getCharInfo() { getCharInfo() {
this.instance.post(`/appCorpStat/getLatestThreeMonthStat?corpId=${this.params.corpId}`).then(res => { this.instance.post(`/api/appCorpStat/getLatestThreeMonthStat?corpId=${this.params.corpId}`).then(res => {
if (res.code === 0) { if (res.code === 0) {
if (res.data && res.data.length) { if (res.data && res.data.length) {
this.listData = [] this.listData = []
@@ -255,7 +255,7 @@ export default {
} }
}) })
this.instance.post(`/wxcp/wxgroup/groupStatistic?corpId=${this.params.corpId}`).then(res => { this.instance.post(`/api/wxcp/wxgroup/groupStatistic?corpId=${this.params.corpId}`).then(res => {
if (res.code === 0) { if (res.code === 0) {
if (res.data) { if (res.data) {
this.pieData = [] this.pieData = []
@@ -277,7 +277,7 @@ export default {
this.getTableData() this.getTableData()
}, },
getTableData() { getTableData() {
this.instance.post(`/wxcp/wxgroup/list?corpId=${this.params.corpId}&current=${this.page.current}&size=${this.page.size}&innerMemberId=${this.innerMemberId}`,).then(res => { this.instance.post(`/api/wxcp/wxgroup/list?corpId=${this.params.corpId}&current=${this.page.current}&size=${this.page.size}&innerMemberId=${this.innerMemberId}`,).then(res => {
if (res.code === 0) { if (res.code === 0) {
if (res.data) { if (res.data) {
this.gropList = res.data.records this.gropList = res.data.records
@@ -287,7 +287,7 @@ export default {
}) })
}, },
getUserTableData() { getUserTableData() {
this.instance.post(`/wxcp/wxuser/userStat?corpId=${this.params.corpId}&current=${this.userPage.current}&size=${this.userPage.size}&mainDepartment=1`,).then(res => { this.instance.post(`/api/wxcp/wxuser/userStat?corpId=${this.params.corpId}&current=${this.userPage.current}&size=${this.userPage.size}&mainDepartment=1`,).then(res => {
if (res.code === 0) { if (res.code === 0) {
if (res.data) { if (res.data) {
this.userList = res.data.records this.userList = res.data.records

View File

@@ -48,7 +48,7 @@
methods: { methods: {
getInfo (id) { getInfo (id) {
this.instance.post(`/appfeedback/queryDetailById?id=${id}`).then(res => { this.instance.post(`/api/appfeedback/queryDetailById?id=${id}`).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.info = res.data this.info = res.data
this.info.images = res.data.pictureUrl ? res.data.pictureUrl.split(',').map(v => { this.info.images = res.data.pictureUrl ? res.data.pictureUrl.split(',').map(v => {

View File

@@ -87,7 +87,7 @@
methods: { methods: {
getList() { getList() {
this.instance.post(`/appfeedback/list`, null, { this.instance.post(`/api/appfeedback/list`, null, {
params: { params: {
...this.search ...this.search
} }
@@ -101,7 +101,7 @@
remove(id) { remove(id) {
this.$confirm('确定删除该数据?').then(() => { this.$confirm('确定删除该数据?').then(() => {
this.instance.post(`/appfeedback/delete?ids=${id}`).then(res => { this.instance.post(`/api/appfeedback/delete?ids=${id}`).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.$message.success('删除成功!') this.$message.success('删除成功!')
this.getList() this.getList()

View File

@@ -111,7 +111,7 @@ export default {
}, },
methods: { methods: {
getTableData() { getTableData() {
this.instance.post("/sysLicense/page", null, { this.instance.post("/api/sysLicense/page", null, {
params: {...this.page, ...this.search} params: {...this.page, ...this.search}
}).then(res => { }).then(res => {
if (res?.data) { if (res?.data) {
@@ -124,7 +124,7 @@ export default {
saveLicense() { saveLicense() {
this.$refs.licenseForm.validate(v => { this.$refs.licenseForm.validate(v => {
if (v) { if (v) {
this.instance.post("/sysLicense/save", this.dialogForm).then(res => { this.instance.post("/api/sysLicense/save", this.dialogForm).then(res => {
if (res?.code == 0) { if (res?.code == 0) {
this.dialog = false; this.dialog = false;
this.$message.success("保存成功") this.$message.success("保存成功")
@@ -138,7 +138,7 @@ export default {
}, },
handleDelete(ids) { handleDelete(ids) {
this.$confirm("是否要删除该证书信息?").then(() => { this.$confirm("是否要删除该证书信息?").then(() => {
this.instance.post("/sysLicense/delete", null, { this.instance.post("/api/sysLicense/delete", null, {
params: {ids} params: {ids}
}).then(res => { }).then(res => {
if (res?.code == 0) { if (res?.code == 0) {
@@ -149,7 +149,7 @@ export default {
}).catch(() => 0) }).catch(() => 0)
}, },
handleDownload(id) { handleDownload(id) {
this.instance.post("/sysLicense/create?id="+id, null, {responseType: 'blob'}).then(res => { this.instance.post("/api/sysLicense/create?id="+id, null, {responseType: 'blob'}).then(res => {
const link = document.createElement('a') const link = document.createElement('a')
console.log(res.type) console.log(res.type)
let blob = new Blob([res], {type: res.type}) let blob = new Blob([res], {type: res.type})

View File

@@ -131,7 +131,7 @@ export default {
saveSaas() { saveSaas() {
this.$refs.saasForm.validate(v => { this.$refs.saasForm.validate(v => {
if (v) { if (v) {
this.instance.post("/appSaas/addOrUpdate", this.dialogForm).then(res => { this.instance.post("/api/appSaas/addOrUpdate", this.dialogForm).then(res => {
if (res?.code == 0) { if (res?.code == 0) {
this.dialog = false; this.dialog = false;
this.$message.success("保存成功") this.$message.success("保存成功")
@@ -148,7 +148,7 @@ export default {
this.$refs.updatePwdForm.validate(v => { this.$refs.updatePwdForm.validate(v => {
if (v) { if (v) {
this.updatePwdForm.id = this.currentSaas.id this.updatePwdForm.id = this.currentSaas.id
this.instance.post("/appSaas/updatePwd", null, {params: this.updatePwdForm}).then(res => { this.instance.post("/api/appSaas/updatePwd", null, {params: this.updatePwdForm}).then(res => {
if (res?.code == 0) { if (res?.code == 0) {
this.updateDialog = false; this.updateDialog = false;
this.$message.success("密码修改成功") this.$message.success("密码修改成功")

View File

@@ -123,7 +123,7 @@ export default {
methods: { methods: {
loadNode(node, resolve) { loadNode(node, resolve) {
if (node.level == 0) { if (node.level == 0) {
this.instance.post(`/appCorpStat/getCorpStatTotal`).then((res) => { this.instance.post(`/api/appCorpStat/getCorpStatTotal`).then((res) => {
if (res.data) { if (res.data) {
return resolve([{ name: `全国 (${res.data})`}]); return resolve([{ name: `全国 (${res.data})`}]);
} }
@@ -137,7 +137,7 @@ export default {
if(node.level == 1) { //全国 if(node.level == 1) { //全国
areaId = '' areaId = ''
} }
this.instance.post(`/appCorpStat/getCorpStatByArea?areaId=${areaId}`).then((res) => { this.instance.post(`/api/appCorpStat/getCorpStatByArea?areaId=${areaId}`).then((res) => {
if (res.data) { if (res.data) {
res.data.map((item) => { res.data.map((item) => {
item.name = item.name + `(${item.total})` item.name = item.name + `(${item.total})`