How to use satisfy method in chai

Best JavaScript code snippet using chai

falsedata.js

Source:falsedata.js Github

copy

Full Screen

1// 热搜词2export var falseHotWord = [3 {4 'search_word': '辣鸭脖',5 'title': '辣鸭脖'6 },7 {8 'search_word': '韩国炸鸡',9 'title': '韩国炸鸡'10 },11 {12 'search_word': '我是一只鸡',13 'title': '我是一只鸡'14 },15 {16 'search_word': '脆皮鸡',17 'title': '脆皮鸡'18 },19 {20 'search_word': '麦当劳',21 'title': '麦当劳'22 },23 {24 'search_word': '老鸭粉丝',25 'title': '老鸭粉丝'26 },27 {28 'search_word': '牛排',29 'title': '牛排'30 },31 {32 'search_word': '黄焖鸡',33 'title': '黄焖鸡'34 },35 {36 'search_word': '铁板炒饭',37 'title': '铁板炒饭'38 },39 {40 'search_word': '麻辣香锅',41 'title': '麻辣香锅'42 },43 {44 'search_word': '煎饼',45 'title': '煎饼'46 }47];48// 订单信息49export var falseOrder = [50 {51 'restaurant_id': 's10001',52 'img_src': '',53 'store_name': '上沙麦当劳',54 'order_birth_time': '2017-02-17 18:36',55 'order_state': '订单已完成',56 'order_content': {},57 'order_brief_info': '麦香鸡腿堡',58 'order_price': 22.959 },60 {61 'restaurant_id': 's10001',62 'img_src': '',63 'store_name': '下沙麦当劳',64 'order_birth_time': '2017-02-17 18:43',65 'order_state': '订单已完成',66 'order_content': {},67 'order_brief_info': '七虾堡等2件商品',68 'order_price': 2069 },70 {71 'restaurant_id': 's10001',72 'img_src': '',73 'store_name': '沙嘴麦当劳',74 'order_birth_time': '2017-02-17 18:45',75 'order_state': '订单已完成',76 'order_content': {},77 'order_brief_info': '麦香鸡腿堡等2件商品',78 'order_price': 2379 },80 {81 'restaurant_id': 's10001',82 'img_src': '',83 'store_name': '沙尾麦当劳',84 'order_birth_time': '2017-02-17 18:55',85 'order_state': '订单已完成',86 'order_content': {},87 'order_brief_info': '薯条等3件商品',88 'order_price': 31.989 },90 {91 'restaurant_id': 's10001',92 'img_src': '',93 'store_name': '沙头麦当劳',94 'order_birth_time': '2017-02-17 17:36',95 'order_state': '订单已完成',96 'order_content': {},97 'order_brief_info': '麦香鸡腿堡',98 'order_price': 22.999 }100];101// 商家简略信息102export var falseBussinessbrief = [103 {104 'shop_name': '上沙麦当劳', // 店名105 'id': 's10001',106 'path': '/s10001',107 'shop_rating': 4.7, // 店评分108 'brand': true, // 是否品牌店109 'on_time': true, // 准时达110 'fengniao': true, // 蜂鸟专送111 'bao': true, // 保112 'piao': true, // 票113 'zhun': true, // 准114 'start_send': 20, // 起送金额115 'send_cost': 5, // 配送费116 'distance': 637, // 距离(米)117 'estimate_time': 30, // 预计用时(分)118 'notice': '新店开张,优惠大酬宾!', // 店公告119 'discount': '新用户有巨额优惠!' // 优惠信息120 },121 {122 'shop_name': '正宗川味卤鸡蛋,味道好得很!', // 店名123 'id': 's10002',124 'path': '/s10002',125 'shop_rating': 3.5,126 'brand': false,127 'on_time': true,128 'fengniao': false,129 'bao': true,130 'piao': false,131 'zhun': true,132 'start_send': 20,133 'send_cost': 0,134 'distance': 347,135 'estimate_time': 20,136 'notice': '新店开张,优惠大酬宾!',137 'discount': '新用户有巨额优惠!'138 },139 {140 'shop_name': '有家蛋糕店(下沙店)',141 'id': 's10003',142 'path': '/s10003',143 'shop_rating': 4.4,144 'brand': false,145 'on_time': true,146 'fengniao': false,147 'bao': true,148 'piao': false,149 'zhun': true,150 'start_send': 80,151 'send_cost': 0,152 'distance': 637,153 'estimate_time': 30,154 'notice': '新店开张,优惠大酬宾!',155 'discount': '新用户有巨额优惠!'156 },157 {158 'shop_name': '宇宙炸鸡(上沙店)',159 'id': 's10004',160 'path': '/s10004',161 'shop_rating': 4.3,162 'brand': true,163 'on_time': false,164 'fengniao': false,165 'bao': true,166 'piao': false,167 'zhun': true,168 'start_send': 20,169 'send_cost': 5,170 'distance': 127,171 'estimate_time': 10,172 'notice': '新店开张,优惠大酬宾!',173 'discount': '新用户有巨额优惠!'174 },175 {176 'shop_name': '胖哥烧烤(车公庙店)',177 'id': 's10005',178 'path': '/s10005',179 'shop_rating': 4.6,180 'brand': false,181 'on_time': false,182 'fengniao': false,183 'bao': true,184 'piao': false,185 'zhun': true,186 'start_send': 20,187 'send_cost': 4,188 'distance': 500,189 'estimate_time': 10,190 'notice': '新店开张,优惠大酬宾!',191 'discount': '新用户有巨额优惠!'192 }193];194// 商店信息195export var falseBussinessInfo = {196 's10001': {197 'shop_name': '上沙麦当劳', // 店名198 'id': 's10001',199 'shop_rating': 4.5, // 店总评分200 'service_code': 4.6, // 服务总评分201 'foods_code': 4.4, // 食物总评分202 'high_or_low': true, // 低于还是高于周边商家203 'h_l_percent': 30, // 低于还是高于周边商家的百分比204 'brand': true, // 是否品牌店205 'on_time': true, // 准时达206 'fengniao': true, // 蜂鸟专送207 'bao': true, // 保208 'piao': true, // 票209 'zhun': true, // 准210 'start_send': 20, // 起送金额211 'send_cost': 5, // 配送费212 'distance': 637, // 距离(米)213 'estimate_time': 31, // 预计用时(分)214 'notice': '新店开张,优惠大酬宾!', // 店公告215 'discount': '新用户有巨额优惠!', // 优惠信息216 'evaluate': [ // 评价详情(10条)217 {218 'username': 'w******k',219 'userid': 12344,220 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',221 'time': '2017-2-22',222 'evaluate_code': 1, // 评分223 'send_time': 30, // 送达时间(分)224 'evaluate_details': '不怎么好吃'225 },226 {227 'username': 'w******k',228 'userid': 12344,229 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',230 'time': '2017-2-22',231 'evaluate_code': 4.5,232 'send_time': 30,233 'evaluate_details': '很好吃'234 },235 {236 'username': 'w******k',237 'userid': 12344,238 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',239 'time': '2017-2-22',240 'evaluate_code': 5,241 'send_time': 30,242 'evaluate_details': '很好吃'243 },244 {245 'username': 'w******k',246 'userid': 12344,247 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',248 'time': '2017-2-22',249 'evaluate_code': 4.7,250 'send_time': 30,251 'evaluate_details': '很好吃'252 },253 {254 'username': 'w******k',255 'userid': 12344,256 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',257 'time': '2017-2-22',258 'evaluate_code': 5,259 'send_time': 30,260 'evaluate_details': '很好吃'261 }262 ],263 'commodity': [ // 商品264 {265 'description': '大家喜欢吃,才叫真好吃。', // 大分类的小tips266 'is_selected': true,267 'name': '热销榜', // 大分类名字268 'type_accumulation': 'c1', // 类型累加269 'foods': [ // 大分类下单项列表270 {271 'name': '吮指原味鸡', // 商品名272 'rating': 4.67, // 评分273 'unit_price': 11, // 单价274 'restaurant_id': 's10001', // 商店id275 'description': '', // 介绍276 'month_sales': 590, // 月销量277 'rating_count': 91, // 评价数278 'tips': '具有神秘配方浓郁的香料所散发的绝佳风味,鲜嫩多汁。',279 'satisfy_count': 8, // 好评数??280 'satisfy_rate': 95, // 好评率281 'one_food_id': 100001, // id282 'image_path': '8b160883bdbeb19636f0099951b554c4jpeg'283 },284 {285 'name': '香辣鸡腿堡',286 'rating': 5,287 'unit_price': 17, // 单价288 'restaurant_id': 's10001',289 'description': '',290 'month_sales': 723,291 'rating_count': 65,292 'tips': '整块无骨鸡腿肉, 浓郁汉堡酱,香脆鲜辣多汁。',293 'satisfy_count': 6,294 'satisfy_rate': 100,295 'one_food_id': 100002,296 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'297 },298 {299 'name': '蟹黄堡',300 'rating': 5,301 'unit_price': 17, // 单价302 'restaurant_id': 's10001',303 'description': '',304 'month_sales': 723,305 'rating_count': 65,306 'tips': '浓郁汉堡酱,香脆鲜辣多汁。',307 'satisfy_count': 6,308 'satisfy_rate': 100,309 'one_food_id': 100003,310 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'311 }312 ]313 },314 {315 'description': '',316 'is_selected': false,317 'name': '美味汉堡',318 'type_accumulation': 'c2',319 'foods': [320 {321 'name': '麦香鸡腿堡',322 'rating': 5,323 'unit_price': 18, // 单价324 'restaurant_id': 's10001',325 'description': '',326 'month_sales': 723,327 'rating_count': 65,328 'tips': '整块无骨鸡腿肉, 浓郁汉堡酱,香脆鲜辣多汁。',329 'satisfy_count': 6,330 'satisfy_rate': 100,331 'one_food_id': 100004,332 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'333 },334 {335 'name': '腿堡',336 'rating': 5,337 'unit_price': 18, // 单价338 'restaurant_id': 's10001',339 'description': '',340 'month_sales': 723,341 'rating_count': 65,342 'tips': '整块无骨鸡腿肉, 浓郁汉堡酱,香脆鲜辣多汁。',343 'satisfy_count': 6,344 'satisfy_rate': 100,345 'one_food_id': 100005,346 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'347 }348 ]349 },350 {351 'description': '',352 'is_selected': false,353 'name': '派',354 'type_accumulation': 'c3',355 'foods': [356 {357 'name': '红豆派',358 'rating': 5,359 'unit_price': 11, // 单价360 'restaurant_id': 's10001',361 'description': '',362 'month_sales': 723,363 'rating_count': 65,364 'tips': '整块无骨鸡腿肉, 浓郁汉堡酱,香脆鲜辣多汁。',365 'satisfy_count': 6,366 'satisfy_rate': 100,367 'one_food_id': 100006,368 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'369 },370 {371 'name': '香芋派',372 'rating': 5,373 'unit_price': 11, // 单价374 'restaurant_id': 's10001',375 'description': '',376 'month_sales': 723,377 'rating_count': 65,378 'tips': '整块无骨鸡腿肉, 浓郁汉堡酱,香脆鲜辣多汁。',379 'satisfy_count': 6,380 'satisfy_rate': 100,381 'one_food_id': 100007,382 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'383 }384 ]385 },386 {387 'description': '',388 'is_selected': false,389 'name': '饮料',390 'type_accumulation': 'c4',391 'foods': [392 {393 'name': '可乐',394 'rating': 5,395 'unit_price': 8, // 单价396 'restaurant_id': 's10001',397 'description': '',398 'month_sales': 723,399 'rating_count': 65,400 'tips': '小杯可乐',401 'satisfy_count': 6,402 'satisfy_rate': 100,403 'one_food_id': 100008,404 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'405 }406 ]407 },408 {409 'description': '',410 'is_selected': false,411 'name': '类1',412 'type_accumulation': 'c5',413 'foods': [414 {415 'name': '类1-1',416 'rating': 5,417 'unit_price': 18, // 单价418 'restaurant_id': 's10001',419 'description': '',420 'month_sales': 723,421 'rating_count': 65,422 'tips': '类1—1',423 'satisfy_count': 6,424 'satisfy_rate': 100,425 'one_food_id': 100009,426 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'427 }428 ]429 },430 {431 'description': '',432 'is_selected': false,433 'name': '类2',434 'type_accumulation': 'c6',435 'foods': [436 {437 'name': '类2-1',438 'rating': 5,439 'unit_price': 18, // 单价440 'restaurant_id': 's10001',441 'description': '',442 'month_sales': 723,443 'rating_count': 65,444 'tips': '类2-1',445 'satisfy_count': 6,446 'satisfy_rate': 100,447 'one_food_id': 100010,448 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'449 }450 ]451 },452 {453 'description': '',454 'is_selected': false,455 'name': '类3',456 'type_accumulation': 'c7',457 'foods': [458 {459 'name': '类3-1',460 'rating': 5,461 'unit_price': 18, // 单价462 'restaurant_id': 's10001',463 'description': '',464 'month_sales': 723,465 'rating_count': 65,466 'tips': '类3-1',467 'satisfy_count': 6,468 'satisfy_rate': 100,469 'one_food_id': 100011,470 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'471 }472 ]473 },474 {475 'description': '',476 'is_selected': false,477 'name': '类4',478 'type_accumulation': 'c8',479 'foods': [480 {481 'name': '类4-1',482 'rating': 5,483 'unit_price': 18, // 单价484 'restaurant_id': 's10001',485 'description': '',486 'month_sales': 723,487 'rating_count': 65,488 'tips': '类4-1',489 'satisfy_count': 6,490 'satisfy_rate': 100,491 'one_food_id': 100012,492 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'493 }494 ]495 },496 {497 'description': '',498 'is_selected': false,499 'name': '类5',500 'type_accumulation': 'c9',501 'foods': [502 {503 'name': '类5-1',504 'rating': 5,505 'unit_price': 18, // 单价506 'restaurant_id': 's10001',507 'description': '',508 'month_sales': 723,509 'rating_count': 65,510 'tips': '类5-1',511 'satisfy_count': 6,512 'satisfy_rate': 100,513 'one_food_id': 100013,514 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'515 }516 ]517 },518 {519 'description': '',520 'is_selected': false,521 'name': '类6',522 'type_accumulation': 'c10',523 'foods': [524 {525 'name': '类6-1',526 'rating': 5,527 'unit_price': 18, // 单价528 'restaurant_id': 's10001',529 'description': '',530 'month_sales': 723,531 'rating_count': 65,532 'tips': '类6-1',533 'satisfy_count': 6,534 'satisfy_rate': 100,535 'one_food_id': 100014,536 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'537 }538 ]539 }540 ]541 },542 's10002': {543 'shop_name': '正宗川味卤鸡蛋,味道好得很!', // 店名544 'id': 's10002',545 'shop_rating': 3.5, // 店总评分546 'service_code': 3.6, // 服务总评分547 'foods_code': 3.4, // 食物总评分548 'high_or_low': false, // 低于还是高于周边商家549 'h_l_percent': 100, // 低于还是高于周边商家的百分比550 'brand': false, // 是否品牌店551 'on_time': true, // 准时达552 'fengniao': false, // 蜂鸟专送553 'bao': true, // 保554 'piao': false, // 票555 'zhun': true, // 准556 'start_send': 20, // 起送金额557 'send_cost': 0, // 配送费558 'distance': 347, // 距离(米)559 'estimate_time': 20, // 预计用时(分)560 'notice': '新店开张,优惠大酬宾!', // 店公告561 'discount': '新用户有巨额优惠!', // 优惠信息562 'evaluate': [ // 评价详情563 {564 'username': 'w******k',565 'userid': 12344,566 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',567 'time': '2017-2-22',568 'evaluate_code': 1, // 评分569 'send_time': 30, // 送达时间(分)570 'evaluate_details': '不怎么好吃'571 },572 {573 'username': 'w******k',574 'userid': 12344,575 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',576 'time': '2017-2-22',577 'evaluate_code': 1,578 'send_time': 30,579 'evaluate_details': '差'580 },581 {582 'username': 'w******k',583 'userid': 12344,584 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',585 'time': '2017-2-22',586 'evaluate_code': 4,587 'send_time': 30,588 'evaluate_details': '很好吃'589 },590 {591 'username': 'w******k',592 'userid': 12344,593 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',594 'time': '2017-2-22',595 'evaluate_code': 3.7,596 'send_time': 30,597 'evaluate_details': '一般'598 },599 {600 'username': 'w******k',601 'userid': 12344,602 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',603 'time': '2017-2-22',604 'evaluate_code': 4,605 'send_time': 30,606 'evaluate_details': '好'607 }608 ],609 'commodity': [ // 商品610 {611 'description': '大家最爱吃', // 大分类的小tips612 'is_selected': true,613 'name': '热销榜', // 大分类名字614 'type_accumulation': 'c1', // 类型累加615 'foods': [ // 大分类下单项列表616 {617 'name': '一个卤鸡蛋', // 商品名618 'rating': 3.7, // 评分619 'unit_price': 3, // 单价620 'restaurant_id': 's10002', // 商店id621 'description': '', // 介绍622 'month_sales': 590, // 月销量623 'rating_count': 91, // 评价数624 'tips': '具有神秘配方浓郁的香料所散发的绝佳风味,鲜嫩多汁。',625 'satisfy_count': 8, // 好评数??626 'satisfy_rate': 95, // 好评率627 'one_food_id': 100015, // id628 'image_path': '8b160883bdbeb19636f0099951b554c4jpeg'629 },630 {631 'name': '一打卤鸡蛋',632 'rating': 5,633 'unit_price': 30, // 单价634 'restaurant_id': 's10002',635 'description': '',636 'month_sales': 723,637 'rating_count': 65,638 'tips': '正宗川味卤鸡蛋,味道好得很!。',639 'satisfy_count': 6,640 'satisfy_rate': 100,641 'one_food_id': 100016,642 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'643 }644 ]645 },646 {647 'description': '',648 'is_selected': false,649 'name': '饮料',650 'type_accumulation': 'c2',651 'foods': [652 {653 'name': '可乐',654 'rating': 5,655 'unit_price': 5, // 单价656 'restaurant_id': 's10002',657 'description': '',658 'month_sales': 723,659 'rating_count': 65,660 'tips': '整块无骨鸡腿肉, 浓郁汉堡酱,香脆鲜辣多汁。',661 'satisfy_count': 6,662 'satisfy_rate': 100,663 'one_food_id': 100017,664 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'665 }666 ]667 },668 {669 'description': '',670 'is_selected': false,671 'name': '类1',672 'type_accumulation': 'c3',673 'foods': [674 {675 'name': '类1',676 'rating': 5,677 'unit_price': 18, // 单价678 'restaurant_id': 's10002',679 'description': '',680 'month_sales': 723,681 'rating_count': 65,682 'tips': '类1',683 'satisfy_count': 6,684 'satisfy_rate': 100,685 'one_food_id': 100018,686 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'687 }688 ]689 },690 {691 'description': '',692 'is_selected': false,693 'name': '类2',694 'type_accumulation': 'c4',695 'foods': [696 {697 'name': '类2',698 'rating': 5,699 'unit_price': 18, // 单价700 'restaurant_id': 's10002',701 'description': '',702 'month_sales': 723,703 'rating_count': 65,704 'tips': '类2',705 'satisfy_count': 6,706 'satisfy_rate': 100,707 'one_food_id': 100019,708 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'709 }710 ]711 },712 {713 'description': '',714 'is_selected': false,715 'name': '类3',716 'type_accumulation': 'c5',717 'foods': [718 {719 'name': '类3',720 'rating': 5,721 'unit_price': 18, // 单价722 'restaurant_id': 's10001',723 'description': '',724 'month_sales': 723,725 'rating_count': 65,726 'tips': '类3',727 'satisfy_count': 6,728 'satisfy_rate': 100,729 'one_food_id': 100020,730 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'731 }732 ]733 },734 {735 'description': '',736 'is_selected': false,737 'name': '类4',738 'type_accumulation': 'c6',739 'foods': [740 {741 'name': '类4',742 'rating': 5,743 'unit_price': 18, // 单价744 'restaurant_id': 's10001',745 'description': '',746 'month_sales': 723,747 'rating_count': 65,748 'tips': '类4',749 'satisfy_count': 6,750 'satisfy_rate': 100,751 'one_food_id': 100021,752 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'753 }754 ]755 },756 {757 'description': '',758 'is_selected': false,759 'name': '类5',760 'type_accumulation': 'c7',761 'foods': [762 {763 'name': '类5',764 'rating': 5,765 'unit_price': 18, // 单价766 'restaurant_id': 's10001',767 'description': '',768 'month_sales': 723,769 'rating_count': 65,770 'tips': '类5',771 'satisfy_count': 6,772 'satisfy_rate': 100,773 'one_food_id': 100022,774 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'775 }776 ]777 },778 {779 'description': '',780 'is_selected': false,781 'name': '类6',782 'type_accumulation': 'c8',783 'foods': [784 {785 'name': '类6',786 'rating': 5,787 'unit_price': 18, // 单价788 'restaurant_id': 's10001',789 'description': '',790 'month_sales': 723,791 'rating_count': 65,792 'tips': '类6',793 'satisfy_count': 6,794 'satisfy_rate': 100,795 'one_food_id': 100023,796 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'797 }798 ]799 },800 {801 'description': '',802 'is_selected': false,803 'name': '类7',804 'type_accumulation': 'c9',805 'foods': [806 {807 'name': '类7',808 'rating': 5,809 'unit_price': 18, // 单价810 'restaurant_id': 's10001',811 'description': '',812 'month_sales': 723,813 'rating_count': 65,814 'tips': '类7',815 'satisfy_count': 6,816 'satisfy_rate': 100,817 'one_food_id': 100024,818 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'819 }820 ]821 },822 {823 'description': '',824 'is_selected': false,825 'name': '类8',826 'type_accumulation': 'c10',827 'foods': [828 {829 'name': '类8',830 'rating': 5,831 'unit_price': 18, // 单价832 'restaurant_id': 's10001',833 'description': '',834 'month_sales': 723,835 'rating_count': 65,836 'tips': '类8',837 'satisfy_count': 6,838 'satisfy_rate': 100,839 'one_food_id': 100025,840 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'841 }842 ]843 }844 ]845 },846 's10003': {847 'shop_name': '有家蛋糕店(下沙店)', // 店名848 'id': 's10003',849 'shop_rating': 4.3, // 店总评分850 'service_code': 4.6, // 服务总评分851 'foods_code': 4.2, // 食物总评分852 'high_or_low': true, // 低于还是高于周边商家853 'h_l_percent': 20, // 低于还是高于周边商家的百分比854 'brand': false, // 是否品牌店855 'on_time': true, // 准时达856 'fengniao': false, // 蜂鸟专送857 'bao': true, // 保858 'piao': false, // 票859 'zhun': true, // 准860 'start_send': 80, // 起送金额861 'send_cost': 0, // 配送费862 'distance': 637, // 距离(米)863 'estimate_time': 30, // 预计用时(分)864 'notice': '新店开张,优惠大酬宾!', // 店公告865 'discount': '新用户有巨额优惠!', // 优惠信息866 'evaluate': [ // 评价详情867 {868 'username': 'w******k',869 'userid': 12344,870 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',871 'time': '2017-2-22',872 'evaluate_code': 4.5, // 评分873 'send_time': 30, // 送达时间(分)874 'evaluate_details': '很好吃'875 },876 {877 'username': 'w******k',878 'userid': 12344,879 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',880 'time': '2017-2-22',881 'evaluate_code': 4.5,882 'send_time': 30,883 'evaluate_details': '很好吃'884 },885 {886 'username': 'w******k',887 'userid': 12344,888 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',889 'time': '2017-2-22',890 'evaluate_code': 4,891 'send_time': 30,892 'evaluate_details': '很好吃'893 },894 {895 'username': 'w******k',896 'userid': 12344,897 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',898 'time': '2017-2-22',899 'evaluate_code': 4.7,900 'send_time': 30,901 'evaluate_details': '很好吃'902 },903 {904 'username': 'w******k',905 'userid': 12344,906 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',907 'time': '2017-2-22',908 'evaluate_code': 4,909 'send_time': 30,910 'evaluate_details': '很好吃'911 }912 ],913 'commodity': [ // 商品914 {915 'description': '大家最爱吃', // 大分类的小tips916 'is_selected': true,917 'name': '热销榜', // 大分类名字918 'type_accumulation': 'c1', // 类型累加919 'foods': [ // 大分类下单项列表920 {921 'name': '奶油蛋糕', // 商品名922 'rating': 4.7, // 评分923 'unit_price': 88, // 单价924 'restaurant_id': 's10003', // 商店id925 'description': '奶油蛋糕,灰常好吃!', // 介绍926 'month_sales': 59, // 月销量927 'rating_count': 9, // 评价数928 'tips': '奶油蛋糕,灰常好吃!',929 'satisfy_count': 8, // 好评数??930 'satisfy_rate': 95, // 好评率931 'one_food_id': 100026, // id932 'image_path': '8b160883bdbeb19636f0099951b554c4jpeg'933 },934 {935 'name': '水果蛋糕',936 'rating': 5,937 'unit_price': 90, // 单价938 'restaurant_id': 's10003',939 'description': '',940 'month_sales': 23,941 'rating_count': 6,942 'tips': '正宗川味卤鸡蛋,味道好得很!。',943 'satisfy_count': 6,944 'satisfy_rate': 100,945 'one_food_id': 100027,946 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'947 }948 ]949 },950 {951 'description': '',952 'is_selected': false,953 'name': '饮料',954 'type_accumulation': 'c2',955 'foods': [956 {957 'name': '可乐',958 'rating': 5,959 'unit_price': 5, // 单价960 'restaurant_id': 's10003',961 'description': '',962 'month_sales': 723,963 'rating_count': 65,964 'tips': '整块无骨鸡腿肉, 浓郁汉堡酱,香脆鲜辣多汁。',965 'satisfy_count': 6,966 'satisfy_rate': 100,967 'one_food_id': 100028,968 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'969 }970 ]971 },972 {973 'description': '',974 'is_selected': false,975 'name': '类1',976 'type_accumulation': 'c3',977 'foods': [978 {979 'name': '类1',980 'rating': 5,981 'unit_price': 18, // 单价982 'restaurant_id': 's10003',983 'description': '',984 'month_sales': 723,985 'rating_count': 65,986 'tips': '类1',987 'satisfy_count': 6,988 'satisfy_rate': 100,989 'one_food_id': 100029,990 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'991 }992 ]993 },994 {995 'description': '',996 'is_selected': false,997 'name': '类2',998 'type_accumulation': 'c4',999 'foods': [1000 {1001 'name': '类2',1002 'rating': 5,1003 'unit_price': 18, // 单价1004 'restaurant_id': 's10003',1005 'description': '',1006 'month_sales': 723,1007 'rating_count': 65,1008 'tips': '类2',1009 'satisfy_count': 6,1010 'satisfy_rate': 100,1011 'one_food_id': 100030,1012 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1013 }1014 ]1015 },1016 {1017 'description': '',1018 'is_selected': false,1019 'name': '类3',1020 'type_accumulation': 'c5',1021 'foods': [1022 {1023 'name': '类3',1024 'rating': 5,1025 'unit_price': 18, // 单价1026 'restaurant_id': 's10003',1027 'description': '',1028 'month_sales': 723,1029 'rating_count': 65,1030 'tips': '类3',1031 'satisfy_count': 6,1032 'satisfy_rate': 100,1033 'one_food_id': 100031,1034 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1035 }1036 ]1037 },1038 {1039 'description': '',1040 'is_selected': false,1041 'name': '类4',1042 'type_accumulation': 'c6',1043 'foods': [1044 {1045 'name': '类4',1046 'rating': 5,1047 'unit_price': 18, // 单价1048 'restaurant_id': 's10003',1049 'description': '',1050 'month_sales': 723,1051 'rating_count': 65,1052 'tips': '类4',1053 'satisfy_count': 6,1054 'satisfy_rate': 100,1055 'one_food_id': 100032,1056 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1057 }1058 ]1059 },1060 {1061 'description': '',1062 'is_selected': false,1063 'name': '类5',1064 'type_accumulation': 'c7',1065 'foods': [1066 {1067 'name': '类5',1068 'rating': 5,1069 'unit_price': 18, // 单价1070 'restaurant_id': 's10003',1071 'description': '',1072 'month_sales': 723,1073 'rating_count': 65,1074 'tips': '类5',1075 'satisfy_count': 6,1076 'satisfy_rate': 100,1077 'one_food_id': 100033,1078 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1079 }1080 ]1081 },1082 {1083 'description': '',1084 'is_selected': false,1085 'name': '类6',1086 'type_accumulation': 'c8',1087 'foods': [1088 {1089 'name': '类6',1090 'rating': 5,1091 'unit_price': 18, // 单价1092 'restaurant_id': 's10003',1093 'description': '',1094 'month_sales': 723,1095 'rating_count': 65,1096 'tips': '类6',1097 'satisfy_count': 6,1098 'satisfy_rate': 100,1099 'one_food_id': 100034,1100 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1101 }1102 ]1103 },1104 {1105 'description': '',1106 'is_selected': false,1107 'name': '类7',1108 'type_accumulation': 'c9',1109 'foods': [1110 {1111 'name': '类7',1112 'rating': 5,1113 'unit_price': 18, // 单价1114 'restaurant_id': 's10003',1115 'description': '',1116 'month_sales': 723,1117 'rating_count': 65,1118 'tips': '类7',1119 'satisfy_count': 6,1120 'satisfy_rate': 100,1121 'one_food_id': 100035,1122 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1123 }1124 ]1125 },1126 {1127 'description': '',1128 'is_selected': false,1129 'name': '类8',1130 'type_accumulation': 'c10',1131 'foods': [1132 {1133 'name': '类8',1134 'rating': 5,1135 'unit_price': 18, // 单价1136 'restaurant_id': 's10003',1137 'description': '',1138 'month_sales': 723,1139 'rating_count': 65,1140 'tips': '类8',1141 'satisfy_count': 6,1142 'satisfy_rate': 100,1143 'one_food_id': 100036,1144 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1145 }1146 ]1147 }1148 ]1149 },1150 's10004': {1151 'shop_name': '宇宙炸鸡(上沙店)', // 店名1152 'id': 's10002',1153 'shop_rating': 4.3, // 店总评分1154 'service_code': 4.3, // 服务总评分1155 'foods_code': 4.4, // 食物总评分1156 'high_or_low': true, // 低于还是高于周边商家1157 'h_l_percent': 10, // 低于还是高于周边商家的百分比1158 'brand': true, // 是否品牌店1159 'on_time': false, // 准时达1160 'fengniao': false, // 蜂鸟专送1161 'bao': true, // 保1162 'piao': false, // 票1163 'zhun': true, // 准1164 'start_send': 20, // 起送金额1165 'send_cost': 5, // 配送费1166 'distance': 127, // 距离(米)1167 'estimate_time': 10, // 预计用时(分)1168 'notice': '新店开张,优惠大酬宾!', // 店公告1169 'discount': '新用户有巨额优惠!', // 优惠信息1170 'evaluate': [ // 评价详情1171 {1172 'username': 'w******k',1173 'userid': 12344,1174 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',1175 'time': '2017-2-22',1176 'evaluate_code': 1, // 评分1177 'send_time': 30, // 送达时间(分)1178 'evaluate_details': '不怎么好吃'1179 },1180 {1181 'username': 'w******k',1182 'userid': 12344,1183 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',1184 'time': '2017-2-22',1185 'evaluate_code': 3.5,1186 'send_time': 30,1187 'evaluate_details': '很好吃'1188 },1189 {1190 'username': 'w******k',1191 'userid': 12344,1192 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',1193 'time': '2017-2-22',1194 'evaluate_code': 4,1195 'send_time': 30,1196 'evaluate_details': '很好吃'1197 },1198 {1199 'username': 'w******k',1200 'userid': 12344,1201 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',1202 'time': '2017-2-22',1203 'evaluate_code': 3.7,1204 'send_time': 30,1205 'evaluate_details': '很好吃'1206 },1207 {1208 'username': 'w******k',1209 'userid': 12344,1210 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',1211 'time': '2017-2-22',1212 'evaluate_code': 4,1213 'send_time': 30,1214 'evaluate_details': '很好吃'1215 }1216 ],1217 'commodity': [ // 商品1218 {1219 'description': '大家最爱吃', // 大分类的小tips1220 'is_selected': true,1221 'name': '热销榜', // 大分类名字1222 'type_accumulation': 'c1', // 类型累加1223 'foods': [ // 大分类下单项列表1224 {1225 'name': '招牌炸鸡', // 商品名1226 'rating': 4.7, // 评分1227 'unit_price': 23, // 单价1228 'restaurant_id': 's10004', // 商店id1229 'description': '', // 介绍1230 'month_sales': 590, // 月销量1231 'rating_count': 91, // 评价数1232 'tips': '具有神秘配方浓郁的香料所散发的绝佳风味,鲜嫩多汁。',1233 'satisfy_count': 8, // 好评数1234 'satisfy_rate': 95, // 好评率1235 'one_food_id': 100037, // id1236 'image_path': '8b160883bdbeb19636f0099951b554c4jpeg'1237 },1238 {1239 'name': '大鸡腿',1240 'rating': 5,1241 'unit_price': 13, // 单价1242 'restaurant_id': 's10004',1243 'description': '',1244 'month_sales': 723,1245 'rating_count': 65,1246 'tips': '正宗川味卤鸡蛋,味道好得很!。',1247 'satisfy_count': 6,1248 'satisfy_rate': 100,1249 'one_food_id': 100038,1250 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1251 }1252 ]1253 },1254 {1255 'description': '',1256 'is_selected': false,1257 'name': '饮料',1258 'type_accumulation': 'c2',1259 'foods': [1260 {1261 'name': '可乐',1262 'rating': 5,1263 'unit_price': 5, // 单价1264 'restaurant_id': 's10004',1265 'description': '',1266 'month_sales': 723,1267 'rating_count': 65,1268 'tips': '整块无骨鸡腿肉, 浓郁汉堡酱,香脆鲜辣多汁。',1269 'satisfy_count': 6,1270 'satisfy_rate': 100,1271 'one_food_id': 100039,1272 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1273 }1274 ]1275 },1276 {1277 'description': '',1278 'is_selected': false,1279 'name': '类1',1280 'type_accumulation': 'c3',1281 'foods': [1282 {1283 'name': '类1',1284 'rating': 5,1285 'unit_price': 18, // 单价1286 'restaurant_id': 's10004',1287 'description': '',1288 'month_sales': 723,1289 'rating_count': 65,1290 'tips': '类1',1291 'satisfy_count': 6,1292 'satisfy_rate': 100,1293 'one_food_id': 100040,1294 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1295 }1296 ]1297 },1298 {1299 'description': '',1300 'is_selected': false,1301 'name': '类2',1302 'type_accumulation': 'c4',1303 'foods': [1304 {1305 'name': '类2',1306 'rating': 5,1307 'unit_price': 18, // 单价1308 'restaurant_id': 's10004',1309 'description': '',1310 'month_sales': 723,1311 'rating_count': 65,1312 'tips': '类2',1313 'satisfy_count': 6,1314 'satisfy_rate': 100,1315 'one_food_id': 100041,1316 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1317 }1318 ]1319 },1320 {1321 'description': '',1322 'is_selected': false,1323 'name': '类3',1324 'type_accumulation': 'c5',1325 'foods': [1326 {1327 'name': '类3',1328 'rating': 5,1329 'unit_price': 18, // 单价1330 'restaurant_id': 's10004',1331 'description': '',1332 'month_sales': 723,1333 'rating_count': 65,1334 'tips': '类3',1335 'satisfy_count': 6,1336 'satisfy_rate': 100,1337 'one_food_id': 100042,1338 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1339 }1340 ]1341 },1342 {1343 'description': '',1344 'is_selected': false,1345 'name': '类4',1346 'type_accumulation': 'c6',1347 'foods': [1348 {1349 'name': '类4',1350 'rating': 5,1351 'unit_price': 18, // 单价1352 'restaurant_id': 's10004',1353 'description': '',1354 'month_sales': 723,1355 'rating_count': 65,1356 'tips': '类4',1357 'satisfy_count': 6,1358 'satisfy_rate': 100,1359 'one_food_id': 100043,1360 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1361 }1362 ]1363 },1364 {1365 'description': '',1366 'is_selected': false,1367 'name': '类5',1368 'type_accumulation': 'c7',1369 'foods': [1370 {1371 'name': '类5',1372 'rating': 5,1373 'unit_price': 18, // 单价1374 'restaurant_id': 's10004',1375 'description': '',1376 'month_sales': 723,1377 'rating_count': 65,1378 'tips': '类5',1379 'satisfy_count': 6,1380 'satisfy_rate': 100,1381 'one_food_id': 100044,1382 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1383 }1384 ]1385 },1386 {1387 'description': '',1388 'is_selected': false,1389 'name': '类6',1390 'type_accumulation': 'c8',1391 'foods': [1392 {1393 'name': '类6',1394 'rating': 5,1395 'unit_price': 18, // 单价1396 'restaurant_id': 's10004',1397 'description': '',1398 'month_sales': 723,1399 'rating_count': 65,1400 'tips': '类6',1401 'satisfy_count': 6,1402 'satisfy_rate': 100,1403 'one_food_id': 100045,1404 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1405 }1406 ]1407 },1408 {1409 'description': '',1410 'is_selected': false,1411 'name': '类7',1412 'type_accumulation': 'c9',1413 'foods': [1414 {1415 'name': '类7',1416 'rating': 5,1417 'unit_price': 18, // 单价1418 'restaurant_id': 's10004',1419 'description': '',1420 'month_sales': 723,1421 'rating_count': 65,1422 'tips': '类7',1423 'satisfy_count': 6,1424 'satisfy_rate': 100,1425 'one_food_id': 100046,1426 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1427 }1428 ]1429 },1430 {1431 'description': '',1432 'is_selected': false,1433 'name': '类8',1434 'type_accumulation': 'c10',1435 'foods': [1436 {1437 'name': '类8',1438 'rating': 5,1439 'unit_price': 18, // 单价1440 'restaurant_id': 's10004',1441 'description': '',1442 'month_sales': 723,1443 'rating_count': 65,1444 'tips': '类8',1445 'satisfy_count': 6,1446 'satisfy_rate': 100,1447 'one_food_id': 100047,1448 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1449 }1450 ]1451 }1452 ]1453 },1454 's10005': {1455 'shop_name': '胖哥烧烤(车公庙店)', // 店名1456 'id': 's10005',1457 'shop_rating': 4.6, // 店总评分1458 'service_code': 4.6, // 服务总评分1459 'foods_code': 4.6, // 食物总评分1460 'high_or_low': true, // 低于还是高于周边商家1461 'h_l_percent': 30, // 低于还是高于周边商家的百分比1462 'brand': false, // 是否品牌店1463 'on_time': false, // 准时达1464 'fengniao': false, // 蜂鸟专送1465 'bao': true, // 保1466 'piao': false, // 票1467 'zhun': true, // 准1468 'start_send': 20, // 起送金额1469 'send_cost': 4, // 配送费1470 'distance': 500, // 距离(米)1471 'estimate_time': 10, // 预计用时(分)1472 'notice': '新店开张,优惠大酬宾!', // 店公告1473 'discount': '新用户有巨额优惠!', // 优惠信息1474 'evaluate': [ // 评价详情1475 {1476 'username': 'w******k',1477 'userid': 12344,1478 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',1479 'time': '2017-2-22',1480 'evaluate_code': 1, // 评分1481 'send_time': 30, // 送达时间(分)1482 'evaluate_details': '不怎么好吃'1483 },1484 {1485 'username': 'w******k',1486 'userid': 12344,1487 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',1488 'time': '2017-2-22',1489 'evaluate_code': 3.5,1490 'send_time': 30,1491 'evaluate_details': '很好吃'1492 },1493 {1494 'username': 'w******k',1495 'userid': 12344,1496 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',1497 'time': '2017-2-22',1498 'evaluate_code': 4,1499 'send_time': 30,1500 'evaluate_details': '很好吃'1501 },1502 {1503 'username': 'w******k',1504 'userid': 12344,1505 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',1506 'time': '2017-2-22',1507 'evaluate_code': 3.7,1508 'send_time': 30,1509 'evaluate_details': '很好吃'1510 },1511 {1512 'username': 'w******k',1513 'userid': 12344,1514 'user_img': '8b160883bdbeb19636f0099951b554c4jpeg',1515 'time': '2017-2-22',1516 'evaluate_code': 4,1517 'send_time': 30,1518 'evaluate_details': '很好吃'1519 }1520 ],1521 'commodity': [ // 商品1522 {1523 'description': '大家最爱吃', // 大分类的小tips1524 'is_selected': true,1525 'name': '热销榜', // 大分类名字1526 'type_accumulation': 'c1', // 类型累加1527 'foods': [ // 大分类下单项列表1528 {1529 'name': '羊肉串(10串)', // 商品名1530 'rating': 4.7, // 评分1531 'unit_price': 30, // 单价1532 'restaurant_id': 's10005', // 商店id1533 'description': '', // 介绍1534 'month_sales': 590, // 月销量1535 'rating_count': 91, // 评价数1536 'tips': '具有神秘配方浓郁的香料所散发的绝佳风味,鲜嫩多汁。',1537 'satisfy_count': 8, // 好评数??1538 'satisfy_rate': 95, // 好评率1539 'one_food_id': 10048, // id1540 'image_path': '8b160883bdbeb19636f0099951b554c4jpeg'1541 },1542 {1543 'name': '牛肉串(10串)',1544 'rating': 5,1545 'unit_price': 30, // 单价1546 'restaurant_id': 's10005',1547 'description': '',1548 'month_sales': 723,1549 'rating_count': 65,1550 'tips': '牛肉串(10串)',1551 'satisfy_count': 6,1552 'satisfy_rate': 100,1553 'one_food_id': 100049,1554 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1555 }1556 ]1557 },1558 {1559 'description': '',1560 'is_selected': false,1561 'name': '饮料',1562 'type_accumulation': 'c2',1563 'foods': [1564 {1565 'name': '可乐',1566 'rating': 5,1567 'unit_price': 5, // 单价1568 'restaurant_id': 's10005',1569 'description': '',1570 'month_sales': 723,1571 'rating_count': 65,1572 'tips': '整块无骨鸡腿肉, 浓郁汉堡酱,香脆鲜辣多汁。',1573 'satisfy_count': 6,1574 'satisfy_rate': 100,1575 'one_food_id': 100050,1576 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1577 }1578 ]1579 },1580 {1581 'description': '',1582 'is_selected': false,1583 'name': '类1',1584 'type_accumulation': 'c3',1585 'foods': [1586 {1587 'name': '类1',1588 'rating': 5,1589 'unit_price': 18, // 单价1590 'restaurant_id': 's10005',1591 'description': '',1592 'month_sales': 723,1593 'rating_count': 65,1594 'tips': '类1',1595 'satisfy_count': 6,1596 'satisfy_rate': 100,1597 'one_food_id': 100051,1598 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1599 }1600 ]1601 },1602 {1603 'description': '',1604 'is_selected': false,1605 'name': '类2',1606 'type_accumulation': 'c4',1607 'foods': [1608 {1609 'name': '类2',1610 'rating': 5,1611 'unit_price': 18, // 单价1612 'restaurant_id': 's10005',1613 'description': '',1614 'month_sales': 723,1615 'rating_count': 65,1616 'tips': '类2',1617 'satisfy_count': 6,1618 'satisfy_rate': 100,1619 'one_food_id': 100052,1620 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1621 }1622 ]1623 },1624 {1625 'description': '',1626 'is_selected': false,1627 'name': '类3',1628 'type_accumulation': 'c5',1629 'foods': [1630 {1631 'name': '类3',1632 'rating': 5,1633 'unit_price': 18, // 单价1634 'restaurant_id': 's10005',1635 'description': '',1636 'month_sales': 723,1637 'rating_count': 65,1638 'tips': '类3',1639 'satisfy_count': 6,1640 'satisfy_rate': 100,1641 'one_food_id': 100053,1642 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1643 }1644 ]1645 },1646 {1647 'description': '',1648 'is_selected': false,1649 'name': '类4',1650 'type_accumulation': 'c6',1651 'foods': [1652 {1653 'name': '类4',1654 'rating': 5,1655 'unit_price': 18, // 单价1656 'restaurant_id': 's10005',1657 'description': '',1658 'month_sales': 723,1659 'rating_count': 65,1660 'tips': '类4',1661 'satisfy_count': 6,1662 'satisfy_rate': 100,1663 'one_food_id': 100054,1664 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1665 }1666 ]1667 },1668 {1669 'description': '',1670 'is_selected': false,1671 'name': '类5',1672 'type_accumulation': 'c7',1673 'foods': [1674 {1675 'name': '类5',1676 'rating': 5,1677 'unit_price': 18, // 单价1678 'restaurant_id': 's10005',1679 'description': '',1680 'month_sales': 723,1681 'rating_count': 65,1682 'tips': '类5',1683 'satisfy_count': 6,1684 'satisfy_rate': 100,1685 'one_food_id': 100055,1686 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1687 }1688 ]1689 },1690 {1691 'description': '',1692 'is_selected': false,1693 'name': '类6',1694 'type_accumulation': 'c8',1695 'foods': [1696 {1697 'name': '类6',1698 'rating': 5,1699 'unit_price': 18, // 单价1700 'restaurant_id': 's10005',1701 'description': '',1702 'month_sales': 723,1703 'rating_count': 65,1704 'tips': '类6',1705 'satisfy_count': 6,1706 'satisfy_rate': 100,1707 'one_food_id': 100056,1708 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1709 }1710 ]1711 },1712 {1713 'description': '',1714 'is_selected': false,1715 'name': '类7',1716 'type_accumulation': 'c9',1717 'foods': [1718 {1719 'name': '类7',1720 'rating': 5,1721 'unit_price': 18, // 单价1722 'restaurant_id': 's10005',1723 'description': '',1724 'month_sales': 723,1725 'rating_count': 65,1726 'tips': '类7',1727 'satisfy_count': 6,1728 'satisfy_rate': 100,1729 'one_food_id': 100057,1730 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1731 }1732 ]1733 },1734 {1735 'description': '',1736 'is_selected': false,1737 'name': '类8',1738 'type_accumulation': 'c10',1739 'foods': [1740 {1741 'name': '类8',1742 'rating': 5,1743 'unit_price': 18, // 单价1744 'restaurant_id': 's10005',1745 'description': '',1746 'month_sales': 723,1747 'rating_count': 65,1748 'tips': '类8',1749 'satisfy_count': 6,1750 'satisfy_rate': 100,1751 'one_food_id': 100058,1752 'image_path': '58844415a3cd43e9f0738d51ac915c8fjpeg'1753 }1754 ]1755 }1756 ]1757 }...

Full Screen

Full Screen

uncheckedconversions_test.js

Source:uncheckedconversions_test.js Github

copy

Full Screen

1// Copyright 2013 The Closure Library Authors. All Rights Reserved.2//3// Licensed under the Apache License, Version 2.0 (the "License");4// you may not use this file except in compliance with the License.5// You may obtain a copy of the License at6//7// http://www.apache.org/licenses/LICENSE-2.08//9// Unless required by applicable law or agreed to in writing, software10// distributed under the License is distributed on an "AS-IS" BASIS,11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12// See the License for the specific language governing permissions and13// limitations under the License.14/**15 * @fileoverview Unit tests for goog.html.uncheckedconversions.16 */17goog.provide('goog.html.uncheckedconversionsTest');18goog.require('goog.html.SafeHtml');19goog.require('goog.html.SafeScript');20goog.require('goog.html.SafeStyle');21goog.require('goog.html.SafeStyleSheet');22goog.require('goog.html.SafeUrl');23goog.require('goog.html.TrustedResourceUrl');24goog.require('goog.html.uncheckedconversions');25goog.require('goog.i18n.bidi.Dir');26goog.require('goog.string.Const');27goog.require('goog.testing.jsunit');28goog.setTestOnly('goog.html.uncheckedconversionsTest');29function testSafeHtmlFromStringKnownToSatisfyTypeContract_ok() {30 var html = '<div>irrelevant</div>';31 var safeHtml = goog.html.uncheckedconversions.32 safeHtmlFromStringKnownToSatisfyTypeContract(33 goog.string.Const.from('Test'),34 html,35 goog.i18n.bidi.Dir.LTR);36 assertEquals(html, goog.html.SafeHtml.unwrap(safeHtml));37 assertEquals(goog.i18n.bidi.Dir.LTR, safeHtml.getDirection());38}39function testSafeHtmlFromStringKnownToSatisfyTypeContract_error() {40 assertThrows(function() {41 goog.html.uncheckedconversions.42 safeHtmlFromStringKnownToSatisfyTypeContract(43 goog.string.Const.from(''),44 'irrelevant');45 });46}47function testSafeScriptFromStringKnownToSatisfyTypeContract_ok() {48 var script = 'functionCall(\'irrelevant\');';49 var safeScript = goog.html.uncheckedconversions.50 safeScriptFromStringKnownToSatisfyTypeContract(51 goog.string.Const.from(52 'Safe because value is constant. Security review: b/7685625.'),53 script);54 assertEquals(script, goog.html.SafeScript.unwrap(safeScript));55}56function testSafeScriptFromStringKnownToSatisfyTypeContract_error() {57 assertThrows(function() {58 goog.html.uncheckedconversions.59 safeScriptFromStringKnownToSatisfyTypeContract(60 goog.string.Const.from(''),61 'irrelevant');62 });63}64function testSafeStyleFromStringKnownToSatisfyTypeContract_ok() {65 var style = 'P.special { color:red ; }';66 var safeStyle = goog.html.uncheckedconversions.67 safeStyleFromStringKnownToSatisfyTypeContract(68 goog.string.Const.from(69 'Safe because value is constant. Security review: b/7685625.'),70 style);71 assertEquals(style, goog.html.SafeStyle.unwrap(safeStyle));72}73function testSafeStyleFromStringKnownToSatisfyTypeContract_error() {74 assertThrows(function() {75 goog.html.uncheckedconversions.76 safeStyleFromStringKnownToSatisfyTypeContract(77 goog.string.Const.from(''),78 'irrelevant');79 });80}81function testSafeStyleSheetFromStringKnownToSatisfyTypeContract_ok() {82 var styleSheet = 'P.special { color:red ; }';83 var safeStyleSheet = goog.html.uncheckedconversions.84 safeStyleSheetFromStringKnownToSatisfyTypeContract(85 goog.string.Const.from(86 'Safe because value is constant. Security review: b/7685625.'),87 styleSheet);88 assertEquals(styleSheet, goog.html.SafeStyleSheet.unwrap(safeStyleSheet));89}90function testSafeStyleSheetFromStringKnownToSatisfyTypeContract_error() {91 assertThrows(function() {92 goog.html.uncheckedconversions.93 safeStyleSheetFromStringKnownToSatisfyTypeContract(94 goog.string.Const.from(''),95 'irrelevant');96 });97}98function testSafeUrlFromStringKnownToSatisfyTypeContract_ok() {99 var url = 'http://www.irrelevant.com';100 var safeUrl = goog.html.uncheckedconversions.101 safeUrlFromStringKnownToSatisfyTypeContract(102 goog.string.Const.from(103 'Safe because value is constant. Security review: b/7685625.'),104 url);105 assertEquals(url, goog.html.SafeUrl.unwrap(safeUrl));106}107function testSafeUrlFromStringKnownToSatisfyTypeContract_error() {108 assertThrows(function() {109 goog.html.uncheckedconversions.110 safeUrlFromStringKnownToSatisfyTypeContract(111 goog.string.Const.from(''),112 'http://irrelevant.com');113 });114}115function testTrustedResourceUrlFromStringKnownToSatisfyTypeContract_ok() {116 var url = 'http://www.irrelevant.com';117 var trustedResourceUrl = goog.html.uncheckedconversions.118 trustedResourceUrlFromStringKnownToSatisfyTypeContract(119 goog.string.Const.from(120 'Safe because value is constant. Security review: b/7685625.'),121 url);122 assertEquals(url, goog.html.TrustedResourceUrl.unwrap(trustedResourceUrl));123}124function testTrustedResourceFromStringKnownToSatisfyTypeContract_error() {125 assertThrows(function() {126 goog.html.uncheckedconversions.127 trustedResourceUrlFromStringKnownToSatisfyTypeContract(128 goog.string.Const.from(''),129 'http://irrelevant.com');130 });...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var chai = require('chai');2var chaiHttp = require('chai-http');3var server = require('../server.js');4var should = chai.should();5chai.use(chaiHttp);6describe('GET /', function() {7 it('should return 200', function(done) {8 chai.request(server)9 .get('/')10 .end(function(err, res) {11 res.should.have.status(200);12 done();13 });14 });15});16var express = require('express');17var app = express();18app.get('/', function(req, res) {19 res.status(200).send('Hello World');20});21module.exports = app;

Full Screen

Using AI Code Generation

copy

Full Screen

1var expect = require('chai').expect;2var assert = require('chai').assert;3var add = function(a,b){4 return a+b;5}6var sub = function(a,b){7 return a-b;8}9var mul = function(a,b){10 return a*b;11}12var div = function(a,b){13 return a/b;14}15var square = function(a){16 return a*a;17}18var cube = function(a){19 return a*a*a;20}21describe('Addition',function(){22 it('should return 5 when 2 and 3 are passed',function(){23 expect(add(2,3)).to.equal(5);24 });25});26describe('Subtraction',function(){27 it('should return -1 when 2 and 3 are passed',function(){28 expect(sub(2,3)).to.equal(-1);29 });30});31describe('Multiplication',function(){32 it('should return 6 when 2 and 3 are passed',function(){33 expect(mul(2,3)).to.equal(6);34 });35});36describe('Division',function(){37 it('should return 2 when 6 and 3 are passed',function(){38 expect(div(6,3)).to.equal(2);39 });40});41describe('Square',function(){42 it('should return 4 when 2 is passed',function(){43 expect(square(2)).to.equal(4);44 });45});46describe('Cube',function(){47 it('should return 8 when 2 is passed',function(){48 expect(cube(2)).to.equal(8);49 });50});51var expect = require('chai').expect;52var assert = require('chai').assert;

Full Screen

Using AI Code Generation

copy

Full Screen

1var chai = require('chai');2var expect = chai.expect;3var assert = chai.assert;4var should = chai.should();5chai.use(require('chai-satisfy'));6var myArray = [1, 2, 3, 4, 5];7it('should be an array', function() {8 assert.isArray(myArray, 'myArray is an array');9});10it('should be an array', function() {11 expect(myArray).to.be.an('array');12});13it('should be an array', function() {14 myArray.should.be.an('array');15});16it('should be an array', function() {17 myArray.should.satisfy(function(value) {18 return value.length === 5;19 });20});21it('should be an array', function() {22 myArray.should.satisfy(function(value) {23 return value.length === 5;24 }).and.satisfy(function(value) {25 return value.length > 4;26 });27});28it('should be an array', function() {29 myArray.should.satisfy(function(value) {30 return value.length === 5;31 }).and.satisfy(function(value) {32 return value.length > 4;33 }).and.satisfy(function(value) {34 return value.length < 6;35 });36});37it('should be an array', function() {38 myArray.should.satisfy(function(value) {39 return value.length === 5;40 }).and.satisfy(function(value) {41 return value.length > 4;42 }).and.satisfy(function(value) {43 return value.length < 6;44 }).and.satisfy(function(value) {45 return value.length === 5;46 });47});48it('should be an array', function() {49 myArray.should.satisfy(function(value) {50 return value.length === 5;51 }).and.satisfy(function(value) {52 return value.length > 4;53 }).and.satisfy(function(value) {54 return value.length < 6;55 }).and.satisfy(function(value) {56 return value.length === 5;57 }).and.s

Full Screen

Using AI Code Generation

copy

Full Screen

1var chai = require('chai');2var expect = chai.expect;3var should = chai.should();4var assert = chai.assert;5describe('Test', function() {6 it('should return true', function() {7 expect(true).to.be.true;8 expect(1).to.equal(1);9 expect(1).to.not.equal(2);10 expect(1).to.be.a('number');11 expect('test').to.be.a('string');12 expect({name:'test'}).to.be.an('object');13 expect(null).to.be.a('null');14 expect(undefined).to.be.an('undefined');15 expect([1,2,3]).to.be.an('array');16 expect('test').to.have.lengthOf(4);17 expect([1,2,3]).to.have.lengthOf(3);18 expect({name:'test',age:20}).to.have.property('name');19 expect({name:'test',age:20}).to.have.property('name').equal('test');20 expect({name:'test',age:20}).to.have.property('name').with.lengthOf(4);21 expect([1,2,3]).to.include(2);22 expect('foobar').to.contain('foo');23 expect({name:'test',age:20}).to.have.property('name').that.is.a('string');24 expect('foobar').to.match(/^foo/);25 expect({name:'test',age:20}).to.have.property('age').that.is.within(20, 30);26 expect({name:'test',age:20}).to.have.property('age').that.is.not.within(30, 40);27 expect([1,2,3]).to.have.members([2,1,3]);28 expect([1,2,3]).to.not.have.members([2,1,3,4]);29 expect([1,2,3]).to.include.members([3,2]);30 expect([1,2,3]).to.not.include.members([3,2,4]);31 expect([4,2]).to.have.ordered.members([4,2]);32 expect([5,2]).to.have.ordered.members([5,2]);33 expect([5,2]).to.not.have.ordered.members([5,2,1]);34 expect([5,2]).to.not.have.ordered.members([2,5]);35 expect({name

Full Screen

Using AI Code Generation

copy

Full Screen

1var expect = require('chai').expect;2var assert = require('chai').assert;3var should = require('chai').should();4describe('expect', function() {5 it('should be equal', function() {6 expect(1).to.equal(1);7 });8});9describe('assert', function() {10 it('should be equal', function() {11 assert.equal(1, 1);12 });13});14describe('should', function() {15 it('should be equal', function() {16 1.should.equal(1);17 });18});19describe('expect', function() {20 it('should be equal', function() {21 expect(1).to.equal(1);22 });23});24describe('assert', function() {25 it('should be equal', function() {26 assert.equal(1, 1);27 });28});29describe('should', function() {30 it('should be equal', function() {31 1.should.equal(1);32 });33});34describe('expect', function() {35 it('should be equal', function() {36 expect(1).to.equal(1);37 });38});39describe('assert', function() {40 it('should be equal', function() {41 assert.equal(1, 1);42 });43});44describe('should', function() {45 it('should be equal', function() {46 1.should.equal(1);47 });48});49describe('expect', function() {50 it('should be equal', function() {51 expect(1).to.equal(1);52 });53});54describe('assert', function() {55 it('should be equal', function() {56 assert.equal(1, 1);57 });58});59describe('should', function() {60 it('should be equal', function() {61 1.should.equal(1);62 });63});

Full Screen

Using AI Code Generation

copy

Full Screen

1const chai = require('chai');2var expect = chai.expect;3var should = chai.should();4const chaiHttp = require('chai-http');5chai.use(chaiHttp);6var mocha = require('mocha');7var request = require('supertest');8var app = require('../app');9var assert = require('assert');10describe('GET /', function() {11 it('respond with hello world', function(done) {12 request(app).get('/').expect('hello world', done);13 });14});15describe('GET /', function() {16 it('respond with hello world', function(done) {17 request(app).get('/').expect('hello world', done);18 });19});20describe('GET /', function() {21 it('respond with hello world', function(done) {22 request(app).get('/').expect('hello world', done);23 });24});25describe('GET /', function() {26 it('respond with hello world', function(done) {27 request(app).get('/').expect('hello world', done);28 });29});30describe('GET /', function() {31 it('respond with hello world', function(done) {32 request(app).get('/').expect('hello world', done);33 });34});35describe('GET /', function() {36 it('respond with hello world', function(done) {37 request(app).get('/').expect('hello world', done);38 });39});40describe('GET /', function() {41 it('respond with hello world', function(done) {42 request(app).get('/').expect('hello world', done);43 });44});45describe('GET /', function() {46 it('respond with hello world', function(done) {

Full Screen

Using AI Code Generation

copy

Full Screen

1const chai = require('chai');2const expect = chai.expect;3const assert = chai.assert;4const should = chai.should();5describe('Test using Mocha and Chai', () => {6 it('should return true', () => {7 expect(true).to.be.true;8 });9 it('should return false', () => {10 expect(false).to.be.false;11 });12});13const chai = require('chai');14const expect = chai.expect;15const assert = chai.assert;16const should = chai.should();17describe('Test using Mocha and Chai', () => {18 it('should return true', () => {19 assert.equal(true, true);20 });21 it('should return false', () => {22 assert.equal(false, false);23 });24});25const chai = require('chai');26const expect = chai.expect;27const assert = chai.assert;28const should = chai.should();29describe('Test using Mocha and Chai', () => {30 it('should return true', () => {31 true.should.be.true;32 });33 it('should return false', () => {34 false.should.be.false;35 });36});37const chai = require('chai');38const expect = chai.expect;39const assert = chai.assert;40const should = chai.should();41describe('Test using Mocha and Chai', () => {42 it('should return true', () => {43 expect([1, 2, 3]).to.deep.equal([1, 2, 3]);44 });45 it('should return false', () => {46 expect([1, 2, 3]).to.not.deep.equal([1, 2, 4]);47 });48});49const chai = require('chai');50const expect = chai.expect;51const assert = chai.assert;52const should = chai.should();53describe('Test using Mocha and Chai', () => {54 it('should return true', () => {55 assert.equal([1, 2, 3], [1, 2, 3]);56 });57 it('should return false', () => {58 assert.notEqual([1, 2,

Full Screen

Using AI Code Generation

copy

Full Screen

1var chai = require('chai');2var expect = chai.expect;3var should = chai.should();4var myApp = require('../app/library.js');5describe("Leap Year test ", function() {6 describe("Case for year 1700", function() {7 it("should return `false` for 1700", function() {8 expect(myApp.isLeapYear(1700)).to.be.false;9 });10 });11 describe("Case for year 1800", function() {12 it("should return `false` for 1800", function() {13 expect(myApp.isLeapYear(1800)).to.be.false;14 });15 });16 describe("Case for year 100", function() {17 it("should return `false` for 100", function() {18 expect(myApp.isLeapYear(100)).to.be.false;19 });20 });21 describe("Case for year 2000", function() {22 it("should return `true` for 2000", function() {23 expect(myApp.isLeapYear(2000)).to.be.true;24 });25 });26 describe("Case for year 2020", function() {27 it("should return `true` for 2020", function() {28 expect(myApp.isLeapYear(2020)).to.be.true;29 });30 });31 describe("Case for year 2016", function() {32 it("should return `true` for 2016", function() {33 expect(myApp.isLeapYear(2016)).to.be.true;34 });35 });36 describe("Case for year 2015", function() {37 it("should return `false` for 2015", function() {38 expect(myApp.isLeapYear(2015)).to.be.false;39 });40 });41 describe("Case for year 2012", function() {42 it("should return `true` for 2012", function() {43 expect(myApp.isLeapYear(2012)).to.be.true;44 });45 });46 describe("Case for year 2100", function() {47 it("should return `false` for 2100", function() {48 expect(myApp.isLeapYear(2100)).to.be.false;49 });50 });51 describe("Case for year 2400", function() {52 it("should return `true` for 2400",

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run chai automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful