合并代码

This commit is contained in:
sx 2025-04-27 09:10:38 +08:00
parent f868a2eada
commit c91f0f45b5
11 changed files with 103 additions and 35 deletions

View File

@ -100,7 +100,7 @@ const api = {
}, },
/** /**
* 获取未读消息数量 * 获取app版本信息
* @param {Object} param * @param {Object} param
*/ */
getAppVersion() { getAppVersion() {

View File

@ -52,6 +52,18 @@ const video = {
}) })
}, },
/**
* 不喜欢视频
* @param {Object} param
*/
disLike(param) {
return util.request({
url: `/video/videoDislike/disLike`,
data: param.data,
method: 'POST',
})
},
/** /**
* 观看视频记录接口 * 观看视频记录接口
* @param {Object} param * @param {Object} param

View File

@ -6,9 +6,9 @@ const config = {
// host: 'h5api', // host: 'h5api',
// #endif // #endif
// #ifndef H5 // #ifndef H5
host: 'http://91f.xyz:8080', // host: 'http://91f.xyz:8080',
// host: 'http://liuyd.cpolar.top', host: 'https://1e2a734e.r24.cpolar.top',
// host: 'http://4fr983.natappfree.cc', // host: 'http://puys83.natappfree.cc',
// #endif // #endif
// 是否vivo显示 // 是否vivo显示
showVivo: true, showVivo: true,

View File

@ -631,12 +631,15 @@
</view> </view>
</view> </view>
<!-- 分享 --> <!-- 更多 -->
<view class="item" @click="handleShareFirend"> <view class="item" @click="handleShareFirend">
<view class="col"> <view class="col">
<image class="wh50" src="@/static/indexShare.png" mode="aspectFit" /> <view class="wh50 fmid tac">
<uni-icons type="more-filled" color="#d8d8d8" size="64rpx" />
<!-- <image class="wh50" src="@/static/indexShare.png" mode="aspectFit" /> -->
</view>
<view class="txt mt10"> <view class="txt mt10">
<text class="text">分享</text> <text class="text">更多</text>
</view> </view>
</view> </view>
</view> </view>

View File

@ -24,11 +24,15 @@
// //
const videoItem = reactive({}) const videoItem = reactive({})
// //
const userinfo = computed(() => { const userinfo = computed(() => uni.$store.state.userinfo)
let result = uni.$store.state.userinfo
return result
})
const props = defineProps({
// 0 1
isMine: {
type: [String, Number],
default: 0,
},
})
onMounted(() => { onMounted(() => {
util.isLogin(() => { util.isLogin(() => {
// //
@ -121,6 +125,29 @@
}) })
} }
//
function handleDislike() {
api.video.disLike({
data: {
// id
videoId: videoItem.id,
//
userId: userinfo.value.id || '',
//
isDislike: 0,
}
}).then(rs => {
if (rs.code == 200) {
util.alert(rs.msg)
return
}
util.alert({
content: rs.msg,
showCancel: false,
})
})
}
// //
defineExpose({ defineExpose({
open, open,
@ -131,7 +158,7 @@
<template> <template>
<!-- 分享给朋友 --> <!-- 分享给朋友 -->
<uni-popup ref="firend" type="bottom"> <uni-popup ref="firend" type="bottom">
<view class="shareBox popBot df fdc plr20 bfff"> <view class="shareBox popBot df fdc plr20 pb20 bfff">
<view class="header rows fdr"> <view class="header rows fdr">
<view class="title mt40"> <view class="title mt40">
<text class="f40">分享给朋友</text> <text class="f40">分享给朋友</text>
@ -142,7 +169,7 @@
</view> </view>
</view> </view>
<view class="firendBox f1 df fdc mb30"> <view class="firendBox f1 df fdc">
<scroll-view scroll-y="true" class="scroll f1" :show-scrollbar="false"> <scroll-view scroll-y="true" class="scroll f1" :show-scrollbar="false">
<view class="list df fdr" v-if="userList[0]"> <view class="list df fdr" v-if="userList[0]">
<view class="item aic" v-for="(item,index) in userList" :key="index" @click="handleShare(item)"> <view class="item aic" v-for="(item,index) in userList" :key="index" @click="handleShare(item)">
@ -158,6 +185,13 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<view class="menu df fdr mt20" v-if="userinfo.id">
<view class="item mlr30" @click="handleDislike">
<image class="icon wh100 cir" src="/static/dislike.png" mode="aspectFit" />
<text class="text mt10 tac f24">不喜欢</text>
</view>
</view>
</view> </view>
</uni-popup> </uni-popup>
</template> </template>
@ -165,14 +199,12 @@
<style lang="scss" scoped> <style lang="scss" scoped>
// //
.shareBox { .shareBox {
height: 600rpx;
// //
.firendBox { .firendBox {
height: 100%;
.scroll { .scroll {
height: 500rpx; height: 450rpx;
// //
.list { .list {
@ -186,5 +218,15 @@
} }
} }
} }
//
.menu {
.item {
.text {
//
}
}
}
} }
</style> </style>

View File

@ -33,7 +33,12 @@
isMine: { isMine: {
type: [String, Number], type: [String, Number],
default: 0, default: 0,
} },
// 0 1
statistic: {
type: [String, Number],
default: 0,
},
}) })
// //
const emit = defineEmits(['item']) const emit = defineEmits(['item'])
@ -71,6 +76,7 @@
url: util.setUrl('/pages/index/videoDetail', { url: util.setUrl('/pages/index/videoDetail', {
videoId: item.id, videoId: item.id,
isMine: props.isMine, isMine: props.isMine,
statistic: props.statistic,
}) })
}) })
// videoUrl.value = item.format_videoUrl // videoUrl.value = item.format_videoUrl

View File

@ -230,7 +230,7 @@
}) })
onHide(() => { onHide(() => {
// 上一个视频的id // 当前视频
const videoItem = tabCurrent.value.listData()[current[tabIndex.value]] const videoItem = tabCurrent.value.listData()[current[tabIndex.value]]
// 暂停视频 // 暂停视频
@ -559,8 +559,10 @@
*/ */
function handleShowCommentAlt(item) { function handleShowCommentAlt(item) {
proxy.$refs.commentRef.open(item) proxy.$refs.commentRef.open(item)
// 当前视频
const videoItem = tabCurrent.value.listData()[current[tabIndex.value]]
// 暂停当前视频 // 暂停当前视频
currentVideoRef.value.pause() proxy.$refs[`videoRef${videoItem.id}`][0].pause()
} }
/** /**

View File

@ -42,7 +42,7 @@
// //
const isMine = ref(false) const isMine = ref(false)
// //
const statistic = ref('0') const statistic = ref(0)
// //
const userinfo = computed(() => uni.$store.state.userinfo) const userinfo = computed(() => uni.$store.state.userinfo)
@ -299,7 +299,7 @@
<!-- 评论弹窗 --> <!-- 评论弹窗 -->
<commentAlt ref="commentRef" /> <commentAlt ref="commentRef" />
<!-- 收藏弹窗 --> <!-- 收藏弹窗 -->
<collectAlt ref="collectRef" /> <collectAlt ref="collectRef" :isMine="isMine" />
<!-- 分享到好友弹窗 --> <!-- 分享到好友弹窗 -->
<shareFirendAlt ref="shareFirendRef" /> <shareFirendAlt ref="shareFirendRef" />
<!-- 产品详情弹窗 --> <!-- 产品详情弹窗 -->

View File

@ -30,14 +30,14 @@
return handleAlipayPay(event) return handleAlipayPay(event)
} }
}, },
// { {
// img: '/static/shop-weixin-pay.png', img: '/static/shop-weixin-pay.png',
// name: '', name: '微信支付',
// provider: 'wxpay', provider: 'wxpay',
// apiRequest: (event) => { apiRequest: (event) => {
// return handleWeChat(event) return handleWeChat(event)
// } }
// }, },
]) ])
// //
const paymentIndex = ref(0) const paymentIndex = ref(0)
@ -103,11 +103,12 @@
...form, ...form,
}, },
}).then(rs => { }).then(rs => {
console.log('wechatPay', rs)
// //
callPayment({ callPayment({
response: rs, response: rs,
paymentParams: { paymentParams: {
...rs.data.msg, orderInfo: rs.data,
}, },
}) })
}) })
@ -119,6 +120,10 @@
*/ */
function callPayment(params = {}) { function callPayment(params = {}) {
if (params.response.code == 200) { if (params.response.code == 200) {
console.log('requestPayment', {
provider: payment.value.provider,
...params.paymentParams,
})
uni.requestPayment({ uni.requestPayment({
provider: payment.value.provider, provider: payment.value.provider,
...params.paymentParams, ...params.paymentParams,
@ -143,7 +148,6 @@
<view class="appbw"> <view class="appbw">
<!-- --> <!-- -->
<view class="form mtb30 mlr30"> <view class="form mtb30 mlr30">
<view class="line ptb20"> <view class="line ptb20">
<view class="key f36">充值金额</view> <view class="key f36">充值金额</view>
<view class="value mt10"> <view class="value mt10">
@ -166,7 +170,6 @@
</picker> </picker>
</view> </view>
</view> </view>
</view> </view>
<view class="footer plr30 shadow bfff"> <view class="footer plr30 shadow bfff">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -3,9 +3,9 @@ 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://liuyd.cpolar.top' let target = 'https://1e2a734e.r24.cpolar.top'
// let target = 'http://4fr983.natappfree.cc' // let target = 'http://192.168.31.61:8080'
export default defineConfig({ export default defineConfig({
plugins: [uni()], plugins: [uni()],