Commit 51d7c875 authored by 杨培's avatar 杨培

Merge remote-tracking branch 'origin/master'

parents f16822b1 1b0cd735
......@@ -12,7 +12,6 @@ class AppAsset extends AssetBundle
public $basePath = '@webroot';
public $baseUrl = '@web';
public $css = [
'css/site.css',
];
public $js = [
];
......
<?php
return [
$config = [
'components' => [
'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
......@@ -7,3 +8,6 @@ return [
],
],
];
return $config;
<?php
// NOTE: Make sure this file is not accessible when deployed to production
if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
die('You are not allowed to access this file.');
}
if(!function_exists('fnmatch')) {
function fnmatch($pattern, $string) {
return preg_match("#^".strtr(preg_quote($pattern, '#'), array('\*' => '.*', '\?' => '.'))."$#i", $string);
} // end
} // end if
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
require(__DIR__ . '/../../vendor/autoload.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
require(__DIR__ . '/../../common/config/bootstrap.php');
require(__DIR__ . '/../config/bootstrap.php');
$config = require(__DIR__ . '/../../tests/codeception/config/backend/acceptance.php');
(new yii\web\Application($config))->run();
<?php
defined('YII_DEBUG') or define('YII_DEBUG', false);
defined('YII_ENV') or define('YII_ENV', 'prod');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
if(!function_exists('fnmatch')) {
function fnmatch($pattern, $string) {
return preg_match("#^".strtr(preg_quote($pattern, '#'), array('\*' => '.*', '\?' => '.'))."$#i", $string);
} // end
} // end if
require(__DIR__ . '/../../vendor/autoload.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
require(__DIR__ . '/../../common/config/bootstrap.php');
......
<?php
return [
'components' => [
'cache' => [
'class' => 'yii\redis\Cache',
'redis' => [
'hostname' => '192.168.1.12',
'port' => 6380,
'database' => 2,
]
],
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=yii2advanced',
'username' => 'root',
'password' => '',
'dsn' => 'mysql:host=192.168.1.7;port:3305;dbname=pp_c',
'username' => 'pp_c',
'password' => 'nF@V5LK#ilb!NEvZ@1Ze#rWm#H',
'charset' => 'utf8',
],
'redis' => [
'class' => 'yii\redis\Connection',
'hostname' => '192.168.1.21',
'port' => 6380,
'database' => 2,
],
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@common/mail',
// send all mails to a file by default. You have to set
// 'useFileTransport' to false and configure a transport
// for the mailer to send real emails.
'useFileTransport' => TRUE,
],
'qiniu' => [
'class' => 'common\components\Qiniu',
'accessKey' => 'n85SCPB9uO2v32az-3TRFsZCXwJu7YddyzLRYXg-',
'secretKey' => 'KDl3b7aLpj7n9YZ07lHGivVY4c_Q-0QSM0TZ_-XS',
'storages' => [
'public' => [
'bucket' => 'pp-classroom',
'fsizeLimit' => pow(1024, 2) * 5, //5MB
'mimeLimit' => 'image/jpeg;image/png;image/gif',
'url' => 'http://dev.qdn.pp.cc/'
],
'video' => [
'bucket' => 'pp-classroom-private',
'fsizeLimit' => pow(1024, 3) * 2, //2GB
'mimeLimit' => 'video/*;flv-application/octet-stream',
'url' => 'http://oe9d6dr84.bkt.clouddn.com/'
]
]
]
],
];
<?php
return [
'adminEmail' => 'admin@example.com',
'supportEmail' => 'support@example.com',
'user.passwordResetTokenExpire' => 3600,
'captchaId' => '4d6ad870bf63a30be3d22c92925b04ca',
'privateKey' => 'a2ca5e5139d1f43ac4e1cd248f3e52e4',
'msg.host' => 'http://114.55.132.75:7893/sms.aspx',
'msg.userid' => '78',
'msg.account' => '276147613x',
'msg.password' => '276147613',
'msg.signature' => '【最课堂】',
'alipay' => [
'partner' => '2088701843067550',
'seller_id' => '2088701843067550',
'key' => '12vr33u4g314hytde3g81oao9dfdarm6',
'notify_url' => 'http://c.pp.cc/pay/alipay-notify',
'return_url' => 'http://商户网址/create_direct_pay_by_user-PHP-UTF-8/return_url.php',
'sign_type' => strtoupper('MD5'),
'input_charset' => strtolower('utf-8'),
'cacert' => getcwd() . '\\cacert.pem',
'transport' => 'http',
'payment_type' => '1',
'service' => 'create_direct_pay_by_user',
],
// 'weixinpay'=>[
// 'appid'=>'wx180521eb22e9d7af',
// 'mchid'=>'1295461001',
// 'key'=>'ejg0l9phOAkp021qB54shz0Q8Tiscwzy',
// 'appsecret'=>'f20293c9548c469fb8b855fc98c4ef3c',
//
// ]
'weixinpay' => [
'appid' => 'wx5714a24a60083b2a',
'mchid' => '1399794002',
'key' => '8934e7d15453e97507ef794cf7b0519d',
'appsecret' => '7c18222c6ec31efa65d21606a629585d',
]
];
<?php
return [
$config = [
'components' => [
'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey' => '',
'cookieValidationKey' => '1o1zEUf8jdBvsnZy_JygPUO5_sZ7zBci',
],
'session' => [
'timeout' => 3600,
'name' => 'zuiektang-frontend',
'class' => 'yii\redis\Session',
'redis' => [
'hostname' => '192.168.1.21',
'port' => 6380,
'database' => 2,
]
],
],
];
return $config;
<?php
// NOTE: Make sure this file is not accessible when deployed to production
if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
die('You are not allowed to access this file.');
}
if(!function_exists('fnmatch')) {
function fnmatch($pattern, $string) {
return preg_match("#^".strtr(preg_quote($pattern, '#'), array('\*' => '.*', '\?' => '.'))."$#i", $string);
} // end
} // end if
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
require(__DIR__ . '/../../vendor/autoload.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
require(__DIR__ . '/../../common/config/bootstrap.php');
require(__DIR__ . '/../config/bootstrap.php');
$config = require(__DIR__ . '/../../tests/codeception/config/frontend/acceptance.php');
(new yii\web\Application($config))->run();
<?php
defined('YII_DEBUG') or define('YII_DEBUG', false);
defined('YII_ENV') or define('YII_ENV', 'prod');
if(!function_exists('fnmatch')) {
function fnmatch($pattern, $string) {
return preg_match("#^".strtr(preg_quote($pattern, '#'), array('\*' => '.*', '\?' => '.'))."$#i", $string);
} // end
} // end if
require(__DIR__ . '/../../vendor/autoload.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
require(__DIR__ . '/../../common/config/bootstrap.php');
......
......@@ -6,6 +6,24 @@
* Time: 下午5:39
*/
$this->title = "视频播放";
\backend\assets\AppAsset::register($this);
$js = <<<JS
window._bd_share_config = {
"common": {
"bdSnsKey": {},
"bdText": "",
"bdMini": "1",
"bdMiniList": ["qzone", "tsina", "weixin"],
"bdPic": "",
"bdStyle": "2",
"bdSize": "24"
}, "share": {}
};
with (document)0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];
JS;
$this->registerJs($js);
\frontend\assets\AppAsset::addCss($this, '@web/assets/css/main.css');
\frontend\assets\AppAsset::addScript($this, '@web/assets/home_video.js');
\frontend\assets\AppAsset::addCss($this, '@web/assets/css/home_video.css');
......
......@@ -2,10 +2,10 @@
<div class="container">
<div class="cnt-tit">
<h3>{{coursewareInfo.courseName}}</h3>
<div class="tit-share hidden-xs">
<a href="javascript:;" class="wechat post-icons"></a>
<a href="javascript:;" class="weibo post-icons"></a>
<a href="javascript:;" class="qzone post-icons"></a>
<div class="tit-share hidden-xs bdsharebuttonbox">
<a href="javascript:;" class="wechat post-icons bds_weixin" data-cmd="weixin" title="分享到微信"></a>
<a href="javascript:;" class="weibo post-icons bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
<a href="javascript:;" class="qzone post-icons bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
</div>
</div>
......@@ -109,3 +109,4 @@
}
}
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment