diff --git a/pages/home/jl/jlai/jlai.js b/pages/home/jl/jlai/jlai.js index 38d45cd..a9d1596 100644 --- a/pages/home/jl/jlai/jlai.js +++ b/pages/home/jl/jlai/jlai.js @@ -15,7 +15,9 @@ Page({ userInfo:{}, stxx:false, showChat:true, - showChatToast:false + showChatToast:false, + list: [], // 默认头像 + isShow: false }, addClick(){ this.setData({ @@ -82,10 +84,14 @@ Page({ getUserInfo(){ req.getRequest('/api/user/curt',{}).then((res)=>{ if(res.data.code==200){ - this.setData({userInfo:res.data.data}) + this.setData({ + userInfo:res.data.data, + isShow: true + }) if(!res.data.data.isChatVip){ this.setData({times:res.data.data.freeChatCount}) } + this.getDetaile() } }).catch((err)=>{ console.log(err); @@ -122,6 +128,17 @@ Page({ 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); + }, + /** * 生命周期函数--监听页面加载 */ diff --git a/pages/home/jl/jlai/jlai.wxml b/pages/home/jl/jlai/jlai.wxml index 7a817fc..fb91c81 100644 --- a/pages/home/jl/jlai/jlai.wxml +++ b/pages/home/jl/jlai/jlai.wxml @@ -1,5 +1,5 @@ - + @@ -28,7 +28,7 @@ - + 你好,我是你的星座守护精灵。除此之外,我还可以帮你解答更多问题。快来跟我聊聊吧! @@ -46,9 +46,9 @@ - + - + {{item.value}} diff --git a/pages/home/jl/jlai/jlai.wxss b/pages/home/jl/jlai/jlai.wxss index 1906cd1..d2f9cce 100644 --- a/pages/home/jl/jlai/jlai.wxss +++ b/pages/home/jl/jlai/jlai.wxss @@ -254,20 +254,17 @@ .chatbox1{ width:750rpx; - height:166rpx; - display: block; + display: flex; } .chatbox2{ width:750rpx; - height:166rpx; - display: block; + display: flex; background-color: rgba(248, 99, 42, 0.05); } .chattoux{ - margin-left: 32rpx; - margin-top: 32rpx; + margin: 32rpx; border-radius: 50%; overflow: hidden; width: 84rpx; @@ -280,14 +277,11 @@ } .chatinfo{ - margin-left: 74px; - margin-top: -70rpx; + margin-top: 50rpx; + margin-bottom: 20rpx; width: 280px; - height: 90px; color: rgba(79, 79, 79, 1); - font-size: 17px; - text-align: justify; - font-family: SourceHanSansSC-regular; + font-size: 34rpx; } .kthybtn{ diff --git a/pages/home/me/indexx.js b/pages/home/me/indexx.js index 9a4d2a0..be7e9f9 100644 --- a/pages/home/me/indexx.js +++ b/pages/home/me/indexx.js @@ -238,7 +238,7 @@ Page({ }, // 跳转到会员购买页面 go2Member(){ - wx.redirectTo({ + wx.navigateTo({ url: '/pages/home/me/member/member?isChatVip=' + this.data.userInfo.isChatVip }) }, @@ -292,7 +292,7 @@ Page({ go2Jcjb(){ wx.redirectTo({ url: '/pages/home/me/jcjb/jcjb' - }) + }) }, getUserInfo(){ req.getRequest('/api/user/curt',{}).then((res)=>{ @@ -360,7 +360,6 @@ Page({ */ onShow() { this.getUserInfo() - }, /** diff --git a/pages/home/me/member/member.js b/pages/home/me/member/member.js index ab90e15..354dad1 100644 --- a/pages/home/me/member/member.js +++ b/pages/home/me/member/member.js @@ -15,7 +15,6 @@ Page({ deadline: '' }, doKtHy() { - req.postRequest(`/api/v1/chat-service-order/prepare/${this.data.yhy?'2':'1'}`, { openid: this.data.openid }).then((res) => { @@ -36,9 +35,7 @@ Page({ icon: 'success', // 图标类型,默认success 图标支持开发文档的icon }) setTimeout(() => { - wx.switchTab({ - url: '/pages/home/me/indexx', - }) + wx.navigateBack() }, 1000) }, fail: () => { @@ -54,9 +51,7 @@ Page({ this.setData({yhy: !this.data.yhy}) }, go2Reback(){ - wx.switchTab({ - url: '/pages/home/me/indexx', - }) + wx.navigateBack() }, tQuest(){ this.setData({showToast:true}) diff --git a/pages/home/me/member/member.wxss b/pages/home/me/member/member.wxss index 85c0b8d..612c1b1 100644 --- a/pages/home/me/member/member.wxss +++ b/pages/home/me/member/member.wxss @@ -57,6 +57,7 @@ background-repeat: no-repeat; background-size:100% 100%; background-image: url(https://wish-assets.windymuse.com.cn/xy/hybt.png); + pointer-events: none; } .hgpng{ diff --git a/project.private.config.json b/project.private.config.json index 3c4e28c..a352426 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -42,6 +42,13 @@ "query": "id=225", "launchMode": "default", "scene": null + }, + { + "name": "", + "pathName": "pages/home/jl/jlai/jlai", + "query": "", + "launchMode": "default", + "scene": null } ] }