调用拍照API:https://mp.weixin.qq.com/debug/wxadoc/dev/api/media-picture.html?t=20161222#wxchooseimageobject 上传文件API:https://mp.weixin.qq.com/debug/wxadoc/dev/api/network-file.html 主要js代码: choice: function () { var that = this wx.chooseImage({ count: 1, /
前言,小程序本身是带有地区选着器的(网站:https://mp.weixin.qq.com/debug/wxadoc/dev/component/picker.html),由于自己开发的程序的数据是很久以前mysql数据,与小程序自带的地区名称并不一样,所以只能自己写了. (详细思路写在了最底部) 第一步:把mysql地区数据变成小程序数组格式 1.用php代码,导出数据mysql的地区数据 public function area(){ $sql = "SELECT * FROM c_regi
wxml: <view>时间:{{newTime}}</view> js: page({ data:{ newTime:'' }, onLoad: function (options) { var that = this; //获取实时时间 setInterval(function () { var nowTime = new Date(); var hour = nowTime.getHours(); var minutes = nowTime.getMinutes(); if