默认提交
Showing
5 changed files
with
45 additions
and
13 deletions
... | @@ -5,6 +5,7 @@ import { | ... | @@ -5,6 +5,7 @@ import { |
5 | let app = getApp(); | 5 | let app = getApp(); |
6 | Page({ | 6 | Page({ |
7 | data: { | 7 | data: { |
8 | isOverShare: true, | ||
8 | authorizeVisible: false, | 9 | authorizeVisible: false, |
9 | total: 0, | 10 | total: 0, |
10 | page: 1, | 11 | page: 1, |
... | @@ -17,7 +18,27 @@ Page({ | ... | @@ -17,7 +18,27 @@ Page({ |
17 | active: 0, | 18 | active: 0, |
18 | curBanner: {} | 19 | curBanner: {} |
19 | }, | 20 | }, |
20 | onShareAppMessage() {}, | 21 | onShareAppMessage(options) { |
22 | console.log("options:", options); | ||
23 | let title = ""; | ||
24 | let path = ""; | ||
25 | let imageUrl = ""; | ||
26 | |||
27 | if (options && options.from == "button") { | ||
28 | // 点击按钮监听 | ||
29 | let detailData = options.target.dataset.data; | ||
30 | if (detailData) { | ||
31 | title = detailData && detailData.videoName || ""; | ||
32 | path = `pages/detail/detail?c=${detailData.videoCode}`; | ||
33 | imageUrl = detailData && detailData.thumbnail || ""; | ||
34 | } | ||
35 | } | ||
36 | return { | ||
37 | title, | ||
38 | path, | ||
39 | imageUrl | ||
40 | } | ||
41 | }, | ||
21 | showAuth() { | 42 | showAuth() { |
22 | this.setData({ | 43 | this.setData({ |
23 | authorizeVisible: true | 44 | authorizeVisible: true | ... | ... |
... | @@ -79,6 +79,7 @@ | ... | @@ -79,6 +79,7 @@ |
79 | position: relative; | 79 | position: relative; |
80 | width: $contentWidth; | 80 | width: $contentWidth; |
81 | background-color: #dddddd; | 81 | background-color: #dddddd; |
82 | @include border-top-radius(16px); | ||
82 | 83 | ||
83 | .img { | 84 | .img { |
84 | width: $contentWidth; | 85 | width: $contentWidth; |
... | @@ -93,6 +94,7 @@ | ... | @@ -93,6 +94,7 @@ |
93 | } | 94 | } |
94 | 95 | ||
95 | .tit { | 96 | .tit { |
97 | opacity: .8; | ||
96 | font-size: 40px; | 98 | font-size: 40px; |
97 | height: 80px; | 99 | height: 80px; |
98 | line-height: 80px; | 100 | line-height: 80px; |
... | @@ -102,9 +104,10 @@ | ... | @@ -102,9 +104,10 @@ |
102 | position: absolute; | 104 | position: absolute; |
103 | width: 100%; | 105 | width: 100%; |
104 | bottom: 0; | 106 | bottom: 0; |
105 | background-color: rgba($color: #000000, $alpha: 0.5); | 107 | // background-color: rgba($color: #000000, $alpha: 0.5); |
106 | @include border-top-radius(8px); | 108 | @include border-top-radius(8px); |
107 | @include ellipsis(1); | 109 | @include ellipsis(1); |
110 | background-image: linear-gradient(to bottom, #000000, #ffffff); | ||
108 | 111 | ||
109 | } | 112 | } |
110 | 113 | ... | ... |
... | @@ -10,7 +10,7 @@ | ... | @@ -10,7 +10,7 @@ |
10 | </van-tabs> | 10 | </van-tabs> |
11 | </van-sticky> | 11 | </van-sticky> |
12 | <view class="banner" wx:if="{{bannerList && bannerList.length>0}}"> | 12 | <view class="banner" wx:if="{{bannerList && bannerList.length>0}}"> |
13 | <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}}"> | 13 | <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}}"> |
14 | <block wx:for="{{bannerList}}" wx:key="{{index}}"> | 14 | <block wx:for="{{bannerList}}" wx:key="{{index}}"> |
15 | <swiper-item> | 15 | <swiper-item> |
16 | <image bindtap="onBannerHandler" data-data="{{item}}" data-index="{{index}}" class="swiper-image" src="{{item.imageUrl}}" mode="aspectFill" /> | 16 | <image bindtap="onBannerHandler" data-data="{{item}}" data-index="{{index}}" class="swiper-image" src="{{item.imageUrl}}" mode="aspectFill" /> |
... | @@ -20,7 +20,6 @@ | ... | @@ -20,7 +20,6 @@ |
20 | </swiper-item> | 20 | </swiper-item> |
21 | </block> | 21 | </block> |
22 | </swiper> | 22 | </swiper> |
23 | <!-- <view class="tit">名字</view> --> | ||
24 | </view> | 23 | </view> |
25 | <view class="content"> | 24 | <view class="content"> |
26 | <view class="list"> | 25 | <view class="list"> |
... | @@ -37,7 +36,7 @@ | ... | @@ -37,7 +36,7 @@ |
37 | <image class="portrait" mode="aspectFill" src="{{item.headImage}}" /> | 36 | <image class="portrait" mode="aspectFill" src="{{item.headImage}}" /> |
38 | <text class="name">{{item.accountName || ""}}</text> | 37 | <text class="name">{{item.accountName || ""}}</text> |
39 | </view> | 38 | </view> |
40 | <button class="share" open-type="share"> | 39 | <button data-data="{{item}}" data-index="{{index}}" class="share" open-type="share"> |
41 | <span class="t1 iconfont iconwechat"></span> | 40 | <span class="t1 iconfont iconwechat"></span> |
42 | <span class="t1">分享</span> | 41 | <span class="t1">分享</span> |
43 | </button> | 42 | </button> | ... | ... |
... | @@ -14,11 +14,21 @@ Page({ | ... | @@ -14,11 +14,21 @@ Page({ |
14 | options: {}, | 14 | options: {}, |
15 | personInfo: {} | 15 | personInfo: {} |
16 | }, | 16 | }, |
17 | onShareAppMessage() { | 17 | onShareAppMessage(options) { |
18 | let detailData = this.data.detailData; | 18 | console.log("options:", options); |
19 | let title = detailData && detailData.videoName || ""; | 19 | let title = ""; |
20 | let path = `pages/detail/detail?c=${detailData.videoCode}`; | 20 | let path = ""; |
21 | let imageUrl = detailData && detailData.thumbnail || ""; | 21 | let imageUrl = ""; |
22 | |||
23 | if (options && options.from == "button") { | ||
24 | // 点击按钮监听 | ||
25 | let detailData = options.target.dataset.data; | ||
26 | if (detailData) { | ||
27 | title = detailData && detailData.videoName || ""; | ||
28 | path = `pages/detail/detail?c=${detailData.videoCode}`; | ||
29 | imageUrl = detailData && detailData.thumbnail || ""; | ||
30 | } | ||
31 | } | ||
22 | return { | 32 | return { |
23 | title, | 33 | title, |
24 | path, | 34 | path, | ... | ... |
... | @@ -9,7 +9,7 @@ | ... | @@ -9,7 +9,7 @@ |
9 | <image class="portrait" mode="aspectFill" src="{{personInfo.headImage}}" /> | 9 | <image class="portrait" mode="aspectFill" src="{{personInfo.headImage}}" /> |
10 | </view> | 10 | </view> |
11 | <view class="content"> | 11 | <view class="content"> |
12 | <view class="list"> | 12 | <view class="list"> |
13 | <view wx:for="{{dataList}}" wx:key="index" class="list-item"> | 13 | <view wx:for="{{dataList}}" wx:key="index" class="list-item"> |
14 | <view bindtap="onDetailHandler" data-data="{{item}}" data-index="{{index}}" class="list-item-video"> | 14 | <view bindtap="onDetailHandler" data-data="{{item}}" data-index="{{index}}" class="list-item-video"> |
15 | <image class="img" src="{{item.thumbnail}}" mode="aspectFill" /> | 15 | <image class="img" src="{{item.thumbnail}}" mode="aspectFill" /> |
... | @@ -23,7 +23,7 @@ | ... | @@ -23,7 +23,7 @@ |
23 | <image class="portrait" mode="aspectFill" src="{{item.headImage}}" /> | 23 | <image class="portrait" mode="aspectFill" src="{{item.headImage}}" /> |
24 | <text class="name">{{item.accountName || ""}}</text> | 24 | <text class="name">{{item.accountName || ""}}</text> |
25 | </view> | 25 | </view> |
26 | <button class="share" open-type="share"> | 26 | <button data-data="{{item}}" data-index="{{index}}" class="share" open-type="share"> |
27 | <span class="t1 iconfont iconwechat"></span> | 27 | <span class="t1 iconfont iconwechat"></span> |
28 | <span class="t1">分享</span> | 28 | <span class="t1">分享</span> |
29 | </button> | 29 | </button> |
... | @@ -33,7 +33,6 @@ | ... | @@ -33,7 +33,6 @@ |
33 | </view> | 33 | </view> |
34 | </view> | 34 | </view> |
35 | </view> | 35 | </view> |
36 | |||
37 | <van-popup show="{{ authorizeVisible }}"> | 36 | <van-popup show="{{ authorizeVisible }}"> |
38 | <authorize-comp bind:evtcomp="evtcomp"></authorize-comp> | 37 | <authorize-comp bind:evtcomp="evtcomp"></authorize-comp> |
39 | </van-popup> | 38 | </van-popup> | ... | ... |
-
Please register or sign in to post a comment