From 91a9b5b6266cf402d5ab4940dd910a0c003d4589 Mon Sep 17 00:00:00 2001 From: sx <2427911852@qq.com> Date: Fri, 3 Jan 2025 18:11:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jiuyi2/common/js/util.js | 28 + jiuyi2/components/index/indexVideo.vue | 23 +- jiuyi2/components/index/task.vue | 25 +- jiuyi2/pages/index/index.nvue | 272 +- jiuyi2/pages/mine/homepage.vue | 2 +- .../cache/.vite/deps/@tencentcloud_chat.js | 2 +- ...centcloud_chat_modules_group-module__js.js | 2 +- .../dist/cache/.vite/deps/_metadata.json | 18 +- .../dist/cache/.vite/deps/chunk-TDUMLE5V.js | 17 + ...-Y2F7D3TJ.js.map => chunk-TDUMLE5V.js.map} | 0 .../dist/cache/.vite/deps/chunk-Y2F7D3TJ.js | 9 - .../dist/cache/.vite/deps/crypto-js.js | 6591 +++++++++++++++++ .../dist/cache/.vite/deps/crypto-js.js.map | 7 + .../cache/.vite/deps/tim-upload-plugin.js | 2 +- .../dist/dev/.nvue/pages/index/index.js | 203 +- .../unpackage/dist/dev/.nvue/shareFirend.js | 36 +- .../dist/dev/app-plus/app-service.js | 640 +- .../dist/dev/app-plus/pages/index/index.js | 237 +- .../dev/app-plus/pages/index/videoDetail.js | 36 +- jiuyi2/vite.config.js | 4 +- 20 files changed, 7388 insertions(+), 766 deletions(-) create mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/chunk-TDUMLE5V.js rename jiuyi2/unpackage/dist/cache/.vite/deps/{chunk-Y2F7D3TJ.js.map => chunk-TDUMLE5V.js.map} (100%) delete mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/chunk-Y2F7D3TJ.js create mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/crypto-js.js create mode 100644 jiuyi2/unpackage/dist/cache/.vite/deps/crypto-js.js.map diff --git a/jiuyi2/common/js/util.js b/jiuyi2/common/js/util.js index da7c5309..a093f6e5 100644 --- a/jiuyi2/common/js/util.js +++ b/jiuyi2/common/js/util.js @@ -1804,6 +1804,34 @@ const util = { }) }) }, + + // 获取我的任务 + getMyTask() { + // 验证登录 + util.isLogin().then(() => { + // 获取任务 + api.intergral.viewingTasks({}).then(rs => { + if (rs.code == 200) { + uni.$store.commit('setState', { + key: 'task', + value: rs.data, + }) + return + } + }) + }).catch(() => { + // 修改为默认值 + uni.$store.commit('setState', { + key: 'task', + value: { + //任务类型 0.任务读秒 1.流量点(种子)读秒 + taskType: 0, + //有效时长 + viewingDuration: 0, + }, + }) + }) + }, } export default util \ No newline at end of file diff --git a/jiuyi2/components/index/indexVideo.vue b/jiuyi2/components/index/indexVideo.vue index edf24f4b..cebde561 100644 --- a/jiuyi2/components/index/indexVideo.vue +++ b/jiuyi2/components/index/indexVideo.vue @@ -106,17 +106,17 @@ return result }) + watch(() => props.current, (nV) => { + if (nV == props.index) play() + else pause() + }) + // 挂载后调用 onMounted(() => { // 视频上下文对象 videoCtx.value = uni.createVideoContext(`video${props.tabIndex}${props.index}`) }) - watch(() => props.current, (nV) => { - if (nV == props.index) play() - else pause() - }) - // 格式化 function formatNumber(result) { result = parseFloat(result) * 10 @@ -464,11 +464,14 @@ @touchcancel="onTouchCancel" @longpress="longtap"> -