From 63906928f0fdb39cbd631cd350bb6a54c387bf06 Mon Sep 17 00:00:00 2001 From: RIceWqy <1840169763@qq.com> Date: Thu, 14 Dec 2023 21:38:33 +0800 Subject: [PATCH] jsonrpc --- .../shopro-auth-modal/shopro-auth-modal.vue | 15 ++++++++++++++- {uview-ui/libs => shopro}/jsonrpc/jsonrpc2.0.js | 0 2 files changed, 14 insertions(+), 1 deletion(-) rename {uview-ui/libs => shopro}/jsonrpc/jsonrpc2.0.js (100%) diff --git a/components/shopro-auth-modal/shopro-auth-modal.vue b/components/shopro-auth-modal/shopro-auth-modal.vue index 8499167..48d7bab 100644 --- a/components/shopro-auth-modal/shopro-auth-modal.vue +++ b/components/shopro-auth-modal/shopro-auth-modal.vue @@ -340,6 +340,7 @@ /** * 登录提示页 */ +import jsonrpc from "@/shopro/jsonrpc/jsonrpc2.0.js" import FormValidate from "@/shopro/validate/form"; import schema from "@/uview-ui/libs/util/async-validator"; import wechat from "@/shopro/wechat/wechat"; @@ -498,11 +499,23 @@ export default { // 检测 checkValue(e, key) { - this.validation(key); + console.log("checkValue@@@@") + // this.validation(key); }, // 校验数据 validation(key, callback = () => { }) { + console.log("validation") + let wqy = function(responce){ + console.log(responce) + } + let res = { + "method":"/account/login", + "jsonrpc":"2.0", + "params":{"username":"admin", + "password":"123"} + } + jsonrpc.send("http://192.168.10.151:5080/jsonrpc",res,wqy,wqy) let that = this; //拿到需要校验的数据 let fieldValue = this.form[this.authType].data[key]; diff --git a/uview-ui/libs/jsonrpc/jsonrpc2.0.js b/shopro/jsonrpc/jsonrpc2.0.js similarity index 100% rename from uview-ui/libs/jsonrpc/jsonrpc2.0.js rename to shopro/jsonrpc/jsonrpc2.0.js