将支付应用id分别配置

master
Chopper 2021-12-23 11:58:09 +08:00
parent 3622c7bb53
commit d762d18c7b
1 changed files with 36 additions and 24 deletions

View File

@ -2,26 +2,35 @@
<div class="layout"> <div class="layout">
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate"> <Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
<FormItem label="appId" prop="appId"> <FormItem label="appId" prop="appId">
<Input class="w200" v-model="formValidate.appId" /> <Input class="w200" v-model="formValidate.appId"/>
<p style="color: red">*APP应用 AppID 非必填</p>
</FormItem>
<FormItem label="mpAppId" prop="mpAppId">
<Input class="w200" v-model="formValidate.mpAppId"/>
<p style="color: red">*小程序 AppID 非必填</p>
</FormItem>
<FormItem label="serviceAppId" prop="serviceAppId">
<Input class="w200" v-model="formValidate.serviceAppId"/>
<p style="color: red">*服务号 AppID 非必填</p>
</FormItem> </FormItem>
<FormItem label="mchId" prop="mchId"> <FormItem label="mchId" prop="mchId">
<Input class="w200" v-model="formValidate.mchId" /> <Input class="w200" v-model="formValidate.mchId"/>
</FormItem> </FormItem>
<FormItem label="apiKey3" prop="apiKey3"> <FormItem label="apiKey3" prop="apiKey3">
<Input v-model="formValidate.apiKey3" /> <Input v-model="formValidate.apiKey3"/>
</FormItem> </FormItem>
<FormItem label="apiclient_cert_p12" class="label-item" prop="apiclient_cert_p12"> <FormItem label="apiclient_cert_p12" class="label-item" prop="apiclient_cert_p12">
<Input v-model="formValidate.apiclient_cert_p12" /> <Input v-model="formValidate.apiclient_cert_p12"/>
</FormItem> </FormItem>
<FormItem label="apiclient_cert_pem" prop="apiclient_cert_pem"> <FormItem label="apiclient_cert_pem" prop="apiclient_cert_pem">
<Input v-model="formValidate.apiclient_cert_pem" /> <Input v-model="formValidate.apiclient_cert_pem"/>
</FormItem> </FormItem>
<FormItem label="apiclient_key" prop="apiclient_key"> <FormItem label="apiclient_key" prop="apiclient_key">
<Input v-model="formValidate.apiclient_key" /> <Input v-model="formValidate.apiclient_key"/>
</FormItem> </FormItem>
<FormItem label="serialNumber" prop="serialNumber"> <FormItem label="serialNumber" prop="serialNumber">
<Input v-model="formValidate.serialNumber" /> <Input v-model="formValidate.serialNumber"/>
</FormItem> </FormItem>
<div class="label-btns"> <div class="label-btns">
<Button type="primary" @click="submit('formValidate')"></Button> <Button type="primary" @click="submit('formValidate')"></Button>
@ -31,19 +40,15 @@
</div> </div>
</template> </template>
<script> <script>
import { setSetting } from "@/api/index"; import {setSetting} from "@/api/index";
import { handleSubmit } from "../setting/validate"; import {handleSubmit} from "../setting/validate";
export default { export default {
data() { data() {
return { return {
ruleValidate: {}, // ruleValidate: {}, //
formValidate: { // formValidate: {},//
accessKeyId: "",
accessKeySecret: "",
bucketName: "",
picLocation: "",
endPoint: "",
},
}; };
}, },
props: ["res", "type"], props: ["res", "type"],
@ -71,15 +76,19 @@ export default {
init() { init() {
this.res = JSON.parse(this.res); this.res = JSON.parse(this.res);
this.$set(this, "formValidate", { ...this.res }); this.$set(this, "formValidate", {...this.res});
Object.keys(this.formValidate).forEach((item) => { Object.keys(this.formValidate).forEach((item) => {
this.ruleValidate[item] = [ if (item.indexOf("pId") < 0) {
{
required: true, this.ruleValidate[item] = [
message: "请填写必填项", {
trigger: "blur", required: true,
}, message: "请填写必填项",
]; trigger: "blur",
},
];
}
}); });
}, },
}, },
@ -92,16 +101,19 @@ export default {
.label-item { .label-item {
display: flex; display: flex;
} }
.w200 { .w200 {
/deep/ .ivu-input { /deep/ .ivu-input {
width: 250px !important; width: 250px !important;
margin: 0 10px; margin: 0 10px;
} }
} }
/deep/ .ivu-input { /deep/ .ivu-input {
width: 450px !important; width: 450px !important;
margin: 0 10px; margin: 0 10px;
} }
.ivu-input-wrapper { .ivu-input-wrapper {
width: 450px; width: 450px;
margin-right: 10px; margin-right: 10px;