合并代码

This commit is contained in:
sx 2025-01-02 00:59:24 +08:00
parent 849661cf00
commit 42ab006a83
9 changed files with 226 additions and 1166 deletions

View File

@ -225,7 +225,7 @@ const video = {
*/ */
publishVideo(param) { publishVideo(param) {
return util.request({ return util.request({
url: `/homecommon/publishVideo`, url: `/video/video/add`,
data: param.data, data: param.data,
method: 'POST', method: 'POST',
}) })

View File

@ -60,7 +60,9 @@
}, },
}) })
// //
const emit = defineEmits(['showTime', 'showComment', 'showCollect', 'showFastCollect', 'showShareFirend', 'onPlay', 'onPause', 'like', 'detailMenu', 'onEnd', 'longtap']) const emit = defineEmits(['showTime', 'showComment', 'showCollect', 'showFastCollect', 'showShareFirend', 'onPlay',
'onPause', 'like', 'detailMenu', 'onEnd', 'longtap'
])
// //
const videoCtx = ref(null) const videoCtx = ref(null)
@ -414,10 +416,15 @@
<view class="container f1 pr" ref="videoBoxRef"> <view class="container f1 pr" ref="videoBoxRef">
<!-- 视频层 --> <!-- 视频层 -->
<view class="main f1"> <view class="main f1">
<view class="videoBox f1" @longpress="longtap" @touchmove.stop="" @touchstart="onTouchStart" @touchend="onTouchEnd" @touchcancel="onTouchEnd"> <view class="videoBox f1" @longpress="longtap" @touchmove.stop="" @touchstart="onTouchStart"
@touchend="onTouchEnd" @touchcancel="onTouchEnd">
<statusBar /> <statusBar />
<video class="video f1" :id="'video' + tabIndex + index" :src="item.format_videoUrl" :poster="item.format_imageUrl" :http-cache="false" :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" :initial-time="0" :loop="true" /> <video class="video f1" :id="'video' + tabIndex + index" :src="item.format_videoUrl"
:poster="item.format_imageUrl" :http-cache="false" :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" />
</view> </view>
<!-- 视频进度条 --> <!-- 视频进度条 -->
@ -454,10 +461,13 @@
<view class="item"> <view class="item">
<view class="col"> <view class="col">
<view class="pr"> <view class="pr">
<image class="wh50" src="/static/indexLike.png" mode="aspectFit" v-if="item.isLike == 0" @click="handleLike(index, 0)" @longpress="handlePrivateLike(index)" /> <image class="wh50" src="/static/indexLike.png" mode="aspectFit" v-if="item.isLike == 0"
<image class="wh50" src="/static/indexLike1.png" mode="aspectFit" v-else-if="item.isLike == 1" @click="handleLike(index, 1)" /> @click="handleLike(index, 0)" @longpress="handlePrivateLike(index)" />
<image class="wh50" src="/static/indexLike1.png" mode="aspectFit"
v-else-if="item.isLike == 1" @click="handleLike(index, 1)" />
<!-- 私密赞的图标 --> <!-- 私密赞的图标 -->
<image class="wh50" src="/static/privateLike.png" mode="aspectFit" v-else-if="item.isLike == 3" @click="handleLike(index, 1)" /> <image class="wh50" src="/static/privateLike.png" mode="aspectFit"
v-else-if="item.isLike == 3" @click="handleLike(index, 1)" />
</view> </view>
<view class="txt mt10"> <view class="txt mt10">
<text class="text">{{ item.likes }}</text> <text class="text">{{ item.likes }}</text>
@ -478,7 +488,8 @@
<!-- 收藏 --> <!-- 收藏 -->
<view class="item df fdr"> <view class="item df fdr">
<view class="col" @touchstart="handleCollectStar" @touchend="handleCollectEnd" ref="collectBtn"> <view class="col" @touchstart="handleCollectStar" @touchend="handleCollectEnd" ref="collectBtn">
<image class="wh50" src="@/static/indexCollect1.png" mode="aspectFit" v-if="item.isCollect" /> <image class="wh50" src="@/static/indexCollect1.png" mode="aspectFit"
v-if="item.isCollect" />
<image class="wh50" src="@/static/indexCollect.png" mode="aspectFit" v-else /> <image class="wh50" src="@/static/indexCollect.png" mode="aspectFit" v-else />
<view class="txt mt10"> <view class="txt mt10">
<text class="text">{{ item.collect }}</text> <text class="text">{{ item.collect }}</text>

View File

@ -1,185 +1,184 @@
{ {
"name" : "九亿", "name": "九亿",
"appid" : "__UNI__08B31BC", "appid": "__UNI__08B31BC",
"description" : "", "description": "",
"versionName" : "1.0.2", "versionName": "1.0.2",
"versionCode" : 1002, "versionCode": 1002,
"transformPx" : false, "transformPx": false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus": {
"usingComponents" : true, "usingComponents": true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler": "uni-app",
"compilerVersion" : 3, "compilerVersion": 3,
"splashscreen" : { "splashscreen": {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender": true,
"waiting" : true, "waiting": true,
"autoclose" : true, "autoclose": true,
"delay" : 0 "delay": 0
}, },
/* */ /* */
"modules" : { "modules": {
"Camera" : {}, "Camera": {},
"Payment" : {}, "Payment": {},
"Share" : {}, "Share": {},
"VideoPlayer" : {}, "VideoPlayer": {},
"Barcode" : {}, "Barcode": {},
"Record" : {} "Record": {}
}, },
/* */ /* */
"distribute" : { "distribute": {
/* android */ /* android */
"android" : { "android": {
"plugins" : [ "plugins": [{
{ "type": "module",
"type" : "module", "name": "Agora-RTC-EngineModule",
"name" : "Agora-RTC-EngineModule", "class": "io.agora.rtc.uni.AgoraRtcEngineModule"
"class" : "io.agora.rtc.uni.AgoraRtcEngineModule" },
}, {
{ "type": "module",
"type" : "module", "name": "Agora-RTC-ChannelModule",
"name" : "Agora-RTC-ChannelModule", "class": "io.agora.rtc.uni.AgoraRtcChannelModule"
"class" : "io.agora.rtc.uni.AgoraRtcChannelModule" },
}, {
{ "type": "component",
"type" : "component", "name": "Agora-RTC-SurfaceView",
"name" : "Agora-RTC-SurfaceView", "class": "io.agora.rtc.uni.AgoraRtcSurfaceView"
"class" : "io.agora.rtc.uni.AgoraRtcSurfaceView" },
}, {
{ "type": "component",
"type" : "component", "name": "Agora-RTC-TextureView",
"name" : "Agora-RTC-TextureView", "class": "io.agora.rtc.uni.AgoraRtcTextureView"
"class" : "io.agora.rtc.uni.AgoraRtcTextureView" }
} ],
], "permissions": [
"permissions" : [ "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>", "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>", "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>"
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>" ],
], "abiFilters": ["arm64-v8a"],
"abiFilters" : [ "arm64-v8a" ], "minSdkVersion": 27,
"minSdkVersion" : 27, "targetSdkVersion": 31
"targetSdkVersion" : 31 },
}, /* ios */
/* ios */ "ios": {
"ios" : { "dSYMs": false,
"dSYMs" : false, "idfa": false
"idfa" : false },
}, /* SDK */
/* SDK */ "sdkConfigs": {
"sdkConfigs" : { "payment": {
"payment" : { "alipay": {
"alipay" : { "__platform__": ["ios", "android"]
"__platform__" : [ "ios", "android" ] }
} },
}, "share": {},
"share" : {}, "ad": {},
"ad" : {}, "geolocation": {},
"geolocation" : {}, "oauth": {},
"oauth" : {}, "push": {},
"push" : {}, "maps": {}
"maps" : {} },
}, "icons": {
"icons" : { "android": {
"android" : { "hdpi": "unpackage/res/icons/72x72.png",
"hdpi" : "unpackage/res/icons/72x72.png", "xhdpi": "unpackage/res/icons/96x96.png",
"xhdpi" : "unpackage/res/icons/96x96.png", "xxhdpi": "unpackage/res/icons/144x144.png",
"xxhdpi" : "unpackage/res/icons/144x144.png", "xxxhdpi": "unpackage/res/icons/192x192.png"
"xxxhdpi" : "unpackage/res/icons/192x192.png" },
}, "ios": {
"ios" : { "appstore": "unpackage/res/icons/1024x1024.png",
"appstore" : "unpackage/res/icons/1024x1024.png", "ipad": {
"ipad" : { "app": "unpackage/res/icons/76x76.png",
"app" : "unpackage/res/icons/76x76.png", "app@2x": "unpackage/res/icons/152x152.png",
"app@2x" : "unpackage/res/icons/152x152.png", "notification": "unpackage/res/icons/20x20.png",
"notification" : "unpackage/res/icons/20x20.png", "notification@2x": "unpackage/res/icons/40x40.png",
"notification@2x" : "unpackage/res/icons/40x40.png", "proapp@2x": "unpackage/res/icons/167x167.png",
"proapp@2x" : "unpackage/res/icons/167x167.png", "settings": "unpackage/res/icons/29x29.png",
"settings" : "unpackage/res/icons/29x29.png", "settings@2x": "unpackage/res/icons/58x58.png",
"settings@2x" : "unpackage/res/icons/58x58.png", "spotlight": "unpackage/res/icons/40x40.png",
"spotlight" : "unpackage/res/icons/40x40.png", "spotlight@2x": "unpackage/res/icons/80x80.png"
"spotlight@2x" : "unpackage/res/icons/80x80.png" },
}, "iphone": {
"iphone" : { "app@2x": "unpackage/res/icons/120x120.png",
"app@2x" : "unpackage/res/icons/120x120.png", "app@3x": "unpackage/res/icons/180x180.png",
"app@3x" : "unpackage/res/icons/180x180.png", "notification@2x": "unpackage/res/icons/40x40.png",
"notification@2x" : "unpackage/res/icons/40x40.png", "notification@3x": "unpackage/res/icons/60x60.png",
"notification@3x" : "unpackage/res/icons/60x60.png", "settings@2x": "unpackage/res/icons/58x58.png",
"settings@2x" : "unpackage/res/icons/58x58.png", "settings@3x": "unpackage/res/icons/87x87.png",
"settings@3x" : "unpackage/res/icons/87x87.png", "spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png", "spotlight@3x": "unpackage/res/icons/120x120.png"
"spotlight@3x" : "unpackage/res/icons/120x120.png" }
} }
} },
}, "splashscreen": {
"splashscreen" : { "useOriginalMsgbox": true
"useOriginalMsgbox" : true }
} },
}, "nativePlugins": {
"nativePlugins" : { "HisignFaceLivePlugin": {
"HisignFaceLivePlugin" : { "__plugin_info__": {
"__plugin_info__" : { "name": "HisignFaceLive",
"name" : "HisignFaceLive", "description": "鑫模态人脸活体检测移动版",
"description" : "鑫模态人脸活体检测移动版", "platforms": "Android,iOS",
"platforms" : "Android,iOS", "url": "",
"url" : "", "android_package_name": "",
"android_package_name" : "", "ios_bundle_id": "",
"ios_bundle_id" : "", "isCloud": false,
"isCloud" : false, "bought": -1,
"bought" : -1, "pid": "",
"pid" : "", "parameters": {}
"parameters" : {} }
} },
}, "TencentCloud-TUICallKit": {
"TencentCloud-TUICallKit" : { "__plugin_info__": {
"__plugin_info__" : { "name": "【官方】腾讯云音视频通话插件TencentCloud-TUICallKit",
"name" : "【官方】腾讯云音视频通话插件TencentCloud-TUICallKit", "description": "TUICallKit 是腾讯云官方推出的音视频通话插件,支持 1v1 通话和群组通话,并提供“类微信\"的 UI 交互,开发者仅需三个 API 就可实现。",
"description" : "TUICallKit 是腾讯云官方推出的音视频通话插件,支持 1v1 通话和群组通话,并提供“类微信\"的 UI 交互,开发者仅需三个 API 就可实现。", "platforms": "Android,iOS",
"platforms" : "Android,iOS", "url": "https://ext.dcloud.net.cn/plugin?id=9035",
"url" : "https://ext.dcloud.net.cn/plugin?id=9035", "android_package_name": "",
"android_package_name" : "", "ios_bundle_id": "",
"ios_bundle_id" : "", "isCloud": true,
"isCloud" : true, "bought": 1,
"bought" : 1, "pid": "9035",
"pid" : "9035", "parameters": {}
"parameters" : {} }
} }
} }
} },
}, /* */
/* */ "quickapp": {},
"quickapp" : {}, /* */
/* */ "mp-weixin": {
"mp-weixin" : { "appid": "",
"appid" : "", "setting": {
"setting" : { "urlCheck": false
"urlCheck" : false },
}, "usingComponents": true
"usingComponents" : true },
}, "mp-alipay": {
"mp-alipay" : { "usingComponents": true
"usingComponents" : true },
}, "mp-baidu": {
"mp-baidu" : { "usingComponents": true
"usingComponents" : true },
}, "mp-toutiao": {
"mp-toutiao" : { "usingComponents": true
"usingComponents" : true },
}, "uniStatistics": {
"uniStatistics" : { "enable": false
"enable" : false },
}, "vueVersion": "3"
"vueVersion" : "3" }
}

View File

@ -329,7 +329,7 @@
function getRecList() { function getRecList() {
Promise.all([getHomeVideo(), getShopVideo(), getOtherVideo()]).then(rs => { Promise.all([getHomeVideo(), getShopVideo(), getOtherVideo()]).then(rs => {
// 列表 // 列表
const list = rs.reduce((last, now) => last.concat(now.rows), []).sort(() => Math.random() - 0.5) const list = rs.rows.sort(() => Math.random() - 0.5)
// 总数 // 总数
recList.total = rs.reduce((last, now) => last + now.total, 0) recList.total = rs.reduce((last, now) => last + now.total, 0)
// 第一页 // 第一页
@ -352,7 +352,8 @@
const pages = getCurrentPages() const pages = getCurrentPages()
// 判断是否当前页 // 判断是否当前页
if (pages[pages.length - 1].route == 'pages/index/index') { 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]].playState.value =
true
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].play() proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].play()
} }
}, 50) }, 50)
@ -542,7 +543,8 @@
} }
tabIndex.value = index tabIndex.value = index
// 根据是否加载过判断 播放还是获取 // 根据是否加载过判断 播放还是获取
if (tabCurrent.value.load && proxy.$refs[`videoRef${index}`]) proxy.$refs[`videoRef${index}`][current[index]].play() if (tabCurrent.value.load && proxy.$refs[`videoRef${index}`]) proxy.$refs[`videoRef${index}`][current[index]]
.play()
else tabCurrent.value.getList() else tabCurrent.value.getList()
// 已加载 // 已加载
tab[tabIndex.value].load = true tab[tabIndex.value].load = true
@ -729,7 +731,8 @@
<view class="f1"> <view class="f1">
<view class="tab fdr jcc" :key="tabIndex"> <view class="tab fdr jcc" :key="tabIndex">
<view class="list" v-for="(item,index) in tab" :key="index" :class="[{'active': index === tabIndex}]" @click.stop="handle_tab(index)"> <view class="list" v-for="(item,index) in tab" :key="index"
:class="[{'active': index === tabIndex}]" @click.stop="handle_tab(index)">
<view class="txt"> <view class="txt">
<text class="text">{{item.name}}</text> <text class="text">{{item.name}}</text>
</view> </view>
@ -752,10 +755,17 @@
<template v-for="(item, index) in tab" :key="index"> <template v-for="(item, index) in tab" :key="index">
<view class="f1" v-if="tabIndex == index" ref="containerRef"> <view class="f1" v-if="tabIndex == index" ref="containerRef">
<!-- 主要内容区域 --> <!-- 主要内容区域 -->
<list class="container f1" :show-scrollbar="false" @touchstart="onTouchstart($event,index)" @touchend="onTouchend($event,index)" @loadmore="item.getMoreList"> <list class="container f1" :show-scrollbar="false" @touchstart="onTouchstart($event,index)"
<cell class="cell" :style="[{height: viewHeight + 'px'}]" :ref="`cellRef` + index" v-for="(secItem,secIndex) in item.listData()" :key="secIndex" @click.stop> @touchend="onTouchend($event,index)" @loadmore="item.getMoreList">
<cell class="cell" :style="[{height: viewHeight + 'px'}]" :ref="`cellRef` + index"
v-for="(secItem,secIndex) in item.listData()" :key="secIndex" @click.stop>
<!-- 视频 --> <!-- 视频 -->
<indexVideo :ref="'videoRef' + index" :tabIndex="index" :current="current[index]" :item="secItem" :index="secIndex" @showTime="handleShowTime" @showComment="handleShowCommentAlt" @showCollect="handleShowCollectAlt" @showShareFirend="handleShowShareFirend" @onPlay="handleVideoOnPlay" @onPause="handleVideoOnPause" @like="videoLike" @longtap="$refs.moreMenuRef.open(secItem)" @showFastCollect="handleShowFastCollect" :viewWidth="viewWidth" /> <indexVideo :ref="'videoRef' + index" :tabIndex="index" :current="current[index]"
:item="secItem" :index="secIndex" @showTime="handleShowTime"
@showComment="handleShowCommentAlt" @showCollect="handleShowCollectAlt"
@showShareFirend="handleShowShareFirend" @onPlay="handleVideoOnPlay"
@onPause="handleVideoOnPause" @like="videoLike" @longtap="$refs.moreMenuRef.open(secItem)"
@showFastCollect="handleShowFastCollect" :viewWidth="viewWidth" />
</cell> </cell>
</list> </list>
</view> </view>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

BIN
jiuyi/static/statistics.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

View File

@ -1,37 +1,31 @@
{ {
"hash": "32d96953", "hash": "37e93c97",
"configHash": "aa34cf93", "configHash": "b5581361",
"lockfileHash": "6e88141a", "lockfileHash": "6e88141a",
"browserHash": "f6042447", "browserHash": "b2bb18f7",
"optimized": { "optimized": {
"@tencentcloud/chat": { "@tencentcloud/chat": {
"src": "../../../../../node_modules/@tencentcloud/chat/index.js", "src": "../../../../../node_modules/@tencentcloud/chat/index.js",
"file": "@tencentcloud_chat.js", "file": "@tencentcloud_chat.js",
"fileHash": "b18fad8a", "fileHash": "b054b652",
"needsInterop": true "needsInterop": true
}, },
"@tencentcloud/chat/modules/group-module.js": { "@tencentcloud/chat/modules/group-module.js": {
"src": "../../../../../node_modules/@tencentcloud/chat/modules/group-module.js", "src": "../../../../../node_modules/@tencentcloud/chat/modules/group-module.js",
"file": "@tencentcloud_chat_modules_group-module__js.js", "file": "@tencentcloud_chat_modules_group-module__js.js",
"fileHash": "70eaae39", "fileHash": "bbe780a6",
"needsInterop": false "needsInterop": false
}, },
"tim-upload-plugin": { "tim-upload-plugin": {
"src": "../../../../../node_modules/tim-upload-plugin/index.js", "src": "../../../../../node_modules/tim-upload-plugin/index.js",
"file": "tim-upload-plugin.js", "file": "tim-upload-plugin.js",
"fileHash": "665b8e2f", "fileHash": "11d142d1",
"needsInterop": true "needsInterop": true
}, },
"crypto-js": { "crypto-js": {
"src": "../../../../../node_modules/crypto-js/index.js", "src": "../../../../../node_modules/crypto-js/index.js",
"file": "crypto-js.js", "file": "crypto-js.js",
"fileHash": "f77d7150", "fileHash": "3cc1bed2",
"needsInterop": true
},
"js-pinyin": {
"src": "../../../../../node_modules/js-pinyin/index.js",
"file": "js-pinyin.js",
"fileHash": "a2c07873",
"needsInterop": true "needsInterop": true
} }
}, },

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long