微信小程序以ssm做后台开发

本文介绍了如何使用SSM框架为微信小程序开发后台。通过解析微信小程序的前端代码(WXML、WXSS、JS),特别是JS作为桥梁传递数据到SSM后台,利用wx.request接口发起HTTP请求。后台接收到JSON格式数据后,Java端需引入相应jar包处理。文章重点在于展示小程序前端与SSM后台的完整交互流程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

微信小程序任何的语言都可以做后台,现在微信小程序推出云函数,做后台也可以。但是自己感觉想要完整的后台,做后台用java和php更好点。下面以典型的例证给大家做一下讲解,注册。
1、wmxl
微信小程序的前段代码(提交数据主要以from表单实现的)

<view class="btn-submit">
        <button formType="reset">请完善注册信息</button>
</view>
<form catchsubmit="formSubmit" catchreset="formReset">
<view class="input-list">
  <view class="input-item">
    <text class="input-item-label">姓名</text>
    <view class="input-item-content">
      <input type="text" name="name" auto-focus placeholder="请输入您的姓名" bindinput="inputName"></input>
    </view>
  </view>

  <view class="input-item">
    <text class="input-item-label">性别</text>
    <picker class="input-item-content" bindchange="bindPickerChange" data-pickername="industry" value="{
  
  {industryindex}}" range="{
  
  {industryarr}}" mode="selector">{
  
  {industryarr[industryindex]}}
    </picker>
  </view>

  <view class="input-item">
    <text class="input-item-label">账号</text>
    <view class="input-item-content">
      <input type="idcard" name="tel" placeholder="请输入您的手机号码" maxlength="11" bindinput="inputPhone"></input>
    </view>
  </view>
  <view class="input-item">
    <text class="input-item-label">登录密码</text>
    <view class="input-item-content">
      <input type="password" name="password" auto-focus placeholder="请设置登录密码" bindinput="inputName"></input>
    </view>
  </view>
  <view class="input-item">
    <text class="input-item-label">邮箱</text>
    <view class="input-item-content">
      <input type="text" name="email" auto-focus placeholder="请输入您的邮箱" bindinput="inputName"></input>
    </view>
  </view>
  <view class="input-item">
					<text class="input-item-label">注册vip</text>
					<picker class="input-item-content" bindchange="bindPickerChange" data-pickername="status" value="{
  
  {statusindex}}" range="{
  
  {statusarr}}" mode="selector">{
  
  {statusarr[statusindex]}}
					</picker>
				</view>
</view>
<view class="btn-submit">
  <button type="primary" formType="submit">提交</button>
  <button formType="reset">置空</button>
</view>
</form>

2、wxss

/**app.wxss**/
/**app.wxss**/
page{
	height: 100%;
	color: #333;
  	display: flex;
  	flex-direction: column;

 	font: normal 30rpx/1.68 -apple-system-font, 'Helvetica Neue', Helvetica, 'Microsoft YaHei', sans-serif;
}
.container {
	flex: 1;
  	display: flex;
  	flex-direction: column;
 	box-sizing: border-box;
}
.container-body{
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
}
.container-footer{
	width: 100%;
	display: flex;
	height: 88rpx;
	border-top: 1rpx solid #ddd;
	background: #fff;
}
.container-footer text{
	flex: 1;
	display: block;
	text-al
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

1029179954

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值