From ecead0f5bf6a6beab9e9b5e866db9ca827492343 Mon Sep 17 00:00:00 2001 From: WeiRan <2392355487@qq.com> Date: Fri, 30 Aug 2024 09:28:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=89=E4=B8=AA=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/apitest/apitest.js | 40 +++++ src/api/authentication/authentication.js | 8 + src/api/authentication/message.js | 10 ++ src/views/background/company/index.vue | 4 +- src/views/market/apitest/index.vue | 184 ++++++++++++++++++++-- src/views/market/authentication/index.vue | 70 +++++++- src/views/market/easymessage/index.vue | 14 +- src/views/market/myapi/index.vue | 29 ++-- src/views/market/product/index.vue | 29 ++-- 9 files changed, 329 insertions(+), 59 deletions(-) create mode 100644 src/api/apitest/apitest.js create mode 100644 src/api/authentication/authentication.js diff --git a/src/api/apitest/apitest.js b/src/api/apitest/apitest.js new file mode 100644 index 0000000..4c7bd39 --- /dev/null +++ b/src/api/apitest/apitest.js @@ -0,0 +1,40 @@ +import request from "@/utils/request"; + + +//发送邮箱验证码 +export function apitest(email){ + return request({ + url:"/market/company/sendcode/"+email, + method: "POST", + }) +} + + +export function sendrequest(options){ + // 确保options是一个对象,并且包含必要的属性 + if (!options || typeof options !== 'object' || !options.apiRouter || typeof options.parameter === 'undefined') { + throw new Error('Invalid options: must be an object with apiRouter and optional parameter properties'); + } +// 构建完整的URL + const fullUrl = `/background/api/${options.apiRouter}/${options.parameter || ''}`; + return request({ + url:fullUrl, + method: "get", + data: options.parameter, + }) +} + +export function sendrequest1(options){ + // 确保options是一个对象,并且包含必要的属性 + if (!options || typeof options !== 'object' || !options.apiRouter ) { + throw new Error('Invalid options: must be an object with apiRouter '); + } +// 构建完整的URL + const fullUrl = `/background/api/${options.apiRouter}`; + return request({ + url:fullUrl, + method: "post", + data: options + }) +} + diff --git a/src/api/authentication/authentication.js b/src/api/authentication/authentication.js new file mode 100644 index 0000000..975cd51 --- /dev/null +++ b/src/api/authentication/authentication.js @@ -0,0 +1,8 @@ +import request from "@/utils/request"; +export function companyauthentication(data){ + return request({ + url:"/market/company/companyauthentication", + method: "POST", + data: data + }) +} diff --git a/src/api/authentication/message.js b/src/api/authentication/message.js index bd7b4b1..1ab33be 100644 --- a/src/api/authentication/message.js +++ b/src/api/authentication/message.js @@ -1,5 +1,15 @@ import request from "@/utils/request"; + +//发送邮箱验证码 +export function sendcode(email){ + return request({ + url:"/market/company/sendcode/"+email, + method: "POST", + }) +} + +//绑定邮箱 export function linkemail(data){ return request({ url:"/market/company/list", diff --git a/src/views/background/company/index.vue b/src/views/background/company/index.vue index 7f7785a..2c06af4 100644 --- a/src/views/background/company/index.vue +++ b/src/views/background/company/index.vue @@ -120,11 +120,11 @@ diff --git a/src/views/market/apitest/index.vue b/src/views/market/apitest/index.vue index 331550d..65efbe0 100644 --- a/src/views/market/apitest/index.vue +++ b/src/views/market/apitest/index.vue @@ -12,9 +12,13 @@ {{myapi.productContent}} + + {{myapi.apiRouter}} + +
- 测试 + 测试 立即申请
@@ -22,34 +26,33 @@ + +
- {{myapi.productName}} + {{myapi.apiAddress}} - {{myapi.productPrice}}元/次 + {{myapi.returnFormat}}元/次 - {{myapi.productContent}} - - - {{myapi.productContent}} + {{myapi.requestMethod}} - {{myapi.productContent}} + - {{myapi.productContent}} + - {{myapi.productContent}} + - {{myapi.productContent}} + @@ -58,13 +61,70 @@
+ + + + + + + + + + + + + + + + +
+ + + 说明:支持类型top(推荐,默认)guonei(国内)guoji(国际)yule(娱乐)tiyu(体育)junshi(军事)keji(科技)caijing(财经)youxi(游戏)qiche(汽车)jiankang(健康) + + + + 说明:当前页数, 默认1, 最大50 + + + + 说明:每页返回条数, 默认30 , 最大30 + + + + 说明:是否只返回有内容详情的新闻, 1:是, 默认0 + +
+ + 发送请求 + + + 发送请求 + +
+
+
+      
+ + + 返回 + +