合并代码
This commit is contained in:
parent
42ab006a83
commit
e5307207ec
|
@ -4,6 +4,7 @@
|
||||||
// vuex
|
// vuex
|
||||||
import store from '@/store/index.js'
|
import store from '@/store/index.js'
|
||||||
// import Mixins from '@/utils/Mixins.js'
|
// import Mixins from '@/utils/Mixins.js'
|
||||||
|
uni.setStorageSync('token',`eyJhbGciOiJIUzUxMiJ9.eyJhcHBVc2VyIjp7ImNyZWF0ZVRpbWUiOiIyMDI0LTEyLTMwIDE0OjUxOjEyIiwiY3JlYXRlQnkiOiIwIiwidXBkYXRlVGltZSI6IjIwMjUtMDEtMDEgMDU6MTQ6NDgiLCJ1cGRhdGVCeSI6IjAiLCJkZWxGbGFnIjoiMCIsImlkIjoiMTMiLCJ1c2VyTmFtZSI6IkppdVlp55So5oi3NzZkbHA2cTAiLCJwaG9uZU51bWJlciI6IjE1NjY2MDA2NTkyIiwiaW52aXRhdGlvbkNvZGUiOiJTd3ZKdDkwbSIsInVzZXJOaWNrbmFtZSI6IuWFrOWQq-W6mSIsInNleCI6bnVsbCwiYXZhdGFyIjpudWxsLCJiaXJ0aGRheSI6bnVsbCwiYWNjb3VudCI6Ijc2ZGxwNnEwIiwidXNlclJlYWxOYW1lIjpudWxsLCJ1c2VySWRDYXJkIjpudWxsLCJob21lVG93biI6bnVsbCwicGVyc29uYWxTaWduYXR1cmUiOm51bGwsImhhc1NlY29uZENpcGhlciI6bnVsbCwidXNlckltZWkiOiIxNzM1NTczOTk1NjQ3NzE1OTc0MCIsInVzZXJBdHRlbnRpb24iOm51bGwsInVzZXJGYW5zIjpudWxsLCJwdWJsaWNQcmFpc2VkIjpudWxsLCJwcml2YWN5UHJhaXNlZCI6bnVsbCwic2NvcmUiOjBFLTEwLCJsYXNoaW5Bd2FyZCI6MCwiZnJ1aXQiOjkzMDAsInVzZXJMaW5lU3RhdGUiOjEsImlzU2hvcCI6MCwiYmFja2dyb3VuZCI6bnVsbCwiYWNjb3VudFVwZGF0ZVRpbWUiOm51bGwsImlzUmVhbE5hbWUiOm51bGwsInJlZmVycmVyVXNlcklkIjoxfX0.nhK1AawF-ynYZ-tZ1IRvgkc5jcmVkEAyuli3z025akFFljfuK8wlz2rBGELtPvg-746G4mg1Bvgku4_MXEuzhQ`)
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// mixins: [Mixins],
|
// mixins: [Mixins],
|
||||||
|
|
|
@ -20,8 +20,8 @@ export const durian = {
|
||||||
*/
|
*/
|
||||||
buyDurianList(param) {
|
buyDurianList(param) {
|
||||||
return util.request({
|
return util.request({
|
||||||
url: `/home/getMyTree`,
|
url: `/coreplay/duriantreeinfo/boughtListByUser`,
|
||||||
method: 'post',
|
method: 'GET',
|
||||||
query: param.query,
|
query: param.query,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -125,8 +125,9 @@ export const durian = {
|
||||||
*/
|
*/
|
||||||
getMyFruitLog(param) {
|
getMyFruitLog(param) {
|
||||||
return util.request({
|
return util.request({
|
||||||
url: `/home/getMyFruitLog`,
|
url: `/duriantreeinfo`,
|
||||||
method: 'post',
|
method: 'GET',
|
||||||
|
path: param.path,
|
||||||
query: param.query,
|
query: param.query,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -80,7 +80,6 @@ const mine = {
|
||||||
selectPurse(param) {
|
selectPurse(param) {
|
||||||
return util.request({
|
return util.request({
|
||||||
url: '/user/selectPurse',
|
url: '/user/selectPurse',
|
||||||
query: param.query,
|
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -150,33 +150,9 @@ const video = {
|
||||||
*/
|
*/
|
||||||
homeVideo(param) {
|
homeVideo(param) {
|
||||||
return util.request({
|
return util.request({
|
||||||
url: `/homecommon/homeVideo`,
|
url: `/video/video/list`,
|
||||||
query: param.query,
|
query: param.query,
|
||||||
method: 'POST',
|
method: 'GET',
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商家视频分页
|
|
||||||
* @param {Object} param
|
|
||||||
*/
|
|
||||||
businessHomeVideo(param) {
|
|
||||||
return util.request({
|
|
||||||
url: `/homecommon/businessHomeVideo`,
|
|
||||||
query: param.query,
|
|
||||||
method: 'POST',
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 其它类型视频接口
|
|
||||||
* @param {Object} param
|
|
||||||
*/
|
|
||||||
otherHomeVideo(param) {
|
|
||||||
return util.request({
|
|
||||||
url: `/homecommon/otherHomeVideo`,
|
|
||||||
query: param.query,
|
|
||||||
method: 'POST',
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -198,9 +174,10 @@ const video = {
|
||||||
*/
|
*/
|
||||||
getLabel(param) {
|
getLabel(param) {
|
||||||
return util.request({
|
return util.request({
|
||||||
url: `/home/getLabel`,
|
url: `/video/tag/list`,
|
||||||
query: param.query,
|
query: param.query,
|
||||||
method: 'POST',
|
method: 'GET',
|
||||||
|
load: true,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -210,8 +187,8 @@ const video = {
|
||||||
*/
|
*/
|
||||||
setLabel(param) {
|
setLabel(param) {
|
||||||
return util.request({
|
return util.request({
|
||||||
url: `/home/setLabel`,
|
url: `/video/tag/add`,
|
||||||
data: param.data,
|
query: param.query,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
load: true,
|
load: true,
|
||||||
})
|
})
|
||||||
|
@ -223,7 +200,7 @@ const video = {
|
||||||
*/
|
*/
|
||||||
publishVideo(param) {
|
publishVideo(param) {
|
||||||
return util.request({
|
return util.request({
|
||||||
url: `/homecommon/publishVideo`,
|
url: `/video/video/add`,
|
||||||
data: param.data,
|
data: param.data,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
// 配置
|
// 配置
|
||||||
const config = {
|
const config = {
|
||||||
// 接口域名
|
// 接口域名
|
||||||
|
// #ifdef H5
|
||||||
host: 'http://localhost:5173',
|
host: 'http://localhost:5173',
|
||||||
|
// #endif
|
||||||
|
// #ifndef H5
|
||||||
|
host: 'http://192.168.1.236:8080',
|
||||||
|
// #endif
|
||||||
// 上传文件二级路径
|
// 上传文件二级路径
|
||||||
uploadFilePath: "/homecommon/file/preview?fileName=",
|
uploadFilePath: "/homecommon/file/preview?fileName=",
|
||||||
// 上传视频二级路径
|
// 上传视频二级路径
|
||||||
|
|
|
@ -92,7 +92,6 @@ const util = {
|
||||||
let token = uni.getStorageSync('token') || ''
|
let token = uni.getStorageSync('token') || ''
|
||||||
// 接口地址
|
// 接口地址
|
||||||
obj.url = obj.url ? obj.url : '/file/upload'
|
obj.url = obj.url ? obj.url : '/file/upload'
|
||||||
console.log('obj.url', obj.url)
|
|
||||||
// 文件
|
// 文件
|
||||||
obj.file = obj.file ? obj.file : ""
|
obj.file = obj.file ? obj.file : ""
|
||||||
// 附加数据
|
// 附加数据
|
||||||
|
@ -100,7 +99,7 @@ const util = {
|
||||||
// 请求头
|
// 请求头
|
||||||
obj.header = {
|
obj.header = {
|
||||||
// 'Content-Type': 'multipart/form-data; ',
|
// 'Content-Type': 'multipart/form-data; ',
|
||||||
'Content-Type': 'multipart/form-data',
|
// 'Content-Type': 'application/json;charset=UTF-8',
|
||||||
'Access-Control-Allow-Origin': '*',
|
'Access-Control-Allow-Origin': '*',
|
||||||
...obj.header,
|
...obj.header,
|
||||||
}
|
}
|
||||||
|
@ -239,7 +238,6 @@ const util = {
|
||||||
},
|
},
|
||||||
// 请求失败返回
|
// 请求失败返回
|
||||||
fail: res => {
|
fail: res => {
|
||||||
console.log('fail', res)
|
|
||||||
// 关闭加载效果
|
// 关闭加载效果
|
||||||
if (params.load) {
|
if (params.load) {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
@ -252,6 +250,7 @@ const util = {
|
||||||
reject(res)
|
reject(res)
|
||||||
},
|
},
|
||||||
complete(res) {
|
complete(res) {
|
||||||
|
// console.log('complete', url, res);
|
||||||
// 嵌套式回调
|
// 嵌套式回调
|
||||||
params.complete ? params.complete(res) : ''
|
params.complete ? params.complete(res) : ''
|
||||||
},
|
},
|
||||||
|
@ -619,16 +618,15 @@ const util = {
|
||||||
success(res) {
|
success(res) {
|
||||||
// 上传成功
|
// 上传成功
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
const result = res.data.url
|
||||||
// 补全路径赋值
|
// 补全路径赋值
|
||||||
if (obj.type == 2) {
|
if (obj.type == 2) {
|
||||||
obj.value.push(util.format_url(res.msg, 'img'))
|
obj.value.push(result)
|
||||||
} else if (obj.type == 1) {
|
} else if (obj.type == 1) {
|
||||||
obj.value = util.format_url(res.msg, 'img')
|
obj.value = result
|
||||||
}
|
}
|
||||||
console.log('obj', obj, obj.value)
|
|
||||||
obj.success && obj.success({
|
obj.success && obj.success({
|
||||||
result: res.msg,
|
value: result,
|
||||||
value: obj.value,
|
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -674,10 +672,14 @@ const util = {
|
||||||
success(res) {
|
success(res) {
|
||||||
// 上传成功
|
// 上传成功
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
const fullUrl = util.format_url(res.msg, 'video')
|
// const fullUrl = util.format_url(res.msg, 'video')
|
||||||
obj.success && obj.success({
|
obj.success && obj.success({
|
||||||
result: res.msg,
|
value: res.data.url,
|
||||||
value: fullUrl,
|
width: rs.width,
|
||||||
|
height: rs.height,
|
||||||
|
size: rs.size,
|
||||||
|
duration: rs.duration,
|
||||||
|
// value: fullUrl,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
|
@ -1783,7 +1785,25 @@ const util = {
|
||||||
util.alert('二维码扫描失败')
|
util.alert('二维码扫描失败')
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取我的钱包
|
||||||
|
getPurse() {
|
||||||
|
api.mine.selectPurse().then(rs => {
|
||||||
|
if (rs.code == 200) {
|
||||||
|
// 同步vuex
|
||||||
|
uni.$store.commit('setState', {
|
||||||
|
key: 'purse',
|
||||||
|
value: rs.data,
|
||||||
|
})
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default util
|
export default util
|
|
@ -13,6 +13,7 @@
|
||||||
onUnmounted,
|
onUnmounted,
|
||||||
getCurrentInstance,
|
getCurrentInstance,
|
||||||
reactive,
|
reactive,
|
||||||
|
watch,
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
// 工具库
|
// 工具库
|
||||||
import util from '@/common/js/util';
|
import util from '@/common/js/util';
|
||||||
|
@ -273,42 +274,6 @@
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
|
|
||||||
//
|
|
||||||
&.default {
|
|
||||||
|
|
||||||
// 激活的
|
|
||||||
.item:nth-child(2) {
|
|
||||||
border-bottom: 0;
|
|
||||||
|
|
||||||
.option {
|
|
||||||
border-top-style: solid;
|
|
||||||
border-top-width: $boderSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
.side {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
&.shop {
|
|
||||||
|
|
||||||
// 激活的
|
|
||||||
.item:nth-child(1) {
|
|
||||||
border-bottom: 0;
|
|
||||||
|
|
||||||
.option {
|
|
||||||
border-top-style: solid;
|
|
||||||
border-top-width: $boderSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
.side {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu {
|
.menu {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
/* #ifndef APP-NVUE */
|
/* #ifndef APP-NVUE */
|
||||||
|
@ -324,10 +289,13 @@
|
||||||
/* #ifndef APP-NVUE */
|
/* #ifndef APP-NVUE */
|
||||||
display: flex;
|
display: flex;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
|
/* #ifdef APP-NVUE */
|
||||||
|
flex-direction: row;
|
||||||
|
/* #endif */
|
||||||
// align-items: center;
|
// align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
border-bottom: $boderSize solid;
|
// border-bottom: $boderSize solid;
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
|
@ -345,6 +313,7 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
width: 10rpx;
|
width: 10rpx;
|
||||||
|
background-color: #fff;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -392,6 +361,13 @@
|
||||||
border-top: 1rpx solid #999;
|
border-top: 1rpx solid #999;
|
||||||
background-color: #161616;
|
background-color: #161616;
|
||||||
|
|
||||||
|
.item,
|
||||||
|
.side .top,
|
||||||
|
.side .bottom,
|
||||||
|
.item .option {
|
||||||
|
border-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
.text {
|
.text {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
})
|
})
|
||||||
|
|
||||||
// 用户信息
|
// 用户信息
|
||||||
const userinfo = computed(() => {
|
const userinfo = computed(() => {
|
||||||
let result = uni.$store.state.userinfo
|
let result = uni.$store.state.userinfo
|
||||||
|
@ -65,7 +64,6 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
play,
|
play,
|
||||||
pause,
|
pause,
|
||||||
|
@ -76,7 +74,7 @@
|
||||||
<!-- cd唱片 -->
|
<!-- cd唱片 -->
|
||||||
<view class="discBox">
|
<view class="discBox">
|
||||||
<view class="disc fmid" :style="discStyle" @click="handleDisc">
|
<view class="disc fmid" :style="discStyle" @click="handleDisc">
|
||||||
<image class="image wh100 cir" :src="userinfo.userPortrait" mode="aspectFill" />
|
<image class="image wh100 cir" :src="userinfo.avatar" mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -0,0 +1,223 @@
|
||||||
|
<script setup>
|
||||||
|
/**
|
||||||
|
* 快捷收藏弹窗
|
||||||
|
*/
|
||||||
|
import {
|
||||||
|
onMounted,
|
||||||
|
reactive,
|
||||||
|
ref,
|
||||||
|
getCurrentInstance,
|
||||||
|
defineEmits,
|
||||||
|
} from 'vue';
|
||||||
|
// api
|
||||||
|
import api from '@/api/index'
|
||||||
|
// 工具库
|
||||||
|
import util from "@/common/js/util.js"
|
||||||
|
// 收藏
|
||||||
|
import collectAdd from '@/components/index/collectAdd.vue';
|
||||||
|
|
||||||
|
const {
|
||||||
|
proxy
|
||||||
|
} = getCurrentInstance()
|
||||||
|
// 对象
|
||||||
|
const detail = ref({})
|
||||||
|
//
|
||||||
|
const position = ref({})
|
||||||
|
// 列表属性
|
||||||
|
const listProperty = reactive({
|
||||||
|
// 数据
|
||||||
|
data: [],
|
||||||
|
// 条数
|
||||||
|
pageSize: 10,
|
||||||
|
// 页码
|
||||||
|
pageNum: 1,
|
||||||
|
// 总数
|
||||||
|
total: 0,
|
||||||
|
})
|
||||||
|
// 是否激活
|
||||||
|
const active = ref(false)
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
// 开启监听
|
||||||
|
addListener()
|
||||||
|
|
||||||
|
// 验证登录
|
||||||
|
util.isLogin().then(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
// 获取列表
|
||||||
|
getList()
|
||||||
|
}, 1000)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// 开启监听
|
||||||
|
function addListener() {
|
||||||
|
uni.$on('collectsVideo', () => {
|
||||||
|
// 获取最新的收藏列表
|
||||||
|
refrshList()
|
||||||
|
})
|
||||||
|
|
||||||
|
uni.$on('login', () => {
|
||||||
|
// 获取列表
|
||||||
|
refrshList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 刷新列表
|
||||||
|
function refrshList() {
|
||||||
|
listProperty.pageNum = 1
|
||||||
|
// 获取列表
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取更多列表
|
||||||
|
function getMoreList() {
|
||||||
|
if (listProperty.total <= listProperty.data.length) return
|
||||||
|
listProperty.pageNum++
|
||||||
|
// 获取列表
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取列表
|
||||||
|
function getList() {
|
||||||
|
return
|
||||||
|
// 获取收藏列表
|
||||||
|
api.video.getCollectList({
|
||||||
|
query: {
|
||||||
|
// 私密
|
||||||
|
isPrivate: 1,
|
||||||
|
// 页码
|
||||||
|
pageNum: listProperty.pageNum,
|
||||||
|
pageSize: listProperty.pageSize,
|
||||||
|
}
|
||||||
|
}).then(rs => {
|
||||||
|
if (rs.code === 200) {
|
||||||
|
const result = rs.rows
|
||||||
|
// 如果是第一页
|
||||||
|
if (listProperty.pageNum == 1) listProperty.data.length = 0
|
||||||
|
// 追加数据
|
||||||
|
listProperty.data.push(...result.map(item => {
|
||||||
|
// 格式化封面
|
||||||
|
item.formatPic = util.format_url(item.pic, 'img')
|
||||||
|
return item
|
||||||
|
}))
|
||||||
|
// 判断是否能加载
|
||||||
|
listProperty.total = rs.total
|
||||||
|
return
|
||||||
|
}
|
||||||
|
util.alert(rs.msg)
|
||||||
|
}).finally(() => {
|
||||||
|
// 关闭加载
|
||||||
|
showLoad.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打开弹窗
|
||||||
|
* @param {Object} ev
|
||||||
|
*/
|
||||||
|
function open(ev) {
|
||||||
|
// 定位
|
||||||
|
position.value = ev.position
|
||||||
|
//
|
||||||
|
active.value = true
|
||||||
|
// 详情
|
||||||
|
detail.value = ev.item
|
||||||
|
// 打开弹窗
|
||||||
|
proxy.$refs.fastCollect.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 关闭弹窗
|
||||||
|
function close() {
|
||||||
|
active.value = false
|
||||||
|
proxy.$refs.fastCollect.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 收藏
|
||||||
|
function handleCollect(item) {
|
||||||
|
//
|
||||||
|
api.video.collectVideo({
|
||||||
|
query: {
|
||||||
|
// 视频id
|
||||||
|
videoId: detail.value.videoId,
|
||||||
|
// 收藏夹id
|
||||||
|
collectId: item.id,
|
||||||
|
isPrivate: item.isPrivate,
|
||||||
|
}
|
||||||
|
}).then(rs => {
|
||||||
|
if (rs.code == 200) {
|
||||||
|
proxy.$refs.fastCollect.close()
|
||||||
|
|
||||||
|
detail.value.isCollect = true
|
||||||
|
detail.value.collect++
|
||||||
|
uni.$emit('updateVideo', detail.value)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
defineExpose({
|
||||||
|
open,
|
||||||
|
close,
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<uni-popup ref="fastCollect" type="center" :animation="false">
|
||||||
|
<view class="collectListBox" :style="{top: position.y + 'px', right: position.x + 'px',}">
|
||||||
|
<uni-transition mode-class="slide-right" :show="active">
|
||||||
|
<scroll-view scroll-x="true" :show-scrollbar="false" class="scroll df fdr f1"
|
||||||
|
@scrolltolower="getMoreList">
|
||||||
|
<view class="list fdr plr15">
|
||||||
|
<view class="item wh70 br20" v-for="(item, index) in listProperty.data" :key="index"
|
||||||
|
@click="handleCollect(item)">
|
||||||
|
<image class="wh70 br20" :src="item.formatPic" mode="aspectFill" />
|
||||||
|
</view>
|
||||||
|
<view class="item create fmid ml15 wh70 br20" @click="$refs.collectAddRef.open()">
|
||||||
|
<uni-icons type="plusempty" color="#fff" size="40rpx" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</uni-transition>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
|
||||||
|
<!-- 新增收藏 -->
|
||||||
|
<collectAdd ref="collectAddRef" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
// 收藏列表盒子
|
||||||
|
.collectListBox {
|
||||||
|
position: fixed;
|
||||||
|
width: 300rpx;
|
||||||
|
padding: 10rpx 10rpx;
|
||||||
|
// height: 80rpx;
|
||||||
|
// width: 400rpx;
|
||||||
|
background-color: rgba(51, 51, 51, .5);
|
||||||
|
border-radius: 25rpx;
|
||||||
|
transition-property: width;
|
||||||
|
transition-duration: .5s;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
width: 300rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新建
|
||||||
|
.create {
|
||||||
|
background-color: rgba(255, 255, 255, .5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
&+.item {
|
||||||
|
margin-left: 15rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -25,10 +25,8 @@
|
||||||
import util from '@/common/js/util';
|
import util from '@/common/js/util';
|
||||||
//
|
//
|
||||||
import api from '@/api/index.js';
|
import api from '@/api/index.js';
|
||||||
|
// 视频进度条
|
||||||
// #ifdef APP-NVUE
|
import videoProgress from '@/components/index/videoProgress';
|
||||||
const dom = uni.requireNativePlugin('dom')
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
// 当前视频对象
|
// 当前视频对象
|
||||||
|
@ -56,11 +54,20 @@
|
||||||
isMine: {
|
isMine: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: 0,
|
default: 0,
|
||||||
}
|
},
|
||||||
|
width: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: Number,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
//
|
//
|
||||||
const emit = defineEmits(['showTime', 'showComment', 'showCollect', 'showShareFirend', 'onPlay', 'onPause', 'like', 'detailMenu', 'onEnd', 'longtap', 'update:item'])
|
const emit = defineEmits(['showTime', 'showComment', 'showCollect', 'showFastCollect', 'showShareFirend', 'onPlay',
|
||||||
|
'onPause', 'like', 'detailMenu', 'onEnd', 'longtap'
|
||||||
|
])
|
||||||
|
|
||||||
// 视频上下文对象
|
// 视频上下文对象
|
||||||
const videoCtx = ref(null)
|
const videoCtx = ref(null)
|
||||||
|
@ -69,19 +76,35 @@
|
||||||
// 是否显示快速收藏列表
|
// 是否显示快速收藏列表
|
||||||
const collectFirst = ref(false)
|
const collectFirst = ref(false)
|
||||||
// 视频时间
|
// 视频时间
|
||||||
const videoTime = reactive({
|
const videoTime = ref({
|
||||||
// 总长
|
// 总长
|
||||||
duration: 0,
|
duration: 0,
|
||||||
// 当前时间
|
// 当前时间
|
||||||
currentTime: 0,
|
currentTime: 0,
|
||||||
})
|
})
|
||||||
// 视频当前时间
|
// 记录点击的数组
|
||||||
let videoCurrentTime = ref(0)
|
const tapList = reactive([])
|
||||||
|
// 点击时间戳
|
||||||
|
const tapTimer = ref(null)
|
||||||
|
// 是否在计数
|
||||||
|
const isTap = ref(false)
|
||||||
|
// 长按
|
||||||
|
const isLong = ref(false)
|
||||||
|
// 收藏按钮判定
|
||||||
|
const collectBtnActive = ref(false)
|
||||||
// 设置时间
|
// 设置时间
|
||||||
const alarmTime = computed(() => {
|
const alarmTime = computed(() => {
|
||||||
let result = uni.$store.state.alarmTime
|
let result = uni.$store.state.alarmTime
|
||||||
return result
|
return result
|
||||||
})
|
})
|
||||||
|
// 填充
|
||||||
|
const fit = computed(() => {
|
||||||
|
const ratio1 = parseInt(props.width) / parseInt(props.height)
|
||||||
|
const ratio2 = props.item.breadth / props.item.height
|
||||||
|
let result = 'contain'
|
||||||
|
if (Math.abs(formatNumber(ratio2) - formatNumber(ratio1)) < 1) result = 'cover'
|
||||||
|
return result
|
||||||
|
})
|
||||||
|
|
||||||
// 挂载后调用
|
// 挂载后调用
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -89,15 +112,83 @@
|
||||||
videoCtx.value = uni.createVideoContext(`video${props.tabIndex}${props.index}`)
|
videoCtx.value = uni.createVideoContext(`video${props.tabIndex}${props.index}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
// watch(playState, (nV) => {
|
watch(() => props.current, (nV) => {
|
||||||
// if (nV) play()
|
if (nV == props.index) play()
|
||||||
// else pause()
|
else pause()
|
||||||
// })
|
})
|
||||||
|
|
||||||
/**
|
// 格式化
|
||||||
* 点击视频
|
function formatNumber(result) {
|
||||||
*/
|
result = parseFloat(result) * 10
|
||||||
function handleVideo() {
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
// 手指触摸视频容器
|
||||||
|
function onTouchStart() {
|
||||||
|
// 是否计数
|
||||||
|
if (isTap.value) {
|
||||||
|
return
|
||||||
|
tapList.length = 0
|
||||||
|
changeVideoPlay()
|
||||||
|
} else {
|
||||||
|
isTap.value = true
|
||||||
|
// 时间
|
||||||
|
let time = new Date().getTime()
|
||||||
|
tapList.push(time)
|
||||||
|
}
|
||||||
|
clearTimeout(tapTimer.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 手指离开视频容器
|
||||||
|
function onTouchEnd() {
|
||||||
|
// 取消视频倍速播放的状态
|
||||||
|
if (isLong.value) {
|
||||||
|
isLong.value = false
|
||||||
|
videoCtx.value.playbackRate(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果不是重复点击的状态
|
||||||
|
if (!isTap.value) {
|
||||||
|
isTap.value = false
|
||||||
|
|
||||||
|
let time = new Date().getTime()
|
||||||
|
let diff = time - tapList[tapList.length - 1]
|
||||||
|
|
||||||
|
// 判断长按
|
||||||
|
if (diff > 350) return
|
||||||
|
//
|
||||||
|
tapTimer.value = setTimeout(() => {
|
||||||
|
// 是否点赞
|
||||||
|
const isLike = props.item.isLike
|
||||||
|
|
||||||
|
let a = tapList.length
|
||||||
|
tapList.length = 0
|
||||||
|
|
||||||
|
switch (a) {
|
||||||
|
case 0:
|
||||||
|
changeVideoPlay()
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
console.log('公开赞')
|
||||||
|
emit('like', {
|
||||||
|
index: props.index,
|
||||||
|
isLike: isLike == 0 ? 0 : 1
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
console.log('隐私赞')
|
||||||
|
emit('like', {
|
||||||
|
index: props.index,
|
||||||
|
isLike: isLike == 0 ? 3 : 1
|
||||||
|
})
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}, 200)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 切换视频播放
|
||||||
|
function changeVideoPlay() {
|
||||||
// 根据播放状态切换播放暂停
|
// 根据播放状态切换播放暂停
|
||||||
if (playState.value) pause()
|
if (playState.value) pause()
|
||||||
else play()
|
else play()
|
||||||
|
@ -150,9 +241,93 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// 切换快速收藏
|
// 切换快速收藏
|
||||||
function handleCollectFirst() {
|
function handleCollectFirst(ev) {
|
||||||
|
// 获取当前元素的宽高
|
||||||
|
const changedTouches = ev.changedTouches[0]
|
||||||
|
let x = getNumber(props.width) - getNumber(changedTouches.screenX) + getNumber(changedTouches.pageX)
|
||||||
|
let y = getNumber(changedTouches.screenY) - getNumber(changedTouches.pageY)
|
||||||
|
|
||||||
|
emit('showFastCollect', {
|
||||||
|
item: props.item,
|
||||||
|
position: {
|
||||||
|
x,
|
||||||
|
y,
|
||||||
|
}
|
||||||
|
})
|
||||||
return
|
return
|
||||||
collectFirst.value = !collectFirst.value
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手指触摸收藏
|
||||||
|
* @param {Object} ev
|
||||||
|
*/
|
||||||
|
function handleCollectStar(ev) {
|
||||||
|
collectBtnActive.value = true
|
||||||
|
|
||||||
|
util.isLogin().then(rs => {
|
||||||
|
//
|
||||||
|
setTimeout(() => {
|
||||||
|
// 判断是否抬起
|
||||||
|
if (!collectBtnActive.value) {
|
||||||
|
// 收藏状态
|
||||||
|
if (!props.item.isCollect) {
|
||||||
|
// 单击出菜单
|
||||||
|
handleCollectFirst(ev)
|
||||||
|
return
|
||||||
|
} else cancelCollect()
|
||||||
|
} else {
|
||||||
|
setTimeout(() => {
|
||||||
|
// 长按出弹窗
|
||||||
|
showCollect()
|
||||||
|
}, 350)
|
||||||
|
}
|
||||||
|
}, 350)
|
||||||
|
}).catch(() => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/login/loginPhone'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手指触摸结束
|
||||||
|
* @param {Object} str
|
||||||
|
*/
|
||||||
|
function handleCollectEnd() {
|
||||||
|
collectBtnActive.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取数字
|
||||||
|
function getNumber(str) {
|
||||||
|
let result = Math.floor(Number(str))
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
// 取消收藏
|
||||||
|
function cancelCollect() {
|
||||||
|
const detail = {
|
||||||
|
...props.item
|
||||||
|
}
|
||||||
|
|
||||||
|
// 取消收藏
|
||||||
|
api.video.cancelCollect({
|
||||||
|
query: {
|
||||||
|
// 视频id
|
||||||
|
videoId: detail.videoId,
|
||||||
|
},
|
||||||
|
}).then(rs => {
|
||||||
|
if (rs.code == 200) {
|
||||||
|
detail.isCollect = false
|
||||||
|
detail.collect--
|
||||||
|
uni.$emit('updateVideo', detail)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 分享到好友
|
// 分享到好友
|
||||||
|
@ -172,7 +347,6 @@
|
||||||
* @param {Number|String} isLike 点赞操作
|
* @param {Number|String} isLike 点赞操作
|
||||||
*/
|
*/
|
||||||
function handleLike(index, isLike) {
|
function handleLike(index, isLike) {
|
||||||
console.log('index', index)
|
|
||||||
util.isLogin().then(rs => {
|
util.isLogin().then(rs => {
|
||||||
emit('like', {
|
emit('like', {
|
||||||
index,
|
index,
|
||||||
|
@ -223,35 +397,15 @@
|
||||||
|
|
||||||
// 播放变化
|
// 播放变化
|
||||||
function handleTimeupdate(ev) {
|
function handleTimeupdate(ev) {
|
||||||
Object.assign(videoTime, ev.detail)
|
videoTime.value = ev.detail
|
||||||
|
// console.log('videoTime.value', videoTime.value)
|
||||||
// 视频播放时长
|
|
||||||
if (videoTime.duration != 0) videoCurrentTime.value = videoTime.currentTime / videoTime.duration * 750
|
|
||||||
// console.log('update:item', {
|
|
||||||
// ...props.item,
|
|
||||||
// videoTime: videoTime,
|
|
||||||
// videoCurrentTime: videoCurrentTime.value,
|
|
||||||
// })
|
|
||||||
//
|
|
||||||
emit('update:item', {
|
|
||||||
...props.item,
|
|
||||||
videoTime: videoTime,
|
|
||||||
videoCurrentTime: videoCurrentTime.value,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 视频播放结束
|
// 进度条拖拽结束
|
||||||
function handleEnded() {
|
function onProgressEnd(ev) {
|
||||||
videoCurrentTime.value = 750
|
videoCtx.value.seek(parseInt(ev.time))
|
||||||
videoCtx.value.stop()
|
|
||||||
setTimeout(() => {
|
|
||||||
if (props.index == props.current) play()
|
|
||||||
else pause()
|
|
||||||
}, 750)
|
|
||||||
// console.log('handleEnded', props.index, props.current)
|
|
||||||
// play()
|
|
||||||
emit('onEnd')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查看用户主页
|
* 查看用户主页
|
||||||
* @param {Object} item
|
* @param {Object} item
|
||||||
|
@ -272,7 +426,9 @@
|
||||||
|
|
||||||
// 长按
|
// 长按
|
||||||
function longtap(ev) {
|
function longtap(ev) {
|
||||||
emit('longtap')
|
if (isLong.value) return
|
||||||
|
isLong.value = true
|
||||||
|
videoCtx.value.playbackRate(2)
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -287,20 +443,24 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="f1 pr" ref="videoBoxRef">
|
<view class="container f1 pr" ref="videoBoxRef">
|
||||||
<!-- 视频层 -->
|
<!-- 视频层 -->
|
||||||
<view class="videoBox pfull" @longpress="longtap" @touchmove.stop="">
|
<view class="main f1">
|
||||||
|
<view class="videoBox f1" @touchmove.stop="" @touchstart="onTouchStart" @touchend="onTouchEnd"
|
||||||
|
@touchcancel="onTouchEnd" @longpress="longtap">
|
||||||
<statusBar />
|
<statusBar />
|
||||||
|
|
||||||
<video class="video f1" :id="'video' + tabIndex + index" :src="item.format_videoUrl" :show-fullscreen-btn="false" :enable-progress-gesture="false" controls="false" @click="handleVideo" @play="onVideoPlay" @pause="onVideoPause" :show-center-play-btn="false" @timeupdate="handleTimeupdate" @ended="handleEnded" @waiting="handleWaiting" :play-strategy="2" />
|
<video class="video f1" :id="'video' + tabIndex + index" :src="item.videoUrl" :poster="item.coverUrl"
|
||||||
|
:http-cache="true" :show-fullscreen-btn="false" :enable-progress-gesture="false" :controls="false"
|
||||||
|
@play="onVideoPlay" @pause="onVideoPause" :show-center-play-btn="false"
|
||||||
|
@timeupdate="handleTimeupdate" @waiting="handleWaiting" :play-strategy="2" :loop="true"
|
||||||
|
:object-fit="fit" />
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 视频进度条 -->
|
<!-- 视频进度条 -->
|
||||||
<!-- <videoProgress v-model:progress="videoCurrentTime" /> -->
|
<view class="videoProgress" @touchmove.stop="" @touchstart.stop="" @touchend.stop="">
|
||||||
|
<videoProgress :time="videoTime" @change="onProgressEnd" :viewWidth="width" />
|
||||||
<!-- 视频时长 -->
|
</view>
|
||||||
<!-- <view class="duration">
|
|
||||||
<view class="line" :style="{ width: videoCurrentTime + 'rpx' }"></view>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 暂停蒙版 -->
|
<!-- 暂停蒙版 -->
|
||||||
|
@ -317,12 +477,6 @@
|
||||||
|
|
||||||
<!-- 操作台 -->
|
<!-- 操作台 -->
|
||||||
<view class="operate f1">
|
<view class="operate f1">
|
||||||
<view class="item">
|
|
||||||
<view class="col">
|
|
||||||
<image class="wh60" src="@/static/statistics.jpg" mode="aspectFit" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 用户头像 -->
|
<!-- 用户头像 -->
|
||||||
<navigator :url="util.setUrl('/pages/index/videoHome',{userId:item.userId})" class="item pr mb10">
|
<navigator :url="util.setUrl('/pages/index/videoHome',{userId:item.userId})" class="item pr mb10">
|
||||||
<view class="col">
|
<view class="col">
|
||||||
|
@ -337,10 +491,13 @@
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="col">
|
<view class="col">
|
||||||
<view class="pr">
|
<view class="pr">
|
||||||
<image class="wh50" src="/static/indexLike.png" mode="aspectFit" v-if="item.isLike == 0" @click="handleLike(index, 0)" @longpress="handlePrivateLike(index)" />
|
<image class="wh50" src="/static/indexLike.png" mode="aspectFit" v-if="item.isLike == 0"
|
||||||
<image class="wh50" src="/static/indexLike1.png" mode="aspectFit" v-else-if="item.isLike == 1" @click="handleLike(index, 0)" />
|
@click="handleLike(index, 0)" @longpress="handlePrivateLike(index)" />
|
||||||
|
<image class="wh50" src="/static/indexLike1.png" mode="aspectFit"
|
||||||
|
v-else-if="item.isLike == 1" @click="handleLike(index, 1)" />
|
||||||
<!-- 私密赞的图标 -->
|
<!-- 私密赞的图标 -->
|
||||||
<image class="wh50" src="/static/privateLike.png" mode="aspectFit" v-else-if="item.isLike == 3" @click="handleLike(index, 0)" />
|
<image class="wh50" src="/static/privateLike.png" mode="aspectFit"
|
||||||
|
v-else-if="item.isLike == 3" @click="handleLike(index, 1)" />
|
||||||
</view>
|
</view>
|
||||||
<view class="txt mt10">
|
<view class="txt mt10">
|
||||||
<text class="text">{{ item.likes }}</text>
|
<text class="text">{{ item.likes }}</text>
|
||||||
|
@ -360,18 +517,9 @@
|
||||||
|
|
||||||
<!-- 收藏 -->
|
<!-- 收藏 -->
|
||||||
<view class="item df fdr">
|
<view class="item df fdr">
|
||||||
<view class="collectListBox" :class="{ 'active': collectFirst }">
|
<view class="col" @touchstart="handleCollectStar" @touchend="handleCollectEnd" ref="collectBtn">
|
||||||
<scroll-view scroll-x="true" :show-scrollbar="false" class="scroll df fdr">
|
<image class="wh50" src="@/static/indexCollect1.png" mode="aspectFit"
|
||||||
<view class="list fdr plr15">
|
v-if="item.isCollect" />
|
||||||
<template v-for="(item, index) in 5" :key="index">
|
|
||||||
<image class="li wh70 br20" src="/static/openPage.png" mode="aspectFill" />
|
|
||||||
</template>
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="col" @click="showCollect" @longpress="handleCollectFirst">
|
|
||||||
<image class="wh50" src="@/static/indexCollect1.png" mode="aspectFit" v-if="item.isCollect" />
|
|
||||||
<image class="wh50" src="@/static/indexCollect.png" mode="aspectFit" v-else />
|
<image class="wh50" src="@/static/indexCollect.png" mode="aspectFit" v-else />
|
||||||
<view class="txt mt10">
|
<view class="txt mt10">
|
||||||
<text class="text">{{ item.collect }}</text>
|
<text class="text">{{ item.collect }}</text>
|
||||||
|
@ -439,9 +587,9 @@
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
// 视频盒子
|
// 视频盒子
|
||||||
.videoBox {
|
.container {
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -528,22 +676,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 收藏列表盒子
|
//
|
||||||
.collectListBox {
|
.videoProgress {
|
||||||
justify-content: center;
|
position: absolute;
|
||||||
width: 0;
|
left: 0;
|
||||||
background-color: rgba(51, 51, 51, .5);
|
right: 0;
|
||||||
border-radius: 25rpx;
|
bottom: 0;
|
||||||
transition-property: width;
|
|
||||||
transition-duration: .3s;
|
|
||||||
|
|
||||||
// 激活的
|
|
||||||
&.active {
|
|
||||||
width: 300rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.li+.li {
|
|
||||||
margin-left: 15rpx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -0,0 +1,77 @@
|
||||||
|
<script setup>
|
||||||
|
/**
|
||||||
|
* 青少年模式
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
import {
|
||||||
|
ref,
|
||||||
|
getCurrentInstance,
|
||||||
|
defineEmits,
|
||||||
|
} from 'vue'
|
||||||
|
|
||||||
|
const {
|
||||||
|
proxy
|
||||||
|
} = getCurrentInstance()
|
||||||
|
const emit = defineEmits(['setting'])
|
||||||
|
|
||||||
|
function open() {
|
||||||
|
proxy.$refs.teen.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
function close() {
|
||||||
|
proxy.$refs.teen.close()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleSetting() {
|
||||||
|
proxy.$refs.teen.close()
|
||||||
|
emit('setting')
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
defineExpose({
|
||||||
|
open,
|
||||||
|
close,
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<uni-popup ref="teen" type="bottom">
|
||||||
|
<view class="teenAlt popBot ptb30 bfff">
|
||||||
|
<view class="close">
|
||||||
|
<uni-icons type="closeempty" @click="close()" size="40rpx" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="main mlr30">
|
||||||
|
<text class="txt c333 f34">为呵护未成年人健康成长,九亿推出青少年模式。该模式下设置闹铃限制观看时间,请监护人主动设置。</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="button btn black mt60 mb30">
|
||||||
|
<text class="txt tac cfff" @click="handleSetting">设置</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
//
|
||||||
|
.close {
|
||||||
|
position: absolute;
|
||||||
|
top: 20rpx;
|
||||||
|
left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main {
|
||||||
|
margin-top: 120rpx;
|
||||||
|
|
||||||
|
.txt {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 按钮
|
||||||
|
.button {
|
||||||
|
margin: 0 120rpx;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -4,58 +4,141 @@
|
||||||
*/
|
*/
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
|
computed,
|
||||||
defineEmits,
|
defineEmits,
|
||||||
|
onMounted,
|
||||||
|
getCurrentInstance,
|
||||||
|
watch,
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
|
||||||
// 接收
|
// 接收
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
progress: {
|
time: {
|
||||||
type: [Number, String],
|
|
||||||
default: 0,
|
|
||||||
},
|
|
||||||
item: {
|
|
||||||
type: Object,
|
type: Object,
|
||||||
|
default: {
|
||||||
|
duration: 0,
|
||||||
|
currentTime: 0,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
// 组件宽度
|
||||||
|
viewWidth: {
|
||||||
|
type: Number
|
||||||
|
}
|
||||||
|
})
|
||||||
|
watch(props.time, (nV, oV) => {
|
||||||
|
console.log('time', nV, oV)
|
||||||
|
}, {
|
||||||
|
deep: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
// 触发
|
// 触发
|
||||||
const emit = defineEmits(['change', 'end'])
|
const emit = defineEmits(['change', 'end'])
|
||||||
|
//
|
||||||
|
const {
|
||||||
|
proxy
|
||||||
|
} = getCurrentInstance()
|
||||||
// 拖拽开关
|
// 拖拽开关
|
||||||
const trigger = ref(false)
|
const trigger = ref(false)
|
||||||
|
// 视频播放时间
|
||||||
|
const videoTime = ref(0)
|
||||||
|
// 视频进度
|
||||||
|
const videoProgress = ref(0)
|
||||||
|
// 视频当前
|
||||||
|
const videoCurrent = computed(() => {
|
||||||
|
let result = formatNum(props.time.currentTime)
|
||||||
|
if (trigger.value) result = videoTime.value
|
||||||
|
return result
|
||||||
|
})
|
||||||
|
// 进度条长度
|
||||||
|
const progress = computed(() => {
|
||||||
|
let result = 0
|
||||||
|
if (!trigger.value) {
|
||||||
|
const duration = formatNum(props.time.duration)
|
||||||
|
if (duration != 0) result = formatNum(props.time.currentTime) / duration * props.viewWidth
|
||||||
|
result = formatNum(result)
|
||||||
|
} else {
|
||||||
|
result = videoProgress.value
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
})
|
||||||
|
// 格式化视频时长
|
||||||
|
const formatDuration = computed(() => {
|
||||||
|
let result = formatNum(props.time.duration).toFixed(2)
|
||||||
|
return result
|
||||||
|
})
|
||||||
|
|
||||||
|
// 格式化数字
|
||||||
|
function formatNum(num) {
|
||||||
|
let result = Number.parseFloat(num).toFixed(2)
|
||||||
|
return Number.parseFloat(result)
|
||||||
|
}
|
||||||
|
|
||||||
// 开始触摸
|
// 开始触摸
|
||||||
function onStart() {
|
function onStart() {
|
||||||
//
|
trigger.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 触摸移动
|
// 触摸移动
|
||||||
function onMove(ev) {
|
function onMove(ev) {
|
||||||
// console.log('move', ev)
|
// 横轴移动像素
|
||||||
|
const time = formatNum(ev.changedTouches[0].screenX)
|
||||||
|
// 当前进度
|
||||||
|
let target = formatNum(formatNum(time / props.viewWidth) * Number(formatDuration.value))
|
||||||
|
|
||||||
|
videoTime.value = target
|
||||||
|
videoProgress.value = time
|
||||||
}
|
}
|
||||||
|
|
||||||
// 移动结束
|
// 移动结束
|
||||||
function onEnd(ev) {
|
function onEnd(ev) {
|
||||||
// console.log('end', ev)
|
trigger.value = false
|
||||||
// 拖拽结束时的像素位置
|
// 视频播放时间
|
||||||
const end = ev.changedTouches[0].screenX
|
emit('change', {
|
||||||
//
|
time: videoTime.value,
|
||||||
let result = 750 / end
|
})
|
||||||
console.log('item', props.item)
|
|
||||||
emit('end')
|
|
||||||
//
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="durationBox" @touchstart.stop="onStart" @touchmove.stop="onMove" @touchend.stop="onEnd">
|
<view class="timeBox fdr jcc" v-if="trigger">
|
||||||
|
<view class="time fdr jcc">
|
||||||
|
<text class="text f1">{{videoCurrent}}</text>
|
||||||
|
<text class="text">/</text>
|
||||||
|
<text class="text f1">{{formatDuration}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="durationBox" ref="durationBoxRef" @touchstart.stop="onStart" @touchmove.stop="onMove"
|
||||||
|
@touchcancel="onEnd" @touchend.stop="onEnd">
|
||||||
|
<!-- <slider :min="0" :max="formatDuration" @change="change" /> -->
|
||||||
<view class="duration">
|
<view class="duration">
|
||||||
<view class="line" :style="{ width: progress + 'rpx' }"></view>
|
<view class="line" :style="{ width: progress + 'px' }"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.timeBox {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 300rpx;
|
||||||
|
text-align: center;
|
||||||
|
z-index: 9;
|
||||||
|
|
||||||
|
.time {
|
||||||
|
width: 450rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
background-color: rgba(0, 0, 0, .6);
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
margin: 10rpx 20rpx;
|
||||||
|
font-size: 50rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 视频时长
|
// 视频时长
|
||||||
.durationBox {
|
.durationBox {
|
||||||
padding-top: 60rpx;
|
padding-top: 60rpx;
|
||||||
|
|
|
@ -3,8 +3,6 @@ import App from './App'
|
||||||
import store from '@/store';
|
import store from '@/store';
|
||||||
//
|
//
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
// 路由拦截
|
|
||||||
// import './routeIntercept.js';
|
|
||||||
// 通用方法
|
// 通用方法
|
||||||
import util from '@/common/js/util';
|
import util from '@/common/js/util';
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,56 +1,57 @@
|
||||||
{
|
{
|
||||||
"name": "九亿",
|
"name" : "九亿",
|
||||||
"appid": "__UNI__08B31BC",
|
"appid" : "__UNI__08B31BC",
|
||||||
"description": "",
|
"description" : "",
|
||||||
"versionName": "1.0.0",
|
"versionName" : "2.0.0",
|
||||||
"versionCode": "100",
|
"versionCode" : 200,
|
||||||
"transformPx": false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus": {
|
"app-plus" : {
|
||||||
"usingComponents": true,
|
"usingComponents" : true,
|
||||||
"nvueStyleCompiler": "uni-app",
|
"nvueStyleCompiler" : "uni-app",
|
||||||
"compilerVersion": 3,
|
"compilerVersion" : 3,
|
||||||
"splashscreen": {
|
"splashscreen" : {
|
||||||
"alwaysShowBeforeRender": true,
|
"alwaysShowBeforeRender" : true,
|
||||||
"waiting": true,
|
"waiting" : true,
|
||||||
"autoclose": true,
|
"autoclose" : true,
|
||||||
"delay": 0
|
"delay" : 0
|
||||||
},
|
},
|
||||||
/* 模块配置 */
|
/* 模块配置 */
|
||||||
"modules": {
|
"modules" : {
|
||||||
"Camera": {},
|
"Camera" : {},
|
||||||
"Payment": {},
|
"Payment" : {},
|
||||||
"Share": {},
|
"Share" : {},
|
||||||
"VideoPlayer": {},
|
"VideoPlayer" : {},
|
||||||
"Barcode": {},
|
"Barcode" : {},
|
||||||
"Record": {}
|
"Record" : {}
|
||||||
},
|
},
|
||||||
/* 应用发布信息 */
|
/* 应用发布信息 */
|
||||||
"distribute": {
|
"distribute" : {
|
||||||
/* android打包配置 */
|
/* android打包配置 */
|
||||||
"android": {
|
"android" : {
|
||||||
"plugins": [{
|
"plugins" : [
|
||||||
"type": "module",
|
{
|
||||||
"name": "Agora-RTC-EngineModule",
|
"type" : "module",
|
||||||
"class": "io.agora.rtc.uni.AgoraRtcEngineModule"
|
"name" : "Agora-RTC-EngineModule",
|
||||||
|
"class" : "io.agora.rtc.uni.AgoraRtcEngineModule"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "module",
|
"type" : "module",
|
||||||
"name": "Agora-RTC-ChannelModule",
|
"name" : "Agora-RTC-ChannelModule",
|
||||||
"class": "io.agora.rtc.uni.AgoraRtcChannelModule"
|
"class" : "io.agora.rtc.uni.AgoraRtcChannelModule"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "component",
|
"type" : "component",
|
||||||
"name": "Agora-RTC-SurfaceView",
|
"name" : "Agora-RTC-SurfaceView",
|
||||||
"class": "io.agora.rtc.uni.AgoraRtcSurfaceView"
|
"class" : "io.agora.rtc.uni.AgoraRtcSurfaceView"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "component",
|
"type" : "component",
|
||||||
"name": "Agora-RTC-TextureView",
|
"name" : "Agora-RTC-TextureView",
|
||||||
"class": "io.agora.rtc.uni.AgoraRtcTextureView"
|
"class" : "io.agora.rtc.uni.AgoraRtcTextureView"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"permissions": [
|
"permissions" : [
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||||
|
@ -68,117 +69,117 @@
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>"
|
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>"
|
||||||
],
|
],
|
||||||
"abiFilters": ["arm64-v8a"],
|
"abiFilters" : [ "arm64-v8a" ],
|
||||||
"minSdkVersion": 27,
|
"minSdkVersion" : 27,
|
||||||
"targetSdkVersion": 31
|
"targetSdkVersion" : 31
|
||||||
},
|
},
|
||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
"ios": {
|
"ios" : {
|
||||||
"dSYMs": false,
|
"dSYMs" : false,
|
||||||
"idfa": false
|
"idfa" : false
|
||||||
},
|
},
|
||||||
/* SDK配置 */
|
/* SDK配置 */
|
||||||
"sdkConfigs": {
|
"sdkConfigs" : {
|
||||||
"payment": {
|
"payment" : {
|
||||||
"alipay": {
|
"alipay" : {
|
||||||
"__platform__": ["ios", "android"]
|
"__platform__" : [ "ios", "android" ]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"share": {},
|
"share" : {},
|
||||||
"ad": {},
|
"ad" : {},
|
||||||
"geolocation": {},
|
"geolocation" : {},
|
||||||
"oauth": {},
|
"oauth" : {},
|
||||||
"push": {},
|
"push" : {},
|
||||||
"maps": {}
|
"maps" : {}
|
||||||
},
|
},
|
||||||
"icons": {
|
"icons" : {
|
||||||
"android": {
|
"android" : {
|
||||||
"hdpi": "unpackage/res/icons/72x72.png",
|
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||||
"xhdpi": "unpackage/res/icons/96x96.png",
|
"xhdpi" : "unpackage/res/icons/96x96.png",
|
||||||
"xxhdpi": "unpackage/res/icons/144x144.png",
|
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
||||||
"xxxhdpi": "unpackage/res/icons/192x192.png"
|
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
||||||
},
|
},
|
||||||
"ios": {
|
"ios" : {
|
||||||
"appstore": "unpackage/res/icons/1024x1024.png",
|
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||||
"ipad": {
|
"ipad" : {
|
||||||
"app": "unpackage/res/icons/76x76.png",
|
"app" : "unpackage/res/icons/76x76.png",
|
||||||
"app@2x": "unpackage/res/icons/152x152.png",
|
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||||
"notification": "unpackage/res/icons/20x20.png",
|
"notification" : "unpackage/res/icons/20x20.png",
|
||||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||||
"proapp@2x": "unpackage/res/icons/167x167.png",
|
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||||
"settings": "unpackage/res/icons/29x29.png",
|
"settings" : "unpackage/res/icons/29x29.png",
|
||||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||||
"spotlight": "unpackage/res/icons/40x40.png",
|
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||||
"spotlight@2x": "unpackage/res/icons/80x80.png"
|
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||||
},
|
},
|
||||||
"iphone": {
|
"iphone" : {
|
||||||
"app@2x": "unpackage/res/icons/120x120.png",
|
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||||
"app@3x": "unpackage/res/icons/180x180.png",
|
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||||
"notification@3x": "unpackage/res/icons/60x60.png",
|
"notification@3x" : "unpackage/res/icons/60x60.png",
|
||||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||||
"settings@3x": "unpackage/res/icons/87x87.png",
|
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||||
"spotlight@2x": "unpackage/res/icons/80x80.png",
|
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||||
"spotlight@3x": "unpackage/res/icons/120x120.png"
|
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"splashscreen": {
|
"splashscreen" : {
|
||||||
"useOriginalMsgbox": true
|
"useOriginalMsgbox" : true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nativePlugins": {
|
"nativePlugins" : {
|
||||||
"HisignFaceLivePlugin": {
|
"HisignFaceLivePlugin" : {
|
||||||
"__plugin_info__": {
|
"__plugin_info__" : {
|
||||||
"name": "HisignFaceLive",
|
"name" : "HisignFaceLive",
|
||||||
"description": "鑫模态人脸活体检测移动版",
|
"description" : "鑫模态人脸活体检测移动版",
|
||||||
"platforms": "Android,iOS",
|
"platforms" : "Android,iOS",
|
||||||
"url": "",
|
"url" : "",
|
||||||
"android_package_name": "",
|
"android_package_name" : "",
|
||||||
"ios_bundle_id": "",
|
"ios_bundle_id" : "",
|
||||||
"isCloud": false,
|
"isCloud" : false,
|
||||||
"bought": -1,
|
"bought" : -1,
|
||||||
"pid": "",
|
"pid" : "",
|
||||||
"parameters": {}
|
"parameters" : {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"TencentCloud-TUICallKit": {
|
"TencentCloud-TUICallKit" : {
|
||||||
"__plugin_info__": {
|
"__plugin_info__" : {
|
||||||
"name": "【官方】腾讯云音视频通话插件TencentCloud-TUICallKit",
|
"name" : "【官方】腾讯云音视频通话插件TencentCloud-TUICallKit",
|
||||||
"description": "TUICallKit 是腾讯云官方推出的音视频通话插件,支持 1v1 通话和群组通话,并提供“类微信\"的 UI 交互,开发者仅需三个 API 就可实现。",
|
"description" : "TUICallKit 是腾讯云官方推出的音视频通话插件,支持 1v1 通话和群组通话,并提供“类微信\"的 UI 交互,开发者仅需三个 API 就可实现。",
|
||||||
"platforms": "Android,iOS",
|
"platforms" : "Android,iOS",
|
||||||
"url": "https://ext.dcloud.net.cn/plugin?id=9035",
|
"url" : "https://ext.dcloud.net.cn/plugin?id=9035",
|
||||||
"android_package_name": "",
|
"android_package_name" : "",
|
||||||
"ios_bundle_id": "",
|
"ios_bundle_id" : "",
|
||||||
"isCloud": true,
|
"isCloud" : true,
|
||||||
"bought": 1,
|
"bought" : 1,
|
||||||
"pid": "9035",
|
"pid" : "9035",
|
||||||
"parameters": {}
|
"parameters" : {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* 快应用特有相关 */
|
/* 快应用特有相关 */
|
||||||
"quickapp": {},
|
"quickapp" : {},
|
||||||
/* 小程序特有相关 */
|
/* 小程序特有相关 */
|
||||||
"mp-weixin": {
|
"mp-weixin" : {
|
||||||
"appid": "",
|
"appid" : "",
|
||||||
"setting": {
|
"setting" : {
|
||||||
"urlCheck": false
|
"urlCheck" : false
|
||||||
},
|
},
|
||||||
"usingComponents": true
|
"usingComponents" : true
|
||||||
},
|
},
|
||||||
"mp-alipay": {
|
"mp-alipay" : {
|
||||||
"usingComponents": true
|
"usingComponents" : true
|
||||||
},
|
},
|
||||||
"mp-baidu": {
|
"mp-baidu" : {
|
||||||
"usingComponents": true
|
"usingComponents" : true
|
||||||
},
|
},
|
||||||
"mp-toutiao": {
|
"mp-toutiao" : {
|
||||||
"usingComponents": true
|
"usingComponents" : true
|
||||||
},
|
},
|
||||||
"uniStatistics": {
|
"uniStatistics" : {
|
||||||
"enable": false
|
"enable" : false
|
||||||
},
|
},
|
||||||
"vueVersion": "3"
|
"vueVersion" : "3"
|
||||||
}
|
}
|
|
@ -789,7 +789,7 @@
|
||||||
"current": 0,
|
"current": 0,
|
||||||
"list": [{
|
"list": [{
|
||||||
"name": "test",
|
"name": "test",
|
||||||
"path": "pages/shop/shop"
|
"path": "pages/index/index"
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -23,18 +23,22 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
|
// 获取榴莲果树
|
||||||
buyDurianList()
|
buyDurianList()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 我的榴莲果树
|
// 我的榴莲果树
|
||||||
function buyDurianList() {
|
function buyDurianList() {
|
||||||
durianlApi.buyDurianList({
|
durianlApi.buyDurianList({}).then(rs => {
|
||||||
query: {
|
if (rs.code == 200) {
|
||||||
userId: userinfo.value.userId,
|
treeData.value = rs.data.dataList
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}).then(rs => {
|
|
||||||
console.log(rs)
|
util.alert({
|
||||||
treeData.value = rs.data
|
content: rs.msg,
|
||||||
|
showCancel: false
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -47,8 +51,8 @@
|
||||||
<image class="wh180" src="/static/tree.png" mode="aspectFit" />
|
<image class="wh180" src="/static/tree.png" mode="aspectFit" />
|
||||||
<view class="col f1 ml30 c333 f26">
|
<view class="col f1 ml30 c333 f26">
|
||||||
<view class="txt">每日可释放:{{item.release}}</view>
|
<view class="txt">每日可释放:{{item.release}}</view>
|
||||||
<view class="txt mtb5">当前可释放:{{item.released}}</view>
|
<!-- <view class="txt mtb5">当前可释放:{{item.released}}</view> -->
|
||||||
<view class="txt">当前级别:{{item.level}}</view>
|
<view class="txt">当前级别:{{item.treeName}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -29,17 +29,21 @@
|
||||||
|
|
||||||
import intergralApi from '@/api/intergral.js';
|
import intergralApi from '@/api/intergral.js';
|
||||||
import durianlApi from '@/api/durian.js';
|
import durianlApi from '@/api/durian.js';
|
||||||
|
const {
|
||||||
|
proxy
|
||||||
|
} = getCurrentInstance()
|
||||||
|
// 仓库
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
|
// 互转表单
|
||||||
|
const form = reactive({
|
||||||
|
account: '',
|
||||||
|
sellNum: '',
|
||||||
|
})
|
||||||
|
|
||||||
//读秒记录
|
//读秒记录
|
||||||
const viewData = ref({
|
const viewData = ref({
|
||||||
seconds: 0
|
seconds: 0
|
||||||
})
|
})
|
||||||
const releaseNum = ref(0)
|
|
||||||
const scoreNum = ref(0)
|
|
||||||
const fruitNum = ref(0)
|
|
||||||
const treeNum = ref(0)
|
|
||||||
// 用户信息
|
// 用户信息
|
||||||
const userinfo = computed(() => {
|
const userinfo = computed(() => {
|
||||||
let result = store.state.userinfo
|
let result = store.state.userinfo
|
||||||
|
@ -51,14 +55,10 @@
|
||||||
result = Math.min(Number(result), 100)
|
result = Math.min(Number(result), 100)
|
||||||
return result
|
return result
|
||||||
})
|
})
|
||||||
|
// 我的钱包
|
||||||
const {
|
const purse = computed(() => {
|
||||||
proxy
|
let result = store.state.purse || {}
|
||||||
} = getCurrentInstance()
|
return result
|
||||||
|
|
||||||
const form = reactive({
|
|
||||||
account: '',
|
|
||||||
sellNum: '',
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
|
@ -66,13 +66,8 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
//
|
// 获取钱包
|
||||||
util.isLogin(() => {
|
util.getPurse()
|
||||||
//
|
|
||||||
// util.getUserinfo()
|
|
||||||
buyScrollList()
|
|
||||||
buyDurianList()
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 今日任务读秒记录
|
// 今日任务读秒记录
|
||||||
|
@ -84,49 +79,6 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 我的榴莲果树
|
|
||||||
function buyDurianList() {
|
|
||||||
durianlApi.buyDurianList({
|
|
||||||
query: {
|
|
||||||
userId: userinfo.value.userId,
|
|
||||||
}
|
|
||||||
}).then(rs => {
|
|
||||||
if (rs.code == 200) {
|
|
||||||
var releases = 0
|
|
||||||
var scores = 0
|
|
||||||
rs.data.forEach(item => {
|
|
||||||
releases = releases + item.release
|
|
||||||
scores = scores + item.fruit
|
|
||||||
});
|
|
||||||
fruitNum.value = releases
|
|
||||||
treeNum.value = scores
|
|
||||||
return
|
|
||||||
}
|
|
||||||
util.alert({
|
|
||||||
value: rs.msg,
|
|
||||||
showCancel: false,
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查看我购买的卷轴
|
|
||||||
function buyScrollList() {
|
|
||||||
intergralApi.buyScrollList({
|
|
||||||
query: {
|
|
||||||
status: 0,
|
|
||||||
}
|
|
||||||
}).then(rs => {
|
|
||||||
var releases = 0
|
|
||||||
var scores = 0
|
|
||||||
rs.data.forEach(item => {
|
|
||||||
releases = releases + item.release
|
|
||||||
scores = scores + item.score
|
|
||||||
});
|
|
||||||
releaseNum.value = releases
|
|
||||||
scoreNum.value = scores
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 榴莲果交易
|
// 榴莲果交易
|
||||||
function transfer() {
|
function transfer() {
|
||||||
durianlApi.transfer({
|
durianlApi.transfer({
|
||||||
|
@ -147,14 +99,11 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function openChange() {
|
// 跳转
|
||||||
proxy.$refs.dealRef.open()
|
|
||||||
}
|
|
||||||
|
|
||||||
function navigateToPage(path) {
|
function navigateToPage(path) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: path
|
url: path
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -177,7 +126,7 @@
|
||||||
<image class="wh110" src="/static/sapling.png" mode="aspectFit" />
|
<image class="wh110" src="/static/sapling.png" mode="aspectFit" />
|
||||||
</view>
|
</view>
|
||||||
<view class="f1 fmid">
|
<view class="f1 fmid">
|
||||||
<view class=" f38 b wsn">* {{userinfo.seed}}</view>
|
<view class=" f38 b wsn">* {{purse.seed}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -194,7 +143,8 @@
|
||||||
<view class="df fdc jcsa f1">
|
<view class="df fdc jcsa f1">
|
||||||
<view class="button btn colourful plr30" @click="navigateToPage('/pages/index/orchard')">置换</view>
|
<view class="button btn colourful plr30" @click="navigateToPage('/pages/index/orchard')">置换</view>
|
||||||
|
|
||||||
<view class="button btn colourful plr30 fmid" @click="navigateToPage('/pages/index/durainActivation')">
|
<view class="button btn colourful plr30 fmid"
|
||||||
|
@click="navigateToPage('/pages/index/durainActivation')">
|
||||||
<view class="">我的榴莲果树</view>
|
<view class="">我的榴莲果树</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -209,13 +159,13 @@
|
||||||
<navigator url="/pages/index/durianLog" hover-class="none">
|
<navigator url="/pages/index/durianLog" hover-class="none">
|
||||||
<image class="fruit wh150" src="/static/fruit.png" mode="aspectFit" />
|
<image class="fruit wh150" src="/static/fruit.png" mode="aspectFit" />
|
||||||
<view class="mt30 f20">
|
<view class="mt30 f20">
|
||||||
<view class=" f1 b">可用: {{userinfo.fruit}}</view>
|
<view class=" f1 b">可用: {{purse.fruit}}</view>
|
||||||
<view class="cFF4242 f1 mt10">待释放: 105.53</view>
|
<view class="cFF4242 f1 mt10">待释放: 105.53</view>
|
||||||
</view>
|
</view>
|
||||||
</navigator>
|
</navigator>
|
||||||
</view>
|
</view>
|
||||||
<view class="notice df fdc jcsa aic f1">
|
<view class="notice df fdc jcsa aic f1">
|
||||||
<view class="item ver f1" @click="openChange">
|
<view class="item ver f1" @click="$refs.dealRef.open()">
|
||||||
<view class="key fmid c333 f24">互转</view>
|
<view class="key fmid c333 f24">互转</view>
|
||||||
<!-- <view class="value mt5 c333 f20">销毁30%</view> -->
|
<!-- <view class="value mt5 c333 f20">销毁30%</view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -30,13 +30,16 @@
|
||||||
pageSize: 30,
|
pageSize: 30,
|
||||||
total: 0,
|
total: 0,
|
||||||
})
|
})
|
||||||
|
// 榴莲树id
|
||||||
|
const id = ref('')
|
||||||
// 用户信息
|
// 用户信息
|
||||||
const userinfo = computed(() => {
|
const userinfo = computed(() => {
|
||||||
let result = store.state.userinfo
|
let result = store.state.userinfo
|
||||||
return result
|
return result
|
||||||
})
|
})
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad((option) => {
|
||||||
|
if (option.id) id.value = option.id
|
||||||
// 获取列表
|
// 获取列表
|
||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
|
|
|
@ -41,8 +41,10 @@
|
||||||
import disc from '@/components/index/disc.vue'
|
import disc from '@/components/index/disc.vue'
|
||||||
// 长按更多菜单
|
// 长按更多菜单
|
||||||
import moreMenu from '@/components/index/moreMenu.vue'
|
import moreMenu from '@/components/index/moreMenu.vue'
|
||||||
// 视频进度条
|
// 快捷收藏
|
||||||
import videoProgress from '@/components/index/videoProgress';
|
import fastCollect from '@/components/index/fastCollect.vue';
|
||||||
|
// 青少年模式
|
||||||
|
import teen from '@/components/index/teen.vue'
|
||||||
|
|
||||||
const {
|
const {
|
||||||
proxy
|
proxy
|
||||||
|
@ -98,9 +100,7 @@
|
||||||
data: [],
|
data: [],
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
total: 0,
|
total: 0,
|
||||||
homePageSize: 7,
|
pageSize: 10,
|
||||||
shopPageSize: 2,
|
|
||||||
otherPageSize: 1,
|
|
||||||
})
|
})
|
||||||
// 关注的视频列表
|
// 关注的视频列表
|
||||||
const attList = reactive({
|
const attList = reactive({
|
||||||
|
@ -111,7 +111,10 @@
|
||||||
timer: null,
|
timer: null,
|
||||||
})
|
})
|
||||||
// 容器高度 用来控制视频、遮罩等高度 用来解决nvue模式下没有100%高度的问题
|
// 容器高度 用来控制视频、遮罩等高度 用来解决nvue模式下没有100%高度的问题
|
||||||
const viewHeight = ref(0)
|
const viewSize = reactive({
|
||||||
|
height: 0,
|
||||||
|
width: 0,
|
||||||
|
})
|
||||||
// 唱片顶部位置
|
// 唱片顶部位置
|
||||||
const discOffsetTop = ref(0)
|
const discOffsetTop = ref(0)
|
||||||
// 底部菜单高度
|
// 底部菜单高度
|
||||||
|
@ -136,7 +139,7 @@
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
// 设备信息
|
// 设备信息
|
||||||
const systemInfo = uni.getSystemInfoSync()
|
const systemInfo = uni.getSystemInfoSync()
|
||||||
discOffsetTop.value = systemInfo.safeAreaInsets.top + 44 + 10
|
discOffsetTop.value = systemInfo.safeAreaInsets.top + 44 + 30
|
||||||
|
|
||||||
// 判断是否提醒过闹铃
|
// 判断是否提醒过闹铃
|
||||||
if (!uni.getStorageSync('alarmAlt')) {
|
if (!uni.getStorageSync('alarmAlt')) {
|
||||||
|
@ -205,7 +208,8 @@
|
||||||
|
|
||||||
// 获取视频容器节点信息
|
// 获取视频容器节点信息
|
||||||
dom.getComponentRect(proxy.$refs.containerRef[0], (option) => {
|
dom.getComponentRect(proxy.$refs.containerRef[0], (option) => {
|
||||||
viewHeight.value = option.size.height
|
viewSize.height = option.size.height
|
||||||
|
viewSize.width = option.size.width
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -323,17 +327,21 @@
|
||||||
|
|
||||||
// 获取推荐视频
|
// 获取推荐视频
|
||||||
function getRecList() {
|
function getRecList() {
|
||||||
Promise.all([getHomeVideo(), getShopVideo(), getOtherVideo()]).then(rs => {
|
// 获取首页分页视频
|
||||||
// 列表
|
api.video.homeVideo({
|
||||||
const list = rs.reduce((last, now) => last.concat(now.rows), []).sort(() => Math.random() - 0.5)
|
query: {
|
||||||
|
pageNum: recList.pageNum,
|
||||||
|
pageSize: recList.pageSize,
|
||||||
|
}
|
||||||
|
}).then(rs => {
|
||||||
|
if (rs.code == 200) {
|
||||||
// 总数
|
// 总数
|
||||||
recList.total = rs.reduce((last, now) => last + now.total, 0)
|
recList.total = rs.total
|
||||||
|
const list = rs.rows.sort(() => Math.random() - Math.random())
|
||||||
// 第一页
|
// 第一页
|
||||||
if (recList.pageNum == 1) recList.data.length = 0
|
if (recList.pageNum == 1) recList.data.length = 0
|
||||||
// 合并
|
// 合并
|
||||||
recList.data.push(...list.map(item => {
|
recList.data.push(...list.map(item => {
|
||||||
item.format_videoUrl = util.format_url(item.videoUrl, 'video')
|
|
||||||
item.format_header = util.format_url(item.header, 'img')
|
|
||||||
// 播放倍速
|
// 播放倍速
|
||||||
item.speed = 1
|
item.speed = 1
|
||||||
return item
|
return item
|
||||||
|
@ -347,85 +355,18 @@
|
||||||
const pages = getCurrentPages()
|
const pages = getCurrentPages()
|
||||||
// 判断是否当前页
|
// 判断是否当前页
|
||||||
if (pages[pages.length - 1].route == 'pages/index/index') {
|
if (pages[pages.length - 1].route == 'pages/index/index') {
|
||||||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].playState.value = true
|
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].playState.value =
|
||||||
|
true
|
||||||
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].play()
|
proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]].play()
|
||||||
}
|
}
|
||||||
}, 50)
|
}, 50)
|
||||||
}).catch(rs => {
|
|
||||||
console.log('index catch', rs)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取首页推荐视频
|
|
||||||
function getHomeVideo() {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
// 获取首页分页视频
|
|
||||||
api.video.homeVideo({
|
|
||||||
query: {
|
|
||||||
userId: userinfo.value.userId || '',
|
|
||||||
pageNum: recList.pageNum,
|
|
||||||
pageSize: recList.homePageSize,
|
|
||||||
}
|
|
||||||
}).then(rs => {
|
|
||||||
if (rs.code == 200) {
|
|
||||||
resolve(rs)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
reject(rs)
|
|
||||||
util.alert({
|
util.alert({
|
||||||
content: rs.msg,
|
content: rs.msg,
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 商家视频分页
|
|
||||||
function getShopVideo() {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
// 获取首页分页视频
|
|
||||||
api.video.businessHomeVideo({
|
|
||||||
query: {
|
|
||||||
userId: userinfo.value.userId || '',
|
|
||||||
pageNum: recList.pageNum,
|
|
||||||
pageSize: recList.shopPageSize,
|
|
||||||
}
|
|
||||||
}).then(rs => {
|
|
||||||
if (rs.code == 200) {
|
|
||||||
resolve(rs)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
reject(rs)
|
|
||||||
util.alert({
|
|
||||||
content: rs.msg,
|
|
||||||
showCancel: false,
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取首页其他视频
|
|
||||||
function getOtherVideo() {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
// 获取首页分页视频
|
|
||||||
api.video.otherHomeVideo({
|
|
||||||
query: {
|
|
||||||
userId: userinfo.value.userId || '',
|
|
||||||
pageNum: recList.pageNum,
|
|
||||||
pageSize: recList.otherPageSize,
|
|
||||||
}
|
|
||||||
}).then(rs => {
|
|
||||||
if (rs.code == 200) {
|
|
||||||
resolve(rs)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
reject(rs)
|
|
||||||
util.alert({
|
|
||||||
content: rs.msg,
|
|
||||||
showCancel: false,
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -537,7 +478,8 @@
|
||||||
}
|
}
|
||||||
tabIndex.value = index
|
tabIndex.value = index
|
||||||
// 根据是否加载过判断 播放还是获取
|
// 根据是否加载过判断 播放还是获取
|
||||||
if (tabCurrent.value.load && proxy.$refs[`videoRef${index}`]) proxy.$refs[`videoRef${index}`][current[index]].play()
|
if (tabCurrent.value.load && proxy.$refs[`videoRef${index}`]) proxy.$refs[`videoRef${index}`][current[index]]
|
||||||
|
.play()
|
||||||
else tabCurrent.value.getList()
|
else tabCurrent.value.getList()
|
||||||
// 已加载
|
// 已加载
|
||||||
tab[tabIndex.value].load = true
|
tab[tabIndex.value].load = true
|
||||||
|
@ -589,6 +531,7 @@
|
||||||
|
|
||||||
// 观看视频记录
|
// 观看视频记录
|
||||||
function browseLog(element) {
|
function browseLog(element) {
|
||||||
|
return
|
||||||
util.isLogin().then(rs => {
|
util.isLogin().then(rs => {
|
||||||
if (readSecond.count == 0) return
|
if (readSecond.count == 0) return
|
||||||
//
|
//
|
||||||
|
@ -683,9 +626,9 @@
|
||||||
tabCurrent.value.listData()[current[tab_index]].speed = speed
|
tabCurrent.value.listData()[current[tab_index]].speed = speed
|
||||||
}
|
}
|
||||||
|
|
||||||
// 进度条拖拽结束
|
// 唤起闹铃
|
||||||
function onProgressEnd(ev) {
|
function showAlarm() {
|
||||||
//
|
proxy.$refs.timeRef.open()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -703,7 +646,8 @@
|
||||||
|
|
||||||
<view class="f1">
|
<view class="f1">
|
||||||
<view class="tab fdr jcc" :key="tabIndex">
|
<view class="tab fdr jcc" :key="tabIndex">
|
||||||
<view class="list" v-for="(item,index) in tab" :key="index" :class="[{'active': index === tabIndex}]" @click.stop="handle_tab(index)">
|
<view class="list" v-for="(item,index) in tab" :key="index"
|
||||||
|
:class="[{'active': index === tabIndex}]" @click.stop="handle_tab(index)">
|
||||||
<view class="txt">
|
<view class="txt">
|
||||||
<text class="text">{{item.name}}</text>
|
<text class="text">{{item.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
@ -719,25 +663,26 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 有效读秒唱片 -->
|
<!-- 有效读秒唱片 -->
|
||||||
<view class="disc pf r0" :style="{top: discOffsetTop+'px'}" v-if="userinfo.userId">
|
<view class="disc pf r0" :style="{top: discOffsetTop+'px'}" v-if="userinfo.id">
|
||||||
<disc ref="discRef" />
|
<disc ref="discRef" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<template v-for="(item, index) in tab" :key="index">
|
<template v-for="(item, index) in tab" :key="index">
|
||||||
<view class="f1" v-if="tabIndex == index" ref="containerRef">
|
<view class="f1" v-if="tabIndex == index" ref="containerRef">
|
||||||
<!-- 主要内容区域 -->
|
<!-- 主要内容区域 -->
|
||||||
<list class="container f1" :show-scrollbar="false" @touchstart="onTouchstart($event,index)" @touchend="onTouchend($event,index)" @loadmore="item.getMoreList">
|
<list class="container f1" :show-scrollbar="false" @touchstart="onTouchstart($event,index)"
|
||||||
<cell class="cell" :style="[{height: viewHeight + 'px'}]" :ref="`cellRef` + index" v-for="(secItem,secIndex) in item.listData()" :key="secIndex" @click.stop>
|
@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="secIndex" @click.stop>
|
||||||
<!-- 视频 -->
|
<!-- 视频 -->
|
||||||
<indexVideo :ref="'videoRef' + index" :tabIndex="index" :current="current[index]" :item="secItem" :index="secIndex" @showTime="handleShowTime" @showComment="handleShowCommentAlt" @showCollect="handleShowCollectAlt" @showShareFirend="handleShowShareFirend" @onPlay="handleVideoOnPlay" @onPause="handleVideoOnPause" @like="videoLike" @longtap="$refs.moreMenuRef.open(secItem)" />
|
<indexVideo :ref="'videoRef' + index" :tabIndex="index" :current="current[index]"
|
||||||
|
: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)" />
|
||||||
</cell>
|
</cell>
|
||||||
</list>
|
</list>
|
||||||
|
|
||||||
<!-- :style="{bottom: footerMenuHeight+'px'}" -->
|
|
||||||
<!-- 视频进度条 -->
|
|
||||||
<view class="videoProgress">
|
|
||||||
<videoProgress :item="item.listData()[current[tabIndex]]" @end="onProgressEnd" />
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -750,6 +695,10 @@
|
||||||
<footerMenu ref="footerMenuRef" page="index" subject="dark" />
|
<footerMenu ref="footerMenuRef" page="index" subject="dark" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 快捷收藏 -->
|
||||||
|
<fastCollect ref="fastCollectRef" />
|
||||||
|
<!-- 青少年模式 -->
|
||||||
|
<teen ref="teenRef" @setting="showAlarm" />
|
||||||
<!-- 长按菜单 -->
|
<!-- 长按菜单 -->
|
||||||
<moreMenu ref="moreMenuRef" @changeSpeed="handleSpeed" />
|
<moreMenu ref="moreMenuRef" @changeSpeed="handleSpeed" />
|
||||||
<!-- 闹钟弹窗 -->
|
<!-- 闹钟弹窗 -->
|
||||||
|
@ -818,14 +767,4 @@
|
||||||
.disc {
|
.disc {
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
.videoProgress {
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 120rpx;
|
|
||||||
// background-color: red;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
|
@ -94,9 +94,16 @@
|
||||||
result = Math.floor(result * 1000 * 0.7) / 1000
|
result = Math.floor(result * 1000 * 0.7) / 1000
|
||||||
return result
|
return result
|
||||||
})
|
})
|
||||||
|
// 我的钱包
|
||||||
|
const purse = computed(() => {
|
||||||
|
let result = store.state.purse || {}
|
||||||
|
return result
|
||||||
|
})
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
getList()
|
getList()
|
||||||
|
// 获取钱包
|
||||||
|
util.getPurse()
|
||||||
})
|
})
|
||||||
|
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
|
@ -177,7 +184,8 @@
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code === 200) {
|
if (rs.code === 200) {
|
||||||
util.alert('交易成功')
|
util.alert('交易成功')
|
||||||
util.getUserinfo()
|
|
||||||
|
util.getPurse()
|
||||||
refreshList()
|
refreshList()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -207,10 +215,12 @@
|
||||||
if (rs.code === 200) {
|
if (rs.code === 200) {
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
proxy.$refs.saleRef.close()
|
proxy.$refs.saleRef.close()
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
Object.assign(form, new Form())
|
Object.assign(form, new Form())
|
||||||
}, 500)
|
}, 500)
|
||||||
util.getUserinfo()
|
|
||||||
|
util.getPurse()
|
||||||
//
|
//
|
||||||
getList()
|
getList()
|
||||||
} else {
|
} else {
|
||||||
|
@ -293,8 +303,8 @@
|
||||||
<view class="footer rows plr30 shadow bfff">
|
<view class="footer rows plr30 shadow bfff">
|
||||||
<view class="f28">我的资产</view>
|
<view class="f28">我的资产</view>
|
||||||
<view class="f28 c666">
|
<view class="f28 c666">
|
||||||
<text class="wsn">积分:{{userinfo.score}}</text>
|
<text class="wsn">积分:{{purse.score}}</text>
|
||||||
<text class="wsn ml40">榴莲果:{{userinfo.fruit}}</text>
|
<text class="wsn ml40">榴莲果:{{purse.fruit}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,11 @@
|
||||||
let result = store.state.userinfo || {}
|
let result = store.state.userinfo || {}
|
||||||
return result
|
return result
|
||||||
})
|
})
|
||||||
// 钱包
|
// 我的钱包
|
||||||
const wallet = ref({})
|
const wallet = computed(() => {
|
||||||
|
let result = store.state.purse || {}
|
||||||
|
return result
|
||||||
|
})
|
||||||
// 待释放
|
// 待释放
|
||||||
const releasedList = ref([])
|
const releasedList = ref([])
|
||||||
|
|
||||||
|
@ -48,23 +51,9 @@
|
||||||
// 获取待释放
|
// 获取待释放
|
||||||
getReleased()
|
getReleased()
|
||||||
// 获取钱包
|
// 获取钱包
|
||||||
getWallet()
|
util.getPurse()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 获取钱包信息
|
|
||||||
function getWallet() {
|
|
||||||
api.mine.selectPurse({}).then(rs => {
|
|
||||||
if (rs.code == 200) {
|
|
||||||
wallet.value = rs.data
|
|
||||||
return
|
|
||||||
}
|
|
||||||
util.alert({
|
|
||||||
content: rs.msg,
|
|
||||||
showCancel: false,
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取待释放
|
// 获取待释放
|
||||||
function getReleased() {
|
function getReleased() {
|
||||||
api.mine.releasedList({}).then(rs => {
|
api.mine.releasedList({}).then(rs => {
|
||||||
|
@ -129,11 +118,16 @@
|
||||||
<uni-icons type="right" color="" />
|
<uni-icons type="right" color="" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="rows mtb30 ptb20 plr30 cfff f34 b000 br10" @click="link('/pages/index/wallet/merchantBill')">
|
||||||
|
<text>我的收益</text>
|
||||||
|
<uni-icons type="right" color="" />
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 待释放 -->
|
<!-- 待释放 -->
|
||||||
<uni-popup ref="released" type="center">
|
<uni-popup ref="released" type="center">
|
||||||
<view class="releasedAlt oh popMid bfff br20">
|
<view class="releasedAlt oh popMid bfff br20">
|
||||||
<view class="header rows ptb20 plr20 c333 f34 b">
|
<view class="header rows ptb20 plr20 c333 f34 b">
|
||||||
<view class="title">待释放列表</view>
|
<view class="title">待入账列表</view>
|
||||||
<uni-icons type="closeempty" @click="$refs.released.close()" />
|
<uni-icons type="closeempty" @click="$refs.released.close()" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
|
@ -25,37 +25,30 @@
|
||||||
// 视频地址
|
// 视频地址
|
||||||
videoUrl = ''
|
videoUrl = ''
|
||||||
// 缩略图
|
// 缩略图
|
||||||
imageUrl = ''
|
coverUrl = ''
|
||||||
// 标题
|
// 标题
|
||||||
title = ''
|
title = ''
|
||||||
// 正文
|
// 正文
|
||||||
content = ''
|
description = ''
|
||||||
// 话题
|
// 话题
|
||||||
talk = ''
|
tags = ''
|
||||||
// at用户
|
// at用户
|
||||||
subscriber = ''
|
subscriber = ''
|
||||||
// 地点
|
// 视频大小
|
||||||
locationName = ''
|
videoSize = ''
|
||||||
// 经纬度
|
// 视频时长
|
||||||
location = ''
|
videoDuration = ''
|
||||||
// 产品链接
|
// 视频状态 0草稿 1待审核 2审核失败 3已发布 4已下架
|
||||||
productUrl = ''
|
status = ''
|
||||||
// 产品id
|
|
||||||
productId = ''
|
|
||||||
// 第几秒展示
|
|
||||||
showTime = ''
|
|
||||||
// 0全部1仅自己可见
|
|
||||||
oneself = 0
|
|
||||||
// 0正常1草稿
|
|
||||||
isDraft = ''
|
|
||||||
// 1个人2商户
|
|
||||||
type = ''
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 发布视频
|
// 发布视频
|
||||||
const form = reactive(new Form())
|
const form = reactive(new Form())
|
||||||
// 话题列表
|
// 话题列表
|
||||||
let labelList = reactive([])
|
let label = reactive({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
list: [],
|
||||||
|
})
|
||||||
// 话题关键字
|
// 话题关键字
|
||||||
const labelKeyword = ref('')
|
const labelKeyword = ref('')
|
||||||
// 已选择的话题列表
|
// 已选择的话题列表
|
||||||
|
@ -91,27 +84,15 @@
|
||||||
form.title = detail.title
|
form.title = detail.title
|
||||||
// 正文
|
// 正文
|
||||||
form.content = detail.content
|
form.content = detail.content
|
||||||
// at用户
|
|
||||||
// subscriber = ''
|
|
||||||
// 地点
|
|
||||||
// locationName = ''
|
|
||||||
// 经纬度
|
|
||||||
// location = ''
|
|
||||||
// 产品链接
|
|
||||||
// productUrl = ''
|
|
||||||
// 产品id
|
|
||||||
// productId = ''
|
|
||||||
// 第几秒展示
|
|
||||||
// showTime = ''
|
|
||||||
// 0正常1草稿
|
// 0正常1草稿
|
||||||
form.isDraft = detail.isDraft
|
form.isDraft = detail.isDraft
|
||||||
// 匹配话题id
|
// 匹配话题id
|
||||||
detail.talkId.split(',').forEach(node => {
|
// detail.talkId.split(',').forEach(node => {
|
||||||
for (let i = 0; i < labelList.length; i++) {
|
// for (let i = 0; i < labelList.length; i++) {
|
||||||
const item = labelList[i]
|
// const item = labelList[i]
|
||||||
if (node == item.id) labelSelect.push(item)
|
// if (node == item.id) labelSelect.push(item)
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
// 匹配用户id
|
// 匹配用户id
|
||||||
detail.subscriber = detail.subscriber.split(',')
|
detail.subscriber = detail.subscriber.split(',')
|
||||||
detail.subscriberId.split(',').forEach((item, index) => {
|
detail.subscriberId.split(',').forEach((item, index) => {
|
||||||
|
@ -150,10 +131,10 @@
|
||||||
// 上传图片
|
// 上传图片
|
||||||
function uploadImg() {
|
function uploadImg() {
|
||||||
util.upload_image({
|
util.upload_image({
|
||||||
value: form.imageUrl,
|
value: form.coverUrl,
|
||||||
type: 1,
|
type: 1,
|
||||||
success: rs => {
|
success: rs => {
|
||||||
form.imageUrl = rs.value
|
form.coverUrl = rs.value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -162,29 +143,57 @@
|
||||||
function uploadVideo() {
|
function uploadVideo() {
|
||||||
util.upload_video({
|
util.upload_video({
|
||||||
success: rs => {
|
success: rs => {
|
||||||
|
// 视频大小
|
||||||
|
form.videoSize = rs.size
|
||||||
|
// 宽
|
||||||
|
form.breadth = rs.width
|
||||||
|
// 高
|
||||||
|
form.height = rs.height
|
||||||
|
// 时长
|
||||||
|
form.videoDuration = rs.duration
|
||||||
|
// 路径
|
||||||
form.videoUrl = rs.value
|
form.videoUrl = rs.value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 刷新列表
|
||||||
|
function refreshLabel() {
|
||||||
|
label.pageNum = 1
|
||||||
|
label.total = 0
|
||||||
|
getLabel()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取更多标签分类
|
||||||
|
function getMoreLabel() {
|
||||||
|
if (label.total <= label.list.length) return
|
||||||
|
label.pageNum++
|
||||||
|
getLabel()
|
||||||
|
}
|
||||||
|
|
||||||
// 获取标签分类
|
// 获取标签分类
|
||||||
function getLabel() {
|
function getLabel() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
api.video.getLabel({
|
api.video.getLabel({
|
||||||
query: {
|
query: {
|
||||||
parentId: 0,
|
pageNum: label.pageNum,
|
||||||
search: labelKeyword.value,
|
pageSize: label.pageSize,
|
||||||
|
tagName: labelKeyword.value,
|
||||||
}
|
}
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code == 200) {
|
if (rs.code == 200) {
|
||||||
const result = rs.data
|
const result = rs.rows
|
||||||
labelList.length = 0
|
//
|
||||||
|
if (label.pageNum == 1) label.list.length = 0
|
||||||
|
|
||||||
// 标签列表输出
|
// 标签列表输出
|
||||||
labelList.push(...result)
|
label.list.push(...result)
|
||||||
|
// 总数
|
||||||
|
label.total = rs.total
|
||||||
//
|
//
|
||||||
resolve(labelList)
|
resolve(label.list)
|
||||||
|
|
||||||
|
// 结果
|
||||||
if (!result[0] && labelKeyword.value) {
|
if (!result[0] && labelKeyword.value) {
|
||||||
util.alert({
|
util.alert({
|
||||||
content: `当前没有${labelKeyword.value}的话题,是否添加?`,
|
content: `当前没有${labelKeyword.value}的话题,是否添加?`,
|
||||||
|
@ -205,13 +214,15 @@
|
||||||
// 添加标签
|
// 添加标签
|
||||||
function addLabel() {
|
function addLabel() {
|
||||||
api.video.setLabel({
|
api.video.setLabel({
|
||||||
data: {
|
query: {
|
||||||
parentId: 0,
|
tagName: labelKeyword.value,
|
||||||
name: labelKeyword.value,
|
|
||||||
}
|
}
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code == 200) {
|
if (rs.code == 200) {
|
||||||
getLabel()
|
label.list.length = 0
|
||||||
|
// 标签列表输出
|
||||||
|
label.list.push(rs.data)
|
||||||
|
label.total = 1
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +240,7 @@
|
||||||
*/
|
*/
|
||||||
function handleSelectLabel(ev, index) {
|
function handleSelectLabel(ev, index) {
|
||||||
// 是否包含
|
// 是否包含
|
||||||
const findIndex = labelSelect.findIndex(item => item.id == ev.id)
|
const findIndex = labelSelect.findIndex(item => item.tagId == ev.tagId)
|
||||||
if (findIndex < 0) labelSelect.push(ev)
|
if (findIndex < 0) labelSelect.push(ev)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,56 +307,52 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// 发布视频
|
// 发布视频
|
||||||
function handleSubmit(isDraft) {
|
function handleSubmit(status) {
|
||||||
const data = {
|
const data = {
|
||||||
...form
|
...form
|
||||||
}
|
}
|
||||||
let fnName = 'publishVideo'
|
// let fnName = 'publishVideo'
|
||||||
|
|
||||||
// 如果是编辑
|
// // 如果是编辑
|
||||||
if (form.videoId) {
|
// if (form.videoId) {
|
||||||
fnName = 'updateVideo'
|
// fnName = 'updateVideo'
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 0正常1草稿
|
//视频状态 0草稿 1待审核 2审核失败 3已发布 4已下架
|
||||||
data.isDraft = isDraft ? isDraft : 0
|
data.status = status ? status : 0
|
||||||
|
console.log('data', data)
|
||||||
|
|
||||||
// 验证必填项
|
// 验证必填项
|
||||||
if (!data.videoUrl) {
|
if (!data.videoUrl) {
|
||||||
util.alert('视频不能为空')
|
util.alert('视频不能为空')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!data.imageUrl) {
|
if (!data.coverUrl) {
|
||||||
util.alert('封面不能为空')
|
util.alert('封面不能为空')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.isDraft == 0) {
|
if (data.status == 1) {
|
||||||
if (!data.title) {
|
if (!data.title) {
|
||||||
util.alert('标题不能为空')
|
util.alert('标题不能为空')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!data.content) {
|
if (!data.description) {
|
||||||
util.alert('正文不能为空')
|
util.alert('正文不能为空')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 如果有选择的标签
|
// 如果有选择的标签
|
||||||
if (labelSelect[0]) {
|
if (labelSelect[0]) {
|
||||||
data.talkId = labelSelect.map(item => item.id).join(',')
|
data.tags = labelSelect.map(item => item.tagId).join(',')
|
||||||
data.talk = labelSelect.map(item => item.name).join(',')
|
|
||||||
}
|
}
|
||||||
if (userSelect[0]) {
|
// if (userSelect[0]) {
|
||||||
data.subscriberId = userSelect.map(item => item.userId).join(',')
|
// data.subscriberId = userSelect.map(item => item.userId).join(',')
|
||||||
data.subscriber = userSelect.map(item => item.userNickname).join(',')
|
// data.subscriber = userSelect.map(item => item.userNickname).join(',')
|
||||||
}
|
// }
|
||||||
|
|
||||||
//
|
|
||||||
data.videoUrl = util.replace_url(data.videoUrl)
|
|
||||||
data.imageUrl = util.replace_url(data.imageUrl)
|
|
||||||
|
|
||||||
// 发布
|
// 发布
|
||||||
api.video[fnName]({
|
api.video.publishVideo({
|
||||||
data,
|
data,
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code == 200) {
|
if (rs.code == 200) {
|
||||||
|
@ -372,8 +379,8 @@
|
||||||
<view class="line mtb20">
|
<view class="line mtb20">
|
||||||
<view class="key">上传封面</view>
|
<view class="key">上传封面</view>
|
||||||
<view class="value mt20 imgList">
|
<view class="value mt20 imgList">
|
||||||
<view class="imgs wh200 br10" v-if="form.imageUrl">
|
<view class="imgs wh200 br10" v-if="form.coverUrl">
|
||||||
<image :src="form.imageUrl" class="br10" mode="aspectFill" />
|
<image :src="form.coverUrl" class="br10" mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
<view class="imgs wh200 upload fmid bfff br10" v-else @click="uploadImg">
|
<view class="imgs wh200 upload fmid bfff br10" v-else @click="uploadImg">
|
||||||
<uni-icons type="plusempty" color="#E8E8E8" size="50rpx" />
|
<uni-icons type="plusempty" color="#E8E8E8" size="50rpx" />
|
||||||
|
@ -395,18 +402,19 @@
|
||||||
|
|
||||||
<view class="main mtb20 plr20 br20">
|
<view class="main mtb20 plr20 br20">
|
||||||
<view class="title ptb20">
|
<view class="title ptb20">
|
||||||
<input type="text" class="f32" placeholder="填写标题会有更多曝光率哦~" placeholder-class="placeholderStyle" v-model="form.title" />
|
<input type="text" class="f32" placeholder="填写标题会有更多曝光率哦~" placeholder-class="placeholderStyle"
|
||||||
|
v-model="form.title" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="content ptb10">
|
<view class="content ptb10">
|
||||||
<textarea class="textarea f32" v-model="form.content" placeholder="添加正文" />
|
<textarea class="textarea f32" v-model="form.description" placeholder="添加正文" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 标签 -->
|
<!-- 标签 -->
|
||||||
<view class="labels items mt20 df fww c333 f28" v-if="labelSelect[0]">
|
<view class="labels items mt20 df fww c333 f28" v-if="labelSelect[0]">
|
||||||
<view class="item fmid mr20 mb20 plr20 bar" v-for="(item,index) in labelSelect" :key="index">
|
<view class="item fmid mr20 mb20 plr20 bar" v-for="(item,index) in labelSelect" :key="index">
|
||||||
<view class="mr10">#{{item.name}}</view>
|
<view class="mr10">#{{item.tagName}}</view>
|
||||||
<uni-icons type="closeempty" size="28rpx" @click="handleLabelSelectDel(item,index)" />
|
<uni-icons type="closeempty" size="28rpx" @click="handleLabelSelectDel(item,index)" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -444,8 +452,8 @@
|
||||||
<view class="fill" style="height: 150rpx;"></view>
|
<view class="fill" style="height: 150rpx;"></view>
|
||||||
|
|
||||||
<view class="footer rows plr30 bfff shadow">
|
<view class="footer rows plr30 bfff shadow">
|
||||||
<view class="btn bar lg disabled w180" @click="handleSubmit(1)">存草稿</view>
|
<view class="btn bar lg disabled w180" @click="handleSubmit(0)">存草稿</view>
|
||||||
<view class="btn bar lg colourful f1 ml30" @click="handleSubmit(0)">发布作品</view>
|
<view class="btn bar lg colourful f1 ml30" @click="handleSubmit(1)">发布作品</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
@ -456,12 +464,13 @@
|
||||||
<view class="title c333 f34 tac">话题列表</view>
|
<view class="title c333 f34 tac">话题列表</view>
|
||||||
<!-- 可选的列表 -->
|
<!-- 可选的列表 -->
|
||||||
<view class="mt20">
|
<view class="mt20">
|
||||||
<scroll-view scroll-y="true" class="scroll">
|
<scroll-view scroll-y="true" class="scroll" @scrolltolower="getMoreLabel">
|
||||||
<view class="selection">
|
<view class="selection">
|
||||||
<view class="option df aic" v-for="(item,index) in labelList" :key="index" @click="handleSelectLabel(item,index)" :class="{
|
<view class="option df aic" v-for="(item,index) in label.list" :key="index"
|
||||||
active: labelSelect.map(node => node.id).includes(item.id)
|
@click="handleSelectLabel(item,index)" :class="{
|
||||||
|
active: labelSelect.map(node => node.tagId).includes(item.tagId)
|
||||||
}">
|
}">
|
||||||
<text class="thd f1">#{{item.name}}</text>
|
<text class="thd f1">#{{item.tagName}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
@ -470,7 +479,7 @@
|
||||||
<!-- 结果 -->
|
<!-- 结果 -->
|
||||||
<view class="reult items mt20 df fww c333 f28" v-if="labelSelect[0]">
|
<view class="reult items mt20 df fww c333 f28" v-if="labelSelect[0]">
|
||||||
<view class="item fmid mr20 mb20 plr20 bar" v-for="(item,index) in labelSelect" :key="index">
|
<view class="item fmid mr20 mb20 plr20 bar" v-for="(item,index) in labelSelect" :key="index">
|
||||||
<view class="mr10">#{{item.name}}</view>
|
<view class="mr10">#{{item.tagName}}</view>
|
||||||
<uni-icons type="closeempty" size="28rpx" @click="handleLabelSelectDel(item,index)" />
|
<uni-icons type="closeempty" size="28rpx" @click="handleLabelSelectDel(item,index)" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -479,7 +488,7 @@
|
||||||
<view class="editBox rows mt20 ptb10 plr20 br20">
|
<view class="editBox rows mt20 ptb10 plr20 br20">
|
||||||
<view class="c333 f28">#</view>
|
<view class="c333 f28">#</view>
|
||||||
<input class="f1" type="text" v-model="labelKeyword" placeholder="输入你想选择的话题" />
|
<input class="f1" type="text" v-model="labelKeyword" placeholder="输入你想选择的话题" />
|
||||||
<view class="" @click="getLabel">搜索</view>
|
<view class="" @click="refreshLabel">搜索</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
|
@ -492,7 +501,8 @@
|
||||||
<view class="mt20">
|
<view class="mt20">
|
||||||
<scroll-view scroll-y="true" class="scroll" @scrolltolower="getMoreUserList">
|
<scroll-view scroll-y="true" class="scroll" @scrolltolower="getMoreUserList">
|
||||||
<view class="selection">
|
<view class="selection">
|
||||||
<view class="option df aic" v-for="(item,index) in userList.data" :key="index" @click="handleSelectUser(item,index)" :class="{
|
<view class="option df aic" v-for="(item,index) in userList.data" :key="index"
|
||||||
|
@click="handleSelectUser(item,index)" :class="{
|
||||||
active: userSelect.map(node => node.userId).includes(item.userId)
|
active: userSelect.map(node => node.userId).includes(item.userId)
|
||||||
}">
|
}">
|
||||||
<text class="thd f1">@{{item.userNickname}}</text>
|
<text class="thd f1">@{{item.userNickname}}</text>
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
<view class="bfff content">
|
<view class="bfff content">
|
||||||
<!-- 筛选 -->
|
<!-- 筛选 -->
|
||||||
<JyScreen @status="statusScreening" :filteredList="filteredList"></JyScreen>
|
<!-- <JyScreen @status="statusScreening" :filteredList="filteredList"></JyScreen> -->
|
||||||
<!-- 内容 -->
|
<!-- 内容 -->
|
||||||
<JyContent :conditions="conditions"></JyContent>
|
<JyContent :conditions="conditions"></JyContent>
|
||||||
<!-- 筛选详情弹窗 -->
|
<!-- 筛选详情弹窗 -->
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
import JyStoreHead from './components/jy-store-head'
|
import JyStoreHead from './components/jy-store-head'
|
||||||
// import JyContent from '@/components/public/jy-shop-content'
|
// import JyContent from '@/components/public/jy-shop-content'
|
||||||
import JyScreen from '../search/components/jy-screen'
|
// import JyScreen from '../search/components/jy-screen'
|
||||||
// import JyStore from '../commodity/components/jy-store'
|
// import JyStore from '../commodity/components/jy-store'
|
||||||
const conditions = ref({})
|
const conditions = ref({})
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
com.taluokeji.jiuiyi
|
com.taluokeji.jiuiyi
|
||||||
证书密码
|
证书密码
|
||||||
123123
|
123123
|
||||||
|
密钥库密码
|
||||||
|
123123
|
||||||
国家简写
|
国家简写
|
||||||
CN
|
CN
|
||||||
省份
|
省份
|
||||||
|
@ -201,7 +203,6 @@ isShop
|
||||||
3 后台驳回 责令修改 说明原因
|
3 后台驳回 责令修改 说明原因
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
榴莲果园
|
榴莲果园
|
||||||
按照级别正序
|
按照级别正序
|
||||||
显示种子数量和榴莲果数量置换
|
显示种子数量和榴莲果数量置换
|
||||||
|
@ -346,3 +347,9 @@ call_type 通话类型 2为视频,1是音频
|
||||||
|
|
||||||
长按二倍速
|
长按二倍速
|
||||||
|
|
||||||
|
发布
|
||||||
|
视频列表
|
||||||
|
有效读秒
|
||||||
|
释放榴莲果
|
||||||
|
钱包
|
||||||
|
释放
|
||||||
|
|
|
@ -11,7 +11,12 @@ export default createStore({
|
||||||
// 闹钟时间
|
// 闹钟时间
|
||||||
alarmTime: '',
|
alarmTime: '',
|
||||||
// 资产
|
// 资产
|
||||||
property: {},
|
purse: {
|
||||||
|
balance: 0,
|
||||||
|
fruit: 0,
|
||||||
|
score: 0,
|
||||||
|
seed: 0,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
mutations: {
|
mutations: {
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
jiuyi2/unpackage/cache/wgt/__UNI__08B31BC/pages/index/wallet/merchantBill.css
vendored
Normal file
1
jiuyi2/unpackage/cache/wgt/__UNI__08B31BC/pages/index/wallet/merchantBill.css
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
.uni-tag[data-v-c3d81dd8]{line-height:14px;font-size:12px;font-weight:200;padding:4px 7px;color:#fff;border-radius:3px;background-color:#8f939c;border-width:1px;border-style:solid;border-color:#8f939c}.uni-tag--default[data-v-c3d81dd8]{font-size:12px}.uni-tag--default--inverted[data-v-c3d81dd8]{color:#8f939c;border-color:#8f939c}.uni-tag--small[data-v-c3d81dd8]{padding:2px 5px;font-size:12px;border-radius:2px}.uni-tag--mini[data-v-c3d81dd8]{padding:1px 3px;font-size:12px;border-radius:2px}.uni-tag--primary[data-v-c3d81dd8]{background-color:#2979ff;border-color:#2979ff;color:#fff}.uni-tag--success[data-v-c3d81dd8]{color:#fff;background-color:#18bc37;border-color:#18bc37}.uni-tag--warning[data-v-c3d81dd8]{color:#fff;background-color:#f3a73f;border-color:#f3a73f}.uni-tag--error[data-v-c3d81dd8]{color:#fff;background-color:#e43d33;border-color:#e43d33}.uni-tag--primary--inverted[data-v-c3d81dd8]{color:#2979ff;border-color:#2979ff}.uni-tag--success--inverted[data-v-c3d81dd8]{color:#18bc37;border-color:#18bc37}.uni-tag--warning--inverted[data-v-c3d81dd8]{color:#f3a73f;border-color:#f3a73f}.uni-tag--error--inverted[data-v-c3d81dd8]{color:#e43d33;border-color:#e43d33}.uni-tag--inverted[data-v-c3d81dd8]{background-color:#fff}.uni-tag--circle[data-v-c3d81dd8]{border-radius:15px}.uni-tag--mark[data-v-c3d81dd8]{border-radius:0 15px 15px 0}.uni-tag--disabled[data-v-c3d81dd8]{opacity:.5}.uni-tag-text[data-v-c3d81dd8]{color:#fff;font-size:14px}.uni-tag-text--primary[data-v-c3d81dd8]{color:#2979ff}.uni-tag-text--success[data-v-c3d81dd8]{color:#18bc37}.uni-tag-text--warning[data-v-c3d81dd8]{color:#f3a73f}.uni-tag-text--error[data-v-c3d81dd8]{color:#e43d33}.uni-tag-text--small[data-v-c3d81dd8]{font-size:12px}.uni-section[data-v-c170a3ad]{background-color:#fff}.uni-section .uni-section-header[data-v-c170a3ad]{position:relative;display:flex;flex-direction:row;align-items:center;padding:12px 10px;font-weight:400}.uni-section .uni-section-header__decoration[data-v-c170a3ad]{margin-right:6px;background-color:#2979ff}.uni-section .uni-section-header__decoration.line[data-v-c170a3ad]{width:4px;height:12px;border-radius:10px}.uni-section .uni-section-header__decoration.circle[data-v-c170a3ad]{width:8px;height:8px;border-radius:50px}.uni-section .uni-section-header__decoration.square[data-v-c170a3ad]{width:8px;height:8px}.uni-section .uni-section-header__content[data-v-c170a3ad]{display:flex;flex-direction:column;flex:1;color:#333}.uni-section .uni-section-header__content .distraction[data-v-c170a3ad]{flex-direction:row;align-items:center}.uni-section .uni-section-header__content-sub[data-v-c170a3ad]{margin-top:2px}.uni-section .uni-section-header__slot-right[data-v-c170a3ad],.uni-section .uni-section-content[data-v-c170a3ad]{font-size:14px}.shop-image[data-v-e643ad19]{height:5.125rem;width:5.125rem;background-color:#d8d8d8;border-radius:.3125rem;margin-right:.3125rem}[data-v-e643ad19] .uni-section-header{padding:0!important}[data-v-e643ad19] .uni-section-header .uni-section-header__content,[data-v-e643ad19] .uni-section-header .uni-section-header__slot-right{height:5.125rem}.commodity-name[data-v-e643ad19]{height:100%;display:flex;flex-direction:column}.commodity-name-title[data-v-e643ad19]{color:#333;font-size:.875rem;font-weight:400;margin-bottom:.25rem}.commodity-name-ks[data-v-e643ad19]{font-size:.75rem;color:#999}.commodity-name-2[data-v-e643ad19]{justify-content:space-between}.commodity-name-1[data-v-e643ad19]{justify-content:flex-start}.go-buy[data-v-e643ad19]{height:100%;display:flex;flex-direction:column-reverse}.price-num[data-v-e643ad19]{display:flex;flex-direction:column;align-items:flex-end;margin-left:.625rem}.price-num .price[data-v-e643ad19]{color:#3d3d3d}.jg[data-v-e643ad19]{margin-right:.125rem}.xl[data-v-e643ad19]{color:#8c8c8c}.jy-bottom-btn-ghost[data-v-f45f8c4a]{height:6.25rem}.jy-bottom-btn[data-v-f45f8c4a]{bottom:0;display:flex;justify-content:center;align-items:center;background-color:#fff;position:fixed;width:100%}.bottom-btn[data-v-f45f8c4a]{background:linear-gradient(270deg,#ff9b27 20%,#fdc123 103%);font-size:1rem;color:#fff;width:100%;margin:.625rem}.select-card[data-v-c4a833a6]{background-color:#fff;margin-bottom:1.25rem}.checkbox-list[data-v-c4a833a6]{display:flex;flex-direction:row;align-items:center;padding:0 .625rem}.date[data-v-c4a833a6]{margin:.75rem .75rem 0}[data-v-c4a833a6] .uni-checkbox-input{border-radius:50%}
|
|
|
@ -1 +0,0 @@
|
||||||
.uni-tag[data-v-c3d81dd8]{line-height:14px;font-size:12px;font-weight:200;padding:4px 7px;color:#fff;border-radius:3px;background-color:#8f939c;border-width:1px;border-style:solid;border-color:#8f939c}.uni-tag--default[data-v-c3d81dd8]{font-size:12px}.uni-tag--default--inverted[data-v-c3d81dd8]{color:#8f939c;border-color:#8f939c}.uni-tag--small[data-v-c3d81dd8]{padding:2px 5px;font-size:12px;border-radius:2px}.uni-tag--mini[data-v-c3d81dd8]{padding:1px 3px;font-size:12px;border-radius:2px}.uni-tag--primary[data-v-c3d81dd8]{background-color:#2979ff;border-color:#2979ff;color:#fff}.uni-tag--success[data-v-c3d81dd8]{color:#fff;background-color:#18bc37;border-color:#18bc37}.uni-tag--warning[data-v-c3d81dd8]{color:#fff;background-color:#f3a73f;border-color:#f3a73f}.uni-tag--error[data-v-c3d81dd8]{color:#fff;background-color:#e43d33;border-color:#e43d33}.uni-tag--primary--inverted[data-v-c3d81dd8]{color:#2979ff;border-color:#2979ff}.uni-tag--success--inverted[data-v-c3d81dd8]{color:#18bc37;border-color:#18bc37}.uni-tag--warning--inverted[data-v-c3d81dd8]{color:#f3a73f;border-color:#f3a73f}.uni-tag--error--inverted[data-v-c3d81dd8]{color:#e43d33;border-color:#e43d33}.uni-tag--inverted[data-v-c3d81dd8]{background-color:#fff}.uni-tag--circle[data-v-c3d81dd8]{border-radius:15px}.uni-tag--mark[data-v-c3d81dd8]{border-radius:0 15px 15px 0}.uni-tag--disabled[data-v-c3d81dd8]{opacity:.5}.uni-tag-text[data-v-c3d81dd8]{color:#fff;font-size:14px}.uni-tag-text--primary[data-v-c3d81dd8]{color:#2979ff}.uni-tag-text--success[data-v-c3d81dd8]{color:#18bc37}.uni-tag-text--warning[data-v-c3d81dd8]{color:#f3a73f}.uni-tag-text--error[data-v-c3d81dd8]{color:#e43d33}.uni-tag-text--small[data-v-c3d81dd8]{font-size:12px}.uni-section[data-v-c170a3ad]{background-color:#fff}.uni-section .uni-section-header[data-v-c170a3ad]{position:relative;display:flex;flex-direction:row;align-items:center;padding:12px 10px;font-weight:400}.uni-section .uni-section-header__decoration[data-v-c170a3ad]{margin-right:6px;background-color:#2979ff}.uni-section .uni-section-header__decoration.line[data-v-c170a3ad]{width:4px;height:12px;border-radius:10px}.uni-section .uni-section-header__decoration.circle[data-v-c170a3ad]{width:8px;height:8px;border-radius:50px}.uni-section .uni-section-header__decoration.square[data-v-c170a3ad]{width:8px;height:8px}.uni-section .uni-section-header__content[data-v-c170a3ad]{display:flex;flex-direction:column;flex:1;color:#333}.uni-section .uni-section-header__content .distraction[data-v-c170a3ad]{flex-direction:row;align-items:center}.uni-section .uni-section-header__content-sub[data-v-c170a3ad]{margin-top:2px}.uni-section .uni-section-header__slot-right[data-v-c170a3ad],.uni-section .uni-section-content[data-v-c170a3ad]{font-size:14px}.shop-image[data-v-e643ad19]{height:5.125rem;width:5.125rem;background-color:#d8d8d8;border-radius:.3125rem;margin-right:.3125rem}[data-v-e643ad19] .uni-section-header{padding:0!important}[data-v-e643ad19] .uni-section-header .uni-section-header__content,[data-v-e643ad19] .uni-section-header .uni-section-header__slot-right{height:5.125rem}.commodity-name[data-v-e643ad19]{height:100%;display:flex;flex-direction:column}.commodity-name-title[data-v-e643ad19]{color:#333;font-size:.875rem;font-weight:400;margin-bottom:.25rem}.commodity-name-ks[data-v-e643ad19]{font-size:.75rem;color:#999}.commodity-name-2[data-v-e643ad19]{justify-content:space-between}.commodity-name-1[data-v-e643ad19]{justify-content:flex-start}.go-buy[data-v-e643ad19]{height:100%;display:flex;flex-direction:column-reverse}.price-num[data-v-e643ad19]{display:flex;flex-direction:column;align-items:flex-end;margin-left:.625rem}.price-num .price[data-v-e643ad19]{color:#3d3d3d}.jg[data-v-e643ad19]{margin-right:.125rem}.xl[data-v-e643ad19]{color:#8c8c8c}[data-v-c8fe47f5] .uni-section-header{align-items:flex-start;padding:.75rem 0!important}.head-portrait[data-v-c8fe47f5]{width:2rem;height:2rem;background:#999;border-radius:50%;margin-right:.625rem}.select-card[data-v-c9bb3328]{background-color:#fff;margin-bottom:1.25rem;padding:.625rem 1.25rem}.checkbox-list[data-v-c9bb3328]{display:flex;flex-direction:row;align-items:center;padding:0 .625rem}[data-v-c9bb3328] .uni-checkbox-input{border-radius:50%}.content-bottom[data-v-c9bb3328]{display:flex;flex-direction:row;align-items:center;justify-content:space-around;position:fixed;width:100%;background-color:#fff;padding:1.25rem 0}.content-bottom .content-bottom-price[data-v-c9bb3328]{margin:0;width:10.9375rem;line-height:normal;border-radius:.3125rem;background:linear-gradient(270deg,#ff9b27 20%,#fdc123 103%);display:flex;flex-direction:column;align-items:center;padding:.875rem 2.6875rem}
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
.uni-popup[data-v-ee521468]{position:fixed;z-index:99}.uni-popup.top[data-v-ee521468],.uni-popup.left[data-v-ee521468],.uni-popup.right[data-v-ee521468]{top:0}.uni-popup .uni-popup__wrapper[data-v-ee521468]{display:block;position:relative}.uni-popup .uni-popup__wrapper.left[data-v-ee521468],.uni-popup .uni-popup__wrapper.right[data-v-ee521468]{padding-top:0;flex:1}.fixforpc-z-index[data-v-ee521468]{z-index:999}.fixforpc-top[data-v-ee521468]{top:0}.bindAlt .hint{color:#a33}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
.container .line{margin:.9375rem;padding:.9375rem .78125rem;background-color:#fff;border-radius:.625rem}.container .line .title{color:#333;font-size:1.0625rem}.container .line .content{margin-top:.3125rem;color:#999;font-size:.8125rem}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
.app{background-color:#eaceb9}.background{width:100%}.notice{margin:0 3.75rem;bottom:3.75rem}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
.uni-tag[data-v-c3d81dd8]{line-height:14px;font-size:12px;font-weight:200;padding:4px 7px;color:#fff;border-radius:3px;background-color:#8f939c;border-width:1px;border-style:solid;border-color:#8f939c}.uni-tag--default[data-v-c3d81dd8]{font-size:12px}.uni-tag--default--inverted[data-v-c3d81dd8]{color:#8f939c;border-color:#8f939c}.uni-tag--small[data-v-c3d81dd8]{padding:2px 5px;font-size:12px;border-radius:2px}.uni-tag--mini[data-v-c3d81dd8]{padding:1px 3px;font-size:12px;border-radius:2px}.uni-tag--primary[data-v-c3d81dd8]{background-color:#2979ff;border-color:#2979ff;color:#fff}.uni-tag--success[data-v-c3d81dd8]{color:#fff;background-color:#18bc37;border-color:#18bc37}.uni-tag--warning[data-v-c3d81dd8]{color:#fff;background-color:#f3a73f;border-color:#f3a73f}.uni-tag--error[data-v-c3d81dd8]{color:#fff;background-color:#e43d33;border-color:#e43d33}.uni-tag--primary--inverted[data-v-c3d81dd8]{color:#2979ff;border-color:#2979ff}.uni-tag--success--inverted[data-v-c3d81dd8]{color:#18bc37;border-color:#18bc37}.uni-tag--warning--inverted[data-v-c3d81dd8]{color:#f3a73f;border-color:#f3a73f}.uni-tag--error--inverted[data-v-c3d81dd8]{color:#e43d33;border-color:#e43d33}.uni-tag--inverted[data-v-c3d81dd8]{background-color:#fff}.uni-tag--circle[data-v-c3d81dd8]{border-radius:15px}.uni-tag--mark[data-v-c3d81dd8]{border-radius:0 15px 15px 0}.uni-tag--disabled[data-v-c3d81dd8]{opacity:.5}.uni-tag-text[data-v-c3d81dd8]{color:#fff;font-size:14px}.uni-tag-text--primary[data-v-c3d81dd8]{color:#2979ff}.uni-tag-text--success[data-v-c3d81dd8]{color:#18bc37}.uni-tag-text--warning[data-v-c3d81dd8]{color:#f3a73f}.uni-tag-text--error[data-v-c3d81dd8]{color:#e43d33}.uni-tag-text--small[data-v-c3d81dd8]{font-size:12px}.uni-section[data-v-c170a3ad]{background-color:#fff}.uni-section .uni-section-header[data-v-c170a3ad]{position:relative;display:flex;flex-direction:row;align-items:center;padding:12px 10px;font-weight:400}.uni-section .uni-section-header__decoration[data-v-c170a3ad]{margin-right:6px;background-color:#2979ff}.uni-section .uni-section-header__decoration.line[data-v-c170a3ad]{width:4px;height:12px;border-radius:10px}.uni-section .uni-section-header__decoration.circle[data-v-c170a3ad]{width:8px;height:8px;border-radius:50px}.uni-section .uni-section-header__decoration.square[data-v-c170a3ad]{width:8px;height:8px}.uni-section .uni-section-header__content[data-v-c170a3ad]{display:flex;flex-direction:column;flex:1;color:#333}.uni-section .uni-section-header__content .distraction[data-v-c170a3ad]{flex-direction:row;align-items:center}.uni-section .uni-section-header__content-sub[data-v-c170a3ad]{margin-top:2px}.uni-section .uni-section-header__slot-right[data-v-c170a3ad],.uni-section .uni-section-content[data-v-c170a3ad]{font-size:14px}[data-v-c8fe47f5] .uni-section-header{align-items:flex-start;padding:.75rem 0!important}.head-portrait[data-v-c8fe47f5]{width:2rem;height:2rem;background:#999;border-radius:50%;margin-right:.625rem}
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
.container{color:#333}.container .area{overflow:hidden;margin:.625rem;padding:0 .9375rem;background-color:#fff;border-radius:.625rem}.container .line+.line{border-top:.0625rem solid #eee}.container .title{font-size:.875rem}.container .textarea{width:100%;height:6.25rem}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
.list .item+.item[data-v-cea20373]{border-top:.0625rem solid #eee}
|
|
@ -0,0 +1 @@
|
||||||
|
.list .item .date[data-v-9faff707]{border-bottom:.0625rem solid #eee}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue