1.负责模块
- 宣传栏:
- 广告栏:多于一个配置时轮播展示,最多展示5个,小于1个时模块隐藏,轮播的小点调用AdSlider组件
- 景点人气榜:
- 热门优惠券:
/*
HeadBanner 头图
HotDestination 热门目的地
BlendCategory 品类+工具
Publicity 宣传栏模块
OperatingADPosition 广告Banner
TicketPopularity 景点人气榜
ActivitySellWell 玩乐热销榜
SeasonMustExperience 必体验模块
ShoppingCoupon 购物优惠劵
NearbyCities 周边热门城市
Recommend 产品推荐
*/
- 搜索浮层样式调整(涉及海玩首页,一日游首页,混排列表页):
无搜索记录,隐藏搜索历史模块 ;
搜索历史最多出6个记录;
单个搜索词最长一行,超过省略号
热搜词最多长出8个
(样式在index.oversea.scss里面改 混排和海玩的搜索浮层公用一套模板seach.js
;; 一日游则是自己用一套daytour_search.js 另外daytoursearch.js是?) - 搜索词埋点优化:
ubt.config.js 中先添加key(
一日游添加在DAILYTOUR_HOME下面
) - 产品详情页有个优惠券领取字段加密优化:
receiveCoupon promotionID 换成 promotionSecretID
getVendorCoupon接口拿到的data中的promid 替换成 promotionSecretId
2. 工具设备及项目地址
windows上安装夜神模拟器(支持多指双开)
安装fiddler代理https
刚开始没有mac,在自己的笔记本上安装了一个VMware虚拟机,在虚拟机上装了mac镜像;然后在appstore里找了xcode模拟器装了,,,git,,,,node
- ttd-mobile-activity —— 8.1.2分支,hybrid
- ttd-mobile-rn ——8.1.2_act分支(代码push需要review)reactNative
- ottd-mobile-rn ——8.1.2分支 reactNative
3. 开发中的收获与疑问
- Lizard.P 与Lizard.T的区别
- 两端对齐很好用吼: display: felx; justify-content: space-between;
- hybrid模板刚开始导入模块时候,‘DaytourSearchView’ 被SearchView代替了?no,原来是变量名可以重新定义
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));
});
}
-
hybrid 为元素添加变样式 <li class="hotcity-item <%= !item.highlight ? 'item-hot':'item-nothot' %>"
-
有时候后台外接口返回的数据是字符串,在使用之前记得解析一下,var data = JSON.parse(res.data.moduleValue);
-
svg图像怎么控制图片颜色 <path class="" fill="#999">
-
crn
mac 上添加git用户名和邮箱 git config --global user.name
push代码需要review:
git add .
git commit -m'页面写在前面'
git push origin HEAD:refs/for/分支名
crn发生产时候记得生成新的版本号 -
启动rn项目时候,npm install后npm start报crn-cli相关的错误,,,执行以下npm install @ctrip/crn-cli就好了
-
导入icon图片,在iconfont将要使用的图片通过加入购物车保存到项目(我的是crn_font_ttd_act),然后下载项目中的全部图标到本地,将其中的.ttf文件替换掉项目中的。。
然后在项目中使用:<Text style={styles.font}>字体编码;</Text>并设置样式:font: {fontFamily:'crn_font_ttd_act'}
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;
-
crn中明确知道url的用this.props.page.push的方法打开 在page.js中判断哪些用push,剩下的用URL.openURL()
-
节流防抖: 在componentDidMount() { setTimeOut(()=>{this.refs.inputSearch()},300)}
-
计算明天时间的方法: new Date(new Date().valueOf() + 一多少毫秒)
-
_.extend(this.els,{})
-
this.traceid = cUtilCommon.createGuid();//获取traceid
网友评论