8739c417 by simon

默认提交

1 parent 7de4346d
......@@ -8,12 +8,22 @@ let store = require('./utils/stroage');
require('./http/mock-data');
App({
api: api,
get: fetchApi.fetch,
post: (params) => {
params.method = 'post';
return fetchApi.fetch(params);
},
api: api,
stat: (data) => {
let params = {}
params.mode = 'log';
params.mode = 'log';
params.sid = false;
params.url = api.stat;
params.data = data;
params.method = "POST";
return fetchApi.fetch(params);
},
config: config,
router: router,
store: store,
......@@ -33,6 +43,11 @@ App({
this.globalData.statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
this.globalData.barHeight = height;
this.share();
this.stat({
classify: "minipro",
action: "detail_page",
primaryCode: "",
})
},
globalData: {
share: false,
......
......@@ -8,9 +8,12 @@ module.exports = {
videoList: '/video/list', // 视频列表
videoAcccout: '/video/account', // 帐号下的视频
videoDetail: '/video/detail', // 视频详情
rewardDetail: '/hide/order', // 获得打赏视频
rewardOrder: '/hide/order', // 打赏成功获取视频
rewardDetail: '/hide/detail', // 获得隐藏视频详情
videoMore: '/video/more', // 更多推荐
accountDetail: '/account/detail', // 帐号详情
wxPay: '/wx/pay', // 帐号详情
stat: '/dot', // 打点
/**
* 通用接口
......
......@@ -13,22 +13,28 @@ Page({
indexInfo: {},
userInfo: {},
rewardList: [{
price: 6
price: 6,
packet: "SIX_PACKET"
},
{
price: 18
price: 18,
packet: "EIGHTEEN_PACKET"
},
{
price: 66
price: 66,
packet: "SIXTY_SIX_PACKET"
},
{
price: 88
price: 88,
packet: "EIGHTY_EIGHT_PACKET"
},
{
price: 168
price: 168,
packet: "ONE_SIXTY_EIGHT_PACKET"
},
{
price: 388
price: 388,
packet: "THREE_EIGHTY_EIGHT_PACKET"
},
]
},
......@@ -51,14 +57,14 @@ Page({
* 到达底部
* 做加载更多操作
*/
onReachBottom() {
if (this.data.dataList.length < this.data.total) {
this.setData({
page: this.data.page + 1
});
this.queryDataList();
}
},
// onReachBottom() {
// if (this.data.dataList.length < this.data.total) {
// this.setData({
// page: this.data.page + 1
// });
// this.queryDataList();
// }
// },
// 重置页面列表 点击搜索条件时需要
resetPage() {
......@@ -69,6 +75,22 @@ Page({
},
/**
*
*/
onRewardHandler(evt) {
let curItem = getBindtapData(evt);
console.log("curItem:", curItem);
app.post({
url: app.api.wxPay,
data: curItem
}).then((result) => {
console.log("wxPay result:", result);
}).catch((err) => {
});
},
/**
* 请求DataList
*/
queryDataList() {
......
......@@ -19,10 +19,31 @@
position: relative;
.portrait {
text-align: center;
position: relative;
width: 207px;
margin: 0 auto;
&-bg {
text-align: center;
position: absolute;
width: 207px;
top: -3px;
}
// 头像
.avatar {
margin: 0 auto;
position: relative;
display: block;
width: 201px;
height: 201px;
border-radius: 50%;
overflow: hidden
}
.avatar-avatar::after {
border-radius: 205px;
}
}
......@@ -38,7 +59,7 @@
&-item {
width: 320px;
margin-bottom:12px;
margin-bottom: 12px;
}
}
}
......
......@@ -7,10 +7,11 @@
<view class="content">
<view class="portrait">
<image class="portrait-bg" mode="widthFix" src="../../image/reward/reward-portrait-bg.png" />
<!-- <open-data class="avatar" type="userAvatarUrl"></open-data> -->
</view>
<view class="reward">
<view class="reward-wrap">
<image class="reward-wrap-item" wx:for="{{rewardList}}" wx:key="{{index}}" mode="widthFix" src="{{'../../image/reward/m-'+item.price+'.png'}}" />
<image bindtap="onRewardHandler" data-data="{{item}}" class="reward-wrap-item" wx:for="{{rewardList}}" wx:key="{{index}}" mode="widthFix" src="{{'../../image/reward/m-'+item.price+'.png'}}" />
</view>
</view>
</view>
......