main
Wkang921 2 years ago
parent 6ded150933
commit 81b001208a

@ -14,3 +14,8 @@
height: 0; height: 0;
color: transparent; color: transparent;
} }
page {
width: 100%;
height: 100%;
}

@ -40,6 +40,15 @@ Page({
userInfo:{} userInfo:{}
}, },
doLuYINBoF(e){ doLuYINBoF(e){
// 判断点击的是否为对方的语音
if(e.currentTarget.dataset.item){
const id = e.currentTarget.dataset.item.id
console.log(id);
// 改变语音状态
req.patchRequest(`/api/user/curt/message/${id}/read`,{}).then(res => {
console.log(res);
})
}
//先判断是开是关 //先判断是开是关
if(!e.currentTarget.dataset.bf){//此时点击为关闭 if(!e.currentTarget.dataset.bf){//此时点击为关闭
//设置当前状态为关闭,并关闭 //设置当前状态为关闭,并关闭
@ -380,6 +389,10 @@ Page({
this.setData({dkTpVisible:true}) this.setData({dkTpVisible:true})
console.log(e.currentTarget.dataset.tp) console.log(e.currentTarget.dataset.tp)
console.log('查看图片详情') console.log('查看图片详情')
const id = e.currentTarget.dataset.id
req.patchRequest(`/api/user/curt/message/${id}/read`,{}).then(res => {
console.log(res);
})
}, },
//bindtap="dKztDetial" data-xq="{{item}}" //bindtap="dKztDetial" data-xq="{{item}}"
dKztDetial(e){/**查看详情 */ dKztDetial(e){/**查看详情 */
@ -446,6 +459,21 @@ Page({
const minutes = date.getMinutes() const minutes = date.getMinutes()
item.createdAt = `${year}${month}${day}${hours}:${minutes}` item.createdAt = `${year}${month}${day}${hours}:${minutes}`
}) })
// 塞选出对方的消息
const noSelfList = list.filter(item => {
return !item.isSelf
})
// 文本和图片消息全都改为已读
noSelfList.forEach(item => {
if (item.type === 'text' && item.status === 'unread') {
console.log('发送请求');
req.patchRequest(`/api/user/curt/message/${item.id}/read`,{}).then(res => {
console.log(res);
})
}
})
this.setData({messages:list.reverse()}) this.setData({messages:list.reverse()})
} }
}).catch((err)=>{ }).catch((err)=>{
@ -572,6 +600,12 @@ Page({
onReady() { onReady() {
this.doQueryInit() this.doQueryInit()
this.doMessageInfo() this.doMessageInfo()
const time = setInterval(() => {
this.doMessageInfo()
console.log('1111');
}, 2000);
this.setData({time: time})
}, },
/** /**
@ -586,6 +620,7 @@ Page({
*/ */
onHide() { onHide() {
this.data.innerAudioContext.stop() this.data.innerAudioContext.stop()
clearInterval(this.data.time)
}, },
/** /**

@ -1,20 +1,31 @@
<!--pages/home/xx/lindex/lindex.wxml 星讯:非情侣页面--> <!--pages/home/xx/lindex/lindex.wxml 星讯:非情侣页面-->
<view catchtap="allTap"> <view catchtap="allTap" class="allTap">
<!-- 头部导航 -->
<view class="allTap-header">
<view class="hybtn" bindtap="go2Huiyi">回忆</view>
<view class="reback" bindtap="go2Reback"></view>
<view class="title">星讯</view>
</view>
<!--聊天内容-可以滑动--> <!--聊天内容-可以滑动-->
<view class="ltinfo"> <view class="ltinfo">
<!--聊天页头部:粉色那一部分--> <!--聊天页头部:粉色那一部分-->
<view class="bkgfs" id="button"> <view class="bkgfs" id="button">
<view class="bkgfstxt">
欢迎来到你们的专属情侣树洞
在这里你可以将你的心意传递给ta
所有美好的回忆都将被精灵记录
</view>
</view>
<!--最上方的两个头像--> <!--最上方的两个头像-->
<view class="bkgfs-img">
<t-image class="txl" shape="circle" src="{{userInfo.avatar}}"></t-image><!--当前用户头像--> <t-image class="txl" shape="circle" src="{{userInfo.avatar}}"></t-image><!--当前用户头像-->
<view class="bkgfs-img-middle" />
<t-image class="txr" shape="circle" src="{{loverInfo.avatar}}"></t-image><!--当前用户头像--> <t-image class="txr" shape="circle" src="{{loverInfo.avatar}}"></t-image><!--当前用户头像-->
<!--头像中间的连接图--> </view>
<view class="qlzjt"></view>
<view class="bkgfstxt">
<view class="txt"> 欢迎来到你们的专属情侣树洞</view>
<view class="txt"> 在这里你可以将你的心意传递给ta</view>
<view class="txt"> 所有美好的回忆都将被精灵记录</view>
</view>
</view>
<!--聊天内容部分--> <!--聊天内容部分-->
<view class="ltxinxi"> <view class="ltxinxi">
@ -102,54 +113,76 @@
src="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}" src="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}"
class="zjxftp3" mode="heightFix" class="zjxftp3" mode="heightFix"
bindtap="go2SeeHxDetail" bindtap="go2SeeHxDetail"
data-id="{{item.id}}"
data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}" data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}"
></t-image> ></t-image>
<view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view> <view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view>
</view> </view>
</view> </view>
<!-- 文本内容 -->
<view wx:if="{{item.type=='text'}}" class="zjtableatp2">
<view class="zttp12" wx:if="{{item.type=='text'}}">
<t-image src="{{loverInfo.avatar}}" class="wchattxk11" shape="circle" ></t-image><!--对方的的头像框-->
<view bindtap="dKztDetial" data-xq="{{item}}" class="dftext"wx:if="{{item.type=='text'}}">
<view class="xjtext">{{item.content}}</view>
</view>
<view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view>
</view>
</view>
<t-image <!-- 音频内容 -->
wx:if="{{item.type!='graphic'}}" <view wx:if="{{item.type=='audio'}}" class="zjtableatp2">
src="{{loverInfo.avatar}}" <view class="zttp12" wx:if="{{item.type=='audio'}}">
class="wchattxk1" <t-image src="{{loverInfo.avatar}}" class="wchattxk11" shape="circle" ></t-image><!--对方的的头像框-->
shape="circle"
></t-image><!--对方的的头像框-->
<!--图片-->
<!--信件-->
<view class="dfxf" wx:if="{{item.type=='xj'}}"></view>
<view class="dfxfydwd" wx:if="{{item.type=='xj'}}">{{item.status=='unread'?'未读':'已读'}}</view>
<!--文本-->
<view <view
bindtap="dKztDetial" data-bf="{{!item.extra.isBf}}"
data-xq="{{item}}" class="zjypk1" wx:if="{{!item.extra.isBf}}"
class="dftext" data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}"
wx:if="{{item.type=='text'}}" data-index="{{index}}"
bindtap="doLuYINBoF"
data-item="{{item}}"
> >
<view class="xjtext">{{item.content}}</view> <view class="zjypt1"></view>
<view class="zjypwz1">{{item.extra.ssec}}</view>
</view>
<view
data-bf="{{!item.extra.isBf}}"
class="zjypk1" wx:if="{{item.extra.isBf}}"
data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}"
data-index="{{index}}"
bindtap="doLuYINBoF"
data-item="{{item}}"
>
<view class="zjypt11">
<view class="box2" style="float: left; height: 60rpx; width: 1000px;">
<image wx:for="{{xhCstP}}" wx:key="index" style="height: 60rpx;width: 60rpx;"
src="https://oss.wish.ydxxkj.top/xy/yppic.png" mode=""/>
</view>
</view>
<view class="zjypwz1">{{item.extra.ssec}}</view>
</view>
<view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view>
</view>
</view> </view>
<view class="dftextwd" wx:if="{{item.type=='text'}}">{{item.status=='unread'?'未读':'已读'}}</view>
<!--音频--> <!-- 信件内容 -->
<view class="dfaudio" wx:if="{{item.type=='audio'}}"> <view wx:if="{{item.type=='xj'}}" class="zjtableatp2">
<view class="dfaudiologo"></view> <view class="zttp12" wx:if="{{item.type=='xj'}}">
<view class="dfaudiologotxt">2222</view></view> <t-image src="{{loverInfo.avatar}}" class="wchattxk11" shape="circle" ></t-image><!--对方的的头像框-->
<view class="dftextwd" wx:if="{{item.type=='audio'}}">{{item.status=='unread'?'未读':'已读'}}</view> <view class="dfxf" wx:if="{{item.type=='xj'}}"></view>
<view class="dfxfydwd" wx:if="{{item.type=='xj'}}">{{item.status=='unread'?'未读':'已读'}}</view>
<view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view>
</view>
</view> </view>
</view> </view>
</view>
<view class="cqlgd"></view> <view class="cqlgd"></view>
</view> </view>
</view> </view>
<view class="hybtn" bindtap="go2Huiyi">回忆</view>
<view class="h1"></view>
<!--返回图标-->
<view class="reback" bindtap="go2Reback"></view>
<view class="title">星讯</view>
</view> </view>
<!--星讯聊天下方菜单栏--> <!--星讯聊天下方菜单栏-->
<view class="xfgjl" wx:if="{{hasLover}}"> <view class="xfgjl" wx:if="{{hasLover}}">
@ -176,11 +209,12 @@
</t-popup> </t-popup>
<t-popup visible="{{dkTpVisible}}" placement="top" class="ztPop1"> <t-popup visible="{{dkTpVisible}}" placement="top" class="ztPop1">
<view class="ztPop1-header">
<t-image src="{{imgPicUrl}}" mode="widthFix" class="tppp1"></t-image>
<!--返回图标-->
<view class="reback" bindtap="go2Reback1"></view> <view class="reback" bindtap="go2Reback1"></view>
<view class="title">画像</view> <view class="title">画像</view>
</view>
<t-image src="{{imgPicUrl}}" mode="widthFix" class="tppp1"></t-image>
<!--返回图标-->
<view class="tpBcan1" bindtap="go2BcPic">保存</view> <view class="tpBcan1" bindtap="go2BcPic">保存</view>
</t-popup> </t-popup>

@ -1,55 +1,150 @@
/* pages/home/xx/lindex/lindex.wxss */ /* pages/home/xx/lindex/lindex.wxss */
/* pages/home/xx/index.wxss */ /* pages/home/xx/index.wxss */
/* pages/home/xyc/wdyw/wdyw.wxss */ /* pages/home/xyc/wdyw/wdyw.wxss */
.reback{
.allTap {
position: relative;
width: 100%;
height: 100%;
}
.allTap-header {
position: fixed; position: fixed;
margin-left: 20rpx; top: 0;
margin-top:108rpx; width: 100%;
height: 166rpx;
padding-bottom: 20rpx;
box-sizing: border-box;
display: flex;
align-items: flex-end;
justify-content: center;
z-index: 1;
background-color: #fff;
}
.reback{
width:48rpx; width:48rpx;
height:48rpx; height:48rpx;
position: absolute;
left: 20rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/reback.png); background-image: url(https://oss.wish.ydxxkj.top/xy/reback.png);
} }
.title{ .title{
position: fixed;
left: 278rpx;
top: 108rpx;
width: 196rpx; width: 196rpx;
height: 48rpx; height: 48rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 32rpx; font-size: 32rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-regular;
} }
.hybtn{
position: fixed;
left: 0;
top: 210rpx;
width: 166rpx;
height: 70rpx;
line-height: 70rpx;
opacity: 0.7;
border-radius: 0px 20rpx 20rpx 0px;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
text-align: center;
box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
color: rgba(255, 255, 255, 1);
font-size: 28rpx;
text-align: center;
}
.ltinfo{
width: 100%;
margin-top: 224rpx;
}
.bkgfs{ .bkgfs{
position: absolute; position: relative;
left: 96rpx; width: 100%;
top: 70rpx; display: flex;
width: 558rpx; justify-content: center;
height: 256rpx; align-items: center;
flex-direction: column;
line-height: 40rpx; line-height: 40rpx;
border-radius: 30rpx; border-radius: 30rpx;
background-color: rgba(253, 190, 196, 1);
text-align: center; text-align: center;
} }
.bkg{ .bkgfs-img {
position: absolute; position: absolute;
width: 691.33rpx; top: 28rpx;
height: 1326rpx; width: 100%;
display: flex; display: flex;
flex-direction: column; justify-content: center;
background-repeat: no-repeat; align-items: center;
background-size:100% 100%; }
margin-left:29.33rpx;
margin-top: 98rpx; .bkgfs-img-middle {
background-image: url(https://oss.wish.ydxxkj.top/xy/bkg.png); width: 60rpx;
color:#9A9A9A; height: 32rpx;
margin: 0 30rpx;
background-size: contain;
background-image: url(https://oss.wish.ydxxkj.top/xy/qlzjt.png);
}
.bkgfstxt{
width: 560rpx;
height: 256rpx;
margin-top: 56rpx;
line-height: 20px;
border-radius: 30rpx;
color: #fff;
font-size: 28rpx;
text-align: center; text-align: center;
font-size: 27rpx; padding: 74rpx 56rpx 0 56rpx;
box-sizing: border-box;
background-color: rgba(253, 190, 196, 1);
}
.bkgfstxt .txt {
margin-bottom: 14rpx;
} }
.txl{
width: 80rpx;
height: 80rpx;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
}
.txr{
width: 80rpx;
height: 80rpx;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
}
.ltxinxi{
width: 100%;
}
.wchatfor{
width: 100%;
padding: 0 64rpx;
box-sizing: border-box;
}
.wchattime{
width: 100%;
margin-top: 32rpx;
color: rgba(153, 153, 153, 1);
font-size: 24rpx;
text-align: center;
}
.xzt{ .xzt{
position: absolute; position: absolute;
width: 398rpx; width: 398rpx;
@ -130,24 +225,6 @@
font-size: 27rpx; font-size: 27rpx;
} }
.hybtn{
position: fixed;
left: 0px;
top: 104px;
width: 83px;
height: 35px;
line-height: 70rpx;
opacity: 0.7;
border-radius: 0px 10px 10px 0px;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
color: rgba(255, 255, 255, 1);
font-size: 14px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.xfgjl{ .xfgjl{
position: fixed; position: fixed;
bottom: 30rpx; bottom: 30rpx;
@ -158,58 +235,6 @@ font-family: SourceHanSansSC-regular;
justify-content: space-evenly; justify-content: space-evenly;
} }
.ltinfo{
position: absolute;
width: 750rpx;
height: 2000rpx;
margin-top:200rpx;
}
.h1{
position: fixed;
left: 0px;
width: 375px;
height: 88px;
line-height: 20px;
background-color: rgba(255, 255, 255, 1);
text-align: center;
}
.txl{
position: absolute;
left: 244rpx;
top: 30rpx;
width: 72rpx;
height: 72rpx;
}
.txr{
position: absolute;
top: 30rpx;
left:434rpx;
width: 72rpx;
height: 72rpx;
}
.qlzjt{
position: absolute;
left: 346rpx;
top: 50rpx;
width: 60rpx;
height: 32rpx;
background-image: url(https://oss.wish.ydxxkj.top/xy/qlzjt.png);
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
}
.bkgfstxt{
position: absolute;
left: 56rpx;
top: 74rpx;
width: 446rpx;
height: 146rpx;
color: rgba(255, 255, 255, 1);
font-size: 28rpx;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.xxqlcd{ .xxqlcd{
/* position: absolute; */ /* position: absolute; */
/* top: 32rpx; */ /* top: 32rpx; */
@ -241,23 +266,7 @@ text-align: center;
left: 299px; left: 299px;
} }
.ltxinxi{
position: absolute;
margin-top:360rpx;
width: 750rpx;
}
.wchatfor{
width: 750rpx;
padding: 0 64rpx;
box-sizing: border-box;
}
.wchattime{
width: 750rpx;
margin-top: 32rpx;
color: rgba(153, 153, 153, 1);
font-size: 24rpx;
text-align: center;
}
.wchattxk{ .wchattxk{
display: inline-block; display: inline-block;
margin-left: 317px; margin-left: 317px;
@ -591,7 +600,7 @@ background-image: url(https://oss.wish.ydxxkj.top/xy/xtreturn.png);
.zjtableatp2{ .zjtableatp2{
width: 100%; width: 100%;
height: 220rpx; height: 150rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
@ -645,7 +654,8 @@ background-image: url(https://oss.wish.ydxxkj.top/xy/xtreturn.png);
} }
.zttp12{ .zttp12{
height: 200rpx; width: 100%;
height: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
} }
@ -655,14 +665,17 @@ background-image: url(https://oss.wish.ydxxkj.top/xy/xtreturn.png);
align-items: flex-end; align-items: flex-end;
color: rgba(206, 206, 206, 1); color: rgba(206, 206, 206, 1);
font-size: 24rpx; font-size: 24rpx;
margin: 0 0 60rpx 10rpx;
} }
.zjxftp3{ .zjxftp3{
height: 200rpx; height: 200rpx;
max-width: 480rpx; max-width: 480rpx;
} }
.wchattxk11{ .wchattxk11{
width: 72rpx; width: 84rpx;
height: 72rpx; height: 84rpx;
margin-right: 24rpx;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
} }
.tppp1{ .tppp1{
@ -673,7 +686,7 @@ background-image: url(https://oss.wish.ydxxkj.top/xy/xtreturn.png);
margin-top: 300rpx; margin-top: 300rpx;
} }
.ztPop1{ .ztPop1{
position: absolute; position: relative;
width: 750rpx ; width: 750rpx ;
height: 1624rpx; height: 1624rpx;
margin: 0!important; margin: 0!important;
@ -681,20 +694,31 @@ background-image: url(https://oss.wish.ydxxkj.top/xy/xtreturn.png);
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
} }
.ztPop1-header {
width: 100%;
margin-top: 88rpx;
padding: 20rpx;
box-sizing: border-box;
display: flex;
justify-content: center;
}
.tpBcan1{ .tpBcan1{
position: absolute; position: absolute;
left: 304px; top: 1400rpx;
top: 727px; right: 32rpx;
width: 55px; width: 110rpx;
height: 35px; height: 70rpx;
line-height: 70rpx; line-height: 70rpx;
border-radius: 10px; border-radius: 20rpx;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%); background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
text-align: center; text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1); border: 3px solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
font-size: 14px; font-size: 28rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-medium; font-family: SourceHanSansSC-medium;
} }
@ -721,13 +745,6 @@ top: 727px;
height: 116rpx; height: 116rpx;
} }
.title {
flex: 1;
text-align: center;
font-weight: 600;
font-size: 36rpx;
}
.btn { .btn {
font-size: 32rpx; font-size: 32rpx;
padding: 32rpx; padding: 32rpx;

@ -32,7 +32,8 @@ Page({
btn2:false, btn2:false,
btn3:false, btn3:false,
btn4:false, btn4:false,
showSoundImg:true showSoundImg:true,
isPlaying: false, // 是否正在播放语音
}, },
already(){ already(){
console.log('确定寄出'); console.log('确定寄出');
@ -309,6 +310,9 @@ Page({
}, },
// 点击音频试听 // 点击音频试听
listen(e){ listen(e){
if (this.data.isPlaying) {
return; // 如果正在播放语音,则不触发事件
}
const id = e.currentTarget.dataset.url.resourceId const id = e.currentTarget.dataset.url.resourceId
const videoSrc = this.data.audioList.find(item => { const videoSrc = this.data.audioList.find(item => {
return item.resourceId === id return item.resourceId === id
@ -317,6 +321,10 @@ Page({
const innerAudioContext = wx.createInnerAudioContext() const innerAudioContext = wx.createInnerAudioContext()
innerAudioContext.src = videoSrc innerAudioContext.src = videoSrc
innerAudioContext.play() // 播放 innerAudioContext.play() // 播放
this.setData({ isPlaying: true }); // 设置为正在播放语音
innerAudioContext.onEnded(() => {
this.setData({ isPlaying: false }); // 播放完毕后设置为非播放状态
});
}, },
getUserInfo(){ getUserInfo(){
req.getRequest('/api/user/curt',{}).then(res => { req.getRequest('/api/user/curt',{}).then(res => {

@ -32,7 +32,8 @@ Page({
btn2:false, btn2:false,
btn3:false, btn3:false,
btn4:false, btn4:false,
showSoundImg:true showSoundImg:true,
isPlaying: false, // 是否正在播放语音
}, },
already(){ already(){
console.log('确定寄出'); console.log('确定寄出');
@ -309,6 +310,9 @@ Page({
}, },
// 点击音频试听 // 点击音频试听
listen(e){ listen(e){
if (this.data.isPlaying) {
return; // 如果正在播放语音,则不触发事件
}
const id = e.currentTarget.dataset.url.resourceId const id = e.currentTarget.dataset.url.resourceId
const videoSrc = this.data.audioList.find(item => { const videoSrc = this.data.audioList.find(item => {
return item.resourceId === id return item.resourceId === id
@ -317,6 +321,11 @@ Page({
const innerAudioContext = wx.createInnerAudioContext() const innerAudioContext = wx.createInnerAudioContext()
innerAudioContext.src = videoSrc innerAudioContext.src = videoSrc
innerAudioContext.play() // 播放 innerAudioContext.play() // 播放
console.log('播放');
this.setData({ isPlaying: true }); // 设置为正在播放语音
innerAudioContext.onEnded(() => {
this.setData({ isPlaying: false }); // 播放完毕后设置为非播放状态
});
}, },
getUserInfo(){ getUserInfo(){
req.getRequest('/api/user/curt',{}).then(res => { req.getRequest('/api/user/curt',{}).then(res => {

@ -68,13 +68,9 @@ Page({
}, },
success: async res => { success: async res => {
let data = JSON.parse(res.data); let data = JSON.parse(res.data);
console.log(data, '111111');
if (data.code == 200) { if (data.code == 200) {
this.setData({imgUrl:data.data.abUrl}) this.setData({imgUrl:data.data.abUrl})
console.log('打印1111')
console.log(this.data.imgUrl)
res.data = JSON.parse(res.data); res.data = JSON.parse(res.data);
console.log(res.data);
if (res.data.code == 1) { if (res.data.code == 1) {
console.log(res.data.data.url); console.log(res.data.data.url);
this.img = this.baseUrl + res.data.data.url; this.img = this.baseUrl + res.data.data.url;
@ -102,7 +98,6 @@ Page({
}, },
doXzTime(){ doXzTime(){
this.setData({ cvisible: true }); this.setData({ cvisible: true });
console.log('执行选择时间')
}, },
// 显示提示 // 显示提示
showToast(){ showToast(){
@ -183,6 +178,7 @@ Page({
showDetail:true, showDetail:true,
item:res.data.data item:res.data.data
}) })
wx.hideTabBar()
},2000) },2000)
}else{ }else{
console.log('额外情况') console.log('额外情况')
@ -226,12 +222,14 @@ Page({
this.setData({ this.setData({
showDetail: false showDetail: false
}) })
wx.showTabBar()
}, },
// 分享 // 分享
openShare(){ openShare(event){
this.setData({ this.setData({
shareVisible:!this.data.shareVisible shareVisible:!this.data.shareVisible
}) })
wx.hideTabBar()
}, },
shareQQ(){ shareQQ(){
console.log('分享到qq') console.log('分享到qq')

@ -22,7 +22,6 @@
<view class="xylj">许愿链接</view> <view class="xylj">许愿链接</view>
<view class="xytp">许愿图片</view> <view class="xytp">许愿图片</view>
<t-textarea class="xynrf" model:value="{{xyContent}}" t-class="external-class" placeholder="内容限制30个字" /> <t-textarea class="xynrf" model:value="{{xyContent}}" t-class="external-class" placeholder="内容限制30个字" />
<!-- <t-textarea class="qwsjt" placeholder="请选择到期时间" bindtap="doXzTime" value="{{note}}" disabled /> -->
<t-input <t-input
class="qwsjt" class="qwsjt"
placeholder="请选择到期时间" placeholder="请选择到期时间"
@ -34,10 +33,8 @@
<t-input <t-input
class="xyljt" class="xyljt"
placeholder="愿望链接(可不填)" placeholder="愿望链接(可不填)"
bindtap="doXzTime"
model:value="{{xyLink}}" model:value="{{xyLink}}"
/> />
<!-- <t-textarea class="xyljt" placeholder="愿望链接(可不填)" /> -->
<view > <view >
<t-upload class="xytpt" <t-upload class="xytpt"
@ -70,25 +67,28 @@
</view> </view>
<!--愿望详情--> <!--愿望详情-->
<view wx:if="{{showDetail}}"> <view wx:if="{{showDetail}}" class="wishdetail-box">
<view class="wishdetail" bindtap="closeDetail"></view> <view class="wishdetail">
<view class="popbox"></view>
<t-image class="yximg" src="{{item.img}}"></t-image> <view class="popbox" bindtap="closeDetail">
<t-image src="https://oss.wish.ydxxkj.top/xy/jt.gif"/>
<view class="yximg"><t-image src="{{item.img}}"></t-image></view>
<view class="ywwz2">愿望</view> <view class="ywwz2">愿望</view>
<view class="ywxq2">{{item.content}}</view> <view class="ywxq2">{{item.content}}</view>
<view class="qwsj2">期望时间</view> <view class="qwsj2">期望时间</view>
<view class="qwsjtxt2">{{item.deadline}}</view> <view class="qwsjtxt2">{{item.deadline}}</view>
<view class="anwz1" bindtap="openShare"> </view>
<view class="anwz1-tb">
<view class="anwz1">
<view class="anwz1-tb" bindtap="openShare">
<t-image class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lfc.png"></t-image> <t-image class="anzmlogo1" src="https://oss.wish.ydxxkj.top/xy/lfc.png"></t-image>
</view> </view>
<view class="anwztxt1">分享</view> <view class="anwztxt1">分享</view>
</view> </view>
</view>
<!-- 分享 --> <!-- 分享 -->
<t-popup visible="{{shareVisible}}" placement="bottom"> <!-- <t-popup placement="bottom"> -->
<view class="popup-main"> <view class="popup-main" wx:if="{{shareVisible}}">
<view class="main-top"> <view class="main-top">
<view></view> <view></view>
<view class="text">分享到</view> <view class="text">分享到</view>
@ -97,7 +97,7 @@
<view class="main-box"> <view class="main-box">
<view class="box-item"> <view class="box-item">
<button open-type="share" class="item-icon" bindtap="shareWx"> <button open-type="share" class="item-icon" bindtap="shareWx">
<t-image src="https://oss.wish.ydxxkj.top/xy/lfc.png"></t-image> <t-image src="https://oss.wish.ydxxkj.top/xy/antFill-wx.png"></t-image>
</button> </button>
<view class="item-text">微信</view> <view class="item-text">微信</view>
</view> </view>
@ -133,4 +133,7 @@
</view> </view>
</view> </view>
</view> </view>
</t-popup> <!-- </t-popup> -->
</view>
</view>

@ -404,82 +404,81 @@ font-family: SourceHanSansSC-medium;
} }
/* 许愿成功回显 */ /* 许愿成功回显 */
.wishdetail{ .wishdetail-box {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: rgba(255, 255, 255, 0.7); }
.wishdetail{
position: relative;
width:100%;
height:100%;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
background-color: rgba(255, 255, 255, 0.9);
} }
.popbox{ .popbox{
position: absolute;
left: 66rpx;
top: 206rpx;
width: 620rpx; width: 620rpx;
height: 1080rpx; height: 1080rpx;
display: flex;
align-items: center;
flex-direction: column;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://oss.wish.ydxxkj.top/xy/detailbkg.png); background-image: url(https://oss.wish.ydxxkj.top/xy/detailbkg.png);
} }
.popbox .t-image {
width: 70rpx;
height: 70rpx;
margin-top: 20rpx;
}
.yximg{ .yximg{
position: absolute;
left: 146rpx;
top: 330rpx;
width: 460rpx; width: 460rpx;
height: 308rpx; height: 308rpx;
border-radius: 10px; margin-top: 74rpx;
border-radius: 20rpx;
overflow: hidden;
background-color: #767686; background-color: #767686;
} }
.yximg .t-image {
width: 100%;
height: 100%;
margin: 0;
}
.ywwz2{ .ywwz2{
position: absolute; margin-top: 78rpx;
left: 328rpx;
top: 706rpx;
/* width: 96rpx; */
height: 66rpx;
color: rgba(248, 99, 42, 1); color: rgba(248, 99, 42, 1);
font-size: 24px; font-size: 48rpx;
text-align: left; font-weight: 700;
font-family: SourceHanSansSC-bold;
} }
.ywxq2{ .ywxq2{
position: absolute; margin-top: 40rpx;
left: 182rpx;
top: 798rpx;
width: 388rpx;
height: 150rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 18px; font-size: 36rpx;
text-align: center;
font-family: SourceHanSansSC-regular;
} }
.qwsj2{ .qwsj2{
position: absolute; margin-top: 100rpx;
left: 280rpx; font-weight: 700;
top: 980rpx;
/* width: 192rpx; */
height: 66rpx;
color: rgba(248, 99, 42, 1); color: rgba(248, 99, 42, 1);
font-size: 24px; font-size: 48rpx;
text-align: center;
font-family: SourceHanSansSC-regular;
} }
.qwsjtxt2{ .qwsjtxt2{
position: absolute; margin-top: 40rpx;
left: 250rpx;
top: 1072rpx;
width: 254rpx;
height: 50rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 18px; font-size: 36rpx;
text-align: center;
font-family: SourceHanSansSC-regular;
} }
.anwz1 { .anwz1 {
position: absolute; width: 100%;
bottom: 0; margin-top: 42rpx;
margin-left: 315rpx;
} }
.anwz1 .anwz1-tb { .anwz1 .anwz1-tb {
@ -506,8 +505,8 @@ font-family: SourceHanSansSC-medium;
} }
.anwz1 .anzmlogo1 { .anwz1 .anzmlogo1 {
width: 100rpx; width: 80rpx;
height: 100rpx; height: 80rpx;
} }
.xyctoast { .xyctoast {
@ -530,6 +529,9 @@ font-family: SourceHanSansSC-medium;
} }
.popup-main { .popup-main {
position: absolute;
bottom: 0;
width: 100%;
height: 462rpx; height: 462rpx;
margin-bottom: 68rpx; margin-bottom: 68rpx;
background-color: #fff; background-color: #fff;
@ -556,7 +558,7 @@ font-family: SourceHanSansSC-medium;
.popup-main .main-box { .popup-main .main-box {
height: 100%; height: 100%;
padding-top:70rpx; padding-top:56rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;

@ -120,14 +120,12 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide() {
}, },
/** /**

@ -47,5 +47,5 @@
"ignore": [], "ignore": [],
"include": [] "include": []
}, },
"appid": "wxa0d7db44777041f7" "appid": "wx810346b5136c83ef"
} }

@ -1,6 +1,6 @@
{ {
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "xzjl-ui", "projectname": "xzjl-ui%202",
"setting": { "setting": {
"compileHotReLoad": true, "compileHotReLoad": true,
"urlCheck": false "urlCheck": false
@ -10,14 +10,14 @@
"list": [ "list": [
{ {
"name": "", "name": "",
"pathName": "pages/home/jl/index", "pathName": "pages/home/xx/lindex/lindex",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
}, },
{ {
"name": "", "name": "",
"pathName": "pages/home/xx/lindex/lindex", "pathName": "pages/home/xx/lindex/lxz/lxz",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null

Loading…
Cancel
Save