Commit 4b680083 authored by daniel's avatar daniel

fix(demo): 比赛助手后台管理引入naive ui+vue3 加快开发效率

parent 40bbec20
package com.dlbridge.jadp.plugins.cmpt.web;
import com.dlbridge.jadp.common.interceptor.PageView;
import com.dlbridge.jadp.plugins.cmpt.dao.model.Cmpt;
import com.dlbridge.jadp.plugins.cmpt.service.CmptService;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import springfox.documentation.annotations.ApiIgnore;
import javax.annotation.Resource;
@RequestMapping(value = "/gk/demo/")
@RestController
@ApiIgnore
@Log4j2
public class DemoController {
@Resource
private CmptService cmptService;
@RequestMapping("index/{cmptId}")
@PageView
public ModelAndView index(@PathVariable("cmptId") Integer cmptId, ModelAndView mv) {
Cmpt cmpt = cmptService.queryCmptBycmptId(cmptId);
mv.setViewName("cmpt/demo");
mv.addObject("cmpt", cmpt);
return mv;
}
}
This diff is collapsed.
...@@ -572,7 +572,6 @@ ...@@ -572,7 +572,6 @@
layer.msg("AppId不能为空!", { icon: 5, duration: 1500 }); layer.msg("AppId不能为空!", { icon: 5, duration: 1500 });
return; return;
} }
console.log(this.letter.openType)
if (this.letter.openType == 0) { if (this.letter.openType == 0) {
this.letter.content = this.editor.getContent(); this.letter.content = this.editor.getContent();
} }
...@@ -582,7 +581,7 @@ ...@@ -582,7 +581,7 @@
} }
$.ajax({ $.ajax({
url: '/gk/sure-letter/updateName', url: '/gk/sure-letter/updateName',
data: JSON.stringify(this.letter), data: JSON.stringify({ ...this.letter, name: nameWeb }),
contentType: 'application/json', contentType: 'application/json',
type: 'post', type: 'post',
beforeSend: function () { beforeSend: function () {
...@@ -637,7 +636,7 @@ ...@@ -637,7 +636,7 @@
layer.msg('上传成功', { icon: 1, time: 1500 }); layer.msg('上传成功', { icon: 1, time: 1500 });
this.$forceUpdate(); // 强制更新视图 this.$forceUpdate(); // 强制更新视图
} else { } else {
layer.msg(res.msg, {icon: 2}); layer.msg(res.msg, { icon: 2 });
} }
}, },
beforeSend: () => { beforeSend: () => {
...@@ -685,7 +684,7 @@ ...@@ -685,7 +684,7 @@
$("#link").val(res.content) $("#link").val(res.content)
this.$forceUpdate(); // 强制更新视图 this.$forceUpdate(); // 强制更新视图
} else { } else {
layer.msg(res.msg, {icon: 2}); layer.msg(res.msg, { icon: 2 });
} }
}, },
beforeSend: () => { beforeSend: () => {
......
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