main
Wkang921 2 years ago
parent f0ba491683
commit f2b68aee91

@ -79,7 +79,6 @@ Page({
const horoscopes = res.data.data
const type = this.data.userInfo.horoscope.name
this.setData({xingxiangtu: horoscopes[type].sprite})
console.log(this.data.xingxiangtu, '1111');
}
}).catch((err)=>{
console.log(err);
@ -93,7 +92,6 @@ Page({
if(res.data.code==200){
this.setData({loverInfo:res.data.data})
}
console.log(this.userInfo);
}).catch((err)=>{
console.log(err);
})
@ -328,21 +326,21 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
this.getUserInfo()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
this.getUserInfo()
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
this.getUserInfo()
},
/**

@ -1,4 +1,8 @@
/* pages/home/jl/index.wxss */
page {
height: 100%;
}
.tx{
position:absolute;
width:72rpx;
@ -120,10 +124,12 @@
}
.call{
position: absolute;
margin: 0;
padding: 0;
width:750rpx;
height:1624rpx!important;
height: 100%;
/* height:1624rpx!important; */
overflow: hidden;
padding: 0!important;
margin: 0!important;
@ -329,6 +335,9 @@
height:116.67rpx;
margin-top: 837.33rpx;
margin-left:517.33rpx;
display: flex;
align-items: center;
justify-content: center;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/yan.png);
@ -379,13 +388,12 @@
}
.yan13{
position: absolute;
width:46.67rpx;
/* position: absolute; */
width:36rpx;
height:46.67rpx;
background-repeat: no-repeat;
background-size:100% 100%;
margin-top: 33.33rpx;
margin-left:34.33rpx;
background-size: contain;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/jl/female.png);
}
@ -923,7 +931,7 @@ picker-view-column {
.dcright1 {
position: absolute;
bottom: 270rpx;
top: 1232rpx;
right: 109rpx;
}

@ -31,7 +31,7 @@
</view>
<view class="data-item">
<view class="srwz">生日</view>
<view class="srtxt" bindtap="handleCalendar">{{userInfo.birthday}}</view>
<view class="srtxt" bindtap="handleCalendar">{{userInfo.birthday ? userInfo.birthday : '点击选择日期'}}</view>
</view>
<view class="data-item">
<view class="xzwz">星座</view>

@ -4,7 +4,7 @@
<view class="title">解除羁绊</view>
<view class="main-img">
<image src="cloud://cloud1-2geqetnm309fb1b9.636c-cloud1-2geqetnm309fb1b9-1318421017/jcjcimg.png" />
<image src="https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/%E9%92%BB%E7%9F%B3.png" />
</view>
<view class="timeout" wx:if="{{showTimeout}}"> {{ timeout }} </view>
@ -14,7 +14,7 @@
<view class="btn-container">
<view class="btn" bindlongpress="handleLongPress" bindtouchend="handleTouchEnd">
<image src="cloud://cloud1-2geqetnm309fb1b9.636c-cloud1-2geqetnm309fb1b9-1318421017/ze-arrow.png"/>
<image src="https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/xy/ze-arrow.png"/>
</view>
</view>

@ -11,8 +11,8 @@ Page({
to:'',
from:'',
content:'',
img:'',
messageList:[],
audioList:[], // 音频列表
imgList:[], // 图片列表
sound:'',
soundTime:'00:00:00',
duration: '',
@ -20,41 +20,24 @@ Page({
second:0, //秒
millisecond:0, //毫秒
showBtn:true,
showImg:false,
showLtqp:false,
showImgBig:false, //图片太大弹层
showSoundMore:false, //语音太多提示
showSend:false, //寄出提示
Preview:false, //预览
showSound:false,
showAlready:false,
showImgToast:false,
showImgToastBig:false,
btn1:true,
btn2:false,
btn3:false,
btn4:false,
showSoundImg:true
},
writeLetters(){
console.log('写信');
this.setData({
showImg:false,
showLtqp:false,
Preview: false
})
},
leavetext(){
console.log('离开了');
if (this.data.img !== '' || this.data.duration !== '') {
this.setData({
showImg: true,
showLtqp: true
})
}
},
already(){
console.log('确定寄出');
this.setData({showAlready:true})
const list = this.data.messageList
const list = [ ...this.data.audioList, ...this.data.imgList]
list.push({
type: 'text',
content: this.data.content
@ -87,36 +70,34 @@ Page({
closeShowSend(){
this.setData({showSend:false})
},
closeShowImgToast(){this.setData({showImgToast: false})},
openPreview(){
console.log('预览');
this.setData({Preview:true})
if(this.data.messageList.length){
this.setData({showLtqp: true})
}
},
ClearYl(){
ClearYl(e){
console.log('清除语音');
this.setData({showLtqp:false})
const list = this.data.messageList.filter(item => {
item.type !== 'audio'
const id = e.currentTarget.dataset.id
const list = this.data.audioList.filter(item => {
return item.resourceId !== id
})
this.setData({messageList: list})
this.setData({audioList: list})
},
ClearImg(e){
console.log('清除图片');
const id = e.currentTarget.dataset.id
const list = this.data.imgList.filter(item => {
return item.resourceId !== id
})
this.setData({imgList: list})
},
goBack(){
if (this.data.Preview) {
this.setData({Preview: false})
}else{
console.log('返回');
wx.navigateBack()
},
ClearImg(){
console.log('清除图片');
const list = this.data.messageList.filter(item => {
return item.type !== "graphic"
})
this.setData({
img:'',
messageList: list,
showImg: false
})
console.log(this.data.messageList);
}
},
// 上传图片
addImg(){
@ -132,6 +113,7 @@ Page({
}
})
},
// 文件上传
uploadFile(file,type) {
wx.uploadFile({
url: 'https://xzjl-api.windymuse.cn/api/resource',
@ -149,38 +131,32 @@ Page({
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){
const list = this.data.audioList
if(list.length >= 3){
this.setData({showSoundMore:true ,showSoundImg:true})
console.log('语音太多了');
}else {
list.push({
type: 'audio',
resourceId: data.data.id,
duration: this.data.duration,
extra: {duration : this.data.duration}
})
this.setData({
messageList: list,
showSoundImg: true
})
this.setData({audioList: list})
}
console.log(this.data.messageList);
} else if (data.data.type === 'poster') {
console.log('添加图片');
const list = this.data.messageList
const list = this.data.imgList
if (list.length >= 9) {
this.setData({showImgToast : true})
}else {
list.push({
type: 'graphic',
resourceId: data.data.id
})
this.setData({
resourceId: data.data.id,
img: data.data.abUrl,
messageList:list,
showImg:true
})
console.log(this.data.messageList);
this.setData({imgList: list, showImg:true})
}
}
}),
fail(res) {
@ -278,6 +254,7 @@ Page({
this.setData({btn3: true ,btn4: false})
},
addSound(){
if(this.data.btn3){
console.log('添加录音');
console.log(this.data.soundTime);
this.setData({duration: this.data.soundTime})
@ -295,6 +272,7 @@ Page({
millisecond:0,
soundTime:'00:00:00'
})
}
},
logout(){
req.deleteRequest('/api/user/logout',{}).then((res)=>{
@ -307,9 +285,6 @@ Page({
})
}
})
// wx.showToast({
// title: 'ok了',
// })
},
modify(){
this.setData({showAlready: false, showSend: false})

@ -1,12 +1,13 @@
<!--pages/home/xx/xz/xz.wxml-->
<view class="bgt1"></view>
<view class="xinfo">
<view class="xinfo-content">
<view class="xinfo-yl-title" wx:if="{{Preview}}">
To: {{to}}
</view>
<view class="xinfo-yl-form" wx:if="{{Preview}}">
<!-- <view class="xinfo-yl-form" wx:if="{{Preview}}">
From: {{from}}
</view>
</view> -->
<view class="xinfo-title" wx:if="{{!Preview}}">
<view class="title-to">
<view class="text">To:</view>
@ -17,18 +18,27 @@
<t-input model:value="{{from}}"/>
</view>
</view>
<view class="xinfo-main" bindtap="writeLetters">
<t-textarea bindblur="leavetext" model:value="{{content}}" maxlength="300" placeholder="信件正文" />
<!-- 信件文本 -->
<view class="xinfo-main">
<t-textarea autosize="true" model:value="{{content}}" 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>
<!-- 信件语音 -->
<view class="{{Preview ? 'xinfo-ltqp-yl' : 'xinfo-ltqp'}}" wx:for="{{audioList}}" wx:key="index">
<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">{{duration}}</view>
<t-icon class="xinfo-close" name="close-circle" size="48rpx" wx:if="{{!Preview}}" bindtap="ClearYl"/>
<view class="xinfo-ltqp-text">{{item.duration}}</view>
<t-icon class="xinfo-close" name="close-circle" size="48rpx" wx:if="{{!Preview}}" bindtap="ClearYl" data-id="{{item.resourceId}}"/>
</view>
<!-- 信件图片 -->
<view class="{{Preview ? 'xinfo-img-yl' : 'xinfo-img'}}" wx:for="{{imgList}}" wx:key="index">
<image src="{{item.img}}"></image>
<view class="xinfo-img-close" bindtap="ClearImg" data-id="{{item.resourceId}}">
<t-icon name="close-circle" size="48rpx" wx:if="{{!Preview}}"/>
</view>
</view>
<view class="xinfo-yl-form" wx:if="{{Preview}}">
From: {{from}}
</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}}">
@ -51,7 +61,6 @@
</view>
<view class="sound" wx:if="{{showSound}}">
<view class="closeSound"></view>
<view class="sound-box">
<view class="sound-box-top">
<view bindtap="closeSound">取消</view>
@ -87,6 +96,14 @@
</view>
</view>
<view class="taost" wx:if="{{showImgToast}}">
<view class="taost-box">
<view class="taost-box-text">最多只能上传</view>
<view class="taost-box-text">9张图片</view>
<view class="taost-box-btn" bindtap="closeShowImgToast">好的</view>
</view>
</view>
<view class="taost" wx:if="{{showSend}}">
<view class="taost-box">
<view class="taost-box-text">确定要寄出吗?</view>

@ -1,4 +1,9 @@
/* pages/home/xx/xz/xz.wxss */
page {
height: 100%;
overflow: hidden;
}
.bgt1{
position: absolute;
width: 690rpx;
@ -28,6 +33,7 @@
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
pointer-events: none;
}
.xinfo{
@ -44,12 +50,21 @@
border-radius: 6rpx;
}
.xinfo-content {
width: 100%;
height: 100%;
padding-bottom: 300rpx;
overflow: auto;
position: relative;
pointer-events: auto;
}
.xinfo-title {
width: 100%;
height: 100rpx;
margin-top: 60rpx;
padding-left: 64rpx;
/* background-color: pink; */
box-sizing: border-box;
font-size: 28rpx;
color: rgba(108, 108, 108, 1);
}
@ -61,9 +76,11 @@
}
.xinfo-yl-form {
position: absolute;
top: 980rpx;
right: 200rpx;
width: 100%;
text-align: end;
margin-top: 30rpx;
padding-right: 64rpx;
box-sizing: border-box;
font-size: 32rpx;
color: rgba(108, 108, 108, 1);
}
@ -105,14 +122,19 @@
.xinfo-main {
width: 100%;
height: 800rpx;
padding: 0 48rpx;
height: auto;
margin: 60rpx 0 32rpx 0;
padding: 0 64rpx;
box-sizing: border-box;
}
textarea {
height: none;
}
.xinfo-main .t-textarea {
width: 100%;
height: 100%;
padding: 0;
font-size: 28rpx;
background-color: rgba(0, 0, 0, 0);
}
@ -122,20 +144,25 @@
}
.xinfo-ltqp {
position: absolute;
top: 470rpx;
left: 44rpx;
width: 384rpx;
position: relative;
width: 382rpx;
height: 84rpx;
z-index: 9;
margin: 0 0 20rpx 64rpx;
display: flex;
align-items: center;
background-size: contain;
background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/ltqp.png);
}
.xinfo-ltqp-yl {
position: absolute;
top: 300rpx;
left: 44rpx;
width: 384rpx;
position: relative;
width: 382rpx;
height: 84rpx;
margin: 0 0 20rpx 64rpx;
display: flex;
align-items: center;
background-size: contain;
background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/ltqp.png);
}
.xinfo-ltqp-yl image {
@ -149,62 +176,56 @@
}
.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;
margin: 0 40rpx;
width: 70rpx !important;
height: 70rpx !important;
}
.xinfo-close {
position: absolute;
top: 22rpx;
right: -76rpx;
top: 20rpx;
right: -60rpx;
color: #6c6c6c;
}
.xinfo-img {
position: absolute;
top: 600rpx;
padding: 60rpx 0 0 30rpx;
box-sizing: border-box;
width: 100%;
position: relative;
width: 480rpx;
height: 682rpx;
margin: 40rpx 0 0 64rpx;
display: flex;
justify-content: center;
}
.xinfo-img-yl {
position: absolute;
top: 400rpx;
box-sizing: border-box;
width: 100%;
position: relative;
width: 480rpx;
height: 682rpx;
margin: 40rpx 0 0 64rpx;
display: flex;
justify-content: center;
}
.xinfo-img-yl image {
width: 480rpx;
height: 550rpx;
width: 100%;
height: 100%;
}
.xinfo-img image {
width: 480rpx;
height: 550rpx;
width: 100%;
height: 100%;
}
.xinfo-img-close {
position: absolute;
top: 0;
right: -60rpx;
color: #6c6c6c;
z-index: 1;
}
.bgt2-btn1 {
@ -221,6 +242,8 @@
justify-content: center;
align-items: center;
z-index: 1;
pointer-events: auto;
}
.bgt2-btn1 image {
@ -242,6 +265,7 @@
justify-content: center;
align-items: center;
color: #fff;
pointer-events: auto;
}
.bgt2-btn3 {
@ -258,6 +282,7 @@
justify-content: center;
align-items: center;
color: #fff;
pointer-events: auto;
}
.bgt2-btn4 {
@ -275,6 +300,7 @@
display: flex;
justify-content: center;
align-items: center;
pointer-events: auto;
}
.bgt2-btn5 {
@ -292,6 +318,7 @@
display: flex;
justify-content: center;
align-items: center;
pointer-events: auto;
}
.bgt2-yz {
@ -302,9 +329,10 @@
height: 146rpx;
background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/%E5%8D%B0%E7%AB%A0.png);
background-size: cover;
pointer-events: auto;
}
.taost, .sound {
.taost{
position: absolute;
width: 100%;
height: 100%;
@ -326,9 +354,12 @@
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4);
}
.closeSound {
.sound {
position: relative;
width: 100%;
height: 40%;
height: 100%;
z-index: 9;
background-color: rgba(255, 255, 255, 0.9);
}
.sound-box {
@ -506,7 +537,6 @@
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;
}

@ -11,8 +11,8 @@ Page({
to:'',
from:'',
content:'',
img:'',
messageList:[],
audioList:[], // 音频列表
imgList:[], // 图片列表
sound:'',
soundTime:'00:00:00',
duration: '',
@ -20,41 +20,24 @@ Page({
second:0, //秒
millisecond:0, //毫秒
showBtn:true,
showImg:false,
showLtqp:false,
showImgBig:false, //图片太大弹层
showSoundMore:false, //语音太多提示
showSend:false, //寄出提示
Preview:false, //预览
showSound:false,
showAlready:false,
showImgToast:false,
showImgToastBig:false,
btn1:true,
btn2:false,
btn3:false,
btn4:false,
showSoundImg:true
},
writeLetters(){
console.log('写信');
this.setData({
showImg:false,
showLtqp:false,
Preview: false
})
},
leavetext(){
console.log('离开了');
if (this.data.img !== '' || this.data.duration !== '') {
this.setData({
showImg: true,
showLtqp: true
})
}
},
already(){
console.log('确定寄出');
this.setData({showAlready:true})
const list = this.data.messageList
const list = [ ...this.data.audioList, ...this.data.imgList]
list.push({
type: 'text',
content: this.data.content
@ -87,36 +70,34 @@ Page({
closeShowSend(){
this.setData({showSend:false})
},
closeShowImgToast(){this.setData({showImgToast: false})},
openPreview(){
console.log('预览');
this.setData({Preview:true})
if(this.data.messageList.length){
this.setData({showLtqp: true})
}
},
ClearYl(){
ClearYl(e){
console.log('清除语音');
this.setData({showLtqp:false})
const list = this.data.messageList.filter(item => {
item.type !== 'audio'
const id = e.currentTarget.dataset.id
const list = this.data.audioList.filter(item => {
return item.resourceId !== id
})
this.setData({messageList: list})
this.setData({audioList: list})
},
ClearImg(e){
console.log('清除图片');
const id = e.currentTarget.dataset.id
const list = this.data.imgList.filter(item => {
return item.resourceId !== id
})
this.setData({imgList: list})
},
goBack(){
if (this.data.Preview) {
this.setData({Preview: false})
}else{
console.log('返回');
wx.navigateBack()
},
ClearImg(){
console.log('清除图片');
const list = this.data.messageList.filter(item => {
return item.type !== "graphic"
})
this.setData({
img:'',
messageList: list,
showImg: false
})
console.log(this.data.messageList);
}
},
// 上传图片
addImg(){
@ -132,6 +113,7 @@ Page({
}
})
},
// 文件上传
uploadFile(file,type) {
wx.uploadFile({
url: 'https://xzjl-api.windymuse.cn/api/resource',
@ -149,38 +131,32 @@ Page({
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){
const list = this.data.audioList
if(list.length >= 3){
this.setData({showSoundMore:true ,showSoundImg:true})
console.log('语音太多了');
}else {
list.push({
type: 'audio',
resourceId: data.data.id,
duration: this.data.duration,
extra: {duration : this.data.duration}
})
this.setData({
messageList: list,
showSoundImg: true
})
this.setData({audioList: list})
}
console.log(this.data.messageList);
} else if (data.data.type === 'poster') {
console.log('添加图片');
const list = this.data.messageList
const list = this.data.imgList
if (list.length >= 9) {
this.setData({showImgToast : true})
}else {
list.push({
type: 'graphic',
resourceId: data.data.id
})
this.setData({
resourceId: data.data.id,
img: data.data.abUrl,
messageList:list,
showImg:true
})
console.log(this.data.messageList);
this.setData({imgList: list, showImg:true})
}
}
}),
fail(res) {
@ -278,6 +254,7 @@ Page({
this.setData({btn3: true ,btn4: false})
},
addSound(){
if(this.data.btn3){
console.log('添加录音');
console.log(this.data.soundTime);
this.setData({duration: this.data.soundTime})
@ -295,6 +272,7 @@ Page({
millisecond:0,
soundTime:'00:00:00'
})
}
},
logout(){
req.deleteRequest('/api/user/logout',{}).then((res)=>{
@ -307,9 +285,6 @@ Page({
})
}
})
// wx.showToast({
// title: 'ok了',
// })
},
modify(){
this.setData({showAlready: false, showSend: false})

@ -1,12 +1,13 @@
<!--pages/home/xx/xz/xz.wxml-->
<view class="bgt1"></view>
<view class="xinfo">
<view class="xinfo-content">
<view class="xinfo-yl-title" wx:if="{{Preview}}">
To: {{to}}
</view>
<view class="xinfo-yl-form" wx:if="{{Preview}}">
<!-- <view class="xinfo-yl-form" wx:if="{{Preview}}">
From: {{from}}
</view>
</view> -->
<view class="xinfo-title" wx:if="{{!Preview}}">
<view class="title-to">
<view class="text">To:</view>
@ -17,18 +18,27 @@
<t-input model:value="{{from}}"/>
</view>
</view>
<view class="xinfo-main" bindtap="writeLetters">
<t-textarea bindblur="leavetext" model:value="{{content}}" maxlength="300" placeholder="信件正文" />
<!-- 信件文本 -->
<view class="xinfo-main">
<t-textarea autosize="true" model:value="{{content}}" 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>
<!-- 信件语音 -->
<view class="{{Preview ? 'xinfo-ltqp-yl' : 'xinfo-ltqp'}}" wx:for="{{audioList}}" wx:key="index">
<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">{{duration}}</view>
<t-icon class="xinfo-close" name="close-circle" size="48rpx" wx:if="{{!Preview}}" bindtap="ClearYl"/>
<view class="xinfo-ltqp-text">{{item.duration}}</view>
<t-icon class="xinfo-close" name="close-circle" size="48rpx" wx:if="{{!Preview}}" bindtap="ClearYl" data-id="{{item.resourceId}}"/>
</view>
<!-- 信件图片 -->
<view class="{{Preview ? 'xinfo-img-yl' : 'xinfo-img'}}" wx:for="{{imgList}}" wx:key="index">
<image src="{{item.img}}"></image>
<view class="xinfo-img-close" bindtap="ClearImg" data-id="{{item.resourceId}}">
<t-icon name="close-circle" size="48rpx" wx:if="{{!Preview}}"/>
</view>
</view>
<view class="xinfo-yl-form" wx:if="{{Preview}}">
From: {{from}}
</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}}">
@ -51,7 +61,6 @@
</view>
<view class="sound" wx:if="{{showSound}}">
<view class="closeSound"></view>
<view class="sound-box">
<view class="sound-box-top">
<view bindtap="closeSound">取消</view>
@ -87,6 +96,14 @@
</view>
</view>
<view class="taost" wx:if="{{showImgToast}}">
<view class="taost-box">
<view class="taost-box-text">最多只能上传</view>
<view class="taost-box-text">9张图片</view>
<view class="taost-box-btn" bindtap="closeShowImgToast">好的</view>
</view>
</view>
<view class="taost" wx:if="{{showSend}}">
<view class="taost-box">
<view class="taost-box-text">确定要寄出吗?</view>

@ -1,4 +1,9 @@
/* pages/home/xx/xz/xz.wxss */
page {
height: 100%;
overflow: hidden;
}
.bgt1{
position: absolute;
width: 690rpx;
@ -28,6 +33,7 @@
color:#9A9A9A;
text-align: center;
font-size: 27rpx;
pointer-events: none;
}
.xinfo{
@ -44,12 +50,21 @@
border-radius: 6rpx;
}
.xinfo-content {
width: 100%;
height: 100%;
padding-bottom: 300rpx;
overflow: auto;
position: relative;
pointer-events: auto;
}
.xinfo-title {
width: 100%;
height: 100rpx;
margin-top: 60rpx;
padding-left: 64rpx;
/* background-color: pink; */
box-sizing: border-box;
font-size: 28rpx;
color: rgba(108, 108, 108, 1);
}
@ -61,9 +76,11 @@
}
.xinfo-yl-form {
position: absolute;
top: 980rpx;
right: 200rpx;
width: 100%;
text-align: end;
margin-top: 30rpx;
padding-right: 64rpx;
box-sizing: border-box;
font-size: 32rpx;
color: rgba(108, 108, 108, 1);
}
@ -105,14 +122,19 @@
.xinfo-main {
width: 100%;
height: 800rpx;
padding: 0 48rpx;
height: auto;
margin: 60rpx 0 32rpx 0;
padding: 0 64rpx;
box-sizing: border-box;
}
textarea {
height: none;
}
.xinfo-main .t-textarea {
width: 100%;
height: 100%;
padding: 0;
font-size: 28rpx;
background-color: rgba(0, 0, 0, 0);
}
@ -122,20 +144,25 @@
}
.xinfo-ltqp {
position: absolute;
top: 470rpx;
left: 44rpx;
width: 384rpx;
position: relative;
width: 382rpx;
height: 84rpx;
z-index: 9;
margin: 0 0 20rpx 64rpx;
display: flex;
align-items: center;
background-size: contain;
background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/ltqp.png);
}
.xinfo-ltqp-yl {
position: absolute;
top: 300rpx;
left: 44rpx;
width: 384rpx;
position: relative;
width: 382rpx;
height: 84rpx;
margin: 0 0 20rpx 64rpx;
display: flex;
align-items: center;
background-size: contain;
background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/ltqp.png);
}
.xinfo-ltqp-yl image {
@ -149,62 +176,56 @@
}
.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;
margin: 0 40rpx;
width: 70rpx !important;
height: 70rpx !important;
}
.xinfo-close {
position: absolute;
top: 22rpx;
right: -76rpx;
top: 20rpx;
right: -60rpx;
color: #6c6c6c;
}
.xinfo-img {
position: absolute;
top: 600rpx;
padding: 60rpx 0 0 30rpx;
box-sizing: border-box;
width: 100%;
position: relative;
width: 480rpx;
height: 682rpx;
margin: 40rpx 0 0 64rpx;
display: flex;
justify-content: center;
}
.xinfo-img-yl {
position: absolute;
top: 400rpx;
box-sizing: border-box;
width: 100%;
position: relative;
width: 480rpx;
height: 682rpx;
margin: 40rpx 0 0 64rpx;
display: flex;
justify-content: center;
}
.xinfo-img-yl image {
width: 480rpx;
height: 550rpx;
width: 100%;
height: 100%;
}
.xinfo-img image {
width: 480rpx;
height: 550rpx;
width: 100%;
height: 100%;
}
.xinfo-img-close {
position: absolute;
top: 0;
right: -60rpx;
color: #6c6c6c;
z-index: 1;
}
.bgt2-btn1 {
@ -221,6 +242,8 @@
justify-content: center;
align-items: center;
z-index: 1;
pointer-events: auto;
}
.bgt2-btn1 image {
@ -242,6 +265,7 @@
justify-content: center;
align-items: center;
color: #fff;
pointer-events: auto;
}
.bgt2-btn3 {
@ -258,6 +282,7 @@
justify-content: center;
align-items: center;
color: #fff;
pointer-events: auto;
}
.bgt2-btn4 {
@ -275,6 +300,7 @@
display: flex;
justify-content: center;
align-items: center;
pointer-events: auto;
}
.bgt2-btn5 {
@ -292,6 +318,7 @@
display: flex;
justify-content: center;
align-items: center;
pointer-events: auto;
}
.bgt2-yz {
@ -302,9 +329,10 @@
height: 146rpx;
background-image: url(https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/%E5%8D%B0%E7%AB%A0.png);
background-size: cover;
pointer-events: auto;
}
.taost, .sound {
.taost{
position: absolute;
width: 100%;
height: 100%;
@ -326,9 +354,12 @@
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4);
}
.closeSound {
.sound {
position: relative;
width: 100%;
height: 40%;
height: 100%;
z-index: 9;
background-color: rgba(255, 255, 255, 0.9);
}
.sound-box {
@ -506,7 +537,6 @@
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;
}

@ -38,16 +38,16 @@ Page({
}
if(res.data.data.horoscope){
this.setData({visible: true})
const showVisible = setTimeout(() => {
this.setData({visible: false})
clearTimeout(showVisible)
}, 1000)
}
}).catch((err)=>{
console.log(err);
})
this.setData({xyInfo:wx.getStorageSync('nfc')})
},
// 关闭运势提示
closeYs(){
this.setData({visible: !this.data.visible})
},
/**
* 生命周期函数--监听页面初次渲染完成

@ -1,7 +1,7 @@
<!--pages/home/xy/index.wxml-->
<view class="jrys"></view>
<view class="gold111"></view>
<view class="gold">
<view class="gold" bindtap="closeYs">
<view class="gold1"></view>
<view class="gold2"></view>
<view class="gold3" bindtap="ToastDialog"></view>
@ -19,7 +19,7 @@
<image class="xzy" src="{{xzInfo[userInfo.horoscope.name].avatar}}"></image>
<view class="ttpopup" wx:if="{{visible}}">
<view class="ttpopup" wx:if="{{visible}}" bindtap="closeYs">
<view class="ztys">{{userInfo.horoscope.summary}}</view>
<view class="ttpopup-img"/>
<view class="rjkzs">健康指数<t-rate value="{{userInfo.horoscope.health / 20}}" icon="{{ ['star-filled', 'star'] }}" color="#FCFC32" /></view>

@ -82,38 +82,38 @@
</view>
<view class="main-box">
<view class="box-item">
<button open-type="share" class="item-icon">
<t-image src="cloud://cloud1-2geqetnm309fb1b9.636c-cloud1-2geqetnm309fb1b9-1318421017/wechat.png"></t-image>
<button open-type="share" class="item-icon" bindtap="shareWx">
<t-image src="https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/xy/antFill-wx.png"></t-image>
</button>
<view class="item-text">微信</view>
</view>
<view class="box-item">
<view class="item-icon cyan">
<t-image src="cloud://cloud1-2geqetnm309fb1b9.636c-cloud1-2geqetnm309fb1b9-1318421017/pyq.png"></t-image>
<t-image src="https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/xy/antFill-pyq.png"></t-image>
</view>
<view class="item-text">朋友圈</view>
</view>
<view class="box-item">
<view class="item-icon orange">
<t-image src="cloud://cloud1-2geqetnm309fb1b9.636c-cloud1-2geqetnm309fb1b9-1318421017/weibo.png"></t-image>
<t-image src="https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/xy/antFill-wb.png"></t-image>
</view>
<view class="item-text">微博</view>
</view>
<view class="box-item">
<view class="item-icon blue" bindtap="shareQQ">
<t-image src="cloud://cloud1-2geqetnm309fb1b9.636c-cloud1-2geqetnm309fb1b9-1318421017/qq.png"></t-image>
<view class="item-icon blue">
<t-image src="https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/xy/antFill-qq.png"></t-image>
</view>
<view class="item-text">QQ</view>
</view>
<view class="box-item">
<view class="item-icon yellow">
<t-image src="cloud://cloud1-2geqetnm309fb1b9.636c-cloud1-2geqetnm309fb1b9-1318421017/qqkj.png"></t-image>
<t-image src="https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/xy/antFill-qqkj.png"></t-image>
</view>
<view class="item-text">QQ空间</view>
</view>
<view class="box-item">
<view class="item-icon orange" bindtap="downLoad">
<t-image src="cloud://cloud1-2geqetnm309fb1b9.636c-cloud1-2geqetnm309fb1b9-1318421017/tupian.png"></t-image>
<view class="item-icon orange">
<t-image src="https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/xy/antFill-tp.png"></t-image>
</view>
<view class="item-text">生成图片</view>
</view>

@ -112,37 +112,37 @@ data-del="{{detail.id}}"
<view class="main-box">
<view class="box-item">
<button open-type="share" class="item-icon" bindtap="shareWx">
<t-image src="cloud://cloud1-2geqetnm309fb1b9.636c-cloud1-2geqetnm309fb1b9-1318421017/wechat.png"></t-image>
<t-image src="https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/xy/antFill-wx.png"></t-image>
</button>
<view class="item-text">微信</view>
</view>
<view class="box-item">
<view class="item-icon cyan">
<t-image src="cloud://cloud1-2geqetnm309fb1b9.636c-cloud1-2geqetnm309fb1b9-1318421017/pyq.png"></t-image>
<t-image src="https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/xy/antFill-pyq.png"></t-image>
</view>
<view class="item-text">朋友圈</view>
</view>
<view class="box-item">
<view class="item-icon orange">
<t-image src="cloud://cloud1-2geqetnm309fb1b9.636c-cloud1-2geqetnm309fb1b9-1318421017/weibo.png"></t-image>
<t-image src="https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/xy/antFill-wb.png"></t-image>
</view>
<view class="item-text">微博</view>
</view>
<view class="box-item">
<view class="item-icon blue">
<t-image src="cloud://cloud1-2geqetnm309fb1b9.636c-cloud1-2geqetnm309fb1b9-1318421017/qq.png"></t-image>
<t-image src="https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/xy/antFill-qq.png"></t-image>
</view>
<view class="item-text">QQ</view>
</view>
<view class="box-item">
<view class="item-icon yellow">
<t-image src="cloud://cloud1-2geqetnm309fb1b9.636c-cloud1-2geqetnm309fb1b9-1318421017/qqkj.png"></t-image>
<t-image src="https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/xy/antFill-qqkj.png"></t-image>
</view>
<view class="item-text">QQ空间</view>
</view>
<view class="box-item">
<view class="item-icon orange">
<t-image src="cloud://cloud1-2geqetnm309fb1b9.636c-cloud1-2geqetnm309fb1b9-1318421017/tupian.png"></t-image>
<t-image src="https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/xy/antFill-tp.png"></t-image>
</view>
<view class="item-text">生成图片</view>
</view>

@ -12,7 +12,9 @@ Page({
letterMsg:{},
showLetter: true,
showMore: false,
showDel:false
showDel:false,
imgList:[],
audioList:[]
},
openLetter(){
this.setData({showLetter: !this.data.showLetter}),
@ -48,7 +50,7 @@ Page({
}else if(item.type === 'graphic') {
this.getResource(id, item.resourceId, 'graphic')
}else if(item.type === 'audio') {
this.getResource(id, item.resourceId, 'audio')
this.getResource(id, item.resourceId, 'audio',item.extra.duration)
}
})
})
@ -56,32 +58,37 @@ Page({
getUserInfo(){
req.getRequest('/api/user/curt',{}).then(res => {
const id = res.data.data.id
// console.log(res.data.data.id,'当前用户id');
this.getLetterMsg(id)
})
},
// 获取文件
getResource(id,k,type){
getResource(id,k,type,time){
if(type === 'graphic'){
this.setData({
const list = this.data.imgList
list.push({
img: `https://xzjl-api.windymuse.cn/api/resource/${k}?k=${id}`
})
this.setData({
imgList: list
})
}else if(type === 'audio'){
const list = this.data.audioList
list.push({
audio: `https://xzjl-api.windymuse.cn/api/resource/${k}?k=${id}`,
duration:time
})
this.setData({
videos: `https://xzjl-api.windymuse.cn/api/resource/${k}?k=${id}`
audioList:list
})
console.log(this.data.videos,'语音路径');
}
},
// 播放录音
playVideos(){
console.log('播放录音');
wx.playVoice({
filePath: this.data.videos,
complete: () => {
console.log('录音播放结束');
}
});
playVideos(e){
console.log(e.currentTarget.dataset.url.audio);
const innerAudioContext = wx.createInnerAudioContext()
innerAudioContext.src = e.currentTarget.dataset.url.audio
innerAudioContext.play()
},
// 重置信札
resetLetter(){

@ -1,5 +1,6 @@
{
"usingComponents": {
"t-icon": "tdesign-miniprogram/icon/icon"
"t-icon": "tdesign-miniprogram/icon/icon",
"t-textarea": "tdesign-miniprogram/textarea/textarea"
}
}

@ -23,17 +23,20 @@
<view class="body" wx:if="{{!showLetter}}">
<view class="xinfo">
<view class="xinfo-title">To{{letterMsg.to}}</view>
<view class="xinfo-main">{{content}}</view>
<view class="xinfo-voice" bindtap="playVideos">
<view class="xinfo-main">
<t-textarea disabled autosize="true" model:value="{{content}}"/>
</view>
<view class="xinfo-voice" bindtap="playVideos" wx:for="{{audioList}}" wx:key="index" data-url="{{item}}">
<view class="xinfo-icon"></view>
<view >224″</view>
<view> {{item.duration}} </view>
</view>
<view class="xinfo-img">
<image src="{{img}}" />
<view class="xinfo-img" wx:for="{{imgList}}" wx:key="index">
<image src="{{item.img}}" />
</view>
<view class="xinfo-sign">Form{{letterMsg.from}}</view>
<view class="xinfo-time">{{time}}</view>
</view>
<view class="body-btm-img">
<view class="btm-img-icon"></view>
<view class="btm-img-goback" bindtap="go2Back">
@ -42,7 +45,7 @@
<view class="btm-img-more" bindtap="openMore">
<image src="https://wk921-1316969570.cos.ap-nanjing.myqcloud.com/md-more_horiz%20Copy%401x.png" />
</view>
<view class="btm-img-more modify" wx:if="{{showMore}}" bindtap="openDel">毁</view>
<view class="btm-img-more modify" wx:if="{{showMore}}" bindtap="openDel">毁</view>
<!-- <view class="btm-img-more del" wx:if="{{showMore}}">修改</view> -->
</view>
</view>
@ -52,12 +55,11 @@
<view class="delete" wx:if="{{showDel}}">
<view class="delete-box">
<view class="box-text">确定要烧毁信件吗?</view>
<view class="box-text">毁后信件将彻底消失</view>
<view class="box-text">毁后信件将彻底消失</view>
<view class="box-btn">
<view class="btn" bindtap="openDel">取消</view>
<view class="btn" bindtap="resetLetter">确认</view>
</view>
</view>
</view>
<view class="already-bom"></view>
</view>

@ -1,3 +1,9 @@
page {
width: 100%;
height: 100%;
overflow: hidden;
}
.already {
position: absolute;
width: 100%;
@ -14,15 +20,6 @@
background-size: cover;
}
.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=AKIDfvpcLTNuapJJHUt0Z2rbBMp4k2pff5pWzlB5o9--17jbvIhKwVSQfyquVN8nNxo8&q-sign-time=1686534496;1686538096&q-key-time=1686534496;1686538096&q-header-list=host&q-url-param-list=ci-process&q-signature=0b0d7bf20a2353114083673bdd497b5fd18d0a9f&x-cos-security-token=A0Hm0aVxi1d56hf0mChBZ7Edq8QG89uac5b83c45bef2b85a205521b986a97c6cQJmRBPRfeIpaoWvsyFmIxmdsaVt0UDGCkVi9Ydxb2ErOZqsBa_JJDPzxfBOZdg6Yj8M8FOqnsqp1Uy1UOt2o02Z6sW2LqFMMV4DxsAYO5xqjoTZ530uZhKuZ9jYMk_fc_VF9viosxMHtAR9nAFDUR0XfaNxiQABXw3xTSFDbF8K0BT9RI3X-Weotpg7BsqSnAlr5a5NuSk0Xi68873kz7A&ci-process=originImage);
background-size: cover;
}
.already-img {
margin: 0 auto;
width: 660rpx;
@ -90,9 +87,10 @@
margin: 0 auto;
width: 616rpx;
height: 1300rpx;
padding-top: 50rpx;
padding: 50rpx 0 200rpx 0;
border-radius: 20rpx;
box-sizing: border-box;
overflow: auto;
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4);
}
@ -110,6 +108,13 @@
margin: 32rpx 50rpx;
}
.xinfo-main .t-textarea {
width: 100%;
padding: 0;
font-size: 28rpx;
background-color: rgba(0, 0, 0, 0);
}
.xinfo-voice {
width: 384rpx;
height: 84rpx;
@ -166,6 +171,7 @@
width: 100%;
height: 900rpx;
background-size: cover;
pointer-events: none;
background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xz/bgt2.png);
}
@ -192,6 +198,7 @@
display: flex;
justify-content: center;
align-items: center;
pointer-events: auto;
z-index: 1;
}
@ -214,6 +221,7 @@
justify-content: center;
align-items: center;
z-index: 1;
pointer-events: auto;
}
.btm-img-more image {

@ -10,7 +10,7 @@
"list": [
{
"name": "",
"pathName": "pages/home/me/grzl/grzl",
"pathName": "pages/xz/index",
"query": "",
"launchMode": "default",
"scene": null

Loading…
Cancel
Save