优化支付、短信的配置内容
This commit is contained in:
parent
6ae288cf01
commit
39c4593d9e
@ -0,0 +1,155 @@
|
||||
<template>
|
||||
|
||||
<div class="layout">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<Card :padding="0">
|
||||
<Divider orientation="left">登录设置</Divider>
|
||||
<div class="form-list">
|
||||
<Form
|
||||
ref="formValidate"
|
||||
label-width="120"
|
||||
label-position="right"
|
||||
:model="formValidate"
|
||||
:rules="ruleValidate"
|
||||
>
|
||||
<FormItem label="买家PC端域名" prop="pc">
|
||||
<Input v-model="formValidate.pc" class="w200" />
|
||||
</FormItem>
|
||||
<FormItem label="买家WAP端域名" prop="wap">
|
||||
<Input v-model="formValidate.wap" class="w200" />
|
||||
</FormItem>
|
||||
<FormItem label="登录回调域名" prop="callbackUrl">
|
||||
<Input maxlength="300" v-model="formValidate.callbackUrl" class="w200" />
|
||||
</FormItem>
|
||||
<FormItem label="操作" >
|
||||
<Button @click="setupSetting">保存设置</Button>
|
||||
</FormItem>
|
||||
</Form>
|
||||
</div>
|
||||
</Card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import { setSetting } from "@/api/index";
|
||||
import { handleSubmit } from "../setting/validate";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ruleValidate: {}, // 验证规则
|
||||
formValidate: {
|
||||
pc:"",
|
||||
wap:"",
|
||||
callbackUrl:""
|
||||
} // 表单数据
|
||||
};
|
||||
},
|
||||
props: ["res", "type"],
|
||||
created() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
submit(name) {
|
||||
let that = this;
|
||||
if (handleSubmit(that, name)) {
|
||||
this.setupSetting();
|
||||
}
|
||||
},
|
||||
// 保存设置
|
||||
setupSetting() {
|
||||
setSetting(this.type, this.formValidate).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success("保存成功!");
|
||||
} else {
|
||||
this.$Message.error("保存失败!");
|
||||
}
|
||||
});
|
||||
},
|
||||
// 实例化数据
|
||||
init() {
|
||||
this.res = JSON.parse(this.res);
|
||||
|
||||
this.$set(this, "formValidate", { ...this.res });
|
||||
Object.keys(this.formValidate).forEach((item) => {
|
||||
if (item.indexOf("pId") < 0) {
|
||||
this.ruleValidate[item] = [
|
||||
{
|
||||
required: true,
|
||||
message: "请填写必填项",
|
||||
trigger: "blur",
|
||||
},
|
||||
];
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../setting/style.scss";
|
||||
|
||||
.label-item {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
|
||||
.form-list{
|
||||
padding: 16px;
|
||||
|
||||
}
|
||||
.pay-title {
|
||||
text-align: center;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.col {
|
||||
width: 100%;
|
||||
}
|
||||
.layout {
|
||||
padding: 20px;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.row {
|
||||
width: 600px;
|
||||
margin-right: 10px;
|
||||
display: flex;
|
||||
margin-bottom: 20px;
|
||||
/deep/ .ivu-card-body {
|
||||
padding: 0 16px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.label-item {
|
||||
display: flex;
|
||||
}
|
||||
.label-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.icon-item {
|
||||
width: 100%;
|
||||
padding: 30px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
.ivu-form-item {
|
||||
display: flex;
|
||||
|
||||
align-items: center;
|
||||
}
|
||||
.ivu-row {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
@ -26,7 +26,7 @@
|
||||
|
||||
<Divider orientation="left">登录设置</Divider>
|
||||
<div class="pay-list">
|
||||
<Form style="width:100%;" ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="80">
|
||||
<Form style="width:100%;" ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="100">
|
||||
<FormItem label="appId" prop="appId">
|
||||
<Input @on-enter="setupSetting" class="label-appkey" v-model="item.appId" />
|
||||
</FormItem>
|
||||
|
@ -11,12 +11,14 @@
|
||||
<Input maxlength="300" v-model="formValidate.alipayPublicCertPath" />
|
||||
</FormItem>
|
||||
<FormItem label="privateKey" class="label-item" prop="privateKey">
|
||||
<Input maxlength="300" v-model="formValidate.privateKey" />
|
||||
<Input maxlength="3000" v-model="formValidate.privateKey" />
|
||||
</FormItem>
|
||||
<FormItem label="rootCertPath" prop="rootCertPath">
|
||||
<Input maxlength="300" v-model="formValidate.rootCertPath" />
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="支付回调域名" prop="callbackUrl">
|
||||
<Input maxlength="300" v-model="formValidate.callbackUrl" />
|
||||
</FormItem>
|
||||
<div class="label-btns">
|
||||
<Button type="primary" @click="submit('formValidate')">保存</Button>
|
||||
|
||||
@ -37,6 +39,7 @@ export default {
|
||||
bucketName: "",
|
||||
picLocation: "",
|
||||
endPoint: "",
|
||||
callbackUrl:"",
|
||||
},
|
||||
};
|
||||
},
|
||||
|
@ -40,6 +40,9 @@
|
||||
<FormItem label="API证书-证书序列号" prop="serialNumber">
|
||||
<Input maxlength="300" v-model="formValidate.serialNumber" />
|
||||
</FormItem>
|
||||
<FormItem label="支付回调域名" prop="callbackUrl">
|
||||
<Input maxlength="300" v-model="formValidate.callbackUrl" />
|
||||
</FormItem>
|
||||
<div class="label-btns">
|
||||
<Button type="primary" @click="submit('formValidate')">保存</Button>
|
||||
</div>
|
||||
|
@ -141,179 +141,6 @@
|
||||
<Spin fix v-if="loading"></Spin>
|
||||
</div>
|
||||
</TabPane>
|
||||
<TabPane label="信任登陆" name="trust">
|
||||
<div>
|
||||
<Row style="background:#eee;padding:10px;" :gutter="16">
|
||||
<Col span="12">
|
||||
<Card>
|
||||
<p slot="title">微信信任登陆</p>
|
||||
<Form
|
||||
ref="wechatForm"
|
||||
:model="wechat"
|
||||
:label-width="140"
|
||||
label-position="right"
|
||||
>
|
||||
<FormItem label="appId" prop="appId">
|
||||
<Input type="text" v-model="wechat.appId" placeholder="appId"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem label="appSecret" prop="appSecret">
|
||||
<Input type="text" v-model="wechat.appSecret" placeholder="appSecret"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem label="callbackUrl" prop="callbackUrl">
|
||||
<Input type="text" v-model="wechat.callbackUrl" placeholder="callbackUrl"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem label="callbackLoginUrl" prop="callbackLoginUrl">
|
||||
<Input type="text" v-model="wechat.callbackLoginUrl"
|
||||
placeholder="callbackLoginUrl"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem label="callbackBindUrl" prop="callbackBindUrl">
|
||||
<Input type="text" v-model="wechat.callbackBindUrl"
|
||||
placeholder="callbackBindUrl"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
<Button type="primary" style="width: 100px;margin-right:5px"
|
||||
:loading="saveLoading"
|
||||
@click="saveWechat">保存
|
||||
</Button>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<Spin fix v-if="loading"></Spin>
|
||||
</Card>
|
||||
</Col>
|
||||
<Col span="12">
|
||||
<Card>
|
||||
<p slot="title">QQ信任登陆</p>
|
||||
<Form
|
||||
ref="qqForm"
|
||||
:model="qq"
|
||||
:label-width="140"
|
||||
label-position="right"
|
||||
>
|
||||
<FormItem label="appId" prop="appId">
|
||||
<Input type="text" v-model="qq.appId" placeholder="appId"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem label="appKey" prop="appKey">
|
||||
<Input type="text" v-model="qq.appKey" placeholder="appKey"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem label="callbackUrl" prop="callbackUrl">
|
||||
<Input type="text" v-model="qq.callbackUrl" placeholder="callbackUrl"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem label="callbackLoginUrl" prop="callbackLoginUrl">
|
||||
<Input type="text" v-model="qq.callbackLoginUrl"
|
||||
placeholder="callbackLoginUrl"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem label="callbackBindUrl" prop="callbackBindUrl">
|
||||
<Input type="text" v-model="qq.callbackBindUrl"
|
||||
placeholder="callbackBindUrl"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
<Button type="primary" style="width: 100px;margin-right:5px"
|
||||
:loading="saveLoading"
|
||||
@click="saveQQ">保存
|
||||
</Button>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<Spin fix v-if="loading"></Spin>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row style="background:#eee;padding:10px;" :gutter="16">
|
||||
<Col span="12">
|
||||
<Card>
|
||||
<p slot="title">微博信任登陆</p>
|
||||
<Form
|
||||
ref="weiboForm"
|
||||
:model="weibo"
|
||||
:label-width="140"
|
||||
label-position="right"
|
||||
>
|
||||
<FormItem label="appKey" prop="appKey">
|
||||
<Input type="text" v-model="weibo.appKey" placeholder="appKey"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem label="appSecret" prop="appSecret">
|
||||
<Input type="text" v-model="weibo.appSecret" placeholder="appSecret"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem label="callbackUrl" prop="callbackUrl">
|
||||
<Input type="text" v-model="weibo.callbackUrl" placeholder="callbackUrl"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem label="callbackLoginUrl" prop="callbackLoginUrl">
|
||||
<Input type="text" v-model="weibo.callbackLoginUrl"
|
||||
placeholder="callbackLoginUrl"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem label="callbackBindUrl" prop="callbackBindUrl">
|
||||
<Input type="text" v-model="weibo.callbackBindUrl"
|
||||
placeholder="callbackBindUrl"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
<Button type="primary" style="width: 100px;margin-right:5px"
|
||||
:loading="saveLoading"
|
||||
@click="saveWeibo">保存
|
||||
</Button>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<Spin fix v-if="loading"></Spin>
|
||||
</Card>
|
||||
</Col>
|
||||
<Col span="12">
|
||||
<Card>
|
||||
<p slot="title">支付宝信任登陆</p>
|
||||
<Form
|
||||
ref="alipayForm"
|
||||
:model="alipay"
|
||||
:label-width="140"
|
||||
label-position="right"
|
||||
>
|
||||
<FormItem label="appId" prop="appId">
|
||||
<Input type="text" v-model="alipay.appId" placeholder="appId"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem label="appSecret" prop="appSecret">
|
||||
<Input type="text" v-model="alipay.appSecret" placeholder="appSecret"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem label="callbackUrl" prop="callbackUrl">
|
||||
<Input type="text" v-model="alipay.callbackUrl" placeholder="callbackUrl"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem label="callbackLoginUrl" prop="callbackLoginUrl">
|
||||
<Input type="text" v-model="alipay.callbackLoginUrl"
|
||||
placeholder="callbackLoginUrl"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem label="callbackBindUrl" prop="callbackBindUrl">
|
||||
<Input type="text" v-model="alipay.callbackBindUrl"
|
||||
placeholder="callbackBindUrl"
|
||||
style="width: 350px"/>
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
<Button type="primary" style="width: 100px;margin-right:5px"
|
||||
:loading="saveLoading"
|
||||
@click="saveAlipay">保存
|
||||
</Button>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<Spin fix v-if="loading"></Spin>
|
||||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Spin fix v-if="loading"></Spin>
|
||||
</div>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
</Card>
|
||||
</div>
|
||||
@ -364,34 +191,6 @@
|
||||
originalPictureWidth: "",
|
||||
originalPictureHeight: ""
|
||||
},
|
||||
wechat: { // 微信设置
|
||||
appId: "",
|
||||
appSecret: "",
|
||||
callbackUrl: "",
|
||||
callbackLoginUrl: "",
|
||||
callbackBindUrl: ""
|
||||
},
|
||||
qq: { // qq设置
|
||||
appId: "",
|
||||
appKey: "",
|
||||
callbackUrl: "",
|
||||
callbackLoginUrl: "",
|
||||
callbackBindUrl: ""
|
||||
},
|
||||
weibo: { // 微博
|
||||
appKey: "",
|
||||
appSecret: "",
|
||||
callbackUrl: "",
|
||||
callbackLoginUrl: "",
|
||||
callbackBindUrl: ""
|
||||
},
|
||||
alipay: { // 阿里
|
||||
appId: "",
|
||||
appSecret: "",
|
||||
callbackUrl: "",
|
||||
callbackLoginUrl: "",
|
||||
callbackBindUrl: ""
|
||||
},
|
||||
baseValidate: {
|
||||
// 表单验证规则
|
||||
siteName: [{required: true, message: "不能为空", trigger: "blur"}],
|
||||
@ -601,7 +400,7 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
//
|
||||
//
|
||||
initWeibo() {
|
||||
this.loading = true;
|
||||
getParams('weibo').then(res => {
|
||||
|
@ -1,6 +1,29 @@
|
||||
<template>
|
||||
<div class="layout">
|
||||
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
|
||||
<FormItem label="是否测试模式" prop="isTestModel">
|
||||
<RadioGroup type="button" button-style="solid" v-model="formValidate.isTestModel">
|
||||
<Radio label="true">开启</Radio>
|
||||
<Radio label="false">关闭</Radio>
|
||||
</RadioGroup>
|
||||
<span class="desc">测试模式则不实际发送短信,短信验证码为:111111</span>
|
||||
</FormItem>
|
||||
<FormItem label="登录短信模板CODE" prop="loginTemplateCode">
|
||||
<Input v-model="formValidate.loginTemplateCode"/>
|
||||
</FormItem>
|
||||
<FormItem label="注册短信模板CODE" prop="registerTemplateCode">
|
||||
<Input v-model="formValidate.registerTemplateCode"/>
|
||||
</FormItem>
|
||||
<FormItem label="找回密码短信模板CODE" prop="findPasswordTemplateCode">
|
||||
<Input v-model="formValidate.findPasswordTemplateCode"/>
|
||||
</FormItem>
|
||||
<FormItem label="设置密码短信模板CODE" prop="walletPasswordTemplateCode">
|
||||
<Input v-model="formValidate.walletPasswordTemplateCode"/>
|
||||
</FormItem>
|
||||
<FormItem label="支付密码短信模板CODE" prop="payPasswordTemplateCode">
|
||||
<Input v-model="formValidate.payPasswordTemplateCode"/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="平台" prop="endPoint">
|
||||
<RadioGroup v-model="formValidate.type" type="button">
|
||||
<Radio label="ALI">阿里云</Radio>
|
||||
@ -8,7 +31,6 @@
|
||||
<Radio label="TENCENT">腾讯云</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
|
||||
<!-- 阿里云-->
|
||||
<FormItem v-if="formValidate.type==='ALI'" label="accessKeyId" prop="accessKeyId">
|
||||
<Input v-model="formValidate.accessKeyId"/>
|
||||
@ -65,6 +87,12 @@ export default {
|
||||
result: "",
|
||||
ruleValidate: {}, // 验证规则
|
||||
formValidate: { // 表单数据
|
||||
isTestModel:1,
|
||||
loginTemplateCode:"",
|
||||
registerTemplateCode:"",
|
||||
findPasswordTemplateCode:"",
|
||||
walletPasswordTemplateCode:"",
|
||||
payPasswordTemplateCode:"",
|
||||
accessKeyId: "",
|
||||
regionId: "",
|
||||
picLocation: "",
|
||||
@ -106,6 +134,10 @@ export default {
|
||||
init() {
|
||||
this.result = JSON.parse(this.res);
|
||||
|
||||
Object.keys(this.result).map((item) => {
|
||||
this.result[item] += "";
|
||||
});
|
||||
|
||||
this.$set(this, "formValidate", {...this.result});
|
||||
Object.keys(this.formValidate).forEach((item) => {
|
||||
this.ruleValidate[item] = [
|
||||
|
@ -64,14 +64,12 @@ export default {
|
||||
},
|
||||
],
|
||||
authLogin: [
|
||||
// 登录设置
|
||||
{type: "CONNECT_SETTING", name: "登录设置"},
|
||||
// 微信设置
|
||||
{type: "WECHAT_CONNECT", name: "微信设置"},
|
||||
// QQ设置
|
||||
{type: "QQ_CONNECT", name: "QQ设置"},
|
||||
//微博联合登陆
|
||||
// {type: "WEIBO_CONNECT", name: "微博联合登陆"},
|
||||
// //支付宝配置
|
||||
// {type: "ALIPAY_CONNECT", name: "支付宝配置"},
|
||||
],
|
||||
pay: [
|
||||
//支付宝支付设置
|
||||
|
@ -12,6 +12,7 @@ import WECHAT_PAYMENT from "./pay/WECHAT_PAYMENT";
|
||||
import PAYMENT_SUPPORT from "./pay/PAYMENT_SUPPORT";
|
||||
import WECHAT_CONNECT from "./authLogin/WECHAT_CONNECT";
|
||||
import QQ_CONNECT from "./authLogin/QQ_CONNECT";
|
||||
import CONNECT_SETTING from "./authLogin/CONNECT_SETTING";
|
||||
|
||||
export default {
|
||||
BASE_SETTING,
|
||||
@ -27,5 +28,6 @@ export default {
|
||||
WECHAT_PAYMENT,
|
||||
ALIPAY_PAYMENT,
|
||||
WECHAT_CONNECT,
|
||||
CONNECT_SETTING,
|
||||
QQ_CONNECT
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user