first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,147 @@
<template>
<div class="comment" >
<p class=".pp1">
全部评论
</p>
<!-- 没有评论 -->
<div class="onea" v-if="abc.length == 0" >
<img src="../static/hm_bg_img_no.png" alt="">
<p class=".pp2">快来发表你的评论吧</p>
</div>
<!-- 有评论 -->
<div class="towa" v-else>
<div class="specific_content">
<div class="sc_top">
<div class="sctop_left"><img :src="vlist.image"/>
<div class="sctop_center">
<p class="pp1">{{ vlist.nick_name }}</p>
<p class="pp2">{{ create_time }}</p>
</div>
</div>
<div class="sctop_right"><img src="/img/icon/give_thumbs-up.png"/>
<p>{{ vlist.praise_count }}</p>
</div>
</div>
<div class="sc_bottom">
<p>{{ vlist.content }}</p>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
props:{
abc:{
type:Array,
default:()=>[]
},
vlist:{
type:Array,
default:() => []
},
},
data() {
return {
id:[],
list:[]
}
},
created() {
},
methods: {
},
components: {
},
};
</script>
<style lang="less" scoped>
.comment{
margin-left: 12px;
.pp1{
font-size: 16px;
color: #333333;
}
.onea{
text-align: center;
margin-bottom: 20px;
img{
width: 208.5px;
height: 174.5px;
}
p{
margin-top: 25.5px;
font-size: 14px;
line-height: 16.8px;
color: #999999;
}
}
.towa{
.specific_content {
.sc_top {
display: flex;
justify-content: space-between;
height: 1.4rem;
img {
}
.sctop_left {
display: flex;
img {
width: 0.933rem;
height: 0.933rem;
padding: 0;
margin: 0;
}
.pp1 {
font-size: 0.373rem;
color: #000000;
}
.pp2 {
font-size: 0.267rem;
color: #999999;
margin: 0;
text-align: inherit;
}
}
.sctop_right {
display: flex;
text-align: center;
margin-top: 0.507rem;
img {
width: 0.347rem;
height: 0.36rem;
margin: 0;
}
p {
font-size: 0.32rem;
color: #999999;
}
}
}
.sc_bottom {
margin-left: 1.507rem;
margin-right: 0.52rem;
p {
font-size: 0.373rem;
color: #000000;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,108 @@
<template>
<view v-if="width" :style="'width:'+width+';'+(square?'height:'+width:'')" class="uni-grid-item">
<view :class="{ 'uni-grid-item--border': showBorder, 'uni-grid-item--border-top': showBorder && index < column, 'uni-highlight': highlight }"
:style="{ 'border-right-color': borderColor ,'border-bottom-color': borderColor ,'border-top-color': borderColor }"
class="uni-grid-item__box" @click="_onClick">
<slot />
</view>
</view>
</template>
<script>
export default {
name: 'UniGridItem',
inject: ['grid'],
props: {
index:{
type: Number,
default: 0
}
},
data() {
return {
column: 0,
showBorder: true,
square: true,
highlight: true,
left: 0,
top: 0,
openNum: 2,
width: 0,
borderColor: '#e5e5e5'
}
},
created() {
this.column = this.grid.column
this.showBorder = this.grid.showBorder
this.square = this.grid.square
this.highlight = this.grid.highlight
this.top = this.hor === 0 ? this.grid.hor : this.hor
this.left = this.ver === 0 ? this.grid.ver : this.ver
this.borderColor = this.grid.borderColor
this.grid.children.push(this)
// this.grid.init()
this.width = this.grid.width
},
beforeDestroy() {
this.grid.children.forEach((item, index) => {
if (item === this) {
this.grid.children.splice(index, 1)
}
})
},
methods: {
_onClick() {
this.grid.change({
detail: {
index: this.index
}
})
}
}
}
</script>
<style lang="scss" scoped>
.uni-grid-item {
/* #ifndef APP-NVUE */
height: 100%;
display: flex;
/* #endif */
}
.uni-grid-item__box {
/* #ifndef APP-NVUE */
display: flex;
width: 100%;
/* #endif */
position: relative;
flex: 1;
flex-direction: column;
// justify-content: center;
// align-items: center;
}
.uni-grid-item--border {
position: relative;
border-bottom-color: $uni-border-color;
border-bottom-style: solid;
border-bottom-width: 1px;
border-right-color: $uni-border-color;
border-right-style: solid;
border-right-width: 1px;
}
.uni-grid-item--border-top {
border-top-color: $uni-border-color;
border-top-style: solid;
border-top-width: 1px;
/* #ifndef APP-NVUE */
height: 100%;
box-sizing: border-box;
/* #endif */
}
.uni-highlight:active {
background-color: $uni-bg-color-hover;
}
</style>

View File

@@ -0,0 +1,120 @@
<template>
<view class="uni-grid-wrap">
<view :id="elId" ref="uni-grid" class="uni-grid" :class="{ 'uni-grid--border': showBorder }" :style="{ 'border-left-style':'solid','border-left-color':borderColor, 'border-left-width':showBorder?'1px':0 }">
<slot />
</view>
</view>
</template>
<script>
// #ifdef APP-NVUE
const dom = uni.requireNativePlugin('dom');
// #endif
export default {
name: 'UniGrid',
props: {
// 每列显示个数
column: {
type: Number,
default: 3
},
// 是否显示边框
showBorder: {
type: Boolean,
default: true
},
// 边框颜色
borderColor: {
type: String,
default: '#e5e5e5'
},
// 是否正方形显示,默认为 true
square: {
type: Boolean,
default: true
},
highlight: {
type: Boolean,
default: true
}
},
provide() {
return {
grid: this
}
},
data() {
const elId = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`
return {
elId,
width: 0
}
},
created() {
this.children = []
},
mounted() {
this.init()
},
methods: {
init() {
setTimeout(() => {
this._getSize((width) => {
this.children.forEach((item, index) => {
item.width = width
})
})
}, 50)
},
change(e) {
this.$emit('change', e)
},
_getSize(fn) {
// #ifndef APP-NVUE
uni.createSelectorQuery()
.in(this)
.select(`#${this.elId}`)
.boundingClientRect()
.exec(ret => {
this.width = parseInt((ret[0].width-1) / this.column) + 'px'
fn(this.width)
})
// #endif
// #ifdef APP-NVUE
dom.getComponentRect(this.$refs['uni-grid'], (ret) => {
this.width = parseInt((ret.size.width-1) / this.column) + 'px'
fn(this.width)
})
// #endif
}
}
}
</script>
<style lang="scss" scoped>
.uni-grid-wrap {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex: 1;
flex-direction: column;
/* #ifdef H5 */
width: 100%;
/* #endif */
}
.uni-grid {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
// flex: 1;
flex-direction: row;
flex-wrap: wrap;
}
.uni-grid--border {
border-left-color: $uni-border-color;
border-left-style: solid;
border-left-width: 1px;
}
</style>

View File

@@ -0,0 +1,138 @@
<template lang="pug">
.viedo-detail
.recommend-title 相关推荐
.recommend-video1( v-if=" theme == 't1' " )
router-link.item(tag="div" v-for="(v,i) in vlist "
:to="{ name: 'Videoinfo', query: { id: v.id } }"
)
.re-top
img( :src=" v.cover ")
span
p.re-bottom {{ v.title }}
.recommend-video2( v-else )
router-link.item(tag="div" v-for="(v,i) in vlist "
:to="{ name: 'Videoinfo', query: { id: v.id } }"
)
.re-left
p {{ v.title }}
span {{ v.create_time }}
img.re-right( :src=" v.icon " )
//- :src=" v.icon "
</template>
<script>
export default {
props:{
theme:{
type: String,
default: 't1'
},
vlist:{
type:Array,
default:() => []
}
},
data() {
return {
}
},
created() {
},
methods: {
// randomId () {
// return this.$route.fullPath + Math.random()
// },
//async Getvideo(){
// let res = await this.$api.video.videoDetail({
// })
// this.vlist = res.recommend;
// console.log('vlist',this.vlist);
// }
},
components: {
},
};
</script>
<style lang="less" scoped>
.viedo-detail{
padding-top: 0.48rem;
.recommend-title{
font-size: 0.427rem;
color: #333333;
margin-bottom: 0.147rem;
font-weight: bold;
}
.recommend-video1{
margin-top: 0.5rem;
display: flex;
align-content: center;
justify-content: space-between;
overflow-x: scroll;
.item{
margin-right: 0.133rem;
width: 3.653rem;
flex-shrink: 0;
.re-top{
width: 100%;
position: relative;
img{
width: 100%;
height: 2.08rem;
border-radius: 0.053rem;
}
span{
font-size: 0.293rem;
color: #ffffff;
position: absolute;
right: 0.187rem;
top: 1.667rem;
}
}
.re-bottom{
font-size: 0.373rem;
color: #333333;
}
}
}
.recommend-video2{
.item{
display: flex;
justify-content: space-between;
padding-bottom: 0.627rem;
border-bottom: 1px solid #e5e5e5;
padding-top: 0.427rem;
.re-left{
flex: 1;
p{
font-size: 0.427rem;
line-height: 0.667rem;
color: #333333;
}
span{
font-size: 0.32rem;
line-height: 0.747rem;
color: #999999;
}
}
.re-right{
width: 3.013rem;
height: 2.267rem;
border-radius: 0.053rem;
}
}
}
}
</style>