//index.js //获取应用实例 const app = getApp() Page({ data:{ formIdArray:[] }, onLoad: function () { var userInfo = wx.getStorageSync('userInfo'); }, saveFormId: function (v) { if (v.detail.formId != 'the formId is a mock one') { this.data.formIdArray.push(v.detail.formId); } }, inputAccount: function (v) { this.data.account = v.detail.value }, inputPsw: function (v) { this.data.password = v.detail.value }, login:function(v){ this.saveFormId(v); // console.log("formIds:" + this.data.formIdArray) // console.log("账号:" + this.data.account) // console.log("密码:" + this.data.password) }, })