<?php
/**
 * Created by PhpStorm.
 * User: sicilon_IT
 * Date: 2019/12/7
 * Time: 11:11
 */

namespace app\index\model;
use think\Model;


class memodel extends Model{
  // private $me_tabel;
    protected $table = 't_wxuser';

//   public function initialize(){
//       //echo "in";
//       $this->me_tabel=model("tEquipmentMe");
//       echo 'init';
//   }

    public function saveme($userinfo){
        $r_id=$this->allowField(true)->save($userinfo);
        return $r_id;
    }

    public function getinfobyopenid($openid){
        $record=$this->where("open_id",$openid)->find();
        return $record;
    }

    public function updatetelbyoopenid($openid,$tel){
        $r_id=$this->where("open_id",$openid)->update(['tel'=>$tel]);
        return $r_id;
    }
} 