mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 14:01:07 +00:00
Merge branch 'v5.0.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.0.0dev
This commit is contained in:
commit
e8532dde35
@ -57,13 +57,7 @@ class WechatService
|
||||
$appId = isset($wechat['wechat_app_appid']) ? trim($wechat['wechat_app_appid']) : '';
|
||||
$appsecret = isset($wechat['wechat_app_appsecret']) ? trim($wechat['wechat_app_appsecret']) : '';
|
||||
} else {
|
||||
$appId = null;
|
||||
if (request()->isPc()) {
|
||||
$appId = sys_config('wechat_open_app_id');
|
||||
}
|
||||
if (!$appId) {
|
||||
$appId = isset($wechat['wechat_appid']) ? trim($wechat['wechat_appid']) : '';
|
||||
}
|
||||
$appId = isset($wechat['wechat_appid']) ? trim($wechat['wechat_appid']) : '';
|
||||
$appsecret = isset($wechat['wechat_appsecret']) ? trim($wechat['wechat_appsecret']) : '';
|
||||
}
|
||||
$config = [
|
||||
|
||||
@ -198,12 +198,15 @@ export default {
|
||||
instance.confirmButtonLoading = true;
|
||||
instance.confirmButtonText = this.$t('message.user.logOutExit');
|
||||
AccountLogout().then((res) => {
|
||||
this.$Message.success('您已成功退出');
|
||||
this.$router.replace({ path: `${settings.routePre}/login` });
|
||||
this.$router.replace({ name: 'login' });
|
||||
this.$store.commit('clearAll');
|
||||
localStorage.clear();
|
||||
sessionStorage.clear();
|
||||
removeCookies('token');
|
||||
removeCookies('expires_time');
|
||||
removeCookies('uuid');
|
||||
// window.location.reload()
|
||||
this.$Message.success('您已成功退出');
|
||||
// this.$router.replace({ path: `${settings.routePre}/login` });
|
||||
done();
|
||||
setTimeout(() => {
|
||||
instance.confirmButtonLoading = false;
|
||||
|
||||
@ -331,8 +331,14 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
font-size: 50px;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="stylus">
|
||||
|
||||
.chat-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@ -90,7 +90,7 @@
|
||||
{{ formValidate.name }}
|
||||
</div>
|
||||
<div>
|
||||
<Button type="primary" class="submission mr20" @click="debugging()">调试</Button>
|
||||
<!-- <Button type="primary" class="submission mr20" @click="debugging()">调试</Button> -->
|
||||
<Button v-if="formValidate.id" type="primary" class="submission mr20" @click="isEdit = !isEdit">{{
|
||||
isEdit ? '返回' : '编辑'
|
||||
}}</Button>
|
||||
|
||||
@ -42,7 +42,15 @@
|
||||
</vxe-column>
|
||||
<vxe-column field="type" title="类型" width="120" :edit-render="{}">
|
||||
<template #default="{ row }">
|
||||
<vxe-select v-model="row.type" transfer>
|
||||
<vxe-select
|
||||
v-model="row.type"
|
||||
transfer
|
||||
@change="
|
||||
(val) => {
|
||||
handleChange(val, row, 'xTable');
|
||||
}
|
||||
"
|
||||
>
|
||||
<vxe-option
|
||||
v-for="item in typeList"
|
||||
:key="item.value"
|
||||
@ -64,7 +72,11 @@
|
||||
</vxe-column>
|
||||
<vxe-column title="操作" width="120">
|
||||
<template #default="{ row }">
|
||||
<vxe-button type="text" v-if="row.type === 'array'" status="primary" @click="insertRow(row, 'xTable')"
|
||||
<vxe-button
|
||||
type="text"
|
||||
v-if="['array', 'object'].includes(row.type)"
|
||||
status="primary"
|
||||
@click="insertRow(row, 'xTable')"
|
||||
>插入</vxe-button
|
||||
>
|
||||
<vxe-button type="text" status="primary" @click="removeRow(row, 'xTable')">删除</vxe-button>
|
||||
@ -98,7 +110,15 @@
|
||||
</vxe-column>
|
||||
<vxe-column field="type" title="类型" width="120" :edit-render="{}">
|
||||
<template #default="{ row }">
|
||||
<vxe-select v-model="row.type" transfer>
|
||||
<vxe-select
|
||||
v-model="row.type"
|
||||
transfer
|
||||
@change="
|
||||
(val) => {
|
||||
handleChange(val, row, 'yTable');
|
||||
}
|
||||
"
|
||||
>
|
||||
<vxe-option
|
||||
v-for="item in typeList"
|
||||
:key="item.value"
|
||||
@ -120,7 +140,11 @@
|
||||
</vxe-column>
|
||||
<vxe-column title="操作" width="120">
|
||||
<template #default="{ row }">
|
||||
<vxe-button type="text" v-if="row.type === 'array'" status="primary" @click="insertRow(row, 'yTable')"
|
||||
<vxe-button
|
||||
type="text"
|
||||
v-if="['array', 'object'].includes(row.type)"
|
||||
status="primary"
|
||||
@click="insertRow(row, 'yTable')"
|
||||
>插入</vxe-button
|
||||
>
|
||||
<vxe-button type="text" status="primary" @click="removeRow(row, 'yTable')">删除</vxe-button>
|
||||
@ -154,7 +178,15 @@
|
||||
</vxe-column>
|
||||
<vxe-column field="type" title="类型" width="200" :edit-render="{}">
|
||||
<template #default="{ row }">
|
||||
<vxe-select v-model="row.type" transfer>
|
||||
<vxe-select
|
||||
v-model="row.type"
|
||||
transfer
|
||||
@change="
|
||||
(val) => {
|
||||
handleChange(val, row, 'zTable');
|
||||
}
|
||||
"
|
||||
>
|
||||
<vxe-option
|
||||
v-for="item in typeList"
|
||||
:key="item.value"
|
||||
@ -166,7 +198,11 @@
|
||||
</vxe-column>
|
||||
<vxe-column title="操作" width="100">
|
||||
<template #default="{ row }">
|
||||
<vxe-button type="text" v-if="row.type === 'array'" status="primary" @click="insertRow(row, 'zTable')"
|
||||
<vxe-button
|
||||
type="text"
|
||||
v-if="['array', 'object'].includes(row.type)"
|
||||
status="primary"
|
||||
@click="insertRow(row, 'zTable')"
|
||||
>插入</vxe-button
|
||||
>
|
||||
<vxe-button type="text" status="primary" @click="removeRow(row, 'zTable')">删除</vxe-button>
|
||||
@ -267,6 +303,21 @@ export default {
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
async handleChange(e, row, type) {
|
||||
console.log(type, row);
|
||||
if (e.value !== 'array' && e.value !== 'object') {
|
||||
if (row.children.length) {
|
||||
let arr = this.$refs[type].getTableData().tableData;
|
||||
let id = row.children[0].parentId;
|
||||
const $table = this.$refs[type];
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (arr[i].parentId == id) {
|
||||
await $table.remove(arr[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
insertCopy() {
|
||||
this.$copyText(this.codes)
|
||||
.then((message) => {
|
||||
@ -277,8 +328,6 @@ export default {
|
||||
});
|
||||
},
|
||||
async requestData() {
|
||||
console.log(this.$refs.xTable.getTableData().tableData);
|
||||
console.log(this.filtersData((await this.$refs.xTable.getTableData().tableData) || []));
|
||||
let url, method, params, body, headers;
|
||||
url = this.interfaceData.app_name + '/' + this.interfaceData.path;
|
||||
method = this.interfaceData.method;
|
||||
@ -286,7 +335,6 @@ export default {
|
||||
body = this.filtersData((await this.$refs.yTable.getTableData().tableData) || []);
|
||||
let h = this.filtersData((await this.$refs.zTable.getTableData().tableData) || []);
|
||||
let h1 = this.filtersData((await this.$refs.zaTable.getTableData().tableData) || []);
|
||||
console.log(this.interfaceData, h, h1);
|
||||
headers = {
|
||||
...h,
|
||||
...h1,
|
||||
@ -308,8 +356,16 @@ export default {
|
||||
if (!e.parentId) {
|
||||
for (let i in e) {
|
||||
if (i == 'attribute') {
|
||||
console.log(e);
|
||||
if (e.type !== 'array') {
|
||||
console.log(e.type);
|
||||
if (e.type === 'object') {
|
||||
let obj = {};
|
||||
|
||||
e.children.map((item, index) => {
|
||||
obj = this.filtersObj(item, 1);
|
||||
});
|
||||
console.log(obj, 'objobjobj');
|
||||
x[e[i]] = obj;
|
||||
} else if (e.type !== 'array') {
|
||||
x[e[i]] = e.value || '';
|
||||
} else {
|
||||
let arr = [];
|
||||
@ -327,12 +383,25 @@ export default {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
filtersObj(obj) {
|
||||
// type 1 为obj属性
|
||||
filtersObj(obj, type) {
|
||||
let x = {};
|
||||
for (let i in obj) {
|
||||
if (i == 'attribute') {
|
||||
if (obj.type !== 'array') {
|
||||
x[obj[i]] = obj.value || '';
|
||||
console.log(obj, 'obj111');
|
||||
if (obj.type === 'object') {
|
||||
let oj = {};
|
||||
obj.children.map((item, index) => {
|
||||
oj[obj.attribute] = this.filtersObj(item);
|
||||
});
|
||||
console.log(oj, 'oj');
|
||||
x = oj;
|
||||
} else if (obj.type !== 'array') {
|
||||
if (type) {
|
||||
x[obj.attribute] = obj.value || '';
|
||||
} else {
|
||||
x[obj[i]] = obj.value || '';
|
||||
}
|
||||
} else {
|
||||
let arr = [];
|
||||
obj.children.map((item, index) => {
|
||||
@ -346,8 +415,7 @@ export default {
|
||||
},
|
||||
changeTab(name) {
|
||||
if (name === 'Header') {
|
||||
console.log(this.interfaceData.headerData);
|
||||
if (!this.interfaceData.headerData) {
|
||||
if (!this.$refs.zTable.getTableData().tableData.length) {
|
||||
this.insertEvent('zTable', {
|
||||
attribute: 'Content-Type',
|
||||
value: 'application/x-www-form-urlencoded',
|
||||
|
||||
@ -470,6 +470,10 @@ export default {
|
||||
value: 'array',
|
||||
label: 'Array',
|
||||
},
|
||||
{
|
||||
value: 'object',
|
||||
label: 'Object',
|
||||
},
|
||||
{
|
||||
value: 'number',
|
||||
label: 'Number',
|
||||
@ -530,7 +534,7 @@ export default {
|
||||
this.methodColor = '#49cc90';
|
||||
} else if (method == 'PUT') {
|
||||
this.methodColor = '#fca130';
|
||||
} else if (method == 'DELETE') {
|
||||
} else if (method == 'DEL' || method == 'DELETE') {
|
||||
this.methodColor = '#f93e3e';
|
||||
}
|
||||
},
|
||||
@ -567,7 +571,7 @@ export default {
|
||||
return '#49cc90';
|
||||
} else if (method == 'PUT') {
|
||||
return '#fca130';
|
||||
} else if (method == 'DELETE') {
|
||||
} else if (method == 'DEL' || method == 'DELETE') {
|
||||
return '#f93e3e';
|
||||
}
|
||||
},
|
||||
@ -1070,6 +1074,7 @@ export default {
|
||||
|
||||
.text-area {
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ service.interceptors.response.use(
|
||||
}
|
||||
},
|
||||
(error) => {
|
||||
return Promise.reject(error);
|
||||
// return Promise.reject(error);
|
||||
},
|
||||
);
|
||||
export default service;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="code-wapper">
|
||||
<div class="i-layout-page-header header-title">
|
||||
<div class="fl_header">
|
||||
<router-link :to="{ path: $routeProStr + '/system/code_generation_list' }"
|
||||
@ -31,7 +31,7 @@
|
||||
<StorageLoc :storage="formItem.storage" />
|
||||
</Card>
|
||||
</div>
|
||||
<Card :bordered="false" dis-hover class="btn">
|
||||
<Card :bordered="false" class="btn">
|
||||
<Button class="mr20" @click="beforeTab">上一步</Button>
|
||||
<Button type="primary" @click="nextTab">{{ currentTab == 1 ? '提交' : '下一步' }}</Button>
|
||||
</Card>
|
||||
@ -92,7 +92,10 @@ export default {
|
||||
if (this.$refs.Foundation.tableField.length)
|
||||
for (let i = 0; i < this.$refs.Foundation.tableField.length; i++) {
|
||||
const el = this.$refs.Foundation.tableField[i];
|
||||
if (['addSoftDelete','addTimestamps'].indexOf(el.field_type)=== -1 && (!el.field || !el.field_type || !el.comment)) {
|
||||
if (
|
||||
['addSoftDelete', 'addTimestamps'].indexOf(el.field_type) === -1 &&
|
||||
(!el.field || !el.field_type || !el.comment)
|
||||
) {
|
||||
return this.$Message.warning('请完善sql表数据');
|
||||
}
|
||||
}
|
||||
@ -144,13 +147,19 @@ export default {
|
||||
.ivu-steps .ivu-steps-title {
|
||||
line-height: 26px;
|
||||
}
|
||||
.code-wapper {
|
||||
padding-bottom: 90px;
|
||||
}
|
||||
.btn {
|
||||
position: fixed;
|
||||
bottom: 10px;
|
||||
height: 80px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 85%;
|
||||
width: 88.7%;
|
||||
background-color: rgba(255, 255, 255, 0.6);
|
||||
backdrop-filter: blur(4px);
|
||||
}
|
||||
.tab-1 {
|
||||
padding-bottom: 100px;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// 请求接口地址 如果没有配置自动获取当前网址路径
|
||||
const VUE_APP_API_URL = process.env.VUE_APP_API_URL || `${location.origin}/adminapi`;
|
||||
const VUE_APP_API_URL = `https://v5.wuht.net/adminapi`||process.env.VUE_APP_API_URL || `${location.origin}/adminapi`;
|
||||
|
||||
const Setting = {
|
||||
// 路由前缀
|
||||
|
||||
@ -77,7 +77,7 @@ export default {
|
||||
},
|
||||
addTag(state, { route, type = 'unshift' }) {
|
||||
let router = getRouteTitleHandled(route);
|
||||
console.log(router,'routerrouterrouter')
|
||||
console.log(router, 'routerrouterrouter');
|
||||
if (!routeHasExist(state.tagNavList, router)) {
|
||||
if (type === 'push') state.tagNavList.push(router);
|
||||
else {
|
||||
@ -97,6 +97,9 @@ export default {
|
||||
setHasReadErrorLoggerStatus(state, status = true) {
|
||||
state.hasReadErrorPage = status;
|
||||
},
|
||||
clearAll(state) {
|
||||
state.tagNavList = [];
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
addErrorLog({ commit, rootState }, info) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user