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
c84a0a75
authored
2019-12-09 10:26:53 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
默认提交
1 parent
cc0811b6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
13 deletions
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.wxml
src/pages/index/index.js
View file @
c84a0a7
...
...
@@ -5,6 +5,7 @@ import {
let
app
=
getApp
();
Page
({
data
:
{
isOverShare
:
true
,
authorizeVisible
:
false
,
total
:
0
,
page
:
1
,
...
...
@@ -17,7 +18,27 @@ Page({
active
:
0
,
curBanner
:
{}
},
onShareAppMessage
()
{},
onShareAppMessage
(
options
)
{
console
.
log
(
"options:"
,
options
);
let
title
=
""
;
let
path
=
""
;
let
imageUrl
=
""
;
if
(
options
&&
options
.
from
==
"button"
)
{
// 点击按钮监听
let
detailData
=
options
.
target
.
dataset
.
data
;
if
(
detailData
)
{
title
=
detailData
&&
detailData
.
videoName
||
""
;
path
=
`pages/detail/detail?c=
${
detailData
.
videoCode
}
`
;
imageUrl
=
detailData
&&
detailData
.
thumbnail
||
""
;
}
}
return
{
title
,
path
,
imageUrl
}
},
showAuth
()
{
this
.
setData
({
authorizeVisible
:
true
...
...
src/pages/index/index.scss
View file @
c84a0a7
...
...
@@ -79,6 +79,7 @@
position
:
relative
;
width
:
$contentWidth
;
background-color
:
#dddddd
;
@include
border-top-radius
(
16px
);
.img
{
width
:
$contentWidth
;
...
...
@@ -93,6 +94,7 @@
}
.tit
{
opacity
:
.8
;
font-size
:
40px
;
height
:
80px
;
line-height
:
80px
;
...
...
@@ -102,9 +104,10 @@
position
:
absolute
;
width
:
100%
;
bottom
:
0
;
background-color
:
rgba
(
$color
:
#000000
,
$alpha
:
0
.5
);
//
background-color: rgba($color: #000000, $alpha: 0.5);
@include
border-top-radius
(
8px
);
@include
ellipsis
(
1
);
background-image
:
linear-gradient
(
to
bottom
,
#000000
,
#ffffff
);
}
...
...
src/pages/index/index.wxml
View file @
c84a0a7
...
...
@@ -10,7 +10,7 @@
</van-tabs>
</van-sticky>
<view class="banner" wx:if="{{bannerList && bannerList.length>0}}">
<swiper bindchange="onBannerChangeHandler" class="swiper" indicator-color="rgba(0,0,0,.3)" indicator-active-color="rgba(255,255,255,1)" indicator-dots="{{
true}}" autoplay="{{true
}}" interval="{{5000}}" duration="{{500}}">
<swiper bindchange="onBannerChangeHandler" class="swiper" indicator-color="rgba(0,0,0,.3)" indicator-active-color="rgba(255,255,255,1)" indicator-dots="{{
bannerList.length>1}}" autoplay="{{bannerList.length>1
}}" interval="{{5000}}" duration="{{500}}">
<block wx:for="{{bannerList}}" wx:key="{{index}}">
<swiper-item>
<image bindtap="onBannerHandler" data-data="{{item}}" data-index="{{index}}" class="swiper-image" src="{{item.imageUrl}}" mode="aspectFill" />
...
...
@@ -20,7 +20,6 @@
</swiper-item>
</block>
</swiper>
<!-- <view class="tit">名字</view> -->
</view>
<view class="content">
<view class="list">
...
...
@@ -37,7 +36,7 @@
<image class="portrait" mode="aspectFill" src="{{item.headImage}}" />
<text class="name">{{item.accountName || ""}}</text>
</view>
<button class="share" open-type="share">
<button
data-data="{{item}}" data-index="{{index}}"
class="share" open-type="share">
<span class="t1 iconfont iconwechat"></span>
<span class="t1">分享</span>
</button>
...
...
src/pages/personal-list/personal-list.js
View file @
c84a0a7
...
...
@@ -14,11 +14,21 @@ Page({
options
:
{},
personInfo
:
{}
},
onShareAppMessage
()
{
let
detailData
=
this
.
data
.
detailData
;
let
title
=
detailData
&&
detailData
.
videoName
||
""
;
let
path
=
`pages/detail/detail?c=
${
detailData
.
videoCode
}
`
;
let
imageUrl
=
detailData
&&
detailData
.
thumbnail
||
""
;
onShareAppMessage
(
options
)
{
console
.
log
(
"options:"
,
options
);
let
title
=
""
;
let
path
=
""
;
let
imageUrl
=
""
;
if
(
options
&&
options
.
from
==
"button"
)
{
// 点击按钮监听
let
detailData
=
options
.
target
.
dataset
.
data
;
if
(
detailData
)
{
title
=
detailData
&&
detailData
.
videoName
||
""
;
path
=
`pages/detail/detail?c=
${
detailData
.
videoCode
}
`
;
imageUrl
=
detailData
&&
detailData
.
thumbnail
||
""
;
}
}
return
{
title
,
path
,
...
...
src/pages/personal-list/personal-list.wxml
View file @
c84a0a7
...
...
@@ -9,7 +9,7 @@
<image class="portrait" mode="aspectFill" src="{{personInfo.headImage}}" />
</view>
<view class="content">
<view class="list">
<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">
<image class="img" src="{{item.thumbnail}}" mode="aspectFill" />
...
...
@@ -23,7 +23,7 @@
<image class="portrait" mode="aspectFill" src="{{item.headImage}}" />
<text class="name">{{item.accountName || ""}}</text>
</view>
<button class="share" open-type="share">
<button
data-data="{{item}}" data-index="{{index}}"
class="share" open-type="share">
<span class="t1 iconfont iconwechat"></span>
<span class="t1">分享</span>
</button>
...
...
@@ -33,7 +33,6 @@
</view>
</view>
</view>
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
...
...
Please
register
or
sign in
to post a comment