作者 liaolinfeng

提交

1 -// pages/agreement/agreement.js  
2 -Page({  
3 -  
4 - /**  
5 - * 页面的初始数据  
6 - */  
7 - data: {  
8 -  
9 - },  
10 -  
11 - /**  
12 - * 生命周期函数--监听页面加载  
13 - */  
14 - onLoad: function (options) {  
15 -  
16 - },  
17 -  
18 - /**  
19 - * 生命周期函数--监听页面初次渲染完成  
20 - */  
21 - onReady: function () {  
22 -  
23 - },  
24 -  
25 - /**  
26 - * 生命周期函数--监听页面显示  
27 - */  
28 - onShow: function () {  
29 -  
30 - },  
31 -  
32 - /**  
33 - * 生命周期函数--监听页面隐藏  
34 - */  
35 - onHide: function () {  
36 -  
37 - },  
38 -  
39 - /**  
40 - * 生命周期函数--监听页面卸载  
41 - */  
42 - onUnload: function () {  
43 -  
44 - },  
45 -  
46 - /**  
47 - * 页面相关事件处理函数--监听用户下拉动作  
48 - */  
49 - onPullDownRefresh: function () {  
50 -  
51 - },  
52 -  
53 - /**  
54 - * 页面上拉触底事件的处理函数  
55 - */  
56 - onReachBottom: function () {  
57 -  
58 - },  
59 -  
60 - /**  
61 - * 用户点击右上角分享  
62 - */  
63 - onShareAppMessage: function () {  
64 -  
65 - }  
66 -})  
1 -<!--pages/agreement/agreement.wxml-->  
2 -<text>pages/agreement/agreement.wxml</text>  
1 -/* pages/agreement/agreement.wxss */  
@@ -4,4 +4,4 @@ @@ -4,4 +4,4 @@
4 <import src="../../wxParse/wxParse.wxml" /> 4 <import src="../../wxParse/wxParse.wxml" />
5 <template is='wxParse' data='{{wxParseData:content.nodes}}' /> 5 <template is='wxParse' data='{{wxParseData:content.nodes}}' />
6 </view> 6 </view>
7 -<view class='nodata'>暂无详情</view>  
  7 +<view class='nodata' wx:else>暂无详情</view>
@@ -4,18 +4,18 @@ @@ -4,18 +4,18 @@
4 const Page = require('../../utils/ald-stat.js').Page; 4 const Page = require('../../utils/ald-stat.js').Page;
5 const app = getApp(); 5 const app = getApp();
6 Page({ 6 Page({
7 - /**  
8 - * 页面的初始数据  
9 - */  
10 - data: {  
11 - showdoctor:false,//是否显示首页医生信息  
12 - show_notest:false,//显示有记录和无记录之间的切换  
13 - showfilesLog:false,//是否显示最新记录(没有记录不显示)  
14 - filesLogdata:'',//档案数量  
15 - doctorinfo:[],//医生信息  
16 - fileslog:{},//最新记录  
17 - },  
18 - goaddrecord(files_id, patient){ 7 + /**
  8 + * 页面的初始数据
  9 + */
  10 + data: {
  11 + showdoctor: false, //是否显示首页医生信息
  12 + show_notest: false, //显示有记录和无记录之间的切换
  13 + showfilesLog: false, //是否显示最新记录(没有记录不显示)
  14 + filesLogdata: '', //档案数量
  15 + doctorinfo: [], //医生信息
  16 + fileslog: {}, //最新记录
  17 + },
  18 + goaddrecord(files_id, patient) {
19 wx.navigateTo({ 19 wx.navigateTo({
20 url: '/pages/addrecord/addrecord?fields_id=' + files_id + '&patient=' + patient, 20 url: '/pages/addrecord/addrecord?fields_id=' + files_id + '&patient=' + patient,
21 success: function(res) {}, 21 success: function(res) {},
@@ -23,24 +23,24 @@ Page({ @@ -23,24 +23,24 @@ Page({
23 complete: function(res) {}, 23 complete: function(res) {},
24 }) 24 })
25 }, 25 },
26 - gointroduce(e){ 26 + gointroduce(e) {
27 console.log(e.currentTarget.dataset.id); 27 console.log(e.currentTarget.dataset.id);
28 wx.navigateTo({ 28 wx.navigateTo({
29 url: '/pages/introduce/introduce?doctor_id=' + e.currentTarget.dataset.id, 29 url: '/pages/introduce/introduce?doctor_id=' + e.currentTarget.dataset.id,
30 - success: function (res) { },  
31 - fail: function (res) { },  
32 - complete: function (res) { }, 30 + success: function(res) {},
  31 + fail: function(res) {},
  32 + complete: function(res) {},
33 }) 33 })
34 }, 34 },
35 - gonormal(){ 35 + gonormal() {
36 wx.navigateTo({ 36 wx.navigateTo({
37 url: '/pages/normal/normal', 37 url: '/pages/normal/normal',
38 - success: function (res) { },  
39 - fail: function (res) { },  
40 - complete: function (res) { }, 38 + success: function(res) {},
  39 + fail: function(res) {},
  40 + complete: function(res) {},
41 }) 41 })
42 }, 42 },
43 - goarticle(){ 43 + goarticle() {
44 wx.navigateTo({ 44 wx.navigateTo({
45 url: '/pages/article/article', 45 url: '/pages/article/article',
46 success: function(res) {}, 46 success: function(res) {},
@@ -48,14 +48,14 @@ Page({ @@ -48,14 +48,14 @@ Page({
48 complete: function(res) {}, 48 complete: function(res) {},
49 }) 49 })
50 }, 50 },
51 - gorecord(e){  
52 - let that=this;  
53 - if (that.data.showfilesLog){ 51 + gorecord(e) {
  52 + let that = this;
  53 + if (that.data.showfilesLog) {
54 wx.navigateTo({ 54 wx.navigateTo({
55 url: '/pages/record/record?showrecord=' + e.currentTarget.dataset.showrecord + '&files_id=' + 55 url: '/pages/record/record?showrecord=' + e.currentTarget.dataset.showrecord + '&files_id=' +
56 e.currentTarget.dataset.files_id, 56 e.currentTarget.dataset.files_id,
57 }) 57 })
58 - }else{ 58 + } else {
59 wx.showToast({ 59 wx.showToast({
60 title: '暂无记录', 60 title: '暂无记录',
61 icon: 'none', 61 icon: 'none',
@@ -63,99 +63,98 @@ Page({ @@ -63,99 +63,98 @@ Page({
63 }) 63 })
64 } 64 }
65 }, 65 },
66 - gofile_manage(files_id){ 66 + gofile_manage(files_id) {
67 console.log(files_id) 67 console.log(files_id)
68 wx.navigateTo({ 68 wx.navigateTo({
69 url: '/pages/file_manage/file_manage?files_id=' + files_id, 69 url: '/pages/file_manage/file_manage?files_id=' + files_id,
70 }) 70 })
71 }, 71 },
72 //到文章详情 72 //到文章详情
73 - goarticle_details(e){ 73 + goarticle_details(e) {
74 console.log(e) 74 console.log(e)
75 wx.navigateTo({ 75 wx.navigateTo({
76 - url: '/pages/article_detail/article_detail?id='+e.currentTarget.id, 76 + url: '/pages/article_detail/article_detail?id=' + e.currentTarget.id,
77 success: function(res) {}, 77 success: function(res) {},
78 fail: function(res) {}, 78 fail: function(res) {},
79 complete: function(res) {}, 79 complete: function(res) {},
80 }) 80 })
81 }, 81 },
82 //判断是否有医生id和是否登陆 82 //判断是否有医生id和是否登陆
83 - ifdoctorid(){  
84 - let that=this;  
85 - if (app.globalData.doctorid == 0) {//没有传过来的doctorid  
86 - let url ='public/checkOpenid';  
87 - let params={  
88 - openid: wx.getStorageSync('openid')  
89 - }  
90 - app.post(url,params).then((res)=>{  
91 - wx.setStorageSync('token', res.token);  
92 - if (res.doctor_id==0){//没有关联医生  
93 - that.setData({  
94 - showdoctor:false  
95 - })  
96 - }else{//有关联医生获取医生详情  
97 - app.globalData.doctor_id = res.doctor_id;  
98 - app.globalData.doctorid = res.doctorid;  
99 - that.getDoctorInfo(doctorid);  
100 - }  
101 - }).catch((errMsg)=>{  
102 - console.log(errMsg)  
103 - })  
104 - }else{  
105 - that.getDoctorInfo(app.globalData.doctorid);  
106 - that.bindDoctor(app.globalData.doctorid);  
107 - } 83 + ifdoctorid(openid) {
  84 + let that = this;
  85 + let url = 'public/checkOpenid';
  86 + let params = {
  87 + openid:openid
  88 + }
  89 + app.post(url, params).then((res) => {
  90 + wx.setStorageSync('token', res.token);
  91 + if (res.doctor_id == 0) { //没有关联医生
  92 + if (app.globalData.doctorid == 0) { //没有传过来的doctorid
  93 + that.setData({
  94 + showdoctor: false
  95 + })
  96 + } else {
  97 + that.getDoctorInfo(app.globalData.doctorid);
  98 + that.bindDoctor(openid,app.globalData.doctorid);
  99 + }
  100 + } else { //有关联医生获取医生详情
  101 + app.globalData.doctor_id = res.doctor_id;
  102 + app.globalData.doctorid = res.doctorid;
  103 + that.getDoctorInfo(res.doctorid);
  104 + }
  105 + }).catch((errMsg) => {
  106 + console.log(errMsg)
  107 + })
108 }, 108 },
109 //绑定医生 109 //绑定医生
110 - bindDoctor(doctorid){  
111 - let that=this;  
112 - let url ='public/bindDoctor';  
113 - let params={  
114 - openid: wx.getStorageSync('openid'),  
115 - doctorid: doctorid  
116 - }  
117 - app.post(url,params).then((res)=>{  
118 - }).catch((errMsg)=>{  
119 - console.log(errMsg)  
120 - }) 110 + bindDoctor(openid, doctorid) {
  111 + let that = this;
  112 + let url = 'public/bindDoctor';
  113 + let params = {
  114 + openid: openid,
  115 + doctorid: doctorid
  116 + }
  117 + app.post(url, params).then((res) => {}).catch((errMsg) => {
  118 + console.log(errMsg)
  119 + })
121 }, 120 },
122 //获取医生详情,医生ID有两个用处不同 121 //获取医生详情,医生ID有两个用处不同
123 - getDoctorInfo(doctorid){  
124 - let that=this;  
125 - let url = 'index/getDoctorInfo';  
126 - let params = {  
127 - // doctorid: doctorid//暂时  
128 - doctorid:'tigeryang01' 122 + getDoctorInfo(doctorid) {
  123 + let that = this;
  124 + let url = 'index/getDoctorInfo';
  125 + let params = {
  126 + // doctorid: doctorid//暂时
  127 + doctorid: 'tigeryang01'
  128 + }
  129 + app.post(url, params).then((res) => {
  130 + if (res.avatar == '') {
  131 + res.avatar = '../../img/no_puimg.png'
129 } 132 }
130 - app.post(url, params).then((res) => {  
131 - if (res.avatar == ''){  
132 - res.avatar ='../../img/no_puimg.png'  
133 - }  
134 - that.setData({  
135 - doctorinfo: res,  
136 - showdoctor:true  
137 - })  
138 - }).catch((errMsg) => {  
139 - console.log(errMsg)  
140 - }) 133 + that.setData({
  134 + doctorinfo: res,
  135 + showdoctor: true
  136 + })
  137 + }).catch((errMsg) => {
  138 + console.log(errMsg)
  139 + })
141 }, 140 },
142 //获取文章列表 141 //获取文章列表
143 - getArticleList(){  
144 - let that=this;  
145 - let url ='index/getArticleList';  
146 - let params={//参数暂时  
147 - doctor_id:1,  
148 - page:1,  
149 - list_rows:5 142 + getArticleList() {
  143 + let that = this;
  144 + let url = 'index/getArticleList';
  145 + let params = { //参数暂时
  146 + doctor_id: 1,
  147 + page: 1,
  148 + list_rows: 5
150 } 149 }
151 app.post(url, params).then((res) => { 150 app.post(url, params).then((res) => {
152 - let list=res.data;  
153 - for(let obj of list){  
154 - if (obj.more.thumbnail==''){  
155 - obj.more.thumbnail ='../../img/LoadFail.png' 151 + let list = res.data;
  152 + for (let obj of list) {
  153 + if (obj.more.thumbnail == '') {
  154 + obj.more.thumbnail = '../../img/LoadFail.png'
156 } 155 }
157 } 156 }
158 - res.data=list; 157 + res.data = list;
159 that.setData({ 158 that.setData({
160 articlelist: res 159 articlelist: res
161 }) 160 })
@@ -164,7 +163,7 @@ Page({ @@ -164,7 +163,7 @@ Page({
164 }) 163 })
165 }, 164 },
166 //到添加患者界面 165 //到添加患者界面
167 - goaddfile(){ 166 + goaddfile() {
168 wx.navigateTo({ 167 wx.navigateTo({
169 url: '/pages/addfile/addfile', 168 url: '/pages/addfile/addfile',
170 success: function(res) {}, 169 success: function(res) {},
@@ -173,53 +172,53 @@ Page({ @@ -173,53 +172,53 @@ Page({
173 }) 172 })
174 }, 173 },
175 //获取最新病情记录 174 //获取最新病情记录
176 - getLastFilesLog(){  
177 - let that=this;  
178 - let url ='index/getLastFilesLog';  
179 - let params={  
180 - 'openid': wx.getStorageSync('openid')  
181 - }  
182 - app.post(url,params).then((res)=>{  
183 - if (res.more.length != 0 ){  
184 - if (res.doctor_reply == null) {  
185 - res.doctor_reply = '等待医生回复'  
186 - }  
187 - that.setData({  
188 - showfilesLog:true,  
189 - fileslog:res  
190 - })  
191 - }else{  
192 - that.setData({  
193 - showfilesLog: false,  
194 - fileslog: res  
195 - })  
196 - }  
197 - }).catch((errMsg)=>{  
198 - console.log(errMsg)  
199 - }) 175 + getLastFilesLog(openid) {
  176 + let that = this;
  177 + let url = 'index/getLastFilesLog';
  178 + let params = {
  179 + 'openid': openid
  180 + }
  181 + app.post(url, params).then((res) => {
  182 + if (res.more.length != 0) {
  183 + if (res.doctor_reply == null) {
  184 + res.doctor_reply = '等待医生回复'
  185 + }
  186 + that.setData({
  187 + showfilesLog: true,
  188 + fileslog: res
  189 + })
  190 + } else {
  191 + that.setData({
  192 + showfilesLog: false,
  193 + fileslog: res
  194 + })
  195 + }
  196 + }).catch((errMsg) => {
  197 + console.log(errMsg)
  198 + })
200 }, 199 },
201 //获取档案数 200 //获取档案数
202 - getFilesNumber(){  
203 - let that=this;  
204 - let url='index/getFilesNumber';  
205 - let params={  
206 - openid: wx.getStorageSync('openid')  
207 - }  
208 - app.post(url, params).then((res) => {  
209 - if(res==0){  
210 - that.setData({  
211 - filesLogdata:res,  
212 - show_notest:true//显示没有档案,没有记录  
213 - })  
214 - }else{  
215 - that.setData({  
216 - filesLogdata: res,  
217 - show_notest: false 201 + getFilesNumber(openid) {
  202 + let that = this;
  203 + let url = 'index/getFilesNumber';
  204 + let params = {
  205 + openid: openid
  206 + }
  207 + app.post(url, params).then((res) => {
  208 + if (res == 0) {
  209 + that.setData({
  210 + filesLogdata: res,
  211 + show_notest: true //显示没有档案,没有记录
  212 + })
  213 + } else {
  214 + that.setData({
  215 + filesLogdata: res,
  216 + show_notest: false
  217 + })
  218 + }
  219 + }).catch((errMsg) => {
  220 + console.log(errMsg)
218 }) 221 })
219 - }  
220 - }).catch((errMsg) => {  
221 - console.log(errMsg)  
222 - })  
223 }, 222 },
224 //授权 223 //授权
225 getopwer(e) { 224 getopwer(e) {
@@ -236,17 +235,23 @@ Page({ @@ -236,17 +235,23 @@ Page({
236 wx.setStorageSync('openid', res.openid); 235 wx.setStorageSync('openid', res.openid);
237 wx.setStorageSync('session_key', res.session_key); 236 wx.setStorageSync('session_key', res.session_key);
238 if (e.currentTarget.dataset.tag == '1') { 237 if (e.currentTarget.dataset.tag == '1') {
  238 +
239 that.login(res.openid, res.session_key, e.detail.encryptedData, e.detail.iv, '', '', e.currentTarget.dataset.tag); 239 that.login(res.openid, res.session_key, e.detail.encryptedData, e.detail.iv, '', '', e.currentTarget.dataset.tag);
  240 +
  241 +
240 } else if (e.currentTarget.dataset.tag == '2') { 242 } else if (e.currentTarget.dataset.tag == '2') {
  243 +
241 that.login(res.openid, res.session_key, e.detail.encryptedData, e.detail.iv, e.currentTarget.dataset.files_id, '', e.currentTarget.dataset.tag); 244 that.login(res.openid, res.session_key, e.detail.encryptedData, e.detail.iv, e.currentTarget.dataset.files_id, '', e.currentTarget.dataset.tag);
  245 +
  246 +
242 } else if (e.currentTarget.dataset.tag == '3') { 247 } else if (e.currentTarget.dataset.tag == '3') {
  248 +
243 that.login(res.openid, res.session_key, e.detail.encryptedData, e.detail.iv, e.currentTarget.dataset.files_id, e.currentTarget.dataset.patient, e.currentTarget.dataset.tag); 249 that.login(res.openid, res.session_key, e.detail.encryptedData, e.detail.iv, e.currentTarget.dataset.files_id, e.currentTarget.dataset.patient, e.currentTarget.dataset.tag);
  250 +
  251 +
244 } 252 }
245 -  
246 - // 调用sendSession方法,将session_key以参数形式传入  
247 - that.aldstat.sendSession(res.session_key);  
248 - // 调用sendOpenid方法,将openid以参数形式传入  
249 - that.aldstat.sendOpenid(res.openid); 253 +
  254 +
250 }).catch((errMsg) => { 255 }).catch((errMsg) => {
251 console.log(errMsg) 256 console.log(errMsg)
252 }) 257 })
@@ -254,7 +259,7 @@ Page({ @@ -254,7 +259,7 @@ Page({
254 }) 259 })
255 }, 260 },
256 //用户登陆 261 //用户登陆
257 - login(openid, session_key, encryptedData, iv, files_id='', patient='',tag) { 262 + login(openid, session_key, encryptedData, iv, files_id = '', patient = '', tag) {
258 console.log('files_id', files_id); 263 console.log('files_id', files_id);
259 console.log('patient', patient); 264 console.log('patient', patient);
260 console.log('tag', tag); 265 console.log('tag', tag);
@@ -272,80 +277,99 @@ Page({ @@ -272,80 +277,99 @@ Page({
272 that.setData({ 277 that.setData({
273 userInfo: app.globalData.userInfo, 278 userInfo: app.globalData.userInfo,
274 }) 279 })
275 - if(tag=='1'){ 280 + if (tag == '1') {
276 that.goaddfile(); 281 that.goaddfile();
277 - }else if(tag=='2'){ 282 + } else if (tag == '2') {
278 that.gofile_manage(files_id); 283 that.gofile_manage(files_id);
279 - }else if(tag == '3'){ 284 + } else if (tag == '3') {
280 that.goaddrecord(files_id, patient); 285 that.goaddrecord(files_id, patient);
281 } 286 }
282 }).catch((errMsg) => { 287 }).catch((errMsg) => {
283 console.log(errMsg) 288 console.log(errMsg)
284 }) 289 })
285 }, 290 },
286 - /**  
287 - * 生命周期函数--监听页面加载  
288 - */  
289 - onLoad: function (options) {  
290 - let that=this;  
291 - that.ifdoctorid();//判断是否有医生ID  
292 - that.getArticleList();//获取文章列表  
293 - that.getFilesNumber();//获取档案数量  
294 - let openid = wx.getStorageSync('openid');//获取最新记录  
295 - if(openid != ''){  
296 - that.getLastFilesLog(); 291 + /**
  292 + * 生命周期函数--监听页面加载
  293 + */
  294 + onLoad: function(options) {
  295 + let that = this;
  296 + wx.login({
  297 + success: (res) => {
  298 + let url = 'public/getSessionKey';
  299 + let params = {
  300 + code: res.code
  301 + }
  302 + app.post(url, params).then((res) => {
  303 + wx.setStorageSync('openid', res.openid)
  304 + that.ifdoctorid(res.openid); //判断是否有医生ID
  305 + that.getArticleList(res.openid); //获取文章列表
  306 + that.getFilesNumber(res.openid); //获取档案数量
  307 + that.getLastFilesLog(res.openid);
  308 + app.setStatisticsVisitorLog('/pages/index/index'); //统计打开界面数量
  309 + }).catch((errMsg) => {
  310 + console.log(errMsg)
  311 + })
297 } 312 }
298 - app.setStatisticsVisitorLog('/pages/index/index');//统计打开界面数量  
299 - },  
300 - /**  
301 - * 生命周期函数--监听页面初次渲染完成  
302 - */  
303 - onReady: function () {  
304 - },  
305 - /**  
306 - * 生命周期函数--监听页面显示  
307 - */  
308 - onShow: function (options) { 313 + })
  314 + },
  315 + /**
  316 + * 生命周期函数--监听页面初次渲染完成
  317 + */
  318 + onReady: function() {},
  319 + /**
  320 + * 生命周期函数--监听页面显示
  321 + */
  322 + onShow: function(options) {
309 let that = this; 323 let that = this;
310 - that.ifdoctorid();//判断是否有医生ID  
311 - that.getArticleList();//获取文章列表  
312 - that.getFilesNumber();//获取档案数量  
313 - let openid = wx.getStorageSync('openid');//获取最新记录  
314 - if (openid != '') {  
315 - that.getLastFilesLog();  
316 - }  
317 - },  
318 - /**  
319 - * 生命周期函数--监听页面隐藏  
320 - */  
321 - onHide: function () {  
322 -  
323 - },  
324 - /**  
325 - * 生命周期函数--监听页面卸载  
326 - */  
327 - onUnload: function () {  
328 -  
329 - }, 324 + wx.login({
  325 + success: (res) => {
  326 + let url = 'public/getSessionKey';
  327 + let params = {
  328 + code: res.code
  329 + }
  330 + app.post(url, params).then((res) => {
  331 + that.ifdoctorid(res.openid); //判断是否有医生ID
  332 + that.getArticleList(res.openid); //获取文章列表
  333 + that.getFilesNumber(res.openid); //获取档案数量
  334 + that.getLastFilesLog(res.openid);
  335 +
  336 + }).catch((errMsg) => {
  337 + console.log(errMsg)
  338 + })
  339 + }
  340 + })
  341 + },
  342 + /**
  343 + * 生命周期函数--监听页面隐藏
  344 + */
  345 + onHide: function() {
330 346
331 - /**  
332 - * 页面相关事件处理函数--监听用户下拉动作  
333 - */  
334 - onPullDownRefresh: function () {  
335 -  
336 - }, 347 + },
  348 + /**
  349 + * 生命周期函数--监听页面卸载
  350 + */
  351 + onUnload: function() {
337 352
338 - /**  
339 - * 页面上拉触底事件的处理函数  
340 - */  
341 - onReachBottom: function () {  
342 -  
343 - }, 353 + },
344 354
345 - /**  
346 - * 用户点击右上角分享  
347 - */  
348 - onShareAppMessage: function () {  
349 -  
350 - } 355 + /**
  356 + * 页面相关事件处理函数--监听用户下拉动作
  357 + */
  358 + onPullDownRefresh: function() {
  359 +
  360 + },
  361 +
  362 + /**
  363 + * 页面上拉触底事件的处理函数
  364 + */
  365 + onReachBottom: function() {
  366 +
  367 + },
  368 +
  369 + /**
  370 + * 用户点击右上角分享
  371 + */
  372 + onShareAppMessage: function() {
  373 +
  374 + }
351 }) 375 })
1 // pages/introduce/introduce.js 1 // pages/introduce/introduce.js
2 // 请注意常量的命名必须是Page 2 // 请注意常量的命名必须是Page
3 const Page = require('../../utils/ald-stat.js').Page; 3 const Page = require('../../utils/ald-stat.js').Page;
  4 +
4 const app=getApp(); 5 const app=getApp();
  6 +var wxParse = require('../../wxParse/wxParse.js')
5 Page({ 7 Page({
6 /** 8 /**
7 * 页面的初始数据 9 * 页面的初始数据
@@ -22,6 +24,7 @@ Page({ @@ -22,6 +24,7 @@ Page({
22 that.setData({ 24 that.setData({
23 doctorinfo: res 25 doctorinfo: res
24 }) 26 })
  27 + wxParse.wxParse('content', 'html', res.content, that, 5);
25 }).catch((errMsg) => { 28 }).catch((errMsg) => {
26 console.log(errMsg) 29 console.log(errMsg)
27 }) 30 })
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <view class='intr_top'> 2 <view class='intr_top'>
3 <view class='intr_left'> 3 <view class='intr_left'>
4 <view class='intr_imgbox'> 4 <view class='intr_imgbox'>
5 - <image src='../../img/startimg.png'></image> 5 + <image src='{{doctorinfo.avatar}}'></image>
6 </view> 6 </view>
7 <view class='intr_txtbox'> 7 <view class='intr_txtbox'>
8 <view class='intr_title'>{{doctorinfo.name}}</view> 8 <view class='intr_title'>{{doctorinfo.name}}</view>
@@ -13,45 +13,10 @@ @@ -13,45 +13,10 @@
13 <button class='intr_tip' open-type="contact" bindcontact="handleContact">关注公众号</button> 13 <button class='intr_tip' open-type="contact" bindcontact="handleContact">关注公众号</button>
14 </view> 14 </view>
15 <view class='intr_item'> 15 <view class='intr_item'>
16 - <view class='intr_c_title'>擅长疾病</view>  
17 - <view class='intr_content'>事骨肿瘤专业十四年,临床工作经验丰富,擅长骨与软组织肿瘤的诊断及手术、化疗、靶向治疗、免疫治疗等综合治疗。</view>  
18 -</view>  
19 -<view class='intr_item'>  
20 - <view class='intr_c_title'>教育经历</view>  
21 - <view class='intr_content'>  
22 - <view> 2007/09-2010/06,北京大学医学部,人民医院,博士,导师:郭卫</view>  
23 - <view> 2007/09-2010/06,北京大学医学部,人民医院,博士,导师:郭卫</view>  
24 - <view> 2007/09-2010/06,北京大学医学部,人民医院,博士,导师:郭卫</view>  
25 - </view>  
26 -</view>  
27 -<view class='intr_item'>  
28 - <view class='intr_c_title'>工作经历</view>  
29 - <view class='intr_content'>  
30 - <view>2010/09-至今,北京大学人民医院,外科(骨肿瘤科),高年资主治医师</view>  
31 - <view>2014/07-2015/10,美国麻省总医院(Massachusetts General Hospital),骨科,research fellow</view>  
32 - <view>2012/09-2012/12,意大利Rizolli骨科研究所(Rizzoli Orthopedic Institution),骨肿瘤科,research fellow</view>  
33 - </view>  
34 -</view>  
35 -<view class='intr_item'>  
36 - <view class='intr_c_title'>参加主要专业会议</view> 16 + <!-- <view class='intr_c_title'>擅长疾病</view> -->
37 <view class='intr_content'> 17 <view class='intr_content'>
38 - <view>2006.6 第8届全国骨肿瘤学术会议 青岛参会</view>  
39 -  
40 -<view>2007.9 第9届全国骨肿瘤学术会议 上海参会</view>  
41 -  
42 -<view>2007.11 第2届COA全国骨科大会 郑州 --大会发言《骶骨肿瘤术后神经功能预测及评估》</view>  
43 -  
44 -<view>2008.9 APMST亚太地区骨肿瘤会议 北京参会</view>  
45 -  
46 -<view>2009.11 第3届COA全国骨科大会 厦门大会发言《儿童保肢治疗的选择》</view>  
47 -  
48 -<view>2010.11 第4届COA全国骨科大会 成都大会发言《硬纤维瘤的药物治疗疗效分析》</view>  
49 -  
50 -<view>2011.9 第16届ISOLS国际保肢协会会议 北京 参会</view>  
51 -  
52 -<view>2013.5 第14届全国骨肿瘤学术会议 合肥大会发言《骨肿瘤肺转移患者的治疗及预后评估》</view>  
53 -  
54 -<view>2015.10 第18届ISOLS国际保肢协会会议 美国奥兰多 大会发言</view> 18 + <import src="../../wxParse/wxParse.wxml" />
  19 + <template is='wxParse' data='{{wxParseData:content.nodes}}' />
55 </view> 20 </view>
56 </view> 21 </view>
57 <view class='bottom_box'> 22 <view class='bottom_box'>
@@ -23,7 +23,9 @@ Page({ @@ -23,7 +23,9 @@ Page({
23 app.post(url, params).then((res) => { 23 app.post(url, params).then((res) => {
24 wx.setStorageSync('openid', res.openid); 24 wx.setStorageSync('openid', res.openid);
25 wx.setStorageSync('session_key', res.session_key); 25 wx.setStorageSync('session_key', res.session_key);
26 - that.login(res.openid, res.session_key, e.detail.encryptedData, e.detail.iv); 26 + console.log('token',wx.getStorageSync('token'))
  27 + console.log(typeof wx.getStorageSync('token'))
  28 + that.login(res.openid, res.session_key, e.detail.encryptedData, e.detail.iv);
27 // 调用sendSession方法,将session_key以参数形式传入 29 // 调用sendSession方法,将session_key以参数形式传入
28 that.aldstat.sendSession(res.session_key); 30 that.aldstat.sendSession(res.session_key);
29 // 调用sendOpenid方法,将openid以参数形式传入 31 // 调用sendOpenid方法,将openid以参数形式传入
@@ -18,28 +18,38 @@ Page({ @@ -18,28 +18,38 @@ Page({
18 }, 18 },
19 submitFeedback(){ 19 submitFeedback(){
20 let that=this; 20 let that=this;
21 - let header={  
22 - 'XX-Token':wx.getStorageSync('token'),  
23 - 'XX-Device-Type':''  
24 - }  
25 - let url ='user/submitFeedback';  
26 - let param={  
27 - content: that.data.content  
28 - }  
29 - app.post(url,param,header).then((res)=>{ 21 + if (that.data.content==''){
30 wx.showToast({ 22 wx.showToast({
31 - title: '提交成功',  
32 - icon:'none',  
33 - duration:2000 23 + title: '提交内容不能为空',
  24 + icon: 'none',
  25 + duration: 2000,
34 }) 26 })
35 - setTimeout(function(){  
36 - wx.switchTab({  
37 - url: '/pages/my/my', 27 +
  28 + }else{
  29 + let header = {
  30 + 'XX-Token': wx.getStorageSync('token'),
  31 + 'XX-Device-Type': ''
  32 + }
  33 + let url = 'user/submitFeedback';
  34 + let param = {
  35 + content: that.data.content
  36 + }
  37 + app.post(url, param, header).then((res) => {
  38 + wx.showToast({
  39 + title: '提交成功',
  40 + icon: 'none',
  41 + duration: 2000
  42 + })
  43 + setTimeout(function () {
  44 + wx.switchTab({
  45 + url: '/pages/my/my',
  46 + })
  47 + }, 500)
  48 + }).catch((errMsg) => {
  49 + console.log(errMsg)
38 }) 50 })
39 - },500)  
40 - }).catch((errMsg)=>{  
41 - console.log(errMsg)  
42 - }) 51 + }
  52 +
43 }, 53 },
44 /** 54 /**
45 * 生命周期函数--监听页面加载 55 * 生命周期函数--监听页面加载
@@ -44,7 +44,7 @@ page{ @@ -44,7 +44,7 @@ page{
44 left:0; 44 left:0;
45 width:100%; 45 width:100%;
46 background-color: #fff; 46 background-color: #fff;
47 - border-bottom:1rpx solid #DADADA; 47 + border-bottom:2px solid #DADADA;
48 color:#353535; 48 color:#353535;
49 font-size:30rpx; 49 font-size:30rpx;
50 display: flex; 50 display: flex;
@@ -59,10 +59,10 @@ page{ @@ -59,10 +59,10 @@ page{
59 justify-content: center; 59 justify-content: center;
60 width:50%; 60 width:50%;
61 height: 100%; 61 height: 100%;
62 - line-height: 100%; 62 + line-height: 100rpx;
63 } 63 }
64 .border_left{ 64 .border_left{
65 - border-right: 1rpx solid #DADADA; 65 + border-right: 2px solid #DADADA;
66 } 66 }
67 .record_tab .active{ 67 .record_tab .active{
68 color:#3AA0EA; 68 color:#3AA0EA;
@@ -79,8 +79,7 @@ page{ @@ -79,8 +79,7 @@ page{
79 } 79 }
80 .plan_item1{ 80 .plan_item1{
81 margin: 30rpx 30rpx 0 30rpx; 81 margin: 30rpx 30rpx 0 30rpx;
82 -  
83 - box-sizing: border-box; 82 + box-sizing: border-box;
84 background: #fff; 83 background: #fff;
85 color:#999; 84 color:#999;
86 font-size:28rpx; 85 font-size:28rpx;
@@ -35,6 +35,7 @@ Page({ @@ -35,6 +35,7 @@ Page({
35 */ 35 */
36 onLoad: function (options) { 36 onLoad: function (options) {
37 let that = this; 37 let that = this;
  38 +
38 if (options.scene != undefined) { 39 if (options.scene != undefined) {
39 var scene = decodeURIComponent(options.scene); 40 var scene = decodeURIComponent(options.scene);
40 var doctorid = scene.split("=")[1]; 41 var doctorid = scene.split("=")[1];
@@ -46,7 +47,6 @@ Page({ @@ -46,7 +47,6 @@ Page({
46 if (options.doctorid != undefined) { 47 if (options.doctorid != undefined) {
47 app.globalData.doctorid = doctorid; 48 app.globalData.doctorid = doctorid;
48 } 49 }
49 - app.setStatisticsVisitorLog('/pages/start/start');  
50 that.getWelcomeInfo(); 50 that.getWelcomeInfo();
51 }, 51 },
52 /** 52 /**
@@ -59,7 +59,8 @@ Page({ @@ -59,7 +59,8 @@ Page({
59 * 生命周期函数--监听页面显示 59 * 生命周期函数--监听页面显示
60 */ 60 */
61 onShow: function () { 61 onShow: function () {
62 - 62 +
  63 +
63 }, 64 },
64 65
65 /** 66 /**
@@ -14,13 +14,14 @@ @@ -14,13 +14,14 @@
14 } 14 }
15 .st_title{ 15 .st_title{
16 color:#333; 16 color:#333;
17 - font-size:48rpx; 17 + font-size:40rpx;
  18 + white-space: nowrap;
18 margin:65rpx 0 5rpx 0; 19 margin:65rpx 0 5rpx 0;
19 text-align: center; 20 text-align: center;
20 } 21 }
21 .st_subtitle{ 22 .st_subtitle{
22 color:#999; 23 color:#999;
23 - font-size:34rpx; 24 + font-size:32rpx;
24 text-align: center; 25 text-align: center;
25 } 26 }
26 .rate_box{ 27 .rate_box{