This commit is contained in:
commit
0e9104f253
|
@ -6,8 +6,12 @@ const config = {
|
|||
// host: 'h5api',
|
||||
// #endif
|
||||
// #ifndef H5
|
||||
<<<<<<< HEAD
|
||||
host: 'http://91f.xyz:8080',
|
||||
// host: 'http://g8rbs6.natappfree.cc',
|
||||
=======
|
||||
host: 'http://91f.xyz:8080',
|
||||
>>>>>>> 1fb340263bba19031e365ab883932f3f4c4806e3
|
||||
// #endif
|
||||
// 支付方式配置
|
||||
payType: {
|
||||
|
|
|
@ -223,11 +223,12 @@ const util = {
|
|||
if (res.data.code == 401) {
|
||||
// 登出
|
||||
util.logout(() => {
|
||||
util.alert('请先登录')
|
||||
util.alert(res.data.msg)
|
||||
reject(res.data)
|
||||
// uni.reLaunch({
|
||||
// url: '/login/login',
|
||||
// })
|
||||
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/loginPhone',
|
||||
})
|
||||
})
|
||||
}
|
||||
// 嵌套式回调
|
||||
|
|
|
@ -1,245 +1,245 @@
|
|||
<script setup>
|
||||
/** 底部菜单导航
|
||||
* 底部导航的规则
|
||||
* 视频端显示:
|
||||
* 视频 商城 消息 我的(视频我的)
|
||||
* 商城端显示:
|
||||
* 视频 商城 消息 个人中心(商城我的)
|
||||
*/
|
||||
import {
|
||||
ref,
|
||||
computed,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
getCurrentInstance,
|
||||
reactive,
|
||||
watch,
|
||||
} from 'vue'
|
||||
import {
|
||||
onLoad,
|
||||
} from "@dcloudio/uni-app"
|
||||
// 工具库
|
||||
import util from '@/common/js/util';
|
||||
const {
|
||||
proxy
|
||||
} = getCurrentInstance()
|
||||
// 接收参数
|
||||
const props = defineProps({
|
||||
page: {
|
||||
type: String,
|
||||
},
|
||||
// 主题 dark黑色 light白色的
|
||||
subject: {
|
||||
type: String,
|
||||
default: 'light',
|
||||
},
|
||||
})
|
||||
// 用户信息
|
||||
const userinfo = computed(() => {
|
||||
let resuilt = uni.$store.state.userinfo
|
||||
return resuilt
|
||||
})
|
||||
// 展示模式 商城shop 默认default
|
||||
const mode = computed(() => uni.$store.state.tabbarMode)
|
||||
// 底部菜单
|
||||
const menu = computed(() => {
|
||||
let arr = [{
|
||||
page: 'index',
|
||||
type: 'option',
|
||||
name: '视频',
|
||||
labelType: 'default',
|
||||
pagePath: 'pages/index/index',
|
||||
},
|
||||
// {
|
||||
// page: '',
|
||||
// type: 'option',
|
||||
// name: '榴莲果',
|
||||
// pagePath: 'pages/index/durian',
|
||||
// },
|
||||
{
|
||||
page: 'shop',
|
||||
type: 'option',
|
||||
name: '商城',
|
||||
labelType: 'shop',
|
||||
pagePath: 'pages/shop/shop'
|
||||
},
|
||||
{
|
||||
type: 'middle',
|
||||
name: '',
|
||||
},
|
||||
{
|
||||
page: 'news',
|
||||
type: 'option',
|
||||
name: '消息',
|
||||
pagePath: 'pages/news/news',
|
||||
}
|
||||
]
|
||||
|
||||
switch (mode.value) {
|
||||
case 'default':
|
||||
arr.push({
|
||||
page: 'homepage',
|
||||
/** 底部菜单导航
|
||||
* 底部导航的规则
|
||||
* 视频端显示:
|
||||
* 视频 商城 消息 我的(视频我的)
|
||||
* 商城端显示:
|
||||
* 视频 商城 消息 个人中心(商城我的)
|
||||
*/
|
||||
import {
|
||||
ref,
|
||||
computed,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
getCurrentInstance,
|
||||
reactive,
|
||||
watch,
|
||||
} from 'vue'
|
||||
import {
|
||||
onLoad,
|
||||
} from "@dcloudio/uni-app"
|
||||
// 工具库
|
||||
import util from '@/common/js/util';
|
||||
const {
|
||||
proxy
|
||||
} = getCurrentInstance()
|
||||
// 接收参数
|
||||
const props = defineProps({
|
||||
page: {
|
||||
type: String,
|
||||
},
|
||||
// 主题 dark黑色 light白色的
|
||||
subject: {
|
||||
type: String,
|
||||
default: 'light',
|
||||
},
|
||||
})
|
||||
// 用户信息
|
||||
const userinfo = computed(() => {
|
||||
let resuilt = uni.$store.state.userinfo
|
||||
return resuilt
|
||||
})
|
||||
// 展示模式 商城shop 默认default
|
||||
const mode = computed(() => uni.$store.state.tabbarMode)
|
||||
// 底部菜单
|
||||
const menu = computed(() => {
|
||||
let arr = [{
|
||||
page: 'index',
|
||||
type: 'option',
|
||||
name: '我的',
|
||||
name: '视频',
|
||||
labelType: 'default',
|
||||
pagePath: 'pages/mine/homepage',
|
||||
})
|
||||
break;
|
||||
case 'shop':
|
||||
arr.push({
|
||||
page: 'mine',
|
||||
pagePath: 'pages/index/index',
|
||||
},
|
||||
// {
|
||||
// page: '',
|
||||
// type: 'option',
|
||||
// name: '榴莲果',
|
||||
// pagePath: 'pages/index/durian',
|
||||
// },
|
||||
{
|
||||
page: 'shop',
|
||||
type: 'option',
|
||||
name: '个人中心',
|
||||
name: '商城',
|
||||
labelType: 'shop',
|
||||
pagePath: 'pages/mine/mine',
|
||||
})
|
||||
break;
|
||||
}
|
||||
return arr
|
||||
})
|
||||
// 安全区高度
|
||||
let safeHeight = ref(0)
|
||||
pagePath: 'pages/shop/shop'
|
||||
},
|
||||
{
|
||||
type: 'middle',
|
||||
name: '',
|
||||
},
|
||||
{
|
||||
page: 'news',
|
||||
type: 'option',
|
||||
name: '消息',
|
||||
pagePath: 'pages/news/news',
|
||||
}
|
||||
]
|
||||
|
||||
// 弹窗菜单
|
||||
const showMenu = computed(() => {
|
||||
let result = []
|
||||
|
||||
// 验证登录
|
||||
if (userinfo.value.id) {
|
||||
result.push({
|
||||
name: '发布视频',
|
||||
img: '/static/footerMenu1.png',
|
||||
url: '/pages/release/video',
|
||||
})
|
||||
}
|
||||
// 1是商家
|
||||
// if(userinfo.value.isShop == 1) {
|
||||
// result.push({
|
||||
// name: '发布商品',
|
||||
// img: '/static/footerMenu1.png',
|
||||
// url: '/pages/release/commodity',
|
||||
// })
|
||||
// }
|
||||
// 追加
|
||||
// result.push({
|
||||
// name: '打车',
|
||||
// }, {
|
||||
// name: '充电',
|
||||
// }, {
|
||||
// name: '到店美食',
|
||||
// }, {
|
||||
// name: '出行',
|
||||
// }, {
|
||||
// name: '家政',
|
||||
// })
|
||||
return result
|
||||
})
|
||||
|
||||
// 未读数量
|
||||
const noReadNum = ref(0)
|
||||
|
||||
const getReadNum = () => {
|
||||
getNoReadNum()
|
||||
}
|
||||
|
||||
defineExpose({ getReadNum })
|
||||
|
||||
// 加载完成之后
|
||||
onMounted(() => {
|
||||
// 开启监听
|
||||
addListener()
|
||||
// 隐藏tabbar
|
||||
uni.hideTabBar()
|
||||
// 系统信息
|
||||
uni.getSystemInfo().then(rs => {
|
||||
safeHeight.value = rs.safeArea + 'px'
|
||||
})
|
||||
|
||||
//
|
||||
// proxy.$refs.alert.open()
|
||||
|
||||
})
|
||||
onLoad(() => {
|
||||
// 获取未读消息数量
|
||||
getNoReadNum()
|
||||
})
|
||||
|
||||
// 卸载
|
||||
onUnmounted(() => {
|
||||
uni.$off('changeMine')
|
||||
})
|
||||
|
||||
// 开启监听
|
||||
function addListener() {
|
||||
// 修改个人中心的状态
|
||||
uni.$on('changeMine', (value) => {
|
||||
uni.$store.commit('setState', {
|
||||
key: 'tabbarMode',
|
||||
value,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击菜单
|
||||
* @param {Object} item 当前点击的菜单项
|
||||
*/
|
||||
function handleMenu(item) {
|
||||
if (item.type != 'middle') {
|
||||
// 判断是否配置页
|
||||
if (item.page) uni.switchTab({
|
||||
url: `/${item.pagePath}`,
|
||||
})
|
||||
else uni.navigateTo({
|
||||
url: `/${item.pagePath}`,
|
||||
})
|
||||
getNoReadNum()
|
||||
return
|
||||
}
|
||||
//
|
||||
proxy.$refs.alert.open()
|
||||
}
|
||||
|
||||
/**
|
||||
* 内容
|
||||
* @param {Object} ev
|
||||
*/
|
||||
function handleAlert(ev) {
|
||||
const index = ev.detail.index
|
||||
const item = showMenu.value[index]
|
||||
// 验证
|
||||
util.isAuth({
|
||||
success: rs => {
|
||||
//
|
||||
if (item.url) {
|
||||
uni.navigateTo({
|
||||
url: item.url,
|
||||
switch (mode.value) {
|
||||
case 'default':
|
||||
arr.push({
|
||||
page: 'homepage',
|
||||
type: 'option',
|
||||
name: '我的',
|
||||
labelType: 'default',
|
||||
pagePath: 'pages/mine/homepage',
|
||||
})
|
||||
} else util.alert('敬请期待')
|
||||
break;
|
||||
case 'shop':
|
||||
arr.push({
|
||||
page: 'mine',
|
||||
type: 'option',
|
||||
name: '个人中心',
|
||||
labelType: 'shop',
|
||||
pagePath: 'pages/mine/mine',
|
||||
})
|
||||
break;
|
||||
}
|
||||
return arr
|
||||
})
|
||||
//
|
||||
proxy.$refs.alert.close()
|
||||
}
|
||||
// 安全区高度
|
||||
let safeHeight = ref(0)
|
||||
|
||||
// 获取未读消息数量
|
||||
function getNoReadNum() {
|
||||
if (userinfo.value.isRealName) {
|
||||
// 验证sdk是否准备完毕
|
||||
let isReady = uni.$chat.isReady();
|
||||
if (!isReady) {
|
||||
setTimeout(function () {
|
||||
getNoReadNum();
|
||||
}, 800);
|
||||
// 弹窗菜单
|
||||
const showMenu = computed(() => {
|
||||
let result = []
|
||||
|
||||
// 验证登录
|
||||
if (userinfo.value.id) {
|
||||
result.push({
|
||||
name: '发布视频',
|
||||
img: '/static/footerMenu1.png',
|
||||
url: '/pages/release/video',
|
||||
})
|
||||
}
|
||||
// 1是商家
|
||||
// if(userinfo.value.isShop == 1) {
|
||||
// result.push({
|
||||
// name: '发布商品',
|
||||
// img: '/static/footerMenu1.png',
|
||||
// url: '/pages/release/commodity',
|
||||
// })
|
||||
// }
|
||||
// 追加
|
||||
// result.push({
|
||||
// name: '打车',
|
||||
// }, {
|
||||
// name: '充电',
|
||||
// }, {
|
||||
// name: '到店美食',
|
||||
// }, {
|
||||
// name: '出行',
|
||||
// }, {
|
||||
// name: '家政',
|
||||
// })
|
||||
return result
|
||||
})
|
||||
|
||||
// 未读数量
|
||||
const noReadNum = ref(0)
|
||||
|
||||
const getReadNum = () => {
|
||||
getNoReadNum()
|
||||
}
|
||||
|
||||
// 加载完成之后
|
||||
onMounted(() => {
|
||||
// 开启监听
|
||||
addListener()
|
||||
// 隐藏tabbar
|
||||
uni.hideTabBar()
|
||||
// 系统信息
|
||||
uni.getSystemInfo().then(rs => {
|
||||
safeHeight.value = rs.safeArea + 'px'
|
||||
})
|
||||
// 获取未读消息数量
|
||||
getNoReadNum()
|
||||
|
||||
//
|
||||
// proxy.$refs.alert.open()
|
||||
|
||||
})
|
||||
|
||||
// 卸载
|
||||
onUnmounted(() => {
|
||||
uni.$off('changeMine')
|
||||
})
|
||||
|
||||
// 开启监听
|
||||
function addListener() {
|
||||
// 修改个人中心的状态
|
||||
uni.$on('changeMine', (value) => {
|
||||
uni.$store.commit('setState', {
|
||||
key: 'tabbarMode',
|
||||
value,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击菜单
|
||||
* @param {Object} item 当前点击的菜单项
|
||||
*/
|
||||
function handleMenu(item) {
|
||||
if (item.type != 'middle') {
|
||||
// 判断是否配置页
|
||||
if (item.page) uni.switchTab({
|
||||
url: `/${item.pagePath}`,
|
||||
})
|
||||
else uni.navigateTo({
|
||||
url: `/${item.pagePath}`,
|
||||
})
|
||||
getNoReadNum()
|
||||
return
|
||||
}
|
||||
|
||||
// #ifdef APP
|
||||
const unreadCount = uni.$chat.getTotalUnreadMessageCount();
|
||||
noReadNum.value = +unreadCount > 99 ? '99+' : unreadCount;
|
||||
// #endif
|
||||
//
|
||||
proxy.$refs.alert.open()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 内容
|
||||
* @param {Object} ev
|
||||
*/
|
||||
function handleAlert(ev) {
|
||||
const index = ev.detail.index
|
||||
const item = showMenu.value[index]
|
||||
// 验证
|
||||
util.isAuth({
|
||||
success: rs => {
|
||||
//
|
||||
if (item.url) {
|
||||
uni.navigateTo({
|
||||
url: item.url,
|
||||
})
|
||||
} else util.alert('敬请期待')
|
||||
}
|
||||
})
|
||||
//
|
||||
proxy.$refs.alert.close()
|
||||
}
|
||||
|
||||
// 获取未读消息数量
|
||||
function getNoReadNum() {
|
||||
if (userinfo.value.isRealName) {
|
||||
// 验证sdk是否准备完毕
|
||||
let isReady = uni.$chat.isReady();
|
||||
if (!isReady) {
|
||||
setTimeout(function() {
|
||||
getNoReadNum();
|
||||
}, 800);
|
||||
return
|
||||
}
|
||||
|
||||
// #ifdef APP
|
||||
const unreadCount = uni.$chat.getTotalUnreadMessageCount();
|
||||
noReadNum.value = +unreadCount > 99 ? '99+' : unreadCount;
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
getReadNum
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -252,9 +252,10 @@ function getNoReadNum() {
|
|||
|
||||
<view class="option" :class="{ active: item.page === page }" v-if="item.type == 'option'">
|
||||
<text class="text">{{ item.name }}</text>
|
||||
<view class="pot" v-if="item.page == 'news' && noReadNum != 0">{{ noReadNum }}</view>
|
||||
</view>
|
||||
|
||||
<text class="pot" v-if="item.page == 'news' && noReadNum != 0">{{ noReadNum }}</text>
|
||||
|
||||
<view class="middle" v-else-if="item.type === 'middle'">
|
||||
<image class="img" src="/static/footerMenuPlus.png" mode="aspectFit" v-if="subject == 'dark'" />
|
||||
<image class="img" src="/static/footerMenuPlus1.png" mode="aspectFit"
|
||||
|
@ -290,121 +291,129 @@ function getNoReadNum() {
|
|||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
$boderSize: 2rpx;
|
||||
$boderSize: 2rpx;
|
||||
|
||||
// 幽灵盒子
|
||||
.ghost {
|
||||
height: 120rpx;
|
||||
}
|
||||
// 幽灵盒子
|
||||
.ghost {
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
// 菜单
|
||||
.menuBox {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
/* #ifndef APP-NVUE */
|
||||
box-sizing: border-box;
|
||||
/* #endif */
|
||||
|
||||
.menu {
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 0;
|
||||
// 菜单
|
||||
.menuBox {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
/* #endif */
|
||||
/* #ifdef APP-NVUE */
|
||||
flex-direction: row;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.item {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
// 黑色的
|
||||
&.dark {
|
||||
border-top: 1rpx solid #999;
|
||||
background-color: #161616;
|
||||
|
||||
.active {
|
||||
.text {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
// 浅色的
|
||||
&.light {
|
||||
box-shadow: 0px 8px 20px rgba(0, 0, 0, .3);
|
||||
background-color: #fff;
|
||||
|
||||
.active {
|
||||
.text {
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.option {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
|
||||
.pot {
|
||||
position: absolute;
|
||||
top: -16rpx;
|
||||
right: -30rpx;
|
||||
height: 24rpx;
|
||||
.menu {
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 0;
|
||||
/* #ifndef APP-NVUE */
|
||||
min-width: 24rpx;
|
||||
display: flex;
|
||||
/* #endif */
|
||||
line-height: 24rpx;
|
||||
border-radius: 24rpx;
|
||||
/* #ifdef APP-NVUE */
|
||||
flex-direction: row;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.item {
|
||||
/* #ifndef APP-NVUE */
|
||||
position: relative;
|
||||
display: flex;
|
||||
/* #endif */
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
// 黑色的
|
||||
&.dark {
|
||||
border-top: 1rpx solid #999;
|
||||
background-color: #161616;
|
||||
|
||||
.active {
|
||||
.text {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
// 浅色的
|
||||
&.light {
|
||||
box-shadow: 0px 8px 20px rgba(0, 0, 0, .3);
|
||||
background-color: #fff;
|
||||
|
||||
.active {
|
||||
.text {
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.option {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
// 消息气泡
|
||||
.pot {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
/* #endif */
|
||||
/* #ifdef APP-NVUE */
|
||||
line-height: 28rpx;
|
||||
/* #endif */
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 5rpx;
|
||||
right: 5rpx;
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
border-radius: 100rpx;
|
||||
background: #FF6B17;
|
||||
color: #fff;
|
||||
font-size: 20rpx;
|
||||
padding: 4rpx;
|
||||
text-align: center;
|
||||
z-index: 11;
|
||||
}
|
||||
}
|
||||
|
||||
.middle {
|
||||
.img {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
.middle {
|
||||
.img {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 弹窗
|
||||
.alert {
|
||||
margin-bottom: 120rpx;
|
||||
background-color: #f8f8f8;
|
||||
border-radius: 30rpx;
|
||||
// 弹窗
|
||||
.alert {
|
||||
margin-bottom: 120rpx;
|
||||
background-color: #f8f8f8;
|
||||
border-radius: 30rpx;
|
||||
|
||||
// 滚动块
|
||||
.scroll {
|
||||
height: 350rpx;
|
||||
// 滚动块
|
||||
.scroll {
|
||||
height: 350rpx;
|
||||
}
|
||||
|
||||
//
|
||||
.itemBox {
|
||||
// padding: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
.itemBox {
|
||||
// padding: 30rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -130,13 +130,11 @@
|
|||
userId: userinfo.value.id,
|
||||
// 评论的父id
|
||||
childrenParentId: reply.id || 0,
|
||||
|
||||
}
|
||||
}).then(rs => {
|
||||
console.log('saveComment', rs)
|
||||
if (rs.code == 200) {
|
||||
proxy.$refs.comment.close()
|
||||
detail.comment++
|
||||
// 刷新列表
|
||||
refreshList()
|
||||
setTimeout(() => {
|
||||
|
@ -144,7 +142,10 @@
|
|||
content.value = ''
|
||||
}, 500)
|
||||
// 修改被评论的视频数据
|
||||
uni.$emit('updateVideo', detail)
|
||||
uni.$emit('updateVideo', {
|
||||
...detail,
|
||||
...rs.data,
|
||||
})
|
||||
return
|
||||
}
|
||||
util.alert({
|
||||
|
|
|
@ -386,11 +386,11 @@
|
|||
*/
|
||||
function handleLike(index, likeType, isLike) {
|
||||
util.isLogin().then(rs => {
|
||||
emit('like', {
|
||||
index,
|
||||
likeType,
|
||||
isLike,
|
||||
})
|
||||
emit('like', {
|
||||
index,
|
||||
likeType,
|
||||
isLike,
|
||||
})
|
||||
}).catch(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/loginPhone'
|
||||
|
@ -474,7 +474,7 @@
|
|||
if (isLong.value) return
|
||||
play()
|
||||
isLong.value = true
|
||||
videoCtx.value.playbackRate(2)
|
||||
videoCtx.value.playbackRate(1.5)
|
||||
}
|
||||
|
||||
// 前往数据中心
|
||||
|
@ -509,6 +509,7 @@
|
|||
<view class="main f1">
|
||||
<view class="videoBox f1" @touchmove.stop="" @touchstart="onTouchStart" @touchend="onTouchEnd"
|
||||
@touchcancel="onTouchCancel" @longpress="longtap">
|
||||
|
||||
<statusBar />
|
||||
|
||||
<!-- 视频 增加判断防止重复加载 -->
|
||||
|
@ -530,7 +531,7 @@
|
|||
<!-- 倍速播放提示 -->
|
||||
<view class="speedBox" v-if="isLong">
|
||||
<view class="speed ptb5 plr10">
|
||||
<text class="f22 cfff">2倍速播放中...</text>
|
||||
<text class="f22 cfff">1.5倍速播放中...</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
@ -587,7 +588,8 @@
|
|||
|
||||
<!-- 只有公开赞显示点赞数 -->
|
||||
<view class="txt mt10">
|
||||
<text class="text" v-if="item.isLike == 0 && item.likeType == 0">{{ item.likeCount }}</text>
|
||||
<text class="text"
|
||||
v-if="item.isLike == 0 && item.likeType == 0">{{ item.likeCount }}</text>
|
||||
<text class="text" v-else-if="item.isLike == 0 && item.likeType == 1">隐私赞</text>
|
||||
<text class="text" v-else>点赞</text>
|
||||
</view>
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
function getDetail() {
|
||||
api.shop.productDetail({
|
||||
query: {
|
||||
userId: userinfo.value.id,
|
||||
userId: userinfo.value.id || '',
|
||||
// 产品id
|
||||
productionId: proId.value
|
||||
}
|
||||
|
|
|
@ -360,7 +360,7 @@ function handleDate(timestamp) {
|
|||
<view class="mark pa t0 r0 cfff f22 cir" v-if="item.unreadCount">{{ item.unreadCount }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="col f1 ml20">
|
||||
<view class="col oh f1 ml20">
|
||||
<view class="rows">
|
||||
<view class="name f1 thd c333 f32">{{ item.name }}</view>
|
||||
<view class="datetime c999 f22">
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
"name" : "九亿",
|
||||
"appid" : "__UNI__08B31BC",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.8",
|
||||
"versionCode" : 1008,
|
||||
"versionName" : "1.0.9",
|
||||
"versionCode" : 1009,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
|
|
@ -747,6 +747,13 @@
|
|||
"navigationBarTitleText" : "账号解冻"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/mine/setting/privacySetting",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "隐私设置"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/mine/setting/updateAccount",
|
||||
"style": {
|
||||
|
@ -766,6 +773,7 @@
|
|||
}
|
||||
}
|
||||
],
|
||||
|
||||
"subPackages": [
|
||||
{
|
||||
"root": "TUIKit",
|
||||
|
|
|
@ -96,12 +96,12 @@
|
|||
data: [],
|
||||
pageNum: 1,
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
})
|
||||
// 关注的视频列表
|
||||
const attList = reactive({
|
||||
data: [],
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
pageNum: 1,
|
||||
total: 0,
|
||||
timer: null,
|
||||
|
@ -224,9 +224,12 @@
|
|||
})
|
||||
|
||||
onHide(() => {
|
||||
// console.log('onHide', tabIndex.value, current, proxy.$refs)
|
||||
const videoRefList = proxy.$refs[`videoRef${tabIndex.value}`]
|
||||
// 暂停视频
|
||||
if (proxy.$refs[`videoRef${tabIndex.value}`]) {
|
||||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].pause()
|
||||
if (videoRefList) {
|
||||
videoRefList[videoRefList.length - 2].pause()
|
||||
// videoRefList[current[tabIndex.value]].pause()
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -353,7 +356,7 @@
|
|||
//
|
||||
task: 0,
|
||||
}
|
||||
console.log('browseLog data', data)
|
||||
// console.log('browseLog data', data)
|
||||
//
|
||||
api.video.browseLog({
|
||||
data,
|
||||
|
@ -363,7 +366,7 @@
|
|||
const result = rs.data
|
||||
// 现在的有效读秒
|
||||
const taskValue = task.value
|
||||
console.log('browseLog result', rs, taskValue)
|
||||
// console.log('browseLog result', rs, taskValue)
|
||||
|
||||
// 如果不是第一次统计
|
||||
if (taskValue.viewingDuration != 0) {
|
||||
|
@ -452,6 +455,7 @@
|
|||
dom.scrollToElement(element, {
|
||||
animated: true
|
||||
})
|
||||
console.log('current', current[tab_index])
|
||||
|
||||
// 如果视频切换
|
||||
if (current[tab_index] != currentLast[tab_index]) {
|
||||
|
@ -802,17 +806,16 @@
|
|||
@touchend="onTouchend($event,index)" @loadmore="item.getMoreList">
|
||||
<cell class="cell" :style="[{height: viewSize.height + 'px'}]" :ref="`cellRef` + index"
|
||||
v-for="(secItem,secIndex) in item.listData()" :key="secItem.id" @click.stop>
|
||||
<!-- <template v-if="current[tabIndex] < secIndex + 2 && current[tabIndex] > secIndex - 2"> -->
|
||||
|
||||
<!-- 视频 -->
|
||||
<indexVideo :ref="'videoRef' + index" :tabIndex="index" :current="current[tabIndex]"
|
||||
:width="viewSize.width" :height="viewSize.height" :item="secItem" :index="secIndex"
|
||||
@showTime="handleShowTime" @showComment="handleShowCommentAlt"
|
||||
@showCollect="handleShowCollectAlt" @showShareFirend="handleShowShareFirend"
|
||||
@onPlay="handleVideoOnPlay" @onPause="handleVideoOnPause" @like="videoLike"
|
||||
@longtap="$refs.moreMenuRef.open(secItem)" @showFastCollect="handleShowFastCollect"
|
||||
@showProduct="handleShowProduct" @proBuy="handleProBuy" />
|
||||
<!-- </template> -->
|
||||
<template v-if="current[tabIndex] < secIndex + 2 && current[tabIndex] > secIndex - 2">
|
||||
<!-- 视频 -->
|
||||
<indexVideo :ref="'videoRef' + index" :tabIndex="index" :current="current[tabIndex]"
|
||||
:width="viewSize.width" :height="viewSize.height" :item="secItem" :index="secIndex"
|
||||
@showTime="handleShowTime" @showComment="handleShowCommentAlt"
|
||||
@showCollect="handleShowCollectAlt" @showShareFirend="handleShowShareFirend"
|
||||
@onPlay="handleVideoOnPlay" @onPause="handleVideoOnPause" @like="videoLike"
|
||||
@longtap="$refs.moreMenuRef.open(secItem)" @showFastCollect="handleShowFastCollect"
|
||||
@showProduct="handleShowProduct" @proBuy="handleProBuy" />
|
||||
</template>
|
||||
</cell>
|
||||
</list>
|
||||
</view>
|
||||
|
|
|
@ -59,15 +59,9 @@
|
|||
// 待释放列表
|
||||
const releasedLst = ref([])
|
||||
// 用户信息
|
||||
const userinfo = computed(() => {
|
||||
let result = store.state.userinfo || {}
|
||||
return result
|
||||
})
|
||||
const userinfo = computed(() => store.state.userinfo || {})
|
||||
// 我的钱包
|
||||
const wallet = computed(() => {
|
||||
let result = store.state.purse || {}
|
||||
return result
|
||||
})
|
||||
const wallet = computed(() => store.state.purse || {})
|
||||
|
||||
onLoad(() => {
|
||||
// 获取待释放
|
||||
|
@ -190,7 +184,7 @@
|
|||
<uni-icons type="right" color="" />
|
||||
</view>
|
||||
|
||||
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10">
|
||||
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" v-if="userinfo.isShop == 1">
|
||||
<text>商家明细</text>
|
||||
<uni-icons type="right" c1olor="" />
|
||||
</view>
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
<input type="text" v-model="bindItem.value" placeholder="请输入" />
|
||||
</view>
|
||||
|
||||
<view class="hint mtb30 c999 f26">请核对信息后进行绑定,因信息错误产生的问题后果自负</view>
|
||||
<view class="hint mtb30 c999 f26">免责声明:请核对信息后进行绑定,因信息错误产生问题,后果责任,由用户(您本人)自行承担。</view>
|
||||
|
||||
<view class="btn bar black mtb30" @click="handleSubmit">添加</view>
|
||||
</view>
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
<script setup>
|
||||
// 隐私设置
|
||||
import {
|
||||
ref,
|
||||
computed,
|
||||
} from 'vue'
|
||||
import {
|
||||
useStore
|
||||
} from 'vuex'
|
||||
import {
|
||||
onLoad,
|
||||
onUnload
|
||||
} from '@dcloudio/uni-app'
|
||||
// 工具库
|
||||
import util from '@/common/js/util.js'
|
||||
// api
|
||||
import api from '@/api/index.js'
|
||||
// 推荐
|
||||
const recommend = ref(false)
|
||||
|
||||
onLoad(() => {
|
||||
// 个性化推荐
|
||||
let recommendStore = uni.getStorageSync('recommendStore')
|
||||
if (recommendStore) recommend.value = recommendStore
|
||||
})
|
||||
|
||||
onUnload(() => {
|
||||
uni.setStorageSync('recommendStore', recommend.value)
|
||||
})
|
||||
|
||||
/**
|
||||
* 修改推荐
|
||||
* @param {Object} event 默认事件
|
||||
*/
|
||||
function handleRecommend(event) {
|
||||
recommend.value = event.detail.value
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="area">
|
||||
<view class="line">
|
||||
<view class="rows">
|
||||
<view class="">个性化推荐管理</view>
|
||||
<switch :checked="recommend" color="rgb(0,122,255)" style="transform:scale(0.7)"
|
||||
@change="handleRecommend" />
|
||||
</view>
|
||||
|
||||
<view class="notice mt10 c999 f28">
|
||||
<text>特别说明: 关闭个性化推荐后,您仍会收到通用内容推荐,但可能与您的兴趣关联性较低。
|
||||
我们严格遵循《个人信息保护法》,不会将您的个人信息用于未声明的其他用途。</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
//
|
||||
.area {
|
||||
margin: 30rpx;
|
||||
padding: 0 30rpx;
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
|
||||
.line {
|
||||
padding: 20rpx 10rpx;
|
||||
}
|
||||
|
||||
.line+.line {
|
||||
border-top: 1px solid #eeeeee;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -234,6 +234,11 @@ function logOff() {
|
|||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
|
||||
<view class="line rows" @click="link('/pages/mine/setting/privacySetting')">
|
||||
<view class="">隐私设置</view>
|
||||
<uni-icons type="right" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
form.commission = detail.commission
|
||||
// 商品详情
|
||||
if (detail.infoRichText) {
|
||||
form.infoRichText = JSON.parse(detail.infoRichText)
|
||||
form.infoRichText = decodeURIComponent(escape(atob(detail.infoRichText)))
|
||||
// 富文本编辑器初始化
|
||||
proxy.$refs.editorAreaRef.init(form.infoRichText)
|
||||
}
|
||||
|
@ -231,10 +231,8 @@
|
|||
// 轮播图
|
||||
data.sliderImage = data.sliderImage.join(',')
|
||||
// 商品详情
|
||||
// if (data.infoRichText) data.infoRichText = Buffer.from(data.infoRichText, 'utf8').toString('base64');
|
||||
// if (data.infoRichText) data.infoRichText = JSON.stringify(data.infoRichText)
|
||||
console.log(btoa, data.infoRichText)
|
||||
return
|
||||
if (data.infoRichText) data.infoRichText = btoa(unescape(encodeURIComponent(data.infoRichText)))
|
||||
|
||||
//
|
||||
api.shop.saveProduct({
|
||||
data,
|
||||
|
|
|
@ -94,8 +94,9 @@
|
|||
if (rs.code == 200) {
|
||||
//
|
||||
const result = rs.data
|
||||
// 商品详情
|
||||
if (result.infoRichText) {
|
||||
result.infoRichText = JSON.parse(result.infoRichText)
|
||||
result.infoRichText = decodeURIComponent(escape(atob(result.infoRichText)))
|
||||
result.infoRichText = util.imgReplace(result.infoRichText)
|
||||
}
|
||||
Object.assign(detail, {}, result)
|
||||
|
|
|
@ -236,7 +236,7 @@ defineExpose({
|
|||
</view>
|
||||
|
||||
<!-- 按钮区 -->
|
||||
<view class="btns w150">
|
||||
<view class="btns w180">
|
||||
<view>
|
||||
<view @click="handleCollectStore" class="btn sm warm fmid fdr plr30">
|
||||
<uni-icons class="mr10" color="#fff" type="plusempty" size="13" v-if="detail.isFollow != 1" />
|
||||
|
|
|
@ -4,8 +4,11 @@ import {
|
|||
import uni from '@dcloudio/vite-plugin-uni';
|
||||
|
||||
let target = 'http://91f.xyz:8080'
|
||||
<<<<<<< HEAD
|
||||
// let target = 'http://g8rbs6.natappfree.cc'
|
||||
|
||||
=======
|
||||
>>>>>>> 1fb340263bba19031e365ab883932f3f4c4806e3
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [uni()],
|
||||
|
|
Loading…
Reference in New Issue