diff --git a/app.json b/app.json index 13dc3f1..36dbe6b 100644 --- a/app.json +++ b/app.json @@ -29,7 +29,8 @@ "pages/home/xx/hy/index", "pages/home/xx/hy/hx/hx", "pages/home/xx/hy/xz/zt", - "pages/home/xx/hy/zt/zt" + "pages/home/xx/hy/zt/zt", + "pages/home/xx/lindex/lindex" ], "window": { "backgroundTextStyle": "light", diff --git a/pages/home/me/member/member.js b/pages/home/me/member/member.js index 27f9791..677e4cd 100644 --- a/pages/home/me/member/member.js +++ b/pages/home/me/member/member.js @@ -1,15 +1,52 @@ // pages/home/me/member/member.js import Toast from 'tdesign-miniprogram/toast/index'; +const app = getApp(); //新建页面时 默认引入 +const req = app.xzjlReq(); //初始化一个的request() 实例 Page({ /** * 页面的初始数据 */ data: { - yhy:true + yhy:true, + openid:'' }, - doKtHy(){/**开通会员操作 */ + doKtHy() { + + req.postRequest(`/api/v1/chat-service-order/prepare/${this.data.yhy?'2':'1'}`, { + openid: this.data.openid + }).then((res) => { + console.log(res); + // 调用微信支付方法 + wx.requestPayment({ + //成功之后,调用小程序微信支付 + timeStamp: res.data.data.timeStamp, + nonceStr: res.data.data.nonceStr, + package: res.data.data.packageVal, + signType: 'MD5', + paySign: res.data.data.paySign, + success: res => { + //支付成功的回调这里面写支付成功后跳转的路径 + wx.showToast({ + title: '支付成功', // 标题 + icon: 'success', // 图标类型,默认success 图标支持开发文档的icon + }) + setTimeout(() => { + wx.switchTab({ + url: '/pages/home/me/indexx', + }) + }, 1000) + }, + fail: () => { + // uni.showToast({ + // icon: 'none', + // title: '支付失败' + // }); + } + }); + }) + /**开通会员操作 */ console.log('开通会员') }, go2Week(){ @@ -33,7 +70,22 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad(options) { - + wx.login({ + provider: 'weixin', + success: loginRes => { + //loginRes中有code,拿着code再请求自己服务器以获取openid + console.log(loginRes.code, 888888888888); + req.getRequest(`/api/v1/chat-service-order/js-code2-session`, { + code: loginRes.code + }).then((res) => { + console.log(res); + // this.openid = res.data.openid + this.setData({ + openid: res.data.data.openid + }) + }) + } + }); }, /** diff --git a/pages/home/xx/hy/hx/hx.js b/pages/home/xx/hy/hx/hx.js index d9535f2..47f9c69 100644 --- a/pages/home/xx/hy/hx/hx.js +++ b/pages/home/xx/hy/hx/hx.js @@ -1,4 +1,6 @@ -// pages/home/xx/hy/hx/hx.js +// pages/home/xx/hy/index.js +const app = getApp();//新建页面时 默认引入 +const req = app.xzjlReq();//初始化一个的request() 实例 Page({ /** @@ -7,7 +9,31 @@ Page({ data: { }, - + go2Reback(){ + wx.navigateTo({ + url: '/pages/home/xx/lindex/lindex' + }) + }, + go2Xz(){ + wx.navigateTo({ + url: '/pages/home/xx/hy/xz/zt' + }) + }, + go2Yx(){ + wx.navigateTo({ + url: '/pages/home/xx/hy/index' + }) + }, + go2Hx(){ + wx.navigateTo({ + url: '/pages/home/xx/hy/hx/hx' + }) + }, + go2Zt(){ + wx.navigateTo({ + url: '/pages/home/xx/hy/zt/zt' + }) + }, /** * 生命周期函数--监听页面加载 */ diff --git a/pages/home/xx/hy/hx/hx.wxml b/pages/home/xx/hy/hx/hx.wxml index 96bf465..921b632 100644 --- a/pages/home/xx/hy/hx/hx.wxml +++ b/pages/home/xx/hy/hx/hx.wxml @@ -1,2 +1,12 @@ -pages/home/xx/hy/hx/hx.wxml + + +画像 + + + +信札 +音讯 +画像 +纸条 + diff --git a/pages/home/xx/hy/hx/hx.wxss b/pages/home/xx/hy/hx/hx.wxss index 322196e..042c227 100644 --- a/pages/home/xx/hy/hx/hx.wxss +++ b/pages/home/xx/hy/hx/hx.wxss @@ -1 +1,66 @@ -/* pages/home/xx/hy/hx/hx.wxss */ \ No newline at end of file +/* pages/home/xx/hy/index.wxss */ +.reback{ + position: fixed; + margin-left: 20rpx; + margin-top:108rpx; + width:48rpx; + height:48rpx; + background-repeat: no-repeat; + background-size:100% 100%; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png); +} + +.title{ + position: fixed; + left: 278rpx; + top: 108rpx; + width: 196rpx; + height: 48rpx; + color: rgba(108, 108, 108, 1); + font-size: 32rpx; + text-align: center; + font-family: SourceHanSansSC-regular; +} +.xfgjl{ + position: fixed; + left: 0px; + margin-top: 1416rpx; + width: 750rpx; + height: 87px; + line-height: 20px; + opacity: 0.7; + background-color: rgba(255, 255, 255, 1); + text-align: center; +} +.xxqlcd{ + position: absolute; + + top: 32rpx; + width: 55px; + height: 55px; + border-radius: 56rpx; + line-height: 110rpx; + background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%); + color: rgba(16, 16, 16, 1); + font-size: 12px; + text-align: center; + box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.4); + font-family: Arial; + border: 5rpx solid rgba(255, 255, 255, 1); + color: rgba(255, 255, 255, 1); +font-size: 16px; +text-align: center; +font-family: SourceHanSansSC-medium; +} +.xxqlcd1{ + left: 21px; +} +.xxqlcd2{ + left: 114px; +} +.xxqlcd3{ + left: 206px; +} +.xxqlcd4{ + left: 299px; +} \ No newline at end of file diff --git a/pages/home/xx/hy/index.js b/pages/home/xx/hy/index.js index 1295561..47f9c69 100644 --- a/pages/home/xx/hy/index.js +++ b/pages/home/xx/hy/index.js @@ -1,4 +1,6 @@ // pages/home/xx/hy/index.js +const app = getApp();//新建页面时 默认引入 +const req = app.xzjlReq();//初始化一个的request() 实例 Page({ /** @@ -7,7 +9,31 @@ Page({ data: { }, - + go2Reback(){ + wx.navigateTo({ + url: '/pages/home/xx/lindex/lindex' + }) + }, + go2Xz(){ + wx.navigateTo({ + url: '/pages/home/xx/hy/xz/zt' + }) + }, + go2Yx(){ + wx.navigateTo({ + url: '/pages/home/xx/hy/index' + }) + }, + go2Hx(){ + wx.navigateTo({ + url: '/pages/home/xx/hy/hx/hx' + }) + }, + go2Zt(){ + wx.navigateTo({ + url: '/pages/home/xx/hy/zt/zt' + }) + }, /** * 生命周期函数--监听页面加载 */ diff --git a/pages/home/xx/hy/index.wxml b/pages/home/xx/hy/index.wxml index af89345..114f7ba 100644 --- a/pages/home/xx/hy/index.wxml +++ b/pages/home/xx/hy/index.wxml @@ -1,2 +1,12 @@ -pages/home/xx/hy/index.wxml + + +音讯 + + + +信札 +音讯 +画像 +纸条 + \ No newline at end of file diff --git a/pages/home/xx/hy/index.wxss b/pages/home/xx/hy/index.wxss index 8b5148f..042c227 100644 --- a/pages/home/xx/hy/index.wxss +++ b/pages/home/xx/hy/index.wxss @@ -1 +1,66 @@ -/* pages/home/xx/hy/index.wxss */ \ No newline at end of file +/* pages/home/xx/hy/index.wxss */ +.reback{ + position: fixed; + margin-left: 20rpx; + margin-top:108rpx; + width:48rpx; + height:48rpx; + background-repeat: no-repeat; + background-size:100% 100%; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png); +} + +.title{ + position: fixed; + left: 278rpx; + top: 108rpx; + width: 196rpx; + height: 48rpx; + color: rgba(108, 108, 108, 1); + font-size: 32rpx; + text-align: center; + font-family: SourceHanSansSC-regular; +} +.xfgjl{ + position: fixed; + left: 0px; + margin-top: 1416rpx; + width: 750rpx; + height: 87px; + line-height: 20px; + opacity: 0.7; + background-color: rgba(255, 255, 255, 1); + text-align: center; +} +.xxqlcd{ + position: absolute; + + top: 32rpx; + width: 55px; + height: 55px; + border-radius: 56rpx; + line-height: 110rpx; + background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%); + color: rgba(16, 16, 16, 1); + font-size: 12px; + text-align: center; + box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.4); + font-family: Arial; + border: 5rpx solid rgba(255, 255, 255, 1); + color: rgba(255, 255, 255, 1); +font-size: 16px; +text-align: center; +font-family: SourceHanSansSC-medium; +} +.xxqlcd1{ + left: 21px; +} +.xxqlcd2{ + left: 114px; +} +.xxqlcd3{ + left: 206px; +} +.xxqlcd4{ + left: 299px; +} \ No newline at end of file diff --git a/pages/home/xx/hy/xz/zt.js b/pages/home/xx/hy/xz/zt.js index 43cc39c..47f9c69 100644 --- a/pages/home/xx/hy/xz/zt.js +++ b/pages/home/xx/hy/xz/zt.js @@ -1,4 +1,6 @@ -// pages/home/xx/hy/xz/zt.js +// pages/home/xx/hy/index.js +const app = getApp();//新建页面时 默认引入 +const req = app.xzjlReq();//初始化一个的request() 实例 Page({ /** @@ -7,7 +9,31 @@ Page({ data: { }, - + go2Reback(){ + wx.navigateTo({ + url: '/pages/home/xx/lindex/lindex' + }) + }, + go2Xz(){ + wx.navigateTo({ + url: '/pages/home/xx/hy/xz/zt' + }) + }, + go2Yx(){ + wx.navigateTo({ + url: '/pages/home/xx/hy/index' + }) + }, + go2Hx(){ + wx.navigateTo({ + url: '/pages/home/xx/hy/hx/hx' + }) + }, + go2Zt(){ + wx.navigateTo({ + url: '/pages/home/xx/hy/zt/zt' + }) + }, /** * 生命周期函数--监听页面加载 */ diff --git a/pages/home/xx/hy/xz/zt.wxml b/pages/home/xx/hy/xz/zt.wxml index 52fd8df..b64471c 100644 --- a/pages/home/xx/hy/xz/zt.wxml +++ b/pages/home/xx/hy/xz/zt.wxml @@ -1,2 +1,12 @@ -pages/home/xx/hy/xz/zt.wxml + + +信札 + + + +信札 +音讯 +画像 +纸条 + diff --git a/pages/home/xx/hy/xz/zt.wxss b/pages/home/xx/hy/xz/zt.wxss index 406f939..042c227 100644 --- a/pages/home/xx/hy/xz/zt.wxss +++ b/pages/home/xx/hy/xz/zt.wxss @@ -1 +1,66 @@ -/* pages/home/xx/hy/xz/zt.wxss */ \ No newline at end of file +/* pages/home/xx/hy/index.wxss */ +.reback{ + position: fixed; + margin-left: 20rpx; + margin-top:108rpx; + width:48rpx; + height:48rpx; + background-repeat: no-repeat; + background-size:100% 100%; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png); +} + +.title{ + position: fixed; + left: 278rpx; + top: 108rpx; + width: 196rpx; + height: 48rpx; + color: rgba(108, 108, 108, 1); + font-size: 32rpx; + text-align: center; + font-family: SourceHanSansSC-regular; +} +.xfgjl{ + position: fixed; + left: 0px; + margin-top: 1416rpx; + width: 750rpx; + height: 87px; + line-height: 20px; + opacity: 0.7; + background-color: rgba(255, 255, 255, 1); + text-align: center; +} +.xxqlcd{ + position: absolute; + + top: 32rpx; + width: 55px; + height: 55px; + border-radius: 56rpx; + line-height: 110rpx; + background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%); + color: rgba(16, 16, 16, 1); + font-size: 12px; + text-align: center; + box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.4); + font-family: Arial; + border: 5rpx solid rgba(255, 255, 255, 1); + color: rgba(255, 255, 255, 1); +font-size: 16px; +text-align: center; +font-family: SourceHanSansSC-medium; +} +.xxqlcd1{ + left: 21px; +} +.xxqlcd2{ + left: 114px; +} +.xxqlcd3{ + left: 206px; +} +.xxqlcd4{ + left: 299px; +} \ No newline at end of file diff --git a/pages/home/xx/hy/zt/zt.js b/pages/home/xx/hy/zt/zt.js index 1004423..47f9c69 100644 --- a/pages/home/xx/hy/zt/zt.js +++ b/pages/home/xx/hy/zt/zt.js @@ -1,4 +1,6 @@ -// pages/home/xx/hy/zt/zt.js +// pages/home/xx/hy/index.js +const app = getApp();//新建页面时 默认引入 +const req = app.xzjlReq();//初始化一个的request() 实例 Page({ /** @@ -7,7 +9,31 @@ Page({ data: { }, - + go2Reback(){ + wx.navigateTo({ + url: '/pages/home/xx/lindex/lindex' + }) + }, + go2Xz(){ + wx.navigateTo({ + url: '/pages/home/xx/hy/xz/zt' + }) + }, + go2Yx(){ + wx.navigateTo({ + url: '/pages/home/xx/hy/index' + }) + }, + go2Hx(){ + wx.navigateTo({ + url: '/pages/home/xx/hy/hx/hx' + }) + }, + go2Zt(){ + wx.navigateTo({ + url: '/pages/home/xx/hy/zt/zt' + }) + }, /** * 生命周期函数--监听页面加载 */ diff --git a/pages/home/xx/hy/zt/zt.wxml b/pages/home/xx/hy/zt/zt.wxml index 053e55b..8a5938d 100644 --- a/pages/home/xx/hy/zt/zt.wxml +++ b/pages/home/xx/hy/zt/zt.wxml @@ -1,2 +1,12 @@ -pages/home/xx/hy/zt/zt.wxml + + +纸条 + + + +信札 +音讯 +画像 +纸条 + diff --git a/pages/home/xx/hy/zt/zt.wxss b/pages/home/xx/hy/zt/zt.wxss index e0284c4..042c227 100644 --- a/pages/home/xx/hy/zt/zt.wxss +++ b/pages/home/xx/hy/zt/zt.wxss @@ -1 +1,66 @@ -/* pages/home/xx/hy/zt/zt.wxss */ \ No newline at end of file +/* pages/home/xx/hy/index.wxss */ +.reback{ + position: fixed; + margin-left: 20rpx; + margin-top:108rpx; + width:48rpx; + height:48rpx; + background-repeat: no-repeat; + background-size:100% 100%; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png); +} + +.title{ + position: fixed; + left: 278rpx; + top: 108rpx; + width: 196rpx; + height: 48rpx; + color: rgba(108, 108, 108, 1); + font-size: 32rpx; + text-align: center; + font-family: SourceHanSansSC-regular; +} +.xfgjl{ + position: fixed; + left: 0px; + margin-top: 1416rpx; + width: 750rpx; + height: 87px; + line-height: 20px; + opacity: 0.7; + background-color: rgba(255, 255, 255, 1); + text-align: center; +} +.xxqlcd{ + position: absolute; + + top: 32rpx; + width: 55px; + height: 55px; + border-radius: 56rpx; + line-height: 110rpx; + background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%); + color: rgba(16, 16, 16, 1); + font-size: 12px; + text-align: center; + box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.4); + font-family: Arial; + border: 5rpx solid rgba(255, 255, 255, 1); + color: rgba(255, 255, 255, 1); +font-size: 16px; +text-align: center; +font-family: SourceHanSansSC-medium; +} +.xxqlcd1{ + left: 21px; +} +.xxqlcd2{ + left: 114px; +} +.xxqlcd3{ + left: 206px; +} +.xxqlcd4{ + left: 299px; +} \ No newline at end of file diff --git a/pages/home/xx/index.js b/pages/home/xx/index.js index 1237cba..8304621 100644 --- a/pages/home/xx/index.js +++ b/pages/home/xx/index.js @@ -7,21 +7,60 @@ Page({ * 页面的初始数据 */ data: { + ztVisible:false, + messages:[], + loverInfo:{}, hasLover:false,// 是否单身 userInfo:{} }, + openZtVisible(){/**点击纸条按钮 */ + this.setData({ztVisible:true}) + + }, + go2Huiyi(){/**跳转到回忆页面 */ + + }, + doMessageInfo(){/**查询聊天信息 */ + req.getRequest('/api/user/curt/message/lover',{}).then((res)=>{ + if(res.data.code==200){ + this.setData({messages:res.data.data.records}) + console.log("这是打印,。。。。") + console.log(this.data.messages) + } + }).catch((err)=>{ + console.log(err); + }) + }, doQueryInit(){ + console.log('查询。。。。') req.getRequest('/api/user/curt',{}).then((res)=>{ if(res.data.code==200){ this.setData({hasLover:res.data.data.hasLover}) this.setData({userInfo:res.data.data}) console.log(this.data.userInfo) + if(res.data.data.hasLover){ + wx.navigateTo({ + url: '/pages/home/xx/lindex/lindex' + }) + } + + } + }).catch((err)=>{ + console.log(err); + }) + + req.getRequest('/api/user/curt/lover',{}).then((res)=>{ + if(res.data.code==200){ + this.setData({loverInfo:res.data.data}) } }).catch((err)=>{ console.log(err); }) + ///api/user/curt/lover + + }, /** @@ -35,14 +74,14 @@ Page({ * 生命周期函数--监听页面初次渲染完成 */ onReady() { - + this.doQueryInit() }, /** * 生命周期函数--监听页面显示 */ onShow() { - + this.doQueryInit() }, /** diff --git a/pages/home/xx/index.json b/pages/home/xx/index.json index 3928faa..644fc09 100644 --- a/pages/home/xx/index.json +++ b/pages/home/xx/index.json @@ -1,3 +1,6 @@ { - "usingComponents": {} + "usingComponents": { + "t-image": "tdesign-miniprogram/image/image", + "t-popup": "tdesign-miniprogram/popup/popup" + } } \ No newline at end of file diff --git a/pages/home/xx/index.wxml b/pages/home/xx/index.wxml index 138a9ec..3eda204 100644 --- a/pages/home/xx/index.wxml +++ b/pages/home/xx/index.wxml @@ -6,22 +6,3 @@ - - - - - - - - - - - - 回忆 - - - - 星讯 - - - diff --git a/pages/home/xx/index.wxss b/pages/home/xx/index.wxss index c3690fd..0baeace 100644 --- a/pages/home/xx/index.wxss +++ b/pages/home/xx/index.wxss @@ -151,18 +151,16 @@ font-family: SourceHanSansSC-regular; position: fixed; left: 0px; margin-top: 1286rpx; - width: 375px; + width: 750rpx; height: 87px; line-height: 20px; opacity: 0.7; background-color: rgba(255, 255, 255, 1); text-align: center; - background-color: aqua; } .ltinfo{ position: absolute; - background-color: brown; width: 750rpx; height: 2000rpx; margin-top:200rpx; @@ -183,5 +181,325 @@ text-align: center; top: 30rpx; width: 36px; height: 36px; - background-color: burlywood; +} +.txr{ + position: absolute; + top: 30rpx; + left:434rpx; + width: 36px; + height: 36px; +} +.qlzjt{ + position: absolute; + left: 173px; + top: 50rpx; + width: 30px; + height: 16px; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/qlzjt.png); + color:#9A9A9A; + text-align: center; + font-size: 27rpx; +} +.bkgfstxt{ + position: absolute; + left: 28px; +top: 74rpx; +width: 223px; +height: 73px; +color: rgba(255, 255, 255, 1); +font-size: 14px; +text-align: center; +font-family: SourceHanSansSC-regular; +} +.xxqlcd{ + position: absolute; + + top: 32rpx; + width: 55px; + height: 55px; + border-radius: 56rpx; + line-height: 110rpx; + background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%); + color: rgba(16, 16, 16, 1); + font-size: 12px; + text-align: center; + box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.4); + font-family: Arial; + border: 5rpx solid rgba(255, 255, 255, 1); + color: rgba(255, 255, 255, 1); +font-size: 16px; +text-align: center; +font-family: SourceHanSansSC-medium; +} +.xxqlcd1{ + left: 21px; +} +.xxqlcd2{ + left: 114px; +} +.xxqlcd3{ + left: 206px; +} +.xxqlcd4{ + left: 299px; +} + +.ltxinxi{ + position: absolute; + margin-top:360rpx; + width: 750rpx; +} +.wchatfor{ + width: 750rpx; +} +.wchattime{ + left: 131px; + top: 256px; + width: 750rpx; + height: 28px; + color: rgba(153, 153, 153, 1); + font-size: 12px; + text-align: center; + font-family: SourceHanSansSC-regular; +} +.wchattxk{ + display: inline-block; + margin-left: 317px; + margin-top: 7rpx; + width: 36px; + height: 36px; +} +.wchattxk1{ + display: inline-block; + margin-left: 19px; + margin-top: 7rpx; + width: 36px; + height: 36px; + background-color: chartreuse; +} +.dfxf{ + display: inline-block; + margin-left: 12px; + top: 287px; + width: 93px; + height: 65px; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xfpic.png); +} +.tt{ + display: inline-block; + width: 750rpx; +} +.dfxfydwd{ + display: inline-block; + margin-left: 20rpx; + margin-top: 30px; + width: 28px; + height: 20px; + color: rgba(206, 206, 206, 1); + font-size: 12px; + text-align: left; + font-family: SourceHanSansSC-regular; +} + +.dftext{ + display: inline-block; + margin-left: 7px; + width: 180px; + height: 60px; + line-height: 60px; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/textpic.png); + color: rgba(51, 51, 51, 1); + font-size: 14px; + text-align: left; + font-family: SourceHanSansSC-regular; + text-overflow: -o-ellipsis-lastline; + overflow: hidden; + text-overflow: ellipsis; +} +.xjtext{ + margin-left: 36rpx; + width: 123px; + text-overflow: -o-ellipsis-lastline; + overflow: hidden; + text-overflow: ellipsis; +} +.dftextwd{ + display: inline-block; + margin-left: 20rpx; + top: -30px; + width: 28px; + height: 20px; + line-height: 20px; + color: rgba(206, 206, 206, 1); + font-size: 12px; + text-align: left; + font-family: SourceHanSansSC-regular; +} + +.dfaudio{ + display: inline-block; + margin-left: 10px; + top: 768px; + width: 150px; + height: 42px; + line-height: 20px; + border-radius: 10px; + background-color: rgba(255, 255, 255, 1); + color: rgba(16, 16, 16, 1); + font-size: 14px; + text-align: center; + font-family: Arial; + border: 1px solid rgba(239, 239, 239, 1); +} +.dfaudiologo{ + position: relative; + left: 16px; + top: 6px; + width: 30px; + height: 30px; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/yppic.png); +} + +.dfaudiologotxt{ + float: left; + margin-left: 66px; + margin-top: -19px; + width: 45px; + height: 18px; + color: rgba(154, 154, 154, 1); + font-size: 12px; + text-align: left; + font-family: SourceHanSansSC-regular; +} +.zjtablea1{ + width: 750rpx; + height: 176rpx; +} +.zjtx1{ + position: absolute; + margin-left: 317px; + margin-top: 19rpx; + width: 36px; + height: 36px; +} +.zjxf1{ + position: absolute; + margin-left: 215px; + width: 93px; + height: 65px; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xfpic.png); +} +.zjydwd1{ + position: absolute; + margin-left: 360rpx; + margin-top: 50px; + width: 28px; + height: 20px; + color: rgba(206, 206, 206, 1); + font-size: 12px; + text-align: left; + font-family: SourceHanSansSC-regular; +} +.zjtablea2{ + width: 750rpx; + height:134rpx; +} +.zjypk1{ + position: absolute; + left: 160px; + margin-top: 7px; + width: 150px; + height: 42px; + line-height: 20px; + border-radius: 10px; + background-color: rgba(255, 255, 255, 1); + color: rgba(16, 16, 16, 1); + font-size: 14px; + text-align: center; + font-family: Arial; + border: 1px solid rgba(239, 239, 239, 1); +} +.zjypt1{ + position: absolute; + left: 16px; + top: 6px; + width: 30px; + height: 30px; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/yppic.png); +} +.zjypwz1{ + position: absolute; + left: 56px; +top: 24rpx; +width: 45px; +height: 18px; +color: rgba(154, 154, 154, 1); +font-size: 12px; +text-align: left; +font-family: SourceHanSansSC-regular; +} + +.zjypydwd{ + position: absolute; + margin-left: 250rpx; + margin-top: 30px; + width: 28px; + height: 20px; + color: rgba(206, 206, 206, 1); + font-size: 12px; + text-align: left; + font-family: SourceHanSansSC-regular; +} + +.zjtable3{ + width: 750rpx; + height: 150rpx; +} + +.zjxxbox1{ + position: absolute; + margin-left: 260rpx; + width: 180px; + height: 60px; + line-height: 60px; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/textpic.png); + color: rgba(51, 51, 51, 1); + font-size: 14px; + text-align: left; + font-family: SourceHanSansSC-regular; + text-overflow: -o-ellipsis-lastline; + overflow: hidden; + text-overflow: ellipsis; +} +.zjtextydwd1{ + position: absolute; + margin-left: 210rpx; + margin-top: 30px; + width: 28px; + height: 20px; + color: rgba(206, 206, 206, 1); + font-size: 12px; + text-align: left; + font-family: SourceHanSansSC-regular; +} + +.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{ + position: absolute; + width:750rpx ; + height: 1624rpx; + z-index: 999; } \ No newline at end of file diff --git a/pages/home/xx/lindex/lindex.js b/pages/home/xx/lindex/lindex.js new file mode 100644 index 0000000..cad550a --- /dev/null +++ b/pages/home/xx/lindex/lindex.js @@ -0,0 +1,182 @@ +// pages/home/xx/index.js +const app = getApp();//新建页面时 默认引入 +const req = app.xzjlReq();//初始化一个的request() 实例 +Page({ + + /** + * 页面的初始数据 + */ + data: { + ztDetial:{},//打开纸条弹窗详情 + dkZtVisible:false,//打开纸条弹窗 + ztText:"", + ztVisible:false,//写纸条弹窗 + messages:[], + loverInfo:{}, + hasLover:false,// 是否单身 + userInfo:{} + + },go2Reback(){ + wx.switchTab({ + url: '/pages/home/xy/index', + }) + }, + //bindtap="dKztDetial" data-xq="{{item}}" + dKztDetial(e){/**查看详情 */ + let detail = e.currentTarget.dataset['xq'] + console.log(detail) + if(!detail.isSelf&&detail.status=='unread'){ + // 不是自己发的消息,且消息状态为未读,需要设置消息状态为已读 + ///api/user/curt/message/{id}/read + req.patchRequest('/api/user/curt/message/'+detail.id+'/read',{}).then((res)=>{ + if(res.data.code==200){ + console.log(this.data.messages) + } + }).catch((err)=>{ + console.log(err); + }) + } + if(detail.isSelf){ + console.log('是自己发的消息,不做操作') + } + this.setData({dkZtVisible:true,tDetial:e.currentTarget.dataset['xq']}) + }, + doCancelDkZt(){ + this.setData({dkZtVisible:false}) + }, + openZtVisible(){/**点击纸条按钮 */ + this.setData({ztVisible:true}) + }, + doCancelZt(){/**点击纸条里面取消按钮 */ + this.setData({ztVisible:false}) + }, + doFSZt(){/**点击纸条里面发送按钮 */ + if(!this.data.ztText){ + wx.showToast({ + title:'纸条内容不能为空!', + icon: 'none', + duration: 1000 + }) + }else{ + req.postRequest('/api/user/curt/message/lover',{"type": "text","content": this.data.ztText}).then((res)=>{ + this.onLoad() + if(res.data.code==200){ + + console.log(this.data.messages) + } + }).catch((err)=>{ + console.log(err); + }) + this.setData({ztVisible:false,ztText:''}) + } + + }, + go2Huiyi(){/**跳转到回忆页面 */ + wx.navigateTo({ + url: '/pages/home/xx/hy/index' + }) + }, + doMessageInfo(){/**查询聊天信息 */ + req.getRequest('/api/user/curt/message/lover',{}).then((res)=>{ + if(res.data.code==200){ + this.setData({messages:res.data.data.records.reverse()}) + console.log("这是打印,。。。。") + console.log(this.data.messages) + } + }).catch((err)=>{ + console.log(err); + }) + }, + doQueryInit(){ + req.getRequest('/api/user/curt',{}).then((res)=>{ + if(res.data.code==200){ + this.setData({hasLover:res.data.data.hasLover}) + this.setData({userInfo:res.data.data}) + console.log(this.data.userInfo) + if(!res.data.data.hasLover){ + wx.navigateTo({ + url: '/pages/home/xx/index' + }) + } + + } + }).catch((err)=>{ + console.log(err); + }) + + req.getRequest('/api/user/curt/lover',{}).then((res)=>{ + if(res.data.code==200){ + this.setData({loverInfo:res.data.data}) + } + }).catch((err)=>{ + console.log(err); + }) + + ///api/user/curt/lover + + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.doQueryInit() + this.doMessageInfo() + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + this.doQueryInit() + this.doMessageInfo() + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + }, + toSend(){ + wx.redirectTo({ + url: 'xz/xz' + }) + } +}) \ No newline at end of file diff --git a/pages/home/xx/lindex/lindex.json b/pages/home/xx/lindex/lindex.json new file mode 100644 index 0000000..09095f2 --- /dev/null +++ b/pages/home/xx/lindex/lindex.json @@ -0,0 +1,7 @@ +{ + "usingComponents": { + "t-image": "tdesign-miniprogram/image/image", + "t-popup": "tdesign-miniprogram/popup/popup", + "t-textarea": "tdesign-miniprogram/textarea/textarea" + } +} \ No newline at end of file diff --git a/pages/home/xx/lindex/lindex.wxml b/pages/home/xx/lindex/lindex.wxml new file mode 100644 index 0000000..e2ccf4c --- /dev/null +++ b/pages/home/xx/lindex/lindex.wxml @@ -0,0 +1,98 @@ + + + + + + + + + + + 欢迎来到你们的专属情侣树洞 + 在这里,你可以将你的心意传递给ta + 所有美好的回忆都将被精灵记录 + + + + + + + + {{item.createdAt}} + + + + + + + {{item.status=='unread'?'未读':'已读'}} + + + + + + 1111 + + {{item.status=='unread'?'未读':'已读'}} + + + + + {{item.content}} + {{item.status=='unread'?'未读':'已读'}} + + + + + + + + + {{item.status=='unread'?'未读':'已读'}} + + {{item.content}} + {{item.status=='unread'?'未读':'已读'}} + + + + 2222 + {{item.status=='unread'?'未读':'已读'}} + + + + + + + + +回忆 + + + +星讯 + + + + +信札 +音讯 +画像 +纸条 + + + + + + + 取消 + 发送 + + + + + + + + + + diff --git a/pages/home/xx/lindex/lindex.wxss b/pages/home/xx/lindex/lindex.wxss new file mode 100644 index 0000000..d2577bf --- /dev/null +++ b/pages/home/xx/lindex/lindex.wxss @@ -0,0 +1,593 @@ +/* pages/home/xx/lindex/lindex.wxss */ +/* pages/home/xx/index.wxss */ +/* pages/home/xyc/wdyw/wdyw.wxss */ +.reback{ + position: fixed; + margin-left: 20rpx; + margin-top:108rpx; + width:48rpx; + height:48rpx; + background-repeat: no-repeat; + background-size:100% 100%; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png); +} + +.title{ + position: fixed; + left: 278rpx; + top: 108rpx; + width: 196rpx; + height: 48rpx; + color: rgba(108, 108, 108, 1); + font-size: 32rpx; + text-align: center; + font-family: SourceHanSansSC-regular; +} +.bkgfs{ + position: absolute; + left: 48px; +top: 70rpx; +width: 279px; +height: 128px; +line-height: 20px; +border-radius: 15px; +background-color: rgba(253, 190, 196, 1); +text-align: center; +} + +.bkg{ + position: absolute; + width: 691.33rpx; + height: 1326rpx; + display: flex; + flex-direction: column; + background-repeat: no-repeat; + background-size:100% 100%; + margin-left:29.33rpx; + margin-top: 98rpx; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/bkg.png); + color:#9A9A9A; + text-align: center; + font-size: 27rpx; +} +.xzt{ + position: absolute; + width: 398rpx; + height: 314rpx; + display: flex; + flex-direction: column; + background-repeat: no-repeat; + background-size:100% 100%; + margin-left:146.67rpx; + margin-top: 234rpx; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xzt.png); + color:#9A9A9A; + text-align: center; + font-size: 27rpx; +} + +.fgx{ + position: absolute; + width: 398rpx; + height: 16rpx; + display: flex; + flex-direction: column; + background-repeat: no-repeat; + background-size:100% 100%; + margin-left:146.67rpx; + margin-top: 702rpx; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/fgx.png); + color:#9A9A9A; + text-align: center; + font-size: 27rpx; +} + +.xzbtn{ + position: absolute; + width: 234rpx; + height: 96.67rpx; + display: flex; + flex-direction: column; + background-repeat: no-repeat; + background-size:100% 100%; + margin-left:228.67rpx; + margin-top: 558.67rpx; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xzbtn.png); + color:#9A9A9A; + text-align: center; + font-size: 27rpx; +} + +.jbbtn{ + position: absolute; + width: 234rpx; + height: 96.67rpx; + display: flex; + flex-direction: column; + background-repeat: no-repeat; + background-size:100% 100%; + margin-left:228.67rpx; + margin-top: 1108.67rpx; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/jbbtn.png); + color:#9A9A9A; + text-align: center; + font-size: 27rpx; +} + +.jbt{ + position: absolute; + width: 398rpx; + height: 314rpx; + display: flex; + flex-direction: column; + background-repeat: no-repeat; + background-size:100% 100%; + margin-left:146.67rpx; + margin-top: 784rpx; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/jbt.png); + color:#9A9A9A; + text-align: center; + font-size: 27rpx; +} + +.hybtn{ + position: fixed; + left: 0px; +top: 104px; +width: 83px; +height: 35px; +line-height: 70rpx; +opacity: 0.7; +border-radius: 0px 10px 10px 0px; +background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%); +text-align: center; +box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); +color: rgba(255, 255, 255, 1); +font-size: 14px; +text-align: center; +font-family: SourceHanSansSC-regular; +} + +.xfgjl{ + position: fixed; + left: 0px; + margin-top: 1416rpx; + width: 750rpx; + height: 87px; + line-height: 20px; + opacity: 0.7; + background-color: rgba(255, 255, 255, 1); + text-align: center; +} + +.ltinfo{ + position: absolute; + width: 750rpx; + height: 2000rpx; + margin-top:200rpx; +} +.h1{ + position: fixed; + left: 0px; +width: 375px; +height: 88px; +line-height: 20px; +background-color: rgba(255, 255, 255, 1); +text-align: center; +} + +.txl{ + position: absolute; + left: 122px; + top: 30rpx; + width: 36px; + height: 36px; +} +.txr{ + position: absolute; + top: 30rpx; + left:434rpx; + width: 36px; + height: 36px; +} +.qlzjt{ + position: absolute; + left: 173px; + top: 50rpx; + width: 30px; + height: 16px; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xyc/qlzjt.png); + color:#9A9A9A; + text-align: center; + font-size: 27rpx; +} +.bkgfstxt{ + position: absolute; + left: 28px; +top: 74rpx; +width: 223px; +height: 73px; +color: rgba(255, 255, 255, 1); +font-size: 14px; +text-align: center; +font-family: SourceHanSansSC-regular; +} +.xxqlcd{ + position: absolute; + + top: 32rpx; + width: 55px; + height: 55px; + border-radius: 56rpx; + line-height: 110rpx; + background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%); + color: rgba(16, 16, 16, 1); + font-size: 12px; + text-align: center; + box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.4); + font-family: Arial; + border: 5rpx solid rgba(255, 255, 255, 1); + color: rgba(255, 255, 255, 1); +font-size: 16px; +text-align: center; +font-family: SourceHanSansSC-medium; +} +.xxqlcd1{ + left: 21px; +} +.xxqlcd2{ + left: 114px; +} +.xxqlcd3{ + left: 206px; +} +.xxqlcd4{ + left: 299px; +} + +.ltxinxi{ + position: absolute; + margin-top:360rpx; + width: 750rpx; +} +.wchatfor{ + width: 750rpx; +} +.wchattime{ + left: 131px; + top: 256px; + width: 750rpx; + height: 28px; + color: rgba(153, 153, 153, 1); + font-size: 12px; + text-align: center; + font-family: SourceHanSansSC-regular; +} +.wchattxk{ + display: inline-block; + margin-left: 317px; + margin-top: 7rpx; + width: 36px; + height: 36px; +} +.wchattxk1{ + display: inline-block; + margin-left: 19px; + margin-top: 7rpx; + width: 36px; + height: 36px; + background-color: chartreuse; +} +.dfxf{ + display: inline-block; + margin-left: 12px; + top: 287px; + width: 93px; + height: 65px; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xfpic.png); +} +.tt{ + display: inline-block; + width: 750rpx; +} +.dfxfydwd{ + display: inline-block; + margin-left: 20rpx; + margin-top: 30px; + width: 28px; + height: 20px; + color: rgba(206, 206, 206, 1); + font-size: 12px; + text-align: left; + font-family: SourceHanSansSC-regular; +} + +.dftext{ + display: inline-block; + margin-left: 7px; + width: 180px; + height: 60px; + line-height: 60px; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/textpic.png); + color: rgba(51, 51, 51, 1); + font-size: 14px; + text-align: left; + font-family: SourceHanSansSC-regular; + text-overflow: -o-ellipsis-lastline; + overflow: hidden; + text-overflow: ellipsis; +} +.xjtext{ + margin-left: 36rpx; + width: 123px; + text-overflow: -o-ellipsis-lastline; + overflow: hidden; + text-overflow: ellipsis; +} +.dftextwd{ + display: inline-block; + margin-left: 20rpx; + top: -30px; + width: 28px; + height: 20px; + line-height: 20px; + color: rgba(206, 206, 206, 1); + font-size: 12px; + text-align: left; + font-family: SourceHanSansSC-regular; +} + +.dfaudio{ + display: inline-block; + margin-left: 10px; + top: 768px; + width: 150px; + height: 42px; + line-height: 20px; + border-radius: 10px; + background-color: rgba(255, 255, 255, 1); + color: rgba(16, 16, 16, 1); + font-size: 14px; + text-align: center; + font-family: Arial; + border: 1px solid rgba(239, 239, 239, 1); +} +.dfaudiologo{ + position: relative; + left: 16px; + top: 6px; + width: 30px; + height: 30px; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/yppic.png); +} + +.dfaudiologotxt{ + float: left; + margin-left: 66px; + margin-top: -19px; + width: 45px; + height: 18px; + color: rgba(154, 154, 154, 1); + font-size: 12px; + text-align: left; + font-family: SourceHanSansSC-regular; +} +.zjtablea1{ + width: 750rpx; + height: 176rpx; +} +.zjtx1{ + position: absolute; + margin-left: 317px; + margin-top: 19rpx; + width: 36px; + height: 36px; +} +.zjxf1{ + position: absolute; + margin-left: 215px; + width: 93px; + height: 65px; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xfpic.png); +} +.zjydwd1{ + position: absolute; + margin-left: 360rpx; + margin-top: 50px; + width: 28px; + height: 20px; + color: rgba(206, 206, 206, 1); + font-size: 12px; + text-align: left; + font-family: SourceHanSansSC-regular; +} +.zjtablea2{ + width: 750rpx; + height:134rpx; +} +.zjypk1{ + position: absolute; + left: 160px; + margin-top: 7px; + width: 150px; + height: 42px; + line-height: 20px; + border-radius: 10px; + background-color: rgba(255, 255, 255, 1); + color: rgba(16, 16, 16, 1); + font-size: 14px; + text-align: center; + font-family: Arial; + border: 1px solid rgba(239, 239, 239, 1); +} +.zjypt1{ + position: absolute; + left: 16px; + top: 6px; + width: 30px; + height: 30px; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/yppic.png); +} +.zjypwz1{ + position: absolute; + left: 56px; +top: 24rpx; +width: 45px; +height: 18px; +color: rgba(154, 154, 154, 1); +font-size: 12px; +text-align: left; +font-family: SourceHanSansSC-regular; +} + +.zjypydwd{ + position: absolute; + margin-left: 250rpx; + margin-top: 30px; + width: 28px; + height: 20px; + color: rgba(206, 206, 206, 1); + font-size: 12px; + text-align: left; + font-family: SourceHanSansSC-regular; +} + +.zjtable3{ + width: 750rpx; + height: 150rpx; +} + +.zjxxbox1{ + position: absolute; + margin-left: 260rpx; + width: 180px; + height: 60px; + line-height: 60px; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/textpic.png); + color: rgba(51, 51, 51, 1); + font-size: 14px; + text-align: left; + font-family: SourceHanSansSC-regular; + text-overflow: -o-ellipsis-lastline; + overflow: hidden; + text-overflow: ellipsis; +} +.zjtextydwd1{ + position: absolute; + margin-left: 210rpx; + margin-top: 30px; + width: 28px; + height: 20px; + color: rgba(206, 206, 206, 1); + font-size: 12px; + text-align: left; + font-family: SourceHanSansSC-regular; +} + +.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{ + position: absolute; + width:750rpx ; + height: 1624rpx; + margin: 0!important; + padding: 0!important; +} +.ztPopcenter{ + position: absolute; + left: 48px; +top: 111px; +width: 298px; +height: 542px; +background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/ztbkg11.png); +} + +.btn1{ + position: absolute; + 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%); + 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: 14px; + text-align: center; + font-family: SourceHanSansSC-medium; +} +.qxan1{ + left: 64px; + top: 568px; +} +.qran1{ + left: 206px; +top: 568px; +} +.ztwzk{ + position: absolute; + left: 81px; + top: 210px; + width: 214px; + height: 310px; + line-height: none; + color: rgba(206, 206, 206, 1); + font-size: 18px; + text-align: left; + font-family: Microsoft Yahei; + +} +.t-textarea{ + background-color: transparent; +} +.t-textarea__wrapper-inner{ + color: rgba(79, 79, 79, 1)!important; + font-size: 18px!important; + text-align: left; + font-family: SourceHanSansSC-regular; +} + +.cqlgd{ + width: 750rpx; + height: 230rpx; +} +.fhan11{ + border-radius: 58rpx; + position: absolute; + left: 160px; +top: 548px; +width: 55px; +height: 55px; +line-height: 17px; +background: linear-gradient(222.54deg, rgba(248,99,42,1) 14.03%,rgba(249,135,89,1) 85.21%); +color: rgba(16, 16, 16, 1); +font-size: 12px; +text-align: center; +box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); +font-family: Arial; +border: 3px solid rgba(255, 255, 255, 1); +} +.fan11r{ + position: absolute; + left: 175px; +top: 562px; +width: 30px; +height: 30px; +background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/xx/xtreturn.png); +} +.t-textarea{ + background-color: transparent!important; +} \ No newline at end of file