Compare commits

...

23 Commits

Author SHA1 Message Date
lovelyzhang 90385bafcf zy:add document 2017-01-14 18:44:56 +08:00
lovelyzhang 6904dce21e zy: finish 2017-01-14 16:24:53 +08:00
lovelyzhang dc6569c4dd zy: activity show people name 2017-01-14 16:23:53 +08:00
lovelyzhang 790ac40def zy:check for finish 2017-01-14 16:13:23 +08:00
lovelyzhang 49138c748b zy:add sendgird send mail 2017-01-14 15:43:34 +08:00
lovelyzhang 9dad27c6da zy:view routes profile 2017-01-07 12:33:43 +08:00
lovelyzhang c29cd77767 zy: fix add user chat bug 2017-01-07 11:18:42 +08:00
lovelyzhang a4b1ac9448 zy: fix micro_post view activity view bug 2017-01-06 21:15:51 +08:00
lovelyzhang 45c05a4881 zy: fix micro_post view activity view bug 2017-01-06 21:13:28 +08:00
lovelyzhang b601bcf6f1 zy: fix micro_post comments bugs 2017-01-06 21:09:03 +08:00
lovelyzhang 143e384838 zy:change gitignore 2017-01-05 22:15:34 +08:00
lovelyzhang 9bf238a96e merge mail 2017-01-05 22:13:58 +08:00
lovelyzhang d20cb8ec83 zy: add mail send code to change password 2017-01-05 22:07:22 +08:00
lovelyzhang 1746c9dde7 zy:test pic 2017-01-02 23:31:07 +08:00
lovelyzhang 92821cfd87 zy: add verify code 2017-01-02 22:57:19 +08:00
lovelyzhang 2c21dc9142 zy:reset db 2016-12-27 22:39:43 +08:00
lovelyzhang b18ed5c4e0 zy:fix joinactivity 2016-12-27 22:33:37 +08:00
lovelyzhang 40f8bfc049 zy: user only comments and activity finished 2016-12-27 22:21:50 +08:00
lovelyzhang face9b417f zy: delete post 2016-12-27 17:45:57 +08:00
lovelyzhang af26c41a7d zy:modify activity signup and quit 2016-12-27 16:49:34 +08:00
lovelyzhang 4a24c82a0e zy: db migrate 2016-12-27 11:53:07 +08:00
lovelyzhang 11410f9b86 zy: add new column to micro_posts 2016-12-27 11:51:36 +08:00
lovelyzhang b42036399e zy:modify time zone 2016-12-27 11:24:34 +08:00
52 changed files with 743 additions and 640 deletions

7
.gitignore vendored
View File

@ -53,6 +53,7 @@ build-iPhoneSimulator/
# JetBrain的忽略文件
.idea/*
public/data/*
public/userpics/*
# rails的忽略文件
@ -100,3 +101,9 @@ bower.json
# Ignore Byebug command history file.
.byebug_history
db/*.sqlite3
logs.txt

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Settings><!--This file was automatically generated by Ruby plugin.
You are allowed to:
1. Reorder generators
2. Remove generators
3. Add installed generators
To add new installed generators automatically delete this file and reload the project.
--><GeneratorsGroup><Generator name="assets" /><Generator name="channel" /><Generator name="coffee:assets" /><Generator name="controller" /><Generator name="generator" /><Generator name="helper" /><Generator name="integration_test" /><Generator name="jbuilder" /><Generator name="job" /><Generator name="js:assets" /><Generator name="mailer" /><Generator name="migration" /><Generator name="model" /><Generator name="resource" /><Generator name="scaffold" /><Generator name="scaffold_controller" /><Generator name="task" /><Generator name="test_unit:generator" /><Generator name="test_unit:plugin" /></GeneratorsGroup></Settings>

File diff suppressed because one or more lines are too long

View File

@ -1,193 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="RUBY_MODULE" version="4">
<component name="FacetManager">
<facet type="RailsFacetType" name="Ruby on Rails">
<configuration>
<RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_SUPPORT_REMOVED" VALUE="false" />
<RAILS_FACET_CONFIG_ID NAME="RAILS_TESTS_SOURCES_PATCHED" VALUE="true" />
<RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_APPLICATION_ROOT" VALUE="$MODULE_DIR$" />
</configuration>
</facet>
</component>
<component name="ModuleRunConfigurationManager">
<configuration default="false" name="test: guoren" type="RakeRunConfigurationType" factoryName="Rake">
<module name="guoren" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs>
<env name="RAILS_ENV" value="test" />
</envs>
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="test" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":test_unit " />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
<method />
</configuration>
<configuration default="false" name="spec: guoren" type="RakeRunConfigurationType" factoryName="Rake">
<module name="guoren" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="spec" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":rspec " />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
<method />
</configuration>
<configuration default="false" name="Production: guoren" type="RailsRunConfigurationType" factoryName="Rails">
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
<module name="guoren" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="production" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
<method />
</configuration>
<configuration default="false" name="Development: guoren" type="RailsRunConfigurationType" factoryName="Rails">
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
<module name="guoren" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
<method />
</configuration>
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/.bundle" />
<excludeFolder url="file://$MODULE_DIR$/components" />
<excludeFolder url="file://$MODULE_DIR$/public/system" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
<excludeFolder url="file://$MODULE_DIR$/vendor/bundle" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="actioncable (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionmailer (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionpack (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="actionview (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activejob (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activemodel (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activerecord (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="activesupport (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="arel (v7.1.4, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bcrypt (v3.1.11, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.2, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.13.6, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="byebug (v9.0.6, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coffee-rails (v4.2.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coffee-script (v2.4.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="coffee-script-source (v1.11.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.0.2, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="debug_inspector (v0.0.2, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="erubis (v2.7.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="execjs (v2.7.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="ffi (v1.9.14, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="globalid (v0.3.7, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="i18n (v0.7.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="jbuilder (v2.6.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="jquery-rails (v4.2.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="listen (v3.0.8, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="loofah (v2.0.3, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mail (v2.6.4, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="method_source (v0.8.2, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mime-types (v3.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mime-types-data (v3.2016.0521, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.1.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.9.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.12.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="nio4r (v1.2.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.6.8.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="puma (v3.6.2, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rack (v2.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rack-test (v0.6.3, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rails (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.0.3, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="railties (v5.0.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rake (v11.3.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.9.8, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.9.7, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sass (v3.4.22, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sass-rails (v5.0.6, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="spring (v2.0.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="spring-watcher-listen (v2.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sprockets (v3.7.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sprockets-rails (v3.2.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="sqlite3 (v1.3.12, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="thor (v0.19.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.5, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="tilt (v2.0.5, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="turbolinks (v5.0.1, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="turbolinks-source (v5.0.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.2, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="uglifier (v3.0.3, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="web-console (v3.4.0, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="websocket-driver (v0.6.4, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="websocket-extensions (v0.1.2, rbenv: 2.3.1) [gem]" level="application" />
<orderEntry type="library" scope="PROVIDED" name="will_paginate (v3.1.5, rbenv: 2.3.1) [gem]" level="application" />
</component>
<component name="RModuleSettingsStorage">
<LOAD_PATH number="0" />
<I18N_FOLDERS number="1" string0="$MODULE_DIR$/config/locales" />
</component>
</module>

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 2.3.1" project-jdk-type="RUBY_SDK" />
</project>

View File

@ -1,27 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Development: guoren" type="RailsRunConfigurationType" factoryName="Rails">
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
<module name="guoren" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
<method />
</configuration>
</component>

View File

@ -1,27 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Production: guoren" type="RailsRunConfigurationType" factoryName="Rails">
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
<module name="guoren" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="production" />
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
<method />
</configuration>
</component>

View File

@ -1,25 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="spec: guoren" type="RakeRunConfigurationType" factoryName="Rake">
<module name="guoren" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs />
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="spec" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":rspec " />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
<method />
</configuration>
</component>

View File

@ -1,27 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="test: guoren" type="RakeRunConfigurationType" factoryName="Rake">
<module name="guoren" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
<envs>
<env name="RAILS_ENV" value="test" />
</envs>
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
<COVERAGE_PATTERN ENABLED="true">
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
</COVERAGE_PATTERN>
</EXTENSION>
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="test" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":test_unit " />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
<method />
</configuration>
</component>

View File

@ -27,6 +27,7 @@ gem 'jbuilder', '~> 2.5'
gem 'bcrypt', '~> 3.1.7'
# will_paginate
gem 'will_paginate', '~> 3.1.0'
gem 'sendgrid-ruby'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

View File

@ -118,6 +118,7 @@ GEM
rb-fsevent (0.9.8)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
ruby_http_client (3.0.0)
sass (3.4.22)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
@ -125,6 +126,8 @@ GEM
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sendgrid-ruby (4.0.6)
ruby_http_client (~> 3.0.0)
spring (2.0.0)
activesupport (>= 4.2)
spring-watcher-listen (2.0.1)
@ -177,6 +180,7 @@ DEPENDENCIES
rails (~> 5.0.0, >= 5.0.0.1)
rake
sass-rails (~> 5.0)
sendgrid-ruby
spring
spring-watcher-listen (~> 2.0.0)
sqlite3

View File

@ -3,6 +3,7 @@ class ApplicationController < ActionController::Base
include ApplicationHelper
include LoginHelper
include UsersHelper
# Confirms a logged-in user.

View File

@ -68,9 +68,14 @@ class ChatController < ApplicationController
query_name = nil
ok = false
else
query_name = query_user.name
query_pic = query_user.picurl
ok = true
if query_name == @user.name
query_name = nil
ok = false
else
query_name = query_user.name
query_pic = query_user.picurl
ok = true
end
end
else
if all_user_names.include? query_name or query_name == @user.name

View File

@ -12,7 +12,7 @@ class MainController < ApplicationController
page_num = 1
end
if !post_type
post_type=[1,2,3]
post_type=[1, 2, 3]
end
@posts = MicroPost.where(post_type: post_type).paginate(:page => page_num, :per_page => 10).order(post_time: :desc)
@ -22,18 +22,17 @@ class MainController < ApplicationController
end
def activity
@user = current_user
micro_post_id = params[:micropost_id]
join = params[:join].to_s
micro_post = MicroPost.find_by(id: micro_post_id)
if join == "true"
micro_post.engage_people += 1
num, names = new_engaged_people(micro_post_id, current_user.name)
else
micro_post.engage_people -= 1
end
if micro_post.save
render json: {total_num: micro_post.engage_people}
num, names = delete_engaged_people(micro_post_id, current_user.name)
end
render json: {total_num: num, total_names: names}
end
end

View File

@ -27,10 +27,23 @@ class MicroPostsController < ApplicationController
if post_type >= 1 and post_type <= 3 and !title.empty? and !content.empty?
micropost = @user.micro_posts.new(title: title, content: content, pic: pic_path,
post_time: DateTime.now, post_type: post_type, engage_people: 0)
post_time: DateTime.now, post_type: post_type,
engage_people: 1, engaged_people_names: current_user.name)
micropost.save
end
redirect_to microposts_path
end
def delete
@user = current_user
micropost_id = params[:micropost_id].to_i
micropost_id = @user.micro_posts.find_by(id: micropost_id)
if micropost_id
micropost_id.destroy
render json: {status:true}
else
render json: {status:false}
end
end
end

View File

@ -1,4 +1,8 @@
class UsersController < ApplicationController
before_action :logged_in_user,except: [:new,:create,:forgetpasswd,:changepasswd]
@@user_pics_dir = "public/userpics"
def new
@user = User.new
end
@ -20,14 +24,65 @@ class UsersController < ApplicationController
def update
if @user.update_attributes(user_params)
flash[:success]="profile updated"
redirect_to @user
end
def forgetpasswd
useremail = params[:email]
if useremail
@user = User.find_by(email: useremail)
if !@user.nil?
send_code @user
flash[:success] = "验证码已发送至您的邮箱"
redirect_to changepasswd_path(email: @user.email)
else
flash[:danger] = "用户不存在"
render 'forgetpasswd'
end
else
render 'edit'
render 'forgetpasswd'
end
end
def changepasswd
if request.get?
user_email = params[:email]
if user_email
@user = User.find_by(email: user_email)
if !@user.nil?
render 'changepasswd'
else
flash[:danger] = "用户不存在"
redirect_to login_path
end
else
redirect_to login_path
end
else
result = check_change_params(params[:email], params[:verify_code], params[:password], params[:password_confirm])
if result
flash[:success]="密码更新成功"
else
flash[:danger]="密码更新失败"
end
redirect_to login_path
end
end
def changeprofile
@user = current_user
result, user, err_string = check_change_profile_params(params[:user])
if result == false
flash[:danger] = err_string
else
pic_url = save_user_pic params[:user][:pic]
if pic_url.nil? == false
user[:picurl] = pic_url
end
@user.update_attributes(user)
end
redirect_to profile_path
end
private
@ -36,4 +91,58 @@ class UsersController < ApplicationController
:password_confirmation)
end
def check_change_profile_params user_params
if user_params.nil?
return false, nil, "修改参数为空"
end
if user_params[:username].length <= 0
return false, nil, "姓名错误"
end
user = Hash.new
user[:name] = user_params[:username]
user[:profession] = user_params[:profession]
user[:sexual] = user_params[:sexual]
return true, user, nil
end
def save_user_pic pic
if pic.nil?
return nil
end
if !(File.directory? @@user_pics_dir)
FileUtils.mkdir_p(@@user_pics_dir)
end
ext = File.extname(pic.original_filename)
timestamp = Time.now.to_s
picname = Digest::MD5::hexdigest(pic.original_filename + timestamp) + ext
File.open(File.join(@@user_pics_dir, picname), 'wb') { |f| f.write(pic.read) }
save_name = File.join("userpics", picname)
return save_name
end
def send_code user
verify_code = rand(999999).to_s
result = UserMailer.send_verify_code(user.email, verify_code).deliver_now
p result
user.update_attribute(:verify_code, verify_code)
end
def check_change_params(email, verify_code, password, password_confirmation)
if password != password_confirmation
return false
end
user = User.find_by(email: email)
if user.nil?
return false
end
if user.verify_code != verify_code
return false
end
hold = Hash.new
hold[:password] = password
hold[:password_confirmation] = password_confirmation
user.update_attributes(hold)
return true
end
end

View File

@ -2,7 +2,8 @@ module ApplicationHelper
def get_strftime intime
# 将数据库中的UTC时间转换为本地时间
return intime.localtime.strftime(format='%F %T')
return intime.utc.in_time_zone('Beijing').strftime(format='%F %T')
end
end

View File

@ -1,35 +1,5 @@
module MainHelper
def read_newest_post offset_num
micro_posts_array = []
micro_posts = MicroPost.all.order(post_time: :desc).limit(20).offset(offset_num)
if !micro_posts.empty?
micro_posts.each do |micro_post|
x = Hash.new()
x["username"] = micro_post.user.name
x["userpic"] = micro_post.user.picurl
x["postid"] = micro_post.id
x["title"] = micro_post.title
x["content"] = micro_post.content
case micro_post.post_type
when 1
x["type"] = "新鲜事"
when 2
x["type"] = "组团信息"
when 3
x["type"] = "失物招领"
else
x["type"] = "新鲜事"
end
x["time"] = get_strftime(micro_post.post_time)
x["pics"] = micro_post.pic.split(',') if micro_post.pic
x["peo_num"] = micro_post.engage_people
micro_posts_array << x
end
end
return micro_posts_array
end
def get_post posts
micro_posts_array = []
if !posts.empty?
@ -59,4 +29,69 @@ module MainHelper
return micro_posts_array
end
end
def get_engaged_people micropost_id
# 获得参加活动的人数和姓名
MicroPost.transaction do
micropost = MicroPost.lock.find_by(id: micropost_id)
engage_people = micropost.engage_people
engage_people_name = micropost.engaged_people_names
return engage_people, engage_people_name
end
end
def save_engaged_people(micropost_id, num, names)
# 将参加活动的人数和姓名存入数据库中
MicroPost.transaction do
micropost = MicroPost.lock.find_by(id: micropost_id)
micropost.engage_people = num
micropost.engaged_people_names = names
micropost.save
end
end
def new_engaged_people(micropost_id, name)
# 新参加活动登记
engage_people, engage_people_names = get_engaged_people micropost_id
if engage_people_names.nil?
engage_people += 1
engage_people_names = name
else
engage_people_names = engage_people_names.split(',')
if engage_people_names.include?(name) != true
engage_people_names << name
engage_people += 1
end
engage_people_names = engage_people_names.join(',')
end
save_engaged_people(micropost_id, engage_people, engage_people_names)
return engage_people, engage_people_names
end
def delete_engaged_people(micropost_id, name)
# 退出活动登记
engage_people, engage_people_names = get_engaged_people micropost_id
engage_people_names = engage_people_names.split(',')
if engage_people_names.delete(name)
engage_people_names = engage_people_names.join(',')
engage_people -= 1
save_engaged_people(micropost_id, engage_people, engage_people_names)
end
return engage_people,engage_people_names
end
def joinded_activity(micropost_id,name)
engage_people, engage_people_names = get_engaged_people micropost_id
if engage_people_names.nil?
return false
end
engage_people_names = engage_people_names.split(',')
return engage_people_names.include?(name)
end
def micro_post_belong_to_user(micropost_id,user)
find_result = user.micro_posts.where(id: micropost_id)
return !find_result.empty?
end
end

View File

@ -9,6 +9,7 @@ module MicroPostsHelper
if !micro_posts.empty?
micro_posts.each do |micro_post|
x = Hash.new()
x["postid"] = micro_post.id
x["title"] = micro_post.title
x["content"] = micro_post.content
case micro_post.post_type
@ -24,6 +25,8 @@ module MicroPostsHelper
x["time"] = get_strftime(micro_post.post_time)
x["pics"] = micro_post.pic.split(',') if micro_post.pic
x["peo_num"] = micro_post.engage_people
x["peo_names"] = micro_post.engaged_people_names
x["comments"] = micro_post.comments
micro_posts_array << x
end
end

View File

@ -1,2 +1,11 @@
module UsersHelper
def get_user_name_from_id user_id
user = User.find_by(id: user_id)
return user.name if !user.nil?
end
def get_user_sexual user
user.sexual
end
end

View File

@ -1,4 +1,4 @@
class ApplicationMailer < ActionMailer::Base
default from: 'from@example.com'
default from: "ucasguoren@heroku.com"
layout 'mailer'
end

View File

@ -0,0 +1,9 @@
class UserMailer < ApplicationMailer
default from: "ucasguoren@heroku.com"
def send_verify_code mail_address, code
@verify_code = code
mail(to: mail_address, subject: "验证码")
end
end

View File

@ -1,4 +1,4 @@
class MicroPost < ApplicationRecord
belongs_to :user, dependent: :destroy
belongs_to :user
has_many :comments, class_name: 'Comment', foreign_key: 'micro_post_id', dependent: :destroy
end

View File

@ -2,11 +2,13 @@ class User < ApplicationRecord
before_save :default_values
def default_values
self.picurl = 'images/avatars/default/avatar.png'
if self.picurl.nil?
self.picurl = 'images/avatars/default/avatar.png'
end
end
has_many :send_messages, class_name: 'Message', foreign_key: 'send_user'
has_many :recieve_messages, class_name: 'Message', foreign_key: 'recieve_user'
has_many :send_messages, class_name: 'Message', foreign_key: 'send_user', dependent: :destroy
has_many :recieve_messages, class_name: 'Message', foreign_key: 'recieve_user', dependent: :destroy
has_many :micro_posts, dependent: :destroy
has_many :comments, class_name: 'Comment', foreign_key: 'user_id', dependent: :destroy
@ -22,4 +24,6 @@ class User < ApplicationRecord
has_secure_password
validates :password, presence: true, length: {minimum: 6}, allow_nil: true
end

View File

@ -8,8 +8,8 @@
<%= form_tag(controller: "login", action: "login", method: "post") do %>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-envelope"></i></span><input class="form-control"
placeholder="请输入登陆账号"
<span class="input-group-addon"><i class="icon-user"></i></span><input class="form-control"
placeholder="请输入登陆邮箱"
name="email"
type="text">
</div>
@ -22,10 +22,10 @@
type="password">
</div>
</div>
<a class="pull-right" href="#">忘记密码?</a>
<div class="text-left">
<label class="checkbox"><input type="checkbox" name="remember" ><span>记住我</span></label>
</div>
<a class="pull-right" href="/forgetpasswd">忘记密码?</a>
<!--<div class="text-left">-->
<!--<label class="checkbox"><input type="checkbox" name="remember"><span>记住我</span></label>-->
<!--</div>-->
<input class="btn btn-lg btn-primary btn-block" type="submit" value="登陆">
<% end %>
<p>

View File

@ -32,19 +32,24 @@
</div>
<% end %>
</div>
<% if micro_post["type"] == "组团信息" %>
<div class="social-button">
<button class="btn btn-lg btn-success-outline activity">报名参加
</button>
<div class="activity-detail text-center">
</div>
</div>
<% end %>
<% if micro_post["type"] == "失物招领" %>
<div class="social-button">
<button class="btn btn-success-outline lost">跟ta联系
</button>
</div>
<% if micro_post_belong_to_user(micro_post["postid"], @user) == false %>
<% if micro_post["type"] == "组团信息" %>
<div class="social-button">
<% if joinded_activity(micro_post["postid"], @user.name) %>
<button class="btn btn-lg btn-success-outline activity">取消报名</button>
<div class="activity-detail text-center"></div>
<% else %>
<button class="btn btn-lg btn-success-outline activity">报名参加</button>
<div class="activity-detail text-center"></div>
<% end %>
</div>
<% end %>
<% if micro_post["type"] == "失物招领" %>
<div class="social-button">
<button class="btn btn-success-outline lost">跟ta联系
</button>
</div>
<% end %>
<% end %>
</div>
<div class="comment-button">
@ -171,7 +176,7 @@
success: function (data, textStatus, jqXHR) {
//console.log(data["total_num"]);
var engage_people = data["total_num"];
var show_text = "已有" + engage_people + "人参加该活动";
var show_text = "已有" + engage_people + "人参加该活动" + '\n' + data["total_names"] + "参加了活动";
activity.text("取消报名");
micropost.find(".activity-detail").text(show_text);
}
@ -185,7 +190,7 @@
url: '/activity',
success: function (data, textStatus, jqXHR) {
activity.text("报名参加");
micropost.find(".activity-detail").text("");
micropost.find(".activity-detail").text("成功取消报名");
}
});
}

View File

@ -8,7 +8,7 @@
<!-- End Navigation -->
<div class="container-fluid main-content padded" id="user-page">
<row id="new-post">
<div class="row" id="new-post">
<div class="widget-container fluid-height clearfix">
<div class="heading">
<i class="icon-reorder"></i>发布新信息
@ -56,12 +56,12 @@
</div>
<% end %>
</div>
</row>
</div>
<div class="posts">
<% @micro_posts.each do |micro_post| %>
<div class="micro-post">
<button class="close" data-dismiss="alert" type="button">×</button>
<div class="micro-post" id="<%= micro_post["postid"] %>">
<button class="close delete-post" data-dismiss="alert" type="button">×</button>
<div class="widget-container fluid-height padded">
<div class="heading col-md-12">
<i class="icon-tags"><%= micro_post["type"] %></i>
@ -77,13 +77,48 @@
</div>
<% end %>
</div>
<div class="col-md-12">
<div class="btn btn-default btn-block">
<div class="btn btn-default btn-block show-details">
查看详情
</div>
</div>
</div>
<div class="activity-details" hidden>
<% if micro_post["type"] == "组团信息" %>
<div class="widget-container fluid-height">
<div class="heading">
<i class="icon-align-center"> 活动详情 </i>
</div>
<div class="widget-content padded">
<h3 class="text-center">已有<%= micro_post["peo_num"] %>人参加活动</h3>
<p><%= micro_post["peo_names"] %>参加了该活动</p>
</div>
</div>
<% end %>
<% if !micro_post["comments"].empty? %>
<div class="widget-container fluid-height scrollable list user-comments">
<div class="heading">
<i class="icon-mail-forward"> 评论 </i>
</div>
<div class="widget-content fluid-height">
<ul>
<% micro_post["comments"].each do |comment| %>
<li>
<div>
<a class="user-name"><%= get_user_name_from_id(comment.user_id) %></a><em></em>
</div>
<div>
<p><%= comment.content %></p>
</div>
</li>
<% end %>
</ul>
</div>
</div>
<% else %>
<p class="text-center alert-info">暂无评论</p>
<% end %>
</div>
</div>
<% end %>
</div>
@ -186,4 +221,41 @@
function G(id) {
return document.getElementById(id);
}
$(".delete-post").bind("click", function () {
var errorhtml = '<div class="alert alert-danger">' +
'<button class="close" data-dismiss="alert" type="button">×</button>删除失败</div>';
var successhtml = '<div class="alert alert-success">' +
'<button class="close" data-dismiss="alert" type="button">×</button>删除成功</div>';
var micropost_id = $(this).parent().attr("id");
$.ajax({
type: 'get',
dataType: 'json',
data: {micropost_id: micropost_id},
url: '/deletepost',
success: function (data, textStatus, jqXHR) {
if (data['status'] == true) {
$('.posts').before(successhtml);
}
else {
$('.posts').before(errorhtml);
}
}
});
});
$('.show-details').bind("click", function () {
var current_button = $(this);
var micropost = current_button.parent().parent().parent();
var text = current_button.text().trim();
if (text == "查看详情") {
micropost.find(".activity-details").show();
current_button.text("隐藏详情");
}
else {
micropost.find(".activity-details").hide();
current_button.text("查看详情");
}
})
</script>

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
<!-- 可选的Bootstrap主题文件一般不用引入 -->
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap-theme.min.css">
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
您的验证码是: <%= @verify_code %>
</div>
</body>
</html>

View File

@ -0,0 +1,47 @@
<% provide(:title, '忘记密码') %>
<% provide(:body_class, 'login2') %>
<div class="login-wrapper">
<a href="#"><img width="210" height="70" src="images/logo/guoren.png"/></a>
<%= form_tag("/changepasswd", method: "post") do %>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-envelope"></i></span><input class="form-control"
placeholder="请输入邮箱地址"
name="email"
type="email">
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-lock"></i></span><input class="form-control"
placeholder="请输入邮箱验证码"
name="verify_code"
type="number">
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-ok"></i></span><input class="form-control"
placeholder="请输入新密码"
name="password"
type="password">
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-ok"></i></span><input class="form-control"
placeholder="请再次输入新密码"
name="password_confirm"
type="password">
</div>
</div>
<%= submit_tag "重置密码", class: "btn btn-primary btn-block" %>
<% end %>
</div>

View File

@ -2,33 +2,34 @@
<div class="modal-shiftfix">
<div id="profile-container" class="container-fluid main-content">
<div id="profile-container" class="container-fluid main-content">
<%= render 'layouts/nav' %>
<%= render 'layouts/nav' %>
<form action="/baidu" class="form-horizontal" id="profile" method="post">
<div class="row">
<div class="widget-container">
<div class="heading">
<i class="icon-user"></i>个人设置
</div>
</div>
</div>
<div class="row">
<div class="widget-container">
<div class="heading">
<i class="icon-user"></i>用户图像
</div>
<div class="col-md-12 text-center">
<div class="fileupload fileupload-new" data-provides="fileupload">
<div class="fileupload-new img-thumbnail" style="width: 200px; height: 200px;">
<!--原照片-->
<img src="/images/avatars/default/avatar.png">
<%= form_tag("/changeprofile", method: "post", class: "form-horizontal", id: "profile", enctype: "multipart/form-data") do %>
<div class="row">
<div class="widget-container">
<div class="heading">
<i class="icon-user"></i>个人设置
</div>
<div class="fileupload-preview fileupload-exists img-thumbnail"
style="width: 200px; max-height: 200px">
</div>
</div>
<div class="row">
<div class="widget-container">
<div class="heading">
<i class="icon-user"></i>用户图像
</div>
<div class="padded">
<div class="col-md-12 text-center">
<div class="fileupload fileupload-new" data-provides="fileupload">
<div class="fileupload-new img-thumbnail" style="width: 200px; height: 200px;">
<!--原照片-->
<img src="<%= @user.picurl %>">
</div>
<div class="fileupload-preview fileupload-exists img-thumbnail"
style="width: 200px; max-height: 200px">
</div>
<div class="padded">
<span class="btn btn-default btn-file">
<span
class="fileupload-new">选择照片
@ -37,72 +38,60 @@
class="fileupload-exists">
重新选择
</span>
<input type="file" name="image_file">
<input type="file" name="user[pic]">
</span>
<a
class="btn btn-default fileupload-exists" data-dismiss="fileupload"
href="#">清除照片
</a>
<a class="btn btn-default fileupload-exists" data-dismiss="fileupload">清除照片</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="widget-container fluid-height clearfix">
<div class="heading">
<i class="icon-reorder"></i>基本信息
<div class="row">
<div class="widget-container fluid-height clearfix">
<div class="heading">
<i class="icon-reorder"></i>基本信息
</div>
<div class="padded">
<div class="form-group">
<label class="control-label col-md-2">姓名</label>
<div class="col-md-9">
<input class="form-control" placeholder="请输入您的姓名" value="<%= @user.name %>"
type="text" name="user[username]">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-2">专业</label>
<div class="col-md-9">
<input class="form-control" placeholder="请输入您的专业" value="<%= @user.profession %>"
type="text" name="user[profession]">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-2">性别</label>
<div class="col-md-9">
<label class="radio-inline"><input name="user[sexual]" type="radio" value="1"
<% if get_user_sexual(@user) == true %>checked
<% end %>
><span>男</span></label>
<label class="radio-inline"><input name="user[sexual]" type="radio" value="0"
<% if get_user_sexual(@user) == false %>checked
<% end %>
><span>女</span></label>
</div>
</div>
<div class="form-group">
<div class="col-md-12 text-center">
<button class="btn btn-primary" type="submit">修改</button>
</div>
</div>
</div>
</div>
</div>
<div class="padded">
<div class="form-group">
<label class="control-label col-md-2">姓名</label>
<div class="col-md-9">
<input class="form-control" placeholder="Text" type="text">
</div>
</div>
<% end %>
<div class="form-group">
<label class="control-label col-md-2">专业</label>
<div class="col-md-9">
<input class="form-control" placeholder="Text" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-md-2">学院</label>
<div class="col-md-9">
<select class="form-control">
<option value="Category 1">Option 1</option>
<option value="Category 2">Option 2</option>
<option value="Category 3">Option 3</option>
<option value="Category 4">Option 4</option>
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-2">性别</label>
<div class="col-md-9">
<label class="radio-inline"><input name="optionsRadios" type="radio"
value="1"><span>男</span></label><label
class="radio-inline"><input name="optionsRadios"
type="radio"
value="0"><span>女</span></label>
</div>
</div>
<div class="form-group">
<div class="col-md-12 text-center">
<button class="btn btn-primary" type="submit">修改</button>
<button class="btn btn-default-outline">取消</button>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>

View File

@ -0,0 +1,22 @@
<% provide(:title, '忘记密码') %>
<% provide(:body_class, 'login2') %>
<div class="login-wrapper">
<a href="#"><img width="210" height="70" src="images/logo/guoren.png"/></a>
<%= form_tag("/forgetpasswd", method: "get") do %>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-envelope"></i></span><input class="form-control"
placeholder="请输入邮箱地址"
name="email"
type="email">
</div>
</div>
<%= submit_tag "找回密码", class: "btn btn-primary btn-block" %>
<% end %>
</div>

33
code.bak Normal file
View File

@ -0,0 +1,33 @@
<%= form_for @user, url: {action: "changepasswd"} do |f| %>
<%= render 'shared/error_messages', object: f.object %>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-lock"></i></span>
<input class="form-control" placeholder="请输入邮箱验证码" name="verify_code" type="text">
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-envelope"></i></span>
<%= f.email_field :email, class: 'form-control', placeholder: "请输入邮箱" %>
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-ok"></i></span>
<%= f.password_field :password, class: 'form-control', placeholder: "请输入密码" %>
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon"><i class="icon-ok"></i></span>
<%= f.password_field :password_confirmation, class: 'form-control', placeholder: "请再次输入密码" %>
</div>
</div>
<%= f.submit "重置密码", class: "btn btn-primary btn-block" %>
<% end %>

View File

@ -18,7 +18,7 @@ Rails.application.configure do
config.cache_store = :memory_store
config.public_file_server.headers = {
'Cache-Control' => 'public, max-age=172800'
'Cache-Control' => 'public, max-age=172800'
}
else
config.action_controller.perform_caching = false
@ -51,4 +51,19 @@ Rails.application.configure do
# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
host = 'ucasguoren.herokuapp.com'
config.action_mailer.default_url_options = {host: host}
config.action_mailer.raise_delivery_errors = true
config.action_mailer.smtp_settings = {
:address => "smtp.sendgrid.net",
:port => 587,
:user_name => "app61271187@heroku.com",
:password => "5cysx5kw9899",
:authentication => "plain",
:domain => 'herokuapp.com',
:enable_starttls_auto => true
}
end

View File

@ -83,4 +83,19 @@ Rails.application.configure do
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
host = 'ucasguoren.herokuapp.com'
config.action_mailer.default_url_options = {host: host}
config.action_mailer.raise_delivery_errors = true
config.action_mailer.smtp_settings = {
:address => "smtp.sendgrid.net",
:port => 587,
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:authentication => "plain",
:domain => 'herokuapp.com',
:enable_starttls_auto => true
}
end

View File

@ -7,10 +7,14 @@ Rails.application.routes.draw do
get 'logout', to: 'login#logout'
get '/signup', to: 'users#new'
get '/profile' ,to: 'users#edit'
get '/profile', to: 'users#edit'
get '/forgetpasswd', to: 'users#forgetpasswd'
get '/changepasswd', to: 'users#changepasswd'
post '/changepasswd', to: 'users#changepasswd'
post '/changeprofile', to: 'users#changeprofile'
get '/main', to: 'main#show'
get '/activity',to: 'main#activity'
get '/activity', to: 'main#activity'
get '/chat', to: 'chat#index'
post '/newmsg', to: 'chat#new'
@ -19,7 +23,9 @@ Rails.application.routes.draw do
get '/online', to: 'chat#online'
get '/microposts', to: 'micro_posts#show'
post 'newpost', to: 'micro_posts#new'
post '/newpost', to: 'micro_posts#new'
get '/deletepost', to: 'micro_posts#delete'
get '/comments', to: 'comments#get'
post '/newcomment', to: 'comments#new'

Binary file not shown.

View File

@ -0,0 +1,5 @@
class AddEngagedPeopleNamesToMicroPosts < ActiveRecord::Migration[5.0]
def change
add_column :micro_posts, :engaged_people_names, :text
end
end

View File

@ -0,0 +1,5 @@
class AddVerifyCodeToUsers < ActiveRecord::Migration[5.0]
def change
add_column :users, :verify_code, :string
end
end

View File

@ -0,0 +1,5 @@
class RemoveAcademyFromUser < ActiveRecord::Migration[5.0]
def change
remove_column :users, :academy, :string
end
end

View File

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20161129085653) do
ActiveRecord::Schema.define(version: 20170114044144) do
create_table "comments", force: :cascade do |t|
t.string "content"
@ -36,11 +36,12 @@ ActiveRecord::Schema.define(version: 20161129085653) do
t.text "pic"
t.datetime "post_time"
t.integer "post_type"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "user_id"
t.integer "engage_people"
t.string "title"
t.text "engaged_people_names"
end
create_table "users", force: :cascade do |t|
@ -48,11 +49,11 @@ ActiveRecord::Schema.define(version: 20161129085653) do
t.string "email"
t.string "picurl"
t.string "profession"
t.string "academy"
t.boolean "sexual"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "password_digest"
t.string "verify_code"
end
end

View File

101
herokulog.txt Normal file
View File

@ -0,0 +1,101 @@
2016-12-27T14:26:30.434989+00:00 app[web.1]: I, [2016-12-27T14:26:30.434940 #4] INFO -- : [bab85abb-1e49-4592-a08e-17e303e12337] Rendered layouts/_refer.html.erb (0.0ms)
2016-12-27T14:26:30.435224+00:00 app[web.1]: I, [2016-12-27T14:26:30.435180 #4] INFO -- : [bab85abb-1e49-4592-a08e-17e303e12337] Completed 200 OK in 84ms (Views: 3.7ms | ActiveRecord: 3.2ms)
2016-12-27T14:26:30.437771+00:00 heroku[router]: at=info method=POST path="/users" host=se-guoren-test.herokuapp.com request_id=bab85abb-1e49-4592-a08e-17e303e12337 fwd="121.195.114.11" dyno=web.1 connect=1ms service=91ms status=200 bytes=8670
2016-12-27T14:26:30.952100+00:00 heroku[router]: at=info method=GET path="/stylesheets/jquery.fancybox.css" host=se-guoren-test.herokuapp.com request_id=0372c738-9a6f-4b5d-a68b-3ee8b70ef463 fwd="121.195.114.11" dyno=web.1 connect=1ms service=1ms status=304 bytes=48
2016-12-27T14:26:43.970062+00:00 heroku[router]: at=info method=POST path="/users" host=se-guoren-test.herokuapp.com request_id=54f81ac3-fc75-47c7-8073-e8a0fe4aabeb fwd="121.195.114.11" dyno=web.1 connect=1ms service=88ms status=302 bytes=828
2016-12-27T14:26:43.886254+00:00 app[web.1]: I, [2016-12-27T14:26:43.886205 #4] INFO -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb] Processing by UsersController#create as HTML
2016-12-27T14:26:43.885608+00:00 app[web.1]: I, [2016-12-27T14:26:43.885530 #4] INFO -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb] Started POST "/users" for 121.195.114.11 at 2016-12-27 14:26:43 +0000
2016-12-27T14:26:43.886317+00:00 app[web.1]: I, [2016-12-27T14:26:43.886276 #4] INFO -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb] Parameters: {"utf8"=>"✓", "authenticity_token"=>"icK/M7hdBHuCBWyWPM3N6Rw2RjeZrxQHPwwc6GTvdZnKOmYM8GstjCvGhbey5je6TZOa/EJQzSSMgMz8izhGfg==", "user"=>{"name"=>"张大于", "email"=>"zxy@ucas.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"注册"}
2016-12-27T14:26:43.960358+00:00 app[web.1]: D, [2016-12-27T14:26:43.960262 #4] DEBUG -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb]  (0.6ms) BEGIN
2016-12-27T14:26:43.962468+00:00 app[web.1]: D, [2016-12-27T14:26:43.962418 #4] DEBUG -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb] User Exists (0.9ms) SELECT 1 AS one FROM "users" WHERE LOWER("users"."name") = LOWER($1) LIMIT $2 [["name", "张大于"], ["LIMIT", 1]]
2016-12-27T14:26:43.966355+00:00 app[web.1]: D, [2016-12-27T14:26:43.966304 #4] DEBUG -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb] SQL (0.9ms) INSERT INTO "users" ("name", "email", "picurl", "created_at", "updated_at", "password_digest") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["name", "张大于"], ["email", "zxy@ucas.com"], ["picurl", "images/avatars/default/avatar.png"], ["created_at", 2016-12-27 14:26:43 UTC], ["updated_at", 2016-12-27 14:26:43 UTC], ["password_digest", "$2a$10$NbxhrvZAJnin7CynJIpWWu7lFpR2wqZaG6e7UPpwMMfpIRPpoQUvi"]]
2016-12-27T14:26:43.963732+00:00 app[web.1]: D, [2016-12-27T14:26:43.963669 #4] DEBUG -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb] User Exists (0.8ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = $1 LIMIT $2 [["email", "zxy@ucas.com"], ["LIMIT", 1]]
2016-12-27T14:26:43.968484+00:00 app[web.1]: D, [2016-12-27T14:26:43.968433 #4] DEBUG -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb]  (1.5ms) COMMIT
2016-12-27T14:26:43.968946+00:00 app[web.1]: I, [2016-12-27T14:26:43.968897 #4] INFO -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb] Redirected to http://se-guoren-test.herokuapp.com/main
2016-12-27T14:26:43.969092+00:00 app[web.1]: I, [2016-12-27T14:26:43.969050 #4] INFO -- : [54f81ac3-fc75-47c7-8073-e8a0fe4aabeb] Completed 302 Found in 83ms (ActiveRecord: 4.7ms)
2016-12-27T14:26:44.457630+00:00 app[web.1]: I, [2016-12-27T14:26:44.457541 #4] INFO -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] Started GET "/main" for 121.195.114.11 at 2016-12-27 14:26:44 +0000
2016-12-27T14:26:44.459049+00:00 app[web.1]: I, [2016-12-27T14:26:44.458997 #4] INFO -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] Processing by MainController#show as HTML
2016-12-27T14:26:44.466723+00:00 app[web.1]: D, [2016-12-27T14:26:44.466667 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]]
2016-12-27T14:26:44.473385+00:00 app[web.1]: D, [2016-12-27T14:26:44.473325 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92]  (1.0ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."post_type" IN (1, 2, 3)
2016-12-27T14:26:44.475919+00:00 app[web.1]: D, [2016-12-27T14:26:44.475869 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] MicroPost Load (1.1ms) SELECT "micro_posts".* FROM "micro_posts" WHERE "micro_posts"."post_type" IN (1, 2, 3) ORDER BY "micro_posts"."post_time" DESC LIMIT $1 OFFSET $2 [["LIMIT", 10], ["OFFSET", 0]]
2016-12-27T14:26:44.497013+00:00 app[web.1]: D, [2016-12-27T14:26:44.496933 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] User Load (1.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]]
2016-12-27T14:26:44.499218+00:00 app[web.1]: D, [2016-12-27T14:26:44.499115 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]]
2016-12-27T14:26:44.500171+00:00 app[web.1]: D, [2016-12-27T14:26:44.500121 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]]
2016-12-27T14:26:44.502057+00:00 app[web.1]: D, [2016-12-27T14:26:44.502007 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2016-12-27T14:26:44.503174+00:00 app[web.1]: D, [2016-12-27T14:26:44.503115 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2016-12-27T14:26:44.504166+00:00 app[web.1]: D, [2016-12-27T14:26:44.504114 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2016-12-27T14:26:44.505148+00:00 app[web.1]: D, [2016-12-27T14:26:44.505100 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2016-12-27T14:26:44.506694+00:00 app[web.1]: I, [2016-12-27T14:26:44.506634 #4] INFO -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] Rendering main/main.html.erb within layouts/application
2016-12-27T14:26:44.509447+00:00 app[web.1]: I, [2016-12-27T14:26:44.509384 #4] INFO -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] Rendered layouts/_nav.html.erb (0.5ms)
2016-12-27T14:26:44.521463+00:00 app[web.1]: D, [2016-12-27T14:26:44.521398 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92]  (1.1ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."user_id" = $1 AND "micro_posts"."id" = $2 [["user_id", 4], ["id", 7]]
2016-12-27T14:26:44.523387+00:00 app[web.1]: D, [2016-12-27T14:26:44.523325 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92]  (0.8ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."user_id" = $1 AND "micro_posts"."id" = $2 [["user_id", 4], ["id", 6]]
2016-12-27T14:26:44.525175+00:00 app[web.1]: D, [2016-12-27T14:26:44.525121 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92]  (0.8ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."user_id" = $1 AND "micro_posts"."id" = $2 [["user_id", 4], ["id", 5]]
2016-12-27T14:26:44.526840+00:00 app[web.1]: D, [2016-12-27T14:26:44.526785 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92]  (0.8ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."user_id" = $1 AND "micro_posts"."id" = $2 [["user_id", 4], ["id", 4]]
2016-12-27T14:26:44.527609+00:00 app[web.1]: D, [2016-12-27T14:26:44.527563 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92]  (0.6ms) BEGIN
2016-12-27T14:26:44.529719+00:00 app[web.1]: D, [2016-12-27T14:26:44.529663 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] MicroPost Load (0.8ms) SELECT "micro_posts".* FROM "micro_posts" WHERE "micro_posts"."id" = $1 LIMIT $2 FOR UPDATE [["id", 4], ["LIMIT", 1]]
2016-12-27T14:26:44.531628+00:00 app[web.1]: D, [2016-12-27T14:26:44.531560 #4] DEBUG -- : [aea6357e-ec23-41ea-aeed-4192484c6e92]  (1.6ms) COMMIT
2016-12-27T14:26:44.532749+00:00 app[web.1]: I, [2016-12-27T14:26:44.532686 #4] INFO -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] Rendered main/main.html.erb within layouts/application (25.9ms)
2016-12-27T14:26:44.532962+00:00 app[web.1]: I, [2016-12-27T14:26:44.532910 #4] INFO -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] Completed 500 Internal Server Error in 74ms (ActiveRecord: 16.0ms)
2016-12-27T14:26:44.533988+00:00 app[web.1]: F, [2016-12-27T14:26:44.533939 #4] FATAL -- : [aea6357e-ec23-41ea-aeed-4192484c6e92]
2016-12-27T14:26:44.534039+00:00 app[web.1]: F, [2016-12-27T14:26:44.533991 #4] FATAL -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] ActionView::Template::Error (undefined method `split' for nil:NilClass):
2016-12-27T14:26:44.534252+00:00 app[web.1]: F, [2016-12-27T14:26:44.534209 #4] FATAL -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] 35: <% if micro_post_belong_to_user(micro_post["postid"], @user) == false %>
2016-12-27T14:26:44.534253+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] 36: <% if micro_post["type"] == "组团信息" %>
2016-12-27T14:26:44.534254+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] 37: <div class="social-button">
2016-12-27T14:26:44.534254+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] 38: <% if joinded_activity(micro_post["postid"], @user.name) %>
2016-12-27T14:26:44.534255+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] 39: <button class="btn btn-lg btn-success-outline activity">取消报名</button>
2016-12-27T14:26:44.534255+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] 40: <div class="activity-detail text-center"></div>
2016-12-27T14:26:44.534256+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] 41: <% else %>
2016-12-27T14:26:44.534595+00:00 app[web.1]: F, [2016-12-27T14:26:44.534293 #4] FATAL -- : [aea6357e-ec23-41ea-aeed-4192484c6e92] app/helpers/main_helper.rb:84:in `joinded_activity'
2016-12-27T14:26:44.534285+00:00 app[web.1]: F, [2016-12-27T14:26:44.534249 #4] FATAL -- : [aea6357e-ec23-41ea-aeed-4192484c6e92]
2016-12-27T14:26:44.534597+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] app/views/main/main.html.erb:38:in `block in _app_views_main_main_html_erb___4319673276589869370_70143703684160'
2016-12-27T14:26:44.534598+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] app/views/main/main.html.erb:9:in `each'
2016-12-27T14:26:44.534598+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] app/views/main/main.html.erb:9:in `_app_views_main_main_html_erb___4319673276589869370_70143703684160'
2016-12-27T14:26:44.534599+00:00 app[web.1]: [aea6357e-ec23-41ea-aeed-4192484c6e92] app/controllers/main_controller.rb:20:in `show'
2016-12-27T14:26:44.535884+00:00 heroku[router]: at=info method=GET path="/main" host=se-guoren-test.herokuapp.com request_id=aea6357e-ec23-41ea-aeed-4192484c6e92 fwd="121.195.114.11" dyno=web.1 connect=1ms service=80ms status=500 bytes=1669
2016-12-27T14:26:45.223095+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=se-guoren-test.herokuapp.com request_id=0d25c158-b1da-4546-a322-e48a2230ab61 fwd="121.195.114.11" dyno=web.1 connect=1ms service=2ms status=304 bytes=48
2016-12-27T14:29:29.932926+00:00 heroku[router]: at=info method=GET path="/" host=se-guoren-test.herokuapp.com request_id=18e46fba-6a36-458f-9843-5dba1ac4b9e5 fwd="121.195.114.11" dyno=web.1 connect=0ms service=7ms status=302 bytes=828
2016-12-27T14:29:29.930708+00:00 app[web.1]: I, [2016-12-27T14:29:29.930627 #4] INFO -- : [18e46fba-6a36-458f-9843-5dba1ac4b9e5] Started GET "/" for 121.195.114.11 at 2016-12-27 14:29:29 +0000
2016-12-27T14:29:29.931476+00:00 app[web.1]: I, [2016-12-27T14:29:29.931414 #4] INFO -- : [18e46fba-6a36-458f-9843-5dba1ac4b9e5] Processing by LoginController#init as HTML
2016-12-27T14:29:29.936110+00:00 app[web.1]: I, [2016-12-27T14:29:29.935669 #4] INFO -- : [18e46fba-6a36-458f-9843-5dba1ac4b9e5] Redirected to http://se-guoren-test.herokuapp.com/main
2016-12-27T14:29:29.935213+00:00 app[web.1]: D, [2016-12-27T14:29:29.935144 #4] DEBUG -- : [18e46fba-6a36-458f-9843-5dba1ac4b9e5] User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]]
2016-12-27T14:29:29.936286+00:00 app[web.1]: I, [2016-12-27T14:29:29.936233 #4] INFO -- : [18e46fba-6a36-458f-9843-5dba1ac4b9e5] Completed 302 Found in 5ms (ActiveRecord: 1.0ms)
2016-12-27T14:29:30.436680+00:00 app[web.1]: I, [2016-12-27T14:29:30.436607 #4] INFO -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] Started GET "/main" for 121.195.114.11 at 2016-12-27 14:29:30 +0000
2016-12-27T14:29:30.437590+00:00 app[web.1]: I, [2016-12-27T14:29:30.437541 #4] INFO -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] Processing by MainController#show as HTML
2016-12-27T14:29:30.440124+00:00 app[web.1]: D, [2016-12-27T14:29:30.440073 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]]
2016-12-27T14:29:30.443043+00:00 app[web.1]: D, [2016-12-27T14:29:30.442991 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca]  (1.1ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."post_type" IN (1, 2, 3)
2016-12-27T14:29:30.444967+00:00 app[web.1]: D, [2016-12-27T14:29:30.444886 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] MicroPost Load (0.9ms) SELECT "micro_posts".* FROM "micro_posts" WHERE "micro_posts"."post_type" IN (1, 2, 3) ORDER BY "micro_posts"."post_time" DESC LIMIT $1 OFFSET $2 [["LIMIT", 10], ["OFFSET", 0]]
2016-12-27T14:29:30.448145+00:00 app[web.1]: D, [2016-12-27T14:29:30.448090 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] User Load (0.9ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 3], ["LIMIT", 1]]
2016-12-27T14:29:30.451687+00:00 app[web.1]: D, [2016-12-27T14:29:30.451150 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] User Load (1.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]]
2016-12-27T14:29:30.453803+00:00 app[web.1]: D, [2016-12-27T14:29:30.453735 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]]
2016-12-27T14:29:30.456533+00:00 app[web.1]: D, [2016-12-27T14:29:30.456469 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] User Load (0.9ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2016-12-27T14:29:30.458003+00:00 app[web.1]: D, [2016-12-27T14:29:30.457946 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2016-12-27T14:29:30.459203+00:00 app[web.1]: D, [2016-12-27T14:29:30.459148 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2016-12-27T14:29:30.460470+00:00 app[web.1]: D, [2016-12-27T14:29:30.460401 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
2016-12-27T14:29:30.461628+00:00 app[web.1]: I, [2016-12-27T14:29:30.461556 #4] INFO -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] Rendering main/main.html.erb within layouts/application
2016-12-27T14:29:30.461986+00:00 app[web.1]: I, [2016-12-27T14:29:30.461928 #4] INFO -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] Rendered layouts/_nav.html.erb (0.1ms)
2016-12-27T14:29:30.464536+00:00 app[web.1]: D, [2016-12-27T14:29:30.464473 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca]  (0.9ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."user_id" = $1 AND "micro_posts"."id" = $2 [["user_id", 4], ["id", 7]]
2016-12-27T14:29:30.466248+00:00 app[web.1]: D, [2016-12-27T14:29:30.466190 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca]  (0.8ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."user_id" = $1 AND "micro_posts"."id" = $2 [["user_id", 4], ["id", 6]]
2016-12-27T14:29:30.467999+00:00 app[web.1]: D, [2016-12-27T14:29:30.467925 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca]  (0.7ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."user_id" = $1 AND "micro_posts"."id" = $2 [["user_id", 4], ["id", 5]]
2016-12-27T14:29:30.469758+00:00 app[web.1]: D, [2016-12-27T14:29:30.469701 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca]  (0.9ms) SELECT COUNT(*) FROM "micro_posts" WHERE "micro_posts"."user_id" = $1 AND "micro_posts"."id" = $2 [["user_id", 4], ["id", 4]]
2016-12-27T14:29:30.474100+00:00 app[web.1]: D, [2016-12-27T14:29:30.474038 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca]  (4.1ms) BEGIN
2016-12-27T14:29:30.475980+00:00 app[web.1]: D, [2016-12-27T14:29:30.475926 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] MicroPost Load (1.1ms) SELECT "micro_posts".* FROM "micro_posts" WHERE "micro_posts"."id" = $1 LIMIT $2 FOR UPDATE [["id", 4], ["LIMIT", 1]]
2016-12-27T14:29:30.477880+00:00 app[web.1]: D, [2016-12-27T14:29:30.477830 #4] DEBUG -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca]  (1.6ms) COMMIT
2016-12-27T14:29:30.479027+00:00 app[web.1]: I, [2016-12-27T14:29:30.478976 #4] INFO -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] Rendered main/main.html.erb within layouts/application (17.3ms)
2016-12-27T14:29:30.479182+00:00 app[web.1]: I, [2016-12-27T14:29:30.479139 #4] INFO -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] Completed 500 Internal Server Error in 41ms (ActiveRecord: 16.1ms)
2016-12-27T14:29:30.480397+00:00 app[web.1]: F, [2016-12-27T14:29:30.480330 #4] FATAL -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca]
2016-12-27T14:29:30.480471+00:00 app[web.1]: F, [2016-12-27T14:29:30.480409 #4] FATAL -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] ActionView::Template::Error (undefined method `split' for nil:NilClass):
2016-12-27T14:29:30.481135+00:00 app[web.1]: F, [2016-12-27T14:29:30.481086 #4] FATAL -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] 35: <% if micro_post_belong_to_user(micro_post["postid"], @user) == false %>
2016-12-27T14:29:30.481136+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] 36: <% if micro_post["type"] == "组团信息" %>
2016-12-27T14:29:30.481137+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] 37: <div class="social-button">
2016-12-27T14:29:30.481137+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] 38: <% if joinded_activity(micro_post["postid"], @user.name) %>
2016-12-27T14:29:30.481138+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] 39: <button class="btn btn-lg btn-success-outline activity">取消报名</button>
2016-12-27T14:29:30.481139+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] 40: <div class="activity-detail text-center"></div>
2016-12-27T14:29:30.481139+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] 41: <% else %>
2016-12-27T14:29:30.481185+00:00 app[web.1]: F, [2016-12-27T14:29:30.481134 #4] FATAL -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca]
2016-12-27T14:29:30.481258+00:00 app[web.1]: F, [2016-12-27T14:29:30.481202 #4] FATAL -- : [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] app/helpers/main_helper.rb:84:in `joinded_activity'
2016-12-27T14:29:30.481259+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] app/views/main/main.html.erb:38:in `block in _app_views_main_main_html_erb___4319673276589869370_70143703684160'
2016-12-27T14:29:30.481260+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] app/views/main/main.html.erb:9:in `each'
2016-12-27T14:29:30.481260+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] app/views/main/main.html.erb:9:in `_app_views_main_main_html_erb___4319673276589869370_70143703684160'
2016-12-27T14:29:30.481261+00:00 app[web.1]: [eae3fb5a-320d-4195-90cf-49a09fc7b6ca] app/controllers/main_controller.rb:20:in `show'
2016-12-27T14:29:30.477775+00:00 heroku[router]: at=info method=GET path="/main" host=se-guoren-test.herokuapp.com request_id=eae3fb5a-320d-4195-90cf-49a09fc7b6ca fwd="121.195.114.11" dyno=web.1 connect=0ms service=47ms status=500 bytes=1669
2016-12-27T14:29:31.399894+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=se-guoren-test.herokuapp.com request_id=b29e3681-6702-4e54-812e-f17760fa4d4a fwd="121.195.114.11" dyno=web.1 connect=0ms service=3ms status=304 bytes=48

View File

View File

@ -134,12 +134,26 @@
.widget-container .heading [class^="icon-"], .widget-container .heading [class*="icon-"] {
font-size: 20px;
}
.pagination .previous_page {
font-size: 2em;
margin-right: 20px;
}
.pagination .next_page {
font-size: 2em;
margin-left: 20px;
}
.posts .micro-post .widget-container.scrollable {
height: 250px;
}
.widget-container.fluid-height.scrollable.list.user-comments p {
margin: 0px;
}
.activity-details p {
font-size: 1.2em;
}

View File

@ -0,0 +1,4 @@
# Preview all emails at http://localhost:3000/rails/mailers/user_mailer
class UserMailerPreview < ActionMailer::Preview
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class UserMailerTest < ActionMailer::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -1,120 +0,0 @@
<HTML>
<HEAD>
<script type="text/javascript">
var i = 0; // 用来动态生成span,upfile的id
function addAttachmentToList()
{
if (findAttachment(event.srcElement.value)) return; //如果此文档已在图片列表中则不再添加
// 动态创建图片信息栏并添加到图片列表中
var span = document.createElement('span');
span.id = '_attachment' + i;
span.innerHTML = extractFileName(event.srcElement.value) + '&nbsp;<a href="javascript:delAttachment(' + (i++) + ')"><font color="blue">删除</font></a><br/>';
span.title = event.srcElement.value;
G('attachmentList').appendChild(span);
// 显示图片列表并变换添加图片按钮文本
if (G('attachmentList').style.display == 'none')
{
G('btnAdd').value = '继续添加';
G('attachmentList').style.display = '';
G('btnClear').style.display = '';
}
G('total').innerText = '当前选择上传'+ G('attachmentList').childNodes.length + '个图片';
}
function selectAttachment()
{
// 先清除无效动态生成的多余upfile
cleanInvalidUpfile();
// 动态创建上传控件并与span对应
var upfile = '<input type="file" style="display:none" onchange="addAttachmentToList();" id="_upfile'+i+'">';
document.body.insertAdjacentHTML('beforeEnd', upfile);
G('_upfile'+i).click();
}
function extractFileName(fn)
{
return fn.substr(fn.lastIndexOf('\\')+1);
}
function findAttachment(fn)
{
var o = G('attachmentList').getElementsByTagName('span');
for(var i=0;i<o.length;i++)
if (o[i].title == fn) return true;
return false;
}
function delAttachment(id)
{
G('attachmentList').removeChild(G('_attachment'+id));
document.body.removeChild(G('_upfile'+id));
// 当图片列表为空则不显示并且变化添加图片按钮文本
if (G('attachmentList').childNodes.length == 0)
{
G('btnAdd').value = '添加图片';
G('attachmentList').style.display = 'none';
G('btnClear').style.display = 'none';
}
G('total').innerText = '当前选择上传'+ G('attachmentList').childNodes.length + '个图片';
}
function cleanInvalidUpfile()
{
var o = document.body.getElementsByTagName('input');
for(var i=o.length-1;i>=0;i--)
if (o[i].type == 'file' && o[i].id.indexOf('_upfile') == 0)
{
if (!G('_attachment'+o[i].id.substr(7)))
document.body.removeChild(o[i]);
}
}
function clearAttachment()
{
var o = G('attachmentList').childNodes;
for(var i=o.length-1;i>=0;i--)
G('attachmentList').removeChild(o[i]);
o = document.body.getElementsByTagName('input');
for(var i=o.length-1;i>=0;i--)
if (o[i].type == 'file' && o[i].id.indexOf('_upfile') == 0)
{
document.body.removeChild(o[i]);
}
G('btnAdd').value = '添加图片';
G('attachmentList').style.display = 'none';
G('btnClear').style.display = 'none';
G('total').innerText = '当前选择上传0个图片';
}
function getAttachmentInfo()
{
// 已知的js获取本地文件大小的三种方式
}
function G(id)
{
return document.getElementById(id);
}
</script>
</HEAD>
<BODY>
<form action="#">
<input type="button" value="添加图片" id="btnAdd" onclick="selectAttachment();">&nbsp;
<input type="button" value="清空图片" id="btnClear" style="display:none" onclick="clearAttachment();">
<div id="attachmentList" style="margin:3px 0px 0px 0px;padding:4px 3px 4px 3px;display:none;border:1px solid "></div>
<div id="total" style="margin:3px 0px 0px 0px;">当前选择上传0个图片</div>
<div style="padding10px 3px"><input type="submit" value="上传"></div>
</form>
</BODY>
</HTML>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,30 +0,0 @@
# 张裕
------------------------
分页功能 张裕 完成
简单的组团、失物招领动态 张裕 --
失物招领自动联系人!
网站整体时间修改 张裕 -- javascript时间 完成
网站本地时间
组团的人数 刷新后自增 bug
用户个人动态的评论显示
用户个人动态的删除
用户不能自己报名自己的活动
# 朱京乔
------------------------
多图上传 朱京乔
# 尹吉宪
------------------------
用户个人资料修改 尹
忘记密码功能的实现 尹
# 白芳洲
------------------------
测试 白
整体代码检测与bug捕捉 白
# 倪令斌
-------------------------
部署 倪
公告 倪