diff --git a/src/api/learn.js b/src/api/learn.js index ee6747731..92c237b01 100644 --- a/src/api/learn.js +++ b/src/api/learn.js @@ -16,3 +16,54 @@ export function answerPost(data) { data: data }); } +// 评论留言 +export function commentLevelMessage(messageId, data) { + return request({ + url: `/api/learn/${messageId}/comment`, + method: 'post', + data: data + }); +} +// 评论 留言的评论 +export function commentComents(messageId, commentId, data) { + return request({ + url: `/api/learn/${messageId}/${commentId}/comment`, + method: 'post', + data: data + }); +} +// 管理员删除留言 +export function deleteMessageByAdmin(messageId) { + return request({ + url: `/api/learn/${messageId}/deleteMessage/admin`, + method: 'delete' + }); +} +// 用户自己删除留言 +export function deleteMessageBySelf(messageId) { + return request({ + url: `/api/learn/${messageId}/deleteMessage/user`, + method: 'delete' + }); +} +// 查询留言的评论列表 +export function queryMessageCommentList(messageId) { + return request({ + url: `/api/learn/${messageId}/list`, + method: 'get' + }); +} +// 删除评论回复管理员 +export function deleteCommentByAdmin(commentId) { + return request({ + url: `/api/learn/${commentId}/deleteComment/admin`, + method: 'delete' + }); +} +// 删除评论回复用户 +export function deleteCommentBySelf(commentId) { + return request({ + url: `/api/learn/${commentId}/deleteComment/user`, + method: 'delete' + }); +} diff --git a/src/assets/delete.png b/src/assets/delete.png new file mode 100644 index 000000000..a5d3f42fa Binary files /dev/null and b/src/assets/delete.png differ diff --git a/src/assets/like.png b/src/assets/like.png new file mode 100644 index 000000000..d36ee6510 Binary files /dev/null and b/src/assets/like.png differ diff --git a/src/assets/reply.png b/src/assets/reply.png new file mode 100644 index 000000000..04215c4a0 Binary files /dev/null and b/src/assets/reply.png differ diff --git a/src/assets/unlike.png b/src/assets/unlike.png new file mode 100644 index 000000000..dddf99c85 Binary files /dev/null and b/src/assets/unlike.png differ diff --git a/src/components/QuillEditor/index.vue b/src/components/QuillEditor/index.vue index 12932f9d6..a5913a843 100644 --- a/src/components/QuillEditor/index.vue +++ b/src/components/QuillEditor/index.vue @@ -58,6 +58,7 @@ export default { return this.$refs.editor.quill; }, options() { + const that = this; return this.unloadImg ? { modules: { ImageExtend: { @@ -67,7 +68,9 @@ export default { action: `https://test.joylink.club/jlfile/api/upload/PICTURE?appId=00001&appSecret=joylink00001`, response: (res) => { return `https://test.joylink.club/oss/joylink${res.data}`; - } + }, + error: () => { that.$message.error('图片上传失败,请检查网络状态'); }, + sizeError: () => { that.$message.error('图片上传失败,图片大小限制3MB'); } // 图片超过大小的回调 }, toolbar: { container: [ diff --git a/src/jlmap3d/jl3dtrafficplan/connect/trainconnect.js b/src/jlmap3d/jl3dtrafficplan/connect/trainconnect.js index 76c00b3bc..5bf7b4fe1 100644 --- a/src/jlmap3d/jl3dtrafficplan/connect/trainconnect.js +++ b/src/jlmap3d/jl3dtrafficplan/connect/trainconnect.js @@ -31,13 +31,14 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe const data = JSON.parse(Response.body); - if(data.type != "TrainRun_3D"){ - console.log(data); + if(data.type == "TrainRun_3D"){ + trafficTrain.runList = data.body; + // console.log(data); } if(data.type == "BeAbout2Arrive_3D"){ if(toptrain.nowcode == data.body.groupNumber){ - console.log(data); + // console.log(data); } } @@ -68,8 +69,14 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe num:data.body[i].num, doorCode:1, open:0, + text:"", }; - trafficTrain.trainList.push(train); + if(data.body[i].num == "0"){ + train.text = data.body[i].code+"(无人)"; + }else{ + train.text = data.body[i].code+"(现有乘客"+data.body[i].num+"人)"; + } + trafficTrain.trainList[train.code] = train; } } diff --git a/src/jlmap3d/jl3dtrafficplan/jl3dtraffictrain.js b/src/jlmap3d/jl3dtrafficplan/jl3dtraffictrain.js index 8dcc04d9d..76eaca314 100644 --- a/src/jlmap3d/jl3dtrafficplan/jl3dtraffictrain.js +++ b/src/jlmap3d/jl3dtrafficplan/jl3dtraffictrain.js @@ -83,6 +83,7 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap) { this.humanInSpeed = 0; this.humanOutSpeed = 0; + this.runList = []; //定义相机 camerass = new THREE.PerspectiveCamera(70, dom.offsetWidth / dom.offsetHeight, 0.01, 1000); camerass.position.set(0, 80, 40); @@ -293,6 +294,10 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap) { return scope.trainList; } + this.getRunList = function(){ + return scope.runList; + } + let nowLeaveDoor = null; this.updatePasserMove = function(doorData){ nowLeaveDoor = doorData.doorCode; @@ -330,9 +335,9 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap) { passerTrain.toptrain.nowcode = newCode; scope.nowTrainCode = newCode; // console.log(scope.trainList); - for(let i=0;i=0;an--){ passerTrain.toptrain.action.top[an].reset(); passerTrain.toptrain.action.top[an].time = passerTrain.toptrain.action.top[an]._clip.duration; @@ -370,7 +375,8 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap) { } updateTrainNum(trainDataList); - i = scope.trainList.length; + break; + // i = scope.trainList.length; } } diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 54719f53d..c0569ef83 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -1,8 +1,8 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { - BASE_API = 'https://joylink.club/jlcloud'; - // BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'https://joylink.club/jlcloud'; + BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.8.107:9000'; // 袁琪 // BASE_API = 'http://192.168.8.129:9000'; // 旭强 // BASE_API = 'http://192.168.8.119:9000'; // 张赛 diff --git a/src/views/jlmap3d/trafficplan/jl3dtraffictrain.vue b/src/views/jlmap3d/trafficplan/jl3dtraffictrain.vue index b302f8229..ad00e8717 100644 --- a/src/views/jlmap3d/trafficplan/jl3dtraffictrain.vue +++ b/src/views/jlmap3d/trafficplan/jl3dtraffictrain.vue @@ -7,7 +7,7 @@ @@ -24,7 +24,8 @@
- 暂无评论 + 暂无留言
- + 清空 - 留言 - 返回 + 留言 + - 我要留言 -
+ 我要留言 + 退出留言板 +