diff --git a/jiuyi2/api/video.js b/jiuyi2/api/video.js
index 5a78ac20..d2718d85 100644
--- a/jiuyi2/api/video.js
+++ b/jiuyi2/api/video.js
@@ -85,7 +85,7 @@ const video = {
return util.request({
url: `/video/tag/add`,
// url: `/video/api/saveTags`,
- data: param.data,
+ query: param.query,
method: 'POST',
load: true,
})
diff --git a/jiuyi2/common/js/config.js b/jiuyi2/common/js/config.js
index c3ea7466..a9af306b 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://bg8fnj.natappfree.cc',
- host: 'http://79c97567.r24.cpolar.top',
+ host: 'http://91f.xyz:8080',
+ // host: 'http://ybfhhn.natappfree.cc',
+ // host: 'http://hnjcg2.natappfree.cc',
// #endif
// 支付方式配置
payType: {
diff --git a/jiuyi2/common/js/util.js b/jiuyi2/common/js/util.js
index 9e431736..6f8e03a1 100644
--- a/jiuyi2/common/js/util.js
+++ b/jiuyi2/common/js/util.js
@@ -213,7 +213,7 @@ const util = {
responseType: params.responseType || 'text',
// 请求成功返回
success: res => {
- console.log('request success', url, res, params.data ? params.data : '')
+ // console.log('request success', url, res, params.data ? params.data : '')
// 关闭加载效果
if (params.load) {
uni.hideLoading()
@@ -1426,7 +1426,7 @@ const util = {
uni.$emit('login')
setTimeout(() => {
- uni.switchTab({
+ uni.reLaunch({
url: '/pages/index/index'
})
}, 500)
diff --git a/jiuyi2/pages/index/index.nvue b/jiuyi2/pages/index/index.nvue
index 2cc3fb28..d47c4eea 100644
--- a/jiuyi2/pages/index/index.nvue
+++ b/jiuyi2/pages/index/index.nvue
@@ -139,8 +139,12 @@
onLoad(() => {
// 设备信息
const systemInfo = uni.getSystemInfoSync()
+ // 唱片高度
discOffsetTop.value = systemInfo.safeAreaInsets.top + 44 + 30
+ // 特效完成高度
complete2Top.value = systemInfo.safeAreaInsets.top + 44 + 150
+ // 获取列表
+ tabCurrent.value.getList()
// 判断是否提醒过闹铃
if (!uni.getStorageSync('alarmAlt')) {
@@ -149,16 +153,17 @@
}, 1000)
}
- // 获取列表
- tabCurrent.value.getList()
-
//
util.getMyTask()
// 监听登录
uni.$on('login', () => {
- // 获取列表
- tabCurrent.value.refreshList()
+ recList.data.length = 0
+ attList.data.length = 0
+ nextTick(() => {
+ // 获取列表
+ tabCurrent.value.refreshList()
+ })
})
// 监听登录
@@ -247,13 +252,13 @@
pageNum: attList.pageNum,
},
}).then(rs => {
- // 设置数据列表
- setList(rs, attList)
+ handleListData(rs, attList)
})
}
// 重载推荐列表
function refreshRecList() {
+ console.log('refreshRecList')
recList.pageNum = 1
recList.total = 0
getRecList()
@@ -268,6 +273,7 @@
// 获取推荐视频
function getRecList() {
+ console.log('getRecList')
// 获取首页分页视频
api.video.homeVideo({
query: {
@@ -275,48 +281,43 @@
pageSize: recList.pageSize,
}
}).then(rs => {
- console.log('getRecList then rs', rs)
- // 设置列表
- setList(rs, recList)
- }).catch(rs => {
- console.log('getRecList', rs)
+ console.log('getRecList then')
+ handleListData(rs, recList)
})
}
/**
- * 加载视频数据列表
- * @param {Object} rs 接口返回报文
- * @param {Object} obj 数据存放对象
+ * 数据列表
+ * @param {Object} rs 接口返回数据
+ * @param {Object} obj 数据对象
*/
- function setList(rs, obj) {
+ function handleListData(rs, obj) {
if (rs.code == 200) {
- // 总数
- obj.total = rs.total
- // 重新排序
- // const list = rs.rows.sort(() => Math.random() - Math.random())
- const list = rs.rows
- // 第一页清空数据
+ // 如果第一页
if (obj.pageNum == 1) obj.data.length = 0
- // 合并
- obj.data.push(...list.map(item => {
- // 初始播放时间
- item.readSecond = 0
- return item
- }))
- // console.log('result', obj.data, rs)
- // 如果有多的视频 并且当前数据为一条
- // if (obj.total > 1 && obj.data.length <= 1) getMoreRecList()
+ nextTick(() => {
+ // 总数
+ obj.total = rs.total
+ // 合并
+ obj.data.push(...rs.rows.map(item => {
+ // 初始播放时间
+ item.readSecond = 0
+ return item
+ }))
- // 延时监听播放
- setTimeout(() => {
- const pages = getCurrentPages()
- // 判断是否当前页
- if (pages[pages.length - 1].route != 'pages/index/index') {
- proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].playState.value = false
- proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].pause()
- }
- }, 500)
+ // 延时监听播放
+ setTimeout(() => {
+ const pages = getCurrentPages()
+ // 判断是否当前页
+ if (pages[pages.length - 1].route != 'pages/index/index') {
+ proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].playState.value =
+ false
+ proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].pause()
+ }
+ }, 500)
+ console.log('listdata final', rs, obj)
+ })
return
}
util.alert({
@@ -494,7 +495,7 @@
* @param {Number} index 点击的item
*/
function handle_tab(index) {
- if (tabIndex.value === index) return
+ // if (tabIndex.value === index) return
// 如果是关注 但是没有用户id
if (tab[index].name == '关注' && !userinfo.value.id) {
uni.navigateTo({
@@ -522,7 +523,7 @@
// 根据是否加载过判断 播放还是获取
if (tabCurrent.value.load && proxy.$refs[`videoRef${index}`]) proxy.$refs[`videoRef${index}`][current[index]]
.play()
- else tabCurrent.value.getList()
+ else tabCurrent.value.refreshList()
// 已加载
tab[tabIndex.value].load = true
}
diff --git a/jiuyi2/pages/index/myQrCode.vue b/jiuyi2/pages/index/myQrCode.vue
index 479b020a..a5e15c78 100644
--- a/jiuyi2/pages/index/myQrCode.vue
+++ b/jiuyi2/pages/index/myQrCode.vue
@@ -45,7 +45,7 @@
- 推荐码: {{userinfo.userRecommend}}
+ 推荐码: {{userinfo.invitationCode}}
@@ -65,6 +65,6 @@
// 按钮
.button {
- width: 310rpx;
+ min-width: 350rpx;
}
\ No newline at end of file
diff --git a/jiuyi2/pages/index/wallet/wallet.vue b/jiuyi2/pages/index/wallet/wallet.vue
index 13adbc83..983cc257 100644
--- a/jiuyi2/pages/index/wallet/wallet.vue
+++ b/jiuyi2/pages/index/wallet/wallet.vue
@@ -27,6 +27,8 @@
proxy
} = getCurrentInstance()
const store = useStore()
+ // 待入帐列表
+ const releasedList = ref([])
// 积分变动记录
const scrollLog = reactive({
data: [],
@@ -216,7 +218,8 @@
积分
-
+ 暂无更多~
+ 暂无内容~
diff --git a/jiuyi2/pages/mine/homepage.vue b/jiuyi2/pages/mine/homepage.vue
index 8966292e..da2a42cb 100644
--- a/jiuyi2/pages/mine/homepage.vue
+++ b/jiuyi2/pages/mine/homepage.vue
@@ -171,7 +171,7 @@
}
// 跳转
- function navigateToPage(path) {
+ function link(path) {
uni.navigateTo({
url: path
});
@@ -198,12 +198,20 @@
function isAuth(url) {
util.isAuth({
success() {
- uni.navigateTo({
- url,
- })
+ menuLink(url)
}
})
}
+
+ /**
+ * 菜单跳转
+ * @param {Object} url
+ */
+ function menuLink(url) {
+ link(url)
+ // 关闭弹窗
+ proxy.$refs.menuRef.close()
+ }
@@ -273,12 +281,12 @@
隐私赞
-
+
{{userinfo.userAttention}}
关注
-
+
{{userinfo.userFans}}
粉丝
@@ -288,7 +296,7 @@
{{userinfo.personalSignature || '暂无个签~'}}
-
+
@@ -355,18 +363,18 @@
-
+
账户与安全
-
-
+
+
我的钱包
-
+
-
+
+
diff --git a/jiuyi2/pages/release/commodity.vue b/jiuyi2/pages/release/commodity.vue
index e37c4ae7..58c50b2c 100644
--- a/jiuyi2/pages/release/commodity.vue
+++ b/jiuyi2/pages/release/commodity.vue
@@ -117,6 +117,16 @@
})
}
+ // 上传规格图片
+ function uploadSpecImage(item) {
+ util.upload_image({
+ type: 1,
+ success: rs => {
+ item.image = rs.value
+ }
+ })
+ }
+
/**
* 删除规格
* @param {Object} index 下标
@@ -135,13 +145,16 @@
})
}
- // 上传规格图片
- function uploadSpecImage(item) {
- util.upload_image({
- type: 1,
- success: rs => {
- item.image = rs.value
- }
+ /**
+ * 移除图片
+ * @param {Object} index
+ */
+ function removeImage(index) {
+ util.alert({
+ content: '确认删除图片?',
+ }).then(rs => {
+ if (!rs.confirm) return
+ form.sliderImage.splice(index, 1)
})
}
diff --git a/jiuyi2/pages/release/video.vue b/jiuyi2/pages/release/video.vue
index 079c10e7..ee730f20 100644
--- a/jiuyi2/pages/release/video.vue
+++ b/jiuyi2/pages/release/video.vue
@@ -237,8 +237,9 @@
// 添加标签
function addLabel() {
api.video.setLabel({
- data: {
+ query: {
tagName: labelKeyword.value,
+ status: '1',
}
}).then(rs => {
if (rs.code == 200) {
diff --git a/jiuyi2/vite.config.js b/jiuyi2/vite.config.js
index 602e0d24..78fc8379 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://bg8fnj.natappfree.cc'
-let target = 'http://79c97567.r24.cpolar.top'
+let target = 'http://91f.xyz:8080'
+// let target = 'http://ybfhhn.natappfree.cc'
+// let target = 'http://hnjcg2.natappfree.cc'
export default defineConfig({
plugins: [uni()],