Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
zuiketang
Commits
a8eab4d4
Commit
a8eab4d4
authored
Sep 27, 2016
by
xiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加登录注册
parent
0d02bb7a
Changes
16
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
176 additions
and
64 deletions
+176
-64
params.php
common/config/params.php
+5
-4
Geetest.php
common/libs/Geetest.php
+2
-2
Message.php
common/libs/Message.php
+11
-13
Utils.php
common/libs/Utils.php
+15
-1
params.php
frontend/config/params.php
+3
-1
SiteController.php
frontend/controllers/SiteController.php
+27
-14
UserCenterController.php
frontend/controllers/UserCenterController.php
+1
-1
PasswordResetRequestForm.php
frontend/models/PasswordResetRequestForm.php
+5
-1
signup.php
frontend/views/site/signup.php
+2
-2
.gitignore
frontend/web/.gitignore
+1
-0
common.js
frontend/web/assets/common/common.js
+34
-10
request_password_reset.js
frontend/web/assets/request_password_reset.js
+1
-1
signup.js
frontend/web/assets/signup.js
+31
-9
signup.js
frontend/web/js/site/signup.js
+22
-1
layer.js
frontend/web/js/utils/layer.js
+10
-0
webpack.config.js
frontend/web/webpack.config.js
+6
-4
No files found.
common/config/params.php
View file @
a8eab4d4
...
@@ -5,8 +5,9 @@ return [
...
@@ -5,8 +5,9 @@ return [
'user.passwordResetTokenExpire'
=>
3600
,
'user.passwordResetTokenExpire'
=>
3600
,
'captchaId'
=>
'4d6ad870bf63a30be3d22c92925b04ca'
,
'captchaId'
=>
'4d6ad870bf63a30be3d22c92925b04ca'
,
'privateKey'
=>
'a2ca5e5139d1f43ac4e1cd248f3e52e4'
,
'privateKey'
=>
'a2ca5e5139d1f43ac4e1cd248f3e52e4'
,
'msg.host'
=>
'http://120.55.242.177/OpenPlatform/OpenApi'
,
'msg.host'
=>
'http://114.55.132.75:7893/sms.aspx'
,
'msg.ac'
=>
'1001@800123450001'
,
'msg.userid'
=>
'78'
,
'msg.authkey'
=>
'0E9AEFC25E6A4816E7832755BC5CCA61'
,
'msg.account'
=>
'276147613x'
,
'msg.cgid'
=>
'222'
'msg.password'
=>
'276147613'
,
'msg.signature'
=>
'【最课堂】'
];
];
common/libs/Geetest.php
View file @
a8eab4d4
...
@@ -10,8 +10,8 @@ class Geetest
...
@@ -10,8 +10,8 @@ class Geetest
{
{
const
GT_SDK_VERSION
=
'php_3.2.0'
;
const
GT_SDK_VERSION
=
'php_3.2.0'
;
public
static
$connectTimeout
=
1
;
public
static
$connectTimeout
=
1
0
;
public
static
$socketTimeout
=
1
;
public
static
$socketTimeout
=
1
0
;
private
$response
;
private
$response
;
...
...
common/libs/Message.php
View file @
a8eab4d4
...
@@ -28,10 +28,10 @@ class Message
...
@@ -28,10 +28,10 @@ class Message
$params
=
Yii
::
$app
->
params
;
$params
=
Yii
::
$app
->
params
;
$this
->
hosts
=
$params
[
'msg.host'
];
$this
->
hosts
=
$params
[
'msg.host'
];
$this
->
query
=
[
$this
->
query
=
[
'action'
=>
'send
Once
'
,
'action'
=>
'send'
,
'
ac'
=>
$params
[
'msg.ac
'
],
'
userid'
=>
$params
[
'msg.userid
'
],
'a
uthkey'
=>
$params
[
'msg.authkey
'
],
'a
ccount'
=>
$params
[
'msg.account
'
],
'
cgid'
=>
$params
[
'msg.cgi
d'
],
'
password'
=>
$params
[
'msg.passwor
d'
],
];
];
$this
->
httpClient
=
new
Client
();
$this
->
httpClient
=
new
Client
();
}
}
...
@@ -47,11 +47,13 @@ class Message
...
@@ -47,11 +47,13 @@ class Message
if
(
is_array
(
$telephones
))
{
if
(
is_array
(
$telephones
))
{
$telephones
=
implode
(
','
,
$telephones
);
$telephones
=
implode
(
','
,
$telephones
);
}
}
$this
->
query
[
'm'
]
=
$telephones
;
$content
.=
' '
.
Yii
::
$app
->
params
[
'msg.signature'
];
$this
->
query
[
'c'
]
=
$content
;
$this
->
query
[
'mobile'
]
=
$telephones
;
$this
->
query
[
'content'
]
=
$content
;
return
FALSE
;
try
{
try
{
$response
=
$this
->
httpClient
->
request
(
'GET'
,
$this
->
hosts
,
[
$response
=
$this
->
httpClient
->
request
(
'GET'
,
$this
->
hosts
,
[
'
query
'
=>
$this
->
query
'
form_params
'
=>
$this
->
query
]);
]);
}
catch
(
ClientException
$e
)
{
}
catch
(
ClientException
$e
)
{
$response
=
$e
->
getResponse
();
$response
=
$e
->
getResponse
();
...
@@ -59,14 +61,10 @@ class Message
...
@@ -59,14 +61,10 @@ class Message
throw
$e
;
throw
$e
;
Yii
::
getLogger
()
->
log
(
$e
,
Logger
::
LEVEL_ERROR
,
'Message'
);
Yii
::
getLogger
()
->
log
(
$e
,
Logger
::
LEVEL_ERROR
,
'Message'
);
}
}
$return
=
new
\SimpleXMLElement
(
$response
->
getBody
()
->
getContents
());
$return
=
new
\SimpleXMLElement
(
$response
->
getBody
()
->
getContents
());
if
((
string
)
$return
->
returnstatus
!==
'Success'
)
{
if
((
int
)
$return
[
'result'
]
!==
1
)
{
Yii
::
getLogger
()
->
log
((
string
)
$return
->
message
,
Logger
::
LEVEL_ERROR
,
'Message'
);
Yii
::
getLogger
()
->
log
(
$return
[
'result'
],
Logger
::
LEVEL_ERROR
,
'Message'
);
}
}
}
}
...
...
common/libs/Utils.php
View file @
a8eab4d4
...
@@ -47,7 +47,7 @@ class Utils
...
@@ -47,7 +47,7 @@ class Utils
* @param int $length
* @param int $length
* @return int
* @return int
*/
*/
public
function
randomNumber
(
$length
=
6
)
public
static
function
randomNumber
(
$length
=
6
)
{
{
if
(
$length
<
4
or
$length
>
6
)
{
if
(
$length
<
4
or
$length
>
6
)
{
$length
=
6
;
$length
=
6
;
...
@@ -70,4 +70,18 @@ class Utils
...
@@ -70,4 +70,18 @@ class Utils
return
mt_rand
(
$min
,
$max
);
return
mt_rand
(
$min
,
$max
);
}
}
/**
* 判断是否为手机号码
* @param $telephone
* @return bool
*/
public
static
function
isTelephone
(
$telephone
)
{
if
(
preg_match
(
'/^1[34578]{1}\d{9}$/'
,
$telephone
))
{
return
TRUE
;
}
else
{
return
FALSE
;
}
}
}
}
\ No newline at end of file
frontend/config/params.php
View file @
a8eab4d4
<?php
<?php
return
[
return
[
'adminEmail'
=>
'admin@example.com'
'adminEmail'
=>
'admin@example.com'
,
'signup.msg'
=>
'您正在注册最课堂,验证码: xxxxxx,2小时内有效'
,
'resetpassword.msg'
=>
'您正在找回密码,验证码: xxxxxx,2小时内有效'
,
];
];
frontend/controllers/SiteController.php
View file @
a8eab4d4
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
namespace
frontend\controllers
;
namespace
frontend\controllers
;
use
common\libs\Geetest
;
use
common\libs\Geetest
;
use
common\libs\Message
;
use
common\libs\Utils
;
use
common\libs\Utils
;
use
common\models\User
;
use
common\models\User
;
use
frontend\models\TokenInputForm
;
use
frontend\models\TokenInputForm
;
...
@@ -171,7 +172,9 @@ class SiteController extends Controller
...
@@ -171,7 +172,9 @@ class SiteController extends Controller
$from
=
$request
->
get
(
'from'
,
0
);
$from
=
$request
->
get
(
'from'
,
0
);
$from
=
HtmlPurifier
::
process
(
$from
);
$from
=
HtmlPurifier
::
process
(
$from
);
$model
->
from
=
(
int
)
$from
;
$model
->
from
=
(
int
)
$from
;
if
(
$model
->
load
(
$request
->
post
()))
{
$token
=
$request
->
post
(
'token'
);
$telephone
=
$request
->
post
(
'telephone'
);
if
(
$model
->
load
(
$request
->
post
())
&&
$token
.
$telephone
===
Yii
::
$app
->
session
->
get
(
self
::
SIGNUP_TOKEN
))
{
$geetestChallenge
=
$request
->
post
(
'geetest_challenge'
);
$geetestChallenge
=
$request
->
post
(
'geetest_challenge'
);
$geetestSeccode
=
$request
->
post
(
'geetest_seccode'
);
$geetestSeccode
=
$request
->
post
(
'geetest_seccode'
);
$geetestValidate
=
$request
->
post
(
'geetest_validate'
);
$geetestValidate
=
$request
->
post
(
'geetest_validate'
);
...
@@ -185,6 +188,8 @@ class SiteController extends Controller
...
@@ -185,6 +188,8 @@ class SiteController extends Controller
$gtResult
=
$GtSdk
->
fail_validate
(
$geetestChallenge
,
$geetestValidate
,
$geetestSeccode
);
$gtResult
=
$GtSdk
->
fail_validate
(
$geetestChallenge
,
$geetestValidate
,
$geetestSeccode
);
}
}
if
(
$gtResult
&&
$user
=
$model
->
signup
())
{
if
(
$gtResult
&&
$user
=
$model
->
signup
())
{
//删除短信验证码
Yii
::
$app
->
session
->
remove
(
self
::
SIGNUP_TOKEN
);
if
(
Yii
::
$app
->
getUser
()
->
login
(
$user
))
{
if
(
Yii
::
$app
->
getUser
()
->
login
(
$user
))
{
return
$this
->
goHome
();
return
$this
->
goHome
();
}
}
...
@@ -259,8 +264,7 @@ class SiteController extends Controller
...
@@ -259,8 +264,7 @@ class SiteController extends Controller
* Resets password.
* Resets password.
* @return mixed
* @return mixed
*/
*/
public
public
function
actionResetPassword
()
function
actionResetPassword
()
{
{
if
(
!
Yii
::
$app
->
session
->
has
(
self
::
RESET_PASSWORD_SECOND
))
{
if
(
!
Yii
::
$app
->
session
->
has
(
self
::
RESET_PASSWORD_SECOND
))
{
$this
->
redirect
(
'request-password-reset'
);
$this
->
redirect
(
'request-password-reset'
);
...
@@ -295,8 +299,7 @@ class SiteController extends Controller
...
@@ -295,8 +299,7 @@ class SiteController extends Controller
* 极验证开始
* 极验证开始
* ajax
* ajax
*/
*/
public
public
function
actionStartCaptcha
()
function
actionStartCaptcha
()
{
{
if
(
Yii
::
$app
->
request
->
isAjax
)
{
if
(
Yii
::
$app
->
request
->
isAjax
)
{
$type
=
Yii
::
$app
->
request
->
get
(
'type'
);
$type
=
Yii
::
$app
->
request
->
get
(
'type'
);
...
@@ -323,11 +326,16 @@ class SiteController extends Controller
...
@@ -323,11 +326,16 @@ class SiteController extends Controller
public
function
actionSendSignupMsg
()
public
function
actionSendSignupMsg
()
{
{
if
(
TRUE
||
Yii
::
$app
->
request
->
isAjax
)
{
if
(
TRUE
||
Yii
::
$app
->
request
->
isAjax
)
{
$telephone
=
trim
(
Yii
::
$app
->
request
->
get
(
'telephone'
));
if
(
Utils
::
isTelephone
(
$telephone
))
{
$key
=
self
::
REDIS_SIGNUP_MSG_PREFIX
.
'::'
.
Utils
::
getRealIP
();
$key
=
self
::
REDIS_SIGNUP_MSG_PREFIX
.
'::'
.
Utils
::
getRealIP
();
$redis
=
Yii
::
$app
->
redis
;
$redis
=
Yii
::
$app
->
redis
;
$value
=
$redis
->
get
(
$key
);
$value
=
$redis
->
get
(
$key
);
if
(
$value
===
NULL
)
{
if
(
$value
===
NULL
)
{
//sendMsg
$token
=
(
string
)
Utils
::
randomNumber
();
Yii
::
$app
->
session
->
set
(
self
::
SIGNUP_TOKEN
,
$token
.
$telephone
);
$messgae
=
new
Message
();
$messgae
->
send
(
$telephone
,
str_replace
(
'xxxxxx'
,
$token
,
Yii
::
$app
->
params
[
'signup.msg'
]));
$redis
->
setex
(
$key
,
self
::
REDIS_SIGNUP_MSG_EXPIRE
,
1
);
$redis
->
setex
(
$key
,
self
::
REDIS_SIGNUP_MSG_EXPIRE
,
1
);
$result
=
TRUE
;
$result
=
TRUE
;
$msg
=
""
;
$msg
=
""
;
...
@@ -335,6 +343,11 @@ class SiteController extends Controller
...
@@ -335,6 +343,11 @@ class SiteController extends Controller
$result
=
FALSE
;
$result
=
FALSE
;
$msg
=
'一分钟只有一次'
;
$msg
=
'一分钟只有一次'
;
}
}
}
else
{
$result
=
FALSE
;
$msg
=
'手机格式不正确'
;
}
Utils
::
ajaxResponse
(
$result
,
$msg
);
Utils
::
ajaxResponse
(
$result
,
$msg
);
}
else
{
}
else
{
throw
new
\yii\web\ForbiddenHttpException
(
'非法请求'
);
throw
new
\yii\web\ForbiddenHttpException
(
'非法请求'
);
...
...
frontend/controllers/UserCenterController.php
View file @
a8eab4d4
...
@@ -41,7 +41,7 @@ class UserCenterController extends Controller
...
@@ -41,7 +41,7 @@ class UserCenterController extends Controller
public
function
actionTest
()
public
function
actionTest
()
{
{
$message
=
new
Message
();
$message
=
new
Message
();
$result
=
$message
->
send
(
'15395081586'
,
'xiabin'
);
$result
=
$message
->
send
(
'15395081586'
,
'xia
12312321313213
bin'
);
}
}
public
function
actionIndex
()
public
function
actionIndex
()
...
...
frontend/models/PasswordResetRequestForm.php
View file @
a8eab4d4
<?php
<?php
namespace
frontend\models
;
namespace
frontend\models
;
use
common\libs\Message
;
use
common\libs\SendMsg
;
use
common\libs\SendMsg
;
use
Yii
;
use
Yii
;
use
yii\base\Model
;
use
yii\base\Model
;
...
@@ -53,8 +54,11 @@ class PasswordResetRequestForm extends Model
...
@@ -53,8 +54,11 @@ class PasswordResetRequestForm extends Model
}
}
}
}
//存储发送的手机号码
//存储发送的手机号码
$message
=
new
Message
();
$token
=
explode
(
'_'
,
$user
->
password_reset_token
);
$token
=
$token
[
0
];
$message
->
send
(
$user
->
telephone
,
str_replace
(
'xxxxxx'
,
$token
,
Yii
::
$app
->
params
[
'resetpassword.msg'
]));
//send_msg
//send_msg
return
TRUE
;
return
TRUE
;
}
}
...
...
frontend/views/site/signup.php
View file @
a8eab4d4
...
@@ -32,8 +32,8 @@ $this->registerJsFile('http://static.geetest.com/static/tools/gt.js');
...
@@ -32,8 +32,8 @@ $this->registerJsFile('http://static.geetest.com/static/tools/gt.js');
<label
class=
"control-label"
for=
"token"
>
Token
</label>
<label
class=
"control-label"
for=
"token"
>
Token
</label>
<input
type=
"text"
class=
"form-control"
id=
"token"
>
<input
name=
"token"
type=
"text"
class=
"form-control"
id=
"token"
>
<button
class=
""
>
send msg
</button>
<button
id=
"send_msg"
class=
""
>
send msg
</button>
<div
style=
"margin-top: 20px;margin-bottom: 20px"
>
<div
style=
"margin-top: 20px;margin-bottom: 20px"
>
<div
id=
"embed-captcha"
></div>
<div
id=
"embed-captcha"
></div>
...
...
frontend/web/.gitignore
View file @
a8eab4d4
/index.php
/index.php
/index-test.php
/index-test.php
/js/node_modules/
\ No newline at end of file
frontend/web/assets/common/common.js
View file @
a8eab4d4
This diff is collapsed.
Click to expand it.
frontend/web/assets/request_password_reset.js
View file @
a8eab4d4
...
@@ -51,7 +51,7 @@ webpackJsonp([1],[
...
@@ -51,7 +51,7 @@ webpackJsonp([1],[
});
});
/* WEBPACK VAR INJECTION */
}.
call
(
exports
,
__webpack_require__
(
4
)))
/* WEBPACK VAR INJECTION */
}.
call
(
exports
,
__webpack_require__
(
3
)))
/***/
}
/***/
}
]);
]);
\ No newline at end of file
frontend/web/assets/signup.js
View file @
a8eab4d4
webpackJsonp
([
2
],[
webpackJsonp
([
2
],{
/* 0 */
/***/
0
:
/***/
function
(
module
,
exports
,
__webpack_require__
)
{
/***/
function
(
module
,
exports
,
__webpack_require__
)
{
module
.
exports
=
__webpack_require__
(
3
);
module
.
exports
=
__webpack_require__
(
6
);
/***/
},
/***/
},
/* 1 */
,
/* 2 */
,
/***/
6
:
/* 3 */
/***/
function
(
module
,
exports
,
__webpack_require__
)
{
/***/
function
(
module
,
exports
,
__webpack_require__
)
{
/* WEBPACK VAR INJECTION */
(
function
(
$
)
{
var
handlerEmbed
=
function
(
captchaObj
)
{
/* WEBPACK VAR INJECTION */
(
function
(
$
)
{
var
handlerEmbed
=
function
(
captchaObj
)
{
...
@@ -47,7 +47,29 @@ webpackJsonp([2],[
...
@@ -47,7 +47,29 @@ webpackJsonp([2],[
},
handlerEmbed
);
},
handlerEmbed
);
}
}
});
});
/* WEBPACK VAR INJECTION */
}.
call
(
exports
,
__webpack_require__
(
4
)))
//发送短信呢
$
(
'#send_msg'
).
click
(
function
()
{
var
telephone
=
$
(
'#telephone'
).
val
();
$
.
ajax
({
// 获取id,challenge,success(是否启用failback)
url
:
(
"http://dev.zuiketang.com/"
)
+
"site/send-signup-msg?telephone="
+
telephone
,
// 加随机数防止缓存
type
:
"get"
,
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
status
===
false
)
{
layer
.
alert
(
data
.
message
,
{
'icon'
:
2
,
'title'
:
'提示'
});
}
else
{
layer
.
alert
(
'短信发送成功'
,
{
'icon'
:
1
,
'title'
:
'提示'
})
}
}
}).
error
(
function
()
{
layer
.
alert
(
'发送短信服务出错'
,
{
'icon'
:
2
,
'title'
:
'提示'
})
});
return
false
;
});
/* WEBPACK VAR INJECTION */
}.
call
(
exports
,
__webpack_require__
(
3
)))
/***/
}
/***/
}
]);
\ No newline at end of file
});
\ No newline at end of file
frontend/web/js/site/signup.js
View file @
a8eab4d4
...
@@ -34,3 +34,24 @@ $.ajax({
...
@@ -34,3 +34,24 @@ $.ajax({
},
handlerEmbed
);
},
handlerEmbed
);
}
}
});
});
//发送短信呢
$
(
'#send_msg'
).
click
(
function
()
{
var
telephone
=
$
(
'#telephone'
).
val
();
$
.
ajax
({
// 获取id,challenge,success(是否启用failback)
url
:
__BASE_URL__
+
"site/send-signup-msg?telephone="
+
telephone
,
// 加随机数防止缓存
type
:
"get"
,
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
status
===
false
)
{
layer
.
alert
(
data
.
message
,
{
'icon'
:
2
,
'title'
:
'提示'
});
}
else
{
layer
.
alert
(
'短信发送成功'
,
{
'icon'
:
1
,
'title'
:
'提示'
})
}
}
}).
error
(
function
()
{
layer
.
alert
(
'发送短信服务出错'
,
{
'icon'
:
2
,
'title'
:
'提示'
})
});
return
false
;
});
\ No newline at end of file
frontend/web/js/utils/layer.js
0 → 100644
View file @
a8eab4d4
/**
* Created by xiabin on 2016/9/27.
*/
var
layer
=
require
(
'layer-js'
);
layer
.
config
({
path
:
__CDN_URL__
+
'assets/layer/2.4/'
,
//layer.js所在的目录,可以是绝对目录,也可以是相对目录
extend
:
[
'extend/layer.ext.js'
]
});
module
.
exports
=
layer
;
\ No newline at end of file
frontend/web/webpack.config.js
View file @
a8eab4d4
...
@@ -2,17 +2,17 @@ var webpack = require('webpack');
...
@@ -2,17 +2,17 @@ var webpack = require('webpack');
var
css_dir
=
__dirname
+
'/css'
;
var
css_dir
=
__dirname
+
'/css'
;
var
img_dir
=
__dirname
+
'/img'
;
var
img_dir
=
__dirname
+
'/img'
;
var
js_dir
=
__dirname
+
'/js'
;
var
js_dir
=
__dirname
+
'/js'
;
var
lib_dir
=
js_dir
+
'/lib'
;
var
lib_dir
=
js_dir
+
'/lib
s
'
;
var
CommonsChunkPlugin
=
require
(
"webpack/lib/optimize/CommonsChunkPlugin"
);
var
CommonsChunkPlugin
=
require
(
"webpack/lib/optimize/CommonsChunkPlugin"
);
var
path
=
require
(
'path'
);
var
path
=
require
(
'path'
);
var
CopyWebpackPlugin
=
require
(
'copy-webpack-plugin'
);
var
CopyWebpackPlugin
=
require
(
'copy-webpack-plugin'
);
var
ExtractTextPlugin
=
require
(
"extract-text-webpack-plugin"
);
var
ExtractTextPlugin
=
require
(
"extract-text-webpack-plugin"
);
var
entry
=
{
var
entry
=
{
vendor
:
[
"jquery"
,
"vue"
],
vendor
:
[
"jquery"
,
"vue"
,
js_dir
+
"/utils/layer"
],
signup
:
[
js_dir
+
'/site/signup.js'
],
signup
:
[
js_dir
+
'/site/signup.js'
],
login
:
[
js_dir
+
'/site/login.js'
],
login
:
[
js_dir
+
'/site/login.js'
],
request_password_reset
:
[
js_dir
+
'/site/request_password_reset'
]
request_password_reset
:
[
js_dir
+
'/site/request_password_reset'
]
};
};
...
@@ -60,7 +60,7 @@ var config = {
...
@@ -60,7 +60,7 @@ var config = {
}),
}),
new
CopyWebpackPlugin
([
new
CopyWebpackPlugin
([
// {from: __dirname + '/resource', to: 'resource'},
// {from: __dirname + '/resource', to: 'resource'},
//
{from: lib_dir + '/layer', to: 'layer'},
{
from
:
lib_dir
+
'/layer'
,
to
:
'layer'
},
// {from: img_dir, to: 'img'},
// {from: img_dir, to: 'img'},
// {from: manage_dir + '/dist', to: 'manage/dist'},
// {from: manage_dir + '/dist', to: 'manage/dist'},
// {from: manage_dir + '/plugins', to: 'manage/plugins'},
// {from: manage_dir + '/plugins', to: 'manage/plugins'},
...
@@ -113,6 +113,8 @@ if (process.env.NODE_ENV === 'production') {
...
@@ -113,6 +113,8 @@ if (process.env.NODE_ENV === 'production') {
config
.
plugins
=
config
.
plugins
.
concat
([
config
.
plugins
=
config
.
plugins
.
concat
([
new
webpack
.
DefinePlugin
({
new
webpack
.
DefinePlugin
({
__BASE_URL__
:
JSON
.
stringify
(
'http://dev.zuiketang.com/'
),
__BASE_URL__
:
JSON
.
stringify
(
'http://dev.zuiketang.com/'
),
__CDN_URL__
:
JSON
.
stringify
(
'http://dev.zuiketang.com/'
)
}),
}),
]);
]);
// config.devtool = 'source-map'
// config.devtool = 'source-map'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment