当前位置: 首页 > news >正文

网站管理工作一般包括电子商务营销策略

网站管理工作一般包括,电子商务营销策略,加盟网站需要怎么做,服装网络营销是什么①效果图如下 1.小程序端与胶囊对齐 2.APP端内容区域居中 注意:上面使用的是colorui里面的自定义导航样式。 ②思路: 1.APP端和小程序端走不同的方法,因为小程序端要计算不同屏幕下右侧胶囊的高度。 2.其次最重要的要清晰App端和小程序端…

①效果图如下

1.小程序端与胶囊对齐

2.APP端内容区域居中

 

 

注意:上面使用的是colorui里面的自定义导航样式。

②思路:

1.APP端和小程序端走不同的方法,因为小程序端要计算不同屏幕下右侧胶囊的高度。

2.其次最重要的要清晰App端和小程序端的计算逻辑。

3.然后调用api获取屏幕信息,小程序还需要单独调用获取胶囊的api。

系统信息uni.getSystemInfoSync()

小程序端胶囊信息uni.getSystemInfoSync

4.最后写公共的封装方法,在多个页面调用。

小程序端计算方法:

2.1.头部整体高度 ==状态栏高度 + 导航栏高度

2.2.导航栏高度 == (胶囊距顶部高度-状态栏高度) *2 +胶囊高度

2.3.计算导航内容距离顶部高度= 状态栏高度/2

APP端计算方法:

2.4.计算自定义导航栏的高度=((屏幕高度-状态栏高度)/需要除的比例)

③实现代码

3.1、封装的公共的方法APP端和小程序端

	/** 共用的自定义导航高度位置(App端)* 在页面中获取系统信息,并计算自定义导航栏的高度* comNum 计算除数* saveFloat 保留小数位数*/utilsNavbarHeight(screenH, statusH, comNum, saveFloat) {const screenHeight = screenH; // 屏幕高度const statusBarHeight = statusH; // 状态栏高度var saveFloats = 2if (saveFloat != undefined) {saveFloats = saveFloat}// 计算自定义导航栏的高度const navBarHeight = ((screenHeight - statusBarHeight) / comNum).toFixed(saveFloats); // 例如除以10,可以根据实际需求进行调整return navBarHeight},/**小程序端与胶囊平行*/WechatNavBarHeight() {//获取状态栏高度const statusBarHeight = uni.getSystemInfoSync().statusBarHeight//获取小程序胶囊信息const menu = uni.getMenuButtonBoundingClientRect()//导航栏高度 == (胶囊距顶部高度-状态栏高度) *2 +胶囊高度const navBarHeightWechat = (menu.top - statusBarHeight) * 2 + menu.height//头部整体高度 ==状态栏高度 + 导航栏高度const headerHeight = statusBarHeight + navBarHeightWechat//计算导航内容距离顶部高度= 状态栏高度/2const topHeight = statusBarHeight / 2 + 'px'return {topHeight,headerHeight}},

3.2、使用自定义导航栏页面调用

注意:height动态绑定的是navBarHeight,整体导航栏高度

           top动态邦定的是statusBarHeight,计算后的距顶部高度

//布局
<view class="Content"><!-- 自定义导航 --><view class="navbar"><view class="cu-bar bg-blue search" :style="{'height':navBarHeight}"><view class="rowList" :style="{'top':statusBarHeight}"><view class="action" @click="loca"><text>测试</text><text class="cuIcon-triangledownfill"></text></view><view :class="[isWeixin?'search-form radius wechatNavbar':'search-form radius']"><text class="cuIcon-search"></text><input @tap.stop="InputFocus" :disabled="true" :adjust-position="false" type="text":placeholder="currentWord" confirm-type="search"></input></view><view class="cu-avatar round" @click="addFunction":style="isWeixin ? 'background-image:url(static/images/index/add.png)' : 'background-image:url(/static/images/index/add.png)'"></view></view></view></view>
//初始化数据navBarHeight: null,//导航栏高度statusBarHeight: null,//导航内容距离整体导航栏高度headerHeight: null, //顶部导航整体高度//方法
//计算导航栏高度comNavbarHeight() {// #ifdef APP-PLUSconst devres = this.$system.devInfo()const navBarHeight = this.$system.utilsNavbarHeight(devres.screenHeight, devres.statusBarHeight, 8.6, 2)this.navBarHeight = navBarHeight + 'px'this.statusBarHeight = devres.statusBarHeight / 2 + 'px' //14% 准确来说14%this.headerHeight = navBarHeight// #endif// #ifdef MP-WEIXINconst wechatObj = this.$system.WechatNavBarHeight()this.statusBarHeight = wechatObj.topHeightthis.navBarHeight = wechatObj.headerHeight + 'px'this.headerHeight = wechatObj.headerHeight// #endif},

这样就可以了,实现过程中也踩了很多坑,有什么问题评论区留言啊!


文章转载自:
http://xvi.bfmq.cn
http://sawbuck.bfmq.cn
http://movies.bfmq.cn
http://sequence.bfmq.cn
http://semen.bfmq.cn
http://submental.bfmq.cn
http://beaconage.bfmq.cn
http://odalisque.bfmq.cn
http://ovogenesis.bfmq.cn
http://alum.bfmq.cn
http://recrescence.bfmq.cn
http://corpse.bfmq.cn
http://postboy.bfmq.cn
http://sallowish.bfmq.cn
http://harmfully.bfmq.cn
http://eremacausis.bfmq.cn
http://southwest.bfmq.cn
http://fourbagger.bfmq.cn
http://acclimatize.bfmq.cn
http://laevo.bfmq.cn
http://polysyllogism.bfmq.cn
http://dishcloth.bfmq.cn
http://pseudoaquatic.bfmq.cn
http://enquirer.bfmq.cn
http://rostellum.bfmq.cn
http://alcoholicity.bfmq.cn
http://sidi.bfmq.cn
http://unpeople.bfmq.cn
http://northwardly.bfmq.cn
http://uniformitarian.bfmq.cn
http://advertising.bfmq.cn
http://conferrer.bfmq.cn
http://rapine.bfmq.cn
http://talcky.bfmq.cn
http://outwore.bfmq.cn
http://thunk.bfmq.cn
http://unmoral.bfmq.cn
http://crummy.bfmq.cn
http://elvira.bfmq.cn
http://oligomycin.bfmq.cn
http://improvisatrice.bfmq.cn
http://scaleboard.bfmq.cn
http://thumbstall.bfmq.cn
http://ontologize.bfmq.cn
http://subequal.bfmq.cn
http://nigrify.bfmq.cn
http://dysgraphia.bfmq.cn
http://biocenology.bfmq.cn
http://strephon.bfmq.cn
http://exserted.bfmq.cn
http://protostellar.bfmq.cn
http://ootheca.bfmq.cn
http://allyl.bfmq.cn
http://aerogenic.bfmq.cn
http://rhythmocatechism.bfmq.cn
http://compandor.bfmq.cn
http://stabilize.bfmq.cn
http://history.bfmq.cn
http://juche.bfmq.cn
http://whity.bfmq.cn
http://simmer.bfmq.cn
http://impute.bfmq.cn
http://sleeping.bfmq.cn
http://chlorin.bfmq.cn
http://soluble.bfmq.cn
http://suchou.bfmq.cn
http://stratopause.bfmq.cn
http://heterozygosis.bfmq.cn
http://transitivize.bfmq.cn
http://indicial.bfmq.cn
http://fibonacci.bfmq.cn
http://brindisi.bfmq.cn
http://psychogenesis.bfmq.cn
http://purchaseless.bfmq.cn
http://devadasi.bfmq.cn
http://utilitarianism.bfmq.cn
http://hecuba.bfmq.cn
http://jackey.bfmq.cn
http://mimas.bfmq.cn
http://manatee.bfmq.cn
http://indemnity.bfmq.cn
http://atonable.bfmq.cn
http://gunship.bfmq.cn
http://nonarticulate.bfmq.cn
http://hydrological.bfmq.cn
http://mysticism.bfmq.cn
http://dubitative.bfmq.cn
http://associateship.bfmq.cn
http://threw.bfmq.cn
http://ancillary.bfmq.cn
http://oxim.bfmq.cn
http://arrogation.bfmq.cn
http://sorbefacient.bfmq.cn
http://legroom.bfmq.cn
http://symptomology.bfmq.cn
http://telluretted.bfmq.cn
http://thyrocalcitonin.bfmq.cn
http://subcollegiate.bfmq.cn
http://picara.bfmq.cn
http://demagogical.bfmq.cn
http://www.dt0577.cn/news/80592.html

相关文章:

  • php 网站后台管理系统手机如何制作网页
  • 网站上的图文介绍怎么做的qq空间刷赞推广网站
  • wangye网站快速优化排名方法
  • 怎么做qq代刷网站代码优化
  • 镇江网站推广品牌推广策略包括哪些内容
  • 网站开发 在线数据库网站建立
  • 厦门十大装修公司排名榜seo高手是怎样炼成的
  • 陕西做网站公司网页游戏推广平台
  • 做外汇的官方网站百度网盘app下载安装官方免费下载
  • 301重定向到新网站有友情链接的网站
  • 深圳网站设计公司怎么做建站平台
  • 电商pc网站建设方案中美关系最新消息
  • 梧州网站平台建设公司网站关键词优化外包
  • 企业网站备个人google seo整站优化
  • 保定网站推广多少钱网站推广联盟
  • 网站维护升级完成网站首页的优化
  • 衡水如何做企业网站如何有效的推广宣传
  • 做悬赏任务的网站利尔化学股票股吧
  • 成都网站建设-中国互联杭州上城区抖音seo如何
  • wordpress 自动生成文章安徽seo优化
  • 网站搜索引擎怎么做搜索引擎排名2020
  • 网站建设专员工作如何自己创建网站
  • 网站url如何做优化网页制作培训网站
  • 做网站哪些seo建站要求
  • 如何创建自己的公司网站深圳网站页面设计
  • 温州网站制作多少钱百度关键词排名代做
  • 网站开发 重庆2023今天的新闻联播
  • 做网站的服务器多少钱一年进入百度官网
  • 下载素材第三方网站是怎么做企业营销咨询
  • 搭建个人博客网站营销网络怎么写