<link rel="stylesheet" type="text/css" href="<!--{$wapskin}-->js/cropper/css/cropper.min.css" />
<!--//裁剪头像 -->
<div class="oe_shade dialog" id="avatar_box" style="display:none;">
  <div class="oe_close mask cursor"></div>
  <div class="popup" style="left:0;">
    <div class="oe_top cursor bo_bf7">
      <h1>裁剪头像</h1>
      <span class="back" f="but_cancel_cut"><i class="iconfont icon-fanhui"></i></span>
      <div class="pa rt pr10">
        <em class="color_f fz15 bg_main lhn ptb6 plr15 cursor br2" f="but_submit_cut" id="but_submit_cut2">保存<img style="display:none;" class="vam" src="<!--{$urlpath}-->tpl/static/images/loading.gif" /></em>
      </div>
    </div>
    <div class="h48"></div>
    <div class="oe_avatar">
      <div class="avatar">
        <input type="hidden" id="x1" name="x1" value="" />
        <input type="hidden" id="y1" name="y1" value="" />
        <input type="hidden" id="w" name="w" value="" />
        <input type="hidden" id="h" name="h" value="" />
        <input type="hidden" id="userImage_code" name="userImage_code" value="" />
        <input type="hidden" id="userImage_width" name="userImage_width" value="" />
        <input type="hidden" id="userImage_height" name="userImage_height" value="" />
        <div class="profile_cut pa ltrb bg_f oh" style="top:1.28rem;bottom:110px;">
          <div id="imgBox" class="bg_f" style="width:350px;height:430px; margin: 0 auto;">
            <img id="userImage_id" width="220" height="270" src="" />
          </div>
          <div class="pa lbr pt10 bo_tf7">
            <p class="t_center h50 pb10" style="width: 80%; margin: 0 auto;">
              <button type="button" id="scaleX_id" class="bgn bn w30 cursor">
                <span class="iconfont icon-jiantou1 fz20"></span>
                <em class="block color_m pt5">左右变换</em>
              </button>
              <button type="button" id="scaleY_id" class="bgn bn w30 cursor">
                <span class="iconfont icon-jiantou-chui fz20"></span>
                <em class="block color_m pt5">上下变换</em>
              </button>
              <button type="button" id="rotateMax_id" class="bgn bn w30 btn_4 cursor">
                <span class="iconfont icon-rot fz20"></span>
                <em class="block color_m pt5">旋转90°</em>
              </button>
            </p>
        
            <p class="h50 t_center pr lh50">
              <button type="button" class="pa lt bgn bn h50 pl20 cursor" f="but_cancel_cut"><span class="iconfont icon-wrong fz22"></span></button>
              <label class="fz14">裁剪头像</label>
              <button type="button" class="pa bgn bn rt h50 pr20 cursor" f="but_submit_cut" id="but_submit_cut"><span class="iconfont icon-right fz24 vam"></span> <img style="display:none;" class="vam" src="<!--{$urlpath}-->tpl/static/images/loading.gif" /></button>	
            </p>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<!--{include file="<!--{$oetplpath}-->widget/block_uploadjs.tpl"}-->
<script src="<!--{$wapskin}-->js/cropper/cropper.min.js?v=<!--{$copyright_version}-->" ></script>
<script src="<!--{$wapskin}-->cp/js/avatar.cut.js?v=<!--{$copyright_version}-->"></script>

<script type="text/javascript">
var old_img = $("#img_url").val();
function upCallBack(data) {
    //需保存原来old_img
    $('#img_url').val(old_img);
    $('#img_preview').attr("src", old_img);
    
    if (typeof(data) == 'undefined') {
        data = null;
        return;
    }
    if (_inst_oecut) {
        _inst_oecut.initCallBack(data, 'avatar', 'img');
    }
}
</script>