wuzhenkun
2021-02-18 95033a06a92d00cbf9c103c8512e1b1c7a7646e5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
<!doctype html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>在线接诊</title>
        <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        
        <!-- js引用 -->
        <script src="../../js/config.js"></script>
        <script src="../../js/h5toapp.js"></script>
        <script src="../../js/h5to.js"></script>
        
        <!-- 组件js引用 -->
        <script src="../../js/mui.min.js"></script>
        <!-- 组件标准css引用 -->
        <link rel="stylesheet" href="../../css/mui.min.css">
        <link rel="stylesheet" href="../../css/mui.picker.min.css">
        <link rel="stylesheet" href="../../css/mui.poppicker.css">
        
        <!-- css引用 -->
        <link href="../../css/currency.css" rel="stylesheet">
        <link href="../../css/spinkit.css" rel="stylesheet">
        <link href="../../css/icon/iconfont.css" rel="stylesheet">
        <!-- 界面本身css引用 -->
        <link href="./zxjz.css" rel="stylesheet">
        
        <style type="text/css">
            input::-webkit-input-placeholder {
                color: #9393AA;
                -webkit-text-fill-color: #9393AA;
            }
            input {
                color: #363F4D;
                -webkit-text-fill-color: #363F4D;
            }
            .mui-dtpicker,
            .mui-poppicker {
                background-color: #FFFFFF;
                border-radius: 24px 24px 0 0;
            }
            
            .mui-dtpicker-header {
                height: 54px;
                border-bottom: 1px solid #F6F6F6;
            }
            
            .mui-dtpicker-header #btn-cancel {
                margin-left: 156px !important;
            }
            
            .mui-dtpicker-header button {
                font-size: 17px;
                padding: 11px 10px;
            }
            
            .mui-btn-blue,
            .mui-btn-primary,
            input[type=submit] {
                background-color: #FFFFFF;
                border: 0;
                color: #21D197;
            }
            
            .mui-btn {
                border: 0;
            }
            
            .mui-dtpicker-title h5 {
                background-color: #FFFFFF;
                border: 0;
                margin-top: 30px;
            
                font-size: 14px;
                font-family: PingFangSC-Regular, PingFang SC;
                font-weight: 400;
                color: #838B98;
                -webkit-text-fill-color: #838B98;
            }
            
            .mui-picker {
                background-color: #FFFFFF;
            }
            
            .mui-pciker-rule-ft {
                width: 104px;
                margin-left: 40px;
            }
            
            .mui-dtpicker-body {
                height: 150px;
            }
        </style>
    </head>
 
    <body>
        <div style="background-color:  #F9FAFC; height: 100vh; width: 100%; margin: 0; overflow: auto;">
            <div id="loading" class="example">
              <div class="sk-plane loading_location"></div>
            </div>
            <div class="mui-content">
                <div style="margin: 16px; box-sizing: border-box;">
                    <div class="bt_txt">设置您的服务形式(可多选):</div>
                    <div class="z_btn_row">
                        <button id="twjz_btn" class="z_sel_btn_off" style="margin-right: 19px;" onclick="click_twjz_btn(this)">图文接诊</button>
                        <button id="dhjz_btn" class="z_sel_btn_off"onclick="click_dhjz_btn(this)">电话接诊</button>
                    </div>
                    <div class="z_btn_row">
                        <button id="spjz_btn" class="z_sel_btn_off"onclick="click_spjz_btn(this)">视频接诊</button>
                    </div>
                    <div class="bt_txt">设置您的服务价格:</div>
                    <div style="min-height: 299px;">
                        <div id="Teletext" class="mui-card" style="display: none;">
                            <div  class="z_menu_btn_row" style="height: 55px; line-height: 55px;" >
                                <span class="bt_txt1">图文接诊:</span>
                                <input id="tw_input" type="text" placeholder="建议收费99元" class="bt_txt1_r" style="width: 120px;height: 30px;margin-left: 10px;padding: 0 11px 4px;border-radius: 7px;border: 1px solid #E0E0E0;outline: none;margin-bottom: 0;"/>
                                <button class="cytj_btn" onclick="click_recommend('tw')">采用推荐</button>
                            </div>
                        </div>
                        <div id="phone" class="mui-card" style="display: none;">
                            <div  class="z_menu_btn_row" style="height: 55px; line-height: 55px;" >
                                <span class="bt_txt1">电话接诊:</span>
                                <input id="dh_input" type="text" placeholder="建议收费99元" class="bt_txt1_r" style="width: 120px;height: 30px;margin-left: 10px;padding: 0 11px 4px;border-radius: 7px;border: 1px solid #E0E0E0;outline: none;margin-bottom: 0;"/>
                                <button class="cytj_btn" onclick="click_recommend('dh')">采用推荐</button>
                            </div>
                            <div class="z_menu_btn_row" style="height: 69px;line-height: 0;margin-bottom: 16px;">
                                <span class="bt_txt2">设置您可预约通话的时间段:</span>
                                <div id="dateSelect1" class="sel_date_txt" style="margin-right: 20px;margin-top: 5px;">
                                    <div id="result1" style="float: left;line-height: 40px;">--:--</div>
                                    <div class="z_menu_btn_icon" style="margin-right: 12px;line-height: 44px;">
                                        <img src="../../img/ic_time.png" />
                                    </div>
                                </div>
                                <div id="dateSelect2" class="sel_date_txt" style="margin-top: 5px;">
                                    <div id="result2" style="float: left;line-height: 40px;">--:--</div>
                                    <div class="z_menu_btn_icon" style="margin-right: 12px;line-height: 44px;">
                                        <img src="../../img/ic_time.png" />
                                    </div>
                                </div>
                                <div class="z_menu_btn_icon_add" >
                                    <img src="../../img/ic_add_more备份.png" class="icon_btn_add" onclick="click_add_modules()" style="margin: 16px 0;" />
                                </div>
                            </div>
                        </div>
                        
                        <div id="video" class="mui-card" style="display: none;">
                            <div  class="z_menu_btn_row" style="height: 55px; line-height: 55px;" >
                                <span class="bt_txt1">视频接诊:</span>
                                <input id="sp_input" type="text" placeholder="建议收费99元" class="bt_txt1_r" style="width: 120px;height: 30px;margin-left: 10px;padding: 0 11px 4px;border-radius: 7px;border: 1px solid #E0E0E0;outline: none;margin-bottom: 0;"/>
                                <button class="cytj_btn" onclick="click_recommend('sp')">采用推荐</button>
                            </div>
                            <div class="z_menu_btn_row" style="height: 69px;line-height: 0;margin-bottom: 16px;">
                                <span class="bt_txt2">设置您可预约视频通话的时间段:</span>
                                <div id="dateSelect" class="sel_date_txt" style="margin-right: 20px;margin-top: 5px;">
                                    <div id="result" style="float: left;line-height: 40px;">--:--</div>
                                    <div class="z_menu_btn_icon" style="margin-right: 12px;line-height: 44px;">
                                        <img src="../../img/ic_time.png" />
                                    </div>
                                </div>
                                <div id="dateSelect" class="sel_date_txt" style="margin-top: 5px;">
                                    <div id="result" style="float: left;line-height: 40px;">--:--</div>
                                    <div class="z_menu_btn_icon" style="margin-right: 12px;line-height: 44px;">
                                        <img src="../../img/ic_time.png" />
                                    </div>
                                </div>
                                <div class="z_menu_btn_icon">
                                    <img src="../../img/ic_add_more备份.png" class="icon_btn_add" onclick="click_add_modules2()" style="margin: 16px 0;" />
                                </div>
                            </div>
                        </div>
                    </div>
                    <div style="width: 100%;">
                        <button class="save_button" onclick="">完成</button>
                    </div>
                </div>
            </div>
        </div>
        <script type="text/javascript" src="../../js/mui.picker.min.js"></script>
        <script type="text/javascript" src="../../js/mui.poppicker.js"></script>
        <script type="text/javascript">
            mui.init({
                swipeBack: true //启用右滑关闭功能
            });
            //1. data
            var personInfo = {
                            
            };
            var menurows = [
                {id: "1", name: "系统详细信息", path: "./xtxxdetail",_id: 1012},
                {id: "2", name: "称号说明", path: "./chsm"},
                {id: "3", name: "二维码名片", path: "./mydt/mydt"},
                {id: "4", name: "修改个人信息", path: "./xggrxx"},
                {id: "5", name: "简介", path: "./jj"},
                {id: "6", name: "擅长", path: "./sc"},
                {id: "7", name: "手机号", path: "./sjh"},
            ];
            
            setRouteParams({userId: "1285860235186212865",params: {"doctorId": "1285860235186212865","isFriend":true}});
            
            function initPage() {
                mui('body').on('tap', '.sel_date_txt', function(event) {
                    event.cancelBubble = true;//阻止当前事件的冒泡
                    var a = this;
                    var dtpicker = new mui.DtPicker({
                        type: "time",//设置日历初始视图模式 
                        value: "00-00"
                    }) 
                    dtpicker.show(function(rs) {
                        a.children[0].innerText = rs.text;
                    }) ;
                }); 
                
                // document.getElementById("dateSelect1").addEventListener('tap', function() {
                  
                  
                // });
                // document.getElementById("dateSelect2").addEventListener('tap', function() {
                //   var dtpicker = new mui.DtPicker({
                //       type: "time",//设置日历初始视图模式 
                //       value: "00-00"
                //   }) 
                //   dtpicker.show(function(rs) {
                //       result2.innerText = rs.text;
                //     }) ;
                // });
            }
            
            function loadData() {
                ajaxGet('doctor/api/query/' + login_data.params.doctorId, function(result) {
                    if (result) {
                        console.info(result);
                        personInfo = result.data
                    }
                    doLoadData();
                    hideloading("loading");
                });
            }
            
            function getPushData(){//需要传参就用此方法
                var pam = {
                    _id: 3000,
                    params: {
                        userId: login_data.id,
                    }
                };
                rightBtnPush("route", pam, callback);
            }
            
            function click_row(idStr) {
                var row = infoOBJ[idStr];
                var pam = {
                    _id: "1012",
                    params:{
                        userId: login_data.userId
                    }
                };
                
                app_click("route", pam, callback);
            }
 
            function click_recommend(e){
                if(e == "tw"){
                document.getElementById('tw_input').value = "99";
                }else if(e == "dh"){
                document.getElementById('dh_input').value = "99";
                }else if(e == "sp"){
                document.getElementById('sp_input').value = "99";
                }
            }
            
            function click_add_modules() {
                var modules = document.getElementById('phone');
                var element = document.createElement('div');
                element.className = "z_menu_btn_row";
                element.style.height = "40px";
                element.style.lineHeight = "40px";
                element.style.margin = "16px 0";
                
                var div1 = document.createElement('div');
                div1.id = "dateSelect";
                div1.className = "sel_date_txt";
                div1.style.marginRight = "20px";
                var div1_1 = document.createElement('div');
                div1_1.id = "result";
                div1_1.style.float = "left";
                div1_1.style.lineHeight = "40px";
                div1_1.innerText = "--:--"
                div1.appendChild(div1_1);
                var div1_2 = document.createElement('div');
                div1_2.className = "z_menu_btn_icon";
                div1_2.style.marginRight = "12px";
                div1_2.style.lineHeight = "44px";
                var div1_2_img = document.createElement('img');
                div1_2_img.src = "../../img/ic_time.png";
                div1_2.appendChild(div1_2_img);
                div1.appendChild(div1_2);
                
                var div2 = document.createElement('div');
                div2.id = "dateSelect";
                div2.className = "sel_date_txt";
                var div2_1 = document.createElement('div');
                div2_1.id = "result";
                div2_1.style.float = "left";
                div2_1.style.lineHeight = "40px";
                div2_1.innerText = "--:--"
                div2.appendChild(div2_1);
                var div2_2 = document.createElement('div');
                div2_2.className = "z_menu_btn_icon";
                div2_2.style.marginRight = "12px";
                div2_2.style.lineHeight = "44px";
                var div2_2_img = document.createElement('img');
                div2_2_img.src = "../../img/ic_time.png";
                div2_2.appendChild(div2_2_img);
                div2.appendChild(div2_2);
                
                var div3 = document.createElement('div');
                div3.className = "z_menu_btn_icon_add";
                var div3_img = document.createElement('img');
                div3_img.src = "../../img/ic_add_more备份.png";
                div3_img.className = "icon_btn_add";
                div3_img.style.marginLeft = "15px";
                div3.appendChild(div3_img);
                
                div3_img.addEventListener('tap',function(){
                        click_add_modules();
                    });
                
                var div4 = document.createElement('div');
                div4.className = "z_menu_btn_icon_less";
                var div4_img = document.createElement('img');
                div4_img.src = "../../img/_删%20%20除.png";
                div4_img.className = "icon_btn_less";
                
                div4_img.addEventListener('tap',function(){
                        let module_element = event.target.closest('.z_menu_btn_row');
                        module_element.remove();
                    });
                div4.appendChild(div4_img);
                element.appendChild(div1);
                element.appendChild(div2);
                element.appendChild(div3);
                element.appendChild(div4);
                modules.appendChild(element);
            }
            
            function click_add_modules2() {
                var modules = document.getElementById('video');
                var element = document.createElement('div');
                element.className = "z_menu_btn_row";
                element.style.height = "40px";
                element.style.lineHeight = "40px";
                element.style.margin = "16px 0";
                
                var div1 = document.createElement('div');
                div1.id = "dateSelect";
                div1.className = "sel_date_txt";
                div1.style.marginRight = "20px";
                var div1_1 = document.createElement('div');
                div1_1.id = "result";
                div1_1.style.float = "left";
                div1_1.style.lineHeight = "40px";
                div1_1.innerText = "--:--"
                div1.appendChild(div1_1);
                var div1_2 = document.createElement('div');
                div1_2.className = "z_menu_btn_icon";
                div1_2.style.marginRight = "12px";
                div1_2.style.lineHeight = "44px";
                var div1_2_img = document.createElement('img');
                div1_2_img.src = "../../img/ic_time.png";
                div1_2.appendChild(div1_2_img);
                div1.appendChild(div1_2);
                
                var div2 = document.createElement('div');
                div2.id = "dateSelect";
                div2.className = "sel_date_txt";
                var div2_1 = document.createElement('div');
                div2_1.id = "result";
                div2_1.style.float = "left";
                div2_1.style.lineHeight = "40px";
                div2_1.innerText = "--:--"
                div2.appendChild(div2_1);
                var div2_2 = document.createElement('div');
                div2_2.className = "z_menu_btn_icon";
                div2_2.style.marginRight = "12px";
                div2_2.style.lineHeight = "44px";
                var div2_2_img = document.createElement('img');
                div2_2_img.src = "../../img/ic_time.png";
                div2_2.appendChild(div2_2_img);
                div2.appendChild(div2_2);
                
                var div3 = document.createElement('div');
                div3.className = "z_menu_btn_icon_add";
                var div3_img = document.createElement('img');
                div3_img.src = "../../img/ic_add_more备份.png";
                div3_img.className = "icon_btn_add";
                div3_img.style.marginLeft = "15px";
                div3.appendChild(div3_img);
                
                div3_img.addEventListener('tap',function(){
                        click_add_modules2();
                    });
                
                var div4 = document.createElement('div');
                div4.className = "z_menu_btn_icon_less";
                var div4_img = document.createElement('img');
                div4_img.src = "../../img/_删%20%20除.png";
                div4_img.className = "icon_btn_less";
                
                div4_img.addEventListener('tap',function(){
                        let module_element = event.target.closest('.z_menu_btn_row');
                        module_element.remove();
                    });
                div4.appendChild(div4_img);
                element.appendChild(div1);
                element.appendChild(div2);
                element.appendChild(div3);
                element.appendChild(div4);
                modules.appendChild(element);
            }
            
            function click_twjz_btn(e) {
                if (e.getAttribute('class') == "z_sel_btn_off") {
                    document.getElementById("twjz_btn").classList.replace("z_sel_btn_off","z_sel_btn_on");
                    document.getElementById("Teletext").style.display = "block";
                }
                else if (e.getAttribute('class') == "z_sel_btn_on"){
                    document.getElementById("twjz_btn").classList.replace("z_sel_btn_on","z_sel_btn_off");
                    document.getElementById("Teletext").style.display = "none";
                }
            }
            function click_dhjz_btn(e) {
                if (e.getAttribute('class') == "z_sel_btn_off") {
                    document.getElementById("dhjz_btn").classList.replace("z_sel_btn_off","z_sel_btn_on");
                    document.getElementById("phone").style.display = "block";
                }
                else if (e.getAttribute('class') == "z_sel_btn_on"){
                    document.getElementById("dhjz_btn").classList.replace("z_sel_btn_on","z_sel_btn_off");
                    document.getElementById("phone").style.display = "none";
                }
            }
            function click_spjz_btn(e) {
                if (e.getAttribute('class') == "z_sel_btn_off") {
                    document.getElementById("spjz_btn").classList.replace("z_sel_btn_off","z_sel_btn_on");
                    document.getElementById("video").style.display = "block";
                }
                else if (e.getAttribute('class') == "z_sel_btn_on"){
                    document.getElementById("spjz_btn").classList.replace("z_sel_btn_on","z_sel_btn_off");
                    document.getElementById("video").style.display = "none";
                }
            }
            
            //展示数据
            function doLoadData(){
                // document.getElementById('doctorAvatar').src = personInfo.doctorAvatar;
            }
            
            //run
            mui.ready(function() {
                onInitReady(function() {
                    // setRightBtn("rightBtn", {_id: 3000}, callback);//用来判断title右上是否有图标
                    initPage();
                    loadData();
                });
            });
        </script>
    </body>
</html>