2025.03.20 工作代码提交
This commit is contained in:
parent
95cc9a50bd
commit
2c31837f88
|
@ -11,6 +11,7 @@ const shop = {
|
|||
return util.request({
|
||||
url: `/shopify/appDeposits/settleStatus`,
|
||||
method: 'GET',
|
||||
load: true,
|
||||
})
|
||||
},
|
||||
|
||||
|
|
|
@ -6,7 +6,8 @@ const config = {
|
|||
// host: 'h5api',
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
host: 'http://91f.xyz:8080',
|
||||
// host: 'http://91f.xyz:8080',
|
||||
host: 'http://kiukjz.natappfree.cc',
|
||||
// #endif
|
||||
// 是否vivo显示
|
||||
showVivo: true,
|
||||
|
|
|
@ -182,6 +182,7 @@
|
|||
break;
|
||||
case 2:
|
||||
console.log('公开赞')
|
||||
util.isLogin().then(rs => {
|
||||
if (props.item.likeType == 0) {
|
||||
emit('like', {
|
||||
likeType: 0,
|
||||
|
@ -195,9 +196,15 @@
|
|||
isLike: 0
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/loginPhone'
|
||||
})
|
||||
})
|
||||
break;
|
||||
case 3:
|
||||
console.log('隐私赞')
|
||||
util.isLogin().then(rs => {
|
||||
if (props.item.likeType == 1) {
|
||||
emit('like', {
|
||||
likeType: 1,
|
||||
|
@ -211,6 +218,11 @@
|
|||
isLike: 0
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/loginPhone'
|
||||
})
|
||||
})
|
||||
break;
|
||||
}
|
||||
}, 200)
|
||||
|
|
|
@ -7,10 +7,11 @@
|
|||
import {
|
||||
ref,
|
||||
reactive,
|
||||
onMounted
|
||||
onMounted,
|
||||
defineModel,
|
||||
} from 'vue'
|
||||
import video from '../../api/video';
|
||||
import util from '../../common/js/util';
|
||||
// 工具库
|
||||
import util from '@/common/js/util';
|
||||
|
||||
// 传参
|
||||
const props = defineProps({
|
||||
|
@ -78,10 +79,11 @@
|
|||
}
|
||||
// 菜单模式
|
||||
else if (props.mode == 'menu') {
|
||||
videoUrl.value = item.format_videoUrl
|
||||
// videoUrl.value = item.format_videoUrl
|
||||
}
|
||||
// 多选模式
|
||||
else if (props.mode == 'checkbox') {
|
||||
console.log('handleVideo', item, ids.value)
|
||||
const findIndex = ids.value.findIndex(node => node == item.id)
|
||||
if (findIndex >= 0) ids.value.splice(findIndex, 1)
|
||||
else {
|
||||
|
|
|
@ -63,13 +63,8 @@
|
|||
mail: '',
|
||||
address: '',
|
||||
})
|
||||
// 收藏视频列表
|
||||
const collectVideoList = reactive([])
|
||||
// 收藏的视频列表id
|
||||
const collectVideoIds = computed(() => {
|
||||
let result = collectVideoList.map(node => node.videoId)
|
||||
return result
|
||||
})
|
||||
// 收藏的视频
|
||||
const collectVideo = ref({})
|
||||
// 已选择的自己的视频列表id
|
||||
const myVideoIds = reactive([])
|
||||
// 播放量
|
||||
|
@ -87,7 +82,11 @@
|
|||
return result
|
||||
})
|
||||
// 已选择的视频id
|
||||
const videoIds = computed(() => [...myVideoIds, ...collectVideoIds.value])
|
||||
const videoIds = computed(() => {
|
||||
let result = [...myVideoIds, ]
|
||||
if (collectVideo.value.id) result.push(collectVideo.value.id)
|
||||
return result
|
||||
})
|
||||
// 钱包
|
||||
const purse = computed(() => store.state.purse)
|
||||
|
||||
|
@ -110,12 +109,7 @@
|
|||
function addListener() {
|
||||
// 选择投流的收藏视频
|
||||
uni.$on('selectPushCollectVideo', (item) => {
|
||||
// 判断是否有 有的话删除 没有添加
|
||||
let findIndex = collectVideoList.findIndex(node => {
|
||||
return node.videoId == item.videoId
|
||||
})
|
||||
if (findIndex < 0) collectVideoList.push(item)
|
||||
else collectVideoList.splice(findIndex, 1)
|
||||
collectVideo.value = item
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -177,6 +171,7 @@
|
|||
|
||||
// 展示播放
|
||||
function handleShowView() {
|
||||
console.log('videoIds', videoIds.value)
|
||||
if (videoIds.value.length < 1) {
|
||||
util.alert({
|
||||
content: "请选择投流视频",
|
||||
|
@ -252,14 +247,14 @@
|
|||
content: `确认取消投流${item.title}`,
|
||||
}).then(rs => {
|
||||
if (!rs.confirm) return
|
||||
collectVideoList.splice(index, 1)
|
||||
collectVideo.value = {}
|
||||
})
|
||||
}
|
||||
|
||||
// 推流收藏视频
|
||||
function pushCollect() {
|
||||
link(util.setUrl('/pages/index/dataCenter/pushVideoCollects', {
|
||||
ids: collectVideoIds.value.join(','),
|
||||
ids: collectVideo.value.id,
|
||||
}))
|
||||
}
|
||||
|
||||
|
@ -367,21 +362,23 @@
|
|||
</view>
|
||||
|
||||
<!-- 限制只能分享别人的视频限制一个 -->
|
||||
<view class="collectList" v-if="collectVideoList[0]">
|
||||
<view class="item df mtb30" v-for="(item,index) in collectVideoList" :key="item.id">
|
||||
<view class="poster pr fs0 mr20 br20">
|
||||
<image class="image br20" :src="item.format_imageUrl" mode="aspectFill" />
|
||||
<view class="window pfull"></view>
|
||||
<view class="collectList" v-if="collectVideo.id">
|
||||
<view class="item df mtb30">
|
||||
<view class="poster oh pr fs0 mr20 br10">
|
||||
<image class="image br10" :src="collectVideo.coverUrl" mode="aspectFill" />
|
||||
<!-- <view class="window pfull br10"></view> -->
|
||||
</view>
|
||||
|
||||
<view class="f1 df jcsb fdc">
|
||||
<view class="f1">
|
||||
<view class="f38 b">{{item.title}}</view>
|
||||
<view class="mt20 c666 f28">{{item.userName}}</view>
|
||||
<view class="f38 b">{{collectVideo.title}}</view>
|
||||
<view class="mtb20 c666 f28">{{collectVideo.userNickname}}</view>
|
||||
<!-- 如果是商家发布的带链接的视频 增加显示 商家出让佣金 -->
|
||||
<view class="cFF9B27 f24" v-if="collectVideo.productId">商家出让佣金 {{collectVideo.commission}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="btn bar black w200" @click="handleCancel(item,index)">取消</view>
|
||||
<view class="btn bar black w200" @click.stop="handleCancel(collectVideo,index)">取消</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -73,11 +73,7 @@
|
|||
}).then(rs => {
|
||||
if (rs.code == 200) {
|
||||
if (list.pageNum == 1) list.data.length = []
|
||||
list.data.push(...rs.rows.map(item => {
|
||||
item.format_videoUrl = util.format_url(item.videoUrl, 'video')
|
||||
item.format_imageUrl = util.format_url(item.imageUrl, 'img')
|
||||
return item
|
||||
}))
|
||||
list.data.push(...rs.rows)
|
||||
list.total = rs.total
|
||||
|
||||
proxy.$refs.select.open()
|
||||
|
@ -90,9 +86,13 @@
|
|||
})
|
||||
}
|
||||
|
||||
// 选择视频
|
||||
/**
|
||||
* 选择视频
|
||||
* @param {Object} item 视频列表项
|
||||
*/
|
||||
function handleVideo(item) {
|
||||
uni.$emit('selectPushCollectVideo', item)
|
||||
uni.navigateBack()
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -120,7 +120,7 @@
|
|||
|
||||
<!-- 视频菜单 -->
|
||||
<scroll-view scroll-y="true" class="scroll" @scrolltolower="getMoreList">
|
||||
<videoMenu :list="list.data" v-model:ids="selectIds" mode="checkbox" @item="handleVideo" />
|
||||
<videoMenu :list="list.data" v-model:ids="selectIds" mode="menu" @item="handleVideo" :limit="1" />
|
||||
</scroll-view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
|
|
@ -175,11 +175,17 @@
|
|||
<!-- 未登录 -->
|
||||
<template v-if="!userinfo.id">
|
||||
<noLogin class="f1" />
|
||||
|
||||
<!-- 底部导航 -->
|
||||
<footerMenu ref="footerMneuRef" page="news" />
|
||||
</template>
|
||||
|
||||
<!-- 未实名 -->
|
||||
<template class="page" v-else-if="!userinfo.isRealName">
|
||||
<noAuth class="f1" />
|
||||
|
||||
<!-- 底部导航 -->
|
||||
<footerMenu ref="footerMneuRef" page="news" />
|
||||
</template>
|
||||
|
||||
<template class="page" v-else>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
Before Width: | Height: | Size: 34 KiB |
|
@ -3,7 +3,8 @@ import {
|
|||
} from 'vite';
|
||||
import uni from '@dcloudio/vite-plugin-uni';
|
||||
|
||||
let target = 'http://91f.xyz:8080'
|
||||
// let target = 'http://91f.xyz:8080'
|
||||
let target = 'http://kiukjz.natappfree.cc'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [uni()],
|
||||
|
|
Loading…
Reference in New Issue