Skip to content

Commit

Permalink
Merge pull request #27 from Pleasurecruise/main
Browse files Browse the repository at this point in the history
fix: remove uni-file-picker
  • Loading branch information
Pleasurecruise authored Nov 12, 2024
2 parents 255b521 + 1c34397 commit b49a454
Show file tree
Hide file tree
Showing 15 changed files with 1,365 additions and 273 deletions.
70 changes: 70 additions & 0 deletions admin/directoryList.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
|-- undefined
|-- .env.development
|-- .env.production
|-- .eslintrc.cjs
|-- .gitignore
|-- index.html
|-- jsconfig.json
|-- package.json
|-- pnpm-lock.yaml
|-- qodana.yaml
|-- README.md
|-- vite.config.js
|-- .idea
| |-- .gitignore
| |-- admin.iml
| |-- modules.xml
| |-- UniappTool.xml
| |-- vcs.xml
| |-- workspace.xml
| |-- inspectionProfiles
| |-- Project_Default.xml
|-- .vscode
| |-- extensions.json
|-- public
| |-- favicon.ico
|-- src
|-- App.vue
|-- main.js
|-- style.css
|-- api
| |-- admin.js
| |-- comment.js
| |-- student.js
|-- assets
| |-- main.scss
| |-- carousel
| | |-- image1.jpg
| | |-- image2.jpg
| | |-- image3.jpg
| | |-- image4.jpg
| | |-- image5.jpg
| | |-- image6.jpg
| |-- logo
| |-- default.png
| |-- icon_logo.png
| |-- login_bg.png
| |-- logo.png
| |-- mini-logo.png
|-- components
| |-- HelloWorld.vue
|-- router
| |-- index.js
|-- store
| |-- admin.js
| |-- token.js
|-- utils
| |-- request.js
| |-- requestOptimize.js
|-- views
|-- Dashboard.vue
|-- Login.vue
|-- admin
| |-- addAdmin.vue
| |-- Admin.vue
|-- notice
| |-- Notice.vue
|-- student
| |-- Student.vue
|-- topic
|-- Topic.vue
330 changes: 330 additions & 0 deletions backend/directoryList.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,18 @@ private String getAccessToken() {
*/
@Override
public Student wxLogin(StudentLoginDTO studentLoginDTO) {
//获取openid
String openid = getOpenid(studentLoginDTO.getCode());
log.info("openid:{}", openid);
//判断当前用户是否为新用户,自动完成注册
if (openid == null) {
throw new LoginFailedException(MessageConstant.LOGIN_FAILED);
}
//返回用户对象
Student student = studentMapper.findByOpenid(openid);
//判断用户是否为空
if (student == null) {
student = Student.builder()
.openid(openid)
.username("飞天裤衩") // 设置默认用户名
.sex("1") // 设置默认性别
.avatar("https://yiming1234.oss-cn-beijing.aliyuncs.com/3af1ed64-c545-4250-8259-13d03f500db9.jpeg") // 设置默认头像
.username("飞天裤衩")
.sex("1")
.avatar("https://yiming1234.oss-cn-beijing.aliyuncs.com/default.jpg")
.createTime(LocalDateTime.now())
.build();
studentMapper.insert(student);
Expand Down Expand Up @@ -153,7 +149,7 @@ public Student update(StudentDTO studentDTO) {
// 更新学生信息
if (student != null) {

if (!student.getAvatar().equals(studentDTO.getAvatar())) {
if (!student.getAvatar().equals(studentDTO.getAvatar()) && !student.getAvatar().contains("default.jpg")) {
String objectName = student.getAvatar().substring(student.getAvatar().lastIndexOf("/") + 1);
aliOssUtil.delete(objectName);
}
Expand Down
10 changes: 1 addition & 9 deletions backend/wall-server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ server:

spring:
profiles:
active: dev
active: prod
main:
allow-circular-references: true
mvc:
Expand All @@ -17,11 +17,9 @@ spring:
password: ${yiming1234.datasource.password}

mybatis:
#mapper配置文件
mapper-locations: classpath:mapper/*.xml
type-aliases-package: cn.yiming1234.NottinghamWall.entity, cn.yiming1234.NottinghamWall.dto
configuration:
#开启驼峰命名
map-underscore-to-camel-case: true

pagehelper:
Expand All @@ -45,17 +43,11 @@ logging:

yiming1234:
jwt:
# 设置jwt签名加密时使用的秘钥
admin-secret-key: itcast
# 设置jwt过期时间
admin-ttl: 7200000
# 设置前端传递过来的令牌名称
admin-token-name: token
# 设置jwt签名加密时使用的秘钥
user-secret-key: yiming1234
# 设置jwt过期时间
user-ttl: 7200000
# 设置前端传递过来的令牌名称
user-token-name: token
alioss:
endpoint: ${yiming1234.alioss.endpoint}
Expand Down
8 changes: 7 additions & 1 deletion docs/guide/admin/project-structure.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# 项目结构
# 项目结构

通过 mddir 生成的项目结构如下:

```
```
16 changes: 16 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 22 additions & 3 deletions uniapp/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b49a454

Please sign in to comment.