去掉跳转页面链接

zw-dev
lsl 3 years ago
parent 8aa2d6772c
commit cc5fc9992e

@ -25,7 +25,11 @@
"pages/home/xyc/tdyw/tdyw",
"pages/home/me/grzl/grzl",
"pages/home/jl/jlai",
"pages/home/jl/jlai/jlai"
"pages/home/jl/jlai/jlai",
"pages/home/xx/hy/index",
"pages/home/xx/hy/hx/hx",
"pages/home/xx/hy/xz/zt",
"pages/home/xx/hy/zt/zt"
],
"window": {
"backgroundTextStyle": "light",

@ -1,11 +1,93 @@
// pages/home/jl/index.js
const app = getApp();//新建页面时 默认引入
const req = app.xzjlReq();//初始化一个的request() 实例
Page({
/**
* 页面的初始数据
*/
data: {
singleShow:false,
loverShow:false,
xingxiangtu:{},
userInfo:{},
loverInfo:{},
showSexLogo:false,//不展示形象修改按钮
},
ShowOrNotLogoS(){
this.setData({singleShow:!this.data.singleShow})
},
ShowOrNotLogoL(){
this.setData({loverShow:!this.data.loverShow})
},
doSetXxtAnimal(){
this.doSetXxt('animal')
},
doSetXxtMale(){
this.doSetXxt('male')
},
doSetXxtFemale(){
this.doSetXxt('female')
},
doSetXxt(e){
req.patchRequest('/api/user/curt',{spriteType:e}).then((res)=>{
if(res.data.code==200){
}
this.getUserInfo()
}).catch((err)=>{
console.log(err);
})
},
doSetXxtAnimalS(){
this.doSetXxtS('animal')
},
doSetXxtMaleS(){
this.doSetXxtS('male')
},
doSetXxtFemaleS(){
this.doSetXxtS('female')
},
doSetXxtS(e){
req.patchRequest('/api/user/curt/lover',{spriteType:e}).then((res)=>{
if(res.data.code==200){
}
this.getUserLoverInfo()
}).catch((err)=>{
console.log(err);
})
},
getXxObj(){/**获取形象对应的图片 */
req.getRequest('/api/dict/values/sprite-type',{}).then((res)=>{
if(res.data.code==200){
this.setData({xingxiangtu:res.data.data})
}
console.log(this.data.xingxiangtu);
}).catch((err)=>{
console.log(err);
})
},
ShowOrNotLogo(){
this.setData({showSexLogo:!this.data.showSexLogo})
},
getUserLoverInfo(){
req.getRequest('/api/user/curt/lover',{}).then((res)=>{
if(res.data.code==200){
this.setData({loverInfo:res.data.data})
}
console.log(this.userInfo);
}).catch((err)=>{
console.log(err);
})
},
getUserInfo(){
req.getRequest('/api/user/curt',{}).then((res)=>{
if(res.data.code==200){
this.setData({userInfo:res.data.data})
}
console.log(this.userInfo);
}).catch((err)=>{
console.log(err);
})
},
go2Jlai(){
wx.navigateTo({
@ -18,7 +100,9 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getUserInfo()
this.getUserLoverInfo()
this.getXxObj()
},
/**

@ -2,6 +2,7 @@
"usingComponents": {
"t-progress": "tdesign-miniprogram/progress/progress",
"t-popup": "tdesign-miniprogram/popup/popup",
"t-rate": "tdesign-miniprogram/rate/rate"
"t-rate": "tdesign-miniprogram/rate/rate",
"t-image": "tdesign-miniprogram/image/image"
}
}

@ -1,20 +1,21 @@
<swiper class="call">
  <swiper-item class="call1"><!--单人页面-->
<view class="tx"></view><!--最上方头像栏-->
<view class="txtext">为七个字的头像</view><!--头像名字-->
<t-image class="tx" src="{{userInfo.avatar}}"></t-image>
<view class="txtext">{{userInfo.nick}}</view><!--头像名字-->
<view class="gh"></view>
<div class="bkg3"></div><!--点点点,最底层背景图-->
<dic class="bkg1"></dic><!--黄色点背景图-->
<view class="gh"></view>
<view class="xxt"></view><!--形象图-->
<view class="yan1">
<t-image src="{{xingxiangtu[userInfo.spriteType]}}" class="xxt" bindtap="ShowOrNotLogo"></t-image>
<view class="yan1" wx:if="{{showSexLogo}}" data-yan="animal" bindtap="doSetXxtAnimal"><!--动物形象-->
<view class="yan11"></view>
</view>
<view class="yan2">
<view class="yan2" wx:if="{{showSexLogo}}" data-yan="male" bindtap="doSetXxtMale"><!--男性形象-->
<view class="yan12"></view>
</view>
<view class="yan3">
<view class="yan3" wx:if="{{showSexLogo}}" data-yan="female" bindtap="doSetXxtFemale"><!--女性形象-->
<view class="yan13"></view>
</view>
@ -37,36 +38,35 @@
  <swiper-item class="call1"><!--情侣页面-->
<view class="txl"></view><!--头像1-->
<view class="txtextl">七个字的头像</view><!--头像名字1-->
<t-image class="txl" src="{{userInfo.avatar}}"></t-image>
<view class="txtextl">{{userInfo.nick}}</view><!--头像名字1-->
<view class="jiuchan"></view>
<view class="txr"></view><!--头像2-->
<view class="txtextr">为七个字的头像</view><!--头像名字2-->
<t-image class="txr" shape="circle" src="{{loverInfo.avatar}}"></t-image><!--头像2-->
<view class="txtextr">{{loverInfo.nick}}</view><!--头像名字2-->
<dic class="bkg1"></dic><!--黄色点背景图-->
<div class="bkg3"></div><!--点点点,最底层背景图-->
<view class="xxtl"></view><!--左侧人形象-->
<view class="xxtr"></view><!--右侧人形象-->
<t-image src="{{xingxiangtu[userInfo.spriteType]}}" class="xxtl" bindtap="ShowOrNotLogoS"></t-image><!--左侧人形象-->
<t-image src="{{xingxiangtu[loverInfo.spriteType]}}" class="xxtr" bindtap="ShowOrNotLogoL"></t-image><!--右侧人形象-->
<view class="gh"></view><!--下方光环-->
<view class="yanql1">
<view class="yanql1" bindtap="doSetXxtFemale" wx:if="{{singleShow}}"><!--左侧女性按钮-->
<view class="yan13"></view>
</view>
<view class="yanql2">
<view class="yanql2" bindtap="doSetXxtAnimal" wx:if="{{singleShow}}"><!--左侧动物设置图标-->
<view class="yan11"></view>
</view>
<view class="yanql3" ></view>
<view class="yanql4">
<view class="yanql4" bindtap="doSetXxtFemaleS" wx:if="{{loverShow}}"><!--右侧女性图标设置-->
<view class="yan13"></view>
</view>
<view class="yanql5">
<view class="yanql5" bindtap="doSetXxtAnimalS" wx:if="{{loverShow}}"><!--右侧动物图标设置-->
<view class="yan11"></view>
</view>
<view class="yanql6"></view>
<view class="yan1">
<view class="yan1" bindtap="doSetXxtMale" wx:if="{{singleShow}}"><!--设置个人男性图标-->
<view class="yan12"></view>
</view>
<view class="yan3">
<view class="yan3" wx:if="{{loverShow}}" bindtap="doSetXxtMaleS"><!--设置右边男性图标-->
<view class="yan12"></view>
</view>
@ -88,34 +88,34 @@
<swiper-item class="call1"><!--对方个人页面-->
<view class="tx"></view><!--最上方头像栏-->
<view class="txtext">为七个字的头像</view><!--头像名字-->
<t-image class="tx" shape="circle" src="{{loverInfo.avatar}}"></t-image>
<view class="txtext">{{loverInfo.nick}}</view><!--头像名字-->
<view class="gh"></view>
<div class="bkg3"></div><!--点点点,最底层背景图-->
<dic class="bkg1"></dic><!--黄色点背景图-->
<view class="gh"></view>
<view class="xxtq"></view><!--形象图-->
<t-image src="{{xingxiangtu[loverInfo.spriteType]}}" class="xxtq" bindtap="ShowOrNotLogo"></t-image><!--形象图-->
<div class="k1">
</div>
<div class="k1">{{loverInfo.horoscope.number}}</div><!--幸运数字-->
<div class="ktext1">幸运数字</div>
<div class="ktext2">Ta的运势</div>
<div class="ktext3">幸运颜色</div>
<div class="k2" bindtap="ToastDialog">
<div class="k11"></div>
</div>
<div class="k3"></div>
<div class="k3">{{loverInfo.horoscope.color}}</div>
<t-popup class="ttpopup" visible="{{visible}}" bind:visible-change="onVisibleChange" placement="{{'center'}}">
<view class="ttpopup">
<view class="ztys"></view>
<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>

@ -125,8 +125,10 @@
margin: 0;
padding: 0;
width:750rpx;
height:1624rpx;
height:1624rpx!important;
overflow: hidden;
padding: 0!important;
margin: 0!important;
}
.call1{
@ -207,13 +209,14 @@
.txtextl{
position:absolute;
width:772rpx;
width:166rpx;
height:72rpx;
line-height:72rpx;
color: #9a9a9a;
margin-top:142.67rpx;
margin-left:36rpx;
font-size: 27rpx;
text-align: right;
}
.jiuchan{
position: absolute;
@ -435,6 +438,11 @@
background-size:100% 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/circle.png);
color: rgba(248, 99, 42, 1);
font-size: 36px;
font-family: SourceHanSansSC-regular;
}
.k2{
@ -460,6 +468,8 @@
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/circle.png);
color: rgba(108, 108, 108, 1);
font-size: 16px;
}
@ -517,16 +527,17 @@
.ztys{
position: absolute;
width: 542.67rpx;
height: 290rpx;
display: flex;
flex-direction: column;
background-repeat: no-repeat;
background-size:100% 100%;
left: 0;
right: 0;
margin: 84rpx auto;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xzt/ztys.png);
left: 46rpx;
top:98rpx;
width: 284px;
height: 159px;
line-height: 50rpx;
color: rgba(108, 108, 108, 1);
font-size: 16px;
}
.jkzs{
@ -622,3 +633,26 @@ font-size: 14px;
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;
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://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/ysfgx.png);
}

@ -1,13 +1,90 @@
// pages/home/jl/jlai/jlai.js
const app = getApp();//新建页面时 默认引入
const req = app.xzjlReq();//初始化一个的request() 实例
Page({
/**
* 页面的初始数据
*/
data: {
times:0,//非会员聊天次数
chatList:[],
ltinfo:'',
isBlank:true,//没有聊天
userInfo:{},
stxx:false,
},
dovipTips(){
wx: wx.showToast({
title: '请购买会员或聊天次数',
icon:'none',
})
},
go2Member(){
console.log('一天啊啊啊')
wx.navigateTo({
url: '/pages/home/me/member/member'
})
},
doLt(e){/**点击快捷选项 */
console.log('到此一游')
this.setData({ltinfo:e.target.dataset.lt})
},
go2BB(e){/**鼠标回显事件 */
this.setData({ltinfo:e.detail.value})
},
go2Send(e){/**发送消息 */
this.setData({isBlank:false})
if(e.target.dataset.lt==''){
wx: wx.showToast({
title: '聊天内容不能为空',
icon:'none',
})
}else{
this.setData({
chatList:this.data.chatList.concat({'type':1,'value':e.target.dataset.lt})
})
let that = this
req.postRequest('/api/v1/chat-records/completions',{'content':e.target.dataset.lt}).then((res)=>{
console.log(res)
console.log(res.data)
if(res.data.code==500){
console.log('500状态码')
wx: wx.showToast({
title: '获取星座精灵AI聊天消息超时',
icon:'none',
})
}
if(res.data.code==200){
this.setData({times:res.data.data.freeChatCount})
console.log(res)
this.setData({
chatList:this.data.chatList.concat({'type':2,'value':res.data.data.content})
})
}
console.log(this.userInfo);
}).catch((err)=>{
console.log(err);
})
this.setData({ltinfo:''})
}
},
getUserInfo(){
req.getRequest('/api/user/curt',{}).then((res)=>{
if(res.data.code==200){
this.setData({userInfo:res.data.data})
if(!res.data.data.isChatVip){
this.setData({times:res.data.data.freeChatCount})
}
console.log(this.data.times)
}
console.log(this.userInfo);
}).catch((err)=>{
console.log(err);
})
},
go2Reback(){
wx.navigateBack({ changed: true });
},
@ -15,7 +92,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getUserInfo()
},
/**

@ -1,3 +1,7 @@
{
"usingComponents": {}
"usingComponents": {
"t-image": "tdesign-miniprogram/image/image",
"t-input": "tdesign-miniprogram/input/input",
"t-textarea": "tdesign-miniprogram/textarea/textarea"
}
}

@ -1,3 +1,61 @@
<!--pages/home/jl/jlai/jlai.wxml-->
<view class="reback" bindtap="go2Reback"></view>
<view class="title">星座精灵AI</view>
<view class="reback" bindtap="go2Reback"></view><!--左上角返回图标-->
<view class="title">星座精灵AI</view><!--标题星座精灵AI-->
<view wx:if="{{!userInfo.isChatVip}}" class="mfcs">免费次数剩余:{{times}}条</view><!--非会员展示剩余免费次数-->
<!--没有聊天初次展示-->
<view class="ltkjj" wx:if="{{isBlank&&times!=0}}">
<view class="ltat ltxzys" data-lt="星座运势" bindtap="doLt">星座运势</view>
<view class="ltat ltxzzb" data-lt="星座占卜" bindtap="doLt">星座占卜</view>
<view class="ltat lttlzb" data-lt="塔罗占卜" bindtap="doLt">塔罗占卜</view>
<view class="ltat ltqgqs" data-lt="情感倾诉" bindtap="doLt">情感倾诉</view>
<view class="ltat ltwm" data-lt="我和Ta未来会怎样" bindtap="doLt">我和Ta未来会怎样</view>
<view class="ltat wzmxyx" data-lt="文字冒险游戏" bindtap="doLt">文字冒险游戏</view>
<view class="ltat ltqs" data-lt="帮我写一封情书" bindtap="doLt">帮我写一封情书</view>
<t-image src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/jlaitx.png" shape="circle" class="tximg"></t-image>
<view class="ltwzk">你好,我是你的星座守护精灵。除此之外,我还可以帮你解答更多问题。快来跟我聊聊吧!
</view>
</view>
<!--不是会员,进来就没有聊天次数了-->
<view class="ltkjj1" wx:if="{{isBlank&&userInfo.freeChatCount==0&&!isChatVip}}">
<view class="ltat ltxzys" >星座运势</view>
<view class="ltat ltxzzb" >星座占卜</view>
<view class="ltat lttlzb" >塔罗占卜</view>
<view class="ltat ltqgqs" >情感倾诉</view>
<view class="ltat ltwm">我和Ta未来会怎样</view>
<view class="ltat wzmxyx" >文字冒险游戏</view>
<view class="ltat ltqs" >帮我写一封情书</view>
<t-image src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/jlaitx.png" shape="circle" class="tximg"></t-image>
<view class="ltwzk">你好,我是你的星座守护精灵。除此之外,我还可以帮你解答更多问题。快来跟我聊聊吧!
</view>
<view class="kthybtn" bindtap="go2Member">开通会员</view>
<view class="kthytips" >开通会员享不限次畅聊</view>
<view class="hyhgtx" bindtap="go2Member"></view>
</view>
<view class="chatbox" wx:if="{{chatList&&(!isBlank)}}"><!--聊天内容-->
<view class="chatbox1" wx:for="{{chatList}}" wx:key="index">
<t-image src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/jlaitx.png" shape="circle" class="chattoux" wx:if="{{item.type==2}}"></t-image>
<t-image src="{{userInfo.avatar}}" class="chattoux" wx:if="{{item.type==1}}"></t-image>
<view class="chatinfo">{{item.value}}</view>
</view>
<view class="dd1"></view>
</view>
<!--不是会员且聊天次数为0-->
<view class="ltk1" wx:if="{{!isChatVip&&times==0}}" bindtap="dovipTips">
<view class="ltk1txt">
<t-textarea class="ltk1txt1" value="{{ltinfo}}" placeholder="请开通会员或购买次数" name="{{ltinfo}}" bindblur="go2BB" data-lt="{{ltinfo}}" disabled></t-textarea>
</view>
<view class="fsan" data-lt="{{ltinfo}}"></view><!--发送按钮-->
<view class="addbtn"></view><!--加号按钮-->
</view>
<!--是会员或者剩余聊天次数不为0-->
<view class="ltk1" wx:if="{{isChatVip||times!=0}}">
<view class="ltk1txt">
<t-textarea class="ltk1txt1" value="{{ltinfo}}" placeholder="输入聊天内容" bindblur="go2BB" data-lt="{{ltinfo}}" bindchange="go2BB"></t-textarea>
</view>
<view class="fsan" bindtap="go2Send" data-lt="{{ltinfo}}"></view><!--发送按钮-->
<view class="addbtn"></view><!--加号按钮-->
</view>

@ -21,3 +21,273 @@
text-align: center;
font-family: SourceHanSansSC-regular;
}
.mfcs{
position: absolute;
left: 0px;
top: 88px;
width: 375px;
height: 44px;
line-height: 88rpx;
opacity: 0.8;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
text-align: center;
color: rgba(255, 255, 255, 1);
font-size: 14px;
}
.ltkjj{
position: absolute;
left: 16px;
top: 164px;
width: 343px;
height: 382px;
line-height: 20px;
opacity: 0.9;
border-radius: 15px;
background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1);
font-size: 14px;
text-align: center;
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.2);
font-family: Arial;
}
.ltkjj1{
position: absolute;
left: 16px;
top: 164px;
width: 343px;
height: 1000rpx;
line-height: 20px;
opacity: 0.9;
border-radius: 15px;
background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1);
font-size: 14px;
text-align: center;
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.2);
font-family: Arial;
}
.ltat{
position: absolute;
height: 50px;
line-height: 100rpx;
opacity: 0.9;
border-radius: 24px;
background: linear-gradient(222.69deg, rgba(248,99,42,1) 14.04%,rgba(249,135,89,1) 88.56%);
color: rgba(16, 16, 16, 1);
font-size: 12px;
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
font-family: Arial;
color: rgba(255, 255, 255, 1);
font-size: 14px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.ltxzys{
left: 38rpx;
top: 64rpx;
width: 88px;
}
.ltxzzb{
left: 128px;
top: 64rpx;
width: 88px;
}
.lttlzb{
top: 64rpx;
width: 88px;
left:237px;
}
.ltqgqs{
width:118px;
left:38rpx;
top:228rpx;
}
.ltwm{
left:158px;
top:228rpx;
width:167px;
}
.wzmxyx{
left:38rpx;
width:137px;
top:392rpx;
}
.ltqs{
left:172px;
width:153px;
top:392rpx;
}
.tximg{
position: absolute;
left: 38rpx;
top: 278px;
width: 42px;
height: 42px;
border: 3px solid rgba(161, 134, 81, 1);
background-color: coral;
}
.ltwzk{
position: absolute;
left: 154rpx;
top: 278px;
width: 241px;
height: 72px;
color: rgba(108, 108, 108, 1);
font-size: 17px;
line-height: 43rpx;
text-align: justify;
font-family: SourceHanSansSC-regular;
}
.ltk1{
position: absolute;
left: 0px;
top: 722px;
width: 375px;
height: 90px;
line-height: 20px;
background-color: rgba(248, 248, 248, 1);
text-align: center;
border: 1px solid rgba(255, 0, 0, 0);
}
.ltk1txt{
position: absolute;
left: 16px;
top: 14rpx;
width: 265px;
height: 84rpx;
border-radius: 5px;
color: rgba(136, 136, 136, 1);
font-size: 14px;
text-align: left;
font-family: Arial;
border: 1px solid rgba(255, 0, 0, 0);
}
.t-textarea{
margin: 0!important;
padding: 0!important;
height:84rpx;
line-height: 84rpx!important;
}
.ltk1txt1{
width: 265px;
height: 84rpx;
}
.t-textarea__wrapper-inner{
}
.t-textarea__label{
height:84rpx;
line-height: 84rpx!important;
}
.fsan{
position: absolute;
left: 332px;
top: 32rpx;
width: 27px;
height: 27px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/chatbtn.png);
}
.addbtn{
position: absolute;
left: 293px;
top: 30rpx;
width: 27px;
height: 27px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/addbtn.png);
}
.chatbox{
position: absolute;
top:132px;
width:750rpx;
height:1360rpx;
overflow: auto;
}
.chatbox1{
width:750rpx;
height:148rpx;
display: block;
}
.chattoux{
margin-left: 32rpx;
margin-top: 32rpx;
width: 84rpx;
height: 84rpx;
display: online;
}
.chatinfo{
margin-left: 74px;
margin-top: -70rpx;
width: 280px;
height: 90px;
color: rgba(79, 79, 79, 1);
font-size: 17px;
text-align: justify;
font-family: SourceHanSansSC-regular;
}
.dd1{
width:750rpx;
height:160rpx;
}
.kthybtn{
position: absolute;
left: 224rpx;
top: 826rpx;
width: 120px;
height: 35px;
line-height: 70rpx;
border-radius: 10px;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
color: rgba(16, 16, 16, 1);
font-size: 12px;
text-align: center;
font-family: Arial;
color: rgba(255, 255, 255, 1);
font-size: 14px;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.kthytips{
position: absolute;
top: 448px;
width: 343px;
height: 20px;
color: rgba(108, 108, 108, 1);
font-size: 12px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.hyhgtx{
position: absolute;
left: 196px;
top: 371px;
width: 59.8px;
height: 66.45px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/hyhg.png);
}

@ -1,2 +1,5 @@
<!--pages/home/me/cjwt/cjwt.wxml 常见问题-->
<web-view src="https://xzjl-api.windymuse.cn/"></web-view>
<!--<!--<!--<web-view src="https://xzjl-api.windymuse.cn/"></web-view>-->
<view>跳转页面,待完善</view>-->
<view>跳转页面,待完善</view>-->
<view>跳转页面,待完善</view>

@ -1,3 +1,4 @@
<!--pages/home/me/gw/gw.wxml-->
<!--星座精灵官网-->
<web-view src="https://xzjl-api.windymuse.cn/"></web-view>
<!--<web-view src="https://xzjl-api.windymuse.cn/"></web-view>-->
<view>跳转页面,待完善</view>

@ -1,3 +1,4 @@
<!--pages/index/out/out.wxml 说明书页面-->
<web-view src="https://xzjl-api.windymuse.cn/"></web-view>
<!--<web-view src="https://xzjl-api.windymuse.cn/"></web-view>-->
<view>跳转页面,待完善</view>

@ -1,2 +1,3 @@
<!--pages/home/me/sq/sq.wxml 加入社群-->
<web-view src="https://xzjl-api.windymuse.cn/"></web-view>
<!--<web-view src="https://xzjl-api.windymuse.cn/"></web-view>-->
<view>跳转页面,待完善</view>

@ -1,2 +1,3 @@
<!--pages/home/me/yhsyxy/yhsyxy.wxml 用户使用协议-->
<web-view src="https://xzjl-api.windymuse.cn/"></web-view>
<!--<web-view src="https://xzjl-api.windymuse.cn/"></web-view>-->
<view>跳转页面,待完善</view>

@ -1,3 +1,4 @@
<!--pages/home/me/ysxy/ysxy.wxml 隐私协议页面-->
<web-view src="https://xzjl-api.windymuse.cn/"></web-view>
<!--<web-view src="https://xzjl-api.windymuse.cn/"></web-view>-->
<view>跳转页面,待完善</view>

@ -0,0 +1,66 @@
// pages/home/xx/hy/hx/hx.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

@ -0,0 +1,2 @@
<!--pages/home/xx/hy/hx/hx.wxml-->
<text>pages/home/xx/hy/hx/hx.wxml</text>

@ -0,0 +1 @@
/* pages/home/xx/hy/hx/hx.wxss */

@ -0,0 +1,66 @@
// pages/home/xx/hy/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,5 @@
{
"usingComponents": {
"t-image": "tdesign-miniprogram/image/image"
}
}

@ -0,0 +1,2 @@
<!--pages/home/xx/hy/index.wxml-->
<text>pages/home/xx/hy/index.wxml</text>

@ -0,0 +1 @@
/* pages/home/xx/hy/index.wxss */

@ -0,0 +1,66 @@
// pages/home/xx/hy/xz/zt.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

@ -0,0 +1,2 @@
<!--pages/home/xx/hy/xz/zt.wxml-->
<text>pages/home/xx/hy/xz/zt.wxml</text>

@ -0,0 +1 @@
/* pages/home/xx/hy/xz/zt.wxss */

@ -0,0 +1,66 @@
// pages/home/xx/hy/zt/zt.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

@ -0,0 +1,2 @@
<!--pages/home/xx/hy/zt/zt.wxml-->
<text>pages/home/xx/hy/zt/zt.wxml</text>

@ -0,0 +1 @@
/* pages/home/xx/hy/zt/zt.wxss */

@ -8,13 +8,15 @@ Page({
*/
data: {
hasLover:false,// 是否单身
userInfo:{}
},
doQueryInit(){
req.getRequest('/api/user/curt',{}).then((res)=>{
if(res.data.code==200){
this.setData({hasLover:res.data.data.hasLover})
console.log(res.data.data.hasLover)
this.setData({userInfo:res.data.data})
console.log(this.data.userInfo)
}
}).catch((err)=>{
console.log(err);

@ -8,5 +8,20 @@
</view>
<view wx:if="{{hasLover}}">
111
<!--聊天内容-可以滑动-->
<view class="ltinfo">
<t-image class="bkgfs" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/tx3.png"></t-image>
<view class="txl"></view>
</view>
<view class="hybtn">回忆</view>
<view class="h1"></view>
<!--返回图标-->
<view class="reback" bindtap="go2Reback"></view>
<view class="title">星讯</view>
</view>
<view class="xfgjl" wx:if="{{hasLover}}"></view>

@ -1,5 +1,38 @@
/* pages/home/xx/index.wxss */
/* pages/home/xyc/wdyw/wdyw.wxss */
.reback{
position: fixed;
margin-left: 20rpx;
margin-top:108rpx;
width:48rpx;
height:48rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/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;
font-family: SourceHanSansSC-regular;
}
.bkgfs{
position: absolute;
left: 48px;
top: 70rpx;
width: 279px;
height: 128px;
line-height: 20px;
border-radius: 15px;
background-color: rgba(253, 190, 196, 1);
text-align: center;
}
.bkg{
position: absolute;
@ -95,3 +128,60 @@
text-align: center;
font-size: 27rpx;
}
.hybtn{
position: fixed;
left: 0px;
top: 104px;
width: 83px;
height: 35px;
line-height: 70rpx;
opacity: 0.7;
border-radius: 0px 10px 10px 0px;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
color: rgba(255, 255, 255, 1);
font-size: 14px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.xfgjl{
position: fixed;
left: 0px;
margin-top: 1286rpx;
width: 375px;
height: 87px;
line-height: 20px;
opacity: 0.7;
background-color: rgba(255, 255, 255, 1);
text-align: center;
background-color: aqua;
}
.ltinfo{
position: absolute;
background-color: brown;
width: 750rpx;
height: 2000rpx;
margin-top:200rpx;
}
.h1{
position: fixed;
left: 0px;
width: 375px;
height: 88px;
line-height: 20px;
background-color: rgba(255, 255, 255, 1);
text-align: center;
}
.txl{
position: absolute;
left: 122px;
top: 30rpx;
width: 36px;
height: 36px;
background-color: burlywood;
}

@ -9,12 +9,15 @@ Page({
* 页面的初始数据
*/
data: {
xyLink:'',
xyContent:'',
imgUrl:'',
fileList: [],//图片list
form:{
content:"",
deadline:'',
link:'',
img:'111'
img:''
},
cvisible: false,
@ -40,16 +43,21 @@ Page({
this.setData({
fileList: [...fileList, ...files], // 此时设置了 fileList 之后才会展示选择的图片
});
// files.forEach(file => this.uploadFile(file))
wx.chooseImage({
count: 1, // 默认9
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: res => {
var tempFilePaths = res.tempFilePaths;
files.forEach(file => this.uploadFile(file))
},
handleRemove(e){/**删除图片 */
const { index } = e.detail;
const { fileList } = this.data;
fileList.splice(index, 1);
this.setData({
fileList,
});
},
uploadFile(file) {/**执行 */
wx.uploadFile({
url: 'https://xzjl-api.windymuse.cn/api/resource',
filePath: tempFilePaths[0],
filePath: file.url,
name: 'file',
header: {
'Authorization': wx.getStorageSync('token'),
@ -59,8 +67,12 @@ Page({
type: 'poster'
},
success: async res => {
console.log(res, '111111');
if (res.statusCode == 200) {
let data = JSON.parse(res.data);
console.log(data, '111111');
if (data.code == 200) {
this.setData({imgUrl:data.data.abUrl})
console.log('打印1111')
console.log(this.data.imgUrl)
res.data = JSON.parse(res.data);
console.log(res.data);
if (res.data.code == 1) {
@ -77,34 +89,6 @@ Page({
showToast('图片上传失败');
}
});
}
});
},
handleRemove(e){/**删除图片 */
const { index } = e.detail;
const { fileList } = this.data;
fileList.splice(index, 1);
this.setData({
fileList,
});
},
uploadFile(file) {/**执行 */
const FormData = require('./../../../utils/formdata/index.js')
let fd = new FormData()
fd.append('type','graphic')
console.log(file)
fd.appendFile(file.name,file.url)
console.log('文件上传')
req.postRequest('/api/resource',fd.getData()).then((res)=>{
console.log(res)
if(res.data.code==200){
console.log('res')
}
console.log(this.userInfo);
}).catch((err)=>{
console.log(err);
})
console.log('许愿成功!')
},
go2MyYw(){
@ -162,31 +146,53 @@ Page({
},
doFinishXy(e){/**许愿 */
console.log('开始执行xxxx')
console.log(e.target)
console.log(e.target.dataset.fs)
this.setData({
visible: false,
});
let param = e.target.dataset.fs
console.log(e.target.dataset)
console.log(e.target.dataset.note)
param.deadline = e.target.dataset.note
console.log(this.note)
if(!this.data.xyContent){
wx.showToast({
title:'许愿内容不能为空!',
icon: 'none',
duration: 5000
})
}else if(!this.data.note){
wx.showToast({
title:'期望事件不能为空!',
icon: 'none',
duration: 5000
})
}else if(!this.data.imgUrl){
wx.showToast({
title:'许愿图片不能为空!',
icon: 'none',
duration: 5000
})
}else{
//api/user/curt/wish
req.postRequest('/api/user/curt/wish',param).then((res)=>{
req.postRequest('/api/user/curt/wish',{content:this.data.xyContent,deadline:this.data.note,img:this.data.imgUrl,link:this.data.xyLink}).then((res)=>{
console.log(res)
if(res.data.code==200){
this.setData({
visible: false,
});
this.setData({userInfo:res.data.data})
if(res.data.data&&res.data.data.loverId&&res.data.data.loverId!=null){
this.setData({single:false})
}
this.setData({xyContent:'',xyLink:'',note:'',imgUrl:'',fileList:[]})
}else{
wx.showToast({
title:res.data.msg,
icon: 'none',
duration: 5000
})
}
console.log(this.userInfo);
}).catch((err)=>{
console.log(err);
})
console.log('许愿成功!')
}
},
initXy(){

@ -21,10 +21,10 @@
<view class="qwsj">期望时间</view>
<view class="xylj">许愿链接</view>
<view class="xytp">许愿图片</view>
<t-textarea class="xynrf" value="{{form.content}}" t-class="external-class" placeholder="内容限制30个字" />
<t-textarea class="xynrf" model:value="{{xyContent}}" t-class="external-class" placeholder="内容限制30个字" />
<t-textarea class="qwsjt" placeholder="请选择到期时间" bindtap="doXzTime" value="{{note}}" disabled />
<view class="xltb"></view>
<t-textarea class="xyljt" value="{{form.link}}" placeholder="愿望链接(可不填)" />
<t-textarea class="xyljt" model:value="{{xyLink}}" placeholder="愿望链接(可不填)" />
<view >
<t-upload class="xytpt"

@ -1,21 +1,99 @@
// pages/home/xyc/tdyw/tdyw.js
// pages/home/xyc/wdyw/wdyw.js
const app = getApp();//新建页面时 默认引入
const req = app.xzjlReq();//初始化一个的request() 实例
Page({
/**
* 页面的初始数据
*/
data: {
showDelDialog:false,
detail:{},
visible:false,
rrs:[{"lastModifiedDate":"2023-03-29T14:49:58.000+08:00","createdAt":"2023-03-14T15:44:16.000+08:00","id":1,"userid":1,"link":"http://www.baidu.com","img":"http://oss.wish.ydxxkj.top/resource/24130a65-ec5e-4c48-86d1-e964859f8532-1680072583657.jpg","content":"我希望明年去富士山下的樱花.","status":"processing","deadline":"2024-04-16"},{"lastModifiedDate":"2023-03-29T14:49:58.000+08:00","createdAt":"2023-03-14T15:44:16.000+08:00","id":1,"userid":1,"link":"http://www.baidu.com","img":"http://oss.wish.ydxxkj.top/resource/24130a65-ec5e-4c48-86d1-e964859f8532-1680072583657.jpg","content":"我希望明年去富士山下的樱花.","status":"completed","deadline":"2024-04-16"},{"lastModifiedDate":"2023-03-29T14:49:58.000+08:00","createdAt":"2023-03-14T15:44:16.000+08:00","id":1,"userid":1,"link":"http://www.baidu.com","img":"http://oss.wish.ydxxkj.top/resource/24130a65-ec5e-4c48-86d1-e964859f8532-1680072583657.jpg","content":"我希望明年去富士山下的樱花.","status":"expired","deadline":"2024-04-16"}],
wishes:[]
},
go2DelDialog(){
this.setData({showDelDialog:true})
},
closeDelDialog(){
this.setData({showDelDialog:false})
},
confirmDelDialog(e){
console.log(e.target.dataset.del)
console.log('确定删除')
console.log(this.data.detail.id)
/**确定删除愿望 */
this.setData({showDelDialog:false})
req.deleteRequest('/api/user/curt/wish/'+this.data.detail.id,{}).then((res)=>{
console.log(res)
if(res.data.code==200){
wx.showToast({
title:'愿望删除成功',
icon: 'none',
duration: 1000
})
}
}).catch((err)=>{
console.log(err);
})
},
doFinishWish(e){/**愿望已达成 */
console.log(e.target.dataset.del)
console.log('愿望达成')
console.log(this.data.detail.id)
/**确定删除愿望 */
this.setData({showDelDialog:false})
req.patchRequest('/api/user/curt/wish/'+this.data.detail.id+"/completed",{}).then((res)=>{
console.log(res)
if(res.data.code==200){
wx.showToast({
title:'愿望达成成功',
icon: 'none',
duration: 1000
})
}else{
wx.showToast({
title:res.data.msg,
icon: 'none',
duration: 1000
})
}
}).catch((err)=>{
console.log(err);
})
},
go2WishDetail(e){/**查看愿望详情 */
this.setData({visible:true,detail:e.target.dataset.wish})
this.setData({detail:e.target.dataset.wish})
},
onVisibleChange(e) {
this.setData({
visible: e.detail.visible,
});
},
changeVisible(){
this.setData({visible:false})
},
go2Reback(){
wx.navigateBack({ changed: true });
},
getMyWish(){
req.getRequest('/api/user/curt/wish/lover',{}).then((res)=>{
console.log(res)
if(res.data.code==200){
this.setData({wishes:res.data.data.records})
}
}).catch((err)=>{
console.log(err);
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getMyWish()
},
/**

@ -1,3 +1,7 @@
{
"usingComponents": {}
"usingComponents": {
"t-image": "tdesign-miniprogram/image/image",
"t-popup": "tdesign-miniprogram/popup/popup",
"t-dialog": "tdesign-miniprogram/dialog/dialog"
}
}

@ -1,4 +1,103 @@
<!--pages/home/xyc/tdyw/tdyw.wxml-->
<!--pages/home/xyc/wdyw/wdyw.wxml-->
<!--返回图标-->
<view class="reback" bindtap="go2Reback"></view>
<view class="title">Ta的愿望</view>
<view class="title">我的愿望</view>
<view class="ywbjt1"></view>
<view class="xycbg2"></view>
<view class="xycbg3"></view>
<view class="wishbox">
<view wx:for="{{wishes}}" wx:key="index">
<view class="boxitem" bindtap="go2WishDetail" data-wish="{{item}}">
<t-image src="{{item.img}}" class="boximg"></t-image>
<view class="boxtitle">{{item.content}}</view>
<view class="qwsjbox">期望时间:{{item.deadline}}</view>
<t-image class="logosta" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/ywc.png" wx:if="{{item.status=='completed'}}"></t-image>
<t-image class="logostajxz" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/jxzdt.gif" wx:if="{{item.status=='processing'}}"></t-image>
<t-image class="logosta" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/ygq.png" wx:if="{{item.status=='expired'}}"></t-image>
<view class="wczt" wx:if="{{item.status=='processing'}}">进行中</view>
<view class="wczt" wx:if="{{item.status=='completed'}}">已完成</view>
<view class="wczt" wx:if="{{item.status=='expired'}}">已过期</view>
</view>
</view>
</view>
<!--愿望详情-->
<t-popup visible="{{visible}}" bind:visible-change="onVisibleChange" placement="top">
<view class="all" >
<view class="wishdetail" bindtap="changeVisible"></view>
<view class="popbox"></view>
<t-image class="yximg" src="{{detail.img}}"></t-image>
<view class="ywwz">愿望</view>
<view class="ywxq">{{detail.content}}</view>
<view class="qwsj">期望时间</view>
<view class="qwsjtxt">{{detail.deadline}}</view>
</view>
<view class="ywcczk" wx:if="{{detail.status=='processing'}}"><!--进行中按钮展示-->
<view class="anwz1 sc1">
<view class="yqq" bindtap="go2DelDialog"></view>
<view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/lsc.png"></t-image>
</view>
<view class="anwz1 xg1">
<view class="yqq"></view>
<view class="anwztxt1">修改</view>
<t-image class="anzmlogo1" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/lxg.png"></t-image>
</view>
<view class="anwz1 wc1">
<view class="yqq" bindtap="doFinishWish"></view>
<view class="anwztxt1" >已达成</view>
<t-image bindtap="doFinishWish" class="anzmlogo1" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/lydc.png"></t-image>
</view>
<view class="anwz1 fx1">
<view class="yqq"></view>
<view class="anwztxt1">分享</view>
<t-image class="anzmlogo1" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/lfc.png"></t-image>
</view>
</view>
<view class="ywcczk" wx:if="{{detail.status=='completed'}}"><!--已完成按钮展示-->
<view class="anwz1 sc2">
<view class="yqq" bindtap="go2DelDialog"></view>
<view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/lsc.png"></t-image>
</view>
<view class="anwz1 fx2">
<view class="yqq"></view>
<view class="anwztxt1">分享</view>
<t-image class="anzmlogo1" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/lfc.png"></t-image>
</view>
</view>
<view class="ywcczk" wx:if="{{detail.status=='expired'}}">
<view class="anwz1 sc2">
<view class="yqq" bindtap="go2DelDialog"></view>
<view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/lsc.png"></t-image>
</view>
<view class="anwz1 fx2">
<view class="yqq"></view>
<view class="anwztxt1">修改</view>
<t-image class="anzmlogo1" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/lxg.png"></t-image>
</view>
</view><!--已过期按钮展示-->
</t-popup>
<!--确定删除对话框-->
<t-dialog
data-del="{{detail.id}}"
visible="{{showDelDialog}}"
content="确定要删除愿望吗?"
confirm-btn="{{ confirmBtn }}"
cancel-btn="取消"
confirm-btn="确定"
bind:confirm="confirmDelDialog"
bind:cancel="closeDelDialog"
/>

@ -1,4 +1,4 @@
/* pages/home/xyc/tdyw/tdyw.wxss */
/* pages/home/xyc/wdyw/wdyw.wxss */
.reback{
position: absolute;
margin-left: 20rpx;
@ -21,3 +21,274 @@
text-align: center;
font-family: SourceHanSansSC-regular;
}
.ywbjt1{
position: absolute;
left: -22px;
top: 140px;
width: 421px;
height: 584px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/bg111.png);
}
.xycbg2{
position: absolute;
left: -14px;
top: 342px;
width: 399px;
height: 341px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/xycbg2.png);
}
.wishbox{
position: absolute;
width:750rpx;
top:190rpx;
height:1300rpx;
}
.xycbg3{
position: absolute;
left: -24px;
top: 116px;
width: 440px;
height: 635px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/xycbg3.png);
}
.boxitem{
margin-left: 16px;
top: 104px;
width: 343px;
height: 94px;
line-height: 20px;
border-radius: 10px;
background-color: rgba(255, 255, 255, 1);
text-align: center;
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.4);
margin-bottom: 30rpx;
}
.boximg{
float: left;
margin-left: 32rpx;
padding-top: 39rpx;
width: 55px;
height: 55px;
}
.boxtitle{
float:initial;
margin-left: 174rpx;
padding-top: 58rpx;
width: 180px;
height: 20px;
color: rgba(108, 108, 108, 1);
font-size: 30rpx;
text-align: left;
font-weight: 700;
overflow:hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
}
.qwsjbox{
float:initial;
margin-left: 174rpx;
top: 153px;
width: 143px;
height: 17px;
color: rgba(108, 108, 108, 1);
font-size: 12px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.wczt{
float:initial;
margin-left: 295px;
margin-top: -75rpx;
width: 36px;
height: 17px;
color: rgba(108, 108, 108, 1);
font-size: 12px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.logosta{
float:initial;
margin-left: 289px;
margin-top: -100rpx;
width: 34px;
height: 34px;
}
.logostajxz{
float:initial;
margin-left: 283px;
margin-top: -130rpx;
width: 60px;
height: 60px;
}
.all{
width:750rpx;
height:1624rpx;
}
.wishdetail{
position: absolute;
width:750rpx;
height:1624rpx;
}
.popbox{
position: absolute;
left: 33px;
top: 83px;
width: 310px;
height: 540px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/detailbkg.png);
}
.yximg{
position: absolute;
left: 73px;
top: 165px;
width: 230px;
height: 154px;
border-radius: 10px;
background-color: #767686;
}
.ywwz{
position: absolute;
left: 164px;
top: 353px;
width: 48px;
height: 33px;
color: rgba(248, 99, 42, 1);
font-size: 24px;
text-align: left;
font-family: SourceHanSansSC-bold;
}
.ywxq{
position: absolute;
left: 91px;
top: 399px;
width: 194px;
height: 150rpx;
color: rgba(108, 108, 108, 1);
font-size: 18px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.qwsj{
position: absolute;
left: 140px;
top: 490px;
width: 96px;
height: 33px;
color: rgba(248, 99, 42, 1);
font-size: 24px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.qwsjtxt{
position: absolute;
left: 125px;
top: 536px;
width: 127px;
height: 25px;
color: rgba(108, 108, 108, 1);
font-size: 18px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.yqq{/*圆圈*/
border-radius: 64rpx;
position: absolute;
width: 60px;
height:60px;
line-height: 120rpx;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
color: rgba(16, 16, 16, 1);
font-size: 12px;
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
font-family: Arial;
border: 3px solid rgba(255, 255, 255, 1);
}
.sc{
border-radius: 64rpx;
position: absolute;
left: 21px;
top: 644px;
width: 60px;
height: 60px;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
color: rgba(16, 16, 16, 1);
font-size: 12px;
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
font-family: Arial;
border: 3px solid rgba(255, 255, 255, 1);
}
.ywcczk{
position: absolute;
height:192rpx;
top:1290rpx;
width:750rpx;
}
.anwz1{
position: absolute;
width:120rpx;
height: 192rpx;
}
.anwztxt1{
position: absolute;
width:120rpx;
top: 140rpx;
height: 26px;
color: rgba(108, 108, 108, 1);
font-size: 18px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.anzmlogo1{
position: absolute;
margin: 21rpx;
width: 42px;
height: 42px;
}
.sc1{
margin-left: 42rpx;
}
.xg1{
margin-left: 112px;
}
.wc1{
margin-left: 203px;
}
.fx1{
margin-left: 294px;
}
.sc2{
margin-left: 112px;
}
.fx2{
margin-left: 203px;
}

@ -1,21 +1,99 @@
// pages/home/xyc/wdyw/wdyw.js
const app = getApp();//新建页面时 默认引入
const req = app.xzjlReq();//初始化一个的request() 实例
Page({
/**
* 页面的初始数据
*/
data: {
showDelDialog:false,
detail:{},
visible:false,
rrs:[{"lastModifiedDate":"2023-03-29T14:49:58.000+08:00","createdAt":"2023-03-14T15:44:16.000+08:00","id":1,"userid":1,"link":"http://www.baidu.com","img":"http://oss.wish.ydxxkj.top/resource/24130a65-ec5e-4c48-86d1-e964859f8532-1680072583657.jpg","content":"我希望明年去富士山下的樱花.","status":"processing","deadline":"2024-04-16"},{"lastModifiedDate":"2023-03-29T14:49:58.000+08:00","createdAt":"2023-03-14T15:44:16.000+08:00","id":1,"userid":1,"link":"http://www.baidu.com","img":"http://oss.wish.ydxxkj.top/resource/24130a65-ec5e-4c48-86d1-e964859f8532-1680072583657.jpg","content":"我希望明年去富士山下的樱花.","status":"completed","deadline":"2024-04-16"},{"lastModifiedDate":"2023-03-29T14:49:58.000+08:00","createdAt":"2023-03-14T15:44:16.000+08:00","id":1,"userid":1,"link":"http://www.baidu.com","img":"http://oss.wish.ydxxkj.top/resource/24130a65-ec5e-4c48-86d1-e964859f8532-1680072583657.jpg","content":"我希望明年去富士山下的樱花.","status":"expired","deadline":"2024-04-16"}],
wishes:[]
},
go2DelDialog(){
this.setData({showDelDialog:true})
},
closeDelDialog(){
this.setData({showDelDialog:false})
},
confirmDelDialog(e){
console.log(e.target.dataset.del)
console.log('确定删除')
console.log(this.data.detail.id)
/**确定删除愿望 */
this.setData({showDelDialog:false})
req.deleteRequest('/api/user/curt/wish/'+this.data.detail.id,{}).then((res)=>{
console.log(res)
if(res.data.code==200){
wx.showToast({
title:'愿望删除成功',
icon: 'none',
duration: 1000
})
}
}).catch((err)=>{
console.log(err);
})
},
doFinishWish(e){/**愿望已达成 */
console.log(e.target.dataset.del)
console.log('愿望达成')
console.log(this.data.detail.id)
/**确定删除愿望 */
this.setData({showDelDialog:false})
req.patchRequest('/api/user/curt/wish/'+this.data.detail.id+"/completed",{}).then((res)=>{
console.log(res)
if(res.data.code==200){
wx.showToast({
title:'愿望达成成功',
icon: 'none',
duration: 1000
})
}else{
wx.showToast({
title:res.data.msg,
icon: 'none',
duration: 1000
})
}
}).catch((err)=>{
console.log(err);
})
},
go2WishDetail(e){/**查看愿望详情 */
this.setData({visible:true,detail:e.target.dataset.wish})
this.setData({detail:e.target.dataset.wish})
},
onVisibleChange(e) {
this.setData({
visible: e.detail.visible,
});
},
changeVisible(){
this.setData({visible:false})
},
go2Reback(){
wx.navigateBack({ changed: true });
},
getMyWish(){
req.getRequest('/api/user/curt/wish',{}).then((res)=>{
console.log(res)
if(res.data.code==200){
this.setData({wishes:res.data.data.records})
}
}).catch((err)=>{
console.log(err);
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getMyWish()
},
/**

@ -1,3 +1,7 @@
{
"usingComponents": {}
"usingComponents": {
"t-image": "tdesign-miniprogram/image/image",
"t-popup": "tdesign-miniprogram/popup/popup",
"t-dialog": "tdesign-miniprogram/dialog/dialog"
}
}

@ -2,3 +2,102 @@
<!--返回图标-->
<view class="reback" bindtap="go2Reback"></view>
<view class="title">我的愿望</view>
<view class="ywbjt1"></view>
<view class="xycbg2"></view>
<view class="xycbg3"></view>
<view class="wishbox">
<view wx:for="{{wishes}}" wx:key="index">
<view class="boxitem" bindtap="go2WishDetail" data-wish="{{item}}">
<t-image src="{{item.img}}" class="boximg"></t-image>
<view class="boxtitle">{{item.content}}</view>
<view class="qwsjbox">期望时间:{{item.deadline}}</view>
<t-image class="logosta" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/ywc.png" wx:if="{{item.status=='completed'}}"></t-image>
<t-image class="logostajxz" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/jxzdt.gif" wx:if="{{item.status=='processing'}}"></t-image>
<t-image class="logosta" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/ygq.png" wx:if="{{item.status=='expired'}}"></t-image>
<view class="wczt" wx:if="{{item.status=='processing'}}">进行中</view>
<view class="wczt" wx:if="{{item.status=='completed'}}">已完成</view>
<view class="wczt" wx:if="{{item.status=='expired'}}">已过期</view>
</view>
</view>
</view>
<!--愿望详情-->
<t-popup visible="{{visible}}" bind:visible-change="onVisibleChange" placement="top">
<view class="all" >
<view class="wishdetail" bindtap="changeVisible"></view>
<view class="popbox"></view>
<t-image class="yximg" src="{{detail.img}}"></t-image>
<view class="ywwz">愿望</view>
<view class="ywxq">{{detail.content}}</view>
<view class="qwsj">期望时间</view>
<view class="qwsjtxt">{{detail.deadline}}</view>
</view>
<view class="ywcczk" wx:if="{{detail.status=='processing'}}"><!--进行中按钮展示-->
<view class="anwz1 sc1">
<view class="yqq" bindtap="go2DelDialog"></view>
<view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/lsc.png"></t-image>
</view>
<view class="anwz1 xg1">
<view class="yqq"></view>
<view class="anwztxt1">修改</view>
<t-image class="anzmlogo1" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/lxg.png"></t-image>
</view>
<view class="anwz1 wc1">
<view class="yqq" bindtap="doFinishWish"></view>
<view class="anwztxt1" >已达成</view>
<t-image bindtap="doFinishWish" class="anzmlogo1" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/lydc.png"></t-image>
</view>
<view class="anwz1 fx1">
<view class="yqq"></view>
<view class="anwztxt1">分享</view>
<t-image class="anzmlogo1" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/lfc.png"></t-image>
</view>
</view>
<view class="ywcczk" wx:if="{{detail.status=='completed'}}"><!--已完成按钮展示-->
<view class="anwz1 sc2">
<view class="yqq" bindtap="go2DelDialog"></view>
<view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/lsc.png"></t-image>
</view>
<view class="anwz1 fx2">
<view class="yqq"></view>
<view class="anwztxt1">分享</view>
<t-image class="anzmlogo1" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/lfc.png"></t-image>
</view>
</view>
<view class="ywcczk" wx:if="{{detail.status=='expired'}}">
<view class="anwz1 sc2">
<view class="yqq" bindtap="go2DelDialog"></view>
<view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/lsc.png"></t-image>
</view>
<view class="anwz1 fx2">
<view class="yqq"></view>
<view class="anwztxt1">修改</view>
<t-image class="anzmlogo1" src="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/lxg.png"></t-image>
</view>
</view><!--已过期按钮展示-->
</t-popup>
<!--确定删除对话框-->
<t-dialog
data-del="{{detail.id}}"
visible="{{showDelDialog}}"
content="确定要删除愿望吗?"
confirm-btn="{{ confirmBtn }}"
cancel-btn="取消"
confirm-btn="确定"
bind:confirm="confirmDelDialog"
bind:cancel="closeDelDialog"
/>

@ -21,3 +21,274 @@
text-align: center;
font-family: SourceHanSansSC-regular;
}
.ywbjt1{
position: absolute;
left: -22px;
top: 140px;
width: 421px;
height: 584px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/bg111.png);
}
.xycbg2{
position: absolute;
left: -14px;
top: 342px;
width: 399px;
height: 341px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/xycbg2.png);
}
.wishbox{
position: absolute;
width:750rpx;
top:190rpx;
height:1300rpx;
}
.xycbg3{
position: absolute;
left: -24px;
top: 116px;
width: 440px;
height: 635px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/xycbg3.png);
}
.boxitem{
margin-left: 16px;
top: 104px;
width: 343px;
height: 94px;
line-height: 20px;
border-radius: 10px;
background-color: rgba(255, 255, 255, 1);
text-align: center;
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.4);
margin-bottom: 30rpx;
}
.boximg{
float: left;
margin-left: 32rpx;
padding-top: 39rpx;
width: 55px;
height: 55px;
}
.boxtitle{
float:initial;
margin-left: 174rpx;
padding-top: 58rpx;
width: 180px;
height: 20px;
color: rgba(108, 108, 108, 1);
font-size: 30rpx;
text-align: left;
font-weight: 700;
overflow:hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
}
.qwsjbox{
float:initial;
margin-left: 174rpx;
top: 153px;
width: 143px;
height: 17px;
color: rgba(108, 108, 108, 1);
font-size: 12px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.wczt{
float:initial;
margin-left: 295px;
margin-top: -75rpx;
width: 36px;
height: 17px;
color: rgba(108, 108, 108, 1);
font-size: 12px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.logosta{
float:initial;
margin-left: 289px;
margin-top: -100rpx;
width: 34px;
height: 34px;
}
.logostajxz{
float:initial;
margin-left: 283px;
margin-top: -130rpx;
width: 60px;
height: 60px;
}
.all{
width:750rpx;
height:1624rpx;
}
.wishdetail{
position: absolute;
width:750rpx;
height:1624rpx;
}
.popbox{
position: absolute;
left: 33px;
top: 83px;
width: 310px;
height: 540px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/detailbkg.png);
}
.yximg{
position: absolute;
left: 73px;
top: 165px;
width: 230px;
height: 154px;
border-radius: 10px;
background-color: #767686;
}
.ywwz{
position: absolute;
left: 164px;
top: 353px;
width: 48px;
height: 33px;
color: rgba(248, 99, 42, 1);
font-size: 24px;
text-align: left;
font-family: SourceHanSansSC-bold;
}
.ywxq{
position: absolute;
left: 91px;
top: 399px;
width: 194px;
height: 150rpx;
color: rgba(108, 108, 108, 1);
font-size: 18px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.qwsj{
position: absolute;
left: 140px;
top: 490px;
width: 96px;
height: 33px;
color: rgba(248, 99, 42, 1);
font-size: 24px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.qwsjtxt{
position: absolute;
left: 125px;
top: 536px;
width: 127px;
height: 25px;
color: rgba(108, 108, 108, 1);
font-size: 18px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.yqq{/*圆圈*/
border-radius: 64rpx;
position: absolute;
width: 60px;
height:60px;
line-height: 120rpx;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
color: rgba(16, 16, 16, 1);
font-size: 12px;
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
font-family: Arial;
border: 3px solid rgba(255, 255, 255, 1);
}
.sc{
border-radius: 64rpx;
position: absolute;
left: 21px;
top: 644px;
width: 60px;
height: 60px;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
color: rgba(16, 16, 16, 1);
font-size: 12px;
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
font-family: Arial;
border: 3px solid rgba(255, 255, 255, 1);
}
.ywcczk{
position: absolute;
height:192rpx;
top:1290rpx;
width:750rpx;
}
.anwz1{
position: absolute;
width:120rpx;
height: 192rpx;
}
.anwztxt1{
position: absolute;
width:120rpx;
top: 140rpx;
height: 26px;
color: rgba(108, 108, 108, 1);
font-size: 18px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.anzmlogo1{
position: absolute;
margin: 21rpx;
width: 42px;
height: 42px;
}
.sc1{
margin-left: 42rpx;
}
.xg1{
margin-left: 112px;
}
.wc1{
margin-left: 203px;
}
.fx1{
margin-left: 294px;
}
.sc2{
margin-left: 112px;
}
.fx2{
margin-left: 203px;
}

@ -1,2 +1,3 @@
<!--pages/index/out/out.wxml-->
<web-view src="https://xzjl-api.windymuse.cn/"></web-view>
<!--<web-view src="https://xzjl-api.windymuse.cn/"></web-view>-->
<view>跳转页面,待完善</view>

@ -70,7 +70,7 @@ class request {
wx.showToast({
title:'Token无效或过期请重新登录',
icon: 'none',
duration: 1000
duration: 5000
})
wx.navigateTo({
url: '/pages/index/index'
@ -81,11 +81,11 @@ class request {
if (res.statusCode === 200) {
//200: 服务端业务处理正常结束
if(res.data.code==500){
if(res.data.code==401){
wx.showToast({
title:'Token无效或过期请重新登录',
icon: 'none',
duration: 1000
duration: 5000
})
wx.navigateTo({
url: '/pages/index/index'
@ -126,7 +126,7 @@ class request {
wx.showToast({
title:'Token无效或过期请重新登录',
icon: 'none',
duration: 1000
duration: 5000
})
wx.navigateTo({
url: '/pages/index/index'
@ -137,11 +137,11 @@ class request {
if (res.statusCode === 200) {
//200: 服务端业务处理正常结束
if(res.data.code==500){
if(res.data.code==401){
wx.showToast({
title:'Token无效或过期请重新登录',
icon: 'none',
duration: 1000
duration: 5000
})
wx.navigateTo({
url: '/pages/index/index'

Loading…
Cancel
Save