[图片]
ios11 getPhoneNumber 拿不到 code?https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/getPhoneNumber.html ios11中与安卓11 通过<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber"></button> 拿取 e.detail.code 为undefined
2022-01-16直接返回echostr看看
开发权限配置,对比都是ok,怎么还提示 token验证失败呢?appid:wxcbc4f948f9eb6136 token:wsxWSXQAZ2w3e4r5ts url:https://pinche.cnsosu.com/weixin.aspx
2022-01-16啥也看不见,咋猜
一个form表单突然不能点击提交了,但手机预览又可以?一个页面的form表单,之前还好好的,填加了一些内容后,突然点击提交按钮不起作用了,也不报错,就是点击提交按钮没有任何反应,将整个formSumbit()注释点,从新写一个最简单formSumbit()就是console一下提交内容,依然没有反应。一开始我以为是页面哪里错了,反复了看了反复编译执行,系统也没有报错,也没有错,就是点击提交按钮,没有任何反应。 但是最奇怪的是,不管是手机预览,还是真机调试,在手机上点击提交按钮都能正常提交,这是为什么呢?如果开发真工具点击没有反应,为什么手机预览又可以正常运行,这样我在电脑上就没法调试了! 请各位老师指点!!谢谢! 不好意思,没有上代码,我把全部这个页面的代码上传如下,请老师指点: // pages/dangchu/dangchu.js import WxValidate from '../../utils/WxValidate.js'; const db = wx.cloud.database() Page({ /** * 页面的初始数据 */ data: { punishment_date: '2022-01-01', date: { year: '', month: '', day: '' }, certificateID1: '', certificateID2: '', // 模糊查询时长 timer: 0, // 点击结果项之后替换到文本框的值 inputValue: '', // 是否隐藏模糊查询的面板 hideScroll: true, // 模糊查询结果 searchTip: [] }, onInput(e) { const inputValue = e.detail.value clearTimeout(this.data.timer) let timer = setTimeout(() => { if (inputValue) { // 如果输入的关键字不为空,则发起请求获取联想值 var that = this; //这句不能少,在查询时 const legalTerms = db.collection('legalTerms').where({ behavior:{ $regex:'.*'+ inputValue, $options: 'i' } }).get({ success(res) { console.log('查询成功', res.data); //将查询返回的结果赋值给本地变量 that.setData({ searchTip: res.data, inputValue: inputValue, hideScroll: false }) console.log('查询成功', that.data.searchTip); }, fail: err => { console.log('失败') } }) } // 如果为空,则收起 this.setData({ searchTip: [], hideScroll: true, // inputValue: '' }) }, 600) this.data.timer = timer }, itemtap(e) { const { info } = e.currentTarget.dataset console.log('选择的ID是',info) this.setData({ // 将点击选择的值展示在input框中 inputValue: info.behavior, illegalLawName: info.illegalLawName, illegalTitle: info.illegalTitle, punishLawName: info.punishLawName, punishTitle: info.punishTitle, // 当用户选择某个联想词,隐藏下拉列表 hideScroll: true }) }, showToast(error) { wx.showToast({ title: error.msg, icon: 'none' }) }, initValidate() { const rules = { officers_name1: { required: true }, officers_name2: { required: true, }, document_number: { required: true, }, } const messages = { officers_name1: { required: '请输入执法人员姓名', }, officers_name2: { required: '请输入执法人员姓名', }, document_number: { required: '请输入文书编号', }, // boxType: { // required: '请选择箱型', // }, // boxCount: { // required: '请输入发单数量', // intType: '发单数量请输入10以内' // }, // weight: { // required: '请输入箱重', // weight: '箱重请填写100以内整数或两位小数' // }, // store: { // required: '请输入门点地址', // }, // harbour: { // required: '请输入港区', // }, // freight: { // required: '请输入运费金额', // money: '请输入正确的金额' // }, // freshInterval: { // required: '请选择重发间隔', // }, // linkman: { // required: '请选择联系人', } this.WxValidate = new WxValidate(rules, messages) }, bindDateChange: function (e) { console.log('picker发送选择改变,携带值为', e.detail) this.setData({ punishment_date: e.detail.value }) }, // formSubmit(e) { // console.log('form发生了submit事件,携带数据为:', e.detail.value) // }, formSubmit(e) { var that = this console.log('form发生了submit事件,携带数据为:', e.detail.value) const params = e.detail.value // 校验表单 if (!this.WxValidate.checkForm(params)) { console.log(this.WxValidate.errorList[0]) const error = this.WxValidate.errorList[0] this.showToast(error) return false } var date = new Date(e.detail.value.punishment_date) var year = date.getFullYear() var month = date.getMonth()+1 var day = date.getDate() this.setData({ date: { year: year, month: month, day: day } }) const certificate1 = db.collection('certificate').where({ name: e.detail.value.officers_name1 }) .get().then(res=>{ this.setData({ certificateID1: res.data[0].certificateID }) console.log('当前数据库返回的是:',res.data[0].certificateID) const certificate2 = db.collection('certificate').where({ name: e.detail.value.officers_name2 }) .get().then(res=>{ this.setData({ certificateID2: res.data[0].certificateID }) console.log('当前数据库返回的是:',res.data[0].certificateID) wx.setStorageSync('dangchu_result',{ business_address: e.detail.value.business_address, enterprise_name: e.detail.value.enterprise_name, idCardNO: e.detail.value.idCardNO, person_name: e.detail.value.person_name, punishment_address: e.detail.value.punishment_address, reg_num: e.detail.value.reg_num, telNO: e.detail.value.telNO, officers_name1: e.detail.value.officers_name1, officers_name2: e.detail.value.officers_name2, illegal_behavior: e.detail.value.illegal_behavior, document_number: e.detail.value.document_number, punishment_day: that.data.date.day, punishment_month: that.data.date.month, punishment_year: that.data.date.year, certificateID1: that.data.certificateID1, certificateID2: that.data.certificateID2, illegalLawName: that.data.illegalLawName, illegalTitle: that.data.illegalTitle, punishLawName: that.data.punishLawName, punishTitle: that.data.punishTitle, }) wx.navigateTo({ url: '../handWrite/handWrite', }) }) .catch(res=>{ // 处理执法人员2输入错误 console.log('发生错误!', res), wx.showToast({ title: '输入的执法人员2不存在', icon: 'none' }) }) }) .catch(res=>{ // 处理执法人员1输入错误 console.log('发生错误!', res), wx.showToast({ title: '输入的执法人员1不存在', icon: 'none' }) }) }, getStorage(){ // var that=this var business= wx.getStorageSync('business') var idCard= wx.getStorageSync('idCard') this.setData({ enterprise_name: business.enterprise_name, reg_num: business.reg_num, business_address: business.business_address, person_name: business.person_name, idCardNO: idCard.idCardNO, }) }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { this.initValidate() }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { this.getStorage() }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { } }) <!--pages/dangchu/dangchu.wxml--> <form bindsubmit="formSubmit" bindreset="formReset"> <view class="chapter"> <view class="chapter__title">当事人基本信息</view> <view class="section"> <view class="section__title">请输入当事人名称</view> <input class="ordinaryInput" name="enterprise_name" focus="true" value="{{enterprise_name}}"/> </view> <view class="section"> <view class="section__title">请输入统一社会信用代码</view> <input class="ordinaryInput" name="reg_num" value="{{reg_num}}"/> </view> <view class="section"> <view class="section__title">请输入住所地址</view> <input class="ordinaryInput" name="business_address" value="{{business_address}}"/> </view> <view class="section"> <view class="section__title">请输入法定代表人姓名</view> <input class="ordinaryInput" name="person_name" value="{{person_name}}"/> </view> <view class="section"> <view class="section__title">请输入法人身份证号</view> <input class="ordinaryInput" name="idCardNO" type="idcard" value="{{idCardNO}}"/> </view> <view class="section"> <view class="section__title">请输入法人联系电话</view> <input class="ordinaryInput" name="telNO" type="number"/> </view> </view> <view class="chapter"> <view class="chapter__title">处罚基本信息</view> <view class="section"> <view class="section__title">请输入文书编号</view> <input class="ordinaryInput" name="document_number" type="number"/> </view> <view class="section_two"> <view class="section__title">请输入执法人员姓名</view> <view class="twoInputBox"> <input class="twoInput" name="officers_name1" /> <input class="twoInput" name="officers_name2" /> </view> </view> <view class="section" style="clear: both;"> <view class="section__title">请输入处罚地点</view> <input class="ordinaryInput" name="punishment_address" value="{{business_address}}"/> </view> <view class="section"> <view class="section__title">请选择当前日期</view> <picker name="punishment_date" mode="date" start="2015-09-01" end="2025-12-01" bindchange="bindDateChange"> <view class="picker"> {{punishment_date}} <view class='arrow'></view> </view> </picker> </view> <view class="section"> <view class="section__title">请输入违法行为</view> <input class="ordinaryInput" name="illegal_behavior" value="{{inputValue}}" focus='true' confirm-type="search" placeholder="请输入违法行为的主要关键字" bindinput="onInput" /> <view class="line"></view> <scroll-view scroll-y="true" class="search-res" hidden="{{hideScroll}}"> <view class="sum">共找到和“{{inputValue}}”相关的结果{{searchTip.length}}个</view> <block wx:for="{{searchTip}}" wx:key="_id"> <view class="tip-item" bindtap="itemtap" data-info="{{item}}"> <view class="left"> <view class="tip"> <view>{{item.illegalLawName}}</view> <view>{{item.illegalTitle}}</view> </view> <view class="content"> {{item.illegalContent}} </view> </view> </view> </block> </scroll-view> </view> </view> <button formType="submit" class="End_button" type="primary">提交</button> </form> <view class="line"></view>
2022-01-16这样? [图片]
云数据库多条数据中的同一个字段要如何获取?[图片] [图片] 我想获取多条数据里的Date数据存入一个数组 我的Date里存的数据是string类型
2022-01-15这是base64,解码就行了
腾讯云函数获取微信公众号消息推送POST中的body不是xml格式怎么处理?使用腾讯云作为服务,使用云函数获取微信公众号消息推送POST中的body不是xml格式怎么处理 [图片]
2022-01-14url: 冒号不是等于号
按钮跳转页面,显示未定义模块“app.js”,是哪里错了?[图片][图片]
2022-01-14json里不需要access_token
服务端用code获取手机号一直报数据格式不对?服务端用code获取手机号一直报数据格式不对? [图片] 参数都是对的,数据格式json。一直返回47001 [图片] [图片]
2022-01-14[图片]
用开发者工具通过getwxacodeunlimit获得了buffer,怎么通过开发者工具获得图片呀?背景:小程序里面没有展示二维码的功能,我是想直接download两个二维码用于特定来源的运营活动的监测。 wx.request({ url: 'https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=(正确的token)', method: 'POST', header: { 'content-type': 'application/json' }, data: { "scene": "weibo_01" }, success: function (res) { console.log(res) // console.log(res.data) // 服务器回包信息,成功已显示buffer let buffer=res.data; const filePath = wx.env.USER_DATA_PATH + '/test3.jpg'; const fs = wx.getFileSystemManager() fs.writeFile({ filePath: filePath, data: buffer, encoding: 'utf8', success(res) { console.log(res) },/* */ fail(res) { console.error(res) } }) } }) } [图片] 已经拿到了buffer,并且写了一个jpg,但是打不开 [图片] 要怎么获得这个图片呢?
2022-01-13猜测图片有访问频率限制吧,html是验证登录界面
image控件加载http的图片出现加载失败的情况?image控件在加载http图片时,有时能显示图片,有时不行,截图是在同一个页面上,加载出来了一张图片另外三个加载不出来。图片是可以通过浏览器直接访问的。查看network后发现,失败的三个Content-type都是text/html,不知道这个有没有影响http://www.ayzyy.com/Uploads/image/20200909/1599645790878832.png http://www.ayzyy.com/Uploads/image/20200909/1599645752764901.png[图片][图片][图片][图片]
2022-01-13捕获.png是word?
云存储中的只能上传,无法下载?[图片] 下载下来的word文档内容 [图片]
2022-01-13