Compare commits

..

2 Commits

@ -48,7 +48,7 @@
<view class="dcrighttxt">能量注入</view><!--下方左侧块--> <view class="dcrighttxt">能量注入</view><!--下方左侧块-->
</swiper-item> </swiper-item>
  <swiper-item class="call1"><!--情侣页面-->   <swiper-item class="call1" wx:if='{{userInfo.loverId}}'><!--情侣页面-->
<!-- 未祈祷页面 --> <!-- 未祈祷页面 -->
<view wx:if="{{ !userInfo.prayerEndTime }}"> <view wx:if="{{ !userInfo.prayerEndTime }}">
<t-image class="txl" src="{{userInfo.avatar}}"></t-image> <t-image class="txl" src="{{userInfo.avatar}}"></t-image>
@ -115,7 +115,7 @@
</swiper-item> </swiper-item>
<swiper-item class="call1"><!--对方个人页面--> <swiper-item class="call1" wx:if='{{userInfo.loverId}}'><!--对方个人页面-->
<t-image class="tx" shape="circle" src="{{loverInfo.avatar}}"></t-image> <t-image class="tx" shape="circle" src="{{loverInfo.avatar}}"></t-image>
<view class="txtext">{{loverInfo.nick}}</view><!--头像名字--> <view class="txtext">{{loverInfo.nick}}</view><!--头像名字-->
<view class="gh"></view> <view class="gh"></view>

@ -119,25 +119,29 @@ Page({
url: '/pages/home/me/member2/member' url: '/pages/home/me/member2/member'
}) })
}, },
go2Gw(){/**跳转到会员购买页面 */ go2Gw(){
wx.navigateTo({ // wx.navigateTo({
url: '/pages/home/me/gw/gw' // url: '/pages/home/me/gw/gw'
}) // })
console.log('跳转了解星座精灵页面');
}, },
go2Ysxy(){/**跳转到会员购买页面 */ go2Ysxy(){
wx.navigateTo({ // wx.navigateTo({
url: '/pages/home/me/ysxy/ysxy' // url: '/pages/home/me/ysxy/ysxy'
}) // })
console.log('跳转隐私协议页面');
}, },
go2Yhsyxy(){/**跳转到会员购买页面 */ go2Yhsyxy(){
wx.navigateTo({ // wx.navigateTo({
url: '/pages/home/me/yhsyxy/yhsyxy' // url: '/pages/home/me/yhsyxy/yhsyxy'
}) // })
console.log('跳转用户协议页面');
}, },
go2Cjwt(){/**跳转到会员购买页面 */ go2Cjwt(){
wx.navigateTo({ // wx.navigateTo({
url: '/pages/home/me/cjwt/cjwt' // url: '/pages/home/me/cjwt/cjwt'
}) // })
console.log('跳转常见问题页面');
}, },
go2Device(){ go2Device(){
wx.navigateTo({ wx.navigateTo({
@ -145,9 +149,10 @@ Page({
}) })
}, },
go2Sq(){ go2Sq(){
wx.navigateTo({ // wx.navigateTo({
url: '/pages/home/me/sq/sq' // url: '/pages/home/me/sq/sq'
}) // })
console.log('跳转社群');
}, },
go2Yjfk(){ go2Yjfk(){
wx.navigateTo({ wx.navigateTo({
@ -156,9 +161,10 @@ Page({
}, },
go2Manual(){ go2Manual(){
wx.navigateTo({ // wx.navigateTo({
url: '/pages/home/me/manual/manual' // url: '/pages/home/me/manual/manual'
}) // })
console.log('跳转说明书页面');
}, },
go2Jcjb(){ go2Jcjb(){
wx.navigateTo({ wx.navigateTo({

@ -24,31 +24,31 @@
</view> </view>
</view><!--功能操作框--> </view><!--功能操作框-->
<view class="mycell" bindtap="ljXzjl" ><!--cell菜单单元格--> <view class="mycell" bindtap="ljXzjl" ><!--cell菜单单元格-->
<!-- <t-cell hover arrow bindtap="go2Gw"> <t-cell hover arrow bindtap="go2Gw">
<t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/xzjl.png" size="50rpx"/> <t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/xzjl.png" size="50rpx"/>
<text slot="title" class="mycelltext" >了解星座精灵</text> <text slot="title" class="mycelltext" >了解星座精灵</text>
</t-cell> --> </t-cell>
<t-cell hover bindtap="doBdsjh" > <t-cell hover bindtap="doBdsjh" >
<t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/phone.png" size="50rpx"/> <t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/phone.png" size="50rpx"/>
<text slot="title" class="mycelltext" >绑定手机号</text> <text slot="title" class="mycelltext" >绑定手机号</text>
<text slot="note" wx:if="{{userInfo.hasPhone}}">{{userInfo.phone}}</text> <text slot="note" wx:if="{{userInfo.hasPhone}}">{{userInfo.phone}}</text>
</t-cell> </t-cell>
<!-- <t-cell hover arrow bindtap="go2Cjwt"> <t-cell hover arrow bindtap="go2Cjwt">
<t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/cjwt.png" size="50rpx"/> <t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/cjwt.png" size="50rpx"/>
<text slot="title" class="mycelltext" >常见问题</text> <text slot="title" class="mycelltext" >常见问题</text>
</t-cell> --> </t-cell>
<t-cell hover arrow bindtap="go2Yjfk"> <t-cell hover arrow bindtap="go2Yjfk">
<t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/yjfk.png" size="50rpx"/> <t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/yjfk.png" size="50rpx"/>
<text slot="title" class="mycelltext" >意见反馈</text> <text slot="title" class="mycelltext" >意见反馈</text>
</t-cell> </t-cell>
<!-- <t-cell hover arrow bindtap="go2Yhsyxy"> <t-cell hover arrow bindtap="go2Yhsyxy">
<t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/yhsyxy.png" size="50rpx"/> <t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/yhsyxy.png" size="50rpx"/>
<text slot="title" class="mycelltext" >用户使用协议</text> <text slot="title" class="mycelltext" >用户使用协议</text>
</t-cell> --> </t-cell>
<!-- <t-cell hover arrow bindtap="go2Ysxy"> <t-cell hover arrow bindtap="go2Ysxy">
<t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/ysxy.png" size="50rpx"/> <t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/ysxy.png" size="50rpx"/>
<text slot="title" class="mycelltext" >隐私协议</text> <text slot="title" class="mycelltext" >隐私协议</text>
</t-cell> --> </t-cell>
<t-cell hover> <t-cell hover>
<t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/xcxbb.png" size="50rpx"/> <t-icon slot="left-icon" name="https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/xcxbb.png" size="50rpx"/>
<text slot="title" class="mycelltext" >小程序版本</text> <text slot="title" class="mycelltext" >小程序版本</text>

@ -14,23 +14,32 @@ Page({
go2Reback(){ go2Reback(){
wx.navigateBack({ changed: true }); wx.navigateBack({ changed: true });
}, },
// 长按解除羁绊
handleLongPress() { handleLongPress() {
this.setData({showTimeout:true}) this.setData({showTimeout:true})
const setIn = setInterval(() => { this.setIn = setInterval(() => {
this.setData({ this.setData({
timeout: this.data.timeout - 1 timeout: this.data.timeout - 1
}) })
if(this.data.timeout === 0){
req.patchRequest('/api/user/curt/lover/unbinding',{}).then((res) => {
console.log(res,'已经解除羁绊');
})
clearInterval(this.setIn)
this.setData({
showTimeout:false,
showDialog:true
})
}
},1000) },1000)
setTimeout(() => { },
clearInterval(setIn) // 取消长按
this.setData({ handleTouchEnd(){
showTimeout:false, this.setData({
showDialog:true timeout:3,
}) showTimeout:false,
req.patchRequest('/api/user/curt/lover/unbinding',{}).then((res) => { })
console.log(res,'已经解除羁绊'); clearInterval(this.setIn)
})
}, 3000)
}, },
closeDialog(){ closeDialog(){
this.setData({showDialog:false}) this.setData({showDialog:false})

@ -13,7 +13,7 @@
<view class="text2">解除羁绊后你们的数据将保留90天。90天内如果再次建立羁绊你们的数据将恢复。如果超过90天未再次建立羁绊所有数据将永远清除不可找回。</view> <view class="text2">解除羁绊后你们的数据将保留90天。90天内如果再次建立羁绊你们的数据将恢复。如果超过90天未再次建立羁绊所有数据将永远清除不可找回。</view>
<view class="btn-container"> <view class="btn-container">
<view class="btn" bindlongpress="handleLongPress"> <view class="btn" bindlongpress="handleLongPress" bindtouchend="handleTouchEnd">
<image src="cloud://cloud1-2geqetnm309fb1b9.636c-cloud1-2geqetnm309fb1b9-1318421017/ze-arrow.png"/> <image src="cloud://cloud1-2geqetnm309fb1b9.636c-cloud1-2geqetnm309fb1b9-1318421017/ze-arrow.png"/>
</view> </view>
</view> </view>

@ -61,7 +61,7 @@
.btn-container { .btn-container {
width: 100%; width: 100%;
position: absolute; position: absolute;
bottom: 300rpx; top: 1140rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
@ -82,7 +82,7 @@
.text3 { .text3 {
position: absolute; position: absolute;
bottom: 182rpx; top: 1384rpx;
width: 100%; width: 100%;
text-align: center; text-align: center;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);

@ -9,8 +9,8 @@ Page({
*/ */
data: { data: {
yhy:true, yhy:true,
openid:'' openid:'',
showToast:false
}, },
doKtHy() { doKtHy() {
@ -59,11 +59,11 @@ Page({
wx.navigateBack({ changed: true }); wx.navigateBack({ changed: true });
}, },
tQuest(){ tQuest(){
Toast({ this.setData({showToast:true})
context: this, },
selector: '#t-toast', closeTaost(){
message: '星座精灵AI的付费会员服务基于OpenAI的GPT-3.5 Turbo模型为您提供高智能情感咨询服务以及星座、星骰和塔罗牌等娱乐服务。利用人工智能技术和高质量的自然语言响应星座精灵AI可以更好的帮助您深入探索内心世界。', this.setData({showToast:false})
}); console.log('点击了');
}, },
/** /**

@ -7,6 +7,14 @@
<view class="hgpng"></view><!--皇冠图标--> <view class="hgpng"></view><!--皇冠图标-->
<view class="question" bindtap="tQuest"></view><!--问号图标--> <view class="question" bindtap="tQuest"></view><!--问号图标-->
<!-- 提示 -->
<view class="bgc" bindtap="closeTaost" wx:if="{{showToast}}">
<view class="toast">
星座精灵AI的付费会员服务基于OpenAI的GPT-3.5 Turbo模型为您提供高智能情感咨询服务以及星座、
星骰和塔罗牌等娱乐服务。利用人工智能技术和高质量的自然语言响应星座精灵AI可以更好的帮助您深入探
索内心世界。</view>
</view>
<t-toast id="t-toast" /><!--弹出问号图标--> <t-toast id="t-toast" /><!--弹出问号图标-->
<view class="hybtn" bindtap="doKtHy">开通会员</view> <view class="hybtn" bindtap="doKtHy">开通会员</view>
<view class="viphyqy">VIP会员权益</view> <view class="viphyqy">VIP会员权益</view>
@ -23,4 +31,4 @@
<view class="month1" wx:if="{{yhy}}" bindtap="go2Month"><text class="text1 tcolor2">¥69</text><text class="text2 tcolor2"> / 月</text></view> <view class="month1" wx:if="{{yhy}}" bindtap="go2Month"><text class="text1 tcolor2">¥69</text><text class="text2 tcolor2"> / 月</text></view>
<view class="week2" wx:if="{{!yhy}}" bindtap="go2Week"><text class="text1 tcolor2">¥29</text><text class="text2 tcolor2"> / 周</text></view> <view class="week2" wx:if="{{!yhy}}" bindtap="go2Week"><text class="text1 tcolor2">¥29</text><text class="text2 tcolor2"> / 周</text></view>
<view class="month2" wx:if="{{!yhy}}" bindtap="go2Month"><text class="text1 tcolor1">¥69</text><text class="text2 tcolor1"> / 月</text></view> <view class="month2" wx:if="{{!yhy}}" bindtap="go2Month"><text class="text1 tcolor1">¥69</text><text class="text2 tcolor1"> / 月</text></view>

@ -60,6 +60,7 @@ background-repeat: no-repeat;
top: 124px; top: 124px;
width: 30px; width: 30px;
height: 30px; height: 30px;
z-index: 999;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/qqest.png); background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/qqest.png);
} }
.hybtn{ .hybtn{
@ -229,4 +230,29 @@ font-family: SourceHanSansSC-regular;
text-align: center; text-align: center;
font-family: Arial; font-family: Arial;
border: 2px solid rgba(248, 99, 42, 1); border: 2px solid rgba(248, 99, 42, 1);
}
.toast {
position: absolute;
top: 344rpx;
left: 64rpx;
width: 622rpx;
height: 316rpx;
padding: 32rpx;
box-sizing: border-box;
border-radius: 15px;
background-color: rgba(255, 255, 255, 0.9);
color: rgba(108, 108, 108, 1);
font-size: 28rpx;
text-align: center;
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.2);
z-index: 999;
text-align: justify;
}
.bgc {
position: absolute;
width: 100%;
height: 100%;
z-index: 1;
} }

@ -11,9 +11,16 @@ Page({
messages:[], messages:[],
loverInfo:{}, loverInfo:{},
hasLover:false,// 是否单身 hasLover:false,// 是否单身
userInfo:{} userInfo:{},
Send:false
}, },
closeSend(){
this.setData({Send: false})
},
openSend(){
this.setData({Send: true})
},
openZtVisible(){/**点击纸条按钮 */ openZtVisible(){/**点击纸条按钮 */
this.setData({ztVisible:true}) this.setData({ztVisible:true})

@ -4,5 +4,23 @@
<view class="fgx"></view> <view class="fgx"></view>
<view class="xzbtn" bindtap="toSend"></view> <view class="xzbtn" bindtap="toSend"></view>
<view class="jbt" ></view> <view class="jbt" ></view>
<view class="jbbtn"></view> <view class="jbbtn" bindtap="openSend"></view>
</view> </view>
<!-- 绑定情侣 -->
<view class="openSend" wx:if="{{Send}}">
<view class="openSend-main">
<view class="openSend-main-img">
</view>
<view class="openSend-main-text1">羁绊</view>
<view class="openSend-main-text2">要进行情侣绑定吗?</view>
<view class="openSend-main-text3">需要对方也唤醒了精灵</view>
<view class="openSend-main-text3">才能成功绑定哦~</view>
<view class="openSend-main-text3">点击确认发送邀请绑定链接</view>
<view class="openSend-main-text3">绑定链接有效期24小时</view>
</view>
<view class="openSend-btn">
<view class="btn" bindtap="closeSend">取消</view>
<button open-type="share" class="btn">发送</button>
</view>
</view>

@ -519,4 +519,80 @@ font-family: SourceHanSansSC-regular;
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
font-family: SourceHanSansSC-medium; font-family: SourceHanSansSC-medium;
}
.openSend {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.9);
}
.openSend-main {
width: 620rpx;
height: 1080rpx;
margin: 0 auto;
margin-top: 188rpx;
padding-top: 110rpx ;
box-sizing: border-box;
background-size: contain;
background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/%E7%BB%91%E5%AE%9A%E6%83%85%E4%BE%A3%E8%83%8C%E6%99%AF.png?q-sign-algorithm=sha1&q-ak=AKIDBoSyA3WoZy_K5pulXw4YwFFHSwjFqxnletbnHqQeqsRjs6Z9txpRYnJsTOBkTuB-&q-sign-time=1686277836;1686281436&q-key-time=1686277836;1686281436&q-header-list=host&q-url-param-list=ci-process&q-signature=690b486d55a1508bbd0fa788fc514205f8e093ae&x-cos-security-token=fOK1T4qo16Mru7W3aQJ2E9sScf0A7RGad630a09d5896cabd06bbc21068eb367b0Y1MqoJbaHndptGx2BSuYBj716Nh9KM5pliR7tTMw41pxbQkpuvQEJzIMJB81Gn2J8YczG8Xp2c8TawHArzH0tWHlefZqUS4htBd2RgoMX7sRqgMQrzWKqSqtQvCClDVjhFU8HaCDxGOe5WHMFrig91Hzv-y0eBh9tQ1ZshhS9zluBgjfnv9DvY68t4xdRRuT2lvuZodggzQgdI70Dn2Gw&ci-process=originImage);
}
.openSend-main-img {
width: 404rpx;
height: 404rpx;
margin: 0 auto;
background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/%E9%92%BB%E7%9F%B3.png?q-sign-algorithm=sha1&q-ak=AKIDst1-IkRWRN-vG6c40Q-UlDDwO_XkhhbYojH9k0I_aHwwWrsDpGsgzp8wq1qqVreA&q-sign-time=1686278212;1686281812&q-key-time=1686278212;1686281812&q-header-list=host&q-url-param-list=ci-process&q-signature=0faf4873a6d53f31c4546212b03c34facea0ad7e&x-cos-security-token=fOK1T4qo16Mru7W3aQJ2E9sScf0A7RGae2bdb94cb7cb0f1587a5681379bd60560Y1MqoJbaHndptGx2BSuYK3CIkr19FgIPMfB-yHA0KDAkpcfsga1JeNj2wEobNz87tC3goLmUbIap-_7G6k8LvI24RUR2sayPV97z2zxAuQuMMiHcziszgQTR1R1nFpF5pAqP7Wxz65QQwX-sCy_eX1AEXfpFmxzDtq1BKIHIu73jhFZ1bAbMfFpLYxNnVZDm2gcmuV8hhQM6lC5xAcVcA&ci-process=originImage);
background-size: contain;
}
.openSend-btn {
width: 100%;
display: flex;
margin-top: 42rpx;
justify-content: space-evenly;
}
.openSend-btn .btn {
width: 210rpx;
height: 70rpx;
border-radius: 20rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
color: #fff;
margin: 0;
box-sizing: border-box;
}
.openSend-main-text1 {
width: 100%;
display: flex;
justify-content: center;
color: rgba(248, 99, 42, 1);
font-size: 24px;
margin-top: 52rpx;
font-weight: 700;
}
.openSend-main-text2 {
color: rgba(108, 108, 108, 1);
font-size: 36rpx;
display: flex;
justify-content: center;
align-items: center;
margin: 42rpx 0;
}
.openSend-main-text3 {
color: rgba(108, 108, 108, 1);
font-size: 24rpx;
display: flex;
justify-content: center;
align-items: center;
margin-top: 20rpx;
} }

@ -1,18 +1,268 @@
// pages/home/xx/xz/xz.js // pages/home/xx/xz/xz.js
const app = getApp();//新建页面时 默认引入
const req = app.xzjlReq();//初始化一个的request() 实例
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
to:'',
from:'',
content:'',
img:'https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/xzimg.png',
messageList:[],
sound:'',
soundTime:0,
showBtn:true,
showImg:true,
showLtqp:true,
showImgBig:false, //图片太大弹层
showSoundMore:false, //语音太多提示
showSend:false, //寄出提示
Preview:false, //预览
showSound:false,
showAlready:false,
btn1:true,
btn2:false,
btn3:false
},
writeLetters(){
console.log('写信');
this.setData({
showImg:false,
showLtqp:false,
})
},
already(){
console.log('确定寄出');
this.setData({showAlready:true})
const list = this.data.messageList
list.push({
type: 'text',
content: this.data.content
})
const formData = {
from: this.data.from,
to: this.data.to,
messageList: list
}
console.log(formData);
req.putRequest('/api/user/curt/letter',{formData}).then(res => {
console.log(res);
})
},
closeShowImgBig(){
this.setData({showImgBig:false})
},
closeShowSoundMore(){
this.setData({showSoundMore:false})
},
openShowSend(){
this.setData({showSend:true})
},
closeShowSend(){
this.setData({showSend:false})
},
openPreview(){
console.log('预览');
this.setData({Preview:true})
},
ClearYl(){
console.log('清除语音');
// this.setData({showLtqp:false})
},
goBack(){
wx.redirectTo({
url: '/pages/home/xx/index',
})
},
ClearImg(){
console.log('清除图片');
const list = this.data.messageList.filter(item => {
return item.type !== "graphic"
})
this.setData({
img:'https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/xzimg.png',
messageList: list
})
console.log(this.data.messageList);
}, },
// 上传图片
addImg(){
console.log('添加图片');
this.setData({
showImg:true
})
wx.chooseMedia({
mediaType: 'image',
success: (res) => {
const files = res.tempFiles[0]
if(files.size > 5 * 1024 * 1024 ){
this.setData({showImgBig:true})
}
this.uploadFile(res.tempFiles[0].tempFilePath,'poster')
}
})
},
uploadFile(file,type) {
wx.uploadFile({
url: 'https://xzjl-api.windymuse.cn/api/resource',
filePath: file,
name: 'file',
header: {
'Authorization': wx.getStorageSync('token'),
'Content-Type': 'multipart/form-data'
},
formData: {
type: type
},
success: (async(res) => {
const data = JSON.parse(res.data);
console.log(data);
if (data.data.type === 'audio') {
console.log('添加音频');
const list = this.data.messageList
const audio = this.data.messageList.filter(item => {
return item.type === 'audio'
})
// 判断语音条数大于3条
if(audio.length >= 3){
this.setData({showSoundMore:true})
}else {
list.push({
type: 'audio',
resourceId: data.data.id,
})
this.setData({
messageList: list
})
}
console.log(this.data.messageList);
} else if (data.data.type === 'poster') {
console.log('添加图片');
const list = this.data.messageList
list.push({
type: 'graphic',
resourceId: data.data.id
})
this.setData({
img:data.data.abUrl,
messageList:list
})
console.log(this.data.messageList);
}
}),
// success: async res => {
// let data = JSON.parse(res.data);
// console.log(data, '111111');
// if (data.code == 200) {
// this.setData({imgUrl:data.data.abUrl})
// console.log('打印1111')
// console.log(this.data.imgUrl)
// res.data = JSON.parse(res.data);
// console.log(res.data);
// if (res.data.code == 1) {
// console.log(res.data.data.url);
// this.img = this.baseUrl + res.data.data.url;
// 图片路径
// this.userinfo.avatar = res.data.data.url;
// let n = await this.$api.upload({ file: res.data.fullurl });
// console.log(n, '上传后');
// }
// }
// },
fail(res) {
console.log('上传失败');
}
});
},
openSound(){
console.log('添加声音');
this.setData({showSound:true,showLtqp:true})
},
closeSound(){
this.setData({showSound:false})
},
startSound(){
console.log('开始录音');
const time = setInterval(()=>{
this.setData({soundTime:this.data.soundTime + 1})
},1000)
this.setData({ timeId: time })
wx.startRecord({
success: (res) => {
console.log(res.tempFilePath);
this.setData({sound:res.tempFilePath,btn1:false,btn2:true})
}
})
},
endSound(){
console.log('结束录音');
wx.stopRecord()
clearInterval(this.data.timeId)
},
playVoice(){
console.log('播放录音');
this.setData({btn2:false,btn3:true})
wx.playVoice({
filePath: this.data.sound,
complete: () => {
console.log('录音播放结束');
this.setData({btn2:true,btn3:false})
}
});
},
addSound(){
console.log('添加录音');
this.uploadFile(this.data.sound,'audio')
this.setData({
btn1:true,
btn2:false,
btn3:false,
soundTime:0
})
// console.log(this.data.messageList);
},
delSound(){
console.log('不添加该条语音');
this.setData({
sound:'',
btn1:true,
btn2:false,
btn3:false,
soundTime:0
})
},
logout(){
req.deleteRequest('/api/user/logout',{}).then((res)=>{
if(res.data.code===200){
wx.navigateTo({
url: '/pages/index/index'
})
wx.showToast({
title:'寄出成功'
})
}
})
},
getLetter(){
console.log('获取当前用户信札内容');
req.getRequest('/api/user/curt/letter',{}).then(res => {
console.log(res);
this.setData({
to: res.data.data.to,
from: res.data.data.from,
})
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.getLetter()
}, },
/** /**

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

@ -1,4 +1,108 @@
<!--pages/home/xx/xz/xz.wxml--> <!--pages/home/xx/xz/xz.wxml-->
<view class="bgt1"></view> <view class="bgt1"></view>
<view class="xinfo"></view> <view class="xinfo">
<view class="bgt2"></view> <view class="xinfo-yl-title" wx:if="{{Preview}}">
To: {{to}}
</view>
<view class="xinfo-yl-form" wx:if="{{Preview}}">
From: {{from}}
</view>
<view class="xinfo-title" wx:if="{{!Preview}}">
<view class="title-to">
<view class="text">To:</view>
<t-input model:value="{{to}}" />
</view>
<view class="title-form">
<view class="text">From:</view>
<t-input model:value="{{from}}"/>
</view>
</view>
<view class="xinfo-main" bindtap="writeLetters">
<t-textarea model:value="{{content}}" maxlength="300" placeholder="信件正文" />
</view>
<view class="{{Preview ? 'xinfo-ltqp-yl' : 'xinfo-ltqp'}}" wx:if="{{showLtqp}}">
<image src="https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/ltqp.png"></image>
<image class="xinfo-yuying" src="https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/%E8%AF%AD%E9%9F%B3.png"></image>
<view class="xinfo-ltqp-text">224″</view>
<t-icon class="xinfo-close" name="close-circle" size="48rpx" wx:if="{{!Preview}}" bindtap="ClearYl"/>
</view>
<view class="{{Preview ? 'xinfo-img-yl' : 'xinfo-img'}}" wx:if="{{showImg}}">
<image src="{{img}}"></image>
<view class="xinfo-img-close" bindtap="ClearImg"><t-icon name="close-circle" size="48rpx" wx:if="{{!Preview}}"/></view>
</view>
</view>
<view class="bgt2" wx:if="{{showBtn}}">
<view class="bgt2-btn1" bindtap="goBack">
<image src="https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/iconPark-return%401x.png"></image>
</view>
<view class="bgt2-btn2" bindtap="openSound" wx:if="{{!Preview}}">音讯</view>
<view class="bgt2-btn3" bindtap="addImg" wx:if="{{!Preview}}">画像</view>
<view class="bgt2-btn4" bindtap="openPreview" wx:if="{{!Preview}}">预览</view>
<view class="bgt2-btn5" bindtap="openShowSend" wx:if="{{!Preview}}">寄出</view>
<view class="bgt2-yz"></view>
</view>
<view class="taost" wx:if="{{showImgBig}}">
<view class="taost-box">
<view class="taost-box-text">图片太大了</view>
<view class="taost-box-text">请上传5M以内的图片</view>
<view class="taost-box-btn" bindtap="closeShowImgBig">好的</view>
</view>
</view>
<view class="sound" wx:if="{{showSound}}">
<view class="closeSound" bindtap="closeSound"></view>
<view class="sound-box">
<view class="sound-box-top">
<view bindtap="delSound">取消</view>
<view bindtap="addSound">添加</view>
</view>
<view class="sound-box-time">{{soundTime}}</view>
<view class="sound-box-img"></view>
<view class="sound-box-btn">
<view class="btn1">
<view wx:if="{{btn1}}" class="btn-being" bindlongpress="startSound" bindtouchend="endSound"></view>
<view wx:if="{{btn2}}" class="btn-over" bindtap="playVoice"></view>
<view wx:if="{{btn3}}" class="btn-audition"></view>
</view>
</view>
</view>
</view>
<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-btn" bindtap="closeShowSoundMore">好的</view>
</view>
</view>
<view class="taost" wx:if="{{showSend}}">
<view class="taost-box">
<view class="taost-box-text">确定要寄出吗?</view>
<view class="taost-box-text">信件寄出后,再次使用晶石激活</view>
<view class="taost-box-text">将直接提示打开信件</view>
<view class="Send-btn">
<view class="taost-box-btn" bindtap="closeShowSend">取消</view>
<view class="taost-box-btn" bindtap="already">确定</view>
</view>
</view>
</view>
<view class="already" wx:if="{{showAlready}}">
<view class="already-top"></view>
<view class="already-img"></view>
<view class="already-text">
<view class="already-text1">你的信件已打包好!</view>
<view class="already-text1">快把晶石送给收信人吧!</view>
<view class="already-text3">收信人首次将晶石贴近手机</view>
<view class="already-text2">将会提示打开信件</view>
<view class="already-text2">点击OK回到未激活初始页面</view>
<view class="already-text2">如果误打开信件,需要再次寄出哦!</view>
<view class="already-btn">
<view class="btn">修改</view>
<view class="btn" bindtap="logout">OK</view>
</view>
</view>
<view class="already-bom"></view>
</view>

@ -33,14 +33,507 @@
.xinfo{ .xinfo{
background-color: #FFFCF3; background-color: #FFFCF3;
position: absolute; position: absolute;
width: 615.33rpx; width: 616rpx;
height: 1242rpx; height: 1242rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
margin-top: 132rpx; margin-top: 132rpx;
margin-left: 64.67rpx; margin-left: 66rpx;
border-radius: 6.67rpx; border-radius: 6rpx;
} }
.xinfo-title {
width: 100%;
height: 100rpx;
margin-top: 60rpx;
padding-left: 64rpx;
/* background-color: pink; */
font-size: 28rpx;
color: rgba(108, 108, 108, 1);
}
.xinfo-yl-title {
margin: 60rpx 0 0 50rpx;
font-size: 32rpx;
color: rgba(108, 108, 108, 1);
}
.xinfo-yl-form {
position: absolute;
top: 980rpx;
right: 200rpx;
font-size: 32rpx;
color: rgba(108, 108, 108, 1);
}
.title-to {
display: flex;
margin-bottom: 10rpx;
width: 200rpx;
}
.title-to .text {
padding-top: 14rpx;
margin-right: 20rpx;
}
.title-to .t-input {
padding: 0;
height: 46rpx;
background-color: rgba(0, 0, 0, 0);
border-bottom: 1px solid #444444;
}
.title-form {
display: flex;
width: 250rpx;
}
.title-form .t-input {
padding: 0;
height: 46rpx;
background-color: rgba(0, 0, 0, 0);
border-bottom: 1px solid #444444;
}
.title-form .text {
padding-top: 14rpx;
margin-right: 20rpx;
}
.xinfo-main {
width: 100%;
height: 800rpx;
padding: 0 48rpx;
box-sizing: border-box;
}
.xinfo-main .t-textarea {
width: 100%;
height: 100%;
font-size: 28rpx;
background-color: rgba(0, 0, 0, 0);
}
.t-textarea__wrapper-inner {
color: rgba(108, 108, 108, 1) !important;
}
.xinfo-ltqp {
position: absolute;
top: 470rpx;
left: 44rpx;
width: 384rpx;
height: 84rpx;
z-index: 9;
}
.xinfo-ltqp-yl {
position: absolute;
top: 300rpx;
left: 44rpx;
width: 384rpx;
height: 84rpx;
}
.xinfo-ltqp-yl image {
width: 100%;
height: 100%;
}
.xinfo-ltqp image {
width: 100%;
height: 100%;
}
.xinfo-ltqp-text {
position: absolute;
top: 28rpx;
left: 160rpx;
color: rgba(79, 79, 79, 1);
font-size: 14px;
}
.xinfo-yuying {
position: absolute;
top: 8rpx;
left: 40rpx;
width: 70rpx !important;
height: 70rpx !important;
}
.xinfo-close {
position: absolute;
top: 22rpx;
right: -76rpx;
color: #6c6c6c;
}
.xinfo-img {
position: relative;
padding-top: 60rpx;
box-sizing: border-box;
width: 100%;
height: 682rpx;
display: flex;
justify-content: center;
}
.xinfo-img-yl {
position: absolute;
top: 400rpx;
box-sizing: border-box;
width: 100%;
height: 682rpx;
display: flex;
justify-content: center;
}
.xinfo-img-yl image {
width: 480rpx;
height: 550rpx;
}
.xinfo-img image {
width: 480rpx;
height: 550rpx;
}
.xinfo-img-close {
position: absolute;
top: 66rpx;
right: 0rpx;
color: #6c6c6c;
z-index: 1;
}
.bgt2-btn1 {
position: absolute;
top: 648rpx;
left: 32rpx;
width: 110rpx;
height: 110rpx;
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 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
}
.bgt2-btn1 image {
width: 60rpx;
height: 60rpx;
}
.bgt2-btn2 {
position: absolute;
top: 460rpx;
right: 32rpx;
width: 110rpx;
height: 110rpx;
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 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
color: #fff;
}
.bgt2-btn3 {
position: absolute;
top: 648rpx;
right: 32rpx;
width: 110rpx;
height: 110rpx;
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 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
color: #fff;
}
.bgt2-btn4 {
position: absolute;
top: 900rpx;
left: 124rpx;
width: 210rpx;
height: 70rpx;
border-radius: 20rpx;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
color: #fff;
font-size: 28rpx;
display: flex;
justify-content: center;
align-items: center;
}
.bgt2-btn5 {
position: absolute;
top: 900rpx;
right: 124rpx;
width: 210rpx;
height: 70rpx;
border-radius: 20rpx;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
color: #fff;
font-size: 28rpx;
display: flex;
justify-content: center;
align-items: center;
}
.bgt2-yz {
position: absolute;
top: 550rpx;
left: 310rpx;
width: 146rpx;
height: 146rpx;
background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/%E5%8D%B0%E7%AB%A0.png);
background-size: cover;
}
.taost, .sound {
position: absolute;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
z-index: 9;
background-color: rgba(255, 255, 255, 0.9);
}
.taost-box {
width: 586rpx;
height: 434rpx;
padding-top: 104rpx;
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);
}
.closeSound {
width: 100%;
height: 40%;
}
.sound-box {
position: absolute;
bottom: 0;
width: 100%;
height: 462rpx;
line-height: 40rpx;
border-radius: 10px 10px 0px 0px;
background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1);
font-size: 14px;
z-index: 100;
text-align: center;
}
.sound-box-top {
width: 100%;
height: 72rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 16px;
padding: 0 64rpx;
box-sizing: border-box;
color: rgba(108, 108, 108, 1);
border-bottom: 1px solid #e9e9e9;
}
.sound-box-time {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
color: #6c6c6c;
font-size: 16px;
margin-top: 40rpx;
}
.sound-box-img {
width: 100%;
height: 50rpx;
margin-top: 40rpx;
background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/iconPark-acoustic%20Copy%203%401x.png);
}
.sound-box-btn {
width: 100%;
height: 120rpx;
margin-top: 52rpx;
display: flex;
justify-content: center;
align-items: center;
}
.sound-box-btn .btn1 {
width: 120rpx;
height: 120rpx;
background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
}
.btn-being {
width: 60rpx;
height: 60rpx;
border-radius: 5px;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
}
.btn-over {
width: 60rpx;
height: 60rpx;
background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/if-ui-play%20Copy%401x.png);
background-size: contain;
}
.btn-audition {
width: 60rpx;
height: 60rpx;
background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/semiDesign-semi-icons-pause%20Copy%401x.png);
background-size: contain;
}
.taost-box-text {
width: 100%;
display: flex;
margin-bottom: 20rpx;
justify-content: center;
color: rgba(108, 108, 108, 1);
font-size: 18px;
}
.taost-box-btn {
width: 210rpx;
height: 64rpx;
margin: 80rpx auto;
border-radius: 20rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 6rpx solid rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
color: #fff;
font-size: 28rpx;
}
.Send-btn {
width: 100%;
justify-content: space-around;
display: flex;
}
.Send-btn .taost-box-btn{
margin: 20rpx 0;
}
.already {
position: absolute;
width: 100%;
height: 100%;
z-index: 999;
background-color: #fff;
}
.already-top {
width: 100%;
height: 230rpx;
margin-top: 104rpx;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xz/bgt1.png);
background-size: contain;
}
.already-bom {
position: absolute;
bottom: 0;
width: 100%;
height: 230rpx;
background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/bottom.png?q-sign-algorithm=sha1&q-ak=AKIDA26Gi2QT6eEFH9w1Ci79jJA6qhcjEj6PtTFNKg7m94uF8G9C09W87_G3j4xur0YP&q-sign-time=1686215079;1686218679&q-key-time=1686215079;1686218679&q-header-list=host&q-url-param-list=ci-process&q-signature=6770b3e91ac3eef3f4ccc1454d8a3a62f974a2ad&x-cos-security-token=liea1KCZaPvP7X7AVEMsUpo4E4n0UJsa215000c747614340a2e2c022d52647652gmo41jTDzQWkJ-8pNsYx46n3W1z9Nw4nnW4jYpNr6G83Ignhr68mAZMB7ui3jLNZe9HUwbfutXw758m6NvzPKwKHH_CLeWZs9epshc-cEGwMHqijiv6mQx7gHCdB5DEvYea29JaI3rbis13K6tUXyUQrP5V6l9KA20noFJkeTeWJ0gNWmp5uVA_9disJ2aq&ci-process=originImage);
background-size: contain;
}
.already-img {
margin: 0 auto;
width: 660rpx;
height: 522rpx;
background-size: contain;
background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/%E4%BF%A1.png?q-sign-algorithm=sha1&q-ak=AKID75iKvt6pKeBH6kmQmugG7VsgGfLQq1lreUvTebnOcOYJjuHMexmmTv6BLsv8wnp7&q-sign-time=1686215487;1686219087&q-key-time=1686215487;1686219087&q-header-list=host&q-url-param-list=ci-process&q-signature=69197c8ac4f07d2037248bca09f6c0c5b0eabe5b&x-cos-security-token=liea1KCZaPvP7X7AVEMsUpo4E4n0UJsaba5cb9901edd2b22e04025e2028d4d1a2gmo41jTDzQWkJ-8pNsYx9bPLid0N78p6o0Zp4VO8m2JYh70Nq7Jr5BMVkX2pkZNiRDwUyYeXWYGXbihjwO2JK5NItEL5Y2E5av5GWTJlPw4E-pIGHqTSN0T5oZ1oDybeWI33Vx8EPpYf12eFO-5RLRgQcmXyI9i8YDkSF_bNKRVLVGe7n0cbNcVIk0QqECF&ci-process=originImage);
}
.already-text {
width: 100%;
margin-top: 80rpx;
}
.already-text1 {
width: 100%;
display: flex;
justify-content: center;
color: rgba(108, 108, 108, 1);
font-size: 18px;
margin-bottom: 10rpx;
}
.already-text2 {
width: 100%;
display: flex;
justify-content: center;
color: rgba(108, 108, 108, 1);
font-size: 14px;
margin-top: 20rpx;
}
.already-text3 {
width: 100%;
display: flex;
justify-content: center;
color: rgba(108, 108, 108, 1);
font-size: 14px;
margin-top: 72rpx;
}
.already-btn {
width: 100%;
margin-top: 48rpx;
display: flex;
justify-content: space-around;
}
.already-btn .btn {
width: 210rpx;
height: 70rpx;
box-sizing: border-box;
border-radius: 20rpx;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
color: #fff;
}

@ -52,6 +52,7 @@ Page({
}); });
}, },
uploadFile(file) {/**执行 */ uploadFile(file) {/**执行 */
console.log(file,'这里');
wx.uploadFile({ wx.uploadFile({
url: 'https://xzjl-api.windymuse.cn/api/resource', url: 'https://xzjl-api.windymuse.cn/api/resource',
filePath: file.url, filePath: file.url,
@ -250,7 +251,6 @@ Page({
// 获取我的许愿 // 获取我的许愿
getMyWish(){ getMyWish(){
req.getRequest('/api/user/curt/wish',{}).then((res)=>{ req.getRequest('/api/user/curt/wish',{}).then((res)=>{
console.log(res,'11111111')
if(res.data.code==200){ if(res.data.code==200){
this.setData({wishes:res.data.data.records}) this.setData({wishes:res.data.data.records})
} }
@ -272,13 +272,13 @@ Page({
*/ */
onReady() { onReady() {
this.initXy() this.initXy()
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
this.getMyWish()
}, },
/** /**
@ -291,7 +291,6 @@ Page({
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {
}, },
/** /**

@ -35,6 +35,13 @@
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "",
"pathName": "pages/home/xx/xz/xz",
"query": "",
"launchMode": "default",
"scene": null
} }
] ]
} }

Loading…
Cancel
Save