调整全局配置接口
This commit is contained in:
parent
15e20646c2
commit
d018ffb2d0
|
|
@ -6,6 +6,7 @@ import com.mdd.front.service.IUserService;
|
||||||
import com.mdd.front.vo.user.UserCenterVo;
|
import com.mdd.front.vo.user.UserCenterVo;
|
||||||
import com.mdd.front.vo.user.UserInfoVo;
|
import com.mdd.front.vo.user.UserInfoVo;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
|
@ -43,13 +44,24 @@ public class UserController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 政策协议
|
* 绑定手机号
|
||||||
*
|
*
|
||||||
* @author fzr
|
* @author fzr
|
||||||
* @return Object
|
* @return Object
|
||||||
*/
|
*/
|
||||||
@GetMapping("/agreement")
|
@PostMapping("/bindMobile")
|
||||||
public Object agreement() {
|
public Object bindMobile() {
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 微信手机号
|
||||||
|
*
|
||||||
|
* @author fzr
|
||||||
|
* @return Object
|
||||||
|
*/
|
||||||
|
@PostMapping("/mnpMobile")
|
||||||
|
public Object mnpMobile() {
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import com.mdd.common.entity.setting.HotSearch;
|
||||||
import com.mdd.common.mapper.decorate.DecoratePageMapper;
|
import com.mdd.common.mapper.decorate.DecoratePageMapper;
|
||||||
import com.mdd.common.mapper.decorate.DecorateTabbarMapper;
|
import com.mdd.common.mapper.decorate.DecorateTabbarMapper;
|
||||||
import com.mdd.common.mapper.setting.HotSearchMapper;
|
import com.mdd.common.mapper.setting.HotSearchMapper;
|
||||||
|
import com.mdd.common.utils.ArrayUtil;
|
||||||
import com.mdd.common.utils.ConfigUtil;
|
import com.mdd.common.utils.ConfigUtil;
|
||||||
import com.mdd.common.utils.ToolsUtil;
|
import com.mdd.common.utils.ToolsUtil;
|
||||||
import com.mdd.common.utils.UrlUtil;
|
import com.mdd.common.utils.UrlUtil;
|
||||||
|
|
@ -84,6 +85,7 @@ public class IndexServiceImpl implements IIndexService {
|
||||||
public Map<String, Object> config() {
|
public Map<String, Object> config() {
|
||||||
Map<String, Object> response = new LinkedHashMap<>();
|
Map<String, Object> response = new LinkedHashMap<>();
|
||||||
|
|
||||||
|
// 底部导航
|
||||||
List<Map<String, String>> tabs = new LinkedList<>();
|
List<Map<String, String>> tabs = new LinkedList<>();
|
||||||
List<DecorateTabbar> decorateTabbars = decorateTabbarMapper.selectList(new QueryWrapper<DecorateTabbar>().orderByAsc("id"));
|
List<DecorateTabbar> decorateTabbars = decorateTabbarMapper.selectList(new QueryWrapper<DecorateTabbar>().orderByAsc("id"));
|
||||||
for (DecorateTabbar tab: decorateTabbars) {
|
for (DecorateTabbar tab: decorateTabbars) {
|
||||||
|
|
@ -95,10 +97,31 @@ public class IndexServiceImpl implements IIndexService {
|
||||||
tabs.add(map);
|
tabs.add(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 导航颜色
|
||||||
String tabbarStyle = ConfigUtil.get("tabbar", "style", "{}");
|
String tabbarStyle = ConfigUtil.get("tabbar", "style", "{}");
|
||||||
|
|
||||||
|
// 登录配置
|
||||||
|
Map<String, Object> loginMap = new LinkedHashMap<>();
|
||||||
|
Map<String, String> loginConfig = ConfigUtil.get("login");
|
||||||
|
loginMap.put("loginWay", ArrayUtil.stringToListAsInt(loginConfig.getOrDefault("loginWay", ""), ","));
|
||||||
|
loginMap.put("forceBindMobile", Integer.parseInt(loginConfig.getOrDefault("forceBindMobile", "0")));
|
||||||
|
loginMap.put("openAgreement", Integer.parseInt(loginConfig.getOrDefault("openAgreement", "0")));
|
||||||
|
loginMap.put("openOtherAuth", Integer.parseInt(loginConfig.getOrDefault("openOtherAuth", "0")));
|
||||||
|
loginMap.put("autoLoginAuth", ArrayUtil.stringToListAsInt(loginConfig.getOrDefault("autoLoginAuth", ""), ","));
|
||||||
|
|
||||||
|
// 网址信息
|
||||||
|
Map<String, Object> websiteMap = new LinkedHashMap<>();
|
||||||
|
Map<String, String> websiteConfig = ConfigUtil.get("website");
|
||||||
|
websiteMap.put("name", websiteConfig.getOrDefault("name", "LikeAdmin"));
|
||||||
|
websiteMap.put("logo", UrlUtil.toAbsoluteUrl(websiteConfig.getOrDefault("logo", "")));
|
||||||
|
websiteMap.put("favicon", UrlUtil.toAbsoluteUrl(websiteConfig.getOrDefault("favicon", "")));
|
||||||
|
|
||||||
|
// 响应数据
|
||||||
response.put("domain", UrlUtil.domain());
|
response.put("domain", UrlUtil.domain());
|
||||||
response.put("style", ToolsUtil.jsonToMap(tabbarStyle));
|
response.put("style", ToolsUtil.jsonToMap(tabbarStyle));
|
||||||
response.put("tabbar", tabs);
|
response.put("tabbar", tabs);
|
||||||
|
response.put("login", loginMap);
|
||||||
|
response.put("website", websiteMap);
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue