Commit f9adb41e by 无尘

fix: 修改后端配置常量

parent 10f7432f
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>API网关管理平台</title><link href=./static/css/app.918c5c5890639f813c4b6339e2bce87a.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.15.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.01.js></script><script type=text/javascript src=./static/js/manifest.8695462f2bf7e47e0898.js></script><script type=text/javascript src=./static/js/vendor.71dc162eb690bf6a36a0.js></script><script type=text/javascript src=./static/js/app.49b33f10c1f62207e977.js></script></body></html> <!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>API网关管理平台</title><link href=./static/css/app.0c181d84fc34504e9dd3f8519891c2ea.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script src=//web-1251519181.file.myqcloud.com/components/input.2.0.15.js></script><script src=//web-1251519181.file.myqcloud.com/components/delete.2.0.01.js></script><script type=text/javascript src=./static/js/manifest.92f25de63bfc7391b959.js></script><script type=text/javascript src=./static/js/vendor.71dc162eb690bf6a36a0.js></script><script type=text/javascript src=./static/js/app.49b33f10c1f62207e977.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,a,c){for(var f,d,i,u=0,b=[];u<r.length;u++)d=r[u],t[d]&&b.push(t[d][0]),t[d]=0;for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&(e[f]=a[f]);for(n&&n(r,a,c);b.length;)b.shift()();if(c)for(u=0;u<c.length;u++)i=o(o.s=c[u]);return i};var r={},t={24:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var a=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,o.nc&&c.setAttribute("nonce",o.nc),c.src=o.p+"static/js/"+e+"."+{0:"52863aa1d72d31066413",1:"0ebe3ead93207dc78a78",2:"0f901f3d599700438bb8",3:"ee2db5932cf0c94dec20",4:"42639b6df28493f31a16",5:"842d518baa251c8fedc4",6:"52e14b1f79af7d86f42f",7:"b2a85a42ddd430235a63",8:"81460c8c66d06cfea732",9:"c98145195e68a6e13faf",10:"638039a7b39908980436",11:"f27d1de28264fbbe30ff",12:"ccbc18453e41490e2dba",13:"b109164d2be44afb7733",14:"9825bb69e60b8030c230",15:"6700988b665e14f99d41",16:"915ed31249867849353a",17:"f25417e1883c9c1447d8",18:"780884c4a1f6b58000f8",19:"2d360187148e631a1193",20:"2d4182c658605d675867",21:"55879284ad4d1f03fbe0"}[e]+".js";var f=setTimeout(d,12e4);function d(){c.onerror=c.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=d,a.appendChild(c),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,o,c){for(var f,d,i,u=0,b=[];u<r.length;u++)d=r[u],t[d]&&b.push(t[d][0]),t[d]=0;for(f in o)Object.prototype.hasOwnProperty.call(o,f)&&(e[f]=o[f]);for(n&&n(r,o,c);b.length;)b.shift()();if(c)for(u=0;u<c.length;u++)i=a(a.s=c[u]);return i};var r={},t={24:0};function a(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,a){n=t[e]=[r,a]});n[2]=r;var o=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,a.nc&&c.setAttribute("nonce",a.nc),c.src=a.p+"static/js/"+e+"."+{0:"52863aa1d72d31066413",1:"0ebe3ead93207dc78a78",2:"472a1da5da6f31fb3f3a",3:"ee2db5932cf0c94dec20",4:"42639b6df28493f31a16",5:"842d518baa251c8fedc4",6:"52e14b1f79af7d86f42f",7:"b2a85a42ddd430235a63",8:"81460c8c66d06cfea732",9:"c98145195e68a6e13faf",10:"638039a7b39908980436",11:"f27d1de28264fbbe30ff",12:"ccbc18453e41490e2dba",13:"b109164d2be44afb7733",14:"9825bb69e60b8030c230",15:"6700988b665e14f99d41",16:"915ed31249867849353a",17:"f25417e1883c9c1447d8",18:"780884c4a1f6b58000f8",19:"2d360187148e631a1193",20:"2d4182c658605d675867",21:"55879284ad4d1f03fbe0"}[e]+".js";var f=setTimeout(d,12e4);function d(){c.onerror=c.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=d,o.appendChild(c),r},a.m=e,a.c=r,a.d=function(e,n,r){a.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},a.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(n,"a",n),n},a.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},a.p="./",a.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-08-14 16:52:02 * @Date: 2019-08-14 16:52:02
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2019-10-09 11:12:38 * @LastEditTime: 2019-11-05 15:14:31
--> -->
<!-- <!--
<back-constant :itemData="itemData" :interfaceType="interfaceType"></back-constant> <back-constant :itemData="itemData" :interfaceType="interfaceType"></back-constant>
...@@ -30,6 +30,9 @@ import backConstant from '@/components/createApi/back-constant.vue'; ...@@ -30,6 +30,9 @@ import backConstant from '@/components/createApi/back-constant.vue';
<th colspan="1" rowspan="1" class="el-table_1_column_4 is-leaf"> <th colspan="1" rowspan="1" class="el-table_1_column_4 is-leaf">
<div class="cell">参数值</div> <div class="cell">参数值</div>
</th> </th>
<th v-if="interfaceType == 1" colspan="1" rowspan="1" class="el-table_1_column_4 is-leaf">
<div class="cell">排序</div>
</th>
<th colspan="1" rowspan="1" class="el-table_1_column_7 is-leaf"> <th colspan="1" rowspan="1" class="el-table_1_column_7 is-leaf">
<div class="cell">操作</div> <div class="cell">操作</div>
</th> </th>
...@@ -73,6 +76,11 @@ import backConstant from '@/components/createApi/back-constant.vue'; ...@@ -73,6 +76,11 @@ import backConstant from '@/components/createApi/back-constant.vue';
<el-input v-model="itemValue.defaultVal" placeholder="默认值"></el-input> <el-input v-model="itemValue.defaultVal" placeholder="默认值"></el-input>
</div> </div>
</td> </td>
<td v-if="interfaceType == 1" rowspan="1" colspan="1" class="el-table_1_column_3">
<div class="cell el-tooltip">
<el-input v-model="itemValue.sort" placeholder="请输入排序"></el-input>
</div>
</td>
<td rowspan="1" colspan="1" class="el-table_1_column_3"> <td rowspan="1" colspan="1" class="el-table_1_column_3">
<div class="cell"> <div class="cell">
<el-button type="text" @click="handleDel(itemValue, itemName, index)">删除</el-button> <el-button type="text" @click="handleDel(itemValue, itemName, index)">删除</el-button>
...@@ -118,7 +126,7 @@ export default { ...@@ -118,7 +126,7 @@ export default {
currentKey: 'name', currentKey: 'name',
isBackendField: 1, //是否后端字段 isBackendField: 1, //是否后端字段
defaultVal: 'val', //默认值 defaultVal: 'val', //默认值
isRootKey: 0, //是否是后端参数字段 isRootKey: 1, //是否是后端参数字段
isRootKeyFlag: false, // 是否是后端参数字段 check isRootKeyFlag: false, // 是否是后端参数字段 check
rootKey: '', //后端参数字段 rootKey: '', //后端参数字段
objectClass: '', //如果是object 并且是dubbo objectClass: '', //如果是object 并且是dubbo
...@@ -137,6 +145,7 @@ export default { ...@@ -137,6 +145,7 @@ export default {
*/ */
blurKey(obj, oldKey) { blurKey(obj, oldKey) {
const that = this; const that = this;
obj.rootKey = obj.currentKey;
if (obj.currentKey != oldKey) { if (obj.currentKey != oldKey) {
that.$set(that.itemData.properties, obj.currentKey, obj); that.$set(that.itemData.properties, obj.currentKey, obj);
that.$delete(that.itemData.properties, oldKey); that.$delete(that.itemData.properties, oldKey);
...@@ -163,13 +172,14 @@ export default { ...@@ -163,13 +172,14 @@ export default {
constFlag: true, constFlag: true,
isBackendField: 1, //是否后端字段 isBackendField: 1, //是否后端字段
defaultVal: '', //默认值 defaultVal: '', //默认值
isRootKey: 0, //是否是后端参数字段 isRootKey: 1, //是否是后端参数字段
isRootKeyFlag: false, // 是否是后端参数字段 check isRootKeyFlag: false, // 是否是后端参数字段 check
rootKey: '', //后端参数字段 rootKey: 'field' + length, //后端参数字段
objectClass: '', //如果是object 并且是dubbo objectClass: '', //如果是object 并且是dubbo
description: '描述', description: '描述',
example: '示例', example: '示例',
check: true check: true,
sort: ''
}); });
} }
}, },
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-08-07 15:46:43 * @Date: 2019-08-07 15:46:43
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2019-10-14 11:33:47 * @LastEditTime: 2019-11-05 15:00:15
--> -->
<!-- <!--
<create-base></create-base> <create-base></create-base>
...@@ -172,7 +172,8 @@ export default { ...@@ -172,7 +172,8 @@ export default {
properties: {} properties: {}
}; };
for (let key in allData.endParams.properties) { for (let key in allData.endParams.properties) {
if (allData.endParams.properties[key].constFlag == true) { if (allData.endParams.properties[key].constFlag) {
allData.endParams.properties[key].constFlag = allData.endParams.properties[key].constFlag ? true : false;
that.$set(newObj.properties, allData.endParams.properties[key].currentKey, allData.endParams.properties[key]); that.$set(newObj.properties, allData.endParams.properties[key].currentKey, allData.endParams.properties[key]);
} }
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-08-16 10:02:07 * @Date: 2019-08-16 10:02:07
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2019-10-18 16:25:16 * @LastEditTime: 2019-11-05 15:08:54
--> -->
<!-- <!--
<create-result></create-result> <create-result></create-result>
...@@ -336,6 +336,7 @@ export default { ...@@ -336,6 +336,7 @@ export default {
}; };
let back = JSON.parse(JSON.stringify(that.$store.state.backInfo)); let back = JSON.parse(JSON.stringify(that.$store.state.backInfo));
let front = JSON.parse(JSON.stringify(that.$store.state.frontInfo)); let front = JSON.parse(JSON.stringify(that.$store.state.frontInfo));
// 重新设置 isRootKey: true-->1,false--->0 // 重新设置 isRootKey: true-->1,false--->0
if (Object.keys(back.backQueryData.properties).length) { if (Object.keys(back.backQueryData.properties).length) {
for (const key in back.backQueryData.properties) { for (const key in back.backQueryData.properties) {
...@@ -373,6 +374,15 @@ export default { ...@@ -373,6 +374,15 @@ export default {
if (front.requestType == 'POST' && front.frontBodyType == 'form') { if (front.requestType == 'POST' && front.frontBodyType == 'form') {
obj.properties = Object.assign(back.backQueryData.properties, back.backHeaderData.properties, back.backBodyFormData.properties, back.constData.properties); obj.properties = Object.assign(back.backQueryData.properties, back.backHeaderData.properties, back.backBodyFormData.properties, back.constData.properties);
} }
// 后端常量
if (Object.keys(back.constData.properties).length) {
for (const key in back.constData.properties) {
back.constData.properties[key].isRootKey = 1;
back.constData.properties[key].rootKey = back.constData.properties[key].currentKey;
back.constData.properties[key].constFlag = back.constData.properties[key].constFlag ? 1 : 0;
}
}
// required // required
if (Object.keys(obj.properties).length) { if (Object.keys(obj.properties).length) {
obj.required = []; obj.required = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment