2025.03.17 工作代码提交

This commit is contained in:
sx 2025-03-17 20:26:25 +08:00
parent d98e1822db
commit cb57627169
7 changed files with 29 additions and 28 deletions

View File

@ -6,7 +6,8 @@ const config = {
// host: 'h5api', // host: 'h5api',
// #endif // #endif
// #ifndef H5 // #ifndef H5
host: 'http://91f.xyz:8080', // host: 'http://91f.xyz:8080',
host: 'http://1d857465.r24.cpolar.top',
// #endif // #endif
// 是否vivo显示 // 是否vivo显示
showVivo: true, showVivo: true,

View File

@ -36,7 +36,7 @@
// status 1 0 // status 1 0
if (result.status != 1) return if (result.status != 1) return
// < // <
if (system.appVersionCode < result.versionCode) open() if (versionkApp.appVersionCode < result.versionCode) open()
} }
// //

View File

@ -2,8 +2,8 @@
"name" : "九亿", "name" : "九亿",
"appid" : "__UNI__08B31BC", "appid" : "__UNI__08B31BC",
"description" : "", "description" : "",
"versionName" : "1.0.15", "versionName" : "1.0.16",
"versionCode" : 1015, "versionCode" : 1016,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@ -882,7 +882,7 @@
"list": [ "list": [
{ {
"name": "test", "name": "test",
"path": "pages/shop/shop" "path": "pages/mine/mine"
}, },
{ {
"name": "test", "name": "test",

View File

@ -230,11 +230,14 @@
}) })
onHide(() => { onHide(() => {
// console.log('onHide', tabIndex.value, current, proxy.$refs) // 上一个视频的id
const videoRefList = proxy.$refs[`videoRef${tabIndex.value}`] const videoId = tabCurrent.value.listData()[current[tabIndex.value]].id
// 暂停视频 // 暂停视频
if (videoRefList) { if (videoId) {
videoRefList[videoRefList.length - 2].pause() // 视频组件
const VideoRef = proxy.$refs[`videoRef${videoId}`][0]
VideoRef.pause()
// videoRefList[current[tabIndex.value]].pause() // videoRefList[current[tabIndex.value]].pause()
} }
}) })
@ -275,7 +278,6 @@
// 重载推荐列表 // 重载推荐列表
function refreshRecList() { function refreshRecList() {
console.log('refreshRecList')
recList.pageNum = 1 recList.pageNum = 1
recList.total = 0 recList.total = 0
getRecList() getRecList()
@ -290,7 +292,6 @@
// 获取推荐视频 // 获取推荐视频
function getRecList() { function getRecList() {
console.log('getRecList')
// 获取首页分页视频 // 获取首页分页视频
api.video.homeVideo({ api.video.homeVideo({
query: { query: {
@ -299,7 +300,6 @@
pageSize: recList.pageSize, pageSize: recList.pageSize,
} }
}).then(rs => { }).then(rs => {
console.log('getRecList then')
handleListData(rs, recList) handleListData(rs, recList)
}) })
} }
@ -449,29 +449,27 @@
* @param {Number} target 滚动到下标的元素 * @param {Number} target 滚动到下标的元素
*/ */
function scrollTo(target) { function scrollTo(target) {
console.log('scrollTo', proxy.$refs)
// tab下标 // tab下标
const tab_index = tabIndex.value const tab_index = tabIndex.value
// 当前cell对象 // 当前cell对象
const element = proxy.$refs[`cellRef${tab_index}`][target] const element = proxy.$refs[`cellRef${tab_index}`][target]
// 上一个视频组件
const lastVideoRef = proxy.$refs[`videoRef${tab_index}`][currentLast[tab_index]]
// 滚动到对应位置 // 滚动到对应位置
dom.scrollToElement(element, { dom.scrollToElement(element, {
animated: true animated: true
}) })
// 上一个视频的id
const videoId = tabCurrent.value.listData()[currentLast[tab_index]].id
// 上一个视频组件
const lastVideoRef = proxy.$refs[`videoRef${videoId}`][0]
// 如果视频切换 // 如果视频切换
// if (current[tab_index] != currentLast[tab_index]) { if (current[tab_index] != currentLast[tab_index]) {
// 停止当前有效读秒统计 // 停止当前有效读秒统计
readSecondPause() readSecondPause()
// 浏览记录 // 浏览记录
browseLog(lastVideoRef) browseLog(lastVideoRef)
// 开始记录 // 开始记录
readSecondAdd() readSecondAdd()
// } }
} }
/** /**
@ -816,7 +814,7 @@
v-for="(secItem,secIndex) in item.listData()" :key="secItem.id" @click.stop> v-for="(secItem,secIndex) in item.listData()" :key="secItem.id" @click.stop>
<template v-if="current[tabIndex] < secIndex + 2 && current[tabIndex] > secIndex - 2"> <template v-if="current[tabIndex] < secIndex + 2 && current[tabIndex] > secIndex - 2">
<!-- 视频 --> <!-- 视频 -->
<indexVideo :ref="'videoRef' + index" :tabIndex="index" :current="current[tabIndex]" <indexVideo :ref="'videoRef' + secItem.id" :tabIndex="index" :current="current[tabIndex]"
:width="viewSize.width" :height="viewSize.height" :item="secItem" :index="secIndex" :width="viewSize.width" :height="viewSize.height" :item="secItem" :index="secIndex"
@showTime="handleShowTime" @showComment="handleShowCommentAlt" @showTime="handleShowTime" @showComment="handleShowCommentAlt"
@showCollect="handleShowCollectAlt" @showShareFirend="handleShowShareFirend" @showCollect="handleShowCollectAlt" @showShareFirend="handleShowShareFirend"

View File

@ -89,7 +89,8 @@
if (rs.code == 200) { if (rs.code == 200) {
uni.requestPayment({ uni.requestPayment({
provider: payment.value.provider, provider: payment.value.provider,
orderInfo: rs.msg, // orderInfo: rs.data,
package: `prepay_id=${rs.data.prepayId}`,
success: rs => { success: rs => {
console.log('requestPayment', rs) console.log('requestPayment', rs)
util.getPurse() util.getPurse()

View File

@ -4,6 +4,7 @@ import {
import uni from '@dcloudio/vite-plugin-uni'; import uni from '@dcloudio/vite-plugin-uni';
let target = 'http://91f.xyz:8080' let target = 'http://91f.xyz:8080'
// let target = 'http://1d857465.r24.cpolar.top'
export default defineConfig({ export default defineConfig({
plugins: [uni()], plugins: [uni()],