From f0ba491683f12a5ac03e59edfc995c5c830556a0 Mon Sep 17 00:00:00 2001 From: Wkang921 Date: Mon, 3 Jul 2023 17:10:57 +0800 Subject: [PATCH] no msg --- pages/home/jl/index.js | 34 +++-- pages/home/jl/index.wxml | 2 +- pages/home/me/grzl/grzl.js | 38 ++--- pages/home/me/grzl/grzl.json | 3 +- pages/home/me/grzl/grzl.wxml | 95 +++++++----- pages/home/me/grzl/grzl.wxss | 244 +++++++++++++++--------------- pages/home/xx/index.wxss | 4 +- pages/home/xx/lindex/lxz/lxz.js | 118 ++++++++------- pages/home/xx/lindex/lxz/lxz.wxml | 11 +- pages/home/xx/lindex/lxz/lxz.wxss | 17 ++- pages/home/xx/xz/xz.js | 96 ++++++------ pages/home/xx/xz/xz.wxml | 7 +- pages/home/xx/xz/xz.wxss | 16 +- pages/home/xy/index.wxml | 2 +- pages/home/xyc/index.js | 17 +-- pages/home/xyc/index.wxml | 6 +- pages/home/xyc/index.wxss | 9 +- pages/index/index.wxml | 23 +-- pages/index/index.wxss | 103 ++++++------- project.config.json | 17 +-- project.private.config.json | 14 +- 21 files changed, 468 insertions(+), 408 deletions(-) diff --git a/pages/home/jl/index.js b/pages/home/jl/index.js index ee51741..7d53af3 100644 --- a/pages/home/jl/index.js +++ b/pages/home/jl/index.js @@ -154,20 +154,30 @@ Page({ }, // 注入晶石 btnInject(){ - this.setData({ - showInject:!this.data.showInject, - showInEnergy:!this.data.showInEnergy - }) - req.patchRequest('/api/user/curt/inject-energy-to-pendant',{}).then((res)=>{ - console.log('能量注入成功'); - }) - setTimeout(()=>{ + // 判断是否有能量 + if (this.data.userInfo.crystallineEnergy) { this.setData({ - showInEnergy:!this.data.showInEnergy, - showScsEnergy:true + showInject:!this.data.showInject, + showInEnergy:!this.data.showInEnergy }) - this.getUserInfo() - },2000) + req.patchRequest('/api/user/curt/inject-energy-to-pendant',{}).then((res)=>{ + console.log('能量注入成功'); + }) + setTimeout(()=>{ + this.setData({ + showInEnergy:!this.data.showInEnergy, + showScsEnergy:true + }) + this.getUserInfo() + },2000) + }else{ + this.setData({showInject: false}) + Toast({ + context: this, + selector: '#t-toast', + message: '能量不足', + }); + } }, // 关闭注入弹层 closeEnergy(){this.setData({showScsEnergy:false})}, diff --git a/pages/home/jl/index.wxml b/pages/home/jl/index.wxml index beac35e..f791c02 100644 --- a/pages/home/jl/index.wxml +++ b/pages/home/jl/index.wxml @@ -252,9 +252,9 @@ + - 你要将能量注入到晶石吗? 晶石将开启守护计时 diff --git a/pages/home/me/grzl/grzl.js b/pages/home/me/grzl/grzl.js index 0676b8a..346bee8 100644 --- a/pages/home/me/grzl/grzl.js +++ b/pages/home/me/grzl/grzl.js @@ -18,12 +18,12 @@ Page({ 'https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/tx2.png', 'https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/tx3.png', ], - sexs:[{label:'男生',value:'male'},{label:'女生',value:'female'}], sexVisible:false, note:'', cVisible:false, - userInfo:{} + userInfo:{}, + endDate:new Date().getTime() }, changeAvatar(e){ req.patchRequest('/api/user/curt',{avatar:e.target.dataset.img}).then((res)=>{ @@ -58,7 +58,9 @@ Page({ console.log('11111') }, changeDate(e) {/**修改日期 */ + console.log(e); const { value } = e.detail; + console.log(value); const format = (val) => { const date = new Date(val); return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`; @@ -67,7 +69,8 @@ Page({ this.setData({ note: format(value), }); - req.patchRequest('/api/user/curt',{date:format(value)}).then((res)=>{ + req.patchRequest('/api/user/curt',{birthday:format(value)}).then((res)=>{ + console.log(res); if(res.data.code==200){ this.setData({userInfo:res.data.data}) wx.showToast({ @@ -75,6 +78,7 @@ Page({ icon: 'none', duration: 1000 }) + this.getUserInfo() } }).catch((err)=>{ console.log(err); @@ -85,20 +89,20 @@ Page({ console.log('修改性别') }, doChangeName1(e){ - console.log(e) - console.log(e.detail.value) - req.patchRequest('/api/user/curt',{nick:e.detail.value}).then((res)=>{ - if(res.data.code==200){ - this.setData({userInfo:res.data.data}) - wx.showToast({ - title:'修改成功', - icon: 'none', - duration: 1000 - }) - } - }).catch((err)=>{ - console.log(err); - }) + if (e.detail.value !== this.data.userInfo.nick) { + req.patchRequest('/api/user/curt',{nick:e.detail.value}).then((res)=>{ + if(res.data.code==200){ + this.setData({userInfo:res.data.data}) + wx.showToast({ + title:'修改成功', + icon: 'none', + duration: 1000 + }) + } + }).catch((err)=>{ + console.log(err); + }) + } }, getUserInfo(){ req.getRequest('/api/user/curt',{}).then((res)=>{ diff --git a/pages/home/me/grzl/grzl.json b/pages/home/me/grzl/grzl.json index b68ae56..b9799dc 100644 --- a/pages/home/me/grzl/grzl.json +++ b/pages/home/me/grzl/grzl.json @@ -3,6 +3,7 @@ "t-input": "tdesign-miniprogram/input/input", "t-calendar": "tdesign-miniprogram/calendar/calendar", "t-picker": "tdesign-miniprogram/picker/picker", - "t-picker-item": "tdesign-miniprogram/picker-item/picker-item" + "t-picker-item": "tdesign-miniprogram/picker-item/picker-item", + "t-date-time-picker": "tdesign-miniprogram/date-time-picker/date-time-picker" } } \ No newline at end of file diff --git a/pages/home/me/grzl/grzl.wxml b/pages/home/me/grzl/grzl.wxml index 31696d0..5aa8eab 100644 --- a/pages/home/me/grzl/grzl.wxml +++ b/pages/home/me/grzl/grzl.wxml @@ -1,40 +1,67 @@ - - - -修改资料 - - + + + + + 修改资料 + + + + + + + - + + + 精灵头像 + + + + + + -
+ -
- + + + + 性别 + {{userInfo.spriteType=='male'?'男生':'女生'}} + + + 生日 + {{userInfo.birthday}} + + + 星座 + {{userInfo.birthdayConstellation}} + + -性别 -星座 -生日 -精灵头像 -{{userInfo.spriteType=='male'?'男生':'女生'}} -{{userInfo.horoscope.name}} -{{userInfo.horoscope.date}} - + - - - + - - - \ No newline at end of file + + + + +
diff --git a/pages/home/me/grzl/grzl.wxss b/pages/home/me/grzl/grzl.wxss index 61297f5..d12a932 100644 --- a/pages/home/me/grzl/grzl.wxss +++ b/pages/home/me/grzl/grzl.wxss @@ -1,185 +1,187 @@ /* pages/home/me/grzl/grzl.wxss */ -.reback{ +.xgzl-container { position: absolute; - margin-left: 20rpx; - margin-top:108rpx; + width: 100%; + height: 100%; + padding-top: 88rpx; + box-sizing: border-box; +} + +.xgzl-header { + width: 100%; + display: flex; +} + +.reback{ width:48rpx; height:48rpx; - background-repeat: no-repeat; + margin-left: 20rpx; background-size:100% 100%; background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png); } .title{ - position: absolute; - left: 278rpx; - top: 108rpx; width: 196rpx; height: 48rpx; + margin-left: 210rpx; + display: flex; + align-items: center; + justify-content: center; color: rgba(108, 108, 108, 1); font-size: 32rpx; - text-align: center; - font-family: SourceHanSansSC-regular; } -.yhtx{ - position: absolute; - left: 74px; - top: 109px; - width: 140rpx; - height: 140rpx; - border-radius: 74rpx; - border: 3px solid rgba(161, 134, 81, 1); +.xgzl-img { + position: relative; + width: 100%; + height: 224rpx; + display: flex; + align-items: center; + justify-content: center; } .avatar1{ - position: absolute; - left: 77px; - top: 112px; width: 140rpx; height: 140rpx; + margin: 0 64rpx 0 148rpx; border-radius: 74rpx; + border: 6rpx solid #A18651; +} + +.nickname{ + border: 1px solid #ffffff; + /* color: rgba(108, 108, 108, 1); + font-size: 36rpx; + text-align: left; + padding: 0 !important; + border: none !important; + background-color: rgba(108, 108, 108, 0) !important; */ +} + +.xgzl-sculpture { + width: 100%; + padding-left: 50rpx; + box-sizing: border-box; +} + +.jltxtxt{ + color: rgba(154, 154, 154, 1); + font-size: 28rpx; } .cameralogo{ position: absolute; - left: 128px; - top: 162px; - width: 13px; - height: 13px; + top: 144rpx; + left: 296rpx; + width: 38rpx; + height: 38rpx; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + background-color: #4F4F4F; +} + +.cameralogo-img { + width: 26rpx; + height: 26rpx; background-repeat: no-repeat; background-size:100% 100%; background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/camera.png); } -.nickname{ - z-index: 999; - position: absolute; - left: 176px; -top: 131px; -width: 126px; -height: 27px; -color: rgba(108, 108, 108, 1); -font-size: 18px; -text-align: left; -font-family: SourceHanSansSC-medium; + +.txcheck-box { + width: 100%; + height: 164rpx; + overflow-x: scroll; + overflow: hidden; +} + +.txcheck{ + width: 844rpx; + height: 164rpx; + text-align: center; + overflow: auto; + display: flex; + align-items: center; +} + +.itemxx{ + width: 100rpx; + height: 100rpx; + margin-right: 32rpx; +} + +.xgzl-data { + width: 100%; +} + +.data-item { + width: 100%; + height: 80rpx; + padding: 0 64rpx; + box-sizing: border-box; + display: flex; + align-items: center; + justify-content: space-between; } .xzwz{ - position: absolute; - left: 32px; -top: 436px; -width: 32px; -height: 24px; -color: rgba(108, 108, 108, 1); -font-size: 16px; -text-align: left; -font-family: SourceHanSansSC-regular; + width: 64rpx; + height: 48rpx; + color: rgba(108, 108, 108, 1); + font-size: 32rpx; + text-align: left; } .srwz{ - position: absolute; - left: 32px; -top: 380px; -width: 32px; -height: 24px; -color: rgba(108, 108, 108, 1); -font-size: 16px; -text-align: left; -font-family: SourceHanSansSC-regular; + width: 64rpx; + height: 48rpx; + color: rgba(108, 108, 108, 1); + font-size: 32rpx; + text-align: left; } .xbwz{ - position: absolute; - left: 32px; -top: 324px; -width: 32px; -height: 24px; -color: rgba(108, 108, 108, 1); -font-size: 16px; -text-align: left; -font-family: SourceHanSansSC-regular; -} - -.ssxz{ - position: absolute; - left: 291px; - top: 436px; - width: 52px; - height: 24px; - color: rgba(154, 154, 154, 1); - font-size: 16px; - text-align: right; + width: 64rpx; + height: 48rpx; + color: rgba(108, 108, 108, 1); + font-size: 32rpx; + text-align: left; font-family: SourceHanSansSC-regular; } -.rlt{ - position: absolute; - left: 260px; - top: 380px; - width: 83px; - height: 24px; +.ssxz{ + width: 104rpx; + height: 48rpx; color: rgba(154, 154, 154, 1); - font-size: 16px; + font-size: 32rpx; text-align: right; font-family: SourceHanSansSC-regular; } .srtxt{ - position: absolute; - left: 500rpx; - top: 380px; width: 200rpx; - height: 24px; + height: 48rpx; color: rgba(154, 154, 154, 1); - font-size: 16px; + font-size: 32rpx; text-align: right; font-family: SourceHanSansSC-regular; } .xbtxt{ - position: absolute; - left: 311px; - top: 324px; - width: 32px; - height: 24px; + width: 64rpx; + height: 48rpx; color: rgba(154, 154, 154, 1); - font-size: 16px; + font-size: 32rpx; text-align: right; font-family: SourceHanSansSC-regular; } -.jltxtxt{ - position: absolute; - left: 25px; -top: 200px; -width: 56px; -height: 21px; -color: rgba(154, 154, 154, 1); -font-size: 14px; -text-align: left; -font-family: SourceHanSansSC-regular; -} -.txcheck{ - position: absolute; - left: 0px; - top: 221px; - width: 422px; - height: 82px; - text-align: center; - overflow: auto; - display: flex; -} -.itemxx{ - margin-left: 21px; - margin-top: 32rpx; - width: 50px; - height: 50px; - display: flex; -} .iii{ - width: 50px; - height: 50px; + width: 100rpx; + height: 100rpx; border-radius: 50rpx; } \ No newline at end of file diff --git a/pages/home/xx/index.wxss b/pages/home/xx/index.wxss index 0f1be93..4bee073 100644 --- a/pages/home/xx/index.wxss +++ b/pages/home/xx/index.wxss @@ -536,14 +536,14 @@ font-family: SourceHanSansSC-regular; padding-top: 110rpx ; box-sizing: border-box; background-size: contain; - background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/%E7%BB%91%E5%AE%9A%E6%83%85%E4%BE%A3%E8%83%8C%E6%99%AF.png?q-sign-algorithm=sha1&q-ak=AKIDBoSyA3WoZy_K5pulXw4YwFFHSwjFqxnletbnHqQeqsRjs6Z9txpRYnJsTOBkTuB-&q-sign-time=1686277836;1686281436&q-key-time=1686277836;1686281436&q-header-list=host&q-url-param-list=ci-process&q-signature=690b486d55a1508bbd0fa788fc514205f8e093ae&x-cos-security-token=fOK1T4qo16Mru7W3aQJ2E9sScf0A7RGad630a09d5896cabd06bbc21068eb367b0Y1MqoJbaHndptGx2BSuYBj716Nh9KM5pliR7tTMw41pxbQkpuvQEJzIMJB81Gn2J8YczG8Xp2c8TawHArzH0tWHlefZqUS4htBd2RgoMX7sRqgMQrzWKqSqtQvCClDVjhFU8HaCDxGOe5WHMFrig91Hzv-y0eBh9tQ1ZshhS9zluBgjfnv9DvY68t4xdRRuT2lvuZodggzQgdI70Dn2Gw&ci-process=originImage); + background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/%E7%BB%91%E5%AE%9A%E6%83%85%E4%BE%A3%E8%83%8C%E6%99%AF.png); } .openSend-main-img { width: 404rpx; height: 404rpx; margin: 0 auto; - background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/%E9%92%BB%E7%9F%B3.png?q-sign-algorithm=sha1&q-ak=AKIDst1-IkRWRN-vG6c40Q-UlDDwO_XkhhbYojH9k0I_aHwwWrsDpGsgzp8wq1qqVreA&q-sign-time=1686278212;1686281812&q-key-time=1686278212;1686281812&q-header-list=host&q-url-param-list=ci-process&q-signature=0faf4873a6d53f31c4546212b03c34facea0ad7e&x-cos-security-token=fOK1T4qo16Mru7W3aQJ2E9sScf0A7RGae2bdb94cb7cb0f1587a5681379bd60560Y1MqoJbaHndptGx2BSuYK3CIkr19FgIPMfB-yHA0KDAkpcfsga1JeNj2wEobNz87tC3goLmUbIap-_7G6k8LvI24RUR2sayPV97z2zxAuQuMMiHcziszgQTR1R1nFpF5pAqP7Wxz65QQwX-sCy_eX1AEXfpFmxzDtq1BKIHIu73jhFZ1bAbMfFpLYxNnVZDm2gcmuV8hhQM6lC5xAcVcA&ci-process=originImage); + background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/%E9%92%BB%E7%9F%B3.png); background-size: contain; } diff --git a/pages/home/xx/lindex/lxz/lxz.js b/pages/home/xx/lindex/lxz/lxz.js index 506cf76..cf4a227 100644 --- a/pages/home/xx/lindex/lxz/lxz.js +++ b/pages/home/xx/lindex/lxz/lxz.js @@ -31,6 +31,7 @@ Page({ btn1:true, btn2:false, btn3:false, + btn4:false, showSoundImg:true }, writeLetters(){ @@ -41,6 +42,15 @@ Page({ Preview: false }) }, + leavetext(){ + console.log('离开了'); + if (this.data.img !== '' || this.data.duration !== '') { + this.setData({ + showImg: true, + showLtqp: true + }) + } + }, already(){ console.log('确定寄出'); this.setData({showAlready:true}) @@ -86,7 +96,11 @@ Page({ }, ClearYl(){ console.log('清除语音'); - // this.setData({showLtqp:false}) + this.setData({showLtqp:false}) + const list = this.data.messageList.filter(item => { + item.type !== 'audio' + }) + this.setData({messageList: list}) }, goBack(){ console.log('返回'); @@ -141,14 +155,15 @@ Page({ }) // 判断语音条数大于3条 if(audio.length >= 3){ - this.setData({showSoundMore:true}) + this.setData({showSoundMore:true, showSoundImg:true}) }else { list.push({ type: 'audio', resourceId: data.data.id, }) this.setData({ - messageList: list + messageList: list, + showSoundImg: true }) } console.log(this.data.messageList); @@ -168,25 +183,6 @@ Page({ console.log(this.data.messageList); } }), - // success: async res => { - // let data = JSON.parse(res.data); - // console.log(data, '111111'); - // if (data.code == 200) { - // this.setData({imgUrl:data.data.abUrl}) - // console.log('打印1111') - // console.log(this.data.imgUrl) - // res.data = JSON.parse(res.data); - // console.log(res.data); - // if (res.data.code == 1) { - // console.log(res.data.data.url); - // this.img = this.baseUrl + res.data.data.url; - // 图片路径 - // this.userinfo.avatar = res.data.data.url; - // let n = await this.$api.upload({ file: res.data.fullurl }); - // console.log(n, '上传后'); - // } - // } - // }, fail(res) { console.log('上传失败'); } @@ -197,7 +193,20 @@ Page({ this.setData({showSound:true}) }, closeSound(){ - this.setData({showSound:false}) + console.log('退出'); + this.setData({ + showSound:false, + btn1: true, + btn2: false, + btn3: false, + btn4: false, + soundTime: '00:00:00', + showSoundImg: true, + minute:0, + second:0, + millisecond:0 + }) + clearInterval(this.data.timeOut) }, startSound(){ console.log('开始录音'); @@ -242,32 +251,44 @@ Page({ this.setData({soundTime: time}) }, endSound(){ - console.log('暂停录音'); - wx.getRecorderManager().pause() + console.log('结束录音'); + wx.getRecorderManager().stop() + wx.getRecorderManager().onStop((res) => { + console.log(res); + + const innerAudioContext = wx.createInnerAudioContext() + innerAudioContext.src = res.tempFilePath + + this.setData({ + innerAudioContext: innerAudioContext, + videoSrc:res.tempFilePath + }) + }) clearInterval(this.data.timeOut) this.setData({btn2:false, btn3:true, showSoundImg:true}) }, playVoice(){ - console.log('继续录音'); - wx.getRecorderManager().resume() - this.data.timeOut = setInterval(this.counter,50) - this.setData({btn2:true, btn3:false, showSoundImg:false}) + console.log('播放录音'); + this.data.innerAudioContext.play() + this.setData({btn3: false ,btn4: true}) + }, + stopVoice(){ + console.log('停止播放录音'); + this.data.innerAudioContext.stop() + this.setData({btn3: true ,btn4: false}) }, addSound(){ console.log('添加录音'); console.log(this.data.soundTime); this.setData({duration: this.data.soundTime}) - wx.getRecorderManager().stop() + // 上传语音 + this.uploadFile(this.data.videoSrc,'audio') clearInterval(this.data.timeOut) - // 监听结束录音 - wx.getRecorderManager().onStop((res) => { - console.log(res); - this.uploadFile(res.tempFilePath,'audio') - }) this.setData({ btn1:true, btn2:false, btn3:false, + btn4:false, showLtqp: true, minute:0, second:0, @@ -275,16 +296,6 @@ Page({ soundTime:'00:00:00' }) }, - // delSound(){ - // console.log('不添加该条语音'); - // this.setData({ - // sound:'', - // btn1:true, - // btn2:false, - // btn3:false, - // soundTime:'00:00:00' - // }) - // }, logout(){ req.deleteRequest('/api/user/logout',{}).then((res)=>{ if(res.data.code===200){ @@ -295,21 +306,18 @@ Page({ title:'寄出成功' }) } - }) + }) + // wx.showToast({ + // title: 'ok了', + // }) + }, + modify(){ + this.setData({showAlready: false, showSend: false}) }, getLetter(){ console.log('获取当前用户信札内容'); req.getRequest('/api/user/curt/letter',{}).then(res => { console.log(res); - // res.data.data.messageList.forEach(item => { - // if(item.type === 'text'){ - // this.setData({content: item.content}) - // } - // }) - // this.setData({ - // to: res.data.data.to, - // from: res.data.data.from, - // }) }) }, /** diff --git a/pages/home/xx/lindex/lxz/lxz.wxml b/pages/home/xx/lindex/lxz/lxz.wxml index ea78e37..6c370bd 100644 --- a/pages/home/xx/lindex/lxz/lxz.wxml +++ b/pages/home/xx/lindex/lxz/lxz.wxml @@ -18,7 +18,7 @@
- + @@ -67,10 +67,13 @@ - + - + + + +
@@ -107,7 +110,7 @@ 点击OK回到未激活初始页面 如果误打开信件,需要再次寄出哦! - 修改 + 修改 OK diff --git a/pages/home/xx/lindex/lxz/lxz.wxss b/pages/home/xx/lindex/lxz/lxz.wxss index 89c2c8b..c9eb88c 100644 --- a/pages/home/xx/lindex/lxz/lxz.wxss +++ b/pages/home/xx/lindex/lxz/lxz.wxss @@ -423,9 +423,9 @@ } .btn-being { - width: 60rpx; - height: 60rpx; - border-radius: 5px; + width: 90rpx; + height: 90rpx; + border-radius: 50%; background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%); } @@ -436,13 +436,21 @@ background-size: contain; } -.btn-audition { +.btn-video { width: 60rpx; height: 60rpx; background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/semiDesign-semi-icons-pause%20Copy%401x.png); background-size: contain; } +.btn-have { + width: 60rpx; + height: 60rpx; + border-radius: 10rpx; + background-color: #F8632A; + background-size: contain; +} + .taost-box-text { width: 100%; display: flex; @@ -561,4 +569,5 @@ justify-content: center; align-items: center; color: #fff; + z-index: 999; } \ No newline at end of file diff --git a/pages/home/xx/xz/xz.js b/pages/home/xx/xz/xz.js index 6c41578..cf4a227 100644 --- a/pages/home/xx/xz/xz.js +++ b/pages/home/xx/xz/xz.js @@ -31,6 +31,7 @@ Page({ btn1:true, btn2:false, btn3:false, + btn4:false, showSoundImg:true }, writeLetters(){ @@ -95,7 +96,11 @@ Page({ }, ClearYl(){ console.log('清除语音'); - // this.setData({showLtqp:false}) + this.setData({showLtqp:false}) + const list = this.data.messageList.filter(item => { + item.type !== 'audio' + }) + this.setData({messageList: list}) }, goBack(){ console.log('返回'); @@ -178,25 +183,6 @@ Page({ console.log(this.data.messageList); } }), - // success: async res => { - // let data = JSON.parse(res.data); - // console.log(data, '111111'); - // if (data.code == 200) { - // this.setData({imgUrl:data.data.abUrl}) - // console.log('打印1111') - // console.log(this.data.imgUrl) - // res.data = JSON.parse(res.data); - // console.log(res.data); - // if (res.data.code == 1) { - // console.log(res.data.data.url); - // this.img = this.baseUrl + res.data.data.url; - // 图片路径 - // this.userinfo.avatar = res.data.data.url; - // let n = await this.$api.upload({ file: res.data.fullurl }); - // console.log(n, '上传后'); - // } - // } - // }, fail(res) { console.log('上传失败'); } @@ -207,7 +193,20 @@ Page({ this.setData({showSound:true}) }, closeSound(){ - this.setData({showSound:false}) + console.log('退出'); + this.setData({ + showSound:false, + btn1: true, + btn2: false, + btn3: false, + btn4: false, + soundTime: '00:00:00', + showSoundImg: true, + minute:0, + second:0, + millisecond:0 + }) + clearInterval(this.data.timeOut) }, startSound(){ console.log('开始录音'); @@ -252,32 +251,44 @@ Page({ this.setData({soundTime: time}) }, endSound(){ - console.log('暂停录音'); - wx.getRecorderManager().pause() + console.log('结束录音'); + wx.getRecorderManager().stop() + wx.getRecorderManager().onStop((res) => { + console.log(res); + + const innerAudioContext = wx.createInnerAudioContext() + innerAudioContext.src = res.tempFilePath + + this.setData({ + innerAudioContext: innerAudioContext, + videoSrc:res.tempFilePath + }) + }) clearInterval(this.data.timeOut) this.setData({btn2:false, btn3:true, showSoundImg:true}) }, playVoice(){ - console.log('继续录音'); - wx.getRecorderManager().resume() - this.data.timeOut = setInterval(this.counter,50) - this.setData({btn2:true, btn3:false, showSoundImg:false}) + console.log('播放录音'); + this.data.innerAudioContext.play() + this.setData({btn3: false ,btn4: true}) + }, + stopVoice(){ + console.log('停止播放录音'); + this.data.innerAudioContext.stop() + this.setData({btn3: true ,btn4: false}) }, addSound(){ console.log('添加录音'); console.log(this.data.soundTime); this.setData({duration: this.data.soundTime}) - wx.getRecorderManager().stop() + // 上传语音 + this.uploadFile(this.data.videoSrc,'audio') clearInterval(this.data.timeOut) - // 监听结束录音 - wx.getRecorderManager().onStop((res) => { - console.log(res); - this.uploadFile(res.tempFilePath,'audio') - }) this.setData({ btn1:true, btn2:false, btn3:false, + btn4:false, showLtqp: true, minute:0, second:0, @@ -285,16 +296,6 @@ Page({ soundTime:'00:00:00' }) }, - // delSound(){ - // console.log('不添加该条语音'); - // this.setData({ - // sound:'', - // btn1:true, - // btn2:false, - // btn3:false, - // soundTime:'00:00:00' - // }) - // }, logout(){ req.deleteRequest('/api/user/logout',{}).then((res)=>{ if(res.data.code===200){ @@ -317,15 +318,6 @@ Page({ console.log('获取当前用户信札内容'); req.getRequest('/api/user/curt/letter',{}).then(res => { console.log(res); - // res.data.data.messageList.forEach(item => { - // if(item.type === 'text'){ - // this.setData({content: item.content}) - // } - // }) - // this.setData({ - // to: res.data.data.to, - // from: res.data.data.from, - // }) }) }, /** diff --git a/pages/home/xx/xz/xz.wxml b/pages/home/xx/xz/xz.wxml index d53e5c4..6c370bd 100644 --- a/pages/home/xx/xz/xz.wxml +++ b/pages/home/xx/xz/xz.wxml @@ -67,10 +67,13 @@ - + - + + + + diff --git a/pages/home/xx/xz/xz.wxss b/pages/home/xx/xz/xz.wxss index a241da9..c9eb88c 100644 --- a/pages/home/xx/xz/xz.wxss +++ b/pages/home/xx/xz/xz.wxss @@ -423,9 +423,9 @@ } .btn-being { - width: 60rpx; - height: 60rpx; - border-radius: 5px; + width: 90rpx; + height: 90rpx; + border-radius: 50%; background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%); } @@ -436,13 +436,21 @@ background-size: contain; } -.btn-audition { +.btn-video { width: 60rpx; height: 60rpx; background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/semiDesign-semi-icons-pause%20Copy%401x.png); background-size: contain; } +.btn-have { + width: 60rpx; + height: 60rpx; + border-radius: 10rpx; + background-color: #F8632A; + background-size: contain; +} + .taost-box-text { width: 100%; display: flex; diff --git a/pages/home/xy/index.wxml b/pages/home/xy/index.wxml index 7be6436..465ad8e 100644 --- a/pages/home/xy/index.wxml +++ b/pages/home/xy/index.wxml @@ -17,7 +17,7 @@ 能量 +{{userInfo.pendantEnergy}}% 银币 +{{userInfo.silverCoin}}枚 - + {{userInfo.horoscope.summary}} diff --git a/pages/home/xyc/index.js b/pages/home/xyc/index.js index 400a644..81bde32 100644 --- a/pages/home/xyc/index.js +++ b/pages/home/xyc/index.js @@ -31,7 +31,8 @@ Page({ xyInfo:{}, showXyz:false, //显示许愿中弹层 showDetail:false, //许愿成功回显弹层 - shareVisible:false //显示分享页面 + shareVisible:false, //显示分享页面 + showToast:false //显示提示弹层 }, handleAdd(e){/**添加图片 */ const { fileList } = this.data; @@ -98,12 +99,16 @@ Page({ wx.navigateTo({ url: '/pages/home/xyc/tdyw/tdyw' }) - }, doXzTime(){ this.setData({ cvisible: true }); console.log('执行选择时间') }, + // 显示提示 + showToast(){ + console.log('11'); + this.setData({showToast: !this.data.showToast}) + }, handleConfirm(e) { console.log(e,'111'); const { value } = e.detail; @@ -122,14 +127,6 @@ Page({ onClose({ detail }) { console.log(detail.trigger); }, - showMultiText() { - Toast({ - context: this, - selector: '#t-toast', - message: '投枚银币许个愿吧\n守护精灵将会祝福你的愿望!', - dataduration:10 - }); - }, doXyPop(){/**弹出许愿弹窗 */ console.log('执行力。。。。。') this.setData({visible:true}) diff --git a/pages/home/xyc/index.wxml b/pages/home/xyc/index.wxml index 62a7c2a..73b61a8 100644 --- a/pages/home/xyc/index.wxml +++ b/pages/home/xyc/index.wxml @@ -9,11 +9,11 @@ 我的愿望{{wishes.length}} - + - + @@ -45,7 +45,7 @@ - + 投枚银币许个愿吧!守护精灵将会祝福你的愿望! diff --git a/pages/home/xyc/index.wxss b/pages/home/xyc/index.wxss index 7ef7d24..a0d264a 100644 --- a/pages/home/xyc/index.wxss +++ b/pages/home/xyc/index.wxss @@ -376,15 +376,14 @@ font-family: SourceHanSansSC-medium; right: 180rpx; width: 310rpx; height: 180rpx; - padding: 12px; + padding: 24rpx; box-sizing: border-box; color: #6c6c6c; - line-height: 20px; opacity: 0.9; - border-radius: 15px; + border-radius: 30rpx; background-color: rgba(255, 255, 255, 1); - font-size: 14px; - box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4); + font-size: 28rpx; + box-shadow: 2rpx 4rpx 12rpx 0px rgba(0, 0, 0, 0.4); } /* 许愿进行中 */ diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 232db70..48ec543 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -1,14 +1,17 @@ - - - - - - - - - 获取晶石 - + + + + + + + + + + + + 获取晶石 + diff --git a/pages/index/index.wxss b/pages/index/index.wxss index dd6383e..e97636c 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -1,19 +1,25 @@ /* pages/index/index.wxss */ +.bd { + position: absolute; + width: 100%; + height: 100%; + padding: 88rpx 40rpx 0 40rpx; + box-sizing: border-box; +} + .bg{ - position: absolute; - width: 750rpx; - height: 1419rpx; + width: 100%; + height: 100%; + box-sizing: border-box; display: flex; flex-direction: column; - margin-top: 112.67rpx; - margin-left: 37.33rpx; + align-items: center; background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xy/bkg.png); background-repeat: no-repeat; - background-size: 675.34rpx 100%; + background-size: contain; } .quest{ - position: absolute; width: 50rpx; height: 50rpx; display: flex; @@ -24,89 +30,68 @@ } .alb{ - position: absolute; width: 432rpx; - height: 192.67rpx; - display: flex; - flex-direction: column; + height: 192rpx; + margin-top: 258rpx; background-repeat: no-repeat; background-size:100% 100%; - margin-top:234.67rpx; - margin-left: 121.67rpx; background-image: url(https://gitee.com/lsltsl/zodiac-elf/raw/master/xzjl/index/alb.png); } .qr{ - position: absolute; - width: 150.67rpx; - height: 150.67rpx; + width: 152rpx; + height: 152rpx; + margin-top: 100rpx; display: flex; - flex-direction: column; - background-repeat: no-repeat; + align-items: center; + justify-content: center; background-size:100% 100%; - margin-top:540.67rpx; - margin-left: 262.33rpx; background-image: url(https://gitee.com/lsltsl/zodiac-elf/raw/master/xzjl/index/qr.png); } .js{ - position: absolute; - width: 115.33rpx; - height: 173.33rpx; - display: flex; - flex-direction: column; - background-repeat: no-repeat; + width: 114rpx; + height: 172rpx; background-size:100% 100%; - margin-top:535.33rpx; - margin-left: 280rpx; background-image: url(https://gitee.com/lsltsl/zodiac-elf/raw/master/xzjl/index/js.png); } .yw{ - position: absolute; - width: 399.33rpx; - height: 53.33rpx; + width: 400rpx; + height: 54rpx; + margin-top: 24rpx; display: flex; - flex-direction: column; - background-repeat: no-repeat; + align-items: center; + justify-content: center; background-size:100% 100%; - margin-top:718rpx; - margin-left: 138rpx; background-image: url(https://gitee.com/lsltsl/zodiac-elf/raw/master/xzjl/index/yw.png); } + .shadow { + width: 150rpx; + height: 62rpx; + background-size:100% 100%; + background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/xy/shadow.png); + } + .jstext{ - position: absolute; - width: 399.33rpx; - height: 216rpx; - display: flex; - flex-direction: column; - background-repeat: no-repeat; + width: 400rpx; + height: 242rpx; + margin-top: 118rpx; background-size:100% 100%; - margin-top:891.33rpx; - margin-left: 138rpx; background-image: url(https://gitee.com/lsltsl/zodiac-elf/raw/master/xzjl/index/jstext.png); } .yx{ - position: absolute; - width: 272rpx; - height: 170.67rpx; + width: 248rpx; + height: 142rpx; + margin-top: 24rpx; display: flex; - flex-direction: column; - background-repeat: no-repeat; - background-size:100% 100%; - margin-top:1158rpx; - margin-left: 201.67rpx; - background-image: url(https://gitee.com/lsltsl/zodiac-elf/raw/master/xzjl/index/yx.png); - } - - .hqjs{ - width: 272rpx; - text-align: center; - height: 170.67rpx; - line-height: 170.67rpx; + align-items: center; + justify-content: center; color: cornsilk; font-size: 40rpx; font-weight: bold; + background-size:100% 100%; + background-image: url(https://gitee.com/lsltsl/zodiac-elf/raw/master/xzjl/index/yx.png); } diff --git a/project.config.json b/project.config.json index e9bf0bc..1b426ab 100644 --- a/project.config.json +++ b/project.config.json @@ -1,9 +1,5 @@ { "description": "项目配置文件", - "packOptions": { - "ignore": [], - "include": [] - }, "setting": { "bundle": false, "userConfirmedBundleSwitch": false, @@ -24,8 +20,6 @@ "nodeModules": false, "enhance": true, "useMultiFrameRuntime": true, - "useApiHook": true, - "useApiHostProcess": true, "showShadowRootInWxmlPanel": true, "packNpmManually": false, "enableEngineNative": false, @@ -43,12 +37,15 @@ "ignoreUploadUnusedFiles": false }, "compileType": "miniprogram", - "libVersion": "2.19.4", - "appid": "wxa0d7db44777041f7", - "projectname": "miniprogram-92", "condition": {}, "editorSetting": { "tabIndent": "insertSpaces", "tabSize": 4 - } + }, + "libVersion": "2.19.4", + "packOptions": { + "ignore": [], + "include": [] + }, + "appid": "wxa0d7db44777041f7" } \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index 0a38ade..3016dc9 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -5,5 +5,17 @@ "compileHotReLoad": true, "urlCheck": false }, - "condition": {} + "condition": { + "miniprogram": { + "list": [ + { + "name": "", + "pathName": "pages/home/me/grzl/grzl", + "query": "", + "launchMode": "default", + "scene": null + } + ] + } + } } \ No newline at end of file