mirror of
https://gitee.com/log4j/pig-ui.git
synced 2024-12-22 12:58:55 +08:00
ref: 适配分布式架构
This commit is contained in:
parent
e335aa19a2
commit
ce008f9f71
@ -15,7 +15,7 @@
|
||||
:accept="fileType.join(',')"
|
||||
>
|
||||
<template v-if="imageUrl">
|
||||
<img :src="baseURL + imageUrl" class="upload-image" />
|
||||
<img :src="imageUrl.indexOf('http') > 0 ? baseURL + imageUrl : imageUrl" class="upload-image" />
|
||||
<div class="upload-handle" @click.stop>
|
||||
<div class="handle-icon" @click="editImg" v-if="!self_disabled">
|
||||
<el-icon><Edit /></el-icon>
|
||||
|
@ -455,7 +455,7 @@ export function toUnderline(str: string) {
|
||||
*
|
||||
* @param originUrl 原始路径
|
||||
*/
|
||||
const adaptationUrl = (originUrl?: string) => {
|
||||
const adaptationUrl = (originUrl: string) => {
|
||||
// 微服务架构 不做路径转换,为空不做路径转换
|
||||
const isMicro = import.meta.env.VITE_IS_MICRO;
|
||||
if (validateNull(isMicro) || isMicro === 'true') {
|
||||
|
@ -120,6 +120,7 @@ import { clearQuota, delObjs, fetchList, generateQr } from '/@/api/mp/wx-account
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import commonFunction from '/@/utils/commonFunction';
|
||||
import other from '/@/utils/other';
|
||||
|
||||
const { copyText } = commonFunction();
|
||||
// 引入组件
|
||||
@ -187,7 +188,8 @@ const dialogFormVisible = ref(false);
|
||||
const wxurl = ref('');
|
||||
const access = (row: any) => {
|
||||
dialogFormVisible.value = true;
|
||||
wxurl.value = row.url + '/mp/' + row.appid + '/portal';
|
||||
let url = baseUrl + row.url + '/mp/' + row.appid + '/portal';
|
||||
wxurl.value = other.adaptationUrl(url);
|
||||
};
|
||||
|
||||
const generate = (row: any) => {
|
||||
|
@ -128,7 +128,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="wx-menu" setup>
|
||||
import { saveObj, getObj } from '/@/api/mp/wx-menu';
|
||||
import { saveObj, getObj, publishObj } from '/@/api/mp/wx-menu';
|
||||
|
||||
// 部门树使用的数据
|
||||
import { fetchAccountList } from '/@/api/mp/wx-account';
|
||||
@ -340,22 +340,18 @@ const deleteMenu = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const handleSave = () => {
|
||||
useMessageBox()
|
||||
.confirm('确定要保存该菜单吗?')
|
||||
.then(() => {
|
||||
saveObj(accountId.value, {
|
||||
button: menuList,
|
||||
})
|
||||
.then(() => {
|
||||
useMessage().success('保存成功');
|
||||
})
|
||||
.catch((err) => {
|
||||
useMessage().error(err.msg);
|
||||
});
|
||||
});
|
||||
const handleSave = async () => {
|
||||
try {
|
||||
await useMessageBox().confirm('确定要保存该菜单吗?');
|
||||
await saveObj(accountId.value, { button: menuList });
|
||||
await publishObj(accountId.value);
|
||||
useMessage().error('发布成功');
|
||||
} catch (err:any) {
|
||||
useMessage().error(err.msg);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const deleteMaterial = () => {
|
||||
tempObj.value.replyArticles = [];
|
||||
tempObj.value.articleId = '';
|
||||
|
Loading…
Reference in New Issue
Block a user