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

@ -17,6 +17,7 @@ Page({
minute:0,
minutes:0,
pickerValue: [0, 0],
swiperIndex: 0,
prayTime:0, //祈祷时间
prayTimeStr: '选择祈祷时长' ,
prayerContent:'', //祈祷内容
@ -284,6 +285,12 @@ Page({
},
btnOK(){
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){
return Toast({
context: this,
@ -342,7 +349,20 @@ Page({
})
},
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)=>{
console.log(res);
if(res.data.code === 200){
@ -357,12 +377,13 @@ Page({
showEnergySuccess:!this.data.showEnergySuccess,
})
},2000)
}
this.setData({
}else if(res.data.code === 500){
return this.setData({
showEnergy:!this.data.showEnergy,
showEnergyToast:!this.data.showEnergyToast,
toast:res.data.msg
toast: '对方能量已经满啦~'
})
}
}).catch((err)=>{
console.log('111');
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) {
const { item } = e.currentTarget.dataset;
this.setData(
{
},
() => {
this.setData({ visible: true });
},
);
this.setData({ visible: !this.data.visible });
}
,
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" />
<!--单人页面-->
<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}}'>
<!--未祈祷头像名字-->
@ -194,7 +89,7 @@
</view>
<!--中间祈祷-->
<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:else>结束祈祷</view>
</view>
@ -208,6 +103,7 @@
color="#00A7FF"
label=""
t-class-bar="dcleft1"
stroke-width="10rpx"
/>
<view class="dcrbs" bindtap="openEnergy"></view>
</view>
@ -216,6 +112,111 @@
</view>
</swiper-item>
<!--单人页面-->
<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}}'>
<!--头像名字-->
@ -256,33 +257,18 @@
</view>
</view>
<t-popup class="ttpopup" visible="{{visible}}" bind:visible-change="onVisibleChange" placement="{{'center'}}">
<view class="ttpopup">
<view class="tips">Tips记得提醒ta哦</view>
<view class="ztys">{{loverInfo.horoscope.summary}}</view>
<view class="rjkzs"><t-rate value="3" icon="{{ ['star-filled', 'star'] }}" color="#FFFF00" /></view>
<view class="jkzs"></view>
<view class="aqzs"></view>
<view class="raqzs"><t-rate value="3" icon="{{ ['star-filled', 'star'] }}" color="#FFFF00" /></view>
<view class="cyzs"></view>
<view class="rcyzs"><t-rate value="3" icon="{{ ['star-filled', 'star'] }}" color="#FFFF00" /></view>
<view class="ysfgx"></view>
</view>
</t-popup>
</swiper-item>
</swiper>
<!-- 未祈祷弹层 -->
<view class="pray" wx:if="{{showPray}}">
<view class="dialog">
<view class="dialog-item">
<text>祈祷内容</text>
<text class="dialog-item-text">祈祷内容</text>
<textarea model:value="{{prayerContent}}" placeholder="请写下你要祈祷的内容" bindblur="getTextValue"></textarea>
</view>
<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>
<view class="dialog-btn">
@ -314,7 +300,7 @@
<view class="pray" wx:if="{{showIsPray}}">
<view class="dialog">
<t-toast id="t-toast" />
<view class="dialog-text">
<view class="dialog-text-end-pray">
<view>要结束祈祷吗?</view>
<view>将返还{{energy}}%星座能量</view>
<view>溢出能量将消失</view>
@ -340,7 +326,7 @@
</view>
</view>
</view>
<!-- 赠送能量提示 -->
<!-- 能量已满提示 -->
<view class="pray" wx:if="{{showEnergyToast}}">
<view class="dialog">
<t-toast id="t-toast" />
@ -391,7 +377,32 @@
<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>
<!-- 轮播图滑块按钮 -->
<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 {
height: 130rpx;
height: 170rpx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.lovepic{
@ -335,8 +336,6 @@ page {
}
.dchxtxtql{
width:200rpx;
height:16rpx;
text-align: center;
color: #9a9a9a;
font-size: 28rpx;
@ -345,6 +344,7 @@ page {
.txl{
width:72rpx;
height:72rpx;
border-radius: 50% !important;
margin-left: 30rpx;
background-repeat: no-repeat;
background-size:100% 100%;
@ -355,6 +355,7 @@ page {
width:72rpx;
height:72rpx;
margin-right: 30rpx;
border-radius: 50% !important;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/tx.png);
@ -684,143 +685,131 @@ page {
font-size: 28rpx;
}
.popup {
position: absolute;
top: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.ttpopup{
width: 659.33rpx;
width: 660rpx;
height: 804rpx;
background:rgba(255, 255, 255, 0.9);
border-radius: 36rpx;
border-radius: 30rpx;
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;
}
.ztys{
position: absolute;
.ttpopup-item {
margin-bottom: 24rpx;
display: flex;
flex-direction: column;
background-repeat: no-repeat;
background-size:100% 100%;
left: 46rpx;
top:98rpx;
width: 284px;
height: 159px;
line-height: 50rpx;
align-items: center;
justify-content: space-around;
}
.ztys{
margin-top: 26rpx;
line-height: 160%;
color: rgba(108, 108, 108, 1);
font-size: 16px;
font-size: 32rpx;
text-align: start;
}
.jkzs{
position: absolute;
width: 111.33rpx;
height: 26.67rpx;
display: flex;
flex-direction: column;
background-repeat: no-repeat;
background-size:100% 100%;
margin-left:97.33rpx;
margin-top: 589.33rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/jkzs.png);
}
.aqzs{
position: absolute;
width: 111.33rpx;
height: 26.67rpx;
display: flex;
flex-direction: column;
background-repeat: no-repeat;
background-size:100% 100%;
margin-left:97.33rpx;
margin-top: 653.33rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/aqzs.png);
}
.cyzs{
position: absolute;
width: 111.33rpx;
height: 26.67rpx;
display: flex;
flex-direction: column;
background-repeat: no-repeat;
background-size:100% 100%;
margin-left:97.33rpx;
margin-top: 717.33rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/cyzs.png);
}
.rjkzs{
position: absolute;
width: 311.33rpx;
height: 26.67rpx;
line-height: 26.67rpx;
display: flex;
flex-direction: column;
margin-left:279.33rpx;
margin-top: 580.33rpx;
}
.raqzs{
position: absolute;
width: 111.33rpx;
height: 26.67rpx;
line-height:26.67rpx;
display: flex;
flex-direction: column;
background-repeat: no-repeat;
background-size:100% 100%;
margin-left:279.33rpx;
margin-top: 644.33rpx;
}
.rcyzs{
position: absolute;
width: 111.33rpx;
height: 26.67rpx;
line-height:26.67rpx;
display: flex;
flex-direction: column;
background-repeat: no-repeat;
background-size:100% 100%;
margin-left:279.33rpx;
margin-top: 708.33rpx;
}
.jltxt{
position: absolute;
right: 0;
top: 504px;
width: 75px;
height: 35px;
top: 1008rpx;
width: 150rpx;
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%);
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
border: 6rpx solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1);
font-size: 14px;
font-size: 28rpx;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.tips{
position: absolute;
left: 46rpx;
top: 36rpx;
width: 119px;
height: 18px;
color: rgba(248, 99, 42, 1);
font-size: 12px;
font-size: 24rpx;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.ysfgx{
position: absolute;
left: 90rpx;
top: 486rpx;
width: 240px;
height: 11px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/ysfgx.png);
margin-top: 70rpx;
width: 100%;
display: flex;
justify-content: center;
margin-bottom: 78rpx;
}
.ysfgx image {
width: 480rpx;
height: 22rpx;
}
/* 弹层 */
@ -832,16 +821,16 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/ysfgx.png);
.dialog {
position: absolute;
bottom: 500rpx;
width: 648rpx;
height: 484rpx;
width: 586rpx;
height: 434rpx;
padding: 50rpx;
z-index: 999;
box-sizing: border-box;
line-height: 20px;
border-radius: 15px;
border-radius: 30rpx;
background-color: rgba(255, 255, 255, 1);
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 {
@ -864,6 +853,10 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/ysfgx.png);
border: 1px solid rgba(236, 236, 236, 1);
}
.dialog-item-text {
width: 144rpx;
}
.dialog-item text {
padding-top: 16rpx;
color: #6C6C6C;
@ -907,19 +900,33 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/ysfgx.png);
}
.dialog-text {
height: 300rpx;
color: rgba(108, 108, 108, 1);
font-size: 18px;
font-size: 36rpx;
text-align: center;
font-weight: 400;
padding-top: 60rpx;
box-sizing: border-box;
margin-bottom: 100rpx;
}
.dialog-text view {
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 {
position: absolute;
bottom: 0;
@ -1038,3 +1045,23 @@ picker-view-column {
width: 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){
// 判断两天次数
if (!this.data.times && !this.data.userInfo.isChatVip) {
return wx.showToast({
title: '开通会员继续聊天',
icon: 'none'
})
}
const ctn = e.currentTarget.dataset.ctn
if (ctn === '1') {
this.setData({ltinfo: '请告诉我未来一个月的星座运势'})

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

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

@ -8,7 +8,7 @@ Page({
*/
data: {
visible:false,
image: []
image: ''
},
go2Reback(){
wx.navigateTo({
@ -37,14 +37,20 @@ Page({
},
blockClick(e){
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({
visible: true,
image: [e.target.dataset.url]
image: e.target.dataset.url,
resourceId:num
})
},
downloadBtn(){
wx.downloadFile({
url: this.data.image[0],
url: this.data.image,
success: (res) => {
if (res.statusCode === 200) {
const tempFilePath = res.tempFilePath;
@ -110,14 +116,26 @@ Page({
delBtnHx(){
const hxlist = this.data.hxlist
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);
if (isSelf) {
req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => {
console.log(res);
if (res.data.code === 200) {
this.getList()
this.setData({delKey: ''})
this.setData({delKey: '', visible:false})
wx.showToast({
title:'删除成功',
icon: 'success'
})
}
})
}else {
wx.showToast({
title:'只能删除自己的回忆',
icon: 'none'
})
}
},
closeViewer(){this.setData({visible: false})},
getList(){

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

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

@ -64,6 +64,7 @@
top: 334rpx;
width: 100%;
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);
}

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

@ -1,16 +1,18 @@
<!--pages/home/xx/hy/index.wxml-->
<!--返回图标-->
<view class="header">
<view class="reback" bindtap="go2Reback"></view>
<view class="title">音讯</view>
<view class="title">音迅</view>
</view>
<!-- 中间主体 -->
<view class="main">
<view class="main-bgc" />
<t-swipe-cell wx:for="{{ list }}" wx:key="index">
<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-name">{{nick}}</view>
<view class="item-text-name">{{item.isSelf ? userInfo.nick : nick}}</view>
<view class="item-text-time">{{item.createdAt}}</view>
</view>
<view class="item-right" bindtap="playAudio" data-item="{{item}}">
@ -18,7 +20,7 @@
<view class="item-right-text">{{item.extra.ssec}}</view>
</view>
</view>
<view slot="right" class="delete-btn" bindtap="delLetter" data-id="{{item.id}}">删除</view>
<view slot="right" class="delete-btn" bindtap="delLetter" data-item="{{item}}">删除</view>
</t-swipe-cell>
</view>

@ -1,31 +1,37 @@
/* pages/home/xx/hy/index.wxss */
.reback{
.header {
position: fixed;
margin-left: 20rpx;
margin-top:108rpx;
top: 0;
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;
height:48rpx;
background-repeat: no-repeat;
background-size:100% 100%;
z-index: 1;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
}
.title{
position: fixed;
left: 278rpx;
top: 108rpx;
width: 196rpx;
height: 48rpx;
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
text-align: center;
z-index: 1;
font-family: SourceHanSansSC-regular;
}
.xfgjl{
position: fixed;
left: 0px;
bottom: 0;
left: 0;
display: flex;
justify-content: space-evenly;
margin-top: 1416rpx;
@ -51,12 +57,14 @@
}
.main {
position: absolute;
/* position: absolute; */
width: 100%;
height: 100%;
padding-top: 208rpx;
padding-bottom: 200rpx;
box-sizing: border-box;
background-size: contain;
overflow-y: scroll;
}
.main-bgc {
@ -64,6 +72,7 @@
top: 334rpx;
width: 100%;
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);
}

@ -7,7 +7,9 @@ Page({
* 页面的初始数据
*/
data: {
showZt: false,
msgZt: '',
userInfo: {}
},
go2Reback(){
wx.navigateTo({
@ -35,11 +37,22 @@ Page({
})
},
delLetter(e){
const id = e.target.dataset.id
const id = e.target.dataset.item.id
const isSelf = e.target.dataset.item.isSelf
if (isSelf) {
req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => {
console.log(res, '删除成功');
wx.showToast({
title: '删除成功',
icon: 'success'
})
this.getList()
})
}else {
wx.showToast({
title: '只能删除自己的回忆',
icon: 'none'
})
}
},
getList(){
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) {
this.getList()
this.getLoveInfo()
this.setData({
userInfo: wx.getStorageSync('xinyuan-userInfo')
})
},
/**

@ -1,23 +1,27 @@
<!--pages/home/xx/hy/index.wxml-->
<!--返回图标-->
<view class="header">
<view class="reback" bindtap="go2Reback"></view>
<view class="title">纸条</view>
</view>
<!-- 中间主体 -->
<view class="main">
<view class="main-bgc" />
<t-swipe-cell wx:for="{{ list }}" wx:key="index">
<view class="main-item">
<view class="item-left"></view>
<view class="item-left">
<image src="{{item.isSelf ? userInfo.avatar : avatar}}" />
</view>
<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>
<view class="item-right">
<view class="item-right" bindtap="readingNote" data-content="{{item.content}}">
{{item.content}}
</view>
</view>
<view slot="right" class="delete-btn" bindtap="delLetter" data-id="{{item.id}}">删除</view>
<view slot="right" class="delete-btn" bindtap="delLetter" data-item="{{item}}">删除</view>
</t-swipe-cell>
</view>
@ -28,3 +32,13 @@
<view class="xxqlcd xxqlcd3" bindtap="go2Hx">画像</view>
<view class="xxqlcd xxqlcd4" bindtap="go2Zt">纸条</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 */
.reback{
.header {
position: fixed;
margin-left: 20rpx;
margin-top:108rpx;
top: 0;
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;
height:48rpx;
background-repeat: no-repeat;
background-size:100% 100%;
z-index: 1;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
}
.title{
position: fixed;
left: 278rpx;
top: 108rpx;
width: 196rpx;
height: 48rpx;
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
text-align: center;
z-index: 1;
font-family: SourceHanSansSC-regular;
}
.xfgjl{
position: fixed;
left: 0px;
bottom: 0;
left: 0;
display: flex;
justify-content: space-evenly;
margin-top: 1416rpx;
@ -51,12 +57,14 @@
}
.main {
position: absolute;
/* position: absolute; */
width: 100%;
height: 100%;
padding-top: 208rpx;
padding-bottom: 200rpx;
box-sizing: border-box;
background-size: contain;
overflow-y: scroll;
}
.main-bgc {
@ -64,6 +72,7 @@
top: 334rpx;
width: 100%;
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);
}
@ -84,6 +93,12 @@
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
}
.item-left image {
width: 100%;
height: 100%;
border-radius: 50%;
}
.item-text {
flex: 1;
height: 100%;
@ -93,14 +108,16 @@
.item-right {
width: 366rpx;
height: 120rpx;
line-height: 120rpx;
padding: 0 30rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
text-align: center;
box-sizing: border-box;
background-size: contain;
color: rgba(51, 51, 51, 1);
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);
}
@ -126,3 +143,53 @@
align-items: center;
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:[],
loverInfo:{},
hasLover:false,// 是否单身
userInfo:{}
userInfo:{},
savePicture: false, // 保存图片成功
soundData:{} //音频数据
},
doLuYINBoF(e){
// 判断点击的是否为对方的语音
@ -165,30 +167,30 @@ Page({
do2FsLuyin(){/**发送录音按钮 */
this.data.RM.stop();
// this.data.RM.stop();
console.log('发送录音')
this.setData({luyinVisible:false})
let tt= this
this.data.RM.onStop((res)=>{
// this.data.RM.onStop((res)=>{
//录音时长判断
console.log('发送录音了1111。。')
// 先计算分钟
let fz = 0
let mz = 0
let hm = 0
if(res.duration>=60*1000){
fz = Math.floor(res.duration/(60*1000))
if(this.data.soundData.duration>=60*1000){
fz = Math.floor(this.data.soundData.duration/(60*1000))
}
if(res.duration>=1000){
mz = Math.floor((res.duration-fz*60*1000)/(1000))
if(this.data.soundData.duration>=1000){
mz = Math.floor((this.data.soundData.duration-fz*60*1000)/(1000))
}
hm = res.duration - fz*60*1000-mz*1000
let sec = Math.floor(res.duration/1000)
hm = this.data.soundData.duration - fz*60*1000-mz*1000
let sec = Math.floor(this.data.soundData.duration/1000)
let ssec = fz+'\''+mz+'\'\''
console.log(ssec)
wx.uploadFile({
url: 'https://xzjl-api.windymuse.cn/api/resource',
filePath: res.tempFilePath,
filePath: this.data.soundData.tempFilePath,
name: 'file',
header: {
'Authorization': wx.getStorageSync('token'),
@ -218,20 +220,19 @@ Page({
showToast('图片上传失败');
}
})
console.log(res)//这里是必须写完成事件的,因为最后的文件,就在这里面;
res.tempFilePath;//是临时的文件地址
res.duration;//录音的时长
res.fileSize;//文件的大小
})
// })
},
doStopLuyin(){
this.setData({luYinStatus:2})
clearInterval(this.data.timer)
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(){
this.setData({RM:wx.getRecorderManager()})
@ -251,6 +252,18 @@ Page({
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(){
let second = this.data.second
@ -361,14 +374,12 @@ Page({
let that= this;
wx.downloadFile({
url: that.data.imgPicUrl,//图片的地址
success:function(res){
success:(res) => {
const tempFilePath = res.tempFilePath //通过res中的tempFilePath 得到需要下载的图片地址
wx.saveImageToPhotosAlbum({
filePath: tempFilePath, //设置下载图片的地址
success:function(){
wx.showToast({
title: '保存图片成功',
})
success:() => {
this.setData({savePicture: true})
}
})
}
@ -377,22 +388,25 @@ Page({
},
go2Reback1(){
//wx.navigateBack({ changed: true });
this.setData({dkTpVisible:false})
this.setData({dkTpVisible:false,savePicture:false})
},
go2Reback(){
wx.switchTab({
wx.reLaunch({
url: '/pages/home/xy/index',
})
},
go2SeeHxDetail(e){
console.log(e,'1111');
this.setData({imgPicUrl:e.currentTarget.dataset.tp})
this.setData({dkTpVisible:true})
console.log(e.currentTarget.dataset.tp)
console.log('查看图片详情')
const id = e.currentTarget.dataset.id
if (id) {
req.patchRequest(`/api/user/curt/message/${id}/read`,{}).then(res => {
console.log(res);
})
}
},
//bindtap="dKztDetial" data-xq="{{item}}"
dKztDetial(e){/**查看详情 */
@ -474,7 +488,7 @@ Page({
}
})
this.setData({messages:list.reverse()})
this.setData({messages:list})
}
}).catch((err)=>{
console.log(err);
@ -601,11 +615,12 @@ Page({
this.doQueryInit()
this.doMessageInfo()
const time = setInterval(() => {
this.doMessageInfo()
console.log('1111');
}, 2000);
this.setData({time: time})
// 轮询获取信息
// const time = setInterval(() => {
// this.doMessageInfo()
// console.log('1111');
// }, 2000);
// this.setData({time: time})
},
/**
@ -629,6 +644,7 @@ Page({
onUnload() {
clearInterval(this.data.timer)
this.data.innerAudioContext.stop()
clearInterval(this.data.time)
},
/**

@ -195,7 +195,7 @@
<!--写纸条弹窗-->
<t-popup visible="{{ztVisible}}" placement="top" class="ztPop">
<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="qran1 btn1" bindtap="doFSZt">发送</view>
</t-popup>
@ -213,9 +213,13 @@
<view class="reback" bindtap="go2Reback1"></view>
<view class="title">画像</view>
</view>
<view class="ztPop1-img">
<t-image src="{{imgPicUrl}}" mode="widthFix" class="tppp1"></t-image>
<!--返回图标-->
</view>
<view class="ztPop1-btn">
<view class="ztPop1-btn-text" wx:if="{{savePicture}}">画像保存成功</view>
<view class="tpBcan1" bindtap="go2BcPic">保存</view>
</view>
</t-popup>
<!--录音弹窗-->
@ -232,9 +236,13 @@
<view class="wlyan2" ></view>
</view>
<!--录音按钮--> <!--已结束-->
<view class="weiluyinanniu" wx:if="{{luYinStatus==2}}" >
<view class="weiluyinanniu" wx:if="{{luYinStatus==2}}" bindtap="doListen">
<view class="wlyan3"></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="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{
width: 100%;
height: 150rpx;
height: 220rpx;
padding: 0 32rpx;
box-sizing: border-box;
display: flex;
align-items: center;
@ -679,20 +680,14 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
}
.tppp1{
position: absolute;
width: 750rpx;
height: auto;
top:50%;
margin-top: 300rpx;
width: 100%;
}
.ztPop1{
position: relative;
width: 750rpx ;
height: 1624rpx;
width: 100% ;
height: 100%;
margin: 0!important;
padding: 0!important;
display: table-cell;
vertical-align: middle;
}
.ztPop1-header {
@ -704,23 +699,48 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
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;
top: 1400rpx;
right: 32rpx;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
text-align: center;
}
.tpBcan1{
width: 110rpx;
height: 70rpx;
line-height: 70rpx;
border-radius: 20rpx;
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);
box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1);
font-size: 28rpx;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.block{
width: 750rpx;
@ -903,6 +923,18 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
background-size: cover;
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{
position: absolute;
width: 750rpx;

@ -90,7 +90,7 @@
<view class="taost" wx:if="{{showSoundMore}}">
<view class="taost-box">
<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>
</view>

@ -90,7 +90,7 @@
<view class="taost" wx:if="{{showSoundMore}}">
<view class="taost-box">
<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>
</view>
@ -104,7 +104,7 @@
</view>
<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>

@ -356,6 +356,17 @@ textarea {
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 {
position: relative;
width: 100%;

@ -9,19 +9,13 @@ Page({
data: {
xzInfo:{},
userInfo:{},
loverInfo:{},
xyNfc:true,
xyInfo:{},
visible:false,
showEnergy:true
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.initXy()
this.getXzTp()
},
/**获取星座图片对应关系 */
getXzTp(){
req.getRequest('/api/dict/value/horoscope-resource',{}).then((res)=>{
@ -32,6 +26,7 @@ Page({
console.log(err);
})
},
initXy(){
req.getRequest('/api/user/curt',{}).then((res)=>{
if(res.data.code==200){
@ -44,6 +39,19 @@ Page({
})
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(){
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.upImprove()
this.getDefaultAvatars()
this.getUserLoverInfo()
},
/**

@ -81,19 +81,24 @@
<view wx:if="{{showDetail}}" class="wishdetail-box">
<view class="wishdetail">
<!-- <view class="popbox" bindtap="closeDetail">
<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>
<!-- <canvas canvas-id="myCanvas" class="myCanvas" wx:if="{{showCanvas}}"></canvas>
<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="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" 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" bindtap="closeDetail">
<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"/>
<image class="yximg my_draw_canvas" src="{{item.img}}" data-type="image" data-url="{{item.img}}"/>
<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>
<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>

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

@ -2,7 +2,7 @@
<!--返回图标-->
<view class="top-header">
<view class="header-reback" bindtap="go2Reback"></view>
<view class="header-title">的愿望</view>
<view class="header-title">Ta的愿望</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/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="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>
<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>
@ -63,11 +65,6 @@
<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="yqq"></view>
<view class="anwztxt1">修改</view>
@ -85,11 +82,6 @@
</view>
</view>
<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="yqq"></view>
<view class="anwztxt1">分享</view>
@ -97,11 +89,6 @@
</view>
</view>
<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="yqq"></view>
<view class="anwztxt1">修改</view>
@ -112,18 +99,6 @@
</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">
<view class="popup-main">

@ -149,10 +149,18 @@
height: 1080rpx;
}
.yximg{
.yximg-box {
position: absolute;
left: 80rpx;
top: 164rpx;
width: 460rpx;
height: 308rpx;
border-radius: 10px;
display: flex;
justify-content: center;
}
.yximg{
width: 460rpx;
height: 308rpx;
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://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="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>
<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>
@ -81,7 +84,7 @@
</view>
<view class="anwztxt1" >已达成</view>
</view>
<view class="anwz1" bindtap="showShare">
<view class="anwz1" catchtap="showShare">
<view class="yqq">
<t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image>
</view>
@ -95,7 +98,7 @@
</view>
<view class="anwztxt1">删除</view>
</view>
<view class="anwz1" bindtap="showShare">
<view class="anwz1" catchtap="showShare">
<view class="yqq">
<t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image>
</view>
@ -137,7 +140,7 @@
<view class="main-top">
<view></view>
<view class="text">分享到</view>
<t-icon name="close" size="32" bindtap="showShare"/>
<t-icon name="close" size="32" catchtap="showShare"/>
</view>
<view class="main-box">
<view class="box-item">

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

@ -62,13 +62,11 @@ Page({
},
/**扫码事件 */
scanCodeEvent(){
var that = this;
var DEV_CODE = ""
//扫码代码
wx.scanCode({
onlyFromCamera: true,// 只允许从相机扫码
success(res){
that.login('scan',res.result)
success: (res) => {
this.login('scan',res.result)
},
})
},
@ -79,29 +77,11 @@ Page({
* code为用户码参数用户码为空则代表为扫码登录
*/
login(mode,code){
console.log(mode,'模式');
console.log(code, 'code');
//如果有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 = ""
let DEV_CODE = code
let PUBLIC_KEY = ""
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
// 实例化rsa
const rsa = new WxmpRsa()
@ -110,21 +90,17 @@ Page({
// 加密
const mac = rsa.encryptLong(DEV_CODE)
wx.setStorageSync('mac-key', mac)
// 此处执行登录获取token操作
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('isFirst', res.data.data.isFirst)
// 设置当前设备码
wx.setStorageSync('code', DEV_CODE)
// 设置为初次识别NFC
wx.setStorageSync('nfc', false)
wx.showToast({
title:mode=='scan'?'扫码登录成功':'NFC识别成功',
icon: 'none',
duration: 1000
})
// 判断用户是否有未读信札
this.getLetter()
}else if(res.data.code==500){
this.loginErrorToast(mode)
@ -144,9 +120,9 @@ Page({
console.log(err);
})
},
// 判断是否用未读信札
getLetter(){
console.log(wx.getStorageSync('token'));
wx.request({
url: 'https://xzjl-api.windymuse.cn/api/user/curt',
header: {'Authorization': wx.getStorageSync('token')},
@ -155,7 +131,6 @@ Page({
const letterStatus = res.data.data.letterStatus
// 这里可以判断是否有未读信札
if (letterStatus === 'sending') {
console.log('跳转信札页面');
wx.redirectTo({
url: '/pages/xz/index'
})

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

Loading…
Cancel
Save