学习很差啦 2023-02-17 11:28:29 +08:00
commit 49d023cef0
5 changed files with 146 additions and 49 deletions

View File

@ -1,21 +1,27 @@
<template>
<div class="layout">
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
<FormItem label="ebusinessID" prop="ebusinessID">
<Input v-model="formValidate.ebusinessID" />
<FormItem label="平台 " prop="endPoint">
<RadioGroup v-model="formValidate.type" type="button">
<Radio label="KDNIAO">快递鸟</Radio>
<Radio label="KUAIDI100">快递100</Radio>
</RadioGroup>
</FormItem>
<FormItem label="appKey" prop="appKey">
<Input class="label-appkey" v-model="formValidate.appKey" />
<FormItem v-if="formValidate.type==='KDNIAO'" label="快递鸟 商户ID" prop="kdniaoEbusinessID">
<Input v-model="formValidate.kdniaoEbusinessID" />
</FormItem>
<FormItem label="reqURL" prop="reqURL">
<Input v-model="formValidate.reqURL" />
<FormItem v-if="formValidate.type==='KDNIAO'" label="快递鸟 AppKey" prop="kdniaoAppKey">
<Input class="label-appkey" v-model="formValidate.kdniaoAppKey" />
</FormItem>
<FormItem label="电子面单URL" prop="sheetReqURL">
<Input v-model="formValidate.sheetReqURL" />
<FormItem v-if="formValidate.type==='KUAIDI100'" label="快递100 授权码" prop="kuaidi100Customer">
<Input class="label-appkey" v-model="formValidate.kuaidi100Customer" />
</FormItem>
<FormItem v-if="formValidate.type==='KUAIDI100'" label="快递100 Key" prop="kuaidi100Key">
<Input class="label-appkey" v-model="formValidate.kuaidi100Key" />
</FormItem>
<div class="label-btns">
<Button type="primary" @click="submit('formValidate')"></Button>
</div>
</Form>
</div>
@ -27,7 +33,12 @@ export default {
data() {
return {
ruleValidate: {}, //
formValidate: { ebusinessID: "", reqURL: "", appKey: "" ,sheetReqURL: "" ,}, //
formValidate: { //
type: "",
kdniaoEbusinessID: "",
kdniaoAppKey: "" ,
kuaidi100Customer: "" ,
kuaidi100Key: "" ,},
};
},
props: ["res",'type'],

View File

@ -2,27 +2,29 @@
<div class="layout">
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
<FormItem label="endPoint" prop="endPoint">
<FormItem label="平台" prop="endPoint">
<RadioGroup v-model="formValidate.type" type="button">
<Radio label="ALI_OSS">阿里OSS</Radio>
<Radio label="MINIO">MINIO</Radio>
<Radio label="HUAWEI_OBS">华为云OBS</Radio>
<Radio label="TENCENT_COS">腾讯云COS</Radio>
</RadioGroup>
</FormItem>
<!-- 阿里云存储-->
<FormItem v-if="formValidate.type==='ALI_OSS'" label="endPoint" prop="endPoint">
<Input v-model="formValidate.endPoint"/>
<FormItem v-if="formValidate.type==='ALI_OSS'" label="节点" prop="aliyunOSSEndPoint">
<Input v-model="formValidate.aliyunOSSEndPoint"/>
</FormItem>
<FormItem v-if="formValidate.type==='ALI_OSS'" label="bucketName" class="label-item" prop="bucketName">
<Input v-model="formValidate.bucketName"/>
<FormItem v-if="formValidate.type==='ALI_OSS'" label="储存空间" class="label-item" prop="aliyunOSSBucketName">
<Input v-model="formValidate.aliyunOSSBucketName"/>
</FormItem>
<FormItem v-if="formValidate.type==='ALI_OSS'" label="picLocation" prop="bucketName">
<Input v-model="formValidate.picLocation"/>
<FormItem v-if="formValidate.type==='ALI_OSS'" label="存放路径路径" prop="aliyunOSSPicLocation">
<Input v-model="formValidate.aliyunOSSPicLocation"/>
</FormItem>
<FormItem v-if="formValidate.type==='ALI_OSS'" label="accessKeyId" prop="accessKeyId">
<Input v-model="formValidate.accessKeyId"/>
<FormItem v-if="formValidate.type==='ALI_OSS'" label="密钥id" prop="aliyunOSSAccessKeyId">
<Input v-model="formValidate.aliyunOSSAccessKeyId"/>
</FormItem>
<FormItem v-if="formValidate.type==='ALI_OSS'" label="accessKeySecret" prop="accessKeySecret">
<Input v-model="formValidate.accessKeySecret"/>
<FormItem v-if="formValidate.type==='ALI_OSS'" label="密钥" prop="aliyunOSSAccessKeySecret">
<Input v-model="formValidate.aliyunOSSAccessKeySecret"/>
</FormItem>
@ -35,7 +37,6 @@
<FormItem v-if="formValidate.type==='MINIO'" label="endpoint" prop="m_endpoint">
<Input v-model="formValidate.m_endpoint"/>
</FormItem>
<FormItem v-if="formValidate.type==='MINIO'" label="accessKey" class="label-item" prop="m_accessKey">
<Input v-model="formValidate.m_accessKey"/>
</FormItem>
@ -46,6 +47,36 @@
<Input v-model="formValidate.m_bucketName"/>
</FormItem>
<!-- 华为云存储-->
<FormItem v-if="formValidate.type==='HUAWEI_OBS'" label="发起者的Access Key" prop="huaweicloudOBSAccessKey">
<Input v-model="formValidate.huaweicloudOBSAccessKey"/>
</FormItem>
<FormItem v-if="formValidate.type==='HUAWEI_OBS'" label="密钥" class="label-item" prop="huaweicloudOBSSecretKey">
<Input v-model="formValidate.huaweicloudOBSSecretKey"/>
</FormItem>
<FormItem v-if="formValidate.type==='HUAWEI_OBS'" label="节点" prop="huaweicloudOBSEndPoint">
<Input v-model="formValidate.huaweicloudOBSEndPoint"/>
</FormItem>
<FormItem v-if="formValidate.type==='HUAWEI_OBS'" label="桶" prop="huaweicloudOBSBucketName">
<Input v-model="formValidate.huaweicloudOBSBucketName"/>
</FormItem>
<!-- 腾讯云存储-->
<FormItem v-if="formValidate.type==='TENCENT_COS'" label="用户的SecretId" prop="tencentCOSSecretId">
<Input v-model="formValidate.tencentCOSSecretId"/>
</FormItem>
<FormItem v-if="formValidate.type==='TENCENT_COS'" label="用户的SecretKey" class="label-item" prop="tencentCOSSecretKey">
<Input v-model="formValidate.tencentCOSSecretKey"/>
</FormItem>
<FormItem v-if="formValidate.type==='TENCENT_COS'" label="bucket的地域" prop="tencentCOSRegion">
<Input v-model="formValidate.tencentCOSRegion"/>
</FormItem>
<FormItem v-if="formValidate.type==='TENCENT_COS'" label="bucket" prop="tencentCOSBucket">
<Input v-model="formValidate.tencentCOSBucket"/>
</FormItem>
<div class="label-btns">
<Button type="primary" @click="submit('formValidate')"></Button>
@ -63,16 +94,25 @@ export default {
ruleValidate: {}, //
formValidate: { //
type: "",
accessKeyId: "",
accessKeySecret: "",
bucketName: "",
picLocation: "",
endPoint: "",
aliyunOSSAccessKeyId: "",
aliyunOSSAccessKeySecret: "",
aliyunOSSBucketName: "",
aliyunOSSPicLocation: "",
aliyunOSSEndPoint: "",
m_endpoint: "",
m_accessKey: "",
m_secretKey: "",
m_bucketName: "",
m_frontUrl: ""
m_frontUrl: "",
huaweicloudOBSAccessKey: "",
huaweicloudOBSSecretKey: "",
huaweicloudOBSEndPoint: "",
huaweicloudOBSBucketName: "",
tencentCOSSecretId: "",
tencentCOSSecretKey: "",
tencentCOSRegion: "",
tencentCOSBucket: "",
tencentCOSEndPoint: "",
},
};
},

View File

@ -1,19 +1,53 @@
<template>
<div class="layout">
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
<FormItem label="accessKeyId" prop="accessKeyId">
<FormItem label="平台" prop="endPoint">
<RadioGroup v-model="formValidate.type" type="button">
<Radio label="ALI">阿里云</Radio>
<Radio label="HUAWEI">华为云</Radio>
<Radio label="TENCENT">腾讯云</Radio>
</RadioGroup>
</FormItem>
<!-- 阿里云-->
<FormItem v-if="formValidate.type==='ALI'" label="accessKeyId" prop="accessKeyId">
<Input v-model="formValidate.accessKeyId"/>
</FormItem>
<FormItem label="accessSecret" prop="accessSecret">
<FormItem v-if="formValidate.type==='ALI'" label="accessSecret" prop="accessSecret">
<Input v-model="formValidate.accessSecret"/>
</FormItem>
<FormItem label="regionId" prop="regionId">
<Input v-model="formValidate.regionId" />
</FormItem>
<FormItem label="signName" prop="signName">
<FormItem v-if="formValidate.type==='ALI'" label="短信签名" prop="signName">
<Input v-model="formValidate.signName"/>
</FormItem>
<!-- 华为云-->
<FormItem v-if="formValidate.type==='HUAWEI'" label="APP_Key" prop="huaweiAppKey">
<Input v-model="formValidate.huaweiAppKey"/>
</FormItem>
<FormItem v-if="formValidate.type==='HUAWEI'" label="APP_Secret" prop="huaweiAppSecret">
<Input v-model="formValidate.huaweiAppSecret"/>
</FormItem>
<FormItem v-if="formValidate.type==='HUAWEI'" label="短信签名通道号" prop="huaweiSender">
<Input v-model="formValidate.huaweiSender"/>
</FormItem>
<FormItem v-if="formValidate.type==='HUAWEI'" label="短信签名" prop="huaweiSignature">
<Input v-model="formValidate.huaweiSignature"/>
</FormItem>
<!-- 腾讯云-->
<FormItem v-if="formValidate.type==='TENCENT'" label="用户的 SecretId" prop="tencentSecretId">
<Input v-model="formValidate.tencentSecretId"/>
</FormItem>
<FormItem v-if="formValidate.type==='TENCENT'" label="用户的 SecretKey" prop="tencentSecretKey">
<Input v-model="formValidate.tencentSecretKey"/>
</FormItem>
<FormItem v-if="formValidate.type==='TENCENT'" label="短信应用ID" prop="tencentSdkAppId">
<Input v-model="formValidate.tencentSdkAppId"/>
</FormItem>
<FormItem v-if="formValidate.type==='TENCENT'" label="短信签名" prop="tencentSignName">
<Input v-model="formValidate.tencentSignName"/>
</FormItem>
<div class="label-btns">
<Button type="primary" @click="submit('formValidate')"></Button>
@ -24,6 +58,7 @@
<script>
import {setSetting} from "@/api/index";
import {handleSubmit} from "./validate";
export default {
data() {
return {
@ -33,6 +68,14 @@ export default {
regionId: "",
picLocation: "",
accessSecret: "",
tencentSecretId: "",
tencentSecretKey: "",
tencentSdkAppId: "",
tencentSignName: "",
huaweiAppKey: "",
huaweiAppSecret: "",
huaweiSender: "",
huaweiSignature: "",
},
};
},
@ -79,13 +122,16 @@ export default {
<style lang="scss" scoped>
@import "./style.scss";
.label-item {
display: flex;
}
/deep/ .ivu-input {
width: 300px !important;
margin: 0 10px;
}
.ivu-input-wrapper {
width: 300px;
margin-right: 10px;

View File

@ -42,20 +42,20 @@ export default {
type: "WITHDRAWAL_SETTING",
name: "提现设置",
},
//
//
{
type: "KUAIDI_SETTING",
name: "快递设置",
type: "LOGISTICS_SETTING",
name: "快递查询设置",
},
//OSS
//
{
type: "OSS_SETTING",
name: "OSS配置",
name: "静态资源配置",
},
//
//
{
type: "SMS_SETTING",
name: "阿里短信配置",
name: "短信配置",
},
//
{

View File

@ -2,7 +2,7 @@ import BASE_SETTING from "./setting/BASE_SETTING";
import GOODS_SETTING from "./setting/GOODS_SETTING";
import ORDER_SETTING from "./setting/ORDER_SETTING";
import POINT_SETTING from "./setting/POINT_SETTING";
import KUAIDI_SETTING from "./setting/KUAIDI_SETTING";
import LOGISTICS_SETTING from "./setting/LOGISTICS_SETTING";
import OSS_SETTING from "./setting/OSS_SETTING";
import SMS_SETTING from "./setting/SMS_SETTING";
import IM_SETTING from "./setting/IM_SETTING";
@ -18,7 +18,7 @@ export default {
GOODS_SETTING,
ORDER_SETTING,
POINT_SETTING,
KUAIDI_SETTING,
LOGISTICS_SETTING,
OSS_SETTING,
SMS_SETTING,
IM_SETTING,