Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
home-with-kids-mp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
271bf4a4
authored
5 years ago
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
默认提交
1 parent
8739c417
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
198 additions
and
50 deletions
src/image/logo.jpeg
src/image/logo.png
src/pages/detail/detail.scss
src/pages/reward-completed/reward-completed.js
src/pages/reward-completed/reward-completed.scss
src/pages/reward-completed/reward-completed.wxml
src/pages/reward/reward.js
src/pages/reward/reward.json
src/pages/reward/reward.scss
src/pages/reward/reward.wxml
src/image/logo.jpeg
0 → 100644
View file @
271bf4a
2.94 KB
This diff is collapsed.
Click to expand it.
src/image/logo.png
deleted
100644 → 0
View file @
8739c41
1.01 KB
This diff is collapsed.
Click to expand it.
src/pages/detail/detail.scss
View file @
271bf4a
...
...
@@ -267,7 +267,6 @@
}
}
// 返回首页按钮
.index-btn
{
margin
:
60px
auto
0
;
...
...
This diff is collapsed.
Click to expand it.
src/pages/reward-completed/reward-completed.js
View file @
271bf4a
import
{
getBindtapData
getBindtapData
,
pxToRpx
,
getLastScreenHeight
}
from
'../../utils/util'
;
let
app
=
getApp
();
Page
({
data
:
{
isOverShare
:
true
,
authorizeVisible
:
false
,
total
:
0
,
page
:
1
,
size
:
10
,
dataList
:
[],
productList
:
[],
// 产品列表
indexInfo
:
{},
userInfo
:
{}
userInfo
:
{},
options
:
{},
detailData
:
{},
vidHeight
:
0
,
// 视频高度
isVideoEnded
:
false
,
},
onShareAppMessage
()
{
let
detailData
=
this
.
data
.
detailData
;
let
title
=
detailData
&&
detailData
.
videoName
||
""
;
let
path
=
`pages/detail/detail?c=
${
detailData
.
videoCode
}
`
;
let
imageUrl
=
detailData
&&
detailData
.
thumbnail
||
""
;
return
{
title
,
path
,
imageUrl
}
},
onShareAppMessage
()
{},
showAuth
()
{
this
.
setData
({
authorizeVisible
:
true
})
},
onLoad
(
options
)
{},
onLoad
(
options
)
{
this
.
setData
({
options
});
this
.
queryVideoDetail
();
this
.
initData
();
},
/**
* 基础方法
* 授权完毕重拉数据用
*/
initData
()
{
this
.
queryVideoMore
();
},
/**
* 到达底部
* 做加载更多操作
*/
onReachBottom
()
{
return
;
if
(
this
.
data
.
dataList
.
length
<
this
.
data
.
total
)
{
this
.
setData
({
page
:
this
.
data
.
page
+
1
});
// this.queryDataList
();
this
.
queryVideoMore
();
}
},
...
...
@@ -50,24 +75,73 @@ Page({
})
},
/**
* 到个人列表页面
*/
toPersonalList
()
{
let
detailData
=
this
.
data
.
detailData
;
if
(
detailData
&&
detailData
.
accountCode
)
{
detailData
.
c
=
detailData
.
accountCode
;
app
.
router
.
push
({
path
:
"personalList"
,
query
:
detailData
})
}
},
/**
* 跳转详情页面
*/
onDetailHandler
(
evt
)
{
let
curItem
=
getBindtapData
(
evt
);
app
.
router
.
push
({
path
:
"detail"
,
query
:
{
c
:
curItem
.
videoCode
||
""
}
})
},
/**
* 播放完毕
*/
onVideoEndedHandler
(
evt
)
{
this
.
setData
({
isVideoEnded
:
true
})
},
/**
* 重播
*/
onReplayHandler
()
{
let
video
=
wx
.
createVideoContext
(
"vid"
,
this
);
console
.
log
(
"video:"
,
video
);
video
.
seek
(
0
);
video
.
play
();
this
.
setData
({
isVideoEnded
:
false
})
},
/**
* 返回首页
*/
toIndex
()
{
app
.
router
.
push
({
openType
:
"reLaunch"
,
path
:
"index"
})
},
/**
* 请求DataList
*/
query
DataList
()
{
query
VideoMore
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
app
.
post
({
sid
:
false
,
url
:
app
.
api
.
dataList
,
url
:
app
.
api
.
videoMore
,
data
:
{
page
:
this
.
data
.
page
,
size
:
this
.
data
.
size
,
...
...
@@ -75,6 +149,7 @@ Page({
}).
then
((
result
)
=>
{
let
dataList
=
result
.
list
;
dataList
=
this
.
data
.
dataList
.
concat
(
dataList
);
console
.
log
(
"dataList:"
,
dataList
);
this
.
setData
({
dataList
:
dataList
,
total
:
result
.
total
...
...
@@ -85,6 +160,41 @@ Page({
},
/**
* 视频详情
*/
queryVideoDetail
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
app
.
post
({
url
:
app
.
api
.
rewardDetail
,
data
:
{
videoCode
:
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,
// });
resolve
(
result
);
}).
catch
((
err
)
=>
{
reject
(
err
);
});
});
},
/**
* 隐藏蒙层
*/
hideMask
()
{
...
...
This diff is collapsed.
Click to expand it.
src/pages/reward-completed/reward-completed.scss
View file @
271bf4a
...
...
@@ -41,7 +41,7 @@
.vid
{
margin
:
24px
auto
0
;
width
:
64
0px
;
width
:
71
0px
;
border-radius
:
16px
;
}
}
...
...
@@ -77,10 +77,12 @@
.t1
{
width
:
100%
;
font-size
:
32px
;
font-weight
:
normal
;
}
.name
{
font-size
:
36px
;
//
font-size: 36px;
}
.num
{
...
...
@@ -95,8 +97,9 @@
display
:
flex
;
.btn
{
margin-right
:
24px
;
width
:
200px
;
// margin-right: 24px;
margin
:
0
0
;
width
:
240px
;
height
:
80px
;
font-size
:
32px
;
background-color
:
#3ec03c
;
...
...
@@ -112,6 +115,7 @@
.t1
{
padding
:
0
6px
;
}
&
:last-child
{
...
...
@@ -124,7 +128,9 @@
color
:
#7f776e
;
}
.btn3
{
background-color
:
#8d8d8d
;
}
}
}
...
...
@@ -134,7 +140,7 @@
@extend
.bb
;
padding
:
0
24px
;
font-size
:
36px
;
margin
:
0px
auto
24
px
;
margin
:
24px
auto
0
px
;
}
// 广告
...
...
@@ -170,16 +176,16 @@
.tit
{
@extend
.bb
;
padding
:
24
px
0
;
height
:
23
0px
;
padding
:
8
px
0
;
height
:
18
0px
;
flex
:
1
;
font-size
:
36
px
;
@include
ellipsis
(
4
);
font-size
:
40
px
;
@include
ellipsis
(
3
);
}
.poster
{
width
:
350px
;
height
:
23
0px
;
height
:
18
0px
;
border-radius
:
8px
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/pages/reward-completed/reward-completed.wxml
View file @
271bf4a
...
...
@@ -20,12 +20,10 @@
</view>
</view>
<view class="btn-wrap">
<view class="btn btn2">
<!-- <view class="tit">{{item.videoName}}</view> -->
<view class="tit">一家人在一起的时刻</view>
<!-- <view class="btn btn2">
<span>更多推荐</span>
</view>
<!-- <view class="btn">
<span class="t1 iconfont iconhome"></span>
<span>返回首页</span>
</view> -->
</view>
</view>
...
...
@@ -40,14 +38,14 @@
<view class="more">
<view class="more-title">-- 更多推荐欣赏 --</view>
<view class="more-list">
<view
wx:for="{{2
}}" wx:key="{{index}}" class="more-list-item">
<view class="tit">
新政策来了!家有小孩的都要过来看看
</view>
<image class="poster" src="
https://kd.cdn.xyiyang.com/pro/mzczcradmin/008194acee794506aac4c7200ce654dc.jpg
" />
<view
bindtap="onDetailHandler" data-data="{{item}}" data-index="{{index}}" wx:for="{{dataList
}}" wx:key="{{index}}" class="more-list-item">
<view class="tit">
{{item.videoName}}
</view>
<image class="poster" src="
{{item.thumbnail}}
" />
</view>
</view>
</view>
<!-- 返回首页按钮 -->
<view class="index-btn">
<view
bindtap="toIndex"
class="index-btn">
<span class="t1 iconfont iconhome"></span>
<span>返回首页</span>
</view>
...
...
@@ -58,3 +56,4 @@
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
<!-- <shortcut></shortcut> -->
<shortcut class="red-p" types="{{[]}}" pics="{{['red-package']}}"></shortcut>
...
...
This diff is collapsed.
Click to expand it.
src/pages/reward/reward.js
View file @
271bf4a
...
...
@@ -75,18 +75,51 @@ Page({
},
/**
*
*
打赏
*/
onRewardHandler
(
evt
)
{
let
curItem
=
getBindtapData
(
evt
);
console
.
log
(
"curItem:"
,
curItem
);
curItem
.
packet
=
"ONE_CENT"
;
app
.
post
({
url
:
app
.
api
.
wxPay
,
data
:
curItem
}).
then
((
result
)
=>
{
console
.
log
(
"wxPay result:"
,
result
);
}).
catch
((
err
)
=>
{
}).
then
((
res2
)
=>
{
console
.
log
(
"wxPay result:"
,
res2
);
wx
.
requestPayment
({
timeStamp
:
res2
.
timeStamp
+
""
,
nonceStr
:
res2
.
nonceStr
,
paySign
:
res2
.
paySign
,
package
:
res2
.
package
,
signType
:
'MD5'
,
success
(
res
)
{
// console.log("success:", res);
// 支付成功
app
.
router
.
push
({
path
:
"rewardCompleted"
,
query
:
{
c
:
""
// orderCode
}
})
},
fail
(
res
)
{
console
.
log
(
"fail:"
,
res
);
wx
.
showModal
({
content
:
'赞赏失败'
,
showCancel
:
false
,
success
(
res
)
{
// if (res.confirm) {
// console.log('用户点击确定')
// } else if (res.cancel) {
// console.log('用户点击取消')
// }
}
})
}
})
}).
catch
((
err
)
=>
{
console
.
log
(
"catch:"
,
err
);
});
},
...
...
This diff is collapsed.
Click to expand it.
src/pages/reward/reward.json
View file @
271bf4a
{
"navigationBarTitleText"
:
""
}
...
...
This diff is collapsed.
Click to expand it.
src/pages/reward/reward.scss
View file @
271bf4a
...
...
@@ -22,29 +22,31 @@
position
:
relative
;
width
:
207px
;
height
:
207px
;
margin
:
0
auto
;
&
-bg
{
text-align
:
center
;
position
:
absolute
;
width
:
207px
;
top
:
-3px
;
border-radius
:
50%
;
// top: -3px;
}
// 头像
.avatar
{
margin
:
0
auto
;
position
:
relative
;
display
:
block
;
width
:
201px
;
height
:
201px
;
border-radius
:
50%
;
overflow
:
hidden
}
//
.avatar {
//
margin: 0 auto;
//
position: relative;
//
display: block;
//
width: 201px;
//
height: 201px;
//
border-radius: 50%;
//
overflow: hidden
//
}
.
avatar-avatar
:
:
after
{
border-radius
:
205px
;
}
//
.avatar-avatar::after {
//
border-radius: 205px;
//
}
}
.reward
{
...
...
This diff is collapsed.
Click to expand it.
src/pages/reward/reward.wxml
View file @
271bf4a
...
...
@@ -6,7 +6,7 @@
<view class="top-space"></view>
<view class="content">
<view class="portrait">
<image class="portrait-bg" mode="widthFix" src="../../image/
reward/reward-portrait-bg.pn
g" />
<image class="portrait-bg" mode="widthFix" src="../../image/
logo.jpe
g" />
<!-- <open-data class="avatar" type="userAvatarUrl"></open-data> -->
</view>
<view class="reward">
...
...
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to post a comment