洪海涛 8 năm trước cách đây
mục cha
commit
307d495589

+ 3 - 0
webshell/dailyAnalys.sh

@@ -0,0 +1,3 @@
+#! /bin/bash
+cd /data/php/www/protected
+/usr/local/php/bin/php yiic dailyanalys

+ 4 - 0
webshell/hourlyWork.sh

@@ -0,0 +1,4 @@
+#! /bin/bash
+cd /data/php/www/protected
+/usr/local/php/bin/php yiic hourlywork
+/usr/local/php/bin/php yiic dealvideoconv

+ 3 - 0
webshell/pushListener.sh

@@ -0,0 +1,3 @@
+#! /bin/bash
+cd /data/php/www/protected
+/usr/local/php/bin/php yiic pushlistener

+ 763 - 0
webshell/sys-init.sh

@@ -0,0 +1,763 @@
+#! /bin/bash -e
+#
+platform=`uname -i`
+if [ $platform != "x86_64" ];then
+	echo "\033[31mthis script is only for 64bit Operating System !\033[0m"
+	exit 1
+fi
+system=`cat /etc/redhat-release |awk '{print $1}'`
+if [ $system != "CentOS" ];then
+	echo "\033[31mthis script is only for CentOS 6 !\033[0m"
+	exit 1
+fi
+mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
+wget -c http://mirrors.163.com/.help/CentOS6-Base-163.repo -O /etc/yum.repos.d/CentOS-Base.repo
+
+DATE=`date +"%Y-%m-%d %H:%M:%S"`
+CPU_PROCESSOR=`grep 'processor' /proc/cpuinfo | sort -u | wc -l`
+HOSTNAME=`hostname -s`
+USER=`whoami`
+IPADDR=`ifconfig eth0|grep 'inet addr'|sed 's/^.*addr://g' |sed 's/Bcast:.*$//g'`
+CPU_AVERAGE=`cat /proc/loadavg | cut -c1-14`
+MemTotal=$[`grep MemTotal /proc/meminfo |awk '{print $2}'`/1024/1024+1]
+BASEPATH=$(cd `dirname $0`; pwd)
+DOWNURL="http://cdn.iyueni.com/download/package/"
+
+function system {
+	echo -e "\033[41;33m|-----------System Infomation-----------\033[0m"
+	echo -e "| DATE         :$DATE"
+	echo -e "| HOSTNAME     :$HOSTNAME"
+	echo -e "| USER         :$USER"
+	echo -e "| Root dir     :$BASEPATH"
+	echo -e "| IP           :$IPADDR"
+	echo -e "| CPU_AVERAGE  :$CPU_AVERAGE"
+	echo -e "| CPU_PROCESSOR:$CPU_PROCESSOR"
+	echo -e "| MemTotal     :${MemTotal}G"
+}
+
+function process {
+	echo -e "\033[41;33m|-----------Current Process-----------\033[0m"
+	for service in nginx php mysql
+	do
+		if [ `ps aux|grep $service |grep -v grep|wc -l` -gt 0 ];then
+			echo -e "\033[32m$service.......................[RUNNING]\033[0m"
+		else
+			echo -e "\033[31m$service.......................[NOT RUN]\033[0m"
+		fi
+	done
+}
+
+function configSysctl {
+	if [ -z "`grep '^net.ipv4.tcp_max_tw_buckets' /etc/sysctl.conf`" ];then
+		echo "net.ipv4.tcp_max_tw_buckets = 10000" >> /etc/sysctl.conf
+	else
+		sed -i "s/^net.ipv4.tcp_max_tw_buckets *=.*/net.ipv4.tcp_max_tw_buckets = 10000/g" /etc/sysctl.conf
+	fi
+	if [ -z "`grep '^net.ipv4.ip_local_port_range' /etc/sysctl.conf`" ];then
+		echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf
+	else
+		sed -i "s/^net.ipv4.ip_local_port_range *=.*/net.ipv4.ip_local_port_range = 1024 65000/g" /etc/sysctl.conf
+	fi
+	if [ -z "`grep '^net.ipv4.tcp_tw_recycle' /etc/sysctl.conf`" ];then
+		echo "net.ipv4.tcp_tw_recycle = 1" >> /etc/sysctl.conf
+	else
+		sed -i "s/^net.ipv4.tcp_tw_recycle *=.*/net.ipv4.tcp_tw_recycle = 1/g" /etc/sysctl.conf
+	fi
+	if [ -z "`grep '^net.ipv4.tcp_tw_reuse' /etc/sysctl.conf`" ];then
+		echo "net.ipv4.tcp_tw_reuse = 1" >> /etc/sysctl.conf
+	else
+		sed -i "s/^net.ipv4.tcp_tw_reuse *=.*/net.ipv4.tcp_tw_reuse = 1/g" /etc/sysctl.conf
+	fi
+	if [ -z "`grep '^net.ipv4.tcp_syncookies' /etc/sysctl.conf`" ];then
+		echo "net.ipv4.tcp_syncookies = 1" >> /etc/sysctl.conf
+	else
+		sed -i "s/^net.ipv4.tcp_syncookies *=.*/net.ipv4.tcp_syncookies = 1/g" /etc/sysctl.conf
+	fi
+	if [ -z "`grep '^net.core.somaxconn' /etc/sysctl.conf`" ];then
+		echo "net.core.somaxconn = 262144" >> /etc/sysctl.conf
+	else
+		sed -i "s/^net.core.somaxconn *=.*/net.core.somaxconn = 262144/g" /etc/sysctl.conf
+	fi
+	if [ -z "`grep '^net.core.netdev_max_backlog' /etc/sysctl.conf`" ];then
+		echo "net.core.netdev_max_backlog = 262144" >> /etc/sysctl.conf
+	else
+		sed -i "s/^net.core.netdev_max_backlog *=.*/net.core.netdev_max_backlog = 262144/g" /etc/sysctl.conf
+	fi
+	if [ -z "`grep '^net.ipv4.tcp_max_orphans' /etc/sysctl.conf`" ];then
+		echo "net.ipv4.tcp_max_orphans = 2621444" >> /etc/sysctl.conf
+	else
+		sed -i "s/^net.ipv4.tcp_max_orphans *=.*/net.ipv4.tcp_max_orphans = 2621444/g" /etc/sysctl.conf
+	fi
+	if [ -z "`grep '^net.ipv4.tcp_max_syn_backlog' /etc/sysctl.conf`" ];then
+		echo "net.ipv4.tcp_max_syn_backlog = 262144" >> /etc/sysctl.conf
+	else
+		sed -i "s/^net.ipv4.tcp_max_syn_backlog *=.*/net.ipv4.tcp_max_syn_backlog = 262144/g" /etc/sysctl.conf
+	fi
+	if [ -z "`grep '^net.ipv4.tcp_timestamps' /etc/sysctl.conf`" ];then
+		echo "net.ipv4.tcp_timestamps = 0" >> /etc/sysctl.conf
+	else
+		sed -i "s/^net.ipv4.tcp_timestamps *=.*/net.ipv4.tcp_timestamps = 0/g" /etc/sysctl.conf
+	fi
+	if [ -z "`grep '^net.ipv4.tcp_synack_retries' /etc/sysctl.conf`" ];then
+		echo "net.ipv4.tcp_synack_retries = 1" >> /etc/sysctl.conf
+	else
+		sed -i "s/^net.ipv4.tcp_synack_retries *=.*/net.ipv4.tcp_synack_retries = 1/g" /etc/sysctl.conf
+	fi
+	if [ -z "`grep '^net.ipv4.tcp_syn_retries' /etc/sysctl.conf`" ];then
+		echo "net.ipv4.tcp_syn_retries = 1" >> /etc/sysctl.conf
+	else
+		sed -i "s/^net.ipv4.tcp_syn_retries *=.*/net.ipv4.tcp_syn_retries = 1/g" /etc/sysctl.conf
+	fi
+	if [ -z "`grep '^net.ipv4.tcp_fin_timeout' /etc/sysctl.conf`" ];then
+		echo "net.ipv4.tcp_fin_timeout = 1" >> /etc/sysctl.conf
+	else
+		sed -i "s/^net.ipv4.tcp_fin_timeout *=.*/net.ipv4.tcp_fin_timeout = 1/g" /etc/sysctl.conf
+	fi
+	if [ -z "`grep '^net.ipv4.tcp_keepalive_time' /etc/sysctl.conf`" ];then
+		echo "net.ipv4.tcp_keepalive_time = 1200" >> /etc/sysctl.conf
+	else
+		sed -i "s/^net.ipv4.tcp_keepalive_time *=.*/net.ipv4.tcp_keepalive_time = 1200/g" /etc/sysctl.conf
+	fi
+	sysctl -p
+	echo -e "\033[31msysctl.conf to complete the optimization!\033[0m"
+}
+
+function configUlimit {
+	if [ -z "`grep '^ulimit -SHn' /etc/profile`" ];then
+		echo "ulimit -SHn 65535" >> /etc/profile
+	else
+		sed -i "s/^ulimit -SHn.*/ulimit -SHn 65535/g" /etc/profile
+	fi
+	if [ -z "`grep '^ulimit -SHu' /etc/profile`" ];then
+		echo "ulimit -SHu 256716" >> /etc/profile
+	else
+		sed -i "s/^ulimit -SHu.*/ulimit -SHu 256716/g" /etc/profile
+	fi
+	echo -e "\033[31m\"source /etc/profile\" command to take effect!\033[0m"
+}
+
+function installNginx {
+	echo -e "============================Install Nginx================================="
+	if [ ! -e "/usr/local/nginx" ];then
+		yum -y update && yum -y install gcc-c++ zlib-devel openssl--devel pcre-devel
+		groupadd www && /usr/sbin/useradd -g www www		
+		if [ ! -s "nginx-1.7.9.tar.gz" ];then
+			#http://nginx.org/download/nginx-1.7.9.tar.gz
+			wget -c ${DOWNURL}nginx-1.7.9.tar.gz
+		fi
+		tar zxvf nginx-1.7.9.tar.gz 
+		cd nginx-1.7.9
+		./configure
+		make && make install
+		if [ $CPU_PROCESSOR -ge 8 ];then
+			workerCA="00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000"
+			workerP=8
+		elif [ $CPU_PROCESSOR -ge 4 ] && [ $CPU_PROCESSOR -lt 8 ];then
+			workerCA="0001 0010 0100 1000"
+			workerP=4
+		else
+			workerCA="1"
+			workerP=1
+		fi
+		
+		sed -i '1,$d' /usr/local/nginx/conf/nginx.conf
+		echo -e "user www;\nworker_processes ${workerP};\nworker_cpu_affinity ${workerCA};\nerror_log logs/error.log;\npid logs/nginx.pid;\nworker_rlimit_nofile 102400;\nevents {\n\tuse epoll;\n\tworker_connections 10240;\n}\nhttp {\n\tinclude mime.types;\n\tdefault_type application/octet-stream;\n\tclient_header_buffer_size 64k;\n\tlarge_client_header_buffers 4 64k;\n\tclient_max_body_size 300m;\n\tserver_tokens off;\n\tsendfile on;\n\ttcp_nopush on;\n\tgzip on;\n\tgzip_disable 'MSIE [1-6].';\n\tkeepalive_timeout 60;\n\topen_file_cache max=102400 inactive=20s;\n\topen_file_cache_valid 30s;\n\topen_file_cache_min_uses 1;\n\tinclude vhost/*.conf;\n}" > /usr/local/nginx/conf/nginx.conf
+		mkdir -p /usr/local/nginx/conf/vhost		
+		/usr/local/nginx/sbin/nginx &
+		echo -e "\033[31mNginx complete installation!\033[0m"
+		cleanFiles nginx-1.7.9
+	else
+		echo -e "\033[31mNginx is already installed!\033[0m"
+	fi
+}
+
+function updateNginx {
+	if [ ! -s "nginx-1.9.0.tar.gz" ];then
+		#http://nginx.org/download/nginx-1.9.0.tar.gz
+		wget -c ${DOWNURL}nginx-1.9.0.tar.gz
+	fi
+	tar zxvf nginx-1.9.0.tar.gz
+	cd nginx-1.9.0
+	./configure
+	make
+	mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old
+	cp -f objs/nginx /usr/local/nginx/sbin/ 
+	/usr/local/nginx/sbin/nginx -s reload
+	echo -e "\033[31mNginx complete upgrade!\033[0m"
+	cleanFiles nginx-1.9.0
+}
+
+function configVhost {
+	while : 
+	do 
+		read -p "Please input domain(example: www.test.com): " domain
+		if [ -z "`echo $domain | grep -Pix '^([a-z0-9]+[a-z0-9_]*[a-z0-9]+(\.)?)[a-z0-9]+[a-z0-9_]*(\.org\.cn|\.net|\.com|\.com\.cn)$'`" ]; then 
+			echo -e "\033[31minput error! \033[0m" 
+		else 
+			if [ ! -f "/usr/local/nginx/conf/vhost/${domain}.conf" ]; then
+				echo -e "\033[31mdomain=${domain}\033[0m" 
+			else
+				echo -e "\033[31m${domain} is exist!\033[0m"  
+			fi
+			break 
+		fi 
+	done
+	
+	while : 
+	do 
+		echo "Please input the directory for the domain:$domain :" 
+		read -p "(Default directory: /data/$domain): " vhostdir 
+		if [ "$vhostdir" = "" ]; then
+			vhostdir="/data/$domain"
+		fi
+		if [ -z "`echo $vhostdir | grep -Pix '(\/[\w\.]+)+'`" ]; then 
+			echo -e "\033[31minput error! \033[0m"			
+		else
+			if [ ! -e "$vhostdir" ]; then
+				mkdir -p $vhostdir
+				echo -e "\033[31mCreate Virtul Host directory ${vhostdir}\033[0m" 
+			else
+				echo -e "\033[31m${vhostdir} is exist!\033[0m"  
+			fi
+			chown -R $USER.$USER $vhostdir
+			break
+		fi
+	done
+	
+	echo -e "server {\n\tlisten 80 default_server;\n\tlocation / {\n\t\treturn 403;\n\t}\n}\nserver\n{\n\tlisten 80;\n\tserver_name ${domain};\n\tindex index.html index.php;\n\troot ${vhostdir};\n\tlocation / {\n\t}\n\tlocation ~ .*\.(php|php5)?$\n\t{\n\t\tfastcgi_pass 127.0.0.1:9000;\n\t\tfastcgi_send_timeout 3600s;\n\t\tfastcgi_connect_timeout 3600s;\n\t\tfastcgi_read_timeout 3600s;\n\t\tfastcgi_index  index.php;\n\t\tfastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;\n\t\tinclude fastcgi_params;\n\t}\n\tlocation ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$\n\t{\n\t\texpires 30d;\n\t\taccess_log off;\n\t}\n\tlocation ~ .*\.(js|css)?$\n\t{\n\t\texpires 12h;\n\t\taccess_log off;\n\t}\n}" > /usr/local/nginx/conf/vhost/$domain.conf
+	kill -HUP `cat /usr/local/nginx/logs/nginx.pid`
+}
+
+function installPHP {	
+	if [ ! -e "/usr/local/php/bin/php" ];then		
+		yum -y install gcc gcc-c++ libxml2-devel.x86_64 autoconf libjpeg-devel freetype-devel.x86_64 zlib-devel.x86_64 glibc-devel.x86_64 glib2-devel.x86_64 libpng-devel.x86_64 libcurl-devel.x86_64
+		if [ ! -s "php-5.5.24.tar.gz" ];then
+			#http://cn2.php.net/distributions/php-5.5.24.tar.gz
+			wget -c ${DOWNURL}php-5.5.24.tar.gz
+		fi
+		tar zxvf php-5.5.24.tar.gz
+		cd php-5.5.24
+		./configure --prefix=/usr/local/php --with-curl --enable-mbstring --with-mysql=mysqlnd --with-mysqli --enable-opcache --with-pdo-mysql --with-iconv --with-gd --enable-fpm --with-jpeg-dir --with-png-dir --enable-zip --with-freetype-dir --with-gettext --enable-gd-native-ttf --without-pdo-sqlite --without-sqlite3
+		make && make install
+		cp -f php.ini-production /usr/local/php/lib/php.ini
+		sed -i '{
+		s/;date.timezone *=.*/date.timezone = PRC/g
+		s/upload_max_filesize *=.*/upload_max_filesize = 5M/g
+		s/memory_limit *=.*/memory_limit = 5120M/g
+		s/post_max_size *=.*/post_max_size = 100M/g
+		s/expose_php *=.*/expose_php = Off/g
+		s/; extension_dir = ".\/"/extension_dir = "\/usr\/local\/php\/lib\/php\/extensions\/no-debug-non-zts-20121212\/"/g			
+		}' /usr/local/php/lib/php.ini
+
+		cp -f /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
+		/bin/mkdir -p /usr/local/php/log/
+		sed -i '1,$d' /usr/local/php/etc/php-fpm.conf
+		echo -e "[global]\nerror_log = /usr/local/php/log/error.log\nlog_level = warning\n[www]\nuser = www\ngroup = www\nlisten = 127.0.0.1:9000\npm = dynamic\npm.max_children = 2000\npm.start_servers = 10\npm.min_spare_servers = 5\npm.max_spare_servers = 200\npm.max_requests = 12000\npm.process_idle_timeout = 10s\nrequest_terminate_timeout = 300s\nrequest_slowlog_timeout = 10s\nslowlog = /usr/local/php/log/slow.log" > /usr/local/php/etc/php-fpm.conf
+			
+		cp -f sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
+		chmod 700 /etc/init.d/php-fpm 
+		chkconfig --add php-fpm
+		chkconfig php-fpm on
+		php_version=`/usr/local/php/bin/php -v |awk 'NR==1 {print $2}'`
+		echo -e "\033[31mPHP${php_version} complete installation!\033[0m"
+		cleanFiles php-5.5.24
+	else
+		php_version=`/usr/local/php/bin/php -v |awk 'NR==1 {print $2}'`
+		echo -e "\033[31mPHP${php_version} is already installed!\033[0m"
+	fi
+}
+
+function updatePHP {
+	php_version=`/usr/local/php/bin/php -v |awk 'NR==1 {print $2}'`
+	if [ $php_version == "5.5.24" ];then
+		echo -e "\033[31mPHP${php_version} is the latest version!\033[0m"
+		return
+	fi
+	if [ -e "/usr/local/php/bin/php" ];then
+		/bin/rm -rf /usr/local/php/
+		yum -y install gcc gcc-c++ libxml2-devel.x86_64 autoconf libjpeg-devel freetype-devel.x86_64 zlib-devel.x86_64 glibc-devel.x86_64 glib2-devel.x86_64 libpng-devel.x86_64 libcurl-devel.x86_64
+		if [ ! -s "php-5.5.24.tar.gz" ];then
+			#http://cn2.php.net/distributions/php-5.5.24.tar.gz
+			wget -c ${DOWNURL}php-5.5.24.tar.gz
+		fi
+		tar zxvf php-5.5.24.tar.gz
+		cd php-5.5.24
+		./configure --prefix=/usr/local/php --with-curl --enable-mbstring --with-mysql=mysqlnd --with-mysqli --enable-opcache --with-pdo-mysql --with-iconv --with-gd --enable-fpm --with-jpeg-dir --with-png-dir --enable-zip --with-freetype-dir --with-gettext --enable-gd-native-ttf --without-pdo-sqlite --without-sqlite3
+		make && make install
+		cp -f php.ini-production /usr/local/php/lib/php.ini
+		sed -i '{
+		s/;date.timezone *=.*/date.timezone = PRC/g
+		s/upload_max_filesize *=.*/upload_max_filesize = 5M/g
+		s/memory_limit *=.*/memory_limit = 5120M/g
+		s/post_max_size *=.*/post_max_size = 100M/g
+		s/expose_php *=.*/expose_php = Off/g
+		s/; extension_dir = ".\/"/extension_dir = "\/usr\/local\/php\/lib\/php\/extensions\/no-debug-non-zts-20121212\/"/g			
+		}' /usr/local/php/lib/php.ini
+
+		cp -f /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
+		/bin/mkdir -p /usr/local/php/log/
+		sed -i '1,$d' /usr/local/php/etc/php-fpm.conf
+		echo -e "[global]\nerror_log = /usr/local/php/log/error.log\nlog_level = warning\n[www]\nuser = www\ngroup = www\nlisten = 127.0.0.1:9000\npm = dynamic\npm.max_children = 2000\npm.start_servers = 10\npm.min_spare_servers = 5\npm.max_spare_servers = 200\npm.max_requests = 12000\npm.process_idle_timeout = 10s\nrequest_terminate_timeout = 300s\nrequest_slowlog_timeout = 10s\nslowlog = /usr/local/php/log/slow.log" > /usr/local/php/etc/php-fpm.conf
+			
+		cp -f sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
+		chmod 700 /etc/init.d/php-fpm 
+		chkconfig --add php-fpm
+		chkconfig php-fpm on
+		php_version=`/usr/local/php/bin/php -v |awk 'NR==1 {print $2}'`
+		echo -e "\033[31mPHP${php_version} complete installation!\033[0m"
+		cleanFiles php-5.5.24
+	fi
+}
+
+function installPHPRedis {
+	if [ ! -s "redis-2.2.7.tgz" ];then
+		#http://pecl.php.net/get/redis-2.2.7.tgz
+		wget -c ${DOWNURL}redis-2.2.7.tgz
+	fi
+	tar zxvf redis-2.2.7.tgz
+	cd redis-2.2.7  
+	/usr/local/php/bin/phpize
+	./configure -with-php-config=/usr/local/php/bin/php-config
+	make && make install
+	if [ -z "`grep '^extension=redis.so' /usr/local/php/lib/php.ini`" ];then
+		sed -i '/;extension=php_xsl.dll/a\extension=redis.so' /usr/local/php/lib/php.ini
+	fi	
+	/sbin/service php-fpm restart
+	echo -e "\033[31mRedis extension complete installation!\033[0m"
+	cleanFiles redis-2.2.7
+}
+
+function installPHPMongo {
+	if [ ! -s "mongo-1.6.8.tgz" ];then
+		#http://pecl.php.net/get/mongo-1.6.8.tgz
+		wget -c ${DOWNURL}mongo-1.6.8.tgz
+	fi
+	tar zxvf mongo-1.6.8.tgz
+	cd mongo-1.6.8
+	/usr/local/php/bin/phpize
+	./configure -with-php-config=/usr/local/php/bin/php-config
+	make && make install
+	if [ -z "`grep '^extension=mongo.so' /usr/local/php/lib/php.ini`" ];then
+		sed -i '/;extension=php_xsl.dll/a\extension=mongo.so' /usr/local/php/lib/php.ini
+	fi	
+	/sbin/service php-fpm restart
+	echo -e "\033[31mMongo extension complete installation!\033[0m"
+	cleanFiles mongo-1.6.8
+}
+
+function installPHPSphinx {
+	yum -y update && yum -y install libtool autoconf automake mysql-devel libxml2-devel expat-devel
+	if [ ! -s "coreseek-4.1-beta.tar.gz" ];then
+		#http://www.coreseek.cn/uploads/csft/4.0/coreseek-4.1-beta.tar.gz
+		wget -c ${DOWNURL}coreseek-4.1-beta.tar.gz
+	fi
+	tar zxvf coreseek-4.1-beta.tar.gz
+	cd coreseek-4.1-beta/csft-4.1/api/libsphinxclient
+	aclocal
+	libtoolize --force
+	automake --add-missing && autoconf && autoheader
+	./configure
+	make && make install
+	cleanFiles coreseek-4.1-beta
+	
+	wget -c ${DOWNURL}sphinx-1.3.2.tgz
+	tar zxvf sphinx-1.3.2.tgz
+	cd sphinx-1.3.2
+	/usr/local/php/bin/phpize
+	./configure -with-php-config=/usr/local/php/bin/php-config
+	make && make install
+	if [ -z "`grep '^extension=sphinx.so' /usr/local/php/lib/php.ini`" ];then
+		sed -i '/;extension=php_xsl.dll/a\extension=sphinx.so' /usr/local/php/lib/php.ini
+	fi	
+	/sbin/service php-fpm restart
+	echo -e "\033[31mSphinx extension complete installation!\033[0m"
+	cleanFiles sphinx-1.3.2
+}
+
+function installPHPXsplit {
+	if [ ! -s "xsplit-0.0.8.zip" ];then
+		#wget -O xsplit-0.0.8.zip -c https://github.com/chopins/php-xsplit/archive/master.zip
+		wget -c ${DOWNURL}xsplit-0.0.8.zip
+	fi
+	unzip xsplit-0.0.8.zip
+	cd php-xsplit-master
+	/usr/local/php/bin/phpize
+	./configure -with-php-config=/usr/local/php/bin/php-config
+	make && make install
+	if [ -z "`grep '^extension=xsplit.so' /usr/local/php/lib/php.ini`" ];then
+		sed -i '/;extension=php_xsl.dll/a\extension=xsplit.so' /usr/local/php/lib/php.ini
+	fi	
+	/sbin/service php-fpm restart
+	echo -e "\033[31mXsplit extension complete installation!\033[0m"
+	cleanFiles php-xsplit-master
+}
+
+function installPHPPhalcon {
+	if [ ! -s "phalcon-2.0.1.zip" ];then
+		#wget -O phalcon-2.0.1.zip -c https://github.com/phalcon/cphalcon/archive/master.zip
+		wget -c ${DOWNURL}phalcon-2.0.1.zip
+	fi
+	unzip phalcon-2.0.1.zip
+	cd cphalcon-master/build/64bits
+	/usr/local/php/bin/phpize
+	./configure -with-php-config=/usr/local/php/bin/php-config
+	make && make install
+	if [ -z "`grep '^extension=phalcon.so' /usr/local/php/lib/php.ini`" ];then
+		sed -i '/;extension=php_xsl.dll/a\extension=phalcon.so' /usr/local/php/lib/php.ini
+	fi	
+	/sbin/service php-fpm restart
+	echo -e "\033[31mPhalcon extension complete installation!\033[0m"
+	cleanFiles cphalcon-master
+}
+
+function installPHPGmagick {
+	if [ ! -s "giflib-5.1.0.tar.gz" ];then
+		#http://cznic.dl.sourceforge.net/project/giflib/giflib-5.1.0.tar.gz
+		wget -c ${DOWNURL}giflib-5.1.0.tar.gz
+	fi
+	tar zxvf giflib-5.1.0.tar.gz
+	cd giflib-5.1.0
+	./configure --prefix=/usr/local/giflib
+	make && make install
+	cleanFiles giflib-5.1.0
+
+	if [ ! -s "libwebp-0.4.0.tar.gz" ];then
+		#http://webp.googlecode.com/files/libwebp-0.4.0.tar.gz
+		wget -c ${DOWNURL}libwebp-0.4.0.tar.gz
+	fi
+	tar zxvf libwebp-0.4.0.tar.gz
+	cd libwebp-0.4.0
+	./configure --prefix=/usr/local/libwep --with-gifincludedir=/usr/local/giflib/include/ --with-giflibdir=/usr/local/giflib/lib/
+	make && make install
+	cleanFiles libwebp-0.4.0
+	
+	if [ ! -s "GraphicsMagick-1.3.21.tar.gz" ];then
+		wget -c http://jaist.dl.sourceforge.net/project/graphicsmagick/graphicsmagick/1.3.21/GraphicsMagick-1.3.21.tar.gz
+	fi
+	tar zxvf GraphicsMagick-1.3.21.tar.gz
+	cd GraphicsMagick-1.3.21/
+	./configure --prefix=/usr/local/gmagick --enable-shared CPPFLAGS='-I/usr/local/libwep/include' LDFLAGS='-L/usr/local/libwep/lib'
+	make && make install
+	cp -f /usr/local/gmagick/bin/gm /usr/bin/
+	cleanFiles GraphicsMagick-1.3.21
+
+	if [ ! -s "gmagick-1.1.7RC3.tgz" ];then
+		wget -c http://pecl.php.net/get/gmagick-1.1.7RC3.tgz
+	fi	
+	tar zxvf gmagick-1.1.7RC3.tgz
+	cd gmagick-1.1.7RC3
+	/usr/local/php/bin/phpize
+	./configure --with-php-config=/usr/local/php/bin/php-config --with-gmagick=/usr/local/gmagick
+	make && make install	
+	if [ -z "`grep '^extension=gmagick.so' /usr/local/php/lib/php.ini`" ];then
+		sed -i '/;extension=php_xsl.dll/a\extension=gmagick.so' /usr/local/php/lib/php.ini
+	fi
+	/sbin/service php-fpm restart
+	echo -e "\033[31mGmagick extension complete installation!\033[0m"
+	cleanFiles gmagick-1.1.7RC3
+}
+
+function installPHPSSH2 {
+	yum -y install openssl openssl-devel
+	if [ ! -s "libssh2-1.4.3.tar.gz" ];then
+		wget -c http://7xorsj.dl1.z0.glb.clouddn.com/libssh2-1.4.3.tar.gz
+	fi
+	tar zxvf libssh2-1.4.3.tar.gz
+	cd libssh2-1.4.3
+	./configure --prefix=/usr/local/libssh2
+	make && make install
+	cleanFiles libssh2-1.4.3
+	
+	if [ ! -s "ssh2-0.12.tgz" ];then
+		wget -c http://pecl.php.net/get/ssh2-0.12.tgz
+	fi
+	tar zxvf ssh2-0.12.tgz 
+	cd ssh2-0.12
+	/usr/local/php/bin/phpize 
+	./configure --prefix=/usr/local/ssh2 --with-ssh2=/usr/local/libssh2  --with-php-config=/usr/local/php/bin/php-config
+	make && make install
+	if [ -z "`grep '^extension=ssh2.so' /usr/local/php/lib/php.ini`" ];then
+		sed -i '/;extension=php_xsl.dll/a\extension=ssh2.so' /usr/local/php/lib/php.ini
+	fi	
+	/sbin/service php-fpm restart
+	echo -e "\033[31mSSH2 extension complete installation!\033[0m"
+	cleanFiles ssh2-0.12
+}
+
+function installMysql {
+	yum -y update && yum -y downgrade ncurses* && yum -y install make gcc-c++ cmake bison-devel ncurses-devel
+	if [ ! -e "/usr/local/mysql" ];then
+		if [ ! -s "mysql-5.6.20.tar.gz" ];then
+			wget -c http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.20.tar.gz
+		fi
+		tar zxvf mysql-5.6.20.tar.gz
+		cd mysql-5.6.20
+		
+		read -p "Please input the root password of mysql:" mysqlrootpwd
+		if [ "$mysqlrootpwd" = "" ]; then
+			mysqlrootpwd="root"
+		fi
+		
+		while : 
+		do 
+			read -p "Please input the directory for the mysql data(example: /data/mysql): " mysqldatadir
+			if [ "$mysqldatadir" = "" ]; then
+				mysqldatadir="/data/mysql"
+			fi
+			if [ -z "`echo $mysqldatadir | grep -Pix '(\/[\w\.]+)+'`" ]; then 
+				echo -e "\033[31minput error! \033[0m"			
+			else
+				if [ ! -e "$mysqldatadir" ]; then
+					mkdir -p $mysqldatadir
+					echo -e "\033[31mCreate directory ${mysqldatadir}\033[0m" 
+				else
+					echo -e "\033[31m${mysqldatadir} is exist!\033[0m"  
+				fi
+				break
+			fi
+		done
+		
+		cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=$mysqldatadir -DSYSCONFDIR=/etc -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DMYSQL_TCP_PORT=3306 -DENABLED_LOCAL_INFILE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci
+		make && make install
+		groupadd mysql && useradd -g mysql mysql
+		chown -R mysql:mysql /usr/local/mysql
+		cd /usr/local/mysql
+		scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=$mysqldatadir --user=mysql
+		rm -rf /etc/my.cnf
+		mv /usr/local/mysql/my.cnf /etc/
+		sed -i '1,$d' /etc/my.cnf
+		ibps=`echo "$mem * 0.8"|bc`
+		ibps=${ibps%.*}
+		echo -e "[client]\nport=3306\nsocket=/tmp/mysql.sock\n[mysqld]datadir=${mysqldatadir}\nsocket=/tmp/mysql.sock\nport=3306\nuser=mysql\nsql_mode=\"NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION\"\nlong_query_time=1\nslow_query_log=1\nslow_query_log_file=slow.log\nkey_buffer_size=1024M\nmax_allowed_packet=512M\ntable_open_cache=2048\nsort_buffer_size=64M\nmax_length_for_sort_data=8096\nread_buffer_size=64M\nread_rnd_buffer_size=64M\nmyisam_sort_buffer_size=512M\nthread_cache_size=256\nquery_cache_size=512M\nquery_cache_type=1\nquery_cache_limit=2M\ntmp_table_size=4096M\nthread_concurrency=16\nmyisam-recover=BACKUP,FORCE\nmax_connections=3000\nskip-name-resolve\nback_log=384\nmyisam_max_sort_file_size=10G\nmax_allowed_packet=256M\nwait_timeout=3600\nlog-bin=mysql-bin\nbinlog_format=mixed\nserver-id=811\nexpire_logs_days=0\ninnodb_buffer_pool_size=${ibps}G\ninnodb_flush_log_at_trx_commit=0\n[mysqld_safe]\nlog-error=mysql.log" > /etc/my.cnf
+		cp -f support-files/mysql.server /etc/init.d/mysql
+		chkconfig mysql on
+		service mysql start
+		/usr/local/mysql/bin/mysql -uroot -e "SET PASSWORD = PASSWORD(\"${mysqlrootpwd}\");GRANT ALL PRIVILEGES ON *.* TO root@\"%\" IDENTIFIED BY \"${mysqlrootpwd}\" WITH GRANT OPTION;"
+		echo -e "\033[31mMysql complete installation!\033[0m"
+		cleanFiles mysql-5.6.20
+	else
+		echo -e "\033[31mMysql is already installed!\033[0m"
+	fi
+}
+
+function toContinue {
+	echo -e "\033[41;33mPress any key to continue...\033[0m"
+	read -n1
+	clear
+}
+
+function cleanFiles {
+	if [ $# -eq 1 ] && [ -e "${BASEPATH}/$1" ];then
+		/bin/rm -rf ${BASEPATH}/$1 &
+	fi
+	cd ${BASEPATH}
+}
+
+function startService {
+	/usr/local/nginx/sbin/nginx &
+	/sbin/service php-fpm start
+	/sbin/service mysql start
+}
+
+function stopService {
+	kill -QUIT `cat /usr/local/nginx/logs/nginx.pid`
+	/sbin/service php-fpm stop
+	/sbin/service mysql stop
+}
+
+function restartService {
+	kill -HUP `cat /usr/local/nginx/logs/nginx.pid`
+	/sbin/service php-fpm restart
+	/sbin/service mysql restart
+}
+
+function menu {
+while true
+do
+	system
+	process
+	echo -e "\033[41;33m|-----------Menu-----------\033[0m"
+	echo -e "(1) Configure \033[1mSystem Kernel\033[0m"
+	echo -e "(2) Configure \033[1mNGINX\033[0m Service"
+	echo -e "(3) Configure \033[1mPHP\033[0m Service"
+	echo -e "(4) Configure \033[1mMYSQL\033[0m Service"
+	echo -e "(0) Quit"
+	read -p "Please enter your choice[0-4]: " input
+	case $input in
+	1)
+		clear
+		while true
+		do
+			system
+			echo -e "\033[41;33m|-----------Configure System Kernel-----------\033[0m"
+			echo -e "(1) Configure /etc/sysctl.conf"
+			echo -e "(2) Configure ulimit"
+			echo -e "(0) Back"
+			read -p "Please enter your choice[0-2]: " input1
+			case $input1 in
+			1)
+				configSysctl
+				toContinue
+				;;
+			2)
+				configUlimit
+				exit 0
+				;;
+			0) 
+				clear 
+				break
+				;;
+			*)
+				echo -e "\033[31mPlease Enter Right Choice!\033[0m"
+				toContinue
+				;;
+			esac			
+		done
+		;;
+	2)
+		clear
+		while true
+		do
+			system
+			echo -e "\033[41;33m|-----------Configure NGINX Service-----------\033[0m"
+			echo -e "(1) Install the latest version nginx"
+			echo -e "(2) Seamless upgrade nginx"
+			echo -e "(3) Configure the virtual host"
+			echo -e "(0) Back"
+			read -p "Please enter your choice[0-3]: " input2
+			case $input2 in
+			1)
+				installNginx
+				toContinue
+				;;
+			2)
+				updateNginx
+				toContinue
+				;;
+			3)
+				configVhost
+				toContinue
+				;;
+			0) 
+				clear 
+				break
+				;;
+			*)
+				echo -e "\033[31mPlease Enter Right Choice!\033[0m"
+				toContinue
+				;;
+			esac			
+		done
+		;;
+	3)
+		clear		
+		while true
+		do
+			system
+			echo -e "\033[41;33m|-----------Configure PHP Service-----------\033[0m"
+			echo -e "(1) Install the Old Stable \033[1mPHP 5.5.24\033[0m"
+			echo -e "(2) Upgrade to Old Stable \033[1mPHP 5.5.24\033[0m"
+			echo -e "(3) Install the latest \033[1mredis\033[0m extension of PHP"
+			echo -e "(4) Install the latest \033[1mmongoDB\033[0m extension of PHP"
+			echo -e "(5) Install the latest \033[1msphinx\033[0m extension of PHP"
+			echo -e "(6) Install the latest \033[1mxsplit\033[0m extension of PHP"
+			echo -e "(7) Install the latest \033[1mphalcon\033[0m extension of PHP"
+			echo -e "(8) Install the latest \033[1mgmagick\033[0m extension of PHP"
+			echo -e "(9) Install the latest \033[1mssh2\033[0m extension of PHP"			
+			echo -e "(0) Back"
+			read -p "Please enter your choice[0-9]: " input3
+			case $input3 in
+			1)
+				installPHP
+				toContinue
+				;;
+			2)
+				updatePHP
+				toContinue
+				;;
+			3)
+				installPHPRedis
+				toContinue
+				;;
+			4)
+				installPHPMongo
+				toContinue
+				;;
+			5)
+				installPHPSphinx
+				toContinue
+				;;
+			6)
+				installPHPXsplit
+				toContinue
+				;;
+			7)
+				installPHPPhalcon
+				toContinue
+				;;
+			8)
+				installPHPGmagick
+				toContinue
+				;;
+			9)
+				installPHPSSH2
+				toContinue
+				;;
+			0) 
+				clear 
+				break
+				;;
+			*)
+				echo -e "\033[31mPlease Enter Right Choice!\033[0m"
+				toContinue
+				;;
+			esac			
+		done
+		;;
+	4)
+		clear
+		while true
+		do
+			system
+			echo -e "\033[41;33m|-----------Configure MYSQL Service-----------\033[0m"
+			echo -e "(1) Install the latest version MYSQL"
+			echo -e "(0) Back"
+			read -p "Please enter your choice[0-1]: " input4
+			case $input4 in
+			1)
+				installMysql
+				toContinue
+				;;
+			0) 
+				clear 
+				break
+				;;
+			*)
+				echo -e "\033[31mPlease Enter Right Choice!\033[0m"
+				toContinue
+				;;
+			esac			
+		done
+		;;
+	0) 
+		clear 
+		break
+		;;
+	*)
+		echo -e "\033[31mPlease Enter Right Choice!\033[0m"	
+		toContinue
+		;;
+	esac
+done
+}
+#start Judge script parameters
+if [ "$1" != "" ];then
+    arr=($1)
+	for i in ${arr[@]}
+	do
+		$i >> install.log
+	done
+else
+    clear
+	menu
+fi

BIN
www/images/digest.png


BIN
www/images/loading-01-09.gif


BIN
www/images/stick.png


BIN
www/images/toutiao_0.png


BIN
www/images/toutiao_1.png


+ 16 - 0
www/js/amazeui.datetimepicker.zh-CN.js

@@ -0,0 +1,16 @@
+/**
+ * Simplified Chinese translation for bootstrap-datetimepicker
+ * Yuan Cheung <advanimal@gmail.com>
+ */
+;(function($){
+	$.fn.datetimepicker.dates['zh-CN'] = {
+			days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"],
+			daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"],
+			daysMin:  ["日", "一", "二", "三", "四", "五", "六", "日"],
+			months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
+			monthsShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
+			today: "今日",
+			suffix: [],
+			meridiem: ["上午", "下午"]
+	};
+}(jQuery));

+ 167 - 0
www/js/hybrid.js

@@ -0,0 +1,167 @@
+function os_proxy(fn){
+    var u = navigator.userAgent.toLowerCase();
+    if (!fn.hasOwnProperty('browser')){
+        fn['browser'] = function(){
+            console.log('没有定义方法');
+            return false;
+        }
+    }
+    if ((/android|linux/i.test(u)) && fn.hasOwnProperty('android')){
+        return fn['android']();
+    } else if ((/iphone|ipad|ipod/i.test(u)) && fn.hasOwnProperty('ios')){
+        return fn['ios']();
+    } else{
+        return fn['browser']();
+    }
+}
+//获取用户的信息
+function get_user_info(){
+    os_proxy({
+        android: function(){
+            window.jsapi.getUserInfo('{"callback":"notifyGetUserInfo"}');
+        },
+        ios: function(){
+            window.location.href = 'http://callclient?method=getUserInfo&callback=notifyGetUserInfo';
+        }
+    });
+}
+//保存用户的信息
+function notifyGetUserInfo(result){
+    //alert('notifyGetUserInfo called');
+    var reg=new RegExp('(\r\n|\r|\n)', 'g');
+    var _res = JSON.stringify(result).replace(reg, '');
+    $('#result').val(_res);
+    var res = JSON.parse(_res);
+
+    res = os_proxy({
+        android: function(){
+            if (res.success == 1){
+                res.success = true;
+            } else {
+                res.success = false;
+            }
+            return res;
+        },
+        ios: function(){
+            if (res && res.hasOwnProperty('success')){
+                if (res.success == 1){
+                    res.success = true;
+                } else {
+                    res.success = false;
+                }
+            }
+            return res;
+        }
+    });
+    if (res){
+        if (res.hasOwnProperty('version')){
+            app_version = res.version;
+        }
+        if (res.hasOwnProperty('deviceId')){
+            deviceId = res.deviceId;
+        }
+        if (res.hasOwnProperty('osVersion')){
+            osVersion = res.osVersion;
+        }
+
+        if (res.hasOwnProperty('success') && res.success){
+            do_login(res);
+        }
+    }
+}
+//根据客户端接口或web登录接口初始化用户信息
+function do_login(res){
+    if (res.hasOwnProperty('success')){
+        user_info = res.data;
+    }
+    if (res.hasOwnProperty('success')){
+        user_id = user_info.id;
+    }
+
+    //$('#result').val('user_id:'+user_id+'<br />'+'osVersion:'+osVersion+'<br />'+'deviceId:'+deviceId+'<br />'+'app_version:'+app_version+'<br />'+'user_name:'+user_info.user_name+'<br />');
+}
+//分享
+function do_share(opts){
+    var share_img = 'http://www.yiguanjia.me/images/logo.png';
+    var share_str = '';
+    var share_url = '';
+    var title = '';
+    if (opts.hasOwnProperty('str')){
+        if (typeof(opts.str) == 'function'){
+            share_str = opts.str();
+        } else {
+            share_str = opts.str;
+        }
+    }
+    if (opts.hasOwnProperty('img')){
+        share_img = opts.img;
+    }
+    if (opts.hasOwnProperty('url')){
+        share_url = opts.url;
+    }
+    if (opts.hasOwnProperty('title')){
+        title = opts.title;
+    }
+    var share_param = {
+        share_title : title,
+        share_string : share_str,
+        share_img_url: encodeURIComponent(share_img),
+        share_url: encodeURIComponent(share_url)
+    };
+    os_proxy({
+        android: function(){
+            share_param.share_img_url = share_img;
+            share_param.share_url = share_url;
+            window.jsapi.doShare(JSON.stringify(share_param));
+        },
+        ios: function(){
+            window.location.href = 'http://callclient?method=doShare&param=' + JSON.stringify(share_param);
+        }
+    });
+}
+//退出webview
+function exit_webview(){
+    os_proxy({
+        android: function(){
+            window.jsapi.exitWebView();
+        },
+        ios: function(){
+            var url = 'http://callclient?method=exitWebView';
+            window.location.href = url;
+        }
+    });
+}
+//跳转到登录页面
+function go_login(){
+    os_proxy({
+        android: function(){
+            window.jsapi.goLogin('{"callback":"notifyGetUserInfo"}');
+        },
+        ios: function(){
+            var url = 'http://callclient?method=goLogin';
+            url += '&callback=notifyGetUserInfo';
+            window.location.href = url;
+        }
+    });
+}
+
+//打开/关闭IOS的左滑返回
+function switch_pop_gesture(flag){
+    os_proxy({
+        ios: function(){
+            var url = 'http://callclient?method=switchPopGesture';
+            url += '&param={"enable":'+flag+'}';
+            window.location.href = url;
+        }
+    });
+}
+
+var user_id = 0;
+var user_info = null;
+var osVersion = '';
+var deviceId = '';
+var app_version = '2.0';
+
+$(function(){
+    //get_user_info();
+})

+ 56 - 0
www/js/www/type_selector.js

@@ -0,0 +1,56 @@
+;
+(function ($) {
+    var defaults = {
+        onselected:function(value){console.log(value);},
+        value:{}    //初始化的选项信息
+    };
+
+    var options = null;
+    var privateVal = {
+        time:9527
+    }
+
+    var privateFunction = {
+        createDom:function(){
+            privateVal.time = new Date().getTime();
+            var _html = '<input type="hidden" name="'+options.input_name+'" />\
+                        <div>\
+                            <div style="float: left;margin-right: 10px;"><input id="serviceType'+privateVal.time+'" style="margin-right: 10px;" /></div><div style="float: left;"><input id="group_'+privateVal.time+'" style="margin-right: 10px;" /></div><div style="clear: both;"></div>\
+                        </div>';
+            $('#'+options.container).html(_html);
+        },
+        initCombobox:function(){
+            var cat = $('#serviceType'+privateVal.time).combobox({
+                url:site_root+'/index.php?r=serviceType/all',
+                editable:false,
+                valueField:'type',
+                textField:'type',
+               
+            });
+            
+        }
+    }
+
+    var methods = {
+        init: function(args) {
+            options = $.extend(defaults, args);
+            privateFunction.createDom();
+            privateFunction.initCombobox();
+            
+        }
+    };
+
+    $.fn.group_selector = function() {
+        var method = arguments[0];
+        if(methods[method]) {
+            method = methods[method];
+        } else if( typeof(method) == 'object' || !method ) {
+            method = methods.init;
+        } else {
+            return this;
+        }
+        var args = arguments[1];
+        return method.call(this,args);
+    }
+
+})(jQuery);

+ 14 - 20
www/protected/controllers/ROrderController.php

@@ -246,7 +246,7 @@ class ROrderController extends AdminController{
                 $fin_price =$fin_price+ $value->final_price*0.5;
             }
 
-            $fin_price = round($fin_price*100,2);
+            $fin_price = round($fin_price,2)*100;
             $orderId = rtrim(trim($orderId),',');
             if ($status == -2){
                 if ($remark == '1'){
@@ -268,8 +268,8 @@ class ROrderController extends AdminController{
 
             if ($flag && $res){
                 foreach ($orders as $value) {
-                   $value->status = $status;
-                   $value->save();
+                    $value->status = $status;
+                    $value->save();
                 }
             }
 
@@ -320,7 +320,7 @@ class ROrderController extends AdminController{
                     $wechat->sendMessage($wechat_data);
                 }
             }
-        
+
         }
 
         //取消订单
@@ -406,7 +406,7 @@ class ROrderController extends AdminController{
                 $flag = 1;
             }
         }else if($order->channel == 'jingbai'){
-           if($status ==3){//已接单
+            if($status ==3){//已接单
                 $res = self::UpdateStatusForJingBai($order->OrderNo,(string)$order->_id, $status,$order->remark);
                 $flag = 1;
             }else if($status ==6){//服务完成
@@ -924,11 +924,11 @@ class ROrderController extends AdminController{
         $data['OrderId'] = $orderId;
         $data['HouseKeepingId']     = $HouseKeepingId;
         $data['Remark'] = $remark;
-       if ($status == 3){//已接单
-           $data['StatusCode'] = '01';
-       } else if($status == 6){//已完成
-           $data['StatusCode'] = '02';
-       }
+        if ($status == 3){//已接单
+            $data['StatusCode'] = '01';
+        } else if($status == 6){//已完成
+            $data['StatusCode'] = '02';
+        }
 
         $data['Time'] = date('Y-m-d H:i:s');
         $data['Sign'] = md5($data['OrderId'].$data['StatusCode'].$data['Remark'].$data['HouseKeepingId'].$data['Time'].$key);
@@ -1001,10 +1001,10 @@ class ROrderController extends AdminController{
 
         $dat = rtrim(trim($dat),'&');
         if (ENVIRONMENT == 'product'){
-            $url = 'http://139.196.47.211:9230/ServiceController/ HouseKeepingFeedback';  //正式服调用接口的平台服务地址
+            $url = 'http://139.196.47.211:9230/ServiceController/HouseKeepingFeedback';  //正式服调用接口的平台服务地址
         } else {
             //$url = 'http://123.206.28.63:9030/ServiceController/HouseKeepingFeedback';  //测试服调用接口的平台服务地址
-            $url = 'http://139.196.47.211:9030/ServiceController/ HouseKeepingFeedback';  //调用接口的平台服务地址
+            $url = 'http://139.196.47.211:9030/ServiceController/HouseKeepingFeedback';  //调用接口的平台服务地址
         }
 
 
@@ -1035,12 +1035,6 @@ class ROrderController extends AdminController{
         echo "导出成功";
     }
 
-    public function actionTestIp(){
-        if (ENVIRONMENT == 'product'){
-            $url = 'http://139.196.47.211:9230/ServiceController/SetHouseKeepingStatus';  //正式服调用接口的平台服务地址
-        } else {
-            $url = 'http://139.196.47.211:9030/ServiceController/SetHouseKeepingStatus';  //调用接口的平台服务地址
-        }
-        echo $url;
-    }
+
+
 }

+ 6 - 5
www/protected/modules/moonclub/controllers/WebController.php

@@ -43,11 +43,11 @@ class WebController extends MoonClubBaseController {
                         $userAr->unionid = 'xiangyuhui';
                         $u_criteria = new EMongoCriteria();
                         $u_criteria->user_name('==',$userInfo['nickname']);
-                       /* $olduser = RUser::model()->find($u_criteria);
-                        if($olduser){
-                            $user_new_neme = $userAr->user_name.'_'.substr(time(),-7);
-                            $userAr->user_name = $user_new_neme;
-                        }*/
+                        /* $olduser = RUser::model()->find($u_criteria);
+                         if($olduser){
+                             $user_new_neme = $userAr->user_name.'_'.substr(time(),-7);
+                             $userAr->user_name = $user_new_neme;
+                         }*/
                         $result = $userAr->save();
                         if($result){
                             //异步同步微信头像到七牛
@@ -100,6 +100,7 @@ class WebController extends MoonClubBaseController {
     //检查微信登录页
     public function actionWxIndex() {
         $wxConfig = Yii::app()->params['xyhWxConfig'];
+
         $home_page = Yii::app()->getRequest()->getParam("home_page",'');
         $redirectURI = 'http://' . $_SERVER['HTTP_HOST'] . Yii::app()->request->baseUrl . '/index.php?r=/moonclub/web/index';
         if($home_page){

+ 17 - 15
www/protected/modules/moonclub/views/reserve/month.php

@@ -5,7 +5,7 @@
 	<title>享月会</title>
 	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
 	<meta name="viewport"
-	      content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
+		  content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
 	<meta name="apple-mobile-web-app-capable" content="yes">
 	<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
 	<meta http-equiv="Pragma" content="no-cache">
@@ -44,33 +44,35 @@
 <h1 style="text-align: center">预约</h1>
 <div class="">
 	<form action="" method='post'
-	      class="container  form-horizontal  ng-valid ng-dirty ng-valid-parse" id='singlesDay'
-	      style="margin-bottom: 15%; ">
+		  class="container  form-horizontal  ng-valid ng-dirty ng-valid-parse" id='singlesDay'
+		  style="margin-bottom: 15%; ">
 		<div class="container">
 			<!--姓名-->
 			<div class="form-group">
-				<label>姓名:</label>
+				<label>您的姓名:</label>
 				<input type="text" name='user_name' class="form-control username" placeholder="请输入您的姓名" ng-model="username">
 			</div>
 			<!--手机号码-->
 			<div class="form-group">
-				<label>手机号码:</label>
+				<label>您的号码:</label>
 				<input type="text" name="mobile" class="form-control"
-				       placeholder="请输入您的手机号码" ng-model="phone"/>
+					   placeholder="请输入您的手机号码" ng-model="phone"/>
 			</div>
 			<!--房型-->
 			<div class="form-group">
 				<label>咨询套餐:</label>
 				<select name="homeType" onchange="theforever(this.value)" class="form-control" ng-model="Type"
-				        ng-init="Type=TypeList[0].id"
-				        ng-options="type.name as type.name for type in TypeList" id="">
+						ng-init="Type=TypeList[0].id"
+						ng-options="type.name as type.name for type in TypeList" id="">
 					<option value="">--请选择--</option>
 				</select>
 			</div>
 			<!--预产期-->
+
 			<div class="form-group">
+				<label>预产日期:</label>
 				<input name="num" class="form-control" style="background-color: #fff;" id="demo1" type="text" readonly=""
-				       placeholder="请选择日期"/>
+					   placeholder="请选择日期"/>
 				<input type="hidden" name="user_id" id="userId">
 			</div>
 			<!--按钮-->
@@ -93,11 +95,11 @@
 <div class="model" style="width: 100%;position: fixed;top: 0;background: rgba(0,0,0,0.4)">
 	<!--错误提示容器-->
 	<div class="model-box"
-	     style="border-radius: 10px;height:130px;display:none;width: 70%;background: #fff;margin: 0 auto;top:25%;left:15%;position: fixed;">
+		 style="border-radius: 10px;height:130px;display:none;width: 70%;background: #fff;margin: 0 auto;top:25%;left:15%;position: fixed;">
 		<div class="model-title"
-		     style="font-family: '微软雅黑', 'Microsoft YaHei', 'STHeiti Light';width: 100%;text-align: center;font-size: 1.1rem;margin-top: 5%;"></div>
+			 style="font-family: '微软雅黑', 'Microsoft YaHei', 'STHeiti Light';width: 100%;text-align: center;font-size: 1.1rem;margin-top: 5%;"></div>
 		<div class="model-content"
-		     style="font-family: '微软雅黑', 'Microsoft YaHei', 'STHeiti Light';margin: 0 auto;width: 80%;background: #2f004e;color:rgb(255, 255, 255);font-size: 1.3rem;margin-top: 30px;text-align: center;padding: 5px 0 5px 0"></div>
+			 style="font-family: '微软雅黑', 'Microsoft YaHei', 'STHeiti Light';margin: 0 auto;width: 80%;background: #2f004e;color:rgb(255, 255, 255);font-size: 1.3rem;margin-top: 30px;text-align: center;padding: 5px 0 5px 0"></div>
 	</div>
 </div>
 </body>
@@ -118,9 +120,9 @@
 		})
 		/*表单提交进行判断*/
 		$('#SinglesDayBtn').on('click', function () {
-			/*获取user_id*/
-			var ref=window.location.href.split("=");
-			$("#userId").val(ref[2]);
+				/*获取user_id*/
+				var ref=window.location.href.split("=");
+				$("#userId").val(ref[2]);
 				/*姓名是否为空*/
 				if ($scope.username == undefined) {
 					model('请重填', '确认您的姓名');

+ 2 - 2
www/protected/modules/moonclub/views/web/index.php

@@ -17,7 +17,7 @@
     <?php //echo Yii::app()->request->baseUrl; ?><!--/webapp/moonclub/dist/css/main.css?v=-->
     <?php //echo time();?><!--">-->
     <link rel="stylesheet"
-          href="<?php echo Yii::app()->request->baseUrl; ?>/webapp/moonclub/dist/css/main.css?v=2017010917">
+          href="<?php echo Yii::app()->request->baseUrl; ?>/webapp/moonclub/dist/css/main.css?v=2017011013">
     <link href="<?php echo Yii::app()->request->baseUrl; ?>/css/common_o2o/swiper.css" rel="stylesheet">
     <script src="<?php echo Yii::app()->request->baseUrl; ?>/js/o2o/swiper.min.js"></script>
     <style>
@@ -81,7 +81,7 @@
         }
         var debug = false;
 //    var main = '<?php //echo Yii::app()->request->baseUrl;?>///webapp/moonclub/dist/js/main.js?v=20160960804';
-        var main = '<?php echo Yii::app()->request->baseUrl;?>/webapp/moonclub/dist/js/main.js?v=2017010917';
+        var main = '<?php echo Yii::app()->request->baseUrl;?>/webapp/moonclub/dist/js/main.js?v=2017011013';
         if (debug) {
             main = '<?php echo Yii::app()->request->baseUrl;?>/webapp/moonclub/js/main.js?v=' + (new Date()).getTime();
             document.getElementById('debugMain').src = '<?php echo Yii::app()->request->baseUrl; ?>/webapp/common/js/debuggap.js';

+ 222 - 191
www/webapp/moonclub/css/home.css

@@ -1,320 +1,351 @@
 body {
-	/*background: #bdbdbd;*/
+    /*background: #bdbdbd;*/
 }
 
 .swiper-container {
-	width: 100%;
-	color: #fff;
-	text-align: center;
+    width: 100%;
+    color: #fff;
+    text-align: center;
 }
 
 .swiper-slide {
-	width: 100%;
-	height: 100%;
-	display: block;
+    width: 100%;
+    height: 100%;
+    display: block;
 }
 
 .swiper-slide .title {
-	font-style: italic;
-	font-size: 42px;
-	margin-top: 80px;
-	margin-bottom: 0;
-	line-height: 45px;
+    font-style: italic;
+    font-size: 42px;
+    margin-top: 80px;
+    margin-bottom: 0;
+    line-height: 45px;
 }
 
 .swiper-slide img {
-	width: 100%;
-	display: block;
+    width: 100%;
+    display: block;
 }
 
 .pagination {
-	position: absolute;
-	z-index: 20;
-	left: 10px;
-	bottom: 0.15rem;
-	width: 100%;
-	text-align: center;
+    position: absolute;
+    z-index: 20;
+    left: 10px;
+    bottom: 0.15rem;
+    width: 100%;
+    text-align: center;
 }
 
 .swiper-pagination-switch {
-	display: inline-block;
-	width: 0.4rem;
-	height: 0.4rem;
-	border-radius: 10px;
-	background: rgba(153, 153, 153, 0.5);
-	box-shadow: 0px 1px 2px #555 inset;
-	margin: 0 3px;
-	cursor: pointer;
+    display: inline-block;
+    width: 0.4rem;
+    height: 0.4rem;
+    border-radius: 10px;
+    background: rgba(153, 153, 153, 0.5);
+    box-shadow: 0px 1px 2px #555 inset;
+    margin: 0 3px;
+    cursor: pointer;
 }
 
 .swiper-visible-switch {
-	background: #aaa;
+    background: #aaa;
 }
 
 .swiper-active-switch {
-	background: #190f0d;
-	box-shadow: 0px 1px 2px #555 inset;
+    background: #190f0d;
+    box-shadow: 0px 1px 2px #555 inset;
 }
 
 /*swiper结束*/
 .content-header {
-	width: 100%;
-	height: 44px;
+    width: 100%;
+    height: 44px;
 }
 
 /*图标*/
 .home-content .home-remy {
-	margin-top: 10px;
-	margin-bottom: 0px;
-	width: 100%;
+    margin-top: 10px;
+    margin-bottom: 0px;
+    width: 100%;
 }
 
 .home-content .home-box {
-	/*margin-top: 1.5rem;*/
+    /*margin-top: 1.5rem;*/
 }
 
 .home-content .home-box .width-percent-50 {
-	margin-top: 10px;
-	-webkit-box-sizing: border-box;
-	-moz-box-sizing: border-box;
-	box-sizing: border-box;
-	float: left;
+    margin-top: 10px;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+    float: left;
 }
 
 .home-content .home-box .width-percent-50:nth-child(1),
 .home-content .home-box .width-percent-50:nth-child(3) {
-	padding-left: 4%;
-	padding-right: 2%;
+    padding-left: 4%;
+    padding-right: 2%;
 }
 
 .home-content .home-box .width-percent-50:nth-child(2),
 .home-content .home-box .width-percent-50:nth-child(4) {
-	padding-right: 4%;
-	padding-left: 2%;
+    padding-right: 4%;
+    padding-left: 2%;
 }
 
 .home-content .home-box .width-percent-50 img {
-	width: 100%;
+    width: 100%;
 }
 
 /*媒体查询开始*/
 @media (max-width: 320px) {
-	.home-content .home-box {
-		height: 320px;
-	}
+    .home-content .home-box {
+        height: 320px;
+    }
 }
 
 @media (min-width: 412px) {
-	.home-content .home-box {
-		height: 412px;
-	}
+    .home-content .home-box {
+        height: 412px;
+    }
 }
 
 @media (min-width: 414px) {
 
-	.home-content .home-remy {
-		margin-bottom: 30px;
-	}
+    .home-content .home-remy {
+        margin-bottom: 30px;
+    }
 }
 
 @media (min-width: 768px) {
-	.home-content {
-
-	}
-
-	.home-content .home-remy {
-		margin-top: 10px;
-		margin-bottom: 0px;
-		width: 100%;
-	}
-
-	.home-content .home-box {
-		width: 100%;
-		margin-top: 0rem;
-		height: 36rem;
-	}
-
-	.home-content .home-box .width-percent-50 {
-		margin-top: 1rem;
-		-webkit-box-sizing: border-box;
-		-moz-box-sizing: border-box;
-		box-sizing: border-box;
-		text-align: center;
-		/*图片左右内边距*/
-		/*图片上下外边距*/
-	}
-
-	.home-content .home-box .width-percent-50:nth-child(1),
-	.home-content .home-box .width-percent-50:nth-child(3) {
-		padding-left: 2rem;
-		padding-right: 1rem;
-	}
-
-	.home-content .home-box .width-percent-50:nth-child(2),
-	.home-content .home-box .width-percent-50:nth-child(4) {
-		padding-left: 1rem;
-		padding-right: 2rem;
-	}
-
-	.home-content .home-box .width-percent-50 img {
-		width: 100%;
-	}
-
-	.prevent-scroll .width-percent-33 .title-container-square a .name {
-		display: block;
-		margin-top: 5px;
-		font-size: 1.6rem;
-	}
+    .home-content {
+
+    }
+
+    .home-content .home-remy {
+        margin-top: 10px;
+        margin-bottom: 0px;
+        width: 100%;
+    }
+
+    .home-content .home-box {
+        width: 100%;
+        margin-top: 0rem;
+        height: 36rem;
+    }
+
+    .home-content .home-box .width-percent-50 {
+        margin-top: 1rem;
+        -webkit-box-sizing: border-box;
+        -moz-box-sizing: border-box;
+        box-sizing: border-box;
+        text-align: center;
+        /*图片左右内边距*/
+        /*图片上下外边距*/
+    }
+
+    .home-content .home-box .width-percent-50:nth-child(1),
+    .home-content .home-box .width-percent-50:nth-child(3) {
+        padding-left: 2rem;
+        padding-right: 1rem;
+    }
+
+    .home-content .home-box .width-percent-50:nth-child(2),
+    .home-content .home-box .width-percent-50:nth-child(4) {
+        padding-left: 1rem;
+        padding-right: 2rem;
+    }
+
+    .home-content .home-box .width-percent-50 img {
+        width: 100%;
+    }
+
+    .prevent-scroll .width-percent-33 .title-container-square a .name {
+        display: block;
+        margin-top: 5px;
+        font-size: 1.6rem;
+    }
 }
 
 /*弹框*/
 .popup-box {
-	/*background: #fff;*/
-	position: fixed;
-	top: 0;
+    /*background: #fff;*/
+    position: fixed;
+    top: 0;
 }
 
 .popup {
-	position: fixed;
-	top: 0;
-	z-index: 5000;
-	background: rgba(0, 0, 0, 0.3);
+    position: fixed;
+    top: 0;
+    z-index: 5000;
+    background: rgba(0, 0, 0, 0.3);
 }
 
 .popup-img {
-	position: fixed;
-	width: 75%;
-	left: 12.5%;
-	top: 5%;
-	background: url("http://odulvej8l.bkt.clouddn.com/%E8%B7%B3%E8%BD%AC%E5%9B%BE.jpg");
-	background-repeat: no-repeat;
-	background-size: 100%;
-	z-index: 6000;
+    position: fixed;
+    width: 75%;
+    left: 12.5%;
+    top: 5%;
+    background: url("http://odulvej8l.bkt.clouddn.com/%E8%B7%B3%E8%BD%AC%E5%9B%BE.jpg");
+    background-repeat: no-repeat;
+    background-size: 100%;
+    z-index: 6000;
 }
 
 .popup-close {
-	position: fixed;
-	right: 12.5%;
-	top: 5%;
-	width: 1rem;
-	height: 1rem;
-	line-height: 1.1rem;
-	z-index: 7000;
-	text-align: center;
-	color: white;
-	font-family: 'Helvetica', 'Arial', sans-serif;
-	font-weight: lighter;
+    position: fixed;
+    right: 12.5%;
+    top: 5%;
+    width: 1rem;
+    height: 1rem;
+    line-height: 1.1rem;
+    z-index: 7000;
+    text-align: center;
+    color: white;
+    font-family: 'Helvetica', 'Arial', sans-serif;
+    font-weight: lighter;
 }
 
 .nav-li-box {
-	position: relative;
-	width: 20px;
-	height: 20px;
-	border-radius: 50%;
-	background: black;
+    position: relative;
+    width: 20px;
+    height: 20px;
+    border-radius: 50%;
+    background: black;
 }
 
 .nav-li {
-	cursor: pointer;
-	display: block;
-	position: absolute;
-	width: 15px;
-	height: 15px;
-	border-radius: 50%;
-	visibility: visible;
+    cursor: pointer;
+    display: block;
+    position: absolute;
+    width: 15px;
+    height: 15px;
+    border-radius: 50%;
+    visibility: visible;
 }
 
 .nav-li hr {
-	border: 1px solid #ffffff;
-	width: 100%;
-	margin: 7px 0;
-	border-radius: 10%;
+    border: 1px solid #ffffff;
+    width: 100%;
+    margin: 7px 0;
+    border-radius: 10%;
 }
 
 .rotatel {
-	transform: rotate(-45deg);
-	top: 3px;
-	left: 2px;
+    transform: rotate(-45deg);
+    top: 3px;
+    left: 2px;
 }
 
 .rotater {
-	transform: rotate(45deg);
-	top: 10px;
+    transform: rotate(45deg);
+    top: 10px;
 }
 
 .navli-1 {
-	transition: 500ms;
-	position: absolute;
+    transition: 500ms;
+    position: absolute;
 }
 
 .navli-2 {
-	transition: 500ms;
-	top: 3px;
-	position: absolute;
-	left: 1px;
+    transition: 500ms;
+    top: 3px;
+    position: absolute;
+    left: 1px;
 }
 
 .box {
-	width: 100%;
-	position: relative;
+    width: 100%;
+    position: relative;
 }
 
 .box .box-package {
-	width: 33%;
-	height: 100%;
-	top: 0;
-	left: 0;
-	position: absolute;
-	/*background-color: #00a0e9;*/
+    width: 33%;
+    height: 100%;
+    top: 0;
+    left: 0;
+    position: absolute;
+    /*background-color: #00a0e9;*/
 }
 
 .box .box-package div {
-	width: 100%;
-	height: 25%;
+    width: 100%;
+    height: 25%;
 }
 
 .box .box-package div:nth-child(1) {
-	/*background-color: #17e936;*/
+    /*background-color: #17e936;*/
 }
 
 .box .box-package div:nth-child(2) {
-	/*background-color: #70b6e9;*/
+    /*background-color: #70b6e9;*/
 }
 
 .box .box-package div:nth-child(3) {
-	/*background-color: #e98d7a;*/
+    /*background-color: #e98d7a;*/
 }
 
 .box .box-package div:nth-child(4) {
-	/*background-color: #3954e9;*/
+    /*background-color: #3954e9;*/
 }
 
 .box .characteristic {
-	position: absolute;
-	top: 0;
-	right: 0%;
-	width: 70%;
-	height: 100%;
-	/*background-color: #dcd90f;*/
+    position: absolute;
+    top: 0;
+    right: 0%;
+    width: 70%;
+    height: 100%;
+    /*background-color: #dcd90f;*/
 }
 
 .box img {
-	width: 100%;
-	display: inline-block;
+    /*width: 100%;*/
+    display: inline-block;
 }
 
 .box-footer {
-	z-index: 2;
-	width: 100%;
-	position: fixed;
-	bottom: 0;
-	/*display: -webkit-box;*/
-	/*display: box;*/
-}
-.box-footer div{
-	width: 33.33%;
-	float: left;
-	/*display: inline-block;*/
-	padding-top: 13.33%;
-	/*background-color: #fa0090;*/
+    z-index: 2;
+    width: 100%;
+    position: fixed;
+    bottom: 0;
+    /*display: -webkit-box;*/
+    /*display: box;*/
+}
+
+.box-footer div {
+    width: 33.33%;
+    float: left;
+    /*display: inline-block;*/
+
+    text-align: center;
+    /*background-color: #fa0090;*/
+}
+.box-footer div:nth-child(3){
+    float: right;
+}
+.box-footer div div {
+    width: 100%;
+    padding-top: 0;
+    color: #fff;
+    margin: 0 auto;
+    font-size: 12px;
+}
+.box-footer div img{
+    display: block;
+    margin: 0 auto;
+}
+@media (min-width: 767px) {
+    .box-footer div img{
+        width: 50px;
+        height: 50px;
+        margin-top: -80px;
+    }
+    .box-footer div:nth-child(1) img{
+        width: 45px;
+        height: 45px;
+        margin-bottom: 5px;
+    }
+    .box-footer div div{
+        font-size: 25px;
+    }
 }

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
www/webapp/moonclub/dist/css/main.css


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
www/webapp/moonclub/dist/js/build/template.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
www/webapp/moonclub/dist/js/main.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
www/webapp/moonclub/dist/js/page/home.js


+ 1 - 1
www/webapp/moonclub/js/build/template.js

@@ -17,7 +17,7 @@ a("common/dataPicker",function(a){"use strict";var b=this,c=(b.$helpers,b.$each)
 a("common/star",function(a){"use strict";var b=this,c=(b.$helpers,a.score),d="";return d+='<div class="star-container"> <div class="box-container box"> <div class="star-item ',c>=1&&(d+="enable"),d+='"></div> <div class="star-item ',c>=2&&(d+="enable"),d+='"></div> <div class="star-item ',c>=3&&(d+="enable"),d+='"></div> <div class="star-item ',c>=4&&(d+="enable"),d+='"></div> <div class="star-item ',c>=5&&(d+="enable"),d+='"></div> </div> </div>',new k(d)}),/*v:1*/
 a("desc/index",function(a){"use strict";var b=this,c=(b.$helpers,a.showNavBar),d="";return c&&(d+=' <header class="bar bar-nav"> <a class="left-button back-button"> <div class="icon icon-left-nav"></div> </a> <h1 class="title">\u670d\u52a1\u4ecb\u7ecd</h1> </header> '),d+=' <div class="content" id="descScroll"> <div class="scroller"> <div></div> </div> </div>',new k(d)}),/*v:1*/
 a("hire/index",function(a){"use strict";var b=this,c=(b.$helpers,a.showNavBar),d="";return c&&(d+=' <header class="bar bar-nav"> <a class="left-button back-button"> <div class="icon icon-left-nav"></div> </a> <h1 class="title">\u62db\u8d24\u7eb3\u58eb</h1> </header> '),d+=' <div class="content" id="placeOrderScroll"> <div class="top-content"> <p>\u62db\u52df\u4e0a\u95e8\u5ba0\u7269\u4fdd\u6d01\u5e08</p> </div> <div class="page-content"> <div class="logo-box"> <div class="logo"></div> <h2>\u58f9\u7ba1\u5bb6\u5ba0\u7269</h2> <h3>\u4e13\u4e1a\u5ba0\u7269\u670d\u52a1\u5e73\u53f0</h3> </div> <div class="des"> <p>\u5c97\u4f4d\u804c\u8d23</p> <p>\u8d44\u6df1\u4fdd\u6d01\u5e08\uff1a\u72ec\u7acb\u64cd\u4f5c\u5404\u79cd\u5ba0\u7269\u9020\u578b\u7684\u4fee\u526a\u5de5\u4f5c\u3002</p> <p>\u4fdd\u6d01\u5e08\u52a9\u7406\uff1a\u72ec\u7acb\u5b8c\u6210\u5ba0\u7269\u6d17\u6fa1\u5de5\u4f5c\u3002</p> <br> <p class="bold">\u516c\u53f8\u798f\u5229</p> <p class="bold">1.\u8fdc\u9ad8\u4e8e\u4f20\u7edf\u7f8e\u5bb9\u5e97\u7684\u5e95\u85aa\u3002</p> <p class="bold">2.\u5168\u4e0a\u6d77\u5404\u533a\u90fd\u6709\u5bbf\u820d\uff0c\u5c31\u8fd1\u5b89\u6392\u4f4f\u5bbf\u3002</p> <p class="bold">3.\u5b8c\u5584\u7684\u664b\u5347\u673a\u5236\uff0c\u5bf9\u4e1a\u7ee9\u8003\u8bc4\u4f18\u79c0\u7684\u4fdd\u6d01\u5e08\uff0c\u516c\u53f8\u5c06\u7edf\u4e00\u7ec4\u7ec7\u57f9\u8bad\u6df1\u9020\u3001\u8003\u7ea7\u3002</p> <br> ',d+=c?' <p class="bold">\u8054\u7cfb\u7535\u8bdd: <a class="service-telephone">021-62109097</a> </p> ':' <p class="bold">\u8054\u7cfb\u7535\u8bdd: <a href="tel:021-62109097">021-62109097</a> </p> ',d+=" <br> </div> </div> </div> ",new k(d)}),/*v:1*/
-a("home/index",function(a){"use strict";var b=this,c=(b.$helpers,a.showNavBar),d="";return c&&(d+=' <header class="bar bar-nav"> <a class="left-button back-button"> <div class="icon icon-left-nav"></div> </a> <a class="right-button service-telephone"> <div></div> </a> <h1 class="title">\u58f9\u7ba1\u5bb6</h1> </header> '),d+=' <div class="content"> <div class="box-container"> <div class="box-container box box-vertical"> <div id="homeScroll" class="scroll-container box-flex-1"> <div class="scroller"> <div class="home-content">  <div class="swiper-container"> <div class="swiper-wrapper"> <div class="swiper-slide btn-banner-recharge"> <img class="lazy" src="http://odulvej8l.bkt.clouddn.com/banner.jpg" alt=""> </div> </div> <div class="pagination"></div> </div> <div class="box"> <img style="width: 100%;" src="http://odulvej8l.bkt.clouddn.com/40456740739231372%28BAT%29.jpg" alt=""> <div class="box-package"> <div class="month-one"></div> <div class="month-two"></div> <div class="month-three"></div> <div class="month-four"></div> </div> <div class="characteristic"></div> </div> </div> </div> <div style="width: 100%;"></div> </div> <div class="box-footer"> <div class="appointment"></div> <div class="im"></div> <div class="im"></div> </div> <div style="position: fixed;width: 100%;bottom: 0;"><img src="http://odulvej8l.bkt.clouddn.com/footer.png" style="display: block;width: 100%;" alt=""></div> </div> </div> </div> </div>',new k(d)}),/*v:1*/
+a("home/index",function(a){"use strict";var b=this,c=(b.$helpers,a.showNavBar),d="";return c&&(d+=' <header class="bar bar-nav"> <a class="left-button back-button"> <div class="icon icon-left-nav"></div> </a> <a class="right-button service-telephone"> <div></div> </a> <h1 class="title">\u58f9\u7ba1\u5bb6</h1> </header> '),d+=' <div class="content"> <div class="box-container"> <div class="box-container box box-vertical"> <div id="homeScroll" class="scroll-container box-flex-1"> <div class="scroller"> <div class="home-content">  <div class="swiper-container"> <div class="swiper-wrapper"> <div class="swiper-slide btn-banner-recharge"> <img class="lazy" src="http://odulvej8l.bkt.clouddn.com/banner.jpg" alt=""> </div> </div> <div class="pagination"></div> </div> <div class="box"> <img style="width: 100%;" src="http://odulvej8l.bkt.clouddn.com/40456740739231372%28BAT%29.jpg" alt=""> <div class="box-package"> <div class="month-one"></div> <div class="month-two"></div> <div class="month-three"></div> <div class="month-four"></div> </div> <div class="characteristic"></div> </div> </div> </div> <div style="width: 100%;"></div> </div> <div class="box-footer"> <div class="appointment"><img src="http://odulvej8l.bkt.clouddn.com/%E9%A2%84%E7%BA%A6-01.png" alt="" width="20" height="20"><div>\u9884\u7ea6</div></div> <div class="im"></div> <div class="im"><img src="http://odulvej8l.bkt.clouddn.com/%E5%92%A8%E8%AF%A2-01.png" alt="" width="20" height="20"><div>\u54a8\u8be2</div></div> </div> <div style="position: fixed;width: 100%;bottom: 0;"><img src="http://odulvej8l.bkt.clouddn.com/footer%28BAT-2%29.png" style="display: block;width: 100%;" alt=""></div> </div> </div> </div> </div>',new k(d)}),/*v:1*/
 a("month/Consultation",function(a){"use strict";var b=this,c=(b.$helpers,a.showNavBar),d=b.$escape,e=a.title,f="";return c&&(f+=' <header class="bar bar-nav"> <a class="left-button back-button"> <div class="icon icon-left-nav"></div> </a> <h1 class="title">',f+=d(e),f+="</h1> </header> "),f+=' <div class="content"> <div class="box-container"> <div class="box-container box box-vertical"> <div id="ConsultationScroll" class="scroll-container box-flex-1" style="background: #dadada;"> <div class="scroller"> <img src="http://odulvej8l.bkt.clouddn.com/1107%E4%BC%81%E4%B8%9A%E6%9C%8D%E5%8A%A1%E8%AF%A6%E6%83%85%E9%A1%B5.jpg" style="width: 100%;">  </div> <div class="request"><div class="appointment">\u9884\u7ea6</div><div class="im">\u54a8\u8be2</div></div> </div> </div> </div> </div>',new k(f)}),/*v:1*/
 a("month/four",function(a){"use strict";var b=this,c=(b.$helpers,a.showNavBar),d=b.$escape,e=a.title,f="";return c&&(f+=' <header class="bar bar-nav"> <a class="left-button back-button"> <div class="icon icon-left-nav"></div> </a> <h1 class="title">',f+=d(e),f+="</h1> </header> "),f+=' <div class="content"> <div class="box-container"> <div class="box-container box box-vertical"> <div id="monthFourScroll" class="scroll-container box-flex-1" style="background: #7f6b8e;"> <div class="scroller"> <img src="http://odulvej8l.bkt.clouddn.com/52%E5%A4%A9%E5%8E%8B%E7%BC%A9.jpg" style="width: 100%;"> </div> <div class="request"><div class="appointment">\u9884\u7ea6</div><div class="im">\u54a8\u8be2</div></div> </div> </div> </div> </div>',new k(f)}),/*v:1*/
 a("month/one",function(a){"use strict";var b=this,c=(b.$helpers,a.showNavBar),d=b.$escape,e=a.title,f="";return c&&(f+=' <header class="bar bar-nav"> <a class="left-button back-button"> <div class="icon icon-left-nav"></div> </a> <h1 class="title">',f+=d(e),f+="</h1> </header> "),f+=' <div class="content"> <div class="box-container"> <div class="box-container box box-vertical"> <div id="monthOneScroll" class="scroll-container box-flex-1" style="background: #7f6b8e;"> <div class="scroller"> <img src="http://odulvej8l.bkt.clouddn.com/26%E5%A4%A9%E8%87%B3%E6%83%A0%E5%8E%8B%E7%BC%A9.jpg" style="width: 100%;"> </div> <div class="request"><div class="appointment">\u9884\u7ea6</div><div class="im">\u54a8\u8be2</div></div> </div> </div> </div> </div>',new k(f)}),/*v:1*/

+ 10 - 7
www/webapp/moonclub/js/page/home.js

@@ -135,8 +135,8 @@ define(['$', 'template', 'IScroll',  'user', 'native', 'config', 'address', 'api
 			localStorage.removeItem('cart_products');
 			dtd.resolve();
 			native.switchPopGesture(true);
-		},
-		afteropen: function (pageData, dtd) {
+
+
 			var $view = this;
 			var $doc = $(document);
 			/* 如果需要重新加载,就请求服务列表。 */
@@ -163,11 +163,11 @@ define(['$', 'template', 'IScroll',  'user', 'native', 'config', 'address', 'api
 						// autoplayDisableOnInteraction: false
 					});
 				}, 200);
-				setTimeout(function () {
-					pageData.scroll = new IScroll('#homeScroll');
-					// $(".box-container").height($(window).height());
-					// $("#homeScroll").height($(window).height())
-				}, 500);
+				/*setTimeout(function () {
+				 // pageData.scroll = new IScroll('#homeScroll');
+				 // $(".box-container").height($(window).height());
+				 // $("#homeScroll").height($(window).height())
+				 }, 500);*/
 
 				setInterval(function () {
 					// console.log($("#homeScroll").height($(window).height()));
@@ -185,6 +185,9 @@ define(['$', 'template', 'IScroll',  'user', 'native', 'config', 'address', 'api
 				});
 				$doc.trigger('spa:closeloader');
 			}
+		},
+		afteropen: function (pageData, dtd) {
+
 			/* 又是这个。不知道什么玩意…… */
 			dtd.resolve();
 

+ 4 - 4
www/webapp/moonclub/tpl/home/index.html

@@ -40,12 +40,12 @@
 				<div style="width: 100%;"></div>
 			</div>
 			<div class="box-footer">
-				<div class="appointment"></div>
-				<div class="im"></div>
+				<div class="appointment"><img src="http://odulvej8l.bkt.clouddn.com/%E9%A2%84%E7%BA%A6-01.png" alt="" width="20" height="20"><div>预约</div></div>
 				<div class="im"></div>
+				<div class="im"><img src="http://odulvej8l.bkt.clouddn.com/%E5%92%A8%E8%AF%A2-01.png" alt="" width="20" height="20"><div>咨询</div></div>
 			</div>
-			<div style="position: fixed;width: 100%;bottom: 0;"><img src="http://odulvej8l.bkt.clouddn.com/footer.png"
-			                                                         style="display: block;width: 100%;" alt=""></div>
+			<div style="position: fixed;width: 100%;bottom: 0;"><img src="http://odulvej8l.bkt.clouddn.com/footer%28BAT-2%29.png"
+																	 style="display: block;width: 100%;" alt=""></div>
 		</div>
 	</div>
 </div>

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác