Commit 27df54ec86d4ef7a544a6610ed66ea16625778d2
1 parent
12cf26a6bf
Exists in
master
and in
2 other branches
群聊
Showing 5 changed files with 127 additions and 22 deletions
littleApp_child/pages/chatroom/chatroom.js
View file @
27df54e
littleApp_child/pages/doctorLists/doctorLists.js
View file @
27df54e
| ... | ... | @@ -29,7 +29,12 @@ |
| 29 | 29 | * 生命周期函数--监听页面加载 |
| 30 | 30 | */ |
| 31 | 31 | onLoad: function (options) { |
| 32 | + console.log(options) | |
| 32 | 33 | var that = this; |
| 34 | + that.setData({ | |
| 35 | + memberId:options.memberId, | |
| 36 | + serviceId:options.serviceId, | |
| 37 | + }) | |
| 33 | 38 | networkUtil.showLoading(); |
| 34 | 39 | networkUtil._get(api.getWxDoctors,{},function(res){ |
| 35 | 40 | var data = res.data.doctors; |
| ... | ... | @@ -98,6 +103,40 @@ |
| 98 | 103 | */ |
| 99 | 104 | onShareAppMessage: function () { |
| 100 | 105 | |
| 106 | + }, | |
| 107 | + chat(e){ | |
| 108 | + var self=this; | |
| 109 | + var doctorId = e.target.dataset.doctorid; | |
| 110 | + console.log(doctorId) | |
| 111 | + networkUtil._post(api.addBabyChatroom,{doctorId:doctorId},function(res){ | |
| 112 | + console.log(res) | |
| 113 | + self.setData({ | |
| 114 | + doctorHxName:res.data.data.doctorHxName, | |
| 115 | + doctorName:res.data.data.doctorName, | |
| 116 | + kfHxName:res.data.data.kfHxName, | |
| 117 | + kfName:res.data.data.kfName, | |
| 118 | + memberHxName:res.data.data.memberHxName, | |
| 119 | + memberName:res.data.data.memberName, | |
| 120 | + username:'150346790928385' | |
| 121 | + }) | |
| 122 | + },function(res){ | |
| 123 | + | |
| 124 | + },'application/json') | |
| 125 | + var nameList={ | |
| 126 | + memberId:self.memberId, | |
| 127 | + serviceId:self.serviceId, | |
| 128 | + doctorHxName:self.doctorHxName, | |
| 129 | + doctorName:self.doctorName, | |
| 130 | + kfHxName:self.kfHxName, | |
| 131 | + kfName:self.kfName, | |
| 132 | + memberHxName:self.memberHxName, | |
| 133 | + memberName:self.memberName, | |
| 134 | + doctorId:self.doctorId | |
| 135 | + } | |
| 136 | + console.log(nameList) | |
| 137 | + wx.navigateTo({ | |
| 138 | + url: '../chatroom/chatroom?username='+ JSON.stringify(nameList), | |
| 139 | + }) | |
| 101 | 140 | }, |
| 102 | 141 | godoctor: function(e) { |
| 103 | 142 | var doctorId = e.currentTarget.dataset.doctorid; |
littleApp_child/pages/doctorLists/doctorLists.wxml
View file @
27df54e
| ... | ... | @@ -29,19 +29,13 @@ |
| 29 | 29 | <view class='service_name'>专家咨询</view> |
| 30 | 30 | </view> |
| 31 | 31 | <view class='divider'></view> |
| 32 | - <view class='item' wx:for="{{list}}"> | |
| 32 | + <view class='item' wx:for="{{list}}" bindtap="chat" data-doctorId="{{item.doctorId}}"> | |
| 33 | 33 | <view class='icon_name_view'> |
| 34 | 34 | <image class='icon' src="{{item.doctorImage.medium.length>0 ?item.doctorImage.medium:'../../source/default_doctor_icon.png'}}"></image> |
| 35 | 35 | <view bindtap='godoctor' data-doctorId="{{item.id}}" data-doctor="{{item}}"> |
| 36 | 36 | <view class='name_text'>{{item.name}}<text class="job_text">{{item.positional}}</text></view> |
| 37 | 37 | <view class="description_text">专家介绍</view> |
| 38 | 38 | </view> |
| 39 | - <view bindtap='itemClick' data-doctorId="{{item.id}}"> | |
| 40 | - <view class='price_view'> | |
| 41 | - <view class='discountPrice_text'>¥{{item.price}}</view> | |
| 42 | - </view> | |
| 43 | - <image class='choose_icon' src="{{item.isCheck ? '../../source/checkBox_yes.png' :'../../source/checkBox_no.png'}}"></image> | |
| 44 | - </view> | |
| 45 | 39 | |
| 46 | 40 | </view> |
| 47 | 41 | <view style='height:10px'></view> |
| ... | ... | @@ -51,18 +45,6 @@ |
| 51 | 45 | |
| 52 | 46 | <view style='height:50px;background:#eee'></view> |
| 53 | 47 | |
| 54 | -</view> | |
| 55 | - | |
| 56 | -<view class='bottom_view'> | |
| 57 | - <view class='divider'></view> | |
| 58 | - <view style='display: flex;'> | |
| 59 | - <view class='bottom_left'> | |
| 60 | - <view class='bottom_left_text1'>合计:</view> | |
| 61 | - <view class='bottom_left_text2'>¥{{totalPrize}}</view> | |
| 62 | - </view> | |
| 63 | - | |
| 64 | - <view class='bottom_right' bindtap='toPay'>去支付</view> | |
| 65 | - </view> | |
| 66 | 48 | </view> |
| 67 | 49 | |
| 68 | 50 |
littleApp_child/pages/home/home.js
View file @
27df54e
| ... | ... | @@ -805,9 +805,18 @@ |
| 805 | 805 | }, |
| 806 | 806 | //专家咨询 |
| 807 | 807 | consultation(){ |
| 808 | + console.log(this.data.userData) | |
| 808 | 809 | if(this.data.userData.disStatus == 0){ |
| 810 | + var my = wx.getStorageSync('hxName') | |
| 811 | + var nameList = { | |
| 812 | + myName: my, | |
| 813 | + your: this.data.userData.disData.doctorHxName, | |
| 814 | + memberId:this.data.userData.disData.memberId, | |
| 815 | + doctorId:this.data.userData.disData.doctorId | |
| 816 | + } | |
| 817 | + console.log(nameList) | |
| 809 | 818 | wx.navigateTo({ |
| 810 | - url: '../doctorLists/doctorLists', | |
| 819 | + url: '../doctorLists/doctorLists?username='+ JSON.stringify(nameList), | |
| 811 | 820 | }) |
| 812 | 821 | }else if(this.data.userData.disStatus == 1){ |
| 813 | 822 | var my = wx.getStorageSync('hxName') |
| ... | ... | @@ -822,7 +831,7 @@ |
| 822 | 831 | wx.setStorageSync('serviceId',serviceId) |
| 823 | 832 | console.log(nameList) |
| 824 | 833 | wx.navigateTo({ |
| 825 | - url: '../chatroom/chatroom?username='+ JSON.stringify(nameList) | |
| 834 | + url: '../doctorLists/doctorLists?username='+ JSON.stringify(nameList), | |
| 826 | 835 | }) |
| 827 | 836 | } |
| 828 | 837 | }, |
project.config.json
View file @
27df54e
| 1 | +{ | |
| 2 | + "description": "项目配置文件", | |
| 3 | + "packOptions": { | |
| 4 | + "ignore": [] | |
| 5 | + }, | |
| 6 | + "setting": { | |
| 7 | + "urlCheck": true, | |
| 8 | + "es6": true, | |
| 9 | + "enhance": false, | |
| 10 | + "postcss": true, | |
| 11 | + "preloadBackgroundData": false, | |
| 12 | + "minified": true, | |
| 13 | + "newFeature": false, | |
| 14 | + "coverView": true, | |
| 15 | + "nodeModules": false, | |
| 16 | + "autoAudits": false, | |
| 17 | + "showShadowRootInWxmlPanel": true, | |
| 18 | + "scopeDataCheck": false, | |
| 19 | + "uglifyFileName": false, | |
| 20 | + "checkInvalidKey": true, | |
| 21 | + "checkSiteMap": true, | |
| 22 | + "uploadWithSourceMap": true, | |
| 23 | + "compileHotReLoad": false, | |
| 24 | + "useMultiFrameRuntime": true, | |
| 25 | + "useApiHook": true, | |
| 26 | + "useApiHostProcess": false, | |
| 27 | + "babelSetting": { | |
| 28 | + "ignore": [], | |
| 29 | + "disablePlugins": [], | |
| 30 | + "outputPath": "" | |
| 31 | + }, | |
| 32 | + "enableEngineNative": false, | |
| 33 | + "bundle": false, | |
| 34 | + "useIsolateContext": true, | |
| 35 | + "useCompilerModule": true, | |
| 36 | + "userConfirmedUseCompilerModuleSwitch": false, | |
| 37 | + "userConfirmedBundleSwitch": false, | |
| 38 | + "packNpmManually": false, | |
| 39 | + "packNpmRelationList": [], | |
| 40 | + "minifyWXSS": true | |
| 41 | + }, | |
| 42 | + "compileType": "miniprogram", | |
| 43 | + "libVersion": "2.17.0", | |
| 44 | + "appid": "wxdeb19b793d8ab23b", | |
| 45 | + "projectname": "littleapp_child", | |
| 46 | + "debugOptions": { | |
| 47 | + "hidedInDevtools": [] | |
| 48 | + }, | |
| 49 | + "scripts": {}, | |
| 50 | + "staticServerOptions": { | |
| 51 | + "baseURL": "", | |
| 52 | + "servePath": "" | |
| 53 | + }, | |
| 54 | + "isGameTourist": false, | |
| 55 | + "condition": { | |
| 56 | + "search": { | |
| 57 | + "list": [] | |
| 58 | + }, | |
| 59 | + "conversation": { | |
| 60 | + "list": [] | |
| 61 | + }, | |
| 62 | + "game": { | |
| 63 | + "list": [] | |
| 64 | + }, | |
| 65 | + "plugin": { | |
| 66 | + "list": [] | |
| 67 | + }, | |
| 68 | + "gamePlugin": { | |
| 69 | + "list": [] | |
| 70 | + }, | |
| 71 | + "miniprogram": { | |
| 72 | + "list": [] | |
| 73 | + } | |
| 74 | + } | |
| 75 | +} |