ios 首页 任务 我的 修改

This commit is contained in:
duan
2024-12-30 22:30:10 +08:00
parent 9a52daeffe
commit c978fab954
33 changed files with 3400 additions and 696 deletions

View File

@@ -0,0 +1,127 @@
<template>
<view>
<view class="df" style=" justify-content: space-around;flex-wrap: wrap; margin-top: 10rpx;">
<view style="border-radius:21rpx 21rpx 21rpx 21rpx;width: 33%;text-align: center;margin-top: 20rpx;padding:0 26rpx;"
class="liststyle" v-for="item in $props.list" :key="item">
<image :src="item.titleImg" style="width: 188rpx;height: 247rpx;border-radius:21rpx 21rpx 21rpx 21rpx"
mode=""></image>
<view style="font-weight: 400;font-size: 25rpx;color: #333333;text-align: left;">
{{item.title.slice(0,6)}}
</view>
<view style="font-weight: 400;font-size: 21rpx;color: #999999;text-align: left;">
{{item.courseLabel}}
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
list: {
type: Array,
default: []
},
},
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
.zuijin {
width: 100%;
margin-top: 26rpx;
.GpkmladwbU {
width: 700rpx;
height: 100%;
flex-wrap: wrap;
}
.kjFVivdwbz {
width: calc((700rpx - 40rpx) / 3);
height: 100%;
margin-bottom: 30rpx;
margin-right: calc(40rpx / 2);
}
.kjFVivdwbz:nth-of-type(3n) {
margin-right: 0;
}
.MXdwbIHrMo {
width: 100%;
// height: 204rpx;
height: 204rpx;
border-radius: 24rpx 24rpx 0 0;
position: relative;
image {
width: 100%;
height: 100%;
border-radius: 24rpx 24rpx 0 0;
}
.kpdwbbDLKT {
position: absolute;
bottom: 10rpx;
right: 0;
max-width: 80%;
border-radius: 10rpx;
background-color: rgba(51, 51, 51, 0.7);
color: #FFFFFF;
font-size: 22rpx;
padding: 10rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.gSSSCWdwbD {
width: 100%;
height: 100rpx;
background-color: #ffffff;
border-radius: 0 0 24rpx 24rpx;
align-content: center;
}
.dwbkFoLNxI {
width: 100%;
padding: 0 20rpx;
color: #333333;
font-size: 30rpx;
font-weight: bold;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.kemrdwbYSM {
width: 100%;
padding: 0 20rpx;
color: #999999;
font-size: 22rpx;
}
}
.liststyle:last-child {
margin-right: auto;
margin-left: 6rpx;
}
.df {
display: flex;
align-items: center;
}
</style>

View File

@@ -445,7 +445,7 @@
this.videoInfo = []
}
httpsRequest.getT("app/common/type/919", {}).then(res => {
httpsRequest.getT("/app/common/type/919", {}).then(res => {
if (res.code == 0) {
const sysInfo = uni.getSystemInfoSync();
let isIos = sysInfo.platform == 'ios'

159
pages/index/index2.vue Normal file
View File

@@ -0,0 +1,159 @@
<template>
<view>
<view style="height: 555rpx;position: relative;">
<image src="../../static/indexbh.png" style="width: 100%;height: 555rpx;position: absolute;" mode="">
</image>
<view style="display: flex;align-items: center;justify-content: space-between; padding: 88rpx 25rpx;">
<image src="../../static/logo.png" style="width: 187rpx;height:50rpx;" mode=""></image>
<view style="z-index: 50;width: 236rpx;line-height: 43rpx;background: rgba(255,255,255,0.29);border-radius: 7rpx 7rpx 7rpx 7rpx;
font-weight: 400;font-size: 21rpx;color: rgba(255,255,255,0.85);display: flex;align-items: center;"
@tap="moreVideo">
<uni-icons type="search" size="16" style="color: rgba(255,255,255,0.85);"></uni-icons>
点击搜索更多好剧
</view>
</view>
<template v-if="noticeList.length>0">
<view class="gongao">
<view class="gongaoicon">
公告
</view>
<swiper :autoplay="true" :vertical="true" :interval="4000" :circular="true" :indicator-dots="false"
class="swiperstyle">
<swiper-item @tap='goMsg(item.url)' v-for="(item, index) in noticeList">
<view style="height: 80rpx;line-height: 80rpx;">{{item.title}}</view>
</swiper-item>
</swiper>
</view>
</template>
</view>
<view style="display: flex;align-items: center;justify-content: space-between;padding:0 20rpx;">
<view style="background-color: #f0f0f0;margin-left:20rpx;padding:6rpx 20rpx" @tap="getrecomVideo('')">
最新
</view>
<view style="background-color: #f0f0f0;margin-left:20rpx;padding:6rpx 20rpx" @tap="getrecomVideo('1')">
排行
</view>
<view style="background-color: #f0f0f0;margin-left:20rpx;padding:6rpx 20rpx" @tap="getrecomVideo('2')">
最热
</view>
<view style="background-color: #f0f0f0;margin-left:20rpx;padding:6rpx 20rpx" @tap="getrecomVideo('1')">
剧情
</view>
<view style="background-color: #f0f0f0;margin-left:20rpx;padding:6rpx 20rpx" @tap="getrecomVideo('2')">
飙升
</view>
</view>
<view class="">
<contentlist :list='list'></contentlist>
</view>
</view>
</template>
<script>
import contentlist from './components/contentlist.vue'
export default {
components: {
contentlist
},
data() {
return {
noticeList: [], //公告列表
list: [],
page: 1
}
},
onShow() {
this.getMsg()
this.getrecomVideo()
},
onReachBottom() {
++this.page
this.getrecomVideo()
},
methods: {
moreVideo() {
uni.navigateTo({
url: '/pages/index/course/courseList?title=最新热播'
})
},
// 列表
//获取推荐视频
getrecomVideo(sort) {
if (sort) {
this.page = 1
}
let data = {
page: this.page,
limit: 12,
sort: sort,
classifyId: ''
}
this.$Request.getT('/app/course/selectCourse', data).then(res => {
if (res.code == 0) {
if (this.page == 1) {
this.list = res.data.list
} else {
this.list = [...this.list, ...res.data.list]
}
}
})
},
// 公告
getMsg() {
let data = {
page: 1,
limit: 5,
state: 1
}
this.$u.api.msg(data).then(res => {
if (res.code == 0) {
this.notice = res.data.list
res.data.list.forEach(res => {
this.noticeList.push(res)
})
} else {
uni.showToast({
title: res.msg,
duration: 1000,
icon: 'none'
});
}
})
},
}
}
</script>
<style scoped lang="scss">
.gongao {
position: absolute;
bottom: 75rpx;
left: 70rpx;
border-radius: 21rpx 21rpx 21rpx 21rpx;
width: 611rpx;
height: 78rpx;
background-color: rgba(255, 255, 255, .65);
display: flex;
align-items: center;
padding: 12rpx;
.gongaoicon {
color: #ffffff;
width: 98rpx;
height: 50rpx;
line-height: 50rpx;
text-align: center;
background-image: url('../../static/gonggaobg.png');
background-size: 98rpx 50rpx;
}
.swiperstyle {
height: 78rpx;
width: 80%;
}
}
</style>