Commit 62f1b3dc 62f1b3dc1d9971b3ec8e406e9784edab533c873f by tailor

从bitbucket迁移过来

0 parents
Showing 247 changed files with 3383 additions and 0 deletions
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile ~/.gitignore_global
# Ignore bundler config
/.bundle
# Ignore the default SQLite database.
/db/*.sqlite3
# Ignore all logfiles and tempfiles.
/log
/tmp
/www
# Load DSL and set up stages
require 'capistrano/setup'
# Include default deployment tasks
require 'capistrano/deploy'
# Include tasks from other gems included in your Gemfile
#
# For documentation on these, see for example:
#
# https://github.com/capistrano/rvm
# https://github.com/capistrano/rbenv
# https://github.com/capistrano/chruby
# https://github.com/capistrano/bundler
# https://github.com/capistrano/rails
# https://github.com/capistrano/passenger
#
require 'capistrano/rvm'
# require 'capistrano/rbenv'
# require 'capistrano/chruby'
require 'capistrano/bundler'
# require 'capistrano/rails/assets'
# require 'capistrano/rails/migrations'
# require 'capistrano/passenger'
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
source 'https://rubygems.org'
gem 'rails', '3.2.15'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2'
# 分页插件
gem "kaminari"
gem "awesome_print"
gem 'capistrano', '~> 3.4.0'
gem 'capistrano-bundler'
gem 'capistrano-rvm'
gem 'unicorn'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.15)
actionpack (= 3.2.15)
mail (~> 2.5.4)
actionpack (3.2.15)
activemodel (= 3.2.15)
activesupport (= 3.2.15)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.15)
activesupport (= 3.2.15)
builder (~> 3.0.0)
activerecord (3.2.15)
activemodel (= 3.2.15)
activesupport (= 3.2.15)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.15)
activemodel (= 3.2.15)
activesupport (= 3.2.15)
activesupport (3.2.15)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
arel (3.0.3)
awesome_print (1.6.1)
builder (3.0.4)
capistrano (3.4.0)
i18n
rake (>= 10.0.0)
sshkit (~> 1.3)
capistrano-bundler (1.1.4)
capistrano (~> 3.1)
sshkit (~> 1.2)
capistrano-rvm (0.1.2)
capistrano (~> 3.0)
sshkit (~> 1.2)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.3.0)
coffee-script-source
execjs
coffee-script-source (1.8.0)
colorize (0.7.7)
erubis (2.7.0)
execjs (2.2.2)
hike (1.2.3)
i18n (0.6.11)
journey (1.0.4)
jquery-rails (3.1.2)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
kaminari (0.16.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kgio (2.10.0)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
multi_json (1.11.2)
mysql2 (0.3.16)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (3.0.1)
polyglot (0.3.5)
rack (1.4.7)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.4)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (3.2.15)
actionmailer (= 3.2.15)
actionpack (= 3.2.15)
activerecord (= 3.2.15)
activeresource (= 3.2.15)
activesupport (= 3.2.15)
bundler (~> 1.0)
railties (= 3.2.15)
railties (3.2.15)
actionpack (= 3.2.15)
activesupport (= 3.2.15)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
raindrops (0.15.0)
rake (10.4.2)
rdoc (3.12.2)
json (~> 1.4)
sass (3.4.6)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sprockets (2.2.3)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sshkit (1.7.1)
colorize (>= 0.7.0)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
thor (0.19.1)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.42)
uglifier (2.5.3)
execjs (>= 0.3.0)
json (>= 1.8.0)
unicorn (5.0.1)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
PLATFORMS
ruby
DEPENDENCIES
awesome_print
capistrano (~> 3.4.0)
capistrano-bundler
capistrano-rvm
coffee-rails (~> 3.2.1)
jquery-rails
kaminari
mysql2
rails (= 3.2.15)
sass-rails (~> 3.2.3)
uglifier (>= 1.0.3)
unicorn
BUNDLED WITH
1.16.2
山东诺正检测有限公司
\ No newline at end of file
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
Nuozheng::Application.load_tasks
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require jquery_ujs
//= require_directory ./plugin
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require_directory ./admin
*/
input:focus,
textarea:focus{
outline: none;
}
.posts a:link, .posts a:visited{
color: #7594B3;
}
.posts a:hover{
color: #f78927;
}
.posts a{
text-decoration: none;
}
.postdetail{
padding: 20px 0;
margin-bottom: 50px;
border-bottom: 3px solid #ccc;
min-height:400px;
}
.postdetail li{
margin: 0.5em auto;
line-height: 26px;
}
.postdetail p{
line-height: 30px;
margin: 0.5em auto;
}
.postdetail img,
.mp4 video,
.mp4 object{
max-width: 100%;
height: auto;
}
.postdetail > table,
.posts > table{
width: 100%;
border-collapse: collapse;
empty-cells: show;
border: 1px solid #ddd;
}
.postdetail > table th,
.posts > table th{
font-size: 13px;
height: 30px;
line-height: 30px;
font-weight: bold;
text-align: center;
background: #EEEEEE;
position: relative;
}
.postdetail > table td,
.posts > table td{
text-align: center;
font-size: 12px;
color: #666;
line-height: 30px;
padding-left: 10px;
border: 1px solid #ddd;
}
.posts{
width: 96%;
max-width: 960px;
margin: 50px auto;
}
.posts > table th input{
position: absolute;
left: 2%;
top: 17%;
width: 100px;
}
.posts h3.title{
position: relative;
}
.posts h3.title small{
position: absolute;
right: 0;
bottom: 0;
font-weight: normal;
font-size: 14px;
}
.posts textarea{
resize:none;
}
.posts .field{
margin-bottom: 20px;
font-size: 14px;
}
.posts .field span{
margin-right: 10px;
}
.posts .field input{
width: 300px;
line-height: 21px;
padding: 2px 5px;
}
.posts .field select{
width: 100px;
}
.postdetail form .field{
margin: auto auto 20px auto;
}
.postdetail form .field label{
width: 70px;
display: inline-block;
vertical-align: middle;
overflow: hidden;
font-size: 14px;
padding: 0 20px 0 0;
}
.postdetail form .field input,
.postdetail form .field textarea{
width: 320px;
line-height: 20px;
border: 1px solid #2aad6f;
font-size: 12px;
padding: .5em .8em;
border-radius: 2px;
vertical-align: middle;
background: #ffffff;
}
.postdetail form .field input.captcha{
width: 160px;
}
.postdetail form .field input.submit{
width: 120px;
padding: 0 30px;
border: none;
color: #fff;
background-color: #2aad6f;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
line-height: 34px;
font-size: 14px;
cursor: pointer;
}
.postdetail form .field textarea{
height: 120px;
resize: none;
}
.pagination {
margin: 10px auto;
overflow: hidden;
padding: 10px 0;
}
.pagination li{
display: inline-block;
margin: auto 2px;
}
.pagination li.disabled a{
background-color: #cccccc;
}
.pagination li.active a{
border: 1px solid #398439;
color: #ffffff;
background-color: #00AA91;
}
.pagination a {
border: 1px solid #cccccc;
color: #666666;
height: 26px;
line-height: 26px;
display: inline-block;
padding: 0 10px;
}
.pagination li.disabled a:hover,
.pagination li.disabled a:active{
color: #666666;
}
.pagination a:hover,
.pagination a:active {
color: #990000;
}
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require_directory ./plugin
*= require_directory ./website
*/
/*
*= require_directory ./mobile
*/
.gallery-view .image-container{position:relative;overflow:hidden;border:2px solid white}.gallery-view .image-container img{position:absolute;top:-9999px;bottom:-9999px;left:-9999px;right:-9999px;margin:auto}.imageView .has-no-header{top:0px !important}.imageView .close-btn{font-weight:900;border:2px solid;position:absolute;right:5px;border-radius:5px}.imageView .headerView{background-image:none;background-color:black}.imageView .gallery-slide-view{width:98%;background-color:transparent}.imageView .image-subtitle{color:white;position:absolute;bottom:0px;left:10px;width:95%;height:15%;z-index:100}.imageView .listContainer{width:100%;height:100%;background-color:black}.imageView .hideAll{display:none}.imageView img{display:block;width:100%;height:auto}.imageView .scroll-view{position:absolute;width:100%;height:100%}.imageView .scroll-view .scroll{min-height:100%;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-pack:center;-moz-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-content:stretch;-ms-flex-line-pack:stretch;align-content:stretch;-webkit-box-align:center;-moz-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
.post-detail img{
max-width: 100%;
}
\ No newline at end of file
.detectype h2, .service h2{
text-align: center;
font-weight: 400;
color: #433e51;
font-size: 45px;
padding: 0;
margin: 50px 0;
}
.detectype .detectrange{
float: left;
min-height: 1px;
position: relative;
cursor: pointer;
width: 22.75%;
margin-right: 3%;
overflow: hidden;
}
.detectype .detectrange.mb{
margin-bottom: 50px;
}
.detectype .detectrange .mask{
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
text-align: center;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.detectype .detectrange.l{
margin-right: 0;
}
.detectype .detectrange .detecticon{
height: 150px;
}
.detectype .detectrange .detectfood{
background: url(/images/jcrange/nongchanpin.jpg);
}
.detectype .detectrange .detectmeat{
background: url(/images/jcrange/rouzhipin.jpg);
}
.detectype .detectrange .detectfire{
background: url(/images/jcrange/xiaofangjiance.jpg);
}
.detectype .detectrange .detectmilieu{
background: url(/images/jcrange/huanjing.jpg);
}
.detectype .detectrange .detectfeiliao{
background: url(/images/jcrange/fljc.jpg);
}
.detectype .detectrange .detectsiliao{
background: url(/images/jcrange/sljc.jpg);
}
.detectype .detectrange .detectshuichan{
background: url(/images/jcrange/scjc.jpg);
}
.detectype .detectrange .detectshipin{
background: url(/images/jcrange/spjc.jpg?v=2);
}
.detectype .detectrange .detecttext{
padding: 15px 10px;
height: 80px;
border: 1px solid #ccc;
border-top: 0;
}
.detectype .detectrange .detecttext h5{
margin: 0 0 10px;
font-size: 18px;
font-weight: 400;
color: #433e51;
}
.detectype .detectrange .detecttext p{
line-height: 1.6em;
font-size: 14px;
margin: 0 0 10px;
color: #7b7b7b;
}
.detectype .detectrange .mask {
background: #1a4a72;
background: rgba(26, 74, 114, 0.6);
visibility: hidden;
opacity: 0;
-webkit-transition: all 0.35s ease-in;
-moz-transition: all 0.35s ease-in;
transition: all 0.35s ease-in;
}
.detectype .detectrange .mask a{
color: #fff;
}
.detectype .detectrange .mask h3 {
text-transform: uppercase;
color: #fff;
text-align: center;
font-size: 17px;
padding: 10px;
background: #111111;
background: rgba(12, 34, 52, 0.6);
margin: 30px 0 0 0;
-webkit-transition: all 0.35s ease-in;
-moz-transition: all 0.35s ease-in;
transition: all 0.35s ease-in;
}
.detectype .detectrange .mask p {
font-size: 12px;
position: relative;
color: #bbb;
padding: 20px 20px 20px;
text-align: center;
-webkit-transition: all 0.35s ease-in;
-moz-transition: all 0.35s ease-in;
transition: all 0.35s ease-in;
}
.detectype .detectrange:hover .mask {
visibility: visible;
opacity: 1;
-webkit-transition-delay: 0.2s;
-moz-transition-delay: 0.2s;
transition-delay: 0.2s;
}
.detectype .detectrange:hover .mask h3 {
-webkit-transition-delay: 0.3s;
-moz-transition-delay: 0.3s;
transition-delay: 0.3s;
}
.detectype .detectrange:hover .mask p {
-webkit-transition-delay: 0.25s;
-moz-transition-delay: 0.25s;
transition-delay: 0.25s;
}
.detectype .detectrange .mask {
-webkit-transform: translate(-460px, -100px) rotate(-180deg);
-moz-transform: translate(-460px, -100px) rotate(-180deg);
-ms-transform: translate(-460px, -100px) rotate(-180deg);
-o-transform: translate(-460px, -100px) rotate(-180deg);
transform: translate(-460px, -100px) rotate(-180deg);
}
.detectype .detectrange .mask h3 {
-webkit-transform: translateY(-100px);
-moz-transform: translateY(-100px);
-ms-transform: translateY(-100px);
-o-transform: translateY(-100px);
transform: translateY(-100px);
}
.detectype .detectrange .mask p {
-webkit-transform: translateX(-300px) rotate(-90deg);
-moz-transform: translateX(-300px) rotate(-90deg);
-ms-transform: translateX(-300px) rotate(-90deg);
-o-transform: translateX(-300px) rotate(-90deg);
transform: translateX(-300px) rotate(-90deg);
}
.detectype .detectrange:hover .mask {
-webkit-transform: translate(0px, 0px);
-moz-transform: translate(0px, 0px);
-ms-transform: translate(0px, 0px);
-o-transform: translate(0px, 0px);
transform: translate(0px, 0px);
}
.detectype .detectrange:hover .mask h3 {
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-ms-transform: translateY(0px);
-o-transform: translateY(0px);
transform: translateY(0px);
}
.detectype .detectrange:hover .mask p {
-webkit-transform: translateX(0px) rotate(0deg);
-moz-transform: translateX(0px) rotate(0deg);
-ms-transform: translateX(0px) rotate(0deg);
-o-transform: translateX(0px) rotate(0deg);
transform: translateX(0px) rotate(0deg);
}
body{
margin: 0px;
color: #393939;
}
a{
text-decoration: none;
}
input:focus,
textarea:focus{
outline: none;
}
.wrapper:after {
clear: both;
content: '';
display: table;
}
.wrapper {
padding: 0;
max-width: 1200px;
margin: 0 auto;
width: 96%;
}
.header{
background: #ffffff;
position: relative;
z-index: 100;
height: 80px;
}
.header .wrapper .logo{
min-width: 100px;
padding: 0;
text-align: left;
float: left;
}
.header .wrapper .logo a{
display: inline-block;
line-height: 80px;
}
.header .wrapper .logo a img{
border: none;
vertical-align: middle;
}
.header .wrapper .nav{
display: block;
position: relative;
width: auto;
background: none;
float: right;
}
.header .wrapper .nav ul.menu{
list-style: none;
padding: 0;
margin: 0;
display: block;
height: 80px;
line-height: 80px;
}
.header .wrapper .nav ul.menu li{
float: left;
display: inline-block;
height: 30px;
line-height: 30px;
margin: 40px 10px 10px 10px;
}
.header .wrapper .nav ul.menu li a{
font-size: 0.9375rem;
display: block;
height: 30px;
width: 75px;
color: #1f8657;
font-weight: bold;
text-align: center;
}
.header .wrapper .nav ul.menu li a:hover,
.header .wrapper .nav ul.menu li a.active{
color: #393939;
border-bottom: 2px solid #2aad6f;
}
.uptoshow{
margin-top: 20px;
}
.uptoshow .leftrow,
.uptoshow .rightrow{
float: left;
width: 50%;
}
.uptoshow .leftrow{
text-align: right;
}
.uptoshow .rightrow{
text-align: left;
}
.uptoshow .leftrow .wow{
margin-top: 10px;
}
.uptoshow .leftrow .wow img{
height: 40px;
margin-right: 15px;
}
.uptoshow .rightrow .wow img{
max-width: 100%;
margin-left: 15px;
}
.navi-scroll{
position: fixed;
right: 32px;
bottom: 32px;
width: 42px;
min-height: 74px;
z-index: 999;
}
.navi-scroll .navi-scroll-content {
position: relative;
text-align: center;
width: 100%;
height: 100%;
}
.navi-scroll .navi-scroll-content a {
width: 42px;
height: 36px;
display: block;
overflow: hidden;
position: relative;
background-color: #ededed;
}
.navi-scroll .navi-scroll-content a span {
width: 78px;
height: 36px;
color: #fff;
line-height: 36px;
font-size: 14px;
text-align: center;
display: none;
}
.navi-scroll .navi-scroll-content a i {
width: 20px;
height: 20px;
position: absolute;
right: 0;
top: 50%;
background-repeat: no-repeat;
background-position: center center;
}
.navi-scroll .navi-scroll-content .scroll-top-btn i {
width: 20px;
height: 20px;
margin-top: -10px;
right: 11px;
background-image: url("/images/icons/backtop-icon.png");
}
.navi-scroll .navi-scroll-content .scroll-contact-btn i {
width: 18px;
height: 18px;
margin-top: -9px;
right: 12px;
background-image: url("/images/icons/contact-icon.png");
}
.navi-scroll .navi-scroll-content .scroll-order-btn i {
width: 20px;
height: 20px;
margin-top: -9px;
right: 12px;
background-image: url("/images/icons/intent-icon.png");
}
.navi-scroll .navi-scroll-content a:hover {
width: 120px;
margin-left: -78px;
background-color: #47b488;
}
.navi-scroll .navi-scroll-content a:hover span{
display: block;
}
.navi-scroll .navi-scroll-content .scroll-top-btn:hover i {
background-image: url("/images/icons/backtop-icon-active.png");
}
.navi-scroll .navi-scroll-content .scroll-contact-btn:hover i {
background-image: url("/images/icons/contact-icon-active.png");
}
.navi-scroll .navi-scroll-content .scroll-order-btn:hover i {
background-image: url("/images/icons/intent-icon-active.png");
}
.navi-scroll .navi-scroll-content .scroll-contact-btn,
.navi-scroll .navi-scroll-content .scroll-order-btn {
margin-bottom: 2px;
}
.ftcontact.wrapper.wechat{
margin-top: 10px;
}
.ftcontact.wrapper{
padding: 0;
}
.ftcontact .ftphoneicon{
width: 67px;
height: 67px;
line-height: 67px;
background: #2aad6f;
border-radius: 50%;
text-align: center;
float: left;
}
.ftcontact .ftphoneicon span{
background: url(http://www.oppo.com/cn/assets/images/sprite-icons.png);
width: 100%;
height: 100%;
display: inline-block;
background-position: -417px -1px;
background-repeat: no-repeat;
}
.ftcontact.wechat .ftphoneicon span{
background-position: -420px -791px;
height: 50px;
margin-top: 10px;
}
.ftcontact .ftphoneinfo{
text-align: left;
float: left;
margin-left: 15px;
}
.ftcontact .ftphoneinfo h4{
font-size: 20px;
font-size: 1.25rem;
margin: 10px 0 5px 0;
color: #1f8657;
}
.ftcontact .ftphoneinfo p{
margin: 0;
text-align: left;
}
.footer{
padding: 50px 0;
background: #fff;
}
.footer .ftservice{
height: 125px;
list-style-type: none;
overflow: hidden;
}
.footer .ftservice .item{
display: inline-block;
width: 20%;
height: 125px;
zoom: 1;
position: relative;
float: left;
}
.footer .ftservice .item img{
position: absolute;
width: 45px;
height: 45px;
top: 45px;
}
.footer .ftservice .item h5{
position: absolute;
font-size: 18px;
font-weight: bold;
margin: 0;
top: 50px;
left: 50px;
color: rgb(54, 54, 54);
}
.footer .ftservice .item p{
position: absolute;
color: rgb(152, 152, 152);
margin: 0;
font-size: 12px;
left: 50px;
bottom: 40px;
}
.line{
background: #ededed;
height: 1px;
}
.footer .ftlinks{
list-style-type: none;
margin-top: 20px;
}
.footer .ftlinks .ftlink{
width: 20%;
display: inline-block;
float: left;
height: 200px;
}
.footer .ftlinks .ftlink .linktitle{
display: inline-block;
padding: 0;
margin-bottom: 20px;
color: #1f8657;
font-size: 1.125rem;
font-weight: bold;
}
.footer .ftlinks .ftlink ul{
padding: 0;
margin: 0;
list-style-type: none;
}
.footer .ftlinks .ftlink ul li{
}
.footer .ftlinks .ftlink ul li a{
margin: 10px 0;
display: block;
font-size: 15px;
font-size: 0.9375rem;
color: #7b7b7b;
}
.footer .ftlinks .ftlink ul li a:hover{
color: #1f8657;
}
.footer .ftwarp{
margin-top: 20px;
color: #7b7b7b;
font-size: 13px;
font-size: 0.8125rem;
}
.footer .ftwarp .copyright{
width: 45%;
height: 50px;
float: left;
text-align: left;
}
.footer .ftwarp ul{
width: 45%;
height: 50px;
float: right;
list-style-type: none;
margin: 0;
padding: 0;
}
.footer .ftwarp ul li{
float: right;
margin-left: 15px;
}
.footer .ftwarp ul li a{
color: #7b7b7b;
}
.footer .ftwarp ul li a:hover{
color: #1f8657;
}
.pagination {
margin: 10px auto;
overflow: hidden;
padding: 10px 0;
}
.pagination li{
display: inline-block;
margin: auto 2px;
}
.pagination li.disabled a{
background-color: #cccccc;
}
.pagination li.active a{
border: 1px solid #398439;
color: #ffffff;
background-color: #00AA91;
}
.pagination a {
border: 1px solid #cccccc;
color: #666666;
height: 26px;
line-height: 26px;
display: inline-block;
padding: 0 10px;
}
.pagination li.disabled a:hover,
.pagination li.disabled a:active{
color: #666666;
}
.pagination a:hover,
.pagination a:active {
color: #990000;
}
.banner{
overflow: hidden;
background-repeat: no-repeat;
-webkit-background-size: cover;
background-size: cover;
background-position: 50% 50%;
width:100%;
height: 300px;
position: relative;
}
.inside{
padding-top: 50px;
}
.inside .inside-left{
width: 25%;
float: left;
}
.inside .inside-left .top{
height: 60px;
background: #2aad6f;
color: #ffffff;
text-align: center;
line-height: 60px;
font-size: 24px;
font-weight: bold;
}
.inside .inside-left ul{
margin: 0;
list-style: none;
padding: 0;
}
.inside .inside-left ul li{
padding: 0 10px;
margin-top: 10px;
border: 1px solid #ededed;
background: #ffffff;
height: 35px;
line-height: 35px;
}
.inside .inside-left ul li a{
display: inline-block;
width: 100%;
height: 100%;
font-weight: bold;
color: #333333;
}
.inside .inside-left ul li:hover,
.inside .inside-left ul li.active{
background: #2aad6f;
}
.inside .inside-left ul li:hover a,
.inside .inside-left ul li.active a{
color: #ffffff;
}
.inside .inside-right{
width: 75%;
float: left;
}
.inside .inside-right .detail{
padding-left: 20px;
}
.inside .inside-right .detail .title{
height: 40px;
border-bottom: 1px solid #ededed;
margin-bottom: 20px;
}
.inside .inside-right .detail .title h3{
margin: 0;
}
.inside .inside-right .detail .title small{
float: right;
}
.inside .inside-right .detail .title small a{
color: #7b7b7b;
}
.inside .inside-right .detail .title small a:hover{
color: #1f8657;
}
.inside .inside-right .detail .preview{
}
.inside .inside-right .detail .preview .item{
cursor: pointer;
margin-bottom: 50px;
position: relative;
height: 150px;
padding-bottom: 10px;
border-bottom: 1px solid #ccc;
}
.inside .inside-right .detail .preview .item img{
max-width: 200px;
}
.inside .inside-right .detail .preview .item .posth4{
position: absolute;
left: 220px;
top: 0;
margin: 0;
font-size: 18px;
}
.inside .inside-right .detail .preview .item .posth4 a{
color: #1f8657;
}
.inside .inside-right .detail .preview .item .posth4 a:hover,
.inside .inside-right .detail .preview .item .posth4 a:visited{
color: #1f8657;
}
.inside .inside-right .detail .preview .item .postdesc{
position: absolute;
left: 220px;
top: 30px;
line-height: 22px;
}
.inside .inside-right .detail .preview p,
.inside .inside-right .detail .preview li{
line-height: 30px;
margin: 0.5em auto;
}
.inside .inside-right .detail .preview li{
line-height: 26px;
}
.inside .inside-right .detail .preview img{
max-width: 100%;
}
.inside .inside-right .detail .preview .mp4 video,
.inside .inside-right .detail .preview .mp4 object,
.inside .inside-right .detail .preview .mp4 object img{
width: 100%;
height: auto;
}
.inside .inside-right .detail .preview form .field{
margin: auto auto 20px auto;
}
.inside .inside-right .detail .preview form .field label{
width: 70px;
display: inline-block;
vertical-align: middle;
overflow: hidden;
font-size: 14px;
padding: 0 20px 0 0;
}
.inside .inside-right .detail .preview form .field input,
.inside .inside-right .detail .preview form .field textarea{
width: 320px;
line-height: 20px;
border: 1px solid #2aad6f;
font-size: 12px;
padding: .5em .8em;
border-radius: 2px;
vertical-align: middle;
background: #ffffff;
}
.inside .inside-right .detail .preview form .field input.captcha{
width: 160px;
}
.inside .inside-right .detail .preview form .field input.submit{
width: 120px;
padding: 0 30px;
border: none;
color: #fff;
background-color: #2aad6f;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
line-height: 34px;
font-size: 14px;
cursor: pointer;
}
.inside .inside-right .detail .preview form .field textarea{
height: 120px;
resize: none;
}
.captionOrange, .captionBlue, .captionBlack, .captionSymbol
{
display: block;
color: #fff;
/*font-size: 20px;*/
font-size: 18px;
line-height: 30px;
text-align: center;
border-radius: 4px;
}
.captionOrange
{
background: #EB5100;
background-color: rgba(235, 81, 0, 0.6);
}
.captionBlue
{
background: #746FBD;
background-color: rgba(21, 21, 120, 0.6);
}
.captionBlack
{
background: #000;
background-color: rgba(0, 0, 0, 0.4);
}
.captionSymbol
{
border-radius: 100px !important;
font-weight: 400 !important;
font-size: 26px !important;
background: #000;
background-color: rgba(0, 0, 0, 0.4);
}
.captionTextBlack
{
display: block;
color: #000;
font-size: 20px;
line-height: 30px;
}
.captionTextWhite
{
display: block;
color: #fff;
font-size: 20px;
line-height: 30px;
}
a.captionOrange, a.captionOrange:active, a.captionOrange:visited,a.captionTextWhite, a.captionTextWhite:active, a.captionTextWhite:visited
{
color: #fff;
text-decoration: none;
}
a.captionOrange:hover
{
color: #eb5100;
text-decoration: underline;
background-color: #eeeeee;
background-color: rgba(238, 238, 238, 0.7);
}
a.captionTextBlack, a.captionTextBlack:active, a.captionTextBlack:visited
{
color: #000;
text-decoration: none;
}
a.captionTextWhite:hover
{
color: #eb5100;
text-decoration: underline;
}
a.captionTextBlack:hover
{
color: #eb5100;
text-decoration: underline;
}
.jssorb01 {
position: absolute;
}
.jssorb01 div, .jssorb01 div:hover, .jssorb01 .av {
position: absolute;
/* size of bullet elment */
width: 12px;
height: 12px;
filter: alpha(opacity=70);
opacity: .7;
overflow: hidden;
cursor: pointer;
border: #000 1px solid;
}
.jssorb01 div { background-color: gray; }
.jssorb01 div:hover, .jssorb01 .av:hover { background-color: #d3d3d3; }
.jssorb01 .av { background-color: #fff; }
.jssorb01 .dn, .jssorb01 .dn:hover { background-color: #555555; }
.jssorb17 {
position: absolute;
}
.jssorb17 div, .jssorb17 div:hover, .jssorb17 .av {
position: absolute;
/* size of bullet elment */
width: 16px;
height: 16px;
background: url(/images/banner/b17.png) no-repeat;
overflow: hidden;
cursor: pointer;
}
.jssorb17 div { background-position: -7px -7px; }
.jssorb17 div:hover, .jssorb17 .av:hover { background-position: -37px -7px; }
.jssorb17 .av { background-position: -67px -7px; }
.jssorb17 .dn, .jssorb17 .dn:hover { background-position: -97px -7px; }
.jssora05l, .jssora05r {
display: block;
position: absolute;
/* size of arrow element */
width: 40px;
height: 40px;
cursor: pointer;
background: url(/images/banner/a17.png) no-repeat;
overflow: hidden;
}
.jssora05l { background-position: -10px -40px; }
.jssora05r { background-position: -70px -40px; }
.jssora05l:hover { background-position: -130px -40px; }
.jssora05r:hover { background-position: -190px -40px; }
.jssora05l.jssora05ldn { background-position: -250px -40px; }
.jssora05r.jssora05rdn { background-position: -310px -40px; }
.jssorb05 {
position: absolute;
}
.jssorb05 div, .jssorb05 div:hover, .jssorb05 .av {
position: absolute;
/* size of bullet elment */
width: 16px;
height: 16px;
background: url(/images/banner/b05.png) no-repeat;
overflow: hidden;
cursor: pointer;
}
.jssorb05 div { background-position: -7px -7px; }
.jssorb05 div:hover, .jssorb05 .av:hover { background-position: -37px -7px; }
.jssorb05 .av { background-position: -67px -7px; }
.jssorb05 .dn, .jssorb05 .dn:hover { background-position: -97px -7px; }
.jssora22l, .jssora22r {
display: block;
position: absolute;
/* size of arrow element */
width: 40px;
height: 58px;
cursor: pointer;
background: url(/images/banner/a22.png) center center no-repeat;
overflow: hidden;
}
.jssora22l { background-position: -10px -31px; }
.jssora22r { background-position: -70px -31px; }
.jssora22l:hover { background-position: -130px -31px; }
.jssora22r:hover { background-position: -190px -31px; }
.jssora22l.jssora22ldn { background-position: -250px -31px; }
.jssora22r.jssora22rdn { background-position: -310px -31px; }
.service .block{
margin-bottom: 80px;
}
.service .block.blocklast{
margin-bottom: 0px;
}
.service .block:after {
clear: both;
}
.service .block:before, .service .block:after {
display: table;
line-height: 0;
content: "";
}
.service .block .imgblock{
float: left;
margin-right: 20px;
}
.service .block .imgblock.r{
margin-left: 20px;
float: right;
}
.service .block .imgblock img{
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
-ms-border-radius: 10px;
-o-border-radius: 10px;
border-radius: 10px;
}
.service .block .txtblock{
/*float: left;*/
}
.service .block .txtblock h3{
font-size: 26px;
margin: 0;
opacity: .99;
text-transform: uppercase;
color: #475f75;
font-weight: normal;
}
.service .block .txtblock p{
font-size: 15px;
margin: 10px 0 0;
line-height: 23px;
color: #666666;
font-weight: lighter;
}
/*.service .block .txtblock ul{
display: block;
padding: 0;
list-style: outside;
width: 95%;
}
.service .block .txtblock ul li{
font-size: 15px;
line-height: 23px;
display: list-item;
text-align: -webkit-match-parent;
color: #666666;
}*/
class ApplicationController < ActionController::Base
protect_from_forgery
before_filter :subdomain_filter, :key_words_filter
def key_words_filter
title_arr = ['诺正检测 | NORMZ TESTING']
keywords_arr = ['诺正', '山东诺正', '诺正检测', '食品检测', '消防检测', '第三方检测', '环境检测', '农产品检测', '肉制品检测', 'CANS认证']
# description
if (chan = params[:chan]).present?
@chan = Post::CATE[chan] # => {name: '招贤纳士', cate: {'shzp' => '社会招聘''xyzp' => '校园招聘'}}
@chan_name = @chan[:name]
@cates = @chan[:cate] # 找到当前频道下的所有类别, 用作左侧导航
@cate_name = @cates[params[:cate]] # 当前类别的中文名称
title_arr.unshift(@chan_name) if @chan_name.present?
title_arr.unshift(@cate_name) if @cate_name
end
@title = title_arr.join(" - ")
@keywords = keywords_arr.join(",")
# @description = "诺正检测是独立的第三方检测公司,具有省级资质及农业行业机构的认证,主要从事食品检测、消防检测、环境检测及农产品、饲料、肥料、水产养殖、畜牧产品等领域的检验检测,以及相关技术咨询、培训、研发。"
@description = "诺正检测是在中国科学院沈阳应用生态研究所技术支持下成立的综合性第三方检测公司,是通过山东省级资质认定及农业行业机构认证的第三方检验机构,主要从事食品、农产品、环境、饲料、肥料及水产养殖、畜牧产品、消防设施等领域的检验检测,以及相关技术咨询、培训、研发。"
end
def subdomain_filter
subdomain = request.subdomain
ismobile = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.match(request.user_agent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.match(request.user_agent[0..3])
# 不存在www的情况 subdomain != 'www'
if params[:type] != 'api'
if Rails.env.production? and ismobile and subdomain.blank?
# redirect_to 'http://h5.normz.cn/#/app/' + request.path
url = request.url.to_s.sub('normz.cn/', 'h5.normz.cn/#/app/')
if url == 'http://h5.normz.cn/#/app/'
url = 'http://h5.normz.cn/#/app/home'
end
redirect_to url
end
# if subdomain.present? and !@ismobile
# redirect_to request.url.to_s.sub('h5.localhost:3001/#/', 'localhost:3001/')
# end
end
end
end
class HomeController < ApplicationController
def index
end
# /:chan/:cate/:flag
def show
if @cate.blank?
@cate = params[:cate] || @cates.keys[0]# 如果没有类别, 默认第一个为当前类别
@cate_name = @cates[@cate]# 当前类别的中文名称
end
@posts = Post.where(isdel: false, chan: params[:chan], cate: @cate).page(params[:page]).per(5).order('id desc')
unless params[:page].to_i > 1
@post = @posts.first if @posts.length == 1
@post = @posts.find_by_flag(params[:flag]) if params[:flag].present?
# 网页关键词
if @post and @post.words
keywords = @post.words.split(",") + @keywords.split(",")
keystr = keywords.uniq.join(",")
if keystr.length > 100 # 如果长度大于200截取, 删掉最后一个
keywords = keystr[0..100].split(",")
keywords.pop
keystr = keywords.join(',')
end
@keywords = keystr
if params[:flag].present?
@title = @post.title + " 诺正检测 | NORMZ TESTING"
end
end
end
if params[:type] == 'api'
posts = @posts.map do |post|
img = post.detail.scan(/<img[^>]+src\s*=\s*(['\"][^'\"]+['\"])[^>]*>/).flatten.first.gsub(/\"/, '') rescue '/images/default_200x150.jpg'
detail = post.detail.gsub(/<\/?.*?>/,"")[0..120]
{title: post.title, flag: post.flag, detail: post.detail, sub_detail: detail, img: img}
end
post = {title: @post.title, flag: @post.flag, detail: @post.detail} if @post
render json: {code: 200, posts: posts, post: post}
end
end
end
\ No newline at end of file
class MobileController < ApplicationController
def index
end
end
\ No newline at end of file
class PostsController < ApplicationController
before_filter :current_user, except: [:sign_in]
# GET /posts
# GET /posts.json
def index
sort = []
params[:screa] ||= 'desc'
{scate: :cate, schan: :chan, screa: :created_at}.each do |key, val|
if params[key].present?
sort.push(params[key] == "desc" ? "#{val} desc" : "#{val} asc")
end
end
@posts = Post.where(isdel: false).page(params[:page]).per(20).order(sort.join(', '))
respond_to do |format|
format.html # index.html.erb
format.json { render json: @posts }
end
end
# GET /posts/1
# GET /posts/1.json
def show
@post = Post.find_by_flag(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @post }
end
end
# GET /posts/new
# GET /posts/new.json
def new
@post = Post.new
respond_to do |format|
format.html # new.html.erb
format.json { render json: @post }
end
end
# GET /posts/1/edit
def edit
@post = Post.find_by_flag(params[:id])
end
# POST /posts
# POST /posts.json
def create
@post = Post.new(params[:post])
respond_to do |format|
if @post.save
format.html { redirect_to @post, notice: '文章创建成功.' }
format.json { render json: @post, status: :created, location: @post }
else
format.html { render action: "new" }
format.json { render json: @post.errors, status: :unprocessable_entity }
end
end
end
# PUT /posts/1
# PUT /posts/1.json
def update
@post = Post.find_by_flag(params[:id])
respond_to do |format|
if @post.update_attributes(params[:post])
format.html { redirect_to @post, notice: '文章修改成功.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @post.errors, status: :unprocessable_entity }
end
end
end
# DELETE /posts/1
# DELETE /posts/1.json
def destroy
@post = Post.find_by_flag(params[:id])
@post.update_attributes(isdel: true) if @post
redirect_to :back
end
# 上传图片
def upload
if params[:upload_file].present?
upload = params[:upload_file]
ext = File.extname(upload.original_filename).downcase
picture = Picture.create(filename: upload.original_filename)
system("convert #{upload.tempfile.path} -auto-orient -resize '1000>' -gravity center -strip -quality 85 -format jpg public/uploads/#{picture.id}.jpg")
# 有一个2:1.5的缩略图裁剪 最宽200
# File.open("public/uploads/#{picture.id}#{ext}", "wb") { |f| f.write(upload.read) }
render json: {success: true, msg: '上传成功', file_path: "/uploads/#{picture.id}.jpg"}
else
render json: {success: false, msg: '上传错误,联系管理员', file_path: '/images/logo.png'}
end
end
def sign_in
if request.post?
if params[:username] == 'normz' and params[:password] == 'normz-nuozheng'
session[:current_user] = 'normz'
redirect_to posts_path
else
flash[:notice] = '账号或密码错误'
redirect_to :sign_in
end
end
end
def sign_out
session[:current_user] = nil
redirect_to root_path
end
private
def current_user
unless session[:current_user] == 'normz'
redirect_to :sign_in and return
end
end
end
module ApplicationHelper
end
module PostsHelper
end
File mode changed
File mode changed
class Picture < ActiveRecord::Base
attr_accessible :filename
end
class Post < ActiveRecord::Base
attr_accessible :title, :flag, :detail, :chan, :cate, :words, :parent_id, :isdel
CATE = {
'ranges' => {
name: '诺正业务',
cate: {
# 'kyly' => '科研领域',
'spncp' => '食品/农产品检测',
# 'ncpjc' => '农产品检测',
# 'rzpjc' => '肉制品检测',
'hjjc' => '环境检测',
# 'swjc' => '生物检测',
# 'yyjc' => '医药检测',
'xfjc' => '消防检测',
'rhpjc' => '日化品检测',
'hfsl' => '化肥/饲料检测',
'sfjd' => '环境损害司法鉴定',
# 'jtjjc' => '添加剂检测',
}
},
'sources' => {
name: '资源中心',
cate: {
# 'zscx' => '证书查询',
'bgcx' => '报告查询',
'wssj' => '网上送检'
}
},
'dynamics' => {
name: '诺正动态',
cate: {
'gsdt' => '公司动态',
'hykx' => '行业快讯',
'pxxx' => '培训学习'
}
},
'cultures' => {
name: '诺正文化',
cate: {
'jzg' => '诺正价值观',
# 'hj' => '诺正环境',
# 'yj' => '诺正愿景',
# 'ygfc' => '员工风采',
# 'zd' => '诺正制度',
'js' => '诺正精神'
}
},
'abouts' => {
name: '关于诺正',
cate: {
'gsjj' => '公司简介',
'jclc' => '检测流程',
'yjss' => '硬件设施',
'fwcn' => '服务承诺',
# 'lxwm' => '联系我们'
}
},
'contact' => {
name: '联系我们',
cate: {
'lxdz' => '联系地址'
}
},
'jobs' => {
name: '招贤纳士',
cate: {
'shzp' => '社会招聘',
'xyzp' => '校园招聘'
}
}
}
BaseArr = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
validates_presence_of :title, :detail, :chan, :cate, message: '不能为空'
validates_uniqueness_of :flag, allow_blank: true, message: '已存在'
def to_param
flag
end
def flag=(val)
if flag.blank?
write_attribute(:flag, val.blank? ? shorturl : val)
else
if flag != val and val.present?
write_attribute(:flag, val)
end
end
end
def shorturl
hex = Digest::MD5.hexdigest("base_key" + Time.now.to_f.to_s)
output = []
4.times do |i|
str = hex[(i * 8)...(8 * (i + 1))]
int = 0x3FFFFFFF & ('0x' + str).to_i(16)
out = ''
6.times do
out += BaseArr[0x0000003D & int]
int = int >> 5
end
output << out
end
output.sort_by{rand}[0]
end
end
<div class="detectype wrapper">
<h2>检测范围</h2>
<div class="detectrange left_to_right mb">
<div class="mask">
<h3>图表展示</h3>
<p>详细内容/跳转检测业务/详细描述页</p>
</div>
<div class="detecticon detectfood"></div>
<div class="detecttext">
<h5>农产品检测</h5>
<p>诺正检测具备省级检测资质, 检测范围涵盖农药残留、营养含量等</p>
</div>
</div>
<div class="detectrange left_to_right mb">
<div class="mask">
<h3><a href="javascript:void(0);">图表展示</a></h3>
<p><a href="javascript:void(0);">详细内容/跳转检测业务/详细描述页</a></p>
</div>
<div class="detecticon detectmeat"></div>
<div class="detecttext">
<h5>肉制品检测</h5>
<p>诺正检测具备省级检测资质, 检测范围涵盖农药残留、化学品含量等</p>
</div>
</div>
<div class="detectrange left_to_right mb">
<div class="mask">
<h3><a href="javascript:void(0);">图表展示</a></h3>
<p><a href="javascript:void(0);">详细内容/跳转检测业务/详细描述页</a></p>
</div>
<div class="detecticon detectmilieu"></div>
<div class="detecttext">
<h5>环境检测</h5>
<p>诺正检测具备省级检测资质, 检测范围涵盖农药残留、化学品含量等</p>
</div>
</div>
<div class="detectrange left_to_right mb l">
<div class="mask">
<h3><a href="javascript:void(0);">图表展示</a></h3>
<p><a href="javascript:void(0);">详细内容/跳转检测业务/详细描述页</a></p>
</div>
<div class="detecticon detectfire"></div>
<div class="detecttext">
<h5>消防检测</h5>
<p>诺正检测具备省级检测资质, 检测范围涵盖农药残留、化学品含量等</p>
</div>
</div>
<div class="detectrange left_to_right">
<div class="mask">
<h3>图表展示</h3>
<p>详细内容/跳转检测业务/详细描述页</p>
</div>
<div class="detecticon detectfeiliao"></div>
<div class="detecttext">
<h5>肥料检测</h5>
<p>诺正检测具备省级检测资质, 检测范围涵盖农药残留、化学品含量等</p>
</div>
</div>
<div class="detectrange left_to_right">
<div class="mask">
<h3><a href="javascript:void(0);">图表展示</a></h3>
<p><a href="javascript:void(0);">详细内容/跳转检测业务/详细描述页</a></p>
</div>
<div class="detecticon detectsiliao"></div>
<div class="detecttext">
<h5>饲料检测</h5>
<p>诺正检测具备省级检测资质, 检测范围涵盖农药残留、化学品含量等</p>
</div>
</div>
<div class="detectrange left_to_right">
<div class="mask">
<h3><a href="javascript:void(0);">图表展示</a></h3>
<p><a href="javascript:void(0);">详细内容/跳转检测业务/详细描述页</a></p>
</div>
<div class="detecticon detectshipin"></div>
<div class="detecttext">
<h5>食品检测</h5>
<p>诺正检测具备省级检测资质, 检测范围涵盖农药残留、化学品含量等</p>
</div>
</div>
<div class="detectrange left_to_right l">
<div class="mask">
<h3><a href="javascript:void(0);">图表展示</a></h3>
<p><a href="javascript:void(0);">详细内容/跳转检测业务/详细描述页</a></p>
</div>
<div class="detecticon detectshuichan"></div>
<div class="detecttext">
<h5>水产品检测</h5>
<p>诺正检测具备省级检测资质, 检测范围涵盖农药残留、化学品含量等</p>
</div>
</div>
</div>
\ No newline at end of file
<div class="service wrapper">
<h2>服务宗旨</h2>
<div class="block wow bounceInLeft">
<div class="imgblock" data-wow-delay="0.1s">
<img src="/images/jcrange/mubiao.jpg" alt="图片">
</div>
<div class="txtblock">
<h3>质量方针</h3>
<p>
诚信、公正、科学、高效地保证质量第一。<br>
坚持秉公检验,保证良好的职业规范和职业道德。<br>
坚持信誉至上,保守秘密,确保客户权益。<br>
坚持科学管理,保证资源,切实执行规范程序。<br>
坚持高效服务,保证准确及时出具检验报告。<br>
坚持服务质量第一、体系运行质量第一。<br>
</p>
<h3 style="margin-top:20px;">质量目标</h3>
<p>
全年测试项目错误率不大于1‰。<br>
报告及时率不低于99%。<br>
客户投诉率不大于1%、投诉处理率100%。
</p>
</div>
</div>
<div class="block wow bounceInRight">
<div class="imgblock r">
<img src="/images/jcrange/shangyang.jpg" alt="图片">
</div>
<div class="txtblock">
<h3>科学速检</h3>
<p>中科院沈阳生态应用研究所是中国农产品检测标准的制定者, 也是国内农产品检测技术最前沿的团队。</p>
<p>诺正检测与中科院沈阳生态应用研究所深入合作, 强强联手, 培养了大批国内顶尖的检测人员服务于诺正检测。并且公司购入大量进口的先进检测设备, 保证检测的权威, 公正, 科学性。</p>
</div>
</div>
<div class="block blocklast">
<div class="imgblock wow bounceInLeft">
<img src="/images/jcrange/kexuegongzheng.jpg" alt="图片">
</div>
<div class="txtblock wow bounceInRight">
<h3>服务承诺</h3>
<p>本公司具有第三方实验室的地位,检测工作不受任何来自内、外部的不正当的行政干预、商业利润和其它方面压力的影响。不生产、不经营所检验的产品,不和被检测单位发生利益冲突。</p>
<p>本公司严格遵守保密原则,保证不泄漏用户技术资料和检测结果。保证完善质量体系,提高检测水平和管理水平,在确保检验报告的真实和准确的前提下,使客户满意率达到100%。</p>
</div>
</div>
</div>
<%= render 'banner' %>
<%= render 'range' %>
<%= render 'service' %>
<% if params[:chan] == 'cultures' or params[:chan] == 'dynamics' %>
<div class="banner" style="background-image: url(/images/banner/<%= params[:chan] %>.jpg?v=1);"></div>
<% else %>
<div class="banner" style="background-image: url(/images/banner/banner.jpg?v=1);"></div>
<% end %>
<div class="inside wrapper">
<div class="inside-left">
<div class="top"><%= @chan_name %></div>
<ul>
<% @cates.each do |key, val| %>
<% if key.eql?(@cate) %>
<li class="active">
<%= link_to val, {controller: :home, action: :show, chan: params[:chan], cate: key} %>
</li>
<% else %>
<li>
<%= link_to val, {controller: :home, action: :show, chan: params[:chan], cate: key} %>
</li>
<% end %>
<% end %>
</ul>
</div>
<div class="inside-right">
<div class="detail">
<div class="title">
<h3><%= @post.try(:title) || @cate_name %></h3>
<small>
<%= link_to '首页', root_path %>
-
<%= link_to @chan_name, controller: :home, action: :show, chan: params[:chan] %>
-
<%= link_to @cate_name, controller: :home, action: :show, chan: params[:chan], cate: @cate %>
<% if params[:flag].present? %>
-
<%= link_to @post.title, 'javascript:void(0);' %>
<% end %>
</small>
</div>
<div class="preview">
<% if @post %>
<%= @post.detail.html_safe %>
<% else %>
<% @posts.each do |post| %>
<div class="item">
<% img_path = post.detail.scan(/<img[^>]+src\s*=\s*(['\"][^'\"]+['\"])[^>]*>/).flatten.first.gsub(/\"/, '') rescue '/images/default_200x150.jpg' %>
<img src="<%= img_path %>" alt="默认图片" class="pic">
<h4 class="posth4">
<%= link_to post.title, controller: :home, action: :show, chan: params[:chan], cate: @cate, flag: post.flag %>
</h4>
<div class="postdesc">
<%= truncate(post.detail.gsub(/<\/?.*?>/,""), length: 120) %>
</div>
</div>
<% end %>
<%= paginate @posts %>
<% end %>
</div>
</div>
</div>
</div>
<% if current_page.first? %>
<li class="disabled">
<%= link_to raw(t 'views.pagination.first'), 'javascript:void(0);' %>
</li>
<% else %>
<li>
<%= link_to raw(t 'views.pagination.first'), url, :remote => remote %>
</li>
<% end %>
<li class='disabled'>
<%= content_tag :a, raw(t 'views.pagination.truncate') %>
</li>
<% if current_page.last? %>
<li class="disabled">
<%= link_to raw(t 'views.pagination.last'), 'javascript:void(0);' %>
</li>
<% else %>
<li>
<%= link_to raw(t 'views.pagination.last'), url, :remote => remote %>
</li>
<% end %>
<% if current_page.last? %>
<li class="disabled">
<%= link_to raw(t 'views.pagination.next'), 'javascript:void(0);', :rel =>'next' %>
</li>
<% else %>
<li>
<%= link_to raw(t 'views.pagination.next'), url, :rel =>'next', :remote => remote %>
</li>
<% end %>
\ No newline at end of file
<% if page.current? %>
<li class='active'>
<%= content_tag :a, page, remote: remote, rel: (page.next? ? 'next' : (page.prev? ? 'prev' : nil)) %>
</li>
<% else %>
<li>
<%= link_to page, url, remote: remote, rel: (page.next? ? 'next' : (page.prev? ? 'prev' : nil)) %>
</li>
<% end %>
<%= paginator.render do -%>
<ul class="pagination<%= " page#{size}" if defined?(size) %> text-center">
<%= first_page_tag %>
<%= prev_page_tag %>
<% each_page do |page| -%>
<% if page.left_outer? || page.right_outer? || page.inside_window? -%>
<%= page_tag page %>
<% elsif !page.was_truncated? -%>
<%= gap_tag %>
<% end -%>
<% end -%>
<%= next_page_tag %>
<%= last_page_tag %>
</ul>
<% end -%>
<% if current_page.first? %>
<li class="disabled">
<%= link_to raw(t 'views.pagination.previous'), 'javascript:void(0);', :rel =>'prev' %>
</li>
<% else %>
<li>
<%= link_to raw(t 'views.pagination.previous'), url, :rel =>'prev', :remote => remote %>
</li>
<% end %>
<!DOCTYPE html>
<html>
<head>
<title><%= @title %></title>
<meta name="keywords" content="<%= @keywords %>">
<meta name="description" content="<%= @description %>">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon">
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
<%= render 'shared/header' %>
<%= yield %>
<%= render 'shared/footer' %>
<div class="navi-scroll" style="display: block;">
<div class="navi-scroll-content">
<a href="/abouts/lxwm" class="scroll-contact-btn">
<span>联系我们</span>
<i></i>
</a>
<a href="/sources/wssj" class="scroll-order-btn">
<span>我要送检</span>
<i></i>
</a>
<a href="javascript:void(0);" class="scroll-top-btn" id="to-top">
<span>回到顶部</span>
<i></i>
</a>
</div>
</div>
<script src="/javascripts/initialize.js" type="text/javascript"></script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title><%= @title %></title>
<meta charset="utf-8">
<meta name="keywords" content="<%= @keywords %>">
<meta name="description" content="<%= @description %>">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<script>
window.CHANNELS = <%= raw Post::CATE.to_json %>;
</script>
<%= stylesheet_link_tag "mobile", :media => "all" %>
<script src="/javascripts/mobile/ionic.bundle.js"></script>
<script src="/javascripts/mobile/ion-gallery.js"></script>
<script src="/javascripts/mobile/app.js"></script>
<script src="/javascripts/mobile/controllers.js"></script>
<%= csrf_meta_tags %>
</head>
<body ng-app="starter">
<ion-nav-view></ion-nav-view>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>诺正检测 | NORMZ TESTING</title>
<meta name="keywords" content="诺正检测,农产品检测,肉制品检测,消防检测,环境检测,CANS认证">
<meta name="description" content="诺正检测是在中国科学院沈阳应用生态研究所技术支持下成立的综合性检测公司,是通过山东省级资质认定及农业行业机构认证的第三方检验机构,主要从事食品、农产品、环境、饲料、肥料及水产养殖、畜牧产品、消防设施等领域的检验检测,以及相关技术咨询、培训、研发。">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon">
<%= stylesheet_link_tag "admin", :media => "all" %>
<%= javascript_include_tag "application" %>
<link rel="stylesheet" type="text/css" href="/stylesheets/simditor.css" />
<script type="text/javascript" src="/javascripts/simditor/module.js"></script>
<script type="text/javascript" src="/javascripts/simditor/uploader.js"></script>
<script type="text/javascript" src="/javascripts/simditor/hotkeys.js"></script>
<script type="text/javascript" src="/javascripts/simditor/simditor.js"></script>
<script type="text/javascript" src="/javascripts/simditor/mobilecheck.js"></script>
<%= csrf_meta_tags %>
</head>
<body>
<div class="posts">
<%= yield %>
</div>
<script type="text/javascript">
$(function(){
var cate = <%= Post::CATE.to_json.html_safe %>;
$(document).on("change", "#post_chan", function(){
var _val = cate[$(this).val()]['cate'];
var _str = '';
for(var k in _val){
_str += '<option value="' + k + '">' + _val[k] + '</option>';
}
$("#post_cate").html(_str);
})
})
</script>
</body>
</html>
<%= form_for(@post) do |f| %>
<% if @post.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:</h2>
<ul>
<% @post.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<span><%= f.label :title, '标题' %></span>
<%= f.text_field :title, placeholder: '标题 30字以内 不能为空' %>
</div>
<div class="field">
<span><%= f.label :flag, '别名' %></span>
<%= f.text_field :flag, placeholder: '可以不填让系统自动生成' %>
</div>
<div class="field">
<span><%= f.label :words, '关键词' %></span>
<%= f.text_field :words, placeholder: '英文逗号隔开,' %>
</div>
<div class="field">
<span><%= f.label :chan, '频道' %></span>
<%= f.select :chan, Hash[Post::CATE.map{|k, v| [v[:name], k]}] %>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span><%= f.label :cate, '类别' %></span>
<%= f.select :cate, Post::CATE[@post.try(:chan) || Post::CATE.keys.first][:cate].invert %>
</div>
<% if params[:source] == 'edit' %>
<%= f.text_area :detail, style: "border: 1px solid #c9d8db;width:100%;height:400px;" %>
<% else %>
<%= render 'source', f: f %>
<% end %>
<br>
<%= f.submit %>
<% end %>
<section id="nuozheng-post">
<%= f.text_area :detail, id: 'txt-content', 'data-autosave' => 'editor-content', autofocus: nil %>
<div class="postdetail"></div>
</section>
<script>
(function() {
$(function() {
var $preview, editor, mobileToolbar, toolbar;
Simditor.locale = 'zh-CN';
toolbar = ['title', 'bold', 'italic', 'underline', 'strikethrough', 'fontScale', 'color', '|', 'ol', 'ul', 'blockquote', 'table', '|', 'link', 'image', 'hr', '|', 'indent', 'outdent', 'alignment'];
mobileToolbar = ["bold", "underline", "strikethrough", "color", "ul", "ol"];
if (mobilecheck()) {
toolbar = mobileToolbar;
}
editor = new Simditor({
textarea: $('#txt-content'),
placeholder: '这里输入文字...',
toolbar: toolbar,
pasteImage: true,
defaultImage: '/images/logo.png',
upload: {
url: '/upload'
}
});
$preview = $('.postdetail');
if ($preview.length > 0) {
return editor.on('valuechanged', function(e) {
return $preview.html(editor.getValue());
});
}
});
}).call(this);
</script>
\ No newline at end of file
<h3 class="title">
修改文章
<small>
<%= link_to '返回文章列表', posts_path(schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %>
/
<%= link_to '预览效果', post_path(@post, schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %>
/
<% if params[:source] == 'edit' %>
<%= link_to '正常编辑', edit_post_path(@post, schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %>
<% else %>
<%= link_to '源码编辑', edit_post_path(@post, schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page], source: 'edit') %>
<% end %>
</small>
</h3>
<%= render 'form' %>
<h3 class="title">
文章管理
<small>
<%= link_to '去首页', root_path %>
/
<%= link_to '注销', sign_out_path %>
/
<%= link_to '发布文章', new_post_path(schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %>
</small>
</h3>
<table class="list">
<tr>
<th width="3%">
ID
</th>
<th width="25%">
<!-- <input> -->
标题
</th>
<th width="16%">
<%= link_to "类别#{params[:scate] == 'desc' ? '△' : '▽'}", posts_path(scate: params[:scate] == 'desc' ? 'asc' : 'desc') %>
</th>
<th width="16%">
<%= link_to "频道#{params[:schan] == 'desc' ? '△' : '▽'}", posts_path(schan: params[:schan] == 'desc' ? 'asc' : 'desc') %>
</th>
<th width="10%">
<%= link_to "日期#{params[:screa] == 'desc' ? '▽' : '△'}", posts_path(screa: params[:screa] == 'desc' ? 'asc' : 'desc') %>
</th>
<th width="10%">别名</th>
<th width="20%">操作</th>
</tr>
<% @posts.each do |post| %>
<tr>
<td><%= post.id %></td>
<td><%= post.title %></td>
<td><%= Post::CATE[post.chan][:cate][post.cate] %></td>
<td><%= Post::CATE[post.chan][:name] %></td>
<td><%= post.created_at.to_date %></td>
<td><%= post.flag %></td>
<td>
<%= link_to '详细', post_path(post, schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %>
/
<%= link_to '编辑', edit_post_path(post, schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %>
/
<%= link_to '删除', post, method: :delete, data: { confirm: '确定删除?' } %>
</tr>
<% end %>
</table>
<%= paginate @posts %>
<h3 class="title">
发布文章
<small>
<%= link_to '返回文章列表', posts_path(schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %>
/
<% if params[:source] == 'edit' %>
<%= link_to '正常编辑', new_post_path(schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %>
<% else %>
<%= link_to '源码编辑', new_post_path(schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page], source: 'edit') %>
<% end %>
</small>
</h3>
<%= render 'form' %>
<div style="border-bottom: 3px solid #ccc;">
<h3 class="title">
<%= @post.title %>
<small>
<%= link_to '文章列表', posts_path(schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %>
/
<%= link_to '编辑文章', edit_post_path(@post, schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %>
/
<%= link_to '发布文章', new_post_path(schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %>
/
首页 - <%= Post::CATE[@post.chan][:name] %> - <%= Post::CATE[@post.chan][:cate][@post.cate] %>
</small>
</h3>
</div>
<div class="postdetail">
<%= @post.detail.html_safe %>
</div>
\ No newline at end of file
<p>
<%= flash[:notice] %>
</p>
<form action="/sign_in" method="post">
<input name="utf8" type="hidden" value="✓">
<input name="authenticity_token" type="hidden" value="<%= form_authenticity_token %>">
账号 <input type="text" name="username">
密码 <input type="password" name="password">
<input type="submit" value="登陆">
</form>
\ No newline at end of file
<div class="footer">
<ul class="ftservice wrapper">
<% if controller_name.eql?('home') and action_name.eql?('index') %>
<li class="item wow fadeInUpBig" data-wow-delay="0.0s">
<img src="/images/bottom/1.jpg" alt="公正独立">
<h5>公正独立</h5>
<p>不受任何一方制约的第三方机构</p>
</li>
<li class="item wow fadeInUpBig" data-wow-delay="0.3s">
<img src="/images/bottom/2.jpg" alt="3天速检">
<h5>3天速检</h5>
<p>高效快速的检测效果</p>
</li>
<li class="item wow fadeInUpBig" data-wow-delay="0.6s">
<img src="/images/bottom/3.jpg" alt="国家级认证">
<h5>国家级认证</h5>
<p>国家级认定权威检测机构</p>
</li>
<li class="item wow fadeInUpBig" data-wow-delay="0.9s">
<img src="/images/bottom/4.jpg" alt="全程记录">
<h5>全程记录</h5>
<p>检验过程全程记录存档</p>
</li>
<li class="item wow fadeInUpBig" data-wow-delay="1.2s">
<img src="/images/bottom/5.jpg" alt="先进软硬件设施">
<h5>先进软硬件设施</h5>
<p>采用国外先进检测设备</p>
</li>
<% else %>
<li class="item">
<img src="/images/bottom/1.jpg" alt="公正独立">
<h5>公正独立</h5>
<p>不受任何一方制约的第三方机构</p>
</li>
<li class="item">
<img src="/images/bottom/2.jpg" alt="3天速检">
<h5>3天速检</h5>
<p>高效快速的检测效果</p>
</li>
<li class="item">
<img src="/images/bottom/3.jpg" alt="国家级认证">
<h5>国家级认证</h5>
<p>国家级认定权威检测机构</p>
</li>
<li class="item">
<img src="/images/bottom/4.jpg" alt="全程记录">
<h5>全程记录</h5>
<p>检验过程全程记录存档</p>
</li>
<li class="item">
<img src="/images/bottom/5.jpg" alt="先进软硬件设施">
<h5>先进软硬件设施</h5>
<p>采用国外先进检测设备</p>
</li>
<% end %>
</ul>
<div class="line"></div>
<ul class="ftlinks wrapper">
<li class="ftlink">
<a class="linktitle" href="javascript:void(0);">关于我们</a>
<ul>
<li>
<a href="/abouts/gsjj/jianjie">
公司简介
</a>
</li>
<li>
<a href="/cultures">
企业文化
</a>
</li>
<li>
<a href="/abouts/fwcn">
服务宗旨
</a>
</li>
<li>
<a href="/abouts/yjss/devices">
实验室仪器
</a>
</li>
<li>
<a href="/abouts/gsjj/BrYJrm">
企业宣传片
</a>
</li>
</ul>
</li>
<li class="ftlink">
<a class="linktitle" href="javascript:void(0);">业务领域</a>
<ul>
<li>
<a href="/ranges/hjjc">
环境检测
</a>
</li>
<li>
<a href="/ranges/xfjc">
消防检测
</a>
</li>
<li>
<a href="/ranges/ncpjc">
农产品检测
</a>
</li>
<li>
<a href="/ranges/rzpjc">
肉制品检测
</a>
</li>
<li>
<a href="javascript:void(0);">
添加剂检测
</a>
</li>
</ul>
</li>
<li class="ftlink">
<a class="linktitle" href="javascript:void(0);">检测范围</a>
<ul>
<li>
<a href="javascript:void(0);">
农药残留
</a>
</li>
<li>
<a href="javascript:void(0);">
食品添加剂
</a>
</li>
<li>
<a href="javascript:void(0);">
重金属含量
</a>
</li>
<li>
<a href="javascript:void(0);">
微生物检测
</a>
</li>
<li>
<a href="javascript:void(0);">
塑化剂检测
</a>
</li>
</ul>
</li>
<li class="ftlink">
<a class="linktitle" href="javascript:void(0);">合作单位</a>
<ul>
<li>
<a href="http://www.iae.cas.cn/" target="_blank">
中科院沈阳应用生态研究所
</a>
</li>
<!-- <li>
<a href="javascript:void(0);">
中国水科院
</a>
</li>
<li>
<a href="javascript:void(0);">
青岛啤酒
</a>
</li>
<li>
<a href="javascript:void(0);">
北京沙河水库
</a>
</li>
<li>
<a href="javascript:void(0);">
菏泽牡丹园
</a>
</li> -->
</ul>
</li>
<li class="ftlink">
<a class="linktitle" href="javascript:void(0);">联系我们</a>
<div class="ftcontact wrapper">
<div class="ftphoneicon">
<span></span>
</div>
<div class="ftphoneinfo">
<h4>0536-5607056</h4>
<p>7*24小时客服电话</p>
</div>
</div>
<!-- <div class="ftcontact wrapper wechat">
<div class="ftphoneicon">
<span></span>
</div>
<div class="ftphoneinfo">
<h4>微信客服</h4>
<p>扫码关注</p>
</div>
</div> -->
<!-- <ul>
<li>
<a href="javascript:void(0);">
微信
</a>
<a href="javascript:void(0);">
微博
</a>
<a href="javascript:void(0);">
邮箱
</a>
<a href="javascript:void(0);">
电话
</a>
<a href="javascript:void(0);">
地址
</a>
</li>
</ul> -->
</li>
</ul>
<div class="line"></div>
<div class="ftwarp wrapper">
<div class="copyright">
Copyright © 2015-2016 山东诺正检测有限公司
<br><br>
版权所有 鲁ICP备15045188号
</div>
<ul class="copyul">
<li>
<a href="javascript:void(0);" title="诺正版权, 翻版必究">版权说明</a>
</li>
<li>
<a href="javascript:void(0);">使用协议</a>
</li>
<li>
<a href="javascript:void(0);" title="山东懒虫科技有限公司">技术支持</a>
</li>
<li>
<a href="/sign_in">后台管理</a>
</li>
</ul>
</div>
</div>
\ No newline at end of file
<div class="header">
<div class="wrapper">
<div class="logo">
<a href="/" title="山东诺正检测有限公司">
<img src="/images/logo.png" alt="诺正Logo">
</a>
<span style="font-size: 25px;">山东诺正检测有限公司</span>
</div>
<div class="nav">
<ul class="menu">
<li>
<%= link_to '诺正首页', root_path, class: "#{'active' if request.path == '/'}" %>
</li>
<% Post::CATE.each do |key, val| %>
<li>
<%= link_to val[:name], {controller: :home, action: :show, chan: key}, class: "#{'active' if params[:chan].eql?(key)}" %>
</li>
<% end %>
</ul>
</div>
</div>
</div>
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
run Nuozheng::Application
require File.expand_path('../boot', __FILE__)
require 'rails/all'
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
module Nuozheng
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Custom directories with classes and modules you want to be autoloadable.
# config.autoload_paths += %W(#{config.root}/extras)
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
# Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
# Enable escaping HTML in JSON.
config.active_support.escape_html_entities_in_json = true
# Use SQL instead of Active Record's schema dumper when creating the database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql
# Enforce whitelist mode for mass assignment.
# This will create an empty whitelist of attributes available for mass-assignment for all models
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
# parameters by using an attr_accessible or attr_protected declaration.
config.active_record.whitelist_attributes = true
# Enable the asset pipeline
config.assets.enabled = true
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
end
end
require 'rubygems'
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: nuozheng
pool: 5
username: tmp
password: tmp
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: mysql2
encoding: utf8
reconnect: false
database: nuozheng
pool: 5
username: tmp
password: tmp
production:
adapter: mysql2
encoding: utf8
reconnect: false
database: nuozheng
pool: 5
username: tmp
password: tmp
require "awesome_print"
# config valid only for current version of Capistrano
lock '3.4.0'
set :application, 'nuozheng'
set :repo_url, 'git@bitbucket.org:bopro/nuozheng.git'
set :branch, "master"
set :deploy_to, '/home/web/nuozheng'
set :scm, :git
set :pty, false
set :keep_releases, 3
set :unicorn_config, "#{current_path}/config/unicorn.rb"
set :unicorn_pid, "#{shared_path}/tmp/pids/unicorn_nuozheng.pid"
namespace :deploy do
task :start do
on roles(:web) do
within current_path do
with rails_env: 'production' do
execute :bundle, "exec unicorn_rails -c #{fetch(:unicorn_config)} -D"
end
end
end
end
task :stop do
on roles(:web) do
execute "if [ -f #{fetch(:unicorn_pid)} ]; then kill -QUIT `cat #{fetch(:unicorn_pid)}`; fi"
end
end
task :restart do
on roles(:web) do
# within current_path do
# 用USR2信号来实现无缝部署重启
execute "if [ -f #{fetch(:unicorn_pid)} ]; then kill -s USR2 `cat #{fetch(:unicorn_pid)}`; fi"
# end
end
end
task :mkdir_shared do
on roles(:web) do
execute "mkdir -p #{shared_path}/log"
execute "mkdir -p #{shared_path}/assets"
execute "mkdir -p #{shared_path}/tmp/pids"
execute "mkdir -p #{shared_path}/tmp/cache"
end
end
task :link_shared do
on roles(:web) do
execute "ln -sf #{shared_path}/log #{current_path}/log"
execute "ln -sf #{shared_path}/assets #{current_path}/public/assets"
execute "ln -sf #{shared_path}/tmp #{current_path}/tmp"
end
end
task :db_migrate do
on roles(:web) do
within current_path do
with rails_env: 'production' do
execute :bundle, :exec, :rake, 'db:migrate'
end
end
end
end
task :bundle_install do
on roles(:web) do
within current_path do
with rails_env: 'production' do
execute :bundle, 'install'
end
end
end
end
before :starting, :mkdir_shared
after :publishing, :link_shared
after :publishing, :bundle_install
after :publishing, :db_migrate
after :publishing, :restart # 第一次部署会有找不到unicron.pid的bug
end
# server-based syntax
# ======================
# Defines a single server with a list of roles and multiple properties.
# You can define all roles on a single server, or split them:
# server 'example.com', user: 'deploy', roles: %w{app db web}, my_property: :my_value
# server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value
server '115.28.86.237', user: 'web', roles: %w{app db web}
# role-based syntax
# ==================
# Defines a role with one or multiple servers. The primary server in each
# group is considered to be the first unless any hosts have the primary
# property set. Specify the username and a domain or IP for the server.
# Don't use `:all`, it's a meta role.
role :app, "115.28.86.237"
# role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value
# role :db, %w{deploy@example.com}
# Configuration
# =============
# You can set any configuration variable like in config/deploy.rb
# These variables are then only loaded and set in this stage.
# For available Capistrano configuration variables see the documentation page.
# http://capistranorb.com/documentation/getting-started/configuration/
# Feel free to add new variables to customise your setup.
# Custom SSH Options
# ==================
# You may pass any option but keep in mind that net/ssh understands a
# limited set of options, consult the Net::SSH documentation.
# http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start
#
# Global options
# --------------
# set :ssh_options, {
# keys: %w(/home/rlisowski/.ssh/id_rsa),
# forward_agent: false,
# auth_methods: %w(password)
# }
#
# The server-based syntax can be used to override options:
# ------------------------------------
# server 'example.com',
# user: 'user_name',
# roles: %w{web app},
# ssh_options: {
# user: 'user_name', # overrides user setting above
# keys: %w(/home/user_name/.ssh/id_rsa),
# forward_agent: false,
# auth_methods: %w(publickey password)
# # password: 'please use keys'
# }
# server-based syntax
# ======================
# Defines a single server with a list of roles and multiple properties.
# You can define all roles on a single server, or split them:
# server 'example.com', user: 'deploy', roles: %w{app db web}, my_property: :my_value
# server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value
# server 'db.example.com', user: 'deploy', roles: %w{db}
# role-based syntax
# ==================
# Defines a role with one or multiple servers. The primary server in each
# group is considered to be the first unless any hosts have the primary
# property set. Specify the username and a domain or IP for the server.
# Don't use `:all`, it's a meta role.
# role :app, %w{deploy@example.com}, my_property: :my_value
# role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value
# role :db, %w{deploy@example.com}
# Configuration
# =============
# You can set any configuration variable like in config/deploy.rb
# These variables are then only loaded and set in this stage.
# For available Capistrano configuration variables see the documentation page.
# http://capistranorb.com/documentation/getting-started/configuration/
# Feel free to add new variables to customise your setup.
# Custom SSH Options
# ==================
# You may pass any option but keep in mind that net/ssh understands a
# limited set of options, consult the Net::SSH documentation.
# http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start
#
# Global options
# --------------
# set :ssh_options, {
# keys: %w(/home/rlisowski/.ssh/id_rsa),
# forward_agent: false,
# auth_methods: %w(password)
# }
#
# The server-based syntax can be used to override options:
# ------------------------------------
# server 'example.com',
# user: 'user_name',
# roles: %w{web app},
# ssh_options: {
# user: 'user_name', # overrides user setting above
# keys: %w(/home/user_name/.ssh/id_rsa),
# forward_agent: false,
# auth_methods: %w(publickey password)
# # password: 'please use keys'
# }
# Load the rails application
require File.expand_path('../application', __FILE__)
# Initialize the rails application
Nuozheng::Application.initialize!
Nuozheng::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
# Show full error reports and disable caching
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
# Raise exception on mass assignment protection for Active Record models
config.active_record.mass_assignment_sanitizer = :strict
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
config.active_record.auto_explain_threshold_in_seconds = 0.5
# Do not compress assets
config.assets.compress = false
# Expands the lines which load the assets
config.assets.debug = true
end
Nuozheng::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# Code is not reloaded between requests
config.cache_classes = true
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = true
# Compress JavaScripts and CSS
config.assets.compress = true
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true
# Generate digests for assets URLs
config.assets.digest = true
config.assets.js_compressor = :uglifier
# Defaults to nil and saved in location specified by config.assets.prefix
# config.assets.manifest = YOUR_PATH
# Specifies the header that your server uses for sending files
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
# See everything in the log (default is :info)
# config.log_level = :debug
# Prepend all log lines with the following tags
# config.log_tags = [ :subdomain, :uuid ]
# Use a different logger for distributed setups
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
# Use a different cache store in production
# config.cache_store = :mem_cache_store
# Enable serving of images, stylesheets, and JavaScripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
# config.assets.precompile += %w( search.js )
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
# Enable threaded mode
# config.threadsafe!
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found)
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
# config.active_record.auto_explain_threshold_in_seconds = 0.5
# config.action_mailer.default_url_options = {:host => 'www.normz.cn'}
end
Nuozheng::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
config.cache_classes = true
# Configure static asset server for tests with Cache-Control for performance
config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600"
# Log error messages when you accidentally call methods on nil
config.whiny_nils = true
# Show full error reports and disable caching
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Raise exceptions instead of rendering exception templates
config.action_dispatch.show_exceptions = false
# Disable request forgery protection in test environment
config.action_controller.allow_forgery_protection = false
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
# Raise exception on mass assignment protection for Active Record models
config.active_record.mass_assignment_sanitizer = :strict
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
end
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
# Rails.backtrace_cleaner.remove_silencers!
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end
#
# These inflection rules are supported but not enabled by default:
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.acronym 'RESTful'
# end
Kaminari.configure do |config|
# config.default_per_page = 25
# config.max_per_page = nil
# config.window = 4
# config.outer_window = 0
# config.left = 0
# config.right = 0
# config.page_method_name = :page
# config.param_name = :page
end
# Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Mime::Type.register_alias "text/html", :iphone
# Be sure to restart your server when you modify this file.
# Your secret key for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
Nuozheng::Application.config.secret_token = '8b17a9f8327eae4357722ea078c5905462235872cb3cb0c89680fe21a6a0e74cacc995202b6e998221ecf8f7e5625b22388c9cfef51b2a08111a54e127f27d64'
# Be sure to restart your server when you modify this file.
Nuozheng::Application.config.session_store :cookie_store, key: '_nuozheng_session'
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "rails generate session_migration")
# Nuozheng::Application.config.session_store :active_record_store
# Be sure to restart your server when you modify this file.
#
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
wrap_parameters format: [:json]
end
# Disable root element in JSON by default.
ActiveSupport.on_load(:active_record) do
self.include_root_in_json = false
end
# Sample localization file for English. Add more files in this directory for other locales.
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
en:
hello: "Hello world"
en:
views:
pagination:
first: "首页"
last: "尾页"
previous: "上一页"
next: "下一页"
truncate: "..."
\ No newline at end of file
zh-CN:
views:
pagination:
first: "首页"
last: "尾页"
previous: "上一页"
next: "下一页"
truncate: "..."
\ No newline at end of file
Nuozheng::Application.routes.draw do
post '/upload' => 'posts#upload'
get '/sign_in' => 'posts#sign_in'
post '/sign_in' => 'posts#sign_in'
get '/sign_out' => 'posts#sign_out'
resources :posts
constraints subdomain: 'h5' do
root :to => 'mobile#index'
end
get ':chan(/:cate(/:flag))(.:format)' => 'home#show'
# cultures
# resources :ranges, only: [:index, :show]
# resources :dynamics, only: [:index, :show]
# resources :cultures, only: [:index, :show]
# resources :abouts, only: [:index, :show]
# resources :jobs, only: [:index, :show]
# The priority is based upon order of creation:
# first created -> highest priority.
# Sample of regular route:
# match 'products/:id' => 'catalog#view'
# Keep in mind you can assign values other than :controller and :action
# Sample of named route:
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
# This route can be invoked with purchase_url(:id => product.id)
# Sample resource route (maps HTTP verbs to controller actions automatically):
# resources :products
# Sample resource route with options:
# resources :products do
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end
# Sample resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end
# Sample resource route with more complex sub-resources
# resources :products do
# resources :comments
# resources :sales do
# get 'recent', :on => :collection
# end
# end
# Sample resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
root :to => 'home#index'
# See how all your routes lay out with "rake routes"
# This is a legacy wild controller route that's not recommended for RESTful applications.
# Note: This route will make all actions in every controller accessible via GET requests.
# match ':controller(/:action(/:id))(.:format)'
end
worker_processes 1
app_root = File.expand_path("../..", __FILE__)
working_directory app_root
# Listen on fs socket for better performance
listen "/tmp/unicorn.nuozheng.sock", :backlog => 64
listen 5096, :tcp_nopush => false
# Nuke workers after 30 seconds instead of 60 seconds (the default)
timeout 30
# App PID
pid "#{app_root}/tmp/pids/unicorn_nuozheng.pid"
# By default, the Unicorn logger will write to stderr.
# Additionally, some applications/frameworks log to stderr or stdout,
# so prevent them from going to /dev/null when daemonized here:
stderr_path "#{app_root}/log/unicorn.stderr.log"
stdout_path "#{app_root}/log/unicorn.stdout.log"
# To save some memory and improve performance
preload_app true
# GC.respond_to?(:copy_on_write_friendly=) and GC.copy_on_write_friendly = true
# Force the bundler gemfile environment variable to
# reference the Сapistrano "current" symlink
before_exec do |_|
ENV["BUNDLE_GEMFILE"] = File.join(app_root, 'Gemfile')
end
before_fork do |server, worker|
# 参考 http://unicorn.bogomips.org/SIGNALS.html
# 使用USR2信号,以及在进程完成后用QUIT信号来实现无缝重启
old_pid = app_root + '/tmp/pids/unicorn_nuozheng.pid.oldbin'
if File.exists?(old_pid) && server.pid != old_pid
begin
Process.kill("QUIT", File.read(old_pid).to_i)
rescue Errno::ENOENT, Errno::ESRCH
# someone else did our job for us
end
end
# the following is highly recomended for Rails + "preload_app true"
# as there's no need for the master process to hold a connection
defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect!
end
after_fork do |server, worker|
# # 禁止GC,配合后续的OOB,来减少请求的执行时间
# GC.disable
# the following is *required* for Rails + "preload_app true",
defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection
end
class CreatePosts < ActiveRecord::Migration
def change
create_table :posts do |t|
t.string :title
t.string :flag
t.string :words
t.text :detail
t.integer :parent_id
t.string :chan
t.string :cate
t.boolean :isdel, default: false
t.timestamps
end
end
end
class CreatePictures < ActiveRecord::Migration
def change
create_table :pictures do |t|
t.string :filename
t.timestamps
end
end
end
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20160109100011) do
create_table "pictures", :force => true do |t|
t.string "filename"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "posts", :force => true do |t|
t.string "title"
t.string "flag"
t.text "detail"
t.integer "parent_id"
t.string "chan"
t.string "cate"
t.boolean "isdel", :default => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
end
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel', city: cities.first)
Use this README file to introduce your application and point to useful places in the API for learning more.
Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
File mode changed
File mode changed
No preview for this file type
<!DOCTYPE html>
<html>
<head>
<title>The page you were looking for doesn't exist (404)</title>
<style type="text/css">
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
div.dialog {
width: 25em;
padding: 0 4em;
margin: 4em auto 0 auto;
border: 1px solid #ccc;
border-right-color: #999;
border-bottom-color: #999;
}
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
</style>
</head>
<body>
<!-- This file lives in public/404.html -->
<div class="dialog">
<h1>The page you were looking for doesn't exist.</h1>
<p>You may have mistyped the address or the page may have moved.</p>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>The change you wanted was rejected (422)</title>
<style type="text/css">
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
div.dialog {
width: 25em;
padding: 0 4em;
margin: 4em auto 0 auto;
border: 1px solid #ccc;
border-right-color: #999;
border-bottom-color: #999;
}
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
</style>
</head>
<body>
<!-- This file lives in public/422.html -->
<div class="dialog">
<h1>The change you wanted was rejected.</h1>
<p>Maybe you tried to change something you didn't have access to.</p>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>We're sorry, but something went wrong (500)</title>
<style type="text/css">
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
div.dialog {
width: 25em;
padding: 0 4em;
margin: 4em auto 0 auto;
border: 1px solid #ccc;
border-right-color: #999;
border-bottom-color: #999;
}
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
</style>
</head>
<body>
<!-- This file lives in public/500.html -->
<div class="dialog">
<h1>We're sorry, but something went wrong.</h1>
</div>
</body>
</html>
File mode changed
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
No preview for this file type
This diff is collapsed. Click to expand it.