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 + +
+ + 发送请求 + + + 发送请求 + +
+
+
+      
+ + + 返回 + +