Commit 2d8d200a by liuliufashi

update

parent d2c99d52
No preview for this file type
......@@ -111,7 +111,6 @@ export const onCreateGoods = async(data:any)=>{
data
});
}
export const onfindAli = async(uid:any)=>{
return await request({
url: `/pay/findalipay?uid=${uid}`,
......
......@@ -299,21 +299,22 @@ const onSetShowTable = async (data: any) => {
const { mchid, mchkey, appid, name } = data;
const uid: any = getUid();
modelRef.privatekey = mchid;
modelRef.alipaypublickey = mchkey;
modelRef.alipaypublickey = '';
modelRef.appid = appid;
modelRef.name = name;
// modelRef.server_url =server_url
modelRef.uid = uid;
} else {
const { alipaypublickey, privatekey, appid, name } = data;
const { alipaypublickey, privatekey, appid, payname } = data;
const uid: any = getUid();
modelRef.alipaypublickey = alipaypublickey;
modelRef.alipaypublickey = '';
modelRef.privatekey = privatekey;
modelRef.appid = appid;
modelRef.name = name;
modelRef.name = payname;
// modelRef.server_url =server_url
modelRef.uid = uid;
}
dataFrom.value = data;
};
const onCreated = () => {
......
......@@ -3,6 +3,12 @@
<a-form-item label="支付域名配置" v-bind="validateInfos.alName">
<a-input v-model:value="modelRef.alName" />
</a-form-item>
<a-form-item label="微信appid" v-bind="validateInfos.name">
<a-input v-model:value="modelRef.appid" />
</a-form-item>
<a-form-item label="微信密钥" v-bind="validateInfos.name">
<a-input v-model:value="modelRef.secret" />
</a-form-item>
<a-form-item :wrapper-col="{ span: 14, offset: 4 }">
<a-button type="primary" @click.prevent="onSubmit">提交</a-button>
</a-form-item>
......@@ -18,6 +24,8 @@ const uid = ref<Boolean>(false)
const id = ref<any>('0')
const modelRef = reactive({
alName: "",
appid: "",
secret:""
});
const { resetFields, validate, validateInfos } = useForm(
modelRef,
......@@ -33,24 +41,27 @@ const { resetFields, validate, validateInfos } = useForm(
const onSubmit = () => {
validate()
.then(async (res) => {
const uid =getUid()
const params: Object = {
id: id.value,
remarks: '',
uid: getUid(),
url: toRaw(modelRef).alName
uid: uid,
url: toRaw(modelRef).alName,
appid:toRaw(modelRef).appid,
secret:toRaw(modelRef).secret,
}
if (uid) {
const data: any = await onUpdaterealmName(JSON.stringify(params))
if (data.state === 1) {
message.success('更新成功');
onSreach(1)
onSreach(uid)
}
} else {
const data: any = await onCreaterealmName(JSON.stringify(params))
if (data.state === 1) {
message.success('创建成功');
onSreach(1)
onSreach(uid)
}
}
......@@ -63,6 +74,8 @@ const onSubmit = () => {
const onSreach = async (uid: any) => {
const data = await onSearchSelectrealmName(uid)
modelRef.alName = data.data[0].url
modelRef.appid = data.data[0].appid
modelRef.secret = data.data[0].secret
localStorage.setItem('url',modelRef.alName)
if (!data.data[0].userid) {
uid.value = true
......
......@@ -3,6 +3,7 @@
<a-form-item label="公众号配置" v-bind="validateInfos.name">
<a-input v-model:value="modelRef.name" />
</a-form-item>
<a-form-item :wrapper-col="{ span: 14, offset: 4 }">
<a-button type="primary" @click.prevent="onSubmit">提交</a-button>
</a-form-item>
......@@ -16,9 +17,6 @@ const useForm = Form.useForm;
const modelRef = reactive({
name: "",
sub: {
name: "",
},
});
const { resetFields, validate, validateInfos } = useForm(
modelRef,
......@@ -29,12 +27,6 @@ const { resetFields, validate, validateInfos } = useForm(
message: "Please input name",
},
],
"sub.name": [
{
required: true,
message: "Please input sub name",
},
],
})
);
const onSubmit = () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment