默认提交
Showing
5 changed files
with
81 additions
and
19 deletions
... | @@ -8,12 +8,22 @@ let store = require('./utils/stroage'); | ... | @@ -8,12 +8,22 @@ let store = require('./utils/stroage'); |
8 | require('./http/mock-data'); | 8 | require('./http/mock-data'); |
9 | 9 | ||
10 | App({ | 10 | App({ |
11 | api: api, | ||
11 | get: fetchApi.fetch, | 12 | get: fetchApi.fetch, |
12 | post: (params) => { | 13 | post: (params) => { |
13 | params.method = 'post'; | 14 | params.method = 'post'; |
14 | return fetchApi.fetch(params); | 15 | return fetchApi.fetch(params); |
15 | }, | 16 | }, |
16 | api: api, | 17 | stat: (data) => { |
18 | let params = {} | ||
19 | params.mode = 'log'; | ||
20 | params.mode = 'log'; | ||
21 | params.sid = false; | ||
22 | params.url = api.stat; | ||
23 | params.data = data; | ||
24 | params.method = "POST"; | ||
25 | return fetchApi.fetch(params); | ||
26 | }, | ||
17 | config: config, | 27 | config: config, |
18 | router: router, | 28 | router: router, |
19 | store: store, | 29 | store: store, |
... | @@ -33,6 +43,11 @@ App({ | ... | @@ -33,6 +43,11 @@ App({ |
33 | this.globalData.statusBarHeight = wx.getSystemInfoSync().statusBarHeight; | 43 | this.globalData.statusBarHeight = wx.getSystemInfoSync().statusBarHeight; |
34 | this.globalData.barHeight = height; | 44 | this.globalData.barHeight = height; |
35 | this.share(); | 45 | this.share(); |
46 | this.stat({ | ||
47 | classify: "minipro", | ||
48 | action: "detail_page", | ||
49 | primaryCode: "", | ||
50 | }) | ||
36 | }, | 51 | }, |
37 | globalData: { | 52 | globalData: { |
38 | share: false, | 53 | share: false, | ... | ... |
... | @@ -8,9 +8,12 @@ module.exports = { | ... | @@ -8,9 +8,12 @@ module.exports = { |
8 | videoList: '/video/list', // 视频列表 | 8 | videoList: '/video/list', // 视频列表 |
9 | videoAcccout: '/video/account', // 帐号下的视频 | 9 | videoAcccout: '/video/account', // 帐号下的视频 |
10 | videoDetail: '/video/detail', // 视频详情 | 10 | videoDetail: '/video/detail', // 视频详情 |
11 | rewardDetail: '/hide/order', // 获得打赏视频 | 11 | rewardOrder: '/hide/order', // 打赏成功获取视频 |
12 | rewardDetail: '/hide/detail', // 获得隐藏视频详情 | ||
12 | videoMore: '/video/more', // 更多推荐 | 13 | videoMore: '/video/more', // 更多推荐 |
13 | accountDetail: '/account/detail', // 帐号详情 | 14 | accountDetail: '/account/detail', // 帐号详情 |
15 | wxPay: '/wx/pay', // 帐号详情 | ||
16 | stat: '/dot', // 打点 | ||
14 | 17 | ||
15 | /** | 18 | /** |
16 | * 通用接口 | 19 | * 通用接口 | ... | ... |
... | @@ -13,22 +13,28 @@ Page({ | ... | @@ -13,22 +13,28 @@ Page({ |
13 | indexInfo: {}, | 13 | indexInfo: {}, |
14 | userInfo: {}, | 14 | userInfo: {}, |
15 | rewardList: [{ | 15 | rewardList: [{ |
16 | price: 6 | 16 | price: 6, |
17 | packet: "SIX_PACKET" | ||
17 | }, | 18 | }, |
18 | { | 19 | { |
19 | price: 18 | 20 | price: 18, |
21 | packet: "EIGHTEEN_PACKET" | ||
20 | }, | 22 | }, |
21 | { | 23 | { |
22 | price: 66 | 24 | price: 66, |
25 | packet: "SIXTY_SIX_PACKET" | ||
23 | }, | 26 | }, |
24 | { | 27 | { |
25 | price: 88 | 28 | price: 88, |
29 | packet: "EIGHTY_EIGHT_PACKET" | ||
26 | }, | 30 | }, |
27 | { | 31 | { |
28 | price: 168 | 32 | price: 168, |
33 | packet: "ONE_SIXTY_EIGHT_PACKET" | ||
29 | }, | 34 | }, |
30 | { | 35 | { |
31 | price: 388 | 36 | price: 388, |
37 | packet: "THREE_EIGHTY_EIGHT_PACKET" | ||
32 | }, | 38 | }, |
33 | ] | 39 | ] |
34 | }, | 40 | }, |
... | @@ -51,14 +57,14 @@ Page({ | ... | @@ -51,14 +57,14 @@ Page({ |
51 | * 到达底部 | 57 | * 到达底部 |
52 | * 做加载更多操作 | 58 | * 做加载更多操作 |
53 | */ | 59 | */ |
54 | onReachBottom() { | 60 | // onReachBottom() { |
55 | if (this.data.dataList.length < this.data.total) { | 61 | // if (this.data.dataList.length < this.data.total) { |
56 | this.setData({ | 62 | // this.setData({ |
57 | page: this.data.page + 1 | 63 | // page: this.data.page + 1 |
58 | }); | 64 | // }); |
59 | this.queryDataList(); | 65 | // this.queryDataList(); |
60 | } | 66 | // } |
61 | }, | 67 | // }, |
62 | 68 | ||
63 | // 重置页面列表 点击搜索条件时需要 | 69 | // 重置页面列表 点击搜索条件时需要 |
64 | resetPage() { | 70 | resetPage() { |
... | @@ -69,6 +75,22 @@ Page({ | ... | @@ -69,6 +75,22 @@ Page({ |
69 | }, | 75 | }, |
70 | 76 | ||
71 | /** | 77 | /** |
78 | * | ||
79 | */ | ||
80 | onRewardHandler(evt) { | ||
81 | let curItem = getBindtapData(evt); | ||
82 | console.log("curItem:", curItem); | ||
83 | app.post({ | ||
84 | url: app.api.wxPay, | ||
85 | data: curItem | ||
86 | }).then((result) => { | ||
87 | console.log("wxPay result:", result); | ||
88 | }).catch((err) => { | ||
89 | |||
90 | }); | ||
91 | }, | ||
92 | |||
93 | /** | ||
72 | * 请求DataList | 94 | * 请求DataList |
73 | */ | 95 | */ |
74 | queryDataList() { | 96 | queryDataList() { | ... | ... |
... | @@ -19,10 +19,31 @@ | ... | @@ -19,10 +19,31 @@ |
19 | position: relative; | 19 | position: relative; |
20 | 20 | ||
21 | .portrait { | 21 | .portrait { |
22 | text-align: center; | 22 | |
23 | position: relative; | ||
24 | width: 207px; | ||
25 | margin: 0 auto; | ||
23 | 26 | ||
24 | &-bg { | 27 | &-bg { |
28 | text-align: center; | ||
29 | position: absolute; | ||
25 | width: 207px; | 30 | width: 207px; |
31 | top: -3px; | ||
32 | } | ||
33 | |||
34 | // 头像 | ||
35 | .avatar { | ||
36 | margin: 0 auto; | ||
37 | position: relative; | ||
38 | display: block; | ||
39 | width: 201px; | ||
40 | height: 201px; | ||
41 | border-radius: 50%; | ||
42 | overflow: hidden | ||
43 | } | ||
44 | |||
45 | .avatar-avatar::after { | ||
46 | border-radius: 205px; | ||
26 | } | 47 | } |
27 | } | 48 | } |
28 | 49 | ||
... | @@ -38,7 +59,7 @@ | ... | @@ -38,7 +59,7 @@ |
38 | 59 | ||
39 | &-item { | 60 | &-item { |
40 | width: 320px; | 61 | width: 320px; |
41 | margin-bottom:12px; | 62 | margin-bottom: 12px; |
42 | } | 63 | } |
43 | } | 64 | } |
44 | } | 65 | } | ... | ... |
... | @@ -7,10 +7,11 @@ | ... | @@ -7,10 +7,11 @@ |
7 | <view class="content"> | 7 | <view class="content"> |
8 | <view class="portrait"> | 8 | <view class="portrait"> |
9 | <image class="portrait-bg" mode="widthFix" src="../../image/reward/reward-portrait-bg.png" /> | 9 | <image class="portrait-bg" mode="widthFix" src="../../image/reward/reward-portrait-bg.png" /> |
10 | <!-- <open-data class="avatar" type="userAvatarUrl"></open-data> --> | ||
10 | </view> | 11 | </view> |
11 | <view class="reward"> | 12 | <view class="reward"> |
12 | <view class="reward-wrap"> | 13 | <view class="reward-wrap"> |
13 | <image class="reward-wrap-item" wx:for="{{rewardList}}" wx:key="{{index}}" mode="widthFix" src="{{'../../image/reward/m-'+item.price+'.png'}}" /> | 14 | <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'}}" /> |
14 | </view> | 15 | </view> |
15 | </view> | 16 | </view> |
16 | </view> | 17 | </view> | ... | ... |
-
Please register or sign in to post a comment