-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1706121
commit 44b1576
Showing
23 changed files
with
138 additions
and
52 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file modified
BIN
-15 Bytes
(96%)
backend/controller/__pycache__/user_info_controller.cpython-39.pyc
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from models import Tags | ||
from extension import db | ||
|
||
def generate_basic_tags(): | ||
|
||
|
||
tag_dict = { | ||
'Python': 'Python is a widely used high-level, general-purpose, interpreted, dynamic programming language.', | ||
'Flask': 'Flask is a micro web framework written in Python. It is classified as a microframework because it does not require particular tools or libraries.', | ||
'llvm': 'llvm is a compiler framework for c/c++ and other languages, it is used in programming language research and development, and it is also used in many open source projects, such as clang, gcc, and so on.', | ||
'c++': 'c++ is a programming language which is widely used in system programming, and it is a superset of c. It is a general-purpose programming language, and it is a middle-level language, which is compiled by a compiler', | ||
'java': 'java is a programming language which is widely used in web backend, and it is initaily in the style of c.It uses oop to develop software, and it is widely used in the development of android applications.', | ||
'javascript': 'javascript is a programming language which is widely used in web frontend, and it is initaily in the style of c.It uses oop to develop software, and it is widely used in the development of android applications.', | ||
|
||
} | ||
# add the dict into db | ||
for key, value in tag_dict.items(): | ||
tag = Tags(tag_name=key, tag_description=value) | ||
db.session.add(tag) | ||
db.session.commit() | ||
|
||
|
||
return True | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import imp | ||
|
||
|
||
from flask import jsonify | ||
from models import User | ||
|
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+2.19 KB
.../__pycache__/4b5314e82be5_.cpython-39.pyc → .../__pycache__/324a6969ab6b_.cpython-39.pyc
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<template> | ||
<div v-for="(item, index) in allTags" :key="index"> | ||
<el-card class="box-card"> | ||
<template #header> | ||
<span><el-tag size="large" class="font-setter-big" effect="light" >{{ item.tag_name }}</el-tag></span> | ||
</template> | ||
<div> | ||
<p class="card-body"> | ||
{{ item.tag_description }} | ||
</p> | ||
</div> | ||
|
||
|
||
</el-card> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
// set box-card style | ||
import {ref,reactive} from 'vue' | ||
import { ElMessage } from 'element-plus' | ||
import { getTags } from '../http/api'; | ||
import { all } from 'axios'; | ||
const allTags = ref([]) | ||
const data = reactive({ | ||
params: { | ||
username: sessionStorage.getItem('user_name') | ||
} | ||
}) | ||
getTags().then((res) => { | ||
allTags.value = res.data.tags | ||
console.log(allTags.value) | ||
}).catch((err) => { | ||
console.log(err) | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
.card-body{ | ||
/* 最多显示四排字 */ | ||
min-height: 102px; | ||
padding: 0; | ||
display: -webkit-box; | ||
-webkit-box-orient: vertical; | ||
-webkit-line-clamp: 4; | ||
overflow: hidden; | ||
} | ||
.font-setter-big{ | ||
font-size: 17px; | ||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | ||
} | ||
.box-card { | ||
width: 250px; | ||
} | ||
.card-header { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
.text { | ||
font-size: 14px; | ||
} | ||
.item { | ||
margin-bottom: 18px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters