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
35229b91
authored
2020-01-14 23:37:49 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
默认提交
1 parent
6d8c72fe
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
9 deletions
src/http/fetch-api.js
src/pages/blessing/blessing.js
src/pages/blessing/blessing.scss
src/pages/blessing/blessing.wxml
src/utils/calendar.js
src/http/fetch-api.js
View file @
35229b9
...
...
@@ -58,7 +58,9 @@ function login() {
code
,
content
}
=
res2
.
data
;
console
.
log
(
"res2:"
,
res2
);
if
(
code
==
200
&&
content
.
sessionId
)
{
console
.
log
(
"content:"
,
content
);
Store
.
setItem
(
'sessionId'
,
content
.
sessionId
);
Store
.
setItem
(
'memberCode'
,
content
.
memberCode
);
resolve
();
...
...
src/pages/blessing/blessing.js
View file @
35229b9
...
...
@@ -6,6 +6,9 @@ import {
import
Dialog
from
'../../ui/vant-weapp/dialog/dialog'
;
import
Poster
from
'../../miniprogram_dist/poster/poster'
;
// import calendar from '../../utils/calendar.js';
let
calendar
=
require
(
'../../utils/calendar.js'
);
const
innerAudio
=
wx
.
createInnerAudioContext
();
let
app
=
getApp
();
...
...
@@ -45,12 +48,14 @@ Page({
imageUrl
:
""
,
// 海报图
posterVisible
:
false
,
wxCodeUrl
:
""
,
// 微信小程序码
lunarDate
:
""
,
//农历月日
},
onShareAppMessage
(
res
)
{
let
{
detailData
,
ownerMember
,
isAuth
options
}
=
this
.
data
;
let
title
=
"亲爱的家人们新年快乐"
;
let
shareType
=
""
...
...
@@ -65,8 +70,13 @@ Page({
}
else
{}
}
else
{}
// 已经定制会提供房主的memberCode
let
memberCode
=
detailData
.
customMade
==
1
?
app
.
store
.
getItem
(
"memberCode"
)
:
""
;
// 权重 参数memberCode(房主memberCode) => 本人memberCode
let
memberCode
=
""
;
if
(
options
.
m
)
{
memberCode
=
options
.
m
;
}
else
if
(
detailData
.
customMade
==
1
)
{
memberCode
=
app
.
store
.
getItem
(
"memberCode"
);
}
let
path
=
`pages/blessing/blessing?c=
${
detailData
.
blessCode
}
&m=
${
memberCode
}
&t=
${
shareType
}
`
;
console
.
log
(
"share path:"
,
path
);
...
...
@@ -104,8 +114,13 @@ Page({
this
.
pauseBgm
();
},
onLoad
(
options
)
{
let
date
=
new
Date
();
let
lunar
=
calendar
.
calendar
.
solar2lunar
(
date
.
getFullYear
(),
date
.
getMonth
()
+
1
,
date
.
getDate
());
let
lunarDate
=
lunar
.
IMonthCn
+
lunar
.
IDayCn
;
this
.
setData
({
options
options
,
lunarDate
});
checkAuth
().
then
((
result
)
=>
{
this
.
setData
({
...
...
@@ -171,6 +186,7 @@ Page({
detailData
}
=
this
.
data
;
if
(
detailData
.
musicUrl
)
{
innerAudio
.
src
=
detailData
.
musicUrl
;
innerAudio
.
seek
(
0
);
innerAudio
.
play
();
...
...
@@ -180,6 +196,8 @@ Page({
this
.
setData
({
isPlayingBgm
:
true
,
})
}
},
pauseBgm
()
{
...
...
@@ -481,7 +499,7 @@ Page({
height
:
92
,
borderRadius
:
92
,
zIndex
:
101
,
url
:
avatar
,
url
:
element
.
memberHead
,
})
texts
.
push
({
x
:
endX
-
(
idx
*
wid
),
...
...
@@ -806,6 +824,7 @@ Page({
})
this
.
queryBlessDetail
().
then
((
result
)
=>
{
wx
.
showModal
({
showCancel
:
false
,
content
:
'加入成功'
,
success
(
res
)
{}
})
...
...
src/pages/blessing/blessing.scss
View file @
35229b9
...
...
@@ -202,10 +202,10 @@ $blessContentLabelWidth: 650px;
width
:
145px
;
height
:
145px
;
border-radius
:
145px
;
border-image-slice
:
1
;
border-width
:
4px
;
border-image-source
:
linear-gradient
(
to
top
,
#f4b44d
,
#e8b976
,
#ffebb5
);
// border-width: 4px;
// border-image-source: linear-gradient(to top, #f4b44d, #e8b976, #ffebb5);
// background-image: linear-gradient(to top, #f4b44d, #e8b976, #ffebb5);
border
:
solid
4px
#e8b976
;
}
&
-name
{
...
...
src/pages/blessing/blessing.wxml
View file @
35229b9
...
...
@@ -10,7 +10,7 @@
<!-- <view class="top-bg"></view> -->
<view class="top-space"></view>
<view class="content">
<view class="title">{{
detailData.lunarCalendar
}}</view>
<view class="title">{{
lunarDate
}}</view>
<!-- 用户 -->
<view class="user">
<!-- 用户头像 -->
...
...
src/utils/calendar.js
0 → 100755
View file @
35229b9
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to post a comment