|
@@ -0,0 +1,263 @@
|
|
|
+<template>
|
|
|
+ <div class="column">
|
|
|
+ <div class="Layout">
|
|
|
+ <div class="titFont" style="padding: 15px 0; font-size: 22px; font-family:PingFangSC-Medium,PingFang SC;font-weight:500; color:rgba(51,59,74,1); line-height:35px;">接口目录 </div>
|
|
|
+ <el-input v-model="value" style="width: 25%;" size="small" prefix-icon="el-icon-search" clearable filterable placeholder="请搜索接口" />
|
|
|
+ </div>
|
|
|
+ <el-divider style="color: #EEF0F5;" />
|
|
|
+ <div v-for="item of arr" :key="item">
|
|
|
+ <p class="choice" style="font-size:14px; font-family:MicrosoftYaHei; line-height:19px; cursor: pointer;">{{ item }}</p>
|
|
|
+ </div>
|
|
|
+ <div class="titDiv">
|
|
|
+ <div class="titIcon" />
|
|
|
+ <div class="titSonName">{{ arr[0] }}</div>
|
|
|
+ </div>
|
|
|
+ <p style="font-size:14px; font-family:MicrosoftYaHei; color:rgba(51,51,51,1); line-height:19px;">com.kuaidadi.liangjian.order.api.PassRemoteService</p>
|
|
|
+ <el-table
|
|
|
+ :data="tableData1"
|
|
|
+ style="width: 100%"
|
|
|
+ row-key="id"
|
|
|
+ border
|
|
|
+ lazy
|
|
|
+ :load="load"
|
|
|
+ :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ prop="date"
|
|
|
+ label="方法名"
|
|
|
+ width="180"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="name"
|
|
|
+ label="方法描述"
|
|
|
+ width="180"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="入参列表"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="返回值列表"
|
|
|
+ />
|
|
|
+ </el-table>
|
|
|
+ <div class="titFont" style="padding: 15px 0; font-size: 22px; font-family:PingFangSC-Medium,PingFang SC;font-weight:500; color:rgba(51,59,74,1); line-height:35px;">Estim 预估接口 </div>
|
|
|
+ <el-divider style="color: #EEF0F5; margin: 0 !important" />
|
|
|
+ <div class="titDiv">
|
|
|
+ <div class="titIcon" />
|
|
|
+ <div class="titSonName">请求</div>
|
|
|
+ </div>
|
|
|
+ <p style="text-align: right;font-size:14px; font-family:MicrosoftYaHei; color:rgba(64,158,255,1); cursor: pointer; line-height:19px;" @click="centerDialogVisible = true">样例数据</p>
|
|
|
+ <el-table
|
|
|
+ :data="tableData1"
|
|
|
+ style="width: 100%"
|
|
|
+ row-key="id"
|
|
|
+ border
|
|
|
+ lazy
|
|
|
+ :load="load"
|
|
|
+ :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ prop="date"
|
|
|
+ label="层级"
|
|
|
+ width="180"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="name"
|
|
|
+ label="参数名"
|
|
|
+ width="180"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="参数类型"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="参数说明"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="是否必填"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="默认值"
|
|
|
+ />
|
|
|
+ </el-table>
|
|
|
+ <div class="titDiv">
|
|
|
+ <div class="titIcon" />
|
|
|
+ <div class="titSonName">返回值</div>
|
|
|
+ </div>
|
|
|
+ <p style="text-align: right;font-size:14px; font-family:MicrosoftYaHei; cursor: pointer; color:rgba(64,158,255,1); line-height:19px;" @click="centerDialogVisible = true">样例数据</p>
|
|
|
+ <el-table
|
|
|
+ :data="tableData1"
|
|
|
+ style="width: 100%"
|
|
|
+ row-key="id"
|
|
|
+ border
|
|
|
+ lazy
|
|
|
+ :load="load"
|
|
|
+ :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ prop="date"
|
|
|
+ label="层级"
|
|
|
+ width="180"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="name"
|
|
|
+ label="参数名"
|
|
|
+ width="180"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="参数类型"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="参数说明"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="是否必填"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="默认值"
|
|
|
+ />
|
|
|
+ </el-table>
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="centerDialogVisible"
|
|
|
+ width="60%"
|
|
|
+ center
|
|
|
+ >
|
|
|
+ <div style="display: flex; margin-bottom: 20px;">
|
|
|
+ <div class="titIcon" />
|
|
|
+ <div class="titSonName">样例数据</div>
|
|
|
+ </div>
|
|
|
+ <div class="Layout">
|
|
|
+ <span style="width: 80px;font-size:16px; font-family:PingFangSC-Regular,PingFang SC; font-weight:400; color:rgba(51,59,74,1);margin-bottom: auto;">样例数据</span>
|
|
|
+ <el-input
|
|
|
+ v-model="textarea2"
|
|
|
+ type="textarea"
|
|
|
+ :autosize="{ minRows: 15, maxRows: 15}"
|
|
|
+ :placeholder="didi"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import '@/views/apiManagement/css/index.css'
|
|
|
+
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ didi: '{ "code":200, "data":{ "orderDetailResult":{ "startPosAddr":"", "endPosName":"河滨之城", "endLng":120.164301, "passengerId":299069687413522, "publishPosAddr":"", "startCityId":0, "originalTotalMoney":0.01, "sendType":1, "publishLng":120.15798569, "fromChannel":1, "voucherAmount":0, "recipient":"小桔", "driverPayType":0, "passengerContactMob":"18605666666", "publishLat":30.28892124, "extraInfo":"馥芮白", "endLat":30.272421, "startCountryId":0, "orderId":5786944445359890, "publishContactMob":"00016013745", "publishTime":1583681227510, "endCityId":330100, "status":2000, "startLng":0, "extraData":"{"productDetail":"星巴克","extraInfo":"馥芮白"}", "endPosAddr":"6单元1602", "startPosName":"", "endCountryId":330103, "productDetail":"星巴克", "totalFee":0.01, "payStatus":0, "startLat":0, "feeItems":[ { "money":0.01, "label":"跑腿费", "type":10 } ], "payType":0, "bizType":0, "serviceCategory":613, "publishPosName":"" } }, "msg":"SUCCESS" }',
|
|
|
+ value: '',
|
|
|
+ centerDialogVisible: false,
|
|
|
+ tableData: [{
|
|
|
+ id: 1,
|
|
|
+ date: '2016-05-02',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路'
|
|
|
+ }, {
|
|
|
+ id: 2,
|
|
|
+ date: '2016-05-04',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路'
|
|
|
+ }, {
|
|
|
+ id: 3,
|
|
|
+ date: '2016-05-01',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路',
|
|
|
+ children: [{
|
|
|
+ id: 31,
|
|
|
+ date: '2016-05-01',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路'
|
|
|
+ }, {
|
|
|
+ id: 32,
|
|
|
+ date: '2016-05-01',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路'
|
|
|
+ }]
|
|
|
+ }, {
|
|
|
+ id: 4,
|
|
|
+ date: '2016-05-03',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路'
|
|
|
+ }],
|
|
|
+ tableData1: [{
|
|
|
+ id: 1,
|
|
|
+ date: '2016-05-02',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路'
|
|
|
+ }, {
|
|
|
+ id: 2,
|
|
|
+ date: '2016-05-04',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路'
|
|
|
+ }, {
|
|
|
+ id: 3,
|
|
|
+ date: '2016-05-01',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路',
|
|
|
+ hasChildren: true
|
|
|
+ }, {
|
|
|
+ id: 4,
|
|
|
+ date: '2016-05-03',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路'
|
|
|
+ }],
|
|
|
+ arr: ['PassRemoteService 乘客远程服务', 'OrderVoucherRemoteService 代金券远程服务', 'PedestrianVehicleSepRemoteService 人车分离远程服务', 'SmoothMoveRemoteService 平滑移动远程服务', 'Vehicle2BOrderRemoteService B端商户远程服务', 'DriverOrderQueryRemoteService 司机订单查询远程服务']
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getLsit(this.didi)
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init(e, ele) {
|
|
|
+ console.log(e)
|
|
|
+ },
|
|
|
+ getLsit: function(jsonStr) {
|
|
|
+ var res = ''
|
|
|
+ for (var i = 0, j = 0, k = 0, ii, ele; i < jsonStr.length; i++) { // k:缩进,j:""个数
|
|
|
+ ele = jsonStr.charAt(i)
|
|
|
+ if (j % 2 === 0 && ele === '}') {
|
|
|
+ k--
|
|
|
+ for (ii = 0; ii < k; ii++) ele = ' ' + ele
|
|
|
+ ele = '\n' + ele
|
|
|
+ } else if (j % 2 === 0 && ele === '{') {
|
|
|
+ ele += '\n'
|
|
|
+ k++
|
|
|
+ for (ii = 0; ii < k; ii++) ele += ' '
|
|
|
+ } else if (j % 2 === 0 && ele === ',') {
|
|
|
+ ele += '\n'
|
|
|
+ for (ii = 0; ii < k; ii++) ele += ' '
|
|
|
+ } else if (ele === '"') j++
|
|
|
+ res += ele
|
|
|
+ }
|
|
|
+ // eslint-disable-next-line no-return-assign
|
|
|
+ return this.didi = res
|
|
|
+ },
|
|
|
+ load(tree, treeNode, resolve) {
|
|
|
+ setTimeout(() => {
|
|
|
+ resolve([
|
|
|
+ {
|
|
|
+ id: 31,
|
|
|
+ date: '2016-05-01',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路 1519 弄'
|
|
|
+ }, {
|
|
|
+ id: 32,
|
|
|
+ date: '2016-05-01',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路 1519 弄'
|
|
|
+ }
|
|
|
+ ])
|
|
|
+ }, 1000)
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|