c84a0a75 by simon

默认提交

1 parent cc0811b6
......@@ -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
......
......@@ -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);
}
......
......@@ -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>
......
......@@ -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,
......
......@@ -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>
......