Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
home-with-kids-mp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
712025c6
authored
2019-11-26 15:36:13 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
默认提交
1 parent
1e96f1b9
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
118 additions
and
54 deletions
src/app.scss
src/assets/scss/_mixins.scss
src/component/authorize-comp/authorize-comp.wxml
src/component/shortcut/shortcut.js
src/http/api.js
src/pages/detail/detail.js
src/pages/detail/detail.scss
src/pages/detail/detail.wxml
src/pages/index/index.js
src/pages/index/index.scss
src/pages/index/index.wxml
src/pages/personal-list/personal-list.js
src/pages/personal-list/personal-list.scss
src/pages/personal-list/personal-list.wxml
src/pages/reward-completed/reward-completed.js
src/pages/reward-completed/reward-completed.wxml
src/app.scss
View file @
712025c
...
...
@@ -97,6 +97,19 @@ button {
border-bottom
:
none
;
}
// 红包
.red-p
{
.comp
{
bottom
:
auto
;
top
:
15%
;
}
}
.van-tab
{
font-size
:
32px
!
important
;
font-weight
:
bold
!
important
;
color
:
#444444
!
important
;
}
// web font icon
...
...
@@ -366,4 +379,3 @@ button {
.iconwechat
:before
{
content
:
"\e600"
;
}
...
...
src/assets/scss/_mixins.scss
View file @
712025c
...
...
@@ -125,6 +125,7 @@
border-radius
:
8px
;
color
:
#3680EB
;
border
:
solid
1
PX
#3680EB
;
background
:
transparent
;
}
...
...
src/component/authorize-comp/authorize-comp.wxml
View file @
712025c
...
...
@@ -4,9 +4,9 @@
<!-- <view class="logo">
<image mode="widthFix" src="../../image/logo.png" />
</view> -->
<view class="tit">
深士照明
</view>
<view class="tit">
家有儿孙
</view>
<view class="tips">
<text>需要获取您的微信昵称等信息才可以
获取积分和兑换奖品
哦</text>
<text>需要获取您的微信昵称等信息才可以
体验更多
哦</text>
</view>
</view>
<view class="btn-wrap">
...
...
src/component/shortcut/shortcut.js
View file @
712025c
...
...
@@ -19,7 +19,7 @@ Component({
},
pics
:
{
type
:
Array
,
value
:
[
"red-package"
]
value
:
[]
}
},
data
:
{
...
...
@@ -33,7 +33,7 @@ Component({
// 点击按按钮
onTapHandler
(
evt
)
{
let
curType
=
getBindtapData
(
evt
);
console
.
log
(
"curType:"
,
curType
);
switch
(
curType
)
{
case
"home"
:
app
.
router
.
push
({
...
...
src/http/api.js
View file @
712025c
...
...
@@ -6,10 +6,11 @@ module.exports = {
bannerList
:
'/banner/list'
,
// 轮播图
tabList
:
'/tab/list'
,
// 获取标签
videoList
:
'/video/list'
,
// 视频列表
videoAcccout
:
'/video/acc
cou
t'
,
// 帐号下的视频
videoAcccout
:
'/video/acc
oun
t'
,
// 帐号下的视频
videoDetail
:
'/video/detail'
,
// 视频详情
rewardDetail
:
'/hide/order'
,
// 获得打赏视频
videoMore
:
'/video/more'
,
// 更多推荐
accountDetail
:
'/account/detail'
,
// 帐号详情
/**
* 通用接口
...
...
src/pages/detail/detail.js
View file @
712025c
...
...
@@ -98,6 +98,16 @@ Page({
},
/**
* 返回首页
*/
toIndex
()
{
app
.
router
.
push
({
openType
:
"reLaunch"
,
path
:
"index"
})
},
/**
* 请求DataList
*/
queryVideoMore
()
{
...
...
src/pages/detail/detail.scss
View file @
712025c
...
...
@@ -48,6 +48,7 @@
justify-content
:
center
;
align-items
:
center
;
color
:
#ffffff
;
font-weight
:
bold
;
.iconfont
{
font-size
:
48px
;
...
...
@@ -55,6 +56,7 @@
.t1
{
padding
:
0
6px
;
font-weight
:
bold
;
}
}
...
...
@@ -129,6 +131,7 @@
.t1
{
padding
:
0
6px
;
}
&
:last-child
{
...
...
src/pages/detail/detail.wxml
View file @
712025c
...
...
@@ -59,12 +59,16 @@
</view>
</view>
<!-- 返回首页按钮 -->
<view class="index-btn">
<view
bindtap="toIndex"
class="index-btn">
<span class="t1 iconfont iconhome"></span>
<span>返回首页</span>
</view>
</view>
</view>
</view>
<!-- <shortcut types="{{[]}}" pics="{{['red-package']}}"></shortcut> -->
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
<shortcut class="red-p" types="{{[]}}" pics="{{['red-package']}}"></shortcut>
<shortcut ></shortcut>
...
...
src/pages/index/index.js
View file @
712025c
...
...
@@ -40,7 +40,6 @@ Page({
* 做加载更多操作
*/
onReachBottom
()
{
console
.
log
(
"onReachBottom"
);
if
(
this
.
data
.
dataList
.
length
<
this
.
data
.
total
)
{
this
.
setData
({
page
:
this
.
data
.
page
+
1
...
...
@@ -57,16 +56,8 @@ Page({
queueCode
:
""
,
})
},
onTabsChange
(
event
)
{
// console.log("this.data.tabList:", this.data.tabList);
// if (this.data.tabList && this.data.tabList.length > 0) {
// this.setData({
// curTab: this.data.tabList[event.detail.index]
// })
// this.resetPage();
// this.queryVideoList();
// }
},
// 点击tabs
onVanTabsHandler
(
event
)
{
let
{
index
,
...
...
@@ -77,6 +68,7 @@ Page({
curTab
:
this
.
data
.
tabList
[
event
.
detail
.
index
]
})
this
.
resetPage
();
this
.
queryBannerList
();
this
.
queryVideoList
();
}
},
...
...
@@ -89,6 +81,21 @@ Page({
}
})
},
/**
* 到个人列表页面
*/
toPersonalList
(
evt
)
{
let
detailData
=
getBindtapData
(
evt
);
if
(
detailData
&&
detailData
.
accountCode
)
{
detailData
.
c
=
detailData
.
accountCode
;
app
.
router
.
push
({
path
:
"personalList"
,
query
:
detailData
})
}
},
/**
* 获取tab列表
*/
...
...
@@ -137,7 +144,7 @@ Page({
queryVideoList
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
app
.
post
({
sid
:
tru
e
,
sid
:
fals
e
,
url
:
app
.
api
.
videoList
,
data
:
{
page
:
this
.
data
.
page
,
...
...
src/pages/index/index.scss
View file @
712025c
...
...
@@ -78,7 +78,6 @@
@include
border-top-radius
(
16px
);
width
:
$contentWidth
;
pointer-events
:
none
;
}
.tit
{
...
...
@@ -102,7 +101,7 @@
position
:
absolute
;
left
:
0
;
right
:
0
;
top
:
1
0
0px
;
top
:
1
6
0px
;
margin
:
0
auto
;
text-align
:
center
;
font-weight
:
bold
;
...
...
@@ -171,10 +170,3 @@
}
}
.red-p
{
.comp
{
bottom
:
auto
;
top
:
15%
;
}
}
...
...
src/pages/index/index.wxml
View file @
712025c
...
...
@@ -5,7 +5,7 @@
<view class="app__content main">
<view class="top-space"></view>
<van-sticky>
<van-tabs ellipsis="{{ false }}" active="{{ active }}" bind:click="onVanTabsHandler"
bind:change="onTabsChange"
>
<van-tabs ellipsis="{{ false }}" active="{{ active }}" bind:click="onVanTabsHandler">
<van-tab wx:for="{{tabList}}" wx:key="{{index}}" title="{{item.tabName}}"></van-tab>
</van-tabs>
</van-sticky>
...
...
@@ -29,7 +29,7 @@
<span class="iconfont iconicon-test16"></span>
</view>
<view class="list-item-func">
<view class="user">
<view
bindtap="toPersonalList" data-data="{{item}}" data-index="{{index}}"
class="user">
<image class="portrait" mode="aspectFill" src="{{item.headImage}}" />
<text class="name">{{item.accountName || ""}}</text>
</view>
...
...
@@ -60,4 +60,7 @@
</view>
</view>
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
<shortcut class="red-p" types="{{[]}}" pics="{{['red-package']}}"></shortcut>
...
...
src/pages/personal-list/personal-list.js
View file @
712025c
...
...
@@ -12,6 +12,7 @@ Page({
size
:
10
,
dataList
:
[],
options
:
{},
personInfo
:
{}
},
onShareAppMessage
()
{
let
detailData
=
this
.
data
.
detailData
;
...
...
@@ -34,10 +35,12 @@ Page({
this
.
setData
({
options
:
tempOptions
});
console
.
log
(
"tempOptions:"
,
tempOptions
);
this
.
initData
();
},
initData
()
{
this
.
resetPage
();
this
.
queryAccountDetail
();
this
.
queryVideoList
();
},
/**
...
...
@@ -72,6 +75,27 @@ Page({
},
/**
* 账号星期
*/
queryAccountDetail
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
app
.
post
({
url
:
app
.
api
.
accountDetail
,
data
:
{
accountCode
:
this
.
data
.
options
.
c
}
}).
then
((
result
)
=>
{
this
.
setData
({
personInfo
:
result
})
resolve
(
result
);
}).
catch
((
err
)
=>
{
reject
(
err
)
});
});
},
/**
* 获取视频列表
*/
queryVideoList
()
{
...
...
src/pages/personal-list/personal-list.scss
View file @
712025c
...
...
@@ -64,6 +64,7 @@
justify-content
:
center
;
position
:
relative
;
width
:
$contentWidth
;
background-color
:
#dddddd
;
.vid
{
@include
border-top-radius
(
16px
);
...
...
@@ -86,6 +87,19 @@
@include
ellipsis
(
1
);
}
.iconfont
{
font-size
:
160px
;
position
:
absolute
;
left
:
0
;
right
:
0
;
top
:
160px
;
margin
:
0
auto
;
text-align
:
center
;
font-weight
:
bold
;
// color: #efefef;
color
:
#ffffff
;
}
}
&
-func
{
...
...
src/pages/personal-list/personal-list.wxml
View file @
712025c
...
...
@@ -3,22 +3,25 @@
<view class="app__bg bg"></view>
<!-- <view class="app__top-shadow"></view> -->
<view class="app__content main">
<view class="top-space"></view>
<view class="personal">
<view class="top-space"></view>
<view class="name">{{options.accountName}} 的视频列表</view>
<image class="portrait" mode="aspectFill" src="{{options.headImage}}" />
<view class="name">{{personInfo.accountName}} 的视频列表</view>
<image class="portrait" mode="aspectFill" src="{{personInfo.headImage}}" />
</view>
<view class="content">
<view class="list">
<view wx:for="{{dataList}}" wx:key="index" class="list-item">
<view bindtap="onDetailHandler" data-data="{{item}}" data-index="{{index}}" class="list-item-video">
<video objectFit="cover" class="vid" poster="{{item.thumbnail}}" src="{{item.videoUrl}}" />
<!-- <video objectFit="cover" class="vid" poster="{{item.thumbnail}}" src="{{item.videoUrl}}" />
<view class="tit">{{item.videoName}}</view> -->
<image src="{{item.thumbnail}}" mode="aspectFill" />
<view class="tit">{{item.videoName}}</view>
<span class="iconfont iconicon-test16"></span>
</view>
<view class="list-item-func">
<view class="user">
<image class="portrait" mode="aspectFill" src="{{
item
.headImage}}" />
<text class="name">{{
item
.accountName || ""}}</text>
<image class="portrait" mode="aspectFill" src="{{
personInfo
.headImage}}" />
<text class="name">{{
personInfo
.accountName || ""}}</text>
</view>
<button class="share" open-type="share">
<span class="t1 iconfont iconwechat"></span>
...
...
@@ -26,24 +29,12 @@
</button>
</view>
</view>
<!-- <view bindtap="onVideoHandler" wx:for="{{8}}" wx:key="index" data-data="{{item}}" data-index="{{index}}" class="list-item">
<view class="list-item-video">
<video objectFit="cover" class="vid" poster="https://kd.cdn.xyiyang.com/pro/mzczcradmin/008194acee794506aac4c7200ce654dc.jpg" src="https://kd.cdn.xyiyang.com/pro/mzczcradmin/7e91e8a4c7b84e6fa4bada7c8617c9cf.mp4" />
<view class="tit">这是一个视频</view>
</view>
<view class="list-item-func">
<view class="user">
<image class="portrait" mode="aspectFill" src="https://kd.cdn.xyiyang.com/pro/mzczcradmin/008194acee794506aac4c7200ce654dc.jpg" />
<text class="name">我爱我家</text>
</view>
<button class="share">
<span class="t1 iconfont iconwechat"></span>
<span class="t1">分享</span>
</button>
</view>
</view> -->
</view>
</view>
</view>
</view>
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
<shortcut></shortcut>
...
...
src/pages/reward-completed/reward-completed.js
View file @
712025c
...
...
@@ -64,7 +64,6 @@ Page({
* 请求DataList
*/
queryDataList
()
{
return
;
return
new
Promise
((
resolve
,
reject
)
=>
{
app
.
post
({
sid
:
false
,
...
...
src/pages/reward-completed/reward-completed.wxml
View file @
712025c
...
...
@@ -54,4 +54,7 @@
</view>
</view>
</view>
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
<shortcut></shortcut>
...
...
Please
register
or
sign in
to post a comment