浏览代码

employ mobile edit

abiao 2 年之前
父节点
当前提交
2300326cdb
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      app/models/employ.rb

+ 2 - 0
app/models/employ.rb

@@ -9,6 +9,8 @@ class Employ < ActiveRecord::Base
         wu = WxUser.where("user_id = ?", usr.id).first
         if !wu.blank?
             self.wx_user_id = wu.id
+        else
+          self.errors.add(:mobile,"该手机号尚未绑定微信账号,请员工预先绑定小程序!")
         end
       end
   end