
wxxm
weixin_41069726
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
wxxcx一
小程序项目创建1 选择普通快速启动模板2 appid 已有3 程序配置 3.1 pages 页面配置3.2 window 页面的窗口表现3.3 tabBar底部tab切换3.4 networkTimeout3.5 debug4页面配置window 页面的窗口表现5程序主体 app.js app.json 程序配...翻译 2019-03-21 18:14:01 · 288 阅读 · 0 评论 -
微信小程序----网络请求
在wxml里面<button bind:tap="onReq">网络请求</button>在wxjs里面 wx.request({ url: 'http://localhost:4000/hello', data: {name:"yifei"}, method: 'post', // OPTION...转载 2019-03-23 11:03:33 · 323 阅读 · 0 评论 -
微信游戏------canvas
/*** * 第一次创建的canvas对象时候,生成的画布,在改画布上的绘制的元素,都会显示在屏幕上 * 离屏 在第一次创建完成之后的canvas,生成的画布,我们都称为离屏,在离屏上画的东西不会显示在屏幕上 */img.onload = function() { ctx.drawImage(img, 0, 0, canvas.width, canvas.height); ct...转载 2019-03-23 14:41:34 · 341 阅读 · 0 评论 -
微信的-----音频
//创建音频对象var bgm =wx.createInnerAudioContext();//mp3 aac wavbgm.src="./source/ab.mp3"bgm.play()//声音bgm.volume=0.05//循环播放bgm.loop =true//自动播放bgm.autoPlay=true//静音时还有声音 不建议使用bgm.obeyMute...转载 2019-03-23 18:49:55 · 127 阅读 · 0 评论 -
微信小游戏的生命周期
wx.onShow() //监听小游戏回到前台wx.onHide() //监听小游戏隐藏到后台wx.offHide() //取消监听小游戏隐藏到后台wx.offShow //取消监听 小游戏回到前台...转载 2019-03-24 08:52:40 · 1084 阅读 · 0 评论 -
微信小程序游戏-----动画
setInterval()setTimeout()requestAnimationFrame()clearInterval()clearTimeout()cancelAnimationFrame()var canvas =wx.createCanvas()var ctx =canvas.getContext("2d")ctx.fillStyle ="red"ctx.fil...转载 2019-03-24 08:53:03 · 654 阅读 · 0 评论 -
微信小游戏----事件篇
wx.onTouchStart()wx.onTouchMove()wx.onTouchEnd()wx.onTouchCancel()var canvas = wx.createCanvas()var ctx =canvas.getContext("2d")var img = wx.createImage()var firstX =100var firstY = 100va...转载 2019-03-24 08:54:23 · 1675 阅读 · 0 评论 -
微信小程序adapter
使用 wx API 模拟BOM 和BOM的代码组成的库地址https://developers.weixin.qq.com/minigame/dev/tutorial/base/adapter.html/******/ (function(modules) { // webpackBootstrap/******/ // The module cache/******/ ...转载 2019-03-24 08:53:22 · 1228 阅读 · 0 评论 -
微信小游戏之 wechat-adapter的使用(requestAnimationFrame)
import "./weapp-adapter.js"var ctx = canvas.getContext("2d")var bg =new Image()bg.src ="./images/bg.jpg" bg.width =512bg.height=512var width = window.innerWidth //全局对象var height = window.inn...转载 2019-03-24 08:54:13 · 1808 阅读 · 0 评论 -
微信小程序模块化---导入和导出
导出backgroud.jsexport default function(ctx) { var bg = new Image(); bg.src = "./images/bg.jpg"; bg.width = 512; bg.height = 512; var width = window.innerWidth; //全局对象 var height = win...转载 2019-03-24 08:54:49 · 4585 阅读 · 0 评论 -
微信二维码生成
https://github.com/dillonlfy/weapp-qrcode转载 2019-04-05 20:04:19 · 786 阅读 · 0 评论 -
微信小程序WebSocket
1 服务端npm init -ynpm i ws --save2 服务端const WebSocket = require('ws');const wss = new WebSocket.Server({ port: 8080});let stocks ={ruanmou:100,tencent:100,JD:50}function randomInterval...转载 2019-04-07 16:34:20 · 1143 阅读 · 0 评论 -
微信小程序授权与授权设置面板
1 其他授权与授权设置面板https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/authorize.html在wxml中<button bind:tap="onAuthLocation">授权位置</button>在 app.json中{ ...转载 2019-03-23 10:39:09 · 3360 阅读 · 0 评论 -
微信小程序之授权
https://developers.weixin.qq.com/miniprogram/dev/api/wx.authorize.html一 button获取用户授权获取用户的授权 授权的button在wxml中写一个button<button bindgetuserinfo="onGetUserInfo" open-...转载 2019-03-23 10:39:46 · 255 阅读 · 0 评论 -
微信小程序
https://developers.weixin.qq.com/miniprogram/dev/quickstart/basic/file.html#json-%E9%85%8D%E7%BD%AEwindowhttps://developers.weixin.qq.com/miniprogram/dev/framework/config.html#%E5%85%A8%E5%B1%80%E...转载 2019-03-21 21:47:26 · 182 阅读 · 0 评论 -
微信小程序的生命周期
// pages/movie/movie.jsPage({/*** 页面的初始数据*/data: {},/*** 生命周期函数--监听页面加载*/onLoad: function (options) {},/*** 生命周期函数--监听页面初次渲染完成*/onReady: function () {},...转载 2019-03-22 09:35:23 · 116 阅读 · 0 评论 -
小程序的页面跳转
一 组件导航 navigator有两个属性 : open-type url <navigator open-type="" url=""/> open-type的值有以下五种 1 跳转到 navigate 压栈操作 2 重定向 redirect ...转载 2019-03-22 10:07:32 · 154 阅读 · 0 评论 -
小程序的页面循环列表渲染
index.js 里的datalet arr1=["mye","leo","bke","heooly"]data: { names:arr1}index.wxml里渲染<viewwx:for="{{names}}"wx:key="*this" //*this就代表这个值>{{item}}</view&...转载 2019-03-22 10:36:04 · 1930 阅读 · 0 评论 -
微信小程序的条件渲染和block的使用
<view wx:if="{{score>70&&score<90}}"> 等级B</view><view wx:elif="{{score<70&&score>30}}"> 等级c</view><view wx:elif="{{score<...翻译 2019-03-22 10:51:19 · 607 阅读 · 0 评论 -
微信小程序模板使用
1 定义模板<template name="stringName"> <view>qberwrwiriw</view></template>2 使用模板<template is="stringName"></template>----------------------------------...转载 2019-03-22 11:18:54 · 162 阅读 · 0 评论 -
微信小程序事件
https://developers.weixin.qq.com/miniprogram/dev/framework/view/wxml/event.html1绑定事件<view id="outer" bind:touchstart="handleTap1" capture-bind:touchstart="handleTap2"> ...转载 2019-03-22 12:27:31 · 179 阅读 · 0 评论 -
微信小程序的样式
1 单位 rpx规定屏幕宽为 750 rpx************************************************************************************************************************2支持的选择器.class#idelement:after:before**...翻译 2019-03-22 13:13:47 · 189 阅读 · 0 评论 -
微信小程序辅助渲染( wxs )
1 使用在wxml中创建<wxs module="tools"></wxs> 标签, 将代码都写在这个标签中创建一个方法<wxs module="tools" > function reateNames(names){ console.log(names) return names.sp...翻译 2019-03-22 13:35:38 · 489 阅读 · 0 评论 -
微信小程序页面更新之setData
1this.setData({ magicNumber:Math.random()})转载 2019-03-22 14:00:56 · 473 阅读 · 0 评论 -
微信小程序----组件 以及组件的属性
https://developers.weixin.qq.com/miniprogram/dev/component/公共属性<view class="pressBtn" id="num" style="color:#fbfbfb" hidden //这个属性用来隐藏这个view ...翻译 2019-03-22 14:13:08 · 1332 阅读 · 0 评论 -
微信小程序---自定义组件
1 新建一个 mnum.wxml 1.1 编写结构 <view class="pressBtn" id="view"> {{magicNumber}} <text id="text" style="color:'#ccc';" catch:tap="onTap">点按我可以打印信息 ...转载 2019-03-23 10:40:09 · 314 阅读 · 0 评论 -
微信小程序animation
wxml<view class="background" animation="{{rotateData}}"></view><button bindtap="start"> 点击我</button>wxsspage{ height: 100%;}.background{ width: 100%;...转载 2019-04-07 21:40:45 · 46174 阅读 · 0 评论