diff --git a/jiuyi2/api/index.js b/jiuyi2/api/index.js index b2299a9f..35c47e47 100644 --- a/jiuyi2/api/index.js +++ b/jiuyi2/api/index.js @@ -100,7 +100,7 @@ const api = { }, /** - * 获取未读消息数量 + * 获取app版本信息 * @param {Object} param */ getAppVersion() { diff --git a/jiuyi2/api/video.js b/jiuyi2/api/video.js index 5559fddd..22ce7795 100644 --- a/jiuyi2/api/video.js +++ b/jiuyi2/api/video.js @@ -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 diff --git a/jiuyi2/common/js/config.js b/jiuyi2/common/js/config.js index 47ef6bd1..034b7ab1 100644 --- a/jiuyi2/common/js/config.js +++ b/jiuyi2/common/js/config.js @@ -6,9 +6,9 @@ const config = { // host: 'h5api', // #endif // #ifndef H5 - host: 'http://91f.xyz:8080', - // host: 'http://liuyd.cpolar.top', - // host: 'http://4fr983.natappfree.cc', + // host: 'http://91f.xyz:8080', + host: 'https://1e2a734e.r24.cpolar.top', + // host: 'http://puys83.natappfree.cc', // #endif // 是否vivo显示 showVivo: true, diff --git a/jiuyi2/components/index/indexVideo.vue b/jiuyi2/components/index/indexVideo.vue index da8ea610..3f788617 100644 --- a/jiuyi2/components/index/indexVideo.vue +++ b/jiuyi2/components/index/indexVideo.vue @@ -631,12 +631,15 @@ - + - + + + + - 分享 + 更多 diff --git a/jiuyi2/components/index/shareFirend.vue b/jiuyi2/components/index/shareFirend.vue index 2232ec5c..78fc5d53 100644 --- a/jiuyi2/components/index/shareFirend.vue +++ b/jiuyi2/components/index/shareFirend.vue @@ -24,11 +24,15 @@ // 视频详情 const videoItem = reactive({}) // 用户信息 - const userinfo = computed(() => { - let result = uni.$store.state.userinfo - return result - }) + const userinfo = computed(() => uni.$store.state.userinfo) + const props = defineProps({ + // 是否我自己 0不是 1是 + isMine: { + type: [String, Number], + default: 0, + }, + }) onMounted(() => { 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({ open, @@ -131,7 +158,7 @@ @@ -165,14 +199,12 @@ \ No newline at end of file diff --git a/jiuyi2/components/index/videoMenu.vue b/jiuyi2/components/index/videoMenu.vue index bd09dcb1..211a833d 100644 --- a/jiuyi2/components/index/videoMenu.vue +++ b/jiuyi2/components/index/videoMenu.vue @@ -33,7 +33,12 @@ isMine: { type: [String, Number], default: 0, - } + }, + // 是否显示统计 0不显示 1显示 + statistic: { + type: [String, Number], + default: 0, + }, }) // 子触发父 const emit = defineEmits(['item']) @@ -71,6 +76,7 @@ url: util.setUrl('/pages/index/videoDetail', { videoId: item.id, isMine: props.isMine, + statistic: props.statistic, }) }) // videoUrl.value = item.format_videoUrl diff --git a/jiuyi2/pages/index/index.nvue b/jiuyi2/pages/index/index.nvue index e7d5a35f..93f00fc0 100644 --- a/jiuyi2/pages/index/index.nvue +++ b/jiuyi2/pages/index/index.nvue @@ -230,7 +230,7 @@ }) onHide(() => { - // 上一个视频的id + // 当前视频 const videoItem = tabCurrent.value.listData()[current[tabIndex.value]] // 暂停视频 @@ -559,8 +559,10 @@ */ function handleShowCommentAlt(item) { proxy.$refs.commentRef.open(item) + // 当前视频 + const videoItem = tabCurrent.value.listData()[current[tabIndex.value]] // 暂停当前视频 - currentVideoRef.value.pause() + proxy.$refs[`videoRef${videoItem.id}`][0].pause() } /** diff --git a/jiuyi2/pages/index/videoDetail.vue b/jiuyi2/pages/index/videoDetail.vue index fabfecd3..f2ea2000 100644 --- a/jiuyi2/pages/index/videoDetail.vue +++ b/jiuyi2/pages/index/videoDetail.vue @@ -42,7 +42,7 @@ // 是否是自己 const isMine = ref(false) // 显示统计 - const statistic = ref('0') + const statistic = ref(0) // 用户信息 const userinfo = computed(() => uni.$store.state.userinfo) @@ -299,7 +299,7 @@ - + diff --git a/jiuyi2/pages/index/wallet/topUp.vue b/jiuyi2/pages/index/wallet/topUp.vue index 718e3b86..e9226c7c 100644 --- a/jiuyi2/pages/index/wallet/topUp.vue +++ b/jiuyi2/pages/index/wallet/topUp.vue @@ -30,14 +30,14 @@ return handleAlipayPay(event) } }, - // { - // img: '/static/shop-weixin-pay.png', - // name: '微信支付', - // provider: 'wxpay', - // apiRequest: (event) => { - // return handleWeChat(event) - // } - // }, + { + img: '/static/shop-weixin-pay.png', + name: '微信支付', + provider: 'wxpay', + apiRequest: (event) => { + return handleWeChat(event) + } + }, ]) // 支付列表下标 const paymentIndex = ref(0) @@ -103,11 +103,12 @@ ...form, }, }).then(rs => { + console.log('wechatPay', rs) // 唤起支付 callPayment({ response: rs, paymentParams: { - ...rs.data.msg, + orderInfo: rs.data, }, }) }) @@ -119,6 +120,10 @@ */ function callPayment(params = {}) { if (params.response.code == 200) { + console.log('requestPayment', { + provider: payment.value.provider, + ...params.paymentParams, + }) uni.requestPayment({ provider: payment.value.provider, ...params.paymentParams, @@ -143,7 +148,6 @@ - 充值金额 @@ -166,7 +170,6 @@ - diff --git a/jiuyi2/static/dislike.png b/jiuyi2/static/dislike.png index 5c622f5b..56787344 100644 Binary files a/jiuyi2/static/dislike.png and b/jiuyi2/static/dislike.png differ diff --git a/jiuyi2/vite.config.js b/jiuyi2/vite.config.js index 5fa050bd..37158381 100644 --- a/jiuyi2/vite.config.js +++ b/jiuyi2/vite.config.js @@ -3,9 +3,9 @@ import { } from 'vite'; import uni from '@dcloudio/vite-plugin-uni'; -let target = 'http://91f.xyz:8080' -// let target = 'http://liuyd.cpolar.top' -// let target = 'http://4fr983.natappfree.cc' +// let target = 'http://91f.xyz:8080' +let target = 'https://1e2a734e.r24.cpolar.top' +// let target = 'http://192.168.31.61:8080' export default defineConfig({ plugins: [uni()],