合并代码
This commit is contained in:
parent
674e656d5b
commit
77ceacf2a5
|
@ -25,17 +25,6 @@ export const durian = {
|
|||
query: param.query,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 果树列表
|
||||
* @param {Object} param
|
||||
*/
|
||||
durianList(param) {
|
||||
return util.request({
|
||||
url: `/coreplay/duriantreeinfo/tree-list`,
|
||||
method: 'GET',
|
||||
query: param.query,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 我的榴莲果树
|
||||
* @param {Object} param
|
||||
|
|
|
@ -3,6 +3,80 @@ import util from '@/common/js/util.js'
|
|||
|
||||
// 视频模块
|
||||
const video = {
|
||||
/**
|
||||
* 首页视频分页接口
|
||||
* @param {Object} param
|
||||
*/
|
||||
homeVideo(param) {
|
||||
return util.request({
|
||||
url: `/video/api/queryVideoByPage`,
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 发布作品
|
||||
* @param {Object} param
|
||||
*/
|
||||
saveVideo(param) {
|
||||
return util.request({
|
||||
url: `/video/api/saveVideo`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 保存点赞
|
||||
* @param {Object} param
|
||||
*/
|
||||
saveLikes(param) {
|
||||
return util.request({
|
||||
url: `/video/api/saveLikes`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 取消点赞
|
||||
* @param {Object} param
|
||||
*/
|
||||
cancelLikes(param) {
|
||||
return util.request({
|
||||
url: `/video/api/cancelLikes`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查看标签分类
|
||||
* @param {Object} param
|
||||
*/
|
||||
getLabel(param) {
|
||||
return util.request({
|
||||
url: `/video/api/getTagsByPage`,
|
||||
data: param.data,
|
||||
method: 'GET',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 新增或编辑标签
|
||||
* @param {Object} param
|
||||
*/
|
||||
setLabel(param) {
|
||||
return util.request({
|
||||
url: `/video/api/saveTags`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 申请完播量
|
||||
* @param {Object} param
|
||||
|
@ -144,18 +218,6 @@ const video = {
|
|||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 首页视频分页接口
|
||||
* @param {Object} param
|
||||
*/
|
||||
homeVideo(param) {
|
||||
return util.request({
|
||||
url: `/video/video/list`,
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 我的关注视频列表
|
||||
* @param {Object} param
|
||||
|
@ -168,44 +230,6 @@ const video = {
|
|||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查看标签分类
|
||||
* @param {Object} param
|
||||
*/
|
||||
getLabel(param) {
|
||||
return util.request({
|
||||
url: `/video/tag/list`,
|
||||
query: param.query,
|
||||
method: 'GET',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 新增或编辑标签
|
||||
* @param {Object} param
|
||||
*/
|
||||
setLabel(param) {
|
||||
return util.request({
|
||||
url: `/video/tag/add`,
|
||||
query: param.query,
|
||||
method: 'POST',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 发布作品
|
||||
* @param {Object} param
|
||||
*/
|
||||
publishVideo(param) {
|
||||
return util.request({
|
||||
url: `/video/video/add`,
|
||||
data: param.data,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改视频信息接口
|
||||
* @param {Object} param
|
||||
|
@ -242,18 +266,6 @@ const video = {
|
|||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 点赞/取消点赞接口 0取消 1点赞
|
||||
* @param {Object} param
|
||||
*/
|
||||
thumbsUp(param) {
|
||||
return util.request({
|
||||
url: `/home/thumbsUp`,
|
||||
query: param.query,
|
||||
method: 'POST',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 发表评论
|
||||
* @param {Object} param
|
||||
|
|
|
@ -5,7 +5,7 @@ const config = {
|
|||
host: 'http://localhost:5173',
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
host: 'http://5310d716.r22.cpolar.top',
|
||||
host: 'http://7fee92ac.r22.cpolar.top',
|
||||
// host: 'http://192.168.1.236:8080',
|
||||
// #endif
|
||||
// 上传文件二级路径
|
||||
|
|
|
@ -1830,6 +1830,11 @@ const util = {
|
|||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 分页
|
||||
paging: {
|
||||
//
|
||||
},
|
||||
}
|
||||
|
||||
export default util
|
|
@ -201,18 +201,12 @@
|
|||
<!-- 幽灵盒子 -->
|
||||
<view class="ghost" :style="{paddingBottom: safeHeight}"></view>
|
||||
<!-- 底部导航 -->
|
||||
<view class="menuBox" :class="[subject,mode]">
|
||||
<view class="menuBox" :class="subject">
|
||||
<view class="menu">
|
||||
<view class="item" v-for="(item,index) in menu" :key="index" @click="handleMenu(item)"
|
||||
:class="{'active': item.page === page}">
|
||||
<view class="item" v-for="(item,index) in menu" :key="index" @click="handleMenu(item)">
|
||||
|
||||
<view class="side left">
|
||||
<view class="top"></view>
|
||||
<view class="bottom"></view>
|
||||
</view>
|
||||
|
||||
<view class="option" v-if="item.type == 'option'">
|
||||
<text class="text wsn">{{item.name}}</text>
|
||||
<view class="option" :class="{active: item.page === page}" v-if="item.type == 'option'">
|
||||
<text class="text">{{item.name}}</text>
|
||||
</view>
|
||||
|
||||
<view class="middle" v-else-if="item.type === 'middle'">
|
||||
|
@ -220,11 +214,6 @@
|
|||
<image class="img" src="/static/footerMenuPlus1.png" mode="aspectFit"
|
||||
v-else-if="subject == 'light'" />
|
||||
</view>
|
||||
|
||||
<view class="side right">
|
||||
<view class="top"></view>
|
||||
<view class="bottom"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="safeArea" :style="{height: safeHeight}"></view>
|
||||
|
@ -237,6 +226,7 @@
|
|||
<uni-grid :column="4" :highlight="true" :showBorder="false" @change="handleAlert">
|
||||
<uni-grid-item v-for="(item, index) in showMenu" :index="index" :key="index">
|
||||
<view class="itemBox ptb30 df fdc jcc aic tac">
|
||||
<!-- <uni-icons type="image" :size="30" color="#777" /> -->
|
||||
<image class="wh80" :src="item.img" mode="aspectFill" />
|
||||
<view class="mt5">
|
||||
<text class="text f28 c333">{{item.name}}</text>
|
||||
|
@ -273,84 +263,22 @@
|
|||
|
||||
.menu {
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 0;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
/* #ifdef APP-NVUE */
|
||||
flex-direction: row;
|
||||
/* #endif */
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
|
||||
.item {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
/* #ifdef APP-NVUE */
|
||||
flex-direction: row;
|
||||
/* #endif */
|
||||
// align-items: center;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
// border-bottom: $boderSize solid;
|
||||
|
||||
.text {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
//
|
||||
.option {
|
||||
flex: 1;
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
|
||||
//
|
||||
.side {
|
||||
/* #ifndef APP-NVUE */
|
||||
position: relative;
|
||||
/* #endif */
|
||||
width: 10rpx;
|
||||
background-color: #fff;
|
||||
opacity: 0;
|
||||
|
||||
//
|
||||
.top {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 20rpx;
|
||||
width: 10rpx;
|
||||
border-top: $boderSize solid;
|
||||
border-left: $boderSize solid;
|
||||
border-radius: 20rpx 0 0 0;
|
||||
transform: translate(10rpx, 1rpx);
|
||||
}
|
||||
|
||||
//
|
||||
.bottom {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
bottom: 0;
|
||||
width: 10rpx;
|
||||
border-right: $boderSize solid;
|
||||
border-bottom: $boderSize solid;
|
||||
border-radius: 0 0 20rpx 0;
|
||||
// transform: translateY(4rpx);
|
||||
}
|
||||
|
||||
&.right {
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
}
|
||||
|
||||
.option {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
// 黑色的
|
||||
|
@ -358,13 +286,6 @@
|
|||
border-top: 1rpx solid #999;
|
||||
background-color: #161616;
|
||||
|
||||
.item,
|
||||
.side .top,
|
||||
.side .bottom,
|
||||
.item .option {
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
.active {
|
||||
.text {
|
||||
color: #fff;
|
||||
|
@ -381,13 +302,6 @@
|
|||
box-shadow: 0px 8px 20px rgba(0, 0, 0, .3);
|
||||
background-color: #fff;
|
||||
|
||||
.item,
|
||||
.side .top,
|
||||
.side .bottom,
|
||||
.item .option {
|
||||
border-color: #999;
|
||||
}
|
||||
|
||||
.active {
|
||||
.text {
|
||||
color: #333;
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
<script setup>
|
||||
/**
|
||||
* code输入框
|
||||
*/
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
computed,
|
||||
getCurrentInstance,
|
||||
} from 'vue'
|
||||
const {
|
||||
proxy
|
||||
} = getCurrentInstance()
|
||||
//
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: String,
|
||||
}
|
||||
})
|
||||
//
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="pwd rows mt50 ptb10 plr30">
|
||||
<view class="item fmid" v-for="(item,index) in 6" :key="index">
|
||||
<text v-if="modelValue[index] != null">{{modelValue[index]}}●</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
//
|
||||
.pwd {
|
||||
|
||||
.item {
|
||||
margin: 0 10rpx;
|
||||
width: 70rpx;
|
||||
height: 80rpx;
|
||||
background-color: #f4f4f4;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -209,7 +209,6 @@
|
|||
setTimeout(() => {
|
||||
// 获取视频容器节点信息
|
||||
dom.getComponentRect(proxy.$refs.containerRef[0], (option) => {
|
||||
console.log('option', option)
|
||||
viewSize.height = option.size.height
|
||||
viewSize.width = option.size.width
|
||||
})
|
||||
|
@ -223,7 +222,9 @@
|
|||
|
||||
onHide(() => {
|
||||
// 暂停视频
|
||||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].pause()
|
||||
if (proxy.$refs[`videoRef${tabIndex.value}`]) {
|
||||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].pause()
|
||||
}
|
||||
})
|
||||
|
||||
onUnload(() => {
|
||||
|
@ -390,7 +391,7 @@
|
|||
|
||||
/**
|
||||
* 触发完成特效
|
||||
* @param {Object} mode ['complete1'|'complete2'] 需要出发的动画键
|
||||
* @param {Object} mode ['complete1'|'complete2'] 需要触发的动画键
|
||||
*/
|
||||
function handleCompleteMode(mode) {
|
||||
// 开启对应的特效
|
||||
|
@ -411,7 +412,8 @@
|
|||
// 开启计时器
|
||||
readSecond.timer = setInterval(() => {
|
||||
// 当前视频有效读秒 小于等于 最大有效读秒限制(视频最大时长-2s,设置的有效读秒上限)
|
||||
if (item.readSecond < Math.min(Math.floor(item.videoDuration) - 2, config.value.EFFECTIVE_VIDEO_TIME)) {
|
||||
if (item.readSecond < Math.min(Math.floor(item.videoDuration) - 2, config.value
|
||||
.EFFECTIVE_VIDEO_TIME)) {
|
||||
// 增加这条视频的有效读秒
|
||||
item.readSecond++
|
||||
} else {
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
})
|
||||
|
||||
onReady(() => {
|
||||
// 弹出安全键盘
|
||||
proxy.$refs.CodeKeyboard.show();
|
||||
})
|
||||
|
||||
|
@ -63,7 +64,7 @@
|
|||
...form
|
||||
}
|
||||
console.log('data', data)
|
||||
return
|
||||
// return
|
||||
|
||||
// 验证必填项
|
||||
if (!data.pwd) {
|
||||
|
@ -138,6 +139,7 @@
|
|||
* @param {Object} val
|
||||
*/
|
||||
function KeyInfo(val) {
|
||||
// 如果大于六位
|
||||
if (form[formKey.value].length >= 6) return
|
||||
// 判断是否输入的是删除键
|
||||
if (val.keyCode === 8) {
|
||||
|
|
|
@ -32,8 +32,6 @@
|
|||
description = ''
|
||||
// 话题
|
||||
tags = ''
|
||||
// at用户
|
||||
subscriber = ''
|
||||
// 视频大小
|
||||
videoSize = ''
|
||||
// 视频时长
|
||||
|
@ -175,10 +173,10 @@
|
|||
function getLabel() {
|
||||
return new Promise((resolve, reject) => {
|
||||
api.video.getLabel({
|
||||
query: {
|
||||
data: {
|
||||
pageNum: label.pageNum,
|
||||
pageSize: label.pageSize,
|
||||
tagName: labelKeyword.value,
|
||||
name: labelKeyword.value,
|
||||
}
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
|
@ -214,8 +212,8 @@
|
|||
// 添加标签
|
||||
function addLabel() {
|
||||
api.video.setLabel({
|
||||
query: {
|
||||
tagName: labelKeyword.value,
|
||||
data: {
|
||||
name: labelKeyword.value,
|
||||
}
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
|
@ -240,8 +238,12 @@
|
|||
*/
|
||||
function handleSelectLabel(ev, index) {
|
||||
// 是否包含
|
||||
const findIndex = labelSelect.findIndex(item => item.tagId == ev.tagId)
|
||||
if (findIndex < 0) labelSelect.push(ev)
|
||||
const findIndex = labelSelect.findIndex(item => item.id == ev.id)
|
||||
//
|
||||
if (findIndex < 0) {
|
||||
if (labelSelect.length >= 5) util.alert('最多上传5个')
|
||||
else labelSelect.push(ev)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -311,7 +313,7 @@
|
|||
const data = {
|
||||
...form
|
||||
}
|
||||
// let fnName = 'publishVideo'
|
||||
// let fnName = 'saveVideo'
|
||||
|
||||
// // 如果是编辑
|
||||
// if (form.videoId) {
|
||||
|
@ -344,7 +346,7 @@
|
|||
}
|
||||
// 如果有选择的标签
|
||||
if (labelSelect[0]) {
|
||||
data.tags = labelSelect.map(item => item.tagId).join(',')
|
||||
data.tags = labelSelect.map(item => item.id).join(',')
|
||||
}
|
||||
// if (userSelect[0]) {
|
||||
// data.subscriberId = userSelect.map(item => item.userId).join(',')
|
||||
|
@ -352,7 +354,7 @@
|
|||
// }
|
||||
|
||||
// 发布
|
||||
api.video.publishVideo({
|
||||
api.video.saveVideo({
|
||||
data,
|
||||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
|
@ -373,12 +375,6 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<script lang="renderjs" module="video">
|
||||
export default {
|
||||
//
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="appbw">
|
||||
<view class="form mtb30 mlr30 c666 f32">
|
||||
|
@ -420,7 +416,7 @@
|
|||
<!-- 标签 -->
|
||||
<view class="labels items mt20 df fww c333 f28" v-if="labelSelect[0]">
|
||||
<view class="item fmid mr20 mb20 plr20 bar" v-for="(item,index) in labelSelect" :key="index">
|
||||
<view class="mr10">#{{item.tagName}}</view>
|
||||
<view class="mr10">#{{item.name}}</view>
|
||||
<uni-icons type="closeempty" size="28rpx" @click="handleLabelSelectDel(item,index)" />
|
||||
</view>
|
||||
</view>
|
||||
|
@ -474,9 +470,9 @@
|
|||
<view class="selection">
|
||||
<view class="option df aic" v-for="(item,index) in label.list" :key="index"
|
||||
@click="handleSelectLabel(item,index)" :class="{
|
||||
active: labelSelect.map(node => node.tagId).includes(item.tagId)
|
||||
active: labelSelect.map(node => node.id).includes(item.id)
|
||||
}">
|
||||
<text class="thd f1">#{{item.tagName}}</text>
|
||||
<text class="thd f1">#{{item.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
@ -485,7 +481,7 @@
|
|||
<!-- 结果 -->
|
||||
<view class="reult items mt20 df fww c333 f28" v-if="labelSelect[0]">
|
||||
<view class="item fmid mr20 mb20 plr20 bar" v-for="(item,index) in labelSelect" :key="index">
|
||||
<view class="mr10">#{{item.tagName}}</view>
|
||||
<view class="mr10">#{{item.name}}</view>
|
||||
<uni-icons type="closeempty" size="28rpx" @click="handleLabelSelectDel(item,index)" />
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -365,4 +365,3 @@ call_type 通话类型 2为视频,1是音频
|
|||
释放
|
||||
|
||||
选择视频截帧
|
||||
|
||||
|
|
|
@ -15,11 +15,12 @@ export default defineConfig({
|
|||
changeOrigin: true,
|
||||
},
|
||||
"/user": {
|
||||
target: "http://192.168.1.235:8080",
|
||||
// target: "http://192.168.1.241:8080",
|
||||
target: "http://7fee92ac.r22.cpolar.top",
|
||||
changeOrigin: true,
|
||||
},
|
||||
"/coreplay": {
|
||||
target: "http://192.168.1.235:8080",
|
||||
target: "http://192.168.1.241:8080",
|
||||
changeOrigin: true,
|
||||
},
|
||||
"/file": {
|
||||
|
@ -27,7 +28,8 @@ export default defineConfig({
|
|||
changeOrigin: true,
|
||||
},
|
||||
"/video": {
|
||||
target: "http://192.168.1.235:8080",
|
||||
// target: "http://192.168.1.241:8080",
|
||||
target: "http://7fee92ac.r22.cpolar.top",
|
||||
changeOrigin: true,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue