From 939ff2e7f4499e34a8cf42a4b256f6d0e37efeb2 Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 25 Aug 2021 14:05:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http.api.js | 81 +++++++++ my.vue | 117 ++++++++++++ pages.json | 184 +++++++++++++++++++ video.vue | 411 ++++++++++++++++++++++++++++++++++++++++++ videoWatchRecords.vue | 89 +++++++++ watchPage.vue | 61 +++++++ 6 files changed, 943 insertions(+) create mode 100644 http.api.js create mode 100644 my.vue create mode 100644 pages.json create mode 100644 video.vue create mode 100644 videoWatchRecords.vue create mode 100644 watchPage.vue diff --git a/http.api.js b/http.api.js new file mode 100644 index 0000000..501d851 --- /dev/null +++ b/http.api.js @@ -0,0 +1,81 @@ +// 如果没有通过拦截器配置域名的话,可以在这里写上完整的URL(加上域名部分) +let hotSearchUrl = '/ebapi/store_api/hot_search'; +let indexUrl = '/ebapi/public_api/index'; + +// 此处第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作,更多内容详见uView对拦截器的介绍部分: +// https://uviewui.com/js/http.html#%E4%BD%95%E8%B0%93%E8%AF%B7%E6%B1%82%E6%8B%A6%E6%88%AA%EF%BC%9F +const install = (Vue, vm) => { + // 此处没有使用传入的params参数 + let getSearch = (params = {}) => vm.$u.get(hotSearchUrl, { + id: 2 + }); + // 此处使用了传入的params参数,一切自定义即可 + let getUserInfo = (params = {}) => vm.$u.get('/system/user/info/', params);//获取用户信息 + + let getCode = (params = {}) => vm.$u.post('/system/sendmsg/', params); //获取邮箱验证码 + + let codeLogin = (params = {}) => vm.$u.post('/token2/', params); //邮箱验证码登录 + + let login = (params = {}) => vm.$u.post('/token/', params); //账户密码登录 + // 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下 + + let wxmplogin = (params = {}) => vm.$u.post('/wxmplogin/', params); //微信登录 + + let bindmp = (params = {}) => vm.$u.post('/system/user/bindwxmp/', params); //微信绑定 + + let unbindmp = (params = {}) => vm.$u.post('/system/user/unbindwxmp/', params); //微信绑定 + + let getMyInspectTaskList = (params = {}) => vm.$u.get('/quality/subinspecttask/self/', params); + + let getSubinspectTask = (id, params)=> vm.$u.get(`/quality/subinspecttask/${id}/`, params); + + //获取子任务涉及的单位 + let getSubtaskDepts = (id, params)=> vm.$u.get(`/quality/subinspecttask/${id}/depts/`, params); + + //获取子任务单位的详细信息 + let getSubtaskDept = (id, params)=> vm.$u.get(`/quality/inspectdept/${id}/`, params); + let getInspectRecords = (params)=> vm.$u.get('/quality/inspectrecord/', params); + let getInspectRecord = (id, params)=> vm.$u.get(`/quality/inspectrecord/${id}/`, params); + let checkInspectRecord = (id, params)=> vm.$u.put(`/quality/inspectrecord/${id}/check/`, params); + let startInspectDept = (id, params)=>vm.$u.put(`/quality/inspectdept/${id}/start/`, params);//开始检查 + let upInspectDept = (id, params)=>vm.$u.put(`/quality/inspectdept/${id}/up/`, params);//提交记录 + let appointChecker = (params) => vm.$u.post('/quality/inspectrecord/appoint/', params);//检查指派 + let getDocument = (params={})=>vm.$u.get('/quality/document/', params);//文档 + let getVideos = (params={})=>vm.$u.get('/vod/video/', params);//点播视频 + let getThisVideo = (id,params)=>vm.$u.get(`/vod/video/${id}/`, params);//点播视频 + let getDickey = (params={})=>vm.$u.get('/system/dict/', params);//查询字典 + + let putMyVideoView =(id,params)=>vm.$u.put(`/vod/video/${id}/myview/`,params);//更新本人观看信息 + + let getMyVideoRecord =(id)=>vm.$u.get(`/vod/video/myview/`);//获取本人观看记录 + let getVideoRecord =(id)=>vm.$u.get(`/vod/video/${id}/myview/`);//获取本人观看记录 + vm.$u.api = {getUserInfo, + getCode, + codeLogin, + login, + wxmplogin, + bindmp, + unbindmp, + getMyInspectTaskList, + getSubinspectTask, + getSubtaskDepts, + getInspectRecords, + getSubtaskDept, + getInspectRecord, + checkInspectRecord, + upInspectDept, + appointChecker, + startInspectDept, + getDocument, + getVideos, + getDickey, + putMyVideoView, + getMyVideoRecord, + getVideoRecord, + getThisVideo + }; +} + +export default { + install +} \ No newline at end of file diff --git a/my.vue b/my.vue new file mode 100644 index 0000000..31de43c --- /dev/null +++ b/my.vue @@ -0,0 +1,117 @@ + + + + + diff --git a/pages.json b/pages.json new file mode 100644 index 0000000..d86c4f6 --- /dev/null +++ b/pages.json @@ -0,0 +1,184 @@ +{ + "easycom": { + "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" + }, + // "condition": { //模式配置,仅开发期间生效 + // "current": 0, //当前激活的模式(list 的索引项) + // "list": [{ + // "name": "test", //模式名称 + // "path": "pages/componentsC/test/index", //启动页面,必选 + // "query": "uuid=c4bba940-f69e-11ea-a419-6bafda9d095e&__id__=1" //启动参数,在页面的onLoad函数里面得到 + // }] + // }, + "pages": [ + { + "path" : "pages/login/login", + "style" : + { + "navigationBarTitleText": "验证码登录", + "enablePullDownRefresh": false + } + + }, + { + "path" : "pages/home/home", + "style" : + { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } + + }, + { + "path" : "pages/my/my", + "style" : + { + "navigationBarTitleText": "个人中心", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/login/login_password", + "style" : + { + "navigationBarTitleText": "密码登录", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/subtask/my", + "style" : + { + "navigationBarTitleText": "我的巡查任务", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/subtask/subtaskdetail", + "style" : + { + "navigationBarTitleText": "任务详情", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/inspectrecord/index", + "style" : + { + "navigationBarTitleText": "检查项目", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/inspectrecord/recorddo", + "style" : + { + "navigationBarTitleText": "检查确认", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/inspectrecord/recorddetail", + "style" : + { + "navigationBarTitleText": "条款详情", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/inspectrecord/deptreport", + "style" : + { + "navigationBarTitleText": "检查任务", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/document/index", + "style" : + { + "navigationBarTitleText": "手册资料", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/vod/index", + "style" : + { + "navigationBarTitleText": "云点播", + "enablePullDownRefresh": true, + "onReachBottomDistance":100 + } + + } + ,{ + "path" : "pages/vod/video", + "style" : + { + "navigationBarTitleText": "云点播", + "enablePullDownRefresh": false + } + + },{ + "path":"pages/my/videoWatchRecords", + "style" : + { + "navigationBarTitleText": "观看记录", + "enablePullDownRefresh": false + } + },{ + "path":"pages/vod/watchPage", + "style" : + { + "navigationBarTitleText": "云视频", + "enablePullDownRefresh": false + } + } + ], + "globalStyle": { + "navigationBarTextStyle": "white", + "navigationBarTitleText": "uView", + "navigationBarBackgroundColor": "#2581e4", + "backgroundColor": "#FFFFFF" + }, + "tabBar": { + "color": "#909399", + "selectedColor": "#303133", + "backgroundColor": "#FFFFFF", + "borderStyle": "black", + "list": [{ + "pagePath": "pages/home/home", + "iconPath": "static/common/home.png", + "selectedIconPath": "static/common/homec.png", + "text": "主页" + }, + { + "pagePath": "pages/vod/video", + "iconPath": "static/common/play.png", + "selectedIconPath": "static/common/playc.png", + "text": "点播" + }, + { + "pagePath": "pages/my/my", + "iconPath": "static/common/me.png", + "selectedIconPath": "static/common/mec.png", + "text": "个人中心" + } + ] + }, + "plugins": { + "tencentvideo": { + "version": "1.4.9", + "provider": "wxa75efa648b60994b" + } + } +} diff --git a/video.vue b/video.vue new file mode 100644 index 0000000..70f4d9c --- /dev/null +++ b/video.vue @@ -0,0 +1,411 @@ + + + + + diff --git a/videoWatchRecords.vue b/videoWatchRecords.vue new file mode 100644 index 0000000..906dfa5 --- /dev/null +++ b/videoWatchRecords.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/watchPage.vue b/watchPage.vue new file mode 100644 index 0000000..864109c --- /dev/null +++ b/watchPage.vue @@ -0,0 +1,61 @@ + + + + +