合并代码
This commit is contained in:
parent
f868a2eada
commit
c91f0f45b5
|
@ -100,7 +100,7 @@ const api = {
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取未读消息数量
|
* 获取app版本信息
|
||||||
* @param {Object} param
|
* @param {Object} param
|
||||||
*/
|
*/
|
||||||
getAppVersion() {
|
getAppVersion() {
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
|
@ -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
|
||||||
|
|
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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" />
|
||||||
<!-- 产品详情弹窗 -->
|
<!-- 产品详情弹窗 -->
|
||||||
|
|
|
@ -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 |
|
@ -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()],
|
||||||
|
|
Loading…
Reference in New Issue