Compare commits

...

14 Commits
main ... zw

BIN
.DS_Store vendored

Binary file not shown.

@ -11,10 +11,8 @@
"pages/index/out/out", "pages/index/out/out",
"pages/xz/index", "pages/xz/index",
"pages/home/xx/xz/xz", "pages/home/xx/xz/xz",
"pages/home/xx/xz/index",
"pages/home/me/manual/manual", "pages/home/me/manual/manual",
"pages/home/me/member/member", "pages/home/me/member/member",
"pages/home/me/member2/member",
"pages/home/me/gw/gw", "pages/home/me/gw/gw",
"pages/home/me/ysxy/ysxy", "pages/home/me/ysxy/ysxy",
"pages/home/me/yhsyxy/yhsyxy", "pages/home/me/yhsyxy/yhsyxy",
@ -26,14 +24,12 @@
"pages/home/xyc/wdyw/wdyw", "pages/home/xyc/wdyw/wdyw",
"pages/home/xyc/tdyw/tdyw", "pages/home/xyc/tdyw/tdyw",
"pages/home/me/grzl/grzl", "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/index",
"pages/home/xx/hy/hx/hx", "pages/home/xx/hy/hx/hx",
"pages/home/xx/hy/yx/yx", "pages/home/xx/hy/yx/yx",
"pages/home/xx/hy/zt/zt", "pages/home/xx/hy/zt/zt",
"pages/home/xx/lindex/lindex", "pages/home/xx/lindex/lindex",
"pages/home/xx/lindex/xz/xz",
"pages/home/xx/lindex/lxz/lxz" "pages/home/xx/lindex/lxz/lxz"
], ],
"window": { "window": {

@ -18,4 +18,9 @@
page { page {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden;
}
view {
box-sizing: border-box;
} }

@ -1,40 +0,0 @@
Component({
relations: {
'./popover': {
type: 'parent'
}
},
/**
* 组件的属性列表
*/
properties: {
// 是否有底线
hasline: {
type: Boolean,
value: false
}
},
/**
* 组件的初始数据
*/
data: {
// 每项的高度
height: 40
},
/**
* 组件的方法列表
*/
methods: {
onClick: function() {
let { index } = this.properties;
let eventDetail = {
index: index
};
let eventOption = {};
this.triggerEvent('tap', eventDetail, eventOption);
}
}
})

@ -1,4 +0,0 @@
{
"component": true,
"usingComponents": {}
}

@ -1,3 +0,0 @@
<view class='popover-item {{hasline ? "underline" : ""}}' hover-class='popover-item-hover' catchtap='onClick' style='height:{{height}}px;line-height:{{height}}px;'>
<slot/>
</view>

@ -1,14 +0,0 @@
.popover-item {
width: 100%;
font-size: 14px;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.popover-item-hover {
background-color: #EEE;
}
.underline{
border-bottom:1px #EEE solid;
}

@ -1,99 +0,0 @@
const { windowWidth, windowHeight } = wx.getSystemInfoSync();
// 三角形箭头的高度
const trangleHeight = 12;
Component({
relations: {
'./popover-item': {
type: 'child'
}
},
data: {
// 当前显隐状态
visible: false,
// popover 宽
pw: 100,
// popover 高
ph: 120,
// popover 距左距离
px: 0,
// popover 距上距离
py: 0,
// 垂直方向 top/bottom
vertical: '',
// 水平方向 left/center/right
align: ''
},
methods: {
onDisplay: function(e) {
let self = this;
if (self.last && self.last === e.id) {
self.setData({
visible: !self.data.visible
});
} else {
wx.createSelectorQuery().selectViewport().scrollOffset(view => {
let { pw, ph, px, py, vertical, align } = self.data;
let pOverW = (pw - e.width) / 2;
let offsetL = e.left,
offsetR = windowWidth - e.right,
offsetB = windowHeight - e.bottom;
if (offsetL >= pOverW && offsetR >= pOverW) {
align = 'center';
px = e.left - pOverW;
} else if (offsetL > pOverW && offsetR < pOverW) {
align = 'left';
px = windowWidth - (offsetR + pw);
// 如果向右贴边了,设置一点距离
if ((windowWidth - pw) == px) px -= 5;
} else if (offsetL < pOverW && offsetR > pOverW) {
align = 'right';
px = e.left;
// 如果向左贴边了,设置一点距离
if (px == 0) px += 5;
}
if (offsetB >= (ph + trangleHeight)) {
vertical = 'bottom';
py = view.scrollTop + e.bottom + trangleHeight;
} else {
vertical = 'top';
py = view.scrollTop + e.top - ph - trangleHeight;
}
self.setData({
visible: true,
px: px,
py: py,
ph: self.getItemsHeight(),
vertical: vertical,
align: align
});
}).exec();
}
// 记录上一次点击的元素
self.last = e.id;
},
onHide: function() {
this.setData({
visible: false
});
},
// 获取所有子元素
getItems: function() {
return this.getRelationNodes('./popover-item');
},
// 获取所有子元素的总高度
getItemsHeight() {
return this.getItems().map(item => item.data.height).reduce((a, b) => a + b, 0);
}
}
})

@ -1,4 +0,0 @@
{
"component": true,
"usingComponents": {}
}

@ -1,6 +0,0 @@
<view
wx:if='{{visible}}'
class='popover-view {{vertical}} {{align}}'
style='width:{{pw}}px;height:{{ph}}px;left:{{px}}px;top:{{py}}px;'>
<slot />
</view>

@ -1,40 +0,0 @@
.popover-view {
position: absolute;
background-color: white;
box-shadow: 0 0 2px 2px #ddd;
border-radius: 6rpx;
}
/* 实现三角形 */
.popover-view::before {
position: absolute;
display: inline-block;
width: 0;
height: 0px;
content: '';
border-style: solid;
border-width: 6px;
border-color: #fff #fff transparent transparent;
box-shadow: 2px -2px 2px #ddd;
}
/* 上 */
.popover-view.top::before {
bottom: -6px;
transform: rotate(135deg);
}
/* 下 */
.popover-view.bottom::before {
top: -6px;
transform: rotate(-45deg);
}
/* 左 */
.popover-view.left::before {
right: 20px;
}
/* 中 */
.popover-view.center::before {
left: 47px;
}
/* 右 */
.popover-view.right::before {
left: 20px;
}

BIN
icons/.DS_Store vendored

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 758 KiB

@ -17,7 +17,8 @@ Page({
minute:0, minute:0,
minutes:0, minutes:0,
pickerValue: [0, 0], pickerValue: [0, 0],
prayTime:0, //祈祷时间 swiperIndex: 0,
prayTime:'00:00:00', //祈祷时间
prayTimeStr: '选择祈祷时长' , prayTimeStr: '选择祈祷时长' ,
prayerContent:'', //祈祷内容 prayerContent:'', //祈祷内容
showSexLogo:false,//不展示形象修改按钮 showSexLogo:false,//不展示形象修改按钮
@ -30,7 +31,13 @@ Page({
showInject:false, //显示注入能量 showInject:false, //显示注入能量
showInEnergy:false, //显示能量注入中 showInEnergy:false, //显示能量注入中
showScsEnergy:false, //显示注册成功提示 showScsEnergy:false, //显示注册成功提示
showTiming:false //显示祈祷时间弹层 showTiming:false, //显示祈祷时间弹层
jmEnergy:false,
showInjectBkc: false, //显示注入能量按钮动画
inPrayer: true,
qdTime: null,
ysTime: ''
}, },
ShowOrNotLogoS(){ ShowOrNotLogoS(){
this.setData({singleShow:!this.data.singleShow}) this.setData({singleShow:!this.data.singleShow})
@ -48,6 +55,9 @@ Page({
doSetXxtFemale(){ doSetXxtFemale(){
this.doSetXxt('female') this.doSetXxt('female')
}, },
closeJmEnergy(){
this.setData({jmEnergy: false})
},
doSetXxt(e){ doSetXxt(e){
req.patchRequest('/api/user/curt',{spriteType:e}).then((res)=>{ req.patchRequest('/api/user/curt',{spriteType:e}).then((res)=>{
if(res.data.code==200){ if(res.data.code==200){
@ -75,17 +85,20 @@ Page({
console.log(err); console.log(err);
}) })
}, },
getXxObj(){/**获取形象对应的图片 */ /**获取形象对应的图片 */
req.getRequest('/api/dict/value/horoscope-resource',{}).then((res)=>{ getXxObj(){
if(res.data.code==200){ const horoscopes = wx.getStorageSync('xy-static-img')
console.log(res.data.data); const userType = this.data.userInfo.constellation
const horoscopes = res.data.data const loveType = this.data.loverInfo.constellation
const type = this.data.userInfo.horoscope.name this.setData({
this.setData({xingxiangtu: horoscopes[type].sprite}) xingxiangtu: horoscopes[userType],
} })
}).catch((err)=>{ if (loveType) {
console.log(err); this.setData({
xingxiangtuLove: horoscopes[loveType],
}) })
}
}, },
ShowOrNotLogo(){ ShowOrNotLogo(){
this.setData({showSexLogo:!this.data.showSexLogo}) this.setData({showSexLogo:!this.data.showSexLogo})
@ -94,6 +107,10 @@ Page({
req.getRequest('/api/user/curt/lover',{}).then((res)=>{ req.getRequest('/api/user/curt/lover',{}).then((res)=>{
if(res.data.code==200){ if(res.data.code==200){
this.setData({loverInfo:res.data.data}) this.setData({loverInfo:res.data.data})
if (res.data.data.prayerStartTime) {
this.getQdTime(res.data.data)
}
} }
}).catch((err)=>{ }).catch((err)=>{
console.log(err); console.log(err);
@ -123,14 +140,16 @@ Page({
}) })
}, },
openPray(){ openPray(){
if(this.data.userInfo.prayerEndTime){ this.getUserInfo()
if(this.data.userInfo.isInPrayer){
this.setData({ this.setData({
showIsPray:!this.data.showIsPray showIsPray:!this.data.showIsPray
}) })
}else{ }else{
this.setData({ this.setData({
showPray:!this.data.showPray, showPray:!this.data.showPray,
prayerContent:'' prayerContent:'',
prayTimeStr: '选择祈祷时长'
}) })
} }
this.setData({showTiming: false}) this.setData({showTiming: false})
@ -153,21 +172,52 @@ Page({
}) })
}, },
openInject(){ openInject(){
console.log('注入能量');
this.setData({
showInjectBkc: true
})
const touchTimer = setTimeout(() => {
this.setData({
showInject:!this.data.showInject,
})
}, 3000);
this.setData({
touchTimer: touchTimer
})
},
closeInject(){
console.log('结束');
this.setData({showInjectBkc: false})
clearInterval(this.data.touchTimer)
},
clostBtnInject(){
this.setData({ this.setData({
showInject:!this.data.showInject showInject:!this.data.showInject
}) })
}, },
// 注入晶石 // 注入晶石
btnInject(){ btnInject(){
// 判断之前加持是否已结束
if (this.data.userInfo.pendantLuckInBlessing) {
wx.showToast({
title: '吊坠能量加持未结束',
icon: 'none'
})
return this.setData({
showInject: false
})
}
// 判断是否有能量 // 判断是否有能量
if (this.data.userInfo.crystallineEnergy) { if (this.data.userInfo.crystallineEnergy) {
this.setData({ this.setData({
showInject:!this.data.showInject, showInject:!this.data.showInject,
showInEnergy:!this.data.showInEnergy showInEnergy:!this.data.showInEnergy,
crystallineEnergy: this.data.userInfo.crystallineEnergy
}) })
req.patchRequest('/api/user/curt/inject-energy-to-pendant',{}).then((res)=>{ req.patchRequest('/api/user/curt/inject-energy-to-pendant',{}).then((res)=>{
console.log('能量注入成功'); if (res.data.code === 200) {
}) console.log(res, '能量注入成功');
setTimeout(()=>{ setTimeout(()=>{
this.setData({ this.setData({
showInEnergy:!this.data.showInEnergy, showInEnergy:!this.data.showInEnergy,
@ -175,13 +225,29 @@ Page({
}) })
this.getUserInfo() this.getUserInfo()
},2000) },2000)
}
})
// 计算守护时长
const energy = (this.data.userInfo.pendantEnergy + this.data.userInfo.crystallineEnergy) * 4.8
let minute = 0
let hour = 0
if (energy >= 60) {
hour = Math.floor(energy / 60)
minute = Math.floor(energy - (hour * 60 ))
if (minute < 10) {
minute = '0' + minute
}
}
this.setData({
guarTime: `${hour}小时${minute}分钟`
})
}else{ }else{
console.log('没有能量');
this.setData({showInject: false}) this.setData({showInject: false})
Toast({ wx.showToast({
context: this, title: '能量不足',
selector: '#t-toast', icon: 'error'
message: '能量不足', })
});
} }
}, },
// 关闭注入弹层 // 关闭注入弹层
@ -189,23 +255,11 @@ Page({
getUserInfo(){ getUserInfo(){
req.getRequest('/api/user/curt',{}).then((res)=>{ req.getRequest('/api/user/curt',{}).then((res)=>{
if(res.data.code===200){ if(res.data.code===200){
// 获取已经祈祷时间 if (res.data.data.prayerStartTime) {
const now = new Date(); this.getQdTime(res.data.data)
const startTime = new Date(res.data.data.prayerStartTime) }
const diff = now.getTime() - startTime.getTime();
const hour = Math.floor(diff / (1000 * 60 * 60));
const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((diff % (1000 * 60)) / 1000);
const formattedTime = `${hour.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
// 获取结束祈祷返回能量
const nowTime = new Date();
const endTime = new Date(res.data.data.prayerEndTime)
const TimeDiff = endTime.getTime() - nowTime.getTime();
this.setData({
prayTime: formattedTime,
energy: Math.floor(TimeDiff / 360000)
})
// 获取可以祈祷的时间
const pendantEnergy = res.data.data.crystallineEnergy const pendantEnergy = res.data.data.crystallineEnergy
const hours = Math.floor(pendantEnergy * 6 / 60); // 计算小时数 const hours = Math.floor(pendantEnergy * 6 / 60); // 计算小时数
const minute = pendantEnergy * 6 - hours * 60 const minute = pendantEnergy * 6 - hours * 60
@ -219,64 +273,140 @@ Page({
minutes:minute minutes:minute
}) })
} }
this.setData({ this.setData({
userInfo:res.data.data,
hours:hours, hours:hours,
minute:minute, minute:minute,
pendantEnergy:pendantEnergy pendantEnergy:pendantEnergy
}) })
// 能量集满显示提示
if(res.data.data.crystallineEnergy >= 100){
this.setData({
jmEnergy: true
})
}
this.setData({
userInfo:res.data.data,
})
// 判断运势加持是否结束
const endSeconds = new Date(res.data.data.pendantLuckyEndTime)
const nowSeconds = new Date()
if (endSeconds > nowSeconds) {
this.getYsTime(res.data.data.pendantLuckyStartTime)
}
this.getXxObj() this.getXxObj()
// console.log(this.data.userInfo);
} }
}).catch((err)=>{ }).catch((err)=>{
console.log(err); console.log(err);
}) })
}, },
// 计算运势已加持时间
getYsTime(milliseconds){
const statrSeconds = new Date(milliseconds)
const ysTime = setInterval(() => {
const nowSeconds = new Date()
const nowTime = nowSeconds - statrSeconds
const hours = Math.floor(nowTime / 1000 / 3600);
const minutes = Math.floor(nowTime / 1000 / 60 - (hours * 60)) ;
const seconds = Math.floor(nowTime / 1000 - (hours * 3600) - (minutes * 60));
const formattedHours = String(hours).padStart(2, '0');
const formattedMinutes = String(minutes).padStart(2, '0');
const formattedSeconds = String(seconds).padStart(2, '0');
const time = `${formattedHours}:${formattedMinutes}:${formattedSeconds}`
this.setData({ydTime: time})
}, 1000)
this.setData({ysTime: ysTime})
},
// 计算祈祷时间
getQdTime(data){
clearInterval(this.data.qdTime)
this.data.qdTime = setInterval(() => {
// 获取已经祈祷时间
const now = new Date();
const startTime = new Date(data.prayerStartTime)
const diff = now.getTime() - startTime.getTime();
const hour = Math.floor(diff / (1000 * 60 * 60));
const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((diff % (1000 * 60)) / 1000);
const formattedTime = `${hour.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
// 获取结束祈祷返回能量
const nowTime = new Date();
const endTime = new Date(data.prayerEndTime)
const TimeDiff = endTime.getTime() - nowTime.getTime();
// 判断是否正在祈祷
if (data.isInPrayer) {
this.setData({
prayTime: formattedTime,
energy: Math.floor(TimeDiff / 360000),
})
}
console.log('定时器执行');
}, 1000);
},
go2Jlai(){ go2Jlai(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/jl/jlai/jlai' url: '/pages/home/jl/jlai/jlai',
}) })
}, },
btnOK(){ btnOK(){
const prayerEnergy = (this.data.pickerValue[0]*60 + this.data.pickerValue[1])/6 const prayerEnergy = (this.data.pickerValue[0]*60 + this.data.pickerValue[1])/6
if(this.data.pickerValue[0] === 0 && this.data.pickerValue[1] <= 5){
return wx.showToast({
title: '祈祷时间不能小于五分钟',
icon: 'none'
})
}
if(this.data.userInfo.crystallineEnergy < 1){ if(this.data.userInfo.crystallineEnergy < 1){
return Toast({ return wx.showToast({
context: this, title: '能量不足',
selector: '#t-toast', icon: 'none'
message: '能量不足',
}); });
} }
if(this.data.prayerContent === ''){ if(this.data.prayerContent === ''){
return Toast({ return wx.showToast({
context: this, title: '祈祷内容不能为空',
selector: '#t-toast', icon: 'none'
message: '祈祷内容不能为空',
}); });
} }
if(this.data.prayerContent.length > 11){ if(this.data.prayerContent.length > 11){
return Toast({ return wx.showToast({
context: this, title: '祈祷内容不能超过11个字',
selector: '#t-toast', icon: 'none'
message: '祈祷内容不能超过11个字',
}); });
} }
req.patchRequest('/api/user/curt/prayer',{ req.patchRequest('/api/user/curt/prayer',{
prayerContent:this.data.prayerContent, prayerContent:this.data.prayerContent,
prayerEnergy:prayerEnergy prayerEnergy:prayerEnergy
}).then((res) => { }).then((res) => {
if (res.data.code === 1002) {
return wx.showToast({
title: 'Ta正在为你祈祷中请在祈祷结束后再试试~',
icon: 'none'
})
}
if(res.data.code === 200){ if(res.data.code === 200){
Toast({ wx.showToast({
context: this, title: '祈祷成功',
selector: '#t-toast', icon: 'success'
message: '祈祷成功', })
});
}else{
Toast({
context: this,
selector: '#t-toast',
message: res.data.msg,
});
} }
this.getUserInfo() this.getUserInfo()
this.openPray() this.openPray()
}).catch((err) => { }).catch((err) => {
@ -285,19 +415,43 @@ Page({
this.setData({showTiming: false}) this.setData({showTiming: false})
}, },
btnCancel(){ btnCancel(){
console.log('111'); // 更新数据后清除定时器
clearInterval(this.data.qdTime)
this.data.qdTime = null
console.log('清除定时器');
req.patchRequest('/api/user/curt/prayer/stop',{}).then((res)=>{ req.patchRequest('/api/user/curt/prayer/stop',{}).then((res)=>{
Toast({ if(res.data.code === 200){
context: this, wx.showToast({
selector: '#t-toast', title: '已结束祈祷',
message: '已结束祈祷', icon: 'success'
}); })
this.setData({prayTime : '00:00:00'})
this.openPray() this.openPray()
this.getUserInfo() this.getUserInfo()
}else {
wx.showToast({
title: '结束祈祷失败',
icon: 'error'
})
}
}) })
}, },
btnShare(){ btnShare(){
console.log('赠送能量'); if (this.data.loverInfo.crystallineEnergy === 100) {
return this.setData({
showEnergy:!this.data.showEnergy,
showEnergyToast:!this.data.showEnergyToast,
toast: '对方能量已经满啦~'
})
}
if (this.data.userInfo.crystallineEnergy === 0) {
return this.setData({
showEnergy:!this.data.showEnergy,
showEnergyToast:!this.data.showEnergyToast,
toast: '你剩余的能量不足~'
})
}
req.patchRequest('/api/user/curt/give-crystalline-energy-to-lover',{}).then((res)=>{ req.patchRequest('/api/user/curt/give-crystalline-energy-to-lover',{}).then((res)=>{
console.log(res); console.log(res);
if(res.data.code === 200){ if(res.data.code === 200){
@ -312,12 +466,13 @@ Page({
showEnergySuccess:!this.data.showEnergySuccess, showEnergySuccess:!this.data.showEnergySuccess,
}) })
},2000) },2000)
} }else if(res.data.code === 500){
this.setData({ return this.setData({
showEnergy:!this.data.showEnergy, showEnergy:!this.data.showEnergy,
showEnergyToast:!this.data.showEnergyToast, showEnergyToast:!this.data.showEnergyToast,
toast:res.data.msg toast: '对方能量已经满啦~'
}) })
}
}).catch((err)=>{ }).catch((err)=>{
console.log('111'); console.log('111');
this.setData({ this.setData({
@ -327,6 +482,25 @@ Page({
}) })
}, },
// 切换轮播图
goLeftSwiper(){
if (this.data.swiperIndex === 0) {
this.setData({swiperIndex: 2})
}else {
this.setData({swiperIndex: this.data.swiperIndex - 1})
}
},
goRightSwiper(){
if (this.data.swiperIndex === 2){
this.setData({swiperIndex: 0})
}else {
this.setData({swiperIndex: this.data.swiperIndex + 1})
}
},
swiperChange(e){
this.setData({swiperIndex: e.detail.current})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
@ -339,7 +513,7 @@ Page({
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {
this.getXxObj()
}, },
/** /**
@ -347,6 +521,7 @@ Page({
*/ */
onShow() { onShow() {
this.getUserInfo() this.getUserInfo()
this.getXxObj()
}, },
/** /**
@ -354,6 +529,7 @@ Page({
*/ */
onHide() { onHide() {
this.getUserInfo() this.getUserInfo()
clearInterval(this.data.qdTime)
}, },
/** /**
@ -361,6 +537,8 @@ Page({
*/ */
onUnload() { onUnload() {
this.getUserInfo() this.getUserInfo()
clearInterval(this.data.setInterval)
clearInterval(this.data.qdTime)
}, },
/** /**
@ -381,19 +559,10 @@ Page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {
}, },
ToastDialog(e) { ToastDialog(e) {
const { item } = e.currentTarget.dataset; this.setData({ visible: !this.data.visible });
this.setData(
{
},
() => {
this.setData({ visible: true });
},
);
} }
, ,
onVisibleChange(e) { onVisibleChange(e) {

@ -1,173 +1,355 @@
<swiper wx:if="{{userInfo.loverId}}" class="call" bindtap="closeEnergy" current="{{swiperIndex}}" circular bindchange="swiperChange">
<swiper class="call" bindtap="closeEnergy"> <t-toast id="t-toast" />
  <swiper-item class="call1"><!--单人页面--> <!-- 情侣页面 -->
<t-image class="tx" src="{{userInfo.avatar}}"></t-image> <swiper-item class="call1">
<view class="txtext">{{userInfo.nick}}</view><!--头像名字--> <!-- 未祈祷头像名字 -->
<view class="gh"></view> <view class="call1-header" wx:if="{{ !userInfo.isInPrayer && !loverInfo.isInPrayer}}">
<!-- 我的名字和头像 -->
<div class="bkg3"></div><!--点点点,最底层背景图--> <view class="txtextl">{{userInfo.nick}}</view>
<dic class="bkg1"></dic><!--黄色点背景图--> <t-image class="txl" src="{{userInfo.avatar ? userInfo.avatar : xingxiangtu['elf-avatar']}}"></t-image>
<view class="gh"></view> <view class="jiuchan"></view>
<!-- 情侣名字和头像 -->
<t-image class="txr" shape="circle" src="{{loverInfo.avatar ? loverInfo.avatar : xingxiangtuLove['elf-avatar']}}"></t-image>
<view class="txtextr">{{loverInfo.nick}}</view>
</view>
<!-- 已祈祷头像名字 -->
<view class="call1-header" wx:else>
<t-image class="txl" src="{{userInfo.avatar ? userInfo.avatar : xingxiangtu['elf-avatar']}}"></t-image>
<view class="txtextl-qd">
<t-icon name="chevron-right-double" size="24" color="#DE868F" />
<view class="text-qd">
<view wx:if="{{userInfo.isInPrayer}}" class="top">
{{ userInfo.prayerContent }}
</view>
<view wx:if="{{loverInfo.isInPrayer}}" class="top">
{{ loverInfo.prayerContent }}
</view>
<view wx:if="{{userInfo.isInPrayer}}">你已为Ta祈祷 {{prayTime}}</view>
<view wx:if="{{loverInfo.isInPrayer}}">Ta已为你祈祷 {{prayTime}}</view>
</view>
<t-icon name="chevron-right-double" size="24" color="#DE868F" />
</view>
<t-image class="txr" shape="circle" src="{{loverInfo.avatar ? loverInfo.avatar : xingxiangtuLove['elf-avatar']}}"></t-image>
</view>
<!-- 精灵图片 -->
<view class="bkg1">
<view class="bkg2">
<view class="bkg3">
<view class="bkg4">
<view class="bkg5">
<view class="xxt" bindtap="ShowOrNotLogo"> <view class="xxt" bindtap="ShowOrNotLogo">
<image src="{{xingxiangtu[userInfo.spriteType]}}"></image> <!-- 左侧人形象 -->
<view class="xxtl" bindtap="ShowOrNotLogoS">
<image mode="heightFix" src="{{xingxiangtu.sprite[userInfo.spriteType]}}"></image>
<!-- 形态切换 -->
<view class="xxtl-xt1" wx:if="{{singleShow}}">
<view class="yanql1" bindtap="doSetXxtFemale">
<view class="yan13"></view>
</view> </view>
<view class="yan1" wx:if="{{showSexLogo}}" data-yan="animal" bindtap="doSetXxtAnimal"><!--动物形象--> <!-- <view class="yanql2" bindtap="doSetXxtAnimal">
<view class="yan11"></view> <view class="yan11"></view>
</view> </view> -->
<view class="yan2" wx:if="{{showSexLogo}}" data-yan="male" bindtap="doSetXxtMale"><!--男性形象--> <view class="yanql3" bindtap="doSetXxtMale" wx:if="{{singleShow}}">
<view class="yan12"></view> <view class="yan12"></view>
</view> </view>
<view class="yan3" wx:if="{{showSexLogo}}" data-yan="female" bindtap="doSetXxtFemale"><!--女性形象--> </view>
</view>
<!-- 右侧人形象 -->
<view class="xxtr" bindtap="ShowOrNotLogoL">
<image mode="heightFix" src="{{xingxiangtuLove.sprite[loverInfo.spriteType]}}"></image>
<!-- 形态切换 -->
<view class="xxtr-xt2" wx:if="{{loverShow}}">
<view class="yanql4" bindtap="doSetXxtFemaleS">
<view class="yan13"></view> <view class="yan13"></view>
</view> </view>
<!-- <view class="yanql5" bindtap="doSetXxtAnimalS">
<view class="yan11"></view>
</view> -->
<view class="yanql6" bindtap="doSetXxtMaleS">
<view class="yan12"></view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="gh"></view>
</view>
<!-- 底部图标 -->
<view class="call1-btn">
<!-- 左侧图标 -->
<view class="dcleft">
<t-progress class="dcleft1" theme="circle" percentage="{{userInfo.crystallineEnergy}}" color="#f76229" label="" t-class-bar="dcleft1" stroke-width="8rpx" />
<view class="dcbs">
<image src="{{xingxiangtu.crystal}}" />
</view>
<view class="dclefttxt">{{userInfo.crystallineEnergy}}%</view>
</view>
<!-- 中间祈祷 -->
<view class="call1-btn-qd">
<view class="lovepic" bindtap="openPray"></view>
<view class="dchxtxtql" bindtap="openPray" wx:if="{{ !userInfo.isInPrayer }}">
祈祷
</view>
<view class="dchxtxtql" bindtap="openPray" wx:else>结束祈祷</view>
</view>
<!-- 右侧图标 -->
<view class="dcleft"> <view class="dcleft">
<view class="dcrightql">
<t-progress class="dcleft1" theme="circle" percentage="{{userInfo.crystallineEnergy}}" color="#f76229" label="" t-class-bar="dcleft1" /> <t-progress class="dcleft1" theme="circle" percentage="{{loverInfo.crystallineEnergy}}" color="#00A7FF" label="" t-class-bar="dcleft1" stroke-width="8rpx" />
<view class="dcbs"></view> <view class="dcrbs" bindtap="openEnergy">
</view><!--下方左侧块--> <image src="{{xingxiangtuLove.crystal}}" />
</view>
</view>
<view class="dcrighttxt">{{loverInfo.crystallineEnergy}}%</view>
</view>
</view>
</swiper-item>
<!-- 单人页面 -->
<swiper-item class="call1">
<!-- 头像名字 -->
<view class="call1-header">
<image class="tx" src="{{userInfo.avatar ? userInfo.avatar : xingxiangtu['elf-avatar']}}"></image>
<view class="txtext">{{userInfo.nick ? userInfo.nick : userInfo.constellation}}</view>
<!-- 运势加持 -->
<view class="ysjc" wx:if="{{userInfo.pendantLuckInBlessing}}">
<t-icon name="chevron-right-double" size="24" color="#DE868F" />
<view class="ys-time">运势已加持{{ydTime}}</view>
<t-icon name="chevron-right-double" size="24" color="#DE868F" />
</view>
</view>
<!-- 精灵图片 -->
<view class="bkg1">
<view class="bkg2">
<view class="bkg3">
<view class="bkg4">
<view class="bkg5">
<view class="xxt" bindtap="ShowOrNotLogo">
<image mode="heightFix" src="{{xingxiangtu.sprite[userInfo.spriteType]}}"></image>
</view>
</view>
</view>
</view>
</view>
<view class="gh"></view>
</view>
<!-- 底部图标 -->
<view class="call1-btn">
<!-- 下方左侧块 --> <!-- 下方左侧块 -->
<t-progress class="dchx" percentage="{{userInfo.crystallineEnergy}}" trackColor="#EAC9FF" color="#f76229" label=""/><!--中间进度条--> <view class="dcleft">
<t-progress class="dcleft1" theme="circle" percentage="{{userInfo.crystallineEnergy}}" color="#f76229" label="" t-class-bar="dcleft1" stroke-width="8rpx" />
<view class="dcbs">
<image src="{{xingxiangtu.crystal}}" />
</view>
<view class="dclefttxt">水晶能量</view>
</view>
<!-- 中间进度条 -->
<view class="dcleft-middle">
<t-progress class="dchx" percentage="{{userInfo.crystallineEnergy}}" trackColor="#E0E3EA" color="#f76229" label="" stroke-width="16rpx" />
<view class="dchx-box">
<view class="dchx-box-cantainer" wx:if="{{showInjectBkc}}">
<view class="box" wx:for="{{20}}" wx:key="index"></view>
</view>
</view>
<view class="dchxtxt">{{userInfo.crystallineEnergy}}%</view> <view class="dchxtxt">{{userInfo.crystallineEnergy}}%</view>
<t-progress class="dcright1" theme="circle" percentage="{{userInfo.pendantEnergy}}" color="#FBB093" label="" t-class-bar="dcleft1" /> </view>
<view class="dcright"> <!-- 下方左侧块 -->
<view class="dcrightwjx" bindtap="openInject"></view><!--下方右侧五角星--> <view class="dcleft-right">
</view><!--下方左侧块--> <view class="dcright-bgc">
<view class="dcright-bg" wx:if="{{showInjectBkc}}"></view>
</view>
<view class="dcright" bind:touchstart="openInject" bind:touchend="closeInject">
<view class="dcrightwjx"></view>
</view>
<view class="dcrighttxt">能量注入</view>
</view>
</view>
<!-- 形象按钮 -->
<view class="call1-vivid" wx:if="{{showSexLogo}}">
<!-- 男性形象 -->
<view class="yan2" data-yan="male" bindtap="doSetXxtMale">
<view class="yan12"></view>
</view>
<!-- 动物形象
<view class="yan1"
data-yan="animal"
bindtap="doSetXxtAnimal"
>
<view class="yan11"></view>
</view> -->
<!-- 女性形象 -->
<view class="yan3" data-yan="female" bindtap="doSetXxtFemale">
<view class="yan13"></view>
</view>
</view>
<!-- 能量已满提示 --> <!-- 能量已满提示 -->
<view class="energy-full" wx:if="{{userInfo.crystallineEnergy===100}}"> <view class="energy-full-box" wx:if="{{ jmEnergy }}" bindtap="closeJmEnergy">
<view class="energy-full">
<view>能量已经集满啦!</view> <view>能量已经集满啦!</view>
<view>可以注入到水晶中</view> <view>可以注入到水晶中</view>
<view>增强运势哦!</view> <view>增强运势哦!</view>
</view> </view>
</view>
<!-- 能量注入成功提示 --> <!-- 能量注入成功提示 -->
<view class="energy-complete" wx:if="{{showScsEnergy}}"> <view class="energy-complete" wx:if="{{showScsEnergy}}">
<view>能量已注入100%</view> <view>能量已注入{{crystallineEnergy}}%</view>
<view>守护时间为08小时00分</view> <view>守护时间为{{guarTime}}</view>
</view> </view>
<view class="dclefttxt">水晶能量</view><!--下方左侧块-->
<view class="dcrighttxt">能量注入</view><!--下方左侧块-->
</swiper-item> </swiper-item>
<!-- 对方个人页面 -->
  <swiper-item class="call1" wx:if='{{userInfo.loverId}}'><!--情侣页面--> <swiper-item class="call1">
<!-- 未祈祷页面 --> <!-- 头像名字 -->
<view wx:if="{{ !userInfo.prayerEndTime }}"> <view class="call1-header">
<t-image class="txl" src="{{userInfo.avatar}}"></t-image> <image class="tx" src="{{loverInfo.avatar ? loverInfo.avatar : xingxiangtuLove['elf-avatar']}}"></image>
<view class="txtextl">{{userInfo.nick}}</view><!--头像名字1--> <view class="txtext">
<view class="jiuchan"></view> {{loverInfo.nick ? loverInfo.nick : loverInfo.constellation}}
<t-image class="txr" shape="circle" src="{{loverInfo.avatar}}"></t-image><!--头像2--> </view>
<view class="txtextr">{{loverInfo.nick}}</view><!--头像名字2--> </view>
<!-- 精灵图片 -->
<view class="bkg1">
<view class="bkg2">
<view class="bkg3">
<view class="bkg4">
<view class="bkg5">
<view class="xxt" bindtap="ShowOrNotLogo">
<image mode="heightFix" src="{{xingxiangtuLove.sprite[loverInfo.spriteType]}}"></image>
</view> </view>
<!-- 有祈祷页面 -->
<view wx:else>
<t-image class="txl txl-qd" src="{{userInfo.avatar}}"></t-image>
<view class="txtextl-qd">
<t-icon name="chevron-right-double" size="24" color="#DE868F"/>
<view class="text-qd">
<view class="top">{{ userInfo.prayerContent }}</view>
<view>你已为Ta祈祷 {{prayTime}}</view>
</view> </view>
<t-icon name="chevron-right-double" size="24" color="#DE868F"/>
</view> </view>
<t-image class="txr txr-qd" shape="circle" src="{{loverInfo.avatar}}"></t-image><!--头像2-->
</view> </view>
<dic class="bkg1"></dic><!--黄色点背景图-->
<div class="bkg3"></div><!--点点点,最底层背景图-->
<view class="xxtl" bindtap="ShowOrNotLogoS">
<image src="{{xingxiangtu[userInfo.spriteType]}}"></image><!--左侧人形象-->
</view> </view>
<view class="xxtr" bindtap="ShowOrNotLogoL"> <view class="gh"></view>
<image src="{{xingxiangtu[loverInfo.spriteType]}}"></image><!--右侧人形象-->
</view> </view>
<view class="gh"></view><!--下方光环--> <view class="call1-btn">
<view class="yanql1" bindtap="doSetXxtFemale" wx:if="{{singleShow}}"><!--左侧女性按钮--> <!-- 幸运数字 -->
<view class="yan13"></view> <view class="call1-btn-left">
<view class="k1">{{loverInfo.horoscope.number}}</view>
<view class="ktext1">幸运数字</view>
</view> </view>
<view class="yanql2" bindtap="doSetXxtAnimal" wx:if="{{singleShow}}"><!--左侧动物设置图标--> <!-- 运势 -->
<view class="yan11"></view> <view class="call1-btn-middle">
<view class="k2" bindtap="ToastDialog">
<view class="k11"></view>
</view> </view>
<view class="yanql3" ></view> <div class="ktext2" bindtap="ToastDialog">Ta的运势</div>
<view class="yanql4" bindtap="doSetXxtFemaleS" wx:if="{{loverShow}}"><!--右侧女性图标设置-->
<view class="yan13"></view>
</view> </view>
<view class="yanql5" bindtap="doSetXxtAnimalS" wx:if="{{loverShow}}"><!--右侧动物图标设置--> <!-- 幸运颜色 -->
<view class="yan11"></view> <view class="call1-btn-right">
<view class="k3">{{loverInfo.horoscope.color}}</view>
<view class="ktext3">幸运颜色</view>
</view> </view>
<view class="yanql6"></view>
<view class="yan1" bindtap="doSetXxtMale" wx:if="{{singleShow}}"><!--设置个人男性图标-->
<view class="yan12"></view>
</view> </view>
<view class="yan3" wx:if="{{loverShow}}" bindtap="doSetXxtMaleS"><!--设置右边男性图标--> </swiper-item>
<view class="yan12"></view> </swiper>
<!-- 单人页面 甲方说要固定页面不让左右滑动 不能使用swiper组件渲染 -->
<view class='call1-cantainer' bindtap="closeEnergy" wx:if="{{!userInfo.loverId}}">
<!-- 单人页面 -->
<view class="call1">
<!-- 头像名字 -->
<view class="call1-header">
<image class="tx" src="{{userInfo.avatar ? userInfo.avatar : xingxiangtu['elf-avatar']}}"></image>
<view class="txtext">{{userInfo.nick ? userInfo.nick : userInfo.constellation}}</view>
<!-- 运势加持 -->
<view class="ysjc" wx:if="{{userInfo.pendantLuckInBlessing}}">
<t-icon name="chevron-right-double" size="24" color="#DE868F" />
<view class="ys-time">运势已加持{{ydTime}}</view>
<t-icon name="chevron-right-double" size="24" color="#DE868F" />
</view> </view>
</view>
<!-- 精灵图片 -->
<view class="bkg1">
<view class="bkg2">
<view class="bkg3">
<view class="bkg4">
<view class="bkg5">
<view class="xxt" bindtap="ShowOrNotLogo">
<image mode="heightFix" src="{{xingxiangtu.sprite[userInfo.spriteType]}}"></image>
</view>
</view>
</view>
</view>
</view>
<view class="gh"></view>
</view>
<!-- 底部图标 -->
<view class="call1-btn">
<!-- 下方左侧块 -->
<view class="dcleft"> <view class="dcleft">
<t-progress class="dcleft1" theme="circle" percentage="{{userInfo.crystallineEnergy}}" color="#f76229" label="" t-class-bar="dcleft1" /> <t-progress class="dcleft1" theme="circle" percentage="{{userInfo.crystallineEnergy}}" color="#f76229" label="" t-class-bar="dcleft1" stroke-width="8rpx" />
<view class="dcbs"></view> <view class="dcbs">
</view><!--下方左侧块--> <image src="{{xingxiangtu.crystal}}" />
</view>
<view class="dclefttxt">水晶能量</view>
</view>
<!-- 中间进度条 -->
<view class="dcleft-middle">
<t-progress class="dchx" percentage="{{userInfo.crystallineEnergy}}" trackColor="#E0E3EA" color="#f76229" label="" stroke-width="16rpx" />
<view class="dchx-box">
<view class="dchx-box-cantainer" wx:if="{{showInjectBkc}}">
<view class="box" wx:for="{{20}}" wx:key="index"></view>
</view>
</view>
<view class="dchxtxt">{{userInfo.crystallineEnergy}}%</view>
</view>
<!-- 下方左侧块 --> <!-- 下方左侧块 -->
<view class="lovepic"></view> <view class="dcleft-right">
<view class="dchxtxtql" bindtap="openPray" wx:if="{{ !userInfo.prayerEndTime }}">祈祷</view> <view class="dcright-bgc">
<view class="dchxtxtql" bindtap="openPray" wx:else>结束祈祷</view> <view class="dcright-bg" wx:if="{{showInjectBkc}}"></view>
<view class="dcrightql"> </view>
<t-progress class="dcleft1" theme="circle" percentage="{{loverInfo.crystallineEnergy}}" color="#00A7FF" label="" t-class-bar="dcleft1" /> <view class="dcright" bind:touchstart="openInject" bind:touchend="closeInject">
<view class="dcrbs" bindtap="openEnergy"></view> <view class="dcrightwjx"></view>
</view><!--下方左侧块--> </view>
<view class="dclefttxt">{{userInfo.crystallineEnergy}}%</view><!--下方左侧块--> <view class="dcrighttxt">能量注入</view>
<view class="dcrighttxt">{{loverInfo.crystallineEnergy}}%</view><!--下方左侧块--> </view>
</view>
</swiper-item> <!-- 形象按钮 -->
<view class="call1-vivid" wx:if="{{showSexLogo}}">
<!-- 男性形象 -->
<swiper-item class="call1" wx:if='{{userInfo.loverId}}'><!--对方个人页面--> <view class="yan2" data-yan="male" bindtap="doSetXxtMale">
<t-image class="tx" shape="circle" src="{{loverInfo.avatar}}"></t-image> <view class="yan12"></view>
<view class="txtext">{{loverInfo.nick}}</view><!--头像名字--> </view>
<view class="gh"></view> <!-- 动物形象
<div class="bkg3"></div><!--点点点,最底层背景图--> <view class="yan1"
<dic class="bkg1"></dic><!--黄色点背景图--> data-yan="animal"
<view class="gh"></view> bindtap="doSetXxtAnimal"
<view class="xxtq" bindtap="ShowOrNotLogo"> >
<image src="{{xingxiangtu[loverInfo.spriteType]}}"></image> <!--形象图--> <view class="yan11"></view>
</view> </view> -->
<!-- 女性形象 -->
<div class="k1">{{loverInfo.horoscope.number}}</div><!--幸运数字--> <view class="yan3" data-yan="female" bindtap="doSetXxtFemale">
<div class="ktext1">幸运数字</div> <view class="yan13"></view>
<div class="ktext2">Ta的运势</div> </view>
<div class="ktext3">幸运颜色</div> </view>
<div class="k2" bindtap="ToastDialog"> <!-- 能量已满提示 -->
<div class="k11"></div> <view class="energy-full-box" wx:if="{{ jmEnergy }}" bindtap="closeJmEnergy">
</div> <view class="energy-full">
<div class="k3">{{loverInfo.horoscope.color}}</div> <view>能量已经集满啦!</view>
<view>可以注入到水晶中</view>
<t-popup class="ttpopup" visible="{{visible}}" bind:visible-change="onVisibleChange" placement="{{'center'}}"> <view>增强运势哦!</view>
<view class="ttpopup"> </view>
<view class="tips">Tips记得提醒ta哦</view> </view>
<view class="ztys">{{loverInfo.horoscope.summary}}</view> <!-- 能量注入成功提示 -->
<view class="rjkzs"><t-rate value="3" icon="{{ ['star-filled', 'star'] }}" color="#FFFF00" /></view> <view class="energy-complete" wx:if="{{showScsEnergy}}">
<view class="jkzs"></view> <view>能量已注入{{crystallineEnergy}}%</view>
<view class="aqzs"></view> <view>守护时间为{{guarTime}}</view>
<view class="raqzs"><t-rate value="3" icon="{{ ['star-filled', 'star'] }}" color="#FFFF00" /></view> </view>
<view class="cyzs"></view> </view>
<view class="rcyzs"><t-rate value="3" icon="{{ ['star-filled', 'star'] }}" color="#FFFF00" /></view>
<view class="ysfgx"></view>
</view> </view>
</t-popup>
</swiper-item>
</swiper>
<!-- 未祈祷弹层 --> <!-- 未祈祷弹层 -->
<view class="pray" wx:if="{{showPray}}"> <view class="pray" wx:if="{{showPray}}">
<view class="dialog"> <view class="dialog">
<view class="dialog-item"> <view class="dialog-item">
<text>祈祷内容</text> <text class="dialog-item-text">祈祷内容</text>
<textarea model:value="{{prayerContent}}" placeholder="请写下你要祈祷的内容" bindblur="getTextValue"></textarea> <textarea maxlength="11" model:value="{{prayerContent}}" placeholder="请写下你要祈祷的内容" bindblur="getTextValue"></textarea>
</view> </view>
<view class="dialog-item"> <view class="dialog-item">
<text>祈祷时长</text> <text class="dialog-item-text">祈祷时长</text>
<view class="duration" bindtap="showTiming">{{prayTimeStr}}<t-icon name="chevron-down" size="48rpx"/></view> <view class="duration" bindtap="showTiming">
{{prayTimeStr}}
<t-icon name="chevron-down" size="48rpx" />
</view>
</view> </view>
<view class="dialog-btn"> <view class="dialog-btn">
<button bindtap="openPray">取消</button> <button bindtap="openPray">取消</button>
@ -175,11 +357,12 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 祈祷时间弹层 --> <!-- 祈祷时间弹层 -->
<t-popup placement="bottom" visible="{{showTiming}}" showOverlay="{{false}}"> <t-popup placement="bottom" visible="{{showTiming}}" showOverlay="{{false}}">
<view class="timing"> <view class="timing">
<view class="timing-title">你还有{{userInfo.crystallineEnergy}}%水晶能量,可为对方祈祷{{hours}}小时{{minute}}分</view> <view class="timing-title">
你还有{{userInfo.crystallineEnergy}}%水晶能量,可为对方祈祷{{hours}}小时{{minute}}分
</view>
<t-toast id="t-toast" /> <t-toast id="t-toast" />
<view class="picker"> <view class="picker">
<picker-view value="{{pickerValue}}" bindchange="onPickerChange" indicator-class="active"> <picker-view value="{{pickerValue}}" bindchange="onPickerChange" indicator-class="active">
@ -187,18 +370,19 @@
<view wx:for="{{hours + 1}}" wx:key="item" class="picker-item">{{ item }}</view> <view wx:for="{{hours + 1}}" wx:key="item" class="picker-item">{{ item }}</view>
</picker-view-column> </picker-view-column>
<picker-view-column> <picker-view-column>
<view wx:for="{{minutes + 1}}" wx:key="item" class="picker-item"> {{ item }} </view> <view wx:for="{{minutes + 1}}" wx:key="item" class="picker-item">
{{ item }}
</view>
</picker-view-column> </picker-view-column>
</picker-view> </picker-view>
</view> </view>
</view> </view>
</t-popup> </t-popup>
<!-- 已祈祷弹层 --> <!-- 已祈祷弹层 -->
<view class="pray" wx:if="{{showIsPray}}"> <view class="pray" wx:if="{{showIsPray}}">
<view class="dialog"> <view class="dialog">
<t-toast id="t-toast" /> <t-toast id="t-toast" />
<view class="dialog-text"> <view class="dialog-text-end-pray">
<view>要结束祈祷吗?</view> <view>要结束祈祷吗?</view>
<view>将返还{{energy}}%星座能量</view> <view>将返还{{energy}}%星座能量</view>
<view>溢出能量将消失</view> <view>溢出能量将消失</view>
@ -209,7 +393,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 赠送能量弹层 --> <!-- 赠送能量弹层 -->
<view class="pray" wx:if="{{showEnergy}}"> <view class="pray" wx:if="{{showEnergy}}">
<view class="dialog"> <view class="dialog">
@ -224,7 +407,7 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 赠送能量提示 --> <!-- 能量已满提示 -->
<view class="pray" wx:if="{{showEnergyToast}}"> <view class="pray" wx:if="{{showEnergyToast}}">
<view class="dialog"> <view class="dialog">
<t-toast id="t-toast" /> <t-toast id="t-toast" />
@ -257,25 +440,53 @@
</view> </view>
<!-- 能量注入 --> <!-- 能量注入 -->
<t-toast id="t-toast" /> <t-toast id="t-toast" />
<view class="pray" wx:if="{{showInject}}"> <view class="pray-box" wx:if="{{showInject}}">
<view class="pray">
<view class="dialog"> <view class="dialog">
<view class="dialog-text"> <view class="dialog-text">
<view>你要将能量注入到晶石吗?</view> <view>你要将能量注入到晶石吗?</view>
<view>晶石将开启守护计时</view> <view>晶石将开启守护计时</view>
</view> </view>
<view class="dialog-btn"> <view class="dialog-btn">
<button bindtap="openInject">取消</button> <button bindtap="clostBtnInject">取消</button>
<button bindtap="btnInject">开始注入</button> <button bindtap="btnInject">开始注入</button>
</view> </view>
</view> </view>
</view> </view>
</view>
<!-- 能量注入中 --> <!-- 能量注入中 -->
<view class="in-energy" wx:if="{{showInEnergy}}"> <view class="in-energy" wx:if="{{showInEnergy}}">
<t-image src="/images/hourglass.gif"/> <t-image src="https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/hourglass.gif" />
<view>能量注入中……</view> <view>能量注入中……</view>
</view> </view>
<view class="popup" wx:if="{{visible}}" catchtap="ToastDialog">
<view class="ttpopup">
<view class="tips">Tips记得提醒ta哦</view>
<view class="ztys">{{loverInfo.horoscope.summary}}</view>
<view class="ysfgx">
<image src="https://wish-assets.windymuse.com.cn/xy/ysfgx.png" />
</view>
<view class="ttpopup-item">
<view class="jkzs"></view>
<view class="rjkzs">
<t-rate value="3" icon="{{ ['star-filled', 'star'] }}" color="#FFFF00" />
</view>
</view>
<view class="ttpopup-item">
<view class="aqzs"></view>
<view class="raqzs">
<t-rate value="3" icon="{{ ['star-filled', 'star'] }}" color="#FFFF00" />
</view>
</view>
<view class="ttpopup-item">
<view class="cyzs"></view>
<view class="rcyzs">
<t-rate value="3" icon="{{ ['star-filled', 'star'] }}" color="#FFFF00" />
</view>
</view>
</view>
</view>
<div class="jltxt" bindtap="go2Jlai">精灵 AI</div> <div class="jltxt" bindtap="go2Jlai">精灵 AI</div>
<!-- 轮播图滑块按钮 -->
<view class="swiper-btn-left" bindtap="goLeftSwiper" wx:if='{{userInfo.loverId}}'></view>
<view class="swiper-btn-right" bindtap="goRightSwiper" wx:if='{{userInfo.loverId}}'></view>

File diff suppressed because it is too large Load Diff

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

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

@ -1,2 +0,0 @@
<!--pages/home/jl/jlai.wxml-->
<text>pages/home/jl/jlai.wxml</text>

@ -1 +0,0 @@
/* pages/home/jl/jlai.wxss */

@ -14,43 +14,45 @@ Page({
isBlank:true,//没有聊天 isBlank:true,//没有聊天
userInfo:{}, userInfo:{},
stxx:false, stxx:false,
showChat:true,
showChatToast:false,
list: [], // 默认头像
isShow: false
}, },
addClick(){ addClick(){
console.log('点击了加号') this.setData({
this.setData({isAdd:true}) isAdd: !this.data.isAdd
})
}, },
noaddClick(){ noaddClick(){
console.log('点击了加号') console.log('点击了加号')
this.setData({isAdd:false}) this.setData({
}, isAdd:false,
dovipTips(){ showChat: !this.data.showChat
wx: wx.showToast({
title: '请购买会员或聊天次数',
icon:'none',
}) })
}, },
go2Member(){ go2Member(){
console.log('一天啊啊啊')
wx.navigateTo({ wx.navigateTo({
url: '/pages/home/me/member/member' url: '/pages/home/me/member/member'
}) })
}, },
doLt(e){/**点击快捷选项 */
console.log('到此一游')
this.setData({ltinfo:e.target.dataset.lt})
},
go2BB(e){/**鼠标回显事件 */ go2BB(e){/**鼠标回显事件 */
// this.setData({ltinfo:e.detail.value}) // this.setData({ltinfo:e.detail.value})
}, },
go2Send(e){/**发送消息 */ // 发送消息
this.setData({isBlank:false}) go2Send(e){
// 非vip并且聊天次数为0
if (!this.data.userInfo.isChatVip && !this.data.times) {
return this.setData({showChatToast: true})
}
if(e.target.dataset.lt==''){ if(e.target.dataset.lt==''){
wx: wx.showToast({ wx.showToast({
title: '聊天内容不能为空', title: '聊天内容不能为空',
icon:'none', icon:'none',
}) })
}else{ }else{
this.setData({isBlank:false})
this.setData({ this.setData({
chatList:this.data.chatList.concat({'type':1,'value':e.target.dataset.lt}) chatList:this.data.chatList.concat({'type':1,'value':e.target.dataset.lt})
}) })
@ -60,7 +62,7 @@ Page({
console.log(res.data) console.log(res.data)
if(res.data.code==500){ if(res.data.code==500){
console.log('500状态码') console.log('500状态码')
wx: wx.showToast({ wx.showToast({
title: '获取星座精灵AI聊天消息超时', title: '获取星座精灵AI聊天消息超时',
icon:'none', icon:'none',
}) })
@ -78,25 +80,65 @@ Page({
}) })
this.setData({ltinfo:''}) this.setData({ltinfo:''})
} }
}, },
getUserInfo(){ getUserInfo(){
req.getRequest('/api/user/curt',{}).then((res)=>{ req.getRequest('/api/user/curt',{}).then((res)=>{
if(res.data.code==200){ if(res.data.code==200){
this.setData({userInfo:res.data.data}) this.setData({
userInfo:res.data.data,
isShow: true
})
if(!res.data.data.isChatVip){ if(!res.data.data.isChatVip){
this.setData({times:res.data.data.freeChatCount}) this.setData({times:res.data.data.freeChatCount})
} }
console.log(this.data.times) this.getDetaile()
} }
console.log(this.userInfo);
}).catch((err)=>{ }).catch((err)=>{
console.log(err); console.log(err);
}) })
}, },
go2Reback(){ go2Reback(){
wx.navigateBack({ changed: true }); wx.switchTab({
url: '/pages/home/jl/index',
})
},
// 获取聊天气泡内容
getContent(e){
// 判断两天次数
if (!this.data.times && !this.data.userInfo.isChatVip) {
return wx.showToast({
title: '开通会员继续聊天',
icon: 'none'
})
}
const ctn = e.currentTarget.dataset.ctn
if (ctn === '1') {
this.setData({ltinfo: '请告诉我未来一个月的星座运势'})
}else if(ctn === '2'){
this.setData({ltinfo: '你可以帮我占卜星骰吗?'})
}else if(ctn === '3'){
this.setData({ltinfo: '你可以帮我占卜塔罗吗?'})
}else if(ctn === '4'){
this.setData({ltinfo: '我有一些情感上的问题,你能帮我解答吗?'})
}else if(ctn === '5'){
this.setData({ltinfo: '我和ta未来会怎样'})
}else if(ctn === '6'){
this.setData({ltinfo: '请跟我一起玩文字冒险游戏吧'})
}else if(ctn === '7'){
this.setData({ltinfo: '我需要写一封情书,但我不太会表达。我会告诉你我们之间的经历和我想表达的心意,你可以帮我整理成一封动人的情书吗?'})
}
}, },
// 获取默认头像
getDetaile(){
const list = wx.getStorageSync('xy-static-img')
const type = this.data.userInfo.constellation
this.setData({
list: list[type]
})
console.log(this.data.list);
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
@ -115,7 +157,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
this.getUserInfo()
}, },
/** /**

@ -1,82 +1,106 @@
<!-- pages/home/jl/jlai/jlai.wxml --> <!-- pages/home/jl/jlai/jlai.wxml -->
<view class="reback" bindtap="go2Reback"></view><!--左上角返回图标--> <view class="ai-container" wx:if="{{isShow}}">
<view class="title">星座精灵AI</view><!--标题星座精灵AI--> <view class="header">
<view wx:if="{{!userInfo.isChatVip}}" class="mfcs">免费次数剩余:{{times}}条</view><!--非会员展示剩余免费次数--> <view class="reback" bindtap="go2Reback"></view>
<!-- 左上角返回图标 -->
<view class="title">星座精灵AI</view>
<!-- 标题星座精灵AI -->
</view>
<!-- 非会员展示剩余免费次数 -->
<view wx:if="{{!userInfo.isChatVip}}" class="mfcs">免费次数剩余:{{times}}条</view>
<view wx:if="{{showChat}}" class="main">
<!-- 没有聊天初次展示 --> <!-- 没有聊天初次展示 -->
<view class="ltkjj" wx:if="{{isBlank&&times!=0}}"> <view class="ltkjj" wx:if="{{isBlank}}">
<view class="ltat ltxzys" data-lt="星座运势" bindtap="doLt">星座运势</view> <view class="ltkjj-item">
<view class="ltat ltxzzb" data-lt="星座占卜" bindtap="doLt">星座占卜</view> <view class="ltat" data-lt="星座运势" bindtap="getContent" data-ctn="1">星座运势</view>
<view class="ltat lttlzb" data-lt="塔罗占卜" bindtap="doLt">塔罗占卜</view> <view class="ltat" data-lt="星座占卜" bindtap="getContent" data-ctn="2">星座占卜</view>
<view class="ltat ltqgqs" data-lt="情感倾诉" bindtap="doLt">情感倾诉</view> </view>
<view class="ltat ltwm" data-lt="我和Ta未来会怎样" bindtap="doLt">我和Ta未来会怎样</view> <view class="ltkjj-item">
<view class="ltat wzmxyx" data-lt="文字冒险游戏" bindtap="doLt">文字冒险游戏</view> <view class="ltwm" data-lt="情感倾诉" bindtap="getContent" data-ctn="4">情感倾诉</view>
<view class="ltat ltqs" data-lt="帮我写一封情书" bindtap="doLt">帮我写一封情书</view> <view class="wzmxyx" data-lt="我和Ta未来会怎样" bindtap="getContent" data-ctn="5">
<t-image src="https://wish-assets.windymuse.com.cn/xy/jlaitx.png" shape="circle" class="tximg"></t-image> 我和Ta未来会怎样
<view class="ltwzk">你好,我是你的星座守护精灵。除此之外,我还可以帮你解答更多问题。快来跟我聊聊吧! </view>
</view> </view>
</view> <view class="ltkjj-item">
<!--不是会员,进来就没有聊天次数了--> <view class="lltqsfeaf" data-lt="帮我写一封情书" bindtap="getContent" data-ctn="7">
<view class="ltkjj1" wx:if="{{isBlank&&userInfo.freeChatCount==0&&!isChatVip}}"> 帮我写一封情书
<view class="ltat ltxzys" >星座运势</view> </view>
<view class="ltat ltxzzb" >星座占卜</view> </view>
<view class="ltat lttlzb" >塔罗占卜</view> <view class="ltkjj-btm">
<view class="ltat ltqgqs" >情感倾诉</view> <t-image src="https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-25.png" shape="circle" class="tximg"></t-image>
<view class="ltat ltwm">我和Ta未来会怎样</view> <view class="ltwzk">你好,我是你的星座守护精灵。除此之外,我还可以帮你解答更多问题。快来跟我聊聊吧!</view>
<view class="ltat wzmxyx" >文字冒险游戏</view> </view>
<view class="ltat ltqs" >帮我写一封情书</view> <!-- 没有聊天次数 并且不是会员 -->
<t-image src="https://wish-assets.windymuse.com.cn/xy/jlaitx.png" shape="circle" class="tximg"></t-image> <view class="ltkjj-btn" wx:if="{{!userInfo.isChatVip && !times}}">
<view class="ltwzk">你好,我是你的星座守护精灵。除此之外,我还可以帮你解答更多问题。快来跟我聊聊吧! <view class="kthybtn" bindtap="go2Member">
</view>
<view class="kthybtn" bindtap="go2Member">开通会员</view>
<view class="kthytips" >开通会员享不限次畅聊</view>
<view class="hyhgtx" bindtap="go2Member"></view> <view class="hyhgtx" bindtap="go2Member"></view>
开通会员
</view> </view>
<view class="kthytips">开通会员享不限次畅聊</view>
<view class="chatbox" wx:if="{{chatList&&(!isBlank)}}"><!--聊天内容-->
<view class="chatbox1" wx:for="{{chatList}}" wx:key="index">
<t-image src="https://wish-assets.windymuse.com.cn/xy/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>
<view class="dd1"></view>
</view> </view>
<!-- 聊天内容 -->
<!--不是会员且聊天次数为0--> <view class="chatbox" wx:else>
<view class="ltk1" wx:if="{{!isChatVip&&times==0}}" bindtap="dovipTips"> <view class="{{item.type === 1 ? 'chatbox1' : 'chatbox2'}}" wx:for="{{chatList}}" wx:key="index">
<view class="ltk1txt"> <image src="https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-25.png" shape="circle" class="chattoux" wx:if="{{item.type==2}}"></image>
<t-textarea class="ltk1txt1" model:value="{{ltinfo}}" placeholder="请开通会员或购买次数" bindblur="go2BB" data-lt="{{ltinfo}}" disabled></t-textarea> <view class="chattoux" wx:if="{{item.type==1}}">
<image src="{{userInfo.avatar ? userInfo.avatar : list['elf-avatar']}}"></image>
</view> </view>
<view class="fsan" data-lt="{{ltinfo}}"></view><!--发送按钮--> <view class="chatinfo">{{item.value}}</view>
<view class="addbtn"></view><!--加号按钮-->
</view> </view>
<!--是会员或者剩余聊天次数不为0 加号缩回-->
<view class="ltk1" wx:if="{{isChatVip||times!=0}}" wx:if="{{!isAdd}}">
<view class="ltk1txt">
<t-textarea class="ltk1txt1" model:value="{{ltinfo}}" placeholder="输入聊天内容" bindblur="go2BB" data-lt="{{ltinfo}}" bindchange="go2BB"></t-textarea>
</view> </view>
<view class="fsan" bindtap="go2Send" data-lt="{{ltinfo}}"></view><!--发送按钮-->
<view class="addbtn" bindtap="addClick"></view><!--加号按钮-->
</view> </view>
<!-- 底部按钮 -->
<!--是会员或者剩余聊天次数不为0 加号没有缩回--> <view class="ai-btm">
<view class="ltk112" wx:if="{{isChatVip||times!=0}}" wx:if="{{isAdd}}"> <view class="ltk1">
<view class="ltk1txt"> <view class="ltk1txt">
<t-textarea class="ltk1txt1" model:value="{{ltinfo}}" placeholder="输入聊天内容" bindblur="go2BB" data-lt="{{ltinfo}}" bindchange="go2BB"></t-textarea> <t-textarea disabled="{{showChatToast}}" class="ltk1txt1" model:value="{{ltinfo}}" placeholder="输入聊天内容" bindblur="go2BB" data-lt="{{ltinfo}}" bindchange="go2BB"></t-textarea>
</view> </view>
<view class="fsan" bindtap="go2Send" data-lt="{{ltinfo}}"></view><!--发送按钮--> <view class="addbtn" bindtap="addClick"></view>
<view class="addbtn" bindtap="noaddClick"></view><!--加号按钮--> <!-- 加号按钮 -->
<view class="fsan" bindtap="go2Send" data-lt="{{ltinfo}}"></view>
<!-- 发送按钮 -->
</view> </view>
<!--是会员或者剩余聊天次数不为0 加号没有缩回 快捷键--> <!-- 快捷键 -->
<view class="myshkjj" wx:if="{{isAdd}}"> <view class="myshkjj" wx:if="{{isAdd}}">
<view class="myshkjj-container"> <view class="myshkjj-container">
<view class="myshkjjco myshkjjxzys" data-lt="星座运势" bindtap="doLt">星座运势</view> <view class="myshkjjco myshkjjxzys" data-lt="星座运势" bindtap="getContent" data-ctn="1">
<view class="myshkjjco myshkjjxxzb" data-lt="星座占卜" bindtap="doLt">星座占卜</view> 星座运势
<view class="myshkjjco myshkjjtlzb" data-lt="塔罗占卜" bindtap="doLt">塔罗占卜</view> </view>
<view class="myshkjjco myshkjjwzmxyx" data-lt="文字冒险游戏" bindtap="doLt">文字冒险游戏</view> <view class="myshkjjco myshkjjxxzb" data-lt="星座占卜" bindtap="getContent" data-ctn="2">
<view class="myshkjjco myshkjjbwxyfqs" data-lt="帮我写一封情书" bindtap="doLt">帮我写一封情书</view> 星座占卜
<view class="myshkjjco myshkjjwhtwlhzy" data-lt="我和Ta未来会怎样" bindtap="doLt">我和Ta未来会怎样</view> </view>
<view class="myshkjjco myshkjjqgqs" data-lt="情感倾诉" bindtap="doLt">情感倾诉</view> <view class="myshkjjco myshkjjbwxyfqs" data-lt="帮我写一封情书" bindtap="getContent" data-ctn="5">
帮我写一封情书
</view>
<view class="myshkjjco myshkjjwhtwlhzy" data-lt="我和Ta未来会怎样" bindtap="getContent" data-ctn="6">
我和Ta未来会怎样
</view>
<view class="myshkjjco myshkjjqgqs" data-lt="情感倾诉" bindtap="getContent" data-ctn="7">
情感倾诉
</view>
</view>
</view>
</view>
</view>
<!-- 没有免费次数提示 -->
<view class="noChat" wx:if="{{showChatToast}}">
<view class="noChat-taost">
<view class="noChat-taost-top">
<image class="taost-top-left" src="https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-25.png" />
<view class="taost-top-right">
<view>没有免费次数啦~</view>
<view>开通会员,可享无限次畅聊哦!</view>
</view>
</view>
<view class="noChat-taost-btm">
<view class="taost-btm-btn">
<view class="btn" bindtap="go2Member">
<view class="btn-img" bindtap="go2Member" />
开通会员
</view>
</view>
<view class="taost-btm-text">开通会员享不限次畅聊</view>
</view>
</view> </view>
</view> </view>

@ -1,14 +1,24 @@
/* pages/home/jl/jlai/jlai.wxss */ /* pages/home/jl/jlai/jlai.wxss */
page { .ai-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; display: flex;
flex-direction: column;
}
.header {
position: relative;
width: 100%;
height: 176rpx;
padding-top: 88rpx;
display: flex;
align-items: center;
justify-content: center;
} }
.reback{ .reback{
position: absolute; position: absolute;
margin-left: 20rpx; left: 20rpx;
margin-top:108rpx;
width:48rpx; width:48rpx;
height:48rpx; height:48rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
@ -17,45 +27,47 @@ page {
} }
.title{ .title{
position: absolute;
left: 278rpx;
top: 108rpx;
width: 196rpx; width: 196rpx;
height: 48rpx; height: 48rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 32rpx; font-size: 32rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-regular; }
.main {
flex: 1;
width: 100%;
overflow: hidden;
} }
.mfcs{ .mfcs{
position: absolute;
left: 0px;
top: 188rpx;
width: 100%; width: 100%;
height: 88rpx; height: 88rpx;
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%); 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); color: rgba(255, 255, 255, 1);
font-size: 14px; font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
} }
.ltkjj{ .ltkjj{
position: absolute; margin: 0 auto;
left: 32rpx; margin-top: 64rpx;
top: 328rpx;
width: 686rpx; width: 686rpx;
height: 764rpx; padding: 0 38rpx;
line-height: 40rpx; border-radius: 30rpx;
opacity: 0.9;
border-radius: 15px;
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1); color: rgba(16, 16, 16, 1);
font-size: 14px; font-size: 28rpx;
text-align: center; box-shadow: 2rpx 4rpx 12rpx 0px rgba(0, 0, 0, 0.2);
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.2); }
font-family: Arial;
.ltkjj-item {
width: 100%;
height: 164rpx;
padding-top: 64rpx;
display: flex;
justify-content: space-between;
} }
@ -77,75 +89,82 @@ page {
} }
.ltat{ .ltat{
position: absolute; width: 280rpx;
height: 100rpx; height: 100rpx;
line-height: 100rpx;
opacity: 0.9; opacity: 0.9;
border-radius: 50rpx; border-radius: 50rpx;
background: linear-gradient(222.69deg, rgba(248,99,42,1) 14.04%,rgba(249,135,89,1) 88.56%); 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); color: #fff;
font-size: 12px; font-size: 24rpx;
text-align: center; box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); display: flex;
font-family: Arial; align-items: center;
color: rgba(255, 255, 255, 1); justify-content: center;
font-size: 14px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.ltxzys{
left: 38rpx;
top: 64rpx;
width: 196rpx;
}
.ltxzzb{
left: 250rpx;
top: 64rpx;
width: 196rpx;
} }
.lttlzb{
top: 64rpx;
width: 196rpx;
left: 462rpx;
}
.ltqgqs{
width:236rpx;
left:38rpx;
top:228rpx;
}
.ltwm { .ltwm {
left:320rpx; width: 236rpx;
top:228rpx; height: 100rpx;
width:335rpx; opacity: 0.9;
border-radius: 50rpx;
background: linear-gradient(222.69deg, rgba(248,99,42,1) 14.04%,rgba(249,135,89,1) 88.56%);
color: #fff;
font-size: 24rpx;
box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
display: flex;
align-items: center;
justify-content: center;
} }
.wzmxyx { .wzmxyx {
left:38rpx; width: 334rpx;
height: 100rpx;
opacity: 0.9;
border-radius: 50rpx;
background: linear-gradient(222.69deg, rgba(248,99,42,1) 14.04%,rgba(249,135,89,1) 88.56%);
color: #fff;
font-size: 24rpx;
box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
display: flex;
align-items: center;
justify-content: center;
}
.ltqsfaf {
width: 274rpx; width: 274rpx;
top:392rpx; height: 100rpx;
opacity: 0.9;
border-radius: 50rpx;
background: linear-gradient(222.69deg, rgba(248,99,42,1) 14.04%,rgba(249,135,89,1) 88.56%);
color: #fff;
font-size: 24rpx;
box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
display: flex;
align-items: center;
justify-content: center;
} }
.ltqs{
left:344rpx; .lltqsfeaf {
width:306rpx; width: 606rpx;
top:392rpx; height: 100rpx;
opacity: 0.9;
border-radius: 50rpx;
background: linear-gradient(222.69deg, rgba(248,99,42,1) 14.04%,rgba(249,135,89,1) 88.56%);
color: #fff;
font-size: 24rpx;
box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
display: flex;
align-items: center;
justify-content: center;
} }
.tximg{ .tximg{
position: absolute;
left: 38rpx;
top: 556rpx;
width: 84rpx; width: 84rpx;
height: 84rpx; height: 84rpx;
border: 3px solid rgba(161, 134, 81, 1); margin-top: 64rpx;
background-color: coral;
} }
.ltwzk{ .ltwzk{
position: absolute; margin-top: 64rpx;
left: 154rpx;
top: 556rpx;
width: 482rpx; width: 482rpx;
height: 144rpx; height: 144rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
@ -155,30 +174,45 @@ page {
font-family: SourceHanSansSC-regular; font-family: SourceHanSansSC-regular;
} }
.ltkjj-btm {
width: 100%;
height: 272rpx;
display: flex;
justify-content: space-between;
}
.ltkjj-btn {
width: 100%;
height: 236rpx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.ai-btm {
margin-bottom: 64rpx;
}
.ltk1{ .ltk1{
position: absolute;
left: 0px;
top: 1444rpx;
width: 100%; width: 100%;
height: 180rpx; height: 112rpx;
line-height: 20px; padding: 14rpx 32rpx;
background-color: rgba(248, 248, 248, 1); display: flex;
text-align: center; align-items: center;
border: 1px solid rgba(255, 0, 0, 0); justify-content: space-between;
background-color: #F8F8F8;
} }
.ltk1txt{ .ltk1txt{
position: absolute;
left: 32rpx;
top: 14rpx;
width: 530rpx; width: 530rpx;
height: 84rpx; height: 84rpx;
border-radius: 5px; border-radius: 10rpx;
color: rgba(136, 136, 136, 1); color: rgba(136, 136, 136, 1);
font-size: 14px; font-size: 28rpx;
text-align: left; text-align: left;
font-family: Arial; padding-left: 20rpx;
border: 1px solid rgba(255, 0, 0, 0); background-color: #fff;
} }
.t-textarea{ .t-textarea{
margin: 0!important; margin: 0!important;
@ -190,15 +224,13 @@ page {
width: 530rpx; width: 530rpx;
height: 84rpx; height: 84rpx;
} }
.t-textarea__label{ .t-textarea__label{
height:84rpx; height:84rpx;
line-height: 84rpx!important; line-height: 84rpx!important;
} }
.fsan{ .fsan{
position: absolute;
left: 664rpx;
top: 32rpx;
width: 54rpx; width: 54rpx;
height: 54rpx; height: 54rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
@ -207,9 +239,6 @@ page {
} }
.addbtn{ .addbtn{
position: absolute;
left: 586rpx;
top: 30rpx;
width: 54rpx; width: 54rpx;
height: 54rpx; height: 54rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
@ -218,102 +247,80 @@ page {
} }
.chatbox{ .chatbox{
position: absolute;
top:264rpx;
width: 750rpx; width: 750rpx;
height:1360rpx; height: 100%;
overflow: auto; overflow-y: scroll;
} }
.chatbox1{ .chatbox1{
width:750rpx; width:750rpx;
height:148rpx; display: flex;
display: block;
} }
.chatbox2{
width:750rpx;
display: flex;
background-color: rgba(248, 99, 42, 0.05);
}
.chattoux{ .chattoux{
margin-left: 32rpx; margin: 32rpx;
margin-top: 32rpx; border-radius: 50%;
overflow: hidden;
width: 84rpx; width: 84rpx;
height: 84rpx; height: 84rpx;
display: online; }
.chattoux image {
width: 100%;
height: 100%;
} }
.chatinfo{ .chatinfo{
margin-left: 74px; margin-top: 50rpx;
margin-top: -70rpx; margin-bottom: 20rpx;
width: 280px; width: 280px;
height: 90px;
color: rgba(79, 79, 79, 1); color: rgba(79, 79, 79, 1);
font-size: 17px; font-size: 34rpx;
text-align: justify;
font-family: SourceHanSansSC-regular;
}
.dd1{
width:750rpx;
height:160rpx;
} }
.kthybtn{ .kthybtn{
position: absolute; position: relative;
left: 224rpx;
top: 826rpx;
width: 240rpx; width: 240rpx;
height: 70rpx; height: 70rpx;
line-height: 70rpx; border-radius: 20rpx;
border-radius: 10px;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%); background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
color: rgba(16, 16, 16, 1); color: rgba(16, 16, 16, 1);
font-size: 12px;
text-align: center;
font-family: Arial;
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
font-size: 14px; font-size: 28rpx;
text-align: center; display: flex;
font-family: SourceHanSansSC-medium; align-items: center;
justify-content: center;
} }
.kthytips{ .kthytips{
position: absolute;
top: 898rpx;
width: 686rpx;
height: 20px;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 12px; font-size: 24rpx;
text-align: center;
font-family: SourceHanSansSC-regular;
} }
.hyhgtx{ .hyhgtx{
position: absolute; position: absolute;
left: 392rpx; top: -80rpx;
top: 742rpx; right: -40rpx;
width: 120rpx; width: 120rpx;
height: 127rpx; height: 127rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/hyhg.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/hyhg.png);
} }
.ltk112{
position: absolute;
left: 0;
top: 1224rpx;
width: 100%;
height: 110rpx;
line-height: 40rpx;
background-color: rgba(248, 248, 248, 1);
text-align: center;
border: 1px solid rgba(255, 0, 0, 0);
}
.myshkjj{ .myshkjj{
position: absolute;
top: 1340rpx;
width: 100%; /* 容器宽度 */ width: 100%; /* 容器宽度 */
overflow-x: scroll; /* 横向滚动 */ /* overflow-x: scroll; 横向滚动 */
} }
.myshkjj-container { .myshkjj-container {
width: 990rpx; width: 800rpx;
height: 200rpx; height: 200rpx;
padding-top: 20rpx; padding-top: 20rpx;
display: flex; display: flex;
@ -353,3 +360,91 @@ page {
.myshkjjqgqs{ .myshkjjqgqs{
width: 236rpx; width: 236rpx;
} }
.noChat {
position: absolute;
top: 276rpx;
width: 100%;
height: 1180rpx;
background-color: rgba(255, 255, 255, 0.7);
}
.noChat-taost {
width: 686rpx;
height: 540rpx;
margin: 278rpx auto;
padding: 96rpx 40rpx;
box-sizing: border-box;
border-radius: 30rpx;
background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1);
font-size: 28px;
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.2);
}
.noChat-taost-top {
width: 100%;
height: 106rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.taost-top-left {
width: 84rpx;
height: 84rpx;
border-radius: 50%;
}
.taost-top-right {
color: rgba(108, 108, 108, 1);
font-size: 34rpx;
}
.noChat-taost-btm {
width: 100%;
height: 110rpx;
margin-top: 164rpx;
}
.taost-btm-btn {
width: 100%;
height: 70rpx;
display: flex;
justify-content: center;
align-items: center;
}
.taost-btm-btn .btn {
position: relative;
width: 240rpx;
height: 70rpx;
border-radius: 20rpx;
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);
display: flex;
justify-content: center;
align-items: center;
color: rgba(255, 255, 255, 1);
font-size: 28rpx;
}
.taost-btm-btn .btn-img {
position: absolute;
top: -80rpx;
right: -50rpx;
width: 120rpx;
height: 127rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/hyhg.png);
}
.taost-btm-text {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
color: rgba(108, 108, 108, 1);
font-size: 24rpx;
}

@ -7,16 +7,47 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
avatars:[ avatar1:[
'https://wish-assets.windymuse.com.cn/xy/tx1.png', 'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-1.png',
'https://wish-assets.windymuse.com.cn/xy/tx2.png', 'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-2.png',
'https://wish-assets.windymuse.com.cn/xy/tx3.png', 'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-3.png',
'https://wish-assets.windymuse.com.cn/xy/tx4.png', 'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-4.png',
'https://wish-assets.windymuse.com.cn/xy/tx5.png', 'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-5.png',
'https://wish-assets.windymuse.com.cn/xy/tx6.png', 'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-6.png',
'https://wish-assets.windymuse.com.cn/xy/tx1.png', 'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-7.png',
'https://wish-assets.windymuse.com.cn/xy/tx2.png', 'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-8.png',
'https://wish-assets.windymuse.com.cn/xy/tx3.png', 'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-9.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-10.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-11.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-12.png',
],
avatar2:[
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-13.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-14.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-15.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-16.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-17.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-18.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-19.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-20.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-21.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-22.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-23.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-24.png',
],
avatar3:[
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-25.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-26.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-27.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-28.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-29.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-30.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-31.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-32.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-33.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-34.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-35.png',
'https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/headimg-36.png',
], ],
sexs:[{label:'男生',value:'male'},{label:'女生',value:'female'}], sexs:[{label:'男生',value:'male'},{label:'女生',value:'female'}],
sexVisible:false, sexVisible:false,
@ -115,8 +146,50 @@ Page({
}) })
}, },
go2Reback(){ go2Reback(){
wx.navigateBack({ changed: true }); wx.switchTab({
url: '/pages/home/me/indexx',
})
}, },
// 自定义头像
editAvatar(){
wx.chooseMedia({
count: 1,
mediaType: 'image',
sourceType: ['album', 'camera'],
camera: 'front',
success: (res) => {
wx.uploadFile({
url: 'https://xzjl-api.windymuse.cn/api/resource',
filePath: res.tempFiles[0].tempFilePath,
name: 'file',
header: {
'Authorization': wx.getStorageSync('token'),
'Content-Type': 'multipart/form-data'
},
formData: {
type: 'poster'
},
success: (res) => {
const result = JSON.parse(res.data)
req.patchRequest('/api/user/curt',{avatar:result.data.abUrl}).then((res)=>{
if(res.data.code==200){
this.setData({userInfo:res.data.data})
wx.showToast({
title:'修改成功',
icon: 'none',
duration: 1000
})
}
}).catch((err)=>{
console.log(err);
})
}
})
}
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */

@ -6,8 +6,10 @@
</view> </view>
<!-- 头像 --> <!-- 头像 -->
<view class="xgzl-img"> <view class="xgzl-img">
<view class="avatar1">
<image bindtap="editAvatar" src="{{userInfo.avatar}}"></image>
<view class="cameralogo"><view class="cameralogo-img"></view></view> <view class="cameralogo"><view class="cameralogo-img"></view></view>
<image class="avatar1" src="{{userInfo.avatar}}"></image> </view>
<input focus="doChangeName1" class="nickname" name="nick" placeholder="昵称不能为空" maxlength="7" value="{{userInfo.nick}}" bindblur="doChangeName1"></input> <input focus="doChangeName1" class="nickname" name="nick" placeholder="昵称不能为空" maxlength="7" value="{{userInfo.nick}}" bindblur="doChangeName1"></input>
</view> </view>
@ -16,7 +18,17 @@
<view class="jltxtxt">精灵头像</view> <view class="jltxtxt">精灵头像</view>
<view class="txcheck-box"> <view class="txcheck-box">
<view class="txcheck"> <view class="txcheck">
<view wx:for="{{avatars}}" class="itemxx"><image class="iii" src="{{item}}" data-img="{{item}}" bindtap="changeAvatar"></image></view> <view wx:for="{{avatar1}}" wx:key="index" class="itemxx"><image class="iii" src="{{item}}" data-img="{{item}}" bindtap="changeAvatar"></image></view>
</view>
</view>
<view class="txcheck-box">
<view class="txcheck">
<view wx:for="{{avatar2}}" wx:key="index" class="itemxx"><image class="iii" src="{{item}}" data-img="{{item}}" bindtap="changeAvatar"></image></view>
</view>
</view>
<view class="txcheck-box">
<view class="txcheck">
<view wx:for="{{avatar3}}" wx:key="index" class="itemxx"><image class="iii" src="{{item}}" data-img="{{item}}" bindtap="changeAvatar"></image></view>
</view> </view>
</view> </view>
</view> </view>

@ -41,13 +41,19 @@
} }
.avatar1{ .avatar1{
position: relative;
width: 140rpx; width: 140rpx;
height: 140rpx; height: 140rpx;
margin: 0 64rpx 0 148rpx; margin: 0 64rpx 0 148rpx;
border-radius: 74rpx; border-radius: 74rpx;
border: 6rpx solid #A18651;
} }
.avatar1 image {
width: 100%;
height: 100%;
}
.nickname{ .nickname{
border: 1px solid #ffffff; border: 1px solid #ffffff;
/* color: rgba(108, 108, 108, 1); /* color: rgba(108, 108, 108, 1);
@ -71,8 +77,8 @@
.cameralogo{ .cameralogo{
position: absolute; position: absolute;
top: 144rpx; right: 0;
left: 296rpx; bottom: 0;
width: 38rpx; width: 38rpx;
height: 38rpx; height: 38rpx;
border-radius: 50%; border-radius: 50%;
@ -92,13 +98,13 @@
.txcheck-box { .txcheck-box {
width: 100%; width: 100%;
height: 164rpx; height: 132rpx;
overflow-x: scroll; overflow-x: scroll;
overflow: hidden; overflow: hidden;
} }
.txcheck{ .txcheck{
width: 844rpx; /* width: 844rpx; */
height: 164rpx; height: 164rpx;
text-align: center; text-align: center;
overflow: auto; overflow: auto;
@ -113,6 +119,7 @@
} }
.xgzl-data { .xgzl-data {
margin-top: 42rpx;
width: 100%; width: 100%;
} }

@ -17,11 +17,18 @@ Page({
avatar:"", avatar:"",
nick:"", nick:"",
isChatVip:false,//是否会员 isChatVip:false,//是否会员
phone:'123', phone:'',
hasPhone:false hasPhone:false
}, },
phone:'', phone:'',
phoneVerificationCode:'' phoneVerificationCode:'',
bdSuccess: false, //绑定成功
showPhone: true, //更改手机号码
isHavePhone: true,
existPhone: false,
findAccount: false, //账号账号数据
openLogout: false, //退出登入
deadline: 0
}, },
// 手机号码校验 // 手机号码校验
getPhone(e){ getPhone(e){
@ -44,17 +51,88 @@ Page({
return; return;
} }
}, },
// 找回数据
findData(){
this.setData({
existPhone: false,
findAccount: true,
showPhone: false
})
},
// 找回账号数据
retrieveAccount(){
req.patchRequest('/api/user/retrieve-data',{
phone:this.data.phone,
code:this.data.phoneVerificationCode
}).then(res => {
if (res.data.code === 200) {
wx.showToast({
title: '找回数据成功,请重新登入',
icon: 'none'
})
setTimeout(() => {
wx.redirectTo({
url: '/pages/index/index',
})
}, 1000);
}else {
wx.showToast({
title: res.data.msg,
icon: 'error'
})
}
}).catch(res => {
console.log(res, '找回账号数据失败');
})
},
closeFindData(){
this.setData({
existPhone: true,
showPhone: false,
findAccount: false
})
},
closeExistPhone(){
this.setData({
existPhone: false,
showPhone: true
})
},
bindinNewPhone(){
this.setData({
existPhone: false,
showPhone: true,
isHavePhone: false,
phone: '',
phoneVerificationCode: '',
isCxHq: false,
countdown: 60
})
},
getCode(){ getCode(){
console.log(this.data.phone); // 请求前校验
if(this.data.countdown === 60 || this.data.countdown === '重新获取'){ if (!/^1[3456789]\d{9}$/.test(this.data.phone)) {
req.postRequest('/api/user/send-authentication-code',{phone:this.data.phone}).then((res)=>{
console.log(res);
if (res.data.code !== 200) {
return wx.showToast({ return wx.showToast({
title: res.data.msg, title: '手机号码格式不正确',
icon: 'none' icon: 'none'
}); });
} }
// if(this.data.phone === this.data.userInfo.phone){
// return wx.showToast({
// title: '您已绑定该号码',
// icon: 'error'
// })
// }
if(this.data.countdown === 60 || this.data.countdown === '重新获取'){
req.postRequest('/api/user/send-authentication-code',{
phone:this.data.phone
}).then((res)=>{
if (res.data.code === 200) {
wx.showToast({
title: '验证码已发送,请在手机上查收',
icon: 'none'
})
if (this.data.countdown === '重新获取') { if (this.data.countdown === '重新获取') {
this.setData({countdown: 60}) this.setData({countdown: 60})
} }
@ -67,7 +145,14 @@ Page({
this.setData({countdown:'重新获取'}) this.setData({countdown:'重新获取'})
} }
},1000) },1000)
console.log('获取验证码'); this.setData({timerId: timerId})
}
}).catch(res => {
wx.showToast({
title: '发送失败',
icon: 'error'
})
console.log(res, '验证码发送失败');
}) })
} }
}, },
@ -76,98 +161,136 @@ Page({
this.setData({bdsjhVisible:true}) this.setData({bdsjhVisible:true})
}, },
doCancelSjh(){ doCancelSjh(){
this.setData({bdsjhVisible:false}) this.setData({
bdsjhVisible:false,
showPhone: true, //更改手机号码
isHavePhone: false,
existPhone: false,
findAccount: false, //账号账号数据
phone: '',
phoneVerificationCode: '',
isCxHq: false
})
clearTimeout(this.data.timerId);
},
bdSuccessBtn(){
this.setData({
bdsjhVisible: false,
showPhone: true,
bdSuccess: false
})
}, },
doEXecSjh(){ doEXecSjh(){
if (this.data.phone === this.data.userInfo.phone) {
return wx.showToast({
title: '已绑定该手机号',
icon: 'error'
})
}
if (this.data.phoneVerificationCode.length !== 6) {
return wx.showToast({
title: '验证码格式不正确',
icon: 'none'
});
}
req.patchRequest('/api/user/curt',{ req.patchRequest('/api/user/curt',{
phone:this.data.phone, phone:this.data.phone,
phoneVerificationCode:this.data.phoneVerificationCode phoneVerificationCode:this.data.phoneVerificationCode
}).then((res)=>{ }).then((res)=>{
console.log(res); if (res.data.code === 1003) {
if(res.data.code !== 200){ return wx.showToast({
wx.showToast({ title: '手机验证码不存在',
title:res.data.msg, icon: 'error'
icon:'none'
}) })
return }
}else { if (res.data.code === 1004) {
this.setData({bdsjhVisible:false}) return wx.showToast({
this.getUserInfo() title: '手机验证码错误',
wx.showToast({ icon: 'error'
title:'绑定成功', })
icon:'none' }
if (res.data.code === 1005) {
return wx.showToast({
title: '手机验证码已过期',
icon: 'error'
}) })
} }
if (res.data.code === 500) {
return this.setData({
existPhone: true,
showPhone: false,
}) })
}else {
this.getUserInfo()
this.setData({ this.setData({
bdSuccess: true,
showPhone: false,
phoneVerificationCode:'', phoneVerificationCode:'',
isCxHq:false isCxHq:false
}) })
}
})
}, },
go2Grzl(){ go2Grzl(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/me/grzl/grzl' url: '/pages/home/me/grzl/grzl'
}) })
}, },
go2Member(){/**跳转到会员购买页面 */ // 跳转到会员购买页面
wx.navigateTo({ go2Member(){
url: '/pages/home/me/member/member'
})
},
go2Member2(){/**跳转到会员续费页面 */
wx.navigateTo({ wx.navigateTo({
url: '/pages/home/me/member2/member' url: '/pages/home/me/member/member?isChatVip=' + this.data.userInfo.isChatVip
}) })
}, },
go2Gw(){ go2Gw(){
// wx.navigateTo({ // wx.redirectTo({
// url: '/pages/home/me/gw/gw' // url: '/pages/home/me/gw/gw'
// }) // })
console.log('跳转了解星座精灵页面'); console.log('跳转了解星座精灵页面');
}, },
go2Ysxy(){ go2Ysxy(){
// wx.navigateTo({ wx.redirectTo({
// url: '/pages/home/me/ysxy/ysxy' url: '/pages/home/me/ysxy/ysxy'
// }) })
console.log('跳转隐私协议页面'); console.log('跳转隐私协议页面');
}, },
go2Yhsyxy(){ go2Yhsyxy(){
// wx.navigateTo({ wx.redirectTo({
// url: '/pages/home/me/yhsyxy/yhsyxy' url: '/pages/home/me/yhsyxy/yhsyxy'
// }) })
console.log('跳转用户协议页面'); console.log('跳转用户协议页面');
}, },
go2Cjwt(){ go2Cjwt(){
// wx.navigateTo({ // wx.redirectTo({
// url: '/pages/home/me/cjwt/cjwt' // url: '/pages/home/me/cjwt/cjwt'
// }) // })
console.log('跳转常见问题页面'); console.log('跳转常见问题页面');
}, },
go2Device(){ go2Device(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/me/mydevice/device' url: '/pages/home/me/mydevice/device'
}) })
}, },
go2Sq(){ go2Sq(){
// wx.navigateTo({ wx.showToast({
// url: '/pages/home/me/sq/sq' title: '敬请期待',
// }) icon: 'none'
console.log('跳转社群'); })
}, },
go2Yjfk(){ go2Yjfk(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/me/yjfk/yjfk' url: '/pages/home/me/yjfk/yjfk'
}) })
}, },
go2Manual(){ go2Manual(){
// wx.navigateTo({ wx.redirectTo({
// url: '/pages/home/me/manual/manual' url: '/pages/home/me/manual/manual'
// }) })
console.log('跳转说明书页面'); console.log('跳转说明书页面');
}, },
go2Jcjb(){ go2Jcjb(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/me/jcjb/jcjb' url: '/pages/home/me/jcjb/jcjb'
}) })
}, },
@ -176,10 +299,15 @@ Page({
if(res.data.code==200){ if(res.data.code==200){
this.setData({ this.setData({
userInfo:res.data.data, userInfo:res.data.data,
phone:res.data.data.phone // phone:res.data.data.phone,
}) })
// 获取默认头像
this.getDetaile()
// 获取vip截止日期
if (res.data.data.isChatVip) {
this.getVipDeadline(res.data.data.chatVipEndTime)
}
} }
console.log(this.userInfo);
}).catch((err)=>{ }).catch((err)=>{
console.log(err); console.log(err);
}) })
@ -192,6 +320,28 @@ Page({
}) })
}, },
// 获取默认头像
getDetaile(){
const list = wx.getStorageSync('xy-static-img')
const type = this.data.userInfo.constellation
this.setData({
list: list[type]
})
},
// 获取vip截止日期
getVipDeadline(time){
const endTime = new Date(time)
const newTime = new Date()
// 判断时间是否已经到期
if (endTime > newTime) {
const deadTime = endTime - newTime
const deadline = Math.floor(deadTime / 1000 / 60 / 60 / 24)
this.setData({deadline: deadline})
}
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
@ -210,7 +360,6 @@ Page({
*/ */
onShow() { onShow() {
this.getUserInfo() this.getUserInfo()
}, },
/** /**
@ -260,40 +409,17 @@ Page({
, ,
ljXzjl(){ ljXzjl(){
}, },
closeLogout(){
this.setData({openLogout: !this.data.openLogout})
},
logout() { logout() {
const dialogConfig = {
context: this,
title: '退出登录',
content: '星座精灵是一款快速能够让你快速了解自己的星座特征以及星座运势,确定需要退出吗?',
confirmBtn: '确定',
cancelBtn: '取消',
};
Dialog.confirm(dialogConfig)
.then(() => {
req.deleteRequest('/api/user/logout',{}).then((res)=>{ req.deleteRequest('/api/user/logout',{}).then((res)=>{
if(res.data.code === 200){ if(res.data.code === 200){
wx.setStorageSync('token', '') wx.setStorageSync('token', '')
wx.navigateTo({ wx.redirectTo({
url: '/pages/index/index' url: '/pages/index/index'
}) })
Toast({
context: this,
selector: '#t-toast',
message: '退出成功!',
});
} }
}).catch((err)=>{
Toast({
context: this,
selector: '#t-toast',
message: '退出失败!',
});
}) })
}
})
.catch(() => console.log('点击了取消'))
.finally(() => {
Dialog.close()});
},
}) })

@ -1,28 +1,31 @@
<!--pages/home/me/indexx.wxml--> <!--pages/home/me/indexx.wxml-->
<t-avatar class="avatar" size="large" image="{{userInfo.avatar}}" /> <view class="scroll">
<image class="avatar" src="{{userInfo.avatar ? userInfo.avatar : list['elf-avatar']}}" />
<view class="xxt"></view><!--星星背景图片--> <view class="xxt"></view><!--星星背景图片-->
<view class="txk" bindtap="go2Grzl"></view><!--头像框--> <view class="txk" bindtap="go2Grzl"></view><!--头像框-->
<view class="txkx" bindtap="go2Grzl"> </view><!--头像框里面的图标--> <view class="txkx" bindtap="go2Grzl"> </view><!--头像框里面的图标-->
<view class="nickname">{{userInfo.nick}}</view><!--用户昵称--> <view class="nickname">{{userInfo.nick}}</view><!--用户昵称-->
<view class="unhybs" wx:if="{{!userInfo.isChatVip}}" bindtap="go2Member"></view><!--非会员图标--> <view class="unhybs" wx:if="{{!userInfo.isChatVip}}" bindtap="go2Member"></view><!--非会员图标-->
<view class="hybs" wx:if="{{userInfo.isChatVip}}" bindtap="go2Member2"> </view><!--会员图标--> <view class="hydqr" wx:if="{{!userInfo.isChatVip}}"> 开通VIP会员</view><!--非会员提示-->
<view class="hydqr" wx:if="{{userInfo.isChatVip}}"> 还有21天到期</view><!--会员图标--> <view class="hybs" wx:if="{{userInfo.isChatVip}}" bindtap="go2Member"></view><!--会员图标-->
<view class="hydqr" wx:if="{{userInfo.isChatVip}}"> 还有{{deadline}}天到期</view><!--会员提示-->
<view class="gnk"> <view class="gnk">
<!-- <view class="smst" >说明书</view> --> <view class="smst" >说明书</view>
<!-- <view class="jrsqt">加入社群</view> --> <view class="jrsqt">我的设备</view>
<view class="wdsbt">我的设备</view> <view class="wdsbt">加入社群</view>
<view class="sx"></view> <view class="sx"></view>
<!-- <view class="circle k1" bindtap="go2Manual"> --> <view class="circle k1" bindtap="go2Manual">
<!-- <view class="sms"></view> <view class="sms"></view>
</view> --> </view>
<view class="circle k2" bindtap="go2Device"> <view class="circle k2" bindtap="go2Sq">
<view class="sq"></view> <view class="sq"></view>
</view> </view>
<!-- <view class="circle k3" bindtap="go2Sq"> <view class="circle k3" bindtap="go2Device">
<view class="sb"></view> <view class="sb"></view>
</view> -->
</view> </view>
</view>
<!--功能操作框--> <!--功能操作框-->
<view class="mycell" bindtap="ljXzjl" > <view class="mycell" bindtap="ljXzjl" >
<!-- <t-cell hover arrow bindtap="go2Gw"> <!-- <t-cell hover arrow bindtap="go2Gw">
@ -42,14 +45,14 @@
<t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-edit%402x.png" size="50rpx"/> <t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-edit%402x.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://wish-assets.windymuse.com.cn/xy/iconPark-editor%402x.png" size="50rpx"/> <t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-editor%402x.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://wish-assets.windymuse.com.cn/xy/iconPark-audit%402x.png" size="50rpx"/> <t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-audit%402x.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://wish-assets.windymuse.com.cn/xy/iconPark-layers%402x.png" size="50rpx"/> <t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-layers%402x.png" size="50rpx"/>
<text slot="title" class="mycelltext" >小程序版本</text> <text slot="title" class="mycelltext" >小程序版本</text>
@ -59,7 +62,7 @@
<t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/myqcloud.png" size="50rpx"/> <t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/myqcloud.png" size="50rpx"/>
<text slot="title" class="mycelltext" >解除羁绊</text> <text slot="title" class="mycelltext" >解除羁绊</text>
</t-cell> </t-cell>
<t-cell hover arrow bindtap="logout"> <t-cell hover arrow bindtap="closeLogout">
<t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-logout%402x.png" size="50rpx"/> <t-icon slot="left-icon" name="https://wish-assets.windymuse.com.cn/xy/iconPark-logout%402x.png" size="50rpx"/>
<text slot="title" class="mycelltext" >退出登录</text> <text slot="title" class="mycelltext" >退出登录</text>
</t-cell> </t-cell>
@ -68,24 +71,81 @@
<t-dialog id="t-dialog" /> <t-dialog id="t-dialog" />
</view> </view>
</view>
<!-- 绑定手机号码 -->
<t-popup visible="{{bdsjhVisible}}" placement="center"> <view class="bdsjhVisible" wx:if="{{bdsjhVisible}}">
<view class="bdsjh"> <view class="bdsjh" wx:if="{{showPhone}}">
<view class="bdsjhm1">绑定手机号码</view> <view class="bdsjhm1" wx:if="{{isHavePhone}}">更改手机号码</view>
<view class="bdsjhm2">如设备丢失,可凭手机号码找回账号</view> <view class="bdsjhm1" wx:else>验证手机号码</view>
<view class="bdsjhm2" wx:if="{{isHavePhone}}">如设备丢失,可凭手机号码找回账号</view>
<view class="bdsjhm2" wx:else>请勿将验证码告知他人</view>
<view class="sjhm1">手机号码</view> <view class="sjhm1">手机号码</view>
<view class="yzm1">验证码</view>
<view class="input-example sjhminput1"> <view class="input-example sjhminput1">
<t-input model:value="{{phone}}" bindblur="getPhone" placeholder="请输入手机号" /> <t-input model:value="{{phone}}" bindblur="getPhone" placeholder="请输入手机号" />
</view> </view>
<view class="sjhbkx"></view>
<view class="yzm1">验证码</view>
<view class="input-example sjhminput2"> <view class="input-example sjhminput2">
<t-input model:value="{{phoneVerificationCode}}" bindblur="getVerificationCode" placeholder="请输入验证码" /> <t-input
model:value="{{phoneVerificationCode}}"
bindblur="getVerificationCode"
placeholder="请输入验证码"
class="phoneCode"
/>
<view class="cxhq" bindtap="getCode">{{isCxHq?countdown:'立即获取'}}</view>
</view> </view>
<view class="sjhbkx"></view>
<view class="yzmbkx"></view> <view class="yzmbkx"></view>
<view class="cxhq" bindtap="getCode">{{isCxHq?countdown:'立即获取'}}</view> <view class="bdsjh-btn">
<view class="qxSjh" bindtap="doCancelSjh">取消</view> <view class="qxSjh" bindtap="doCancelSjh">取消</view>
<view class="wcSjh" bindtap="doEXecSjh">完成</view> <view class="wcSjh" bindtap="doEXecSjh">完成</view>
</view> </view>
</t-popup> </view>
<!-- 绑定成功提示 -->
<view class="bd-success" wx:if="{{bdSuccess}}">
<view class="bd-success-text">
<view class="text1">已成功绑定</view>
<view class="text2">可在我的设备中查看</view>
</view>
<view class="bd-success-btn">
<view class="btn" bindtap="bdSuccessBtn">好的</view>
</view>
</view>
<!-- 手机号码已存在 -->
<view class="exist-phone" wx:if="{{existPhone}}">
<view class="exist-phone-text1">此手机号已存在</view>
<view class="exist-phone-text2">如设备丢失,可在此页面找回账号</view>
<view class="exist-phone-text3">如需要绑定新设备请点击下方选项</view>
<view class="exist-phone-btn"><view class="btn" bindtap="findData">找回账号数据</view></view>
<view class="exist-phone-btn"><view class="btn" bindtap="bindinNewPhone">绑定新设备</view></view>
<view class="exist-phone-btn"><view class="btn" bindtap="closeExistPhone">取消</view></view>
</view>
<!-- 找回账号数据 -->
<view class="exist-phone" wx:if="{{findAccount}}">
<view class="exist-phone-text1">找回账号数据</view>
<view class="exist-phone-text4">为保护用户数据隐私</view>
<view class="exist-phone-text5">找回操作将会使[原设备]失效</view>
<view class="exist-phone-text5">找回后,只有新设备可登录账号</view>
<view class="exist-phone-text5">此操作将无法撤销</view>
<view class="exist-phone-text5">确定要找回吗?</view>
<view class="exist-btn">
<view class="btn" bindtap="closeFindData">取消</view>
<view class="btn" bindtap="retrieveAccount">确定</view>
</view>
</view>
</view>
<!-- 退出登入 -->
<view class="logout" wx:if="{{openLogout}}">
<view class="logout-box">
<view class="logout-box-text">确定要退出登录吗?</view>
<view class="logout-box-btn">
<view class="btn" bindtap="closeLogout">取消</view>
<view class="btn" bindtap="logout">确定</view>
</view>
</view>
</view>

@ -80,7 +80,7 @@
height: 36rpx; height: 36rpx;
color: rgba(248, 105, 50, 1); color: rgba(248, 105, 50, 1);
font-size: 24rpx; font-size: 24rpx;
text-align: left; text-align: center;
font-family: SourceHanSansSC-regular; font-family: SourceHanSansSC-regular;
} }
@ -200,7 +200,13 @@
position: absolute; position: absolute;
margin-top: 720rpx; margin-top: 720rpx;
width:100%; width:100%;
/* margin-left: 10rpx; */ }
.scroll {
position: absolute;
width: 100%;
height: 100%;
overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
} }
@ -224,95 +230,76 @@
height: 140rpx!important; height: 140rpx!important;
display: flex!important; display: flex!important;
flex-direction: column!important; flex-direction: column!important;
border-radius: 50%;
box-sizing: border-box;
} }
.bdsjh{ .bdsjh{
width:660rpx; width:660rpx;
height:786rpx; height:786rpx;
padding: 96rpx 64rpx;
box-sizing: border-box;
border-radius: 30rpx; border-radius: 30rpx;
background-color: rgba(255, 255, 255, 1);
text-align: center;
box-shadow: 2rpx 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
} }
.bdsjhm1{ .bdsjhm1{
position: absolute; color: #333333;
left: 64rpx; font-weight: 700;
top: 96rpx; font-size: 36rpx;
width: 108px;
height: 26px;
color: rgba(51, 51, 51, 1);
font-size: 18px;
text-align: left; text-align: left;
font-family: SourceHanSansSC-medium;
} }
.bdsjhm2{ .bdsjhm2{
position: absolute; margin-top: 8rpx;
left: 64rpx;
top: 156rpx;
width: 224px;
height: 21px;
color: rgba(154, 154, 154, 1); color: rgba(154, 154, 154, 1);
font-size: 14px; font-size: 28rpx;
text-align: left; text-align: left;
font-family: SourceHanSansSC-regular;
} }
.qxSjh{ .qxSjh{
position: absolute; width: 210rpx;
left: 64rpx; height: 70rpx;
top: 620rpx; border-radius: 20rpx;
width: 105px;
height: 35px;
line-height: 70rpx;
border-radius: 10px;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%); background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
text-align: center; text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1); border: 6rpx solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
font-size: 14px; font-size: 28rpx;
text-align: center; display: flex;
font-family: SourceHanSansSC-medium; align-items: center;
justify-content: center;
} }
.wcSjh{ .wcSjh{
position: absolute; width: 210rpx;
left: 386rpx; height: 70rpx;
top: 620rpx; border-radius: 20rpx;
width: 105px;
height: 35px;
line-height: 70rpx;
border-radius: 10px;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%); background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
text-align: center; text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1); border: 6rpx solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
font-size: 14px; font-size: 28rpx;
text-align: center; display: flex;
font-family: SourceHanSansSC-medium; align-items: center;
justify-content: center;
} }
.sjhm1{ .sjhm1{
position: absolute; margin-top: 86rpx;
left: 64rpx;
top: 284rpx;
width: 48px;
height: 18px;
color: rgba(102, 102, 102, 1); color: rgba(102, 102, 102, 1);
font-size: 12px; font-size: 24rpx;
text-align: left; text-align: left;
font-family: SourceHanSansSC-medium;
} }
.yzm1{ .yzm1{
position: absolute; margin-top: 36rpx;
left: 64rpx;
top: 422rpx;
width: 36px;
height: 18px;
color: rgba(102, 102, 102, 1); color: rgba(102, 102, 102, 1);
font-size: 12px; font-size: 24rpx;
text-align: left; text-align: left;
font-family: SourceHanSansSC-medium;
} }
.t-input{ .t-input{
padding: 0!important; padding: 0!important;
@ -323,48 +310,248 @@ font-family: SourceHanSansSC-medium;
padding-bottom: 10rpx!important; padding-bottom: 10rpx!important;
} }
.sjhminput1{ .sjhminput1{
margin-top: 14rpx;
padding: 0!important; padding: 0!important;
position: absolute;
left:64rpx;
top:330rpx;
--td-input-border-color: rgba(75, 75, 75, 1); --td-input-border-color: rgba(75, 75, 75, 1);
--td-input-border-color: rgba(255, 255, 255, 1); --td-input-border-color: rgba(255, 255, 255, 1);
--td-input-default-text-color: rgba(248, 99, 42, 1); --td-input-default-text-color: rgba(248, 99, 42, 1);
} }
.sjhbkx{ .sjhbkx{
position: absolute; width: 532rpx;
left: 64rpx; border: 2rpx solid rgba(248, 99, 42, 1);
top: 384rpx;
width: 266px;
border: 1rpx solid rgba(248, 99, 42, 1);
} }
.yzmbkx{ .yzmbkx{
position: absolute; width: 532rpx;
left: 64rpx; border: 2rpx solid rgba(237, 238, 242, 1);
top: 532rpx;
width: 266px;
border: 1rpx solid rgba(237, 238, 242, 1);
} }
.sjhminput2{ .sjhminput2{
position: relative;
margin-top: 14rpx;
padding: 0!important; padding: 0!important;
position: absolute;
left:64rpx;
top:480rpx;
--td-input-border-color: rgba(75, 75, 75, 1); --td-input-border-color: rgba(75, 75, 75, 1);
--td-input-border-color: rgba(255, 255, 255, 1); --td-input-border-color: rgba(255, 255, 255, 1);
} }
.cxhq{ .cxhq{
position: absolute; position: absolute;
left: 500rpx; top: 10rpx;
top: 478rpx; right: 0;
width: 48px;
height: 17px;
color: rgba(248, 99, 42, 1); color: rgba(248, 99, 42, 1);
font-size: 12px; font-size: 24rpx;
text-align: left; text-align: left;
font-family: PingFangSC-regular; z-index: 1;
}
.bdsjhVisible {
position: absolute;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
background-color: rgba(255, 255, 255, 0.8);
}
.bdsjh-btn {
width: 100%;
margin-top: 96rpx;
display: flex;
justify-content: space-between;
}
.bd-success {
width: 586rpx;
height: 434rpx;
line-height: 40rpx;
border-radius: 30rpx;
background-color: rgba(255, 255, 255, 1);
text-align: center;
box-shadow: 2rpx 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
}
.bd-success-text {
margin-top: 122rpx;
width: 100%;
height: 110rpx;
}
.bd-success-text .text1 {
color: rgba(79, 79, 79, 1);
font-size: 36rpx;
}
.bd-success-text .text2 {
margin-top: 16rpx;
color: rgba(248, 99, 42, 1);
font-size: 28rpx;
}
.bd-success-btn {
width: 100%;
display: flex;
justify-content: center;
}
.bd-success-btn .btn {
margin-top: 86rpx;
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%);
text-align: center;
box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
border: 6rpx solid rgba(255, 255, 255, 1);
box-sizing: border-box;
color: #fff;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
}
.phoneCode {
width: 60%;
}
.exist-phone {
width: 660rpx;
height: 786rpx;
line-height: 40rpx;
border-radius: 30rpx;
background-color: rgba(255, 255, 255, 1);
text-align: center;
box-shadow: 2rpx 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
}
.exist-phone-text1 {
margin-top: 96rpx;
color: #333333;
font-size: 36rpx;
}
.exist-phone-text2 {
margin-top: 38rpx;
color: rgba(154, 154, 154, 1);
font-size: 28rpx;
}
.exist-phone-text3 {
margin-top: 10rpx;
color: rgba(154, 154, 154, 1);
font-size: 28rpx;
margin-bottom: 136rpx;
}
.exist-phone-text4 {
margin-top: 96rpx;
color: rgba(248, 99, 42, 1);
font-size: 32rpx;
}
.exist-phone-text5 {
margin-top: 20rpx;
color: rgba(248, 99, 42, 1);
font-size: 32rpx;
}
.exist-phone-btn {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.exist-phone-btn .btn {
width: 300rpx;
height: 70rpx;
margin-bottom: 32rpx;
border-radius: 20rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
text-align: center;
box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
border: 6rpx solid rgba(255, 255, 255, 1);
box-sizing: border-box;
color: #fff;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
}
.exist-btn {
width: 100%;
margin-top: 96rpx;
display: flex;
justify-content: space-around;
align-items: center;
}
.exist-btn .btn {
width: 210rpx;
height: 70rpx;
margin-bottom: 32rpx;
border-radius: 20rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
text-align: center;
box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
border: 6rpx solid rgba(255, 255, 255, 1);
box-sizing: border-box;
color: #fff;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
}
.logout {
position: relative;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
background-color: rgba(255, 255, 255, 0.9);
}
.logout-box {
margin-top: 544rpx;
width: 586rpx;
height: 434rpx;
border-radius: 30rpx;
background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1);
font-size: 28rpx;
text-align: center;
box-shadow: 2rpx 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
}
.logout-box-text {
width: 100%;
height: 318rpx;
color: rgba(108, 108, 108, 1);
font-size: 36rpx;
display: flex;
align-items: center;
justify-content: center;
}
.logout-box-btn {
width: 100%;
height: 70rpx;
display: flex;
justify-content: space-around;
}
.logout-box-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%);
text-align: center;
box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
border: 6rpx solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1);
font-size: 28rpx;
display: flex;
justify-content: center;
align-items: center;
} }

@ -12,7 +12,9 @@ Page({
showDialog:false showDialog:false
}, },
go2Reback(){ go2Reback(){
wx.navigateBack({ changed: true }); wx.switchTab({
url: '/pages/home/me/indexx',
})
}, },
// 长按解除羁绊 // 长按解除羁绊
handleLongPress() { handleLongPress() {

@ -8,6 +8,14 @@ Page({
}, },
go2Reback(){
wx.switchTab({
url: '/pages/home/me/indexx',
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */

@ -1,4 +1,174 @@
<!--pages/index/out/out.wxml 说明书页面--> <!--pages/index/out/out.wxml 说明书页面-->
<!--<web-view src="https://xzjl-api.windymuse.cn/"></web-view>--> <view class="manual-container">
<view>跳转页面,待完善</view> <!-- 头部导航 -->
<view class="manual-header">
<view class="header-reback" bindtap="go2Reback"></view>
</view>
<view class="manual-box">
<view class="manual-main">
<view class="main-box1">hi亲爱的主人你好</view>
<view class="main-box1">欢迎查看星座守护精灵的【使用手册】</view>
<view class="main-box1">首先,让我们从唤醒精灵开始</view>
<view class="main-box2">
<view class="main-box2-left"></view>
<view class="main-box2-right">
<view>在手机桌面或者小程序激活页面</view>
<view>将首饰感应区贴合手机NFC区域</view>
<view>即可完成激活</view>
</view>
</view>
<view class="main-box3"></view>
<view class="main-box4">
<view>如果不小心忘带或丢失了首饰</view>
<view>还可以点击中间的晶石通过扫描</view>
<view>二维码进入(二维码在我的设</view>
<view>中查看)</view>
</view>
<view class="main-box5">
<view class="main-box5-left"></view>
<view class="main-box5-right">
<view>激活后将直接弹出今日星座运势,</view>
<view>让你不错过每一天的好运气!</view>
</view>
</view>
<view class="main-box6"></view>
<view class="main-box7">
<view>每天前三次查看星座运势都会获得</view>
<view class="btm">相应的水晶能量和银币</view>
<view class="color">【水晶能量】可以用来加持好运</view>
<view class="color">【银币】可以用来在许愿池-许愿</view>
</view>
<view class="main-box8">
<view class="main-box8-left"></view>
<view class="main-box8-right">
<view>在许愿池可以消耗【银币】许愿,</view>
<view>还可以将自己的愿望发送给好友或</view>
<view>者发布朋友圈</view>
</view>
</view>
<view class="main-box9"></view>
<view class="main-box27 btop">
<view>在情侣状态下,你还可以查看</view>
<view>对方的愿望。不错过ta的每一个心愿</view>
</view>
<view class="main-box10">
<view class="main-box10-left"></view>
<view class="main-box10-right">
<view>在精灵页可以查看自己的星座精灵</view>
<view class="btm">点击精灵可以切换【精灵形态】</view>
<view class="color">长按【能量注入】,可以将星座能</view>
<view class="color">量注入到智能首饰中,让精灵守护</view>
<view class="color">你,加持一天的好运哦!</view>
</view>
</view>
<view class="main-box11"></view>
<view class="main-box12">
<view>在精灵页【情侣状态】下,可以查</view>
<view>看双方的精灵形态。同样,点击精</view>
<view>灵可以为对方变换形态。</view>
</view>
<view class="main-box13"></view>
<view class="main-box14 color">
<view>点击对方的【能量晶石】可以将星</view>
<view>座能量赠送给对方。</view>
<view>点击【祈祷】可花费水晶能量为</view>
<view>对方祈祷祝福。对方也会同步显示</view>
</view>
<view class="main-box15">
<view class="btm">向右滑动或点击箭头显示对方详情</view>
<view class="color">点击【ta的运势】来查看对方当天</view>
<view class="color btm">星座运势</view>
</view>
<view class="main-box16">
<view class="img1"></view>
<view class="img2"></view>
</view>
<view class="main-box17">
<view>向左滑动或点击箭头显示自己详情</view>
<view>功能与【单人状态】下相同</view>
</view>
<view class="main-box18"></view>
<view class="main-box19">
<view class="main-box19-left"></view>
<view class="main-box19-right">
<view class="color">点击【精灵AI】按钮即可与你的</view>
<view class="btm color">星座守护精灵进行对话。</view>
<view>无聊的时候或者需要精灵帮你答疑</view>
<view>解惑可以随时找ta哦~</view>
</view>
</view>
<view class="main-box20"></view>
<view class="main-box21">
<view class="main-box21-left"></view>
<view class="main-box21-right">
<view>【单人状态】与【情侣状态】下的</view>
<view class="btm">【星讯】会完全不同。~</view>
<view class="color">在单人状态,你可以点击【信札】</view>
<view class="color">给你爱的人写一封表达爱意的信</view>
<view class="color">点击【羁绊】即可跟你的ta进行</view>
<view class="color">【情侣绑定】,绑定成功后,页面</view>
<view class="color">也将转变为【情侣状态】</view>
</view>
</view>
<view class="main-box22"></view>
<view class="main-box23 btop">
<view>在【情侣状态】时,【星讯】将</view>
<view>变成你们彼此的专属秘密树洞。</view>
<view class="btm btop">将你们的甜蜜回忆都记录在这里。</view>
<view class="color">通过左上角【回忆】按钮可以查看</view>
<view class="color">甜蜜的过往信息哦~</view>
</view>
<view class="main-box24"></view>
<view class="main-box25">
<view class="main-box25-left"></view>
<view class="main-box25-right">
<view>在【我的】页面,可进行个人资料</view>
<view class="btm">等编辑修改。</view>
<view class="color">点击【头像】或【昵称】来更改个</view>
<view class="color btm">人信息</view>
<view class="color">点击【绑定手机号】进行手机号绑</view>
<view class="color">定,如果不小心遗失了智能首饰。</view>
<view class="color btm">也可以进行账号找回</view>
<view class="color">点击【我的设备】即可查看智能首</view>
<view class="color"> 饰的详细信息,可以保存二维码以</view>
<view class="color">便设备不在身边时的【临时登录】</view>
<view class="color btm">点击【解除羁绊】即可解绑情侣,</view>
<view class="color"> 解绑后情侣数据将保留30天。如</view>
<view class="color">果30天内没有重新绑定数据将</view>
<view class="color">被清除。请谨慎操作。</view>
</view>
</view>
<view class="main-box26"></view>
</view>
</view>
</view>

@ -1 +1,354 @@
/* pages/home/me/manual/manual.wxss */ /* pages/home/me/manual/manual.wxss */
view {
box-sizing: border-box;
}
.color {
color: #F8632A;
}
.btm {
margin-bottom: 10rpx;
}
.btop {
margin-top: 32rpx;
}
.manual-container {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
padding-top: 88rpx;
box-sizing: border-box;
}
.manual-header {
width: 100%;
height: 88rpx;
display: flex;
align-items: center;
justify-content: start;
background-color: #fff;
}
.header-reback{
margin-left: 20rpx;
width:48rpx;
height:48rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
}
.manual-box {
width: 100%;
flex: 1;
overflow-y: scroll;
}
.manual-main {
width: 100%;
padding: 32rpx 62rpx 0 62rpx;
box-sizing: border-box;
font-size: 32rpx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.main-box1 {
color: rgba(248, 99, 42, 1);
margin-bottom: 10rpx;
font-size: 36rpx;
font-weight: 700;
}
.main-box2 {
width: 100%;
padding-left: 28rpx;
margin-top: 16rpx;
display: flex;
}
.main-box2-left {
width: 52rpx;
height: 82rpx;
margin-right: 14rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/one.png);
}
.main-box2-right {
padding-top: 16rpx;
box-sizing: border-box;
}
.main-box3 {
margin-top: 32rpx;
width: 356rpx;
height: 770rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/instructions-img-1.png);
}
.main-box4 {
width: 100%;
padding-left: 94rpx;
box-sizing: border-box;
margin-top: 32rpx;
}
.main-box5 {
width: 100%;
padding-left: 28rpx;
margin-top:48rpx;
display: flex;
}
.main-box5-left {
width: 52rpx;
height: 82rpx;
margin-right: 14rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/two.png);
}
.main-box5-right {
padding-top: 16rpx;
box-sizing: border-box;
}
.main-box6 {
margin-top: 32rpx;
width: 356rpx;
height: 770rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/instructions-img-2.png);
}
.main-box7 {
width: 100%;
padding-left: 94rpx;
margin-top: 32rpx;
}
.main-box27 {
width: 100%;
padding-left: 94rpx;
}
.main-box8 {
width: 100%;
padding-left: 28rpx;
margin-top: 48rpx;
display: flex;
}
.main-box8-left {
width: 52rpx;
height: 82rpx;
margin-right: 14rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/three.png);
}
.main-box8-right {
padding-top: 16rpx;
box-sizing: border-box;
}
.main-box9 {
margin-top: 32rpx;
width: 356rpx;
height: 770rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/instructions-img-3.png);
}
.main-box10 {
width: 100%;
padding-left: 28rpx;
margin-top: 48rpx;
display: flex;
}
.main-box10-left {
width: 52rpx;
height: 82rpx;
margin-right: 14rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/four.png);
}
.main-box10-right {
padding-top: 16rpx;
box-sizing: border-box;
}
.main-box11 {
margin-top: 32rpx;
width: 356rpx;
height: 770rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/instructions-img-4.png);
}
.main-box12 {
width: 100%;
padding-left: 94rpx;
margin-top: 32rpx;
}
.main-box13 {
margin-top: 32rpx;
width: 356rpx;
height: 770rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/instructions-img-5.png);
}
.main-box14 {
width: 100%;
padding-left: 94rpx;
margin-top: 32rpx;
}
.main-box15 {
width: 100%;
padding-left: 94rpx;
margin-top: 48rpx;
}
.main-box16 {
width: 100%;
display: flex;
justify-content: space-between;
}
.main-box16 .img1 {
width: 310rpx;
height: 674rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/instructions-img-6.png);
}
.main-box16 .img2 {
width: 310rpx;
height: 674rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/instructions-img-7.png);
}
.main-box17 {
width: 100%;
padding-left: 94rpx;
margin-top: 32rpx;
}
.main-box18 {
margin-top: 32rpx;
width: 356rpx;
height: 770rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/instructions-img-8.png);
}
.main-box19 {
width: 100%;
padding-left: 28rpx;
margin-top: 48rpx;
display: flex;
}
.main-box19-left {
width: 52rpx;
height: 82rpx;
margin-right: 14rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/five.png);
}
.main-box19-right {
padding-top: 16rpx;
box-sizing: border-box;
}
.main-box20 {
margin-top: 32rpx;
width: 356rpx;
height: 770rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/instructions-img-9.png);
}
.main-box21 {
width: 100%;
padding-left: 28rpx;
margin-top: 48rpx;
display: flex;
}
.main-box21-left {
width: 52rpx;
height: 82rpx;
margin-right: 14rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/six.png);
}
.main-box21-right {
padding-top: 16rpx;
box-sizing: border-box;
}
.main-box22 {
margin-top: 32rpx;
width: 356rpx;
height: 770rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/instructions-img-10.png);
}
.main-box23 {
width: 100%;
padding-left: 94rpx;
}
.main-box24 {
margin-top: 32rpx;
width: 356rpx;
height: 770rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/instructions-img-11.png);
}
.main-box25 {
width: 100%;
padding-left: 28rpx;
margin-top: 48rpx;
display: flex;
}
.main-box25-left {
width: 52rpx;
height: 82rpx;
margin-right: 14rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/seven.png);
}
.main-box25-right {
padding-top: 16rpx;
box-sizing: border-box;
}
.main-box26 {
margin: 32rpx 0 150rpx 0;
width: 356rpx;
height: 770rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/instructions-img-12.png);
}

@ -10,10 +10,11 @@ Page({
data: { data: {
yhy:true, yhy:true,
openid:'', openid:'',
showToast:false showToast:false,
isChatVip:false,
deadline: ''
}, },
doKtHy() { doKtHy() {
req.postRequest(`/api/v1/chat-service-order/prepare/${this.data.yhy?'2':'1'}`, { req.postRequest(`/api/v1/chat-service-order/prepare/${this.data.yhy?'2':'1'}`, {
openid: this.data.openid openid: this.data.openid
}).then((res) => { }).then((res) => {
@ -27,36 +28,30 @@ Page({
signType: 'MD5', signType: 'MD5',
paySign: res.data.data.paySign, paySign: res.data.data.paySign,
success: res => { success: res => {
console.log(res, '支付返回数据');
//支付成功的回调这里面写支付成功后跳转的路径 //支付成功的回调这里面写支付成功后跳转的路径
wx.showToast({ wx.showToast({
title: '支付成功', // 标题 title: '支付成功', // 标题
icon: 'success', // 图标类型默认success 图标支持开发文档的icon icon: 'success', // 图标类型默认success 图标支持开发文档的icon
}) })
setTimeout(() => { setTimeout(() => {
wx.switchTab({ wx.navigateBack()
url: '/pages/home/me/indexx',
})
}, 1000) }, 1000)
}, },
fail: () => { fail: () => {
// uni.showToast({ wx.showToast({
// icon: 'none', icon: 'none',
// title: '支付失败' title: '支付失败'
// }); });
} }
}); });
}) })
/**开通会员操作 */
console.log('开通会员')
},
go2Week(){
this.setData({yhy:false})
}, },
go2Month(){ go2Month(){
this.setData({yhy:true}) this.setData({yhy: !this.data.yhy})
}, },
go2Reback(){ go2Reback(){
wx.navigateBack({ changed: true }); wx.navigateBack()
}, },
tQuest(){ tQuest(){
this.setData({showToast:true}) this.setData({showToast:true})
@ -66,6 +61,34 @@ Page({
console.log('点击了'); console.log('点击了');
}, },
getuserInfo(){
req.getRequest('/api/user/curt',{}).then(res => {
if (res.data.code === 200) {
console.log(res.data.data.isChatVip);
this.setData({isChatVip: res.data.data.isChatVip})
if (res.data.data.isChatVip) {
this.getVipDeadline(res.data.data.chatVipEndTime)
}
}
})
},
// 获取vip截止日期
getVipDeadline(time){
console.log(time);
const endTime = new Date(time)
const newTime = new Date()
// 判断时间是否已经到期
if (endTime > newTime) {
const year = endTime.getFullYear()
const mouth = endTime.getMonth() + 1
const day = endTime.getDate()
const deadline = `${year}${mouth}${day}`
this.setData({ deadline : deadline})
}
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
@ -74,7 +97,6 @@ Page({
provider: 'weixin', provider: 'weixin',
success: loginRes => { success: loginRes => {
//loginRes中有code拿着code再请求自己服务器以获取openid //loginRes中有code拿着code再请求自己服务器以获取openid
console.log(loginRes.code, 888888888888);
req.getRequest(`/api/v1/chat-service-order/js-code2-session`, { req.getRequest(`/api/v1/chat-service-order/js-code2-session`, {
code: loginRes.code code: loginRes.code
}).then((res) => { }).then((res) => {
@ -86,6 +108,8 @@ Page({
}) })
} }
}); });
this.getuserInfo()
}, },
/** /**

@ -1,11 +1,51 @@
<!--返回图标--> <view class="member-container">
<!--头部-->
<view class="header">
<view class="reback" bindtap="go2Reback"></view> <view class="reback" bindtap="go2Reback"></view>
<view class="title">VIP会员</view> <view class="title">VIP会员</view>
<view class="sftp"></view><!--上方图片--> </view>
<view class="main">
<!--上方图片-->
<view class="sftp"></view>
<!--皇冠图标-->
<view class="hgpng">
<!--问号图标-->
<view class="question" bindtap="tQuest"></view>
</view>
<view class="hydqr" wx:if="{{!isChatVip}}">即刻解锁无限次星座精灵AI无限畅聊</view>
<view class="hydqr" wx:else>您的会员将于{{deadline}}到期</view>
<view class="member-btn">
<view class="member-btn-left">
<view class="{{yhy ? 'week1' : 'month1'}}" bindtap="go2Month">
<text class="text1">¥29</text>
<text class="text2"> / 周</text>
</view>
<view class="zhytxt">周会员</view>
</view>
<view class="member-btn-right">
<view class="{{yhy ? 'month1' : 'week1'}}" bindtap="go2Month">
<text class="text1">¥69</text>
<text class="text2"> / 月</text>
</view>
<view class="yhytxt">月会员</view>
</view>
</view>
<view class="viphyqy">VIP会员权益</view>
<view class="introd">
<view>1、星座精灵AI服务无限次畅聊</view>
<view>2、不定期商品及新品折扣优惠</view>
<view>3、其他权益陆续增加中......</view>
</view>
<view class="hybtn" bindtap="doKtHy">{{isChatVip ? '续费会员' : '开通会员'}}</view>
<!--底部图片--> <!--底部图片-->
<view class="hybt"></view> <view class="hybt"></view>
<view class="hgpng"></view><!--皇冠图标-->
<view class="question" bindtap="tQuest"></view><!--问号图标-->
<!-- 提示 --> <!-- 提示 -->
<view class="bgc" bindtap="closeTaost" wx:if="{{showToast}}"> <view class="bgc" bindtap="closeTaost" wx:if="{{showToast}}">
@ -15,20 +55,5 @@
索内心世界。</view> 索内心世界。</view>
</view> </view>
<t-toast id="t-toast" /><!--弹出问号图标-->
<view class="hybtn" bindtap="doKtHy">开通会员</view>
<view class="viphyqy">VIP会员权益</view>
<view class="introd">
<view>1、星座精灵AI服务无限次畅聊</view>
<view>2、不定期商品及新品折扣优惠</view>
<view>3、 其他权益陆续增加中......</view>
</view> </view>
<view class="zhytxt">周会员</view> </view>
<view class="yhytxt">月会员</view>
<view class="hydqr">即刻解锁无限次星座精灵AI无限畅聊</view>
<view class="week1" wx:if="{{yhy}}" bindtap="go2Week"><text class="text1 tcolor1">¥29</text><text class="text2 tcolor1"> / 周</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="month2" wx:if="{{!yhy}}" bindtap="go2Month"><text class="text1 tcolor1">¥69</text><text class="text2 tcolor1"> / 月</text></view>

@ -1,7 +1,23 @@
.member-container {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.header {
position: relative;
width: 100%;
height: 88rpx;
margin-top: 88rpx;
display: flex;
justify-content: center;
align-items: center;
}
.reback{ .reback{
position: absolute; position: absolute;
margin-left: 20rpx; left: 20rpx;
margin-top:108rpx;
width:48rpx; width:48rpx;
height:48rpx; height:48rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
@ -10,166 +26,167 @@
} }
.title{ .title{
position: absolute;
left: 278rpx;
top: 108rpx;
width: 196rpx; width: 196rpx;
height: 48rpx; height: 48rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 32rpx; font-size: 32rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-regular;
} }
.hybt{ .main {
position: absolute; position: relative;
left: 30rpx; flex: 1;
top: 1326rpx; display: flex;
align-items: center;
flex-direction: column;
}
.sftp{
width: 690rpx; width: 690rpx;
height: 230rpx; height: 230rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/hybt.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/sftp.png);
} }
.sftp{ .hybt{
position: absolute; position: absolute;
left: 15px; bottom: 44rpx;
top: 82px; width: 690rpx;
width: 345px; height: 230rpx;
height: 115px;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/sftp.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/hybt.png);
pointer-events: none;
} }
.hgpng{ .hgpng{
position: absolute; position: absolute;
left: 109px; top: 72rpx;
top: 124px; width: 314rpx;
width: 157px; height: 348rpx;
height: 174px; display: flex;
justify-content: flex-end;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/hgpng.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/hgpng.png);
} }
.question{ .question{
position: absolute; width: 60rpx;
left: 236px; height: 60rpx;
top: 124px;
width: 30px;
height: 30px;
z-index: 999; z-index: 999;
background-size: cover;
background-image: url(https://wish-assets.windymuse.com.cn/xy/qqest.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/qqest.png);
} }
.member-btn {
margin-top: 88rpx;
width: 100%;
height: 180rpx;
display: flex;
justify-content: space-evenly;
}
.member-btn-left, .member-btn-right {
width: 280rpx;
height: 100%;
}
.hybtn{ .hybtn{
position: absolute; margin-top: 64rpx;
left: 118px; width: 280rpx;
top: 645px; height: 80rpx;
width: 140px;
height: 40px;
line-height: 80rpx; line-height: 80rpx;
border-radius: 10px; border-radius: 20rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%); background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
text-align: center; box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); border: 6rpx solid rgba(255, 255, 255, 1);
border: 3px solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
font-size: 32rpx; font-size: 32rpx;
text-align: center; display: flex;
font-family: SourceHanSansSC-medium; align-items: center;
justify-content: center;
} }
.viphyqy{ .viphyqy{
position: absolute; margin-top: 78rpx;
top: 502px; width: 100%;
width: 750rpx; height: 40rpx;
height: 20px;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 14px; font-size: 28rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-regular;
} }
.introd{ .introd{
left:180rpx; margin-top: 32rpx;
position: absolute; padding-left: 180rpx;
top: 538px; width: 100%;
width: 750rpx; height: 150rpx;
height: 75px;
line-height: 50rpx; line-height: 50rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 14px; font-size: 28rpx;
text-align: left; text-align: left;
font-family: SourceHanSansSC-regular; font-family: SourceHanSansSC-regular;
} }
.zhytxt{ .zhytxt{
position: absolute; width: 100%;
left: 82px;
top: 442px;
width: 42px;
height: 21px;
color: rgba(154, 154, 154, 1); color: rgba(154, 154, 154, 1);
font-size: 14px; font-size: 28rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-regular;
} }
.yhytxt{ .yhytxt{
position: absolute; width: 100%;
left: 506rpx;
top: 442px;
width: 42px;
height: 21px;
color: rgba(154, 154, 154, 1); color: rgba(154, 154, 154, 1);
font-size: 14px; font-size: 28rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-regular;
} }
.hydqr{ .hydqr{
position: absolute; margin-top: 234rpx;
top: 314px;
width: 750rpx; width: 750rpx;
height: 20px; height: 40rpx;
color: rgba(248, 99, 42, 1); color: rgba(248, 99, 42, 1);
font-size: 14px; font-size: 28rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-regular;
} }
.week1{ .week1{
position: absolute; width: 280rpx;
left: 32px; height: 120rpx;
top: 374px; margin-bottom: 10rpx;
width: 140px; line-height: 120rpx;
height: 60px; border-radius: 30rpx;
line-height: 60px;
border-radius: 15px;
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1); color: rgba(16, 16, 16, 1);
font-size: 14px; font-size: 28rpx;
text-align: center; text-align: center;
font-family: Arial; font-family: Arial;
border: 2px solid rgba(248, 99, 42, 1); border: 4rpx solid rgba(248, 99, 42, 1);
}
.week1 .text1, .month1 .text2 {
color: #4f4f4f;
} }
.month1{ .month1{
position: absolute; width: 280rpx;
left: 203px; height: 120rpx;
top: 374px; margin-bottom: 10rpx;
width: 140px; line-height: 120rpx;
height: 60px; border-radius: 30rpx;
line-height: 60px;
border-radius: 15px;
background-color: rgba(248, 99, 42, 1); background-color: rgba(248, 99, 42, 1);
color: rgba(16, 16, 16, 1); color: rgba(16, 16, 16, 1);
font-size: 14px; font-size: 28rpx;
text-align: center; text-align: center;
font-family: Arial; font-family: Arial;
border: 1px solid rgba(248, 99, 42, 1); border: 4rpx solid rgba(248, 99, 42, 1);
}
.month1 .text1, .month1 .text2 {
color: #fff;
} }
.text1{ .text1{
@ -178,7 +195,6 @@ font-family: SourceHanSansSC-regular;
width: 60px; width: 60px;
height: 41px; height: 41px;
font-size: 28px; font-size: 28px;
font-family: SourceHanSansSC-regular;
} }
.text2{ .text2{
@ -188,66 +204,21 @@ font-family: SourceHanSansSC-regular;
height: 17px; height: 17px;
font-size: 16px; font-size: 16px;
text-align: left; text-align: left;
font-family: SourceHanSansSC-regular;
}
.tcolor1{
color: rgba(79, 79, 79, 1);
}
.tcolor2{
color: rgba(255, 255, 255, 1);
}
.week2{
position: absolute;
left: 32px;
top: 374px;
width: 140px;
height: 60px;
line-height: 60px;
border-radius: 15px;
background-color: rgba(248, 99, 42, 1);
color: rgba(16, 16, 16, 1);
font-size: 14px;
text-align: center;
font-family: Arial;
border: 1px solid rgba(248, 99, 42, 1);
}
.month2{
position: absolute;
left: 203px;
top: 374px;
width: 140px;
height: 60px;
line-height: 60px;
border-radius: 15px;
background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1);
font-size: 14px;
text-align: center;
font-family: Arial;
border: 2px solid rgba(248, 99, 42, 1);
} }
.toast { .toast {
position: absolute; margin-top: 168rpx;
top: 344rpx;
left: 64rpx;
width: 622rpx; width: 622rpx;
height: 316rpx; height: 316rpx;
line-height: 150%;
padding: 32rpx; padding: 32rpx;
box-sizing: border-box; box-sizing: border-box;
border-radius: 15px; border-radius: 30rpx;
background-color: rgba(255, 255, 255, 0.9); background-color: rgba(255, 255, 255, 0.9);
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 28rpx; font-size: 28rpx;
text-align: center; box-shadow: 2rpx 4rpx 12rpx 0px rgba(0, 0, 0, 0.2);
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.2);
z-index: 999; z-index: 999;
text-align: justify;
} }
.bgc { .bgc {
@ -255,4 +226,6 @@ font-family: SourceHanSansSC-regular;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 1; z-index: 1;
display: flex;
justify-content: center;
} }

@ -1,87 +0,0 @@
// pages/home/me/member/member.js
import Toast from 'tdesign-miniprogram/toast/index';
Page({
/**
* 页面的初始数据
*/
data: {
yhy:true
},
doKtHy(){/**开通会员操作 */
console.log('开通会员')
},
go2Week(){
this.setData({yhy:false})
},
go2Month(){
this.setData({yhy:true})
},
go2Reback(){
wx.navigateBack({ changed: true });
},
tQuest(){
Toast({
context: this,
selector: '#t-toast',
message: '星座精灵AI的付费会员服务基于OpenAI的GPT-3.5 Turbo模型为您提供高智能情感咨询服务以及星座、星骰和塔罗牌等娱乐服务。利用人工智能技术和高质量的自然语言响应星座精灵AI可以更好的帮助您深入探索内心世界。',
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

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

@ -1,26 +0,0 @@
<!--返回图标-->
<view class="reback" bindtap="go2Reback"></view>
<view class="title">VIP会员</view>
<view class="sftp"></view><!--上方图片-->
<!--底部图片-->
<view class="hybt"></view>
<view class="hgpng"></view><!--皇冠图标-->
<view class="question" bindtap="tQuest"></view><!--问号图标-->
<t-toast id="t-toast" /><!--弹出问号图标-->
<view class="hybtn" bindtap="doKtHy">开通会员</view>
<view class="viphyqy">VIP会员权益</view>
<view class="introd">
<view>1、星座精灵AI服务无限次畅聊</view>
<view>2、不定期商品及新品折扣优惠</view>
<view>3、 其他权益陆续增加中......</view>
</view>
<view class="zhytxt">周会员</view>
<view class="yhytxt">月会员</view>
<view class="hydqr">您的会员将于 2023年5月20日到期</view>
<view class="week1" wx:if="{{yhy}}" bindtap="go2Week"><text class="text1 tcolor1">¥29</text><text class="text2 tcolor1"> / 周</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="month2" wx:if="{{!yhy}}" bindtap="go2Month"><text class="text1 tcolor1">¥69</text><text class="text2 tcolor1"> / 月</text></view>

@ -1,232 +0,0 @@
.reback{
position: absolute;
margin-left: 20rpx;
margin-top:108rpx;
width:48rpx;
height:48rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
}
.title{
position: absolute;
left: 278rpx;
top: 108rpx;
width: 196rpx;
height: 48rpx;
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.hybt{
position: absolute;
left: 30rpx;
top: 1326rpx;
width: 690rpx;
height: 230rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/hybt.png);
}
.sftp{
position: absolute;
left: 15px;
top: 82px;
width: 345px;
height: 115px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/sftp.png);
}
.hgpng{
position: absolute;
left: 109px;
top: 124px;
width: 157px;
height: 174px;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/hgpng.png);
}
.question{
position: absolute;
left: 236px;
top: 124px;
width: 30px;
height: 30px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/qqest.png);
}
.hybtn{
position: absolute;
left: 118px;
top: 645px;
width: 140px;
height: 40px;
line-height: 80rpx;
border-radius: 10px;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1);
font-size: 32rpx;
text-align: center;
font-family: SourceHanSansSC-medium;
}
.viphyqy{
position: absolute;
top: 502px;
width: 750rpx;
height: 20px;
color: rgba(108, 108, 108, 1);
font-size: 14px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.introd{
left:180rpx;
position: absolute;
top: 538px;
width: 750rpx;
height: 75px;
line-height: 50rpx;
color: rgba(108, 108, 108, 1);
font-size: 14px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.zhytxt{
position: absolute;
left: 82px;
top: 442px;
width: 42px;
height: 21px;
color: rgba(154, 154, 154, 1);
font-size: 14px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.yhytxt{
position: absolute;
left: 506rpx;
top: 442px;
width: 42px;
height: 21px;
color: rgba(154, 154, 154, 1);
font-size: 14px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.hydqr{
position: absolute;
top: 314px;
width: 750rpx;
height: 20px;
color: rgba(248, 99, 42, 1);
font-size: 14px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.week1{
position: absolute;
left: 32px;
top: 374px;
width: 140px;
height: 60px;
line-height: 60px;
border-radius: 15px;
background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1);
font-size: 14px;
text-align: center;
font-family: Arial;
border: 2px solid rgba(248, 99, 42, 1);
}
.month1{
position: absolute;
left: 203px;
top: 374px;
width: 140px;
height: 60px;
line-height: 60px;
border-radius: 15px;
background-color: rgba(248, 99, 42, 1);
color: rgba(16, 16, 16, 1);
font-size: 14px;
text-align: center;
font-family: Arial;
border: 1px solid rgba(248, 99, 42, 1);
}
.text1{
margin-left: 2px;
top: 384px;
width: 60px;
height: 41px;
font-size: 28px;
font-family: SourceHanSansSC-regular;
}
.text2{
left: 130px;
top: 401px;
width: 16px;
height: 17px;
font-size: 16px;
text-align: left;
font-family: SourceHanSansSC-regular;
}
.tcolor1{
color: rgba(79, 79, 79, 1);
}
.tcolor2{
color: rgba(255, 255, 255, 1);
}
.week2{
position: absolute;
left: 32px;
top: 374px;
width: 140px;
height: 60px;
line-height: 60px;
border-radius: 15px;
background-color: rgba(248, 99, 42, 1);
color: rgba(16, 16, 16, 1);
font-size: 14px;
text-align: center;
font-family: Arial;
border: 1px solid rgba(248, 99, 42, 1);
}
.month2{
position: absolute;
left: 203px;
top: 374px;
width: 140px;
height: 60px;
line-height: 60px;
border-radius: 15px;
background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1);
font-size: 14px;
text-align: center;
font-family: Arial;
border: 2px solid rgba(248, 99, 42, 1);
}

@ -29,7 +29,9 @@ Page({
}) })
}, },
go2Reback(){ go2Reback(){
wx.navigateBack({ changed: true }); wx.switchTab({
url: '/pages/home/me/indexx',
})
}, },
doDevQuery(){ doDevQuery(){
req.getRequest('/api/user/curt/equipments',{}).then((res)=>{ req.getRequest('/api/user/curt/equipments',{}).then((res)=>{

@ -1,7 +1,6 @@
<view class="title">我的设备</view> <view class="title">我的设备</view>
<swiper class="call" wx:for="{{devs}}"> <view class="call">
<swiper-item>
<view class="tbl" wx:if="{{dev.length>1}}"></view> <view class="tbl" wx:if="{{dev.length>1}}"></view>
<view class="tbr" wx:if="{{dev.length>1}}"></view> <view class="tbr" wx:if="{{dev.length>1}}"></view>
@ -17,11 +16,9 @@
<view class="intr1">可代替设备用于登录,可在设备丢失时临时登录使用</view> <view class="intr1">可代替设备用于登录,可在设备丢失时临时登录使用</view>
<view class="intr2">请不要将二维码告知他人,否则有账号丢失风险</view> <view class="intr2">请不要将二维码告知他人,否则有账号丢失风险</view>
<view class="sbsbmk"></view><!--设备识别码块--> <view class="sbsbmk"></view><!--设备识别码块-->
<view class="sbsbmkt">{{item.mac}}</view><!--设备识别码块--> <view class="sbsbmkt">{{devs[0].mac}}</view><!--设备识别码块-->
<view class="fz" data-copy="{{item.mac}}" bindtap="doCopy"></view><!--复制按钮--> <view class="fz" data-copy="{{item.mac}}" bindtap="doCopy"></view><!--复制按钮-->
</swiper-item> </view>
</swiper>
<!-- <canvas class="sbewm" type="2d" style="width: 300rpx; height: 300rpx;" id="myQrcode"></canvas> --> <!-- <canvas class="sbewm" type="2d" style="width: 300rpx; height: 300rpx;" id="myQrcode"></canvas> -->
<!--返回图标--> <!--返回图标-->

@ -8,6 +8,12 @@ Page({
}, },
go2Reback(){
wx.switchTab({
url: '/pages/home/me/indexx',
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */

@ -1,3 +1,111 @@
<!-- pages/home/me/yhsyxy/yhsyxy.wxml 用户使用协议 --> <!-- pages/home/me/yhsyxy/yhsyxy.wxml 用户使用协议 -->
<!--<web-view src="https://xzjl-api.windymuse.cn/"></web-view>--> <!-- 头部导航 -->
<view>跳转页面,待完善</view> <view class="user-container">
<view class="user-header">
<view class="header-reback" bindtap="go2Reback"></view>
<view>用户协议</view>
</view>
<view class="user-main">
<view class="main-title">星座守护精灵 用户协议</view>
<text class="main-text">
欢迎您使用星座守护精灵 软件。本协议是由用户以下可称“用户”或“您”与我司就所提供的产品及服务所订立的协议。为保障您的权益请您在登录使用我司所提供的产品及服务之前仔细阅读本协议18周岁以下未成年人应当在其法定监护人陪同下阅读包括免除或者限制我司的免责条款及对用户的权利限制条款。如果您进入我司或用户登录页面确认已经阅读、同意本协议的条款并完成登录或者通过其他任何方式获得和使用我司所提供的产品和服务则视为您已经详细阅读了本协议的内容同意遵守本协议的约定。您不应再以不了解本协议内容为由拒绝履行本协议。此外我司有权在不另行通知的情况下随时对本协议或相关协议进行修改修改部分即时生效并适用。请您在使用产品和服务时进行关注并遵守如您不同意修改您可以随时停止使用如果您继续使用则视为您已经接受修改后的协议。
<text class="main-text-title">一、定义和说明</text>
\n
1.1 本软件:星座守护精灵 软件,包含客户端内容及程序,并可能包括相关网络服务器、网站、电子媒体、印刷材料和“联机”或电子文档等。
1.2 用户:指已购买过星座守护精灵 商品并通过我公司提供的合法途径获得星座守护精灵软件使用许可而安装、使用星座守护精灵软件产品及服务的个人。
\n
<text class="main-text-title">二、知识产权声明</text>
\n
2.1我公司依法享有星座守护精灵软件的一切合法权属(包括但不限于知识产权)。本软件的全部著作权及一切其他知识产权,以及与本软件相关的所有信息内容,包括但不限于:文字表述及其组合、图标、图饰、图表、色彩组合、界面设计、版面框架、有关数据、印刷材料、或电子文档等均受中国知识产权相关法律法规和有关的国际条约的保护。
2.2 星座守护精灵软件所体现的徽标(图形)和/或我公司的产品和服务标示均属于我公司在中国及/或其他国家/地区的商标或者注册商标。用户未经合法授权不得自行使用。
2.3 我公司在涉及星座守护精灵软件及相关各项服务中拥有专利权、专利申请权、商标权、著作权及其他知识产权。我公司并未因为本《协议》或者因为向用户提供本软件以及相关服务而授予用户任何与本软件相关的知识产权。本《协议》未明确授予用户的权利均由我公司保留。
\n
<text class="main-text-title">三、隐私政策</text>
\n
本隐私政策将涵盖本应用如何收集、使用、处理、存储和保护App收集的关于您的个人信息。若我们要求您提供某些信息以便在使用产品和服务时验证您的身份我们将仅严格遵守本隐私政策来使用这些信息请你仔细阅读我们的隐私政策。
3.1 如何收集您的个人信息
个人信息是可用于唯一地识别或联系某人的数据。当您使用本应用时,用户登录过程中我们将会收集为您提供服务所必须的个人信息,如:电话号码、邮箱。为了保护个人隐私,我们只会收集明确及合法的目的所必需的信息,而不会以与这些目的不相符的方式进一步处理相关信息。
3.2 我们如何使用您的个人信息
1通过您提供的个人信息向您发送本应用的服务信息。
2通过您提供的个人信息为您提供/实现密码找回功能。
3除不可抗力外本公司不会向任何无关第三方提供、出售、出租、分享或交易您的个人信息除非事先得到您的许可。
3.3 保留政策
如有必要实现收集信息的目的,本应用仅将保留您的个人信息至履行收集目的所需的期限,同时将遵守适用法律规定的数据保留期限。
3.4 法律免责声明
在法律要求的情况下,以及本公司认为必须披露与您有关的信息来保护本公司的法定权益和/或遵守司法程序、法院指令或适用本应用程序的法律程序时,我们有权透露您的个人信息。如果本公司确定为了执行本公司的条款和条件或保护我们的经营,披露是合理必须的,则我们可披露与您有关的信息。
3.5 本隐私政策的更改
我们会对隐私政策进行定期审核,为反映我们信息惯例的变更,我们可能会更新本隐私政策。如果决定更改隐私政策,我们会在本政策中、本公司网站中以及我们认为适当的位置发布这些更改,以便您了解我们如何收集、使用您的个人信息,哪些人可以访问这些信息,以及在什么情况下我们会透露这些信息。我们保留随时修改本政策的权利,因此请经常查看。您若继续使用本应用程序提供的服务,将被视为接受更新的隐私政策。
\n
<text class="main-text-title">四、资费政策</text>
\n
4.1 本公司有权决定我司星座守护精灵软件产品和服务的资费标准和收费方式,我公司可能会就不同的产品和服务制定不同的资费标准和收费方式,也可能按照我们所提供的产品和服务的不同阶段确定不同的资费标准和收费方式。另外,我司也可能不时地修改相关资费政策。
4.2 对于我司星座守护精灵软件的收费产品和服务,用户应该按照我司确定的资费政策购买我们的产品和服务。如果用户未按我司确定的资费政策购买我司的产品和服务,我司可以立即停止向用户提供该产品和服务。
4.3 除非法律另有明文规定,无论该等资费是否已被消费,我司有权决定是否、何时、以何种方式向用户退款。我司同意退款的,用户应补偿支付时使用信用卡、手机等支付渠道产生的费用,该等费用我司有权在返还用户的资费中直接扣收。我司在产品和服务提供过程中赠送的充值金额、虚拟货币、虚拟道具等,不予退款或变现。
\n
<text class="main-text-title">五、服务、协议的中断或终止</text>
\n
5.1 如发生下列任何一种情形,我司有权随时中断或终止向用户提供本协议项下的星座守护精灵软件服务和其他网络服务,对于因而产生的不便和损失,我司不承担任何责任:
1用户提供的个人资料不真实
2用户违反本协议中规定的用户行为准则及本协议其他条款约定的义务。
5.2关于我司星座守护精灵软件所提供的不同产品和服务注销账号/角色的其他情况,请参见各个星座守护精灵软件产品和服务的具体规定,或相关星座守护精灵软件产品和服务的官方网站上的具体规定。
5.3 为了保障星座守护精灵软件及星座守护精灵软件平台网站和服务器的正常运行,我司需要定期或不定期对星座守护精灵软件及星座守护精灵软件平台网站和服务器进行停机维护,或针对突发事件进行紧急停机维护。因上述情况而造成的正常服务中断、中止,用户予以理解并同意,我司则有义务尽力避免服务中断并将中断时间限制在最短时间内。
5.4 在适用法律许可的最大范围内,发生下列情形之一时,为了星座守护精灵软件网站和服务器的持续稳定运行,我司有权不经提前通知,终止或中断星座守护精灵软件服务器所提供之全部或部分服务,对因此而产生的不便或损失,我司对用户或第三人均不承担任何责任:
1定期检查或施工更新软硬件等
2服务器遭受损害无法正常运作
3突发性的软硬件设备与电子通信设备故障
4网络提供商线路或其他故障
5在紧急情况之下依照法律的规定或为用户及第三者之人身安全
6第三方原因或其他不可抗力的情形。
5.5 在适用法律许可的最大范围内,不管产品和服务由于任何原因终止,用户应采取相应的措施自行处理星座守护精灵软件及星座守护精灵软件平台上的虚拟物品。用户不得因终止服务而要求我司承担除用户已经购买但尚未使用的星座守护精灵软件虚拟货币以外任何形式的赔偿或补偿责任,包括但不限于因不再能继续使用星座守护精灵软件账号、星座守护精灵软件内虚拟物品等而要求的赔偿。
\n
<text class="main-text-title">六、用户权利与义务</text>
\n
6.1在用户同意接受本《协议》全部内容的前提下,我公司同意授予用户可撤销的、可变更的、非专有的、不可转让和不可再授权的许可权利。用户可在许可生效的时间内将本软件安装在个人使用的联网设备上,并以指定的方式运行本软件的一份副本并享受我公司提供的服务。我公司基于本《协议》授予用户的许可是针对个人使用的许可。如用户有需要在个人使用的范围以外使用本软件及服务或者将本软件与服务用于任何商业用途,则用户应与我公司联系并获得我公司另行授权。任何未经我公司许可的安装、使用、访问、显示、运行等行为均视为违反本协议。
6.2 除非本《协议》另有规定,否则,未经我公司书面同意,用户不得实施下列行为(无论是营利的还是非营利的):
1复制、翻拷、传播和陈列本软件的程序、使用手册和其它图文音像资料的全部或部分内容。
2公开展示和播放本产品的全部或部分内容。
3出租、销售本软件或者利用本软件从事营利行为。
4修改或遮盖本软件程序、图像、动画、包装和手册等内容上的产品名称、公司标志、版权信息等内容。
5其它违反著作权法、计算机软件保护条例和相关法律法规的行为。
6.3 用户应通过合法的途径使用本软件和相关服务,不得作出以下侵害我公司或第三人利益,扰乱星座守护精灵软件秩序,违反星座守护精灵软件公平性、违反本《协议》或者我公司发布的其他规则或者国家有关法律法规规定的行为,包括但不限于:
1 修改、翻译、注释、整理、汇编、演绎本软件;
2 反向工程、反向编译或者反汇编本软件,或者采用其他技术手段对本软件进行分析、修改、攻击、衍生;
3 使用任何外挂程序或星座守护精灵软件修改程序本《协议》所称“外挂程序”是指独立于星座守护精灵软件软件之外的能够在星座守护精灵软件运行的同时影响星座守护精灵软件操作的所有程序包括但不限于模拟键盘鼠标操作、改变操作环境、修改数据等一切类型。如国家有关法律、法规及政府主管部门的规章或规范性文件规定的外挂定义与本《协议》有冲突则以法律、法规、部门规章或规范性文件规定的为准对本网络星座守护精灵软件软件进行还原工程、编译、译码或修改包括但不限于修改本软件所使用的任何专有通讯协议、对动态随机存取内存RAM中资料进行修改或锁定
4 使用异常的方法登录星座守护精灵软件、使用网络加速器等外挂软件或机器人程式等恶意破坏服务设施、扰乱正常服务秩序的行为;
5 通过异常或者非法方式使用本软件(包括但不限于利用本软件登录星座守护精灵软件私服),恶意破环本软件,扰乱正常的服务秩序或者实施其他不正当行为;
6 制作、传播或使用外挂、封包、加速软件及其它各种作弊程序,或组织、教唆他人使用此类软件程序,或销售此类软件程序而为个人或组织谋取经济利益;
7 使用任何方式或方法,试图攻击提供星座守护精灵软件服务的相关服务器、路由器、交换机以及其他设备,以达到非法获得或修改未经授权的数据资料、影响正常星座守护精灵软件服务,以及其他危害性目的的任何行为;
8 利用本软件可能存在的技术缺陷或漏洞而以各种形式为自己及他人牟利(包括但不限于复制本软件中的虚拟物品等)或者从事其他不正当行为;
9 违反国家有关法律法规的规定,利用本软件制作、复制、发布和传播信息。
一旦我公司通过内部的监测程序发现或经其他用户举报而发现用户有可能正在从事上述行为,则我公司有权作出独立的判断并采取相应的措施,该措施包括但不限于限制用户账号的登陆、限制用户在本软件中的活动、终止本软件授权、删除与复制有关的物品(包括复制出的虚拟物品和参与复制的虚拟物品)、删除用户的账号并要求用户赔偿因从事上述行为而给我公司造成的损失等。
6.4我公司提供可使用的客户端并运用自己的网络系统通过国际互联网络Internet为用户提供服务。同时用户应自行提供以下的设备和信息
6.4.1自行配备上网的所需设备, 包括手机等移动设备或其他必备上网装置。
6.4.2自行负担个人上网所支付的与此服务有关的电话费用、网络费用。
6.4.3基于我公司提供服务的重要性,用户同意:
1提供详尽、准确的个人资料。
2不断更新注册资料符合及时、详尽、准确的要求。
3牢记用户填写的注册资料、历史信息。
我公司在为用户提供相关客户服务的前提是用户能表明用户是账号的所有人,这可能需要用户提供相关信息(包括但不限于注册信息、历史密码等)。用户理解,如果用户不能提供准确完整的注册资料及相关历史信息、未及时更新相关注册资料或者相关的证据,将有可能导致我公司无法判断用户的身份,从而无法为提供密码找回等相关服务,而我公司对此不承担任何责任。如因用户提交的相关信息资料不真实、不准确、不完整、不合法从而导致我公司作出错误的判断的,我公司有权终止为用户提供服务并追究用户的法律责任。
6.5我公司保留通过本软件和相关的服务向用户投放商业性广告的权利。
\n
<text class="main-text-title">七、违约责任</text>
\n
7.1用户同意保障和维护我公司及其他用户的利益,如因用户违反有关法律、法规或本《协议》项下的任何条款而给我公司造成损害,用户同意承担由此造成的损害赔偿责任,该等责任包括但不限于给我公司造成的任何直接或间接损失。
7.2 如用户违反本《协议》、我公司发布的其他规则或者国家法律法规规定,则我公司有权作出独立的判断,立即撤销相关许可,终止为用户提供服务并通过各种合法途径追究用户的法律责任。
\n
<text class="main-text-title">八、法律管辖</text>
\n
8.1 本协议的订立、执行和解释及争议的解决均应适用中国法律。
8.2 如双方就本协议内容或其执行发生任何争议,双方应尽量友好协商解决;协商不成时,任何一方均应向本软件平台所在地的人民法院提起诉讼。
\n
<text class="main-text-title">九、通知和送达</text>
\n
本协议项下所有的通知均可通过重要页面公告、电子邮件或常规的信件传送等方式进行; 该通知于发送之日视为已送达收件人。
\n
<text class="main-text-title">十、 其他规定</text>
\n
10.1 本协议构成双方对本协议之约定事项及其他有关事宜的完整协议,除本协议规定的之外,未赋予本协议各方其他权利。
10.2 如本协议中的任何条款无论因何种原因完全或部分无效或不具有执行力,本协议的其余条款仍应有效并且有约束力。
</text>
</view>
</view>

@ -1 +1,52 @@
/* pages/home/me/yhsyxy/yhsyxy.wxss */ /* pages/home/me/yhsyxy/yhsyxy.wxss */
.user-container {
width: 100%;
height: 100%;
padding-top: 88rpx;
display: flex;
flex-direction: column;
}
.user-header {
position: relative;
width: 100%;
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
}
.header-reback{
position: absolute;
left: 20rpx;
width:48rpx;
height:48rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
}
.user-main {
flex: 1;
padding: 48rpx 64rpx;
overflow-y: scroll;
}
.main-title {
width: 100%;
margin-bottom: 46rpx;
color: #000000;
font-size: 36rpx;
text-align: center;
}
.main-text {
color: rgba(16, 16, 16, 1);
font-size: 24rpx;
}
.main-text-title {
font-weight: 700;
}

@ -15,13 +15,15 @@ Page({
}, },
go2Reback(){ go2Reback(){
wx.navigateBack({ changed: true }); wx.switchTab({
url: '/pages/home/me/indexx',
})
}, },
doExecYjfk(e){ doExecYjfk(e){
const contactWay = e.detail.value.contactWay; const contactWay = e.detail.value.contactWay;
if (!/^1[3456789]\d{9}$/.test(contactWay)) { if (!/^1[3456789]\d{9}$/.test(contactWay)) {
wx.showToast({ wx.showToast({
title: '手机号码', title: '请输入正确的手机号码',
icon: 'none' icon: 'none'
}); });
return; return;

@ -8,6 +8,12 @@ Page({
}, },
go2Reback(){
wx.switchTab({
url: '/pages/home/me/indexx',
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */

@ -1,4 +1,116 @@
<!--pages/home/me/ysxy/ysxy.wxml 隐私协议页面--> <!--pages/home/me/yhsyxy/yhsyxy.wxml 用户使用协议-->
<!--<web-view src="https://xzjl-api.windymuse.cn/"></web-view>--> <!-- 头部导航 -->
<view>跳转页面,待完善</view> <view class="user-container">
<view class="user-header">
<view class="header-reback" bindtap="go2Reback"></view>
<view>隐私协议</view>
</view>
<view class="user-main">
<view class="main-title">星座守护精灵 隐私协议</view>
<text class="main-text">
<text class="main-text-title">一、总则</text>
星座守护精灵 是北京蛋荚科技有限责任公司(以下简称“我们”)开发、运营和管理的工具类产品。我们非常重视用户个人信息的保护。您在使用我们的产品或服务时,我们可能会收集和使用您的相关信息。我们希望通过《隐私政策》(以下简称“本政策”)向您说明我们在收集和使用您相关个人信息时对应的处理规则等相关事宜,以便更好地保障您的权益。 请在使用星座守护精灵服务前仔细阅读本《隐私政策》。如果您进一步访问并使用星座守护精灵,则表示您了解并接受了本《隐私政策》中所述的全部内容,并同意受其约束。如果您不接受前述任何内容,请停止访问或使用星座守护精灵。
本政策旨在向您说明以下内容:
1. 总则
2. 权限申请及应用场景
3. 我们如何使用这些信息
4. 我们如何分享和披露用户信息
5. 我们如何保护用户信息
6. 如何收集、更新、变更、删除您的信息
7. Cookies及类似技术
8. 未成年人使用我们的服务
9. 本政策的适用范围
10. 本政策的更新
11. 如何联系我们
12. 第三方SDK说明
如您对本隐私政策或相关事宜有任何疑问,您可随时与我们联系。
<text class="main-text-title">二、权限申请及应用场景</text>
我们对于软件需要在用户使用设备上获取的权限非常严格和克制,在使用本应用过程中,我们会向您申请使用该功能所必须的权限,若您不同意开启该权限,请点击“我不同意”,拒绝该权限的申请仅将影响您对特定产品功能的使用。我们在此向您列举产品将可能申请的权限及其使用目的。
1无线连接为了便于用户WiFi状态下进行获取好友的动态本产品的基础功能便于知晓好友近况。
2定位权限当您需要使用定位功能并使用我们基于位置提供相关服务时我们需要收集位置信息以使得您不需要手动输入自身地理坐标就可获得相关服务。使用网络进行定位通过GPS或wifi等方式持续收集您的位置信息。您可以通过系统授权关闭定位功能停止我们对您位置信息的收集但之后您可能将无法使用相关服务或功能
3设备信息为了保证地图基础功能服务的正常运行向您提供问题诊断等服务并进行数据统计我们会收集您的网络设备MAC地址收集您的设备信息以便提供更适合的定制化服务例如向您展示相关程度更高的搜索结果、设备产商、设备型号、设备语言、设备名称、应用列表信息、操作系统和应用程序版本、分辨率、IMEI信息、IP地址、应用包名及版本、独立设备标识、访问日期和时间、软硬件特征信息等数据用于鉴别用户身份、记录系统故障和分析系统故障时产生的原因
4Android ID用于检测和防止欺诈活动鉴别用户身份、记录系统故障和分析系统故障时产生的原因检验用户行为是否为机器程序批量自动化操作判断提供相关依据信息脱敏处理后用来建立异常流量识别模型实现流量反欺诈技术。
5存储权限读取、存储将应用的图片及其他文件缓存/存储到手机上,以及读取一存储的图片及其他文件
6检索运行的应用为了让用户更好的体验服务丰富用户内容画像以及平台为用户内容拓展提供决策参考平台根据用户安装软件的偏好将会在用户每日第一次打开时收集用户已安装并运行的应用软件信息对正在运行中的应用程序进行针对性的优化启动速度。
7我们会从微信第三方获取您授权共享的账户信息头像、昵称、地区。登录后将您的第三方账户与星座守护精灵绑定使您可以通过第三方账户直接登录并使用我们的产品和服务。我们会将依据与第三方的约定、对个人信息来源的合法性进行确认后在符合相关法律和法规规定的前提下使用您的个人信息。
8日志信息你使用地图的搜索服务时我们的服务器会自动记录您的日志信息包括您输入的搜索关键词信息和您发布的报错信息、反馈信息、你上传的图片信息、您的IP地址、操作系统的版本、硬件设备信息、网络运营商的信息、使用时长、浏览记录、您对星座守护精灵呈现的推送信息的反馈、您下载和使用应用程序、您使用第三方平台的情况等方面的信息
<text class="main-text-title">三、我们如何使用这些信息</text>
对于我们收集或接收的有关您的信息,我们可能会用于多种目的,包括但不限于:
1、将您的公开信息进行汇总、分析以形成报告
2、处理您提交的咨询、订阅或定制服务或让您参与有关我们产品和服务的调查
3、管理会员资格及会员权益(如认证身份、管理会员账户、组织会员活动、发放会员福利等)
4、运营和改善星座守护精灵的服务(如设计并推广定制化的服务和产品、推送有针对性的资讯、提升用户体验、及时发现并解决星座守护精灵的技术问题、向您提供与您更加相关的广告以替代普遍投放的广告等)
5、对星座守护精灵进行推广(如对用户信息进行统计并制作反映用户分布及兴趣偏好总体状况等的分析报告、制作市场营销图表或其它营销材料,评估我们服务中的广告和其他促销及推广活动的效果,并加以改善),但我们会对该材料进行去个体识别化处理。
6、用于网络安全防范在我们提供服务时用于身份验证、客户服务、安全防范、诈骗监测、存档和备份用途确保我们向您提供的产品和服务的安全性
7、应用户特殊要求而提供特定服务时需要将信息提供给我们的关联公司、第三方或其他用户
8、其他有利于用户和星座守护精灵运营者利益且不违反任何强制性法律法规的情况。
<text class="main-text-title">四、我们如何分享和披露用户信息</text>
1、除非事先征得您的同意或符合本政策的相关规定我们不会向任何第三方提供、出售、出借、出租或分享用户信息也不允许任何第三方以任何手段查询、收集、编辑或传播我们收集或接收的用户信息。
2、我们会聘请第三方提供特定产品或服务如递送相关资讯、对用户信息进行统计分析、网站托管、邮件管理及网站统计分析等。为提供该等产品或服务之目的供应商将可能在其提供产品或服务所必须的范围内获得我们收集或接收的有关的用户信息。我们严格要求各供应商对其获得的用户信息保密并禁止其将该等用户信息用于提供相关产品或服务以外的任何其他目的。
3、同时我们会根据法律、行政或司法机关的决定、命令或要求来保留或分享用户信息。在我们认为分享用户信息对遵守相关的法律是必要的时候我们也会分享该些信息。此外若分享用户信息对于保护星座守护精灵、用户或其他方的权益是必要或适当的我们也会分享用户信息。
4、我们可能会将您的个人数据与我们的旗下产品共享以在旗下产品中提供更一致的体验和更优质的服务。我们保证其将按照本政策所示目的和要求对您的个人数据进行相应的处理。如旗下产品希望将您的个人数据用于本政策所载目的以外的其他目的我们将再次征得您的同意。
5、在如下情况下星座守护精灵可能会披露您的信息
1事先获得您的授权
2您使用共享功能
3根据法律、法规、法律程序的要求或政府主管部门的强制性要求
4以学术研究或公共利益为目的
5为维护星座守护精灵的合法权益例如查找、预防、处理欺诈或安全方面的问题
6符合相关服务条款或使用协议的规定。
<text class="main-text-title">五、我们如何保护用户信息</text>
1、我们将采取合理的技术措施和其它必要措施以确保用户信息的安全并努力防止用户信息泄露、丢失或遭受破坏。其中包括1使用加密技术来确保您的数据在传输过程中保持私密性2审查我们在收集、存储和处理信息方面的做法包括实体安全措施以防未经授权的人员访问我们的系统4所有因提供服务而必须接触个人信息的 星座守护精灵 员工、承包商和代理商等,都需要遵守合同中规定的严格保密义务,否则可将被处分或被解约。
2、尽管严格遵守法律法规要求的标准并已经采取了上述合理有效措施但由于技术的限制以及可能存在的各种恶意手段等我们无法控制的原因星座守护精灵无法始终保证信息绝对安全我们将尽力确保您提供给我们的个人信息的安全性。因此我们强烈建议您采取积极措施保护个人信息的安全包括但不限于使用复杂密码、定期修改密码、不将自己的账号密码等个人信息透露给他人。
3、我们会制定应急处理预案并在发生用户信息安全事件时立即应急预案努力阻止该等安全事件的影响和后果扩大。在不幸发生用户信息安全事件泄露、丢失等我们将按照法律法规的要求及时向您告知。同时我们还将按照监管部门要求上报个人信息安全事件的处置情况。
<text class="main-text-title">六、如何收集、更新、变更、删除您的数据和信息</text>
我们在提供服务的过程中可能会收集您的如下个人数据,这些数据对于本产品各项功能的实现至关重要。我们将使用这些数据来帮助我们开发和改进我们的产品,以提供更加优质的服务。我们将严格遵守本隐私政策所载明的目的来使用您的个人数据。当我们需要将数据用于本隐私政策未载明的目的时,或者将基于特定目的收集的个人信息用于其他目的时,我们会事先向您告知并征得您的同意。
1、本产品是具备完整的功能并提供丰富的内容和服务的工具产品。根据产品功能属性的不同我们将在不同场景下收集您不同类型的个人数据并为实现产品功能的需要进行使用。
2、为了严格遵守相关国家或地区的法律政策我们需要通过预激活服务来判断您所在的国家或地区。在预激活时我们会将您的IP地址、国家代码MCC、手机语言、系统版本等信息传到我们的服务器。这些信息只用于判断您所在的国家或地区从而为您提供符合该国家或地区的协议和服务。这些信息在完成判断后将在短时间内被删除不会永久保存。
3、目前我们支持手机号登陆与第三方账号登录即微信登陆当您使用微信登录时我们将会获取账号的昵称和头像相关信息。登陆后将您的第三方账户与星座守护精灵绑定使您可以通过第三方账户直接登陆并使用我们的产品和服务。我们将会依据与第三方的约定、对个人信息来源的合法性进行确认后在符合相关法律和法规规定的前提下使用您的个人信息。注销账号只需退出登录即可我们将会清除该账号的所有信息。
4、搜索功能是为了本产品所必需的基本功能。当您使用时我们会收集您的搜索关键字信息、日志记录等。
5、我们通过云服务接口为您提供了丰富的功能和服务比如垃圾清理、产品升级等。为了保证云服务的正常运行我们需要收集一些必要的数据主要包括应用包名、应用版本、应用安装时间等应用信息国家码、系统语言、系统时区等系统信息屏幕分辨率等设备信息运营商等网络信息。
6、您在使用我们的产品和服务时会被要求提供您真实的个人信息您应当对您所提供信息的真实性、合法性、有效性及完整性负责并及时更新和维护您的个人信息以保证信息的真实、合法和有效。您可以随时管理您的个人信息例如您的个人账户注册信息。您可以自行从 星座守护精灵 账号中删除您的内容或个人信息(若您之前已创建了会员账户),或要求我们删除或修改信息,例如您想要删除个人帐户,可以通过软件内的账号注销功能。
<text class="main-text-title">七、Cookies及类似技术</text>
1、Cookies是用户访问网站时存放于用户的计算机等设备中的小文件可被用于存储与您的计算机或设备绑定的唯一识别码以便用户在不同网站的不同浏览进程中被识别为同一个用户。Cookies提供了多种有用的功能例如可以用来记忆用户的密码或记录用户已经注册过的项目使用户在网站上的操作更加有效率。
2、我们可能通过Cookies收集用户信息。用户拥有完全的自主权自行设置浏览器以禁用或限用Cookies。但是该等设置可能导致用户无法登录或使用依赖于Cookie的星座守护精灵的某些服务或功能。
3、 我们还可能使用其他类似的技术例如beacons、flash cookies和HTML5本地存储等。这些技术与Cookies的相似之处在于他们均被存储于用户的设备中并可用于存储与用户的行为和偏好有关的信息。用户拥有完全的自主权自行设置以禁用或限用该等技术。同样该等设置可能导致用户无法登录或使用星座守护精灵的某些服务或功能。
<text class="main-text-title">八、未成年人使用我们的服务</text>
我们建议若您是18周岁以下的未成年人在使用我们的产品或服务前应事先取得其父母或监护人的同意并建议未成年人在提交的个人信息之前寻求父母或监护人的同意和指导。
<text class="main-text-title">九、本政策的适用范围</text>
本隐私政策适用于星座守护精灵及其关联公司提供的所有服务。但是不包括附有独立隐私政策的服务(如第三方提供的产品和服务)。请您注意,本隐私政策不适用于以下情况:
1、通过我们的服务而接入的第三方服务包括任何第三方网站收集的信息本隐私权政策不适用于第三方提供的产品和服务例如在于星座守护精灵上由第三方提供的产品和服务以及在我们的服务中链接到的其他网站这些产品、服务或网站会有独立的隐私政策予以规范请另行查阅相应的政策规定
2、通过在我们服务中进行广告服务的其他公司或机构所收集的信息。
<text class="main-text-title">十、本政策的更新</text>
1. 我们可能会不定期修改、更新本隐私政策,有关隐私政策的更新,我们会在 星座守护精灵 软件及网站中以通知公告等形式发布,您可以访问 星座守护精灵 软件及网站中查询最新版本的隐私政策。对于重大变更,我们会向您发出郑重通知(包括对于某些服务,我们会通过电子邮件发送通知,说明对隐私政策进行的更改)。
<text class="main-text-title">十一、如何联系我们</text>
北京蛋荚科技有限责任公司成立于2022年05月09日
我们的联系邮箱是eggpoder@gmail.com
如您对本政策存在任何问题或建议,或者您需要行使您的数据管理权力,对您的隐私数据进行管理,请随时联系我们。
<text class="main-text-title">十二、第三方SDK说明</text>
我们所接入的第三方 SDK 可能会调用您的设备权限、获取您的相关信息,以便您在不同的手机设备或第三方平台上正常使用相应功能,我们将这些具有个人信息手机功能的第三方 SDK 的名称、提供商、所提供的功能 / 服务隐私政策链接、收集个人信息类型,按照实现功能 / 服务的类别划分说明如下:
12.1. 我们对接入的相关第三方SDK在目录中列明
请注意第三方SDK可能因为其版本升级、策略调整等原因导致数据处理类型存在一定变化请以第三方SDK公示的隐私政策为准。具体如下
12.1.1. 微信开放平台
公司信息:深圳市腾讯计算机系统有限公司
获取信息以及目的:提供第三方登录分享服务;
微信公众平台服务协议:
https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncement&key=
1503979103&version=1&lang=zh_CN&platform=2
12.1.2. 支付宝
公司名称:支付宝(中国)网络技术有限公司
用途目的:用于集成支付宝支付功能及生成设备标识
隐私政策https://opendocs.alipay.com/open/54/01g6qm
</text>
</view>
</view>

@ -1 +1,53 @@
/* pages/home/me/ysxy/ysxy.wxss */ /* pages/home/me/ysxy/ysxy.wxss *//* pages/home/me/yhsyxy/yhsyxy.wxss */
.user-container {
width: 100%;
height: 100%;
padding-top: 88rpx;
display: flex;
flex-direction: column;
}
.user-header {
position: relative;
width: 100%;
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
}
.header-reback{
position: absolute;
left: 20rpx;
width:48rpx;
height:48rpx;
background-repeat: no-repeat;
background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/reback.png);
}
.user-main {
flex: 1;
width: 100%;
padding: 48rpx 64rpx;
overflow-y: scroll;
}
.main-title {
width: 100%;
margin-bottom: 46rpx;
color: #000000;
font-size: 36rpx;
text-align: center;
}
.main-text {
color: rgba(16, 16, 16, 1);
font-size: 24rpx;
}
.main-text-title {
font-weight: 700;
}

@ -8,40 +8,98 @@ Page({
*/ */
data: { data: {
visible:false, visible:false,
image: [] image: ''
}, },
go2Reback(){ go2Reback(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/lindex/lindex' url: '/pages/home/xx/lindex/lindex'
}) })
}, },
go2Xz(){ go2Xz(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/hy/index' url: '/pages/home/xx/hy/index'
}) })
}, },
go2Yx(){ go2Yx(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/hy/yx/yx' url: '/pages/home/xx/hy/yx/yx'
}) })
}, },
go2Hx(){ go2Hx(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/hy/hx/hx' url: '/pages/home/xx/hy/hx/hx'
}) })
}, },
go2Zt(){ go2Zt(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/hy/zt/zt' url: '/pages/home/xx/hy/zt/zt'
}) })
}, },
blockClick(e){ blockClick(e){
console.log(e.target.dataset.url); console.log(e.target.dataset.url);
const url = e.currentTarget.dataset.url
const arr = url.split("/"); // 将链接按照 / 分割成数组
const last = arr[arr.length - 1]; // 取得数组中的最后一个元素
const num = last.split("?")[0]; // 将最后一个元素按照 ? 分割成数组,取得倒数第二个元素
console.log(num); // 输出 128
this.setData({ this.setData({
visible: true, visible: true,
image: [e.target.dataset.url] image: e.target.dataset.url,
resourceId:num
}) })
}, },
downloadBtn(){
wx.downloadFile({
url: this.data.image,
success: (res) => {
if (res.statusCode === 200) {
const tempFilePath = res.tempFilePath;
console.log('下载图片成功', tempFilePath);
// 在这里可以使用 tempFilePath 进行后续操作,比如保存到相册
this.downloadImg(tempFilePath)
} else {
console.log('下载图片失败', res);
}
},
fail: function (err) {
console.log('下载图片失败', err);
}
});
},
// 保存图片
downloadImg(src){
wx.authorize({
scope: 'scope.writePhotosAlbum',
success: () => {
// 用户已经同意授权
// 在这里调用保存图片的代码
wx.saveImageToPhotosAlbum({
filePath: src,
success: (res) => {
console.log('保存图片成功', res);
wx.showToast({
title: '保存成功',
icon: 'success',
duration: 2000
});
this.setData({visible: false})
},
fail: (err) => {
console.log('保存图片失败', err);
wx.showToast({
title: '保存失败',
icon: 'none',
duration: 2000
});
}
});
},
fail() {
// 用户拒绝授权或尚未授权
// 可以在这里给出提示或引导用户打开设置页面进行授权
}
});
},
onClose(){ onClose(){
this.setData({visible: false}) this.setData({visible: false})
}, },
@ -58,14 +116,26 @@ Page({
delBtnHx(){ delBtnHx(){
const hxlist = this.data.hxlist const hxlist = this.data.hxlist
const id = hxlist.find(item => item.resourceId == this.data.resourceId).id const id = hxlist.find(item => item.resourceId == this.data.resourceId).id
const isSelf = hxlist.find(item => item.resourceId == this.data.resourceId).isSelf
console.log(id); console.log(id);
if (isSelf) {
req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => { req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => {
console.log(res); console.log(res);
if (res.data.code === 200) { if (res.data.code === 200) {
this.getList() this.getList()
this.setData({delKey: ''}) this.setData({delKey: '', visible:false})
wx.showToast({
title:'删除成功',
icon: 'success'
})
} }
}) })
}else {
wx.showToast({
title:'只能删除自己的回忆',
icon: 'none'
})
}
}, },
closeViewer(){this.setData({visible: false})}, closeViewer(){this.setData({visible: false})},
getList(){ getList(){
@ -73,6 +143,7 @@ Page({
limit:-1, limit:-1,
type: 'graphic' type: 'graphic'
}).then(res => { }).then(res => {
// 过滤情侣发送的图片
const list = res.data.data.records const list = res.data.data.records
list.forEach(item => { list.forEach(item => {
// 将时间字符串转为Date对象 // 将时间字符串转为Date对象
@ -91,7 +162,6 @@ Page({
const treeData = list.reduce((result, item) => { const treeData = list.reduce((result, item) => {
const group = result.find(group => group.createdAt === item.createdAt); const group = result.find(group => group.createdAt === item.createdAt);
if (group) { if (group) {
// group.list.push(item.resourceId);
group.list.push(`https://xzjl-api.windymuse.cn/api/resource/${item.resourceId}?k=${item.fromUserid}`); group.list.push(`https://xzjl-api.windymuse.cn/api/resource/${item.resourceId}?k=${item.fromUserid}`);
} else { } else {
result.push({ result.push({
@ -102,7 +172,7 @@ Page({
return result; return result;
}, []); }, []);
console.log(treeData); // console.log(treeData);
this.setData({list: treeData}) this.setData({list: treeData})
}) })

@ -1,7 +1,9 @@
<!--pages/home/xx/hy/xz/zt.wxml--> <!--pages/home/xx/hy/xz/zt.wxml-->
<!--返回图标--> <!--返回图标-->
<view class="header">
<view class="reback" bindtap="go2Reback"></view> <view class="reback" bindtap="go2Reback"></view>
<view class="title">画像</view> <view class="title">画像</view>
</view>
<view class="body"> <view class="body">
<view class="block" wx:for="{{list}}" wx:key="index"> <view class="block" wx:for="{{list}}" wx:key="index">
@ -18,18 +20,18 @@
</view> </view>
<!-- 图片预览 --> <!-- 图片预览 -->
<!-- <view class="viewer" wx:if="{{visible}}" bindtap="closeViewer"> <view class="viewer" wx:if="{{visible}}" bindtap="closeViewer">
<image src="{{image}}" scaleToFill/> <image src="{{image}}" mode="widthFix"/>
<view class="viewer-btn"> <view class="viewer-btn">
<view class="btn" bindtap="delBtn">删除</view> <view class="btn" bindtap="delBtnHx">删除</view>
<view class="btn">保存</view> <view class="btn" catchtap="downloadBtn">保存</view>
</view>
</view> </view>
</view> --> <!-- <t-image-viewer
<t-image-viewer
visible="{{visible}}" visible="{{visible}}"
images="{{image}}" images="{{image}}"
bind:close="onClose" bind:close="onClose"
/> /> -->
<!--星讯聊天下方菜单栏--> <!--星讯聊天下方菜单栏-->
<view class="xfgjl" > <view class="xfgjl" >

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

@ -10,32 +10,50 @@ Page({
list: [] list: []
}, },
go2Reback(){ go2Reback(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/lindex/lindex' url: '/pages/home/xx/lindex/lindex'
}) })
}, },
go2Xz(){ go2Xz(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/hy/index' url: '/pages/home/xx/hy/index'
}) })
}, },
go2Yx(){ go2Yx(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/hy/yx/yx' url: '/pages/home/xx/hy/yx/yx'
}) })
}, },
go2Hx(){ go2Hx(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/hy/hx/hx' url: '/pages/home/xx/hy/hx/hx'
}) })
}, },
go2Zt(){ go2Zt(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/hy/zt/zt' url: '/pages/home/xx/hy/zt/zt'
}) })
}, },
delLetter(){ delLetter(e){
console.log('删除'); const id = e.currentTarget.dataset.item.id
const isSelf = e.currentTarget.dataset.item.isSelf
if (isSelf) {
req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => {
console.log(res);
if (res.data.code === 200) {
wx.showToast({
title: '删除成功',
icon: 'success'
})
this.getList()
}
})
}else{
wx.showToast({
title: '只能删除自己的信札',
icon: 'none'
})
}
}, },
getList(){ getList(){
req.getRequest('/api/user/curt/message/lover',{ req.getRequest('/api/user/curt/message/lover',{
@ -55,8 +73,12 @@ Page({
const minute = date.getMinutes(); const minute = date.getMinutes();
const second = date.getSeconds(); const second = date.getSeconds();
// 补零
const formattedHours = hour < 10 ? `0${hour}` : hour
const formattedMinutes = minute < 10 ? `0${minute}` : minute
// 格式化时间 // 格式化时间
const formattedDate = `${year}${month}${day}${hour}:${minute}`; const formattedDate = `${year}${month}${day}${formattedHours}:${formattedMinutes}`;
item.createdAt = formattedDate item.createdAt = formattedDate
}) })
@ -65,12 +87,20 @@ Page({
}) })
}, },
getLoveInfo(){ getLoveInfo(){
req.getRequest('/api/user/curt/lover',{}).then(res => { const userInfo = wx.getStorageSync('xinyuan-userInfo')
console.log(res); const loveInfo = wx.getStorageSync('xinyuan-userLoveInfo')
this.setData({ this.setData({
avatar: res.data.data.avatar, myAvatar: userInfo.avatar,
nick: res.data.data.nick loveAvatar: loveInfo.avatar,
myNick: userInfo.nick,
loveNick: loveInfo.nick
}) })
},
getMsgDetail(e){
const id = e.currentTarget.dataset.id
wx.redirectTo({
url: '/pages/xz/index?id=' + id + '&hy=1'
}) })
}, },
@ -93,7 +123,6 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
}, },
/** /**

@ -1,7 +1,9 @@
<!--pages/home/xx/hy/index.wxml--> <!--pages/home/xx/hy/index.wxml-->
<!--返回图标--> <!--返回图标-->
<view class="header">
<view class="reback" bindtap="go2Reback"></view> <view class="reback" bindtap="go2Reback"></view>
<view class="title">信札</view> <view class="title">信札</view>
</view>
<!-- 中间主体 --> <!-- 中间主体 -->
<view class="main"> <view class="main">
@ -9,16 +11,18 @@
<t-swipe-cell wx:for="{{ list }}" wx:key="index"> <t-swipe-cell wx:for="{{ list }}" wx:key="index">
<view class="main-item"> <view class="main-item">
<view class="item-left"> <view class="item-left">
<view class="item-left"><image src="{{avatar}}" /></view> <view class="item-left">
<image src="{{item.isSelf ? myAvatar : loveAvatar}}" />
</view>
</view> </view>
<view class="item-text"> <view class="item-text">
<view class="item-text-name">昵称七个字昵称</view> <view class="item-text-name">{{item.isSelf ? myNick : loveNick}}</view>
<view class="item-text-time"> {{item.createdAt}} </view> <view class="item-text-time"> {{item.createdAt}} </view>
</view> </view>
<view class="item-right"> <view class="item-right" data-id="{{item.id}}" bindtap="getMsgDetail">
</view> </view>
</view> </view>
<view slot="right" class="delete-btn" bindtap="delLetter">删除</view> <view slot="right" data-item="{{item}}" class="delete-btn" bindtap="delLetter">删除</view>
</t-swipe-cell> </t-swipe-cell>
</view> </view>

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

@ -7,35 +7,39 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
userInfo:{},
isPlay: true
}, },
go2Reback(){ go2Reback(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/lindex/lindex' url: '/pages/home/xx/lindex/lindex'
}) })
}, },
go2Xz(){ go2Xz(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/hy/index' url: '/pages/home/xx/hy/index'
}) })
}, },
go2Yx(){ go2Yx(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/hy/yx/yx' url: '/pages/home/xx/hy/yx/yx'
}) })
}, },
go2Hx(){ go2Hx(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/hy/hx/hx' url: '/pages/home/xx/hy/hx/hx'
}) })
}, },
go2Zt(){ go2Zt(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/hy/zt/zt' url: '/pages/home/xx/hy/zt/zt'
}) })
}, },
delLetter(e){ delLetter(e){
const id = e.target.dataset.id const id = e.target.dataset.item.id
const isSelf = e.target.dataset.item.isSelf
console.log(isSelf,'1111');
if (isSelf) {
req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => { req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => {
console.log(res); console.log(res);
if(res.data.code === 200){ if(res.data.code === 200){
@ -45,12 +49,20 @@ Page({
this.getList() this.getList()
} }
}) })
}else {
console.log('只能删除自己消息');
wx.showToast({
title: '只能删除自己的回忆',
icon: 'none'
})
}
}, },
getList(){ getList(){
req.getRequest('/api/user/curt/message/lover',{ req.getRequest('/api/user/curt/message/lover',{
limit:-1, limit:-1,
type: 'audio' type: 'audio'
}).then(res => { }).then(res => {
console.log(res);
const list = res.data.data.records const list = res.data.data.records
list.forEach(item => { list.forEach(item => {
// 将时间字符串转为Date对象 // 将时间字符串转为Date对象
@ -63,9 +75,12 @@ Page({
const hour = date.getHours(); const hour = date.getHours();
const minute = date.getMinutes(); const minute = date.getMinutes();
const second = date.getSeconds(); const second = date.getSeconds();
// 补零
const formattedHours = hour < 10 ? `0${hour}` : hour
const formattedMinutes = minute < 10 ? `0${minute}` : minute
// 格式化时间 // 格式化时间
const formattedDate = `${year}${month}${day}${hour}:${minute}`; const formattedDate = `${year}${month}${day}${formattedHours}:${formattedMinutes}`;
item.createdAt = formattedDate item.createdAt = formattedDate
}) })
console.log(list); console.log(list);
@ -81,12 +96,32 @@ Page({
}) })
}) })
}, },
// 播放音频
playAudio(e){
if (this.data.isPlay) {
this.setData({isPlay: false})
const resourceId = e.currentTarget.dataset.item.resourceId
const id = this.data.userInfo.id
const playSrc = `https://xzjl-api.windymuse.cn/api/resource/${resourceId}?k=${id}`
const innerAudioContext = wx.createInnerAudioContext()
innerAudioContext.src = playSrc
innerAudioContext.play()
console.log('22222');
innerAudioContext.onEnded(() => {
console.log('111');
this.setData({isPlay: true})
})
}
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.getList() this.getList()
this.getLoveInfo() this.getLoveInfo()
this.setData({
userInfo: wx.getStorageSync('xinyuan-userInfo')
})
}, },
/** /**

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

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

@ -7,39 +7,52 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
showZt: false,
msgZt: '',
userInfo: {}
}, },
go2Reback(){ go2Reback(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/lindex/lindex' url: '/pages/home/xx/lindex/lindex'
}) })
}, },
go2Xz(){ go2Xz(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/hy/index' url: '/pages/home/xx/hy/index'
}) })
}, },
go2Yx(){ go2Yx(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/hy/yx/yx' url: '/pages/home/xx/hy/yx/yx'
}) })
}, },
go2Hx(){ go2Hx(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/hy/hx/hx' url: '/pages/home/xx/hy/hx/hx'
}) })
}, },
go2Zt(){ go2Zt(){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/hy/zt/zt' url: '/pages/home/xx/hy/zt/zt'
}) })
}, },
delLetter(e){ delLetter(e){
const id = e.target.dataset.id const id = e.target.dataset.item.id
const isSelf = e.target.dataset.item.isSelf
if (isSelf) {
req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => { req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => {
console.log(res, '删除成功'); wx.showToast({
title: '删除成功',
icon: 'success'
})
this.getList() this.getList()
}) })
}else {
wx.showToast({
title: '只能删除自己的回忆',
icon: 'none'
})
}
}, },
getList(){ getList(){
req.getRequest('/api/user/curt/message/lover',{ req.getRequest('/api/user/curt/message/lover',{
@ -59,8 +72,12 @@ Page({
const minute = date.getMinutes(); const minute = date.getMinutes();
const second = date.getSeconds(); const second = date.getSeconds();
// 补零
const formattedHours = hour < 10 ? `0${hour}` : hour
const formattedMinutes = minute < 10 ? `0${minute}` : minute
// 格式化时间 // 格式化时间
const formattedDate = `${year}${month}${day}${hour}:${minute}`; const formattedDate = `${year}${month}${day}${formattedHours}:${formattedMinutes}`;
item.createdAt = formattedDate item.createdAt = formattedDate
}) })
@ -78,12 +95,26 @@ Page({
}) })
}, },
readingNote(e){
console.log(e.currentTarget.dataset.content);
this.setData({
showZt: true,
msgZt: e.currentTarget.dataset.content
})
},
closeRead(){
this.setData({showZt: false})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.getList() this.getList()
this.getLoveInfo() this.getLoveInfo()
this.setData({
userInfo: wx.getStorageSync('xinyuan-userInfo')
})
}, },
/** /**

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

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

@ -12,7 +12,10 @@ Page({
loverInfo:{}, loverInfo:{},
hasLover:false,// 是否单身 hasLover:false,// 是否单身
userInfo:{}, userInfo:{},
Send:false Send:false,
SendScs:false,
isBoundLove: false,
mac:''
}, },
closeSend(){ closeSend(){
@ -38,38 +41,83 @@ Page({
}) })
}, },
doQueryInit(){ doQueryInit(){
req.getRequest('/api/user/curt',{}).then((res)=>{ // 获取个人信息
if(res.data.code==200){ req.getRequest('/api/user/curt',{}).then(res => {
this.setData({hasLover:res.data.data.hasLover}) if (res.data.code === 200) {
this.setData({userInfo:res.data.data}) const userInfo = res.data.data
if(res.data.data.hasLover){
wx.navigateTo({ // 是单身显示当前页面
url: '/pages/home/xx/lindex/lindex' if (!userInfo.hasLover) {
}) this.setData({hasLover: true})
} }
// 绑定情侣判断
if (this.data.mac) {
if (userInfo.hasLover) {
return this.setData({isBoundLove:true})
}else{
return this.bandingLove()
} }
}).catch((err)=>{ }
console.log(err);
// 是情侣页面跳转
if (userInfo.hasLover) {
wx.redirectTo({
url: '/pages/home/xx/lindex/lindex'
}) })
}
req.getRequest('/api/user/curt/lover',{}).then((res)=>{ this.setData({
if(res.data.code==200){ userInfo: userInfo
this.setData({loverInfo:res.data.data}) })
} }
}).catch((err)=>{
console.log(err);
}) })
},
///api/user/curt/lover // 关闭分享成功弹层
closeScsBtn(){
this.setData({
SendScs: false
})
},
closeBoundLove(){
this.setData({
isBoundLove:false,
mac: ''
})
wx.switchTab({
url: '/pages/home/jl/index'
})
},
// 绑定情侣
bandingLove(){
req.patchRequest('/api/user/curt/lover/binding',{
mac: this.data.mac
}).then(res => {
this.setData({mac: ''}),
wx.switchTab({
url: '/pages/home/jl/index'
})
})
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
// 获取绑定情侣的mac
if (options.mac) {
// 判断是否登入
const token = wx.getStorageSync('token')
if (token) {
this.setData({mac : options.mac})
}else{
wx.redirectTo({
url: '/pages/index/index?loveMac=' + options.mac
})
}
}
this.doQueryInit() this.doQueryInit()
}, },
@ -119,11 +167,33 @@ Page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {
const mac = wx.getStorageSync('mac-key')
console.log(mac,'111');
this.setData({
Send: false,
SendScs: true
})
return {
path: '/pages/home/xx/index?mac=' + mac
}
}, },
toSend(){ toSend(){
wx.navigateTo({ // 获取信札 有内容跳转到预览页面 没有跳转编辑页面
url: 'xz/xz' req.getRequest('/api/user/curt/letter',{}).then(res => {
console.log(res);
if (res.data.code === 200) {
// 判断是否空信札
if (res.data.data.isEmpty) {
wx.redirectTo({
url: '/pages/home/xx/xz/xz'
})
}else{
console.log('2222222');
wx.redirectTo({
url: '/pages/xz/index?open=' + true
})
}
}
}) })
} }
}) })

@ -1,5 +1,5 @@
<!--pages/home/xx/index.wxml--> <!--pages/home/xx/index.wxml-->
<view class="bkg" wx:if="{{!hasLover}}"> <view class="bkg" wx:if="{{hasLover}}">
<view class="xzt"></view> <view class="xzt"></view>
<view class="fgx"></view> <view class="fgx"></view>
<view class="xzbtn" bindtap="toSend"></view> <view class="xzbtn" bindtap="toSend"></view>
@ -24,3 +24,32 @@
<button open-type="share" class="btn">发送</button> <button open-type="share" class="btn">发送</button>
</view> </view>
</view> </view>
<!-- 发送绑定情侣成功 -->
<view class="openSend" wx:if="{{SendScs}}">
<view class="openSend-main">
<view class="openSend-main-img">
</view>
<view class="openSend-main-text1">发送成功</view>
<view class="openSend-main-text4">对方同意后</view>
<view class="openSend-main-text5">请刷新小程序查看</view>
</view>
<view class="openSend-btn">
<button class="btn" bindtap="closeScsBtn">好的</button>
</view>
</view>
<!-- 已绑定情侣弹层 -->
<view class="openSend" wx:if="{{isBoundLove}}">
<view class="openSend-main">
<view class="openSend-main-img">
</view>
<view class="openSend-main-text6">您已绑定情侣</view>
<view class="openSend-main-text7">不可多次绑定</view>
<view class="openSend-main-text8">需要绑定其他人</view>
<view class="openSend-main-text9">需要先与当前用户解绑</view>
</view>
<view class="openSend-btn">
<button class="btn" bindtap="closeBoundLove">好的</button>
</view>
</view>

@ -559,14 +559,15 @@ font-family: SourceHanSansSC-regular;
height: 70rpx; height: 70rpx;
border-radius: 20rpx; border-radius: 20rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%); background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1); border: 6rpx solid rgba(255, 255, 255, 1);
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
color: #fff; color: #fff;
margin: 0; margin: 0;
box-sizing: border-box; box-sizing: border-box;
font-size: 28rpx;
} }
.openSend-main-text1 { .openSend-main-text1 {
@ -596,3 +597,59 @@ font-family: SourceHanSansSC-regular;
align-items: center; align-items: center;
margin-top: 20rpx; margin-top: 20rpx;
} }
.openSend-main-text4 {
color: rgba(108, 108, 108, 1);
font-size: 36rpx;
display: flex;
justify-content: center;
align-items: center;
margin-top: 120rpx;
}
.openSend-main-text5 {
color: rgba(108, 108, 108, 1);
font-size: 36rpx;
display: flex;
justify-content: center;
align-items: center;
margin-top: 20rpx;
}
.openSend-main-text6 {
width: 100%;
display: flex;
justify-content: center;
color: rgba(248, 99, 42, 1);
font-size: 24px;
margin-top: 80rpx;
font-weight: 700;
}
.openSend-main-text7 {
width: 100%;
display: flex;
justify-content: center;
color: rgba(248, 99, 42, 1);
font-size: 24px;
margin-top: 10rpx;
font-weight: 700;
}
.openSend-main-text8 {
color: rgba(108, 108, 108, 1);
font-size: 36rpx;
display: flex;
justify-content: center;
align-items: center;
margin-top: 42rpx;
}
.openSend-main-text9 {
color: rgba(108, 108, 108, 1);
font-size: 36rpx;
display: flex;
justify-content: center;
align-items: center;
margin-top: 10rpx;
}

@ -36,24 +36,26 @@ Page({
ztVisible:false,//写纸条弹窗 ztVisible:false,//写纸条弹窗
messages:[], messages:[],
loverInfo:{}, loverInfo:{},
hasLover:false,// 是否单身 userInfo:{},
userInfo:{} savePicture: false, // 保存图片成功
soundData:{}, //音频数据
userImg: '', //用户默认头像
loveImg: '', //情侣默认头像
chatHeight:0
}, },
doLuYINBoF(e){ doLuYINBoF(e){
console.log(e.currentTarget.dataset.tp);
// 判断点击的是否为对方的语音 // 判断点击的是否为对方的语音
if(e.currentTarget.dataset.item){ if(e.currentTarget.dataset.item){
const id = e.currentTarget.dataset.item.id const id = e.currentTarget.dataset.item.id
console.log(id);
// 改变语音状态 // 改变语音状态
req.patchRequest(`/api/user/curt/message/${id}/read`,{}).then(res => { req.patchRequest(`/api/user/curt/message/${id}/read`,{}).then(res => {
console.log(res); console.log(res,'已读语音');
}) })
} }
//先判断是开是关 //先判断是开是关
if(!e.currentTarget.dataset.bf){//此时点击为关闭 if(!e.currentTarget.dataset.bf){
//设置当前状态为关闭,并关闭
this.setData({['messages['+e.currentTarget.dataset.index+'].extra.isBf']:false}) this.setData({['messages['+e.currentTarget.dataset.index+'].extra.isBf']:false})
this.data.innerAudioContext.stop() // 关闭
}else{//此时点击为开启 }else{//此时点击为开启
// 先设置全部为false // 先设置全部为false
for(var i =0;i<this.data.messages.length;i++){ for(var i =0;i<this.data.messages.length;i++){
@ -61,18 +63,10 @@ Page({
} }
//先停止 //先停止
this.data.innerAudioContext.stop() this.data.innerAudioContext.stop()
const innerAudioContext = wx.createInnerAudioContext({
useWebAudioImplement: false
})
this.data.innerAudioContext.src = e.currentTarget.dataset.tp this.data.innerAudioContext.src = e.currentTarget.dataset.tp
this.setData({['messages['+e.currentTarget.dataset.index+'].extra.isBf']:true}) this.setData({['messages['+e.currentTarget.dataset.index+'].extra.isBf']:true})
this.data.innerAudioContext.play() // 播放 this.data.innerAudioContext.play() // 播放
// 此时需要向对应的item赋值
//innerAudioContext.pause() // 暂停
// innerAudioContext.stop() // 停止
this.data.innerAudioContext.onEnded((res)=>{ this.data.innerAudioContext.onEnded((res)=>{
this.setData({['messages['+e.currentTarget.dataset.index+'].extra.isBf']:false}) this.setData({['messages['+e.currentTarget.dataset.index+'].extra.isBf']:false})
}) })
@ -161,34 +155,33 @@ Page({
}) })
}, },
// 发送录音
do2FsLuyin(){
if (!this.data.luYinStatus || this.data.luYinStatus === 1) {
do2FsLuyin(){/**发送录音按钮 */ return console.log('录音还未结束');
this.data.RM.stop(); }
console.log('发送录音') console.log('发送录音')
this.setData({luyinVisible:false}) this.setData({luyinVisible:false})
let tt= this let tt= this
this.data.RM.onStop((res)=>{
//录音时长判断 //录音时长判断
console.log('发送录音了1111。。') console.log('发送录音了1111。。')
// 先计算分钟 // 先计算分钟
let fz = 0 let fz = 0
let mz = 0 let mz = 0
let hm = 0 let hm = 0
if(res.duration>=60*1000){ if(this.data.soundData.duration>=60*1000){
fz = Math.floor(res.duration/(60*1000)) fz = Math.floor(this.data.soundData.duration/(60*1000))
} }
if(res.duration>=1000){ if(this.data.soundData.duration>=1000){
mz = Math.floor((res.duration-fz*60*1000)/(1000)) mz = Math.floor((this.data.soundData.duration-fz*60*1000)/(1000))
} }
hm = res.duration - fz*60*1000-mz*1000 hm = this.data.soundData.duration - fz*60*1000-mz*1000
let sec = Math.floor(res.duration/1000) let sec = Math.floor(this.data.soundData.duration/1000)
let ssec = fz+'\''+mz+'\'\'' let ssec = fz+'\''+mz+'\'\''
console.log(ssec) console.log(ssec)
wx.uploadFile({ wx.uploadFile({
url: 'https://xzjl-api.windymuse.cn/api/resource', url: 'https://xzjl-api.windymuse.cn/api/resource',
filePath: res.tempFilePath, filePath: this.data.soundData.tempFilePath,
name: 'file', name: 'file',
header: { header: {
'Authorization': wx.getStorageSync('token'), 'Authorization': wx.getStorageSync('token'),
@ -213,25 +206,22 @@ Page({
console.log(err); console.log(err);
}) })
}, },
fail(res) { fail(res) {
showToast('图片上传失败'); showToast('图片上传失败');
} }
}) })
console.log(res)//这里是必须写完成事件的,因为最后的文件,就在这里面;
res.tempFilePath;//是临时的文件地址
res.duration;//录音的时长
res.fileSize;//文件的大小
})
}, },
doStopLuyin(){ doStopLuyin(){
this.setData({luYinStatus:2}) this.setData({luYinStatus:2})
clearInterval(this.data.timer) clearInterval(this.data.timer)
console.log('结束录音') console.log('结束录音')
this.data.RM.pause() this.data.RM.stop()
this.data.RM.onStop(res => {
console.log(res);
const innerAudioContext = wx.createInnerAudioContext()
innerAudioContext.src = res.tempFilePath
this.setData({soundData: res, innerAudio:innerAudioContext})
})
}, },
doStartLuyin(){ doStartLuyin(){
this.setData({RM:wx.getRecorderManager()}) this.setData({RM:wx.getRecorderManager()})
@ -251,6 +241,18 @@ Page({
this.data.timer = setInterval(this.counter,50) this.data.timer = setInterval(this.counter,50)
// 开始定时器 // 开始定时器
}, },
// 试听
doListen(){
this.setData({luYinStatus:3})
console.log('试听');
this.data.innerAudio.play() // 播放
},
// 结束试听
doStopListen(){
this.setData({luYinStatus:0})
this.data.innerAudio.stop() // 播放
},
counter:function(){ counter:function(){
let second = this.data.second let second = this.data.second
@ -305,13 +307,8 @@ Page({
this.setData({dsQTime:this.data.dsQTime+this.data.second+1}) this.setData({dsQTime:this.data.dsQTime+this.data.second+1})
console.log(this.data.dsQTime) console.log(this.data.dsQTime)
}, },
allTap(){
this.popover.onHide();
},
// 响应popover组件中的子元素点击事件
doDelXiaoxi(){ doDelXiaoxi(){
req.deleteRequest('/api/user/curt/message/'+this.data.delId,{}).then((res)=>{ req.deleteRequest('/api/user/curt/message/'+this.data.delId,{}).then((res)=>{
this.popover.onHide();
if(res.data.code==200){ if(res.data.code==200){
wx.showToast({ wx.showToast({
title: '删除消息成功', title: '删除消息成功',
@ -337,38 +334,51 @@ Page({
title: '你点击了A', title: '你点击了A',
icon: 'none' icon: 'none'
}); });
// 调用自定义组件 popover 中的 onHide 方法
this.popover.onHide();
}, },
// 删除消息
changAn(e){ changAn(e){
if(!this.popover){ const id = e.currentTarget.dataset.id
this.popover = this.selectComponent('#popover'); this.setData({delId:id})
},
// 关闭删除消息弹层
closeDel(){
this.setData({delId: 0})
},
deleteMsg(){
console.log(this.data.delId);
if (this.data.delId === -1) {
wx.showToast({
title: '该信札不允许删除',
icon: 'none'
})
return this.setData({delId: 0})
} }
console.log('执行了长按。。。')// +e.currentTarget.dataset['index'] req.deleteRequest(`/api/user/curt/message/${this.data.delId}`,{}).then(res => {
console.log(e.currentTarget.dataset['id']) console.log(res);
this.setData({delId:e.currentTarget.dataset['id']}) if (res.data.code === 200) {
wx.showToast({
// 获取按钮元素的坐标信息 title: '删除成功',
let id = 'button'// 或者 e.target.id 获取点击元素的 ID 值 icon: 'success'
console.log(e.currentTarget.dataset['index']) })
wx.createSelectorQuery().select('#' + e.currentTarget.dataset['index']).boundingClientRect(res => { this.doMessageInfo()
// 调用自定义组件 popover 中的 onDisplay 方法 }else {
this.popover.onDisplay(res); wx.showToast({
}).exec(); title: '删除失败',
icon: 'error'
})
}
})
}, },
go2BcPic(){/**保存图片 */ go2BcPic(){/**保存图片 */
let that= this; let that= this;
wx.downloadFile({ wx.downloadFile({
url: that.data.imgPicUrl,//图片的地址 url: that.data.imgPicUrl,//图片的地址
success:function(res){ success:(res) => {
const tempFilePath = res.tempFilePath //通过res中的tempFilePath 得到需要下载的图片地址 const tempFilePath = res.tempFilePath //通过res中的tempFilePath 得到需要下载的图片地址
wx.saveImageToPhotosAlbum({ wx.saveImageToPhotosAlbum({
filePath: tempFilePath, //设置下载图片的地址 filePath: tempFilePath, //设置下载图片的地址
success:function(){ success:() => {
wx.showToast({ this.setData({savePicture: true})
title: '保存图片成功',
})
} }
}) })
} }
@ -377,22 +387,25 @@ Page({
}, },
go2Reback1(){ go2Reback1(){
//wx.navigateBack({ changed: true }); //wx.navigateBack({ changed: true });
this.setData({dkTpVisible:false}) this.setData({dkTpVisible:false,savePicture:false})
}, },
go2Reback(){ go2Reback(){
wx.switchTab({ wx.reLaunch({
url: '/pages/home/xy/index', url: '/pages/home/jl/index',
}) })
}, },
go2SeeHxDetail(e){ go2SeeHxDetail(e){
console.log(e,'1111');
this.setData({imgPicUrl:e.currentTarget.dataset.tp}) this.setData({imgPicUrl:e.currentTarget.dataset.tp})
this.setData({dkTpVisible:true}) this.setData({dkTpVisible:true})
console.log(e.currentTarget.dataset.tp) console.log(e.currentTarget.dataset.tp)
console.log('查看图片详情') console.log('查看图片详情')
const id = e.currentTarget.dataset.id const id = e.currentTarget.dataset.id
if (id) {
req.patchRequest(`/api/user/curt/message/${id}/read`,{}).then(res => { req.patchRequest(`/api/user/curt/message/${id}/read`,{}).then(res => {
console.log(res); console.log(res);
}) })
}
}, },
//bindtap="dKztDetial" data-xq="{{item}}" //bindtap="dKztDetial" data-xq="{{item}}"
dKztDetial(e){/**查看详情 */ dKztDetial(e){/**查看详情 */
@ -428,20 +441,21 @@ Page({
duration: 1000 duration: 1000
}) })
}else{ }else{
req.postRequest('/api/user/curt/message/lover',{"type": "text","content": this.data.ztText}).then((res)=>{ req.postRequest('/api/user/curt/message/lover',{
type: 'text',
content: this.data.ztText
}).then((res)=>{
if(res.data.code === 200){
this.setData({ztVisible:false,ztText:''})
this.onLoad() this.onLoad()
if(res.data.code==200){
} }
}).catch((err)=>{ }).catch((err)=>{
console.log(err); console.log(err);
}) })
this.setData({ztVisible:false,ztText:''})
} }
}, },
go2Huiyi(){/**跳转到回忆页面 */ go2Huiyi(){/**跳转到回忆页面 */
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/hy/index' url: '/pages/home/xx/hy/index'
}) })
}, },
@ -457,7 +471,12 @@ Page({
const day = date.getDate() const day = date.getDate()
const hours = date.getHours() const hours = date.getHours()
const minutes = date.getMinutes() const minutes = date.getMinutes()
item.createdAt = `${year}${month}${day}${hours}:${minutes}`
// 补零
const formattedHours = hours < 10 ? `0${hours}` : hours
const formattedMinutes = minutes < 10 ? `0${minutes}` : minutes
item.createdAt = `${year}${month}${day}${formattedHours}:${formattedMinutes}`
}) })
// 塞选出对方的消息 // 塞选出对方的消息
@ -474,19 +493,50 @@ Page({
} }
}) })
// 把双方信札添加到消息页面头部
req.getRequest('/api/user/curt/letter',{}).then(res => {
if (!res.data.data.isEmpty) {
list.push({
type: 'letter',
isSelf: true,
id: -1,
status: res.data.data.status
})
}
req.getRequest('/api/user/curt/lover/letter',{}).then(res1 => {
if (!res1.data.data.isEmpty) {
list.push({
type: 'letter',
isSelf: false,
id: -2,
status: res.data.data.status
})
}
this.setData({messages:list.reverse()}) this.setData({messages:list.reverse()})
this.getDeteleImg()
this.getNewMsg()
})
})
} }
}).catch((err)=>{ }).catch((err)=>{
console.log(err); console.log(err);
}) })
}, },
// 获取情侣双方信札
getMyLetter(){
req.getRequest('/api/user/curt/letter',{}).then(res => {
return res.data.data.isEmpty
})
},
doQueryInit(){ doQueryInit(){
req.getRequest('/api/user/curt',{}).then((res)=>{ req.getRequest('/api/user/curt',{}).then((res)=>{
if(res.data.code==200){ if(res.data.code==200){
this.setData({hasLover:res.data.data.hasLover})
this.setData({userInfo:res.data.data}) this.setData({userInfo:res.data.data})
if(!res.data.data.hasLover){ if(!res.data.data.hasLover){
wx.navigateTo({ wx.redirectTo({
url: '/pages/home/xx/index' url: '/pages/home/xx/index'
}) })
} }
@ -568,30 +618,62 @@ Page({
}, },
doClickXz(){ doClickXz(){
this.setData({xinzhaVisible:true}) this.setData({xinzhaVisible:true})
console.log('点击了信札') wx.redirectTo({
wx.navigateTo({
url: '/pages/home/xx/lindex/lxz/lxz' url: '/pages/home/xx/lindex/lxz/lxz'
}) })
}, },
// 点击了信札
getLetter(e){
const id = e.currentTarget.dataset.item.id
wx.redirectTo({
url: '/pages/xz/index?id=' + id
})
},
doCancelXz(){ doCancelXz(){
this.setData({xinzhaVisible:false}) this.setData({xinzhaVisible:false})
}, },
// 获取默认图片
getDeteleImg(){
const img = wx.getStorageSync('xy-static-img')
const userImg = img[this.data.userInfo.constellation]
const loveImg = img[this.data.loverInfo.constellation]
this.setData({userImg: userImg['elf-avatar'], loveImg: loveImg['elf-avatar']})
},
// 时时显示最新聊天记录
getNewMsg(){
// 获取到聊天记录的总高度
const text = this.data.messages.filter(item => {
return item.type === 'text'
}).length
const letter = this.data.messages.filter(item => {
return item.type === 'letter'
}).length
const graphic = this.data.messages.filter(item => {
return item.type === 'graphic'
}).length
const audio = this.data.messages.filter(item => {
return item.type === 'audio'
}).length
const height = text * 92 + letter * 75 + graphic * 127 + audio * 84 + 100000
if (height !== this.data.chatHeight) {
this.setData({chatHeight:height})
}
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
console.log('开始。。。。')
const innerAudioContext = wx.createInnerAudioContext({ const innerAudioContext = wx.createInnerAudioContext({
useWebAudioImplement: false useWebAudioImplement: true
}) })
this.setData({innerAudioContext:innerAudioContext}) this.setData({innerAudioContext:innerAudioContext})
this.popover = this.selectComponent('#popover');
console.log('结束。。。。')
this.doQueryInit() this.doQueryInit()
this.doMessageInfo() this.doMessageInfo()
/**----------------一下为编辑器代码-----------------*/
}, },
/** /**
@ -601,9 +683,9 @@ Page({
this.doQueryInit() this.doQueryInit()
this.doMessageInfo() this.doMessageInfo()
// 轮询获取信息
const time = setInterval(() => { const time = setInterval(() => {
this.doMessageInfo() this.doMessageInfo()
console.log('1111');
}, 2000); }, 2000);
this.setData({time: time}) this.setData({time: time})
}, },
@ -612,7 +694,6 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
}, },
/** /**
@ -629,6 +710,7 @@ Page({
onUnload() { onUnload() {
clearInterval(this.data.timer) clearInterval(this.data.timer)
this.data.innerAudioContext.stop() this.data.innerAudioContext.stop()
clearInterval(this.data.time)
}, },
/** /**

@ -2,8 +2,6 @@
"usingComponents": { "usingComponents": {
"t-image": "tdesign-miniprogram/image/image", "t-image": "tdesign-miniprogram/image/image",
"t-popup": "tdesign-miniprogram/popup/popup", "t-popup": "tdesign-miniprogram/popup/popup",
"t-textarea": "tdesign-miniprogram/textarea/textarea", "t-textarea": "tdesign-miniprogram/textarea/textarea"
"popover": "/components/popover",
"popover-item": "/components/popover-item"
} }
} }

@ -1,23 +1,21 @@
<!--pages/home/xx/lindex/lindex.wxml 星讯:非情侣页面--> <!--pages/home/xx/lindex/lindex.wxml 星讯:非情侣页面-->
<view catchtap="allTap" class="allTap">
<!-- 头部导航 --> <!-- 头部导航 -->
<view class="allTap-header"> <view class="allTap-header">
<view class="hybtn" bindtap="go2Huiyi">回忆</view> <view class="hybtn" bindtap="go2Huiyi" wx:if="{{chatHeight}}">回忆</view>
<view class="reback" bindtap="go2Reback"></view> <view class="reback" bindtap="go2Reback"></view>
<view class="title">星讯</view> <view class="title">星讯</view>
</view> </view>
<view class="allTap" bindtap="closeDel" wx:if="{{chatHeight}}">
<!--聊天内容-可以滑动--> <!--聊天内容-可以滑动-->
<view class="ltinfo"> <scroll-view class="ltinfo" scroll-y enhanced scroll-top="{{chatHeight}}">
<!--聊天页头部:粉色那一部分--> <!--聊天页头部:粉色那一部分-->
<view class="bkgfs" id="button"> <view class="bkgfs" id="button">
<!--最上方的两个头像--> <!--最上方的两个头像-->
<view class="bkgfs-img"> <view class="bkgfs-img">
<t-image class="txl" shape="circle" src="{{userInfo.avatar}}"></t-image><!--当前用户头像--> <t-image class="txl" shape="circle" src="{{userInfo.avatar ? userInfo.avatar : userImg}}"></t-image><!--当前用户头像-->
<view class="bkgfs-img-middle" /> <view class="bkgfs-img-middle" />
<t-image class="txr" shape="circle" src="{{loverInfo.avatar}}"></t-image><!--当前用户头像--> <t-image class="txr" shape="circle" src="{{loverInfo.avatar ? loverInfo.avatar : loveImg}}"></t-image><!--当前用户头像-->
</view> </view>
<view class="bkgfstxt"> <view class="bkgfstxt">
@ -26,7 +24,6 @@
<view class="txt"> 所有美好的回忆都将被精灵记录</view> <view class="txt"> 所有美好的回忆都将被精灵记录</view>
</view> </view>
</view> </view>
<!--聊天内容部分--> <!--聊天内容部分-->
<view class="ltxinxi"> <view class="ltxinxi">
<!--循环用户的聊天信息--> <!--循环用户的聊天信息-->
@ -37,30 +34,28 @@
<view wx:if="{{item.isSelf}}" > <view wx:if="{{item.isSelf}}" >
<!--发送图片消息--> <!--发送图片消息-->
<view class="zjtableatp1" wx:if="{{item.type=='graphic'}}"> <view class="zjtableatp1" wx:if="{{item.type=='graphic'}}">
<view class="delete-btn" wx:if="{{delId === item.id}}" bindtap="deleteMsg">删除</view>
<!--聊天图片&已读未读--> <!--聊天图片&已读未读-->
<view class="zttp11" data-id="{{item.id}}" id="{{'id001'+index}}" data-index="{{'id001'+index}}" bindlongpress="changAn"> <view class="zttp11" data-id="{{item.id}}" id="{{'id001'+index}}" bindlongpress="changAn">
<view class="zjydwdtp2">{{item.status=='unread'?'未读':'已读'}}</view> <view class="zjydwdtp2">{{item.status=='unread'?'未读':'已读'}}</view>
<!--聊天图片--> <!--聊天图片-->
<t-image src="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}" class="zjxftp2" mode="heightFix" bindtap="go2SeeHxDetail" data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}"></t-image> <t-image src="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}" class="zjxftp2" mode="heightFix" bindtap="go2SeeHxDetail" data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}"></t-image>
</view> </view>
<!--自己的头像框--> <!--自己的头像框-->
<t-image src="{{userInfo.avatar}}" class="zjtx1" shape="circle" ></t-image> <t-image src="{{userInfo.avatar ? userInfo.avatar : userImg}}" class="zjtx1" shape="circle" ></t-image>
</view>
<!--发送信件消息-->
<view class="zjtablea1" wx:if="{{item.type=='xj'}}">
<view class="zjxf1"></view>
<view class="zjydwd1">{{item.status=='unread'?'未读':'已读'}}</view>
<t-image src="{{userInfo.avatar}}" class="zjtx1" shape="circle" ></t-image><!--自己的头像框-->
</view> </view>
<!--发送音频消息--> <!--发送音频消息-->
<view class="zjtablea2" wx:if="{{item.type=='audio'}}"> <view class="zjtablea2" wx:if="{{item.type=='audio'}}">
<view class="delete-btn" wx:if="{{delId === item.id}}" bindtap="deleteMsg">删除</view>
<view class="zjypydwd" >{{item.status=='unread'?'未读':'已读'}}</view> <view class="zjypydwd" >{{item.status=='unread'?'未读':'已读'}}</view>
<view <view
data-bf="{{!item.extra.isBf}}" data-bf="{{!item.extra.isBf}}"
class="zjypk1" wx:if="{{!item.extra.isBf}}" class="zjypk1" wx:if="{{!item.extra.isBf}}"
data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}" data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}"
data-index="{{index}}" data-index="{{index}}"
data-id="{{item.id}}"
bindtap="doLuYINBoF" bindtap="doLuYINBoF"
bindlongpress="changAn"
> >
<view class="zjypt1"></view> <view class="zjypt1"></view>
<view class="zjypwz1">{{item.extra.ssec}}</view> <view class="zjypwz1">{{item.extra.ssec}}</view>
@ -73,17 +68,17 @@
bindtap="doLuYINBoF" bindtap="doLuYINBoF"
> >
<view class="zjypt11"> <view class="zjypt11">
<view class="box2" style="float: left; height: 60rpx; width: 1000px;"> <view class="box2" style="float: left; height: 60rpx; width: 10000rpx;">
<image wx:for="{{xhCstP}}" wx:key="index" style="height: 60rpx;width: 60rpx;" <image wx:for="{{xhCstP}}" wx:key="index" style="height: 60rpx;width: 60rpx;" src="https://wish-assets.windymuse.com.cn/xy/yppic.png"/>
src="https://wish-assets.windymuse.com.cn/xy/yppic.png" mode=""/>
</view> </view>
</view> </view>
<view class="zjypwz1">{{item.extra.ssec}}</view> <view class="zjypwz1">{{item.extra.ssec}}</view>
</view> </view>
<t-image src="{{userInfo.avatar}}" class="zjtx1" shape="circle" ></t-image><!--自己的头像框--> <t-image src="{{userInfo.avatar ? userInfo.avatar : userImg}}" class="zjtx1" shape="circle" ></t-image><!--自己的头像框-->
</view> </view>
<!--发送文字消息--> <!--发送文字消息-->
<view class="zjtable3" wx:if="{{item.type=='text'}}"> <view class="zjtable3" wx:if="{{item.type=='text'}}">
<view class="delete-btn" wx:if="{{delId === item.id}}" bindtap="deleteMsg">删除</view>
<view class="zjtextydwd1">{{item.status=='unread'?'未读':'已读'}}</view> <view class="zjtextydwd1">{{item.status=='unread'?'未读':'已读'}}</view>
<view class="zjxxbox1" <view class="zjxxbox1"
bindlongpress="changAn" bindlongpress="changAn"
@ -94,19 +89,25 @@
data-xq="{{item}}" data-xq="{{item}}"
> >
<view class="zjtextcontent"> <view class="zjtextcontent">
<text>{{item.content}}</text> {{item.content}}
</view>
</view> </view>
<t-image src="{{userInfo.avatar ? userInfo.avatar : userImg}}" class="zjtx1" shape="circle" ></t-image><!--自己的头像框-->
</view> </view>
<!--发送信札消息-->
<view class="zjtable4" wx:if="{{item.type ==='letter'}}">
<view class="delete-btn" wx:if="{{delId === item.id}}" bindtap="deleteMsg">删除</view>
<view class="zjtextydwd1">{{item.status=='unread'?'未读':'已读'}}</view>
<view class="xz-box" bindtap="getLetter" data-item="{{item}}" data-id="{{item.id}}" bindlongpress="changAn"></view>
<t-image src="{{userInfo.avatar}}" class="zjtx1" shape="circle" ></t-image><!--自己的头像框--> <t-image src="{{userInfo.avatar}}" class="zjtx1" shape="circle" ></t-image><!--自己的头像框-->
</view> </view>
</view> </view>
<!--对方发的消息--> <!--对方发的消息-->
<view wx:if="{{!item.isSelf}}" > <view wx:if="{{!item.isSelf}}" >
<!--图片信息--> <!--图片信息-->
<view wx:if="{{item.type=='graphic'}}" class="zjtableatp2"> <view wx:if="{{item.type=='graphic'}}" class="zjtableatp3">
<view class="zttp12" wx:if="{{item.type=='graphic'}}"> <view class="zttp12" wx:if="{{item.type=='graphic'}}">
<t-image src="{{loverInfo.avatar}}" class="wchattxk11" shape="circle" ></t-image><!--对方的的头像框--> <t-image src="{{loverInfo.avatar ? loverInfo.avatar : loveImg}}" class="wchattxk11" shape="circle" ></t-image><!--对方的的头像框-->
<!-- <view class="zjxftp3"></view> --> <!-- <view class="zjxftp3"></view> -->
<t-image <t-image
bindlongpress="changAn" bindlongpress="changAn"
@ -116,25 +117,25 @@
data-id="{{item.id}}" data-id="{{item.id}}"
data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}" data-tp="{{'https://xzjl-api.windymuse.cn/api/resource/'+item.resourceId+'?k='+userInfo.id}}"
></t-image> ></t-image>
<view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view> <!-- <view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view> -->
</view> </view>
</view> </view>
<!-- 文本内容 --> <!-- 文本内容 -->
<view wx:if="{{item.type=='text'}}" class="zjtableatp2"> <view wx:if="{{item.type=='text'}}" class="zjtableatp2">
<view class="zttp12" wx:if="{{item.type=='text'}}"> <view class="zttp12" wx:if="{{item.type=='text'}}">
<t-image src="{{loverInfo.avatar}}" class="wchattxk11" shape="circle" ></t-image><!--对方的的头像框--> <t-image src="{{loverInfo.avatar ? loverInfo.avatar : loveImg}}" class="wchattxk11" shape="circle" ></t-image><!--对方的的头像框-->
<view bindtap="dKztDetial" data-xq="{{item}}" class="dftext"wx:if="{{item.type=='text'}}"> <view bindtap="dKztDetial" data-xq="{{item}}" data-id="{{item.id}}" class="dftext"wx:if="{{item.type=='text'}}" bindlongpress="changAn">
<view class="xjtext">{{item.content}}</view> <view class="xjtext">{{item.content}}</view>
</view> </view>
<view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view> <!-- <view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view> -->
</view> </view>
</view> </view>
<!-- 音频内容 --> <!-- 音频内容 -->
<view wx:if="{{item.type=='audio'}}" class="zjtableatp2"> <view wx:if="{{item.type=='audio'}}" class="zjtableatp2">
<view class="zttp12" wx:if="{{item.type=='audio'}}"> <view class="zttp12" wx:if="{{item.type=='audio'}}">
<t-image src="{{loverInfo.avatar}}" class="wchattxk11" shape="circle" ></t-image><!--对方的的头像框--> <t-image src="{{loverInfo.avatar ? loverInfo.avatar : loveImg}}" class="wchattxk11" shape="circle" ></t-image><!--对方的的头像框-->
<view <view
data-bf="{{!item.extra.isBf}}" data-bf="{{!item.extra.isBf}}"
class="zjypk1" wx:if="{{!item.extra.isBf}}" class="zjypk1" wx:if="{{!item.extra.isBf}}"
@ -142,6 +143,8 @@
data-index="{{index}}" data-index="{{index}}"
bindtap="doLuYINBoF" bindtap="doLuYINBoF"
data-item="{{item}}" data-item="{{item}}"
data-id="{{item.id}}"
bindlongpress="changAn"
> >
<view class="zjypt1"></view> <view class="zjypt1"></view>
<view class="zjypwz1">{{item.extra.ssec}}</view> <view class="zjypwz1">{{item.extra.ssec}}</view>
@ -162,30 +165,25 @@
</view> </view>
<view class="zjypwz1">{{item.extra.ssec}}</view> <view class="zjypwz1">{{item.extra.ssec}}</view>
</view> </view>
<view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view> <!-- <view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view> -->
</view> </view>
</view> </view>
<!-- 信件内容 --> <!--信札消息-->
<view wx:if="{{item.type=='xj'}}" class="zjtableatp2"> <view class="zjtableatp4" wx:if="{{item.type ==='letter'}}">
<view class="zttp12" wx:if="{{item.type=='xj'}}"> <t-image src="{{loverInfo.avatar ? loverInfo.avatar : loveImg}}" class="wchattxk11" shape="circle" ></t-image>
<t-image src="{{loverInfo.avatar}}" class="wchattxk11" shape="circle" ></t-image><!--对方的的头像框--> <view class="xz-box" bindtap="getLetter" data-item="{{item}}" data-id="{{item.id}}"></view>
<view class="dfxf" wx:if="{{item.type=='xj'}}"></view> <!-- <view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view> -->
<view class="dfxfydwd" wx:if="{{item.type=='xj'}}">{{item.status=='unread'?'未读':'已读'}}</view>
<view class="zjydwdtp3">{{item.status=='unread'?'未读':'已读'}}</view>
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="cqlgd"></view> <view class="cqlgd"></view>
</view> </view>
</scroll-view>
</view> </view>
</view>
<!--星讯聊天下方菜单栏--> <!--星讯聊天下方菜单栏-->
<view class="xfgjl" wx:if="{{hasLover}}"> <view class="xfgjl" wx:if="{{chatHeight}}">
<view class="xxqlcd xxqlcd1" bindtap="doClickXz">信札</view> <view class="xxqlcd xxqlcd1" bindtap="doClickXz">信札</view>
<view class="xxqlcd xxqlcd2" bindtap="doClickYx">音讯</view> <view class="xxqlcd xxqlcd2" bindtap="doClickYx">音讯</view>
<view class="xxqlcd xxqlcd3" bindtap="doClickHx">画像</view> <view class="xxqlcd xxqlcd3" bindtap="doClickHx">画像</view>
@ -195,17 +193,18 @@
<!--写纸条弹窗--> <!--写纸条弹窗-->
<t-popup visible="{{ztVisible}}" placement="top" class="ztPop"> <t-popup visible="{{ztVisible}}" placement="top" class="ztPop">
<view class="ztPopcenter"></view> <view class="ztPopcenter"></view>
<t-textarea model:value="{{ztText}}" t-class="external-class" placeholder="在此处输入文字" class="ztwzk" /> <t-textarea model:value="{{ztText}}" maxlength="{{100}}" t-class="external-class" placeholder="在此处输入文字" class="ztwzk" />
<view class="qxan1 btn1" bindtap="doCancelZt">取消</view> <view class="qxan1 btn1" bindtap="doCancelZt">取消</view>
<view class="qran1 btn1" bindtap="doFSZt">发送</view> <view class="qran1 btn1" bindtap="doFSZt">发送</view>
</t-popup> </t-popup>
<!--打开纸条弹窗--> <!--打开纸条弹窗-->
<t-popup visible="{{dkZtVisible}}" placement="top" class="ztPop"> <t-popup visible="{{dkZtVisible}}" placement="top" class="ztPop">
<view class="ztPopcenter"></view> <view class="ztPopcenter"></view>
<t-textarea model:value="{{tDetial.content}}" t-class="external-class" placeholder="在此处输入文字" class="ztwzk" disabled /> <t-textarea value="{{tDetial.content}}" t-class="external-class" placeholder="在此处输入文字" class="ztwzk" disabled />
<!--返回按钮--> <!--返回按钮-->
<view class="fhan11" bindtap="doCancelDkZt"></view> <view class="fhan11" bindtap="doCancelDkZt">
<view class="fan11r" bindtap="doCancelDkZt"></view> <view class="fan11r" bindtap="doCancelDkZt"></view>
</view>
</t-popup> </t-popup>
<t-popup visible="{{dkTpVisible}}" placement="top" class="ztPop1"> <t-popup visible="{{dkTpVisible}}" placement="top" class="ztPop1">
@ -213,16 +212,32 @@
<view class="reback" bindtap="go2Reback1"></view> <view class="reback" bindtap="go2Reback1"></view>
<view class="title">画像</view> <view class="title">画像</view>
</view> </view>
<view class="ztPop1-img">
<t-image src="{{imgPicUrl}}" mode="widthFix" class="tppp1"></t-image> <t-image src="{{imgPicUrl}}" mode="widthFix" class="tppp1"></t-image>
<!--返回图标--> </view>
<view class="ztPop1-btn">
<view class="ztPop1-btn-text" wx:if="{{savePicture}}">画像保存成功</view>
<view class="tpBcan1" bindtap="go2BcPic">保存</view> <view class="tpBcan1" bindtap="go2BcPic">保存</view>
</view>
</t-popup> </t-popup>
<!--录音弹窗--> <!--录音弹窗-->
<t-popup visible="{{luyinVisible}}" bind:visible-change="onVisibleChange" placement="bottom"> <view class="luying-box" wx:if="{{luyinVisible}}">
<view class="luyinblock"> <view class="luyinblock">
<view class="header">
<view class="qxly" aria-role="button" bindtap="quxiaoLuyin">取消</view>
<view class="qrfs qrfs2" aria-role="button" bindtap="do2FsLuyin">发送</view>
</view>
<!--计时器--> <!--计时器-->
<view class="luyinjishiqi">{{dsQTime}}</view> <view class="luyinjishiqi">{{dsQTime}}</view>
<!--轮播图位置-->
<view class="luyinlbt" wx:if="{{luYinStatus==1}}">
<view class="box2" style="float: left; height: 50rpx; width: 1000px; " >
<image wx:for="{{xhCstP}}" wx:key="index" style="height: 50rpx;width: 50rpx;" src="https://wish-assets.windymuse.com.cn/xy/lylbt.png" mode=""/>
</view>
</view>
<view class="luyinlbt1" wx:if="{{luYinStatus!=1}}"></view>
<!--录音按钮--> <!--还没有开始--> <!--录音按钮--> <!--还没有开始-->
<view class="weiluyinanniu" wx:if="{{luYinStatus==0}}" bindtap="doStartLuyin"> <view class="weiluyinanniu" wx:if="{{luYinStatus==0}}" bindtap="doStartLuyin">
<view class="wlyan1" ></view> <view class="wlyan1" ></view>
@ -232,28 +247,12 @@
<view class="wlyan2" ></view> <view class="wlyan2" ></view>
</view> </view>
<!--录音按钮--> <!--已结束--> <!--录音按钮--> <!--已结束-->
<view class="weiluyinanniu" wx:if="{{luYinStatus==2}}" > <view class="weiluyinanniu" wx:if="{{luYinStatus==2}}" bindtap="doListen">
<view class="wlyan3"></view> <view class="wlyan3"></view>
</view> </view>
<!--轮播图位置--> <!--录音按钮--> <!--播放录音-->
<view class="luyinlbt" wx:if="{{luYinStatus==1}}"> <view class="weiluyinanniu" wx:if="{{luYinStatus==3}}" bindtap="doStopListen">
<view class="box2" style="float: left; height: 50rpx; width: 1000px; " > <view class="wlyan4"></view>
<image wx:for="{{xhCstP}}" wx:key="index" style="height: 50rpx;width: 50rpx;" src="https://wish-assets.windymuse.com.cn/xy/lylbt.png" mode=""/>
</view>
</view> </view>
<view class="luyinlbt1" wx:if="{{luYinStatus!=1}}">
</view>
<view class="lyhx"></view>
<view class="header">
<view class="qxly" aria-role="button" bindtap="quxiaoLuyin">取消</view>
<view class="qrfs qrfs1" aria-role="button" wx:if="{{luYinStatus!=2}}">发送</view>
<view class="qrfs qrfs2" aria-role="button" wx:if="{{luYinStatus==2}}" bindtap="do2FsLuyin">发送</view>
</view> </view>
</view> </view>
</t-popup>
<popover id='popover'>
<popover-item bindtap='doDelXiaoxi'>删除</popover-item>
</popover>

@ -6,6 +6,9 @@
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
padding-top: 224rpx;
box-sizing: border-box;
overflow: hidden;
} }
.allTap-header { .allTap-header {
@ -59,7 +62,8 @@
.ltinfo{ .ltinfo{
width: 100%; width: 100%;
margin-top: 224rpx; height: 100%;
/* overflow-y: scroll; */
} }
.bkgfs{ .bkgfs{
@ -112,12 +116,14 @@
.txl{ .txl{
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
background-color: #fff;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
} }
.txr{ .txr{
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
background-color: #fff;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
} }
@ -322,11 +328,13 @@
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.xjtext{ .xjtext{
margin-left: 36rpx; width: 100%;
width: 123px; padding: 0 36rpx;
text-overflow: -o-ellipsis-lastline; box-sizing: border-box;
white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
text-align: center;
} }
.dftextwd{ .dftextwd{
display: inline-block; display: inline-block;
@ -405,6 +413,7 @@
font-family: SourceHanSansSC-regular; font-family: SourceHanSansSC-regular;
} }
.zjtablea2{ .zjtablea2{
position: relative;
width: 100%; width: 100%;
height: 134rpx; height: 134rpx;
display: flex; display: flex;
@ -453,6 +462,7 @@
} }
.zjtable3{ .zjtable3{
position: relative;
width: 100%; width: 100%;
height: 150rpx; height: 150rpx;
display: flex; display: flex;
@ -460,6 +470,31 @@
justify-content: flex-end; justify-content: flex-end;
} }
.zjtable4 {
position: relative;
width: 100%;
height: 150rpx;
display: flex;
align-items: center;
justify-content: flex-end;
}
.zjtableatp4 {
position: relative;
width: 100%;
height: 150rpx;
display: flex;
align-items: center;
justify-content: flex-start;
}
.xz-box {
width: 186rpx;
height: 130rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/xz-box.png);
}
.zjxxbox1{ .zjxxbox1{
width: 360rpx; width: 360rpx;
height: 120rpx; height: 120rpx;
@ -472,6 +507,17 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.zjtextcontent {
width: 360rpx;
padding: 0 36rpx;
box-sizing: border-box;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: center;
}
.zjtextydwd1{ .zjtextydwd1{
height: 100%; height: 100%;
display: flex; display: flex;
@ -481,20 +527,6 @@
margin: 0 10rpx 60rpx 0; margin: 0 10rpx 60rpx 0;
} }
.zjtextcontent{
position: absolute;
margin-left: 52rpx;
margin-top: 41rpx;
width: 126px;
height: 21px;
line-height: 42rpx;
color: rgba(51, 51, 51, 1);
font-size: 14px;
font-family: SourceHanSansSC-regular;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.ztPop{ .ztPop{
position: absolute; position: absolute;
width:750rpx ; width:750rpx ;
@ -504,45 +536,46 @@
} }
.ztPopcenter{ .ztPopcenter{
position: absolute; position: absolute;
left: 48px; left: 96rpx;
top: 111px; top: 222rpx;
width: 298px; width: 597rpx;
height: 542px; height: 1084rpx;
background-size: cover;
background-image: url(https://wish-assets.windymuse.com.cn/xy/ztbkg11.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/ztbkg11.png);
} }
.btn1{ .btn1{
position: absolute; position: absolute;
width: 105px; width: 210rpx;
height: 35px; height: 70rpx;
line-height: 70rpx; border-radius: 20rpx;
border-radius: 10px;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%); background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
text-align: center; text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1); border: 6rpx solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
font-size: 14px; font-size: 28rpx;
text-align: center; display: flex;
font-family: SourceHanSansSC-medium; align-items: center;
justify-content: center;
} }
.qxan1{ .qxan1{
left: 64px; left: 128rpx;
top: 568px; top: 1136rpx;
} }
.qran1{ .qran1{
left: 206px; left: 412rpx;
top: 568px; top: 1136rpx;
} }
.ztwzk{ .ztwzk{
position: absolute; position: absolute;
left: 81px; left: 81px;
top: 210px; top: 210px;
width: 214px; width: 428rpx;
height: 310px; height: 620rpx;
line-height: none; line-height: none;
color: rgba(206, 206, 206, 1); color: rgba(206, 206, 206, 1);
font-size: 18px; font-size: 36rpx;
text-align: left; text-align: left;
font-family: Microsoft Yahei; font-family: Microsoft Yahei;
@ -564,34 +597,33 @@ top: 568px;
.fhan11{ .fhan11{
border-radius: 58rpx; border-radius: 58rpx;
position: absolute; position: absolute;
left: 160px; left: 320rpx;
top: 548px; top: 1096rpx;
width: 55px; width: 110rpx;
height: 55px; height: 110rpx;
line-height: 17px;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%); background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
color: rgba(16, 16, 16, 1); color: rgba(16, 16, 16, 1);
font-size: 12px;
text-align: center; text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
font-family: Arial;
border: 3px solid rgba(255, 255, 255, 1); border: 3px solid rgba(255, 255, 255, 1);
display: flex;
align-items: center;
justify-content: center;
} }
.fan11r{ .fan11r{
position: absolute; width: 60rpx;
left: 175px; height: 60rpx;
top: 562px; background-size: cover;
width: 30px;
height: 30px;
background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
} }
.t-textarea{ .t-textarea{
background-color: transparent!important; background-color: transparent!important;
} }
.zjtableatp1{ .zjtableatp1{
position: relative;
width: 100%; width: 100%;
height: 220rpx; height: 220rpx;
padding: 0 32rpx; /* padding: 0 32rpx; */
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
@ -601,6 +633,17 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
.zjtableatp2{ .zjtableatp2{
width: 100%; width: 100%;
height: 150rpx; height: 150rpx;
/* padding: 0 32rpx; */
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: flex-start;
}
.zjtableatp3{
width: 100%;
height: 220rpx;
/* padding: 0 32rpx; */
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
@ -679,20 +722,14 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
} }
.tppp1{ .tppp1{
position: absolute; width: 100%;
width: 750rpx;
height: auto;
top:50%;
margin-top: 300rpx;
} }
.ztPop1{ .ztPop1{
position: relative; position: relative;
width: 750rpx ; width: 100% ;
height: 1624rpx; height: 100%;
margin: 0!important; margin: 0!important;
padding: 0!important; padding: 0!important;
display: table-cell;
vertical-align: middle;
} }
.ztPop1-header { .ztPop1-header {
@ -704,23 +741,48 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
justify-content: center; justify-content: center;
} }
.ztPop1-img {
width: 100%;
height: 1270rpx;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.tpBcan1{ .ztPop1-btn {
position: relative;
width: 100%;
height: 134rpx;
padding: 32rpx;
box-sizing: border-box;
display: flex;
justify-content: flex-end;
}
.ztPop1-btn-text {
position: absolute; position: absolute;
top: 1400rpx; top: 50%;
right: 32rpx; left: 50%;
transform: translate(-50%, -50%);
color: rgba(108, 108, 108, 1);
font-size: 32rpx;
text-align: center;
}
.tpBcan1{
width: 110rpx; width: 110rpx;
height: 70rpx; height: 70rpx;
line-height: 70rpx; line-height: 70rpx;
border-radius: 20rpx; border-radius: 20rpx;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%); background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
text-align: center; text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1); border: 3px solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
font-size: 28rpx; font-size: 28rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-medium;
} }
.block{ .block{
width: 750rpx; width: 750rpx;
@ -739,10 +801,15 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
display: block; display: block;
} }
.header { .luying-box .header {
width: 100%;
height: 74rpx;
padding: 0 36rpx;
box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
height: 116rpx; justify-content: space-between;
border-bottom: 2rpx solid #E9E9E8;
} }
.btn { .btn {
@ -764,22 +831,19 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
max-width: 500rpx; max-width: 500rpx;
} }
.luyinblock{ .luyinblock{
left: 0px; /* left: 0px;
top: 547px; top: 547px; */
width: 375px; width: 100%;
height: 231px; height: 462rpx;
line-height: 20px; line-height: 20px;
border-radius: 10px 10px 0px 0px; border-radius: 10px 10px 0px 0px;
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1); color: rgba(16, 16, 16, 1);
font-size: 14px; font-size: 28rpx;
text-align: center; text-align: center;
font-family: Arial; font-family: Arial;
} }
.qxly{ .qxly{
position: absolute;
left: 32rpx;
top: 12rpx;
width: 64rpx; width: 64rpx;
height: 50rpx; height: 50rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
@ -788,9 +852,6 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
font-family: SourceHanSansSC-regular; font-family: SourceHanSansSC-regular;
} }
.qrfs{ .qrfs{
position: absolute;
left: 650rpx;
top: 12rpx;
width: 64rpx; width: 64rpx;
height: 50rpx; height: 50rpx;
font-size: 32rpx; font-size: 32rpx;
@ -803,29 +864,18 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
.qrfs2{ .qrfs2{
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
} }
.lyhx{
position: absolute;
left: 0px;
top: 72rpx;
width: 100%;
height: NaNpx;
border: 1px solid rgba(233, 233, 232, 1);
}
.luyinjishiqi{ .luyinjishiqi{
position: absolute; width: 100%;
left: 286rpx; height: 128rpx;
top: 114rpx;
width: 180rpx;
height: 44rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 32rpx; font-size: 32rpx;
text-align: center; display: flex;
font-family: SourceHanSansSC-regular; justify-content: center;
align-items: center;
} }
.weiluyinanniu{ .weiluyinanniu{
position: absolute; margin: 0 auto;
left: 316rpx; margin-top: 42rpx;
top: 300rpx;
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
border-radius: 50%; border-radius: 50%;
@ -837,9 +887,6 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
border: 3px solid rgba(255, 255, 255, 1); border: 3px solid rgba(255, 255, 255, 1);
} }
.wlyan1{ .wlyan1{
position: absolute;
left: 15rpx;
top: 15rpx;
width: 90rpx; width: 90rpx;
height: 90rpx; height: 90rpx;
border-radius: 45rpx; border-radius: 45rpx;
@ -848,14 +895,9 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
text-align: center; text-align: center;
} }
.luyinlbt{ .luyinlbt{
position: absolute;
width: 750rpx; width: 750rpx;
height: 50rpx; height: 50rpx;
top:198rpx;
overflow: hidden; overflow: hidden;
/* scroll-snap-type: x mandatory;
scroll-snap-align: start; */
} }
.box2{ .box2{
animation: move 5s infinite linear; animation: move 5s infinite linear;
@ -880,9 +922,6 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
animation-play-state: paused; animation-play-state: paused;
} */ } */
.wlyan2{ .wlyan2{
position: absolute;
left: 30rpx;
top: 30rpx;
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
line-height: 17px; line-height: 17px;
@ -892,22 +931,20 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
} }
.wlyan3{ .wlyan3{
/* position: absolute;
left: 40rpx;
top: 20rpx; */
width: 70rpx; width: 70rpx;
height: 70rpx; height: 70rpx;
/* border-top: 50rpx solid transparent;
border-left: 60rpx solid rgba(248,99,42,1);
border-bottom: 35rpx solid transparent; */
background-size: cover; background-size: cover;
background-image: url(https://wish-assets.windymuse.com.cn/xy/if-ui-play%20Copy%401x.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/if-ui-play%20Copy%401x.png);
} }
.wlyan4{
width: 70rpx;
height: 70rpx;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/semiDesign.png);
}
.luyinlbt1{ .luyinlbt1{
position: absolute;
width: 750rpx; width: 750rpx;
height: 50rpx; height: 50rpx;
top:198rpx;
overflow: hidden; overflow: hidden;
background-image: url(https://wish-assets.windymuse.com.cn/xy/lylbt.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/lylbt.png);
} }
@ -1109,5 +1146,30 @@ background-image: url(https://wish-assets.windymuse.com.cn/xy/xtreturn.png);
font-size: 14px!important; font-size: 14px!important;
text-align: left; text-align: left;
font-family: SourceHanSansSC-regular; font-family: SourceHanSansSC-regular;
}
.luying-box {
position: absolute;
top: 0;
width: 100%;
height: 100%;
display: flex;
align-items: flex-end;
background-color: rgba(255, 255, 255, 0.9);
z-index: 99999;
}
.delete-btn {
position: absolute;
top: -50rpx;
right: 120rpx;
width: 148rpx;
height: 84rpx;
color: #6c6c6c;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/del-icon.png);
} }

@ -13,13 +13,13 @@ Page({
content:'', content:'',
audioList:[], // 音频列表 audioList:[], // 音频列表
imgList:[], // 图片列表 imgList:[], // 图片列表
messageList: [{content: '', type: 'text', index: 1}], //消息列表
sound:'', sound:'',
soundTime:'00:00:00', soundTime:'00:00:00',
duration: '', duration: '',
minute:0, //分 minute:0, //分
second:0, //秒 second:0, //秒
millisecond:0, //毫秒 millisecond:0, //毫秒
showBtn:true,
showImgBig:false, //图片太大弹层 showImgBig:false, //图片太大弹层
showSoundMore:false, //语音太多提示 showSoundMore:false, //语音太多提示
showSend:false, //寄出提示 showSend:false, //寄出提示
@ -33,30 +33,71 @@ Page({
btn3:false, btn3:false,
btn4:false, btn4:false,
showSoundImg:true, showSoundImg:true,
isPlaying: false, // 是否正在播放语音 isPlaying: false // 是否正在播放语音
}, },
already(){ already(){
console.log('确定寄出'); // 校验
this.setData({showAlready:true}) if (this.data.from === '') {
const list = [ ...this.data.audioList, ...this.data.imgList] wx.showToast({
list.push({ title: '寄件人不能为空',
type: 'text', icon: 'error'
content: this.data.content })
return this.setData({showSend: false})
}
if (this.data.to === '') {
wx.showToast({
title: '收件人不能为空',
icon: 'error'
})
return this.setData({showSend: false})
}
if (this.data.messageList.length <= 1) {
wx.showToast({
title: '写点东西吧',
icon: 'error'
})
return this.setData({showSend: false})
}
const list = []
this.data.messageList.forEach(item => {
const obj = {}
obj.type = item.type
if (item.content) {
obj.content = item.content
}
if (item.resourceId) {
obj.resourceId = item.resourceId
}
if (item.extra) {
obj.extra = item.extra
}
if (item.videoSrc) {
obj.extra.videoSrc = item.videoSrc
}
if (item.img) {
obj.extra = {}
obj.extra.img = item.img
}
list.push(obj)
}) })
const fromData = { const formData = {
type: 'letter',
letter: {
from: this.data.from, from: this.data.from,
to: this.data.to, to: this.data.to,
messageList: list, messages: list
status:'unread' }
} }
console.log(fromData); req.postRequest('/api/user/curt/message/lover',formData).then(res =>{
// 修改信札 if (res.data.code === 200) {
req.putRequest('/api/user/curt/letter',fromData).then(res => { wx.showToast({
console.log(res,'修改信札内容成功'); title: '信札发送成功',
// 修改状态 icon: 'success'
req.patchRequest('/api/user/curt/letter/send',{}).then(res => {
console.log(res,'信札状态修改成功');
}) })
wx.redirectTo({
url: '/pages/home/xx/lindex/lindex'
})
}
}) })
}, },
closeShowImgBig(){ closeShowImgBig(){
@ -74,46 +115,73 @@ Page({
closeShowImgToast(){this.setData({showImgToast: false})}, closeShowImgToast(){this.setData({showImgToast: false})},
openPreview(){ openPreview(){
console.log('预览'); console.log('预览');
this.setData({Preview:true}) if (this.data.letterId) {
if (this.data.hy) {
return wx.redirectTo({
url: '/pages/home/xx/hy/index',
})
}
return wx.redirectTo({
url: '/pages/home/xx/lindex/lindex',
})
}
this.setData({Preview : !this.data.Preview})
}, },
ClearYl(e){ ClearYl(e){
console.log('清除语音'); console.log('清除语音');
const id = e.currentTarget.dataset.id const id = e.currentTarget.dataset.id
const list = this.data.audioList.filter(item => { const list = this.data.messageList.filter(item => {
return item.resourceId !== id return item.resourceId !== id
}) })
this.setData({audioList: list}) this.setData({messageList: list})
}, },
ClearImg(e){ ClearImg(e){
console.log('清除图片'); console.log('清除图片');
const id = e.currentTarget.dataset.id const id = e.currentTarget.dataset.id
const list = this.data.imgList.filter(item => { const list = this.data.messageList.filter(item => {
return item.resourceId !== id return item.resourceId !== id
}) })
this.setData({imgList: list}) this.setData({messageList: list})
}, },
goBack(){ goBack(){
if (this.data.Preview) { wx.redirectTo({
this.setData({Preview: false}) url: '/pages/home/xx/lindex/lindex',
}else{ })
console.log('返回'); },
wx.navigateBack() // 获取文本框内容
getTextValue(e){
const index = e.currentTarget.dataset.index
const content = e.detail.value
const list = this.data.messageList.map(item => {
if (item.index === index) {
return {
...item,
content : content
}
} }
return item
})
this.setData({messageList: list})
}, },
// 上传图片 // 上传图片
addImg(){ addImg(){
console.log('添加图片'); wx.chooseImage({
wx.chooseMedia({ count: 9,
mediaType: 'image', sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => { success: (res) => {
const files = res.tempFiles[0] console.log(res);
if(files.size > 5 * 1024 * 1024 ){ const files = res.tempFiles
this.setData({showImgBig:true}) files.forEach(item => {
if(item.size > 5 * 1024 * 1024 ){
return this.setData({showImgBig:true})
} }
this.uploadFile(res.tempFiles[0].tempFilePath,'poster') this.uploadFile(item.path,'poster')
})
} }
}) })
}, },
// 文件上传 // 文件上传
uploadFile(file,type) { uploadFile(file,type) {
wx.uploadFile({ wx.uploadFile({
@ -129,35 +197,53 @@ Page({
}, },
success: (async(res) => { success: (async(res) => {
const data = JSON.parse(res.data); const data = JSON.parse(res.data);
console.log(data);
if (data.data.type === 'audio') { if (data.data.type === 'audio') {
console.log('添加音频'); console.log('添加音频');
const list = this.data.audioList const list = this.data.messageList
if(list.length >= 3){ const index = list.length + 1
const audioList = list.filter(item => {
return item.type === 'audio'
})
if(audioList.length >= 3){
this.setData({showSoundMore:true ,showSoundImg:true}) this.setData({showSoundMore:true ,showSoundImg:true})
console.log('语音太多了');
}else { }else {
list.push({ list.push({
type: 'audio', type: 'audio',
resourceId: data.data.id, resourceId: data.data.id,
duration: this.data.duration, duration: this.data.duration,
videoSrc: this.data.videoSrc, videoSrc: this.data.videoSrc,
index:index,
extra: {duration : this.data.ssec} extra: {duration : this.data.ssec}
}) })
this.setData({audioList: list}) list.push({
type: 'text',
content: '',
index: index + 1
})
this.setData({messageList: list})
} }
} else if (data.data.type === 'poster') { } else if (data.data.type === 'poster') {
console.log('添加图片'); console.log('添加图片');
const list = this.data.imgList const list = this.data.messageList
if (list.length >= 9) { const migList = list.filter(item => {
return item.type === 'graphic'
})
if (migList.length >= 9) {
this.setData({showImgToast : true}) this.setData({showImgToast : true})
}else { }else {
const index = list.length + 1
list.push({ list.push({
type: 'graphic', type: 'graphic',
resourceId: data.data.id, resourceId: data.data.id,
img: data.data.abUrl, img: data.data.abUrl,
index: index
}) })
this.setData({imgList: list, showImg:true}) list.push({
type: 'text',
content: '',
index: index + 1
})
this.setData({messageList: list, showImg:true})
} }
} }
}), }),
@ -288,39 +374,27 @@ Page({
} }
}, },
logout(){ logout(){
req.deleteRequest('/api/user/logout',{}).then((res)=>{ wx.redirectTo({
if(res.data.code===200){ url: '/pages/home/xx/lindex/lindex',
wx.navigateTo({
url: '/pages/index/index'
})
wx.showToast({
title:'寄出成功'
})
}
}) })
}, },
modify(){ modify(){
this.setData({showAlready: false, showSend: false}) this.setData({showAlready: false, showSend: false})
}, },
getLetter(){
console.log('获取当前用户信札内容');
req.getRequest('/api/user/curt/letter',{}).then(res => {
console.log(res);
})
},
// 点击音频试听 // 点击音频试听
listen(e){ listen(e){
if (this.data.isPlaying) { if (this.data.isPlaying) {
return; // 如果正在播放语音,则不触发事件 return; // 如果正在播放语音,则不触发事件
} }
const id = e.currentTarget.dataset.url.resourceId const id = e.currentTarget.dataset.url.resourceId
const videoSrc = this.data.audioList.find(item => { const videoSrc = this.data.messageList.find(item => {
return item.resourceId === id return item.resourceId === id
}).videoSrc }).videoSrc
console.log(videoSrc); console.log(videoSrc);
const innerAudioContext = wx.createInnerAudioContext() const innerAudioContext = wx.createInnerAudioContext()
innerAudioContext.src = videoSrc innerAudioContext.src = videoSrc
innerAudioContext.play() // 播放 innerAudioContext.play() // 播放
console.log('播放');
this.setData({ isPlaying: true }); // 设置为正在播放语音 this.setData({ isPlaying: true }); // 设置为正在播放语音
innerAudioContext.onEnded(() => { innerAudioContext.onEnded(() => {
this.setData({ isPlaying: false }); // 播放完毕后设置为非播放状态 this.setData({ isPlaying: false }); // 播放完毕后设置为非播放状态
@ -332,12 +406,26 @@ Page({
this.setData({id:id}) this.setData({id:id})
}) })
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.getLetter()
this.getUserInfo() this.getUserInfo()
// 回忆页面点击信札 数据回显示
if (options.id) {
this.getLetterDetail(options.id)
this.setData({
Preview: true,
letterId: options.id
})
}
// 判断是回忆页面跳转还是聊天页面跳转
if(options.hy){
this.setData({ hy: true })
}
}, },
/** /**

@ -1,11 +1,8 @@
<!--pages/home/xx/xz/xz.wxml--> <!--pages/home/xx/xz/xz.wxml-->
<view class="bgt1"></view> <view class="bgt1"></view>
<view class="xinfo"> <view class="xinfo" wx:if="{{!Preview}}">
<scroll-view scroll-y enhanced="{{true}}" show-scrollbar="{{false}}" class="xinfo-content"> <scroll-view scroll-y enhanced="{{true}}" show-scrollbar="{{false}}" class="xinfo-content">
<view class="xinfo-yl-title" wx:if="{{Preview}}"> <view class="xinfo-title">
To: {{to}}
</view>
<view class="xinfo-title" wx:if="{{!Preview}}">
<view class="title-to"> <view class="title-to">
<view class="text">To:</view> <view class="text">To:</view>
<t-input model:value="{{to}}" /> <t-input model:value="{{to}}" />
@ -15,39 +12,38 @@
<t-input model:value="{{from}}"/> <t-input model:value="{{from}}"/>
</view> </view>
</view> </view>
<view wx:for="{{messageList}}" wx:key="index">
<!-- 信件文本 --> <!-- 信件文本 -->
<view class="xinfo-main"> <view class="xinfo-main" wx:if="{{item.type === 'text'}}">
<t-textarea autosize="true" model:value="{{content}}" placeholder="信件正文" /> <t-textarea bindblur="getTextValue" data-index="{{item.index}}" autosize="true" value="{{item.content}}" placeholder="信件正文" />
</view> </view>
<!-- 信件语音 --> <!-- 信件语音 -->
<view class="{{Preview ? 'xinfo-ltqp-yl' : 'xinfo-ltqp'}}" wx:for="{{audioList}}" wx:key="index" bindtap="listen" data-url="{{item}}"> <view class="xinfo-ltqp" wx:if="{{item.type === 'audio'}}" bindtap="listen" data-url="{{item}}">
<image class="xinfo-yuying" src="https://wish-assets.windymuse.com.cn/xy/%E8%AF%AD%E9%9F%B3.png"></image> <image class="xinfo-yuying" src="https://wish-assets.windymuse.com.cn/xy/%E8%AF%AD%E9%9F%B3.png"></image>
<view class="xinfo-ltqp-text">{{item.extra.duration}}</view> <view class="xinfo-ltqp-text">{{item.extra.duration}}</view>
<t-icon class="xinfo-close" name="close-circle" size="48rpx" wx:if="{{!Preview}}" bindtap="ClearYl" data-id="{{item.resourceId}}"/> <t-icon class="xinfo-close" name="close-circle" size="48rpx" catchtap="ClearYl" data-id="{{item.resourceId}}"/>
</view> </view>
<!-- 信件图片 --> <!-- 信件图片 -->
<view class="{{Preview ? 'xinfo-img-yl' : 'xinfo-img'}}" wx:for="{{imgList}}" wx:key="index"> <view class="xinfo-img" wx:if="{{item.type === 'graphic'}}">
<image src="{{item.img}}" mode="widthFix"></image> <image src="{{item.img}}" mode="widthFix"></image>
<view class="xinfo-img-close" bindtap="ClearImg" data-id="{{item.resourceId}}"> <view class="xinfo-img-close" bindtap="ClearImg" data-id="{{item.resourceId}}">
<t-icon name="close-circle" size="48rpx" wx:if="{{!Preview}}"/> <t-icon name="close-circle" size="48rpx"/>
</view> </view>
</view> </view>
<view class="xinfo-yl-form" wx:if="{{Preview}}">
From: {{from}}
</view> </view>
<view class="xinfo-yl" wx:if="{{Preview}}"></view>
</scroll-view> </scroll-view>
</view> </view>
<view class="bgt2" wx:if="{{showBtn}}">
<view class="bgt2" wx:if="{{!Preview}}">
<view class="bgt2-btn1" bindtap="goBack"> <view class="bgt2-btn1" bindtap="goBack">
<image src="https://wish-assets.windymuse.com.cn/xy/iconPark-return%401x.png"></image> <image src="https://wish-assets.windymuse.com.cn/xy/iconPark-return%401x.png"></image>
</view> </view>
<view class="bgt2-btn2" bindtap="openSound" wx:if="{{!Preview}}">音讯</view> <view class="bgt2-btn2" bindtap="openSound">音讯</view>
<view class="bgt2-btn3" bindtap="addImg" wx:if="{{!Preview}}">画像</view> <view class="bgt2-btn3" bindtap="addImg">画像</view>
<view class="bgt2-btn4" bindtap="openPreview" wx:if="{{!Preview}}">预览</view> <view class="bgt2-btn4" bindtap="openPreview">预览</view>
<view class="bgt2-btn5" bindtap="openShowSend" wx:if="{{!Preview}}">寄出</view> <view class="bgt2-btn5" bindtap="openShowSend">寄出</view>
<view class="bgt2-yz"></view> <view class="bgt2-yz"></view>
</view> </view>
@ -86,11 +82,11 @@
</view> </view>
</view> </view>
</view> </view>
<!-- showSoundMore -->
<view class="taost" wx:if="{{showSoundMore}}"> <view class="taost" wx:if="{{showSoundMore}}">
<view class="taost-box"> <view class="taost-box">
<view class="taost-box-text">最多只能添加</view> <view class="taost-box-text">最多只能添加</view>
<view class="taost-box-text">3条语</view> <view class="taost-box-text">3条语</view>
<view class="taost-box-btn" bindtap="closeShowSoundMore">好的</view> <view class="taost-box-btn" bindtap="closeShowSoundMore">好的</view>
</view> </view>
</view> </view>
@ -104,10 +100,8 @@
</view> </view>
<view class="taost" wx:if="{{showSend}}"> <view class="taost" wx:if="{{showSend}}">
<view class="taost-box"> <view class="taost-box2">
<view class="taost-box-text">确定要寄出吗?</view> <view class="taost-box-text2">确定要寄出吗?</view>
<view class="taost-box-text">信件寄出后,再次使用晶石激活</view>
<view class="taost-box-text">将直接提示打开信件</view>
<view class="Send-btn"> <view class="Send-btn">
<view class="taost-box-btn" bindtap="closeShowSend">取消</view> <view class="taost-box-btn" bindtap="closeShowSend">取消</view>
<view class="taost-box-btn" bindtap="already">确定</view> <view class="taost-box-btn" bindtap="already">确定</view>
@ -115,20 +109,35 @@
</view> </view>
</view> </view>
<view class="already" wx:if="{{showAlready}}"> <!-- 预览页面 -->
<view class="already-top"></view> <view wx:if="{{Preview}}" class="preview">
<view class="already-img"></view> <!-- 信件主体内容 -->
<view class="already-text"> <view class="preview-content">
<view class="already-text1">你的信件已打包好!</view> <view class="content">
<view class="already-text1">快把晶石送给收信人吧!</view> <view class="preview-content-title">To{{to}}</view>
<view class="already-text3">收信人首次将晶石贴近手机</view>
<view class="already-text2">将会提示打开信件</view> <view wx:for="{{messageList}}" wx:key="index">
<view class="already-text2">点击OK回到未激活初始页面</view> <!-- 信条 -->
<view class="already-text2">如果误打开信件,需要再次寄出哦!</view> <view class="preview-content-main" wx:if="{{item.type === 'text' && item.content !== ''}}">
<view class="already-btn"> <t-textarea bindblur="getTextValue" data-index="{{item.index}}" autosize="true" value="{{item.content}}" disabled/>
<view class="btn" bindtap="modify">修改</view> </view>
<view class="btn" bindtap="logout">OK</view> <!-- 语音 -->
</view> <view class="preview-content-ltqp" bindtap="listen" wx:if="{{item.type === 'audio'}}" data-url="{{item}}">
</view> <image src="https://wish-assets.windymuse.com.cn/xy/%E8%AF%AD%E9%9F%B3.png"></image>
<view class="already-bom"></view> <view class="text">{{item.extra.duration}}</view>
</view>
<!-- 图片 -->
<view class="preview-content-img" wx:if="{{item.type === 'graphic'}}">
<image src="{{item.img}}" mode="widthFix"></image>
</view>
</view>
<view class="preview-content-end">Form{{from}}</view>
</view>
</view>
<view class="preview-bkg">
<view class="preview-yz"></view>
</view>
<view class="preview-btn" bindtap="openPreview"><view class="preview-btn-img" /></view>
</view> </view>

@ -54,43 +54,26 @@ page {
.xinfo-content { .xinfo-content {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding-bottom: 100rpx; padding-bottom: 300rpx;
padding-top: 60rpx;
box-sizing: border-box; box-sizing: border-box;
overflow: auto; overflow: auto;
position: relative; position: relative;
pointer-events: auto; pointer-events: auto;
} background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/zx-bkg.png);
.xinfo-yl {
width: 100%;
height: 200rpx;
} }
.xinfo-title { .xinfo-title {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
margin-top: 60rpx; margin-bottom: 60rpx;
padding-left: 64rpx; padding-left: 64rpx;
box-sizing: border-box; box-sizing: border-box;
font-size: 28rpx; font-size: 28rpx;
color: rgba(108, 108, 108, 1); 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 {
width: 100%;
text-align: end;
margin-top: 30rpx;
padding-right: 64rpx;
box-sizing: border-box;
font-size: 32rpx;
color: rgba(108, 108, 108, 1);
}
.title-to { .title-to {
display: flex; display: flex;
@ -129,7 +112,7 @@ page {
.xinfo-main { .xinfo-main {
width: 100%; width: 100%;
margin: 60rpx 0 32rpx 0; margin-bottom: 40rpx;
padding: 0 64rpx; padding: 0 64rpx;
box-sizing: border-box; box-sizing: border-box;
} }
@ -153,29 +136,13 @@ textarea {
position: relative; position: relative;
width: 382rpx; width: 382rpx;
height: 84rpx; height: 84rpx;
margin: 0 0 20rpx 64rpx; margin: 0 0 40rpx 64rpx;
display: flex; display: flex;
align-items: center; align-items: center;
background-size: contain; background-size: contain;
background-image: url(https://wish-assets.windymuse.com.cn/xy/ltqpp.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/ltqpp.png);
} }
.xinfo-ltqp-yl {
position: relative;
width: 382rpx;
height: 84rpx;
margin: 0 0 20rpx 64rpx;
display: flex;
align-items: center;
background-size: contain;
background-image: url(https://wish-assets.windymuse.com.cn/xy/ltqpp.png);
}
.xinfo-ltqp-yl image {
width: 100%;
height: 100%;
}
.xinfo-ltqp image { .xinfo-ltqp image {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -183,7 +150,7 @@ textarea {
.xinfo-ltqp-text { .xinfo-ltqp-text {
color: rgba(79, 79, 79, 1); color: rgba(79, 79, 79, 1);
font-size: 14px; font-size: 28rpx;
} }
.xinfo-yuying { .xinfo-yuying {
@ -202,23 +169,11 @@ textarea {
.xinfo-img { .xinfo-img {
position: relative; position: relative;
width: 480rpx; width: 480rpx;
margin: 40rpx 0 0 64rpx; margin: 0 0 40rpx 64rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
.xinfo-img-yl {
position: relative;
width: 480rpx;
margin: 40rpx 0 0 64rpx;
display: flex;
justify-content: center;
}
.xinfo-img-yl image {
width: 100%;
}
.xinfo-img image { .xinfo-img image {
width: 100%; width: 100%;
} }
@ -356,6 +311,17 @@ textarea {
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4);
} }
.taost-box2 {
width: 586rpx;
height: 434rpx;
padding-top: 88rpx;
box-sizing: border-box;
border-radius: 15px;
background-color: rgba(255, 255, 255, 1);
text-align: center;
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4);
}
.sound { .sound {
position: relative; position: relative;
width: 100%; width: 100%;
@ -485,17 +451,29 @@ textarea {
} }
.taost-box-text { .taost-box-text {
margin-bottom: 20rpx;
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: center;
align-items: center;
color: rgba(108, 108, 108, 1);
font-size: 38rpx;
}
.taost-box-text2 {
margin-bottom: 20rpx; margin-bottom: 20rpx;
width: 100%;
height: 200rpx;
display: flex;
justify-content: center; justify-content: center;
align-items: center;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 18px; font-size: 38rpx;
} }
.taost-box-btn { .taost-box-btn {
width: 210rpx; width: 210rpx;
height: 64rpx; height: 70rpx;
margin: 80rpx auto; margin: 80rpx auto;
border-radius: 20rpx; border-radius: 20rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%); background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
@ -518,88 +496,137 @@ textarea {
margin: 20rpx 0; margin: 20rpx 0;
} }
.already { editor {
position: absolute; background-color: pink;
width: 100%;
height: 100%;
z-index: 999;
background-color: #fff;
} }
.already-top {
width: 100%;
height: 230rpx;
margin-top: 104rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/bgt1.png);
background-size: contain;
}
.already-bom { /* 预览页面样式 */
position: absolute; .preview {
bottom: 0; position: relative;
width: 100%; width: 100%;
height: 230rpx; height: 100%;
background-size: contain; display: flex;
justify-content: center;
} }
.already-img { .preview-content {
margin: 0 auto; width: 616rpx;
width: 660rpx; height: 1280rpx;
height: 522rpx; margin-top: 132rpx;
background-size: contain; background-size: 100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/xzt.png); background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/zx-bkg.png);
} }
.already-text { .preview-content .content{
width: 100%; width: 616rpx;
margin-top: 80rpx; height: 1280rpx;
margin-top: 18rpx;
overflow-y: scroll;
} }
.already-text1 { .preview-bkg {
position: absolute;
bottom: -190rpx;
width: 100%; width: 100%;
height: 924rpx;
background-size: 100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/bgt2.png);
pointer-events: none;
display: flex; display: flex;
justify-content: center; justify-content: center;
color: rgba(108, 108, 108, 1);
font-size: 18px;
margin-bottom: 10rpx;
} }
.already-text2 { .preview-btn {
width: 100%; position: absolute;
left: 32rpx;
bottom: 132rpx;
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%);
color: rgba(16, 16, 16, 1);
box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
font-family: -apple-system;
border: 6rpx solid rgba(255, 255, 255, 1);
display: flex; display: flex;
justify-content: center; justify-content: center;
color: rgba(108, 108, 108, 1); align-items: center;
font-size: 14px;
margin-top: 20rpx;
} }
.already-text3 { .preview-btn-img {
width: 100%; width: 60rpx;
display: flex; height: 60rpx;
justify-content: center; background-size: cover;
color: rgba(108, 108, 108, 1); background-image: url(https://wish-assets.windymuse.com.cn/xy/iconPark-return%401x.png);
font-size: 14px; }
margin-top: 72rpx;
.preview-content-title {
color: #6c6c6c;
font-size: 32rpx;
text-align: left;
font-weight: 700;
margin: 50rpx 0 32rpx 60rpx;
}
.preview-content-end {
color: #6c6c6c;
font-size: 32rpx;
text-align: right;
font-weight: 700;
margin: 50rpx 60rpx 80rpx 0;
}
.preview-content-main {
color: #6c6c6c;
font-size: 32rpx;
margin: 0 60rpx 40rpx 60rpx;
} }
.already-btn { .preview-content-main .t-textarea {
width: 100%; width: 100%;
margin-top: 48rpx; padding: 0;
font-size: 28rpx;
background-color: rgba(0, 0, 0, 0);
}
.preview-content-ltqp {
position: relative;
width: 382rpx;
height: 84rpx;
margin: 0 0 40rpx 64rpx;
display: flex; display: flex;
justify-content: space-around; align-items: center;
background-size: contain;
background-image: url(https://wish-assets.windymuse.com.cn/xy/ltqpp.png);
} }
.already-btn .btn { .preview-content-ltqp image {
width: 210rpx; margin: 0 40rpx;
width: 70rpx;
height: 70rpx; 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%); .preview-content-ltqp .text {
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); color: rgba(79, 79, 79, 1);
border: 3px solid rgba(255, 255, 255, 1); font-size: 14px;
}
.preview-content-img {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; margin-bottom: 40rpx;
color: #fff; }
z-index: 999;
.preview-content-img image {
width: 480rpx;
}
.preview-yz {
width: 146rpx;
height: 146rpx;
margin-top: 470rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E5%8D%B0%E7%AB%A0.png);
background-size: cover;
pointer-events: auto;
} }

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

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

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

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

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

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

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

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

@ -13,13 +13,13 @@ Page({
content:'', content:'',
audioList:[], // 音频列表 audioList:[], // 音频列表
imgList:[], // 图片列表 imgList:[], // 图片列表
messageList: [], //消息列表
sound:'', sound:'',
soundTime:'00:00:00', soundTime:'00:00:00',
duration: '', duration: '',
minute:0, //分 minute:0, //分
second:0, //秒 second:0, //秒
millisecond:0, //毫秒 millisecond:0, //毫秒
showBtn:true,
showImgBig:false, //图片太大弹层 showImgBig:false, //图片太大弹层
showSoundMore:false, //语音太多提示 showSoundMore:false, //语音太多提示
showSend:false, //寄出提示 showSend:false, //寄出提示
@ -33,20 +33,36 @@ Page({
btn3:false, btn3:false,
btn4:false, btn4:false,
showSoundImg:true, showSoundImg:true,
isPlaying: false, // 是否正在播放语音 isPlaying: false // 是否正在播放语音
}, },
already(){ already(){
console.log('确定寄出'); // 校验
this.setData({showAlready:true}) if (this.data.from === '') {
const list = [ ...this.data.audioList, ...this.data.imgList] wx.showToast({
list.push({ title: '寄件人不能为空',
type: 'text', icon: 'error'
content: this.data.content })
return this.setData({showSend: false})
}
if (this.data.to === '') {
wx.showToast({
title: '收件人不能为空',
icon: 'error'
})
return this.setData({showSend: false})
}
if (this.data.messageList.length <= 1) {
wx.showToast({
title: '写点东西吧',
icon: 'error'
}) })
return this.setData({showSend: false})
}
this.setData({showAlready:true})
const fromData = { const fromData = {
from: this.data.from, from: this.data.from,
to: this.data.to, to: this.data.to,
messageList: list, messageList: this.data.messageList,
status:'unread' status:'unread'
} }
console.log(fromData); console.log(fromData);
@ -74,46 +90,63 @@ Page({
closeShowImgToast(){this.setData({showImgToast: false})}, closeShowImgToast(){this.setData({showImgToast: false})},
openPreview(){ openPreview(){
console.log('预览'); console.log('预览');
this.setData({Preview:true}) this.setData({Preview : !this.data.Preview})
}, },
ClearYl(e){ ClearYl(e){
console.log('清除语音'); console.log('清除语音');
const id = e.currentTarget.dataset.id const id = e.currentTarget.dataset.id
const list = this.data.audioList.filter(item => { const list = this.data.messageList.filter(item => {
return item.resourceId !== id return item.resourceId !== id
}) })
this.setData({audioList: list}) this.setData({messageList: list})
}, },
ClearImg(e){ ClearImg(e){
console.log('清除图片'); console.log('清除图片');
const id = e.currentTarget.dataset.id const id = e.currentTarget.dataset.id
const list = this.data.imgList.filter(item => { const list = this.data.messageList.filter(item => {
return item.resourceId !== id return item.resourceId !== id
}) })
this.setData({imgList: list}) this.setData({messageList: list})
}, },
goBack(){ goBack(){
if (this.data.Preview) { wx.reLaunch({
this.setData({Preview: false}) url: '/pages/home/xx/index'
}else{ })
console.log('返回'); },
wx.navigateBack() // 获取文本框内容
getTextValue(e){
const index = e.currentTarget.dataset.index
const content = e.detail.value
const list = this.data.messageList.map(item => {
if (item.index === index) {
return {
...item,
content : content
} }
}
return item
})
this.setData({messageList: list})
}, },
// 上传图片 // 上传图片
addImg(){ addImg(){
console.log('添加图片'); wx.chooseImage({
wx.chooseMedia({ count: 9,
mediaType: 'image', sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => { success: (res) => {
const files = res.tempFiles[0] console.log(res);
if(files.size > 5 * 1024 * 1024 ){ const files = res.tempFiles
this.setData({showImgBig:true}) files.forEach(item => {
if(item.size > 5 * 1024 * 1024 ){
return this.setData({showImgBig:true})
} }
this.uploadFile(res.tempFiles[0].tempFilePath,'poster') this.uploadFile(item.path,'poster')
})
} }
}) })
}, },
// 文件上传 // 文件上传
uploadFile(file, type) { uploadFile(file, type) {
wx.uploadFile({ wx.uploadFile({
@ -129,40 +162,58 @@ Page({
}, },
success: (async(res) => { success: (async(res) => {
const data = JSON.parse(res.data); const data = JSON.parse(res.data);
console.log(data);
if (data.data.type === 'audio') { if (data.data.type === 'audio') {
console.log('添加音频'); console.log('添加音频');
const list = this.data.audioList const list = this.data.messageList
if(list.length >= 3){ const index = list.length + 1
const audioList = list.filter(item => {
return item.type === 'audio'
})
if(audioList.length >= 3){
this.setData({showSoundMore:true ,showSoundImg:true}) this.setData({showSoundMore:true ,showSoundImg:true})
console.log('语音太多了');
}else { }else {
list.push({ list.push({
type: 'audio', type: 'audio',
resourceId: data.data.id, resourceId: data.data.id,
duration: this.data.duration, duration: this.data.duration,
videoSrc: this.data.videoSrc, videoSrc: this.data.videoSrc,
index:index,
extra: {duration : this.data.ssec} extra: {duration : this.data.ssec}
}) })
this.setData({audioList: list}) list.push({
type: 'text',
content: '',
index: index + 1
})
this.setData({messageList: list})
} }
} else if (data.data.type === 'poster') { } else if (data.data.type === 'poster') {
console.log('添加图片'); console.log('添加图片');
const list = this.data.imgList const list = this.data.messageList
if (list.length >= 9) { const migList = list.filter(item => {
return item.type === 'graphic'
})
if (migList.length >= 9) {
this.setData({showImgToast : true}) this.setData({showImgToast : true})
}else { }else {
const index = list.length + 1
list.push({ list.push({
type: 'graphic', type: 'graphic',
resourceId: data.data.id, resourceId: data.data.id,
img: data.data.abUrl, img: data.data.abUrl,
index: index
})
list.push({
type: 'text',
content: '',
index: index + 1
}) })
this.setData({imgList: list, showImg:true}) this.setData({messageList: list, showImg:true})
} }
} }
}), }),
fail(res) { fail(res) {
console.log('上传失败'); console.log(res, '上传失败');
} }
}); });
}, },
@ -302,10 +353,32 @@ Page({
modify(){ modify(){
this.setData({showAlready: false, showSend: false}) this.setData({showAlready: false, showSend: false})
}, },
// 获取信札内容
getLetter(){ getLetter(){
console.log('获取当前用户信札内容');
req.getRequest('/api/user/curt/letter',{}).then(res => { req.getRequest('/api/user/curt/letter',{}).then(res => {
console.log(res); if (res.data.code === 200) {
console.log(res.data.data);
const data = res.data.data
const id = wx.getStorageSync('xinyuan-userInfo').id
if (!data.messageList.length) {
data.messageList.push({content: '', type: 'text', index: 1})
}
data.messageList.forEach((item, index) => {
item.index = index + 1
if (item.type === 'audio') {
const src = `https://xzjl-api.windymuse.cn/api/resource/${item.resourceId}?k=${id}`
item.videoSrc = src
}else if(item.type === 'graphic'){
const src = `https://xzjl-api.windymuse.cn/api/resource/${item.resourceId}?k=${id}`
item.img = src
}
})
this.setData({
from: data.from,
to: data.to,
messageList: data.messageList
})
}
}) })
}, },
// 点击音频试听 // 点击音频试听
@ -314,7 +387,7 @@ Page({
return; // 如果正在播放语音,则不触发事件 return; // 如果正在播放语音,则不触发事件
} }
const id = e.currentTarget.dataset.url.resourceId const id = e.currentTarget.dataset.url.resourceId
const videoSrc = this.data.audioList.find(item => { const videoSrc = this.data.messageList.find(item => {
return item.resourceId === id return item.resourceId === id
}).videoSrc }).videoSrc
console.log(videoSrc); console.log(videoSrc);
@ -333,6 +406,7 @@ Page({
this.setData({id:id}) this.setData({id:id})
}) })
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */

@ -1,11 +1,8 @@
<!--pages/home/xx/xz/xz.wxml--> <!--pages/home/xx/xz/xz.wxml-->
<view class="bgt1"></view> <view class="bgt1"></view>
<view class="xinfo"> <view class="xinfo" wx:if="{{!Preview}}">
<scroll-view scroll-y enhanced="{{true}}" show-scrollbar="{{false}}" class="xinfo-content"> <scroll-view scroll-y enhanced="{{true}}" show-scrollbar="{{false}}" class="xinfo-content">
<view class="xinfo-yl-title" wx:if="{{Preview}}"> <view class="xinfo-title">
To: {{to}}
</view>
<view class="xinfo-title" wx:if="{{!Preview}}">
<view class="title-to"> <view class="title-to">
<view class="text">To:</view> <view class="text">To:</view>
<t-input model:value="{{to}}" /> <t-input model:value="{{to}}" />
@ -15,39 +12,38 @@
<t-input model:value="{{from}}"/> <t-input model:value="{{from}}"/>
</view> </view>
</view> </view>
<view wx:for="{{messageList}}" wx:key="index">
<!-- 信件文本 --> <!-- 信件文本 -->
<view class="xinfo-main"> <view class="xinfo-main" wx:if="{{item.type === 'text'}}">
<t-textarea autosize="true" model:value="{{content}}" placeholder="信件正文" /> <t-textarea bindblur="getTextValue" data-index="{{item.index}}" autosize="true" value="{{item.content}}" placeholder="信件正文" />
</view> </view>
<!-- 信件语音 --> <!-- 信件语音 -->
<view class="{{Preview ? 'xinfo-ltqp-yl' : 'xinfo-ltqp'}}" wx:for="{{audioList}}" wx:key="index" bindtap="listen" data-url="{{item}}"> <view class="xinfo-ltqp" wx:if="{{item.type === 'audio'}}" bindtap="listen" data-url="{{item}}">
<image class="xinfo-yuying" src="https://wish-assets.windymuse.com.cn/xy/%E8%AF%AD%E9%9F%B3.png"></image> <image class="xinfo-yuying" src="https://wish-assets.windymuse.com.cn/xy/%E8%AF%AD%E9%9F%B3.png"></image>
<view class="xinfo-ltqp-text">{{item.extra.duration}}</view> <view class="xinfo-ltqp-text">{{item.extra.duration}}</view>
<t-icon class="xinfo-close" name="close-circle" size="48rpx" wx:if="{{!Preview}}" bindtap="ClearYl" data-id="{{item.resourceId}}"/> <t-icon class="xinfo-close" name="close-circle" size="48rpx" catchtap="ClearYl" data-id="{{item.resourceId}}"/>
</view> </view>
<!-- 信件图片 --> <!-- 信件图片 -->
<view class="{{Preview ? 'xinfo-img-yl' : 'xinfo-img'}}" wx:for="{{imgList}}" wx:key="index"> <view class="xinfo-img" wx:if="{{item.type === 'graphic'}}">
<image src="{{item.img}}" mode="widthFix"></image> <image src="{{item.img}}" mode="widthFix"></image>
<view class="xinfo-img-close" bindtap="ClearImg" data-id="{{item.resourceId}}"> <view class="xinfo-img-close" bindtap="ClearImg" data-id="{{item.resourceId}}">
<t-icon name="close-circle" size="48rpx" wx:if="{{!Preview}}"/> <t-icon name="close-circle" size="48rpx"/>
</view> </view>
</view> </view>
<view class="xinfo-yl-form" wx:if="{{Preview}}">
From: {{from}}
</view> </view>
<view class="xinfo-yl" wx:if="{{Preview}}"></view>
</scroll-view> </scroll-view>
</view> </view>
<view class="bgt2" wx:if="{{showBtn}}">
<view class="bgt2" wx:if="{{!Preview}}">
<view class="bgt2-btn1" bindtap="goBack"> <view class="bgt2-btn1" bindtap="goBack">
<image src="https://wish-assets.windymuse.com.cn/xy/iconPark-return%401x.png"></image> <image src="https://wish-assets.windymuse.com.cn/xy/iconPark-return%401x.png"></image>
</view> </view>
<view class="bgt2-btn2" bindtap="openSound" wx:if="{{!Preview}}">音讯</view> <view class="bgt2-btn2" bindtap="openSound">音讯</view>
<view class="bgt2-btn3" bindtap="addImg" wx:if="{{!Preview}}">画像</view> <view class="bgt2-btn3" bindtap="addImg">画像</view>
<view class="bgt2-btn4" bindtap="openPreview" wx:if="{{!Preview}}">预览</view> <view class="bgt2-btn4" bindtap="openPreview">预览</view>
<view class="bgt2-btn5" bindtap="openShowSend" wx:if="{{!Preview}}">寄出</view> <view class="bgt2-btn5" bindtap="openShowSend">寄出</view>
<view class="bgt2-yz"></view> <view class="bgt2-yz"></view>
</view> </view>
@ -90,7 +86,7 @@
<view class="taost" wx:if="{{showSoundMore}}"> <view class="taost" wx:if="{{showSoundMore}}">
<view class="taost-box"> <view class="taost-box">
<view class="taost-box-text">最多只能添加</view> <view class="taost-box-text">最多只能添加</view>
<view class="taost-box-text">3条语</view> <view class="taost-box-text">3条语</view>
<view class="taost-box-btn" bindtap="closeShowSoundMore">好的</view> <view class="taost-box-btn" bindtap="closeShowSoundMore">好的</view>
</view> </view>
</view> </view>
@ -104,7 +100,7 @@
</view> </view>
<view class="taost" wx:if="{{showSend}}"> <view class="taost" wx:if="{{showSend}}">
<view class="taost-box"> <view class="taost-box2">
<view class="taost-box-text">确定要寄出吗?</view> <view class="taost-box-text">确定要寄出吗?</view>
<view class="taost-box-text">信件寄出后,再次使用晶石激活</view> <view class="taost-box-text">信件寄出后,再次使用晶石激活</view>
<view class="taost-box-text">将直接提示打开信件</view> <view class="taost-box-text">将直接提示打开信件</view>
@ -132,3 +128,36 @@
</view> </view>
<view class="already-bom"></view> <view class="already-bom"></view>
</view> </view>
<!-- 预览页面 -->
<view wx:if="{{Preview}}" class="preview">
<!-- 信件主体内容 -->
<view class="preview-content">
<view class="content">
<view class="preview-content-title">To{{to}}</view>
<view wx:for="{{messageList}}" wx:key="index">
<!-- 信条 -->
<view class="preview-content-main" wx:if="{{item.type === 'text' && item.content !== ''}}">
<t-textarea bindblur="getTextValue" data-index="{{item.index}}" autosize="true" value="{{item.content}}" disabled/>
</view>
<!-- 语音 -->
<view class="preview-content-ltqp" bindtap="listen" wx:if="{{item.type === 'audio'}}" data-url="{{item}}">
<image src="https://wish-assets.windymuse.com.cn/xy/%E8%AF%AD%E9%9F%B3.png"></image>
<view class="text">{{item.extra.duration}}</view>
</view>
<!-- 图片 -->
<view class="preview-content-img" wx:if="{{item.type === 'graphic'}}">
<image src="{{item.img}}" mode="widthFix"></image>
</view>
</view>
<view class="preview-content-end">Form{{from}}</view>
</view>
</view>
<view class="preview-bkg">
<view class="preview-yz"></view>
</view>
<view class="preview-btn" bindtap="openPreview"><view class="preview-btn-img" /></view>
</view>

@ -54,43 +54,26 @@ page {
.xinfo-content { .xinfo-content {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding-bottom: 100rpx; padding-bottom: 300rpx;
padding-top: 60rpx;
box-sizing: border-box; box-sizing: border-box;
overflow: auto; overflow: auto;
position: relative; position: relative;
pointer-events: auto; pointer-events: auto;
} background-size: cover;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/zx-bkg.png);
.xinfo-yl {
width: 100%;
height: 200rpx;
} }
.xinfo-title { .xinfo-title {
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
margin-top: 60rpx; margin-bottom: 60rpx;
padding-left: 64rpx; padding-left: 64rpx;
box-sizing: border-box; box-sizing: border-box;
font-size: 28rpx; font-size: 28rpx;
color: rgba(108, 108, 108, 1); 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 {
width: 100%;
text-align: end;
margin-top: 30rpx;
padding-right: 64rpx;
box-sizing: border-box;
font-size: 32rpx;
color: rgba(108, 108, 108, 1);
}
.title-to { .title-to {
display: flex; display: flex;
@ -129,7 +112,7 @@ page {
.xinfo-main { .xinfo-main {
width: 100%; width: 100%;
margin: 60rpx 0 32rpx 0; margin-bottom: 40rpx;
padding: 0 64rpx; padding: 0 64rpx;
box-sizing: border-box; box-sizing: border-box;
} }
@ -153,29 +136,13 @@ textarea {
position: relative; position: relative;
width: 382rpx; width: 382rpx;
height: 84rpx; height: 84rpx;
margin: 0 0 20rpx 64rpx; margin: 0 0 40rpx 64rpx;
display: flex; display: flex;
align-items: center; align-items: center;
background-size: contain; background-size: contain;
background-image: url(https://wish-assets.windymuse.com.cn/xy/ltqpp.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/ltqpp.png);
} }
.xinfo-ltqp-yl {
position: relative;
width: 382rpx;
height: 84rpx;
margin: 0 0 20rpx 64rpx;
display: flex;
align-items: center;
background-size: contain;
background-image: url(https://wish-assets.windymuse.com.cn/xy/ltqpp.png);
}
.xinfo-ltqp-yl image {
width: 100%;
height: 100%;
}
.xinfo-ltqp image { .xinfo-ltqp image {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -202,23 +169,11 @@ textarea {
.xinfo-img { .xinfo-img {
position: relative; position: relative;
width: 480rpx; width: 480rpx;
margin: 40rpx 0 0 64rpx; margin: 0 0 40rpx 64rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
.xinfo-img-yl {
position: relative;
width: 480rpx;
margin: 40rpx 0 0 64rpx;
display: flex;
justify-content: center;
}
.xinfo-img-yl image {
width: 100%;
}
.xinfo-img image { .xinfo-img image {
width: 100%; width: 100%;
} }
@ -356,6 +311,17 @@ textarea {
box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4);
} }
.taost-box2 {
width: 586rpx;
height: 434rpx;
padding-top: 88rpx;
box-sizing: border-box;
border-radius: 30rpx;
background-color: rgba(255, 255, 255, 1);
text-align: center;
box-shadow: 2rpx 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
}
.sound { .sound {
position: relative; position: relative;
width: 100%; width: 100%;
@ -490,7 +456,7 @@ textarea {
margin-bottom: 20rpx; margin-bottom: 20rpx;
justify-content: center; justify-content: center;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 18px; font-size: 36rpx;
} }
.taost-box-btn { .taost-box-btn {
@ -499,7 +465,7 @@ textarea {
margin: 80rpx auto; margin: 80rpx auto;
border-radius: 20rpx; border-radius: 20rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%); background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
border: 6rpx solid rgba(255, 255, 255, 1); border: 6rpx solid rgba(255, 255, 255, 1);
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -603,3 +569,138 @@ textarea {
color: #fff; color: #fff;
z-index: 999; z-index: 999;
} }
editor {
background-color: pink;
}
/* 预览页面样式 */
.preview {
position: relative;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
}
.preview-content {
width: 616rpx;
height: 1280rpx;
margin-top: 132rpx;
background-size: 100% 100%;
background-image: url(https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/zx-bkg.png);
}
.preview-content .content{
width: 616rpx;
height: 1280rpx;
margin-top: 18rpx;
overflow-y: scroll;
}
.preview-bkg {
position: absolute;
bottom: -190rpx;
width: 100%;
height: 924rpx;
background-size: 100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/bgt2.png);
pointer-events: none;
display: flex;
justify-content: center;
}
.preview-btn {
position: absolute;
left: 32rpx;
bottom: 132rpx;
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%);
color: rgba(16, 16, 16, 1);
box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
font-family: -apple-system;
border: 6rpx solid rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
}
.preview-btn-img {
width: 60rpx;
height: 60rpx;
background-size: cover;
background-image: url(https://wish-assets.windymuse.com.cn/xy/iconPark-return%401x.png);
}
.preview-content-title {
color: #6c6c6c;
font-size: 32rpx;
text-align: left;
font-weight: 700;
margin: 50rpx 0 32rpx 60rpx;
}
.preview-content-end {
color: #6c6c6c;
font-size: 32rpx;
text-align: right;
font-weight: 700;
margin: 50rpx 60rpx 80rpx 0;
}
.preview-content-main {
color: #6c6c6c;
font-size: 32rpx;
margin: 0 60rpx 40rpx 60rpx;
}
.preview-content-main .t-textarea {
width: 100%;
padding: 0;
font-size: 28rpx;
background-color: rgba(0, 0, 0, 0);
}
.preview-content-ltqp {
position: relative;
width: 382rpx;
height: 84rpx;
margin: 0 0 40rpx 64rpx;
display: flex;
align-items: center;
background-size: contain;
background-image: url(https://wish-assets.windymuse.com.cn/xy/ltqpp.png);
}
.preview-content-ltqp image {
margin: 0 40rpx;
width: 70rpx;
height: 70rpx;
}
.preview-content-ltqp .text {
color: rgba(79, 79, 79, 1);
font-size: 14px;
}
.preview-content-img {
display: flex;
justify-content: center;
margin-bottom: 40rpx;
}
.preview-content-img image {
width: 480rpx;
}
.preview-yz {
width: 146rpx;
height: 146rpx;
margin-top: 470rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E5%8D%B0%E7%AB%A0.png);
background-size: cover;
pointer-events: auto;
}

@ -9,18 +9,11 @@ Page({
data: { data: {
xzInfo:{}, xzInfo:{},
userInfo:{}, userInfo:{},
loverInfo:{},
xyNfc:true, xyNfc:true,
xyInfo:{}, xyInfo:{},
visible:false, visible:false,
showEnergy:true showEnergy:false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.initXy()
this.getXzTp()
}, },
/**获取星座图片对应关系 */ /**获取星座图片对应关系 */
getXzTp(){ getXzTp(){
@ -32,10 +25,12 @@ Page({
console.log(err); console.log(err);
}) })
}, },
initXy(){ initXy(){
req.getRequest('/api/user/curt',{}).then((res)=>{ req.getRequest('/api/user/curt',{}).then((res)=>{
if(res.data.code==200){ if(res.data.code==200){
this.setData({userInfo:res.data.data}) this.setData({userInfo:res.data.data})
wx.setStorageSync('xinyuan-userInfo',res.data.data)
this.isFirst() this.isFirst()
} }
}).catch((err)=>{ }).catch((err)=>{
@ -43,18 +38,40 @@ Page({
}) })
this.setData({xyInfo:wx.getStorageSync('nfc')}) this.setData({xyInfo:wx.getStorageSync('nfc')})
}, },
// 获取情侣信息
getUserLoverInfo(){
req.getRequest('/api/user/curt/lover',{}).then((res)=>{
if(res.data.code==200){
this.setData({loverInfo:res.data.data})
wx.setStorageSync('xinyuan-userLoveInfo',res.data.data)
}
}).catch((err)=>{
console.log(err);
})
},
// 关闭运势提示 // 关闭运势提示
closeYs(){ closeYs(){
this.setData({visible: !this.data.visible, showEnergy: true}) this.setData({
if (this.data.visible) { visible: false ,
showEnergy: false
})
clearTimeout(this.data.time)
},
openYs(){
this.setData({
visible: true ,
showEnergy: true
})
const time = setTimeout(() => { const time = setTimeout(() => {
this.setData({showEnergy: false}) this.setData({
showEnergy: false
})
}, 1000); }, 1000);
this.setData({time : time}) this.setData({
} time: time
if (!this.data.visible) { })
clearTimeout(this.data.time)
}
}, },
// 判断是否第一次登入 // 判断是否第一次登入
@ -66,19 +83,26 @@ Page({
visible: false visible: false
}) })
}else { }else {
if (this.data.userInfo.horoscope) { this.setData({
this.setData({visible: true, showIsFirst: false}) visible: true ,
showEnergy: true
})
setTimeout(() => { setTimeout(() => {
this.setData({showEnergy: false}) this.setData({
}, 3000); showEnergy: false
} })
}, 2000);
} }
}, },
// 关闭第一次登入弹层 // 关闭第一次登入弹层
closeFirst(){ closeFirst(){
console.log('关闭弹层'); console.log('关闭弹层');
this.setData({showIsFirst: false}) this.setData({
showIsFirst: false,
visible: true
})
wx.setStorageSync('isFirst', false)
}, },
childTap() { childTap() {
console.log('子盒子被点击'); console.log('子盒子被点击');
@ -88,10 +112,25 @@ Page({
upImprove(){ upImprove(){
const mac = wx.getStorageSync('mac-key') const mac = wx.getStorageSync('mac-key')
req.patchRequest('/api/user/curt/horoscope/improve',{mac: mac}).then(res => { req.patchRequest('/api/user/curt/horoscope/improve',{mac: mac}).then(res => {
console.log(res); })
},
// 获取系统默认图片列表
getDefaultAvatars(){
req.getRequest('/api/dict/value/horoscope-resource',{}).then(res => {
wx.setStorageSync('xy-static-img', res.data.data)
}) })
}, },
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.initXy()
this.getXzTp()
this.getUserLoverInfo()
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
@ -104,6 +143,9 @@ Page({
onShow() { onShow() {
this.initXy() this.initXy()
this.upImprove() this.upImprove()
this.getDefaultAvatars()
this.getUserLoverInfo()
this.isFirst()
}, },
/** /**

@ -1,18 +1,18 @@
<!--pages/home/xy/index.wxml--> <!--pages/home/xy/index.wxml-->
<view class="jrys"></view> <view class="jrys"></view>
<view class="gold111"></view> <view class="gold111"></view>
<view class="gold" bindtap="closeYs"> <view class="gold" bindtap="openYs">
<view class="gold1"></view> <view class="gold1"></view>
<view class="gold2"></view> <view class="gold2"></view>
<view class="gold3" bindtap="ToastDialog"></view> <view class="gold3"></view>
</view> </view>
<view class="book"></view> <view class="book"></view>
<view class="star" bindtap="closeYs"></view> <view class="star" bindtap="openYs"></view>
<view class="xyszy">{{userInfo.horoscope.number}}</view> <view class="xyszy">{{userInfo.horoscope.number}}</view>
<view class="xyysy">{{userInfo.horoscope.color}}</view> <view class="xyysy">{{userInfo.horoscope.color}}</view>
<view class="text1">幸运数字</view> <view class="text1">幸运数字</view>
<view class="text2">{{userInfo.horoscope.name}}</view> <view class="text2">{{userInfo.constellation}}</view>
<view class="text3">幸运颜色</view> <view class="text3">幸运颜色</view>
<view class="showEnergy {{showEnergy ? '' : 'hide'}}"> <view class="showEnergy {{showEnergy ? '' : 'hide'}}">
@ -21,19 +21,23 @@
</view> </view>
<image class="xzy" src="{{xzInfo[userInfo.horoscope.name].avatar}}"></image> <image class="xzy" src="{{xzInfo[userInfo.constellation].avatar}}"></image>
<view class="ttpopup" wx:if="{{visible}}" bindtap="closeYs"> <view class="ttpopup" wx:if="{{visible}}" bindtap="closeYs">
<view class="ztys">{{userInfo.horoscope.summary}}</view> <view class="ztys">{{userInfo.horoscope.summary}}</view>
<view class="ttpopup-box">
<view class="ttpopup-img"/> <view class="ttpopup-img"/>
<view class="rjkzs">健康指数<t-rate value="{{userInfo.horoscope.health / 20}}" icon="{{ ['star-filled', 'star'] }}" color="#FCFC32" /></view> <view class="rjkzs">健康指数<t-rate value="{{userInfo.horoscope.health / 20}}" icon="{{ ['star-filled', 'star'] }}" color="#FCFC32" /></view>
<view class="raqzs">爱情指数<t-rate value="{{userInfo.horoscope.love / 20}}" icon="{{ ['star-filled', 'star'] }}" color="#FCFC32" /></view> <view class="raqzs">爱情指数<t-rate value="{{userInfo.horoscope.love / 20}}" icon="{{ ['star-filled', 'star'] }}" color="#FCFC32" /></view>
<view class="rcyzs">财运指数<t-rate value="{{userInfo.horoscope.money / 20}}" icon="{{ ['star-filled', 'star'] }}" color="#FCFC32" /></view> <view class="rcyzs">财运指数<t-rate value="{{userInfo.horoscope.money / 20}}" icon="{{ ['star-filled', 'star'] }}" color="#FCFC32" /></view>
</view> </view>
</view>
<!-- 第一次登入欢迎页面 --> <!-- 第一次登入欢迎页面 -->
<view class="isFirst" bindtap="closeFirst" wx:if="{{showIsFirst}}"> <view class="isFirst" bindtap="closeFirst" wx:if="{{showIsFirst}}">
<view class="isFirst-img" catchtap="childTap"></view> <view class="isFirst-img" catchtap="childTap">
<image mode="heightFix" src="{{xzInfo[userInfo.constellation].sprite[userInfo.spriteType]}}" />
</view>
<view class="isFirst-box" catchtap="childTap"> <view class="isFirst-box" catchtap="childTap">
<view>Hi~</view> <view>Hi~</view>
<view>我是你的星座守护精灵</view> <view>我是你的星座守护精灵</view>

@ -41,10 +41,10 @@
} }
.gold111{ .gold111{
position: absolute; position: absolute;
left: 70px; left: 140rpx;
top: 179px; top: 358rpx;
width: 240px; width: 480rpx;
height: 240px; height: 480rpx;
background-image: url(https://wish-assets.windymuse.com.cn/xy/gold1.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/gold1.png);
} }
.gold2{ .gold2{
@ -213,11 +213,12 @@
.ttpopup{ .ttpopup{
position: absolute; position: absolute;
top: 374rpx; /* top: 320rpx; */
bottom: 290rpx;
left: 44rpx; left: 44rpx;
width: 660rpx; width: 660rpx;
height: 804rpx; /* height: 860rpx; */
padding: 98rpx 46rpx 0 46rpx; padding: 90rpx 46rpx 0 46rpx;
box-sizing: border-box; box-sizing: border-box;
border-radius: 30rpx; border-radius: 30rpx;
background-color: rgba(255, 255, 255, 0.9); background-color: rgba(255, 255, 255, 0.9);
@ -228,6 +229,11 @@
z-index: 999; z-index: 999;
} }
.ttpopup-box {
margin-bottom: 50rpx;
}
.ttpopup-img { .ttpopup-img {
width: 480rpx; width: 480rpx;
height: 22rpx; height: 22rpx;
@ -238,7 +244,7 @@
.ztys{ .ztys{
width: 596rpx; width: 596rpx;
height: 318rpx; /* height: 318rpx; */
color: #6C6C6C; color: #6C6C6C;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -255,7 +261,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
color: #6C6C6C; color: #6C6C6C;
font-size: 14px; font-size: 28rpx;
padding-left: 68rpx; padding-left: 68rpx;
box-sizing: border-box; box-sizing: border-box;
} }
@ -265,7 +271,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
color: #6C6C6C; color: #6C6C6C;
font-size: 14px; font-size: 28rpx;
padding-left: 68rpx; padding-left: 68rpx;
box-sizing: border-box; box-sizing: border-box;
} }
@ -274,7 +280,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
color: #6C6C6C; color: #6C6C6C;
font-size: 14px; font-size: 28rpx;
padding-left: 68rpx; padding-left: 68rpx;
box-sizing: border-box; box-sizing: border-box;
} }
@ -336,11 +342,15 @@
} }
.isFirst-img { .isFirst-img {
width: 328rpx; width: 600rpx;
height: 774rpx; height: 774rpx;
margin-top: 290rpx; margin-top: 290rpx;
background-size: contain; display: flex;
background-image: url(https://ydxxkj-wish.oss-cn-hangzhou.aliyuncs.com/xy/isFistImg.png); justify-content: center;
}
.isFirst-img image {
height: 100%;
} }
.isFirst-box { .isFirst-box {
@ -348,7 +358,7 @@
top: 600rpx; top: 600rpx;
width: 514rpx; width: 514rpx;
height: 300rpx; height: 300rpx;
padding: 40rpx 66rpx; padding: 40rpx 0 40rpx 66rpx;
box-sizing: border-box; box-sizing: border-box;
border-radius: 30rpx; border-radius: 30rpx;
opacity: 0.9; opacity: 0.9;

@ -36,15 +36,14 @@ Page({
showToast:false, //显示提示弹层 showToast:false, //显示提示弹层
showCanvas:false showCanvas:false
}, },
handleAdd(e){/**添加图片 */ // 添加图片
const { fileList } = this.data; handleAdd(e){
const { files } = e.detail; // 上传图片显示loading
wx.showLoading({
// 方法1选择完所有图片之后统一上传因此选择完就直接展示 title: '图片上传中',
this.setData({ mask: true
fileList: [...fileList, ...files], // 此时设置了 fileList 之后才会展示选择的图片 })
}); this.uploadFile(e.detail.files[0])
files.forEach(file => this.uploadFile(file))
}, },
handleRemove(e){/**删除图片 */ handleRemove(e){/**删除图片 */
const { index } = e.detail; const { index } = e.detail;
@ -56,7 +55,6 @@ 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,
@ -68,19 +66,14 @@ Page({
formData: { formData: {
type: 'poster' type: 'poster'
}, },
success: async res => { success: res => {
let data = JSON.parse(res.data); let data = JSON.parse(res.data);
if (data.code == 200) { if (data.code === 200) {
this.setData({imgUrl:data.data.abUrl}) this.setData({
res.data = JSON.parse(res.data); imgUrl: data.data.abUrl,
if (res.data.code == 1) { fileList: [file]
console.log(res.data.data.url); })
this.img = this.baseUrl + res.data.data.url; wx.hideLoading()
// 图片路径
this.userinfo.avatar = res.data.data.url;
// let n = await this.$api.upload({ file: res.data.fullurl });
// console.log(n, '上传后');
}
} }
}, },
fail(res) { fail(res) {
@ -137,6 +130,10 @@ Page({
doCancelXy(){/**取消许愿 */ doCancelXy(){/**取消许愿 */
this.setData({ this.setData({
visible: false, visible: false,
xyContent: '',
note: '',
xyLink: '',
fileList: []
}); });
}, },
@ -160,12 +157,38 @@ Page({
duration: 5000 duration: 5000
}) })
}else{ }else{
console.log('图片地址', this.data.imgUrl); // 判断是否修改数据
console.log('图片地址', this.data.xyLink); if (this.data.id) {
req.postRequest('/api/user/curt/wish',{content:this.data.xyContent,deadline:this.data.note,img:this.data.imgUrl,link:this.data.xyLink}).then((res)=>{ return req.patchRequest(`/api/user/curt/wish/${this.data.id}`,{
console.log('许愿成功11111') content:this.data.xyContent,
console.log(res) deadline:this.data.note,
if(res.data.code==200){ img:this.data.imgUrl,
link:this.data.xyLink}).then(res => {
console.log(res);
if (res.data.code === 200) {
this.setData({
visible: false,
xyContent:'',
xyLink:'',
note:'',
imgUrl:'',
fileList:[]
})
wx.showToast({
title: '修改愿望成功',
icon: 'success'
})
}
})
}
req.postRequest('/api/user/curt/wish',{
content:this.data.xyContent,
deadline:this.data.note,
img:this.data.imgUrl,
link:this.data.xyLink
}).then((res)=>{
if(res.data.code === 200){
this.setData({ this.setData({
visible: false, visible: false,
}); });
@ -182,16 +205,14 @@ Page({
}) })
wx.hideTabBar() wx.hideTabBar()
},2000) },2000)
this.initXy()
}else{ }else{
console.log('额外情况')
wx.showToast({ wx.showToast({
title:res.data.msg, title:res.data.msg,
icon: 'none', icon: 'none',
duration: 5000 duration: 5000
}) })
} }
}).catch((err)=>{ }).catch((err)=>{
wx.showToast({ wx.showToast({
title:'出错了:'+err.data.msg, title:'出错了:'+err.data.msg,
@ -199,7 +220,6 @@ Page({
duration: 5000 duration: 5000
}) })
}) })
console.log('许愿成功111')
} }
@ -213,7 +233,6 @@ Page({
this.setData({single:false}) this.setData({single:false})
} }
} }
console.log(this.userInfo);
}).catch((err)=>{ }).catch((err)=>{
console.log(err); console.log(err);
}) })
@ -317,12 +336,13 @@ startDraw() {
const that = this const that = this
wx.saveImageToPhotosAlbum({ wx.saveImageToPhotosAlbum({
filePath: url, filePath: url,
success: function() { success: () => {
wx.showToast({ wx.showToast({
title: '保存成功', title: '保存成功',
icon: 'none', icon: 'none',
duration: 1500 duration: 1500
}); });
this.setData({showCanvas: false})
}, },
fail(err) { fail(err) {
if (err.errMsg === "saveImageToPhotosAlbum:fail:auth denied" || err.errMsg === "saveImageToPhotosAlbum:fail auth deny" || err.errMsg === "saveImageToPhotosAlbum:fail authorize no response") { if (err.errMsg === "saveImageToPhotosAlbum:fail:auth denied" || err.errMsg === "saveImageToPhotosAlbum:fail auth deny" || err.errMsg === "saveImageToPhotosAlbum:fail authorize no response") {
@ -379,12 +399,40 @@ startDraw() {
}) })
}, },
// 获取愿望详情 修改愿望
getWishDetaile(id){
req.getRequest(`/api/user/curt/wish/${id}`,{}).then(res => {
console.log(res,'22222');
if (res.data.code === 200) {
const data = res.data.data
const list = [{
url: data.img,
type: 'image'
}]
this.setData({
visible: true,
xyContent: data.content,
note: data.deadline,
xyLink: data.link,
fileList: list,
imgUrl: data.img,
id: data.id
})
}
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.initXy() this.initXy()
this.getMyWish() this.getMyWish()
// 修改愿望
if (options.id) {
this.getWishDetaile(options.id)
}
}, },
/** /**
@ -399,6 +447,7 @@ startDraw() {
*/ */
onShow() { onShow() {
this.getMyWish() this.getMyWish()
this.initXy()
}, },
/** /**

@ -4,8 +4,14 @@
<view class="xybtn3" wx:if="{{!userInfo.loverId}}" bindtap="go2MyYw">我的愿望<view class="xyctoast">{{wishes.length}}</view></view> <view class="xybtn3" wx:if="{{!userInfo.loverId}}" bindtap="go2MyYw">我的愿望<view class="xyctoast">{{wishes.length}}</view></view>
<!--非单身情况下--> <!--非单身情况下-->
<view class="qlxybtn2" wx:if="{{userInfo.loverId}}"><text class="btn21">银币</text><text class="btn22">{{userInfo.silverCoin}}枚</text></view> <view class="qlxybtn2" wx:if="{{userInfo.loverId}}">
<view class="qlxybtn21" wx:if="{{userInfo.loverId}}" bindtap="go2TaYw">Ta的愿望<view class="xyctoast">{{LoveWishes.length}}</view></view> <text class="btn21">银币</text>
<text class="btn22">{{userInfo.silverCoin}}枚</text>
</view>
<view class="qlxybtn21" wx:if="{{userInfo.loverId}}" bindtap="go2TaYw">
Ta的愿望
<view class="xyctoast">{{LoveWishes.length}}</view>
</view>
<view class="qlxybtn22" wx:if="{{userInfo.loverId}}" bindtap="go2MyYw">我的愿望<view class="xyctoast">{{wishes.length}}</view></view> <view class="qlxybtn22" wx:if="{{userInfo.loverId}}" bindtap="go2MyYw">我的愿望<view class="xyctoast">{{wishes.length}}</view></view>
<view class="bgt3" ></view> <view class="bgt3" ></view>
<view class="bgt2" ></view> <view class="bgt2" ></view>
@ -20,7 +26,7 @@
<view class="ttop1-item"> <view class="ttop1-item">
<view class="xynr">许愿内容</view> <view class="xynr">许愿内容</view>
<t-textarea class="xynrf" model:value="{{xyContent}}" t-class="external-class" placeholder="内容限制30个字" /> <t-textarea class="xynrf" maxlength="30" model:value="{{xyContent}}" t-class="external-class" placeholder="内容限制30个字" />
</view> </view>
<view class="ttop1-item"> <view class="ttop1-item">
@ -47,7 +53,7 @@
<view class="ttop1-item"> <view class="ttop1-item">
<view class="xytp">许愿图片</view> <view class="xytp">许愿图片</view>
<t-upload class="xytpt" <t-upload class="xytpt"
mediaType="{{['video','image']}}" mediaType="{{['image']}}"
max="{{1}}" max="{{1}}"
files="{{fileList}}" files="{{fileList}}"
bind:add="handleAdd" bind:add="handleAdd"
@ -73,35 +79,29 @@
<!-- 许愿祝福中 --> <!-- 许愿祝福中 -->
<view class="xyc-process" wx:if="{{showXyz}}"> <view class="xyc-process" wx:if="{{showXyz}}">
<t-image src="/images/hourglass.gif"/> <t-image src="https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/hourglass.gif"/>
<view>愿望祝福中……</view> <view>愿望祝福中……</view>
</view> </view>
<!--愿望详情--> <!--愿望详情-->
<view wx:if="{{showDetail}}" class="wishdetail-box"> <view wx:if="{{showDetail}}" class="wishdetail-box">
<view class="wishdetail"> <view class="wishdetail" bindtap="closeDetail">
<!-- <view class="popbox" bindtap="closeDetail">
<t-image src="https://wish-assets.windymuse.com.cn/xy/jt.gif"/>
<view class="yximg"><t-image src="{{item.img}}"></t-image></view>
<view class="ywwz2">愿望</view>
<view class="ywxq2">{{item.content}}</view>
<view class="qwsj2">期望时间</view>
<view class="qwsjtxt2">{{item.deadline}}</view>
</view> -->
<canvas canvas-id="myCanvas" class="myCanvas" wx:if="{{showCanvas}}"></canvas> <canvas canvas-id="myCanvas" class="myCanvas" wx:if="{{showCanvas}}"></canvas>
<view id="my-canvas" class="my_canvas" bindtap="closeDetail"> <view id="my-canvas" class="my_canvas">
<image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif"></image> <image class="logosta my_draw_canvas" src="https://oss.wish.ydxxkj.top/xy/jt.gif" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif"></image>
<image class="popbox my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/detailbkg.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/detailbkg.png"/> <image class="popbox my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/detailbkg.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/detailbkg.png"/>
<image class="yximg my_draw_canvas" src="{{item.img}}" data-type="image" data-url="{{item.img}}"/> <view class="yximg-box my_draw_canvas" data-url="{{detail.img}}" data-type="image" >
<image class="yximg my_draw_canvas" mode="heightFix" src="{{item.img}}" data-type="image" data-url="{{item.img}}"/>
</view>
<text class="ywwz2 my_draw_canvas" data-type="text" data-text="愿望">愿望</text> <text class="ywwz2 my_draw_canvas" data-type="text" data-text="愿望">愿望</text>
<view class="ywxq2 my_draw_canvas" data-type="text" data-text="{{item.content}}">{{item.content}}</view> <view class="ywxq2 my_draw_canvas" data-type="text" data-text="{{item.content}}">{{item.content}}</view>
<view class="qwsj2 my_draw_canvas" data-type="text" data-text="期望时间">期望时间</view> <view class="qwsj2 my_draw_canvas" data-type="text" data-text="期望时间">期望时间</view>
<view class="qwsjtxt2 my_draw_canvas" data-type="text" data-text="{{item.deadline}}">{{item.deadline}}</view> <view class="qwsjtxt2 my_draw_canvas" data-type="text" data-text="{{item.deadline}}">{{item.deadline}}</view>
</view> </view>
<view class="anwz1"> <view class="anwz1" bindtap="closeDetail">
<view class="anwz1-tb" bindtap="openShare"> <view class="anwz1-tb" catchtap="openShare">
<t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image> <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image>
</view> </view>
<view class="anwztxt1">分享</view> <view class="anwztxt1">分享</view>
@ -124,7 +124,7 @@
</button> </button>
<view class="item-text">微信</view> <view class="item-text">微信</view>
</view> </view>
<view class="box-item"> <!-- <view class="box-item">
<view class="item-icon cyan"> <view class="item-icon cyan">
<t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-pyq.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-pyq.png"></t-image>
</view> </view>
@ -147,7 +147,7 @@
<t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-qqkj.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-qqkj.png"></t-image>
</view> </view>
<view class="item-text">QQ空间</view> <view class="item-text">QQ空间</view>
</view> </view> -->
<view class="box-item"> <view class="box-item">
<view class="item-icon orange" bindtap="gitImg"> <view class="item-icon orange" bindtap="gitImg">
<t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-tp.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-tp.png"></t-image>

@ -43,7 +43,7 @@
border-radius: 30rpx; border-radius: 30rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%); background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
text-align: center; text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
border: 20rpx solid rgba(255, 255, 255, 1); border: 20rpx solid rgba(255, 255, 255, 1);
} }
@ -52,65 +52,65 @@
margin-left: 98rpx; margin-left: 98rpx;
margin-top: 193rpx; margin-top: 193rpx;
width: 200rpx; width: 200rpx;
height: 67.495rpx; height: 70rpx;
border-radius: 10px; border-radius: 20rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%); background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
text-align: center; box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); border: 6rpx solid rgba(255, 255, 255, 1);
border: 3px solid rgba(255, 255, 255, 1);
line-height: 67.495rpx;
color: aliceblue; color: aliceblue;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
font-size: 30rpx; font-size: 30rpx;
display: flex;
justify-content: center;
align-items: center;
} }
.qlxybtn2{ .qlxybtn2{
position: absolute; position: absolute;
margin-left: 30rpx; margin-left: 30rpx;
margin-top: 193rpx; margin-top: 193rpx;
width: 200rpx; width: 210rpx;
height: 67.495rpx; height: 70rpx;
border-radius: 10px; border-radius: 20rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%); background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
text-align: center; box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); border: 6rpx solid rgba(255, 255, 255, 1);
border: 3px solid rgba(255, 255, 255, 1);
line-height: 67.495rpx;
color: aliceblue; color: aliceblue;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
font-size: 30rpx; font-size: 30rpx;
display: flex;
align-items: center;
justify-content: center;
} }
.qlxybtn21{ .qlxybtn21{
position: absolute; position: absolute;
margin-left: 270rpx; margin-left: 270rpx;
margin-top: 193rpx; margin-top: 193rpx;
width: 200rpx; width: 210rpx;
height: 67.495rpx; height: 70rpx;
border-radius: 10px; border-radius: 20rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%); background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
text-align: center; box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
border: 3px solid rgba(255, 255, 255, 1); border: 3px solid rgba(255, 255, 255, 1);
line-height: 67.495rpx;
color: aliceblue; color: aliceblue;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
font-size: 30rpx; font-size: 30rpx;
display: flex;
align-items: center;
justify-content: center;
} }
.qlxybtn22{ .qlxybtn22{
position: absolute; position: absolute;
margin-left: 510rpx; margin-left: 510rpx;
margin-top: 193rpx; margin-top: 193rpx;
width: 200rpx; width: 210rpx;
height: 67.495rpx; height: 70rpx;
border-radius: 10px; border-radius: 20rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%); background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
text-align: center; box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); border: 6rpx solid rgba(255, 255, 255, 1);
border: 3px solid rgba(255, 255, 255, 1);
line-height: 67.495rpx;
color: aliceblue; color: aliceblue;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
font-size: 30rpx; font-size: 30rpx;
display: flex;
align-items: center;
justify-content: center;
} }
.btn21{ .btn21{
margin-left:10rpx; margin-left:10rpx;
@ -126,17 +126,16 @@
margin-left: 452rpx; margin-left: 452rpx;
margin-top: 193rpx; margin-top: 193rpx;
width: 200rpx; width: 200rpx;
height: 67.495rpx; height: 70rpx;
line-height: 67.495rpx;
text-align: center;
color: aliceblue; color: aliceblue;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
font-size: 30rpx; font-size: 30rpx;
border-radius: 10px; border-radius: 20rpx;
background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%); background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%);
text-align: center; box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); border: 6rpx solid rgba(255, 255, 255, 1);
border: 3px solid rgba(255, 255, 255, 1); display: flex;
align-items: center;
justify-content: center;
} }
.bgt3{ .bgt3{
@ -424,14 +423,23 @@
margin-top: 20rpx; margin-top: 20rpx;
} }
.yximg{ .yximg-box {
position: absolute; position: absolute;
left: 80rpx; left: 80rpx;
top: 164rpx; top: 164rpx;
width: 460rpx;
height: 308rpx;
border-radius: 10px;
display: flex;
justify-content: center;
}
.yximg{
width: 460rpx; width: 460rpx;
height: 308rpx; height: 308rpx;
border-radius: 10px; border-radius: 10px;
background-color: #767686; background-color: #767686;
text-align: center;
} }
.yximg .t-image { .yximg .t-image {
@ -454,12 +462,15 @@
.ywxq2{ .ywxq2{
position: absolute; position: absolute;
top: 632rpx; top: 632rpx;
width: 100%; left: 30rpx;
width: 560rpx;
/* padding: 0 50rpx;
box-sizing: border-box; */
height: 150rpx; height: 150rpx;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 36rpx; font-size: 36rpx;
text-align: center; text-align: center;
font-family: SourceHanSansSC-regular; overflow: hidden;
} }
.qwsj2{ .qwsj2{
position: absolute; position: absolute;
@ -540,6 +551,7 @@
height: 462rpx; height: 462rpx;
margin-bottom: 68rpx; margin-bottom: 68rpx;
background-color: #fff; background-color: #fff;
z-index: 99999999;
} }
.popup-main .main-top { .popup-main .main-top {
@ -595,7 +607,7 @@
} }
.popup-main .main-box .box-item .item-text { .popup-main .main-box .box-item .item-text {
font-size: 12px; font-size: 24rpx;
color: #A2A2A2; color: #A2A2A2;
} }
@ -620,9 +632,9 @@
.logosta { .logosta {
position: absolute; position: absolute;
top: 20rpx; top: 20rpx;
left: 270rpx; left: 280rpx;
width: 50px; width: 70rpx;
height: 50px; height: 70rpx;
z-index: 1; z-index: 1;
} }

@ -13,8 +13,25 @@ Page({
visible:false, visible:false,
shareVisible:false, //分享弹层 shareVisible:false, //分享弹层
wishes:[], wishes:[],
showCanvas: true showCanvas: true,
ywUrl: '' //愿望链接
}, },
// 复制链接
handerCopy(){
if (this.data.ywUrl) {
wx.setClipboardData({
data: this.data.ywUrl,
success() {
wx.showToast({
title: '已复制',
icon: 'success',
duration: 1500
});
}
});
}
},
// 分享微信 // 分享微信
shareWx(){ shareWx(){
console.log('分享微信') console.log('分享微信')
@ -192,8 +209,29 @@ startDraw() {
}) })
}, },
go2WishDetail(e){/**查看愿望详情 */ go2WishDetail(e){/**查看愿望详情 */
this.setData({visible:true,detail:e.currentTarget.dataset.wish}) const status = e.currentTarget.dataset.wish.status
this.setData({detail:e.currentTarget.dataset.wish}) // 获取分享链接
if (status === 'processing') {
const token = wx.getStorageSync('token')
req.postRequest('/api/v1/wx/generate-url-link',{
path: '/pages/home/xyc/tdyw/tdyw',
query: `token=${token}`
}).then(res => {
console.log(res);
if (res.data.code === 200) {
this.setData({
ywUrl : res.data.data.urlLink,
visible:true,detail:e.currentTarget.dataset.wish,
detail:e.currentTarget.dataset.wish
})
}
})
}else {
this.setData({
visible:true,detail:e.currentTarget.dataset.wish,
detail:e.currentTarget.dataset.wish
})
}
}, },
onVisibleChange(e) { onVisibleChange(e) {
this.setData({ this.setData({
@ -221,7 +259,12 @@ startDraw() {
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
if (options.token) {
wx.setStorageSync('token', options.token)
this.getMyWish() this.getMyWish()
}else {
this.getMyWish()
}
}, },
/** /**

@ -2,6 +2,8 @@
"usingComponents": { "usingComponents": {
"t-image": "tdesign-miniprogram/image/image", "t-image": "tdesign-miniprogram/image/image",
"t-popup": "tdesign-miniprogram/popup/popup", "t-popup": "tdesign-miniprogram/popup/popup",
"t-dialog": "tdesign-miniprogram/dialog/dialog" "t-dialog": "tdesign-miniprogram/dialog/dialog",
"t-input": "tdesign-miniprogram/input/input",
"t-icon": "tdesign-miniprogram/icon/icon"
} }
} }

@ -2,7 +2,7 @@
<!--返回图标--> <!--返回图标-->
<view class="top-header"> <view class="top-header">
<view class="header-reback" bindtap="go2Reback"></view> <view class="header-reback" bindtap="go2Reback"></view>
<view class="header-title">的愿望</view> <view class="header-title">Ta的愿望</view>
</view> </view>
<!-- 愿望内容 --> <!-- 愿望内容 -->
@ -50,10 +50,12 @@
<canvas canvas-id="myCanvas" class="myCanvas" wx:if="{{showCanvas}}"></canvas> <canvas canvas-id="myCanvas" class="myCanvas" wx:if="{{showCanvas}}"></canvas>
<view id="my-canvas" class="my_canvas" bindtap="changeVisible"> <view id="my-canvas" class="my_canvas" bindtap="changeVisible">
<image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/ywc.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/ywc.png" wx:if="{{detail.status=='completed'}}"></image> <image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/ywc.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/ywc.png" wx:if="{{detail.status=='completed'}}"></image>
<image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" wx:if="{{detail.status=='processing'}}"></image> <image class="logosta my_draw_canvas" src="https://oss.wish.ydxxkj.top/xy/jt.gif" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" wx:if="{{detail.status=='processing'}}"></image>
<image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/ygq.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/ygq.png" wx:if="{{detail.status=='expired'}}"></image> <image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/ygq.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/ygq.png" wx:if="{{detail.status=='expired'}}"></image>
<image class="popbox my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/detailbkg.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/detailbkg.png"/> <image class="popbox my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/detailbkg.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/detailbkg.png"/>
<image class="yximg my_draw_canvas" src="{{detail.img}}" data-type="image" data-url="{{detail.img}}"/> <view class="yximg-box my_draw_canvas" data-type="image" data-url="{{detail.img}}">
<image class="yximg my_draw_canvas" mode="heightFix" src="{{detail.img}}" data-type="image" data-url="{{detail.img}}"/>
</view>
<text class="ywwz my_draw_canvas" data-type="text" data-text="愿望">愿望</text> <text class="ywwz my_draw_canvas" data-type="text" data-text="愿望">愿望</text>
<view class="ywxq my_draw_canvas" data-type="text" data-text="{{detail.content}}">{{detail.content}}</view> <view class="ywxq my_draw_canvas" data-type="text" data-text="{{detail.content}}">{{detail.content}}</view>
<view class="qwsj my_draw_canvas" data-type="text" data-text="期望时间">期望时间</view> <view class="qwsj my_draw_canvas" data-type="text" data-text="期望时间">期望时间</view>
@ -61,35 +63,19 @@
</view> </view>
</view> </view>
<!--进行中按钮展示-->
<view class="ywcczk" wx:if="{{detail.status=='processing'}}"><!--进行中按钮展示--> <view class="ywcczk1" wx:if="{{detail.status=='processing'}}">
<view class="anwz1"> <t-input class="ywcczk-input" value="{{ywUrl}}" disabled align="center"/>
<view class="yqq" bindtap="go2DelDialog"></view> <view class="ywcczk-btn">
<view class="anwztxt1">删除</view> <view class="btn" bindtap="handerCopy">
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image> <image src="https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/semiDesign-semi-icons-link.png" />
</view>
<view class="anwz1">
<view class="yqq"></view>
<view class="anwztxt1">修改</view>
<t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lxg.png"></t-image>
</view>
<view class="anwz1">
<view class="yqq" bindtap="doFinishWish"></view>
<view class="anwztxt1" >已达成</view>
<t-image bindtap="doFinishWish" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lydc.png"></t-image>
</view>
<view class="anwz1" bindtap="showShare">
<view class="yqq"></view>
<view class="anwztxt1">分享</view>
<t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image>
</view> </view>
<view class="text">愿望链接,点击复制</view>
</view> </view>
<view class="ywcczk" wx:if="{{detail.status=='completed'}}"><!--已完成按钮展示-->
<view class="anwz1">
<view class="yqq" bindtap="go2DelDialog"></view>
<view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
</view> </view>
<!--已完成按钮展示-->
<view class="ywcczk" wx:if="{{detail.status=='completed'}}">
<view class="anwz1" bindtap="showShare"> <view class="anwz1" bindtap="showShare">
<view class="yqq"></view> <view class="yqq"></view>
<view class="anwztxt1">分享</view> <view class="anwztxt1">分享</view>
@ -97,11 +83,6 @@
</view> </view>
</view> </view>
<view class="ywcczk" wx:if="{{detail.status=='expired'}}"> <view class="ywcczk" wx:if="{{detail.status=='expired'}}">
<view class="anwz1">
<view class="yqq" bindtap="go2DelDialog"></view>
<view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
</view>
<view class="anwz1"> <view class="anwz1">
<view class="yqq"></view> <view class="yqq"></view>
<view class="anwztxt1">修改</view> <view class="anwztxt1">修改</view>
@ -112,25 +93,13 @@
</t-popup> </t-popup>
<!--确定删除对话框-->
<t-dialog
data-del="{{detail.id}}"
visible="{{showDelDialog}}"
content="确定要删除愿望吗?"
confirm-btn="{{ confirmBtn }}"
cancel-btn="取消"
confirm-btn="确定"
bind:confirm="confirmDelDialog"
bind:cancel="closeDelDialog"
/>
<!-- 分享 --> <!-- 分享 -->
<t-popup visible="{{shareVisible}}" placement="bottom"> <t-popup visible="{{shareVisible}}" placement="bottom">
<view class="popup-main"> <view class="popup-main">
<view class="main-top"> <view class="main-top">
<view></view> <view></view>
<view class="text">分享到</view> <view class="text">分享到</view>
<t-icon name="close" size="32" bindtap="showShare"/> <t-icon name="close" size="32" catchtap="showShare"/>
</view> </view>
<view class="main-box"> <view class="main-box">
<view class="box-item"> <view class="box-item">

@ -104,6 +104,9 @@
font-size: 28rpx; font-size: 28rpx;
font-weight: 700; font-weight: 700;
width: 320rpx; width: 320rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
.qwsjbox{ .qwsjbox{
@ -149,10 +152,18 @@
height: 1080rpx; height: 1080rpx;
} }
.yximg{ .yximg-box {
position: absolute; position: absolute;
left: 80rpx; left: 80rpx;
top: 164rpx; top: 164rpx;
width: 460rpx;
height: 308rpx;
border-radius: 10px;
display: flex;
justify-content: center;
}
.yximg{
width: 460rpx; width: 460rpx;
height: 308rpx; height: 308rpx;
border-radius: 10px; border-radius: 10px;
@ -323,7 +334,7 @@
} }
.popup-main .main-box .box-item .item-text { .popup-main .main-box .box-item .item-text {
font-size: 12px; font-size: 24rpx;
color: #A2A2A2; color: #A2A2A2;
} }
@ -400,3 +411,60 @@
width: 620rpx; width: 620rpx;
height: 1080rpx; height: 1080rpx;
} }
.ywcczk1{
position: absolute;
height:192rpx;
top:1290rpx;
width:750rpx;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.ywcczk-input {
width: 496rpx !important;
height: 70rpx !important;
padding: 0 !important;
flex: none !important;
border: 2rpx solid #EFEFEF;
border-radius: 20rpx;
background-color: rgba(255, 255, 255, 1);
font-size: 28rpx;
color: #000000 !important;
}
.ywcczk-btn {
width: 100%;
height: 84rpx;
margin-top: 32rpx;
display: flex;
align-items: center;
justify-content: center;
}
.ywcczk-btn .btn {
width: 84rpx;
height: 84rpx;
border-radius: 50%;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
border: 6rpx solid rgba(255, 255, 255, 1);
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
}
.ywcczk-btn .btn image {
width: 50rpx;
height: 50rpx;
}
.ywcczk-btn .text {
margin-left: 32rpx;
color: rgba(108, 108, 108, 1);
font-size: 28rpx;
}

@ -22,8 +22,8 @@ Page({
getImg(){ getImg(){
console.log('获取图片'); console.log('获取图片');
this.setData({shareVisible: false, showCanvas:true})
this.drawMyCanvas() this.drawMyCanvas()
this.setData({shareVisible: false, showCanvas:true})
}, },
drawMyCanvas() { drawMyCanvas() {
@ -87,12 +87,13 @@ startDraw() {
const that = this const that = this
wx.saveImageToPhotosAlbum({ wx.saveImageToPhotosAlbum({
filePath: url, filePath: url,
success: function() { success: () => {
wx.showToast({ wx.showToast({
title: '保存成功', title: '保存成功',
icon: 'none', icon: 'none',
duration: 1500 duration: 1500
}); });
this.setData({showCanvas : false})
}, },
fail(err) { fail(err) {
if (err.errMsg === "saveImageToPhotosAlbum:fail:auth denied" || err.errMsg === "saveImageToPhotosAlbum:fail auth deny" || err.errMsg === "saveImageToPhotosAlbum:fail authorize no response") { if (err.errMsg === "saveImageToPhotosAlbum:fail:auth denied" || err.errMsg === "saveImageToPhotosAlbum:fail auth deny" || err.errMsg === "saveImageToPhotosAlbum:fail authorize no response") {
@ -144,9 +145,6 @@ startDraw() {
this.setData({showDelDialog:false}) this.setData({showDelDialog:false})
}, },
confirmDelDialog(e){ confirmDelDialog(e){
console.log(e.target.dataset.del)
console.log('确定删除')
console.log(this.data.detail.id)
/**确定删除愿望 */ /**确定删除愿望 */
this.setData({showDelDialog:false}) this.setData({showDelDialog:false})
req.deleteRequest('/api/user/curt/wish/'+this.data.detail.id,{}).then((res)=>{ req.deleteRequest('/api/user/curt/wish/'+this.data.detail.id,{}).then((res)=>{
@ -155,7 +153,7 @@ startDraw() {
wx.showToast({ wx.showToast({
title:'愿望删除成功', title:'愿望删除成功',
icon: 'none', icon: 'none',
duration: 1000 duration: 1000,
}) })
this.getMyWish() this.getMyWish()
this.setData({ this.setData({
@ -180,6 +178,8 @@ startDraw() {
icon: 'none', icon: 'none',
duration: 1000 duration: 1000
}) })
this.getMyWish()
this.setData({visible: false})
}else{ }else{
wx.showToast({ wx.showToast({
title:res.data.msg, title:res.data.msg,
@ -201,14 +201,23 @@ startDraw() {
}); });
}, },
changeVisible(){ changeVisible(){
this.setData({visible:false, showCanvas:false}) this.setData({
visible:false,
showCanvas:false,
shareVisible: false
})
},
closeVisible(){
this.setData({visible : false})
}, },
go2Reback(){ go2Reback(){
wx.navigateBack({ changed: true }); // wx.navigateBack({ changed: true });
wx.switchTab({
url: '/pages/home/xyc/index'
})
}, },
getMyWish(){ getMyWish(){
req.getRequest('/api/user/curt/wish',{limit: '-1'}).then((res)=>{ req.getRequest('/api/user/curt/wish',{limit: '-1'}).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})
} }
@ -216,6 +225,14 @@ startDraw() {
console.log(err); console.log(err);
}) })
}, },
// 修改愿望 回显数据
editYw(){
console.log('1111');
const id = this.data.detail.id
wx.reLaunch({
url: '/pages/home/xyc/index?id=' + id
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载

@ -22,7 +22,7 @@
</view> </view>
<!-- 图标 --> <!-- 图标 -->
<view class="xy-icon" wx:if="{{item.status=='processing'}}"> <view class="xy-icon" wx:if="{{item.status=='processing'}}">
<t-image class="icon" src="https://oss.wish.ydxxkj.top/xy/jt.gif"></t-image> <t-image class="icon" src="https://wish-assets.oss-cn-hangzhou.aliyuncs.com/xy/jt.gif"></t-image>
<view class="text">进行中</view> <view class="text">进行中</view>
</view> </view>
@ -53,7 +53,10 @@
<image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" wx:if="{{detail.status=='processing'}}"></image> <image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/jxzdt.gif" wx:if="{{detail.status=='processing'}}"></image>
<image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/ygq.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/ygq.png" wx:if="{{detail.status=='expired'}}"></image> <image class="logosta my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/ygq.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/ygq.png" wx:if="{{detail.status=='expired'}}"></image>
<image class="popbox my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/detailbkg.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/detailbkg.png"/> <image class="popbox my_draw_canvas" src="https://wish-assets.windymuse.com.cn/xy/detailbkg.png" data-type="image" data-url="https://wish-assets.windymuse.com.cn/xy/detailbkg.png"/>
<image class="yximg my_draw_canvas" src="{{detail.img}}" data-type="image" data-url="{{detail.img}}"/> <view class="yximg-box my_draw_canvas" data-url="{{detail.img}}" data-type="image">
<image class="yximg my_draw_canvas" mode="heightFix" src="{{detail.img}}" data-type="image" data-url="{{detail.img}}"/>
</view>
<text class="ywwz my_draw_canvas" data-type="text" data-text="愿望">愿望</text> <text class="ywwz my_draw_canvas" data-type="text" data-text="愿望">愿望</text>
<view class="ywxq my_draw_canvas" data-type="text" data-text="{{detail.content}}">{{detail.content}}</view> <view class="ywxq my_draw_canvas" data-type="text" data-text="{{detail.content}}">{{detail.content}}</view>
<view class="qwsj my_draw_canvas" data-type="text" data-text="期望时间">期望时间</view> <view class="qwsj my_draw_canvas" data-type="text" data-text="期望时间">期望时间</view>
@ -61,68 +64,79 @@
</view> </view>
</view> </view>
<!--进行中按钮展示-->
<view class="ywcczk" wx:if="{{detail.status=='processing'}}"><!--进行中按钮展示--> <view class="ywcczk" wx:if="{{detail.status=='processing'}}">
<view class="anwz1"> <view class="anwz1">
<view class="yqq" bindtap="go2DelDialog"></view> <view class="yqq" bindtap="go2DelDialog">
<view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image> <t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
</view> </view>
<view class="anwztxt1">删除</view>
</view>
<view class="anwz1"> <view class="anwz1">
<view class="yqq"></view> <view class="yqq" bindtap='editYw'>
<view class="anwztxt1">修改</view>
<t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lxg.png"></t-image> <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lxg.png"></t-image>
</view> </view>
<view class="anwztxt1">修改</view>
</view>
<view class="anwz1"> <view class="anwz1">
<view class="yqq" bindtap="doFinishWish"></view> <view class="yqq" bindtap="doFinishWish">
<view class="anwztxt1" >已达成</view>
<t-image bindtap="doFinishWish" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lydc.png"></t-image> <t-image bindtap="doFinishWish" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lydc.png"></t-image>
</view> </view>
<view class="anwz1" bindtap="showShare"> <view class="anwztxt1" >已达成</view>
<view class="yqq"></view> </view>
<view class="anwztxt1">分享</view> <view class="anwz1" catchtap="showShare">
<view class="yqq">
<t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image> <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image>
</view> </view>
<view class="anwztxt1">分享</view>
</view> </view>
<view class="ywcczk" wx:if="{{detail.status=='completed'}}"><!--已完成按钮展示--> </view>
<!--已完成按钮展示-->
<view class="ywcczk" wx:if="{{detail.status=='completed'}}" bindtap="closeVisible">
<view class="anwz1"> <view class="anwz1">
<view class="yqq" bindtap="go2DelDialog"></view> <view class="yqq" catchtap="go2DelDialog">
<t-image catchtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
</view>
<view class="anwztxt1">删除</view> <view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
</view> </view>
<view class="anwz1" bindtap="showShare"> <view class="anwz1" catchtap="showShare">
<view class="yqq"></view> <view class="yqq">
<view class="anwztxt1">分享</view>
<t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image> <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lfc.png"></t-image>
</view> </view>
<view class="anwztxt1">分享</view>
</view>
</view> </view>
<view class="ywcczk" wx:if="{{detail.status=='expired'}}">
<!--已过期按钮展示-->
<view class="ywcczk" wx:if="{{detail.status=='expired'}}" bindtap="closeVisible">
<view class="anwz1"> <view class="anwz1">
<view class="yqq" bindtap="go2DelDialog"></view> <view class="yqq" catchtap="go2DelDialog">
<t-image catchtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
</view>
<view class="anwztxt1">删除</view> <view class="anwztxt1">删除</view>
<t-image bindtap="go2DelDialog" class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lsc.png"></t-image>
</view> </view>
<view class="anwz1"> <view class="anwz1">
<view class="yqq"></view> <view class="yqq" bindtap='editYw'>
<view class="anwztxt1">修改</view>
<t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lxg.png"></t-image> <t-image class="anzmlogo1" src="https://wish-assets.windymuse.com.cn/xy/lxg.png"></t-image>
</view> </view>
</view><!--已过期按钮展示--> <view class="anwztxt1">修改</view>
</view>
</view>
</t-popup> </t-popup>
<!--确定删除对话框--> <!--确定删除对话框-->
<t-dialog <view class="del-dialog" wx:if="{{showDelDialog}}">
data-del="{{detail.id}}" <view class="del-dialog-box">
visible="{{showDelDialog}}" <view class="del-dialog-box-text">确定要删除愿望吗?</view>
content="确定要删除愿望吗?" <view class="del-dialog-box-btn">
confirm-btn="{{ confirmBtn }}" <view class="btn" bindtap="closeDelDialog">取消</view>
cancel-btn="取消" <view class="btn" bindtap="confirmDelDialog" data-del="{{detail.id}}">确定</view>
confirm-btn="确定" </view>
bind:confirm="confirmDelDialog" </view>
bind:cancel="closeDelDialog" </view>
/>
<!-- 分享 --> <!-- 分享 -->
<t-popup visible="{{shareVisible}}" placement="bottom"> <t-popup visible="{{shareVisible}}" placement="bottom">
@ -130,7 +144,7 @@ data-del="{{detail.id}}"
<view class="main-top"> <view class="main-top">
<view></view> <view></view>
<view class="text">分享到</view> <view class="text">分享到</view>
<t-icon name="close" size="32" bindtap="showShare"/> <t-icon name="close" size="32" catchtap="showShare"/>
</view> </view>
<view class="main-box"> <view class="main-box">
<view class="box-item"> <view class="box-item">
@ -139,13 +153,13 @@ data-del="{{detail.id}}"
</button> </button>
<view class="item-text">微信</view> <view class="item-text">微信</view>
</view> </view>
<view class="box-item"> <!-- <view class="box-item">
<view class="item-icon cyan"> <view class="item-icon cyan">
<t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-pyq.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-pyq.png"></t-image>
</view> </view>
<view class="item-text">朋友圈</view> <view class="item-text">朋友圈</view>
</view> </view> -->
<view class="box-item"> <!-- <view class="box-item">
<view class="item-icon orange"> <view class="item-icon orange">
<t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-wb.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-wb.png"></t-image>
</view> </view>
@ -162,7 +176,7 @@ data-del="{{detail.id}}"
<t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-qqkj.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-qqkj.png"></t-image>
</view> </view>
<view class="item-text">QQ空间</view> <view class="item-text">QQ空间</view>
</view> </view> -->
<view class="box-item"> <view class="box-item">
<view class="item-icon orange" bindtap="getImg"> <view class="item-icon orange" bindtap="getImg">
<t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-tp.png"></t-image> <t-image src="https://wish-assets.windymuse.com.cn/xy/antFill-tp.png"></t-image>

@ -104,6 +104,9 @@
font-size: 28rpx; font-size: 28rpx;
font-weight: 700; font-weight: 700;
width: 320rpx; width: 320rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
.qwsjbox{ .qwsjbox{
@ -149,15 +152,23 @@
height: 1080rpx; height: 1080rpx;
} }
.yximg{ .yximg-box {
position: absolute; position: absolute;
left: 80rpx; left: 80rpx;
top: 164rpx; top: 164rpx;
width: 460rpx;
height: 308rpx;
display: flex;
justify-content: center;
}
.yximg{
width: 460rpx; width: 460rpx;
height: 308rpx; height: 308rpx;
border-radius: 10px; border-radius: 10px;
background-color: #767686; background-color: #767686;
} }
.ywwz{ .ywwz{
position: absolute; position: absolute;
top: 540rpx; top: 540rpx;
@ -174,6 +185,8 @@
top: 632rpx; top: 632rpx;
width: 100%; width: 100%;
height: 150rpx; height: 150rpx;
padding: 0 50rpx;
box-sizing: border-box;
color: rgba(108, 108, 108, 1); color: rgba(108, 108, 108, 1);
font-size: 36rpx; font-size: 36rpx;
text-align: center; text-align: center;
@ -201,16 +214,19 @@
.yqq{/*圆圈*/ .yqq{/*圆圈*/
border-radius: 50%; border-radius: 50%;
position: absolute; position: absolute;
width: 60px; width: 120rpx;
height:60px; height: 120rpx;
line-height: 120rpx; line-height: 120rpx;
background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%); background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%);
color: rgba(16, 16, 16, 1); color: rgba(16, 16, 16, 1);
font-size: 12px; font-size: 24rpx;
text-align: center; text-align: center;
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
font-family: Arial; font-family: Arial;
border: 3px solid rgba(255, 255, 255, 1); border: 6rpx solid rgba(255, 255, 255, 1);
display: flex;
align-items: center;
justify-content: center;
} }
.sc{ .sc{
@ -241,7 +257,7 @@
.anwz1{ .anwz1{
width: 120rpx; width: 120rpx;
height: 192rpx; height: 192rpx;
margin-right: 40rpx; margin-right: 50rpx;
} }
.anwz1:last-child { .anwz1:last-child {
@ -259,10 +275,8 @@
font-family: SourceHanSansSC-regular; font-family: SourceHanSansSC-regular;
} }
.anzmlogo1{ .anzmlogo1{
position: absolute; width: 74rpx;
margin: 21rpx; height: 74rpx;
width: 42px;
height: 42px;
} }
.popup-main { .popup-main {
@ -323,7 +337,7 @@
} }
.popup-main .main-box .box-item .item-text { .popup-main .main-box .box-item .item-text {
font-size: 12px; font-size: 24rpx;
color: #A2A2A2; color: #A2A2A2;
} }
@ -361,6 +375,57 @@
z-index: 1; z-index: 1;
} }
.del-dialog {
position: absolute;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
background-color: rgba(255, 255, 255, 0.8);
z-index: 9999999;
}
.del-dialog-box {
width: 586rpx;
height: 434rpx;
border-radius: 30rpx;
background-color: rgba(255, 255, 255, 1);
color: rgba(16, 16, 16, 1);
font-size: 28rpx;
box-shadow: 2rpx 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
}
.del-dialog-box-text {
width: 100%;
margin-top: 136rpx;
display: flex;
justify-content: center;
color: #6c6c6c;
font-size: 36rpx;
}
.del-dialog-box-btn {
width: 100%;
display: flex;
justify-content: space-around;
}
.del-dialog-box-btn .btn {
width: 210rpx;
height: 70rpx;
margin-top: 130rpx;
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 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
border: 6rpx solid rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1);
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
}
.myCanvas-popup { .myCanvas-popup {
height: 100vh; height: 100vh;
@ -388,8 +453,8 @@
position: absolute; position: absolute;
top: 20rpx; top: 20rpx;
left: 270rpx; left: 270rpx;
width: 50px; width: 80rpx;
height: 50px; height: 80rpx;
z-index: 1; z-index: 1;
} }

@ -7,13 +7,26 @@ import WxmpRsa from 'wxmp-rsa'
Page({ Page({
data: { data: {
showFail: false
}, },
// 此处为周期事件 // 此处为周期事件
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
closeShowFail(){
this.setData({
showFail: false
})
},
onLoad(options) { onLoad(options) {
// 绑定情侣时为未登入状态
if (options.loveMac) {
this.setData({
showFail: true
})
}
if(options&&options.sn&&options.sn!=null&&options.sn!=''){ if(options&&options.sn&&options.sn!=null&&options.sn!=''){
console.log('有数据'+options.sn) console.log('有数据'+options.sn)
wx.showToast({ wx.showToast({
@ -62,13 +75,11 @@ Page({
}, },
/**扫码事件 */ /**扫码事件 */
scanCodeEvent(){ scanCodeEvent(){
var that = this;
var DEV_CODE = ""
//扫码代码 //扫码代码
wx.scanCode({ wx.scanCode({
onlyFromCamera: true,// 只允许从相机扫码 onlyFromCamera: true,// 只允许从相机扫码
success(res){ success: (res) => {
that.login('scan',res.result) this.login('scan',res.result)
}, },
}) })
}, },
@ -79,29 +90,11 @@ Page({
* code为用户码参数用户码为空则代表为扫码登录 * code为用户码参数用户码为空则代表为扫码登录
*/ */
login(mode,code){ login(mode,code){
console.log(mode,'模式'); let DEV_CODE = code
console.log(code, 'code'); let PUBLIC_KEY = ""
//如果有token直接进入
if(wx.getStorageSync('token')){
wx.showToast({
title:'有token'+wx.getStorageSync('token'),
icon: 'none',
duration: 5000
})
wx.switchTab({
url: '/pages/home/xy/index'
})
}
// wx.showToast({
// title:'没有token',
// icon: 'none',
// duration: 5000
// })
console.log('进入登录了!!!')
var DEV_CODE = code
var PUBLIC_KEY = ""
req.getRequest('/api/dict/value/login-public-key',{}).then((res)=>{ req.getRequest('/api/dict/value/login-public-key',{}).then((res)=>{
if(res.data.code==200){//获取公钥成功 if(res.data.code === 200){
//获取公钥成功
PUBLIC_KEY = res.data.data PUBLIC_KEY = res.data.data
// 实例化rsa // 实例化rsa
const rsa = new WxmpRsa() const rsa = new WxmpRsa()
@ -110,21 +103,17 @@ Page({
// 加密 // 加密
const mac = rsa.encryptLong(DEV_CODE) const mac = rsa.encryptLong(DEV_CODE)
wx.setStorageSync('mac-key', mac) wx.setStorageSync('mac-key', mac)
// 此处执行登录获取token操作 // 此处执行登录获取token操作
req.postRequest('/api/user/login',{'mac':mac}).then((res)=>{ req.postRequest('/api/user/login',{'mac':mac}).then((res)=>{
console.log(res); if(res.data.code === 200){
if(res.data.code==200){
wx.setStorageSync('token', res.data.data.token) wx.setStorageSync('token', res.data.data.token)
wx.setStorageSync('isFirst', res.data.data.isFirst) wx.setStorageSync('isFirst', res.data.data.isFirst)
// 设置当前设备码 // 设置当前设备码
wx.setStorageSync('code', DEV_CODE) wx.setStorageSync('code', DEV_CODE)
// 设置为初次识别NFC // 设置为初次识别NFC
wx.setStorageSync('nfc', false) wx.setStorageSync('nfc', false)
wx.showToast({ // 判断用户是否有未读信札
title:mode=='scan'?'扫码登录成功':'NFC识别成功',
icon: 'none',
duration: 1000
})
this.getLetter() this.getLetter()
}else if(res.data.code==500){ }else if(res.data.code==500){
this.loginErrorToast(mode) this.loginErrorToast(mode)
@ -144,9 +133,9 @@ Page({
console.log(err); console.log(err);
}) })
}, },
// 判断是否用未读信札 // 判断是否用未读信札
getLetter(){ getLetter(){
console.log(wx.getStorageSync('token'));
wx.request({ wx.request({
url: 'https://xzjl-api.windymuse.cn/api/user/curt', url: 'https://xzjl-api.windymuse.cn/api/user/curt',
header: {'Authorization': wx.getStorageSync('token')}, header: {'Authorization': wx.getStorageSync('token')},
@ -155,7 +144,6 @@ Page({
const letterStatus = res.data.data.letterStatus const letterStatus = res.data.data.letterStatus
// 这里可以判断是否有未读信札 // 这里可以判断是否有未读信札
if (letterStatus === 'sending') { if (letterStatus === 'sending') {
console.log('跳转信札页面');
wx.redirectTo({ wx.redirectTo({
url: '/pages/xz/index' url: '/pages/xz/index'
}) })

@ -15,3 +15,17 @@
</view> </view>
<t-toast id="t-toast" /> <t-toast id="t-toast" />
<!-- 绑定情侣未登入弹层 -->
<view class="binding-fail" wx:if="{{showFail}}">
<view class="binding-top">
<view class="top-img"></view>
<view class="top-text1">绑定失败</view>
<view class="top-text2">需要先唤醒精灵</view>
<view class="top-text3">绑定情侣用户需要先使用</view>
<view class="top-text4">晶石设备唤醒精灵</view>
</view>
<view class="binding-btm">
<view class="btm-btn">获取晶石</view>
<view class="btm-btn" bindtap="closeShowFail">好的</view>
</view>
</view>

@ -6,6 +6,7 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
box-sizing: border-box; box-sizing: border-box;
overflow-y: scroll;
} }
.bg{ .bg{
@ -97,3 +98,91 @@
background-size:100% 100%; background-size:100% 100%;
background-image: url(https://wish-assets.windymuse.com.cn/xy/yx.png); background-image: url(https://wish-assets.windymuse.com.cn/xy/yx.png);
} }
.binding-fail {
position: relative;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.9);
z-index: 1;
display: flex;
align-items: center;
flex-direction: column;
}
.binding-top {
width: 620rpx;
height: 1080rpx;
margin-top: 188rpx;
background-size: cover;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E7%BB%91%E5%AE%9A%E6%83%85%E4%BE%A3%E8%83%8C%E6%99%AF.png);
}
.top-img {
width: 404rpx;
height: 404rpx;
margin: 0 auto;
margin-top: 110rpx;
background-size: cover;
background-image: url(https://wish-assets.windymuse.com.cn/xy/%E9%92%BB%E7%9F%B3.png);
}
.top-text1 {
width: 100%;
margin-top: 52rpx;
display: flex;
justify-content: center;
color: rgba(248, 99, 42, 1);
font-size: 48rpx;
font-weight: 700;
}
.top-text2 {
width: 100%;
margin-top: 10rpx;
display: flex;
justify-content: center;
color: rgba(248, 99, 42, 1);
font-size: 48rpx;
font-weight: 700;
}
.top-text3 {
width: 100%;
margin-top: 42rpx;
display: flex;
justify-content: center;
color: rgba(108, 108, 108, 1);
font-size: 36rpx;
}
.top-text4 {
width: 100%;
margin-top: 10rpx;
display: flex;
justify-content: center;
color: rgba(108, 108, 108, 1);
font-size: 36rpx;
}
.binding-btm {
width: 100%;
margin-top: 42rpx;
display: flex;
justify-content: space-evenly;
}
.btm-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%);
text-align: center;
box-shadow: 0px 4rpx 12rpx 0px rgba(0, 0, 0, 0.4);
border: 6rpx solid rgba(255, 255, 255, 1);
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
}

@ -13,8 +13,13 @@ Page({
showLetter: true, showLetter: true,
showMore: false, showMore: false,
showDel:false, showDel:false,
showEdit: true,
imgList:[], imgList:[],
audioList:[] audioList:[],
messageList: [],
playVideos: true,
letterId: 0,
hy: false
}, },
openLetter(){ openLetter(){
this.setData({showLetter: !this.data.showLetter}), this.setData({showLetter: !this.data.showLetter}),
@ -45,14 +50,13 @@ Page({
// 判断是否有图片 // 判断是否有图片
console.log(messageList); console.log(messageList);
messageList.forEach(item => { messageList.forEach(item => {
if (item.type === 'text') { if(item.type === 'graphic') {
this.setData({content: item.content}) item.img = `https://xzjl-api.windymuse.cn/api/resource/${item.resourceId}?k=${id}`
}else if(item.type === 'graphic') {
this.getResource(id, item.resourceId, 'graphic')
}else if(item.type === 'audio') { }else if(item.type === 'audio') {
this.getResource(id, item.resourceId, 'audio',item.extra.duration) item.audio = `https://xzjl-api.windymuse.cn/api/resource/${item.resourceId}?k=${id}`
} }
}) })
this.setData({messageList: messageList})
}) })
}, },
getUserInfo(){ getUserInfo(){
@ -61,55 +65,216 @@ Page({
this.getLetterMsg(id) this.getLetterMsg(id)
}) })
}, },
// 获取文件
getResource(id,k,type,time){
if(type === 'graphic'){
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({
audioList:list
})
console.log(this.data.videos,'语音路径');
}
},
// 播放录音 // 播放录音
playVideos(e){ playVideos(e){
console.log(e.currentTarget.dataset.url.audio); if (this.data.playVideos) {
this.setData({playVideos: false})
const innerAudioContext = wx.createInnerAudioContext() const innerAudioContext = wx.createInnerAudioContext()
console.log(e.currentTarget.dataset.url.videoSrc);
if (e.currentTarget.dataset.url.videoSrc) {
innerAudioContext.src = e.currentTarget.dataset.url.videoSrc
}
if (e.currentTarget.dataset.url.audio) {
innerAudioContext.src = e.currentTarget.dataset.url.audio innerAudioContext.src = e.currentTarget.dataset.url.audio
}
innerAudioContext.play() innerAudioContext.play()
innerAudioContext.onEnded(() => {
this.setData({playVideos: true})
})
}
}, },
// 重置信札 // 重置信札
resetLetter(){ resetLetter(){
const id = this.data.letterId
// 判断单人状态信札跳转还是情侣状态
if (id) {
// 删除消息
console.log('删除消息');
if (id == -1) {
// 重置信札
req.putRequest('/api/user/curt/letter/reset',{}).then( res => { req.putRequest('/api/user/curt/letter/reset',{}).then( res => {
console.log(res, '重置成功'); if (res.data.code === 200) {
wx.switchTab({
url: '/pages/home/xx/lindex/lindex'
})
}
})
}else if(id == -2) {
wx.showToast({
title: '不能烧毁情侣信札',
icon: 'none'
}) })
this.setData({showDel : false})
}else {
req.deleteRequest(`/api/user/curt/message/${id}`,{}).then(res => {
console.log(res);
if (res.data.code === 200) {
wx.showToast({
title: '信件已烧毁',
icon: 'success'
})
setTimeout(() => {
if (this.data.hy) {
wx.redirectTo({
url: '/pages/home/xx/hy/index'
})
}else {
wx.redirectTo({
url: '/pages/home/xx/lindex/lindex'
})
}
}, 1000);
}
if (res.data.code === 1007) {
wx.showToast({
title: '不能删除情侣信札',
icon: 'none'
})
this.setData({showDel : false})
}
})
}
}else {
// 重置信札
req.putRequest('/api/user/curt/letter/reset',{}).then( res => {
if (res.data.code === 200) {
wx.switchTab({ wx.switchTab({
url: '/pages/home/xy/index' url: '/pages/home/xy/index'
}) })
}
})
}
}, },
go2Back(){ go2Back(){
if (this.data.letterId) {
if (this.data.hy) {
wx.redirectTo({
url: '/pages/home/xx/hy/index'
})
}else {
wx.redirectTo({
url: '/pages/home/xx/lindex/lindex'
})
}
}else {
wx.switchTab({ wx.switchTab({
url: '/pages/home/xy/index' url: '/pages/home/xy/index'
}) })
}
},
// 修改信札
editXz(){
wx.redirectTo({
url: '/pages/home/xx/xz/xz'
})
},
// 获取情侣状态下信札内容
getLetterDetail(id){
if (id == -1) {
this.getUserInfo()
}else if (id == -2) {
console.log('获取情侣信札内容');
this.getLoveLetter()
}else {
req.getRequest(`/api/user/curt/message/${id}`,{}).then(res => {
if(res.data.code === 200){
const letter = res.data.data.letter
const messages = letter.messages.map(item => {
if (item.extra && item.extra.videoSrc) {
return {
...item,
videoSrc: item.extra.videoSrc
}
}
if (item.extra && item.extra.img) {
return {
...item,
img: item.extra.img
}
}
if (item.content) {
return item
}
})
this.setData({
from: letter.from,
to: letter.to,
messageList: messages
})
// 判断是否为情侣信札 是就更改信札状态
const userInfo = wx.getStorageSync('xinyuan-userInfo')
const userId = userInfo.id
if (res.data.data.fromUserid !== userId && res.data.data.status === 'unread') {
req.patchRequest(`/api/user/curt/message/${id}/read`)
}
}else{
wx.showToast({
title: '获取信札内容失败',
icon: 'error'
})
}
})
}
},
// 获取情侣内容
getLoveLetter(){
const userInfo = wx.getStorageSync('xinyuan-userInfo')
const id = userInfo.loverId
req.getRequest('/api/user/curt/lover/letter',{}).then(res => {
console.log(res);
const { messageList } = res.data.data
// 获取创建时间
const date = new Date(res.header.Date);
// 获取年月日时分秒等信息
const year = date.getFullYear();
const month = date.getMonth() + 1;
const day = date.getDate();
const hour = date.getHours();
const minute = date.getMinutes();
const formattedDate = `${year}${month}${day}${hour}:${minute}`;
this.setData({
letterMsg: res.data.data,
time: formattedDate
})
// 判断是否有图片
console.log(messageList);
messageList.forEach(item => {
if(item.type === 'graphic') {
item.img = `https://xzjl-api.windymuse.cn/api/resource/${item.resourceId}?k=${id}`
}else if(item.type === 'audio') {
item.audio = `https://xzjl-api.windymuse.cn/api/resource/${item.resourceId}?k=${id}`
}
})
this.setData({messageList: messageList})
})
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
if (options.open) {
// 单人状态下点击【信札】跳转的页面
this.setData({showLetter: false})
this.getUserInfo() this.getUserInfo()
}else if (options.id) {
this.getLetterDetail(options.id)
this.setData({
showLetter: false,
showEdit: false,
letterId: options.id
})
// 判断是否回忆页面跳转
if (options.hy) {
this.setData({hy: true})
}
}else {
this.getUserInfo()
}
}, },
/** /**

@ -23,18 +23,23 @@
<view class="body" wx:if="{{!showLetter}}"> <view class="body" wx:if="{{!showLetter}}">
<view class="xinfo"> <view class="xinfo">
<view class="xinfo-title">To{{letterMsg.to}}</view> <view class="xinfo-title">To{{letterMsg.to}}</view>
<view class="xinfo-main">
<t-textarea disabled autosize="true" model:value="{{content}}"/> <view wx:for="{{messageList}}" wx:key="index">
<view class="xinfo-main" wx:if="{{item.type === 'text' && item.content !== ''}}">
<t-textarea disabled autosize="true" value="{{item.content}}"/>
</view> </view>
<view class="xinfo-voice" bindtap="playVideos" wx:for="{{audioList}}" wx:key="index" data-url="{{item}}"> <view class="xinfo-voice" bindtap="playVideos" data-url="{{item}}" wx:if="{{item.type === 'audio'}}">
<view class="xinfo-icon"></view> <view class="xinfo-icon"></view>
<view> {{item.duration}} </view> <view class="xinfo-text"> {{item.extra.duration}} </view>
</view> </view>
<view class="xinfo-img" wx:for="{{imgList}}" wx:key="index"> <view class="xinfo-img" wx:if="{{item.type === 'graphic'}}">
<image mode="widthFix" src="{{item.img}}" /> <image mode="widthFix" src="{{item.img}}" />
</view> </view>
</view>
<view class="xinfo-sign">Form{{letterMsg.from}}</view> <view class="xinfo-sign">Form{{letterMsg.from}}</view>
<view class="xinfo-time">{{time}}</view> <view class="xinfo-time">{{time}}</view>
</view> </view>
<view class="body-btm-img"> <view class="body-btm-img">
@ -45,8 +50,8 @@
<view class="btm-img-more" bindtap="openMore"> <view class="btm-img-more" bindtap="openMore">
<image src="https://wish-assets.windymuse.com.cn/xy/md-more_horiz%20Copy%401x.png" /> <image src="https://wish-assets.windymuse.com.cn/xy/md-more_horiz%20Copy%401x.png" />
</view> </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 class="btm-img-more del" bindtap="editXz" wx:if="{{showMore && showEdit}}">修改</view>
</view> </view>
</view> </view>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save