Browse Source

首页,课程列表页UI修改

chanyi2.0
yanghao 3 years ago
parent
commit
bcdb86f31c
  1. 187
      pages/course/index.vue
  2. 108
      pages/home/components/ArticleList.vue
  3. 124
      pages/home/components/CourseList.vue
  4. 6
      pages/home/components/FirstNewProduct.vue
  5. 54
      pages/home/components/ListTitleBox.vue
  6. 95
      pages/home/components/StadyList.vue
  7. 7
      pages/home/index-copy.vue
  8. 437
      pages/home/index.vue
  9. BIN
      static/bangdanbg.png
  10. BIN
      static/idx-icon1.png
  11. BIN
      static/ji.png
  12. BIN
      static/tit1.png
  13. BIN
      static/tit2.png
  14. BIN
      static/tit3.png
  15. BIN
      static/tit4.png
  16. BIN
      static/tit5.png
  17. BIN
      static/tit6.png
  18. BIN
      static/yi.png

187
pages/course/index.vue

@ -1,46 +1,31 @@
<template>
<view class="konwledge-index index">
<!-- <view class="header header-search acea-row row-center-wrapper"> -->
<!-- <view @click="goGoodSearch()" class="search acea-row row-middle">
<text class="iconfont icon-xiazai5"></text>
搜索商品
</view> -->
<!-- #ifndef H5 -->
<!-- <view class="qr" @click="startQr()" v-if="$deviceType !== 'weixin'">
<image src="../../static/saoyisao-icon.png" />
</view> -->
<!-- #endif -->
<!-- </view> -->
<view class="content-box">
<view class="tab-box" :class="isFixedTop ? 'fixed' : ''">
<!-- <wuc-tab :tab-list="tabList" :tabCur.sync="TabCur" @change="tabChange"
tab-class="text-center text-black bg-white" select-class="text-orange text-xl">
</wuc-tab> -->
<view class="tabs">
<scroll-view class="scroll-view_H" scroll-x="true" scroll-with-animation :scroll-left='scrollLeft'>
<view class="tab-item scroll-item" :class="index == tabSelect ? 'tab-item-active' : ''"
v-for="(item,index) in tabList" :key="item.id"
@click="tabChange(item,index)">{{item.categoryName}}</view>
<view class="tab-item scroll-item" :class="index == tabSelect ? 'tab-item-active' : ''" v-for="(item,index) in tabList"
:key="item.id" @click="tabChange(item,index)">{{item.categoryName}}</view>
</scroll-view>
</view>
<SecondMenu :menuList="secondMenu" :active.sync="active" @secondMenuClick="secondMenuClick" v-if="secondMenu.length > 0">
</SecondMenu>
</view>
<view class="bangdan-box" v-if="studyList.length > 0">
<view class="active-word">打卡榜</view>
<view class="active-word"><image src="../../static/tit5.png" mode=""></image></view>
<view class="bangdan-list">
<scroll-view class="scroll-view_H" scroll-x="true" v-if="studyList.length > 0">
<view class="bangdan-item"
:class="index%2 !== 0 ? 'bgR' : ''"
v-for="(item,index) in studyList" :key="index"
<view class="bangdan-item" v-for="(item,index) in studyList" :key="index"
@click="toStudyDetail(item.id)">
<view>
<view>{{item.listName}}</view>
<view class="name">{{item.listName}}</view>
<view class="time">{{item.listStartTime.split(' ')[0]}} {{item.listEndTime.split(' ')[0]}}</view>
</view>
<view class="acea-row row-between-wrapper" style="width: 100%;margin-top: 30rpx;">
<view class="jifen">{{item.integral}}积分</view>
<view class="jifen">
<text class="fz44">{{item.integral}}</text>
积分
</view>
<view class="signin-btn">报名参加</view>
</view>
</view>
@ -49,7 +34,7 @@
</view>
</view>
<view class="knowledge-list">
<view class="active-word">课程</view>
<view class="active-word2"><image src="../../static/tit6.png"></image></view>
<view class="no-content" v-if="courseList.length == 0">暂无内容...</view>
<view class="knowledge-item acea-row" v-for="(item,index) in courseList" :key="index" @click="toDetail(item.id)">
<view class="img-box">
@ -76,7 +61,12 @@
<script>
import WucTab from '@/components/wuc-tab/wuc-tab.vue';
import SecondMenu from '../knowledge/components/secondMenu.vue';
import { mapState, mapGetters, mapMutations, mapActions } from 'vuex'
import {
mapState,
mapGetters,
mapMutations,
mapActions
} from 'vuex'
import {
getCategory,
getArticle,
@ -170,7 +160,10 @@
})
var cid = null;
this.active == null ? cid = this.currentTab.id : cid = this.active
getStudyList({categoryId: cid,listState:0}).then((res) => {
getStudyList({
categoryId: cid,
listState: 0
}).then((res) => {
if (res.success) {
this.studyList = res.data
}
@ -183,7 +176,10 @@
})
var cid = null;
this.active == null ? cid = this.currentTab.id : cid = this.active
getCourses({categoryId: cid,listState:0}).then((res) => {
getCourses({
categoryId: cid,
listState: 0
}).then((res) => {
if (res.success) {
this.courseList = res.data
}
@ -237,37 +233,23 @@
</script>
<style scoped lang="less">
.header{
.qr {
width: 36rpx;
height: 38rpx;
image{
width: 36rpx;
height: 38rpx;
}
}
}
.header-search {
transition: all linear 0.3s;
page{
background: #fff;
.search {
border: 2rpx solid #EA533E;
background-color: #fff;
}
}
.colG{
color: #8FB85B !important;
}
.content-box {
width: 100%;
box-sizing: border-box;
.tab-box {
height: 96rpx;
box-shadow: 0px 6px 12px 0px rgba(227, 227, 227, 0.29);
.tabs{
width:auto;
width:100%;
height: 96rpx;
padding-left: 20rpx;
position: fixed;
top: 0;
background: #fff;
z-index: 10;
.scroll-view_H{
white-space: nowrap;
width: 100%;
@ -288,9 +270,11 @@
}
}
}
/deep/.second-menu-box {
padding: 30rpx 32rpx;
}
.fixed {
position: -webkit-sticky;
position: sticky;
@ -299,115 +283,149 @@
}
}
.active-word {
font-size: 34rpx;
image {
width: 136rpx;
height: 46rpx;
}
}
.active-word2{
image{
width: 108rpx;
height: 46rpx;
}
}
.no-content {
font-size: 28rpx;
color: #666666;
text-align: center;
padding: 30rpx 0;
}
.bangdan-box {
width: 100%;
box-sizing: border-box;
padding-left: 30rpx;
margin-top: 30rpx;
margin: 80rpx 0;
.scroll-view_H {
white-space: nowrap;
width: 100%;
}
.bangdan-list {
padding: 16rpx 0 0;
}
.bangdan-item {
width: 514rpx;
height: 234rpx;
width: 412rpx;
height: 224rpx;
box-sizing: border-box;
padding: 20rpx;
color: #fff;
padding: 34rpx;
color: #191919;
display: inline-block;
background: linear-gradient(165deg, #3ABFB8 0%, #7CE1DD 100%);
border-radius: 10rpx;
font-size: 34rpx;
background: url('https://download.cyjyyjy.com/bangdanbg.png');
background-size: 100% 100%;
font-size: 28rpx;
margin-right: 20rpx;
display: inline-block;
.name{
font-weight: bold;
}
.time {
font-size: 24rpx;
color: #FFFFFF;
line-height: 40rpx;
margin:10rpx 0 18rpx;
line-height: 34rpx;
margin: 8rpx 0 10rpx;
}
.jifen {
font-size: 46rpx;
font-size: 24rpx;
font-weight: 500;
color: #FCB047;
.fz44{
font-size: 44rpx;
}
}
.signin-btn {
width: 180rpx;
height: 68rpx;
background: #FFFFFF;
border-radius: 40rpx;
width: 122rpx;
height: 48rpx;
background: linear-gradient(180deg, #FEECCB 0%, #FCAB3B 100%);
border-radius: 8rpx;
text-align: center;
line-height: 68rpx;
color: #222222;
font-size: 26rpx;
}
line-height: 48rpx;
font-size: 24rpx;
color: #fff;
}
.bgR{
background: linear-gradient(165deg, #FF7563 0%, #FEABA0 100%);
}
}
.konwledge-index {
min-height: 100%;
width: 100%;
background: #fff;
.knowledge-list {
width: 100%;
padding: 0 32rpx;
margin-top: 30rpx;
margin-top: 80rpx;
.knowledge-item {
width: 100%;
height: 208rpx;
margin-top: 20rpx;
background: #fff;
padding: 16rpx 0;
border-bottom: 1px solid #ECECEC;
border-bottom: 1rpx solid #ECECEC;
position: relative;
.img-box {
width: 204rpx;
height: 200rpx;
margin-right: 30rpx;
image {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
}
.knowledge-info-box {
width: calc(100% - 234rpx);
.title {
font-size: 32rpx;
font-size: 38rpx;
color: #333;
font-size: 500;
line-height: 40rpx;
line-height: 52rpx;
}
.time,.address{
.time,
.address {
color: #999;
font-size: 24rpx;
margin-top: 5rpx;
line-height: 34rpx;
font-size: 28rpx;
margin: 10rpx 0;
line-height: 38rpx;
}
.intro {
font-size: 28rpx;
color: #999999;
line-height: 40rpx;
margin: 8rpx 0 36rpx;
}
.type-box {
font-size: 24rpx;
color: #999;
margin-top: 20rpx;
.price {
font-size: 28rpx;
color: #EA533E;
}
.signin-btn {
width: 156rpx;
height: 60rpx;
@ -416,15 +434,21 @@
background: #FFEAE7;
border-radius: 12rpx;
font-size: 32rpx;
position: absolute;
right: 4rpx;
bottom: 4rpx;
}
.red {
background: #FFEAE7;
color: #EE7060;
}
.blue {
color: #6E85EB;
background: #ECEFFD;
}
.yellow {
color: #F99C10;
background: #FFEDCC;
@ -432,6 +456,7 @@
}
}
}
.knowledge-item:nth-last-child(1) {
border: none;
}

108
pages/home/components/ArticleList.vue

@ -0,0 +1,108 @@
<template>
<view class="article-list">
<view class="article-item" v-for="(item,index) in list" :key="index" @click="toArticleDetail(item.id)">
<image :src="item.imageInput" mode="aspectFill"></image>
<view class="article-content">
<view class="article-title line1">{{item.title}}</view>
<view class="article-desc line1">{{item.synopsis}}</view>
<view class="author-box acea-row row-between">
<view class="acea-row">
<view class="author">{{item.author}}</view>
<view class="time">{{item.addTime.split(' ')[0]}}</view>
<view>{{item.visit}}人阅读</view>
</view>
<view class="tips"
:class="item.chargeType == 0 ? 'free-bg' : item.chargeType == 1 ? '' : 'jifen'">
{{item.chargeType == 0 ? '免费' : item.chargeType == 1 ? '收费' : '积分'}}
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default{
props:{
list: {
type: Array,
default: []
}
},
methods:{
toArticleDetail(id){
this.$yrouter.push({
path: '/pages/knowledge/detail',
query: {
id:id,
},
})
},
}
}
</script>
<style lang="less">
.article-list{
width: 100%;
margin-top: 20rpx;
.article-item{
width: 100%;
background: #fff;
box-sizing: border-box;
margin-bottom: 52rpx;
box-shadow: 0px 2rpx 8rpx rgba(0, 0, 0, 0.16);
image{
width: 100%;
height: 266rpx;
border-radius: 10rpx;
margin-bottom: 20rpx;
}
.article-content{
padding: 28rpx 32rpx;
}
.article-title{
font-size: 36rpx;
font-weight: 500;
color: #333333;
line-height: 50rpx;
margin-bottom: 8rpx;
}
.article-desc{
font-size: 24rpx;
font-weight: 400;
color: #999999;
line-height: 40rpx;
margin-bottom: 30rpx;
}
.author-box{
font-size: 24rpx;
color: #999;
.author{
color: #EA533E;
}
.time{
margin: 0 12rpx;
}
.tips{
width: 100rpx;
font-size: 20rpx;
color: #FFAD3A;
height: 34rpx;
text-align: center;
line-height: 34rpx;
background: #fcd391;
border-radius: 44rpx;
}
.free-bg{
background: #8FB85B;
color: #D7FFA4;
}
.jifen{
background: #AAC8FA;
color: #5693F9;
}
}
}
}
</style>

124
pages/home/components/CourseList.vue

@ -0,0 +1,124 @@
<template>
<view class="recommend-list-box acea-row row-between">
<view class="recommend-item" v-for="(item,index) in list" :key="index" @click="toCourseDetail(item.id)">
<view class="img-box"><image :src="item.coverImg" mode="aspectFill"></image></view>
<view class="course-content">
<view class="course-title line1">{{item.courseName}}</view>
<view class="course-tips-box acea-row">
<view class="course-tip-item blue">{{item.categoryName}}</view>
</view>
<!-- <view class="price" v-if="item.level > 2">{{item.level}}级课程</view>
<view class="price" v-if="item.level == 2">{{item.courseCharge}}</view>
<view class="price colG" v-if="item.chargeType == 0 || item.level == 1">免费</view> -->
<view class="course-address acea-row row-between-wrapper">
<view class="address">{{item.coursePlace}}</view>
<view class="course-time">{{item.enterStartTime}}-{{item.enterEndTime}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default{
props: {
list: {
type: Array,
default: []
}
},
data(){
return {
titImg: '../../../static/tit1.png',
titleWord: '查看更多课程'
}
},
methods:{
toCourseDetail(id){
this.$yrouter.push({
path: '/pages/course/detail',
query: {
id:id,
},
})
},
seeMoreClick(){
uni.switchTab({
url: "/pages/course/index"
})
},
}
}
</script>
<style lang="less">
.recommend-list-box{
width: 100%;
.recommend-item{
width: 334rpx;
background: #fff;
border-radius: 10rpx;
font-size: 28rpx;
color: #333;
margin-right: 22rpx;
margin-bottom: 22rpx;
box-shadow: 0px 2rpx 4rpx rgba(0, 0, 0, 0.16);
image{
width: 334rpx;
height: 216rpx;
border-top-left-radius: 10rpx;
border-top-right-radius: 10rpx;
}
.course-content{
width: 100%;
box-sizing: border-box;
padding:0 10rpx 20rpx;
}
.course-title{
line-height: 40rpx;
}
.course-tips-box{
margin: 12rpx 0 24rpx;
font-size: 24rpx;
color: #999;
.course-tip-item{
min-width: 60rpx;
height: 34rpx;
line-height: 32rpx;
text-align: center;
background: #EDEFF8;
border-radius: 4rpx;
border: 1px solid #6E85EB;
padding: 0 6rpx;
font-size: 22rpx;
margin-right: 20rpx;
box-sizing: border-box;
margin-right: 10rpx;
}
.blue{
color: #6E85EB;
background: #EDEFF8;
border-color: #6E85EB;
}
.yellow{
color: #F99C10;
background: #FFEDCC;
border-color: #F99C10;
}
}
.price{
font-size: 32rpx;
color: #EA533E;
font-weight: 500;
margin: 16rpx 0;
}
.course-address{
font-size: 24rpx;
color: #999999;
}
}
.recommend-item:nth-child(2n){
margin-right: 0;
}
}
</style>

6
pages/home/components/FirstNewProduct.vue

@ -12,8 +12,7 @@
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<view class="goods-list-box x-f">
<block v-for="mgoods in goods" :key="mgoods.id">
<view class="min-goods"
@tap="$yrouter.push({ path: '/pages/shop/GoodsCon/index',query:{id:mgoods.id} })">
<view class="min-goods" @tap="$yrouter.push({ path: '/pages/shop/GoodsCon/index',query:{id:mgoods.id} })">
<view class="img-box">
<view class="tag">new</view>
<image class="img" :src="mgoods.image" mode="widthFix"></image>
@ -33,8 +32,7 @@
</swiper-item>
</swiper>
<view class="swiper-dots" v-if="goodsList.length > 1">
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
:key="index"></text>
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length" :key="index"></text>
</view>
</view>
</view>

54
pages/home/components/ListTitleBox.vue

@ -0,0 +1,54 @@
<template>
<view class="title-box acea-row row-between-wrapper">
<view class="title"><image :src="titImg"></image></view>
<view class="more" @click="seeMoreClick">{{titWord}}</view>
</view>
</template>
<script>
export default{
name: 'ListTitleBox',
props:{
//
titImg:{
type: String,
default: ''
},
//
titWord: {
type: String,
default: ''
},
//
width: {
type: String,
default: ''
},
height: {
type: String,
default: ''
}
},
methods:{
seeMoreClick(){
this.$emit('seeMoreClick')
}
}
}
</script>
<style lang="less">
.title-box{
width: 100%;
margin-bottom: 28rpx;
image{
width: 206rpx;
height: 58rpx;
}
.more{
font-size: 28rpx;
color: #999;
}
}
</style>

95
pages/home/components/StadyList.vue

@ -0,0 +1,95 @@
<template>
<view class="study-list uni-padding-wrap uni-common-mt">
<scroll-view class="scroll-view_H" scroll-x="true">
<view class="study-item scroll-view-item_H" v-for="(item,index) in list" :key="index" @click="toStudyDetail(item.id)">
<view class="day-box acea-row row-middle">
<image src="../../../static/date-icon.png" v-if="index%2 == 0"></image>
<image src="../../../static/date-icon2.png" v-if="index%2 != 0"></image>
<text>{{item.clockTimes}}</text>
</view>
<view class="study-content">
<view class="study-title line1">{{item.listName}}</view>
<view class="study-time acea-row-nowrap row-between-wrapper">
<view>{{item.listStartTime}}开始</view>
<view>{{item.enterNum}}人已参与</view>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
export default{
props:{
list: {
type: Array,
default: []
}
},
methods:{
toStudyDetail(id){
this.$yrouter.push({
path: '/pages/study/detail',
query: {
id:id,
},
})
},
}
}
</script>
<style lang="less">
.study-list{
width: 100%;
.scroll-view_H{
white-space: nowrap;
width: 100%;
}
.study-item{
width: 334rpx;
height: 180rpx;
display: inline-block;
background: linear-gradient(143deg, #FDAF97 0%, #ED5E48 100%);
box-shadow: 0px 4rpx 8rpx 4rpx rgba(250,194,183,0.32);
border-radius: 10rpx;
margin-right: 20rpx;
.day-box{
color: #E73D21;
font-size: 48rpx;
line-height: 58rpx;
margin-left: 10rpx;
image{
width: 34rpx;
height: 34rpx;
margin-right: 10rpx;
}
}
.study-content{
width: calc(100% - 12rpx);
background: #fff;
font-size: 24rpx;
color: #999;
box-shadow: 0px 4rpx 8rpx 4rpx rgba(250,194,183,0.32);
border-radius: 10rpx;
margin: 2rpx auto;
padding:16rpx 10rpx 10rpx;
box-sizing: border-box;
.study-title{
font-size: 28rpx;
font-weight: 500;
color: #222222;
line-height: 40rpx;
margin-bottom: 12rpx;
}
}
}
.study-item:nth-child(2n){
background: linear-gradient(143deg, #C4DBFF 0%, #7FAAF2 100%);
.day-box{
color: #557AB3;
}
}
}
</style>

7
pages/home/index-copy.vue

@ -12,13 +12,6 @@
<!-- #endif -->
</view>
<view v-for="(item, index) in homeData" :key="index">
<!-- <view class="head_box" v-if="item.type == 'header'" :style="{ background: bgcolor }" :class="{ active: bgcolor }">
<cu-custom :isBack="true" :bgColor="bgcolor">
<block slot="backText">
<text class="nav-title shopro-selector-rect">{{ item.componentContent.title }}</text>
</block>
</cu-custom>
</view> -->
<Banner v-if="item.type == 'banner'" :detail="item.componentContent.bannerData" @getbgcolor="getbgcolor"></Banner>
<uni-notice-bar v-if="item.type == 'noticeBar'" scrollable="true" @click="goRoll(item.componentContent.roll[0])" single="true" :speed="10" showIcon="true" :text="item.componentContent.roll[0].info"></uni-notice-bar>
<view class="content_box home_content_box" v-if="item.type == 'menu' && item.componentContent.menus">

437
pages/home/index.vue

@ -19,13 +19,19 @@
<view class="today-fortune-content">
<view class="today-fortune-box">
<view class="top-box acea-row row-between-wrapper">
<view class="title">今日·宜忌</view>
<view class="title">
<image src="../../static/idx-icon1.png"></image>
</view>
<view>{{year}}{{month}}{{day}}</view>
</view>
<view class="date-box acea-row row-middle row-center">
<view class="date-btn prev-btn"><image src="../../static/prev.png"></image></view>
<view class="date-btn prev-btn">
<image src="../../static/prev.png"></image>
</view>
<view class="time-box">{{todayDate}}</view>
<view class="date-btn next-btn"><image src="../../static/next.png"></image></view>
<view class="date-btn next-btn">
<image src="../../static/next.png"></image>
</view>
</view>
<view class="week-box">
<span class="week">星期{{week}}</span>
@ -33,11 +39,15 @@
</view>
<view class="fortune-detail">
<view class="fortune-n acea-row-nowrap mt20">
<view class="fortune-icon nice"></view>
<view class="fortune-icon nice">
<image src="../../static/yi.png"></image>
</view>
<view class="fortune">{{yi}}</view>
</view>
<view class="fortune-b acea-row-nowrap mt20">
<view class="fortune-icon bad"></view>
<view class="fortune-icon bad">
<image src="../../static/ji.png"></image>
</view>
<view class="fortune">{{ji}}</view>
</view>
</view>
@ -47,88 +57,44 @@
<view class="notice-t">公告</view>
<view class="notice">点击下载直播APP在线观看</view>
</view> -->
<!-- 推荐课程 -->
<view class="recommend-box p30">
<view class="title-box acea-row row-between-wrapper">
<view class="title">今日推荐</view>
<view class="more" @click="toCourse">查看全部课程</view>
</view>
<view class="recommend-list-box acea-row">
<view class="recommend-item" v-for="(item,index) in courseList" :key="index" @click="toCourseDetail(item.id)">
<view class="img-box"><image :src="item.coverImg" mode="aspectFill"></image></view>
<view class="course-content">
<view class="course-title line1">{{item.courseName}}</view>
<view class="course-tips-box acea-row">
<view class="course-tip-item blue">{{item.categoryName}}</view>
</view>
<!-- <view class="price" v-if="item.level > 2">{{item.level}}级课程</view>
<view class="price" v-if="item.level == 2">{{item.courseCharge}}</view>
<view class="price colG" v-if="item.chargeType == 0 || item.level == 1">免费</view> -->
<view class="course-address acea-row row-between-wrapper">
<view class="address">{{item.coursePlace}}</view>
<view class="course-time">{{item.enterStartTime}}-{{item.enterEndTime}}</view>
</view>
<!-- 推荐直播 -->
<view class="liveCourse-list-box p30">
<ListTitleBox :titImg="'../../../static/tit1.png'"> </ListTitleBox>
<view class="liveCourse-list acea-row row-between">
<view class="item" v-for="item in live" :key="item.id">
<image :src="item.coverImge" mode="aspectFill"></image>
<text>{{item.name}}</text>
</view>
</view>
</view>
<!-- 推荐课程 -->
<view class="recommend-box p30">
<ListTitleBox :titImg="'../../../static/tit2.png'" :titWord="'查看更多课程'" @seeMoreClick="toCourse">
</ListTitleBox>
<CourseList :list="courseList"></CourseList>
</view>
<!-- 学习榜 -->
<view class="study-list-box">
<view class="title-box acea-row row-between-wrapper">
<view class="title">学习榜单</view>
<view class="more" @click="toCourse">查看全部榜单</view>
</view>
<view class="study-list uni-padding-wrap uni-common-mt">
<scroll-view class="scroll-view_H" scroll-x="true">
<view class="study-item scroll-view-item_H" v-for="(item,index) in studyList" :key="index" @click="toStudyDetail(item.id)">
<view class="day-box acea-row row-middle">
<image src="../../static/date-icon.png" v-if="index%2 == 0"></image>
<image src="../../static/date-icon2.png" v-if="index%2 != 0"></image>
<text>{{item.clockTimes}}</text>
</view>
<view class="study-content">
<view class="study-title line1">{{item.listName}}</view>
<view class="study-time acea-row-nowrap row-between-wrapper">
<view>{{setDate(item.listStartTime)}}开始</view>
<view>{{item.enterNum}}人已参与</view>
</view>
</view>
</view>
</scroll-view>
</view>
<view class="study-list-box p30">
<ListTitleBox :titImg="'../../../static/tit3.png'" :titWord="'查看更多打卡榜单'" @seeMoreClick="toCourse">
</ListTitleBox>
<StadyList :list="studyList"></StadyList>
</view>
<!-- 都在看 -->
<view class="readyarticle-box">
<view class="title-box acea-row row-between-wrapper">
<view class="title">大家都在看</view>
<view class="more" @click="toKnowledge">查看全部文章</view>
</view>
<view class="article-list">
<view class="article-item" v-for="(item,index) in articleList" :key="index" @click="toArticleDetail(item.id)">
<image :src="item.imageInput" mode="aspectFill"></image>
<view class="article-content">
<view class="article-title line1">{{item.title}}</view>
<view class="article-desc line1">{{item.synopsis}}</view>
<view class="author-box acea-row row-between">
<view class="acea-row">
<view class="author">{{item.author}}</view>
<view class="time">{{item.addTime.split(' ')[0]}}</view>
<view>{{item.visit}}人阅读</view>
</view>
<view class="tips"
:class="item.chargeType == 0 ? 'free-bg' : item.chargeType == 1 ? '' : 'jifen'">
{{item.chargeType == 0 ? '免费' : item.chargeType == 1 ? '收费' : '积分'}}
</view>
</view>
</view>
</view>
</view>
<view class="readyarticle-box p30">
<ListTitleBox :titImg="'../../../static/tit4.png'" :titWord="'查看全部文章'" @seeMoreClick="toKnowledge">
</ListTitleBox>
<ArticleList :list="articleList"></ArticleList>
</view>
<view class="no-more">没有更多内容了</view>
</view>
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex'
import {
mapState,
mapMutations,
mapActions
} from 'vuex'
import GoodList from '@/components/GoodList'
import PromotionGood from '@/components/PromotionGood'
import CouponWindow from '@/components/CouponWindow'
@ -141,17 +107,30 @@ import HotCommodity from './components/HotCommodity'
import FirstNewProduct from './components/FirstNewProduct'
import ProductsRecommended from './components/ProductsRecommended'
// import Live from './components/Live'
import { getHomeData, getShare, getCanvas } from '@/api/public'
import CourseList from './components/CourseList.vue'
import ListTitleBox from './components/ListTitleBox.vue'
import StadyList from './components/StadyList.vue'
import ArticleList from './components/ArticleList.vue'
import {
getHomeData,
getShare,
getCanvas
} from '@/api/public'
import cookie from '@/utils/store/cookie'
import { isWeixin, handleUrlParam } from '@/utils/index'
import { signCourse } from '@/api/knowledge'
import { getWanniali , getBlessingFlag } from '@/api/diandeng'
import { openShareAll } from '@/libs/wechat'
import {
isWeixin,
handleUrlParam
} from '@/utils/index'
import {
signCourse
} from '@/api/knowledge'
import {
getWanniali,
getBlessingFlag
} from '@/api/diandeng'
import {
openShareAll
} from '@/libs/wechat'
const HAS_COUPON_WINDOW = 'has_coupon_window'
export default {
@ -168,6 +147,10 @@ export default {
HotCommodity,
FirstNewProduct,
ProductsRecommended,
CourseList,
ListTitleBox,
StadyList,
ArticleList,
},
props: {},
data: function() {
@ -215,7 +198,11 @@ export default {
courseList: [],
studyList: [],
articleList: [],
flag:0
flag: 0,
titImg1: '../../../static/tit1.png',
titleWord1: '查看更多课程',
titImg2: '../../../static/tit2.png',
titleWord2: '查看更多打卡榜单'
}
},
computed: {
@ -262,7 +249,6 @@ export default {
},
methods: {
...mapActions(['getLocation']),
getData() {
var that = this;
getHomeData().then(res => {
@ -273,6 +259,9 @@ export default {
item.enterStartTime = this.setDate(item.enterStartTime)
item.enterEndTime = this.setDate(item.enterEndTime)
})
res.data.studyLists.map(item => {
item.listStartTime = this.setDate(item.listStartTime)
})
that.$set(that, 'info', res.data.info)
that.$set(that, 'firstList', res.data.firstList)
that.$set(that, 'bastList', res.data.bastList)
@ -296,17 +285,16 @@ export default {
})
},
setDate(t) {
let str = t.split(" ")[0].split("-")[1] + "." + t.split(" ")[0].split("-")[2]
return str
return t.split(" ")[0].split("-")[1] + "." + t.split(" ")[0].split("-")[2]
},
getDate() {
var today = new Date();
var y = today.getFullYear().toString();
var m = (today.getMonth()+1).toString();
var d = today.getDate().toString();
var day = today.getDay();
this.dateStr = y + '年' + m + '月' + d + '日';
this.dateStr2 = y + '-' + m + '-' + d ;
var y = today.getFullYear().toString()
var m = (today.getMonth() + 1).toString()
var d = today.getDate().toString()
var day = today.getDay()
this.dateStr = y + '年' + m + '月' + d + '日'
this.dateStr2 = y + '-' + m + '-' + d
},
onShareTimeline: function() {
return {
@ -327,22 +315,6 @@ export default {
path: '/pages/noticePage/index',
})
},
toCourseDetail(id){
this.$yrouter.push({
path: '/pages/course/detail',
query: {
id:id,
},
})
},
toStudyDetail(id){
this.$yrouter.push({
path: '/pages/study/detail',
query: {
id:id,
},
})
},
toArticleDetail(id) {
this.$yrouter.push({
path: '/pages/knowledge/detail',
@ -443,16 +415,20 @@ export default {
.content_box {
background: #fff;
}
.colG {
color: #8FB85B !important;
}
.index {
padding-bottom: 68rpx;
background: #fff !important;
.header {
.qr {
width: 36rpx;
height: 38rpx;
image {
width: 36rpx;
height: 38rpx;
@ -460,6 +436,7 @@ export default {
}
}
}
.header-search {
width: 690rpx;
height: 70rpx;
@ -467,12 +444,14 @@ export default {
color: #999999;
margin: 0 auto;
border-radius: 35rpx;
.search {
width: 100%;
background: #F3F3F3;
color: #999999;
}
}
.notice-box {
width: 690rpx;
height: 66rpx;
@ -480,6 +459,7 @@ export default {
border-radius: 8px;
background: #F9F9F9;
font-weight: 500;
.notice-t {
width: 120rpx;
height: 100%;
@ -490,15 +470,18 @@ export default {
border-top-right-radius: 8rpx;
border-bottom-right-radius: 8rpx;
}
.notice {
font-size: 28rpx;
color: #411E04;
margin-left: 20rpx;
}
}
.swiper-item {
height: 100%;
}
.fixed-header {
position: fixed;
z-index: 99;
@ -512,25 +495,30 @@ export default {
right: 0;
background: #fff;
box-shadow: 0 0 20rpx -10rpx #aaa;
&+.fixed-header-box {
height: 98rpx;
}
}
.banner-box {
width: 688rpx;
height: 268rpx;
border-radius: 20rpx;
overflow: hidden;
margin: 32rpx auto;
.swiper-box {
height: 100%;
}
}
.today-fortune-content {
width: 100%;
padding: 0 30rpx;
box-sizing: border-box;
margin-bottom: 20rpx;
.today-fortune-box {
width: 100%;
background: #fff;
@ -539,14 +527,31 @@ export default {
border-radius: 20rpx;
box-shadow: 0px 6rpx 14rpx rgba(80, 80, 80, 0.08);
font-size: 24rpx;
.top-box {
color: #999999;
.title {
width: 208rpx;
height: 62rpx;
image {
width: 100%;
height: 100%;
}
}
}
}
.date-box {
font-size: 72rpx;
color: #EA533E;
margin-top: 38rpx;
.time-box {
margin: 0 24rpx;
}
.date-btn {
width: 84rpx;
height: 84rpx;
@ -554,55 +559,58 @@ export default {
line-height: 100rpx;
}
}
.week-box {
width: 100%;
color: #7C7C7C;
text-align: center;
border-bottom: 1px solid #ECECEC;
// border-bottom: 1px solid #ECECEC;
padding: 30rpx 0;
.week {
display: inline-block;
margin-right: 12rpx;
color: #222;
}
}
.fortune-detail {
font-size: 30rpx;
color: #222;
.fortune-n {
color: #EA533E;
}
.fortune-icon {
width: 44rpx;
height: 44rpx;
text-align: center;
line-height: 44rpx;
border-radius: 25px;
font-size: 28rpx;
color: #fff;
margin-right: 20rpx;
}
.fortune{
width:calc(100% - 70rpx)
width: 64rpx;
height: 52rpx;
margin-right: 24rpx;
image {
width: 100%;
height: 100%;
}
.nice{
background: #EA533E;
}
.bad{
background: #8FB85B;
.fortune {
width: calc(100% - 88rpx)
}
}
.qiuqian-box {
width: 100%;
height: 124rpx;
position: relative;
margin-top: 40rpx;
image {
width: 100%;
height: 100%;
position: absolute;
z-index: 1;
}
.txt-box {
width: 100%;
height: 100%;
@ -613,6 +621,7 @@ export default {
position: absolute;
z-index: 3;
}
.qiuqin-btn {
width: 194rpx;
height: 68rpx;
@ -625,6 +634,7 @@ export default {
line-height: 68rpx;
}
}
.fortune-menu-box {
.fortune-menu-item {
width: 216rpx;
@ -633,6 +643,7 @@ export default {
background: #fff;
font-size: 28rpx;
color: #222;
image {
width: 60rpx;
height: 60rpx;
@ -640,165 +651,50 @@ export default {
}
}
}
}
.p30 {
width: 100%;
padding: 0 30rpx;
box-sizing: border-box;
margin-bottom: 40rpx;
}
.recommend-box{
.recommend-list-box{
width: 100%;
// margin-top: 20rpx;
.recommend-item{
.liveCourse-list {
.item {
width: 334rpx;
background: #fff;
border-radius: 10rpx;
font-size: 28rpx;
color: #333;
margin-right: 23rpx;
margin-top: 23rpx;
box-shadow: 0px 2rpx 4rpx rgba(0, 0, 0, 0.16);
color: #000;
font-weight: bold;
overflow: hidden;
margin-right: 18rpx;
image {
width: 334rpx;
height: 216rpx;
}
.course-content{
width: 100%;
box-sizing: border-box;
padding:0 10rpx 20rpx;
}
.course-title{
line-height: 40rpx;
}
.course-tips-box{
margin: 12rpx 0 24rpx;
font-size: 24rpx;
color: #999;
.course-tip-item{
min-width: 60rpx;
height: 34rpx;
line-height: 32rpx;
text-align: center;
background: #EDEFF8;
border-radius: 4rpx;
border: 1px solid #6E85EB;
padding: 0 6rpx;
font-size: 22rpx;
margin-right: 20rpx;
box-sizing: border-box;
margin-right: 10rpx;
}
.blue{
color: #6E85EB;
background: #EDEFF8;
border-color: #6E85EB;
}
.yellow{
color: #F99C10;
background: #FFEDCC;
border-color: #F99C10;
height: 224rpx;
margin-bottom: 18rpx;
border-radius: 12rpx;
}
}
.price{
font-size: 32rpx;
color: #EA533E;
font-weight: 500;
margin: 16rpx 0;
}
.course-address{
font-size: 24rpx;
color: #999999;
}
}
.recommend-item:nth-child(2n){
margin-right: 0;
}
}
}
.study-list-box,.readyarticle-box{
margin-bottom: 40rpx;
.title-box{
width: 100%;
padding: 0 30rpx;
box-sizing: border-box;
}
}
.study-list{
width: 100%;
margin-top: 20rpx;
margin-bottom: 40rpx;
padding-left: 20rpx;
box-sizing: border-box;
.scroll-view_H{
white-space: nowrap;
width: 100%;
}
.study-item{
width: 334rpx;
height: 180rpx;
display: inline-block;
background: linear-gradient(143deg, #FDAF97 0%, #ED5E48 100%);
box-shadow: 0px 4rpx 8rpx 4rpx rgba(250,194,183,0.32);
border-radius: 10rpx;
margin-right: 20rpx;
.day-box{
color: #E73D21;
font-size: 48rpx;
line-height: 58rpx;
margin-left: 10rpx;
image{
width: 34rpx;
height: 34rpx;
margin-right: 10rpx;
}
}
.study-content{
width: calc(100% - 12rpx);
background: #fff;
font-size: 24rpx;
color: #999;
box-shadow: 0px 4rpx 8rpx 4rpx rgba(250,194,183,0.32);
border-radius: 10rpx;
margin: 2rpx auto;
padding:16rpx 10rpx 10rpx;
box-sizing: border-box;
.study-title{
font-size: 28rpx;
font-weight: 500;
color: #222222;
line-height: 40rpx;
margin-bottom: 12rpx;
}
}
}
.study-item:nth-child(2n){
background: linear-gradient(143deg, #C4DBFF 0%, #7FAAF2 100%);
.day-box{
color: #557AB3;
}
}
}
.readyarticle-box {
.article-list {
width: 100%;
margin-top: 20rpx;
.article-item {
width: 100%;
background: #fff;
padding: 20rpx;
box-sizing: border-box;
margin-bottom: 12rpx;
image {
width: 710rpx;
width: 100%;
height: 266rpx;
border-radius: 10rpx;
margin-bottom: 20rpx;
}
.article-title {
font-size: 36rpx;
font-weight: 500;
@ -806,24 +702,29 @@ export default {
line-height: 50rpx;
margin-bottom: 8rpx;
}
.article-desc {
font-size: 24rpx;
font-weight: 400;
color: #999999;
line-height: 40rpx;
margin-bottom: 30rpx;
text-indent: 1em;
// text-indent: 1em;
}
.author-box {
font-size: 24rpx;
color: #999;
// text-indent: 1em;
.author {
color: #EA533E;
}
.time {
margin: 0 12rpx;
}
.tips {
width: 100rpx;
font-size: 20rpx;
@ -834,10 +735,12 @@ export default {
background: #fcd391;
border-radius: 44rpx;
}
.free-bg {
background: #8FB85B;
color: #D7FFA4;
}
.jifen {
background: #AAC8FA;
color: #5693F9;
@ -846,21 +749,27 @@ export default {
}
}
}
.title-box {
color: #222;
.title{
font-size: 40rpx;
font-weight: 500;
width: 208rpx;
height: 62rpx;
image {
width: 100%;
height: 100%;
}
.more {
font-size: 24rpx;
color: #999;
}
}
image {
width: 100%;
height: 100%;
}
.no-more {
text-align: center;
color: #999;
@ -894,6 +803,7 @@ image{
.cu-bar {
box-sizing: border-box;
.index .header {
height: 64rpx;
}
@ -918,8 +828,7 @@ image{
margin-top: -20rpx;
}
.head_box {
}
.head_box {}
.nav-title {
margin-left: 20rpx;

BIN
static/bangdanbg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
static/idx-icon1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
static/ji.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/tit1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
static/tit2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
static/tit3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
static/tit4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
static/tit5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
static/tit6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
static/yi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Loading…
Cancel
Save