门票碎片化改造(海玩首页)

2019-02-25  本文已影响0人  前端伊始

1.负责模块

 /*
            HeadBanner                 头图
            HotDestination             热门目的地
            BlendCategory              品类+工具
            Publicity                  宣传栏模块
            OperatingADPosition        广告Banner
            TicketPopularity           景点人气榜
            ActivitySellWell           玩乐热销榜
            SeasonMustExperience       必体验模块
            ShoppingCoupon             购物优惠劵
            NearbyCities               周边热门城市
            Recommend                  产品推荐
*/

2. 工具设备及项目地址

windows上安装夜神模拟器(支持多指双开)
安装fiddler代理https
刚开始没有mac,在自己的笔记本上安装了一个VMware虚拟机,在虚拟机上装了mac镜像;然后在appstore里找了xcode模拟器装了,,,git,,,,node

3. 开发中的收获与疑问

 this.tpl = {
                header: _.template(Lizard.T('headerTpl')),  // 这个headerTpl是html文件中定义的对应的id
                hotDestination: _.template(HotDestinationTpl),  // 这个HotDestinationTpl是定义的html结构的变量
            };

*hybrid中访问一个接口

var hotWordModel = TicketModel.HotwordModel.getInstance();
 if (this.options.showHotWord) {
                hotWordModel.setParam({
                    pageid: this.getPageid(),
                    cityid: this.options.cityid,
                    citytype: 1,
                    searchmode: 2
                });
                hotWordModel.execute(function (d) {
                    self.els.hotWordCtr.html(self.tpl.hotword(d));
                });
            }
1. 景点人气点击更多跳转到混排的门票tab上   先在html结构上 传入品类id品类id   <div class="title-more" 

id="act_overseasindex_localact_all_<%= obj.districtId %>" data-categoryid="<%=item.categoryid %> data-action="allFun">
                更多
                <span class="f-arrow-light-right"></span>
            </div>
然后在js中 clickHandle: function (e) {
            var $cTarget = $(e.currentTarget);
            switch ($cTarget.attr('data-action')) {
                case 'allFun':
                    var categoryId = $cTarget.attr('data-categoryid');
                    this.goList(categoryId);
                    break;
上一篇 下一篇

猜你喜欢

热点阅读