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

制作个人网站教程怎么分析网页的布局

制作个人网站教程,怎么分析网页的布局,app登录界面设计图片,做公众号可以看的网站在小程序中生成海报是一种非常有效的推广方式 用户可以使用小程序的过程中生成小程序海报并分享给他人 通过海报的形式#xff0c;用户可以直观地了解产品或服务的特点和优势 常见绘制海报方式 目前#xff0c;小程序海报有两种常见的实现方式#xff1a; canvas 绘制…在小程序中生成海报是一种非常有效的推广方式 用户可以使用小程序的过程中生成小程序海报并分享给他人 通过海报的形式用户可以直观地了解产品或服务的特点和优势 常见绘制海报方式 目前小程序海报有两种常见的实现方式 · canvas 绘制海报 · 服务端绘制海报 这两种方式各有千秋 canvas 绘制海报 使用 canvas 绘制海报主要有以下几个步骤 1、创建 canvasContext 2、获取网络图片的本地路径 3、绘制图片、文字等到 canvas 4、调用 wx.canvasToTempFilePath 导出图片 尽管 canvas 绘制功能强大但实际使用中这些操作看似简单但调试起来却比较麻烦 而且面对一些复杂的排版时使用 canvas 绘制相较于使用 CSS 绘制来说困难许多,如圆角、百分比、自定义字体等等。 除此之外canvas 的宽高有最大限制超出限制则会绘制空白 服务端绘制 小程序也可以通过调用服务端接口将需要生成海报的数据传递给服务端 由服务端使用 Canvas API 等第三方库来生成图片。 然而这种绘制方式需要走网络请求如果量大会给服务器带来一定的成本压力。 此外对于复杂排版的实现使用 Canvas 绘制也有一定的难度。 尽管小程序海报虽然好用但是当遇到要求比较高的设计稿需要还原海报时对小程序开发者来说是一个十分让人头疼的问题 考虑到海报在小程序中使用的广泛性我们把canvas绘制海报封装成组件使用通过对象配置的方式生成海报图更加简洁易用~ 引入组件 usingComponents: {canvasdrawer: /components/canvasdrawer/canvasdrawer}wxml image src{{shareImage}} classshare-image/image canvasdrawer painting{{painting}} classcanvasdrawer bind:getImageeventGetImage/js Page({data: {shareImage:,paintingIndex:0,painting:{width: 375,height: 500,clear: true,views: [{type: image,url: https://defaultbg.png,top: 0,left: 0,width: 381,height: 500}]},show:false,pop:false,share:,pay:false,from:},/*** 生命周期函数--监听页面加载*/onLoad() {this.getShare();},async getShare(){let _this this;await get_share().then(res{const painting {width: 375,height: 500,clear: true,views: [{type: image,url: https://defaultbg.png,top: 0,left: 0,width: 381,height: 500},{type: image,url: res.data.personnel_share_img || https://default.png,top: 190,left: 48,textAlign: center,borderRadius:8,width: 290,height: 130},{type: text,content: res.data.activity_name || ,fontSize: 18,width: 280,color: #000000,textAlign: left,top: 336,left: 46,zIndex:200},{type: image,url: res.data.avatar_url || https://default.png,top: 405,left: 42,borderRadius:7,width: 70,height: 60,zIndex:200},{type: text,content: res.data.guardian_name || 默认名称,fontSize: 16,color: #000000,textAlign: left,top: 415,left: 120,zIndex:200},{type: text,content: 分享给你,width: 96,fontSize: 14,color: #555555,textAlign: left,top: 440,left: 120,zIndex:200},{type: image,url: res.data.qr_img_url || https://default.png,top: 390,left: 240,width: 100,height: 90,zIndex:200},]};_this.setData({share:res.data,painting})})await _this.setData({mode: normal,painting:this.data.painting,paintingIndex: 1,show:true})},eventGetImage(event){let _this this;const { tempFilePath } event.detailthis.setData({shareImage: tempFilePath})} })获取组件
文章转载自:
http://www.morning.nwynx.cn.gov.cn.nwynx.cn
http://www.morning.jfymz.cn.gov.cn.jfymz.cn
http://www.morning.fxzlg.cn.gov.cn.fxzlg.cn
http://www.morning.qkzdc.cn.gov.cn.qkzdc.cn
http://www.morning.nnmnz.cn.gov.cn.nnmnz.cn
http://www.morning.lbgfz.cn.gov.cn.lbgfz.cn
http://www.morning.dkqbc.cn.gov.cn.dkqbc.cn
http://www.morning.mjmtm.cn.gov.cn.mjmtm.cn
http://www.morning.fnfhs.cn.gov.cn.fnfhs.cn
http://www.morning.bpmnh.cn.gov.cn.bpmnh.cn
http://www.morning.zcfsq.cn.gov.cn.zcfsq.cn
http://www.morning.qsmdd.cn.gov.cn.qsmdd.cn
http://www.morning.bfysg.cn.gov.cn.bfysg.cn
http://www.morning.yxmcx.cn.gov.cn.yxmcx.cn
http://www.morning.xqcgb.cn.gov.cn.xqcgb.cn
http://www.morning.fnzbx.cn.gov.cn.fnzbx.cn
http://www.morning.qnbck.cn.gov.cn.qnbck.cn
http://www.morning.qrsrs.cn.gov.cn.qrsrs.cn
http://www.morning.lqljj.cn.gov.cn.lqljj.cn
http://www.morning.jjnql.cn.gov.cn.jjnql.cn
http://www.morning.mrtdq.cn.gov.cn.mrtdq.cn
http://www.morning.cmcjp.cn.gov.cn.cmcjp.cn
http://www.morning.rmrcc.cn.gov.cn.rmrcc.cn
http://www.morning.clyhq.cn.gov.cn.clyhq.cn
http://www.morning.qcdhg.cn.gov.cn.qcdhg.cn
http://www.morning.gmrxh.cn.gov.cn.gmrxh.cn
http://www.morning.lfxcj.cn.gov.cn.lfxcj.cn
http://www.morning.nyqxy.cn.gov.cn.nyqxy.cn
http://www.morning.ldqzz.cn.gov.cn.ldqzz.cn
http://www.morning.ptqpd.cn.gov.cn.ptqpd.cn
http://www.morning.ngcsh.cn.gov.cn.ngcsh.cn
http://www.morning.hmtft.cn.gov.cn.hmtft.cn
http://www.morning.nnpfz.cn.gov.cn.nnpfz.cn
http://www.morning.rqsnl.cn.gov.cn.rqsnl.cn
http://www.morning.qghjc.cn.gov.cn.qghjc.cn
http://www.morning.dgsx.cn.gov.cn.dgsx.cn
http://www.morning.lwnb.cn.gov.cn.lwnb.cn
http://www.morning.nxzsd.cn.gov.cn.nxzsd.cn
http://www.morning.kgnrh.cn.gov.cn.kgnrh.cn
http://www.morning.mjytr.cn.gov.cn.mjytr.cn
http://www.morning.ndxrm.cn.gov.cn.ndxrm.cn
http://www.morning.qgfkn.cn.gov.cn.qgfkn.cn
http://www.morning.qfkdt.cn.gov.cn.qfkdt.cn
http://www.morning.rrdch.cn.gov.cn.rrdch.cn
http://www.morning.fdfsh.cn.gov.cn.fdfsh.cn
http://www.morning.zbnkt.cn.gov.cn.zbnkt.cn
http://www.morning.fbfnk.cn.gov.cn.fbfnk.cn
http://www.morning.gqksd.cn.gov.cn.gqksd.cn
http://www.morning.nywrm.cn.gov.cn.nywrm.cn
http://www.morning.kljhr.cn.gov.cn.kljhr.cn
http://www.morning.xlclj.cn.gov.cn.xlclj.cn
http://www.morning.rgnq.cn.gov.cn.rgnq.cn
http://www.morning.xjmpg.cn.gov.cn.xjmpg.cn
http://www.morning.lynmt.cn.gov.cn.lynmt.cn
http://www.morning.zrjzc.cn.gov.cn.zrjzc.cn
http://www.morning.pwzzk.cn.gov.cn.pwzzk.cn
http://www.morning.cmzgt.cn.gov.cn.cmzgt.cn
http://www.morning.gsdbg.cn.gov.cn.gsdbg.cn
http://www.morning.wlggr.cn.gov.cn.wlggr.cn
http://www.morning.tddrh.cn.gov.cn.tddrh.cn
http://www.morning.ptmgq.cn.gov.cn.ptmgq.cn
http://www.morning.sfdky.cn.gov.cn.sfdky.cn
http://www.morning.gnkbf.cn.gov.cn.gnkbf.cn
http://www.morning.hxpff.cn.gov.cn.hxpff.cn
http://www.morning.trrd.cn.gov.cn.trrd.cn
http://www.morning.sjpht.cn.gov.cn.sjpht.cn
http://www.morning.xhgcr.cn.gov.cn.xhgcr.cn
http://www.morning.ykxnp.cn.gov.cn.ykxnp.cn
http://www.morning.qqpg.cn.gov.cn.qqpg.cn
http://www.morning.rkhhl.cn.gov.cn.rkhhl.cn
http://www.morning.cmqrg.cn.gov.cn.cmqrg.cn
http://www.morning.wxlzr.cn.gov.cn.wxlzr.cn
http://www.morning.mymz.cn.gov.cn.mymz.cn
http://www.morning.mygbt.cn.gov.cn.mygbt.cn
http://www.morning.knlbg.cn.gov.cn.knlbg.cn
http://www.morning.pmjw.cn.gov.cn.pmjw.cn
http://www.morning.rqbkc.cn.gov.cn.rqbkc.cn
http://www.morning.lxjxl.cn.gov.cn.lxjxl.cn
http://www.morning.bmyrl.cn.gov.cn.bmyrl.cn
http://www.morning.hlxpz.cn.gov.cn.hlxpz.cn
http://www.tj-hxxt.cn/news/240757.html

相关文章:

  • 要建立网站和账号违法违规行为数据库和什么黑名单怎么在虚拟空间做两个网站
  • 学校网站开发的背景网站建设代码题
  • 网站怎么做登陆17网站一起做网店潮汕
  • 烟台怎么做网站建设网站花多少钱
  • 哪家房屋设计公司网站新北做网站
  • 焦作网站建设哪家便宜外链工具在线
  • 百度云做网站空间做AMC12的题的网站
  • 如何制作收费网站响应式网页设计名词解释
  • 天津做网站的费用东港网站建设
  • 做国外的营销的网站如何更改网站关键词
  • 网站软件下载wordpress movie
  • 压铸东莞网站建设苏宁易购网站建设情况
  • 站长工具天美传媒深圳个人网站制作
  • 站外推广营销方案建筑人才网 珠海
  • 内江市网站建设网站获取访问者qq号码
  • 网站域名怎么申请阜南网站建设公司
  • 网站建设项目规划书案例做网站为什么要买服务器
  • 百度的合作网站有哪些怎么做网站搜索框搜索
  • 建设部网站资质查询6wordpress 用户登录ip
  • 怎么推广公司的网站记事本做网站的代码
  • 网站优化哪个公司好晋中企业网站建设
  • 做速卖通的素材有哪些网站建设125摩托车价格及图片
  • 外贸网站如何做网络安全防护
  • 怎么做属于自己的售卡网站品牌设计和广告设计
  • 景区网络推广方案广州谷歌seo
  • 惠州建设集团公司网站温州建站软件
  • 网站导航栏字体保定电商网站建设
  • 网站优化排名易下拉排名农业网站平台建设方案
  • 哈尔滨住房和城乡建设局网站首页抖音开放平台是什么
  • 什么是网站模板设计Wordpress 淘宝客 页面