Commit 2ac82934 by 胡悦

联调

1 parent 9ce58a0b
/*
* @Author: your name
* @Date: 2022-02-17 14:09:26
* @LastEditTime: 2022-02-17 14:48:17
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-wechat\src\api\modules\appConfig.js
*/
import { http } from '@/main'
const PATH = '/rop-scrm-wechat/router'
const agentList = params => {
params.method = 'scrm.api.work.wechat.agent.list.customized.agent.with.page'
return http({
url: PATH,
method: 'GET',
data: params,
sign: true
})
}
const getAgentInfo = params => {
params.method = 'scrm.api.work.wechat.agent.get.customized.by.appid'
return http({
url: PATH,
method: 'GET',
data: params,
sign: true
})
}
export default {
agentList,
getAgentInfo
}
\ No newline at end of file \ No newline at end of file
...@@ -12,4 +12,17 @@ $base-color: '#5850FF'; ...@@ -12,4 +12,17 @@ $base-color: '#5850FF';
margin-top: 3px; margin-top: 3px;
margin-left: 6px; margin-left: 6px;
} }
}
\ No newline at end of file \ No newline at end of file
}
.footer-panel {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
width: 100%;
bottom: 0px;
height: 64px;
background: #ffffff;
z-index: 999;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
\ No newline at end of file \ No newline at end of file
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
</el-input> </el-input>
<slot :name="item.suffixSlot" :scope="item"></slot> <slot :name="item.suffixSlot" :scope="item"></slot>
</div> </div>
<div v-else-if="item.type == 'typeNumber'">
<el-input :size="size" v-model.trim="formObj[item.name]" onkeyup="value=value.replace(/[^\d]/g,'')" :placeholder="item.placeholder || '请输入' + item.label" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'"></el-input>
</div>
<!-- 选择-输入框 --> <!-- 选择-输入框 -->
<!-- <el-input v-else-if="item.type === 'selectInput'" :placeholder="'请输入' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label" :maxlength="item.maxlength" v-model.trim="searchSelectObj[item.selectName].value" :clearable="item.isClear || false" :style="{ width: item.inputWidth || defaultWidth }" class="input-with-select"> <!-- <el-input v-else-if="item.type === 'selectInput'" :placeholder="'请输入' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label" :maxlength="item.maxlength" v-model.trim="searchSelectObj[item.selectName].value" :clearable="item.isClear || false" :style="{ width: item.inputWidth || defaultWidth }" class="input-with-select">
<el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || (labelWidth + 'px') }" slot="prepend" placeholder="请选择" @change="item.handleSelectChange"> <el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || (labelWidth + 'px') }" slot="prepend" placeholder="请选择" @change="item.handleSelectChange">
......
...@@ -16,7 +16,7 @@ const staticRoutes = Object.freeze([ ...@@ -16,7 +16,7 @@ const staticRoutes = Object.freeze([
}, },
{ {
name: '', name: '',
path: '/appConfig/viewConfig', path: '/appConfig/viewConfig/:appId',
component: resolve => require([`@/views/appConfig/viewConfig.vue`], resolve), component: resolve => require([`@/views/appConfig/viewConfig.vue`], resolve),
meta: {} meta: {}
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: limin * @Author: limin
* @Date: 2021-09-23 19:02:23 * @Date: 2021-09-23 19:02:23
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2022-02-11 14:39:52 * @LastEditTime: 2022-02-18 09:59:29
* @FilePath: \scrm\scrm-sub-blog\src\setup\single.js * @FilePath: \scrm\scrm-sub-blog\src\setup\single.js
*/ */
import Vue from 'vue' import Vue from 'vue'
...@@ -24,7 +24,7 @@ export async function start() { ...@@ -24,7 +24,7 @@ export async function start() {
// .forEach(item => { // .forEach(item => {
// urlParams[item.split('=')[0]] = item.split('=')[1] // urlParams[item.split('=')[0]] = item.split('=')[1]
// }) // })
var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : 'mini-53e870b5-80d5-483e-8277-cdc4dec0ad80-rop' var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : 'scrm-base-0e4d8adf-4bd4-47a3-bf3b-f8f1e12b528c-rop'
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token } }) Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token } })
Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
render('/child/blog/', routes) render('/child/blog/', routes)
......
<!-- <!--
* @Author: huyue * @Author: huyue
* @Date: 2022-02-11 10:20:32 * @Date: 2022-02-11 10:20:32
* @LastEditTime: 2022-02-16 18:37:41 * @LastEditTime: 2022-02-18 14:22:19
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-pay\src\views\account\index.vue * @FilePath: \scrm-micro-pay\src\views\account\index.vue
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</span> </span>
</glsx-combi-form> </glsx-combi-form>
<!-- :getListApi="getListApi" --> <!-- :getListApi="getListApi" -->
<GLTable ref="accountTable" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :tableData="tableData" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun"> <GLTable ref="accountTable" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="viewConfig(scope.scope)">查看配置</el-button> <el-button type="text" @click="viewConfig(scope.scope)">查看配置</el-button>
</template> </template>
...@@ -72,8 +72,9 @@ export default { ...@@ -72,8 +72,9 @@ export default {
{ {
label: '商户号', label: '商户号',
name: 'merchantId', name: 'merchantId',
type: 'input', type: 'typeNumber',
labelWidth: 98 labelWidth: 98,
maxlength: 11
} }
], ],
searchFormData1: [ searchFormData1: [
...@@ -142,13 +143,14 @@ export default { ...@@ -142,13 +143,14 @@ export default {
merchantModel: 1, merchantModel: 1,
corpAlias: '嘀加云科技' corpAlias: '嘀加云科技'
} }
] ],
getListApi: this.$apis.appConfig.agentList
} }
}, },
mounted() {}, mounted() {},
methods: { methods: {
viewConfig(row) { viewConfig(row) {
this.$router.push('/appConfig/viewConfig/' + row.id) this.$router.push('/appConfig/viewConfig/' + row.appId)
}, },
handleSearch() { handleSearch() {
this.$refs.accountTable.refreshTable() this.$refs.accountTable.refreshTable()
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2022-02-16 18:11:11 * @Date: 2022-02-16 18:11:11
* @LastEditTime: 2022-02-16 18:36:34 * @LastEditTime: 2022-02-18 13:45:21
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-wechat\src\views\appConfig\viewConfit.vue * @FilePath: \scrm-micro-wechat\src\views\appConfig\viewConfit.vue
...@@ -15,6 +15,87 @@ ...@@ -15,6 +15,87 @@
<img src="@/assets/question.png" slot="reference" class="count-item-question" /> <img src="@/assets/question.png" slot="reference" class="count-item-question" />
</el-popover> </el-popover>
</div> </div>
<div class="config-content">
<div class="config-list">
<div class="config-title">使用配置</div>
<div class="config-item">
<div class="item-name">应用主页:</div>
<div class="item-url">
<el-input type="text" id="appHome" readonly class="url-input" v-model="configUrl.appHome"></el-input>
<span class="item-copy" @click="copyUrl('appHome')">
复制
<img src="@/assets/copy.png" alt="" />
</span>
</div>
</div>
</div>
<div class="config-list">
<div class="config-title">消息回调</div>
<div class="config-item">
<div class="item-name">消息回调URL:</div>
<div class="item-url">
<el-input type="text" id="callbackUrl" readonly class="url-input" v-model="configUrl.callbackUrl"></el-input>
<span class="item-copy" @click="copyUrl('callbackUrl')">
复制
<img src="@/assets/copy.png" alt="" />
</span>
</div>
</div>
<div class="config-item">
<div class="item-name">消息回调Token:</div>
<div class="item-url">
<el-input type="text" id="token" readonly class="url-input" v-model="configUrl.token"></el-input>
<span class="item-copy" @click="copyUrl('token')">
复制
<img src="@/assets/copy.png" alt="" />
</span>
</div>
</div>
<div class="config-item">
<div class="item-name">消息回调EncodingAESKey:</div>
<div class="item-url">
<el-input type="text" id="encodingAesKey" readonly class="url-input" v-model="configUrl.encodingAesKey"></el-input>
<span class="item-copy" @click="copyUrl('encodingAesKey')">
复制
<img src="@/assets/copy.png" alt="" />
</span>
</div>
</div>
</div>
<div class="config-list">
<div class="config-title">应用菜单</div>
<div class="config-item" v-for="(item, index) in configUrl.agentMenuList" :key="index">
<div class="item-name">{{ item.name }}:</div>
<div class="item-url">
<el-input type="text" :id="item.name" readonly class="url-input" v-model="item.url"></el-input>
<span class="item-copy" @click="copyUrl(item.name)">
复制
<img src="@/assets/copy.png" alt="" />
</span>
</div>
</div>
<!-- <div class="config-item">
<div class="item-name">工作台:</div>
<div class="item-url">
<el-input type="text" readonly class="url-input" v-model="configUrl.callbackUrl"></el-input>
http://scrm.test.glsx.com.cn/settings/account/index
<span class="item-copy">
复制
<img src="@/assets/copy.png" alt="" />
</span>
</div>
</div> -->
</div>
</div>
<div
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<el-button type="primary" @click="handleCancel">取消</el-button>
</div>
</div> </div>
</template> </template>
...@@ -22,16 +103,118 @@ ...@@ -22,16 +103,118 @@
export default { export default {
name: 'ViewConfig', name: 'ViewConfig',
data() { data() {
return {} return {
appId: this.$route.params.appId,
configUrl: {
agentMenuList: []
}
}
}, },
created() { created() {
console.log(this.$route.params.id) this.getConfig(this.appId)
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
},
methods: {
async getConfig(appId) {
let configData = await this.$apis.appConfig.getAgentInfo({ appId })
this.$set(this, 'configUrl', configData)
},
copyUrl(id) {
var idVal = document.getElementById(id)
idVal.select()
document.execCommand('copy')
},
handleCancel() {
this.$router.go(-1)
}
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.config-container { .config {
&-container {
margin: 20px; margin: 20px;
}
&-content {
margin-top: 20px;
padding: 20px;
background-color: #fff;
}
&-title {
position: relative;
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 28px;
margin-left: 16px;
&::before {
content: '';
display: inline-block;
position: absolute;
left: -16px;
top: 50%;
transform: translateY(-50%);
width: 4px;
height: 4px;
background-color: #5850ff;
border-radius: 50%;
}
}
&-list {
margin-bottom: 20px;
}
&-item {
margin-top: 20px;
margin-left: 16px;
font-weight: 400;
.item-name {
line-height: 20px;
color: #333333;
font-size: 14px;
margin-bottom: 10px;
}
.item-url {
position: relative;
width: 552px;
// overflow-x: auto;
// height: 36px;
// border: 1px solid #dce5ed;
font-size: 14px;
color: #999999;
// line-height: 36px;
// padding: 0 8px;
}
.url-input {
/deep/ {
.el-input__inner {
padding-right: 66px !important;
}
}
}
.item-copy {
position: absolute;
height: calc(100% - 2px);
right: 10px;
top: 50%;
transform: translateY(-50%);
color: #5850ff;
line-height: 20px;
display: inline-flex;
align-items: center;
background-color: #fff;
padding-left: 5px;
cursor: pointer;
img {
margin-left: 4px;
}
}
}
} }
</style> </style>
<style lang="scss">
</style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!