From e2f3ba8e7db0429951e4d98e36ff662db519e888 Mon Sep 17 00:00:00 2001 From: txz Date: Thu, 19 May 2016 15:20:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1234567 | 1 + app/api/mobile/entities/activity.rb | 2 +- db/schema.rb | 59 ++++++++++++++++++++++- public/assets/wechat/activities.html | 52 ++++++++++---------- public/assets/wechat/homework_detail.html | 8 +-- public/assets/wechat/issue_detail.html | 2 +- public/javascripts/wechat/app.js | 7 ++- 7 files changed, 93 insertions(+), 38 deletions(-) create mode 100644 1234567 diff --git a/1234567 b/1234567 new file mode 100644 index 000000000..3d4e13b55 --- /dev/null +++ b/1234567 @@ -0,0 +1 @@ +{"access_token":"xAp1rQu0Xpv8CrlooZydXiyAQIqavONhB6FXnCl1Rw_nM-fyjUz-9foxqgkH2rPMwr5f1THUkzqxshoF3CZHjJM4CautpSlQ5e7MgkjF5-a8GB5gYCxtcdb5C1H2jyMgIOOcCGAPVV","expires_in":7200,"got_token_at":1463640239} \ No newline at end of file diff --git a/app/api/mobile/entities/activity.rb b/app/api/mobile/entities/activity.rb index 20876bf69..9bbdd22a4 100644 --- a/app/api/mobile/entities/activity.rb +++ b/app/api/mobile/entities/activity.rb @@ -84,7 +84,7 @@ module Mobile elsif ac.container_type == "Project" case ac.act_type when "Issue" - "项目缺陷" + "项目问题" when "Message" "项目讨论区" when "ProjectCreateInfo" diff --git a/db/schema.rb b/db/schema.rb index efc41f1eb..766348dc8 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20160426084709) do +ActiveRecord::Schema.define(:version => 20160513021204) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -57,6 +57,17 @@ ActiveRecord::Schema.define(:version => 20160426084709) do t.integer "user_id", :null => false end + create_table "apply_homeworks", :force => true do |t| + t.integer "status" + t.integer "user_id" + t.integer "homework_common_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "apply_homeworks", ["homework_common_id"], :name => "index_apply_homeworks_on_homework_common_id" + add_index "apply_homeworks", ["user_id"], :name => "index_apply_homeworks_on_user_id" + create_table "apply_project_masters", :force => true do |t| t.integer "user_id" t.string "apply_type" @@ -474,8 +485,10 @@ ActiveRecord::Schema.define(:version => 20160426084709) do t.integer "viewed" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false - t.string "content" + t.text "content" t.integer "status" + t.integer "apply_user_id" + t.integer "apply_result" end add_index "course_messages", ["course_message_type"], :name => "index_course_messages_on_course_message_type" @@ -1315,6 +1328,7 @@ ActiveRecord::Schema.define(:version => 20160426084709) do t.boolean "allow_guest_download", :default => true t.integer "visits", :default => 0 t.integer "show_mode", :default => 0 + t.integer "allow_teacher", :default => 0 end create_table "phone_app_versions", :force => true do |t| @@ -1678,6 +1692,20 @@ ActiveRecord::Schema.define(:version => 20160426084709) do t.integer "project_id" end + create_table "ssos", :force => true do |t| + t.integer "user_id" + t.string "openid" + t.string "name" + t.string "password" + t.string "email" + t.integer "sex" + t.string "school" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_index "ssos", ["user_id"], :name => "index_ssos_on_user_id" + create_table "student_work_projects", :force => true do |t| t.integer "homework_common_id" t.integer "student_work_id" @@ -1720,6 +1748,7 @@ ActiveRecord::Schema.define(:version => 20160426084709) do t.boolean "is_test", :default => false t.integer "simi_id" t.integer "simi_value" + t.float "work_score" end add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id" @@ -1751,6 +1780,31 @@ ActiveRecord::Schema.define(:version => 20160426084709) do add_index "students_for_courses", ["course_id"], :name => "index_students_for_courses_on_course_id" add_index "students_for_courses", ["student_id"], :name => "index_students_for_courses_on_student_id" + create_table "sub_document_comments", :force => true do |t| + t.text "content" + t.text "title" + t.integer "sub_domain_id" + t.integer "creator_id" + t.integer "parent_id" + t.integer "reply_id" + t.integer "locked" + t.integer "sticky" + t.integer "org_subfield_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "sub_domains", :force => true do |t| + t.integer "org_subfield_id" + t.integer "priority", :default => 0 + t.string "name" + t.string "field_type" + t.integer "hide", :default => 0 + t.integer "status", :default => 0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "subfield_subdomain_dirs", :force => true do |t| t.integer "org_subfield_id" t.string "name" @@ -1990,6 +2044,7 @@ ActiveRecord::Schema.define(:version => 20160426084709) do t.string "salt", :limit => 64 t.integer "gid" t.integer "visits", :default => 0 + t.integer "excellent_teacher", :default => 0 end add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id" diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index f0f8e9c92..b4e582336 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -17,18 +17,18 @@
- +
- 迟交扣分:{{act.homework_common_detail.late_penalty}}分 匿评开启时间:{{act.homework_common_detail.evaluation_start}}
- 缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品 匿评关闭时间:{{act.homework_common_detail.evaluation_end}} + 迟交扣分:{{act.homework_common_detail.late_penalty}}分 匿评开启时间:{{act.homework_common_detail.evaluation_start}}
+ 缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品 匿评关闭时间:{{act.homework_common_detail.evaluation_end}}
点击展开
{{act.activity_type_name}} {{act.latest_update}} - - {{act.reply_count}} + + {{act.reply_count}}
{{act.praise_count}}
{{act.praise_count}}
@@ -46,7 +46,7 @@
- +
@@ -54,8 +54,8 @@
{{act.activity_type_name}} {{act.latest_update}} - - {{act.reply_count}} + + {{act.reply_count}}
{{act.praise_count}}
{{act.praise_count}}
@@ -73,7 +73,7 @@
- +
@@ -81,8 +81,8 @@
{{act.activity_type_name}} {{act.latest_update}} - - {{act.reply_count}} + + {{act.reply_count}}
{{act.praise_count}}
{{act.praise_count}}
@@ -98,8 +98,8 @@
- - + +
@@ -116,7 +116,7 @@
- +
状态:{{act.issue_detail.issue_status}} 优先级:{{act.issue_detail.issue_priority}}
@@ -126,8 +126,8 @@
{{act.activity_type_name}} {{act.latest_update}} - - {{act.reply_count}} + + {{act.reply_count}}
{{act.praise_count}}
{{act.praise_count}}
@@ -146,7 +146,7 @@
- +
@@ -154,8 +154,8 @@
{{act.activity_type_name}} {{act.latest_update}} - - {{act.reply_count}} + + {{act.reply_count}}
{{act.praise_count}}
{{act.praise_count}}
@@ -170,8 +170,8 @@
- - + +
@@ -195,8 +195,8 @@ 点击展开
{{act.latest_update}} - - {{act.reply_count}} + + {{act.reply_count}}
{{act.praise_count}}
{{act.praise_count}}
@@ -215,15 +215,15 @@
- +
点击展开
{{act.latest_update}} - - {{act.reply_count}} + + {{act.reply_count}}
{{act.praise_count}}
{{act.praise_count}}
diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index 83d04edca..1af5e185d 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -16,10 +16,10 @@
- 迟交扣分:{{homework.late_penalty}}分
- 缺评扣分:{{homework.absence_penalty}}分/作品
- 匿评开启时间:{{homework.evaluation_start}}
- 匿评关闭时间:{{homework.evaluation_end}}
+ 迟交扣分:{{homework.late_penalty}}分
+ 缺评扣分:{{homework.absence_penalty}}分/作品
+ 匿评开启时间:{{homework.evaluation_start}}
+ 匿评关闭时间:{{homework.evaluation_end}}
{{homework.publish_time}} diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index d71f0cb65..950cbe18e 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -10,7 +10,7 @@ 来   源: - {{issue.project_name}}  |  项目缺陷 + {{issue.project_name}}  |  项目问题
diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index c591195c5..2201d4104 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -1,10 +1,10 @@ var app = angular.module('wechat', ['ngRoute','ngCookies']); var apiUrl = '/api/v1/'; -var debug = false; //调试标志,如果在本地请置为true +var debug = true; //调试标志,如果在本地请置为true if(debug===true){ - //apiUrl = 'http://localhost:3000/api/v1/'; - apiUrl = 'https://www.trustie.net/api/v1/'; + apiUrl = 'http://localhost:3000/api/v1/'; + //apiUrl = 'https://www.trustie.net/api/v1/'; } app.factory('auth', function($http,$routeParams, $cookies, $q){ @@ -383,7 +383,6 @@ app.directive('textAutoHeight', function($timeout){ $timeout(function(){ var e = element.parent().children().eq(5); var height = e[0].scrollHeight; - var offsetHeight = e[0].offsetHeight; if(height>90){ element.css('display', 'block'); element.on('click', function(){