js判断当前H5是否在微信小程序的web-view中
摘要:用小程序提供的 wx.miniProgram.getEnv 可以获取环境参数,但是它有个问题就是无法在非微信环境下判断。所以在使用 wx.miniProgram.getEnv 前得先判断是否在微信环境中。 代码: <script type="text/javascript" src="https:/
阅读全文
posted @
2022-03-01 15:22
JoeYoung
阅读(925)
推荐(0) 编辑
微信小程序上传图片(限制图片大小、张数)
摘要:代码: //选择图片 choice: function () { var that = this console.log(that.data.imgsrc.length); if (that.data.imgsrc.length <= 3) { var ino = 4 - that.data.img
阅读全文
posted @
2022-03-01 10:49
JoeYoung
阅读(1935)
推荐(0) 编辑