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
d472548f
authored
2019-12-31 10:44:21 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
默认提交
1 parent
5d388639
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
72 additions
and
188 deletions
src/app.scss
src/image/reward/reward-bg.png
src/pages/authorize-nav/authorize.js
src/pages/authorize-nav/authorize.json
src/pages/authorize-nav/authorize.scss
src/pages/authorize-nav/authorize.wxml
src/pages/index/index.scss
src/pages/personal-list/personal-list.scss
src/pages/reward/reward.js
src/pages/reward/reward.scss
src/pages/reward/reward.wxml
src/app.scss
View file @
d472548
...
...
@@ -106,7 +106,7 @@ button {
.comp
{
bottom
:
auto
;
// top: 56%;
bottom
:
3
0%
;
bottom
:
2
0%
;
}
}
...
...
src/image/reward/reward-bg.png
View file @
d472548
2.87 KB
|
W:
|
H:
28.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/pages/authorize-nav/authorize.js
deleted
100755 → 0
View file @
5d38863
let
app
=
getApp
();
Page
({
data
:
{
barHeight
:
app
.
globalData
.
barHeight
,
navbarData
:
{
showCapsule
:
0
,
//是否显示左上角图标 1表示显示 0表示不显示
title
:
'微信授权'
//导航栏 中间的标题
},
loginData
:
null
,
authorized
:
false
,
canIUse
:
wx
.
canIUse
(
'button.open-type.getUserInfo'
),
parentMemberCode
:
""
,
},
onLoad
(
options
)
{},
onReady
()
{
app
.
store
.
clear
(
"sessionId"
);
let
_this
=
this
;
wx
.
login
({
success
:
function
(
res
)
{
_this
.
data
.
loginData
=
res
;
}
});
},
bindGetUserInfo
(
e
)
{
wx
.
showLoading
();
this
.
getUserInfo
(
e
.
detail
);
},
getUserInfo
(
e
)
{
let
_this
=
this
;
app
.
globalData
.
userInfo
=
e
.
userInfo
;
// console.log("loginData:",_this.data.loginData);
app
.
post
({
url
:
app
.
api
.
register
,
sid
:
false
,
data
:
{
encryptedData
:
e
.
encryptedData
,
iv
:
e
.
iv
,
code
:
_this
.
data
.
loginData
.
code
,
parentMemberCode
:
_this
.
data
.
parentMemberCode
,
}
}).
then
((
res2
)
=>
{
app
.
store
.
setItem
(
'sessionId'
,
res2
.
sessionId
);
_this
.
setData
({
authorized
:
true
})
_this
.
toIndex
();
}).
catch
((
err
)
=>
{
console
.
log
(
"@authorize || err:"
,
err
);
})
},
toIndex
()
{
console
.
log
(
"@authorize || toIndex "
);
setTimeout
(()
=>
{
app
.
router
.
push
({
path
:
"index"
,
query
:
{},
openType
:
"redirect"
})
wx
.
hideLoading
();
},
2000
);
}
})
src/pages/authorize-nav/authorize.json
deleted
100755 → 0
View file @
5d38863
{
"usingComponents"
:
{
"navbar"
:
"../../component/navbar/index"
},
"navigationStyle"
:
"custom"
}
src/pages/authorize-nav/authorize.scss
deleted
100755 → 0
View file @
5d38863
@import
'../../assets/scss/mixins'
;
.page
{
position
:
relative
;
overflow
:
hidden
;
.bgc
{
// background-color: transparent;
// background-color: black;
background-color
:
#fafafc
;
}
.main
{
position
:
relative
;
.top-space
{
height
:
60px
;
}
.login
{
position
:
relative
;
width
:
650px
;
margin
:
0
auto
;
text-align
:
center
;
&
-logo
{
width
:
140px
;
height
:
140px
;
}
&
-name
{
margin-top
:
32px
;
font-size
:
32px
;
color
:
#333333
;
}
&
-line
{
margin-top
:
70px
;
width
:
650px
;
height
:
2px
;
background-color
:
#eaeaec
;
}
&
-title
{
margin-top
:
40px
;
font-size
:
32px
;
text-align
:
left
;
color
:
#333333
;
}
&
-tips
{
margin-top
:
28px
;
font-size
:
26px
;
text-align
:
left
;
color
:
#666666
;
}
&
-btn
{
margin-top
:
102px
;
width
:
650px
;
height
:
90px
;
line-height
:
90px
;
border-radius
:
8px
;
background-color
:
#00c200
;
font-size
:
32px
;
color
:
#ffffff
;
}
}
}
}
src/pages/authorize-nav/authorize.wxml
deleted
100755 → 0
View file @
5d38863
<navbar navbar-data='{{navbarData}}'></navbar>
<view style='height: {{barHeight}}px'></view>
<view class="page-authorize page">
<view class="app__bgc bgc"></view>
<view class="app__bg bg"></view>
<!-- <view class="app__top-shadow"></view> -->
<view class="app__content main">
<view class="top-space"></view>
<view class="login">
<image class="login-logo" src="../../image/logo.png" mode="aspectFit" />
<view class="login-name">美赞臣</view>
<view class="login-line"></view>
<view class="login-title">完整体验小程序功能,需要您的微信授权哦</view>
<view class="login-tips">· 获取您的公开信息(昵称、头像等)</view>
<button type="default" class="login-btn" wx:if="{{!authorized}}" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
确认授权
</button>
</view>
</view>
</view>
src/pages/index/index.scss
View file @
d472548
...
...
@@ -105,20 +105,19 @@
.tit
{
font-size
:
40px
;
height
:
80px
;
line-height
:
80px
;
min-height
:
120px
;
color
:
#ffffff
;
@extend
.bb
;
padding
:
0
24px
;
position
:
absolute
;
width
:
100%
;
bottom
:
0
;
@include
ellipsis
(
1
);
@include
ellipsis
(
2
);
}
.tit-bg
{
opacity
:
.6
;
height
:
8
0px
;
height
:
12
0px
;
color
:
#ffffff
;
position
:
absolute
;
width
:
100%
;
...
...
@@ -129,18 +128,19 @@
.play
{
@extend
.fcc
;
width
:
132px
;
height
:
132px
;
border-radius
:
132px
;
width
:
120px
;
height
:
120px
;
border-radius
:
120px
;
border
:
solid
#ffffff
6px
;
font-weight
:
normal
;
position
:
absolute
;
left
:
0
;
right
:
0
;
top
:
5
2px
;
top
:
3
2px
;
margin
:
0
auto
;
text-align
:
center
;
font-weight
:
bold
;
background-color
:
rgba
(
$color
:
#000000
,
$alpha
:
0
.
7
);
background-color
:
rgba
(
$color
:
#000000
,
$alpha
:
0
.
4
);
.iconfont
{
font-size
:
48px
;
...
...
src/pages/personal-list/personal-list.scss
View file @
d472548
...
...
@@ -83,20 +83,19 @@
.tit
{
font-size
:
40px
;
height
:
80px
;
line-height
:
80px
;
min-height
:
120px
;
color
:
#ffffff
;
@extend
.bb
;
padding
:
0
24px
;
position
:
absolute
;
width
:
100%
;
bottom
:
0
;
@include
ellipsis
(
1
);
@include
ellipsis
(
2
);
}
.tit-bg
{
opacity
:
.6
;
height
:
8
0px
;
height
:
12
0px
;
color
:
#ffffff
;
position
:
absolute
;
width
:
100%
;
...
...
@@ -107,18 +106,19 @@
.play
{
@extend
.fcc
;
width
:
132px
;
height
:
132px
;
border-radius
:
132px
;
width
:
120px
;
height
:
120px
;
border-radius
:
120px
;
border
:
solid
#ffffff
6px
;
font-weight
:
normal
;
position
:
absolute
;
left
:
0
;
right
:
0
;
top
:
7
2px
;
top
:
3
2px
;
margin
:
0
auto
;
text-align
:
center
;
font-weight
:
bold
;
background-color
:
rgba
(
$color
:
#000000
,
$alpha
:
0
.
7
);
background-color
:
rgba
(
$color
:
#000000
,
$alpha
:
0
.
4
);
.iconfont
{
font-size
:
48px
;
...
...
src/pages/reward/reward.js
View file @
d472548
...
...
@@ -58,6 +58,9 @@ Page({
primaryCode
:
""
,
});
},
onShow
()
{
this
.
checkAuth
();
},
/**
* 基础方法
...
...
@@ -170,6 +173,29 @@ Page({
},
/**
* 检查是否授权
*/
checkAuth
()
{
let
_this
=
this
;
wx
.
getSetting
({
success
(
res
)
{
console
.
log
(
"scope:"
,
res
);
if
(
res
.
authSetting
[
'scope.userInfo'
])
{
// 已经授权
}
else
{
//用户没有授权
wx
.
login
({
success
(
res
)
{
app
.
store
.
setItem
(
'wxcode'
,
res
.
code
);
_this
.
showAuth
();
}
});
}
}
});
},
/**
* 隐藏蒙层
*/
hideMask
()
{
...
...
src/pages/reward/reward.scss
View file @
d472548
...
...
@@ -8,7 +8,10 @@
background-color
:
#af3541
;
}
.bg
{}
.bg
{
width
:
100%
;
height
:
auto
;
}
.main
{
.top-space
{
...
...
@@ -51,7 +54,7 @@
.reward
{
width
:
$contentWidth
;
margin
:
1
24px
auto
0
;
margin
:
24px
auto
0
;
&
-wrap
{
...
...
@@ -65,7 +68,23 @@
}
}
}
}
}
.tips
{
font-size
:
28px
;
color
:
#ffe6a3
;
text-align
:
center
;
width
:
100%
;
}
.tips1
{
margin-top
:
36px
;
}
.tips2
{
position
:
fixed
;
bottom
:
48px
;
}
}
...
...
src/pages/reward/reward.wxml
View file @
d472548
...
...
@@ -9,6 +9,7 @@
<image class="portrait-bg" mode="widthFix" src="../../image/logo.jpeg" />
<!-- <open-data class="avatar" type="userAvatarUrl"></open-data> -->
</view>
<view class="tips tips1">赞赏家有儿孙</view>
<view class="reward">
<view class="reward-wrap">
<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'}}" />
...
...
@@ -16,4 +17,8 @@
</view>
</view>
</view>
<view class="tips tips2">感谢红包鼓励,我们继续生产好内容!</view>
</view>
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
...
...
Please
register
or
sign in
to post a comment