微信小程序获取用户信息并更新

微信小程序获取用户信息并更新

接上一节,使用OUath获取用户信息

登录绑定邮箱

package com.qfjy.project.meeting.controller;

import com.qfjy.entity.po.User;
import com.qfjy.project.weixin.api.custom.text.CustomTextUtil;
import com.qfjy.service.UserService;
import com.qfjy.util.result.ResultCode;
import com.qfjy.util.result.ResultJson;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("user")
@Slf4j
public class UserController {
    /**用户业务逻辑层*/
    @Autowired
    private UserService userService;
    /**微信客服消息 --发消息接口*/
    @Autowired
    private CustomTextUtil customTextUtil;
    @RequestMapping("login")
    @ResponseBody
    public ResultJson login(@RequestParam("email") final String email,
                            @RequestParam("openid") final  String openid,
                            @RequestParam("wid") final int wid){

        //1.根据email 判断user对象是否存在
        User user=userService.selectUserByEmail(email);
        if(user==null){
            //您输入的邮箱未在后台,可联系管理员 2003
           return new ResultJson(null, ResultCode.NOT_DATA);
        }else{
             if (user.getWid()!=null){
                 //提示:您输入的邮箱已被其他用户绑定,有疑问,可联系管理员  2002


                 return new ResultJson(null, ResultCode.SUCCESS_IS_HAVE);
             }else {
                 //进行绑定业务逻辑(提示登录成功) 并主动给该用户发送消息(文本)
             int num=userService.updateWidByEmail(wid, email);
             log.info("用户完成半丁成功"+email+"\t"+wid);


             //主动给用户发送消息(文本)
                 String rname=user.getRid()==1?"发单组":"抢单组";

                 String context="尊敬的用户,"+user.getName()+"您好,登录成功,您的所在用户组是"+rname;
                 customTextUtil.sendMessage(openid, context);

             //登录成功  2000
             return new ResultJson(num,ResultCode.SUCCESS);
             }
        }

    }
    @PostMapping("update")
    @ResponseBody
    public ResultJson updateUser(User user){
       int num=userService.updateByPrimaryKeySelective(user);
       if(num>0){
           return new ResultJson(num,ResultCode.SUCCESS);
       }
        return new ResultJson(num,ResultCode.FAIL);
    }
//    @GetMapping("test")
//    public String test(){
//        return "weixin/user/userInfo";
//    }
}

user.java

package com.qfjy.entity.po;

import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * user
 * @author 
 */
@Data
public class User implements Serializable {
    private Integer id;

    private String name;

    private String email;

    private String telphone;

    private String city;

    private String province;

    private String zone;

    private Integer rid;

    private Integer wid;

    private Short status;

    private Date ceratedate;

    private static final long serialVersionUID = 1L;

    private Meetinggrab meetinggrab;

   
}

UserServcie.java

package com.qfjy.service;
import com.qfjy.entity.po.User;
import org.apache.ibatis.annotations.Select;
import java.util.List;

public interface UserService {
    User selectUserByWid(int wid);
    /**
     * 根据email 查询user对象
     * */

    User selectUserByEmail(String email);
    /**
     * 绑定业务逻辑(登录)  根据email更新wid   weiuser表和user表进行外键关联
     * */
    int updateWidByEmail(int wid,String email);

    int updateByPrimaryKeySelective(User user);
    /**
     * 会议发单--我的发单列表---选择讲者
     * 枪单者列表(用户信息)
     * */
    List<User> selectMeetingGrabUserByPid(String pid);
}

UserServiceImpl.java

package com.qfjy.service.impl;
import com.qfjy.entity.po.User;
import com.qfjy.mapper.UserMapper;
import com.qfjy.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
@Slf4j
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public User selectUserByWid(int wid) {
        return userMapper.selectUserByWid(wid);
    }
    @Override
    public User selectUserByEmail(String email) {
        return userMapper.selectUserByEmail(email);
    }
    @Override
    public int updateWidByEmail(int wid, String email) {
        return userMapper.updateWidByEmail(wid, email);
    }
    @Override
    public int updateByPrimaryKeySelective(User user) {
        return userMapper.updateByPrimaryKeySelective(user);
    }
    @Override
    public List<User> selectMeetingGrabUserByPid(String pid) {
        return userMapper.selectMeetingGrabUserByPid(pid);
    }
}

UserMapper.java

package com.qfjy.mapper;

import com.qfjy.entity.po.User;
import com.qfjy.entity.po.UserExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserMapper {
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    //根据wid查询user对象是否存在
    @Select("select * from user where wid=#{wid}")
    User selectUserByWid(int wid);

    /**
     * 根据email 查询user对象
     * */
    @Select("select * from user where email=#{email}")
    User selectUserByEmail(String email);

    /**
     * 绑定业务逻辑(登录)  根据email更新wid
     * */
    @Update("update user set wid=#{wid} where email=#{email}")
     int updateWidByEmail(int wid,String email);

    /**
     * 会议发单--我的发单列表---选择讲者
     * 枪单者列表(用户信息)
     * */
    List<User> selectMeetingGrabUserByPid(String pid);

}

UserMapper.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.qfjy.mapper.UserMapper">
  <resultMap id="BaseResultMap" type="com.qfjy.entity.po.User">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="email" jdbcType="VARCHAR" property="email" />
    <result column="telphone" jdbcType="VARCHAR" property="telphone" />
    <result column="city" jdbcType="VARCHAR" property="city" />
    <result column="province" jdbcType="VARCHAR" property="province" />
    <result column="zone" jdbcType="VARCHAR" property="zone" />
    <result column="rid" jdbcType="INTEGER" property="rid" />
    <result column="wid" jdbcType="INTEGER" property="wid" />
    <result column="status" jdbcType="SMALLINT" property="status" />
    <result column="cerateDate" jdbcType="TIMESTAMP" property="ceratedate" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    id, `name`, email, telphone, city, province, `zone`, rid, wid, `status`, cerateDate
  </sql>
  <select id="selectByExample" parameterType="com.qfjy.entity.po.UserExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from user
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    <if test="limit != null">
      <if test="offset != null">
        limit ${offset}, ${limit}
      </if>
      <if test="offset == null">
        limit ${limit}
      </if>
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from user
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from user
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.qfjy.entity.po.UserExample">
    delete from user
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.qfjy.entity.po.User" useGeneratedKeys="true">
    insert into user (`name`, email, telphone, 
      city, province, `zone`, 
      rid, wid, `status`, 
      cerateDate)
    values (#{name,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{telphone,jdbcType=VARCHAR}, 
      #{city,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR}, #{zone,jdbcType=VARCHAR}, 
      #{rid,jdbcType=INTEGER}, #{wid,jdbcType=INTEGER}, #{status,jdbcType=SMALLINT}, 
      #{ceratedate,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.qfjy.entity.po.User" useGeneratedKeys="true">
    insert into user
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="name != null">
        `name`,
      </if>
      <if test="email != null">
        email,
      </if>
      <if test="telphone != null">
        telphone,
      </if>
      <if test="city != null">
        city,
      </if>
      <if test="province != null">
        province,
      </if>
      <if test="zone != null">
        `zone`,
      </if>
      <if test="rid != null">
        rid,
      </if>
      <if test="wid != null">
        wid,
      </if>
      <if test="status != null">
        `status`,
      </if>
      <if test="ceratedate != null">
        cerateDate,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="email != null">
        #{email,jdbcType=VARCHAR},
      </if>
      <if test="telphone != null">
        #{telphone,jdbcType=VARCHAR},
      </if>
      <if test="city != null">
        #{city,jdbcType=VARCHAR},
      </if>
      <if test="province != null">
        #{province,jdbcType=VARCHAR},
      </if>
      <if test="zone != null">
        #{zone,jdbcType=VARCHAR},
      </if>
      <if test="rid != null">
        #{rid,jdbcType=INTEGER},
      </if>
      <if test="wid != null">
        #{wid,jdbcType=INTEGER},
      </if>
      <if test="status != null">
        #{status,jdbcType=SMALLINT},
      </if>
      <if test="ceratedate != null">
        #{ceratedate,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.qfjy.entity.po.UserExample" resultType="java.lang.Long">
    select count(*) from user
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>


  <update id="updateByExampleSelective" parameterType="map">
    update user
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=INTEGER},
      </if>
      <if test="record.name != null">
        `name` = #{record.name,jdbcType=VARCHAR},
      </if>
      <if test="record.email != null">
        email = #{record.email,jdbcType=VARCHAR},
      </if>
      <if test="record.telphone != null">
        telphone = #{record.telphone,jdbcType=VARCHAR},
      </if>
      <if test="record.city != null">
        city = #{record.city,jdbcType=VARCHAR},
      </if>
      <if test="record.province != null">
        province = #{record.province,jdbcType=VARCHAR},
      </if>
      <if test="record.zone != null">
        `zone` = #{record.zone,jdbcType=VARCHAR},
      </if>
      <if test="record.rid != null">
        rid = #{record.rid,jdbcType=INTEGER},
      </if>
      <if test="record.wid != null">
        wid = #{record.wid,jdbcType=INTEGER},
      </if>
      <if test="record.status != null">
        `status` = #{record.status,jdbcType=SMALLINT},
      </if>
      <if test="record.ceratedate != null">
        cerateDate = #{record.ceratedate,jdbcType=TIMESTAMP},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update user
    set id = #{record.id,jdbcType=INTEGER},
      `name` = #{record.name,jdbcType=VARCHAR},
      email = #{record.email,jdbcType=VARCHAR},
      telphone = #{record.telphone,jdbcType=VARCHAR},
      city = #{record.city,jdbcType=VARCHAR},
      province = #{record.province,jdbcType=VARCHAR},
      `zone` = #{record.zone,jdbcType=VARCHAR},
      rid = #{record.rid,jdbcType=INTEGER},
      wid = #{record.wid,jdbcType=INTEGER},
      `status` = #{record.status,jdbcType=SMALLINT},
      cerateDate = #{record.ceratedate,jdbcType=TIMESTAMP}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.qfjy.entity.po.User">
    update user
    <set>
      <if test="name != null">
        `name` = #{name,jdbcType=VARCHAR},
      </if>
      <if test="email != null">
        email = #{email,jdbcType=VARCHAR},
      </if>
      <if test="telphone != null">
        telphone = #{telphone,jdbcType=VARCHAR},
      </if>
      <if test="city != null">
        city = #{city,jdbcType=VARCHAR},
      </if>
      <if test="province != null">
        province = #{province,jdbcType=VARCHAR},
      </if>
      <if test="zone != null">
        `zone` = #{zone,jdbcType=VARCHAR},
      </if>
      <if test="rid != null">
        rid = #{rid,jdbcType=INTEGER},
      </if>
      <if test="wid != null">
        wid = #{wid,jdbcType=INTEGER},
      </if>
      <if test="status != null">
        `status` = #{status,jdbcType=SMALLINT},
      </if>
      <if test="ceratedate != null">
        cerateDate = #{ceratedate,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.qfjy.entity.po.User">
    update user
    set `name` = #{name,jdbcType=VARCHAR},
      email = #{email,jdbcType=VARCHAR},
      telphone = #{telphone,jdbcType=VARCHAR},
      city = #{city,jdbcType=VARCHAR},
      province = #{province,jdbcType=VARCHAR},
      `zone` = #{zone,jdbcType=VARCHAR},
      rid = #{rid,jdbcType=INTEGER},
      wid = #{wid,jdbcType=INTEGER},
      `status` = #{status,jdbcType=SMALLINT},
      cerateDate = #{ceratedate,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>

  <!--  选择讲者 显示用户信息-->
  <select id="selectMeetingGrabUserByPid" resultType="com.qfjy.entity.po.User" resultMap="selectMeetingGrabUserByPidResultMap">
   select u.*,grab.* from meetinggrab grab
   LEFT JOIN user u ON grab.uid=u.id
   where grab.pid=#{pid}
   and grab.`status`=1
   ORDER BY grab.createDate desc
  </select>
  <resultMap id="selectMeetingGrabUserByPidResultMap" type="com.qfjy.entity.po.User" extends="BaseResultMap">
     <association property="meetinggrab">
        <result column="grabstatus" jdbcType="SMALLINT" property="grabstatus" />
     </association>

  </resultMap>
</mapper>

login.html

<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <title></title>
    <!-- 引入 jQuery Mobile 样式 -->
    <link rel="stylesheet" href="http://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.css">
    <!-- 引入 jQuery 库 -->
    <script src="http://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
    <!-- 引入 jQuery Mobile 库 -->
    <script src="http://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
    <link href="https://cdn.bootcss.com/jquery-mobile/1.4.5/jquery.mobile.theme.css" rel="stylesheet">

    <script src="https://cdn.bootcss.com/jquery-validate/1.16.0/jquery.validate.js"></script>
    <script src="https://cdn.bootcss.com/jquery.form/4.2.1/jquery.form.js"></script>
    <script src="/weixin/js/jquerymobile_popup.js"></script>
    <script type="text/javascript">
        function login(){
            var email=$("#email").val();
            if(email.length<1){
                //alert("邮箱不能为空");
                openPopup('邮箱不能为空','提示',undefined,true,undefined,'error','cn');
                return ;
            }
            var openid=$("#openid").val();
            var wid=$("#wid").val();

             $.ajax({
                 type:"get",
                  url:"/user/login",
                  data:{"email":email,"openid":openid,"wid":wid}     ,
                  success:function(obj){
                if (obj.code == "2003") {
                    openPopup('您输入的邮箱未在后台,请联系管理员', '提示', undefined, true, undefined, 'error', 'cn');
                } else if (obj.code == "2002") {
                    openPopup('您输入的邮箱已被其他用户绑定,请联系管理员', '提示', undefined, true, undefined, 'error', 'cn');
                } else {
                    WeixinJSBridge.call('closeWindow');
                }
            }
            });

            //	openPopup('信息提示','提示',undefined,true,undefined,'error','cn');
            //	WeixinJSBridge.call('closeWindow');
        }
    </script>
    <style type="text/css">
        .ui-page{
            background:#eee;
        }
    </style>
</head>
<body>
<div data-role="page" id="pageMain" style="background-color: #4E90C7;">
    <div style="text-align:center;"><img src="/weixin/images/dada_logo1.png" style="width: 100%;"></div>

    <div data-role="content" class="content">
        <form id="login_params" method="post" >
            <input type="hidden" id="wid" th:value="${wid}"/>
            <input type="hidden" id="openid" th:value="${openid}"/>
            <div>
                <input type="text" id="email" name="email" placeholder="公司邮箱" style="background: url('${pageContext.request.contextPath}/images/ic_mail.png') no-repeat 5px;background-size: 30px;padding-left:40px;">

            </div>
            <div align="center" style="padding-top:30px;">
                <input id="pubBtn" type="button" value="登录"  onclick="login();" style="padding:10px;background: #E57330;text-shadow: none;opacity:100;color:white;font-size:20px;text-indent:0px;font-family:微软雅黑;border: none;-webkit-appearance:none;-moz-appearance:none;width: 100%;border-radius:7px;" >
            </div>
        </form>

    </div>
</div>
</body>
</html>

userInfo.html

<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <title>个人信息页面</title>

    <!-- 引入 jQuery Mobile 样式 -->
    <link rel="stylesheet" href="http://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.css">

    <!-- 引入 jQuery 库 -->
    <script src="http://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>

    <!-- 引入 jQuery Mobile 库 -->
    <script src="http://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>

    <script src="/weixin/js/jquerymobile_popup.js"></script>

    <style type="text/css">
        body {
            font-family:微软雅黑,arial;
            font-size:16px;
            padding:0px;
            margin:0 auto;
        }

        .font-blue{
            color:#4E90C7!important;
        }

        .input-lightblue{
            background-color: #E5F2FD!important;
        }

        .font-label{
            color: black!important;
            font-size: 19px!important;
        }

        /* 验证错误提示信息*/
        form label.error{color: Red;padding:0px;margin:0px;line-height:0px;white-space: nowrap;}
    </style>
    <script type="text/javascript">
        function close(){
            WeixinJSBridge.call('closeWindow');
        }

        function updateUser(){
            var dataObj = $("#form").serialize();
            var name = $("#name").val();
            var telphone = $("#telphone").val();
            //非空验证:
            if (name.length<1){
                openPopup('姓名不能为空!','提示',undefined,true,undefined,'error','cn');
                return ;
            }
            if (telphone.length<1){
                openPopup('手机号不能为空!','提示',undefined,true,undefined,'error','cn');
                return ;
            }
            $.ajax({
                type:"post",
                url:"/user/update",
                data:dataObj,   //data:{"id"=id,"name"=name.....}
                success:function (msg){
                    openPopup('更新成功!','提示',undefined,true,undefined,'error','cn');
                }

            })
        }
    </script>
</head>
<body>
<div data-role="page" id="pageMain">
    <div data-role="header" data-theme="c" style="background-color: #4E90C7;" data-position="fixed">
        <a href="javascript:close()" >返回</a>
        <h1>个人信息</h1>
    </div>
    <div style="padding-top:20px;padding-bottom: 20px">
        <form id="form"  method="post">
            <input type="hidden" id="id" name="id" th:value="${user.id}"/>
            <!-- <div>基本信息</div> -->
            <div>
                <div style="padding-right:20px;padding-left:20px">
                    <label for="name"  class="font-label">姓名(<font color="red">必填</font>)</label>
                    <input type="text" name="name" id="name" th:value="${user.name}"  placeholder="请输入您的真实姓名" class="required font-blue input-lightblue">
                </div>

                <div class="ui-grid-a" style="padding-right:20px;padding-left:20px">
                    <div class="ui-block-a" style="padding-right:10px">
                        <label for="province"  class="font-label">省份</label>
                        <input type="text" name="province" th:value="${user.province}" id="province"  placeholder="请输入您所在省份" class="font-blue input-lightblue">
                    </div>
                    <div class="ui-block-b" style="padding-left:10px">
                        <label for="city"  class="font-label">城市</label>
                        <input type="text" name="city" id="city" th:value="${user.city}"  placeholder="请输入您所在城市" class="font-blue input-lightblue">
                    </div>
                </div>

                <div class="ui-grid-a" style="padding-right:20px;padding-left:20px">
                    <div class="ui-block-a" style="padding-right:10px">
                        <label for="rid"  class="font-label">角色组(此项不可更改)</label>
                        <span th:if="${user.rid==1}">
                        <input type="text"  id="rid" value="发单组" class="font-blue input-lightblue" readonly="readonly">
                        </span>
                        <span th:if="${user.rid==2}">
                        <input type="text"  id="rid" value="抢单组" class="font-blue input-lightblue" readonly="readonly">
                        </span>
                    </div>
                    <div class="ui-block-b" style="padding-left:10px">
                        <label for="zone"  class="font-label">所属区域(此项不可更改)</label>
                        <input type="text" name="zone" th:value="${user.zone}" id="zone"  class="font-blue input-lightblue" readonly="readonly">
                    </div>
                </div>


                <div style="padding-right:20px;padding-left:20px">
                    <label for="cellphone"  class="font-label">手机号(<font color="red">必填</font>)</label>
                    <input type="text" name="telphone" id="telphone" th:value="${user.telphone}"  placeholder="请输入您的手机号" class="required isPhone font-blue input-lightblue" >

                    <label for="section"  class="font-label">邮箱(此项不可更改)</label>
                    <input type="text" id="email"  th:value="${user.email}" class="font-blue input-lightblue" readonly="readonly">
                </div>
            </div>
            <div style="padding-right:20px;padding-left:20px;padding-top:20px;">
                <input id="updateBtn" type="button" onclick="updateUser()" value="更新"  style="padding:10px;background: #e57330;text-shadow: none;opacity:100;color:white;font-size:20px;text-indent:0px;font-family:微软雅黑;" >
            </div>
        </form>
    </div>
</div>
</body>
</html>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值