|
@@ -42,6 +42,314 @@ |
|
@@ -42,6 +42,314 @@ |
42
|
.swiper_item {
|
42
|
.swiper_item {
|
43
|
/*padding: 0.28rem 0.25rem;*/
|
43
|
/*padding: 0.28rem 0.25rem;*/
|
44
|
}
|
44
|
}
|
|
|
45
|
+ .meal {
|
|
|
46
|
+ display: flex;
|
|
|
47
|
+ flex-direction: column;
|
|
|
48
|
+ justify-content: flex-end;
|
|
|
49
|
+ position: fixed;
|
|
|
50
|
+ top: 0;
|
|
|
51
|
+ left: 0;
|
|
|
52
|
+ width: 100%;
|
|
|
53
|
+ height: 100%;
|
|
|
54
|
+ z-index: 100;
|
|
|
55
|
+ background-color: rgba(0,0,0,.5);
|
|
|
56
|
+ }
|
|
|
57
|
+
|
|
|
58
|
+ .meal_title {
|
|
|
59
|
+ text-align: center;
|
|
|
60
|
+ color: #424242;
|
|
|
61
|
+ font-size: 15px;
|
|
|
62
|
+ font-weight: bold;
|
|
|
63
|
+ border-bottom: 1px solid #ccc;
|
|
|
64
|
+ display: flex;
|
|
|
65
|
+ align-items: center;
|
|
|
66
|
+ justify-content: space-between;
|
|
|
67
|
+ padding: 0.25rem;
|
|
|
68
|
+ }
|
|
|
69
|
+
|
|
|
70
|
+ .meal_price_box {
|
|
|
71
|
+ display: flex;
|
|
|
72
|
+ align-items: center;
|
|
|
73
|
+ justify-content: space-between;
|
|
|
74
|
+ font-size: 12px;
|
|
|
75
|
+ color: #424242;
|
|
|
76
|
+ padding: 0.25rem 10% 0 10%;
|
|
|
77
|
+ }
|
|
|
78
|
+
|
|
|
79
|
+ .meal_price {
|
|
|
80
|
+ color: #d8b25f;
|
|
|
81
|
+ font-size: 9px;
|
|
|
82
|
+ margin-left: 0.1rem;
|
|
|
83
|
+ }
|
|
|
84
|
+
|
|
|
85
|
+ .incer {
|
|
|
86
|
+ color: #ccc;
|
|
|
87
|
+ font-size: 9px;
|
|
|
88
|
+ padding: 0 10%;
|
|
|
89
|
+ }
|
|
|
90
|
+
|
|
|
91
|
+ .sever_list {
|
|
|
92
|
+ display: flex;
|
|
|
93
|
+ align-items: center;
|
|
|
94
|
+ flex-wrap: wrap;
|
|
|
95
|
+ font-size: 12px;
|
|
|
96
|
+ padding: 0.25rem 10%;
|
|
|
97
|
+ }
|
|
|
98
|
+
|
|
|
99
|
+ .sever_list span {
|
|
|
100
|
+ background-color: #f2f2f2;
|
|
|
101
|
+ padding: 0.1rem 0.2rem;
|
|
|
102
|
+ margin: 0 0.2rem 0.2rem 0;
|
|
|
103
|
+ border-radius: 0.07rem;
|
|
|
104
|
+ }
|
|
|
105
|
+
|
|
|
106
|
+ .sever_list .span_active {
|
|
|
107
|
+ background-color: #dbb25f;
|
|
|
108
|
+ color: #fff;
|
|
|
109
|
+ }
|
|
|
110
|
+
|
|
|
111
|
+ .meal_item {
|
|
|
112
|
+ background-color: #fff;
|
|
|
113
|
+ }
|
|
|
114
|
+
|
|
|
115
|
+ .pay_box {
|
|
|
116
|
+ display: flex;
|
|
|
117
|
+ align-items: center;
|
|
|
118
|
+ justify-content: space-between;
|
|
|
119
|
+ padding: 0 10% 0.25rem 10%;
|
|
|
120
|
+ }
|
|
|
121
|
+
|
|
|
122
|
+ .pay_num {
|
|
|
123
|
+ font-size: 12px;
|
|
|
124
|
+ color: #424242;
|
|
|
125
|
+ }
|
|
|
126
|
+
|
|
|
127
|
+ .pay_btn_box {
|
|
|
128
|
+ display: flex;
|
|
|
129
|
+ align-items: center;
|
|
|
130
|
+
|
|
|
131
|
+ }
|
|
|
132
|
+
|
|
|
133
|
+ .pay_btn_box .iconfont {
|
|
|
134
|
+ font-size: 20px;
|
|
|
135
|
+ color: #ccc;
|
|
|
136
|
+ }
|
|
|
137
|
+
|
|
|
138
|
+ .pay_btn_box input {
|
|
|
139
|
+ width: 0.5rem;
|
|
|
140
|
+ text-align: center;
|
|
|
141
|
+ border: 0;
|
|
|
142
|
+ outline: none;
|
|
|
143
|
+ font-size: 15px;
|
|
|
144
|
+ }
|
|
|
145
|
+
|
|
|
146
|
+ .pay_num .limit {
|
|
|
147
|
+ padding: 0;
|
|
|
148
|
+ font-size: 9px;
|
|
|
149
|
+ color: #ccc;
|
|
|
150
|
+ }
|
|
|
151
|
+
|
|
|
152
|
+ .price {
|
|
|
153
|
+ flex: 1;
|
|
|
154
|
+ text-align: right;
|
|
|
155
|
+ }
|
|
|
156
|
+
|
|
|
157
|
+ .price .meal_price {
|
|
|
158
|
+ font-size: 12px;
|
|
|
159
|
+ }
|
|
|
160
|
+
|
|
|
161
|
+ .price .old_price {
|
|
|
162
|
+ text-decoration: line-through;
|
|
|
163
|
+ color: #ccc;
|
|
|
164
|
+ margin-left: 0.1rem;
|
|
|
165
|
+ }
|
|
|
166
|
+
|
|
|
167
|
+ .pay_btn {
|
|
|
168
|
+ font-size: 15px;
|
|
|
169
|
+ color: #fff;
|
|
|
170
|
+ background-color: #dbb25f;
|
|
|
171
|
+ text-align: center;
|
|
|
172
|
+ padding: 0.2rem 0;
|
|
|
173
|
+ }
|
|
|
174
|
+
|
|
|
175
|
+ .icon-cuohao {
|
|
|
176
|
+ font-size: 15px;
|
|
|
177
|
+ color: #424242;
|
|
|
178
|
+ }
|
|
|
179
|
+
|
|
|
180
|
+ .save_btn {
|
|
|
181
|
+ text-align: center;
|
|
|
182
|
+ font-size: 0.36rem;
|
|
|
183
|
+ color: #fff;
|
|
|
184
|
+ padding: 0.15rem 0;
|
|
|
185
|
+ width: 100%;
|
|
|
186
|
+ position: absolute;
|
|
|
187
|
+ left: 0;
|
|
|
188
|
+ bottom: 0;
|
|
|
189
|
+ z-index: 100;
|
|
|
190
|
+ background-color: #dbb25f;
|
|
|
191
|
+ }
|
|
|
192
|
+
|
|
|
193
|
+ .moreoul {
|
|
|
194
|
+ width: 100%;
|
|
|
195
|
+ }
|
|
|
196
|
+
|
|
|
197
|
+ .moreoul li {
|
|
|
198
|
+ width: 100%;
|
|
|
199
|
+ padding: 0.3rem 0;
|
|
|
200
|
+ line-height: 0.3rem;
|
|
|
201
|
+ font-size: 16px;
|
|
|
202
|
+ border-bottom: 1px solid #f0f0f0;
|
|
|
203
|
+ text-align: center;
|
|
|
204
|
+ }
|
|
|
205
|
+
|
|
|
206
|
+ .nodata {
|
|
|
207
|
+ font-size: 16px;
|
|
|
208
|
+ color: #c0c0c0;
|
|
|
209
|
+ text-align: center;
|
|
|
210
|
+ padding: 0.5rem 0;
|
|
|
211
|
+ width: 100% !important;
|
|
|
212
|
+ }
|
|
|
213
|
+
|
|
|
214
|
+ .weui-picker__indicator:after {
|
|
|
215
|
+ border-bottom: 1px solid #dbb25f;
|
|
|
216
|
+ }
|
|
|
217
|
+
|
|
|
218
|
+ .weui-picker__indicator:before {
|
|
|
219
|
+ border-top: 1px solid #dbb25f;
|
|
|
220
|
+ }
|
|
|
221
|
+
|
|
|
222
|
+ .weui-picker__action {
|
|
|
223
|
+ padding: 0.2rem 0;
|
|
|
224
|
+ font-size: 13px;
|
|
|
225
|
+ text-align: center;
|
|
|
226
|
+ }
|
|
|
227
|
+
|
|
|
228
|
+ .weui-picker__action:first-child {
|
|
|
229
|
+ color: #333;
|
|
|
230
|
+ text-align: center;
|
|
|
231
|
+ }
|
|
|
232
|
+
|
|
|
233
|
+ .weui-picker__action:last-child {
|
|
|
234
|
+ color: #fff;
|
|
|
235
|
+ text-align: center;
|
|
|
236
|
+ background-color: #dbb25f;
|
|
|
237
|
+ }
|
|
|
238
|
+
|
|
|
239
|
+ .weui-picker__hd {
|
|
|
240
|
+ padding: 0;
|
|
|
241
|
+ }
|
|
|
242
|
+
|
|
|
243
|
+ .weui-picker__item {
|
|
|
244
|
+ font-size: 13px;
|
|
|
245
|
+ }
|
|
|
246
|
+
|
|
|
247
|
+ .close_left {
|
|
|
248
|
+ position: relative;
|
|
|
249
|
+ }
|
|
|
250
|
+
|
|
|
251
|
+ .close_left::before {
|
|
|
252
|
+ position: absolute;
|
|
|
253
|
+ left: -0.1rem;
|
|
|
254
|
+ right: -0.1rem;
|
|
|
255
|
+ top: -0.1rem;
|
|
|
256
|
+ bottom: -0.1rem;
|
|
|
257
|
+ content: '';
|
|
|
258
|
+ }
|
|
|
259
|
+
|
|
|
260
|
+ .mint-popup-bottom {
|
|
|
261
|
+ width: 100%;
|
|
|
262
|
+ }
|
|
|
263
|
+
|
|
|
264
|
+ .weui-check__label:active {
|
|
|
265
|
+ background: transparent;
|
|
|
266
|
+ }
|
|
|
267
|
+
|
|
|
268
|
+ .weui-cells_checkbox .weui-icon-checked:before {
|
|
|
269
|
+ /*content: '';*/
|
|
|
270
|
+ }
|
|
|
271
|
+
|
|
|
272
|
+ .weui-cells_checkbox .weui-check:checked + .weui-icon-checked:before {
|
|
|
273
|
+ color: #dbb25f
|
|
|
274
|
+ }
|
|
|
275
|
+
|
|
|
276
|
+ .weui-cell__hd {
|
|
|
277
|
+ position: relative;
|
|
|
278
|
+ }
|
|
|
279
|
+
|
|
|
280
|
+ .weui-cell__hd::before {
|
|
|
281
|
+ content: '';
|
|
|
282
|
+ position: absolute;
|
|
|
283
|
+ left: -10px;
|
|
|
284
|
+ right: -10px;
|
|
|
285
|
+ top: -10px;
|
|
|
286
|
+ bottom: -10px;
|
|
|
287
|
+ }
|
|
|
288
|
+
|
|
|
289
|
+ .mold_index {
|
|
|
290
|
+ position: fixed;
|
|
|
291
|
+ height: 100%;
|
|
|
292
|
+ width: 100%;
|
|
|
293
|
+ background-color: rgba(0, 0, 0, 0.05);
|
|
|
294
|
+ /*background-color: #000;*/
|
|
|
295
|
+ left: 0;
|
|
|
296
|
+ top: 0;
|
|
|
297
|
+ bottom: 0;
|
|
|
298
|
+ z-index: 10;
|
|
|
299
|
+ }
|
|
|
300
|
+
|
|
|
301
|
+ .weui-mask, .weui-mask_transparent {
|
|
|
302
|
+ position: fixed;
|
|
|
303
|
+ z-index: 1000;
|
|
|
304
|
+ top: 0;
|
|
|
305
|
+ right: 0;
|
|
|
306
|
+ left: 0;
|
|
|
307
|
+ bottom: 0;
|
|
|
308
|
+ width: 100%;
|
|
|
309
|
+ height: 100%;
|
|
|
310
|
+ display: flex;
|
|
|
311
|
+ align-items: center;
|
|
|
312
|
+ justify-content: center;
|
|
|
313
|
+ }
|
|
|
314
|
+
|
|
|
315
|
+ .weui-toast {
|
|
|
316
|
+ position: fixed;
|
|
|
317
|
+ z-index: 5000;
|
|
|
318
|
+ width: 40%;
|
|
|
319
|
+ min-width: 20%;
|
|
|
320
|
+ min-height: auto;
|
|
|
321
|
+ height: auto;
|
|
|
322
|
+ top: 50%;
|
|
|
323
|
+ left: 0;
|
|
|
324
|
+ right: 0;
|
|
|
325
|
+ margin: 0 auto;
|
|
|
326
|
+ /*margin-left: -3.8em;*/
|
|
|
327
|
+ background: hsla(0, 0%, 7%, .7);
|
|
|
328
|
+ text-align: center;
|
|
|
329
|
+ border-radius: 5px;
|
|
|
330
|
+ color: #fff;
|
|
|
331
|
+ font-size: 14px;
|
|
|
332
|
+ }
|
|
|
333
|
+
|
|
|
334
|
+ .weui-icon_toast {
|
|
|
335
|
+ margin: 0;
|
|
|
336
|
+ /*display: block*/
|
|
|
337
|
+ }
|
|
|
338
|
+
|
|
|
339
|
+ .weui-toast__content {
|
|
|
340
|
+ margin: 0;
|
|
|
341
|
+ padding: 0.1rem 0;
|
|
|
342
|
+ }
|
|
|
343
|
+
|
|
|
344
|
+ .weui-icon_toast.weui-icon-success-no-circle {
|
|
|
345
|
+ font-size: 0;
|
|
|
346
|
+ }
|
|
|
347
|
+
|
|
|
348
|
+ .weui-icon_toast.weui-icon-success-no-circle:before {
|
|
|
349
|
+ color: #fff;
|
|
|
350
|
+ font-size: 0;
|
|
|
351
|
+ margin: 0;
|
|
|
352
|
+ }
|
45
|
</style>
|
353
|
</style>
|
46
|
</head>
|
354
|
</head>
|
47
|
<body>
|
355
|
<body>
|
|
@@ -105,10 +413,79 @@ |
|
@@ -105,10 +413,79 @@ |
105
|
<span class="doc_appointment" @click="openOrder" v-else>去 预 约</span>
|
413
|
<span class="doc_appointment" @click="openOrder" v-else>去 预 约</span>
|
106
|
</div>
|
414
|
</div>
|
107
|
</footer>
|
415
|
</footer>
|
|
|
416
|
+ <!--预约-->
|
|
|
417
|
+ <div @click="close" class="meal" v-if="room">
|
|
|
418
|
+ <div class="meal_item" @click.stop>
|
|
|
419
|
+ <div class="meal_title">
|
|
|
420
|
+ <span></span>
|
|
|
421
|
+ <span>入住选择</span>
|
|
|
422
|
+ <span class="iconfont icon-cuohao" @click="close"></span>
|
|
|
423
|
+ </div>
|
|
|
424
|
+ <div class="room_box">
|
|
|
425
|
+ <div class="room_left">
|
|
|
426
|
+ <div><span>服务价格</span><span class="youhui">优惠¥{{price_info.count?price_info.count:0}}</span></div>
|
|
|
427
|
+ </div>
|
|
|
428
|
+ <div class="room_right">
|
|
|
429
|
+ <span>¥{{price_info.price?price_info.price:0}}</span>
|
|
|
430
|
+ <span class="old_price">原价{{price_info.o_price?price_info.o_price:0}}</span>
|
|
|
431
|
+ </div>
|
|
|
432
|
+ </div>
|
|
|
433
|
+ <div class="room_tips">此价格包含护理、房间、用餐费用</div>
|
|
|
434
|
+ <div class="price_box">
|
|
|
435
|
+ <div class="price_left">
|
|
|
436
|
+ <span :class="{'span_active':index==active_index}"
|
|
|
437
|
+ v-for="(item,index) in attribute[0]"
|
|
|
438
|
+ @click="choose_left(index)">{{item}}</span>
|
|
|
439
|
+ </div>
|
|
|
440
|
+ <div class="price_right">
|
|
|
441
|
+ <span :class="{'span_active':index==active_index2}"
|
|
|
442
|
+ v-for="(item,index) in attribute[1]"
|
|
|
443
|
+ @click="choose_right(index)">{{item}}</span>
|
|
|
444
|
+ </div>
|
|
|
445
|
+ </div>
|
|
|
446
|
+ <div class="pay_box">
|
|
|
447
|
+ <span class="pay_num">入住周期 <span
|
|
|
448
|
+ class="limit">({{price_info.limit_num?price_info.limit_num:0}}{{unit}})</span></span>
|
|
|
449
|
+ <div class="pay_btn_box">
|
|
|
450
|
+ <span class="iconfont icon-jian" @click="reduce"></span>
|
|
|
451
|
+ <input type="number" placeholder="" value="1" v-model="num">
|
|
|
452
|
+ <span class="iconfont icon-jikediancanicon09" @click="plus"></span>
|
|
|
453
|
+ </div>
|
|
|
454
|
+ </div>
|
|
|
455
|
+ <div class="pay_btn" @click.stop="pay_go">确定</div>
|
|
|
456
|
+ </div>
|
|
|
457
|
+ </div>
|
|
|
458
|
+ <div @click="close" class="meal" v-if="taocan">
|
|
|
459
|
+ <div class="meal_item" @click.stop>
|
|
|
460
|
+ <div class="meal_title"><span></span><span>选择套餐</span><span class="iconfont icon-cuohao"
|
|
|
461
|
+ @click="close"></span></div>
|
|
|
462
|
+ <div class="meal_price_box">
|
|
|
463
|
+ <div><span>服务价格</span><span class="meal_price">优惠价格¥{{Math.abs(priceList.count)?Math.abs(priceList.count):0}}</span>
|
|
|
464
|
+ </div>
|
|
|
465
|
+ <div class="price"><span class="meal_price">¥{{priceList.o_price?priceList.o_price:0}}</span><span
|
|
|
466
|
+ class="old_price">原价¥{{priceList.price?priceList.price:0}}</span></div>
|
|
|
467
|
+ </div>
|
|
|
468
|
+ <div class="incer">此服务由慈界平台优质服务商提供</div>
|
|
|
469
|
+ <div class="sever_list"><span :class="{'span_active':index==active_index}"
|
|
|
470
|
+ v-for="(item,index) in attribute"
|
|
|
471
|
+ @click="t_choose_sever(item,index)">{{item}}</span></div>
|
|
|
472
|
+ <div class="pay_box">
|
|
|
473
|
+ <span class="pay_num">购买数量 <span
|
|
|
474
|
+ class="limit">(限购<span>{{priceList.limit_num?priceList.limit_num:0}}</span>{{unit}})</span></span>
|
|
|
475
|
+ <div class="pay_btn_box">
|
|
|
476
|
+ <span class="iconfont icon-jian" @click="t_reduce"></span>
|
|
|
477
|
+ <input type="number" placeholder="" value="1" v-model="num">
|
|
|
478
|
+ <span class="iconfont icon-jikediancanicon09" @click="t_plus"></span>
|
|
|
479
|
+ </div>
|
|
|
480
|
+ </div>
|
|
|
481
|
+ <div class="pay_btn" @click="t_pay_go">确定</div>
|
|
|
482
|
+ </div>
|
|
|
483
|
+ </div>
|
108
|
</div>
|
484
|
</div>
|
109
|
</body>
|
485
|
</body>
|
110
|
</html>
|
486
|
</html>
|
111
|
<script type="text/javascript" src="../../assets/js/api.js"></script>
|
487
|
<script type="text/javascript" src="../../assets/js/api.js"></script>
|
|
|
488
|
+<script type="text/javascript" src="../../assets/js/weui.min.js"></script>
|
112
|
<script type="text/javascript" src="../../assets/js/public.js"></script>
|
489
|
<script type="text/javascript" src="../../assets/js/public.js"></script>
|
113
|
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
|
490
|
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
|
114
|
<script>
|
491
|
<script>
|
|
@@ -130,10 +507,8 @@ |
|
@@ -130,10 +507,8 @@ |
130
|
hour: '',
|
507
|
hour: '',
|
131
|
minute: '',
|
508
|
minute: '',
|
132
|
date_info: '',
|
509
|
date_info: '',
|
133
|
- id: '',
|
|
|
134
|
cid: '',
|
510
|
cid: '',
|
135
|
room: '',
|
511
|
room: '',
|
136
|
- attribute: '',
|
|
|
137
|
goods: [],
|
512
|
goods: [],
|
138
|
real_price: '',
|
513
|
real_price: '',
|
139
|
attribute_type: '',
|
514
|
attribute_type: '',
|
|
@@ -141,8 +516,16 @@ |
|
@@ -141,8 +516,16 @@ |
141
|
tel: '',
|
516
|
tel: '',
|
142
|
order_id: '',
|
517
|
order_id: '',
|
143
|
user_info: [],
|
518
|
user_info: [],
|
|
|
519
|
+ pos: 'fixed',
|
|
|
520
|
+ num: 1,
|
|
|
521
|
+ sever_list: [],
|
|
|
522
|
+ active_index: -1,
|
|
|
523
|
+ active_name: '',
|
|
|
524
|
+ priceList: [],
|
|
|
525
|
+ attribute: [],
|
|
|
526
|
+ id: '',
|
144
|
unit: '',
|
527
|
unit: '',
|
145
|
- pos: 'fixed'
|
528
|
+ taocan: false
|
146
|
},
|
529
|
},
|
147
|
created: function () {
|
530
|
created: function () {
|
148
|
this.id = localStorage.getItem('id');
|
531
|
this.id = localStorage.getItem('id');
|
|
@@ -180,15 +563,16 @@ |
|
@@ -180,15 +563,16 @@ |
180
|
// 选择套餐
|
563
|
// 选择套餐
|
181
|
set_meal: function () {
|
564
|
set_meal: function () {
|
182
|
var app = this;
|
565
|
var app = this;
|
183
|
- openWin({
|
|
|
184
|
- name: 'choose_meal_f',
|
|
|
185
|
- url: './choose_meal_f.html',
|
|
|
186
|
- pageParam: {
|
|
|
187
|
- id: app.id,
|
|
|
188
|
- attribute: app.attribute,
|
|
|
189
|
- unit: app.unit
|
|
|
190
|
- }
|
|
|
191
|
- })
|
566
|
+ app.taocan = true;
|
|
|
567
|
+ // openWin({
|
|
|
568
|
+ // name: 'choose_meal_f',
|
|
|
569
|
+ // url: './choose_meal_f.html',
|
|
|
570
|
+ // pageParam: {
|
|
|
571
|
+ // id: app.id,
|
|
|
572
|
+ // attribute: app.attribute,
|
|
|
573
|
+ // unit: app.unit
|
|
|
574
|
+ // }
|
|
|
575
|
+ // })
|
192
|
},
|
576
|
},
|
193
|
// 选择入住等级
|
577
|
// 选择入住等级
|
194
|
set_rank: function () {
|
578
|
set_rank: function () {
|
|
@@ -482,6 +866,131 @@ |
|
@@ -482,6 +866,131 @@ |
482
|
setTimeout(function () {
|
866
|
setTimeout(function () {
|
483
|
document.body.scrollTop = document.body.scrollHeight;
|
867
|
document.body.scrollTop = document.body.scrollHeight;
|
484
|
}, 300);
|
868
|
}, 300);
|
|
|
869
|
+ },
|
|
|
870
|
+ //套餐选择2
|
|
|
871
|
+ close: function () {
|
|
|
872
|
+ // api.closeWin({
|
|
|
873
|
+ // name: 'choose_meal_w'
|
|
|
874
|
+ // });
|
|
|
875
|
+ this.taocan = false
|
|
|
876
|
+ this.room = false
|
|
|
877
|
+ },
|
|
|
878
|
+ t_choose_sever: function (attr, index) {
|
|
|
879
|
+ var app = this;
|
|
|
880
|
+ app.active_index = index;
|
|
|
881
|
+ app.active_name = app.attribute[index];
|
|
|
882
|
+ app.attribute_id = app.attribute[index].id;
|
|
|
883
|
+ var post = {
|
|
|
884
|
+ id: app.id,
|
|
|
885
|
+ attribute: attr
|
|
|
886
|
+ };
|
|
|
887
|
+ var header = {
|
|
|
888
|
+ "XX-Device-Type": getDevice(),
|
|
|
889
|
+ 'XX-Token': getToken()
|
|
|
890
|
+ };
|
|
|
891
|
+ getRequest('post', 'portal/Goods/getPrice', post, header).then(function (res) {
|
|
|
892
|
+ // alert(JSON.stringify(res))
|
|
|
893
|
+ if (res.data.code == 1) {
|
|
|
894
|
+ app.priceList = res.data.data;
|
|
|
895
|
+ } else {
|
|
|
896
|
+ toastMsg(res.msg)
|
|
|
897
|
+ }
|
|
|
898
|
+ });
|
|
|
899
|
+ app.num = 1;
|
|
|
900
|
+ app.meal = app.active_name + app.num + app.unit;
|
|
|
901
|
+ app.total = parseFloat(app.priceList.price) * (app.num);
|
|
|
902
|
+ },
|
|
|
903
|
+ t_reduce: function () {
|
|
|
904
|
+ var app = this;
|
|
|
905
|
+ if (app.num > 1) {
|
|
|
906
|
+ app.num--
|
|
|
907
|
+ }
|
|
|
908
|
+ app.total = parseFloat(app.priceList.price) * (app.num);
|
|
|
909
|
+ app.meal = app.active_name + app.num + app.unit;
|
|
|
910
|
+ },
|
|
|
911
|
+ t_plus: function () {
|
|
|
912
|
+ var app = this;
|
|
|
913
|
+ if (app.num < app.priceList.limit_num) {
|
|
|
914
|
+ app.num++
|
|
|
915
|
+ } else {
|
|
|
916
|
+ toastMsg('不能超过最大限购哦')
|
|
|
917
|
+ }
|
|
|
918
|
+ app.total = parseFloat(app.priceList.price) * (app.num);
|
|
|
919
|
+ app.meal = app.active_name + app.num + app.unit;
|
|
|
920
|
+ },
|
|
|
921
|
+ t_pay_go: function () {
|
|
|
922
|
+ var app = this;
|
|
|
923
|
+ if (app.active_name != '') {
|
|
|
924
|
+ app.close()
|
|
|
925
|
+ } else {
|
|
|
926
|
+ toastMsg('请选择套餐类型')
|
|
|
927
|
+ }
|
|
|
928
|
+
|
|
|
929
|
+ },
|
|
|
930
|
+ choose_left: function (index) {
|
|
|
931
|
+ app.active_index = index;
|
|
|
932
|
+ app.active_left = app.attribute[0][index];
|
|
|
933
|
+ app.num = app.price_info.limit_num;
|
|
|
934
|
+ app.getPrice();
|
|
|
935
|
+ },
|
|
|
936
|
+ choose_right: function (index) {
|
|
|
937
|
+ app.active_index2 = index;
|
|
|
938
|
+ app.active_right = app.attribute[1][index];
|
|
|
939
|
+ app.getPrice();
|
|
|
940
|
+ app.num = app.price_info.limit_num;
|
|
|
941
|
+ },
|
|
|
942
|
+ reduce: function () {
|
|
|
943
|
+ if (app.price_info.limit_num) {
|
|
|
944
|
+ if (app.num > app.price_info.limit_num) {
|
|
|
945
|
+ app.num--
|
|
|
946
|
+ } else {
|
|
|
947
|
+ toastMsg('不能低于' + app.price_info.limit_num + '个月哦')
|
|
|
948
|
+ }
|
|
|
949
|
+ }else {
|
|
|
950
|
+ toastMsg('请选择入住类型')
|
|
|
951
|
+ }
|
|
|
952
|
+ },
|
|
|
953
|
+ plus: function () {
|
|
|
954
|
+ if (app.num < app.price_info.limit_num) {
|
|
|
955
|
+ } else {
|
|
|
956
|
+ app.num++
|
|
|
957
|
+ }
|
|
|
958
|
+ },
|
|
|
959
|
+ getPrice: function () {
|
|
|
960
|
+ if (app.active_left && app.active_right) {
|
|
|
961
|
+ var post = {
|
|
|
962
|
+ attribute: app.active_left + '_' + app.active_right,
|
|
|
963
|
+ id: app.id
|
|
|
964
|
+ };
|
|
|
965
|
+ getRequest('post', 'portal/Goods/getPrice', post, null).then(function (res) {
|
|
|
966
|
+ if (res.data.code == 1) {
|
|
|
967
|
+ app.price_info = res.data.data;
|
|
|
968
|
+ app.num = app.price_info.limit_num;
|
|
|
969
|
+ app.attribute_id = app.price_info.attribute_id
|
|
|
970
|
+ }
|
|
|
971
|
+ })
|
|
|
972
|
+ } else {
|
|
|
973
|
+ toastMsg('请选择入住类型')
|
|
|
974
|
+ }
|
|
|
975
|
+
|
|
|
976
|
+ },
|
|
|
977
|
+ pay_go: function () {
|
|
|
978
|
+ if (app.active_left && app.active_right) {
|
|
|
979
|
+ api.sendEvent({
|
|
|
980
|
+ name: 'room',
|
|
|
981
|
+ extra: {
|
|
|
982
|
+ name_left: app.active_left,
|
|
|
983
|
+ name_right: app.active_right,
|
|
|
984
|
+ num: app.num,
|
|
|
985
|
+ price: app.price_info.price,
|
|
|
986
|
+ attribute_id: app.attribute_id
|
|
|
987
|
+ }
|
|
|
988
|
+ });
|
|
|
989
|
+ app.close()
|
|
|
990
|
+ }
|
|
|
991
|
+ else {
|
|
|
992
|
+ toastMsg('请选择入住类型')
|
|
|
993
|
+ }
|
485
|
}
|
994
|
}
|
486
|
}
|
995
|
}
|
487
|
})
|
996
|
})
|