Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions client/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
"backgroundColor": "#ffffff",
"list":[{
"pagePath": "page/index/index",
"iconPath": "image/icon_component.png",
"selectedIconPath": "image/icon_component_HL.png",
"iconPath": "image/home.png",
"selectedIconPath": "image/home_click.png",
"text": "首页"
},{
"pagePath": "page/class/index",
"iconPath": "image/icon_component.png",
"selectedIconPath": "image/icon_component_HL.png",
"iconPath": "image/curse1.png",
"selectedIconPath": "image/curse1_click.png",
"text": "课程"
},{
"pagePath": "page/submission/index",
Expand All @@ -37,8 +37,8 @@
"text": "投稿"
},{
"pagePath": "page/aboutUs/index",
"iconPath": "image/icon_API.png",
"selectedIconPath": "image/icon_API_HL.png",
"iconPath": "image/aboutUs.png",
"selectedIconPath": "image/aboutUs_click.png",
"text": "关于我们"
}]
},
Expand Down
Binary file added client/image/aboutUs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/image/aboutUs_click.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/image/curse-click.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/image/curse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/image/curse1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/image/curse1_click.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/image/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/image/home_click.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/image/noData.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 21 additions & 1 deletion client/page/index/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,28 @@ Page({
* 页面的初始数据
*/
data: {

currentTab: 0,
},
//滑动切换
swiperTab: function (e) {
var that = this;
that.setData({
currentTab: e.detail.current
});
},
//点击切换
clickTab: function (e) {
var that = this;
if (this.data.currentTab === e.target.dataset.current) {
return false;
} else {
that.setData({
currentTab: e.target.dataset.current
})
}
},



/**
* 生命周期函数--监听页面加载
Expand Down
32 changes: 24 additions & 8 deletions client/page/index/index.wxml
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
<view class="index">
<view class="index-desc">
文章显示
</view>
<view class="index-bd">
python是一门全能性语言,简单,明确,优雅,
我很喜欢,
人生苦短,我用python!
</view>
<view class="swiper-tab">
<view class="swiper-tab-item {{currentTab==0?'active':''}}" data-current="0" bindtap="clickTab">精讲</view>
<view class="swiper-tab-item {{currentTab==1?'active':''}}" data-current="1" bindtap="clickTab">专题</view>
</view>
<swiper current="{{currentTab}}" duration="300" bindchange="swiperTab">
<swiper-item >
<view class="content">
<view class="list-title">
<view class="list-left">
<text>每日精讲</text></view></view>
<view class="videoArea">
<video style="width:180px;height:100px" src="45.76.212.68:8000/download/demo.mp4" ></video>
<text>python 第一个视频</text>
</view>
<!--保留代码 -->
<!-- <block wx:if = "{{list.length>0}}">
</block>
<block wx:else = "{{list.length<0}}">
<image src="../../image/noData.png"> </image>
</block> -->
</view></swiper-item>
<swiper-item><view>筛选中</view></swiper-item>
</swiper>

</view>
63 changes: 62 additions & 1 deletion client/page/index/index.wxss
Original file line number Diff line number Diff line change
@@ -1 +1,62 @@
@import "../common/index.wxss";
.index-header{
height:30px;
width:100%;
text-align: center;
border-bottom: 1px solid #ADADAD;
}
.swiper-tab{
width: 100%;
border-bottom: 2rpx solid #ccc;
text-align: center;
height: 88rpx;
line-height: 88rpx;
display: flex;
flex-flow: row;
justify-content: space-between;
}
.swiper-tab2{
width: 60px;
text-align: center;
display: flex;
flex-flow: row;
justify-content: space-between;
}
.swiper-tab-item{
width: 30%;
color:#434343;
}
.swiper-tab-item2{
color:#434343;
}
.active{
color:#F65959;
border-bottom: 4rpx solid #F65959;
}

.active2{
color:#F65959;
}
swiper{
text-align: center;
}
.list-title{
height: 88rpx;
line-height: 88rpx;
display: flex;
justify-content: space-between;
margin:35rpx
}
.list-right{
font-size:12px;
}
.videoArea{
display: flex;
height:100px;
justify-content: space-between;
align-items:center
}
.videoTitle{
float:left;
margin-left:20px;
}