Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2bc81abe
authored
Mar 01, 2022
by
姜鹏凯
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
配置
1 parent
04e7b9cc
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
239 additions
and
84 deletions
linkwe-ui/src/assets/image/success.png
linkwe-ui/src/views/enterpriseWechat/list.vue
linkwe-ui/src/views/enterpriseWechat/part1.vue
linkwe-ui/src/views/enterpriseWechat/part2.vue
linkwe-ui/src/views/enterpriseWechat/part3.vue
linkwe-ui/src/views/enterpriseWechat/part4.vue
linkwe-ui/src/assets/image/success.png
0 → 100644
View file @
2bc81ab
6.93 KB
linkwe-ui/src/views/enterpriseWechat/list.vue
View file @
2bc81ab
...
...
@@ -5,13 +5,13 @@
<part1
@
submit=
"savePart1"
:data=
"form"
></part1>
</el-tab-pane>
<el-tab-pane
label=
"应用配置"
name=
"2"
>
<part2></part2>
<part2
@
submit=
"savePart1"
:data=
"form"
></part2>
</el-tab-pane>
<el-tab-pane
label=
"客服配置"
name=
"3"
>
<part3></part3>
<part3
@
submit=
"savePart1"
:data=
"form"
></part3>
</el-tab-pane>
<el-tab-pane
label=
"支付配置"
name=
"4"
>
<part4></part4>
<part4
@
submit=
"savePart1"
:data=
"form"
></part4>
</el-tab-pane>
</el-tabs>
</div>
...
...
linkwe-ui/src/views/enterpriseWechat/part1.vue
View file @
2bc81ab
...
...
@@ -24,19 +24,14 @@
</div>
<el-form-item
label=
"通讯录Secret:"
prop=
"corpSecret"
>
<div>
<el-input
style=
"width: 40%;"
type=
"password
"
v-model=
"form.corpSecret"
placeholder=
"请输入通讯录Secret"
></el-input>
<
!--
<el-button
style=
"margin-left:20px;"
plain
>
取消
</el-button>
<el-button
type=
"primary"
plain
>
保存
</el-button>
--
>
<
!--
<el-button
type=
"primary"
plain
v-if=
"form.corpSecret"
>
修改
</el-button>
--
>
<el-input
:disabled=
"!corpSecretEditState"
style=
"width: 40%;"
:type=
"corpSecretEditState ? 'text':'password'
"
v-model=
"form.corpSecret"
placeholder=
"请输入通讯录Secret"
></el-input>
<
el-button
style=
"margin-left:20px;"
plain
v-if=
"corpSecretEditState"
@
click=
"cancelEditCorpSecret"
>
取消
</el-button>
<el-button
type=
"primary"
plain
v-if=
"corpSecretEditState"
@
click=
"submitEditCorpSecret"
>
保存
</el-button
>
<
el-button
type=
"primary"
style=
"margin-left:20px;"
plain
v-if=
"!corpSecretEditState && form.corpSecret"
@
click=
"editCorpSecret"
>
修改
</el-button
>
</div>
<div
class=
"tips"
>
用于同步企微通讯录,在企微后台->管理工具->通讯录同步中获取
</div>
</el-form-item>
<el-form-item
label=
"Token:"
required
prop=
""
>
<el-input
style=
"width: 40%;"
placeholder=
"请输入Token"
></el-input>
</el-form-item>
<el-form-item
label=
"EncodingAESKey:"
required
prop=
""
>
<el-input
style=
"width: 40%;"
placeholder=
"请输入EncodingAESKey"
></el-input>
</el-form-item>
</div>
<div
class=
"g-card g-pad20"
>
<div
class=
"my-title"
>
...
...
@@ -44,18 +39,23 @@
</div>
<el-form-item
label=
"客户联系Secret:"
prop=
"contactSecret"
>
<div>
<el-input
style=
"width: 40%;"
v-model=
"form.contactSecret"
placeholder=
"请输入客户联系Secret"
></el-input>
<el-button
style=
"margin-left:20px;"
plain
>
取消
</el-button>
<el-button
type=
"primary"
plain
>
保存
</el-button>
<
!--
<el-button
type=
"primary"
plain
v-if=
"form.corpSecret"
>
修改
</el-button>
--
>
<el-input
style=
"width: 40%;"
:type=
"contactSecretEditState ? 'text':'password'"
v-model=
"form.contactSecret"
placeholder=
"请输入客户联系Secret"
></el-input>
<el-button
style=
"margin-left:20px;"
plain
v-if=
"contactSecretEditState"
@
click=
"cancelEditContactSecret"
>
取消
</el-button>
<el-button
type=
"primary"
plain
v-if=
"contactSecretEditState"
@
click=
"submitEditContactSecret"
>
保存
</el-button>
<
el-button
type=
"primary"
style=
"margin-left:20px;"
plain
v-if=
"!contactSecretEditState && form.contactSecret"
@
click=
"editContactSecret"
>
修改
</el-button
>
</div>
<div
class=
"tips"
>
用于管理客户和联系客户,在企微后台->客户联系->客户 API中获取
</div>
</el-form-item>
<el-form-item
label=
"Token:"
prop=
""
>
<el-input
style=
"width: 40%;"
v-model=
"form.companyName"
placeholder=
"请输入Token"
></el-input>
</div>
<div
class=
"g-card g-pad20"
>
<div
class=
"my-title"
>
回调配置
</div>
<el-form-item
label=
"Token:"
prop=
"token"
>
<el-input
style=
"width: 40%;"
v-model=
"form.token"
placeholder=
"请输入Token"
></el-input>
</el-form-item>
<el-form-item
label=
"EncodingAESKey:"
prop=
""
>
<el-input
style=
"width: 40%;"
v-model=
"form.
companyName
"
placeholder=
"请输入EncodingAESKey"
></el-input>
<el-form-item
label=
"EncodingAESKey:"
prop=
"
encodingAesKey
"
>
<el-input
style=
"width: 40%;"
v-model=
"form.
encodingAesKey
"
placeholder=
"请输入EncodingAESKey"
></el-input>
</el-form-item>
</div>
<el-form-item
label=
""
class=
"ar"
>
...
...
@@ -70,16 +70,20 @@
name
:
'enterprise-wechat-part1'
,
data
()
{
return
{
corpSecretCopy
:
''
,
corpSecretEditState
:
false
,
contactSecretCopey
:
''
,
contactSecretEditState
:
false
,
form
:
{
},
rules
:
{
corpId
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
corpSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
agentId
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
agentSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
companyName
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
contactSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
seasRedirectUrl
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
sopTagRedirectUrl
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}]
logoUrl
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
token
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
encodingAesKey
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
}
}
},
...
...
@@ -93,13 +97,48 @@
}
},
methods
:
{
editContactSecret
()
{
this
.
contactSecretEditState
=
true
this
.
contactSecretCopy
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
.
contactSecret
))
this
.
form
.
contactSecret
=
''
},
cancelEditContactSecret
()
{
this
.
contactSecretEditState
=
false
this
.
form
.
contactSecret
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
contactSecretCopy
))
},
submitEditContactSecret
()
{
if
(
this
.
form
.
contactSecret
)
{
this
.
$emit
(
'submit'
,
this
.
form
)
this
.
contactSecretEditState
=
false
}
},
editCorpSecret
()
{
this
.
corpSecretEditState
=
true
this
.
corpSecretCopy
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
.
corpSecret
))
this
.
form
.
corpSecret
=
''
},
cancelEditCorpSecret
()
{
this
.
corpSecretEditState
=
false
this
.
form
.
corpSecret
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
corpSecretCopy
))
},
submitEditCorpSecret
()
{
if
(
this
.
form
.
corpSecret
)
{
this
.
$emit
(
'submit'
,
this
.
form
)
this
.
corpSecretEditState
=
false
}
},
submit
()
{
this
.
$emit
(
'submit'
,
this
.
form
)
this
.
$refs
[
'form'
].
validate
(
validate
=>
{
if
(
validate
)
{
this
.
$emit
(
'submit'
,
this
.
form
)
}
})
},
setData
()
{
if
(
Object
.
keys
(
this
.
data
).
length
)
{
this
.
form
=
this
.
data
// this.$forceUpdate();
}
}
},
...
...
linkwe-ui/src/views/enterpriseWechat/part2.vue
View file @
2bc81ab
...
...
@@ -6,15 +6,16 @@
自建应用
</div>
<el-form-item
label=
"消息应用ID:"
prop=
"agentId"
>
<el-input
v-model=
"form.agentId"
placeholder=
"请输入消息应用ID"
></el-input>
<el-input
style=
"width: 40%;"
v-model=
"form.agentId"
placeholder=
"请输入消息应用ID"
></el-input>
<div
class=
"tips"
>
用于接收应用消息,在企微后台->应用工具->自建应用中配置并获取
</div>
</el-form-item>
<el-form-item
label=
"消息应用Secret:"
prop=
"agentSecret"
>
<div>
<el-input
style=
"width: 40%;"
type=
"password"
v-model=
"form.agentSecret"
placeholder=
"请输入消息应用Secret"
></el-input>
<el-button
style=
"margin-left:20px;"
plain
>
取消
</el-button>
<el-button
type=
"primary"
plain
>
保存
</el-button>
<!--
<el-button
type=
"primary"
plain
v-if=
"form.corpSecret"
>
修改
</el-button>
-->
<el-input
style=
"width: 40%;"
:disabled=
"!agentSecretEditState"
:type=
"agentSecretEditState ? 'text':'password'"
v-model=
"form.agentSecret"
placeholder=
"请输入消息应用Secret"
></el-input>
<el-button
style=
"margin-left:20px;"
plain
v-if=
"agentSecretEditState"
@
click=
"cancelEditAgentSecret"
>
取消
</el-button>
<el-button
type=
"primary"
plain
v-if=
"agentSecretEditState"
@
click=
"submitEditAgentSecret"
>
保存
</el-button>
<el-button
type=
"primary"
style=
"margin-left:20px;"
plain
v-if=
"!agentSecretEditState && form.agentSecret"
@
click=
"editAgentSecret"
>
修改
</el-button>
</div>
<div
class=
"tips"
>
用于接收应用消息,在企微后台->应用工具->自建应用中配置并获取
</div>
</el-form-item>
...
...
@@ -25,15 +26,16 @@
</div>
<el-form-item
label=
"会话存档Secret:"
prop=
"chatSecret"
>
<div>
<el-input
style=
"width: 40%;"
v-model=
"form.chatSecret"
placeholder=
"请输入会话存档Secret"
></el-input>
<el-button
style=
"margin-left:20px;"
plain
>
取消
</el-button>
<el-button
type=
"primary"
plain
>
保存
</el-button>
<!--
<el-button
type=
"primary"
plain
v-if=
"form.corpSecret"
>
修改
</el-button>
-->
<el-input
style=
"width: 40%;"
:disabled=
"!chatSecretEditState"
:type=
"chatSecretEditState ? 'text':'password'"
v-model=
"form.chatSecret"
placeholder=
"请输入会话存档Secret"
></el-input>
<el-button
style=
"margin-left:20px;"
plain
v-if=
"chatSecretEditState"
@
click=
"cancelEditChatSecret"
>
取消
</el-button>
<el-button
type=
"primary"
plain
v-if=
"chatSecretEditState"
@
click=
"submitEditChatSecret"
>
保存
</el-button>
<el-button
type=
"primary"
style=
"margin-left:20px;"
plain
v-if=
"!chatSecretEditState && form.chatSecret"
@
click=
"editChatSecret"
>
修改
</el-button>
</div>
<div
class=
"tips"
>
用于同步企微会话,在企微后台->管理工具->会话存档中获取
</div>
</el-form-item>
<el-form-item
label=
"消息加密公钥:"
prop=
""
>
<el-input
style=
"width: 40%;"
v-model=
"form.
companyName
"
placeholder=
"请输入消息加密公钥"
></el-input>
<el-form-item
label=
"消息加密公钥:"
prop=
"
financePrivateKey
"
>
<el-input
style=
"width: 40%;"
v-model=
"form.
financePrivateKey
"
placeholder=
"请输入消息加密公钥"
></el-input>
<div
class=
"tips"
>
用于同步企微会话,在企微后台->管理工具->会话存档中获取
</div>
</el-form-item>
</div>
...
...
@@ -48,25 +50,74 @@
name
:
'enterprise-wechat-part2'
,
data
()
{
return
{
agentSecretCopy
:
''
,
agentSecretEditState
:
false
,
chatSecretCopy
:
''
,
chatSecretEditState
:
false
,
form
:
{
agentId
:
''
,
agentSecret
:
''
,
chatSecret
:
''
},
rules
:
{
agentId
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
agentSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
chatSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
seasRedirectUrl
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
sopTagRedirectUrl
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}]
financePrivateKey
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
//
seasRedirectUrl: [{ required: true, message: '必填项', trigger: 'blur' }],
//
sopTagRedirectUrl: [{ required: true, message: '必填项', trigger: 'blur' }]
}
}
},
watch
:
{
data
:
'setData'
,
},
props
:
{
data
:
{
type
:
Object
,
default
:
{}
}
},
methods
:
{
submit
()
{
editAgentSecret
()
{
this
.
agentSecretEditState
=
true
this
.
agentSecretCopy
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
.
agentSecret
))
this
.
form
.
agentSecret
=
''
},
cancelEditAgentSecret
()
{
this
.
agentSecretEditState
=
false
this
.
form
.
agentSecret
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
agentSecretCopy
))
},
submitEditAgentSecret
()
{
if
(
this
.
form
.
agentSecret
)
{
this
.
$emit
(
'submit'
,
this
.
form
)
this
.
agentSecretEditState
=
false
}
},
editChatSecret
()
{
this
.
chatSecretEditState
=
true
this
.
chatSecretCopy
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
.
chatSecret
))
this
.
form
.
chatSecret
=
''
},
cancelEditChatSecret
()
{
this
.
chatSecretEditState
=
false
this
.
form
.
chatSecret
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
chatSecretCopy
))
},
submitEditChatSecret
()
{
if
(
this
.
form
.
chatSecret
)
{
this
.
$emit
(
'submit'
,
this
.
form
)
this
.
chatSecretEditState
=
false
}
},
submit
()
{
this
.
$refs
[
'form'
].
validate
(
validate
=>
{
if
(
validate
)
{
this
.
$emit
(
'submit'
,
this
.
form
)
}
})
},
setData
()
{
if
(
Object
.
keys
(
this
.
data
).
length
)
{
this
.
form
=
this
.
data
}
}
},
mounted
()
{
...
...
linkwe-ui/src/views/enterpriseWechat/part3.vue
View file @
2bc81ab
...
...
@@ -5,25 +5,24 @@
<div
class=
"my-title"
>
微信客服
</div>
<el-form-item
label=
"微信客服Secret:"
prop=
"
corp
Secret"
>
<el-form-item
label=
"微信客服Secret:"
prop=
"
kf
Secret"
>
<div>
<el-input
style=
"width: 40%;"
type=
"password"
v-model=
"form.corp
Secret"
placeholder=
"请输入微信客服Secret"
></el-input>
<el-button
style=
"margin-left:20px;"
plain
>
取消
</el-button>
<el-button
type=
"primary"
plain
>
保存
</el-button>
<
!--
<el-button
type=
"primary"
plain
v-if=
"form.corpSecret"
>
修改
</el-button>
--
>
<el-input
style=
"width: 40%;"
:disabled=
"!kfSecretEditState"
:type=
"kfSecretEditState ? 'text':'password'"
v-model=
"form.kf
Secret"
placeholder=
"请输入微信客服Secret"
></el-input>
<el-button
style=
"margin-left:20px;"
plain
v-if=
"kfSecretEditState"
@
click=
"cancelEditKfSecret"
>
取消
</el-button>
<el-button
type=
"primary"
plain
v-if=
"kfSecretEditState"
@
click=
"submitEditKfSecret"
>
保存
</el-button>
<
el-button
type=
"primary"
style=
"margin-left:20px;"
plain
v-if=
"!kfSecretEditState && form.kfSecret"
@
click=
"editKfSecret"
>
修改
</el-button
>
</div>
<div
class=
"tips"
>
用于通过API管理客服,在企微后台->应用管理->微信客服中获取
</div>
</el-form-item>
<el-form-item
label=
"Token:"
prop=
""
>
<
!--
<
el-form-item
label=
"Token:"
prop=
""
>
<el-input
style=
"width: 40%;"
v-model=
"form.companyName"
placeholder=
"请输入Token"
></el-input>
<div
class=
"tips"
>
用于生成签名校验回调请求的合法性
</div>
</el-form-item>
<el-form-item
label=
"EncodingAESKey:"
prop=
""
>
<el-input
style=
"width: 40%;"
v-model=
"form.companyName"
placeholder=
"请输入EncodingAESKey"
></el-input>
<div
class=
"tips"
>
用于解密回调消息内容对应的密文
</div>
</el-form-item>
</el-form-item>
-->
</div>
<el-form-item
label=
""
class=
"ar"
>
<el-button
type=
"primary"
@
click=
"submit"
>
保存配置
</el-button>
...
...
@@ -37,27 +36,52 @@
name
:
'enterprise-wechat-part3'
,
data
()
{
return
{
kfSecretCopy
:
''
,
kfSecretEditState
:
false
,
form
:
{
corpId
:
''
,
companyName
:
''
,
corpSecret
:
''
,
contactSecret
:
''
},
rules
:
{
corpId
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
corpSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
agentId
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
agentSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
contactSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
seasRedirectUrl
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
sopTagRedirectUrl
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}]
kfSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
}
}
},
watch
:
{
data
:
'setData'
,
},
props
:
{
data
:
{
type
:
Object
,
default
:
{}
}
},
methods
:
{
editKfSecret
()
{
this
.
kfSecretEditState
=
true
this
.
kfSecretCopy
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
.
kfSecret
))
this
.
form
.
kfSecret
=
''
},
cancelEditKfSecret
()
{
this
.
kfSecretEditState
=
false
this
.
form
.
kfSecret
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
kfSecretCopy
))
},
submitEditKfSecret
()
{
if
(
this
.
form
.
kfSecret
)
{
this
.
$emit
(
'submit'
,
this
.
form
)
this
.
kfSecretEditState
=
false
}
},
submit
()
{
this
.
$refs
[
'form'
].
validate
(
validate
=>
{
if
(
validate
)
{
this
.
$emit
(
'submit'
,
this
.
form
)
}
})
},
setData
()
{
console
.
log
(
this
.
data
)
if
(
Object
.
keys
(
this
.
data
).
length
)
{
this
.
form
=
this
.
data
}
}
},
mounted
()
{
...
...
linkwe-ui/src/views/enterpriseWechat/part4.vue
View file @
2bc81ab
...
...
@@ -5,14 +5,28 @@
<div
class=
"my-title"
>
微信支付
</div>
<el-form-item
label=
"商户号:"
prop=
""
>
<el-input
style=
"width: 40%;"
v-model=
"form.
companyName
"
placeholder=
"请输入商户号"
></el-input>
<el-form-item
label=
"商户号:"
prop=
"
merChantNumber
"
>
<el-input
style=
"width: 40%;"
v-model=
"form.
merChantNumber
"
placeholder=
"请输入商户号"
></el-input>
<div
class=
"tips"
>
用于通过API支付商户,在微信支付后台->账号中心->个人信息中获取
</div>
</el-form-item>
<el-form-item
label=
"商户支付Secret:"
prop=
"corpSecret"
>
<el-input
style=
"width: 40%;"
type=
"password"
v-model=
"form.corpSecret"
placeholder=
"请输入商户支付Secret"
></el-input>
<el-form-item
label=
"商户支付Secret:"
prop=
"merChantSecret"
>
<el-input
:disabled=
"!merChantSecretEditState"
style=
"width: 40%;"
:type=
"merChantSecretEditState ? 'text':'password'"
v-model=
"form.merChantSecret"
placeholder=
"请输入商户支付Secret"
></el-input>
<el-button
style=
"margin-left:20px;"
plain
v-if=
"merChantSecretEditState"
@
click=
"cancelEditMerChantSecret"
>
取消
</el-button>
<el-button
type=
"primary"
plain
v-if=
"merChantSecretEditState"
@
click=
"submitEditMerChantSecret"
>
保存
</el-button>
<el-button
type=
"primary"
style=
"margin-left:20px;"
plain
v-if=
"!merChantSecretEditState && form.merChantSecret"
@
click=
"editMerChantSecret"
>
修改
</el-button>
<div
class=
"tips"
>
用于通过API进行支付,在微信支付后台->账号中心->API安全中获取
</div>
</el-form-item>
<el-form-item
label=
"API证书文件"
prop=
"certP12Url"
>
<div
style=
"display:flex;align-items:center;width: 200px;"
>
<div
v-if=
"form.certP12Url"
>
<img
style=
"height: 60px;width: 60px;"
src=
"../../assets/image/success.png"
>
</div>
<upload
class=
"image-uploader"
:fileUrl
.
sync=
"form.certP12Url"
:format=
"mat"
type=
"3"
>
<span
style=
"font-size: 14px;color: #333;margin-left: 20px;break-word:no-warp"
>
{{
form
.
certP12Url
?
'重新上传'
:
'上传'
}}
</span>
</upload>
</div>
<div
class=
"tips"
>
用于校验支付环境,在微信支付后台->账户中心->账户设置->API安全中下载
</div>
</el-form-item>
</div>
<el-form-item
label=
""
class=
"ar"
>
<el-button
type=
"primary"
@
click=
"submit"
>
保存配置
</el-button>
...
...
@@ -26,27 +40,54 @@
name
:
'enterprise-wechat-part4'
,
data
()
{
return
{
mat
:
[
'p12'
],
merChantSecretCopy
:
''
,
merChantSecretEditState
:
false
,
form
:
{
corpId
:
''
,
companyName
:
''
,
corpSecret
:
''
,
contactSecret
:
''
},
rules
:
{
corpId
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
corpSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
agentId
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
agentSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
contactSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
seasRedirectUrl
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
sopTagRedirectUrl
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}]
merChantNumber
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
merChantSecret
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
certP12Url
:
[{
required
:
true
,
message
:
'必填项'
,
trigger
:
'blur'
}],
}
}
},
watch
:
{
data
:
'setData'
,
},
props
:
{
data
:
{
type
:
Object
,
default
:
{}
}
},
methods
:
{
editMerChantSecret
()
{
this
.
merChantSecretEditState
=
true
this
.
merChantSecretCopy
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
.
merChantSecret
))
this
.
form
.
merChantSecret
=
''
},
cancelEditMerChantSecret
()
{
this
.
merChantSecretEditState
=
false
this
.
form
.
merChantSecret
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
merChantSecretCopy
))
},
submitEditMerChantSecret
()
{
if
(
this
.
form
.
merChantSecret
)
{
this
.
$emit
(
'submit'
,
this
.
form
)
this
.
merChantSecretEditState
=
false
}
},
submit
()
{
this
.
$refs
[
'form'
].
validate
(
validate
=>
{
if
(
validate
)
{
this
.
$emit
(
'submit'
,
this
.
form
)
}
})
},
setData
()
{
if
(
Object
.
keys
(
this
.
data
).
length
)
{
this
.
form
=
this
.
data
}
}
},
mounted
()
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment