e0c4200a by simon

默认提交

1 parent 866f257d
......@@ -43,12 +43,6 @@ App({
this.globalData.statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
this.globalData.barHeight = height;
this.share();
// 打点
this.stat({
classify: "minipro",
action: "detail_page",
primaryCode: "",
});
},
globalData: {
share: false,
......
......@@ -59,7 +59,6 @@ Component({
// showCancel: false,
// success(res) {}
// });
console.log("1111");
app.router.push({
path: "reward"
})
......@@ -72,8 +71,14 @@ Component({
// 客服消息
handleContact(e) {
console.log("handleContact");
console.log(e.detail.path)
console.log(e.detail.query)
console.log(e.detail.path);
console.log(e.detail.query);
// 打点
app.stat({
classify: "service",
action: "service_click",
primaryCode: "",
});
}
}
})
......
......@@ -5,7 +5,7 @@
<view wx:for="{{pics}}" wx:key="{{index}}" data-data="{{item}}" bindtap="onTapHandler" class="btn">
<image mode="aspectFit" src="{{'../../image/shortcut/'+item+'.png'}}" class="pics ani-tada" />
</view>
<button class="btn point" wx:if="{{contact}}" open-type="contact" bindcontact="handleContact">
<button class="btn point" wx:if="{{contact}}" open-type="contact" show-message-card="true" send-message-title="家有儿孙" end-message-path="/pages/index/index" send-message-img="https://kdcdn.oss-cn-shenzhen.aliyuncs.com/weapp/jyes/assets/logo.jpeg" bindcontact="handleContact">
<span class="iconfont iconicon-test3 contact"></span>
</button>
</view>
......
......@@ -9,7 +9,7 @@ module.exports = {
videoAcccout: '/video/account', // 帐号下的视频
videoDetail: '/video/detail', // 视频详情
rewardOrder: '/hide/order', // 打赏成功获取视频
rewardDetail: '/hide/detail', // 获得隐藏视频详情
hideDetail: '/hide/detail', // 获得隐藏视频详情
videoMore: '/video/more', // 更多推荐
accountDetail: '/account/detail', // 帐号详情
wxPay: '/wx/pay', // 帐号详情
......

11.2 KB | W: | H:

11.1 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
......@@ -21,7 +21,19 @@ Page({
vidHeight: 0, // 视频高度
isVideoEnded: false,
},
onShareAppMessage() {
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内转发按钮
} else {
// 打点
app.stat({
classify: "share",
action: "detail_page_share",
primaryCode: this.data.detailData.videoCode,
});
}
let detailData = this.data.detailData;
let title = detailData && detailData.videoName || "";
let path = `pages/detail/detail?c=${detailData.videoCode}`;
......@@ -112,6 +124,24 @@ Page({
this.setData({
isVideoEnded: true
})
// 打点
app.stat({
classify: "play",
action: "play_end",
primaryCode: this.data.detailData.videoCode,
});
},
/**
* 播放开始
*/
onVideoPlayHandler(evt) {
// 打点
app.stat({
classify: "play",
action: "video_code",
primaryCode: this.data.detailData.videoCode,
});
},
/**
......@@ -125,6 +155,28 @@ Page({
this.setData({
isVideoEnded: false
})
// 打点
app.stat({
classify: "play",
action: "video_code",
primaryCode: this.data.detailData.videoCode,
});
},
onShareFriend(){
app.stat({
classify: "share",
action: "detail_page_button_friend_share",
primaryCode: this.data.detailData.videoCode,
});
},
onShareGroup(){
app.stat({
classify: "share",
action: "detail_page_button_group_share",
primaryCode: this.data.detailData.videoCode,
});
},
/**
......@@ -166,12 +218,6 @@ Page({
* 视频详情
*/
queryVideoDetail() {
// 打点
app.stat({
classify: "page",
action: "detail_page",
primaryCode: this.data.options.c,
});
return new Promise((resolve, reject) => {
app.post({
......
......@@ -7,7 +7,7 @@
<!-- 视频详情 -->
<view class="detail">
<view class="vid-wrap" style='height: {{vidHeight}}rpx;'>
<video wx:if="{{!isVideoEnded}}" id="vid" bindended="onVideoEndedHandler" objectFit="contain" class="vid" poster="{{detailData.thumbnail}}" src="{{detailData.videoUrl}}" />
<video wx:if="{{!isVideoEnded}}" id="vid" bindended="onVideoEndedHandler" bindplay="onVideoPlayHandler" objectFit="contain" class="vid" poster="{{detailData.thumbnail}}" src="{{detailData.videoUrl}}" />
<view wx:else class="btn-wrap">
<button bindtap="onReplayHandler" class="btn">
<span class="t1 iconfont iconrefresh"></span>
......@@ -22,11 +22,11 @@
</view>
<view class="share">
<view class="btn-wrap">
<button open-type="share" class="btn ">
<button open-type="share" class="btn" bindtap="onShareFriend">
<span class="t1 iconfont iconplane"></span>
<span class="t1">分享给好友</span>
</button>
<button open-type="share" class="ani-scl btn btn2">
<button open-type="share" class="ani-scl btn btn2" bindtap="onShareGroup">
<span class="t1 iconfont iconplane"></span>
<span class="t1">分享到群</span>
</button>
......
......@@ -18,25 +18,16 @@ Page({
active: 0,
curBanner: {}
},
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
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内转发按钮
} else {
// 打点
app.stat({
classify: "share",
action: "list_page_share",
primaryCode: this.data.curTab.tabCode,
});
}
},
showAuth() {
......@@ -186,6 +177,16 @@ Page({
},
onShareItem(evt){
let curItem = getBindtapData(evt);
app.stat({
classify: "share",
action: "list_page_button_share",
primaryCode: curItem.videoCode
});
},
/**
* 到个人列表页面
*/
......@@ -225,13 +226,6 @@ Page({
*/
queryBannerList() {
// 打点
app.stat({
classify: "page",
action: "tab_page",
primaryCode: this.data.curTab.tabCode || ""
});
return new Promise((resolve, reject) => {
app.post({
sid: false,
......
......@@ -136,7 +136,7 @@
position: absolute;
left: 0;
right: 0;
top: 72px;
top: 52px;
margin: 0 auto;
text-align: center;
font-weight: bold;
......
......@@ -38,7 +38,7 @@
<image class="portrait" mode="aspectFill" src="{{item.headImage}}" />
<text class="name">{{item.accountName || ""}}</text>
</view>
<button data-data="{{item}}" data-index="{{index}}" class="share" open-type="share">
<button data-data="{{item}}" data-index="{{index}}" class="share" open-type="share" bindtap="onShareItem">
<span class="t1 iconfont iconwechat"></span>
<span class="t1">分享</span>
</button>
......
......@@ -14,25 +14,23 @@ Page({
options: {},
personInfo: {}
},
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 || "";
}
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内转发按钮
} else {
// 打点
app.stat({
classify: "share",
action: "account_page_share",
primaryCode: this.data.options.c,
});
}
let opts = this.data.options;
let path = `pages/personal-list/personal-list?c=${opts.c}`;
return {
title,
path,
imageUrl
}
},
showAuth() {
......@@ -84,6 +82,16 @@ Page({
})
},
onShareItem(evt){
let curItem = getBindtapData(evt);
app.stat({
classify: "share",
action: "account_page_button_share",
primaryCode: curItem.videoCode
});
},
/**
* 账号星期
*/
......
......@@ -24,7 +24,7 @@
<image class="portrait" mode="aspectFill" src="{{item.headImage}}" />
<text class="name">{{item.accountName || ""}}</text>
</view>
<button data-data="{{item}}" data-index="{{index}}" class="share" open-type="share">
<button data-data="{{item}}" data-index="{{index}}" class="share" open-type="share" bindtap="onShareItem">
<span class="t1 iconfont iconwechat"></span>
<span class="t1">分享</span>
</button>
......
......@@ -4,6 +4,8 @@ import {
getLastScreenHeight
} from '../../utils/util';
// code "201912261553282091540"
let app = getApp();
Page({
data: {
......@@ -21,7 +23,18 @@ Page({
vidHeight: 0, // 视频高度
isVideoEnded: false,
},
onShareAppMessage() {
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内转发按钮
}else{
// 打点
app.stat({
classify: "hide",
action: "hide_detail_page_share",
primaryCode: this.data.detailData.videoCode,
});
}
let detailData = this.data.detailData;
let title = detailData && detailData.videoName || "";
let path = `pages/detail/detail?c=${detailData.videoCode}`;
......@@ -31,7 +44,6 @@ Page({
path,
imageUrl
}
},
showAuth() {
this.setData({
......@@ -109,6 +121,26 @@ Page({
this.setData({
isVideoEnded: true
})
// 打点
app.stat({
classify: "hide",
action: "hide_play_end",
primaryCode: this.data.detailData.videoCode,
});
},
/**
* 播放开始
*/
onVideoPlayHandler(evt) {
// 打点
app.stat({
classify: "hide",
action: "hide_play",
primaryCode: this.data.detailData.videoCode,
});
},
/**
......@@ -122,6 +154,12 @@ Page({
this.setData({
isVideoEnded: false
})
// 打点
app.stat({
classify: "hide",
action: "hide_play",
primaryCode: this.data.detailData.videoCode,
});
},
/**
......@@ -163,29 +201,35 @@ Page({
* 视频详情
*/
queryVideoDetail() {
console.log("reward-completed query:", this.data.options);
return new Promise((resolve, reject) => {
app.post({
url: app.api.rewardDetail,
url: app.api.rewardOrder,
data: {
videoCode: this.data.options.c
videoCode: this.data.options.c,
orderCode: this.data.options.c,
}
}).then((result) => {
this.setData({
detailData: result
})
// let {
// width,
// height
// } = result;
// let vidHeight = (height / width) * 750;
// if (vidHeight < 800) {
// vidHeight = 800;
// } else {
// vidHeight = getLastScreenHeight(132);
// }
// this.setData({
// vidHeight: vidHeight,
// });
let {
width,
height
} = result;
let vidHeight = (height / width) * 750;
if (vidHeight < 800) {
vidHeight = 800;
} else {
vidHeight = getLastScreenHeight(132);
}
console.log("vidHeight:", vidHeight);
// vidHeight = pxToRpx(vidHeight);
// let vidHeight = getLastScreenHeight(132);
this.setData({
vidHeight: vidHeight,
});
resolve(result);
}).catch((err) => {
......
......@@ -39,11 +39,65 @@
color: #4a4a4a;
}
.vid-wrap {
position: relative;
@extend .fcc;
@extend .bb;
width: 100%;
height: 480px;
margin: 16px auto 0;
text-align: center;
.vid {
margin: 24px auto 0;
width: 710px;
border-radius: 16px;
}
.btn-wrap {
display: flex;
justify-content: center;
align-items: center;
margin: 0 auto;
width: 710px;
height: 100%;
background-color: #333333;
.btn {
background-color: transparent;
@extend .fcc;
margin: 0 24px;
border: solid 4px #ffffff;
width: 300px;
height: 84px;
border-radius: 84px;
color: #ffffff;
.iconfont {
font-size: 48px;
}
.tt {
font-weight: bold;
font-size: 36px;
padding: 0 8px;
}
.t2 {}
}
.btn2 {
background-color: #f67b37;
border: none;
}
}
}
}
......
......@@ -6,22 +6,34 @@
<view class="content">
<!-- 赞赏成功提示 -->
<view class="reward">
<text class="tips tips1">赞赏成功!\n我们将持续为您奉献精彩内容!</text>
<text class="tips tips2">解锁一段隐藏祝福视频,请有缘人观看</text>
<video objectFit="contain" class="vid" poster="https://kd.cdn.xyiyang.com/pro/mzczcradmin/008194acee794506aac4c7200ce654dc.jpg" src="https://kd.cdn.xyiyang.com/pro/mzczcradmin/7e91e8a4c7b84e6fa4bada7c8617c9cf.mp4" />
<text class="tips tips1">赞赏成功!\n {{detailData.blessingOne}}</text>
<text class="tips tips2">{{detailData.blessingTwo}}</text>
<view class="vid-wrap" >
<video wx:if="{{!isVideoEnded}}" id="vid" bindended="onVideoEndedHandler" bindplay="onVideoPlayHandler" objectFit="contain" class="vid" poster="{{detailData.thumbnail}}" src="{{detailData.videoUrl}}" />
<view wx:else class="btn-wrap">
<button bindtap="onReplayHandler" class="btn">
<span class="t1 iconfont iconrefresh"></span>
<span class="tt">重播</span>
</button>
<button open-type="share" class="btn btn2 ani-scl">
<span class="t1 iconfont iconwechat"></span>
<span class="tt">分享</span>
</button>
</view>
</view>
</view>
<!-- 功能区 -->
<view class="func">
<view bindtap="toPersonalList" class="user">
<image class="portrait" mode="aspectFill" src="https://kd.cdn.xyiyang.com/pro/mzczcradmin/008194acee794506aac4c7200ce654dc.jpg" />
<image class="portrait" mode="aspectFill" src="{{detailData.headImage}}" />
<view class="desc">
<view class="t1 name">我爱我家</view>
<view class="t1 num">280个视频</view>
<view class="t1 name">{{detailData.accountName}}</view>
<view class="t1 num">{{detailData.count || 0}}个视频</view>
</view>
</view>
<view class="btn-wrap">
<!-- <view class="tit">{{item.videoName}}</view> -->
<view class="tit">一家人在一起的时刻</view>
<!-- <view class="tit">一家人在一起的时刻</view> -->
<!-- <view class="btn btn2">
<span>更多推荐</span>
</view> -->
......
......@@ -13,38 +13,52 @@ Page({
indexInfo: {},
userInfo: {},
rewardList: [{
price: 6,
packet: "SIX_PACKET"
price: 1,
packet: "price1"
},
{
price: 18,
packet: "EIGHTEEN_PACKET"
price: 2,
packet: "price2"
},
{
price: 66,
packet: "SIXTY_SIX_PACKET"
price: 3,
packet: "price3"
},
{
price: 88,
packet: "EIGHTY_EIGHT_PACKET"
price: 4,
packet: "price4"
},
{
price: 168,
packet: "ONE_SIXTY_EIGHT_PACKET"
price: 5,
packet: "price5"
},
{
price: 388,
packet: "THREE_EIGHTY_EIGHT_PACKET"
price: 6,
packet: "price6"
},
]
},
onShareAppMessage() {},
onShareAppMessage(res) {},
showAuth() {
this.setData({
authorizeVisible: true
})
},
onLoad(options) {},
onLoad(options) {
if (res.from === 'button') {
// 来自页面内转发按钮
} else {
// 打点
app.stat({
classify: "page",
action: "reword_page",
primaryCode: "",
});
}
},
/**
* 基础方法
......@@ -99,7 +113,7 @@ Page({
app.router.push({
path: "rewardCompleted",
query: {
c: "" // orderCode
c: res2.orderCode // orderCode
}
})
},
......