diff --git a/api/task/index.js b/api/task/index.js new file mode 100644 index 0000000..8d99e6e --- /dev/null +++ b/api/task/index.js @@ -0,0 +1,17 @@ +import http from '@/http/http.js' + +// 获取任务列表 +export const announcement = (data) => { + return http.request({ + url: '/announcement', + data + }) +} +// 获取签到 +export const getUserSignData = (data) => { + return http.request({ + url: 'userSignRecord/getUserSignData', + data + }) +} + \ No newline at end of file diff --git a/pages.json b/pages.json index 14a959e..d8671b2 100644 --- a/pages.json +++ b/pages.json @@ -24,8 +24,7 @@ }, { "path": "pages/task/index", "style": { - "navigationBarTitleText": "", - "navigationStyle": "custom" + "navigationBarTitleText": "任务大厅" } }, { "path": "pages/chasingDrama/index", diff --git a/pages/index/index.vue b/pages/index/index.vue index 945c423..d593ca8 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -64,7 +64,6 @@ import { onReachBottom } from '@dcloudio/uni-app' import contentlist from './components/contentlist.vue' -import http from '@/http/http.js' let datas = reactive({ noticeList: [], //公告列表 @@ -94,18 +93,10 @@ onReachBottom(() => { // 获取弹窗信息 async function getPop() { let res = await announcement() - if (res.code == 0) { - if (res.data && res.data.state == 1) { - datas.ruleShow = true - datas.rule_title = res.data.title - datas.rule_content = res.data.content - } - } else { - uni.showToast({ - title: res.msg, - duration: 1000, - icon: 'none' - }); + if (res.state == 1) { + datas.ruleShow = true + datas.rule_title = res.title + datas.rule_content = res.content } } // 搜索跳转 @@ -117,15 +108,7 @@ function moreVideo() { // 公告 async function getMsg() { let res = await messageselectMessage() - if (res.code == 0) { - datas.noticeList = res.data.list - } else { - uni.showToast({ - title: res.msg, - duration: 1000, - icon: 'none' - }); - } + datas.noticeList = res.list } //获取推荐视频 async function getrecomVideo(sort, active = 1) { @@ -140,19 +123,11 @@ async function getrecomVideo(sort, active = 1) { classifyId: '' }) - if (res.code == 0) { - if (datas.page == 1) { - datas.list = res.data.list + if (datas.page == 1) { + datas.list = res.list } else { - datas.list = [...datas.list, ...res.data.list] + datas.list = [...datas.list, ...res.list] } - } else { - uni.showToast({ - title: res.msg, - duration: 1000, - icon: 'none' - }); - } } diff --git a/pages/index/search/index.vue b/pages/index/search/index.vue index ef44aaa..312970a 100644 --- a/pages/index/search/index.vue +++ b/pages/index/search/index.vue @@ -72,16 +72,15 @@ function doSearchs(keyWord) { // 搜索 async function doSearch() { datas.isSearch = false - let res = await selectCourseTitles({ title: datas.keyword, limit: 20, page: datas.page, }) if (datas.page == 1) { - datas.keywordList = res.data.list + datas.keywordList = res.list } else { - datas.keywordList = [...datas.keywordList, ...res.data.list] + datas.keywordList = [...datas.keywordList, ...res.list] } } diff --git a/pages/task/index.vue b/pages/task/index.vue index b15bdca..2b5248e 100644 --- a/pages/task/index.vue +++ b/pages/task/index.vue @@ -1,11 +1,206 @@ - diff --git a/static/task/renwubg.png b/static/task/renwubg.png new file mode 100644 index 0000000..664accf Binary files /dev/null and b/static/task/renwubg.png differ diff --git a/static/task/task_bg.png b/static/task/task_bg.png new file mode 100644 index 0000000..80e4c66 Binary files /dev/null and b/static/task/task_bg.png differ diff --git a/static/task/task_icon1.png b/static/task/task_icon1.png new file mode 100644 index 0000000..510745c Binary files /dev/null and b/static/task/task_icon1.png differ diff --git a/static/task/task_icon2.png b/static/task/task_icon2.png new file mode 100644 index 0000000..8e2686e Binary files /dev/null and b/static/task/task_icon2.png differ diff --git a/static/task/xing (1).png b/static/task/xing (1).png new file mode 100644 index 0000000..8dad669 Binary files /dev/null and b/static/task/xing (1).png differ diff --git a/static/task/xing (2).png b/static/task/xing (2).png new file mode 100644 index 0000000..5a796e8 Binary files /dev/null and b/static/task/xing (2).png differ