wk-dev
Wkang921 2 years ago
parent c1858b810b
commit 4284fee34e

@ -17,6 +17,7 @@ Page({
minute:0, minute:0,
minutes:0, minutes:0,
pickerValue: [0, 0], pickerValue: [0, 0],
swiperIndex: 0,
prayTime:0, //祈祷时间 prayTime:0, //祈祷时间
prayTimeStr: '选择祈祷时长' , prayTimeStr: '选择祈祷时长' ,
prayerContent:'', //祈祷内容 prayerContent:'', //祈祷内容
@ -284,6 +285,12 @@ Page({
}, },
btnOK(){ btnOK(){
const prayerEnergy = (this.data.pickerValue[0]*60 + this.data.pickerValue[1])/6 const prayerEnergy = (this.data.pickerValue[0]*60 + this.data.pickerValue[1])/6
if(this.data.pickerValue[0] === 0 && this.data.pickerValue[1] <= 5){
wx.showToast({
title: '祈祷时间不能小于五分钟',
icon: 'none'
})
}
if(this.data.userInfo.crystallineEnergy < 1){ if(this.data.userInfo.crystallineEnergy < 1){
return Toast({ return Toast({
context: this, context: this,
@ -342,7 +349,20 @@ Page({
}) })
}, },
btnShare(){ btnShare(){
console.log('赠送能量'); if (this.data.loverInfo.crystallineEnergy === 100) {
return this.setData({
showEnergy:!this.data.showEnergy,
showEnergyToast:!this.data.showEnergyToast,
toast: '对方能量已经满啦~'
})
}
if (this.data.userInfo.crystallineEnergy === 0) {
return this.setData({
showEnergy:!this.data.showEnergy,
showEnergyToast:!this.data.showEnergyToast,
toast: '你剩余的能量不足~'
})
}
req.patchRequest('/api/user/curt/give-crystalline-energy-to-lover',{}).then((res)=>{ req.patchRequest('/api/user/curt/give-crystalline-energy-to-lover',{}).then((res)=>{
console.log(res); console.log(res);
if(res.data.code === 200){ if(res.data.code === 200){
@ -357,12 +377,13 @@ Page({
showEnergySuccess:!this.data.showEnergySuccess, showEnergySuccess:!this.data.showEnergySuccess,
}) })
},2000) },2000)
}else if(res.data.code === 500){
return this.setData({
showEnergy:!this.data.showEnergy,
showEnergyToast:!this.data.showEnergyToast,
toast: '对方能量已经满啦~'
})
} }
this.setData({
showEnergy:!this.data.showEnergy,
showEnergyToast:!this.data.showEnergyToast,
toast:res.data.msg
})
}).catch((err)=>{ }).catch((err)=>{
console.log('111'); console.log('111');
this.setData({ this.setData({
@ -372,6 +393,25 @@ Page({
}) })
}, },
// 切换轮播图
goLeftSwiper(){
if (this.data.swiperIndex === 0) {
this.setData({swiperIndex: 2})
}else {
this.setData({swiperIndex: this.data.swiperIndex - 1})
}
},
goRightSwiper(){
if (this.data.swiperIndex === 2){
this.setData({swiperIndex: 0})
}else {
this.setData({swiperIndex: this.data.swiperIndex + 1})
}
},
swiperChange(e){
this.setData({swiperIndex: e.detail.current})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
@ -429,15 +469,7 @@ Page({
}, },
ToastDialog(e) { ToastDialog(e) {
const { item } = e.currentTarget.dataset; this.setData({ visible: !this.data.visible });
this.setData(
{
},
() => {
this.setData({ visible: true });
},
);
} }
, ,
onVisibleChange(e) { onVisibleChange(e) {

@ -1,111 +1,6 @@
<swiper class="call" bindtap="closeEnergy"> <swiper class="call" bindtap="closeEnergy" current="{{swiperIndex}}" circular bindchange="swiperChange">
<t-toast id="t-toast" /> <t-toast id="t-toast" />
<!--单人页面-->
<swiper-item class="call1">
<!--头像名字-->
<view class="call1-header">
<image class="tx" src="{{userInfo.avatar ? userInfo.avatar : elfAvatar}}"></image>
<view class="txtext">{{userInfo.nick ? userInfo.nick : userInfo.constellation}}</view>
</view>
<!-- 精灵图片 -->
<view class="bkg1">
<view class="bkg2">
<view class="bkg3">
<view class="bkg4">
<view class="bkg5">
<view class="xxt" bindtap="ShowOrNotLogo">
<image mode="heightFix" src="{{xingxiangtu[userInfo.spriteType]}}"></image>
</view>
</view>
</view>
</view>
</view>
<view class="gh"></view>
</view>
<!-- 底部图标 -->
<view class="call1-btn">
<!--下方左侧块-->
<view class="dcleft">
<t-progress
class="dcleft1"
theme="circle"
percentage="{{userInfo.crystallineEnergy}}"
color="#f76229" label=""
t-class-bar="dcleft1"
stroke-width="10rpx"
/>
<view class="dcbs"></view>
<view class="dclefttxt">水晶能量</view>
</view>
<!--中间进度条-->
<view class="dcleft-middle">
<t-progress
class="dchx"
percentage="{{userInfo.crystallineEnergy}}"
trackColor="#E0E3EA"
color="#f76229"
label=""
stroke-width="16rpx"
/>
<view class="dchx-box">
<view class="dchx-box-cantainer" wx:if="{{showInjectBkc}}">
<view class="box" wx:for="{{20}}" wx:key="index"></view>
</view>
</view>
<view class="dchxtxt">{{userInfo.crystallineEnergy}}%</view>
</view>
<!--下方左侧块-->
<view class="dcleft-right">
<view class="dcright-bgc">
<view class="dcright-bg" wx:if="{{showInjectBkc}}"></view>
</view>
<view class="dcright" bind:touchstart="openInject" bind:touchend="closeInject"><view class="dcrightwjx"></view></view>
<view class="dcrighttxt">能量注入</view>
</view>
</view>
<!-- 形象按钮 -->
<view class="call1-vivid" wx:if="{{showSexLogo}}" >
<!--男性形象-->
<view
class="yan2"
data-yan="male"
bindtap="doSetXxtMale"
>
<view class="yan12"></view>
</view>
<!--动物形象-->
<view class="yan1"
data-yan="animal"
bindtap="doSetXxtAnimal"
>
<view class="yan11"></view>
</view>
<!--女性形象-->
<view
class="yan3"
data-yan="female"
bindtap="doSetXxtFemale"
>
<view class="yan13"></view>
</view>
</view>
<!-- 能量已满提示 -->
<view class="energy-full-box" wx:if="{{ jmEnergy }}" bindtap="closeJmEnergy">
<view class="energy-full">
<view>能量已经集满啦!</view>
<view>可以注入到水晶中</view>
<view>增强运势哦!</view>
</view>
</view>
<!-- 能量注入成功提示 -->
<view class="energy-complete" wx:if="{{showScsEnergy}}">
<view>能量已注入{{crystallineEnergy}}%</view>
<view>守护时间为{{guarTime}}</view>
</view>
</swiper-item>
<!--情侣页面--> <!--情侣页面-->
<swiper-item class="call1" wx:if='{{userInfo.loverId}}'> <swiper-item class="call1" wx:if='{{userInfo.loverId}}'>
<!--未祈祷头像名字--> <!--未祈祷头像名字-->
@ -194,7 +89,7 @@
</view> </view>
<!--中间祈祷--> <!--中间祈祷-->
<view class="call1-btn-qd"> <view class="call1-btn-qd">
<view class="lovepic"></view> <view class="lovepic" bindtap="openPray"></view>
<view class="dchxtxtql" bindtap="openPray" wx:if="{{ !userInfo.prayerEndTime }}">祈祷</view> <view class="dchxtxtql" bindtap="openPray" wx:if="{{ !userInfo.prayerEndTime }}">祈祷</view>
<view class="dchxtxtql" bindtap="openPray" wx:else>结束祈祷</view> <view class="dchxtxtql" bindtap="openPray" wx:else>结束祈祷</view>
</view> </view>
@ -208,6 +103,7 @@
color="#00A7FF" color="#00A7FF"
label="" label=""
t-class-bar="dcleft1" t-class-bar="dcleft1"
stroke-width="10rpx"
/> />
<view class="dcrbs" bindtap="openEnergy"></view> <view class="dcrbs" bindtap="openEnergy"></view>
</view> </view>
@ -216,12 +112,12 @@
</view> </view>
</swiper-item> </swiper-item>
<!--对方个人页面--> <!--人页面-->
<swiper-item class="call1" wx:if='{{userInfo.loverId}}'> <swiper-item class="call1">
<!--头像名字--> <!--头像名字-->
<view class="call1-header"> <view class="call1-header">
<image class="tx" src="{{loverInfo.avatar}}"></image> <image class="tx" src="{{userInfo.avatar ? userInfo.avatar : elfAvatar}}"></image>
<view class="txtext">{{loverInfo.nick ? loverInfo.nick : userInfo.constellation}}</view> <view class="txtext">{{userInfo.nick ? userInfo.nick : userInfo.constellation}}</view>
</view> </view>
<!-- 精灵图片 --> <!-- 精灵图片 -->
<view class="bkg1"> <view class="bkg1">
@ -230,7 +126,7 @@
<view class="bkg4"> <view class="bkg4">
<view class="bkg5"> <view class="bkg5">
<view class="xxt" bindtap="ShowOrNotLogo"> <view class="xxt" bindtap="ShowOrNotLogo">
<image mode="heightFix" src="{{xingxiangtu[loverInfo.spriteType]}}"></image> <image mode="heightFix" src="{{xingxiangtu[userInfo.spriteType]}}"></image>
</view> </view>
</view> </view>
</view> </view>
@ -238,51 +134,141 @@
</view> </view>
<view class="gh"></view> <view class="gh"></view>
</view> </view>
<!-- 底部图标 -->
<view class="call1-btn"> <view class="call1-btn">
<!--幸运数字--> <!--下方左侧块-->
<view class="call1-btn-left"> <view class="dcleft">
<view class="k1">{{loverInfo.horoscope.number}}</view> <t-progress
<view class="ktext1">幸运数字</view> class="dcleft1"
theme="circle"
percentage="{{userInfo.crystallineEnergy}}"
color="#f76229" label=""
t-class-bar="dcleft1"
stroke-width="10rpx"
/>
<view class="dcbs"></view>
<view class="dclefttxt">水晶能量</view>
</view> </view>
<!-- 运势 --> <!--中间进度条-->
<view class="call1-btn-middle"> <view class="dcleft-middle">
<view class="k2" bindtap="ToastDialog"><view class="k11"></view></view> <t-progress
<div class="ktext2">Ta的运势</div> class="dchx"
percentage="{{userInfo.crystallineEnergy}}"
trackColor="#E0E3EA"
color="#f76229"
label=""
stroke-width="16rpx"
/>
<view class="dchx-box">
<view class="dchx-box-cantainer" wx:if="{{showInjectBkc}}">
<view class="box" wx:for="{{20}}" wx:key="index"></view>
</view>
</view>
<view class="dchxtxt">{{userInfo.crystallineEnergy}}%</view>
</view> </view>
<!-- 幸运颜色 --> <!--下方左侧块-->
<view class="call1-btn-right"> <view class="dcleft-right">
<view class="k3">{{loverInfo.horoscope.color}}</view> <view class="dcright-bgc">
<view class="ktext3">幸运颜色</view> <view class="dcright-bg" wx:if="{{showInjectBkc}}"></view>
</view>
<view class="dcright" bind:touchstart="openInject" bind:touchend="closeInject"><view class="dcrightwjx"></view></view>
<view class="dcrighttxt">能量注入</view>
</view>
</view>
<!-- 形象按钮 -->
<view class="call1-vivid" wx:if="{{showSexLogo}}" >
<!--男性形象-->
<view
class="yan2"
data-yan="male"
bindtap="doSetXxtMale"
>
<view class="yan12"></view>
</view>
<!--动物形象-->
<view class="yan1"
data-yan="animal"
bindtap="doSetXxtAnimal"
>
<view class="yan11"></view>
</view>
<!--女性形象-->
<view
class="yan3"
data-yan="female"
bindtap="doSetXxtFemale"
>
<view class="yan13"></view>
</view> </view>
</view> </view>
<t-popup class="ttpopup" visible="{{visible}}" bind:visible-change="onVisibleChange" placement="{{'center'}}"> <!-- 能量已满提示 -->
<view class="ttpopup"> <view class="energy-full-box" wx:if="{{ jmEnergy }}" bindtap="closeJmEnergy">
<view class="tips">Tips记得提醒ta哦</view> <view class="energy-full">
<view class="ztys">{{loverInfo.horoscope.summary}}</view> <view>能量已经集满啦!</view>
<view class="rjkzs"><t-rate value="3" icon="{{ ['star-filled', 'star'] }}" color="#FFFF00" /></view> <view>可以注入到水晶中</view>
<view class="jkzs"></view> <view>增强运势哦!</view>
<view class="aqzs"></view> </view>
<view class="raqzs"><t-rate value="3" icon="{{ ['star-filled', 'star'] }}" color="#FFFF00" /></view> </view>
<view class="cyzs"></view> <!-- 能量注入成功提示 -->
<view class="rcyzs"><t-rate value="3" icon="{{ ['star-filled', 'star'] }}" color="#FFFF00" /></view> <view class="energy-complete" wx:if="{{showScsEnergy}}">
<view class="ysfgx"></view> <view>能量已注入{{crystallineEnergy}}%</view>
<view>守护时间为{{guarTime}}</view>
</view> </view>
</t-popup> </swiper-item>
</swiper-item>
<!--对方个人页面-->
<swiper-item class="call1" wx:if='{{userInfo.loverId}}'>
<!--头像名字-->
<view class="call1-header">
<image class="tx" src="{{loverInfo.avatar}}"></image>
<view class="txtext">{{loverInfo.nick ? loverInfo.nick : userInfo.constellation}}</view>
</view>
<!-- 精灵图片 -->
<view class="bkg1">
<view class="bkg2">
<view class="bkg3">
<view class="bkg4">
<view class="bkg5">
<view class="xxt" bindtap="ShowOrNotLogo">
<image mode="heightFix" src="{{xingxiangtu[loverInfo.spriteType]}}"></image>
</view>
</view>
</view>
</view>
</view>
<view class="gh"></view>
</view>
<view class="call1-btn">
<!--幸运数字-->
<view class="call1-btn-left">
<view class="k1">{{loverInfo.horoscope.number}}</view>
<view class="ktext1">幸运数字</view>
</view>
<!-- 运势 -->
<view class="call1-btn-middle">
<view class="k2" bindtap="ToastDialog"><view class="k11"></view></view>
<div class="ktext2">Ta的运势</div>
</view>
<!-- 幸运颜色 -->
<view class="call1-btn-right">
<view class="k3">{{loverInfo.horoscope.color}}</view>
<view class="ktext3">幸运颜色</view>
</view>
</view>
</swiper-item>
</swiper> </swiper>
<!-- 未祈祷弹层 --> <!-- 未祈祷弹层 -->
<view class="pray" wx:if="{{showPray}}"> <view class="pray" wx:if="{{showPray}}">
<view class="dialog"> <view class="dialog">
<view class="dialog-item"> <view class="dialog-item">
<text>祈祷内容</text> <text class="dialog-item-text">祈祷内容</text>
<textarea model:value="{{prayerContent}}" placeholder="请写下你要祈祷的内容" bindblur="getTextValue"></textarea> <textarea model:value="{{prayerContent}}" placeholder="请写下你要祈祷的内容" bindblur="getTextValue"></textarea>
</view> </view>
<view class="dialog-item"> <view class="dialog-item">
<text>祈祷时长</text> <text class="dialog-item-text">祈祷时长</text>
<view class="duration" bindtap="showTiming">{{prayTimeStr}}<t-icon name="chevron-down" size="48rpx"/></view> <view class="duration" bindtap="showTiming">{{prayTimeStr}}<t-icon name="chevron-down" size="48rpx"/></view>
</view> </view>
<view class="dialog-btn"> <view class="dialog-btn">
@ -314,7 +300,7 @@
<view class="pray" wx:if="{{showIsPray}}"> <view class="pray" wx:if="{{showIsPray}}">
<view class="dialog"> <view class="dialog">
<t-toast id="t-toast" /> <t-toast id="t-toast" />
<view class="dialog-text"> <view class="dialog-text-end-pray">
<view>要结束祈祷吗?</view> <view>要结束祈祷吗?</view>
<view>将返还{{energy}}%星座能量</view> <view>将返还{{energy}}%星座能量</view>
<view>溢出能量将消失</view> <view>溢出能量将消失</view>
@ -340,7 +326,7 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 赠送能量提示 --> <!-- 能量已满提示 -->
<view class="pray" wx:if="{{showEnergyToast}}"> <view class="pray" wx:if="{{showEnergyToast}}">
<view class="dialog"> <view class="dialog">
<t-toast id="t-toast" /> <t-toast id="t-toast" />
@ -391,7 +377,32 @@
<view>能量注入中……</view> <view>能量注入中……</view>
</view> </view>
<view class="popup" wx:if="{{visible}}" catchtap="ToastDialog">
<view class="ttpopup">
<view class="tips">Tips记得提醒ta哦</view>
<view class="ztys">{{loverInfo.horoscope.summary}}</view>
<view class="ysfgx"><image src="https://wish-assets.windymuse.com.cn/xy/ysfgx.png" /></view>
<view class="ttpopup-item">
<view class="jkzs"></view>
<view class="rjkzs">
<t-rate value="3" icon="{{ ['star-filled', 'star'] }}" color="#FFFF00"/>
</view>
</view>
<view class="ttpopup-item">
<view class="aqzs"></view>
<view class="raqzs"><t-rate value="3" icon="{{ ['star-filled', 'star'] }}" color="#FFFF00" /></view>
</view>
<view class="ttpopup-item">
<view class="cyzs"></view>
<view class="rcyzs"><t-rate value="3" icon="{{ ['star-filled', 'star'] }}" color="#FFFF00" /></view>
</view>
</view>
</view>
<div class="jltxt" bindtap="go2Jlai">精灵 AI</div> <div class="jltxt" bindtap="go2Jlai">精灵 AI</div>
<!-- 轮播图滑块按钮 -->
<view class="swiper-btn-left" bindtap="goLeftSwiper" wx:if='{{userInfo.loverId}}'></view>
<view class="swiper-btn-right" bindtap="goRightSwiper" wx:if='{{userInfo.loverId}}'></view>

@ -320,10 +320,11 @@ page {
} }
.call1-btn-qd { .call1-btn-qd {
height: 130rpx; height: 170rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-direction: column;
} }
.lovepic{ .lovepic{
@ -335,8 +336,6 @@ page {
} }
.dchxtxtql{ .dchxtxtql{
width:200rpx;
height:16rpx;
text-align: center; text-align: center;
color: #9a9a9a; color: #9a9a9a;
font-size: 28rpx; font-size: 28rpx;
@ -345,6 +344,7 @@ page {
.txl{ .txl{
width:72rpx; width:72rpx;
height:72rpx; height:72rpx;
border-radius: 50% !important;
margin-left: 30rpx; margin-left: 30rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
@ -355,6 +355,7 @@ page {
width:72rpx; width:72rpx;
height:72rpx; height:72rpx;
margin-right: 30rpx; margin-right: 30rpx;
border-radius: 50% !important;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/tx.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/tx.png);
@ -684,143 +685,131 @@ page {
font-size: 28rpx; font-size: 28rpx;
} }
.popup {
position: absolute;
top: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.ttpopup{ .ttpopup{
width: 659.33rpx; width: 660rpx;
height:804rpx; height: 804rpx;
background:rgba(255, 255, 255, 0.9); border-radius: 30rpx;
border-radius: 36rpx; background-color: rgba(255, 255, 255, 0.9);
color: rgba(16, 16, 16, 1);
font-size: 28rpx;
text-align: center;
padding: 36rpx 46rpx;
box-sizing: border-box;
box-shadow: 2rpx 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
z-index: 99999;
}
.ttpopup-item {
margin-bottom: 24rpx;
display: flex;
align-items: center;
justify-content: space-around;
} }
.ztys{ .ztys{
position: absolute; margin-top: 26rpx;
display: flex; line-height: 160%;
flex-direction: column; color: rgba(108, 108, 108, 1);
background-repeat: no-repeat; font-size: 32rpx;
background-size:100% 100%; text-align: start;
left: 46rpx;
top:98rpx;
width: 284px;
height: 159px;
line-height: 50rpx;
color: rgba(108, 108, 108, 1);
font-size: 16px;
} }
.jkzs{ .jkzs{
position: absolute;
width: 111.33rpx; width: 111.33rpx;
height: 26.67rpx; height: 26.67rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
margin-left:97.33rpx;
margin-top: 589.33rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/jkzs.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/jkzs.png);
} }
.aqzs{ .aqzs{
position: absolute;
width: 111.33rpx; width: 111.33rpx;
height: 26.67rpx; height: 26.67rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
margin-left:97.33rpx;
margin-top: 653.33rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/aqzs.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/aqzs.png);
} }
.cyzs{ .cyzs{
position: absolute;
width: 111.33rpx; width: 111.33rpx;
height: 26.67rpx; height: 26.67rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
margin-left:97.33rpx;
margin-top: 717.33rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/cyzs.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/cyzs.png);
} }
.rjkzs{ .rjkzs{
position: absolute;
width: 311.33rpx;
height: 26.67rpx;
line-height: 26.67rpx; line-height: 26.67rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-left:279.33rpx;
margin-top: 580.33rpx;
} }
.raqzs{ .raqzs{
position: absolute;
width: 111.33rpx;
height: 26.67rpx;
line-height:26.67rpx; line-height:26.67rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
margin-left:279.33rpx;
margin-top: 644.33rpx;
} }
.rcyzs{ .rcyzs{
position: absolute;
width: 111.33rpx;
height: 26.67rpx;
line-height:26.67rpx; line-height:26.67rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
margin-left:279.33rpx;
margin-top: 708.33rpx;
} }
.jltxt{ .jltxt{
position: absolute; position: absolute;
right: 0; right: 0;
top: 504px; top: 1008rpx;
width: 75px; width: 150rpx;
height: 35px; height: 70rpx;
line-height: 70rpx; line-height: 70rpx;
border-radius: 10px 0px 0px 10px; border-radius: 20rpx 0px 0px 20rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%); background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
text-align: center; text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1); border: 6rpx 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;
} }
.tips{ .tips{
position: absolute; color: rgba(248, 99, 42, 1);
left: 46rpx; font-size: 24rpx;
top: 36rpx; text-align: left;
width: 119px;
height: 18px;
color: rgba(248, 99, 42, 1);
font-size: 12px;
text-align: left;
font-family: SourceHanSansSC-regular;
} }
.ysfgx{ .ysfgx{
position: absolute; margin-top: 70rpx;
left: 90rpx; width: 100%;
top: 486rpx; display: flex;
width: 240px; justify-content: center;
height: 11px; margin-bottom: 78rpx;
background-repeat: no-repeat; }
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/ysfgx.png); .ysfgx image {
width: 480rpx;
height: 22rpx;
} }
/* 弹层 */ /* 弹层 */
@ -832,16 +821,16 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/ysfgx.png);
.dialog { .dialog {
position: absolute; position: absolute;
bottom: 500rpx; bottom: 500rpx;
width: 648rpx; width: 586rpx;
height: 484rpx; height: 434rpx;
padding: 50rpx; padding: 50rpx;
z-index: 999; z-index: 999;
box-sizing: border-box; box-sizing: border-box;
line-height: 20px; line-height: 20px;
border-radius: 15px; border-radius: 30rpx;
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
text-align: center; text-align: center;
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 2rpx 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
} }
.dialog-item { .dialog-item {
@ -864,6 +853,10 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/ysfgx.png);
border: 1px solid rgba(236, 236, 236, 1); border: 1px solid rgba(236, 236, 236, 1);
} }
.dialog-item-text {
width: 144rpx;
}
.dialog-item text { .dialog-item text {
padding-top: 16rpx; padding-top: 16rpx;
color: #6C6C6C; color: #6C6C6C;
@ -907,19 +900,33 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/ysfgx.png);
} }
.dialog-text { .dialog-text {
height: 300rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 18px; font-size: 36rpx;
text-align: center; text-align: center;
font-weight: 400; font-weight: 400;
padding-top: 60rpx; padding-top: 60rpx;
box-sizing: border-box; box-sizing: border-box;
margin-bottom: 100rpx;
} }
.dialog-text view { .dialog-text view {
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.dialog-text-end-pray {
color: rgba(108, 108, 108, 1);
font-size: 36rpx;
text-align: center;
font-weight: 400;
padding-top: 10rpx;
box-sizing: border-box;
margin-bottom: 100rpx;
}
.dialog-text-end-pray view {
margin-bottom: 30rpx;
}
.timing { .timing {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
@ -1038,3 +1045,23 @@ picker-view-column {
width: 200rpx; width: 200rpx;
height: 200rpx; height: 200rpx;
} }
.swiper-btn-left {
position: absolute;
top: 646rpx;
left: 10rpx;
width: 100rpx;
height: 150rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/if-curved-left.png);
}
.swiper-btn-right {
position: absolute;
top: 646rpx;
right: 10rpx;
width: 100rpx;
height: 150rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/if-curved-right.png);
}

@ -98,6 +98,13 @@ Page({
}, },
// 获取聊天气泡内容 // 获取聊天气泡内容
getContent(e){ getContent(e){
// 判断两天次数
if (!this.data.times && !this.data.userInfo.isChatVip) {
return wx.showToast({
title: '开通会员继续聊天',
icon: 'none'
})
}
const ctn = e.currentTarget.dataset.ctn const ctn = e.currentTarget.dataset.ctn
if (ctn === '1') { if (ctn === '1') {
this.setData({ltinfo: '请告诉我未来一个月的星座运势'}) this.setData({ltinfo: '请告诉我未来一个月的星座运势'})

@ -47,7 +47,7 @@ Page({
icon: 'none' icon: 'none'
}); });
return; return;
} }
}, },
// 找回数据 // 找回数据
findData(){ findData(){
@ -57,6 +57,24 @@ Page({
showPhone: false showPhone: false
}) })
}, },
// 找回账号数据
retrieveAccount(){
// req.patchRequest('/api/user/retrieve-data',{
// phone: this.data.phone,
// code: this.data.phoneVerificationCode
// }).then(res => {
// })
wx.showToast({
title: '找回数据成功,请重新登入',
icon: 'none'
})
setTimeout(() => {
wx.redirectTo({
url: '/pages/index/index',
})
}, 1000);
},
closeFindData(){ closeFindData(){
this.setData({ this.setData({
existPhone: true, existPhone: true,
@ -75,27 +93,21 @@ Page({
existPhone: false, existPhone: false,
showPhone: true, showPhone: true,
isHavePhone: false, isHavePhone: false,
phone: '' phone: '',
phoneVerificationCode: ''
}) })
}, },
getCode(){ getCode(){
// 请求前校验 // 请求前校验
if (!/^1[3456789]\d{9}$/.test(this.data.phone)) { if (!/^1[3456789]\d{9}$/.test(this.data.phone)) {
wx.showToast({ return wx.showToast({
title: '手机号码格式不正确', title: '手机号码格式不正确',
icon: 'none' icon: 'none'
}); });
return; }
}
if(this.data.countdown === 60 || this.data.countdown === '重新获取'){ if(this.data.countdown === 60 || this.data.countdown === '重新获取'){
req.postRequest('/api/user/send-authentication-code',{phone:this.data.phone}).then((res)=>{ req.postRequest('/api/user/send-authentication-code',{phone:this.data.phone}).then((res)=>{
console.log(res); console.log(res);
if (res.data.code === 500) {
return this.setData({
existPhone: true,
showPhone: false
})
}
if (this.data.countdown === '重新获取') { if (this.data.countdown === '重新获取') {
this.setData({countdown: 60}) this.setData({countdown: 60})
} }
@ -122,35 +134,40 @@ Page({
showPhone: true, //更改手机号码 showPhone: true, //更改手机号码
isHavePhone: false, isHavePhone: false,
existPhone: false, existPhone: false,
findAccount: false //账号账号数据 findAccount: false, //账号账号数据
phone: '',
phoneVerificationCode: ''
}) })
}, },
bdSuccessBtn(){ bdSuccessBtn(){
this.setData({bdsjhVisible: false}) this.setData({bdsjhVisible: false})
}, },
doEXecSjh(){ doEXecSjh(){
if (this.data.phoneVerificationCode.length !== 6) {
return wx.showToast({
title: '验证码格式不正确',
icon: 'none'
});
}
req.patchRequest('/api/user/curt',{ req.patchRequest('/api/user/curt',{
phone:this.data.phone, phone:this.data.phone,
phoneVerificationCode:this.data.phoneVerificationCode phoneVerificationCode:this.data.phoneVerificationCode
}).then((res)=>{ }).then((res)=>{
if(res.data.code !== 200){ if (res.data.code === 500) {
wx.showToast({ return this.setData({
title:res.data.msg, existPhone: true,
icon:'none' showPhone: false,
}) })
return
}else { }else {
this.getUserInfo() this.getUserInfo()
this.setData({ this.setData({
bdSuccess: true, bdSuccess: true,
showPhone: false showPhone: false,
phoneVerificationCode:'',
isCxHq:false
}) })
} }
}) })
this.setData({
phoneVerificationCode:'',
isCxHq:false
})
}, },
go2Grzl(){ go2Grzl(){
wx.navigateTo({ wx.navigateTo({

@ -132,7 +132,7 @@
<view class="exist-phone-text5">确定要找回吗?</view> <view class="exist-phone-text5">确定要找回吗?</view>
<view class="exist-btn"> <view class="exist-btn">
<view class="btn" bindtap="closeFindData">取消</view> <view class="btn" bindtap="closeFindData">取消</view>
<view class="btn">确定</view> <view class="btn" bindtap="retrieveAccount">确定</view>
</view> </view>
</view> </view>
</view> </view>

@ -8,7 +8,7 @@ Page({
*/ */
data: { data: {
visible:false, visible:false,
image: [] image: ''
}, },
go2Reback(){ go2Reback(){
wx.navigateTo({ wx.navigateTo({
@ -37,14 +37,20 @@ Page({
}, },
blockClick(e){ blockClick(e){
console.log(e.target.dataset.url); console.log(e.target.dataset.url);
const url = e.currentTarget.dataset.url
const arr = url.split("/"); // 将链接按照 / 分割成数组
const last = arr[arr.length - 1]; // 取得数组中的最后一个元素
const num = last.split("?")[0]; // 将最后一个元素按照 ? 分割成数组,取得倒数第二个元素
console.log(num); // 输出 128
this.setData({ this.setData({
visible: true, visible: true,
image: [e.target.dataset.url] image: e.target.dataset.url,
resourceId:num
}) })
}, },
downloadBtn(){ downloadBtn(){
wx.downloadFile({ wx.downloadFile({
url: this.data.image[0], url: this.data.image,
success: (res) => { success: (res) => {
if (res.statusCode === 200) { if (res.statusCode === 200) {
const tempFilePath = res.tempFilePath; const tempFilePath = res.tempFilePath;
@ -110,14 +116,26 @@ Page({
delBtnHx(){ delBtnHx(){
const hxlist = this.data.hxlist const hxlist = this.data.hxlist
const id = hxlist.find(item => item.resourceId == this.data.resourceId).id const id = hxlist.find(item => item.resourceId == this.data.resourceId).id
const isSelf = hxlist.find(item => item.resourceId == this.data.resourceId).isSelf
console.log(id); console.log(id);
req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => { if (isSelf) {
console.log(res); req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => {
if (res.data.code === 200) { console.log(res);
this.getList() if (res.data.code === 200) {
this.setData({delKey: ''}) this.getList()
} this.setData({delKey: '', visible:false})
}) wx.showToast({
title:'删除成功',
icon: 'success'
})
}
})
}else {
wx.showToast({
title:'只能删除自己的回忆',
icon: 'none'
})
}
}, },
closeViewer(){this.setData({visible: false})}, closeViewer(){this.setData({visible: false})},
getList(){ getList(){

@ -1,7 +1,9 @@
<!--pages/home/xx/hy/xz/zt.wxml--> <!--pages/home/xx/hy/xz/zt.wxml-->
<!--返回图标--> <!--返回图标-->
<view class="reback" bindtap="go2Reback"></view> <view class="header">
<view class="title">画像</view> <view class="reback" bindtap="go2Reback"></view>
<view class="title">画像</view>
</view>
<view class="body"> <view class="body">
<view class="block" wx:for="{{list}}" wx:key="index"> <view class="block" wx:for="{{list}}" wx:key="index">

@ -1,27 +1,32 @@
.reback{ .header {
position: fixed; position: fixed;
margin-left: 20rpx; top: 0;
top: 108rpx; width: 100%;
height: 176rpx;
padding-top: 88rpx;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
background-color: #fff;
z-index: 1;
}
.reback{
position: absolute;
left: 20rpx;
width:48rpx; width:48rpx;
height:48rpx; height:48rpx;
z-index: 2;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png); background-image: url(https://wish-assets.windymuse.com.cn/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;
z-index: 1;
font-family: SourceHanSansSC-regular;
} }
.xfgjl{ .xfgjl{
position: fixed; position: fixed;
@ -53,8 +58,12 @@
} }
.body { .body {
width: 100%;
height: 100%;
overflow-y: scroll;
padding-top:188rpx ; padding-top:188rpx ;
padding-bottom: 200rpx; padding-bottom: 200rpx;
box-sizing: border-box;
} }
.block { .block {

@ -64,6 +64,7 @@
top: 334rpx; top: 334rpx;
width: 100%; width: 100%;
height: 1000rpx; height: 1000rpx;
background-size: cover;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E6%9C%AD%E8%83%8C%E6%99%AF.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E6%9C%AD%E8%83%8C%E6%99%AF.png);
} }

@ -36,16 +36,26 @@ Page({
}) })
}, },
delLetter(e){ delLetter(e){
const id = e.target.dataset.id const id = e.target.dataset.item.id
req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => { const isSelf = e.target.dataset.item.isSelf
console.log(res); console.log(isSelf,'1111');
if(res.data.code === 200){ if (isSelf) {
wx.showToast({ req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => {
title: '删除成功', console.log(res);
}) if(res.data.code === 200){
this.getList() wx.showToast({
} title: '删除成功',
}) })
this.getList()
}
})
}else {
console.log('只能删除自己消息');
wx.showToast({
title: '只能删除自己的回忆',
icon: 'none'
})
}
}, },
getList(){ getList(){
req.getRequest('/api/user/curt/message/lover',{ req.getRequest('/api/user/curt/message/lover',{

@ -1,25 +1,27 @@
<!--pages/home/xx/hy/index.wxml--> <!--pages/home/xx/hy/index.wxml-->
<!--返回图标--> <!--返回图标-->
<view class="reback" bindtap="go2Reback"></view> <view class="header">
<view class="title">音讯</view> <view class="reback" bindtap="go2Reback"></view>
<view class="title">音迅</view>
</view>
<!-- 中间主体 --> <!-- 中间主体 -->
<view class="main"> <view class="main">
<view class="main-bgc" /> <view class="main-bgc" />
<t-swipe-cell wx:for="{{ list }}" wx:key="index"> <t-swipe-cell wx:for="{{ list }}" wx:key="index">
<view class="main-item"> <view class="main-item">
<view class="item-left"><image src="{{avatar}}" /></view> <view class="item-left"><image src="{{item.isSelf ? userInfo.avatar : avatar}}" /></view>
<view class="item-text"> <view class="item-text">
<view class="item-text-name">{{nick}}</view> <view class="item-text-name">{{item.isSelf ? userInfo.nick : nick}}</view>
<view class="item-text-time">{{item.createdAt}}</view> <view class="item-text-time">{{item.createdAt}}</view>
</view> </view>
<view class="item-right" bindtap="playAudio" data-item="{{item}}"> <view class="item-right" bindtap="playAudio" data-item="{{item}}">
<view class="item-right-icon"></view> <view class="item-right-icon"></view>
<view class="item-right-text">{{item.extra.ssec}}</view> <view class="item-right-text">{{item.extra.ssec}}</view>
</view>
</view> </view>
</view> <view slot="right" class="delete-btn" bindtap="delLetter" data-item="{{item}}">删除</view>
<view slot="right" class="delete-btn" bindtap="delLetter" data-id="{{item.id}}">删除</view> </t-swipe-cell>
</t-swipe-cell>
</view> </view>
<!--星讯聊天下方菜单栏--> <!--星讯聊天下方菜单栏-->

@ -1,31 +1,37 @@
/* pages/home/xx/hy/index.wxss */ /* pages/home/xx/hy/index.wxss */
.reback{ .header {
position: fixed; position: fixed;
margin-left: 20rpx; top: 0;
margin-top:108rpx; width: 100%;
height: 176rpx;
padding-top: 88rpx;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
background-color: #fff;
z-index: 1;
}
.reback{
position: absolute;
left: 20rpx;
width:48rpx; width:48rpx;
height:48rpx; height:48rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
z-index: 1;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png); background-image: url(https://wish-assets.windymuse.com.cn/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;
z-index: 1;
font-family: SourceHanSansSC-regular;
} }
.xfgjl{ .xfgjl{
position: fixed; position: fixed;
left: 0px; bottom: 0;
left: 0;
display: flex; display: flex;
justify-content: space-evenly; justify-content: space-evenly;
margin-top: 1416rpx; margin-top: 1416rpx;
@ -51,12 +57,14 @@
} }
.main { .main {
position: absolute; /* position: absolute; */
width: 100%; width: 100%;
height: 100%; height: 100%;
padding-top: 208rpx; padding-top: 208rpx;
padding-bottom: 200rpx;
box-sizing: border-box; box-sizing: border-box;
background-size: contain; background-size: contain;
overflow-y: scroll;
} }
.main-bgc { .main-bgc {
@ -64,6 +72,7 @@
top: 334rpx; top: 334rpx;
width: 100%; width: 100%;
height: 1000rpx; height: 1000rpx;
background-size: cover;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E6%9C%AD%E8%83%8C%E6%99%AF.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E6%9C%AD%E8%83%8C%E6%99%AF.png);
} }

@ -7,7 +7,9 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
showZt: false,
msgZt: '',
userInfo: {}
}, },
go2Reback(){ go2Reback(){
wx.navigateTo({ wx.navigateTo({
@ -35,11 +37,22 @@ Page({
}) })
}, },
delLetter(e){ delLetter(e){
const id = e.target.dataset.id const id = e.target.dataset.item.id
req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => { const isSelf = e.target.dataset.item.isSelf
console.log(res, '删除成功'); if (isSelf) {
this.getList() req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => {
}) wx.showToast({
title: '删除成功',
icon: 'success'
})
this.getList()
})
}else {
wx.showToast({
title: '只能删除自己的回忆',
icon: 'none'
})
}
}, },
getList(){ getList(){
req.getRequest('/api/user/curt/message/lover',{ req.getRequest('/api/user/curt/message/lover',{
@ -78,12 +91,26 @@ Page({
}) })
}, },
readingNote(e){
console.log(e.currentTarget.dataset.content);
this.setData({
showZt: true,
msgZt: e.currentTarget.dataset.content
})
},
closeRead(){
this.setData({showZt: false})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.getList() this.getList()
this.getLoveInfo() this.getLoveInfo()
this.setData({
userInfo: wx.getStorageSync('xinyuan-userInfo')
})
}, },
/** /**

@ -1,24 +1,28 @@
<!--pages/home/xx/hy/index.wxml--> <!--pages/home/xx/hy/index.wxml-->
<!--返回图标--> <!--返回图标-->
<view class="reback" bindtap="go2Reback"></view> <view class="header">
<view class="title">纸条</view> <view class="reback" bindtap="go2Reback"></view>
<view class="title">纸条</view>
</view>
<!-- 中间主体 --> <!-- 中间主体 -->
<view class="main"> <view class="main">
<view class="main-bgc" /> <view class="main-bgc" />
<t-swipe-cell wx:for="{{ list }}" wx:key="index"> <t-swipe-cell wx:for="{{ list }}" wx:key="index">
<view class="main-item"> <view class="main-item">
<view class="item-left"></view> <view class="item-left">
<view class="item-text"> <image src="{{item.isSelf ? userInfo.avatar : avatar}}" />
<view class="item-text-name">{{nick}}</view> </view>
<view class="item-text-time"> {{ item.createdAt }} </view> <view class="item-text">
</view> <view class="item-text-name">{{ item.isSelf ? userInfo.nick : nick}}</view>
<view class="item-right"> <view class="item-text-time"> {{ item.createdAt }} </view>
{{item.content}} </view>
<view class="item-right" bindtap="readingNote" data-content="{{item.content}}">
{{item.content}}
</view>
</view> </view>
</view> <view slot="right" class="delete-btn" bindtap="delLetter" data-item="{{item}}">删除</view>
<view slot="right" class="delete-btn" bindtap="delLetter" data-id="{{item.id}}">删除</view> </t-swipe-cell>
</t-swipe-cell>
</view> </view>
<!--星讯聊天下方菜单栏--> <!--星讯聊天下方菜单栏-->
@ -28,3 +32,13 @@
<view class="xxqlcd xxqlcd3" bindtap="go2Hx">画像</view> <view class="xxqlcd xxqlcd3" bindtap="go2Hx">画像</view>
<view class="xxqlcd xxqlcd4" bindtap="go2Zt">纸条</view> <view class="xxqlcd xxqlcd4" bindtap="go2Zt">纸条</view>
</view> </view>
<!-- 打开字条 -->
<view class="reading" wx:if="{{showZt}}">
<view class="read-box">
<view class="read-text">{{msgZt}}</view>
<view class="read-btn" bindtap="closeRead">
<image src="https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/iconPark-return%401x.png" />
</view>
</view>
</view>

@ -1,31 +1,37 @@
/* pages/home/xx/hy/index.wxss */ /* pages/home/xx/hy/index.wxss */
.reback{ .header {
position: fixed; position: fixed;
margin-left: 20rpx; top: 0;
margin-top:108rpx; width: 100%;
height: 176rpx;
padding-top: 88rpx;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
background-color: #fff;
z-index: 1;
}
.reback{
position: absolute;
left: 20rpx;
width:48rpx; width:48rpx;
height:48rpx; height:48rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
z-index: 1;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png); background-image: url(https://wish-assets.windymuse.com.cn/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;
z-index: 1;
font-family: SourceHanSansSC-regular;
} }
.xfgjl{ .xfgjl{
position: fixed; position: fixed;
left: 0px; bottom: 0;
left: 0;
display: flex; display: flex;
justify-content: space-evenly; justify-content: space-evenly;
margin-top: 1416rpx; margin-top: 1416rpx;
@ -51,12 +57,14 @@
} }
.main { .main {
position: absolute; /* position: absolute; */
width: 100%; width: 100%;
height: 100%;
padding-top: 208rpx; padding-top: 208rpx;
padding-bottom: 200rpx; padding-bottom: 200rpx;
box-sizing: border-box; box-sizing: border-box;
background-size: contain; background-size: contain;
overflow-y: scroll;
} }
.main-bgc { .main-bgc {
@ -64,6 +72,7 @@
top: 334rpx; top: 334rpx;
width: 100%; width: 100%;
height: 1000rpx; height: 1000rpx;
background-size: cover;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E6%9C%AD%E8%83%8C%E6%99%AF.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E4%BF%A1%E6%9C%AD%E8%83%8C%E6%99%AF.png);
} }
@ -84,6 +93,12 @@
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
} }
.item-left image {
width: 100%;
height: 100%;
border-radius: 50%;
}
.item-text { .item-text {
flex: 1; flex: 1;
height: 100%; height: 100%;
@ -93,14 +108,16 @@
.item-right { .item-right {
width: 366rpx; width: 366rpx;
height: 120rpx; height: 120rpx;
line-height: 120rpx;
padding: 0 30rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
text-align: center;
box-sizing: border-box; box-sizing: border-box;
background-size: contain; background-size: contain;
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
font-size: 28rpx; font-size: 28rpx;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E7%BA%B8%E6%9D%A1.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/%E7%BA%B8%E6%9D%A1.png);
} }
@ -126,3 +143,53 @@
align-items: center; align-items: center;
color: #fff; color: #fff;
} }
.reading {
position: fixed;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.8);
z-index: 3;
}
.read-box {
width: 596rpx;
height: 1084rpx;
margin-top: 222rpx;
margin-left: 96rpx;
padding: 198rpx 102rpx 0 66rpx;
box-sizing: border-box;
background-size: cover;
background-image: url(https://wish-assets.windymuse.com.cn/xy/ztbkg11.png);
}
.read-text {
width: 100%;
height: 620rpx;
color: rgba(79, 79, 79, 1);
font-size: 36rpx;
line-height: 180%;
text-align: left;
overflow-y: scroll;
}
.read-btn {
width: 110rpx;
height: 110rpx;
margin: 56rpx 0 0 158rpx;
border-radius: 50%;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
border: 6rpx solid rgba(255, 255, 255, 1);
box-sizing: border-box;
background-size: cover;
display: flex;
align-items: center;
justify-content: center;
}
.read-btn image {
width: 60rpx;
height: 60rpx;
}

@ -37,7 +37,9 @@ Page({
messages:[], messages:[],
loverInfo:{}, loverInfo:{},
hasLover:false,// 是否单身 hasLover:false,// 是否单身
userInfo:{} userInfo:{},
savePicture: false, // 保存图片成功
soundData:{} //音频数据
}, },
doLuYINBoF(e){ doLuYINBoF(e){
// 判断点击的是否为对方的语音 // 判断点击的是否为对方的语音
@ -165,30 +167,30 @@ Page({
do2FsLuyin(){/**发送录音按钮 */ do2FsLuyin(){/**发送录音按钮 */
this.data.RM.stop(); // this.data.RM.stop();
console.log('发送录音') console.log('发送录音')
this.setData({luyinVisible:false}) this.setData({luyinVisible:false})
let tt= this let tt= this
this.data.RM.onStop((res)=>{ // this.data.RM.onStop((res)=>{
//录音时长判断 //录音时长判断
console.log('发送录音了1111。。') console.log('发送录音了1111。。')
// 先计算分钟 // 先计算分钟
let fz = 0 let fz = 0
let mz = 0 let mz = 0
let hm = 0 let hm = 0
if(res.duration>=60*1000){ if(this.data.soundData.duration>=60*1000){
fz = Math.floor(res.duration/(60*1000)) fz = Math.floor(this.data.soundData.duration/(60*1000))
} }
if(res.duration>=1000){ if(this.data.soundData.duration>=1000){
mz = Math.floor((res.duration-fz*60*1000)/(1000)) mz = Math.floor((this.data.soundData.duration-fz*60*1000)/(1000))
} }
hm = res.duration - fz*60*1000-mz*1000 hm = this.data.soundData.duration - fz*60*1000-mz*1000
let sec = Math.floor(res.duration/1000) let sec = Math.floor(this.data.soundData.duration/1000)
let ssec = fz+'\''+mz+'\'\'' let ssec = fz+'\''+mz+'\'\''
console.log(ssec) console.log(ssec)
wx.uploadFile({ wx.uploadFile({
url: 'https://xzjl-api.windymuse.cn/api/resource', url: 'https://xzjl-api.windymuse.cn/api/resource',
filePath: res.tempFilePath, filePath: this.data.soundData.tempFilePath,
name: 'file', name: 'file',
header: { header: {
'Authorization': wx.getStorageSync('token'), 'Authorization': wx.getStorageSync('token'),
@ -217,21 +219,20 @@ Page({
fail(res) { fail(res) {
showToast('图片上传失败'); showToast('图片上传失败');
} }
}) })
// })
console.log(res)//这里是必须写完成事件的,因为最后的文件,就在这里面;
res.tempFilePath;//是临时的文件地址
res.duration;//录音的时长
res.fileSize;//文件的大小
})
}, },
doStopLuyin(){ doStopLuyin(){
this.setData({luYinStatus:2}) this.setData({luYinStatus:2})
clearInterval(this.data.timer) clearInterval(this.data.timer)
console.log('结束录音') console.log('结束录音')
this.data.RM.pause() this.data.RM.stop()
this.data.RM.onStop(res => {
console.log(res);
const innerAudioContext = wx.createInnerAudioContext()
innerAudioContext.src = res.tempFilePath
this.setData({soundData: res, innerAudio:innerAudioContext})
})
}, },
doStartLuyin(){ doStartLuyin(){
this.setData({RM:wx.getRecorderManager()}) this.setData({RM:wx.getRecorderManager()})
@ -251,6 +252,18 @@ Page({
this.data.timer = setInterval(this.counter,50) this.data.timer = setInterval(this.counter,50)
// 开始定时器 // 开始定时器
}, },
// 试听
doListen(){
this.setData({luYinStatus:3})
console.log('试听');
this.data.innerAudio.play() // 播放
},
// 结束试听
doStopListen(){
this.setData({luYinStatus:0})
this.data.innerAudio.stop() // 播放
},
counter:function(){ counter:function(){
let second = this.data.second let second = this.data.second
@ -361,15 +374,13 @@ Page({
let that= this; let that= this;
wx.downloadFile({ wx.downloadFile({
url: that.data.imgPicUrl,//图片的地址 url: that.data.imgPicUrl,//图片的地址
success:function(res){ success:(res) => {
const tempFilePath = res.tempFilePath //通过res中的tempFilePath 得到需要下载的图片地址 const tempFilePath = res.tempFilePath //通过res中的tempFilePath 得到需要下载的图片地址
wx.saveImageToPhotosAlbum({ wx.saveImageToPhotosAlbum({
filePath: tempFilePath, //设置下载图片的地址 filePath: tempFilePath, //设置下载图片的地址
success:function(){ success:() => {
wx.showToast({ this.setData({savePicture: true})
title: '保存图片成功', }
})
}
}) })
} }
}) })
@ -377,22 +388,25 @@ Page({
}, },
go2Reback1(){ go2Reback1(){
//wx.navigateBack({ changed: true }); //wx.navigateBack({ changed: true });
this.setData({dkTpVisible:false}) this.setData({dkTpVisible:false,savePicture:false})
}, },
go2Reback(){ go2Reback(){
wx.switchTab({ wx.reLaunch({
url: '/pages/home/xy/index', url: '/pages/home/xy/index',
}) })
}, },
go2SeeHxDetail(e){ go2SeeHxDetail(e){
console.log(e,'1111');
this.setData({imgPicUrl:e.currentTarget.dataset.tp}) this.setData({imgPicUrl:e.currentTarget.dataset.tp})
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 const id = e.currentTarget.dataset.id
req.patchRequest(`/api/user/curt/message/${id}/read`,{}).then(res => { if (id) {
console.log(res); 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){/**查看详情 */
@ -474,7 +488,7 @@ Page({
} }
}) })
this.setData({messages:list.reverse()}) this.setData({messages:list})
} }
}).catch((err)=>{ }).catch((err)=>{
console.log(err); console.log(err);
@ -601,11 +615,12 @@ Page({
this.doQueryInit() this.doQueryInit()
this.doMessageInfo() this.doMessageInfo()
const time = setInterval(() => { // 轮询获取信息
this.doMessageInfo() // const time = setInterval(() => {
console.log('1111'); // this.doMessageInfo()
}, 2000); // console.log('1111');
this.setData({time: time}) // }, 2000);
// this.setData({time: time})
}, },
/** /**
@ -629,6 +644,7 @@ Page({
onUnload() { onUnload() {
clearInterval(this.data.timer) clearInterval(this.data.timer)
this.data.innerAudioContext.stop() this.data.innerAudioContext.stop()
clearInterval(this.data.time)
}, },
/** /**

@ -195,7 +195,7 @@
<!--写纸条弹窗--> <!--写纸条弹窗-->
<t-popup visible="{{ztVisible}}" placement="top" class="ztPop"> <t-popup visible="{{ztVisible}}" placement="top" class="ztPop">
<view class="ztPopcenter"></view> <view class="ztPopcenter"></view>
<t-textarea model:value="{{ztText}}" t-class="external-class" placeholder="在此处输入文字" class="ztwzk" /> <t-textarea model:value="{{ztText}}" maxlength="{{100}}" t-class="external-class" placeholder="在此处输入文字" class="ztwzk" />
<view class="qxan1 btn1" bindtap="doCancelZt">取消</view> <view class="qxan1 btn1" bindtap="doCancelZt">取消</view>
<view class="qran1 btn1" bindtap="doFSZt">发送</view> <view class="qran1 btn1" bindtap="doFSZt">发送</view>
</t-popup> </t-popup>
@ -213,9 +213,13 @@
<view class="reback" bindtap="go2Reback1"></view> <view class="reback" bindtap="go2Reback1"></view>
<view class="title">画像</view> <view class="title">画像</view>
</view> </view>
<t-image src="{{imgPicUrl}}" mode="widthFix" class="tppp1"></t-image> <view class="ztPop1-img">
<!--返回图标--> <t-image src="{{imgPicUrl}}" mode="widthFix" class="tppp1"></t-image>
<view class="tpBcan1" bindtap="go2BcPic">保存</view> </view>
<view class="ztPop1-btn">
<view class="ztPop1-btn-text" wx:if="{{savePicture}}">画像保存成功</view>
<view class="tpBcan1" bindtap="go2BcPic">保存</view>
</view>
</t-popup> </t-popup>
<!--录音弹窗--> <!--录音弹窗-->
@ -232,9 +236,13 @@
<view class="wlyan2" ></view> <view class="wlyan2" ></view>
</view> </view>
<!--录音按钮--> <!--已结束--> <!--录音按钮--> <!--已结束-->
<view class="weiluyinanniu" wx:if="{{luYinStatus==2}}" > <view class="weiluyinanniu" wx:if="{{luYinStatus==2}}" bindtap="doListen">
<view class="wlyan3"></view> <view class="wlyan3"></view>
</view> </view>
<!--录音按钮--> <!--播放录音-->
<view class="weiluyinanniu" wx:if="{{luYinStatus==3}}" bindtap="doStopListen">
<view class="wlyan4"></view>
</view>
<!--轮播图位置--> <!--轮播图位置-->
<view class="luyinlbt" wx:if="{{luYinStatus==1}}"> <view class="luyinlbt" wx:if="{{luYinStatus==1}}">
<view class="box2" style="float: left; height: 50rpx; width: 1000px; " > <view class="box2" style="float: left; height: 50rpx; width: 1000px; " >

@ -600,7 +600,8 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
.zjtableatp2{ .zjtableatp2{
width: 100%; width: 100%;
height: 150rpx; height: 220rpx;
padding: 0 32rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
@ -679,20 +680,14 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
} }
.tppp1{ .tppp1{
position: absolute; width: 100%;
width: 750rpx;
height: auto;
top:50%;
margin-top: 300rpx;
} }
.ztPop1{ .ztPop1{
position: relative; position: relative;
width: 750rpx ; width: 100% ;
height: 1624rpx; height: 100%;
margin: 0!important; margin: 0!important;
padding: 0!important; padding: 0!important;
display: table-cell;
vertical-align: middle;
} }
.ztPop1-header { .ztPop1-header {
@ -704,23 +699,48 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
justify-content: center; justify-content: center;
} }
.ztPop1-img {
width: 100%;
height: 1270rpx;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.tpBcan1{ .ztPop1-btn {
position: relative;
width: 100%;
height: 134rpx;
padding: 32rpx;
box-sizing: border-box;
display: flex;
justify-content: flex-end;
}
.ztPop1-btn-text {
position: absolute; position: absolute;
top: 1400rpx; top: 50%;
right: 32rpx; left: 50%;
transform: translate(-50%, -50%);
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
text-align: center;
}
.tpBcan1{
width: 110rpx; width: 110rpx;
height: 70rpx; height: 70rpx;
line-height: 70rpx; line-height: 70rpx;
border-radius: 20rpx; 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 4rpx 12rpx 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: 28rpx; font-size: 28rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-medium;
} }
.block{ .block{
width: 750rpx; width: 750rpx;
@ -903,6 +923,18 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
background-size: cover; background-size: cover;
background-image: url(https://wish-assets.windymuse.com.cn/xy/if-ui-play%20Copy%401x.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/if-ui-play%20Copy%401x.png);
} }
.wlyan4{
/* position: absolute;
left: 40rpx;
top: 20rpx; */
width: 70rpx;
height: 70rpx;
/* border-top: 50rpx solid transparent;
border-left: 60rpx solid rgba(248,99,42,1);
border-bottom: 35rpx solid transparent; */
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/semiDesign.png);
}
.luyinlbt1{ .luyinlbt1{
position: absolute; position: absolute;
width: 750rpx; width: 750rpx;

@ -90,7 +90,7 @@
<view class="taost" wx:if="{{showSoundMore}}"> <view class="taost" wx:if="{{showSoundMore}}">
<view class="taost-box"> <view class="taost-box">
<view class="taost-box-text">最多只能添加</view> <view class="taost-box-text">最多只能添加</view>
<view class="taost-box-text">3条语</view> <view class="taost-box-text">3条语</view>
<view class="taost-box-btn" bindtap="closeShowSoundMore">好的</view> <view class="taost-box-btn" bindtap="closeShowSoundMore">好的</view>
</view> </view>
</view> </view>

@ -90,7 +90,7 @@
<view class="taost" wx:if="{{showSoundMore}}"> <view class="taost" wx:if="{{showSoundMore}}">
<view class="taost-box"> <view class="taost-box">
<view class="taost-box-text">最多只能添加</view> <view class="taost-box-text">最多只能添加</view>
<view class="taost-box-text">3条语</view> <view class="taost-box-text">3条语</view>
<view class="taost-box-btn" bindtap="closeShowSoundMore">好的</view> <view class="taost-box-btn" bindtap="closeShowSoundMore">好的</view>
</view> </view>
</view> </view>
@ -104,7 +104,7 @@
</view> </view>
<view class="taost" wx:if="{{showSend}}"> <view class="taost" wx:if="{{showSend}}">
<view class="taost-box"> <view class="taost-box2">
<view class="taost-box-text">确定要寄出吗?</view> <view class="taost-box-text">确定要寄出吗?</view>
<view class="taost-box-text">信件寄出后,再次使用晶石激活</view> <view class="taost-box-text">信件寄出后,再次使用晶石激活</view>
<view class="taost-box-text">将直接提示打开信件</view> <view class="taost-box-text">将直接提示打开信件</view>

@ -356,6 +356,17 @@ textarea {
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4);
} }
.taost-box2 {
width: 586rpx;
height: 434rpx;
padding-top: 88rpx;
box-sizing: border-box;
border-radius: 15px;
background-color: rgba(255, 255, 255, 1);
text-align: center;
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4);
}
.sound { .sound {
position: relative; position: relative;
width: 100%; width: 100%;

@ -9,19 +9,13 @@ Page({
data: { data: {
xzInfo:{}, xzInfo:{},
userInfo:{}, userInfo:{},
loverInfo:{},
xyNfc:true, xyNfc:true,
xyInfo:{}, xyInfo:{},
visible:false, visible:false,
showEnergy:true showEnergy:true
}, },
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.initXy()
this.getXzTp()
},
/**获取星座图片对应关系 */ /**获取星座图片对应关系 */
getXzTp(){ getXzTp(){
req.getRequest('/api/dict/value/horoscope-resource',{}).then((res)=>{ req.getRequest('/api/dict/value/horoscope-resource',{}).then((res)=>{
@ -32,6 +26,7 @@ Page({
console.log(err); console.log(err);
}) })
}, },
initXy(){ initXy(){
req.getRequest('/api/user/curt',{}).then((res)=>{ req.getRequest('/api/user/curt',{}).then((res)=>{
if(res.data.code==200){ if(res.data.code==200){
@ -44,6 +39,19 @@ Page({
}) })
this.setData({xyInfo:wx.getStorageSync('nfc')}) this.setData({xyInfo:wx.getStorageSync('nfc')})
}, },
// 获取情侣信息
getUserLoverInfo(){
req.getRequest('/api/user/curt/lover',{}).then((res)=>{
if(res.data.code==200){
this.setData({loverInfo:res.data.data})
wx.setStorageSync('xinyuan-userLoveInfo',res.data.data)
}
}).catch((err)=>{
console.log(err);
})
},
// 关闭运势提示 // 关闭运势提示
closeYs(){ closeYs(){
this.setData({visible: !this.data.visible, showEnergy: true}) this.setData({visible: !this.data.visible, showEnergy: true})
@ -100,6 +108,15 @@ Page({
}) })
}, },
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.initXy()
this.getXzTp()
this.getUserLoverInfo()
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
@ -113,6 +130,7 @@ Page({
this.initXy() this.initXy()
this.upImprove() this.upImprove()
this.getDefaultAvatars() this.getDefaultAvatars()
this.getUserLoverInfo()
}, },
/** /**

@ -81,19 +81,24 @@
<view wx:if="{{showDetail}}" class="wishdetail-box"> <view wx:if="{{showDetail}}" class="wishdetail-box">
<view class="wishdetail"> <view class="wishdetail">
<!-- <view class="popbox" bindtap="closeDetail"> <!-- <canvas canvas-id="myCanvas" class="myCanvas" wx:if="{{showCanvas}}"></canvas>
<t-image src="https://wish-assets.windymuse.com.cn/xy/jt.gif"/>
<view class="yximg"><t-image src="{{item.img}}"></t-image></view>
<view class="ywwz2">愿望</view>
<view class="ywxq2">{{item.content}}</view>
<view class="qwsj2">期望时间</view>
<view class="qwsjtxt2">{{item.deadline}}</view>
</view> -->
<canvas canvas-id="myCanvas" class="myCanvas" wx:if="{{showCanvas}}"></canvas>
<view id="my-canvas" class="my_canvas" bindtap="closeDetail"> <view id="my-canvas" class="my_canvas" bindtap="closeDetail">
<image class="logosta my_draw_canvas" src="https://oss.wish.ydxxkj.top/xy/jt.gif" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif"></image> <image class="logosta my_draw_canvas" src="https://oss.wish.ydxxkj.top/xy/jt.gif" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif"></image>
<image class="popbox my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/detailbkg.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/detailbkg.png"/> <image class="popbox my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/detailbkg.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/detailbkg.png"/>
<image class="yximg my_draw_canvas" src="{{item.img}}" data-type="image" data-url="{{item.img}}"/> <image class="yximg my_draw_canvas" mode="heightFix" src="{{item.img}}" data-type="image" data-url="{{item.img}}"/>
<text class="ywwz2 my_draw_canvas" data-type="text" data-text="愿望">愿望</text>
<view class="ywxq2 my_draw_canvas" data-type="text" data-text="{{item.content}}">{{item.content}}</view>
<view class="qwsj2 my_draw_canvas" data-type="text" data-text="期望时间">期望时间</view>
<view class="qwsjtxt2 my_draw_canvas" data-type="text" data-text="{{item.deadline}}">{{item.deadline}}</view>
</view> -->
<canvas canvas-id="myCanvas" class="myCanvas" wx:if="{{showCanvas}}"></canvas>
<view id="my-canvas" class="my_canvas">
<image class="logosta my_draw_canvas" src="https://oss.wish.ydxxkj.top/xy/jt.gif" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif"></image>
<image class="popbox my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/detailbkg.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/detailbkg.png"/>
<view class="yximg-box my_draw_canvas" data-url="{{detail.img}}" data-type="image" >
<image class="yximg my_draw_canvas" mode="heightFix" src="{{item.img}}" data-type="image" data-url="{{item.img}}"/>
</view>
<text class="ywwz2 my_draw_canvas" data-type="text" data-text="愿望">愿望</text> <text class="ywwz2 my_draw_canvas" data-type="text" data-text="愿望">愿望</text>
<view class="ywxq2 my_draw_canvas" data-type="text" data-text="{{item.content}}">{{item.content}}</view> <view class="ywxq2 my_draw_canvas" data-type="text" data-text="{{item.content}}">{{item.content}}</view>
<view class="qwsj2 my_draw_canvas" data-type="text" data-text="期望时间">期望时间</view> <view class="qwsj2 my_draw_canvas" data-type="text" data-text="期望时间">期望时间</view>

@ -424,14 +424,23 @@
margin-top: 20rpx; margin-top: 20rpx;
} }
.yximg{ .yximg-box {
position: absolute; position: absolute;
left: 80rpx; left: 80rpx;
top: 164rpx; top: 164rpx;
width: 460rpx;
height: 308rpx;
border-radius: 10px;
display: flex;
justify-content: center;
}
.yximg{
width: 460rpx; width: 460rpx;
height: 308rpx; height: 308rpx;
border-radius: 10px; border-radius: 10px;
background-color: #767686; background-color: #767686;
text-align: center;
} }
.yximg .t-image { .yximg .t-image {

@ -2,7 +2,7 @@
<!--返回图标--> <!--返回图标-->
<view class="top-header"> <view class="top-header">
<view class="header-reback" bindtap="go2Reback"></view> <view class="header-reback" bindtap="go2Reback"></view>
<view class="header-title">的愿望</view> <view class="header-title">Ta的愿望</view>
</view> </view>
<!-- 愿望内容 --> <!-- 愿望内容 -->
@ -53,7 +53,9 @@
<image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" wx:if="{{detail.status=='processing'}}"></image> <image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" wx:if="{{detail.status=='processing'}}"></image>
<image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/ygq.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/ygq.png" wx:if="{{detail.status=='expired'}}"></image> <image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/ygq.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/ygq.png" wx:if="{{detail.status=='expired'}}"></image>
<image class="popbox my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/detailbkg.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/detailbkg.png"/> <image class="popbox my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/detailbkg.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/detailbkg.png"/>
<image class="yximg my_draw_canvas" src="{{detail.img}}" data-type="image" data-url="{{detail.img}}"/> <view class="yximg-box my_draw_canvas" data-type="image" data-url="{{detail.img}}">
<image class="yximg my_draw_canvas" mode="heightFix" src="{{detail.img}}" data-type="image" data-url="{{detail.img}}"/>
</view>
<text class="ywwz my_draw_canvas" data-type="text" data-text="愿望">愿望</text> <text class="ywwz my_draw_canvas" data-type="text" data-text="愿望">愿望</text>
<view class="ywxq my_draw_canvas" data-type="text" data-text="{{detail.content}}">{{detail.content}}</view> <view class="ywxq my_draw_canvas" data-type="text" data-text="{{detail.content}}">{{detail.content}}</view>
<view class="qwsj my_draw_canvas" data-type="text" data-text="期望时间">期望时间</view> <view class="qwsj my_draw_canvas" data-type="text" data-text="期望时间">期望时间</view>
@ -63,11 +65,6 @@
<view class="ywcczk" wx:if="{{detail.status=='processing'}}"><!--进行中按钮展示--> <view class="ywcczk" wx:if="{{detail.status=='processing'}}"><!--进行中按钮展示-->
<view class="anwz1">
<view class="yqq" bindtap="go2DelDialog"></view>
<view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
</view>
<view class="anwz1"> <view class="anwz1">
<view class="yqq"></view> <view class="yqq"></view>
<view class="anwztxt1">修改</view> <view class="anwztxt1">修改</view>
@ -85,11 +82,6 @@
</view> </view>
</view> </view>
<view class="ywcczk" wx:if="{{detail.status=='completed'}}"><!--已完成按钮展示--> <view class="ywcczk" wx:if="{{detail.status=='completed'}}"><!--已完成按钮展示-->
<view class="anwz1">
<view class="yqq" bindtap="go2DelDialog"></view>
<view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
</view>
<view class="anwz1" bindtap="showShare"> <view class="anwz1" bindtap="showShare">
<view class="yqq"></view> <view class="yqq"></view>
<view class="anwztxt1">分享</view> <view class="anwztxt1">分享</view>
@ -97,11 +89,6 @@
</view> </view>
</view> </view>
<view class="ywcczk" wx:if="{{detail.status=='expired'}}"> <view class="ywcczk" wx:if="{{detail.status=='expired'}}">
<view class="anwz1">
<view class="yqq" bindtap="go2DelDialog"></view>
<view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
</view>
<view class="anwz1"> <view class="anwz1">
<view class="yqq"></view> <view class="yqq"></view>
<view class="anwztxt1">修改</view> <view class="anwztxt1">修改</view>
@ -112,18 +99,6 @@
</t-popup> </t-popup>
<!--确定删除对话框-->
<t-dialog
data-del="{{detail.id}}"
visible="{{showDelDialog}}"
content="确定要删除愿望吗?"
confirm-btn="{{ confirmBtn }}"
cancel-btn="取消"
confirm-btn="确定"
bind:confirm="confirmDelDialog"
bind:cancel="closeDelDialog"
/>
<!-- 分享 --> <!-- 分享 -->
<t-popup visible="{{shareVisible}}" placement="bottom"> <t-popup visible="{{shareVisible}}" placement="bottom">
<view class="popup-main"> <view class="popup-main">

@ -149,10 +149,18 @@
height: 1080rpx; height: 1080rpx;
} }
.yximg{ .yximg-box {
position: absolute; position: absolute;
left: 80rpx; left: 80rpx;
top: 164rpx; top: 164rpx;
width: 460rpx;
height: 308rpx;
border-radius: 10px;
display: flex;
justify-content: center;
}
.yximg{
width: 460rpx; width: 460rpx;
height: 308rpx; height: 308rpx;
border-radius: 10px; border-radius: 10px;

@ -53,7 +53,10 @@
<image class="logosta my_draw_canvas" src="https://oss.wish.ydxxkj.top/xy/jt.gif" data-type="image" data-url="https://oss.wish.ydxxkj.top/xy/jt.gif" wx:if="{{detail.status=='processing'}}"></image> <image class="logosta my_draw_canvas" src="https://oss.wish.ydxxkj.top/xy/jt.gif" data-type="image" data-url="https://oss.wish.ydxxkj.top/xy/jt.gif" wx:if="{{detail.status=='processing'}}"></image>
<image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/ygq.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/ygq.png" wx:if="{{detail.status=='expired'}}"></image> <image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/ygq.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/ygq.png" wx:if="{{detail.status=='expired'}}"></image>
<image class="popbox my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/detailbkg.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/detailbkg.png"/> <image class="popbox my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/detailbkg.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/detailbkg.png"/>
<image class="yximg my_draw_canvas" src="{{detail.img}}" data-type="image" data-url="{{detail.img}}"/> <view class="yximg-box my_draw_canvas" data-url="{{detail.img}}" data-type="image">
<image class="yximg my_draw_canvas" mode="heightFix" src="{{detail.img}}" data-type="image" data-url="{{detail.img}}"/>
</view>
<text class="ywwz my_draw_canvas" data-type="text" data-text="愿望">愿望</text> <text class="ywwz my_draw_canvas" data-type="text" data-text="愿望">愿望</text>
<view class="ywxq my_draw_canvas" data-type="text" data-text="{{detail.content}}">{{detail.content}}</view> <view class="ywxq my_draw_canvas" data-type="text" data-text="{{detail.content}}">{{detail.content}}</view>
<view class="qwsj my_draw_canvas" data-type="text" data-text="期望时间">期望时间</view> <view class="qwsj my_draw_canvas" data-type="text" data-text="期望时间">期望时间</view>
@ -81,7 +84,7 @@
</view> </view>
<view class="anwztxt1" >已达成</view> <view class="anwztxt1" >已达成</view>
</view> </view>
<view class="anwz1" bindtap="showShare"> <view class="anwz1" catchtap="showShare">
<view class="yqq"> <view class="yqq">
<t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image> <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image>
</view> </view>
@ -95,7 +98,7 @@
</view> </view>
<view class="anwztxt1">删除</view> <view class="anwztxt1">删除</view>
</view> </view>
<view class="anwz1" bindtap="showShare"> <view class="anwz1" catchtap="showShare">
<view class="yqq"> <view class="yqq">
<t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image> <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image>
</view> </view>
@ -137,7 +140,7 @@
<view class="main-top"> <view class="main-top">
<view></view> <view></view>
<view class="text">分享到</view> <view class="text">分享到</view>
<t-icon name="close" size="32" bindtap="showShare"/> <t-icon name="close" size="32" catchtap="showShare"/>
</view> </view>
<view class="main-box"> <view class="main-box">
<view class="box-item"> <view class="box-item">

@ -149,15 +149,23 @@
height: 1080rpx; height: 1080rpx;
} }
.yximg{ .yximg-box {
position: absolute; position: absolute;
left: 80rpx; left: 80rpx;
top: 164rpx; top: 164rpx;
width: 460rpx;
height: 308rpx;
display: flex;
justify-content: center;
}
.yximg{
width: 460rpx; width: 460rpx;
height: 308rpx; height: 308rpx;
border-radius: 10px; border-radius: 10px;
background-color: #767686; background-color: #767686;
} }
.ywwz{ .ywwz{
position: absolute; position: absolute;
top: 540rpx; top: 540rpx;

@ -62,15 +62,13 @@ Page({
}, },
/**扫码事件 */ /**扫码事件 */
scanCodeEvent(){ scanCodeEvent(){
var that = this;
var DEV_CODE = ""
//扫码代码 //扫码代码
wx.scanCode({ wx.scanCode({
onlyFromCamera: true,// 只允许从相机扫码 onlyFromCamera: true,// 只允许从相机扫码
success(res){ success: (res) => {
that.login('scan',res.result) this.login('scan',res.result)
}, },
}) })
}, },
/** /**
@ -79,29 +77,11 @@ Page({
* code为用户码参数用户码为空则代表为扫码登录 * code为用户码参数用户码为空则代表为扫码登录
*/ */
login(mode,code){ login(mode,code){
console.log(mode,'模式'); let DEV_CODE = code
console.log(code, 'code'); let PUBLIC_KEY = ""
//如果有token直接进入
if(wx.getStorageSync('token')){
wx.showToast({
title:'有token'+wx.getStorageSync('token'),
icon: 'none',
duration: 5000
})
wx.switchTab({
url: '/pages/home/xy/index'
})
}
// wx.showToast({
// title:'没有token',
// icon: 'none',
// duration: 5000
// })
console.log('进入登录了!!!')
var DEV_CODE = code
var PUBLIC_KEY = ""
req.getRequest('/api/dict/value/login-public-key',{}).then((res)=>{ req.getRequest('/api/dict/value/login-public-key',{}).then((res)=>{
if(res.data.code==200){//获取公钥成功 if(res.data.code === 200){
//获取公钥成功
PUBLIC_KEY = res.data.data PUBLIC_KEY = res.data.data
// 实例化rsa // 实例化rsa
const rsa = new WxmpRsa() const rsa = new WxmpRsa()
@ -110,27 +90,23 @@ Page({
// 加密 // 加密
const mac = rsa.encryptLong(DEV_CODE) const mac = rsa.encryptLong(DEV_CODE)
wx.setStorageSync('mac-key', mac) wx.setStorageSync('mac-key', mac)
// 此处执行登录获取token操作 // 此处执行登录获取token操作
req.postRequest('/api/user/login',{'mac':mac}).then((res)=>{ req.postRequest('/api/user/login',{'mac':mac}).then((res)=>{
console.log(res); if(res.data.code === 200){
if(res.data.code==200){ wx.setStorageSync('token', res.data.data.token)
wx.setStorageSync('token', res.data.data.token) wx.setStorageSync('isFirst', res.data.data.isFirst)
wx.setStorageSync('isFirst', res.data.data.isFirst) // 设置当前设备码
// 设置当前设备码 wx.setStorageSync('code', DEV_CODE)
wx.setStorageSync('code', DEV_CODE) // 设置为初次识别NFC
// 设置为初次识别NFC wx.setStorageSync('nfc', false)
wx.setStorageSync('nfc', false) // 判断用户是否有未读信札
wx.showToast({ this.getLetter()
title:mode=='scan'?'扫码登录成功':'NFC识别成功', }else if(res.data.code==500){
icon: 'none', this.loginErrorToast(mode)
duration: 1000 }else{
}) this.loginErrorToast(mode)
this.getLetter() }
}else if(res.data.code==500){
this.loginErrorToast(mode)
}else{
this.loginErrorToast(mode)
}
} }
) )
}else{ }else{
@ -141,12 +117,12 @@ Page({
}) })
} }
}).catch((err)=>{ }).catch((err)=>{
console.log(err); console.log(err);
}) })
}, },
// 判断是否用未读信札 // 判断是否用未读信札
getLetter(){ getLetter(){
console.log(wx.getStorageSync('token'));
wx.request({ wx.request({
url: 'https://xzjl-api.windymuse.cn/api/user/curt', url: 'https://xzjl-api.windymuse.cn/api/user/curt',
header: {'Authorization': wx.getStorageSync('token')}, header: {'Authorization': wx.getStorageSync('token')},
@ -155,14 +131,13 @@ Page({
const letterStatus = res.data.data.letterStatus const letterStatus = res.data.data.letterStatus
// 这里可以判断是否有未读信札 // 这里可以判断是否有未读信札
if (letterStatus === 'sending') { if (letterStatus === 'sending') {
console.log('跳转信札页面');
wx.redirectTo({ wx.redirectTo({
url: '/pages/xz/index' url: '/pages/xz/index'
}) })
}else { }else {
wx.switchTab({ wx.switchTab({
url: '/pages/home/xy/index' url: '/pages/home/xy/index'
}) })
} }
} }
}) })

@ -17,14 +17,7 @@
}, },
{ {
"name": "", "name": "",
"pathName": "pages/home/xx/hy/yx/yx", "pathName": "pages/home/xx/lindex/lindex",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/home/xx/hy/hx/hx",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null

Loading…
Cancel
Save