From e4db154794c40a5fdd6c2f3c90da08e92d3624f7 Mon Sep 17 00:00:00 2001 From: linfeng <2445465217@qq.com> Date: Wed, 14 Sep 2022 12:55:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/controller/AppLoginController.java | 8 +- src/main/resources/application.yml | 4 + .../linfeng-community-uniapp-ky/pages.json | 23 +- .../pages/post/add.vue | 15 +- .../pages/post/category.vue | 70 ++++++ .../pages/square/square.vue | 218 ++++++++++++++++++ 6 files changed, 333 insertions(+), 5 deletions(-) create mode 100644 src/main/resources/static/linfeng-community-uniapp-ky/pages/post/category.vue create mode 100644 src/main/resources/static/linfeng-community-uniapp-ky/pages/square/square.vue diff --git a/src/main/java/io/linfeng/modules/app/controller/AppLoginController.java b/src/main/java/io/linfeng/modules/app/controller/AppLoginController.java index 1a96f9f..8205cb3 100644 --- a/src/main/java/io/linfeng/modules/app/controller/AppLoginController.java +++ b/src/main/java/io/linfeng/modules/app/controller/AppLoginController.java @@ -25,6 +25,7 @@ import io.linfeng.modules.app.utils.JwtUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; @@ -49,11 +50,16 @@ public class AppLoginController { @Autowired private AppUserService appUserService; + @Value("${sms.open}") + private boolean isOpen; @PostMapping("/sendSmsCode") - @ApiOperation("发送验证码") + @ApiOperation("测试发送验证码") public R sendSmsCode(@RequestBody SendCodeForm param) { String code = appUserService.sendSmsCode(param); + if(isOpen){ + //TODO send Aliyun Sms code + } return R.ok("测试阶段验证码:" + code); } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 5f18c9a..bf25b95 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -90,3 +90,7 @@ qiniu: max-size: 30 admin-max-size: 5 +# 是否开启短信验证码 +sms: + open: false + diff --git a/src/main/resources/static/linfeng-community-uniapp-ky/pages.json b/src/main/resources/static/linfeng-community-uniapp-ky/pages.json index e85d66c..12cb863 100644 --- a/src/main/resources/static/linfeng-community-uniapp-ky/pages.json +++ b/src/main/resources/static/linfeng-community-uniapp-ky/pages.json @@ -97,6 +97,25 @@ "enablePullDownRefresh": false } + }, + { + "path" : "pages/square/square", + "style" : + { + + "enablePullDownRefresh": true, + "navigationStyle": "custom" + } + } + + ,{ + "path" : "pages/post/category", + "style" : + { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } + } ], "globalStyle": { @@ -117,10 +136,10 @@ "text": "主页" }, { - "pagePath": "pages/message/message", + "pagePath": "pages/square/square", "iconPath": "static/tabbar/msg-1.png", "selectedIconPath": "static/tabbar/msg.png", - "text": "消息" + "text": "广场" }, { "pagePath": "pages/user/user", diff --git a/src/main/resources/static/linfeng-community-uniapp-ky/pages/post/add.vue b/src/main/resources/static/linfeng-community-uniapp-ky/pages/post/add.vue index facace2..0f64530 100644 --- a/src/main/resources/static/linfeng-community-uniapp-ky/pages/post/add.vue +++ b/src/main/resources/static/linfeng-community-uniapp-ky/pages/post/add.vue @@ -15,6 +15,12 @@ :auto-upload="false" > + + + + {{ cateName || '选择分类' }} + + @@ -46,9 +52,10 @@ export default { longitude: 0, latitude: 0, address: '', - cut: 0, + cut: 0,//分类id pay: '', }, + cateName:'', header: { token: uni.getStorageSync('token') }, @@ -60,7 +67,11 @@ export default { this.form.latitude = location.latitude; }, methods: { - + chooseClass(){ + uni.navigateTo({ + url:"category" + }) + }, uploadImg() { if (!this.form.content) { diff --git a/src/main/resources/static/linfeng-community-uniapp-ky/pages/post/category.vue b/src/main/resources/static/linfeng-community-uniapp-ky/pages/post/category.vue new file mode 100644 index 0000000..15ace73 --- /dev/null +++ b/src/main/resources/static/linfeng-community-uniapp-ky/pages/post/category.vue @@ -0,0 +1,70 @@ + + + + + + + diff --git a/src/main/resources/static/linfeng-community-uniapp-ky/pages/square/square.vue b/src/main/resources/static/linfeng-community-uniapp-ky/pages/square/square.vue new file mode 100644 index 0000000..5fd781f --- /dev/null +++ b/src/main/resources/static/linfeng-community-uniapp-ky/pages/square/square.vue @@ -0,0 +1,218 @@ + + + + +