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}}枚
-
+