小程序 表单 formId 为 the formId is a mock one

小程序 表单 formId 为 the formId is a mock one

微信小程序使用模板消息需要使用支付prepay_id或表单提交formId,

要获得 formId 需要在 form 标签中声明属性 report-submit="true" 
.wxml 代码如下:

<form report-submit="true" bindsubmit="formSubmit" bindreset="formReset">
  <label>姓名</label>
  <input name="name" />
  <button formType="submit" type="primary">提交表单</button>
</form>

.js 代码如下:

formSubmit: function (e) {
  // 获取表单id
  formId = e.detail.formId;
  // 非真机运行时 formId 应该为 the formId is a mock one
  console.log('表单id:', formId );
}

在微信开发者工具中运行获取的 formId 为 the formId is a mock one 要获得真实有效的 formId 需要在真机上运行

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Pass the Pivotal Certified Professional exam using source code examples, study summaries, and mock exams. In this book, you’ll find a descriptive overview of certification-related Spring modules and a single example application demonstrating the use of all required Spring modules. Also, it is suitable as an introductory primer for Spring newcomers. Furthermore, in Pivotal Certified Professional Spring Developer Exam: A Study Guide each chapter contains a brief study summary and question set, and the book’s free downloadable source code package includes one mock exam (50 questions – like a real exam). After using this study guide, you will be ready to take and pass the Pivotal Certified Professional exam. When you become Pivotal Certified, you will have one of the most valuable credentials in Java. The demand for Spring skills is skyrocketing. Pivotal certification helps you advance your skills and your career, and get the maximum benefit from Spring. Passing the exam demonstrates your understanding of Spring and validates your familiarity with: container-basics, aspect oriented programming (AOP), data access and transactions, Spring Security, Spring Boot, microservices and the Spring model-view-controller (MVC). Good luck! What You’ll Learn Understand the core principles of the popular Spring Framework Use dependency injection Work with aspects in Spring and do AOP (aspect oriented programming) Control transactional behavior and work with SQL and NoSQL (MongoDB) databases Create and secure web applications based on Spring MVC Get to know the format of exam and type of questions in it Create Spring microservices applications Who This Book Is For Spring developers who have taken the Pivotal Core Spring class are eligible to take the Pivotal Certified Professional exam.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值