diff --git a/jiuyi2/api/shop.js b/jiuyi2/api/shop.js index 15e3744d..1c3a3841 100644 --- a/jiuyi2/api/shop.js +++ b/jiuyi2/api/shop.js @@ -11,6 +11,7 @@ const shop = { return util.request({ url: `/shopify/appDeposits/settleStatus`, method: 'GET', + load: true, }) }, diff --git a/jiuyi2/common/js/config.js b/jiuyi2/common/js/config.js index 36cfa819..87612b31 100644 --- a/jiuyi2/common/js/config.js +++ b/jiuyi2/common/js/config.js @@ -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, diff --git a/jiuyi2/components/index/indexVideo.vue b/jiuyi2/components/index/indexVideo.vue index fae664d3..da8ea610 100644 --- a/jiuyi2/components/index/indexVideo.vue +++ b/jiuyi2/components/index/indexVideo.vue @@ -182,35 +182,47 @@ break; case 2: console.log('公开赞') - if (props.item.likeType == 0) { - emit('like', { - likeType: 0, - index: props.index, - isLike: targetLike + util.isLogin().then(rs => { + if (props.item.likeType == 0) { + emit('like', { + likeType: 0, + 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; case 3: console.log('隐私赞') - if (props.item.likeType == 1) { - emit('like', { - likeType: 1, - index: props.index, - isLike: targetLike + util.isLogin().then(rs => { + if (props.item.likeType == 1) { + emit('like', { + likeType: 1, + 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; } }, 200) diff --git a/jiuyi2/components/index/videoMenu.vue b/jiuyi2/components/index/videoMenu.vue index e60886cd..d75dab34 100644 --- a/jiuyi2/components/index/videoMenu.vue +++ b/jiuyi2/components/index/videoMenu.vue @@ -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 { diff --git a/jiuyi2/pages/index/dataCenter/push.vue b/jiuyi2/pages/index/dataCenter/push.vue index e9a7b457..b03e0697 100644 --- a/jiuyi2/pages/index/dataCenter/push.vue +++ b/jiuyi2/pages/index/dataCenter/push.vue @@ -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 @@ - - - - - + + + + + - {{item.title}} - {{item.userName}} + {{collectVideo.title}} + {{collectVideo.userNickname}} + 商家出让佣金 {{collectVideo.commission}} + - 取消 + 取消 diff --git a/jiuyi2/pages/index/dataCenter/pushVideoCollects.vue b/jiuyi2/pages/index/dataCenter/pushVideoCollects.vue index 0520cab1..27c8ade6 100644 --- a/jiuyi2/pages/index/dataCenter/pushVideoCollects.vue +++ b/jiuyi2/pages/index/dataCenter/pushVideoCollects.vue @@ -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() } @@ -120,7 +120,7 @@ - + diff --git a/jiuyi2/pages/news/news.vue b/jiuyi2/pages/news/news.vue index cb423173..a9cdf0db 100644 --- a/jiuyi2/pages/news/news.vue +++ b/jiuyi2/pages/news/news.vue @@ -175,11 +175,17 @@