From 8fd05cc702bd8446bfc135d62da4af1a0fcfb1b7 Mon Sep 17 00:00:00 2001
From: sx <2427911852@qq.com>
Date: Sat, 8 Mar 2025 09:40:51 +0800
Subject: [PATCH] =?UTF-8?q?2025.03.07=20=E5=B7=A5=E4=BD=9C=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jiuyi2/common/js/config.js | 4 +-
jiuyi2/components/index/videoMenu.vue | 265 ++++++++++++-------------
jiuyi2/pages/index/dataCenter/push.vue | 119 ++++++++---
jiuyi2/pages/release/video.vue | 23 ++-
jiuyi2/vite.config.js | 4 +-
5 files changed, 244 insertions(+), 171 deletions(-)
diff --git a/jiuyi2/common/js/config.js b/jiuyi2/common/js/config.js
index 2f0ce731..86abfcfe 100644
--- a/jiuyi2/common/js/config.js
+++ b/jiuyi2/common/js/config.js
@@ -6,8 +6,8 @@ const config = {
// host: 'h5api',
// #endif
// #ifndef H5
- host: 'http://91f.xyz:8080',
- // host: 'http://3dd3096c.r24.cpolar.top',
+ // host: 'http://91f.xyz:8080',
+ host: 'http://27380b6d.r24.cpolar.top',
// #endif
// 是否vivo显示
showVivo: true,
diff --git a/jiuyi2/components/index/videoMenu.vue b/jiuyi2/components/index/videoMenu.vue
index d38660b5..930088f2 100644
--- a/jiuyi2/components/index/videoMenu.vue
+++ b/jiuyi2/components/index/videoMenu.vue
@@ -1,138 +1,133 @@
-
+
-
+
- {{ item.play }}
+ {{item.play}}
@@ -145,37 +140,37 @@ defineExpose({
\ No newline at end of file
diff --git a/jiuyi2/pages/index/dataCenter/push.vue b/jiuyi2/pages/index/dataCenter/push.vue
index 2fb4a106..e9a7b457 100644
--- a/jiuyi2/pages/index/dataCenter/push.vue
+++ b/jiuyi2/pages/index/dataCenter/push.vue
@@ -29,15 +29,18 @@
import apex from '@/components/header/apex.vue';
// 视频菜单
import videoMenu from '@/components/index/videoMenu.vue';
+ //
+ import payPwd from '@/components/mine/payPwd.vue';
const {
proxy
} = getCurrentInstance()
const store = useStore()
- const userinfo = computed(() => store.state.userinfo)
// 榴莲果兑换播放量数量
const durainView = ref(0)
+ // 用户信息
+ const userinfo = computed(() => store.state.userinfo)
// 列表数据
const list = reactive({
data: [],
@@ -69,18 +72,24 @@
})
// 已选择的自己的视频列表id
const myVideoIds = reactive([])
+ // 播放量
+ const viewCount = ref('')
+ // 播放量消耗的榴莲果
+ const viewTotal = computed(() => {
+ let count = Number(viewCount.value) || 0
+ return count * myVideoIds.length
+ })
// 已选择的自己视频列表
const myVideos = computed(() => {
let result = myVideoIds.map(item => {
- return list.data.find(node => node.videoId == item) || {}
+ return list.data.find(node => node.id == item) || {}
})
return result
})
- // 已选择额度视频id
- const videoIds = computed(() => {
- let result = [...myVideoIds, ...collectVideoIds.value]
- return result
- })
+ // 已选择的视频id
+ const videoIds = computed(() => [...myVideoIds, ...collectVideoIds.value])
+ // 钱包
+ const purse = computed(() => store.state.purse)
onLoad(() => {
// 获取列表
@@ -89,6 +98,8 @@
addListener()
// 获取果子兑换播放量的比例
getDurainViews()
+ // 获取钱包
+ util.getPurse()
})
onUnload(() => {
@@ -131,7 +142,6 @@
// 刷新列表
function refreshList() {
list.pageNum = 1
- list.total = 0
getList()
}
@@ -165,8 +175,8 @@
})
}
- // 推送视频
- function pushVideo() {
+ // 展示播放
+ function handleShowView() {
if (videoIds.value.length < 1) {
util.alert({
content: "请选择投流视频",
@@ -174,31 +184,21 @@
})
return
}
- if (userinfo.value.fruit <= videoIds.value.length * 10) {
+ //
+ proxy.$refs.views.open()
+ }
+
+ // 推送视频
+ function pushVideo() {
+ if (purse.value.fruit <= videoIds.value.length * 10) {
util.alert({
content: "榴莲果不足",
showCancel: false,
})
return
}
-
- api.video.pushVideo({
- query: {
- ids: videoIds.value.join(','),
- }
- }).then(rs => {
- if (rs.code === 200) {
- proxy.$refs.applyRef.close()
- util.alert('申请成功,请等待后台审核')
- util.getUserinfo()
- return
- }
-
- util.alert({
- content: rs.msg,
- showCancel: false,
- })
- })
+ proxy.$refs.views.close()
+ proxy.$refs.payPwdRef.open()
}
// 完播申请
@@ -267,7 +267,39 @@
function link(path) {
uni.navigateTo({
url: path
- });
+ })
+ }
+
+ // 二级密码确认
+ function handlePwdConfirm(ev) {
+ // 榴莲果交易
+ api.durian.consume({
+ data: {
+ // 更新用户信息
+ userId: userinfo.value.id,
+ // 交易类型
+ transactionType: 5,
+ // 榴莲果交易数量
+ fruitAmount: viewTotal.value,
+ // 交易值
+ totalAmount: viewTotal.value,
+ // 二级密码
+ secondPassword: ev,
+ // 视频id
+ videoIds: videoIds.value.join(','),
+ }
+ }).then(rs => {
+ if (rs.code === 200) {
+ util.alert('申请成功,请等待后台审核')
+ util.getPurse()
+ return
+ }
+
+ util.alert({
+ content: rs.msg,
+ showCancel: false,
+ })
+ })
}
@@ -316,7 +348,7 @@
- 展示播放量
+ 展示播放量
@@ -369,6 +401,31 @@
+
+
+
+
+
+
+
+ 展示播放量
+
+
+
+
+ 消耗榴莲果投流视频/个
+
+
+
+
+
+
+ 总消耗{{viewTotal}}个榴莲果,给{{videoIds.length}}个视频投流
+
+ 推流
+
+
+
diff --git a/jiuyi2/pages/release/video.vue b/jiuyi2/pages/release/video.vue
index 1bb16ae9..897df1cb 100644
--- a/jiuyi2/pages/release/video.vue
+++ b/jiuyi2/pages/release/video.vue
@@ -454,6 +454,22 @@
form.commission = item.commission
proxy.$refs.productRef.close()
}
+
+ // 移除商品
+ function handleRemoveProduct() {
+ if (!form.productId) return
+ util.alert({
+ content: '是否清空所选商品信息',
+ }).then(rs => {
+ if (!rs.confirm) return
+ form.productId = ''
+ form.productName = ''
+ form.productPrice = ''
+ form.productImage = ''
+ form.commission = ''
+ form.popupTime = ''
+ })
+ }
@@ -534,7 +550,12 @@
- 添加商品链接
+
点击选择
diff --git a/jiuyi2/vite.config.js b/jiuyi2/vite.config.js
index e9ea6bff..de1abb5c 100644
--- a/jiuyi2/vite.config.js
+++ b/jiuyi2/vite.config.js
@@ -3,8 +3,8 @@ import {
} from 'vite';
import uni from '@dcloudio/vite-plugin-uni';
-let target = 'http://91f.xyz:8080'
-// let target = 'http://3dd3096c.r24.cpolar.tops'
+// let target = 'http://91f.xyz:8080'
+let target = 'http://27380b6d.r24.cpolar.top'
export default defineConfig({
plugins: [uni()],