| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469 | 
							- <!DOCTYPE html>
 
- <html>
 
- <head>
 
-     <meta charset="utf-8">
 
-     <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
 
-     <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
 
-     <title></title>
 
-     <link rel="stylesheet" type="text/css" href="../../css/api.css" />
 
-     <link rel="stylesheet" type="text/css" href="../../css/iconfont.css" />
 
-     <link rel="stylesheet" type="text/css" href="../../css/weui.min.css" />
 
-     <link rel="stylesheet" type="text/css" href="../../css/example.css" />
 
-     <link rel="stylesheet" type="text/css" href="../../css/style.css?v=1.2" />
 
-     <style>
 
-         body {
 
-             background: #f2f2f2;
 
-         }
 
-     	.msg-list{
 
-            height: 100%
 
-     	}
 
-         .bgf2{
 
-             background: #f2f2f2;
 
-             height: auto;
 
-             padding-bottom: 1rem;
 
-         }
 
-     	.msg-cent-list{
 
-     	   /*width: 100%;*/
 
-     	   /*height: 2.4rem;*/
 
-     	   background: #ffffff;
 
-     	   border-radius: 0.1rem;
 
-     	   padding: 0.3rem;
 
-     	   box-sizing: border-box;
 
-     	   position: relative;
 
-            /*box-shadow: darkgrey 0.1rem 0.1rem 0.3rem 0.05rem;*/
 
-     	}
 
-         .msg-cent-right-title {
 
-             font-size: 0.3rem;
 
-             color: #333;
 
-         }
 
-         .msg-cent-list ul {
 
-             width: 100%;
 
-             display: inline-block;
 
-         }
 
-     	.msg-cent-list li{
 
-     	  float: left;
 
-           width: 100%;
 
-     	}
 
-     	.msg-cent-right-dtl{
 
-     	  font-size: 0.26rem;
 
-           color: #999;
 
-     	}
 
-     	.msg-time{
 
-     	  color: #bbb;
 
-     	  width: 100%;
 
-     	  text-align:center;
 
-     	  padding: 0.3rem 0;
 
-           /*font-size: 0.22rem;*/
 
-     	}
 
-     	.member-avatar{
 
-     	  width: 0.3rem;
 
-     	  height: 0.3rem;
 
-     	  border-radius:50%;
 
-     	  vertical-align:middle;
 
-           margin-bottom: 0.05rem;
 
-     	}
 
-         button.el-button {
 
-             background: #f2f2f2;
 
-             margin-left: 0.2rem;
 
-         }
 
-     	button.el-button, .feed-btn,.tel-btn{
 
-     	  float:right;
 
-           font-size: 0.24rem;
 
-         }
 
-         .el-button.is-round {
 
-             border-radius: 0.5rem;
 
-             margin-top: -0.1rem;
 
-         }
 
-         .is_read div {
 
-             color: #999;
 
-         }
 
-         .weui-loadmore_line .weui-loadmore__tips {
 
-             background-color: rgba(0, 0, 0, 0)
 
-         }
 
-         .weui-media-box__info__meta img {
 
-             border-radius: 0.25rem;width: 0.35rem;vertical-align: middle;margin-right: 0.2rem;
 
-         }
 
-         .weui-media-box_appmsg .weui-media-box__thumb {
 
-             border-radius: 0.2em;
 
-         }
 
-         .page__hd {
 
-             padding: 0.2rem;
 
-         }
 
-         .page__bd .msg-cent-list {
 
-             margin: 0 0.32rem;
 
-         }
 
-         .page__desc, .page__title {
 
-             text-align: center;
 
-         }
 
-         a.weui-media-box:active {
 
-             background-color: #ffffff;
 
-         }
 
-         .weui-media-box__info a.weui-btn_mini {
 
-             position: absolute;
 
-             float: right;
 
-             right: 0.2rem;
 
-             margin-top: -0.7rem;
 
-         }
 
-         .page__bd .weui-media-box__desc {
 
-             -webkit-line-clamp: 3;
 
-             color: #666;
 
-         }
 
-         .weui-media-box__info__meta {
 
-             color: #999;
 
-         }
 
-         .hotel_credit {
 
-             font-size: 0.47rem;
 
-             position: absolute;
 
-             margin-top: -0.2rem;
 
-             color: #000000;
 
-             font-family: Medium;
 
-             font-weight: 500;
 
-         }
 
-         .home-hotel-title {
 
-             font-size: 0.27rem;
 
-             overflow: hidden;
 
-             white-space: nowrap;
 
-             text-overflow: ellipsis;
 
-             color: #000;
 
-             font-weight: 700;
 
-         }
 
-         .hotel_list {
 
-             padding: 0.32rem;
 
-             background-color: #fff;
 
-         }
 
-     </style>
 
-     <script>
 
-     (function(w, d, m) {
 
-         function r() {
 
-             var t = 100,
 
-                 o = 750,
 
-                 e = d.documentElement.clientWidth || w.innerWidth,
 
-                 n = m.max(m.min(e, 480), 320),
 
-                 h = 50;
 
-             320 >= n && (h = m.floor(n / o * t * .99)),
 
-                 n > 320 && 362 >= n && (h = m.floor(n / o * t * 1)),
 
-                 n > 362 && 375 >= n && (h = m.floor(n / o * t * 1)),
 
-                 n > 375 && (h = m.floor(n / o * t * .97)),
 
-                 d.querySelector("html").style.fontSize = h + "px"
 
-         };
 
-         r();
 
-         w.onresize = function() {
 
-             r()
 
-         }
 
-     })(window, document, Math);
 
-     </script>
 
- </head>
 
- <body>
 
-     <div class="topbar"></div>
 
-     <section style="background:#ffffff;">
 
-         <header class="back-header">
 
-             <ul>
 
-                 <li class="padding-20 back-btn"><img class="back-header-ico" src="../../image/nav_button_back_default.png" /></li>
 
-                 <li class="back-header-title" id="header-title">首 页</li>
 
-                 <li class="more-btn"></li>
 
-             </ul>
 
-         </header>
 
-     </section>
 
-     <section class="msg-list padding-top page panel js_show">
 
-         <div class="page__hd mask-hidden" style="text-align: center;">
 
-             <p class="page__desc">我管辖的酒店</p>
 
-             <h1 class="page__title">500家</h1>
 
-         </div>
 
-         <div class="weui-search-bar mask-hidden" id="searchBar">
 
-             <form class="weui-search-bar__form" onsubmit="return false;">
 
-                 <div class="weui-search-bar__box">
 
-                     <i class="weui-icon-search"></i>
 
-                     <input type="search" class="weui-search-bar__input" id="searchInput" placeholder="搜索" />
 
-                     <a href="javascript:" class="weui-icon-clear" id="searchClear"></a>
 
-                 </div>
 
-                 <label class="weui-search-bar__label" id="searchText" style="transform-origin: 0px 0px; opacity: 1; transform: scale(1, 1);">
 
-                     <i class="weui-icon-search"></i>
 
-                     <span>搜索</span>
 
-                 </label>
 
-             </form>
 
-             <a href="javascript:" class="weui-search-bar__cancel-btn" id="searchCancel">取消</a>
 
-         </div>
 
-         <div class="page__bd" id="list_all"></div>
 
-         <div class="page__ft">
 
-             <a href="#" class="mask-hidden">@QZaiwang.com</a>
 
-         </div>
 
-     </section>
 
- </body>
 
- <script type="text/javascript" src="../../script/api.js"></script>
 
- <script type="text/javascript" src="../../script/jquery.min.js"></script>
 
- <script type="text/javascript" src="../../script/jquery.tap.js"></script>
 
- <script type="text/javascript">
 
- var _tag = 'replenishment';
 
- var _page = '1';
 
- var _keyword = '0';
 
- apiready = function() {
 
-     _tag = api.pageParam.type;
 
-     setFixStatusBar();
 
-     getRouteData();
 
-     api.addEventListener({
 
-         name: 'scrolltobottom'
 
-     }, function(ret, err) {
 
-         _page = '1'; 
 
-         getRouteData();
 
-     });
 
-     api.addEventListener({
 
-         name: 'resume'
 
-     }, function(ret, err) {
 
-         getRouteData();
 
-     });
 
- };
 
- function getRouteData(_keywordx, _pagex) {
 
-     if (_pagex == 1) {
 
-         _page = '1';
 
-     }
 
-     if ( !_page ) {
 
-         return false;
 
-     }
 
-     var _data = { page: _page };
 
-     if ( _keywordx != 0 ) {
 
-         _data = {keyword: _keywordx, page: _page};
 
-     }
 
-     if ( _tag == 'hotel' ) {
 
-         _tag = 'store';
 
-     }
 
-     $.ajax({
 
-         url: siteurl + 'v1/agent/'+ _tag +'List',
 
-         data: _data,
 
-         headers: { "X-TOKEN": $api.getStorage("accesstoken") },
 
-         dataType: 'json',
 
-         type: 'post',
 
-         success: function(datas) {
 
-             if (datas.result) {
 
-                 if (datas.data.list.length > 0) {
 
-                     var _html = '';
 
-                     $.each(datas.data.list, function (index, item) {
 
-                         switch (_tag) {
 
-                             case 'post':
 
-                                 $("#header-title").html('平台公告');
 
-                                 _html += '<div class="weui-panel"><div class="weui-panel__bd"><a href="javascript:post_Info('+item.article_id+');" class="weui-media-box weui-media-box_text"><h4 class="weui-media-box__title">'+item.article_title+'</h4><p class="weui-media-box__desc">'+item.article_desc+'</p><ul class="weui-media-box__info"><li class="weui-media-box__info__meta">'+item.article_time+'</li></ul></a></div></div>';
 
-                                 break;
 
-                             case 'urge':
 
-                                 $("#header-title").html('催单消息');
 
-                                 // _html += '<div class="weui-panel"><div class="weui-panel__bd"><div class="weui-media-box weui-media-box_text"><h4 class="weui-media-box__title">'+item.am_title+'</h4><p class="weui-media-box__desc">'+item.am_extra.content+'</p><p class="weui-media-box__desc">订单号 '+item.am_extra.order_sn+'</p><ul class="weui-media-box__info"><li class="weui-media-box__info__meta"><img src="'+item.am_extra.member_avatar+'">'+item.am_extra.name+'</li><li class="weui-media-box__info__meta">时间</li><li class="weui-media-box__info__meta weui-media-box__info__meta_extra">'+item.am_create_time+'</li><li><a href="javascript:urge_tel('+item.am_extra.store_phone+');" class="weui-btn weui-btn_mini weui-btn_primary">联系酒店</a></li></ul></div></div></div>';
 
-                                 _html += '<div class="msg-time" keyid="' + item.am_target_id + '">' + item.am_create_time + '</div>';
 
-                                 if (item.am_is_read == 0) {
 
-                                     _html += '<div class="msg-cent-list" keyid="' + item.am_target_id + '" tag="' + item.types + '"><ul>';
 
-                                 }else{
 
-                                     _html += '<div class="msg-cent-list is_read" keyid="' + item.am_target_id + '" tag="' + item.types + '"><ul>';
 
-                                 }
 
-                                 _html += '<li class="msg-cent-right"><div class="msg-cent-right-title">' + item.am_title + '</div>';
 
-                                 _html += '<div class="h50"></div>';
 
-                                 _html += '<div class="msg-cent-right-dtl">订单号:' + item.am_extra.order_sn + ' </div>';
 
-                                 _html += '<div class="msg-cent-right-dtl" style="padding-top: 0.1rem;">' + item.am_extra.content + '</div>';
 
-                                 _html += '<div class="h50"></div>';
 
-                                 _html += '<div style="font-size: 0.24rem;"><img src="'+siteurl+'uploads/home/store/'+item.am_extra.store_id+'/'+ item.am_extra.store_avatar + '" class="member-avatar" /> ' + item.am_extra.store_name + '<button type="button" class="el-button el-button--default is-round"><span class="tel-btn" tel="' + item.am_extra.store_phone + '">致电</span></button></div>';
 
-                                 _html += ' </li></ul></div>';
 
-                                 break;
 
-                             case 'replenishment':
 
-                                 $("#header-title").html('补货申请');
 
-                                 // _html += '<div class="weui-panel"><div class="weui-panel__bd"><div class="weui-media-box weui-media-box_text"><h4 class="weui-media-box__title">'+item.am_title+'</h4><p class="weui-media-box__desc">'+item.am_extra.content+'</p><ul class="weui-media-box__info"><li class="weui-media-box__info__meta">'+item.am_extra.store_name+'</li><li class="weui-media-box__info__meta">时间</li><li class="weui-media-box__info__meta weui-media-box__info__meta_extra">'+item.am_create_time+'</li><li><a href="javascript:urge_tel('+item.am_extra.store_phone+');" class="weui-btn weui-btn_mini weui-btn_primary">联系酒店</a></li></ul></div></div></div>';
 
-                                 _html += '<div class="msg-time" keyid="' + item.am_target_id + '">' + item.am_create_time + '</div>';
 
-                                 if (item.am_is_read == 0) {
 
-                                     _html += '<div class="msg-cent-list" keyid="' + item.am_target_id + '" tag="' + item.types + '"><ul>';
 
-                                 }else{
 
-                                     _html += '<div class="msg-cent-list is_read" keyid="' + item.am_target_id + '" tag="' + item.types + '"><ul>';
 
-                                 }
 
-                                 _html += '<li class="msg-cent-right"><div class="msg-cent-right-title">' + item.am_extra.store_name + '酒店发来一条补货申请</div>';
 
-                                 _html += '<div class="h50"></div>';
 
-                                 // _html += '<div class="msg-cent-right-dtl">订单号:' + item.am_extra.order_sn + ' </div>';
 
-                                 _html += '<div class="msg-cent-right-dtl" style="padding-top: 0.1rem;">' + item.am_extra.content + '</div>';
 
-                                 _html += '<div class="h50"></div>';
 
-                                 _html += '<div style="font-size: 0.24rem;"><img src="'+siteurl+'uploads/home/store/'+item.am_extra.store_id+'/' + item.am_extra.store_avatar + '" class="member-avatar" /> ' + item.am_extra.store_name + '<button type="button" class="el-button el-button--default is-round"><span class="tel-btn" tel="' + item.am_extra.store_phone + '">致电</span></button></div>';
 
-                                 _html += ' </li></ul></div>';
 
-                                 break;
 
-                             case 'store':
 
-                                 if ( _keywordx ) {
 
-                                     // get_bill();
 
-                                 }else{
 
-                                     $("#header-title").html('我的酒店');
 
-                                     $(".page__title").html( datas.data.list.length +' 家');
 
-                                 }
 
-                                 $(".page__hd").removeClass("mask-hidden");
 
-                                 $("#searchBar").removeClass("mask-hidden");
 
-                                 $("#list_all").addClass("hotel_list");
 
-                                 // _html += '<div class="weui-panel weui-panel_access"><div class="weui-panel__bd"><a href="javascript:store_info('+item.store_id+');" class="weui-media-box weui-media-box_appmsg"><div class="weui-media-box__hd"><img class="weui-media-box__thumb" src="'+siteurl+'uploads/home/store/'+item.store_id+'/'+item.store_avatar+'" alt=""></div><div class="weui-media-box__bd"><h4 class="weui-media-box__title">'+item.store_name+'</h4><p class="weui-media-box__desc">'+item.store_address+'</p></div></a></div></div>';
 
-                                 _html += '<div class="home-hotel-list" keyid="' + item.store_id + '"><div class="home-hotel-left"><img src="'+siteurl+'uploads/home/store/'+item.store_id+'/'+item.store_avatar+'"/></div>';
 
-                                 _html += '<div class="home-hotel-right"><div class="home-hotel-title">' + item.store_name + '</div>';
 
-                                 _html += '<div class="home-hotel-dtl"><ul><li style="width:40%"><div class="hotel_credit my-rating">'+intToFloat(item.store_servicecredit)+'</div></li>';
 
-                                 _html += '<li style="text-align:center;"> 月访客' + item.store_visitor + '</li><li style="float:right;"></li>';
 
-                                 _html += '</ul></div>';
 
-                                 _html += '<div class="home-hotel-dsc"></div></div></div>';
 
-                                 break;
 
-                         }
 
-                     });
 
-                     if ( _page == 1 || _keywordx ) {
 
-                         $(".page__bd").html(_html);
 
-                     } else {
 
-                         $(".page__bd").append(_html);
 
-                     }
 
-                     _page++;
 
-                 } else {
 
-                     if ( _page == 1 ) {
 
-                         $(".page__bd").html('<div class="weui-loadmore weui-loadmore_line"><span class="weui-loadmore__tips">暂无数据</span></div>');
 
-                     } else {
 
-                         $(".page__bd").append('<div class="weui-loadmore weui-loadmore_line"><span class="weui-loadmore__tips">暂无数据</span></div>');
 
-                     }
 
-                     _page = false;
 
-                 }
 
-             } else {
 
-                 errcode(datas, datas.code);
 
-             }
 
-         }
 
-     });
 
- }
 
- function urge_tel(key) {
 
-     if (!key) {
 
-         api.toast({ msg: '号码不能为空' });
 
-         return false;
 
-     }
 
-     api.call({
 
-         type: 'tel_prompt',
 
-         number: key
 
-     });
 
-     return false;
 
- }
 
- function intToFloat(val) {
 
-     // body...
 
-     return new Number(val).toFixed(1);
 
- }
 
- $(".page__bd").on("tap", ".tel-btn", function() {
 
-     var _tel = $(this).attr("tel");
 
-     console.log(_tel)
 
-     if (!_tel) {
 
-         api.toast({ msg: '号码不能为空' });
 
-         return false;
 
-     }
 
-     api.call({
 
-         type: 'tel_prompt',
 
-         number: _tel
 
-     });
 
-     return false;
 
- })
 
- function post_Info(key) {
 
-     api.openWin({
 
-         name: 'showhotel',
 
-         url: '../find/finddetails.html',
 
-         bounces: false,
 
-         pageParam: {
 
-             keyid: key
 
-         }
 
-     });
 
-     return false;
 
- }
 
- $("#list_all").on("tap", ".home-hotel-list", function() {
 
-     var _key = $(this).attr("keyid");
 
-     api.openWin({
 
-         name: 'showhotel',
 
-         url: '../home/showhotel.html',
 
-         bounces: false,
 
-         pageParam: {
 
-             keyid: _key
 
-         }
 
-     });
 
-     return false;
 
- });
 
- function store_info(key) {
 
-     api.openWin({
 
-         name: 'showhotel',
 
-         url: '../home/showhotel.html',
 
-         bounces: false,
 
-         pageParam: {
 
-             keyid: key
 
-         }
 
-     });
 
-     return false;
 
- }
 
- function get_bill() {
 
-     $.ajax({
 
-         url: siteurl + 'v1/agent/bill',
 
-         data: {},
 
-         headers: { "X-TOKEN": $api.getStorage("accesstoken") },
 
-         dataType: 'json',
 
-         type: 'post',
 
-         success: function(datas) {
 
-             if (datas.result) {
 
-                 // $(".page__title").html(datas.data.store_count+' 家');
 
-             } else {
 
-                 errcode(datas, datas.code);
 
-             }
 
-         }
 
-     })
 
- }
 
- $(".msg-list").on("tap", ".js_category", function() {
 
-     var tag = $(this).attr("id");
 
-     api.openWin({
 
-         name: 'list',
 
-         url: 'x.html',
 
-         bounces: false,
 
-         pageParam: {
 
-             agentid: _agentid,
 
-             type: tag
 
-         }
 
-     })
 
-     return false;
 
- });
 
- $(function(){
 
-         var $searchBar = $('#searchBar'),
 
-             $searchResult = $('#searchResult'),
 
-             $searchText = $('#searchText'),
 
-             $searchInput = $('#searchInput'),
 
-             $searchClear = $('#searchClear'),
 
-             $searchCancel = $('#searchCancel');
 
-         function hideSearchResult(){
 
-             $searchResult.hide();
 
-             $searchInput.val('');
 
-             getRouteData('0', '1');
 
-         }
 
-         function cancelSearch(){
 
-             hideSearchResult();
 
-             $searchBar.removeClass('weui-search-bar_focusing');
 
-             $searchText.show();
 
-         }
 
-         $searchText.on('click', function(){
 
-             $searchBar.addClass('weui-search-bar_focusing');
 
-             $searchInput.focus();
 
-         });
 
-         $searchInput
 
-             .on('blur', function () {
 
-                 if(!this.value.length) cancelSearch();
 
-             })
 
-             .on('input', function(){
 
-                 if(this.value.length) {
 
-                     $searchResult.show();
 
-                     getRouteData(this.value, '1');
 
-                 } else {
 
-                     $searchResult.hide();
 
-                 }
 
-             });
 
-         $searchClear.on('click', function(){
 
-             hideSearchResult();
 
-             $searchInput.focus();
 
-         });
 
-         $searchCancel.on('click', function(){
 
-             cancelSearch();
 
-             $searchInput.blur();
 
-         });
 
-     });
 
- </script>
 
- </html>
 
 
  |