




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Index页面第一步:新建index页面利用自定义模板建立空白页面第二步:将该页底部栏等所需图片放入images文件夹。第三步:在对应文件中加入自定义类1、在ui-color.css文件中加入以下代码.bc-red1{background-color:#c92440;}.bc-text-gra2{color:#cdcdcd!important;}.bc-gra1{background-color:#eeeeee;}2、在ui-base.css文件中加入以下代码:.uinn6-d{margin:0.45em0;}.foot-umh{height:2.75em;}3、在appcan.icon.css文件中加入以下代码:.res12{background-image:url('images/search.png');height:1.3em;}.res11{background-image:url('images/saomiao.png');}4、在my_style.css文件中加入以下代码:.b-gra-f{border-top:1pxsolid#c92440;}.uh3{ height:3em;}.uw2{ width:1.25em;}.uh2{ height:1.25em;}第四步:引入相关文件在head中引入:<linkrel="stylesheet"href="css/aboutform.css"><linkrel="stylesheet"href="css/my-style.css"><linkrel="stylesheet"href="css/new-file.css">将main.js和common.js引入到js文件夹下,并在页面script中加入以下代码:<scriptsrc="js/main.js"></script><scriptsrc="js/common.js"></script><scriptsrc="js/appcan.tab.js"></script><scriptsrc="js/appcan.mbaas.js"></script>第五步:HTML代码1、页面布局框架<divid="page_0"class="upuofubub-ver"tabindex="0"><divid="header"class="uofuhbc-red1bc-text-headubub-acub-pc"><!--Header部分--></div><!--Header2选项卡--><divid="content"class="ub-f1tx-lbc-textsc-bg"></div><divid="footer"class="b-gra-fbc-gra1foot-umh"> <divclass="ubuh3bc-text-head"style="height:2.8em;"> <!--Footer部分--> </div></div></div>2、header部分<divclass="ubumw3uinn6-dumar-l"style="margin-left:.6em"><divclass="uinn"id="ret">返回</div></div><divclass="ubub-verub-pcub-f1"><divstyle="height:.8em;"></div></div><divclass="umw1"></div><divonclick="weima(event)"><divclass="res11ub-img"style="margin:01em00;width:1.2em;height:1.3em"></div></div>效果如图:3、header2插入选项卡<divid="tabview"class="ufsc-bg"></div>修改选项卡选项卡名称参数:vartabview=appcan.tab({selector:"#tabview",hasIcon:false,hasAnim:true,hasLabel:true,hasBadge:false,data:[{label:"距离","icon":"fa-qq"},{label:"好评","icon":"fa-windows"},{label:"人气","icon":"fa-weixin",},{label:"人均","icon":"fa-weixin",}]});修改ready中头部高度,否则查看时选项卡会一闪而过,被浮动窗口覆盖:vartop=$('#header').offset().height+$('#tabview').offset().height;效果如图:4、footer部分 <inputclass="uhide"type="radio"name="tabSwitch"checked="true"> <divclass="ubub-acub-pcub-f1b-red-fc-bg-d"> <divclass="ub-imgim-shanghuuh2uw2"></div> <divclass="umar-l07ulev-1ubub-acub-pct-gra-f"style="padding:.5em0.5em0;">商户</div> </div> <inputclass="uhide"type="radio"name="tabSwitch"> <divonclick="openwin('salesPromotion','salesPromotion.html')"class="ubub-acub-pcub-f1c-bg-db-red-f"> <divclass="ub-imgim-cuxiaouh2uw2"></div> <divclass="umar-l07ulev-1ubub-acub-pct-gra-f"style="padding:.5em0.5em0">优惠</div> </div> <inputclass="uhide"type="radio"name="tabSwitch"> <divonclick="openwin('comment','comment.html')"class="ubub-acub-pcub-f1c-bg-db-red-f"> <divclass="ub-imgim-pinglunuh2uw2"></div> <divclass="umar-l07ulev-1ubub-acub-pct-gra-f"style="padding:.5em0.5em0;">评论</div> </div> <inputclass="uhide"type="radio"name="tabSwitch"> <divonclick="openwin('my','my.html')"class="ubub-acub-pcub-f1c-bg-db-red-f"> <divclass="ub-imgim-myuh2uw2"></div> <divclass="umar-l07ulev-1ubub-acub-pct-gra-f">我的</div> </div>效果如图:说明:openwin在main.js里面定义im-shanghu等样式在about-form.css里面定义第六步:JS代码扫二维码功能:在二维码html区域添加onclick事件functionweima(e){e.stopPropagation();e.preventDefault();uexScanner.open("ZXing","扫餐桌二维码完成下单");}functionScannerSuccessCallBack(opCode,dataType,data){vardata1=JSON.parse(data);varww=data1.code.replace(/\\"/g,"'");varst=JSON.parse(ww);appcan.setLocVal("shopId",st.shop_id);//商铺idappcan.setLocVal("shopName",st.shop_name);//商铺名称appcan.setLocVal("caidan_id",st.caidan_id);//菜单idappcan.setLocVal("caidan_num",st.caidan_num);//菜单份数appcan.setLocVal("per_count",st.per_count);//到店人数appcan.setLocVal("openmenu",0);//菜单页显示本店所有菜单appcan.setLocVal("erweima",0);//从首页扫码进入菜单页vardate=newDate;varnowtime=date.getTime()/1000;appcan.setLocVal('yuyueitme',nowtime);appcan.window.open('menu','menu.html','10','4');}返回按钮appcan.button("#ret","btn-act",function(){appcan.window.close(-1);})3、ready方法appcan.ready(function(){vartop=$('#header').offset().height+$('#tabview').offset().height;appcan.frame.open({id:"content",url:"index_content.html",//窗口1路径top:top,left:0,index:0,change:function(err,res){tabview.moveTo(res.multiPopSelectedIndex);//移动到所选中的索引窗口}});});4、选项卡切换tabview.on("click",function(obj,index){appcan.window.selectMultiPopover('content',index);switch(parseInt(index)){case0:appcan.window.publish('s0',0);break;case1:appcan.window.publish('s0',1);break;case2:
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 《水资源的科学监测与评价》课件
- 大学课件高等数学斯托克斯公式环流量与旋度
- 2025办公房屋租赁合同范本
- 主管和员工安全业绩考核培训课件
- 2025年项目转让合同示例
- 2024年09月河北河间市招聘事业单位人员医疗岗78人笔试历年专业考点(难、易错点)附带答案详解
- 包客船合同范本(2篇)
- 2024年09月江西省血液中心高层次人才招聘4人(91)笔试历年专业考点(难、易错点)附带答案详解
- 2025年的咨询服务合同范本
- 生态文明与绿色生活考核试卷
- 《民航飞机自动飞行控制系统》课件合集
- 《华为干部赋能手册》值得收藏课件
- 二次函数压轴题(二)【图像与取值范围】
- 儿科学课件:化脓性脑膜炎、病毒性脑炎、脑膜炎
- 安全事故隐患举报、奖励制度
- 《智能系统》第7章 自主无人系统
- 树木栽植检查记录表
- Q∕SY 1670.1-2014 投产方案编制导则 第1部分:原油、成品油管道
- WS377.4-2013 妇女保健基本数据集 第4部分:孕产期保健服务与高危管理
- 刺激性气体中毒课件
- 巧用Mapinfo软件SQL查询功能--肖2017
评论
0/150
提交评论