| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275 | 
							- <!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/style.css" />
 
-     <style>
 
-         #header { height: 0.9rem; }
 
-         header{ background-color: #f2f2f2; }
 
-         header ul li { height: 1rem; line-height: 1rem; text-align: center; display: none; color: #323237; position: relative;font-size: 0.28rem;  }
 
-         header ul li.active{ display: block; }
 
-         #footer ul li.active{ color: #D9251C; }
 
-         #footer ul li:nth-child(1){ background-image: url(./image/bottombtn0101.png); }
 
-         #footer ul li:nth-child(2){ background-image: url(./image/bottombtn0201.png); }
 
-         #footer ul li:nth-child(3){ background-image: url(./image/bottombtn0301.png); }
 
-         #footer ul li:nth-child(4){ background-image: url(./image/bottombtn0401.png); }
 
-         #footer ul li:nth-child(1).active{ background-image: url(./image/bottombtn0102.png); }
 
-         #footer ul li:nth-child(2).active{ background-image: url(./image/bottombtn0202.png); }
 
-         #footer ul li:nth-child(3).active{ background-image: url(./image/bottombtn0302.png); }
 
-         #footer ul li:nth-child(4).active{ background-image: url(./image/bottombtn0402.png); }
 
-         .flex-con{
 
-             overflow: auto
 
-         }
 
-     </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>
 
-     <div id="wrap" class="flex-wrap flex-vertical">
 
-         <header style="display: none;">
 
-             <ul>
 
-                 <li class="border-b active"></li>
 
-                 <li class="border-b"></li>
 
-                 <li class="border-b"></li>
 
-                 <li class="border-b"></li>
 
-             </ul>
 
-         </header>
 
-         <div id="main" class="flex-con">
 
-         </div>
 
-         <div id="footer" class="border-t">
 
-             <ul class="flex-wrap">
 
-                 <li tapmode="hover" onclick="randomSwitchBtn( this );" class="flex-con active">首页</li>
 
-                 <li tapmode="hover" onclick="randomSwitchBtn( this );" class="flex-con">发现</li>
 
-                 <li tapmode="hover" onclick="randomSwitchBtn( this );" class="flex-con">订单</li>
 
-                 <li tapmode="hover" onclick="randomSwitchBtn( this );" class="flex-con">我的</li>
 
-             </ul>
 
-         </div>
 
-     </div>
 
- </body>
 
- </html>
 
- <script type="text/javascript" src="./script/api.js"></script>
 
- <script type="text/javascript">
 
- var _adv_type = '0';
 
- var _adv_goods_id = '0';
 
- var _adv_store_id = '0';
 
- var _adv_article_id = '0';
 
- var _webinkeyid = '0';
 
- var _webinstoreid = '0';
 
- apiready = function() {
 
- 	var $header = $api.byId('footer');
 
- 	$api.fixTabBar($header);
 
-     _webinkeyid = api.pageParam.keyid;
 
-     _webinstoreid = api.pageParam.storeid;
 
-     _adv_type = api.pageParam.advtype;
 
-     _adv_goods_id = api.pageParam.advgoodsid;
 
-     _adv_store_id = api.pageParam.advstoreid;
 
-     _adv_article_id = api.pageParam.advarticleid;
 
-     api.setStatusBarStyle({
 
-         style: 'dark',
 
-         color: '#ffffff'
 
-     });
 
-     // alert(JSON.stringify(_adv_type+'_'+_adv_goods_id+'_'+_adv_store_id+'_'+_adv_article_id));
 
-     funIniGroup();
 
-     // get_adv();
 
-     setBackDisable();
 
-     api.addEventListener({ name: 'appintent' }, function(ret, err) { //anz noticeclicked
 
-         // alert(JSON.stringify(ret));
 
-         /*api.openWin({
 
-                    name: 'msglist',
 
-                    url: 'html/home/msglist.html',
 
-                    bounces: false
 
-                });*/
 
-     })
 
-     api.removeEventListener({
 
-         name: 'noticeclicked'
 
-     });
 
- }
 
- function funIniGroup() {
 
-     var eHeaderLis = $api.domAll('header li'),
 
-         frames = [];
 
-     for (var i = 0, len = eHeaderLis.length; i < len; i++) {
 
-         frames.push({
 
-             name: 'frame' + i,
 
-             url: './html/frame' + i + '.html',
 
-             bgColor: 'rgba(0,0,0,.2)',
 
-             bounces: false,
 
-             vScrollBarEnabled: false,
 
-             hScrollBarEnabled: false,
 
-             slidBackEnabled: false,
 
-             pageParam: {
 
-                 advtype: _adv_type,
 
-                 advgoodsid: _adv_goods_id,
 
-                 advstoreid: _adv_store_id,
 
-                 advarticleid: _adv_article_id
 
-             }
 
-         })
 
-     }
 
-     api.openFrameGroup({
 
-         name: 'group',
 
-         scrollEnabled: false,
 
-         rect: {
 
-             x: 0,
 
-             y: $api.dom('header').offsetHeight,
 
-             w: 'auto',//api.winWidth,
 
-             h: 'auto'//$api.dom('#main').offsetHeight
 
-         },
 
-         index: 0,
 
-         frames: frames
 
-     }, function(ret, err) {
 
-         api.setFrameAttr({
 
-             name: 'frame0'
 
-         });
 
-     });
 
- }
 
- function set_height() {
 
-     api.setFrameGroupAttr({
 
-         name: 'group',
 
-         rect: {
 
-             x: 0,
 
-             y: $api.dom('header').offsetHeight,
 
-             w: api.winWidth,
 
-             h: $api.dom('#main').offsetHeight
 
-         }
 
-     })
 
- }
 
- function get_adv() {
 
-     // 
 
-     $.ajax({
 
-         url: siteurl + 'v1/entry/poster',
 
-         data: {},
 
-         headers: { "X-TOKEN": $api.getStorage("accesstoken") },
 
-         dataType: 'json',
 
-         type: 'post',
 
-         success: function(datas) {
 
-             if (datas.result) {
 
-                 if (datas.data.enable == 1) {
 
-                     switch  (datas.data.target.type) {
 
-                         case 'point':
 
-                             gallery_adv(siteurl + 'uploads/home/adv/' + datas.data.images, 'to_point');
 
-                             break;
 
-                         case 'goods':
 
-                             gallery_adv(siteurl + 'uploads/home/adv/' + datas.data.images, 'to_goods_id', datas.data.target.goods_id, datas.data.target.store_id);
 
-                             break;
 
-                         case 'store':
 
-                             gallery_adv(siteurl + 'uploads/home/adv/' + datas.data.images, 'to_store_id', datas.data.target.store_id);
 
-                             break;
 
-                         case 'article':
 
-                             gallery_adv(siteurl + 'uploads/home/adv/' + datas.data.images, 'to_article_id', datas.data.target.article_id);
 
-                             break;
 
-                     }
 
-                 }
 
-             } else {
 
-                 errcode(datas, datas.code);
 
-             }
 
-         }
 
-     })
 
- }
 
- function to_point() {
 
-     // body...
 
-     api.openWin({
 
-         name: 'points',
 
-         url: './html/my/points.html',
 
-         bounces: false
 
-     });
 
-     $('.weui-gallery').hide();
 
-     return false;
 
- }
 
- function to_article_id(_adv_article_id) {
 
-     // body...
 
-     api.openWin({
 
-         name: 'finddetails',
 
-         url: './html/find/finddetails.html',
 
-         bounces: false,
 
-         pageParam: {
 
-             keyid: _adv_article_id
 
-         }
 
-     });
 
-     $('.weui-gallery').hide();
 
-     return false;
 
- }
 
- function to_goods_id(_adv_goods_id, _storeid) {
 
-     // body...
 
-     api.openWin({
 
-         name: 'showgoods',
 
-         url: './html/home/showgoods.html',
 
-         bounces: false,
 
-         pageParam: {
 
-             keyid: _adv_goods_id,
 
-             storeid: _storeid
 
-         }
 
-     });
 
-     $('.weui-gallery').hide();
 
-     return false;
 
- }
 
- function to_store_id(_adv_store_id) {
 
-     // body...
 
-     api.openWin({
 
-         name: 'hoteldtl',
 
-         url: './html/home/hoteldtl.html',
 
-         bounces: false,
 
-         pageParam: {
 
-             keyid: _adv_store_id
 
-         }
 
-     });
 
-     $('.weui-gallery').hide();
 
-     return false;
 
- }
 
- // 随意切换按钮
 
- function randomSwitchBtn(tag) {
 
-     if (tag == $api.dom('#footer li.active')) return;
 
-     var eFootLis = $api.domAll('#footer li'),
 
-         eHeaderLis = $api.domAll('header li'),
 
-         index = 0;
 
-     for (var i = 0, len = eFootLis.length; i < len; i++) {
 
-         if (tag == eFootLis[i]) {
 
-             index = i;
 
-         } else {
 
-             $api.removeCls(eFootLis[i], 'active');
 
-             $api.removeCls(eHeaderLis[i], 'active');
 
-         }
 
-     }
 
-     $api.addCls(eFootLis[index], 'active');
 
-     $api.addCls(eHeaderLis[index], 'active');
 
-     api.setFrameGroupIndex({
 
-         name: 'group',
 
-         index: index,
 
- 		
 
-     });
 
- }
 
- </script>
 
 
  |