Commit 71db8135 authored by 陈伟's avatar 陈伟

Merge branch 'hotfix/bug' into 'dev'

Hotfix/bug

See merge request alpha/sun!6
parents de3505df a78842ad
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Date: 2018/11/16 # Date: 2018/11/16
from django.conf import settings from django.conf import settings
from utils.base import APIView from utils.base import APIView
from utils.user_util import make_password from utils.user_util import make_password_own
from utils.logger import error_logger from utils.logger import error_logger
...@@ -53,7 +53,7 @@ class AccountUpdateOrCreateView(APIView): ...@@ -53,7 +53,7 @@ class AccountUpdateOrCreateView(APIView):
data = { data = {
'username': request.POST.get('username'), 'username': request.POST.get('username'),
'email': request.POST.get('email'), 'email': request.POST.get('email'),
'password': make_password(request.POST.get('password')), 'password': make_password_own(request.POST.get('password')),
'phone': request.POST.get('phone'), 'phone': request.POST.get('phone'),
'nick_name': request.POST.get('nick_name'), 'nick_name': request.POST.get('nick_name'),
'is_staff': True, 'is_staff': True,
...@@ -137,7 +137,7 @@ class LogoutView(APIView): ...@@ -137,7 +137,7 @@ class LogoutView(APIView):
class ResetPasswordView(APIView): class ResetPasswordView(APIView):
def post(self, request): def post(self, request):
id = request.POST.get('id') id = request.POST.get('id')
password = make_password(settings.OPERATOR_PASSWORD) password = make_password_own(settings.OPERATOR_PASSWORD)
try: try:
self.rpc['venus/sun/account/reset_password'](id=id, password=password).unwrap() self.rpc['venus/sun/account/reset_password'](id=id, password=password).unwrap()
except Exception as e: except Exception as e:
......
...@@ -41,7 +41,7 @@ def require_login(request, origin=''): ...@@ -41,7 +41,7 @@ def require_login(request, origin=''):
return login_require return login_require
def make_password(password): def make_password_own(password):
"""生成密码hash """生成密码hash
""" """
return make_password(password, None, 'pbkdf2_sha256') return make_password(password, None, 'pbkdf2_sha256')
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item style="margin-bottom: 40px;" label-width="75px" label="帖子内容:" prop="content"> <el-form-item style="margin-bottom: 40px;" label-width="75px" label="帖子内容:">
<el-input :rows="1" v-model="postForm.content" type="textarea" class="article-textarea" autosize <el-input :rows="1" v-model="postForm.content" type="textarea" class="article-textarea" autosize
placeholder="请输入内容"/> placeholder="请输入内容"/>
<span v-show="contentShortLength" class="word-counter">{{ contentShortLength }}</span> <span v-show="contentShortLength" class="word-counter">{{ contentShortLength }}</span>
...@@ -339,7 +339,6 @@ ...@@ -339,7 +339,6 @@
// 表单验证相关 // 表单验证相关
rules: { rules: {
posting_time: [{validator: validateRequire, trigger: 'blur'}], posting_time: [{validator: validateRequire, trigger: 'blur'}],
content: [{validator: validateRequire, trigger: 'blur'}]
}, },
ReplyTypeOptions: [ ReplyTypeOptions: [
......
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