1
This commit is contained in:
parent
1b42cf8172
commit
1167371abd
@ -50,7 +50,7 @@ public class BusiCategoryServiceImpl extends ServiceImpl<BusiCategoryMapper, Bus
|
||||
if (!StringUtils.isEmpty(category.getCatgName())) {
|
||||
lambdaQueryWrapper.like(BusiCategory::getCatgName, category.getCatgName());
|
||||
}
|
||||
lambdaQueryWrapper.orderByDesc(BusiCategory::getSort);
|
||||
lambdaQueryWrapper.orderByAsc(BusiCategory::getSort);
|
||||
List<BusiCategory> list = list(lambdaQueryWrapper);
|
||||
return buildCategoryTree(list);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
const websocket = {
|
||||
state: {
|
||||
websock:null,
|
||||
socket:null,
|
||||
message:[],
|
||||
count:"0",
|
||||
notice:[]
|
||||
@ -10,11 +10,12 @@ const websocket = {
|
||||
mutations: {
|
||||
WEBSOCKET_INIT(state,url){
|
||||
console.log(url);
|
||||
state.websock = new WebSocket(url);
|
||||
state.websock.onopen=function () {
|
||||
state.socket = new WebSocket(url);
|
||||
state.socket.onopen=function () {
|
||||
console.log("WebSocket连接成功");
|
||||
};
|
||||
state.websock.onmessage = function (e) {
|
||||
state.socket.onmessage = function (e) {
|
||||
console.log(e,'接受到消息')
|
||||
if (e.data.startsWith("C")) {
|
||||
state.count = e.data;
|
||||
|
||||
@ -24,23 +25,24 @@ const websocket = {
|
||||
console.log(state.notice);
|
||||
}
|
||||
else {
|
||||
console.log(e.data,'消息内容')
|
||||
state.message.push(JSON.parse(e.data));
|
||||
// console.log(state.message);
|
||||
}
|
||||
|
||||
};
|
||||
state.websock.onerror= function () {
|
||||
state.socket.onerror= function () {
|
||||
console.log("WebSocket连接发生错误");
|
||||
};
|
||||
state.websock.onclose = function (e) {
|
||||
state.socket.onclose = function (e) {
|
||||
console.log("connection closed (" + e.code + ")");
|
||||
};
|
||||
},
|
||||
WEBSOCKET_SEND(state,msg){
|
||||
state.websock.send(msg);
|
||||
state.socket.send(msg);
|
||||
},
|
||||
WEBSOCKET_CLOSE(state){
|
||||
state.websock.close();
|
||||
state.socket.close();
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user