默认提交
Showing
9 changed files
with
537 additions
and
52 deletions
1 | //app.js | 1 | //app.js |
2 | const ald = require('./utils/ald-stat.js') | 2 | // const ald = require('./utils/ald-stat.js') |
3 | let fetchApi = require('./http/fetch-api.js'); | 3 | let fetchApi = require('./http/fetch-api.js'); |
4 | let api = require('./http/api'); | 4 | let api = require('./http/api'); |
5 | let config = require('./config'); | 5 | let config = require('./config'); | ... | ... |
... | @@ -24,6 +24,9 @@ | ... | @@ -24,6 +24,9 @@ |
24 | "van-popup": "../../ui/vant-weapp/popup/index", | 24 | "van-popup": "../../ui/vant-weapp/popup/index", |
25 | "van-dialog": "../../ui/vant-weapp/dialog/index", | 25 | "van-dialog": "../../ui/vant-weapp/dialog/index", |
26 | "van-sticky": "../../ui/vant-weapp/sticky/index", | 26 | "van-sticky": "../../ui/vant-weapp/sticky/index", |
27 | "van-cell": "../../ui/vant-weapp/cell/index", | ||
28 | "van-cell-group": "../../ui/vant-weapp/cell-group/index", | ||
29 | "van-field": "../../ui/vant-weapp/field/index", | ||
27 | "van-tab": "../../ui/vant-weapp/tab/index", | 30 | "van-tab": "../../ui/vant-weapp/tab/index", |
28 | "van-tabs": "../../ui/vant-weapp/tabs/index" | 31 | "van-tabs": "../../ui/vant-weapp/tabs/index" |
29 | } | 32 | } | ... | ... |
... | @@ -12,7 +12,6 @@ module.exports = { | ... | @@ -12,7 +12,6 @@ module.exports = { |
12 | }, | 12 | }, |
13 | Prod: { | 13 | Prod: { |
14 | baseApi: 'https://api.qi.kdao.xin/kd_jyes_api/minipro', | 14 | baseApi: 'https://api.qi.kdao.xin/kd_jyes_api/minipro', |
15 | // baseApi: 'https://api.k.wxpai.cn/bizproxy/xxx', | ||
16 | commonApi: 'https://api.k.wxpai.cn/bizproxy' | 15 | commonApi: 'https://api.k.wxpai.cn/bizproxy' |
17 | } | 16 | } |
18 | } | 17 | } | ... | ... |
... | @@ -15,11 +15,19 @@ module.exports = { | ... | @@ -15,11 +15,19 @@ module.exports = { |
15 | wxPay: '/wx/pay', // 帐号详情 | 15 | wxPay: '/wx/pay', // 帐号详情 |
16 | stat: '/dot', // 打点 | 16 | stat: '/dot', // 打点 |
17 | 17 | ||
18 | blessDetail: "/bless/detail", // | 18 | // 拜年相关 |
19 | blessDetail: "/bless/detail", // 获取祝福语详情 | ||
20 | blessMade: "/bless/made", // 标记定制 | ||
21 | blessUpdateUserInfo: "/bless/update/name", // 修改名称 | ||
22 | blessUpdateRoom: "/bless/update/info", // 修改房间信息 | ||
23 | blessJoin: "/bless/join", // 加入房间 | ||
19 | 24 | ||
20 | /** | 25 | /** |
21 | * 通用接口 | 26 | * 通用接口 |
22 | * 请求时 "mode"传"custom" | 27 | * 请求时 "mode"传"custom" |
23 | */ | 28 | */ |
24 | areaQuery: 'https://api.k.wxpai.cn/bizproxy/kdapi/area', // post 区域查询 | 29 | areaQuery: 'https://api.k.wxpai.cn/bizproxy/kdapi/area', // post 区域查询 |
30 | |||
31 | uploadFile: '/kdapi/file/upload' //上传图片通用接口 | ||
32 | |||
25 | } | 33 | } | ... | ... |
src/image/icon/icon-plus.png
0 → 100644

2.12 KB
... | @@ -8,6 +8,7 @@ import Dialog from '../../ui/vant-weapp/dialog/dialog'; | ... | @@ -8,6 +8,7 @@ import Dialog from '../../ui/vant-weapp/dialog/dialog'; |
8 | let app = getApp(); | 8 | let app = getApp(); |
9 | Page({ | 9 | Page({ |
10 | data: { | 10 | data: { |
11 | isOverShare: true, | ||
11 | authorizeVisible: false, | 12 | authorizeVisible: false, |
12 | total: 0, | 13 | total: 0, |
13 | page: 1, | 14 | page: 1, |
... | @@ -15,7 +16,6 @@ Page({ | ... | @@ -15,7 +16,6 @@ Page({ |
15 | productList: [], // 产品列表 | 16 | productList: [], // 产品列表 |
16 | indexInfo: {}, | 17 | indexInfo: {}, |
17 | userInfo: {}, | 18 | userInfo: {}, |
18 | show: true, | ||
19 | options: {}, | 19 | options: {}, |
20 | detailData: {}, | 20 | detailData: {}, |
21 | ownerMember: {}, // 房主 | 21 | ownerMember: {}, // 房主 |
... | @@ -23,16 +23,52 @@ Page({ | ... | @@ -23,16 +23,52 @@ Page({ |
23 | blessContent: [], // 祝福内容 | 23 | blessContent: [], // 祝福内容 |
24 | isAuth: false, // 是否授权 | 24 | isAuth: false, // 是否授权 |
25 | // type: 0, // 0单人 1组队 | 25 | // type: 0, // 0单人 1组队 |
26 | // 个人信息修改 | ||
27 | updateUserInfoDialogVisible: false, | ||
28 | updateUserInfo: {}, // 需要更新的用户数据 | ||
29 | files: [], // 上传文件列表 | ||
30 | |||
31 | // 房间信息信息修改 | ||
32 | updateRoomDialogVisible: false, | ||
33 | updateRoomInfo: {}, // 需要更新的房间数据 | ||
34 | |||
35 | // 加入房间 | ||
36 | joinRoomDialogVisible: false, | ||
37 | isJoin: false, // 是否能加入状态 | ||
38 | }, | ||
39 | onChange(event) { | ||
40 | // event.detail 为当前输入的值 | ||
41 | console.log(event.detail); | ||
42 | }, | ||
43 | onShareAppMessage(res) { | ||
44 | let shareType = "" | ||
45 | if (res.from === 'button') { | ||
46 | // 来自页面内转发按钮 | ||
47 | // shareType == join 分享给家人,能加入 | ||
48 | shareType = res.target.dataset.data || ""; | ||
49 | console.log("shareType:", shareType); | ||
50 | } else {} | ||
51 | let { | ||
52 | detailData | ||
53 | } = this.data; | ||
54 | |||
55 | let memberCode = app.store.getItem("memberCode"); | ||
56 | let title = ""; | ||
57 | let path = `pages/blessing/blessing?c=${detailData.blessCode}&m=${memberCode}&t=${shareType}`; | ||
58 | console.log("share path:", path); | ||
59 | // let imageUrl = detailData && detailData.thumbnail || ""; | ||
60 | return { | ||
61 | // title, | ||
62 | path, | ||
63 | // imageUrl | ||
64 | } | ||
26 | }, | 65 | }, |
27 | onShareAppMessage() {}, | ||
28 | showAuth() { | 66 | showAuth() { |
29 | this.setData({ | 67 | this.setData({ |
30 | authorizeVisible: true | 68 | authorizeVisible: true |
31 | }) | 69 | }) |
32 | }, | 70 | }, |
33 | onLoad(options) { | 71 | onLoad(options) { |
34 | |||
35 | |||
36 | this.setData({ | 72 | this.setData({ |
37 | options | 73 | options |
38 | }); | 74 | }); |
... | @@ -40,9 +76,45 @@ Page({ | ... | @@ -40,9 +76,45 @@ Page({ |
40 | this.setData({ | 76 | this.setData({ |
41 | isAuth: result | 77 | isAuth: result |
42 | }) | 78 | }) |
79 | this.initData(); | ||
80 | this.queryBlessDetail().then((result) => { | ||
81 | let { | ||
82 | detailData, | ||
83 | ownerMember, | ||
84 | memberList | ||
85 | } = this.data; | ||
86 | |||
87 | // 判断memberList里面是否有自己 | ||
88 | let joined = false; | ||
89 | memberList.forEach(element => { | ||
90 | if (element.mySelf == 1) { | ||
91 | joined = true; | ||
92 | } | ||
93 | }); | ||
94 | |||
95 | /** | ||
96 | * 显示加入房间条件 | ||
97 | * 1.已定制 | ||
98 | * 2.类型为组队类型 | ||
99 | * 3.非房主 | ||
100 | * 4.shareType为join t="join" | ||
101 | * 5.未加入过 判断memberList里面是否有自己 | ||
102 | */ | ||
103 | console.log("---- 判断是否显示加入 Start ----"); | ||
104 | console.log("已定制:", detailData.customMade == 1); | ||
105 | console.log("类型为组队类型:", detailData.type == 1); | ||
106 | console.log("非房主:", ownerMember.mySelf == 0); | ||
107 | console.log("shareType为join:", options); | ||
108 | console.log("是否加入过:", joined); | ||
109 | if (detailData.customMade == 1 && detailData.type == 1 && ownerMember.mySelf == 0 && options.t == "join" && !joined) { | ||
110 | this.setData({ | ||
111 | joinRoomDialogVisible: true, | ||
112 | isJoin: true | ||
113 | }) | ||
114 | } | ||
115 | }); | ||
116 | console.log("memberCode:", app.store.getItem("memberCode")); | ||
43 | }).catch((err) => {}); | 117 | }).catch((err) => {}); |
44 | this.queryBlessDetail(); | ||
45 | this.initData(); | ||
46 | 118 | ||
47 | }, | 119 | }, |
48 | 120 | ||
... | @@ -52,6 +124,14 @@ Page({ | ... | @@ -52,6 +124,14 @@ Page({ |
52 | */ | 124 | */ |
53 | initData() {}, | 125 | initData() {}, |
54 | 126 | ||
127 | showTips(evt) { | ||
128 | let tips = getBindtapData(evt); | ||
129 | wx.showModal({ | ||
130 | content: tips, | ||
131 | success(res) {} | ||
132 | }) | ||
133 | }, | ||
134 | |||
55 | /** | 135 | /** |
56 | * 赞赏祝福 | 136 | * 赞赏祝福 |
57 | * 跳转到赞赏页 | 137 | * 跳转到赞赏页 |
... | @@ -80,6 +160,183 @@ Page({ | ... | @@ -80,6 +160,183 @@ Page({ |
80 | } | 160 | } |
81 | }, | 161 | }, |
82 | 162 | ||
163 | // 显示更新用户信息 | ||
164 | showUpdateUserInfoDialog() { | ||
165 | this.setData({ | ||
166 | updateUserInfoDialogVisible: true, | ||
167 | updateUserInfo: {}, | ||
168 | files: [] | ||
169 | }) | ||
170 | }, | ||
171 | |||
172 | // 房主名字 | ||
173 | onUpdateUserInfoBindInput(e) { | ||
174 | this.setData({ | ||
175 | updateUserInfo: { | ||
176 | memberName: e.detail.value | ||
177 | } | ||
178 | }) | ||
179 | }, | ||
180 | |||
181 | // 显示更新用户信息 | ||
182 | showUpdateRoomDialog() { | ||
183 | this.setData({ | ||
184 | updateRoomDialogVisible: true, | ||
185 | updateRoomInfo: {}, | ||
186 | }) | ||
187 | }, | ||
188 | |||
189 | // 家庭名称 | ||
190 | onUpdateFamilyNameBindInput(e) { | ||
191 | this.setData({ | ||
192 | "updateRoomInfo.familyName": e.detail.value | ||
193 | }) | ||
194 | }, | ||
195 | // 祝福语 | ||
196 | onUpdateSentenceBindInput(e) { | ||
197 | this.setData({ | ||
198 | "updateRoomInfo.sentence": e.detail.value | ||
199 | }) | ||
200 | }, | ||
201 | |||
202 | /** | ||
203 | * 更新房间信息 | ||
204 | */ | ||
205 | onUpdateRoomHander() { | ||
206 | let { | ||
207 | detailData, | ||
208 | ownerMember, | ||
209 | updateRoomInfo | ||
210 | } = this.data; | ||
211 | console.log("updateRoomInfo:", updateRoomInfo); | ||
212 | app.post({ | ||
213 | url: app.api.blessUpdateRoom, | ||
214 | data: { | ||
215 | blessCode: detailData.blessCode, | ||
216 | // ownerMemberCode: app.store.getItem("memberCode"), | ||
217 | familyName: updateRoomInfo.familyName || "", | ||
218 | sentence: updateRoomInfo.sentence || "", | ||
219 | } | ||
220 | }).then((result) => { | ||
221 | console.log("result:", result); | ||
222 | this.queryBlessDetail(); | ||
223 | }).catch((err) => {}); | ||
224 | }, | ||
225 | |||
226 | /** | ||
227 | * 上传头像 | ||
228 | */ | ||
229 | onUploadHandler() { | ||
230 | let _this = this; | ||
231 | wx.chooseImage({ | ||
232 | sizeType: ['original', 'compressed'], | ||
233 | sourceType: ['album', 'camera'], | ||
234 | count: 1, | ||
235 | success(res) { | ||
236 | // tempFilePath可以作为img标签的src属性显示图片 | ||
237 | const tempFiles = res.tempFiles | ||
238 | let files = tempFiles; | ||
239 | console.log("chooseImage files:", files); | ||
240 | _this.setData({ | ||
241 | files | ||
242 | }); | ||
243 | } | ||
244 | }) | ||
245 | }, | ||
246 | |||
247 | /** | ||
248 | * 更新拜年页用户信息 | ||
249 | */ | ||
250 | onUpdateUserInfoHander() { | ||
251 | let { | ||
252 | detailData, | ||
253 | ownerMember, | ||
254 | updateUserInfo, | ||
255 | files | ||
256 | } = this.data; | ||
257 | let pics = []; | ||
258 | files.forEach(element => { | ||
259 | pics.push(element.path) | ||
260 | }); | ||
261 | |||
262 | this.uploadToCustomService(pics).then((picRes) => { | ||
263 | console.log("picRes:", picRes); | ||
264 | console.log("updateUserInfo:", updateUserInfo); | ||
265 | app.post({ | ||
266 | url: app.api.blessUpdateUserInfo, | ||
267 | data: { | ||
268 | blessCode: detailData.blessCode, | ||
269 | ownerMemberCode: app.store.getItem("memberCode"), | ||
270 | memberName: updateUserInfo.memberName || "", | ||
271 | memberHead: picRes[0] || "", | ||
272 | } | ||
273 | }).then((result) => { | ||
274 | console.log("result:", result); | ||
275 | this.queryBlessDetail(); | ||
276 | }).catch((err) => {}); | ||
277 | }) | ||
278 | }, | ||
279 | |||
280 | |||
281 | /** | ||
282 | * 上传到自定义服务器 | ||
283 | * urlList 需要上传的图片地址 | ||
284 | */ | ||
285 | uploadToCustomService(urlList) { | ||
286 | let _this = this; | ||
287 | return new Promise((resolve, reject) => { | ||
288 | // promise列表 | ||
289 | let p = []; | ||
290 | // 用promise上传音频 | ||
291 | urlList.forEach(element => { | ||
292 | let myPromise = new Promise((resolve2, reject2) => { | ||
293 | _this.uploadfileMultiple(element).then((result2) => { | ||
294 | resolve2(result2) | ||
295 | }).catch((err) => { | ||
296 | reject2(); | ||
297 | }); | ||
298 | }); | ||
299 | p.push(myPromise); | ||
300 | }); | ||
301 | Promise.all(p).then(uploadFiles => { | ||
302 | resolve(uploadFiles) | ||
303 | }, reason => { | ||
304 | reject(); | ||
305 | }); | ||
306 | }); | ||
307 | }, | ||
308 | /** | ||
309 | * 多文件上传 | ||
310 | * @param {*} filePath | ||
311 | */ | ||
312 | uploadfileMultiple(filePath) { | ||
313 | let _this = this; | ||
314 | return new Promise((resolve, reject) => { | ||
315 | wx.uploadFile({ | ||
316 | url: app.config.NET_CONFIG.commonApi + app.api.uploadFile, | ||
317 | filePath: filePath, | ||
318 | name: 'file', | ||
319 | // header: {}, // 设置请求的 header | ||
320 | header: { | ||
321 | 'content-type': 'multipart/form-data' | ||
322 | }, | ||
323 | formData: { | ||
324 | path: '/weapp/jyes/avatar/' | ||
325 | }, | ||
326 | // HTTP 请求中其他额外的 form data | ||
327 | success(res) { | ||
328 | let result = JSON.parse(res.data).content; | ||
329 | resolve(result); | ||
330 | }, | ||
331 | fail() { | ||
332 | reject() | ||
333 | }, | ||
334 | complete: function () {} | ||
335 | }) | ||
336 | }); | ||
337 | }, | ||
338 | |||
339 | |||
83 | 340 | ||
84 | /** | 341 | /** |
85 | * 视频详情 | 342 | * 视频详情 |
... | @@ -93,12 +350,25 @@ Page({ | ... | @@ -93,12 +350,25 @@ Page({ |
93 | ownerMemberCode: this.data.options.m ? this.data.options.m : app.store.getItem("memberCode") ? app.store.getItem("memberCode") : "", | 350 | ownerMemberCode: this.data.options.m ? this.data.options.m : app.store.getItem("memberCode") ? app.store.getItem("memberCode") : "", |
94 | } | 351 | } |
95 | }).then((result) => { | 352 | }).then((result) => { |
353 | let blessContent = []; | ||
354 | try { | ||
355 | blessContent = JSON.parse(result.blessContent) || []; | ||
356 | } catch (error) {} | ||
96 | this.setData({ | 357 | this.setData({ |
97 | detailData: result, | 358 | detailData: result, |
98 | ownerMember: result.ownerMember, | 359 | ownerMember: result.ownerMember, |
99 | memberList: result.memberList, | 360 | memberList: result.memberList, |
100 | blessContent: result.blessContent, | 361 | blessContent: blessContent, |
101 | }); | 362 | }); |
363 | console.log("detailData:", result); | ||
364 | console.log("blessContent:", this.data.blessContent); | ||
365 | console.log("类型 type => ", result.type == 1 ? "组队" : "单人"); | ||
366 | console.log("是否已定制 customMade => ", result.customMade == 1 ? "已经定制" : "未定制"); | ||
367 | console.log("是否自己房间 mySelf => ", result.ownerMember.mySelf == 1 ? "是" : "否"); | ||
368 | console.log("房主信息 ownerMember => ", result.ownerMember); | ||
369 | console.log("是否授权 isAuth =>", this.data.isAuth); | ||
370 | console.log("房主信息 =>", result.ownerMember); | ||
371 | console.log("祝福内容 =>", result.blessContent); | ||
102 | resolve(result); | 372 | resolve(result); |
103 | }).catch((err) => { | 373 | }).catch((err) => { |
104 | reject(err); | 374 | reject(err); |
... | @@ -107,6 +377,117 @@ Page({ | ... | @@ -107,6 +377,117 @@ Page({ |
107 | }, | 377 | }, |
108 | 378 | ||
109 | /** | 379 | /** |
380 | * 标记定制祝福 | ||
381 | */ | ||
382 | onBlessMakeHandler() { | ||
383 | let { | ||
384 | detailData, | ||
385 | isAuth | ||
386 | } = this.data; | ||
387 | console.log("isAuth:", isAuth); | ||
388 | if (isAuth) { | ||
389 | // 已授权 | ||
390 | app.post({ | ||
391 | url: app.api.blessMade, | ||
392 | data: { | ||
393 | blessCode: detailData.blessCode, | ||
394 | } | ||
395 | }).then((result) => { | ||
396 | this.queryBlessDetail().then((result) => { | ||
397 | wx.showModal({ | ||
398 | title: '定制祝福成功!', | ||
399 | content: '马上为亲朋好友送上祝福吧~', | ||
400 | success(res) {} | ||
401 | }) | ||
402 | }); | ||
403 | }).catch((err) => {}); | ||
404 | } else { | ||
405 | // 未授权 | ||
406 | } | ||
407 | }, | ||
408 | |||
409 | /** | ||
410 | * 加入房间 | ||
411 | */ | ||
412 | onBlessJoinHandler(e) { | ||
413 | let { | ||
414 | options, | ||
415 | detailData | ||
416 | } = this.data; | ||
417 | app.post({ | ||
418 | url: app.api.blessJoin, | ||
419 | data: { | ||
420 | ownerMemberCode: options.m, | ||
421 | blessCode: detailData.blessCode | ||
422 | } | ||
423 | }).then((result) => { | ||
424 | this.setData({ | ||
425 | isJoin: false | ||
426 | }) | ||
427 | this.queryBlessDetail().then((result) => { | ||
428 | wx.showModal({ | ||
429 | content: '加入成功', | ||
430 | success(res) {} | ||
431 | }) | ||
432 | }); | ||
433 | }).catch((err) => { | ||
434 | |||
435 | }); | ||
436 | }, | ||
437 | |||
438 | // 点击确认授权按钮 | ||
439 | bindGetUserInfo(e) { | ||
440 | let _this = this; | ||
441 | wx.showLoading(); | ||
442 | wx.login({ | ||
443 | success(res) { | ||
444 | app.store.setItem('wxcode', res.code); | ||
445 | _this.getUserInfo(e.detail); | ||
446 | } | ||
447 | }); | ||
448 | }, | ||
449 | |||
450 | // 授权操作 | ||
451 | getUserInfo(e) { | ||
452 | let _this = this; | ||
453 | if (e.encryptedData && e.iv) { | ||
454 | // 同意授权 | ||
455 | app.post({ | ||
456 | url: app.api.register, | ||
457 | sid: false, | ||
458 | data: { | ||
459 | encryptedData: e.encryptedData, | ||
460 | iv: e.iv, | ||
461 | code: app.store.getItem("wxcode"), | ||
462 | tlMemberCode: app.globalData.tlMemberCode | ||
463 | } | ||
464 | }).then((res2) => { | ||
465 | wx.hideLoading(); | ||
466 | if (res2 && res2.sessionId) { | ||
467 | app.store.setItem('sessionId', res2.sessionId); | ||
468 | } | ||
469 | wx.showModal({ | ||
470 | content: '授权成功', | ||
471 | success(res) {} | ||
472 | }) | ||
473 | checkAuth().then((result) => { | ||
474 | _this.setData({ | ||
475 | isAuth: result | ||
476 | }); | ||
477 | }).catch((err) => {}); | ||
478 | }).catch((err) => { | ||
479 | wx.hideLoading(); | ||
480 | console.log("授权成功 err:", err); | ||
481 | }) | ||
482 | } else { | ||
483 | // 取消授权 | ||
484 | wx.hideLoading(); | ||
485 | console.log("取消授权"); | ||
486 | } | ||
487 | }, | ||
488 | |||
489 | |||
490 | /** | ||
110 | * 隐藏蒙层 | 491 | * 隐藏蒙层 |
111 | */ | 492 | */ |
112 | hideMask() { | 493 | hideMask() { |
... | @@ -144,17 +525,3 @@ Page({ | ... | @@ -144,17 +525,3 @@ Page({ |
144 | } | 525 | } |
145 | }, | 526 | }, |
146 | }) | 527 | }) |
147 | |||
148 | |||
149 | // Dialog.confirm({ | ||
150 | // title: '标题', | ||
151 | // message: '弹窗内容', | ||
152 | // asyncClose: true | ||
153 | // }).then(() => { | ||
154 | // setTimeout(() => { | ||
155 | // Dialog.close(); | ||
156 | // }, 1000); | ||
157 | // }) | ||
158 | // .catch(() => { | ||
159 | // Dialog.close(); | ||
160 | // }); | ... | ... |
1 | // @import '../../assets/scss/mixins'; | 1 | // @import '../../assets/scss/mixins'; |
2 | @import '../../assets/scss/utils'; | 2 | @import '../../assets/scss/utils'; |
3 | 3 | ||
4 | .van-button__text { | ||
5 | font-size: 36rpx; | ||
6 | } | ||
7 | |||
4 | // 用户头像 | 8 | // 用户头像 |
5 | .portrait { | 9 | .portrait { |
6 | position: relative; | 10 | position: relative; |
... | @@ -22,6 +26,45 @@ | ... | @@ -22,6 +26,45 @@ |
22 | } | 26 | } |
23 | } | 27 | } |
24 | 28 | ||
29 | // 修改对话框 | ||
30 | .dialog { | ||
31 | position: relative; | ||
32 | @extend .bb; | ||
33 | padding: 36px 24px; | ||
34 | font-size: 38px; | ||
35 | |||
36 | &-item { | ||
37 | margin-bottom: 48px; | ||
38 | position: relative; | ||
39 | |||
40 | .label { | ||
41 | margin-bottom: 12px; | ||
42 | } | ||
43 | } | ||
44 | |||
45 | .upload { | ||
46 | position: relative; | ||
47 | display: flex; | ||
48 | |||
49 | .image { | ||
50 | width: 240px; | ||
51 | height: 152px; | ||
52 | } | ||
53 | } | ||
54 | |||
55 | .nickname { | ||
56 | margin-top: 12px; | ||
57 | } | ||
58 | |||
59 | .t1 { | ||
60 | margin-top: 12px; | ||
61 | } | ||
62 | } | ||
63 | |||
64 | .dialog2 { | ||
65 | text-align: center; | ||
66 | } | ||
67 | |||
25 | .page { | 68 | .page { |
26 | padding-bottom: 200px; | 69 | padding-bottom: 200px; |
27 | 70 | ||
... | @@ -140,6 +183,11 @@ | ... | @@ -140,6 +183,11 @@ |
140 | display: flex; | 183 | display: flex; |
141 | justify-content: center; | 184 | justify-content: center; |
142 | align-items: flex-end; | 185 | align-items: flex-end; |
186 | |||
187 | .t1 { | ||
188 | max-width: 145px; | ||
189 | @include ellipsis(1); | ||
190 | } | ||
143 | } | 191 | } |
144 | } | 192 | } |
145 | } | 193 | } | ... | ... |
... | @@ -13,20 +13,18 @@ | ... | @@ -13,20 +13,18 @@ |
13 | <view class="user"> | 13 | <view class="user"> |
14 | <!-- 用户头像 --> | 14 | <!-- 用户头像 --> |
15 | <view class="portrait"> | 15 | <view class="portrait"> |
16 | <!-- <image class="portrait-inner" mode="widthFix" src="../../image/blessing/portrait.png" /> --> | ||
17 | <!-- <image class="portrait-border" mode="widthFix" src="../../image/blessing/portrait-border.png" /> --> | ||
18 | <image class="portrait-inner" mode="scaleToFill" src="{{ownerMember.memberHead}}" /> | 16 | <image class="portrait-inner" mode="scaleToFill" src="{{ownerMember.memberHead}}" /> |
19 | <image class="portrait-border" mode="scaleToFill" src="{{detailData.headFrame}}" /> | 17 | <image class="portrait-border" mode="scaleToFill" src="{{detailData.headFrame}}" /> |
20 | </view> | 18 | </view> |
21 | <!-- 用户名称 --> | 19 | <!-- 用户名称 --> |
22 | <view class="name"> | 20 | <view class="name"> |
23 | <view class="tt">{{detailData.familyName}}</view> | 21 | <view class="tt">{{ownerMember.memberName}}</view> |
24 | <image class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" /> | 22 | <image wx:if="{{ownerMember.mySelf == 1}}" bindtap="showUpdateUserInfoDialog" class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" /> |
25 | </view> | 23 | </view> |
26 | <!-- 编辑 --> | 24 | <!-- 编辑房间信息 组队时候才显示 --> |
27 | <view class="edit"> | 25 | <view wx:if="{{detailData.type == 1}}" class="edit"> |
28 | <view class="tt t1">{{detailData.sentence}}</view> | 26 | <view class="tt t1">{{detailData.familyName}}</view> |
29 | <image class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" /> | 27 | <image wx:if="{{ownerMember.mySelf == 1}}" bindtap="showUpdateRoomDialog" class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" /> |
30 | <view class="tt t2">{{detailData.count}}人</view> | 28 | <view class="tt t2">{{detailData.count}}人</view> |
31 | </view> | 29 | </view> |
32 | <!-- 用户组 --> | 30 | <!-- 用户组 --> |
... | @@ -34,8 +32,8 @@ | ... | @@ -34,8 +32,8 @@ |
34 | <view wx:for="{{memberList}}" wx:key="{{index}}" class="group-item"> | 32 | <view wx:for="{{memberList}}" wx:key="{{index}}" class="group-item"> |
35 | <view class="group-item-portrait"></view> | 33 | <view class="group-item-portrait"></view> |
36 | <view class="group-item-name"> | 34 | <view class="group-item-name"> |
37 | <view class="t1">李四</view> | 35 | <view class="t1">{{item.memberName}}</view> |
38 | <image class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" /> | 36 | <image wx:if="{{item.mySelf == 1}}" class="name-edit" mode="widthFix" src="../../image/blessing/icon-edit.png" /> |
39 | </view> | 37 | </view> |
40 | </view> | 38 | </view> |
41 | </view> | 39 | </view> |
... | @@ -48,11 +46,9 @@ | ... | @@ -48,11 +46,9 @@ |
48 | <view class="sentence">{{detailData.sentence}}</view> | 46 | <view class="sentence">{{detailData.sentence}}</view> |
49 | </view> | 47 | </view> |
50 | <!-- 尾部内容 --> | 48 | <!-- 尾部内容 --> |
51 | <view class="tail"> | 49 | <view class="tail" wx:if="{{1>10}}"> |
52 | <!-- 尾部头像 --> | 50 | <!-- 尾部头像 --> |
53 | <view class="portrait"> | 51 | <view class="portrait"> |
54 | <!-- <image class="portrait-inner" mode="widthFix" src="../../image/blessing/portrait.png" /> | ||
55 | <image class="portrait-border" mode="widthFix" src="../../image/blessing/portrait-border.png" /> --> | ||
56 | <image class="portrait-inner" mode="scaleToFill" src="{{ownerMember.memberHead}}" /> | 52 | <image class="portrait-inner" mode="scaleToFill" src="{{ownerMember.memberHead}}" /> |
57 | <image class="portrait-border" mode="scaleToFill" src="{{detailData.headFrame}}" /> | 53 | <image class="portrait-border" mode="scaleToFill" src="{{detailData.headFrame}}" /> |
58 | </view> | 54 | </view> |
... | @@ -63,7 +59,6 @@ | ... | @@ -63,7 +59,6 @@ |
63 | <!-- 按钮组 --> | 59 | <!-- 按钮组 --> |
64 | <view class="tail-btn-wrap"> | 60 | <view class="tail-btn-wrap"> |
65 | <!-- 分享团队图片 --> | 61 | <!-- 分享团队图片 --> |
66 | <!-- <view class="share"></view> --> | ||
67 | <image wx:if="{{detailData.type == 1}}" mode="widthFix" class="tail-btn-wrap-item blessing-share-group-btn" src="../../image/blessing/blessing-share-group-btn.png" /> | 62 | <image wx:if="{{detailData.type == 1}}" mode="widthFix" class="tail-btn-wrap-item blessing-share-group-btn" src="../../image/blessing/blessing-share-group-btn.png" /> |
68 | <view wx:if="{{detailData.type == 0}}" bindtap="toReward" class="tail-btn-wrap-item more-template"> | 63 | <view wx:if="{{detailData.type == 0}}" bindtap="toReward" class="tail-btn-wrap-item more-template"> |
69 | <span class="t1">赞赏祝福</span> | 64 | <span class="t1">赞赏祝福</span> |
... | @@ -83,25 +78,90 @@ | ... | @@ -83,25 +78,90 @@ |
83 | <!-- 分情况显示btn-wrap --> | 78 | <!-- 分情况显示btn-wrap --> |
84 | <!-- 单人 --> | 79 | <!-- 单人 --> |
85 | <block wx:if="{{detailData.type == 0}}"> | 80 | <block wx:if="{{detailData.type == 0}}"> |
86 | <view class="btn-wrap"> | 81 | <!-- 未定制 --> |
87 | <view class="btn btn1">分享图片祝福</view> | 82 | <view wx:if="{{detailData.customMade == 0}}" class="btn-wrap"> |
88 | <view class="btn btn2">祝福送朋友</view> | 83 | <button class="btn btn1">分享图片祝福</button> |
89 | <!-- <view wx:if="{{detailData.customMade == 0}}" class="btn btn2">祝福送朋友</view> | 84 | <button wx:if="{{!isAuth}}" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo" class="btn btn2"> |
90 | <view wx:if="{{detailData.customMade == 1}}" class="btn btn2">祝福送朋友</view> --> | 85 | 定制我的祝福 |
86 | </button> | ||
87 | <view wx:else bindtap="onBlessMakeHandler" class="btn btn2">定制我的祝福</view> | ||
88 | </view> | ||
89 | <!-- 已定制 --> | ||
90 | <view wx:if="{{detailData.customMade == 1}}" class="btn-wrap"> | ||
91 | <button class="btn btn1">分享图片祝福</button> | ||
92 | <button open-type="share" class="btn btn2">送出我的祝福</button> | ||
91 | </view> | 93 | </view> |
92 | </block> | 94 | </block> |
93 | <!-- 组队 --> | 95 | <!-- 组队 --> |
94 | <block wx:if="{{detailData.type == 1}}"> | 96 | <block wx:if="{{detailData.type == 1}}"> |
95 | <view class="btn-wrap"> | 97 | <!-- 未定制 --> |
96 | <view class="btn btn1">定制我的祝福</view> | 98 | <view wx:if="{{detailData.customMade == 0}}" class="btn-wrap"> |
97 | <view class="btn btn2">祝福送朋友</view> | 99 | <!-- 未授权 --> |
100 | <block wx:if="{{!isAuth}}"> | ||
101 | <button open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo" class="btn btn1"> | ||
102 | 邀请家人加入 | ||
103 | </button> | ||
104 | <button open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo" class="btn btn2"> | ||
105 | 定制我的祝福 | ||
106 | </button> | ||
107 | </block> | ||
108 | <!-- 已授权 --> | ||
109 | <block wx:else> | ||
110 | <button bindtap="showTips" data-data="请定制祝福后再邀请" class="btn btn1">邀请家人加入</button> | ||
111 | <button bindtap="onBlessMakeHandler" class="btn btn2">定制我的祝福</button> | ||
112 | </block> | ||
113 | </view> | ||
114 | <!-- 已经定制 --> | ||
115 | <view wx:if="{{detailData.customMade == 1}}" class="btn-wrap"> | ||
116 | <!-- 能加入状态 --> | ||
117 | <block wx:if="{{isJoin}}"> | ||
118 | <button bindtap="onBlessJoinHandler" class="btn btn1">加入组队祝福</button> | ||
119 | </block> | ||
120 | <!-- 不能加入状态 --> | ||
121 | <block wx:else> | ||
122 | <button data-data="join" open-type="share" class="btn btn1">邀请家人加入</button> | ||
123 | </block> | ||
124 | <button open-type="share" class="btn btn2">送出我的祝福</button> | ||
98 | </view> | 125 | </view> |
99 | </block> | 126 | </block> |
100 | <!-- <view class="btn-wrap"> | ||
101 | <view class="btn btn1">定制我的祝福</view> | ||
102 | <view class="btn btn2">祝福送朋友</view> | ||
103 | </view> --> | ||
104 | </view> | 127 | </view> |
105 | </view> | 128 | </view> |
106 | </view> | 129 | </view> |
107 | <van-dialog id="van-dialog" /> | 130 | <!-- 修改用户信息 --> |
131 | <van-dialog close-on-click-overlay use-slot title="修改信息" confirm-button-text="确认修改" show="{{ updateUserInfoDialogVisible }}" show-cancel-button bind:confirm="onUpdateUserInfoHander"> | ||
132 | <view class="dialog"> | ||
133 | <view class="dialog-item"> | ||
134 | <view class="label">名称</view> | ||
135 | <input value="{{ updateUserInfo.memberName }}" placeholder="请输入用户名" bindinput="onUpdateUserInfoBindInput" /> | ||
136 | </view> | ||
137 | <view class="dialog-item"> | ||
138 | <view class="label">头像</view> | ||
139 | <view class="upload"> | ||
140 | <image class="image" bindtap="onUploadHandler" mode="aspectFit" src="{{files[0] && files[0].path?files[0].path:'../../image/icon/icon-plus.png'}}" /> | ||
141 | </view> | ||
142 | </view> | ||
143 | </view> | ||
144 | </van-dialog> | ||
145 | <!-- 修改房间信息 --> | ||
146 | <van-dialog close-on-click-overlay use-slot title="修改信息" confirm-button-text="确认修改" show="{{ updateRoomDialogVisible }}" show-cancel-button bind:confirm="onUpdateRoomHander"> | ||
147 | <view class="dialog"> | ||
148 | <view class="dialog-item"> | ||
149 | <view class="label">家庭名称</view> | ||
150 | <input value="{{ updateRoomInfo.familyName }}" placeholder="请输入家庭名称" bindinput="onUpdateFamilyNameBindInput" /> | ||
151 | </view> | ||
152 | <view class="dialog-item"> | ||
153 | <view class="label">祝福语</view> | ||
154 | <input value="{{ updateRoomInfo.sentence }}" placeholder="请输入祝福语" bindinput="onUpdateSentenceBindInput" /> | ||
155 | </view> | ||
156 | </view> | ||
157 | </van-dialog> | ||
158 | <!-- 加入房间 --> | ||
159 | <van-dialog close-on-click-overlay use-slot confirm-button-text="点击加入" show="{{ joinRoomDialogVisible }}" bind:confirm="onBlessJoinHandler"> | ||
160 | <view class="dialog dialog2"> | ||
161 | <view class="portrait"> | ||
162 | <image class="portrait-inner" mode="scaleToFill" src="{{ownerMember.memberHead}}" /> | ||
163 | </view> | ||
164 | <view class="nickname">{{ownerMember.memberName}}</view> | ||
165 | <view class="t1">邀请你一起加入组队送祝福!</view> | ||
166 | </view> | ||
167 | </van-dialog> | ... | ... |
... | @@ -154,7 +154,7 @@ function getObjByListKeyValue(value, key, list) { | ... | @@ -154,7 +154,7 @@ function getObjByListKeyValue(value, key, list) { |
154 | * @param {*} path | 154 | * @param {*} path |
155 | */ | 155 | */ |
156 | function wxacodeGet(path) { | 156 | function wxacodeGet(path) { |
157 | return " https://api.k.wxpai.cn/bizproxy/mzcfsapi/qrcode/create?path=" + encodeURIComponent(path); | 157 | return "https://api.k.wxpai.cn/bizproxy/mzcfsapi/qrcode/create?path=" + encodeURIComponent(path); |
158 | } | 158 | } |
159 | 159 | ||
160 | /** | 160 | /** | ... | ... |
-
Please register or sign in to post a comment