默认提交
Showing
5 changed files
with
39 additions
and
18 deletions
... | @@ -58,7 +58,9 @@ function login() { | ... | @@ -58,7 +58,9 @@ function login() { |
58 | code, | 58 | code, |
59 | content | 59 | content |
60 | } = res2.data; | 60 | } = res2.data; |
61 | console.log("res2:",res2); | ||
61 | if (code == 200 && content.sessionId) { | 62 | if (code == 200 && content.sessionId) { |
63 | console.log("content:", content); | ||
62 | Store.setItem('sessionId', content.sessionId); | 64 | Store.setItem('sessionId', content.sessionId); |
63 | Store.setItem('memberCode', content.memberCode); | 65 | Store.setItem('memberCode', content.memberCode); |
64 | resolve(); | 66 | resolve(); | ... | ... |
... | @@ -6,6 +6,9 @@ import { | ... | @@ -6,6 +6,9 @@ import { |
6 | import Dialog from '../../ui/vant-weapp/dialog/dialog'; | 6 | import Dialog from '../../ui/vant-weapp/dialog/dialog'; |
7 | import Poster from '../../miniprogram_dist/poster/poster'; | 7 | import Poster from '../../miniprogram_dist/poster/poster'; |
8 | 8 | ||
9 | // import calendar from '../../utils/calendar.js'; | ||
10 | let calendar = require('../../utils/calendar.js'); | ||
11 | |||
9 | const innerAudio = wx.createInnerAudioContext(); | 12 | const innerAudio = wx.createInnerAudioContext(); |
10 | 13 | ||
11 | let app = getApp(); | 14 | let app = getApp(); |
... | @@ -45,12 +48,14 @@ Page({ | ... | @@ -45,12 +48,14 @@ Page({ |
45 | imageUrl: "", // 海报图 | 48 | imageUrl: "", // 海报图 |
46 | posterVisible: false, | 49 | posterVisible: false, |
47 | wxCodeUrl: "", // 微信小程序码 | 50 | wxCodeUrl: "", // 微信小程序码 |
51 | |||
52 | lunarDate: "", //农历月日 | ||
48 | }, | 53 | }, |
49 | onShareAppMessage(res) { | 54 | onShareAppMessage(res) { |
50 | let { | 55 | let { |
51 | detailData, | 56 | detailData, |
52 | ownerMember, | 57 | ownerMember, |
53 | isAuth | 58 | options |
54 | } = this.data; | 59 | } = this.data; |
55 | let title = "亲爱的家人们新年快乐"; | 60 | let title = "亲爱的家人们新年快乐"; |
56 | let shareType = "" | 61 | let shareType = "" |
... | @@ -65,8 +70,13 @@ Page({ | ... | @@ -65,8 +70,13 @@ Page({ |
65 | } else {} | 70 | } else {} |
66 | } else {} | 71 | } else {} |
67 | 72 | ||
68 | // 已经定制会提供房主的memberCode | 73 | // 权重 参数memberCode(房主memberCode) => 本人memberCode |
69 | let memberCode = detailData.customMade == 1 ? app.store.getItem("memberCode") : ""; | 74 | let memberCode = ""; |
75 | if (options.m) { | ||
76 | memberCode = options.m; | ||
77 | } else if (detailData.customMade == 1) { | ||
78 | memberCode = app.store.getItem("memberCode"); | ||
79 | } | ||
70 | let path = `pages/blessing/blessing?c=${detailData.blessCode}&m=${memberCode}&t=${shareType}`; | 80 | let path = `pages/blessing/blessing?c=${detailData.blessCode}&m=${memberCode}&t=${shareType}`; |
71 | console.log("share path:", path); | 81 | console.log("share path:", path); |
72 | 82 | ||
... | @@ -104,8 +114,13 @@ Page({ | ... | @@ -104,8 +114,13 @@ Page({ |
104 | this.pauseBgm(); | 114 | this.pauseBgm(); |
105 | }, | 115 | }, |
106 | onLoad(options) { | 116 | onLoad(options) { |
117 | |||
118 | let date = new Date(); | ||
119 | let lunar = calendar.calendar.solar2lunar(date.getFullYear(), date.getMonth() + 1, date.getDate()); | ||
120 | let lunarDate = lunar.IMonthCn + lunar.IDayCn; | ||
107 | this.setData({ | 121 | this.setData({ |
108 | options | 122 | options, |
123 | lunarDate | ||
109 | }); | 124 | }); |
110 | checkAuth().then((result) => { | 125 | checkAuth().then((result) => { |
111 | this.setData({ | 126 | this.setData({ |
... | @@ -171,15 +186,18 @@ Page({ | ... | @@ -171,15 +186,18 @@ Page({ |
171 | detailData | 186 | detailData |
172 | } = this.data; | 187 | } = this.data; |
173 | 188 | ||
174 | innerAudio.src = detailData.musicUrl; | 189 | if (detailData.musicUrl) { |
175 | innerAudio.seek(0); | 190 | innerAudio.src = detailData.musicUrl; |
176 | innerAudio.play(); | 191 | innerAudio.seek(0); |
177 | innerAudio.onEnded(() => { | 192 | innerAudio.play(); |
178 | _this.playBgm(); | 193 | innerAudio.onEnded(() => { |
179 | }) | 194 | _this.playBgm(); |
180 | this.setData({ | 195 | }) |
181 | isPlayingBgm: true, | 196 | this.setData({ |
182 | }) | 197 | isPlayingBgm: true, |
198 | }) | ||
199 | } | ||
200 | |||
183 | }, | 201 | }, |
184 | 202 | ||
185 | pauseBgm() { | 203 | pauseBgm() { |
... | @@ -481,7 +499,7 @@ Page({ | ... | @@ -481,7 +499,7 @@ Page({ |
481 | height: 92, | 499 | height: 92, |
482 | borderRadius: 92, | 500 | borderRadius: 92, |
483 | zIndex: 101, | 501 | zIndex: 101, |
484 | url: avatar, | 502 | url: element.memberHead, |
485 | }) | 503 | }) |
486 | texts.push({ | 504 | texts.push({ |
487 | x: endX - (idx * wid), | 505 | x: endX - (idx * wid), |
... | @@ -806,6 +824,7 @@ Page({ | ... | @@ -806,6 +824,7 @@ Page({ |
806 | }) | 824 | }) |
807 | this.queryBlessDetail().then((result) => { | 825 | this.queryBlessDetail().then((result) => { |
808 | wx.showModal({ | 826 | wx.showModal({ |
827 | showCancel: false, | ||
809 | content: '加入成功', | 828 | content: '加入成功', |
810 | success(res) {} | 829 | success(res) {} |
811 | }) | 830 | }) | ... | ... |
... | @@ -202,10 +202,10 @@ $blessContentLabelWidth: 650px; | ... | @@ -202,10 +202,10 @@ $blessContentLabelWidth: 650px; |
202 | width: 145px; | 202 | width: 145px; |
203 | height: 145px; | 203 | height: 145px; |
204 | border-radius: 145px; | 204 | border-radius: 145px; |
205 | border-image-slice: 1; | 205 | // border-width: 4px; |
206 | border-width: 4px; | 206 | // border-image-source: linear-gradient(to top, #f4b44d, #e8b976, #ffebb5); |
207 | border-image-source: linear-gradient(to top, #f4b44d, #e8b976, #ffebb5); | ||
208 | // background-image: linear-gradient(to top, #f4b44d, #e8b976, #ffebb5); | 207 | // background-image: linear-gradient(to top, #f4b44d, #e8b976, #ffebb5); |
208 | border: solid 4px #e8b976; | ||
209 | } | 209 | } |
210 | 210 | ||
211 | &-name { | 211 | &-name { | ... | ... |
... | @@ -10,7 +10,7 @@ | ... | @@ -10,7 +10,7 @@ |
10 | <!-- <view class="top-bg"></view> --> | 10 | <!-- <view class="top-bg"></view> --> |
11 | <view class="top-space"></view> | 11 | <view class="top-space"></view> |
12 | <view class="content"> | 12 | <view class="content"> |
13 | <view class="title">{{detailData.lunarCalendar}}</view> | 13 | <view class="title">{{lunarDate}}</view> |
14 | <!-- 用户 --> | 14 | <!-- 用户 --> |
15 | <view class="user"> | 15 | <view class="user"> |
16 | <!-- 用户头像 --> | 16 | <!-- 用户头像 --> | ... | ... |
src/utils/calendar.js
0 → 100755
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment