Commit 17c0bcd2 by 陶光胜

二维码

parent 3f2b7302
......@@ -6,4 +6,6 @@ public interface CustomThemeApiService {
ServiceResponse<Integer> saveTheme(Integer enterpriseId, String appid, Integer theme, Integer type);
ServiceResponse<Integer> getTheme(Integer enterpriseId, String appid);
ServiceResponse<String> getTheme(Integer theme);
}
......@@ -99,17 +99,17 @@ public class CustomGuideApiServiceImpl implements CustomGuideApiService {
return ServiceResponse.success();
}
Integer theme = this.customThemeService.getTheme(enterpriseId, appid);
String themeStr = "black-blue-theme";
String themeStr = "black-blue";
if (theme == 1) {
themeStr = "black-blue-theme";
themeStr = "black-blue";
} else if(theme == 2){
themeStr = "black-golden-theme";
themeStr = "red";
} else if(theme == 3){
themeStr = "dark-green-theme";
themeStr = "black-golden";
} else if(theme == 4){
themeStr = "tint-green-theme";
themeStr = "dark_green";
} else {
themeStr = "red-theme";
themeStr = "tint_green";
}
// networkTimeout
Map<String, Object> networkTimeoutMap = new HashMap<String, Object>();
......@@ -119,12 +119,16 @@ public class CustomGuideApiServiceImpl implements CustomGuideApiService {
// tabBar
List<Map<String, Object>> tabBarList = new ArrayList<>();
Set<String> pathSet = new HashSet<String>() ;
String iconPath = "/images/footbar/"+themeStr;
for (int i = 0; i < guideList.size(); i++) {
TabCustomGuide guide = guideList.get(i);
String title = guide.getTitle();
Map<String, Object> listMap = new HashMap<String, Object>();
listMap.put("selectedIconPath", guide.getSelectedIconPath());
listMap.put("iconPath", guide.getIconPath());
JSONObject jsonObject = JSON.parseObject(guide.getIcon());
String selectIconPath = iconPath + jsonObject.getString("type")+ jsonObject.getString("name")+"-active.png";
String unIconPath = iconPath + jsonObject.getString("type")+ jsonObject.getString("name")+".png";
listMap.put("selectedIconPath", selectIconPath);
listMap.put("iconPath", unIconPath);
listMap.put("pagePath", guide.getCustomPage());
pathSet.add(guide.getCustomPage()) ;
listMap.put("text", title);
......
package com.gic.enterprise.service.outer.impl;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.enterprise.constant.ThemeEnum;
import com.gic.enterprise.service.CustomThemeApiService;
import com.gic.enterprise.service.CustomThemeService;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -22,4 +23,16 @@ public class CustomThemeApiServiceImpl implements CustomThemeApiService {
Integer theme = this.customThemeService.getTheme(enterpriseId, appid);
return ServiceResponse.success(theme);
}
@Override
public ServiceResponse<String> getTheme(Integer theme) {
ThemeEnum[] values = ThemeEnum.values();
String themeStr = "black-blue";
for(ThemeEnum themeEnum : values){
if(themeEnum.getCode().intValue() == theme.intValue()){
themeStr = themeEnum.getMsg();
}
}
return ServiceResponse.success(themeStr);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment