From f8fa8239699e65624275133110bd4b47a60d2354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=B6=A6=E5=AF=92?= Date: Tue, 30 Jul 2024 09:34:04 +0800 Subject: [PATCH] =?UTF-8?q?fleat:=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- littleApp_child/app.js | 27 +-- littleApp_child/app.json | 4 +- .../pages/messageContent/messageContent.js | 85 ++++++++++ .../pages/messageContent/messageContent.json | 8 + .../pages/messageContent/messageContent.wxml | 28 ++++ .../pages/messageContent/messageContent.wxss | 53 ++++++ .../messageNotification/messageNotification.js | 183 +++++++++++++++++++++ .../messageNotification/messageNotification.json | 8 + .../messageNotification/messageNotification.wxml | 36 ++++ .../messageNotification/messageNotification.wxss | 94 +++++++++++ littleApp_child/pages/chatHis/chatHis.js | 2 +- littleApp_child/pages/home/home.js | 97 ++++++++--- littleApp_child/pages/home/home.wxml | 9 +- littleApp_child/pages/home/home.wxss | 27 +++ littleApp_child/pages/login/login.js | 4 +- littleApp_child/source/xiaox.png | Bin 0 -> 2832 bytes littleApp_child/utils/apiFile.js | 8 +- littleApp_child/utils/network_util.js | 2 +- 18 files changed, 630 insertions(+), 45 deletions(-) create mode 100644 littleApp_child/packageA/pages/messageContent/messageContent.js create mode 100644 littleApp_child/packageA/pages/messageContent/messageContent.json create mode 100644 littleApp_child/packageA/pages/messageContent/messageContent.wxml create mode 100644 littleApp_child/packageA/pages/messageContent/messageContent.wxss create mode 100644 littleApp_child/packageA/pages/messageNotification/messageNotification.js create mode 100644 littleApp_child/packageA/pages/messageNotification/messageNotification.json create mode 100644 littleApp_child/packageA/pages/messageNotification/messageNotification.wxml create mode 100644 littleApp_child/packageA/pages/messageNotification/messageNotification.wxss create mode 100644 littleApp_child/source/xiaox.png diff --git a/littleApp_child/app.js b/littleApp_child/app.js index 5da8d0b..7cd11aa 100644 --- a/littleApp_child/app.js +++ b/littleApp_child/app.js @@ -25,7 +25,7 @@ App({ this.globalData.token = userToken this.globalData.userId = userId this.globalData.currentId = userId[0] - console.log(userToken) + // console.log(userToken) // wx.navigateTo({ // url: 'pages/BloodSugerHome/BloodSugerHome' @@ -67,13 +67,13 @@ App({ //聊天 WebIM.conn.listen({ onOpened: function (message) { - console.log("登录成功") + // console.log("登录成功") wx.setStorageSync('isHxOpend', true) // WebIM.conn.setPresence() // WebIM.conn.getRoster(rosters) }, onPresence: function (message) { - console.log('onPresence', message) + // console.log('onPresence', message) var pages = getCurrentPages() if (message.type == "unsubscribe") { pages[0].moveFriend(message) @@ -98,7 +98,7 @@ App({ // } }, onTextMessage(message){ - console.log("onTextMessage", message); + // console.log("onTextMessage", message); var page = that.getRoomPage(); if(message){ if(onMessageError(message)){ @@ -133,17 +133,17 @@ App({ key: messageFrom + myName, data: that.globalData.unrederMsg[messageFrom + myName], success: function () { - console.log('setStorage success') + // console.log('setStorage success') disp.fire("em.xmpp.unreadspot", message); } }) - console.log('消息打印',messageFrom + myName,that.globalData.unrederMsg[messageFrom + myName]) + // console.log('消息打印',messageFrom + myName,that.globalData.unrederMsg[messageFrom + myName]) } } } }, onEmojiMessage: function (message) { - console.log("onEmojiMessage", message); + // console.log("onEmojiMessage", message); if(message){ if(onMessageError(message)){ msgStorage.saveReceiveMsg(message, msgType.EMOJI); @@ -151,7 +151,7 @@ App({ } }, onPictureMessage(message){ - console.log("onPictureMessage", message); + // console.log("onPictureMessage", message); var page = that.getRoomPage() if(message){ if(onMessageError(message)){ @@ -186,7 +186,7 @@ App({ key: messageFrom + myName, data: that.globalData.unrederMsg[messageFrom + myName], success: function () { - console.log('setStorage success') + // console.log('setStorage success') disp.fire("em.xmpp.unreadspot", message); } }) @@ -195,7 +195,7 @@ App({ } }, onAudioMessage: function ( message ) { - console.log("onAudioMessage", message); + // console.log("onAudioMessage", message); var page = that.getRoomPage() if(message){ if(onMessageError(message)){ @@ -232,7 +232,7 @@ App({ key: messageFrom + myName, data: that.globalData.unrederMsg[messageFrom+ myName], success: function () { - console.log('setStorage success') + // console.log('setStorage success') disp.fire("em.xmpp.unreadspot", message); } }) @@ -242,7 +242,7 @@ App({ }, // 各种异常 onError(error){ - console.log(error) + // console.log(error) // 16: server-side close the websocket connection if(error.type == WebIM.statusCode.WEBIM_CONNCTION_DISCONNECTED && !logout){ if(WebIM.conn.autoReconnectNumTotal < WebIM.conn.autoReconnectNumMax){ @@ -282,7 +282,7 @@ App({ disp.fire("em.xmpp.error.tokenErr"); } if (error.type == 'socket_error') {///sendMsgError - console.log('socket_errorsocket_error', error) + // console.log('socket_errorsocket_error', error) wx.showToast({ title: "网络已断开", icon: 'none', @@ -310,6 +310,7 @@ App({ wx.getUserInfo({ success: function (res) { that.globalData.userInfo = res.userInfo + // console.log(res.userInfo,'res.userInfo'); typeof cb == "function" && cb(that.globalData.userInfo) } }) diff --git a/littleApp_child/app.json b/littleApp_child/app.json index 7625df6..76ef78d 100644 --- a/littleApp_child/app.json +++ b/littleApp_child/app.json @@ -56,7 +56,9 @@ "pages/article/article", "pages/preDocumented/preDocumented", "pages/serviceNotice/serviceNotice", - "pages/eatAddress/eatAddress" + "pages/eatAddress/eatAddress", + "pages/messageNotification/messageNotification", + "pages/messageContent/messageContent" ] } ], diff --git a/littleApp_child/packageA/pages/messageContent/messageContent.js b/littleApp_child/packageA/pages/messageContent/messageContent.js new file mode 100644 index 0000000..4638680 --- /dev/null +++ b/littleApp_child/packageA/pages/messageContent/messageContent.js @@ -0,0 +1,85 @@ +// packageA/pages/messageContent/messageContent.js + +var networkUtil = require('../../../utils/network_util.js') +var api = require('../../../utils/apiFile.js') +Page({ + + /** + * 页面的初始数据 + */ + data: { + setObject:{} + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad({id}) { + networkUtil.showLoading() + if (id) { + this.getmessageContent(id) + } + }, + getmessageContent:function(id){ + const _that = this + networkUtil._get(api.getBabyMsgById,{ + msgId:id + },function (res) { + console.log(res,'res'); + _that.setData({ + setObject:res.data.object + }) + wx.hideToast(); + }, function (res) { + networkUtil.showErrorToast(res.errormsg) + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/littleApp_child/packageA/pages/messageContent/messageContent.json b/littleApp_child/packageA/pages/messageContent/messageContent.json new file mode 100644 index 0000000..bebb60f --- /dev/null +++ b/littleApp_child/packageA/pages/messageContent/messageContent.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "医院活动通知详情", + "navigationBarBackgroundColor": "#48C17B", + "navigationBarTextStyle": "white", + "backgroundColor": "#d8dbd4", + "pageOrientation": "auto", + "usingComponents": {} +} \ No newline at end of file diff --git a/littleApp_child/packageA/pages/messageContent/messageContent.wxml b/littleApp_child/packageA/pages/messageContent/messageContent.wxml new file mode 100644 index 0000000..55c0836 --- /dev/null +++ b/littleApp_child/packageA/pages/messageContent/messageContent.wxml @@ -0,0 +1,28 @@ + + + + + {{setObject.title}} + + + + + + {{setObject.createdStr}} + + 阅读量:{{setObject.readNum}} + + + + + + + + + + + + + {{setObject.content}} + + \ No newline at end of file diff --git a/littleApp_child/packageA/pages/messageContent/messageContent.wxss b/littleApp_child/packageA/pages/messageContent/messageContent.wxss new file mode 100644 index 0000000..b481cb6 --- /dev/null +++ b/littleApp_child/packageA/pages/messageContent/messageContent.wxss @@ -0,0 +1,53 @@ +/* packageA/pages/messageContent/messageContent.wxss */ + +/* pages/messageContent/Count.wxss */ +.title { + margin: 56rpx 36rpx 30rpx; + font-family: Adobe Heiti Std; + font-size: 34rpx; + color: #333333; + line-height: 46rpx; + text-align: justifyLeft; + font-style: normal; + text-transform: none; +} +.time-read{ + display: flex; + margin: 0 36rpx; + font-family: SourceHanSansCN, SourceHanSansCN; + font-weight: 400; + font-size: 24rpx; + color: #999999; + text-align: justifyLeft; + font-style: normal; + text-transform: none; +} +.time-read .time{ + margin-right: 59rpx; +} + +.penner{ + margin: 45rpx 31rpx; + width: 690rpx; + height: 294rpx; + background: #7F7F7F; + border-radius: 10rpx 10rpx 10rpx 10rpx; +} + +.penner image{ + width: 100%; + height: 100%; +} +.content{ + margin: 20rpx 30rpx; + font-family: SourceHanSansCN, SourceHanSansCN; + font-weight: 400; + font-size: 28rpx; + color: #333333; + font-style: normal; + text-transform: none; +} + +.content .content1{ + margin-bottom: 50rpx; +} \ No newline at end of file diff --git a/littleApp_child/packageA/pages/messageNotification/messageNotification.js b/littleApp_child/packageA/pages/messageNotification/messageNotification.js new file mode 100644 index 0000000..54ec577 --- /dev/null +++ b/littleApp_child/packageA/pages/messageNotification/messageNotification.js @@ -0,0 +1,183 @@ +// pages/messageNotification/message.js + +// 网络请求工具类 +var networkUtil = require('../../../utils/network_util.js') +var api = require('../../../utils/apiFile.js') +Page({ + + /** + * 页面的初始数据 + */ + data: { + notificationList:[], // 消息通知列表 + currentPage: 1, // 当前页码 + limit: 10, // 每页显示的数据条数 + hasMoreData: true, // 是否有更多数据可加载 + babyId:null, + formattedDate:null + }, + + //获取消息通知 + getNotificationList:function(){ + + }, + + // 下拉加载 + loadMore:function(){ + const self = this; + if (!self.data.hasMoreData) { + return; // 如果没有更多数据,不执行任何操作 + } + // 使用 setData 更新页面状态为正在加载 + self.setData({ + isLoading: true + }); + networkUtil._get(api.getMsgList, { + page: self.data.currentPage, + limit: self.data.limit, + babyId:self.data.babyId, + }, function(res) { + if (res.data && res.data.data.length > 0) { + const newData = self.data.notificationList.concat(res.data.data); + + + + self.setData({ + notificationList: newData, + currentPage: self.data.currentPage + 1, + isLoading: false + }); + // 判断是否还有更多数据 + const hasMoreData = res.data.pageInfo.page < res.data.pageInfo.lastPage + // 更新页面数据(假设你在微信小程序或其他使用setData方法的框架中) + self.setData({ + hasMoreData: hasMoreData + }); + + wx.hideToast(); + } else { + // 如果没有返回数据,表示没有更多数据了 + self.setData({ + hasMoreData: false, + isLoading: false + }); + } + }, function(res) { + networkUtil.showErrorToast(res.errormsg); + wx.hideToast(); + }); + }, + + // 跳转 + messageBtn:function(e){ + const id = e.currentTarget.dataset.index + if(id){ + setTimeout(() =>{ + wx.navigateTo({ + url: `/packageA/pages/messageContent/messageContent?id=${id}`, + }) + },100) + } else { + return + } + }, + // 快速预约课程 + goAddQuestion: function(e) { + networkUtil.showLoading(); + var self = this; + wx.showModal({ + title: '提示', + confirmText: '线上', + content:`您目前是要线上预约还是现场预约?`, + cancelText: '现场', + success(res) { + if (res.confirm) { + var param = { courseId: e.target.dataset.id, type: 1 }; + networkUtil._get(api.orderCourse, param, function(res) { + if (res.data.errorcode == 0) { + networkUtil.showToast('预约成功'); + self.loadMore(); + } + }, + function(res) { + networkUtil.showErrorToast(res.errormsg); + wx.hideToast(); + }); + } else if (res.cancel) { + var param = { courseId: e.target.dataset.id, type: 2 }; + networkUtil._get(api.orderCourse, param, function(res) { + // console.log(ress,'res'); + if (res.data.errorcode == 0) { + networkUtil.showToast('预约成功'); + self.loadMore(); + } + } + , function(res) { + networkUtil.showErrorToast(res.errormsg); + wx.hideToast(); + } + ); + } + } + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + networkUtil.showLoading() + this.setData({ + babyId:wx.getStorageSync('erid') + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + this.loadMore() + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/littleApp_child/packageA/pages/messageNotification/messageNotification.json b/littleApp_child/packageA/pages/messageNotification/messageNotification.json new file mode 100644 index 0000000..b6cf340 --- /dev/null +++ b/littleApp_child/packageA/pages/messageNotification/messageNotification.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "医院活动通知", + "navigationBarBackgroundColor": "#48C17B", + "navigationBarTextStyle": "white", + "backgroundColor": "#d8dbd4", + "pageOrientation": "auto", + "usingComponents": {} +} \ No newline at end of file diff --git a/littleApp_child/packageA/pages/messageNotification/messageNotification.wxml b/littleApp_child/packageA/pages/messageNotification/messageNotification.wxml new file mode 100644 index 0000000..efb29d1 --- /dev/null +++ b/littleApp_child/packageA/pages/messageNotification/messageNotification.wxml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + 通知 + + + + {{item.createdStr}} + + + + + + {{item.title}} + + + + {{item.content}} + + + + + + \ No newline at end of file diff --git a/littleApp_child/packageA/pages/messageNotification/messageNotification.wxss b/littleApp_child/packageA/pages/messageNotification/messageNotification.wxss new file mode 100644 index 0000000..45d0770 --- /dev/null +++ b/littleApp_child/packageA/pages/messageNotification/messageNotification.wxss @@ -0,0 +1,94 @@ +/* packageA/pages/messageNotification/messageNotification.wxss */ + +.messageNotification { + width: 100vw; + height: 100vh; + background-color: #F2F2F2; +} + +.messageNotification .messageNotification-item{ + width: 690rpx; + margin: 28rpx 30rpx; + background: #FFFFFF; + border-radius: 6rpx 6rpx 6rpx 6rpx; + } + + .messageNotification-item .head{ + height: 100rpx; + display: flex; + align-items: center; + justify-content: space-between; + border-bottom: 2rpx solid #F4F4F4; + padding: 0 36rpx; + } + + .head .time{ + font-family: SourceHanSansSC, SourceHanSansSC; + font-weight: 400; + font-size: 22rpx; + color: #636363; + line-height: 0rpx; + text-align: left; + font-style: normal; + text-transform: none; + } + + .messageNotification-item .notice{ + position: relative; + } + + .notice .text { + position: absolute; + top: 10rpx; + left: -20rpx; + width: 10rpx; + height: 10rpx; + background: #FF2727; + border-radius: 5rpx 5rpx 5rpx 5rpx + } + + .notice .notice-title { + font-family: SourceHanSansSC, SourceHanSansSC; + font-weight: 400; + font-size: 22rpx; + color: #FFFFFF; + width: 56rpx; + height: 31rpx; + line-height: 31rpx; + text-align: center; + } + .notice .tile-color{ + background: #FF6D89; + border-radius: 3rpx 3rpx 3rpx 3rpx; + } + .notice .tile-color1 { + background: #FD992F; + border-radius: 3rpx 3rpx 3rpx 3rpx; + } + + .messageNotification-item .content{ + padding: 30rpx; + + } + + .content .title-head{ + font-family: SourceHanSansSC, SourceHanSansSC; + font-weight: 400; + font-size: 28rpx; + color: #0B0B0B; + margin-bottom: 20rpx; + font-style: normal; + text-transform: none; + } + .content .title-content{ + font-family: SourceHanSansSC, SourceHanSansSC; + font-weight: 400; + font-size: 24rpx; + color: #999999; + font-style: normal; + text-transform: none; + display: -webkit-box; + -webkit-line-clamp: 3; /* 设置最大行数 */ + -webkit-box-orient: vertical; /* 设置为垂直方向 */ + overflow: hidden; /* 超出部分隐藏 */ + } \ No newline at end of file diff --git a/littleApp_child/pages/chatHis/chatHis.js b/littleApp_child/pages/chatHis/chatHis.js index b87a6cf..668d49a 100644 --- a/littleApp_child/pages/chatHis/chatHis.js +++ b/littleApp_child/pages/chatHis/chatHis.js @@ -19,7 +19,7 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - console.log(options) + // console.log(options) let me = this; this.setData({ illnessList:{ title:'疾病类型', diff --git a/littleApp_child/pages/home/home.js b/littleApp_child/pages/home/home.js index 04cc6c5..bcfb49b 100644 --- a/littleApp_child/pages/home/home.js +++ b/littleApp_child/pages/home/home.js @@ -29,6 +29,7 @@ var hospitalId; Page({ /*---------属性变量--------*/ data: { + MsgCount:null, isLogin: '', item_big_height: 0, item_small: 0, @@ -84,11 +85,14 @@ Page({ riskBase: false, //是否开通疾病指导 riskDise:false, - hospitalId1:null + hospitalId1:null, + userInfoDate:{}, + erid:null }, /*---------生命周期--------*/ onLoad: function(options) { - console.log(options,'options1121'); + // console.log(app.globalData,'options1121'); + this.getUserInfo(app.globalData.token) hospitalId = options.hospitalId; this.calculatePageSize() this.setData({ @@ -123,10 +127,34 @@ Page({ } }, + setNotification:function(){ + const _that = this + networkUtil._get(api.getMsgList,{ + page: 1, + limit: 20, + babyId:_that.data.erid, + },function (res) { + if (res.data.data.length > 0 ) { + wx.navigateTo({ + url: '/packageA/pages/messageNotification/messageNotification', + }) + } else { + wx.showModal({ + title: '提示', + content: '当前没有医院活动通知', + showCancel: false, + }) + } + }, function (res) { + networkUtil.showErrorToast(res.errormsg) + }) + + + }, onShow: function() { // 生命周期函数--监听页面显示 if (wx.getStorageSync("access_token") != null&&wx.getStorageSync("access_token")) { - console.log(wx.getStorageSync("access_token")) + // console.log(wx.getStorageSync("access_token")) this.connectWebIM() } @@ -146,6 +174,23 @@ Page({ // 移除监听 event.remove('likeChanged', this); }, + + getBabyMsgCountByIdNum:function(id){ + const _that = this + networkUtil._get(api.getBabyMsgCountById,{ + babyId:id + },function (res) { + // console.log(res.data.object,'res1111'); + _that.setData({ + MsgCount:res.data.object + }) + wx.hideToast(); + }, function (res) { + networkUtil.showErrorToast(res.errormsg) + }) + }, + + /*---------交互--------*/ // 下拉刷新回调接口 onPullDownRefresh: function() { @@ -266,7 +311,7 @@ Page({ toBefore() { var index = this.data.babyIndex index-- - console.log('index', index) + // console.log('index', index) var left = true var right = true if (index == 0) { @@ -283,7 +328,7 @@ Page({ toAfter() { var index = this.data.babyIndex index++ - console.log('index', index) + // console.log('index', index) var left = true var right = true if (index == app.globalData.userId.length - 1) { @@ -419,7 +464,7 @@ Page({ var self = this var param = {} networkUtil._get(api.goods, param, function(res) { - console.log(res) + // console.log(res) res.data.data.map(function(item) { if (item.id == 7) { if (item.status == 1) { @@ -442,7 +487,7 @@ Page({ }) }, getAccessToken() { - console.log('getAccessToken') + // console.log('getAccessToken') var that = this var token = ''; var options = { @@ -450,7 +495,7 @@ Page({ user: wx.getStorageSync('hxName'), pwd: wx.getStorageSync('hxPassWord'), success: function (res) { - console.log("conn success:", res); + // console.log("conn success:", res); wx.setStorageSync("access_token", res.data.access_token) token = res.data.access_token }, @@ -474,7 +519,7 @@ Page({ }) }, connectWebIM() { - console.log('开始连接') + // console.log('开始连接') //WebIM.conn.close() var that = this var options = { @@ -512,7 +557,7 @@ Page({ param.type = 2 } networkUtil._get(api.userInfo + app.globalData.currentId, param, function(res) { - console.log('获取用户信息', res) + // console.log('获取用户信息1212', res) if (res.data.data.bzstatus==1){ self.data.riskBase=true; }else{ @@ -556,7 +601,12 @@ Page({ 'hospitalId':app.globalData.userInfo.hospitalId } networkUtil._post(api.getBabyBuildPidInfo,param,function(res){ - console.log(res.data.data) + wx.setStorageSync('erid',res.data.data.id) + self.getBabyMsgCountByIdNum(res.data.data.id) + // self.setNotification(res.data.data.id) + self.setData({ + erid:res.data.data.id + }) app.globalData.encoded = res.data.data.encoded; app.globalData.openDisease = res.data.data.openDisease; if(res.data.data.openDisease == '2'){ @@ -584,7 +634,7 @@ Page({ limit: 100, days: days }, function(res) { - console.log('获取文章信息', res.data.list) + // console.log('获取文章信息', res.data.list) artCache[self.data.babyIndex] = res.data.list self.setArtInfo(res.data.list) }, function(res) { @@ -598,6 +648,7 @@ Page({ app.globalData.userInfo = data self.setData({ userData: data, + userInfoDate:data, tourist: getApp().globalData.tourist }) }, @@ -611,7 +662,7 @@ Page({ }, // 文章点赞 articleLike(e) { - console.log(e) + // console.log(e) var self = this // 已经点赞 if (e.currentTarget.dataset.islike == 1) { @@ -633,7 +684,7 @@ Page({ }, // 标签页面 clickLabel(e) { - console.log(e) + // console.log(e) wx.navigateTo({ url: '../articleLists/articleLists?category=' + e.currentTarget.dataset.categary, }) @@ -666,8 +717,8 @@ Page({ }, // 获取验证码 getVerifyCode: function(e) { - console.log("name:" + name) - console.log("phone:" + phone) + // console.log("name:" + name) + // console.log("phone:" + phone) // name = '小向阳' // phone = '18202810912' if (timeCount < 60) { @@ -758,14 +809,14 @@ Page({ } if (getApp().globalData.openInfo.mpid) { param.gzopenid = getApp().globalData.openInfo.mpid - console.log('绑定mpid', param) + // console.log('绑定mpid', param) } if (getApp().globalData.openInfo.childCode) { param.jscode = getApp().globalData.openInfo.childCode - console.log('绑定code', param) + // console.log('绑定code', param) } networkUtil._get(api.verifyCode, param, function(res) { - console.log(res) + // console.log(res) self.loginSuccess(res.data) }, function(res) { networkUtil.showErrorToast(res.errormsg) @@ -829,7 +880,7 @@ Page({ doctorId:this.data.userData.disData.doctorId } wx.setStorageSync('serviceId',serviceId) - console.log(nameList) + // console.log(nameList) wx.navigateTo({ url: '../consulting/consulting?username='+ JSON.stringify(nameList) }) @@ -843,6 +894,7 @@ Page({ 'hospitalId':app.globalData.userInfo.hospitalId } networkUtil._post(api.getBabyBuildPidInfo,param,function(res){ + // console.log(res,'res1212112'); if (res.data.data) { wx.navigateTo({url: '/packageA/pages/graph/graph?id=' + res.data.data.id }) } @@ -881,7 +933,6 @@ Page({ memberId:this.data.userData.disData.memberId, doctorId:this.data.userData.disData.doctorId } - console.log(nameList) wx.navigateTo({ url: '../doctorLists/doctorLists?username='+ JSON.stringify(nameList), }) @@ -907,7 +958,7 @@ Page({ var myName = wx.getStorageSync("hxName"); WebIM.conn.listRooms({ success: function(rooms){ - console.log(rooms) + // console.log(rooms) rooms.map((item) => { wx.getStorage({ key: item.roomId + myName, @@ -916,7 +967,7 @@ Page({ if(unreadMas){ num += unreadMas.length; } - console.log(num) + // console.log(num) that.setData({unTotleReadCount:num}) } }) diff --git a/littleApp_child/pages/home/home.wxml b/littleApp_child/pages/home/home.wxml index d36cee5..22930c3 100644 --- a/littleApp_child/pages/home/home.wxml +++ b/littleApp_child/pages/home/home.wxml @@ -13,7 +13,10 @@ - + + + {{MsgCount || ''}} +