Commit 1c2ff5bdae4c956482190141ee3c4618347bfcbe
Exists in
dev_wjl
and in
1 other branch
解决冲突
Showing 13 changed files
- littleApp_child/app.js
- littleApp_child/app.json
- littleApp_child/packageA/pages/article/article.js
- littleApp_child/packageA/pages/chatbotwidget/chatbotwidget.js
- littleApp_child/packageA/pages/chatbotwidget/chatbotwidget.json
- littleApp_child/packageA/pages/chatbotwidget/chatbotwidget.wxml
- littleApp_child/packageA/pages/chatbotwidget/chatbotwidget.wxss
- littleApp_child/packageA/pages/editAddress/editAddress.js
- littleApp_child/packageA/pages/messageContent/messageContent.js
- littleApp_child/pages/Guide/guide.js
- littleApp_child/pages/home/home.js
- littleApp_child/pages/home/home.wxml
- littleApp_child/project.private.config.json
littleApp_child/app.js
View file @
1c2ff5b
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | //聊天控件 |
3 | 3 | let WebIM = wx.WebIM = require("./utils/WebIM.js").default; |
4 | 4 | let disp = require("./utils/broadcast"); |
5 | - | |
5 | +var plugin = requirePlugin("myPlugin"); | |
6 | 6 | App({ |
7 | 7 | getRoomPage: function () { |
8 | 8 | return this.getPage("pages/chatroom/chatroom") |
... | ... | @@ -298,6 +298,8 @@ |
298 | 298 | console.log("onOnline:") |
299 | 299 | } |
300 | 300 | }) |
301 | + | |
302 | + this.getINfoList() | |
301 | 303 | }, |
302 | 304 | getUserInfo: function (cb) { |
303 | 305 | var that = this |
... | ... | @@ -330,6 +332,50 @@ |
330 | 332 | unrederMsg:[], |
331 | 333 | hospital:{id:'',name:''} |
332 | 334 | }, |
335 | + getINfoList:function(){ | |
336 | + // console.log(userInfo.wxopenid,'userInfo'); | |
337 | + const res = wx.getAccountInfoSync(); | |
338 | + let height = 0 | |
339 | + wx.getSystemInfo({ | |
340 | + success: res => { | |
341 | + // console.log(res); | |
342 | + let isIOS = res.system.indexOf("iOS") > -1; | |
343 | + let navHeight = 0; | |
344 | + if (!isIOS) { | |
345 | + navHeight = 48; | |
346 | + } else { | |
347 | + navHeight = 44; | |
348 | + } | |
349 | + | |
350 | + } | |
351 | + }); | |
352 | + height = 48 + 44 | |
353 | + plugin.init({ | |
354 | + appid: "MWH8RhGZELAOcXT59HJNycPipQ9vvx", | |
355 | + openid: "organizeda52ac", | |
356 | + // appid: "P5Ot9PHJDechCYqDFAW1AiK6OtG3Ja", | |
357 | + textToSpeech: false, | |
358 | + guideList: [], | |
359 | + welcome: `您好,请问有什么能够帮助您的。您可以选择下方标签,进行相关问题查询`, | |
360 | + robotHeader:"https://dev-rp-api.healthbaby.com.cn/id_photo/20240620/20240623184438.png", | |
361 | + background: "#fff", | |
362 | + guideCardHeight: 50, | |
363 | + operateCardHeight: 130, | |
364 | + // navHeight: | |
365 | + navHeight: 0, | |
366 | + success: () => { | |
367 | + console.log('你好'); | |
368 | + // plugin.send({ | |
369 | + // query: "你好", | |
370 | + // success: res => { | |
371 | + // console.log(res); | |
372 | + // }, | |
373 | + // fail: error => {} | |
374 | + // }); | |
375 | + }, | |
376 | + fail: error => {} | |
377 | + }); | |
378 | + } | |
333 | 379 | }) |
334 | 380 | function calcUnReadSpot(message){ |
335 | 381 | let myName = wx.getStorageSync("hxName"); |
littleApp_child/app.json
View file @
1c2ff5b
... | ... | @@ -60,7 +60,8 @@ |
60 | 60 | "pages/messageNotification/messageNotification", |
61 | 61 | "pages/messageContent/messageContent", |
62 | 62 | "pages/feedbacklist/feedbacklist", |
63 | - "pages/feedbackxq/feedbackxq" | |
63 | + "pages/feedbackxq/feedbackxq", | |
64 | + "pages/chatbotwidget/chatbotwidget" | |
64 | 65 | ] |
65 | 66 | } |
66 | 67 | ], |
... | ... | @@ -73,6 +74,12 @@ |
73 | 74 | "sitemapLocation": "sitemap.json", |
74 | 75 | "useExtendedLib": { |
75 | 76 | "weui": true |
77 | + }, | |
78 | + "plugins": { | |
79 | + "myPlugin": { | |
80 | + "version": "1.4.2", | |
81 | + "provider": "wx8c631f7e9f2465e1" | |
82 | + } | |
76 | 83 | } |
77 | 84 | } |
littleApp_child/packageA/pages/article/article.js
View file @
1c2ff5b
littleApp_child/packageA/pages/chatbotwidget/chatbotwidget.js
View file @
1c2ff5b
1 | +//index.js | |
2 | +//获取应用实例 | |
3 | +const app = getApp() | |
4 | +var plugin = requirePlugin("myPlugin"); | |
5 | +var chat = plugin.getChatComponent(); | |
6 | + | |
7 | +Page({ | |
8 | + data: { | |
9 | + }, | |
10 | + onLoad: function () { | |
11 | + | |
12 | + wx.getSystemInfo({ | |
13 | + success: (res) => { | |
14 | + let isIOS = res.system.indexOf('iOS') > -1 | |
15 | + let navHeight = 0 | |
16 | + if (!isIOS) { | |
17 | + navHeight = 48 | |
18 | + } else { | |
19 | + navHeight = 44 | |
20 | + } | |
21 | + this.setData({ | |
22 | + status: res.statusBarHeight, | |
23 | + navHeight: navHeight, | |
24 | + statusBarHeight: res.statusBarHeight + navHeight | |
25 | + }) | |
26 | + } | |
27 | + }) | |
28 | + }, | |
29 | + getQueryCallback: function (e) { | |
30 | + | |
31 | + }, | |
32 | + goBackHome: function () { | |
33 | + wx.navigateBack({ | |
34 | + delta: 1 | |
35 | + }) | |
36 | + }, | |
37 | + back:function(e) { | |
38 | + this.goBackHome() | |
39 | + }, | |
40 | + chatOnFinish:function(e){ | |
41 | + var plugin = requirePlugin("myPlugin"); | |
42 | + var chat = plugin.getChatComponent(); | |
43 | + chat.clearChatRecord(); | |
44 | + chat.scrollToBottom(); | |
45 | + }, | |
46 | + onShareAppMessage:function(e) { | |
47 | + console.log(e,'2') | |
48 | + } | |
49 | +}) |
littleApp_child/packageA/pages/chatbotwidget/chatbotwidget.json
View file @
1c2ff5b
littleApp_child/packageA/pages/chatbotwidget/chatbotwidget.wxml
View file @
1c2ff5b
1 | +<!--packageA/pages/chatbotwidget/chatbotwidget.wxml--> | |
2 | +<!-- <text>packageA/pages/chatbotwidget/chatbotwidget.wxml</text> --> | |
3 | + | |
4 | +<view style="height:100%;background-color: #fff;"> | |
5 | + <chat | |
6 | + bind:chatOnFinish="chatOnFinish" | |
7 | + bind:openWebview="openWebview" | |
8 | + bind:openMiniProgram="openMiniProgram" | |
9 | + /> | |
10 | +</view> |
littleApp_child/packageA/pages/chatbotwidget/chatbotwidget.wxss
View file @
1c2ff5b
1 | +/* packageA/pages/chatbotwidget/chatbotwidget.wxss */ | |
2 | + | |
3 | +.nav { | |
4 | + position: relative; | |
5 | +} | |
6 | +.floatBtn { | |
7 | + z-index: 100; | |
8 | + position: absolute; | |
9 | + top: 50%; | |
10 | + margin-top: -50px; | |
11 | + right: 0; | |
12 | + width: 110px; | |
13 | + padding-left: 25px; | |
14 | + box-sizing: border-box; | |
15 | + display: flex; | |
16 | + align-items: center; | |
17 | + height:44px; | |
18 | + background:rgba(255,255,255,1); | |
19 | + box-shadow:0px 2px 5px 0px rgba(0,0,0,0.07); | |
20 | + border-radius:22px 0px 0px 22px; | |
21 | + border:1px solid rgba(232,232,232,1); | |
22 | +} | |
23 | +.correct{ | |
24 | + font-size:15px; | |
25 | + font-family:MicrosoftYaHeiUI; | |
26 | + font-weight:bold; | |
27 | + /* color:rgba(11,187,9,1); */ | |
28 | + color:rgba(96,98,102,1); | |
29 | + background-color: #ffffff; | |
30 | +} | |
31 | +.empty { | |
32 | + width:1px; | |
33 | + height:14px; | |
34 | + margin: 0 15px; | |
35 | + background-color: #E8E8E8; | |
36 | +} | |
37 | +.clear { | |
38 | + font-size:15px; | |
39 | + font-family:MicrosoftYaHeiUI; | |
40 | + font-weight:bold; | |
41 | + color:rgba(96,98,102,1); | |
42 | +} | |
43 | +.active { | |
44 | + color:rgba(11,187,9,1); | |
45 | +} | |
46 | +button::after { | |
47 | + border: none; | |
48 | +} | |
49 | +button { | |
50 | + padding: 0; | |
51 | + margin: 0; | |
52 | + background-color: #ffffff; | |
53 | +} | |
54 | +input{ | |
55 | + outline:none; | |
56 | + border:none; | |
57 | + list-style: none; | |
58 | +} |
littleApp_child/packageA/pages/editAddress/editAddress.js
View file @
1c2ff5b
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | } |
16 | 16 | }, |
17 | 17 | onAreaCommit(locationList, e) {//当用户更换地区 |
18 | - console.log('选择地址后', locationList) | |
18 | + // console.log('选择地址后', locationList) | |
19 | 19 | var self = this; |
20 | 20 | self.addrInfo = { |
21 | 21 | province: locationList[0] || {}, |
... | ... | @@ -35,7 +35,7 @@ |
35 | 35 | }); |
36 | 36 | }, |
37 | 37 | bindKeyInput: function (e) { |
38 | - console.log(e.detail.value) | |
38 | + // console.log(e.detail.value) | |
39 | 39 | this.data.babyAddress = e.detail.value |
40 | 40 | this.setData({ |
41 | 41 | babyAddress: this.data.babyAddress |
littleApp_child/packageA/pages/messageContent/messageContent.js
View file @
1c2ff5b
littleApp_child/pages/Guide/guide.js
View file @
1c2ff5b
... | ... | @@ -61,7 +61,7 @@ |
61 | 61 | |
62 | 62 | this.data.id = e.categoryId |
63 | 63 | this.data.category = e.category |
64 | - console.log(e.categoryId) | |
64 | + // console.log(e.categoryId) | |
65 | 65 | // 数据初始化 |
66 | 66 | page = 1 |
67 | 67 | hasMore = true |
68 | 68 | |
... | ... | @@ -109,10 +109,10 @@ |
109 | 109 | this.requestData(); |
110 | 110 | }, |
111 | 111 | myScroll: function(e) { |
112 | - console.log("e:", e) | |
112 | + // console.log("e:", e) | |
113 | 113 | // console.log("aaaaaaaaaaaaaaaaaaaaaaaaa " + e.detail.scrollTop + " ==== " + e.detail.scrollHeight + " === " + wx.getSystemInfoSync().windowHeight) |
114 | 114 | // if (e.detail.scrollTop >= (e.detail.scrollHeight - wx.getSystemInfoSync().windowHeight - 3)) { |
115 | - console.log("bbbbbbbb") | |
115 | + // console.log("bbbbbbbb") | |
116 | 116 | this.loadMore() |
117 | 117 | // } |
118 | 118 | }, |
... | ... | @@ -127,7 +127,7 @@ |
127 | 127 | days: getApp().globalData.days |
128 | 128 | } |
129 | 129 | networkUtil._get(api.babyPrecise, param, function(res) { |
130 | - console.log(res) | |
130 | + // console.log(res) | |
131 | 131 | isRefresh = false |
132 | 132 | var arr = [] |
133 | 133 | |
134 | 134 | |
... | ... | @@ -153,13 +153,13 @@ |
153 | 153 | categoryId: self.data.id, |
154 | 154 | days: getApp().globalData.days |
155 | 155 | } |
156 | - console.log(" categoryId ========= " + " ==== " + self.data.id) | |
156 | + // console.log(" categoryId ========= " + " ==== " + self.data.id) | |
157 | 157 | if (!param.categoryId) { |
158 | 158 | param.categoryId = 4316 |
159 | 159 | } |
160 | 160 | networkUtil._get(api.articleList, param, function(res) { |
161 | - console.log(param) | |
162 | - console.log(res) | |
161 | + // console.log(param) | |
162 | + // console.log(res) | |
163 | 163 | isRefresh = false |
164 | 164 | var arr = [] |
165 | 165 | if (page > 0) { // 加载更多模式 |
... | ... | @@ -189,7 +189,7 @@ |
189 | 189 | limit: 15 |
190 | 190 | } |
191 | 191 | networkUtil._get(api.riskGuideList, param, function(res) { |
192 | - console.log(res) | |
192 | + // console.log(res) | |
193 | 193 | isRefresh = false |
194 | 194 | var arr = [] |
195 | 195 | if (page > 1) { // 加载更多模式 |
... | ... | @@ -211,7 +211,7 @@ |
211 | 211 | }, |
212 | 212 | // 文章点赞 |
213 | 213 | articleLike(e) { |
214 | - console.log(e) | |
214 | + // console.log(e) | |
215 | 215 | var self = this |
216 | 216 | // 已经点赞 |
217 | 217 | if (e.currentTarget.dataset.islike == 1) { |
littleApp_child/pages/home/home.js
View file @
1c2ff5b
... | ... | @@ -136,9 +136,19 @@ |
136 | 136 | babyId:_that.data.erid, |
137 | 137 | },function (res) { |
138 | 138 | if (res.data.data.length > 0 ) { |
139 | - wx.navigateTo({ | |
139 | + wx.showLoading({ | |
140 | + title: '加载中...', | |
141 | + }); | |
142 | + | |
143 | + wx.navigateTo({ | |
140 | 144 | url: '/packageA/pages/messageNotification/messageNotification', |
141 | - }) | |
145 | + success: function() { | |
146 | + wx.hideLoading(); | |
147 | + }, | |
148 | + fail: function() { | |
149 | + wx.hideLoading(); | |
150 | + } | |
151 | + }); | |
142 | 152 | } else { |
143 | 153 | wx.showModal({ |
144 | 154 | title: '提示', |
... | ... | @@ -604,6 +614,7 @@ |
604 | 614 | } |
605 | 615 | networkUtil._post(api.getBabyBuildPidInfo,param,function(res){ |
606 | 616 | wx.setStorageSync('erid',res.data.data.id) |
617 | + // console.log('获取用户信息12122', res) | |
607 | 618 | self.getBabyMsgCountByIdNum(res.data.data.id) |
608 | 619 | // self.setNotification(res.data.data.id) |
609 | 620 | self.setData({ |
... | ... | @@ -952,6 +963,11 @@ |
952 | 963 | } |
953 | 964 | }) |
954 | 965 | } |
966 | + }, | |
967 | + consultation1(){ | |
968 | + wx.navigateTo({ | |
969 | + url: '/packageA/pages/chatbotwidget/chatbotwidget', | |
970 | + }) | |
955 | 971 | }, |
956 | 972 | // 获取未读总数 |
957 | 973 | getUnreaderMsgNum(){ |
littleApp_child/pages/home/home.wxml
View file @
1c2ff5b
... | ... | @@ -75,7 +75,7 @@ |
75 | 75 | <image src="../../source/yuyueyiyuan.png" style="{{item_small}}" class="foundation_item_small_image"></image> |
76 | 76 | <view class="foundation_item_small_text">疾病护理咨询</view> |
77 | 77 | </navigator> --> |
78 | - <navigator class="foundation_item_small" url="../consultationRecord/consultationRecord"> | |
78 | + <navigator wx:if="{{userData.hospitalId != 666668}}" class="foundation_item_small" url="../consultationRecord/consultationRecord"> | |
79 | 79 | <image src="../../source/except.png" style="{{item_small}}" class="foundation_item_small_image"></image> |
80 | 80 | <view class="foundation_item_small_text">历史咨询记录</view> |
81 | 81 | </navigator> |
82 | 82 | |
... | ... | @@ -108,11 +108,17 @@ |
108 | 108 | <image src="../../source/jianchajilu.png" style="{{item_small}}" class="foundation_item_small_image"></image> |
109 | 109 | <view class="foundation_item_small_text">眼保健记录</view> |
110 | 110 | </navigator> |
111 | - <navigator class="foundation_item_small" bindtap="consultation"> | |
111 | + <navigator wx:if="{{userData.hospitalId != 666668}}" class="foundation_item_small" bindtap="consultation"> | |
112 | 112 | <view class="unreadCount" wx:if="{{unTotleReadCount>0}}">{{unTotleReadCount}}</view> |
113 | 113 | <image src="../../source/icon_consult@2x.png" style="{{item_small}}" class="foundation_item_small_image"></image> |
114 | 114 | <view class="foundation_item_small_text">专家咨询</view> |
115 | 115 | </navigator> |
116 | + | |
117 | + <navigator wx:if="{{userData.hospitalId == 666668}}" class="foundation_item_small" bindtap="consultation1"> | |
118 | + <image src="../../source/icon_consult@2x.png" style="{{item_small}}" class="foundation_item_small_image"></image> | |
119 | + <view class="foundation_item_small_text">线上咨询</view> | |
120 | + </navigator> | |
121 | + | |
116 | 122 | <navigator wx:if="{{userData.hospitalId !== 666668}}" class="foundation_item_small" bind:tap="goGraph"> |
117 | 123 | <image src="../../source/graph.jpg" style="{{item_small}}" class="foundation_item_small_image"></image> |
118 | 124 | <view class="foundation_item_small_text">身高体重曲线</view> |
littleApp_child/project.private.config.json
View file @
1c2ff5b
... | ... | @@ -2,7 +2,8 @@ |
2 | 2 | "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", |
3 | 3 | "projectname": "littleApp_child", |
4 | 4 | "setting": { |
5 | - "compileHotReLoad": true | |
5 | + "compileHotReLoad": true, | |
6 | + "bigPackageSizeSupport": true | |
6 | 7 | }, |
7 | 8 | "condition": { |
8 | 9 | "miniprogram": { |