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