- 今天周五就不审核了么?
就今天早上修改了一个字段,到现在都还没通过,今天是不审核了吗 着急啊
2019-03-01 - 如何获取通过wx:for创建的view的id
[代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'listPage'[代码] [代码]hover-class[代码][代码]=[代码][代码]'listPageSelect'[代码] [代码]wx:for[代码][代码]=[代码][代码]"{{sharedCourseInfo}}"[代码] [代码]data-index[代码][代码]=[代码][代码]'{{index}}'[代码] [代码]style[代码][代码]=[代码][代码]"flex-direction:column;"[代码] [代码]bindtap[代码][代码]=[代码][代码]'selectSharedCoursePage'[代码] [代码]wx:for-index[代码][代码]=[代码][代码]"index"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'justForGetID'[代码][代码]>{{sharedCourseInfo[index]['_id']}}</[代码][代码]view[代码][代码]>[代码] [代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'flex-wrp-row item'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'item-left flex-wrp-row'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]text[代码] [代码]class[代码][代码]=[代码][代码]'textOfHead'[代码][代码]>{{sharedCourseInfo[index]['courseName']}}</[代码][代码]text[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'item-right flex-wrp-row'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]text[代码] [代码]class[代码][代码]=[代码][代码]'textOfHead'[代码][代码]>{{sharedCourseInfo[index]['teacherName']}}</[代码][代码]text[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码] 老哥们,我通过wx:for创建view,想在点击的时候获取点击的是第几块view,方便我进行下一步页面的渲染,请问下怎么在点击时获取第几个view呢
2019-02-28 - 为什么wx.request只能请求utf-8的响应格式!
为何不支持gb2312?????????????????ide上可以,真机调试就request fail 这不是玩人么???
2019-02-19 - utf-8 fail 紧急问题求救
前天已经在ide上把所有流程跑通了,昨天真机调试出现了这个error:'request:fail response data convert to UTF8 fail',想做一个模拟登录教务处获取成绩查询的小程序,也就是这个网站不是自己的,昨天整了一天看到很多要服务器返回编码改成'utf-8'的,我这边服务器自己控制不了,所以改不了。我用ide打印res.header得到的消息如下:[图片] 在真机调试的时候,request直接失败进了fail,log是: [图片] 这是我的代码截图,请各位大仙帮忙看看,真的非常紧急,项目预定今天上线的,这是最后一个门槛了🤣🤣,如果有愿意帮忙调试的老哥,可以加我qq 307649087 我提供账号密码 🤣 可以有偿 [代码]// pages/login/login.js[代码][代码]//获取应用实例[代码][代码]const app = getApp()[代码] [代码]Page({[代码][代码] [代码][代码]data: {[代码][代码] [代码][代码]hasUserInfo: [代码][代码]false[代码][代码],[代码][代码] [代码][代码]canIUse: wx.canIUse([代码][代码]'button.open-type.getUserInfo'[代码][代码]),[代码][代码] [代码][代码]userName: [代码][代码]null[代码][代码],[代码][代码] [代码][代码]userPwd: [代码][代码]null[代码][代码],[代码][代码] [代码][代码]verificationCode: [代码][代码]null[代码][代码],[代码][代码] [代码][代码]verificationImageUrl: [代码][代码]null[代码][代码] [代码][代码]},[代码][代码] [代码][代码]//页面每次显示都要进行网络请求[代码][代码] [代码][代码]onShow: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]wx.request({[代码][代码] [代码][代码]url: [代码][代码]'https://jwxt.jnu.edu.cn/ValidateCode.aspx'[代码][代码],[代码][代码] [代码][代码]responseType: [代码][代码]'arraybuffer'[代码][代码],[代码][代码] [代码][代码]success: res => {[代码][代码] [代码][代码]var[代码] [代码]mBase64 = wx.arrayBufferToBase64(res.data)[代码][代码] [代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]verificationImageUrl: [代码][代码]'data:image/png;base64,'[代码] [代码]+ mBase64[代码][代码] [代码][代码]})[代码][代码] [代码][代码]app.globalData.userCookie = res.header[[代码][代码]'Set-Cookie'[代码][代码]][代码][代码] [代码][代码]//缓存本地[代码][代码] [代码][代码]wx.setStorageSync([代码][代码]'cookies'[代码][代码], res.header[[代码][代码]'Set-Cookie'[代码][代码]])[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码] [代码] [代码][代码]jnuLogin: [代码][代码]function[代码] [代码](e) {[代码][代码] [代码][代码]// 绑定的事件一般都传入个参数e,不填也ok[代码][代码] [代码][代码]var[代码] [代码]urlTmp = [代码][代码]'https://jwxt.jnu.edu.cn/Login.aspx/?__VIEWSTATE=%2FwEPDwUKMjA1ODgwODUwMg9kFgJmD2QWAgIBDw8WAh4EVGV4dAUk5pqo5Y2X5aSn5a2m57u85ZCI5pWZ5Yqh566h55CG57O757ufZGRk9KoyGrj1hrb%2FxZF6g8lZ2QQ9do4%3D&__VIEWSTATEGENERATOR=C2EE9ABB&__EVENTVALIDATION=%2FwEWBwLR44D1DQKDnbD2DALVp9zJDAKi%2B6bHDgKC3IeGDAKt86PwBQLv3aq9B47pXW7QJikyEA9%2B7Kos193HV3sp&txtYHBS='[代码] [代码]+ [代码][代码]this[代码][代码].data.userName + [代码][代码]'&txtYHMM='[代码] [代码]+ [代码][代码]this[代码][代码].data.userPwd + [代码][代码]'&txtFJM='[代码] [代码]+ [代码][代码]this[代码][代码].data.verificationCode + [代码][代码]'&btnLogin=%B5%C7++++%C2%BC'[代码][代码] [代码][代码]//1、登录[代码][代码] [代码][代码]wx.request({[代码][代码] [代码][代码]url: urlTmp,[代码][代码] [代码][代码]header: {[代码][代码] [代码][代码]'Cookie'[代码][代码]: app.globalData.userCookie,[代码][代码] [代码][代码]'content-type'[代码][代码]: app.globalData.content_type[代码][代码] [代码][代码]},[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]//判断登录是否成功[代码][代码] [代码][代码]//密码错误:你输入的用户名与口令不相符合[代码][代码] [代码][代码]//验证码错误:附加码不一致,请重新输入[代码][代码] [代码][代码]//学号错误:你输入的用户名与口令不相符合[代码][代码] [代码][代码]console.log(res.header)[代码][代码] [代码][代码]if[代码] [代码](res.data.match(/用户名与口令不相符合(.*)/)) {[代码][代码] [代码][代码]wx.showModal({[代码][代码] [代码][代码]title: [代码][代码]'提示'[代码][代码],[代码][代码] [代码][代码]content: [代码][代码]'用户名与口令不相符,请重新输入!'[代码][代码],[代码][代码] [代码][代码]})[代码][代码] [代码][代码]} [代码][代码]else[代码] [代码]if[代码] [代码](res.data.match(/附加码不一致(.*)/)) {[代码][代码] [代码][代码]wx.showModal({[代码][代码] [代码][代码]title: [代码][代码]'提示'[代码][代码],[代码][代码] [代码][代码]content: [代码][代码]'验证码不一致,请重新输入!'[代码][代码],[代码][代码] [代码][代码]})[代码][代码] [代码][代码]} [代码][代码]else[代码] [代码]{[代码][代码] [代码][代码]wx.showLoading({[代码][代码] [代码][代码]title: [代码][代码]'加载中'[代码][代码],[代码][代码] [代码][代码]})[代码] [代码] [代码][代码]//2、’学分完成进度查询‘[代码] //----⬇️------- 这里request失败,返回 utf-8 fail [代码] [代码][代码]wx.request({[代码][代码] [代码][代码]url: [代码][代码]'https://jwxt.jnu.edu.cn/default.aspx'[代码][代码],[代码][代码] [代码][代码]header: {[代码][代码] [代码][代码]'Cookie'[代码][代码]: app.globalData.userCookie,[代码][代码] [代码][代码]// 'Content-type':"text/html; charset=gb2312"[代码][代码] [代码][代码]'Content-type'[代码][代码]: app.globalData.content_type[代码][代码] [代码][代码]},[代码][代码] [代码][代码]success: res => {[代码][代码] [代码][代码]console.log(res.header)[代码][代码] [代码][代码]app.globalData.creditData = res.data[代码][代码] [代码][代码]//缓存本地[代码][代码] [代码][代码]// wx.setStorageSync('creditData', res.data)[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: res => {[代码][代码] [代码][代码]console.log(res)[代码][代码] [代码][代码]app.globalData.creditData = res.data[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码] [代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码] [代码] [代码][代码]}[代码][代码]})[代码]
2019-02-19