| @@ -72,7 +72,7 @@ Page({ | |||
| el.lastContentDate = $util.formatTime(new Date(_data.chatRecord.sendTime)); | |||
| el.lastContentDate = el.lastContentDate.replaceAll('/', '-'); | |||
| } | |||
| el.size + 1; | |||
| el.size += 1; | |||
| }) | |||
| _this.setData({ | |||
| msgData | |||
| @@ -108,6 +108,7 @@ Page({ | |||
| page: 1, | |||
| size: 10, | |||
| msgData: [], | |||
| pageLoading: true, | |||
| }) | |||
| this.getMsgData(); | |||
| }, | |||
| @@ -168,7 +169,26 @@ Page({ | |||
| this.getListData(); | |||
| } | |||
| }, | |||
| onHide(){ | |||
| // 去关注 | |||
| followApplets(){ | |||
| wx.navigateTo({ | |||
| url: "/pages/outLink/outLink?followApplets=true", //跳转页面的路径,可带参数 ?隔开,不同参数用 & 分隔;相对路径,不需要.wxml后缀 | |||
| success: function () {}, //成功后的回调; | |||
| fail: function () {}, //失败后的回调; | |||
| complete: function () {} //结束后的回调(成功,失败都会执行) | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面隐藏 | |||
| */ | |||
| onHide: function () { | |||
| wx.closeSocket(); | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面卸载 | |||
| */ | |||
| onUnload: function () { | |||
| wx.closeSocket(); | |||
| }, | |||
| }) | |||
| @@ -7,7 +7,7 @@ | |||
| <view class="top-view" wx:if="{{ topShow }}"> | |||
| <image class="msg-top-img fl" src="/images/home/msg-top-icon.png" /> | |||
| <view class="msg-text fl">关注公众号可随时接收离线消息~</view> | |||
| <van-button color="#5e73e5" round class="msg-btn-go fl" size="small">前往关注</van-button> | |||
| <van-button color="#5e73e5" round class="msg-btn-go fl" size="small" bindtap="followApplets">前往关注</van-button> | |||
| <image class="msg-colse-img fl" src="/images/home/close.png" bind:tap="closeTopShow" /> | |||
| </view> | |||
| <view class="msg-box-view {{ topShow ? 'topShow' : '' }} not-msg-data" wx:if="{{ msgData.length < 1 }}"> | |||
| @@ -271,7 +271,7 @@ Page({ | |||
| * 生命周期函数--监听页面卸载 | |||
| */ | |||
| onUnload: function () { | |||
| wx.closeSocket(); | |||
| }, | |||
| /** | |||
| @@ -6,15 +6,20 @@ Page({ | |||
| * 页面的初始数据 | |||
| */ | |||
| data: { | |||
| htmlUrl:"", | |||
| htmlUrl: "", | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad: function (options) { | |||
| let htmlUrl = `${app.mangerUrl}/customerService/dist/mobileClient.html?entryType=0&miniUrl=` + options.url + `&customerId=` + app.globalData.customerId; | |||
| // 如果是去关注 | |||
| if (options.followApplets == "true") { | |||
| htmlUrl = "https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzIwNDEzNzk5MA==&scene=124#wechat_redirect"; | |||
| } | |||
| this.setData({ | |||
| htmlUrl: `${app.mangerUrl}/customerService/dist/mobileClient.html?entryType=0&miniUrl=` + options.url + `&customerId=` + app.globalData.customerId | |||
| htmlUrl | |||
| }) | |||
| }, | |||