用户姓名不显示
This commit is contained in:
parent
cb7834fa97
commit
1882cd8f4f
|
@ -24,6 +24,8 @@ module Mobile
|
||||||
u.nil? || u.user_extensions.nil? ? "" : u.user_extensions.brief_introduction
|
u.nil? || u.user_extensions.nil? ? "" : u.user_extensions.brief_introduction
|
||||||
when :student_num
|
when :student_num
|
||||||
u.nil? || u.user_extensions.nil? ? "" : u.user_extensions.student_id
|
u.nil? || u.user_extensions.nil? ? "" : u.user_extensions.student_id
|
||||||
|
when :realname
|
||||||
|
u.nil? ? "" : get_user_realname(u)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -37,7 +39,7 @@ module Mobile
|
||||||
#昵称
|
#昵称
|
||||||
expose :nickname
|
expose :nickname
|
||||||
#真名
|
#真名
|
||||||
expose :realname
|
user_expose :realname
|
||||||
#性别
|
#性别
|
||||||
user_expose :gender
|
user_expose :gender
|
||||||
#我的二维码
|
#我的二维码
|
||||||
|
|
|
@ -27,6 +27,10 @@ module ApiHelper
|
||||||
location
|
location
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_user_realname user
|
||||||
|
name = user.lastname + user.firstname
|
||||||
|
name.empty? || name.nil? ? user.login : name
|
||||||
|
end
|
||||||
|
|
||||||
def get_assigned_homeworks(homeworks, n, index)
|
def get_assigned_homeworks(homeworks, n, index)
|
||||||
homeworks += homeworks
|
homeworks += homeworks
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
var app = angular.module('wechat', ['ngRoute','ngCookies']);
|
var app = angular.module('wechat', ['ngRoute','ngCookies']);
|
||||||
var apiUrl = '/api/v1/';
|
var apiUrl = '/api/v1/';
|
||||||
var debug = true; //调试标志,如果在本地请置为true
|
var debug = false; //调试标志,如果在本地请置为true
|
||||||
|
|
||||||
if(debug===true){
|
if(debug===true){
|
||||||
apiUrl = 'http://localhost:3000/api/v1/';
|
apiUrl = 'http://localhost:3000/api/v1/';
|
||||||
|
@ -10,7 +10,7 @@ app.factory('auth', function($http,$routeParams, $cookies, $q){
|
||||||
var _openid = '';
|
var _openid = '';
|
||||||
|
|
||||||
if(debug===true){
|
if(debug===true){
|
||||||
_openid = "1";
|
_openid = "2";
|
||||||
}
|
}
|
||||||
|
|
||||||
var getOpenId = function() {
|
var getOpenId = function() {
|
||||||
|
|
Loading…
Reference in New Issue