|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- //
- // API.swift
- // iOSFirst
- //
- // Created by 孙宇峰 on 2023/2/3.
- //
-
- import Foundation
- enum Api {
- /// baseUrl
- static let shoolurl = "https://schoolapitest.xhkjedu.com/"
-
- static let fileurl = "https://schoolstatictest.xhkjedu.com/static/"
-
- static let rzurl = "http://scapitest.xhkjedu.com/"
-
- static let wsExamUrl = "wss://wsexamtest.xhkjedu.com/ws"
- }
-
- extension Api {
- /// 用户登录注册登出 登录注册为post 登出为get
- enum Account {
- ///教师帐号登录
- static let loginTeacher = "suser/user/login_teacher"
- ///获取手机验证码
- static let loginCode = "suser/user/login_code"
- ///绑定手机获取手机验证码
- static let bindCode = "suser/user/bind_code"
- ///手机号码登录
- static let loginByCode = "suser/user/login_byCode"
- ///获取手机验证码 用于重置密码
- static let updateCode = "suser/user/update_code"
- /// 重置密码
- static let updatePwdCode = "suser/user/update_pwd_byCode"
- /// 绑定手机 2.2.3帐号安全--绑定手机
- static let bindUserPhone = "suser/user/bind_userphone"
- ///2.2.4帐号安全--验证身份
- static let checkUser = "suser/user/check_user"
- }
- }
-
- extension Api {
- /// 首页 queryKeyword是post请求 其他的是get请求
- enum Home {
-
- static let banner = "banner/json"
-
- static let topArticle = "article/top/json"
-
- static let normalArticle = "article/list/"
-
- static let hotKey = "hotkey/json"
-
- static let queryKeyword = "article/query/"
- }
- }
-
- extension Api {
- /// 项目 均是get请求
- enum Project {
- static let tags = "project/tree/json"
-
- static let tagList = "project/list/"
- }
- }
-
- extension Api {
- /// 公众号 均是get请求
- enum PublicNumber {
- static let tags = "wxarticle/chapters/json"
-
- static let tagList = "wxarticle/list/"
- }
- }
-
-
-
-
- extension Api {
- /// 体系 均是get请求
- enum Tree {
-
- static let tags = "tree/json"
-
- static let tagList = "article/list/"
- }
- }
-
- extension Api {
- /// 我的 取消收藏和点击收藏操作为post,其他为get
- enum My {
- static let coinRank = "coin/rank/"
-
- static let userCoinInfo = "lg/coin/userinfo/json"
-
- static let myCoinList = "lg/coin/list/"
-
- static let collectArticleList = "lg/collect/list/"
-
- static let collectArticle = "lg/collect/"
-
- static let unCollectArticle = "lg/uncollect_originId/"
-
- static let unreadCount = "message/lg/count_unread/json"
-
- static let unreadList = "message/lg/unread_list/"
-
- static let readList = "message/lg/readed_list/"
- }
- }
-
- extension Api {
- enum Other {
- static let tools = "tools/list/json"
-
- /// 问答和工具在数据结构与页面样式一模一样,所以就不再不停的重复写了
- static let questionAndAnswer = "wenda/list/"
-
- /// 常用网站
- static let friend = "friend/json"
-
- /// 导航
- static let navi = "navi/json"
- }
- }
-
- extension Api {
- enum Course {
- static let tags = "chapter/547/sublist/json"
-
- static let tagList = "article/list/"
- }
- }
-
- extension Api {
- enum Mock {
- static let mourn = "mourn/json"
- }
- }
|