合并代码
This commit is contained in:
parent
bcc6d23092
commit
91a9b5b626
|
@ -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
|
|
@ -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">
|
||||
<statusBar />
|
||||
|
||||
<video class="video f1" :id="'video' + tabIndex + index" :src="item.videoUrl" :poster="item.coverUrl"
|
||||
:http-cache="true" :show-fullscreen-btn="false" :enable-progress-gesture="false" :controls="false"
|
||||
@play="onVideoPlay" @pause="onVideoPause" :show-center-play-btn="false"
|
||||
@timeupdate="handleTimeupdate" @waiting="handleWaiting" :play-strategy="2" :loop="true"
|
||||
:object-fit="fit" />
|
||||
<!-- 视频 增加判断防止重复加载 -->
|
||||
<template v-if="item.videoUrl">
|
||||
<video class="video f1" :id="'video' + tabIndex + index" :src="item.videoUrl"
|
||||
:poster="item.coverUrl" :http-cache="true" :show-fullscreen-btn="false"
|
||||
:enable-progress-gesture="false" :controls="false" @play="onVideoPlay" @pause="onVideoPause"
|
||||
:show-center-play-btn="false" @timeupdate="handleTimeupdate" @waiting="handleWaiting"
|
||||
:play-strategy="2" :loop="true" :object-fit="fit" />
|
||||
</template>
|
||||
</view>
|
||||
|
||||
<!-- 视频进度条 -->
|
||||
|
|
|
@ -15,43 +15,28 @@
|
|||
//
|
||||
import api from '@/api/index.js'
|
||||
const store = useStore()
|
||||
//读秒记录
|
||||
const viewData = ref({
|
||||
// 有效读秒任务
|
||||
seconds: 0,
|
||||
})
|
||||
// 当前任务
|
||||
const task = computed(() => {
|
||||
return store.state.task
|
||||
})
|
||||
// 进度条
|
||||
const progress = computed(() => {
|
||||
let result = viewData.value.seconds
|
||||
result = (Number(result) % 300) / 300 * 100
|
||||
let result = task.value.viewingDuration
|
||||
result = (Number(result) % 300) / 3
|
||||
return result
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
util.isLogin(() => {
|
||||
getTasks()
|
||||
})
|
||||
// 获取我的任务
|
||||
util.getMyTask()
|
||||
})
|
||||
|
||||
// 今日任务读秒记录
|
||||
function getTasks() {
|
||||
api.intergral.viewingTasks({}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
viewData.value = rs.data
|
||||
return
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="task pr mtb30 ptb20 plr40 f28 bFFFBF3 br20">
|
||||
<view class="title c333 f36" v-if="task === 0">任务读秒</view>
|
||||
<view class="title c333 f36" v-else>有效读秒</view>
|
||||
<view>{{task.viewingDuration}}</view>
|
||||
|
||||
<view class="progressBox oh bar mt60">
|
||||
<view class="progress bar" :style="{width: progress + '%'}"></view>
|
||||
|
|
|
@ -52,14 +52,10 @@
|
|||
const dom = uni.requireNativePlugin('dom')
|
||||
// 钟表提示弹窗
|
||||
const oclockWindow = ref(false)
|
||||
// 读秒
|
||||
// 有效读秒
|
||||
const readSecond = reactive({
|
||||
// 单个视频最大
|
||||
max: 20,
|
||||
// 累计
|
||||
count: 0,
|
||||
// 总数
|
||||
total: 0,
|
||||
// 总数最大
|
||||
totalMax: 300,
|
||||
// 定时器
|
||||
|
@ -119,20 +115,21 @@
|
|||
const discOffsetTop = ref(0)
|
||||
// 底部菜单高度
|
||||
const footerMenuHeight = ref(0)
|
||||
// 当前任务
|
||||
const task = computed(() => {
|
||||
return uni.$store.state.task
|
||||
})
|
||||
// 用户信息
|
||||
const userinfo = computed(() => {
|
||||
let result = uni.$store.state.userinfo || {}
|
||||
return result
|
||||
return uni.$store.state.userinfo || {}
|
||||
})
|
||||
// 当前tab选中
|
||||
const tabCurrent = computed(() => {
|
||||
let result = tab[tabIndex.value]
|
||||
return result
|
||||
return tab[tabIndex.value]
|
||||
})
|
||||
// 当前视频
|
||||
// 当前视频元素对象
|
||||
const currentVideoRef = computed(() => {
|
||||
let result = proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]]
|
||||
return result
|
||||
return proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]]
|
||||
})
|
||||
|
||||
// 加载完成之后
|
||||
|
@ -151,18 +148,13 @@
|
|||
// 获取列表
|
||||
tabCurrent.value.getList()
|
||||
|
||||
// 登录
|
||||
util.isLogin().then(rs => {
|
||||
// 获取今日观看任务
|
||||
getTask()
|
||||
})
|
||||
//
|
||||
util.getMyTask()
|
||||
|
||||
// 监听登录
|
||||
uni.$on('login', () => {
|
||||
// 获取列表
|
||||
tabCurrent.value.refreshList()
|
||||
// 获取今日观看任务
|
||||
getTask()
|
||||
})
|
||||
|
||||
// 监听登录
|
||||
|
@ -200,17 +192,10 @@
|
|||
})
|
||||
|
||||
onReady(() => {
|
||||
// 获取底部菜单节点信息
|
||||
// dom.getComponentRect(proxy.$refs.footerMenuRef, (option) => {
|
||||
// console.log('footerMenuRef', option)
|
||||
// // footerMenuHeight.value = option.size.height
|
||||
// })
|
||||
nextTick(() => {
|
||||
// 获取视频容器节点信息
|
||||
dom.getComponentRect(proxy.$refs.containerRef[0], (option) => {
|
||||
viewSize.height = option.size.height
|
||||
viewSize.width = option.size.width
|
||||
})
|
||||
// 获取视频容器节点信息
|
||||
dom.getComponentRect(proxy.$refs.containerRef[0], (option) => {
|
||||
viewSize.height = option.size.height
|
||||
viewSize.width = option.size.width
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -231,45 +216,6 @@
|
|||
uni.$off('focusUser')
|
||||
})
|
||||
|
||||
// 获取今日观看任务
|
||||
function getTask() {
|
||||
api.video.viewingTasks().then(rs => {
|
||||
if (rs.code == 200) {
|
||||
const result = rs.data
|
||||
if (!result) return
|
||||
if (result) readSecond.total = Number(result.seconds) || 0
|
||||
return
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 有效读秒增加
|
||||
function readSecondAdd() {
|
||||
clearInterval(readSecond.timer)
|
||||
// 如果今天已达成 则继不继续计算有效读秒
|
||||
if (readSecond.total >= readSecond.totalMax) return
|
||||
readSecond.timer = setInterval(() => {
|
||||
// 判断当前视频是否达到最大有效读秒
|
||||
if (readSecond.count > readSecond.max) {
|
||||
// 增加计数
|
||||
readSecond.total += readSecond.count
|
||||
// 重置数量
|
||||
readSecond.count = 0
|
||||
// 如果达成记录
|
||||
if (readSecond.total >= readSecond.totalMax) {
|
||||
// util.alert('您已完成今日观看任务')
|
||||
return
|
||||
}
|
||||
clearInterval(readSecond.timer)
|
||||
} else readSecond.count++
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
// 有效读秒暂停
|
||||
function readSecondPause() {
|
||||
clearInterval(readSecond.timer)
|
||||
}
|
||||
|
||||
// 重载关注列表
|
||||
function refreshAttList() {
|
||||
attList.pageNum = 1
|
||||
|
@ -293,22 +239,8 @@
|
|||
pageNum: attList.pageNum,
|
||||
},
|
||||
}).then(rs => {
|
||||
// console.log('followVideo', rs)
|
||||
if (rs.code == 200) {
|
||||
// 合并
|
||||
attList.data.push(...rs.rows.map(item => {
|
||||
item.format_videoUrl = util.format_url(item.videoUrl, 'video')
|
||||
item.format_header = util.format_url(item.header, 'img')
|
||||
return item
|
||||
}))
|
||||
// 总数
|
||||
attList.total = rs.total
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
// 设置数据列表
|
||||
setList(rs, attList)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -337,41 +269,76 @@
|
|||
}
|
||||
}).then(rs => {
|
||||
console.log('getRecList then rs', recList, rs)
|
||||
if (rs.code == 200) {
|
||||
// 总数
|
||||
recList.total = rs.total
|
||||
const list = rs.rows.sort(() => Math.random() - Math.random())
|
||||
// 第一页
|
||||
if (recList.pageNum == 1) recList.data.length = 0
|
||||
// 合并
|
||||
recList.data.push(...list.map(item => {
|
||||
// 播放倍速
|
||||
item.speed = 1
|
||||
return item
|
||||
}))
|
||||
console.log('result', recList.data, rs)
|
||||
|
||||
// 如果有多的视频 并且当前数据为一条
|
||||
if (recList.total > 1 && recList.data.length <= 1) getMoreRecList()
|
||||
|
||||
setTimeout(() => {
|
||||
const pages = getCurrentPages()
|
||||
// 判断是否当前页
|
||||
if (pages[pages.length - 1].route == 'pages/index/index') {
|
||||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].playState.value =
|
||||
true
|
||||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].play()
|
||||
}
|
||||
}, 50)
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
// 设置列表
|
||||
setList(rs, recList)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载视频数据列表
|
||||
* @param {Object} rs 接口返回报文
|
||||
* @param {Object} obj 数据存放对象
|
||||
*/
|
||||
function setList(rs, obj) {
|
||||
if (rs.code == 200) {
|
||||
// 总数
|
||||
obj.total = rs.total
|
||||
// 重新排序
|
||||
const list = rs.rows.sort(() => Math.random() - Math.random())
|
||||
// 第一页清空数据
|
||||
if (obj.pageNum == 1) obj.data.length = 0
|
||||
// 合并
|
||||
obj.data.push(...list.map(item => {
|
||||
// 初始播放时间
|
||||
item.readSecond = 0
|
||||
return item
|
||||
}))
|
||||
console.log('result', obj.data, rs)
|
||||
|
||||
// 如果有多的视频 并且当前数据为一条
|
||||
// if (obj.total > 1 && obj.data.length <= 1) getMoreRecList()
|
||||
|
||||
setTimeout(() => {
|
||||
const pages = getCurrentPages()
|
||||
// 判断是否当前页
|
||||
if (pages[pages.length - 1].route == 'pages/index/index') {
|
||||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].playState.value =
|
||||
true
|
||||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].play()
|
||||
}
|
||||
}, 50)
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false,
|
||||
})
|
||||
}
|
||||
|
||||
// 有效读秒增加
|
||||
function readSecondAdd() {
|
||||
clearInterval(readSecond.timer)
|
||||
// 当前视频对象
|
||||
const item = tab[tabIndex.value].listData()[current[tabIndex.value]]
|
||||
|
||||
// 开启计时器
|
||||
readSecond.timer = setInterval(() => {
|
||||
// 当前视频有效读秒 小于等于 最大有效读秒限制
|
||||
if (item.readSecond <= Math.min(Math.floor(item.videoDuration) - 2, 20)) {
|
||||
// 增加这条视频的有效读秒
|
||||
item.readSecond++
|
||||
} else {
|
||||
// 清空计时器
|
||||
clearInterval(readSecond.timer)
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
// 有效读秒暂停
|
||||
function readSecondPause() {
|
||||
clearInterval(readSecond.timer)
|
||||
}
|
||||
|
||||
/**
|
||||
* 触摸事件完成 滚动到当前位置
|
||||
* @param {Number} target 滚动到下标的元素
|
||||
|
@ -392,25 +359,12 @@
|
|||
|
||||
// 如果视频切换
|
||||
if (current[tab_index] != currentLast[tab_index]) {
|
||||
nextTick(() => {
|
||||
// 暂停上一个视频
|
||||
lastVideoRef.playState.value = false
|
||||
//
|
||||
lastVideoRef.pause()
|
||||
|
||||
// 播放当前视频
|
||||
proxy.$refs[`videoRef${tab_index}`][current[tab_index]].playState.value = true
|
||||
proxy.$refs[`videoRef${tab_index}`][current[tab_index]].play()
|
||||
})
|
||||
|
||||
// 停止当前有效读秒统计
|
||||
readSecondPause()
|
||||
// 浏览记录
|
||||
browseLog(lastVideoRef)
|
||||
// 清空累计继续计时
|
||||
readSecond.total += readSecond.count
|
||||
//
|
||||
if (readSecond.total < readSecond.totalMax) readSecondAdd()
|
||||
// 开始记录
|
||||
readSecondAdd()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -476,8 +430,8 @@
|
|||
browseLog(lastVideoRef)
|
||||
// 清空累计继续计时
|
||||
readSecond.total += readSecond.count
|
||||
//
|
||||
if (readSecond.total < readSecond.totalMax) readSecondAdd()
|
||||
// 开始记录有效读秒
|
||||
readSecondAdd()
|
||||
}
|
||||
tabIndex.value = index
|
||||
// 根据是否加载过判断 播放还是获取
|
||||
|
@ -522,8 +476,8 @@
|
|||
// 视频播放
|
||||
function handleVideoOnPlay() {
|
||||
if (proxy.$refs.discRef) proxy.$refs.discRef.play()
|
||||
//
|
||||
if (readSecond.total < readSecond.totalMax) readSecondAdd()
|
||||
// 开始计时有效读秒
|
||||
readSecondAdd()
|
||||
}
|
||||
|
||||
// 视频暂停
|
||||
|
@ -539,33 +493,49 @@
|
|||
function browseLog(element) {
|
||||
util.isLogin().then(rs => {
|
||||
// if (readSecond.count == 0) return
|
||||
console.log('data', {
|
||||
const data = {
|
||||
// 视频id
|
||||
videoId: element.item.id,
|
||||
// 有效读秒时间统计
|
||||
viewingDuration: Math.floor(readSecond.count),
|
||||
viewingDuration: Math.floor(element.item.readSecond),
|
||||
// 视频秒数
|
||||
videoDescription: Math.floor(element.videoTime.currentTime),
|
||||
//
|
||||
task: 0,
|
||||
})
|
||||
}
|
||||
console.log('browseLog data', data)
|
||||
//
|
||||
api.video.browseLog({
|
||||
data: {
|
||||
// 视频id
|
||||
videoId: element.item.id,
|
||||
// 有效读秒时间统计
|
||||
viewingDuration: Math.floor(readSecond.count),
|
||||
// 视频秒数
|
||||
videoDescription: Math.floor(element.videoTime.currentTime),
|
||||
//
|
||||
task: 0,
|
||||
}
|
||||
data,
|
||||
}).then(rs => {
|
||||
console.log('browseLog', rs)
|
||||
if (rs.code != 200) {
|
||||
if (rs.code == 200) {
|
||||
// 计数
|
||||
const result = rs.data
|
||||
// 现在的有效读秒
|
||||
const taskValue = task.value
|
||||
console.log('browseLog result', rs, taskValue)
|
||||
|
||||
// 如果原来任务是优先任务 当前任务是有效读秒
|
||||
if (taskValue.taskType == 0 && result.taskType == 1) {
|
||||
// 优先任务完成 播放烟花动画
|
||||
console.log('优先任务完成 播放烟花动画')
|
||||
}
|
||||
// 如果原来任务任务是有效读秒 并且新返回的数据小于当前的任务进度
|
||||
if (result.taskType == 1 && (result.viewingDuration < taskValue.viewingDuration)) {
|
||||
console.log('有效读秒完成 播放任务完成动画')
|
||||
}
|
||||
|
||||
//
|
||||
uni.$store.commit('setState', {
|
||||
key: 'task',
|
||||
value: result,
|
||||
})
|
||||
return
|
||||
} else {
|
||||
console.log('browseLog err', rs)
|
||||
}
|
||||
}).catch(rs => {
|
||||
console.log('browseLog err fail', rs)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<view class="page" v-if="!userinfo.id && 0">
|
||||
<view class="page" v-if="!userinfo.id">
|
||||
<noLogin class="f1" />
|
||||
</view>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {
|
||||
__commonJS
|
||||
} from "./chunk-Y2F7D3TJ.js";
|
||||
} from "./chunk-TDUMLE5V.js";
|
||||
|
||||
// ../../../../document/九亿商城/jy/jiuyi2/node_modules/@tencentcloud/chat/index.js
|
||||
var require_chat = __commonJS({
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import "./chunk-Y2F7D3TJ.js";
|
||||
import "./chunk-TDUMLE5V.js";
|
||||
|
||||
// ../../../../document/九亿商城/jy/jiuyi2/node_modules/@tencentcloud/chat/modules/group-module.js
|
||||
var e = 2;
|
||||
|
|
|
@ -2,30 +2,36 @@
|
|||
"hash": "7c477afd",
|
||||
"configHash": "4d944da7",
|
||||
"lockfileHash": "6e88141a",
|
||||
"browserHash": "85bb12d7",
|
||||
"browserHash": "dfaf7bb6",
|
||||
"optimized": {
|
||||
"@tencentcloud/chat": {
|
||||
"src": "../../../../../node_modules/@tencentcloud/chat/index.js",
|
||||
"file": "@tencentcloud_chat.js",
|
||||
"fileHash": "96dcd5a5",
|
||||
"fileHash": "df842015",
|
||||
"needsInterop": true
|
||||
},
|
||||
"@tencentcloud/chat/modules/group-module.js": {
|
||||
"src": "../../../../../node_modules/@tencentcloud/chat/modules/group-module.js",
|
||||
"file": "@tencentcloud_chat_modules_group-module__js.js",
|
||||
"fileHash": "9f058786",
|
||||
"fileHash": "f0b26a84",
|
||||
"needsInterop": false
|
||||
},
|
||||
"tim-upload-plugin": {
|
||||
"src": "../../../../../node_modules/tim-upload-plugin/index.js",
|
||||
"file": "tim-upload-plugin.js",
|
||||
"fileHash": "ca183dc1",
|
||||
"fileHash": "e74dbe4d",
|
||||
"needsInterop": true
|
||||
},
|
||||
"crypto-js": {
|
||||
"src": "../../../../../node_modules/crypto-js/index.js",
|
||||
"file": "crypto-js.js",
|
||||
"fileHash": "6dfdc26e",
|
||||
"needsInterop": true
|
||||
}
|
||||
},
|
||||
"chunks": {
|
||||
"chunk-Y2F7D3TJ": {
|
||||
"file": "chunk-Y2F7D3TJ.js"
|
||||
"chunk-TDUMLE5V": {
|
||||
"file": "chunk-TDUMLE5V.js"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
||||
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
||||
}) : x)(function(x) {
|
||||
if (typeof require !== "undefined")
|
||||
return require.apply(this, arguments);
|
||||
throw Error('Dynamic require of "' + x + '" is not supported');
|
||||
});
|
||||
var __commonJS = (cb, mod) => function __require2() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
|
||||
export {
|
||||
__require,
|
||||
__commonJS
|
||||
};
|
||||
//# sourceMappingURL=chunk-TDUMLE5V.js.map
|
|
@ -1,9 +0,0 @@
|
|||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __commonJS = (cb, mod) => function __require() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
|
||||
export {
|
||||
__commonJS
|
||||
};
|
||||
//# sourceMappingURL=chunk-Y2F7D3TJ.js.map
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
import {
|
||||
__commonJS
|
||||
} from "./chunk-Y2F7D3TJ.js";
|
||||
} from "./chunk-TDUMLE5V.js";
|
||||
|
||||
// ../../../../document/九亿商城/jy/jiuyi2/node_modules/tim-upload-plugin/index.js
|
||||
var require_tim_upload_plugin = __commonJS({
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { r as requireNativePlugin, a as resolveEasycom, f as formatAppLog, o as onLoad, b as onReady, c as onShow, d as onHide, e as onUnload } from "../../uni-app.es.js";
|
||||
import { openBlock, createElementBlock, normalizeStyle, createElementVNode, normalizeClass, renderSlot, createCommentVNode, getCurrentInstance, computed, ref, onMounted, onUnmounted, resolveDynamicComponent, Fragment, renderList, toDisplayString, createVNode, withCtx, createBlock, reactive, watch, resolveComponent, nextTick, withModifiers } from "vue";
|
||||
import { openBlock, createElementBlock, normalizeStyle, createElementVNode, normalizeClass, renderSlot, createCommentVNode, getCurrentInstance, computed, ref, onMounted, onUnmounted, resolveDynamicComponent, Fragment, renderList, toDisplayString, createVNode, withCtx, createBlock, reactive, watch, resolveComponent, withModifiers, nextTick } from "vue";
|
||||
import { _ as _export_sfc } from "../../_plugin-vue_export-helper.js";
|
||||
import { _ as __easycom_0$2, a as __easycom_1$1, u as util, b as api, v as video, s as statusBar, c as __easycom_1$2, d as collectAdd, i as indexVideo, e as commentAlt, f as collectAlt, g as shareFirendAlt } from "../../shareFirend.js";
|
||||
const _style_0$9 = { "uni-grid-item__box": { "": { "position": "relative", "flex": 1, "flexDirection": "column" } }, "uni-grid-item--border": { "": { "position": "relative", "borderBottomColor": "#D2D2D2", "borderBottomStyle": "solid", "borderBottomWidth": 0.5, "borderRightColor": "#D2D2D2", "borderRightStyle": "solid", "borderRightWidth": 0.5 } }, "uni-grid-item--border-top": { "": { "position": "relative", "borderTopColor": "#D2D2D2", "borderTopStyle": "solid", "borderTopWidth": 0.5 } }, "uni-highlight": { "": { "backgroundColor:active": "#f1f1f1" } } };
|
||||
|
@ -7021,10 +7021,6 @@ const _sfc_main = {
|
|||
const readSecond = reactive({
|
||||
// 单个视频最大
|
||||
max: 20,
|
||||
// 累计
|
||||
count: 0,
|
||||
// 总数
|
||||
total: 0,
|
||||
// 总数最大
|
||||
totalMax: 300,
|
||||
// 定时器
|
||||
|
@ -7074,17 +7070,17 @@ const _sfc_main = {
|
|||
});
|
||||
const discOffsetTop = ref(0);
|
||||
const footerMenuHeight = ref(0);
|
||||
const task = computed(() => {
|
||||
return uni.$store.state.task;
|
||||
});
|
||||
const userinfo = computed(() => {
|
||||
let result = uni.$store.state.userinfo || {};
|
||||
return result;
|
||||
return uni.$store.state.userinfo || {};
|
||||
});
|
||||
const tabCurrent = computed(() => {
|
||||
let result = tab[tabIndex.value];
|
||||
return result;
|
||||
return tab[tabIndex.value];
|
||||
});
|
||||
const currentVideoRef = computed(() => {
|
||||
let result = proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]];
|
||||
return result;
|
||||
return proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]];
|
||||
});
|
||||
onLoad(() => {
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
|
@ -7095,12 +7091,9 @@ const _sfc_main = {
|
|||
}, 1e3);
|
||||
}
|
||||
tabCurrent.value.getList();
|
||||
util.isLogin().then((rs) => {
|
||||
getTask();
|
||||
});
|
||||
util.getMyTask();
|
||||
uni.$on("login", () => {
|
||||
tabCurrent.value.refreshList();
|
||||
getTask();
|
||||
});
|
||||
uni.$on("logout", () => {
|
||||
tabCurrent.value.refreshList();
|
||||
|
@ -7130,11 +7123,9 @@ const _sfc_main = {
|
|||
});
|
||||
});
|
||||
onReady(() => {
|
||||
nextTick(() => {
|
||||
dom2.getComponentRect(proxy.$refs.containerRef[0], (option) => {
|
||||
viewSize.height = option.size.height;
|
||||
viewSize.width = option.size.width;
|
||||
});
|
||||
dom2.getComponentRect(proxy.$refs.containerRef[0], (option) => {
|
||||
viewSize.height = option.size.height;
|
||||
viewSize.width = option.size.width;
|
||||
});
|
||||
});
|
||||
onShow(() => {
|
||||
|
@ -7149,37 +7140,6 @@ const _sfc_main = {
|
|||
uni.$off("updateVideo");
|
||||
uni.$off("focusUser");
|
||||
});
|
||||
function getTask() {
|
||||
api.video.viewingTasks().then((rs) => {
|
||||
if (rs.code == 200) {
|
||||
const result = rs.data;
|
||||
if (!result)
|
||||
return;
|
||||
if (result)
|
||||
readSecond.total = Number(result.seconds) || 0;
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
function readSecondAdd() {
|
||||
clearInterval(readSecond.timer);
|
||||
if (readSecond.total >= readSecond.totalMax)
|
||||
return;
|
||||
readSecond.timer = setInterval(() => {
|
||||
if (readSecond.count > readSecond.max) {
|
||||
readSecond.total += readSecond.count;
|
||||
readSecond.count = 0;
|
||||
if (readSecond.total >= readSecond.totalMax) {
|
||||
return;
|
||||
}
|
||||
clearInterval(readSecond.timer);
|
||||
} else
|
||||
readSecond.count++;
|
||||
}, 1e3);
|
||||
}
|
||||
function readSecondPause() {
|
||||
clearInterval(readSecond.timer);
|
||||
}
|
||||
function refreshAttList() {
|
||||
attList.pageNum = 1;
|
||||
attList.total = 0;
|
||||
|
@ -7198,19 +7158,7 @@ const _sfc_main = {
|
|||
pageNum: attList.pageNum
|
||||
}
|
||||
}).then((rs) => {
|
||||
if (rs.code == 200) {
|
||||
attList.data.push(...rs.rows.map((item) => {
|
||||
item.format_videoUrl = util.format_url(item.videoUrl, "video");
|
||||
item.format_header = util.format_url(item.header, "img");
|
||||
return item;
|
||||
}));
|
||||
attList.total = rs.total;
|
||||
return;
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false
|
||||
});
|
||||
setList(rs, attList);
|
||||
});
|
||||
}
|
||||
function refreshRecList() {
|
||||
|
@ -7219,7 +7167,7 @@ const _sfc_main = {
|
|||
getRecList();
|
||||
}
|
||||
function getMoreRecList() {
|
||||
formatAppLog("log", "at pages/index/index.nvue:324", "recList", recList);
|
||||
formatAppLog("log", "at pages/index/index.nvue:256", "recList", recList);
|
||||
if (recList.total <= recList.data.length)
|
||||
return;
|
||||
recList.pageNum++;
|
||||
|
@ -7232,34 +7180,49 @@ const _sfc_main = {
|
|||
pageSize: recList.pageSize
|
||||
}
|
||||
}).then((rs) => {
|
||||
formatAppLog("log", "at pages/index/index.nvue:339", "getRecList then rs", recList, rs);
|
||||
if (rs.code == 200) {
|
||||
recList.total = rs.total;
|
||||
const list = rs.rows.sort(() => Math.random() - Math.random());
|
||||
if (recList.pageNum == 1)
|
||||
recList.data.length = 0;
|
||||
recList.data.push(...list.map((item) => {
|
||||
item.speed = 1;
|
||||
return item;
|
||||
}));
|
||||
formatAppLog("log", "at pages/index/index.nvue:352", "result", recList.data, rs);
|
||||
if (recList.total > 1 && recList.data.length <= 1)
|
||||
getMoreRecList();
|
||||
setTimeout(() => {
|
||||
const pages = getCurrentPages();
|
||||
if (pages[pages.length - 1].route == "pages/index/index") {
|
||||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].playState.value = true;
|
||||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].play();
|
||||
}
|
||||
}, 50);
|
||||
return;
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false
|
||||
});
|
||||
formatAppLog("log", "at pages/index/index.nvue:271", "getRecList then rs", recList, rs);
|
||||
setList(rs, recList);
|
||||
});
|
||||
}
|
||||
function setList(rs, obj) {
|
||||
if (rs.code == 200) {
|
||||
obj.total = rs.total;
|
||||
const list = rs.rows.sort(() => Math.random() - Math.random());
|
||||
if (obj.pageNum == 1)
|
||||
obj.data.length = 0;
|
||||
obj.data.push(...list.map((item) => {
|
||||
item.readSecond = 0;
|
||||
return item;
|
||||
}));
|
||||
formatAppLog("log", "at pages/index/index.nvue:296", "result", obj.data, rs);
|
||||
setTimeout(() => {
|
||||
const pages = getCurrentPages();
|
||||
if (pages[pages.length - 1].route == "pages/index/index") {
|
||||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].playState.value = true;
|
||||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].play();
|
||||
}
|
||||
}, 50);
|
||||
return;
|
||||
}
|
||||
util.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
function readSecondAdd() {
|
||||
clearInterval(readSecond.timer);
|
||||
const item = tab[tabIndex.value].listData()[current[tabIndex.value]];
|
||||
readSecond.timer = setInterval(() => {
|
||||
if (item.readSecond <= Math.min(Math.floor(item.videoDuration) - 2, 20)) {
|
||||
item.readSecond++;
|
||||
} else {
|
||||
clearInterval(readSecond.timer);
|
||||
}
|
||||
}, 1e3);
|
||||
}
|
||||
function readSecondPause() {
|
||||
clearInterval(readSecond.timer);
|
||||
}
|
||||
function scrollTo(target) {
|
||||
const tab_index = tabIndex.value;
|
||||
const element = proxy.$refs[`cellRef${tab_index}`][target];
|
||||
|
@ -7268,17 +7231,9 @@ const _sfc_main = {
|
|||
animated: true
|
||||
});
|
||||
if (current[tab_index] != currentLast[tab_index]) {
|
||||
nextTick(() => {
|
||||
lastVideoRef.playState.value = false;
|
||||
lastVideoRef.pause();
|
||||
proxy.$refs[`videoRef${tab_index}`][current[tab_index]].playState.value = true;
|
||||
proxy.$refs[`videoRef${tab_index}`][current[tab_index]].play();
|
||||
});
|
||||
readSecondPause();
|
||||
browseLog(lastVideoRef);
|
||||
readSecond.total += readSecond.count;
|
||||
if (readSecond.total < readSecond.totalMax)
|
||||
readSecondAdd();
|
||||
readSecondAdd();
|
||||
}
|
||||
}
|
||||
function onTouchstart(ev, index2) {
|
||||
|
@ -7319,8 +7274,7 @@ const _sfc_main = {
|
|||
readSecondPause();
|
||||
browseLog(lastVideoRef);
|
||||
readSecond.total += readSecond.count;
|
||||
if (readSecond.total < readSecond.totalMax)
|
||||
readSecondAdd();
|
||||
readSecondAdd();
|
||||
}
|
||||
tabIndex.value = index2;
|
||||
if (tabCurrent.value.load && proxy.$refs[`videoRef${index2}`])
|
||||
|
@ -7345,8 +7299,7 @@ const _sfc_main = {
|
|||
function handleVideoOnPlay() {
|
||||
if (proxy.$refs.discRef)
|
||||
proxy.$refs.discRef.play();
|
||||
if (readSecond.total < readSecond.totalMax)
|
||||
readSecondAdd();
|
||||
readSecondAdd();
|
||||
}
|
||||
function handleVideoOnPause() {
|
||||
if (proxy.$refs.discRef)
|
||||
|
@ -7354,32 +7307,40 @@ const _sfc_main = {
|
|||
}
|
||||
function browseLog(element) {
|
||||
util.isLogin().then((rs) => {
|
||||
formatAppLog("log", "at pages/index/index.nvue:542", "data", {
|
||||
const data = {
|
||||
// 视频id
|
||||
videoId: element.item.id,
|
||||
// 有效读秒时间统计
|
||||
viewingDuration: Math.floor(readSecond.count),
|
||||
viewingDuration: Math.floor(element.item.readSecond),
|
||||
// 视频秒数
|
||||
videoDescription: Math.floor(element.videoTime.currentTime),
|
||||
//
|
||||
task: 0
|
||||
});
|
||||
};
|
||||
formatAppLog("log", "at pages/index/index.nvue:506", "browseLog data", data);
|
||||
api.video.browseLog({
|
||||
data: {
|
||||
// 视频id
|
||||
videoId: element.item.id,
|
||||
// 有效读秒时间统计
|
||||
viewingDuration: Math.floor(readSecond.count),
|
||||
// 视频秒数
|
||||
videoDescription: Math.floor(element.videoTime.currentTime),
|
||||
//
|
||||
task: 0
|
||||
}
|
||||
data
|
||||
}).then((rs2) => {
|
||||
formatAppLog("log", "at pages/index/index.nvue:565", "browseLog", rs2);
|
||||
if (rs2.code != 200) {
|
||||
formatAppLog("log", "at pages/index/index.nvue:567", "browseLog err", rs2);
|
||||
if (rs2.code == 200) {
|
||||
const result = rs2.data;
|
||||
const taskValue = task.value;
|
||||
formatAppLog("log", "at pages/index/index.nvue:516", "browseLog result", rs2, taskValue);
|
||||
if (taskValue.taskType == 0 && result.taskType == 1) {
|
||||
formatAppLog("log", "at pages/index/index.nvue:521", "优先任务完成 播放烟花动画");
|
||||
}
|
||||
if (result.taskType == 1 && result.viewingDuration < taskValue.viewingDuration) {
|
||||
formatAppLog("log", "at pages/index/index.nvue:525", "有效读秒完成 播放任务完成动画");
|
||||
}
|
||||
uni.$store.commit("setState", {
|
||||
key: "task",
|
||||
value: result
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
formatAppLog("log", "at pages/index/index.nvue:535", "browseLog err", rs2);
|
||||
}
|
||||
}).catch((rs2) => {
|
||||
formatAppLog("log", "at pages/index/index.nvue:538", "browseLog err fail", rs2);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -7438,7 +7399,7 @@ const _sfc_main = {
|
|||
function showAlarm() {
|
||||
proxy.$refs.timeRef.open();
|
||||
}
|
||||
const __returned__ = { proxy, dom: dom2, oclockWindow, readSecond, tab, tabIndex, startY, currentLast, current, recList, attList, viewSize, discOffsetTop, footerMenuHeight, userinfo, tabCurrent, currentVideoRef, getTask, readSecondAdd, readSecondPause, refreshAttList, getMoreAttList, getAttList, refreshRecList, getMoreRecList, getRecList, scrollTo, onTouchstart, onTouchend, handle_tab, handleShowTime, handleShowCommentAlt, handleShowCollectAlt, handleShowShareFirend, handleVideoOnPlay, handleVideoOnPause, browseLog, videoLike, setAlarm, showLeftMenu, handleSpeed, showAlarm, ref, reactive, getCurrentInstance, computed, nextTick, get onLoad() {
|
||||
const __returned__ = { proxy, dom: dom2, oclockWindow, readSecond, tab, tabIndex, startY, currentLast, current, recList, attList, viewSize, discOffsetTop, footerMenuHeight, task, userinfo, tabCurrent, currentVideoRef, refreshAttList, getMoreAttList, getAttList, refreshRecList, getMoreRecList, getRecList, setList, readSecondAdd, readSecondPause, scrollTo, onTouchstart, onTouchend, handle_tab, handleShowTime, handleShowCommentAlt, handleShowCollectAlt, handleShowShareFirend, handleVideoOnPlay, handleVideoOnPause, browseLog, videoLike, setAlarm, showLeftMenu, handleSpeed, showAlarm, ref, reactive, getCurrentInstance, computed, nextTick, get onLoad() {
|
||||
return onLoad;
|
||||
}, get onReady() {
|
||||
return onReady;
|
||||
|
|
|
@ -3875,6 +3875,30 @@ const util = {
|
|||
showCancel: false
|
||||
});
|
||||
});
|
||||
},
|
||||
// 获取我的任务
|
||||
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
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
const util$1 = util;
|
||||
|
@ -4143,15 +4167,15 @@ const _sfc_main$7 = {
|
|||
result = "cover";
|
||||
return result;
|
||||
});
|
||||
onMounted(() => {
|
||||
videoCtx.value = uni.createVideoContext(`video${props.tabIndex}${props.index}`);
|
||||
});
|
||||
watch(() => props.current, (nV) => {
|
||||
if (nV == props.index)
|
||||
play();
|
||||
else
|
||||
pause();
|
||||
});
|
||||
onMounted(() => {
|
||||
videoCtx.value = uni.createVideoContext(`video${props.tabIndex}${props.index}`);
|
||||
});
|
||||
function formatNumber(result) {
|
||||
result = parseFloat(result) * 10;
|
||||
return result;
|
||||
|
@ -4425,7 +4449,9 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
},
|
||||
[
|
||||
createVNode($setup["statusBar"]),
|
||||
createElementVNode("u-video", {
|
||||
createCommentVNode(" 视频 增加判断防止重复加载 "),
|
||||
$props.item.videoUrl ? (openBlock(), createElementBlock("u-video", {
|
||||
key: 0,
|
||||
class: "video f1",
|
||||
id: "video" + $props.tabIndex + $props.index,
|
||||
src: $props.item.videoUrl,
|
||||
|
@ -4442,7 +4468,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|||
playStrategy: 2,
|
||||
loop: true,
|
||||
objectFit: $setup.fit
|
||||
}, null, 40, ["id", "src", "poster", "objectFit"])
|
||||
}, null, 40, ["id", "src", "poster", "objectFit"])) : createCommentVNode("v-if", true)
|
||||
],
|
||||
32
|
||||
/* NEED_HYDRATION */
|
||||
|
|
|
@ -4649,6 +4649,30 @@ if (uni.restoreGlobal) {
|
|||
showCancel: false
|
||||
});
|
||||
});
|
||||
},
|
||||
// 获取我的任务
|
||||
getMyTask() {
|
||||
util$1.isLogin().then(() => {
|
||||
api.intergral.viewingTasks({}).then((rs2) => {
|
||||
if (rs2.code == 200) {
|
||||
uni.$store.commit("setState", {
|
||||
key: "task",
|
||||
value: rs2.data
|
||||
});
|
||||
return;
|
||||
}
|
||||
});
|
||||
}).catch(() => {
|
||||
uni.$store.commit("setState", {
|
||||
key: "task",
|
||||
value: {
|
||||
//任务类型 0.任务读秒 1.流量点(种子)读秒
|
||||
taskType: 0,
|
||||
//有效时长
|
||||
viewingDuration: 0
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
const _sfc_main$4m = {
|
||||
|
@ -55176,7 +55200,7 @@ ${i3}
|
|||
_Vue.Fragment,
|
||||
null,
|
||||
[
|
||||
!$setup.userinfo.id && 0 ? (_Vue.openBlock(), _Vue.createElementBlock("view", {
|
||||
!$setup.userinfo.id ? (_Vue.openBlock(), _Vue.createElementBlock("view", {
|
||||
key: 0,
|
||||
class: "page"
|
||||
}, [
|
||||
|
@ -58626,32 +58650,18 @@ ${i3}
|
|||
setup(__props, { expose: __expose }) {
|
||||
__expose();
|
||||
const store2 = useStore();
|
||||
const viewData = _Vue.ref({
|
||||
// 有效读秒任务
|
||||
seconds: 0
|
||||
});
|
||||
const task2 = _Vue.computed(() => {
|
||||
return store2.state.task;
|
||||
});
|
||||
const progress = _Vue.computed(() => {
|
||||
let result = viewData.value.seconds;
|
||||
result = Number(result) % 300 / 300 * 100;
|
||||
let result = task2.value.viewingDuration;
|
||||
result = Number(result) % 300 / 3;
|
||||
return result;
|
||||
});
|
||||
_Vue.onMounted(() => {
|
||||
util$1.isLogin(() => {
|
||||
getTasks();
|
||||
});
|
||||
util$1.getMyTask();
|
||||
});
|
||||
function getTasks() {
|
||||
api.intergral.viewingTasks({}).then((rs2) => {
|
||||
if (rs2.code == 200) {
|
||||
viewData.value = rs2.data;
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
const __returned__ = { store: store2, viewData, task: task2, progress, getTasks, ref: _Vue.ref, computed: _Vue.computed, onMounted: _Vue.onMounted, get util() {
|
||||
const __returned__ = { store: store2, task: task2, progress, ref: _Vue.ref, computed: _Vue.computed, onMounted: _Vue.onMounted, get util() {
|
||||
return util$1;
|
||||
}, get useStore() {
|
||||
return useStore;
|
||||
|
@ -58671,6 +58681,13 @@ ${i3}
|
|||
key: 1,
|
||||
class: "title c333 f36"
|
||||
}, "有效读秒")),
|
||||
_Vue.createElementVNode(
|
||||
"view",
|
||||
null,
|
||||
_Vue.toDisplayString($setup.task.viewingDuration),
|
||||
1
|
||||
/* TEXT */
|
||||
),
|
||||
_Vue.createElementVNode("view", { class: "progressBox oh bar mt60" }, [
|
||||
_Vue.createElementVNode(
|
||||
"view",
|
||||
|
@ -74859,296 +74876,303 @@ ${i3}
|
|||
};
|
||||
const searchMessageTimeDefault = searchMessageTimeList["all"];
|
||||
var dayjs_min = { exports: {} };
|
||||
(function(module, exports) {
|
||||
!function(t2, e2) {
|
||||
module.exports = e2();
|
||||
}(commonjsGlobal, function() {
|
||||
var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i2 = "second", s2 = "minute", u2 = "hour", a2 = "day", o2 = "week", c2 = "month", f2 = "quarter", h2 = "year", d2 = "date", l2 = "Invalid Date", $2 = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y2 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M2 = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
|
||||
var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
|
||||
return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
|
||||
} }, m2 = function(t3, e3, n3) {
|
||||
var r3 = String(t3);
|
||||
return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3;
|
||||
}, v2 = { s: m2, z: function(t3) {
|
||||
var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i3 = n3 % 60;
|
||||
return (e3 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(i3, 2, "0");
|
||||
}, m: function t3(e3, n3) {
|
||||
if (e3.date() < n3.date())
|
||||
return -t3(n3, e3);
|
||||
var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i3 = e3.clone().add(r3, c2), s3 = n3 - i3 < 0, u3 = e3.clone().add(r3 + (s3 ? -1 : 1), c2);
|
||||
return +(-(r3 + (n3 - i3) / (s3 ? i3 - u3 : u3 - i3)) || 0);
|
||||
}, a: function(t3) {
|
||||
return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
|
||||
}, p: function(t3) {
|
||||
return { M: c2, y: h2, w: o2, d: a2, D: d2, h: u2, m: s2, s: i2, ms: r2, Q: f2 }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
|
||||
}, u: function(t3) {
|
||||
return void 0 === t3;
|
||||
} }, g2 = "en", D2 = {};
|
||||
D2[g2] = M2;
|
||||
var p2 = "$isDayjsObject", S2 = function(t3) {
|
||||
return t3 instanceof _2 || !(!t3 || !t3[p2]);
|
||||
}, w2 = function t3(e3, n3, r3) {
|
||||
var i3;
|
||||
if (!e3)
|
||||
return g2;
|
||||
if ("string" == typeof e3) {
|
||||
var s3 = e3.toLowerCase();
|
||||
D2[s3] && (i3 = s3), n3 && (D2[s3] = n3, i3 = s3);
|
||||
var u3 = e3.split("-");
|
||||
if (!i3 && u3.length > 1)
|
||||
return t3(u3[0]);
|
||||
} else {
|
||||
var a3 = e3.name;
|
||||
D2[a3] = e3, i3 = a3;
|
||||
}
|
||||
return !r3 && i3 && (g2 = i3), i3 || !r3 && g2;
|
||||
}, O2 = function(t3, e3) {
|
||||
if (S2(t3))
|
||||
return t3.clone();
|
||||
var n3 = "object" == typeof e3 ? e3 : {};
|
||||
return n3.date = t3, n3.args = arguments, new _2(n3);
|
||||
}, b2 = v2;
|
||||
b2.l = w2, b2.i = S2, b2.w = function(t3, e3) {
|
||||
return O2(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
|
||||
};
|
||||
var _2 = function() {
|
||||
function M3(t3) {
|
||||
this.$L = w2(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p2] = true;
|
||||
}
|
||||
var m3 = M3.prototype;
|
||||
return m3.parse = function(t3) {
|
||||
this.$d = function(t4) {
|
||||
var e3 = t4.date, n3 = t4.utc;
|
||||
if (null === e3)
|
||||
return /* @__PURE__ */ new Date(NaN);
|
||||
if (b2.u(e3))
|
||||
return /* @__PURE__ */ new Date();
|
||||
if (e3 instanceof Date)
|
||||
return new Date(e3);
|
||||
if ("string" == typeof e3 && !/Z$/i.test(e3)) {
|
||||
var r3 = e3.match($2);
|
||||
if (r3) {
|
||||
var i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
|
||||
return n3 ? new Date(Date.UTC(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3);
|
||||
}
|
||||
}
|
||||
return new Date(e3);
|
||||
}(t3), this.init();
|
||||
}, m3.init = function() {
|
||||
var t3 = this.$d;
|
||||
this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
|
||||
}, m3.$utils = function() {
|
||||
return b2;
|
||||
}, m3.isValid = function() {
|
||||
return !(this.$d.toString() === l2);
|
||||
}, m3.isSame = function(t3, e3) {
|
||||
var n3 = O2(t3);
|
||||
return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
|
||||
}, m3.isAfter = function(t3, e3) {
|
||||
return O2(t3) < this.startOf(e3);
|
||||
}, m3.isBefore = function(t3, e3) {
|
||||
return this.endOf(e3) < O2(t3);
|
||||
}, m3.$g = function(t3, e3, n3) {
|
||||
return b2.u(t3) ? this[e3] : this.set(n3, t3);
|
||||
}, m3.unix = function() {
|
||||
return Math.floor(this.valueOf() / 1e3);
|
||||
}, m3.valueOf = function() {
|
||||
return this.$d.getTime();
|
||||
}, m3.startOf = function(t3, e3) {
|
||||
var n3 = this, r3 = !!b2.u(e3) || e3, f3 = b2.p(t3), l3 = function(t4, e4) {
|
||||
var i3 = b2.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
|
||||
return r3 ? i3 : i3.endOf(a2);
|
||||
}, $3 = function(t4, e4) {
|
||||
return b2.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
|
||||
}, y3 = this.$W, M4 = this.$M, m4 = this.$D, v3 = "set" + (this.$u ? "UTC" : "");
|
||||
switch (f3) {
|
||||
case h2:
|
||||
return r3 ? l3(1, 0) : l3(31, 11);
|
||||
case c2:
|
||||
return r3 ? l3(1, M4) : l3(0, M4 + 1);
|
||||
case o2:
|
||||
var g3 = this.$locale().weekStart || 0, D3 = (y3 < g3 ? y3 + 7 : y3) - g3;
|
||||
return l3(r3 ? m4 - D3 : m4 + (6 - D3), M4);
|
||||
case a2:
|
||||
case d2:
|
||||
return $3(v3 + "Hours", 0);
|
||||
case u2:
|
||||
return $3(v3 + "Minutes", 1);
|
||||
case s2:
|
||||
return $3(v3 + "Seconds", 2);
|
||||
case i2:
|
||||
return $3(v3 + "Milliseconds", 3);
|
||||
default:
|
||||
return this.clone();
|
||||
var hasRequiredDayjs_min;
|
||||
function requireDayjs_min() {
|
||||
if (hasRequiredDayjs_min)
|
||||
return dayjs_min.exports;
|
||||
hasRequiredDayjs_min = 1;
|
||||
(function(module, exports) {
|
||||
!function(t2, e2) {
|
||||
module.exports = e2();
|
||||
}(commonjsGlobal, function() {
|
||||
var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", i2 = "second", s2 = "minute", u2 = "hour", a2 = "day", o2 = "week", c2 = "month", f2 = "quarter", h2 = "year", d2 = "date", l2 = "Invalid Date", $2 = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y2 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M2 = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) {
|
||||
var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
|
||||
return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]";
|
||||
} }, m2 = function(t3, e3, n3) {
|
||||
var r3 = String(t3);
|
||||
return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3;
|
||||
}, v2 = { s: m2, z: function(t3) {
|
||||
var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), i3 = n3 % 60;
|
||||
return (e3 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(i3, 2, "0");
|
||||
}, m: function t3(e3, n3) {
|
||||
if (e3.date() < n3.date())
|
||||
return -t3(n3, e3);
|
||||
var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), i3 = e3.clone().add(r3, c2), s3 = n3 - i3 < 0, u3 = e3.clone().add(r3 + (s3 ? -1 : 1), c2);
|
||||
return +(-(r3 + (n3 - i3) / (s3 ? i3 - u3 : u3 - i3)) || 0);
|
||||
}, a: function(t3) {
|
||||
return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
|
||||
}, p: function(t3) {
|
||||
return { M: c2, y: h2, w: o2, d: a2, D: d2, h: u2, m: s2, s: i2, ms: r2, Q: f2 }[t3] || String(t3 || "").toLowerCase().replace(/s$/, "");
|
||||
}, u: function(t3) {
|
||||
return void 0 === t3;
|
||||
} }, g2 = "en", D2 = {};
|
||||
D2[g2] = M2;
|
||||
var p2 = "$isDayjsObject", S2 = function(t3) {
|
||||
return t3 instanceof _2 || !(!t3 || !t3[p2]);
|
||||
}, w2 = function t3(e3, n3, r3) {
|
||||
var i3;
|
||||
if (!e3)
|
||||
return g2;
|
||||
if ("string" == typeof e3) {
|
||||
var s3 = e3.toLowerCase();
|
||||
D2[s3] && (i3 = s3), n3 && (D2[s3] = n3, i3 = s3);
|
||||
var u3 = e3.split("-");
|
||||
if (!i3 && u3.length > 1)
|
||||
return t3(u3[0]);
|
||||
} else {
|
||||
var a3 = e3.name;
|
||||
D2[a3] = e3, i3 = a3;
|
||||
}
|
||||
}, m3.endOf = function(t3) {
|
||||
return this.startOf(t3, false);
|
||||
}, m3.$set = function(t3, e3) {
|
||||
var n3, o3 = b2.p(t3), f3 = "set" + (this.$u ? "UTC" : ""), l3 = (n3 = {}, n3[a2] = f3 + "Date", n3[d2] = f3 + "Date", n3[c2] = f3 + "Month", n3[h2] = f3 + "FullYear", n3[u2] = f3 + "Hours", n3[s2] = f3 + "Minutes", n3[i2] = f3 + "Seconds", n3[r2] = f3 + "Milliseconds", n3)[o3], $3 = o3 === a2 ? this.$D + (e3 - this.$W) : e3;
|
||||
if (o3 === c2 || o3 === h2) {
|
||||
var y3 = this.clone().set(d2, 1);
|
||||
y3.$d[l3]($3), y3.init(), this.$d = y3.set(d2, Math.min(this.$D, y3.daysInMonth())).$d;
|
||||
} else
|
||||
l3 && this.$d[l3]($3);
|
||||
return this.init(), this;
|
||||
}, m3.set = function(t3, e3) {
|
||||
return this.clone().$set(t3, e3);
|
||||
}, m3.get = function(t3) {
|
||||
return this[b2.p(t3)]();
|
||||
}, m3.add = function(r3, f3) {
|
||||
var d3, l3 = this;
|
||||
r3 = Number(r3);
|
||||
var $3 = b2.p(f3), y3 = function(t3) {
|
||||
var e3 = O2(l3);
|
||||
return b2.w(e3.date(e3.date() + Math.round(t3 * r3)), l3);
|
||||
};
|
||||
if ($3 === c2)
|
||||
return this.set(c2, this.$M + r3);
|
||||
if ($3 === h2)
|
||||
return this.set(h2, this.$y + r3);
|
||||
if ($3 === a2)
|
||||
return y3(1);
|
||||
if ($3 === o2)
|
||||
return y3(7);
|
||||
var M4 = (d3 = {}, d3[s2] = e2, d3[u2] = n2, d3[i2] = t2, d3)[$3] || 1, m4 = this.$d.getTime() + r3 * M4;
|
||||
return b2.w(m4, this);
|
||||
}, m3.subtract = function(t3, e3) {
|
||||
return this.add(-1 * t3, e3);
|
||||
}, m3.format = function(t3) {
|
||||
var e3 = this, n3 = this.$locale();
|
||||
if (!this.isValid())
|
||||
return n3.invalidDate || l2;
|
||||
var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i3 = b2.z(this), s3 = this.$H, u3 = this.$m, a3 = this.$M, o3 = n3.weekdays, c3 = n3.months, f3 = n3.meridiem, h3 = function(t4, n4, i4, s4) {
|
||||
return t4 && (t4[n4] || t4(e3, r3)) || i4[n4].slice(0, s4);
|
||||
}, d3 = function(t4) {
|
||||
return b2.s(s3 % 12 || 12, t4, "0");
|
||||
}, $3 = f3 || function(t4, e4, n4) {
|
||||
var r4 = t4 < 12 ? "AM" : "PM";
|
||||
return n4 ? r4.toLowerCase() : r4;
|
||||
};
|
||||
return r3.replace(y2, function(t4, r4) {
|
||||
return r4 || function(t5) {
|
||||
switch (t5) {
|
||||
case "YY":
|
||||
return String(e3.$y).slice(-2);
|
||||
case "YYYY":
|
||||
return b2.s(e3.$y, 4, "0");
|
||||
case "M":
|
||||
return a3 + 1;
|
||||
case "MM":
|
||||
return b2.s(a3 + 1, 2, "0");
|
||||
case "MMM":
|
||||
return h3(n3.monthsShort, a3, c3, 3);
|
||||
case "MMMM":
|
||||
return h3(c3, a3);
|
||||
case "D":
|
||||
return e3.$D;
|
||||
case "DD":
|
||||
return b2.s(e3.$D, 2, "0");
|
||||
case "d":
|
||||
return String(e3.$W);
|
||||
case "dd":
|
||||
return h3(n3.weekdaysMin, e3.$W, o3, 2);
|
||||
case "ddd":
|
||||
return h3(n3.weekdaysShort, e3.$W, o3, 3);
|
||||
case "dddd":
|
||||
return o3[e3.$W];
|
||||
case "H":
|
||||
return String(s3);
|
||||
case "HH":
|
||||
return b2.s(s3, 2, "0");
|
||||
case "h":
|
||||
return d3(1);
|
||||
case "hh":
|
||||
return d3(2);
|
||||
case "a":
|
||||
return $3(s3, u3, true);
|
||||
case "A":
|
||||
return $3(s3, u3, false);
|
||||
case "m":
|
||||
return String(u3);
|
||||
case "mm":
|
||||
return b2.s(u3, 2, "0");
|
||||
case "s":
|
||||
return String(e3.$s);
|
||||
case "ss":
|
||||
return b2.s(e3.$s, 2, "0");
|
||||
case "SSS":
|
||||
return b2.s(e3.$ms, 3, "0");
|
||||
case "Z":
|
||||
return i3;
|
||||
}
|
||||
return null;
|
||||
}(t4) || i3.replace(":", "");
|
||||
});
|
||||
}, m3.utcOffset = function() {
|
||||
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
||||
}, m3.diff = function(r3, d3, l3) {
|
||||
var $3, y3 = this, M4 = b2.p(d3), m4 = O2(r3), v3 = (m4.utcOffset() - this.utcOffset()) * e2, g3 = this - m4, D3 = function() {
|
||||
return b2.m(y3, m4);
|
||||
};
|
||||
switch (M4) {
|
||||
case h2:
|
||||
$3 = D3() / 12;
|
||||
break;
|
||||
case c2:
|
||||
$3 = D3();
|
||||
break;
|
||||
case f2:
|
||||
$3 = D3() / 3;
|
||||
break;
|
||||
case o2:
|
||||
$3 = (g3 - v3) / 6048e5;
|
||||
break;
|
||||
case a2:
|
||||
$3 = (g3 - v3) / 864e5;
|
||||
break;
|
||||
case u2:
|
||||
$3 = g3 / n2;
|
||||
break;
|
||||
case s2:
|
||||
$3 = g3 / e2;
|
||||
break;
|
||||
case i2:
|
||||
$3 = g3 / t2;
|
||||
break;
|
||||
default:
|
||||
$3 = g3;
|
||||
}
|
||||
return l3 ? $3 : b2.a($3);
|
||||
}, m3.daysInMonth = function() {
|
||||
return this.endOf(c2).$D;
|
||||
}, m3.$locale = function() {
|
||||
return D2[this.$L];
|
||||
}, m3.locale = function(t3, e3) {
|
||||
if (!t3)
|
||||
return this.$L;
|
||||
var n3 = this.clone(), r3 = w2(t3, e3, true);
|
||||
return r3 && (n3.$L = r3), n3;
|
||||
}, m3.clone = function() {
|
||||
return b2.w(this.$d, this);
|
||||
}, m3.toDate = function() {
|
||||
return new Date(this.valueOf());
|
||||
}, m3.toJSON = function() {
|
||||
return this.isValid() ? this.toISOString() : null;
|
||||
}, m3.toISOString = function() {
|
||||
return this.$d.toISOString();
|
||||
}, m3.toString = function() {
|
||||
return this.$d.toUTCString();
|
||||
}, M3;
|
||||
}(), k2 = _2.prototype;
|
||||
return O2.prototype = k2, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u2], ["$W", a2], ["$M", c2], ["$y", h2], ["$D", d2]].forEach(function(t3) {
|
||||
k2[t3[1]] = function(e3) {
|
||||
return this.$g(e3, t3[0], t3[1]);
|
||||
return !r3 && i3 && (g2 = i3), i3 || !r3 && g2;
|
||||
}, O2 = function(t3, e3) {
|
||||
if (S2(t3))
|
||||
return t3.clone();
|
||||
var n3 = "object" == typeof e3 ? e3 : {};
|
||||
return n3.date = t3, n3.args = arguments, new _2(n3);
|
||||
}, b2 = v2;
|
||||
b2.l = w2, b2.i = S2, b2.w = function(t3, e3) {
|
||||
return O2(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
|
||||
};
|
||||
}), O2.extend = function(t3, e3) {
|
||||
return t3.$i || (t3(e3, _2, O2), t3.$i = true), O2;
|
||||
}, O2.locale = w2, O2.isDayjs = S2, O2.unix = function(t3) {
|
||||
return O2(1e3 * t3);
|
||||
}, O2.en = D2[g2], O2.Ls = D2, O2.p = {}, O2;
|
||||
});
|
||||
})(dayjs_min);
|
||||
var dayjs_minExports = dayjs_min.exports;
|
||||
var _2 = function() {
|
||||
function M3(t3) {
|
||||
this.$L = w2(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p2] = true;
|
||||
}
|
||||
var m3 = M3.prototype;
|
||||
return m3.parse = function(t3) {
|
||||
this.$d = function(t4) {
|
||||
var e3 = t4.date, n3 = t4.utc;
|
||||
if (null === e3)
|
||||
return /* @__PURE__ */ new Date(NaN);
|
||||
if (b2.u(e3))
|
||||
return /* @__PURE__ */ new Date();
|
||||
if (e3 instanceof Date)
|
||||
return new Date(e3);
|
||||
if ("string" == typeof e3 && !/Z$/i.test(e3)) {
|
||||
var r3 = e3.match($2);
|
||||
if (r3) {
|
||||
var i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
|
||||
return n3 ? new Date(Date.UTC(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3)) : new Date(r3[1], i3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s3);
|
||||
}
|
||||
}
|
||||
return new Date(e3);
|
||||
}(t3), this.init();
|
||||
}, m3.init = function() {
|
||||
var t3 = this.$d;
|
||||
this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds();
|
||||
}, m3.$utils = function() {
|
||||
return b2;
|
||||
}, m3.isValid = function() {
|
||||
return !(this.$d.toString() === l2);
|
||||
}, m3.isSame = function(t3, e3) {
|
||||
var n3 = O2(t3);
|
||||
return this.startOf(e3) <= n3 && n3 <= this.endOf(e3);
|
||||
}, m3.isAfter = function(t3, e3) {
|
||||
return O2(t3) < this.startOf(e3);
|
||||
}, m3.isBefore = function(t3, e3) {
|
||||
return this.endOf(e3) < O2(t3);
|
||||
}, m3.$g = function(t3, e3, n3) {
|
||||
return b2.u(t3) ? this[e3] : this.set(n3, t3);
|
||||
}, m3.unix = function() {
|
||||
return Math.floor(this.valueOf() / 1e3);
|
||||
}, m3.valueOf = function() {
|
||||
return this.$d.getTime();
|
||||
}, m3.startOf = function(t3, e3) {
|
||||
var n3 = this, r3 = !!b2.u(e3) || e3, f3 = b2.p(t3), l3 = function(t4, e4) {
|
||||
var i3 = b2.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3);
|
||||
return r3 ? i3 : i3.endOf(a2);
|
||||
}, $3 = function(t4, e4) {
|
||||
return b2.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3);
|
||||
}, y3 = this.$W, M4 = this.$M, m4 = this.$D, v3 = "set" + (this.$u ? "UTC" : "");
|
||||
switch (f3) {
|
||||
case h2:
|
||||
return r3 ? l3(1, 0) : l3(31, 11);
|
||||
case c2:
|
||||
return r3 ? l3(1, M4) : l3(0, M4 + 1);
|
||||
case o2:
|
||||
var g3 = this.$locale().weekStart || 0, D3 = (y3 < g3 ? y3 + 7 : y3) - g3;
|
||||
return l3(r3 ? m4 - D3 : m4 + (6 - D3), M4);
|
||||
case a2:
|
||||
case d2:
|
||||
return $3(v3 + "Hours", 0);
|
||||
case u2:
|
||||
return $3(v3 + "Minutes", 1);
|
||||
case s2:
|
||||
return $3(v3 + "Seconds", 2);
|
||||
case i2:
|
||||
return $3(v3 + "Milliseconds", 3);
|
||||
default:
|
||||
return this.clone();
|
||||
}
|
||||
}, m3.endOf = function(t3) {
|
||||
return this.startOf(t3, false);
|
||||
}, m3.$set = function(t3, e3) {
|
||||
var n3, o3 = b2.p(t3), f3 = "set" + (this.$u ? "UTC" : ""), l3 = (n3 = {}, n3[a2] = f3 + "Date", n3[d2] = f3 + "Date", n3[c2] = f3 + "Month", n3[h2] = f3 + "FullYear", n3[u2] = f3 + "Hours", n3[s2] = f3 + "Minutes", n3[i2] = f3 + "Seconds", n3[r2] = f3 + "Milliseconds", n3)[o3], $3 = o3 === a2 ? this.$D + (e3 - this.$W) : e3;
|
||||
if (o3 === c2 || o3 === h2) {
|
||||
var y3 = this.clone().set(d2, 1);
|
||||
y3.$d[l3]($3), y3.init(), this.$d = y3.set(d2, Math.min(this.$D, y3.daysInMonth())).$d;
|
||||
} else
|
||||
l3 && this.$d[l3]($3);
|
||||
return this.init(), this;
|
||||
}, m3.set = function(t3, e3) {
|
||||
return this.clone().$set(t3, e3);
|
||||
}, m3.get = function(t3) {
|
||||
return this[b2.p(t3)]();
|
||||
}, m3.add = function(r3, f3) {
|
||||
var d3, l3 = this;
|
||||
r3 = Number(r3);
|
||||
var $3 = b2.p(f3), y3 = function(t3) {
|
||||
var e3 = O2(l3);
|
||||
return b2.w(e3.date(e3.date() + Math.round(t3 * r3)), l3);
|
||||
};
|
||||
if ($3 === c2)
|
||||
return this.set(c2, this.$M + r3);
|
||||
if ($3 === h2)
|
||||
return this.set(h2, this.$y + r3);
|
||||
if ($3 === a2)
|
||||
return y3(1);
|
||||
if ($3 === o2)
|
||||
return y3(7);
|
||||
var M4 = (d3 = {}, d3[s2] = e2, d3[u2] = n2, d3[i2] = t2, d3)[$3] || 1, m4 = this.$d.getTime() + r3 * M4;
|
||||
return b2.w(m4, this);
|
||||
}, m3.subtract = function(t3, e3) {
|
||||
return this.add(-1 * t3, e3);
|
||||
}, m3.format = function(t3) {
|
||||
var e3 = this, n3 = this.$locale();
|
||||
if (!this.isValid())
|
||||
return n3.invalidDate || l2;
|
||||
var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", i3 = b2.z(this), s3 = this.$H, u3 = this.$m, a3 = this.$M, o3 = n3.weekdays, c3 = n3.months, f3 = n3.meridiem, h3 = function(t4, n4, i4, s4) {
|
||||
return t4 && (t4[n4] || t4(e3, r3)) || i4[n4].slice(0, s4);
|
||||
}, d3 = function(t4) {
|
||||
return b2.s(s3 % 12 || 12, t4, "0");
|
||||
}, $3 = f3 || function(t4, e4, n4) {
|
||||
var r4 = t4 < 12 ? "AM" : "PM";
|
||||
return n4 ? r4.toLowerCase() : r4;
|
||||
};
|
||||
return r3.replace(y2, function(t4, r4) {
|
||||
return r4 || function(t5) {
|
||||
switch (t5) {
|
||||
case "YY":
|
||||
return String(e3.$y).slice(-2);
|
||||
case "YYYY":
|
||||
return b2.s(e3.$y, 4, "0");
|
||||
case "M":
|
||||
return a3 + 1;
|
||||
case "MM":
|
||||
return b2.s(a3 + 1, 2, "0");
|
||||
case "MMM":
|
||||
return h3(n3.monthsShort, a3, c3, 3);
|
||||
case "MMMM":
|
||||
return h3(c3, a3);
|
||||
case "D":
|
||||
return e3.$D;
|
||||
case "DD":
|
||||
return b2.s(e3.$D, 2, "0");
|
||||
case "d":
|
||||
return String(e3.$W);
|
||||
case "dd":
|
||||
return h3(n3.weekdaysMin, e3.$W, o3, 2);
|
||||
case "ddd":
|
||||
return h3(n3.weekdaysShort, e3.$W, o3, 3);
|
||||
case "dddd":
|
||||
return o3[e3.$W];
|
||||
case "H":
|
||||
return String(s3);
|
||||
case "HH":
|
||||
return b2.s(s3, 2, "0");
|
||||
case "h":
|
||||
return d3(1);
|
||||
case "hh":
|
||||
return d3(2);
|
||||
case "a":
|
||||
return $3(s3, u3, true);
|
||||
case "A":
|
||||
return $3(s3, u3, false);
|
||||
case "m":
|
||||
return String(u3);
|
||||
case "mm":
|
||||
return b2.s(u3, 2, "0");
|
||||
case "s":
|
||||
return String(e3.$s);
|
||||
case "ss":
|
||||
return b2.s(e3.$s, 2, "0");
|
||||
case "SSS":
|
||||
return b2.s(e3.$ms, 3, "0");
|
||||
case "Z":
|
||||
return i3;
|
||||
}
|
||||
return null;
|
||||
}(t4) || i3.replace(":", "");
|
||||
});
|
||||
}, m3.utcOffset = function() {
|
||||
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
||||
}, m3.diff = function(r3, d3, l3) {
|
||||
var $3, y3 = this, M4 = b2.p(d3), m4 = O2(r3), v3 = (m4.utcOffset() - this.utcOffset()) * e2, g3 = this - m4, D3 = function() {
|
||||
return b2.m(y3, m4);
|
||||
};
|
||||
switch (M4) {
|
||||
case h2:
|
||||
$3 = D3() / 12;
|
||||
break;
|
||||
case c2:
|
||||
$3 = D3();
|
||||
break;
|
||||
case f2:
|
||||
$3 = D3() / 3;
|
||||
break;
|
||||
case o2:
|
||||
$3 = (g3 - v3) / 6048e5;
|
||||
break;
|
||||
case a2:
|
||||
$3 = (g3 - v3) / 864e5;
|
||||
break;
|
||||
case u2:
|
||||
$3 = g3 / n2;
|
||||
break;
|
||||
case s2:
|
||||
$3 = g3 / e2;
|
||||
break;
|
||||
case i2:
|
||||
$3 = g3 / t2;
|
||||
break;
|
||||
default:
|
||||
$3 = g3;
|
||||
}
|
||||
return l3 ? $3 : b2.a($3);
|
||||
}, m3.daysInMonth = function() {
|
||||
return this.endOf(c2).$D;
|
||||
}, m3.$locale = function() {
|
||||
return D2[this.$L];
|
||||
}, m3.locale = function(t3, e3) {
|
||||
if (!t3)
|
||||
return this.$L;
|
||||
var n3 = this.clone(), r3 = w2(t3, e3, true);
|
||||
return r3 && (n3.$L = r3), n3;
|
||||
}, m3.clone = function() {
|
||||
return b2.w(this.$d, this);
|
||||
}, m3.toDate = function() {
|
||||
return new Date(this.valueOf());
|
||||
}, m3.toJSON = function() {
|
||||
return this.isValid() ? this.toISOString() : null;
|
||||
}, m3.toISOString = function() {
|
||||
return this.$d.toISOString();
|
||||
}, m3.toString = function() {
|
||||
return this.$d.toUTCString();
|
||||
}, M3;
|
||||
}(), k2 = _2.prototype;
|
||||
return O2.prototype = k2, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u2], ["$W", a2], ["$M", c2], ["$y", h2], ["$D", d2]].forEach(function(t3) {
|
||||
k2[t3[1]] = function(e3) {
|
||||
return this.$g(e3, t3[0], t3[1]);
|
||||
};
|
||||
}), O2.extend = function(t3, e3) {
|
||||
return t3.$i || (t3(e3, _2, O2), t3.$i = true), O2;
|
||||
}, O2.locale = w2, O2.isDayjs = S2, O2.unix = function(t3) {
|
||||
return O2(1e3 * t3);
|
||||
}, O2.en = D2[g2], O2.Ls = D2, O2.p = {}, O2;
|
||||
});
|
||||
})(dayjs_min);
|
||||
return dayjs_min.exports;
|
||||
}
|
||||
var dayjs_minExports = requireDayjs_min();
|
||||
const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
|
||||
var localeData$1 = { exports: {} };
|
||||
(function(module, exports) {
|
||||
|
@ -75260,7 +75284,7 @@ ${i3}
|
|||
var zhCn = { exports: {} };
|
||||
(function(module, exports) {
|
||||
!function(e2, _2) {
|
||||
module.exports = _2(dayjs_minExports);
|
||||
module.exports = _2(requireDayjs_min());
|
||||
}(commonjsGlobal, function(e2) {
|
||||
function _2(e3) {
|
||||
return e3 && "object" == typeof e3 && "default" in e3 ? e3 : { default: e3 };
|
||||
|
|
|
@ -3993,6 +3993,30 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
showCancel: false
|
||||
});
|
||||
});
|
||||
},
|
||||
// 获取我的任务
|
||||
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
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
var util$1 = util;
|
||||
|
@ -4261,15 +4285,15 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
result = "cover";
|
||||
return result;
|
||||
});
|
||||
(0, import_vue2.onMounted)(() => {
|
||||
videoCtx.value = uni.createVideoContext(`video${props.tabIndex}${props.index}`);
|
||||
});
|
||||
(0, import_vue2.watch)(() => props.current, (nV) => {
|
||||
if (nV == props.index)
|
||||
play();
|
||||
else
|
||||
pause();
|
||||
});
|
||||
(0, import_vue2.onMounted)(() => {
|
||||
videoCtx.value = uni.createVideoContext(`video${props.tabIndex}${props.index}`);
|
||||
});
|
||||
function formatNumber(result) {
|
||||
result = parseFloat(result) * 10;
|
||||
return result;
|
||||
|
@ -4541,7 +4565,9 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
},
|
||||
[
|
||||
(0, import_vue2.createVNode)($setup["statusBar"]),
|
||||
(0, import_vue2.createElementVNode)("u-video", {
|
||||
(0, import_vue2.createCommentVNode)(" \u89C6\u9891 \u589E\u52A0\u5224\u65AD\u9632\u6B62\u91CD\u590D\u52A0\u8F7D "),
|
||||
$props.item.videoUrl ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("u-video", {
|
||||
key: 0,
|
||||
class: "video f1",
|
||||
id: "video" + $props.tabIndex + $props.index,
|
||||
src: $props.item.videoUrl,
|
||||
|
@ -4558,7 +4584,7 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
playStrategy: 2,
|
||||
loop: true,
|
||||
objectFit: $setup.fit
|
||||
}, null, 40, ["id", "src", "poster", "objectFit"])
|
||||
}, null, 40, ["id", "src", "poster", "objectFit"])) : (0, import_vue2.createCommentVNode)("v-if", true)
|
||||
],
|
||||
32
|
||||
/* NEED_HYDRATION */
|
||||
|
@ -13687,10 +13713,6 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
const readSecond = (0, import_vue3.reactive)({
|
||||
// 单个视频最大
|
||||
max: 20,
|
||||
// 累计
|
||||
count: 0,
|
||||
// 总数
|
||||
total: 0,
|
||||
// 总数最大
|
||||
totalMax: 300,
|
||||
// 定时器
|
||||
|
@ -13740,17 +13762,17 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
});
|
||||
const discOffsetTop = (0, import_vue3.ref)(0);
|
||||
const footerMenuHeight = (0, import_vue3.ref)(0);
|
||||
const task = (0, import_vue3.computed)(() => {
|
||||
return uni.$store.state.task;
|
||||
});
|
||||
const userinfo = (0, import_vue3.computed)(() => {
|
||||
let result = uni.$store.state.userinfo || {};
|
||||
return result;
|
||||
return uni.$store.state.userinfo || {};
|
||||
});
|
||||
const tabCurrent = (0, import_vue3.computed)(() => {
|
||||
let result = tab[tabIndex.value];
|
||||
return result;
|
||||
return tab[tabIndex.value];
|
||||
});
|
||||
const currentVideoRef = (0, import_vue3.computed)(() => {
|
||||
let result = proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]];
|
||||
return result;
|
||||
return proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]];
|
||||
});
|
||||
onLoad(() => {
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
|
@ -13761,12 +13783,9 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
}, 1e3);
|
||||
}
|
||||
tabCurrent.value.getList();
|
||||
util$1.isLogin().then((rs) => {
|
||||
getTask();
|
||||
});
|
||||
util$1.getMyTask();
|
||||
uni.$on("login", () => {
|
||||
tabCurrent.value.refreshList();
|
||||
getTask();
|
||||
});
|
||||
uni.$on("logout", () => {
|
||||
tabCurrent.value.refreshList();
|
||||
|
@ -13793,11 +13812,9 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
});
|
||||
});
|
||||
onReady(() => {
|
||||
(0, import_vue3.nextTick)(() => {
|
||||
dom22.getComponentRect(proxy.$refs.containerRef[0], (option) => {
|
||||
viewSize.height = option.size.height;
|
||||
viewSize.width = option.size.width;
|
||||
});
|
||||
dom22.getComponentRect(proxy.$refs.containerRef[0], (option) => {
|
||||
viewSize.height = option.size.height;
|
||||
viewSize.width = option.size.width;
|
||||
});
|
||||
});
|
||||
onShow(() => {
|
||||
|
@ -13812,37 +13829,6 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
uni.$off("updateVideo");
|
||||
uni.$off("focusUser");
|
||||
});
|
||||
function getTask() {
|
||||
api.video.viewingTasks().then((rs) => {
|
||||
if (rs.code == 200) {
|
||||
const result = rs.data;
|
||||
if (!result)
|
||||
return;
|
||||
if (result)
|
||||
readSecond.total = Number(result.seconds) || 0;
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
function readSecondAdd() {
|
||||
clearInterval(readSecond.timer);
|
||||
if (readSecond.total >= readSecond.totalMax)
|
||||
return;
|
||||
readSecond.timer = setInterval(() => {
|
||||
if (readSecond.count > readSecond.max) {
|
||||
readSecond.total += readSecond.count;
|
||||
readSecond.count = 0;
|
||||
if (readSecond.total >= readSecond.totalMax) {
|
||||
return;
|
||||
}
|
||||
clearInterval(readSecond.timer);
|
||||
} else
|
||||
readSecond.count++;
|
||||
}, 1e3);
|
||||
}
|
||||
function readSecondPause() {
|
||||
clearInterval(readSecond.timer);
|
||||
}
|
||||
function refreshAttList() {
|
||||
attList.pageNum = 1;
|
||||
attList.total = 0;
|
||||
|
@ -13861,19 +13847,7 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
pageNum: attList.pageNum
|
||||
}
|
||||
}).then((rs) => {
|
||||
if (rs.code == 200) {
|
||||
attList.data.push(...rs.rows.map((item) => {
|
||||
item.format_videoUrl = util$1.format_url(item.videoUrl, "video");
|
||||
item.format_header = util$1.format_url(item.header, "img");
|
||||
return item;
|
||||
}));
|
||||
attList.total = rs.total;
|
||||
return;
|
||||
}
|
||||
util$1.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false
|
||||
});
|
||||
setList(rs, attList);
|
||||
});
|
||||
}
|
||||
function refreshRecList() {
|
||||
|
@ -13882,7 +13856,7 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
getRecList();
|
||||
}
|
||||
function getMoreRecList() {
|
||||
formatAppLog("log", "at pages/index/index.nvue:324", "recList", recList);
|
||||
formatAppLog("log", "at pages/index/index.nvue:256", "recList", recList);
|
||||
if (recList.total <= recList.data.length)
|
||||
return;
|
||||
recList.pageNum++;
|
||||
|
@ -13895,34 +13869,49 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
pageSize: recList.pageSize
|
||||
}
|
||||
}).then((rs) => {
|
||||
formatAppLog("log", "at pages/index/index.nvue:339", "getRecList then rs", recList, rs);
|
||||
if (rs.code == 200) {
|
||||
recList.total = rs.total;
|
||||
const list = rs.rows.sort(() => Math.random() - Math.random());
|
||||
if (recList.pageNum == 1)
|
||||
recList.data.length = 0;
|
||||
recList.data.push(...list.map((item) => {
|
||||
item.speed = 1;
|
||||
return item;
|
||||
}));
|
||||
formatAppLog("log", "at pages/index/index.nvue:352", "result", recList.data, rs);
|
||||
if (recList.total > 1 && recList.data.length <= 1)
|
||||
getMoreRecList();
|
||||
setTimeout(() => {
|
||||
const pages = getCurrentPages();
|
||||
if (pages[pages.length - 1].route == "pages/index/index") {
|
||||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].playState.value = true;
|
||||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].play();
|
||||
}
|
||||
}, 50);
|
||||
return;
|
||||
}
|
||||
util$1.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false
|
||||
});
|
||||
formatAppLog("log", "at pages/index/index.nvue:271", "getRecList then rs", recList, rs);
|
||||
setList(rs, recList);
|
||||
});
|
||||
}
|
||||
function setList(rs, obj) {
|
||||
if (rs.code == 200) {
|
||||
obj.total = rs.total;
|
||||
const list = rs.rows.sort(() => Math.random() - Math.random());
|
||||
if (obj.pageNum == 1)
|
||||
obj.data.length = 0;
|
||||
obj.data.push(...list.map((item) => {
|
||||
item.readSecond = 0;
|
||||
return item;
|
||||
}));
|
||||
formatAppLog("log", "at pages/index/index.nvue:296", "result", obj.data, rs);
|
||||
setTimeout(() => {
|
||||
const pages = getCurrentPages();
|
||||
if (pages[pages.length - 1].route == "pages/index/index") {
|
||||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].playState.value = true;
|
||||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].play();
|
||||
}
|
||||
}, 50);
|
||||
return;
|
||||
}
|
||||
util$1.alert({
|
||||
content: rs.msg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
function readSecondAdd() {
|
||||
clearInterval(readSecond.timer);
|
||||
const item = tab[tabIndex.value].listData()[current[tabIndex.value]];
|
||||
readSecond.timer = setInterval(() => {
|
||||
if (item.readSecond <= Math.min(Math.floor(item.videoDuration) - 2, 20)) {
|
||||
item.readSecond++;
|
||||
} else {
|
||||
clearInterval(readSecond.timer);
|
||||
}
|
||||
}, 1e3);
|
||||
}
|
||||
function readSecondPause() {
|
||||
clearInterval(readSecond.timer);
|
||||
}
|
||||
function scrollTo(target) {
|
||||
const tab_index = tabIndex.value;
|
||||
const element = proxy.$refs[`cellRef${tab_index}`][target];
|
||||
|
@ -13931,17 +13920,9 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
animated: true
|
||||
});
|
||||
if (current[tab_index] != currentLast[tab_index]) {
|
||||
(0, import_vue3.nextTick)(() => {
|
||||
lastVideoRef.playState.value = false;
|
||||
lastVideoRef.pause();
|
||||
proxy.$refs[`videoRef${tab_index}`][current[tab_index]].playState.value = true;
|
||||
proxy.$refs[`videoRef${tab_index}`][current[tab_index]].play();
|
||||
});
|
||||
readSecondPause();
|
||||
browseLog(lastVideoRef);
|
||||
readSecond.total += readSecond.count;
|
||||
if (readSecond.total < readSecond.totalMax)
|
||||
readSecondAdd();
|
||||
readSecondAdd();
|
||||
}
|
||||
}
|
||||
function onTouchstart(ev, index2) {
|
||||
|
@ -13982,8 +13963,7 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
readSecondPause();
|
||||
browseLog(lastVideoRef);
|
||||
readSecond.total += readSecond.count;
|
||||
if (readSecond.total < readSecond.totalMax)
|
||||
readSecondAdd();
|
||||
readSecondAdd();
|
||||
}
|
||||
tabIndex.value = index2;
|
||||
if (tabCurrent.value.load && proxy.$refs[`videoRef${index2}`])
|
||||
|
@ -14008,8 +13988,7 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
function handleVideoOnPlay() {
|
||||
if (proxy.$refs.discRef)
|
||||
proxy.$refs.discRef.play();
|
||||
if (readSecond.total < readSecond.totalMax)
|
||||
readSecondAdd();
|
||||
readSecondAdd();
|
||||
}
|
||||
function handleVideoOnPause() {
|
||||
if (proxy.$refs.discRef)
|
||||
|
@ -14017,32 +13996,40 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
}
|
||||
function browseLog(element) {
|
||||
util$1.isLogin().then((rs) => {
|
||||
formatAppLog("log", "at pages/index/index.nvue:542", "data", {
|
||||
const data = {
|
||||
// 视频id
|
||||
videoId: element.item.id,
|
||||
// 有效读秒时间统计
|
||||
viewingDuration: Math.floor(readSecond.count),
|
||||
viewingDuration: Math.floor(element.item.readSecond),
|
||||
// 视频秒数
|
||||
videoDescription: Math.floor(element.videoTime.currentTime),
|
||||
//
|
||||
task: 0
|
||||
});
|
||||
};
|
||||
formatAppLog("log", "at pages/index/index.nvue:506", "browseLog data", data);
|
||||
api.video.browseLog({
|
||||
data: {
|
||||
// 视频id
|
||||
videoId: element.item.id,
|
||||
// 有效读秒时间统计
|
||||
viewingDuration: Math.floor(readSecond.count),
|
||||
// 视频秒数
|
||||
videoDescription: Math.floor(element.videoTime.currentTime),
|
||||
//
|
||||
task: 0
|
||||
}
|
||||
data
|
||||
}).then((rs2) => {
|
||||
formatAppLog("log", "at pages/index/index.nvue:565", "browseLog", rs2);
|
||||
if (rs2.code != 200) {
|
||||
formatAppLog("log", "at pages/index/index.nvue:567", "browseLog err", rs2);
|
||||
if (rs2.code == 200) {
|
||||
const result = rs2.data;
|
||||
const taskValue = task.value;
|
||||
formatAppLog("log", "at pages/index/index.nvue:516", "browseLog result", rs2, taskValue);
|
||||
if (taskValue.taskType == 0 && result.taskType == 1) {
|
||||
formatAppLog("log", "at pages/index/index.nvue:521", "\u4F18\u5148\u4EFB\u52A1\u5B8C\u6210 \u64AD\u653E\u70DF\u82B1\u52A8\u753B");
|
||||
}
|
||||
if (result.taskType == 1 && result.viewingDuration < taskValue.viewingDuration) {
|
||||
formatAppLog("log", "at pages/index/index.nvue:525", "\u6709\u6548\u8BFB\u79D2\u5B8C\u6210 \u64AD\u653E\u4EFB\u52A1\u5B8C\u6210\u52A8\u753B");
|
||||
}
|
||||
uni.$store.commit("setState", {
|
||||
key: "task",
|
||||
value: result
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
formatAppLog("log", "at pages/index/index.nvue:535", "browseLog err", rs2);
|
||||
}
|
||||
}).catch((rs2) => {
|
||||
formatAppLog("log", "at pages/index/index.nvue:538", "browseLog err fail", rs2);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -14101,7 +14088,7 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
function showAlarm() {
|
||||
proxy.$refs.timeRef.open();
|
||||
}
|
||||
const __returned__ = { proxy, dom: dom22, oclockWindow, readSecond, tab, tabIndex, startY, currentLast, current, recList, attList, viewSize, discOffsetTop, footerMenuHeight, userinfo, tabCurrent, currentVideoRef, getTask, readSecondAdd, readSecondPause, refreshAttList, getMoreAttList, getAttList, refreshRecList, getMoreRecList, getRecList, scrollTo, onTouchstart, onTouchend, handle_tab, handleShowTime, handleShowCommentAlt, handleShowCollectAlt, handleShowShareFirend, handleVideoOnPlay, handleVideoOnPause, browseLog, videoLike, setAlarm, showLeftMenu, handleSpeed, showAlarm, ref: import_vue3.ref, reactive: import_vue3.reactive, getCurrentInstance: import_vue3.getCurrentInstance, computed: import_vue3.computed, nextTick: import_vue3.nextTick, get onLoad() {
|
||||
const __returned__ = { proxy, dom: dom22, oclockWindow, readSecond, tab, tabIndex, startY, currentLast, current, recList, attList, viewSize, discOffsetTop, footerMenuHeight, task, userinfo, tabCurrent, currentVideoRef, refreshAttList, getMoreAttList, getAttList, refreshRecList, getMoreRecList, getRecList, setList, readSecondAdd, readSecondPause, scrollTo, onTouchstart, onTouchend, handle_tab, handleShowTime, handleShowCommentAlt, handleShowCollectAlt, handleShowShareFirend, handleVideoOnPlay, handleVideoOnPause, browseLog, videoLike, setAlarm, showLeftMenu, handleSpeed, showAlarm, ref: import_vue3.ref, reactive: import_vue3.reactive, getCurrentInstance: import_vue3.getCurrentInstance, computed: import_vue3.computed, nextTick: import_vue3.nextTick, get onLoad() {
|
||||
return onLoad;
|
||||
}, get onReady() {
|
||||
return onReady;
|
||||
|
|
|
@ -3989,6 +3989,30 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
showCancel: false
|
||||
});
|
||||
});
|
||||
},
|
||||
// 获取我的任务
|
||||
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
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
var util$1 = util;
|
||||
|
@ -4257,15 +4281,15 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
result = "cover";
|
||||
return result;
|
||||
});
|
||||
(0, import_vue2.onMounted)(() => {
|
||||
videoCtx.value = uni.createVideoContext(`video${props.tabIndex}${props.index}`);
|
||||
});
|
||||
(0, import_vue2.watch)(() => props.current, (nV) => {
|
||||
if (nV == props.index)
|
||||
play();
|
||||
else
|
||||
pause();
|
||||
});
|
||||
(0, import_vue2.onMounted)(() => {
|
||||
videoCtx.value = uni.createVideoContext(`video${props.tabIndex}${props.index}`);
|
||||
});
|
||||
function formatNumber(result) {
|
||||
result = parseFloat(result) * 10;
|
||||
return result;
|
||||
|
@ -4537,7 +4561,9 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
},
|
||||
[
|
||||
(0, import_vue2.createVNode)($setup["statusBar"]),
|
||||
(0, import_vue2.createElementVNode)("u-video", {
|
||||
(0, import_vue2.createCommentVNode)(" \u89C6\u9891 \u589E\u52A0\u5224\u65AD\u9632\u6B62\u91CD\u590D\u52A0\u8F7D "),
|
||||
$props.item.videoUrl ? ((0, import_vue2.openBlock)(), (0, import_vue2.createElementBlock)("u-video", {
|
||||
key: 0,
|
||||
class: "video f1",
|
||||
id: "video" + $props.tabIndex + $props.index,
|
||||
src: $props.item.videoUrl,
|
||||
|
@ -4554,7 +4580,7 @@ if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
|
|||
playStrategy: 2,
|
||||
loop: true,
|
||||
objectFit: $setup.fit
|
||||
}, null, 40, ["id", "src", "poster", "objectFit"])
|
||||
}, null, 40, ["id", "src", "poster", "objectFit"])) : (0, import_vue2.createCommentVNode)("v-if", true)
|
||||
],
|
||||
32
|
||||
/* NEED_HYDRATION */
|
||||
|
|
|
@ -15,7 +15,7 @@ export default defineConfig({
|
|||
changeOrigin: true,
|
||||
},
|
||||
"/user": {
|
||||
target: "http://192.168.1.235:8080",
|
||||
target: "http://192.168.1.241:8080",
|
||||
changeOrigin: true,
|
||||
},
|
||||
"/coreplay": {
|
||||
|
@ -27,7 +27,7 @@ export default defineConfig({
|
|||
changeOrigin: true,
|
||||
},
|
||||
"/video": {
|
||||
target: "http://192.168.1.235:8080",
|
||||
target: "http://192.168.1.241:8080",
|
||||
changeOrigin: true,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue