
微信小程序探索
危笑qwq
这个作者很懒,什么都没留下…
展开
-
json--json渲染微信小程序
index.wxml通过一个输入框把url的id传给js<input type="text" placeholder="输入id" name="search" value="" placeholder-class="plac" bindinput="inputValue" /><view > <text>城市:{{data.City}}</text><view></view><text>公司名:{{d原创 2021-04-14 17:11:37 · 217 阅读 · 1 评论 -
下载指定文件夹的文件/springboot端口9090
springboot修改服务器端口,防止和其他项目冲突源代码C:\Users\Lenovo\Desktop\各种框架安装包\Java公开课05 - Spring使用教程\PPT与项目源码\第15章 文件下载\15.1 文件下载修改1可以下载任意路径下的文件,这里思路是先在小程序上传到springboot项目,再用这个运行在eclipse的项目下载23访问(wx。。。。是文件名)http://127.0.0.1:8080/spring15/photo/wxa32c397d9ee915f原创 2020-10-03 17:27:03 · 291 阅读 · 0 评论 -
springboot---web----下载文件
代码只需要改1 this.getClass().getResourceAsStream("/templates/wxa32c397d9ee915f5.o6zAJswmDBS6GqsSGCDsKTOTteFk.NBWTAYou9QRQ928148cc0de489844264c42287869f44.png");2response.setHeader(“Content-Disposition”, “attachment;filename=”+ new String((“wxa32c397d9ee915原创 2020-10-03 11:42:09 · 495 阅读 · 0 评论 -
spring boot---微信小程序---数据库内容显示在小程序前端
wxml<view wx:for="{{data}}">{{item}}</view>wx.jsPage({ data: { }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) {let that=this;wx.request({ url: 'http://localhost:8080/wxjdbc', data:{}, method:'GET', hea原创 2020-10-02 16:12:07 · 701 阅读 · 0 评论 -
springboot---微信小程序上传文件(word/pdf文件)
springboot后台C:\Users\Lenovo\Desktop\各种框架安装包\demo-uploadfile(随便一个上传文件的java接口)wx.jschose() { var serverUrl = "http://localhost:8080/upload" var that = this console.log('111') wx.chooseMessageFile({ count: 1, //能选择文件的数量 type: '原创 2020-09-28 18:19:44 · 1073 阅读 · 1 评论 -
springboot---微信小程序上传文件(图片)
springboot后台C:\Users\Lenovo\Desktop\各种框架安装包\demo-uploadfile微信小程序wx.js formSubmit:function() { wx.chooseImage({ success (res) { const tempFilePaths = res.tempFilePaths wx.uploadFile({ url: 'http://localhost:808原创 2020-09-28 17:48:45 · 1323 阅读 · 0 评论 -
微信提交表单在java后台接收
效果:微信前端输入信息,点提交,在java后台收到改进我发布的文章“微信小程序与servlet互动”wxml<form bindsubmit="formSubmit"> <input name="firstname" value="请输入姓名" /> <input name="lastname" value="请输入姓名" /> <button formType="submit">提交</button>原创 2020-08-24 20:39:45 · 826 阅读 · 0 评论 -
微信小程序与Java后台servlet互动
效果:将小程序里的变量显示在java后台原理:小程序里wx.request里url连接你的servlet的访问地址:localhost:8080/项目名/urlparttern,并使用method:get相当于在网页提交表单信息,在后台使用request.getparameter接受表单信息和下面这样在浏览器访问是一样的代码wx.js bindtest:function(){ wx.request({ url: 'http://localhost:8080/wxconn原创 2020-08-21 16:43:41 · 699 阅读 · 0 评论