Commit 5d148272 authored by Davve's avatar Davve

修改用户ID生成规则

parent 9c5964d7
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
import json import json
from django.conf import settings from django.conf import settings
from utils.base import APIView from utils.base import APIView
from utils.time_utils import generate_id
from django.contrib.auth.hashers import make_password from django.contrib.auth.hashers import make_password
...@@ -39,8 +38,7 @@ class UserUpdateOrCreate(APIView): ...@@ -39,8 +38,7 @@ class UserUpdateOrCreate(APIView):
user_id = request.POST.get('user_id', '') user_id = request.POST.get('user_id', '')
tag_ids = list(map(lambda x: x.split(":")[0], json.loads(request.POST.get('tags', '[]')))) tag_ids = list(map(lambda x: x.split(":")[0], json.loads(request.POST.get('tags', '[]'))))
password = make_password(settings.PUPPET_PASSWORD, None, 'pbkdf2_sha256') password = make_password(settings.PUPPET_PASSWORD, None, 'pbkdf2_sha256')
if not user_id:
user_id = generate_id()
data = { data = {
'user_id': user_id, 'user_id': user_id,
'password': password, 'password': password,
......
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
placeholder="请输入内容"/> placeholder="请输入内容"/>
<span v-show="contentShortLength" class="word-counter">{{ contentShortLength }}</span> <span v-show="contentShortLength" class="word-counter">{{ contentShortLength }}</span>
</el-form-item> </el-form-item>
<el-form-item style="margin-bottom: 40px;" label-width="45px" label="是否在线:"> <el-form-item style="margin-bottom: 40px;" label-width="75px" label="是否在线:">
<el-radio-group v-model="postForm.is_online"> <el-radio-group v-model="postForm.is_online">
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
...@@ -152,8 +152,8 @@ ...@@ -152,8 +152,8 @@
<!--<el-button v-waves class="filter-item" type="primary" icon="el-icon-edit" @click="append">添加--> <!--<el-button v-waves class="filter-item" type="primary" icon="el-icon-edit" @click="append">添加-->
<!--</el-button>--> <!--</el-button>-->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-delete" @click="del">移除 <!--<el-button v-waves class="filter-item" type="primary" icon="el-icon-delete" @click="del">移除-->
</el-button> <!--</el-button>-->
</div> </div>
<el-table :data="data" border fit highlight-current-row style="width: 100%" <el-table :data="data" border fit highlight-current-row style="width: 100%"
ref="multipleTable" @selection-change="handleSelectionChange"> ref="multipleTable" @selection-change="handleSelectionChange">
...@@ -224,8 +224,8 @@ ...@@ -224,8 +224,8 @@
<!--<el-button v-waves class="filter-item" type="primary" icon="el-icon-edit" @click="append">添加--> <!--<el-button v-waves class="filter-item" type="primary" icon="el-icon-edit" @click="append">添加-->
<!--</el-button>--> <!--</el-button>-->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-delete" @click="del">移除 <!--<el-button v-waves class="filter-item" type="primary" icon="el-icon-delete" @click="del">移除-->
</el-button> <!--</el-button>-->
</div> </div>
......
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