微信小程序以微信小程序以ssm做后台开发的实现示例做后台开发的实现示例
主要介绍了微信小程序以ssm做后台开发的实现示例,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价
值,需要的朋友们下面随着小编来一起学习学习吧
微信小程序任何的语言都可以做后台,现在微信小程序推出云函数,做后台也可以。但是自己感觉想要完整的后台,做后台用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-align: center;
height: 88rpx;
line-height: 88rpx;
font-size: 34rpx;
border-left: 1rpx solid #ddd;