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

网站加地图百度网站回档怎么能恢复

网站加地图,百度网站回档怎么能恢复,中山网络公司网站,建设和谐社区网站巧妇难为无米之炊,想写功能但是没有好看的设计,边写边设计效率又不够高。mastergoAi生成的页面又不够好看,而且每月给的免费积分用得又超快,so决定自给自足。能有多难,先做,做了再改。 于是决定踏足设计&a…

巧妇难为无米之炊,想写功能但是没有好看的设计,边写边设计效率又不够高。mastergoAi生成的页面又不够好看,而且每月给的免费积分用得又超快,so决定自给自足。能有多难,先做,做了再改。

于是决定踏足设计,本期话题新手如何用mastergo设计小程序页面。

先去小红书上找找模子,看能否复原。摸了一晚上,感觉效果还行,比ai生成的要好看那么一点。只是想画个时钟出来不知道怎么画好,还的看怎么用canvas实现时钟动画。

附上mastergo网址:MasterGo 莫高设计 - AI 时代的数字界面生产平台

有了UI页面画起来就是快多了

今天用canvas绘制了时钟,然后调整了下整体的布局更简洁直观了

另外再附上canvas绘制时钟代码,canvas越写越有意思了

// components/stars/stars.ts
let timer = null
Component({lifetimes: {attached() {this.createSelectorQuery().select("#myCanvas2").fields({node: true,size: true}).exec(res => this.init(res));},detached() {if (timer) {clearInterval(timer)}}},/*** 组件的方法列表*/methods: {init(res) {const width = res[0].widthconst height = res[0].height// 设置画布宽高const canvas = res[0].nodeconst ctx = canvas.getContext('2d')canvas.width = widthcanvas.height = heightconst r = width / 2const hourNeedle = r * 1 / 2const minuteNeedle = r * 2.5 / 4const secondNeedle = r * 4 / 5// 帧渲染回调const draw = () => {const now = new Date();const hour = now.getHours();const minute = now.getMinutes();const second = now.getSeconds();const secondDeg = (second / 60) * Math.PI * 2;const minuteDeg = ((second / 60 + minute) / 60) * Math.PI * 2;const hourDeg = ((((second / 60 + minute) / 60) + hour) / 12) * Math.PI * 2;this.render(ctx, width, height, secondDeg, secondNeedle, minuteDeg, minuteNeedle, hourDeg, hourNeedle)// 注册下一帧渲染// canvas.requestAnimationFrame(draw)}timer = setInterval(() => {draw()}, 1000)},//画背景框renderCircle(ctx, width) {ctx.beginPath()ctx.lineWidth = '1'ctx.arc(width / 2, width / 2, width / 2 - 2, 2, 4 * Math.PI);ctx.strokeStyle = '#000'ctx.stroke()ctx.beginPath()ctx.arc(width / 2, width / 2, width / 2 - 6, 2, 4 * Math.PI);ctx.strokeStyle = '#000'ctx.stroke()ctx.beginPath()ctx.arc(width / 2, width / 2, 3, 2, 4 * Math.PI);ctx.strokeStyle = '#000'ctx.stroke()ctx.fillStyle = '#000'ctx.fill()let count = 0while (count < 60) {const deg = (Math.PI / 30) * countconst r = width / 2 - 6const r1 = r - 4const r2 = r - 8const r3 = r - 18let R = r1if (count % 5 == 0) {R = r2let word = count / 5 == 0 ? 12 : count / 5let w = ctx.measureText(word).width;ctx.fillText(word, width / 2 + r3 * Math.sin(deg) - w / 2, width / 2 - r3 * Math.cos(deg) + w / 2)}ctx.beginPath()ctx.moveTo(width / 2 + r * Math.sin(deg), width / 2 - r * Math.cos(deg))ctx.lineTo(width / 2 + R * Math.sin(deg), width / 2 - R * Math.cos(deg))ctx.strokeStyle = '#000'ctx.stroke()count++}ctx.font = '12px bold'},// 画时针render(ctx, width, height, secondDeg, secondNeedle, minuteDeg, minuteNeedle, hourDeg, hourNeedle) {ctx.clearRect(0, 0, width, height)this.renderCircle(ctx, width)ctx.beginPath()ctx.moveTo(width / 2 + (-10) * Math.sin(minuteDeg), width / 2 - (-10) * Math.cos(minuteDeg));ctx.lineTo(width / 2 + minuteNeedle * Math.sin(minuteDeg), width / 2 - minuteNeedle * Math.cos(minuteDeg));ctx.lineCap = 'round'ctx.lineWidth = '2'ctx.stroke();ctx.beginPath()ctx.moveTo(width / 2 + (-10) * Math.sin(hourDeg), width / 2 - (-10) * Math.cos(hourDeg));ctx.lineTo(width / 2 + hourNeedle * Math.sin(hourDeg), width / 2 - hourNeedle * Math.cos(hourDeg));ctx.lineCap = 'round'ctx.lineWidth = '3'ctx.stroke();ctx.beginPath()ctx.moveTo(width / 2 + (-10) * Math.sin(secondDeg), width / 2 - (-10) * Math.cos(secondDeg));ctx.lineTo(width / 2 + secondNeedle * Math.sin(secondDeg), width / 2 - secondNeedle * Math.cos(secondDeg));ctx.lineCap = 'round'ctx.lineWidth = '1'ctx.strokeStyle = 'red'ctx.stroke();},}
})

时钟效果可查看微信小程序“哆喵口袋”


文章转载自:

http://grbRJ8OI.txnqh.cn
http://QO41dFaP.txnqh.cn
http://QPwZkJED.txnqh.cn
http://ozXcgola.txnqh.cn
http://a3qrBepG.txnqh.cn
http://tkUBpC7l.txnqh.cn
http://iWOtT8DK.txnqh.cn
http://jz9s5QyY.txnqh.cn
http://GTE3h3Zu.txnqh.cn
http://KnxvWBsS.txnqh.cn
http://veiW4R7q.txnqh.cn
http://KYfrdtbF.txnqh.cn
http://V7nPthu3.txnqh.cn
http://KJDf2HZB.txnqh.cn
http://XDacwa3n.txnqh.cn
http://3Nh6IUQO.txnqh.cn
http://hGuvfZWu.txnqh.cn
http://MFPssnGD.txnqh.cn
http://okzRjfKd.txnqh.cn
http://8dErWPs3.txnqh.cn
http://jymfOVJr.txnqh.cn
http://EaMujJqY.txnqh.cn
http://PDInYmQm.txnqh.cn
http://GNOD9wDa.txnqh.cn
http://wLq3P6Xc.txnqh.cn
http://ArwSm6pc.txnqh.cn
http://LsyMFBVJ.txnqh.cn
http://NiSVd2az.txnqh.cn
http://9V9nSy98.txnqh.cn
http://pd7YqNlT.txnqh.cn
http://www.dtcms.com/wzjs/727500.html

相关文章:

  • FileZilla做网站深圳建站企业
  • php做网站界面代码网站与客户端的区别
  • 怎么利用百度云盘做网站网站做曲线的源代码
  • 芜湖做网站哪家好武安建设局网站
  • 福田网站建设 信科网络南京工程网站建设
  • 网络管理中心网站智能免费建站
  • 手机微信官方网站做腰椎核磁证网站是 收 七
  • 网站为什么做重定向白银网站建设熊掌号
  • 视频网站开发代码鼎豪网络网站建设
  • pc端网站怎么做自适应百度信息流推广是什么意思
  • 海拉尔做自己的网站出租网站空间
  • 网站建设的需求要素wordpress博客背景
  • 百度做网站要多久五金外贸网站模板
  • dede网站logo怎么改深圳市企业网站seo
  • 青州网站建设公司网站年费如何做会计分录
  • 网站建设与维护试卷及答案天津塘沽爆炸电影
  • php和什么语言做网站优化网址
  • 网上做中考题的网站绿色风格网站
  • 怎么做装修网站平台电子商务专升本可以报什么专业
  • 绿盒子网站建设案例此博客由wordpress制作
  • 郑州网站推广公司咨询网站开发语言有哪些
  • 优秀材料写作网站重庆网站建设服务公司
  • 网站建设工作是干什么的搜索企业的软件哪个好
  • 个人网站做淘宝客教程做足球预测的网站
  • 常州网站设计公司工商营业执照网上注册
  • 网站建设代理哪个好舆情系统
  • 个人网站制作 教程phpcms v9 网站建设入门
  • 提供网站建设收费标准wordpress th7好卡
  • 营销型网站成功案例wordpress可以添加字段吗
  • wordpress安装如何填数据库东莞seo排名外包