Merge remote-tracking branch 'origin/main'
						commit
						8497f61842
					
				| 
						 | 
				
			
			@ -8,7 +8,7 @@ import VueRouter from "vue-router";
 | 
			
		|||
import router from "@/router/router";
 | 
			
		||||
import store from "@/store/store";
 | 
			
		||||
Vue.prototype.$axios=axios;
 | 
			
		||||
Vue.prototype.$httpUrl='http://192.168.56.147:8081';
 | 
			
		||||
Vue.prototype.$httpUrl='http://192.168.56.138:8081';
 | 
			
		||||
Vue.config.productionTip = false;
 | 
			
		||||
Vue.use(VueRouter)
 | 
			
		||||
Vue.use(ElementUI,{size:'small'});
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,10 +1,15 @@
 | 
			
		|||
package com.yc.wms.controller;
 | 
			
		||||
 | 
			
		||||
import com.yc.wms.model.MQTTResult;
 | 
			
		||||
import lombok.extern.slf4j.Slf4j;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
import com.yc.wms.model.User;
 | 
			
		||||
import com.yc.wms.until.Result;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.web.bind.annotation.RequestMapping;
 | 
			
		||||
 | 
			
		||||
import org.springframework.web.bind.annotation.RestController;
 | 
			
		||||
import org.springframework.http.HttpStatus;
 | 
			
		||||
import org.springframework.http.ResponseEntity;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * <p>
 | 
			
		||||
| 
						 | 
				
			
			@ -14,15 +19,21 @@ import org.springframework.web.bind.annotation.RestController;
 | 
			
		|||
 * @author wms
 | 
			
		||||
 * @since 2023-07-07
 | 
			
		||||
 */
 | 
			
		||||
@Slf4j
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/menu")
 | 
			
		||||
public class MenuController {
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询菜单
 | 
			
		||||
     * @param roleId
 | 
			
		||||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    @PostMapping("/login")
 | 
			
		||||
    public ResponseEntity<Object> login(@RequestBody User user) {
 | 
			
		||||
        System.out.println(""+user.username+"/"+user.password);
 | 
			
		||||
        log.error(""+user.username+"/"+user.password);
 | 
			
		||||
        //{
 | 
			
		||||
        //    "result": "allow" | "deny" | "ignore", // Default `"ignore"`
 | 
			
		||||
        //    "is_superuser": true | false // Default `false`
 | 
			
		||||
        //}
 | 
			
		||||
        MQTTResult mqttResult=new MQTTResult();
 | 
			
		||||
        return new ResponseEntity(mqttResult, HttpStatus.OK);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
package com.yc.wms.model;
 | 
			
		||||
 | 
			
		||||
public class MQTTResult {
 | 
			
		||||
    public String result="allow";  // "result": "allow" | "deny" | "ignore", // Default `"ignore"`
 | 
			
		||||
    public boolean is_superuser=true;//    "is_superuser": true | false // Default `false`
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
package com.yc.wms.model;
 | 
			
		||||
 | 
			
		||||
public class User {
 | 
			
		||||
    public String username;
 | 
			
		||||
    public String password;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue