Collapse

62 阅读2分钟

something (such as a series of questions or exercises) for measuring the skill, knowledge, intelligence, capacities, or aptitudes of an individual or group. (2) : a procedure, reaction, or reagent used to identify or characterize a substance or constituent.

something (such as a series of questions or exercises) for measuring the skill, knowledge, intelligence, capacities, or aptitudes of an individual or group. (2) : a procedure, reaction, or reagent used to identify or characterize a substance or constituent.

something (such as a series of questions or exercises) for measuring the skill, knowledge, intelligence, capacities, or aptitudes of an individual or group. (2) : a procedure, reaction, or reagent used to identify or characterize a substance or constituent.

something (such as a series of questions or exercises) for measuring the skill, knowledge, intelligence, capacities, or aptitudes of an individual or group. (2) : a procedure, reaction, or reagent used to identify or characterize a substance or constituent.

something (such as a series of questions or exercises) for measuring the skill, knowledge, intelligence, capacities, or aptitudes of an individual or group. (2) : a procedure, reaction, or reagent used to identify or characterize a substance or constituent.

something (such as a series of questions or exercises) for measuring the skill, knowledge, intelligence, capacities, or aptitudes of an individual or group. (2) : a procedure, reaction, or reagent used to identify or characterize a substance or constituent.

1、Moment Page

2、店铺页面

  1. 只有一个页面,名为indexPage,切换tab只换了组件
  2. 进入页面就将其他tab的基本数据渲染好
  3. 需要获取初始页面定位

2.1、三端类型

pc端

app端

微信小程序

2.2、模块梳理

1、公共头部

  1. 店铺头像,名称
  2. 关注,查找按钮
  3. 滑动吸顶

2、首页

  1. 头图
  2. 官方动态-视频
  3. 酒店商品列表
  4. banner列表

3、全部商品

  1. 地址筛选
  2. 价格,位置,品牌,筛选联动
  3. 卡片展示,滑动加载
  4. 骨架屏

4、内容动态

  1. 瀑布流

技术实现

定位

  1. 当用户进入网站时自动定位他的地理位置,包括市区,方便给他推荐当前城市的特色信息。
  2. PC很多浏览器对于html5的定位技术是不太友好的,很多浏览器都是默认拒绝定位,一般只有IE是可以正常使用,但是获取到的经纬度偏差很大。
  3. 相反在手机访问的时候,由于一般手机上都有GPS模块,所以定位效果会好很多,原因就在于手机上的GPS模块对geolocation特性的支持是很好的。
  4. 结论是,html5的定位在手机上测试是最佳的选择,PC建议使用IE浏览器。
  5. 实现
function getLocation() {
        var options = {
            enableHighAccuracy: true,
            maximumAge: 1000
        };
        alert(document.documentElement.clientWidth);
        if (navigator.geolocation) {
            // 走到这里说明,浏览器支持geolocation,参数里有两个回调函数,一个是定位成功后的处理操作,一个是定位失败后的处理操作,另外一个参数没有研究过
            navigator.geolocation.getCurrentPosition(onSuccess, onError, options);
        } else {
            // 否则浏览器不支持geolocation
            alert('您的浏览器不支持地理位置定位!');
        }
    }