功能调整

sale
tianea 3 years ago
parent 8752ee98e7
commit a3d75dae91

@ -0,0 +1,8 @@
import request from '@/utils/request'
var baseUrl = "/pc/competition/note/"
export function getById(id){
return request({
url: baseUrl+"getById?id="+id,
method: 'get'
})
}

@ -201,6 +201,7 @@
</template>
<script>
import * as competitionApi from '@/api/competition'
import * as noteApi from '@/api/note'
export default {
props:{
userInfo:{
@ -214,6 +215,10 @@ export default {
stageId: {
type: Number,
default: 0
},
date: {
type:String,
default: new Date().Format('yyyy-MM-dd')
}
},
created(){
@ -275,6 +280,12 @@ export default {
}
})
},
loadNote(){
noteApi.getById('').then(res=>{
if(res.code == 200){
this.note = res.data
}})
},
loadReport(){
},

@ -0,0 +1,12 @@
<template>
<div>
登录中...
</div>
</template>
<script>
export default {
created(){
console.log(this.$route)
}
}
</script>

@ -0,0 +1,20 @@
import request from '@/utils/request'
let baseUrl="/api/competition/note/"
export function add(data) {
return request({
url: baseUrl+'add',
method: 'post',
data: data
})
}
export function listDate() {
return request({
url: baseUrl+'listDate',
method: 'get'
})
}
export function getByDate(date){
return request({
url: baseUrl+"getByDate?date="+date
})
}

@ -0,0 +1,9 @@
import request from '@/utils/request'
let baseUrl = '/api/user/login/'
export function login(tk){
return request({
url: baseUrl+"zhiyun",
method: 'post',
data: {tk:tk}
})
}

@ -0,0 +1,24 @@
<template>
<div>
登录中...
</div>
</template>
<script>
import { login} from '@/api/zhiyun'
export default {
created(){
var tk = this.$route.query['token']
if(tk){
login(tk).then(res=>{
console.log(res)
if(res.code==200){
location.href = res.data['url']
}else{
alert(res.msg)
}
})
}
}
}
</script>

@ -0,0 +1,25 @@
package com.tz.platform.competitiion.pc;
import com.tz.platform.common.core.base.Result;
import com.tz.platform.common.core.tools.BeanUtils;
import com.tz.platform.competitiion.api.dto.NoteDTO;
import com.tz.platform.entity.MarketNote;
import com.tz.platform.repository.MarketNoteDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@RequestMapping(value = "/pc/competition/note")
public class MarketNotePcController {
@Autowired
private MarketNoteDao marketNoteDao;
@GetMapping("getById")
public Result<NoteDTO> getById(@RequestParam("id") String id){
MarketNote note = marketNoteDao.getById(id);
NoteDTO dto = BeanUtils.copyProperties(note,NoteDTO.class);
return Result.success(dto);
}
}
Loading…
Cancel
Save