From f2b68aee913a54a525edbea77867b58163302e82 Mon Sep 17 00:00:00 2001 From: Wkang921 Date: Tue, 4 Jul 2023 17:34:42 +0800 Subject: [PATCH] no msg --- pages/home/jl/index.js | 8 +- pages/home/jl/index.wxss | 20 ++-- pages/home/me/grzl/grzl.wxml | 2 +- pages/home/me/jcjb/jcjb.wxml | 6 +- pages/home/xx/lindex/lxz/lxz.js | 153 +++++++++++++----------------- pages/home/xx/lindex/lxz/lxz.wxml | 71 ++++++++------ pages/home/xx/lindex/lxz/lxz.wxss | 114 ++++++++++++++-------- pages/home/xx/xz/xz.js | 153 +++++++++++++----------------- pages/home/xx/xz/xz.wxml | 71 ++++++++------ pages/home/xx/xz/xz.wxss | 114 ++++++++++++++-------- pages/home/xy/index.js | 8 +- pages/home/xy/index.wxml | 4 +- pages/home/xyc/index.wxml | 20 ++-- pages/home/xyc/wdyw/wdyw.wxml | 12 +-- pages/xz/index.js | 35 ++++--- pages/xz/index.json | 3 +- pages/xz/index.wxml | 18 ++-- pages/xz/index.wxss | 28 ++++-- project.private.config.json | 2 +- 19 files changed, 455 insertions(+), 387 deletions(-) diff --git a/pages/home/jl/index.js b/pages/home/jl/index.js index 7d53af3..d69e91d 100644 --- a/pages/home/jl/index.js +++ b/pages/home/jl/index.js @@ -79,7 +79,6 @@ Page({ const horoscopes = res.data.data const type = this.data.userInfo.horoscope.name this.setData({xingxiangtu: horoscopes[type].sprite}) - console.log(this.data.xingxiangtu, '1111'); } }).catch((err)=>{ console.log(err); @@ -93,7 +92,6 @@ Page({ if(res.data.code==200){ this.setData({loverInfo:res.data.data}) } - console.log(this.userInfo); }).catch((err)=>{ console.log(err); }) @@ -328,21 +326,21 @@ Page({ * 生命周期函数--监听页面显示 */ onShow() { - + this.getUserInfo() }, /** * 生命周期函数--监听页面隐藏 */ onHide() { - + this.getUserInfo() }, /** * 生命周期函数--监听页面卸载 */ onUnload() { - + this.getUserInfo() }, /** diff --git a/pages/home/jl/index.wxss b/pages/home/jl/index.wxss index dbfd35c..2740c22 100644 --- a/pages/home/jl/index.wxss +++ b/pages/home/jl/index.wxss @@ -1,4 +1,8 @@ /* pages/home/jl/index.wxss */ +page { + height: 100%; +} + .tx{ position:absolute; width:72rpx; @@ -120,10 +124,12 @@ } .call{ + position: absolute; margin: 0; padding: 0; width:750rpx; - height:1624rpx!important; + height: 100%; + /* height:1624rpx!important; */ overflow: hidden; padding: 0!important; margin: 0!important; @@ -329,6 +335,9 @@ height:116.67rpx; margin-top: 837.33rpx; margin-left:517.33rpx; + display: flex; + align-items: center; + justify-content: center; background-repeat: no-repeat; background-size:100% 100%; background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yan.png); @@ -379,13 +388,12 @@ } .yan13{ - position: absolute; - width:46.67rpx; + /* position: absolute; */ + width:36rpx; height:46.67rpx; background-repeat: no-repeat; background-size:100% 100%; - margin-top: 33.33rpx; - margin-left:34.33rpx; + background-size: contain; background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/female.png); } @@ -923,7 +931,7 @@ picker-view-column { .dcright1 { position: absolute; - bottom: 270rpx; + top: 1232rpx; right: 109rpx; } diff --git a/pages/home/me/grzl/grzl.wxml b/pages/home/me/grzl/grzl.wxml index 5aa8eab..aa617f0 100644 --- a/pages/home/me/grzl/grzl.wxml +++ b/pages/home/me/grzl/grzl.wxml @@ -31,7 +31,7 @@ 生日 - {{userInfo.birthday}} + {{userInfo.birthday ? userInfo.birthday : '点击选择日期'}} 星座 diff --git a/pages/home/me/jcjb/jcjb.wxml b/pages/home/me/jcjb/jcjb.wxml index ff1683a..3850df0 100644 --- a/pages/home/me/jcjb/jcjb.wxml +++ b/pages/home/me/jcjb/jcjb.wxml @@ -4,9 +4,9 @@ 解除羁绊 - + - + {{ timeout }} 确定与对方解除羁绊吗? @@ -14,7 +14,7 @@ - + diff --git a/pages/home/xx/lindex/lxz/lxz.js b/pages/home/xx/lindex/lxz/lxz.js index cf4a227..bca2ded 100644 --- a/pages/home/xx/lindex/lxz/lxz.js +++ b/pages/home/xx/lindex/lxz/lxz.js @@ -11,8 +11,8 @@ Page({ to:'', from:'', content:'', - img:'', - messageList:[], + audioList:[], // 音频列表 + imgList:[], // 图片列表 sound:'', soundTime:'00:00:00', duration: '', @@ -20,41 +20,24 @@ Page({ second:0, //秒 millisecond:0, //毫秒 showBtn:true, - showImg:false, - showLtqp:false, showImgBig:false, //图片太大弹层 showSoundMore:false, //语音太多提示 showSend:false, //寄出提示 Preview:false, //预览 showSound:false, showAlready:false, + showImgToast:false, + showImgToastBig:false, btn1:true, btn2:false, btn3:false, btn4:false, showSoundImg:true }, - writeLetters(){ - console.log('写信'); - this.setData({ - showImg:false, - showLtqp:false, - 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}) - const list = this.data.messageList + const list = [ ...this.data.audioList, ...this.data.imgList] list.push({ type: 'text', content: this.data.content @@ -87,36 +70,34 @@ Page({ closeShowSend(){ this.setData({showSend:false}) }, + closeShowImgToast(){this.setData({showImgToast: false})}, openPreview(){ console.log('预览'); this.setData({Preview:true}) - if(this.data.messageList.length){ - this.setData({showLtqp: true}) - } }, - ClearYl(){ + ClearYl(e){ console.log('清除语音'); - this.setData({showLtqp:false}) - const list = this.data.messageList.filter(item => { - item.type !== 'audio' + const id = e.currentTarget.dataset.id + const list = this.data.audioList.filter(item => { + return item.resourceId !== id }) - this.setData({messageList: list}) + this.setData({audioList: list}) }, - goBack(){ - console.log('返回'); - wx.navigateBack() - }, - ClearImg(){ + ClearImg(e){ console.log('清除图片'); - const list = this.data.messageList.filter(item => { - return item.type !== "graphic" - }) - this.setData({ - img:'', - messageList: list, - showImg: false + const id = e.currentTarget.dataset.id + const list = this.data.imgList.filter(item => { + return item.resourceId !== id }) - console.log(this.data.messageList); + this.setData({imgList: list}) + }, + goBack(){ + if (this.data.Preview) { + this.setData({Preview: false}) + }else{ + console.log('返回'); + wx.navigateBack() + } }, // 上传图片 addImg(){ @@ -132,6 +113,7 @@ Page({ } }) }, + // 文件上传 uploadFile(file,type) { wx.uploadFile({ url: 'https://xzjl-api.windymuse.cn/api/resource', @@ -149,38 +131,32 @@ Page({ console.log(data); if (data.data.type === 'audio') { console.log('添加音频'); - const list = this.data.messageList - const audio = this.data.messageList.filter(item => { - return item.type === 'audio' - }) - // 判断语音条数大于3条 - if(audio.length >= 3){ - this.setData({showSoundMore:true, showSoundImg:true}) + const list = this.data.audioList + if(list.length >= 3){ + this.setData({showSoundMore:true ,showSoundImg:true}) + console.log('语音太多了'); }else { list.push({ - type: 'audio', - resourceId: data.data.id, - }) - this.setData({ - messageList: list, - showSoundImg: true + type: 'audio', + resourceId: data.data.id, + duration: this.data.duration, + extra: {duration : this.data.duration} }) + this.setData({audioList: list}) } - console.log(this.data.messageList); - } else if (data.data.type === 'poster') { console.log('添加图片'); - const list = this.data.messageList - list.push({ - type: 'graphic', - resourceId: data.data.id - }) - this.setData({ - img:data.data.abUrl, - messageList:list, - showImg:true - }) - console.log(this.data.messageList); + const list = this.data.imgList + if (list.length >= 9) { + this.setData({showImgToast : true}) + }else { + list.push({ + type: 'graphic', + resourceId: data.data.id, + img: data.data.abUrl, + }) + this.setData({imgList: list, showImg:true}) + } } }), fail(res) { @@ -278,23 +254,25 @@ Page({ this.setData({btn3: true ,btn4: false}) }, addSound(){ - console.log('添加录音'); - console.log(this.data.soundTime); - this.setData({duration: this.data.soundTime}) - // 上传语音 - this.uploadFile(this.data.videoSrc,'audio') - clearInterval(this.data.timeOut) - this.setData({ - btn1:true, - btn2:false, - btn3:false, - btn4:false, - showLtqp: true, - minute:0, - second:0, - millisecond:0, - soundTime:'00:00:00' - }) + if(this.data.btn3){ + console.log('添加录音'); + console.log(this.data.soundTime); + this.setData({duration: this.data.soundTime}) + // 上传语音 + this.uploadFile(this.data.videoSrc,'audio') + clearInterval(this.data.timeOut) + this.setData({ + btn1:true, + btn2:false, + btn3:false, + btn4:false, + showLtqp: true, + minute:0, + second:0, + millisecond:0, + soundTime:'00:00:00' + }) + } }, logout(){ req.deleteRequest('/api/user/logout',{}).then((res)=>{ @@ -307,9 +285,6 @@ Page({ }) } }) - // wx.showToast({ - // title: 'ok了', - // }) }, modify(){ this.setData({showAlready: false, showSend: false}) diff --git a/pages/home/xx/lindex/lxz/lxz.wxml b/pages/home/xx/lindex/lxz/lxz.wxml index 6c370bd..4eb21a9 100644 --- a/pages/home/xx/lindex/lxz/lxz.wxml +++ b/pages/home/xx/lindex/lxz/lxz.wxml @@ -1,34 +1,44 @@ - - To: {{to}} - - - From: {{from}} - - - - To: - + + + To: {{to}} + + + + + To: + + + + From: + + - - From: - + + + + + + + + {{item.duration}} + + + + + + + + + + + + From: {{from}} - - - - - - - - {{duration}} - - - - - @@ -51,7 +61,6 @@ - 取消 @@ -87,6 +96,14 @@ + + + 最多只能上传 + 9张图片 + 好的 + + + 确定要寄出吗? diff --git a/pages/home/xx/lindex/lxz/lxz.wxss b/pages/home/xx/lindex/lxz/lxz.wxss index c9eb88c..42be9e9 100644 --- a/pages/home/xx/lindex/lxz/lxz.wxss +++ b/pages/home/xx/lindex/lxz/lxz.wxss @@ -1,4 +1,9 @@ /* pages/home/xx/xz/xz.wxss */ +page { + height: 100%; + overflow: hidden; +} + .bgt1{ position: absolute; width: 690rpx; @@ -28,6 +33,7 @@ color:#9A9A9A; text-align: center; font-size: 27rpx; + pointer-events: none; } .xinfo{ @@ -44,12 +50,21 @@ border-radius: 6rpx; } +.xinfo-content { + width: 100%; + height: 100%; + padding-bottom: 300rpx; + overflow: auto; + position: relative; + pointer-events: auto; +} + .xinfo-title { width: 100%; height: 100rpx; margin-top: 60rpx; padding-left: 64rpx; - /* background-color: pink; */ + box-sizing: border-box; font-size: 28rpx; color: rgba(108, 108, 108, 1); } @@ -61,9 +76,11 @@ } .xinfo-yl-form { - position: absolute; - top: 980rpx; - right: 200rpx; + width: 100%; + text-align: end; + margin-top: 30rpx; + padding-right: 64rpx; + box-sizing: border-box; font-size: 32rpx; color: rgba(108, 108, 108, 1); } @@ -105,14 +122,19 @@ .xinfo-main { width: 100%; - height: 800rpx; - padding: 0 48rpx; + height: auto; + margin: 60rpx 0 32rpx 0; + padding: 0 64rpx; box-sizing: border-box; } +textarea { + height: none; +} + .xinfo-main .t-textarea { width: 100%; - height: 100%; + padding: 0; font-size: 28rpx; background-color: rgba(0, 0, 0, 0); } @@ -122,20 +144,25 @@ } .xinfo-ltqp { - position: absolute; - top: 470rpx; - left: 44rpx; - width: 384rpx; + position: relative; + width: 382rpx; height: 84rpx; - z-index: 9; + margin: 0 0 20rpx 64rpx; + display: flex; + align-items: center; + background-size: contain; + background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/ltqp.png); } .xinfo-ltqp-yl { - position: absolute; - top: 300rpx; - left: 44rpx; - width: 384rpx; + position: relative; + width: 382rpx; height: 84rpx; + margin: 0 0 20rpx 64rpx; + display: flex; + align-items: center; + background-size: contain; + background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/ltqp.png); } .xinfo-ltqp-yl image { @@ -149,62 +176,56 @@ } .xinfo-ltqp-text { - position: absolute; - top: 28rpx; - left: 160rpx; color: rgba(79, 79, 79, 1); font-size: 14px; } .xinfo-yuying { - position: absolute; - top: 8rpx; - left: 40rpx; + margin: 0 40rpx; width: 70rpx !important; height: 70rpx !important; } .xinfo-close { position: absolute; - top: 22rpx; - right: -76rpx; + top: 20rpx; + right: -60rpx; color: #6c6c6c; } .xinfo-img { - position: absolute; - top: 600rpx; - padding: 60rpx 0 0 30rpx; - box-sizing: border-box; - width: 100%; + position: relative; + width: 480rpx; height: 682rpx; + margin: 40rpx 0 0 64rpx; display: flex; justify-content: center; } .xinfo-img-yl { - position: absolute; - top: 400rpx; - box-sizing: border-box; - width: 100%; + position: relative; + width: 480rpx; height: 682rpx; + margin: 40rpx 0 0 64rpx; display: flex; justify-content: center; } .xinfo-img-yl image { - width: 480rpx; - height: 550rpx; + width: 100%; + height: 100%; } .xinfo-img image { - width: 480rpx; - height: 550rpx; + width: 100%; + height: 100%; } .xinfo-img-close { + position: absolute; + top: 0; + right: -60rpx; color: #6c6c6c; - z-index: 1; } .bgt2-btn1 { @@ -221,6 +242,8 @@ justify-content: center; align-items: center; z-index: 1; + pointer-events: auto; + } .bgt2-btn1 image { @@ -242,6 +265,7 @@ justify-content: center; align-items: center; color: #fff; + pointer-events: auto; } .bgt2-btn3 { @@ -258,6 +282,7 @@ justify-content: center; align-items: center; color: #fff; + pointer-events: auto; } .bgt2-btn4 { @@ -275,6 +300,7 @@ display: flex; justify-content: center; align-items: center; + pointer-events: auto; } .bgt2-btn5 { @@ -292,6 +318,7 @@ display: flex; justify-content: center; align-items: center; + pointer-events: auto; } .bgt2-yz { @@ -302,9 +329,10 @@ height: 146rpx; background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/%E5%8D%B0%E7%AB%A0.png); background-size: cover; + pointer-events: auto; } -.taost, .sound { +.taost{ position: absolute; width: 100%; height: 100%; @@ -326,9 +354,12 @@ box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4); } -.closeSound { +.sound { + position: relative; width: 100%; - height: 40%; + height: 100%; + z-index: 9; + background-color: rgba(255, 255, 255, 0.9); } .sound-box { @@ -506,7 +537,6 @@ bottom: 0; width: 100%; height: 230rpx; - background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/bottom.png?q-sign-algorithm=sha1&q-ak=AKIDA26Gi2QT6eEFH9w1Ci79jJA6qhcjEj6PtTFNKg7m94uF8G9C09W87_G3j4xur0YP&q-sign-time=1686215079;1686218679&q-key-time=1686215079;1686218679&q-header-list=host&q-url-param-list=ci-process&q-signature=6770b3e91ac3eef3f4ccc1454d8a3a62f974a2ad&x-cos-security-token=liea1KCZaPvP7X7AVEMsUpo4E4n0UJsa215000c747614340a2e2c022d52647652gmo41jTDzQWkJ-8pNsYx46n3W1z9Nw4nnW4jYpNr6G83Ignhr68mAZMB7ui3jLNZe9HUwbfutXw758m6NvzPKwKHH_CLeWZs9epshc-cEGwMHqijiv6mQx7gHCdB5DEvYea29JaI3rbis13K6tUXyUQrP5V6l9KA20noFJkeTeWJ0gNWmp5uVA_9disJ2aq&ci-process=originImage); background-size: contain; } diff --git a/pages/home/xx/xz/xz.js b/pages/home/xx/xz/xz.js index cf4a227..6bc9d34 100644 --- a/pages/home/xx/xz/xz.js +++ b/pages/home/xx/xz/xz.js @@ -11,8 +11,8 @@ Page({ to:'', from:'', content:'', - img:'', - messageList:[], + audioList:[], // 音频列表 + imgList:[], // 图片列表 sound:'', soundTime:'00:00:00', duration: '', @@ -20,41 +20,24 @@ Page({ second:0, //秒 millisecond:0, //毫秒 showBtn:true, - showImg:false, - showLtqp:false, showImgBig:false, //图片太大弹层 showSoundMore:false, //语音太多提示 showSend:false, //寄出提示 Preview:false, //预览 showSound:false, showAlready:false, + showImgToast:false, + showImgToastBig:false, btn1:true, btn2:false, btn3:false, btn4:false, showSoundImg:true }, - writeLetters(){ - console.log('写信'); - this.setData({ - showImg:false, - showLtqp:false, - 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}) - const list = this.data.messageList + const list = [ ...this.data.audioList, ...this.data.imgList] list.push({ type: 'text', content: this.data.content @@ -87,36 +70,34 @@ Page({ closeShowSend(){ this.setData({showSend:false}) }, + closeShowImgToast(){this.setData({showImgToast: false})}, openPreview(){ console.log('预览'); this.setData({Preview:true}) - if(this.data.messageList.length){ - this.setData({showLtqp: true}) - } }, - ClearYl(){ + ClearYl(e){ console.log('清除语音'); - this.setData({showLtqp:false}) - const list = this.data.messageList.filter(item => { - item.type !== 'audio' + const id = e.currentTarget.dataset.id + const list = this.data.audioList.filter(item => { + return item.resourceId !== id }) - this.setData({messageList: list}) + this.setData({audioList: list}) }, - goBack(){ - console.log('返回'); - wx.navigateBack() - }, - ClearImg(){ + ClearImg(e){ console.log('清除图片'); - const list = this.data.messageList.filter(item => { - return item.type !== "graphic" - }) - this.setData({ - img:'', - messageList: list, - showImg: false + const id = e.currentTarget.dataset.id + const list = this.data.imgList.filter(item => { + return item.resourceId !== id }) - console.log(this.data.messageList); + this.setData({imgList: list}) + }, + goBack(){ + if (this.data.Preview) { + this.setData({Preview: false}) + }else{ + console.log('返回'); + wx.navigateBack() + } }, // 上传图片 addImg(){ @@ -132,6 +113,7 @@ Page({ } }) }, + // 文件上传 uploadFile(file,type) { wx.uploadFile({ url: 'https://xzjl-api.windymuse.cn/api/resource', @@ -149,38 +131,32 @@ Page({ console.log(data); if (data.data.type === 'audio') { console.log('添加音频'); - const list = this.data.messageList - const audio = this.data.messageList.filter(item => { - return item.type === 'audio' + const list = this.data.audioList + if(list.length >= 3){ + this.setData({showSoundMore:true ,showSoundImg:true}) + console.log('语音太多了'); + }else { + list.push({ + type: 'audio', + resourceId: data.data.id, + duration: this.data.duration, + extra: {duration : this.data.duration} }) - // 判断语音条数大于3条 - if(audio.length >= 3){ - this.setData({showSoundMore:true, showSoundImg:true}) + this.setData({audioList: list}) + } + } else if (data.data.type === 'poster') { + console.log('添加图片'); + const list = this.data.imgList + if (list.length >= 9) { + this.setData({showImgToast : true}) }else { list.push({ - type: 'audio', + type: 'graphic', resourceId: data.data.id, + img: data.data.abUrl, }) - this.setData({ - messageList: list, - showSoundImg: true - }) + this.setData({imgList: list, showImg:true}) } - console.log(this.data.messageList); - - } else if (data.data.type === 'poster') { - console.log('添加图片'); - const list = this.data.messageList - list.push({ - type: 'graphic', - resourceId: data.data.id - }) - this.setData({ - img:data.data.abUrl, - messageList:list, - showImg:true - }) - console.log(this.data.messageList); } }), fail(res) { @@ -278,23 +254,25 @@ Page({ this.setData({btn3: true ,btn4: false}) }, addSound(){ - console.log('添加录音'); - console.log(this.data.soundTime); - this.setData({duration: this.data.soundTime}) - // 上传语音 - this.uploadFile(this.data.videoSrc,'audio') - clearInterval(this.data.timeOut) - this.setData({ - btn1:true, - btn2:false, - btn3:false, - btn4:false, - showLtqp: true, - minute:0, - second:0, - millisecond:0, - soundTime:'00:00:00' - }) + if(this.data.btn3){ + console.log('添加录音'); + console.log(this.data.soundTime); + this.setData({duration: this.data.soundTime}) + // 上传语音 + this.uploadFile(this.data.videoSrc,'audio') + clearInterval(this.data.timeOut) + this.setData({ + btn1:true, + btn2:false, + btn3:false, + btn4:false, + showLtqp: true, + minute:0, + second:0, + millisecond:0, + soundTime:'00:00:00' + }) + } }, logout(){ req.deleteRequest('/api/user/logout',{}).then((res)=>{ @@ -307,9 +285,6 @@ Page({ }) } }) - // wx.showToast({ - // title: 'ok了', - // }) }, modify(){ this.setData({showAlready: false, showSend: false}) diff --git a/pages/home/xx/xz/xz.wxml b/pages/home/xx/xz/xz.wxml index 6c370bd..4eb21a9 100644 --- a/pages/home/xx/xz/xz.wxml +++ b/pages/home/xx/xz/xz.wxml @@ -1,34 +1,44 @@ - - To: {{to}} - - - From: {{from}} - - - - To: - + + + To: {{to}} + + + + + To: + + + + From: + + - - From: - + + + + + + + + {{item.duration}} + + + + + + + + + + + + From: {{from}} - - - - - - - - {{duration}} - - - - - @@ -51,7 +61,6 @@ - 取消 @@ -87,6 +96,14 @@ + + + 最多只能上传 + 9张图片 + 好的 + + + 确定要寄出吗? diff --git a/pages/home/xx/xz/xz.wxss b/pages/home/xx/xz/xz.wxss index c9eb88c..42be9e9 100644 --- a/pages/home/xx/xz/xz.wxss +++ b/pages/home/xx/xz/xz.wxss @@ -1,4 +1,9 @@ /* pages/home/xx/xz/xz.wxss */ +page { + height: 100%; + overflow: hidden; +} + .bgt1{ position: absolute; width: 690rpx; @@ -28,6 +33,7 @@ color:#9A9A9A; text-align: center; font-size: 27rpx; + pointer-events: none; } .xinfo{ @@ -44,12 +50,21 @@ border-radius: 6rpx; } +.xinfo-content { + width: 100%; + height: 100%; + padding-bottom: 300rpx; + overflow: auto; + position: relative; + pointer-events: auto; +} + .xinfo-title { width: 100%; height: 100rpx; margin-top: 60rpx; padding-left: 64rpx; - /* background-color: pink; */ + box-sizing: border-box; font-size: 28rpx; color: rgba(108, 108, 108, 1); } @@ -61,9 +76,11 @@ } .xinfo-yl-form { - position: absolute; - top: 980rpx; - right: 200rpx; + width: 100%; + text-align: end; + margin-top: 30rpx; + padding-right: 64rpx; + box-sizing: border-box; font-size: 32rpx; color: rgba(108, 108, 108, 1); } @@ -105,14 +122,19 @@ .xinfo-main { width: 100%; - height: 800rpx; - padding: 0 48rpx; + height: auto; + margin: 60rpx 0 32rpx 0; + padding: 0 64rpx; box-sizing: border-box; } +textarea { + height: none; +} + .xinfo-main .t-textarea { width: 100%; - height: 100%; + padding: 0; font-size: 28rpx; background-color: rgba(0, 0, 0, 0); } @@ -122,20 +144,25 @@ } .xinfo-ltqp { - position: absolute; - top: 470rpx; - left: 44rpx; - width: 384rpx; + position: relative; + width: 382rpx; height: 84rpx; - z-index: 9; + margin: 0 0 20rpx 64rpx; + display: flex; + align-items: center; + background-size: contain; + background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/ltqp.png); } .xinfo-ltqp-yl { - position: absolute; - top: 300rpx; - left: 44rpx; - width: 384rpx; + position: relative; + width: 382rpx; height: 84rpx; + margin: 0 0 20rpx 64rpx; + display: flex; + align-items: center; + background-size: contain; + background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/ltqp.png); } .xinfo-ltqp-yl image { @@ -149,62 +176,56 @@ } .xinfo-ltqp-text { - position: absolute; - top: 28rpx; - left: 160rpx; color: rgba(79, 79, 79, 1); font-size: 14px; } .xinfo-yuying { - position: absolute; - top: 8rpx; - left: 40rpx; + margin: 0 40rpx; width: 70rpx !important; height: 70rpx !important; } .xinfo-close { position: absolute; - top: 22rpx; - right: -76rpx; + top: 20rpx; + right: -60rpx; color: #6c6c6c; } .xinfo-img { - position: absolute; - top: 600rpx; - padding: 60rpx 0 0 30rpx; - box-sizing: border-box; - width: 100%; + position: relative; + width: 480rpx; height: 682rpx; + margin: 40rpx 0 0 64rpx; display: flex; justify-content: center; } .xinfo-img-yl { - position: absolute; - top: 400rpx; - box-sizing: border-box; - width: 100%; + position: relative; + width: 480rpx; height: 682rpx; + margin: 40rpx 0 0 64rpx; display: flex; justify-content: center; } .xinfo-img-yl image { - width: 480rpx; - height: 550rpx; + width: 100%; + height: 100%; } .xinfo-img image { - width: 480rpx; - height: 550rpx; + width: 100%; + height: 100%; } .xinfo-img-close { + position: absolute; + top: 0; + right: -60rpx; color: #6c6c6c; - z-index: 1; } .bgt2-btn1 { @@ -221,6 +242,8 @@ justify-content: center; align-items: center; z-index: 1; + pointer-events: auto; + } .bgt2-btn1 image { @@ -242,6 +265,7 @@ justify-content: center; align-items: center; color: #fff; + pointer-events: auto; } .bgt2-btn3 { @@ -258,6 +282,7 @@ justify-content: center; align-items: center; color: #fff; + pointer-events: auto; } .bgt2-btn4 { @@ -275,6 +300,7 @@ display: flex; justify-content: center; align-items: center; + pointer-events: auto; } .bgt2-btn5 { @@ -292,6 +318,7 @@ display: flex; justify-content: center; align-items: center; + pointer-events: auto; } .bgt2-yz { @@ -302,9 +329,10 @@ height: 146rpx; background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/%E5%8D%B0%E7%AB%A0.png); background-size: cover; + pointer-events: auto; } -.taost, .sound { +.taost{ position: absolute; width: 100%; height: 100%; @@ -326,9 +354,12 @@ box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4); } -.closeSound { +.sound { + position: relative; width: 100%; - height: 40%; + height: 100%; + z-index: 9; + background-color: rgba(255, 255, 255, 0.9); } .sound-box { @@ -506,7 +537,6 @@ bottom: 0; width: 100%; height: 230rpx; - background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/bottom.png?q-sign-algorithm=sha1&q-ak=AKIDA26Gi2QT6eEFH9w1Ci79jJA6qhcjEj6PtTFNKg7m94uF8G9C09W87_G3j4xur0YP&q-sign-time=1686215079;1686218679&q-key-time=1686215079;1686218679&q-header-list=host&q-url-param-list=ci-process&q-signature=6770b3e91ac3eef3f4ccc1454d8a3a62f974a2ad&x-cos-security-token=liea1KCZaPvP7X7AVEMsUpo4E4n0UJsa215000c747614340a2e2c022d52647652gmo41jTDzQWkJ-8pNsYx46n3W1z9Nw4nnW4jYpNr6G83Ignhr68mAZMB7ui3jLNZe9HUwbfutXw758m6NvzPKwKHH_CLeWZs9epshc-cEGwMHqijiv6mQx7gHCdB5DEvYea29JaI3rbis13K6tUXyUQrP5V6l9KA20noFJkeTeWJ0gNWmp5uVA_9disJ2aq&ci-process=originImage); background-size: contain; } diff --git a/pages/home/xy/index.js b/pages/home/xy/index.js index 238c6a3..c45497d 100644 --- a/pages/home/xy/index.js +++ b/pages/home/xy/index.js @@ -38,16 +38,16 @@ Page({ } if(res.data.data.horoscope){ this.setData({visible: true}) - const showVisible = setTimeout(() => { - this.setData({visible: false}) - clearTimeout(showVisible) - }, 1000) } }).catch((err)=>{ console.log(err); }) this.setData({xyInfo:wx.getStorageSync('nfc')}) }, + // 关闭运势提示 + closeYs(){ + this.setData({visible: !this.data.visible}) + }, /** * 生命周期函数--监听页面初次渲染完成 diff --git a/pages/home/xy/index.wxml b/pages/home/xy/index.wxml index 465ad8e..831f9de 100644 --- a/pages/home/xy/index.wxml +++ b/pages/home/xy/index.wxml @@ -1,7 +1,7 @@ - + @@ -19,7 +19,7 @@ - + {{userInfo.horoscope.summary}} 健康指数 diff --git a/pages/home/xyc/index.wxml b/pages/home/xyc/index.wxml index 73b61a8..c207e9f 100644 --- a/pages/home/xyc/index.wxml +++ b/pages/home/xyc/index.wxml @@ -80,40 +80,40 @@ 分享到 - + - 微信 - + 朋友圈 - + 微博 - - + + QQ - + QQ空间 - - + + 生成图片 diff --git a/pages/home/xyc/wdyw/wdyw.wxml b/pages/home/xyc/wdyw/wdyw.wxml index d17ca3e..06595c8 100644 --- a/pages/home/xyc/wdyw/wdyw.wxml +++ b/pages/home/xyc/wdyw/wdyw.wxml @@ -112,37 +112,37 @@ data-del="{{detail.id}}" 微信 - + 朋友圈 - + 微博 - + QQ - + QQ空间 - + 生成图片 diff --git a/pages/xz/index.js b/pages/xz/index.js index d5beaaf..16b9e32 100644 --- a/pages/xz/index.js +++ b/pages/xz/index.js @@ -12,7 +12,9 @@ Page({ letterMsg:{}, showLetter: true, showMore: false, - showDel:false + showDel:false, + imgList:[], + audioList:[] }, openLetter(){ this.setData({showLetter: !this.data.showLetter}), @@ -48,7 +50,7 @@ Page({ }else if(item.type === 'graphic') { this.getResource(id, item.resourceId, 'graphic') }else if(item.type === 'audio') { - this.getResource(id, item.resourceId, 'audio') + this.getResource(id, item.resourceId, 'audio',item.extra.duration) } }) }) @@ -56,32 +58,37 @@ Page({ getUserInfo(){ req.getRequest('/api/user/curt',{}).then(res => { const id = res.data.data.id - // console.log(res.data.data.id,'当前用户id'); this.getLetterMsg(id) }) }, // 获取文件 - getResource(id,k,type){ + getResource(id,k,type,time){ if(type === 'graphic'){ - this.setData({ + const list = this.data.imgList + list.push({ img: `https://xzjl-api.windymuse.cn/api/resource/${k}?k=${id}` }) + this.setData({ + imgList: list + }) }else if(type === 'audio'){ + const list = this.data.audioList + list.push({ + audio: `https://xzjl-api.windymuse.cn/api/resource/${k}?k=${id}`, + duration:time + }) this.setData({ - videos: `https://xzjl-api.windymuse.cn/api/resource/${k}?k=${id}` + audioList:list }) console.log(this.data.videos,'语音路径'); } }, // 播放录音 - playVideos(){ - console.log('播放录音'); - wx.playVoice({ - filePath: this.data.videos, - complete: () => { - console.log('录音播放结束'); - } - }); + playVideos(e){ + console.log(e.currentTarget.dataset.url.audio); + const innerAudioContext = wx.createInnerAudioContext() + innerAudioContext.src = e.currentTarget.dataset.url.audio + innerAudioContext.play() }, // 重置信札 resetLetter(){ diff --git a/pages/xz/index.json b/pages/xz/index.json index 3279322..ae66de5 100644 --- a/pages/xz/index.json +++ b/pages/xz/index.json @@ -1,5 +1,6 @@ { "usingComponents": { - "t-icon": "tdesign-miniprogram/icon/icon" + "t-icon": "tdesign-miniprogram/icon/icon", + "t-textarea": "tdesign-miniprogram/textarea/textarea" } } \ No newline at end of file diff --git a/pages/xz/index.wxml b/pages/xz/index.wxml index 89c67d3..452fc1f 100644 --- a/pages/xz/index.wxml +++ b/pages/xz/index.wxml @@ -23,17 +23,20 @@ To:{{letterMsg.to}} - {{content}} - + + + + - 2′24″ + {{item.duration}} - - + + Form:{{letterMsg.from}} {{time}} + @@ -42,7 +45,7 @@ - 烧毁 + 销毁 @@ -52,12 +55,11 @@ 确定要烧毁信件吗? - 烧毁后信件将彻底消失 + 销毁后信件将彻底消失 取消 确认 - \ No newline at end of file diff --git a/pages/xz/index.wxss b/pages/xz/index.wxss index bd8261a..1ffd775 100644 --- a/pages/xz/index.wxss +++ b/pages/xz/index.wxss @@ -1,3 +1,9 @@ +page { + width: 100%; + height: 100%; + overflow: hidden; +} + .already { position: absolute; width: 100%; @@ -14,15 +20,6 @@ background-size: cover; } -.already-bom { - position: absolute; - bottom: 0; - width: 100%; - height: 230rpx; - background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/bottom.png?q-sign-algorithm=sha1&q-ak=AKIDfvpcLTNuapJJHUt0Z2rbBMp4k2pff5pWzlB5o9--17jbvIhKwVSQfyquVN8nNxo8&q-sign-time=1686534496;1686538096&q-key-time=1686534496;1686538096&q-header-list=host&q-url-param-list=ci-process&q-signature=0b0d7bf20a2353114083673bdd497b5fd18d0a9f&x-cos-security-token=A0Hm0aVxi1d56hf0mChBZ7Edq8QG89uac5b83c45bef2b85a205521b986a97c6cQJmRBPRfeIpaoWvsyFmIxmdsaVt0UDGCkVi9Ydxb2ErOZqsBa_JJDPzxfBOZdg6Yj8M8FOqnsqp1Uy1UOt2o02Z6sW2LqFMMV4DxsAYO5xqjoTZ530uZhKuZ9jYMk_fc_VF9viosxMHtAR9nAFDUR0XfaNxiQABXw3xTSFDbF8K0BT9RI3X-Weotpg7BsqSnAlr5a5NuSk0Xi68873kz7A&ci-process=originImage); - background-size: cover; -} - .already-img { margin: 0 auto; width: 660rpx; @@ -90,9 +87,10 @@ margin: 0 auto; width: 616rpx; height: 1300rpx; - padding-top: 50rpx; + padding: 50rpx 0 200rpx 0; border-radius: 20rpx; box-sizing: border-box; + overflow: auto; box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4); } @@ -110,6 +108,13 @@ margin: 32rpx 50rpx; } +.xinfo-main .t-textarea { + width: 100%; + padding: 0; + font-size: 28rpx; + background-color: rgba(0, 0, 0, 0); +} + .xinfo-voice { width: 384rpx; height: 84rpx; @@ -166,6 +171,7 @@ width: 100%; height: 900rpx; background-size: cover; + pointer-events: none; background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xz/bgt2.png); } @@ -192,6 +198,7 @@ display: flex; justify-content: center; align-items: center; + pointer-events: auto; z-index: 1; } @@ -214,6 +221,7 @@ justify-content: center; align-items: center; z-index: 1; + pointer-events: auto; } .btm-img-more image { diff --git a/project.private.config.json b/project.private.config.json index 3016dc9..8c24072 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -10,7 +10,7 @@ "list": [ { "name": "", - "pathName": "pages/home/me/grzl/grzl", + "pathName": "pages/xz/index", "query": "", "launchMode": "default", "scene": null