diff --git a/App.vue b/App.vue index fc89215..bcb01a2 100644 --- a/App.vue +++ b/App.vue @@ -1,124 +1,123 @@ \ No newline at end of file diff --git a/api/index/index.js b/api/index/index.js new file mode 100644 index 0000000..4d2f84a --- /dev/null +++ b/api/index/index.js @@ -0,0 +1,35 @@ +import http from '@/http/http.js' + +// 获取弹窗信息 +export const announcement = (data) => { + return http.request({ + url: '/announcement', + data + }) +} +// 获取公告 +export const messageselectMessage = (data) => { + return http.request({ + url: '/message/selectMessage', + data: { + page: 1, + limit: 5, + state: 1 + } + }) +} +// 获取推荐视频 +export const courseselectCourse = (data) => { + return http.request({ + url: '/course/selectCourse', + data + }) +} + +// 搜索 +export const selectCourseTitles = (data) => { + return http.request({ + url: '/course/selectCourseTitles', + data + }) +} \ No newline at end of file diff --git a/api/init.js b/api/init.js new file mode 100644 index 0000000..5a7398f --- /dev/null +++ b/api/init.js @@ -0,0 +1,13 @@ +import http from '@/http/http.js' + +export async function init() { + + //热搜词 + http.request({ + url: 'common/type/249', + }).then(res => { + if (res.code == 0) { + uni.setStorageSync('moreSearch', res.data.value) + } + }) +} \ No newline at end of file diff --git a/http/http.js b/http/http.js index 688facf..0e73e6b 100644 --- a/http/http.js +++ b/http/http.js @@ -13,8 +13,7 @@ const loadingShowTime = 200 function getHeader() { const headerObject = {} - headerObject["token"] = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyNjkyNSIsImlhdCI6MTczNTg4OTk5NCwiZXhwIjoxNzM2NDk0Nzk0fQ.j-KFEE1FHckmFCO8UA884RBWvpMv8MfEGj7GPGf3kVo6sHeORl043Yle_w7HdTZKPpQqSr2LQLCq_rUxG4qqwA' - // headerObject["token"] = uni.getStorageSync('token') + headerObject["token"] = uni.getStorageSync('token') return headerObject } diff --git a/pages/index/index.vue b/pages/index/index.vue index 660e22a..42d848e 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -10,7 +10,7 @@ - \ No newline at end of file