Browse Source

移动端添加简易模式

fancy 5 years ago
parent
commit
4df21c90b2

+ 2 - 0
o2server/configSample/appStyle.json

@@ -1,10 +1,12 @@
 {
 {
   "indexType": "default",
   "indexType": "default",
   "indexPortal": "",
   "indexPortal": "",
+  "simpleMode": false,
   "nativeAppList": [],
   "nativeAppList": [],
   "images": [],
   "images": [],
   "###indexType": "首页展现类型,default是移动端原来的首页,portal是门户.###",
   "###indexType": "首页展现类型,default是移动端原来的首页,portal是门户.###",
   "###indexPortal": "门户首页.###",
   "###indexPortal": "门户首页.###",
+  "###simpleMode": "移动端简易模式.###",
   "###nativeAppList": "导航设置###",
   "###nativeAppList": "导航设置###",
   "###images": "图片设置.###"
   "###images": "图片设置.###"
 }
 }

+ 13 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/AppStyle.java

@@ -24,6 +24,7 @@ public class AppStyle extends ConfigObject {
 
 
 		this.indexType = INDEXTYPE_DEFAULT;
 		this.indexType = INDEXTYPE_DEFAULT;
 		this.indexPortal = "";
 		this.indexPortal = "";
+		this.simpleMode = false;
 
 
 	}
 	}
 
 
@@ -112,6 +113,9 @@ public class AppStyle extends ConfigObject {
 	@FieldDescribe("门户首页.")
 	@FieldDescribe("门户首页.")
 	private String indexPortal;
 	private String indexPortal;
 
 
+	@FieldDescribe("移动端简易模式")
+	private Boolean simpleMode;
+
 	@FieldDescribe("导航设置")
 	@FieldDescribe("导航设置")
 	private TreeSet<NativeApp> nativeAppList = new TreeSet<>();
 	private TreeSet<NativeApp> nativeAppList = new TreeSet<>();
 
 
@@ -126,6 +130,15 @@ public class AppStyle extends ConfigObject {
 		this.indexPortal = indexPortal;
 		this.indexPortal = indexPortal;
 	}
 	}
 
 
+
+	public Boolean getSimpleMode() {
+		return simpleMode;
+	}
+
+	public void setSimpleMode(Boolean simpleMode) {
+		this.simpleMode = simpleMode;
+	}
+
 	public static class Image extends GsonPropertyObject implements Comparable<Image> {
 	public static class Image extends GsonPropertyObject implements Comparable<Image> {
 
 
 		public static Image launch_logo() {
 		public static Image launch_logo() {

+ 1 - 1
o2web/source/x_component_Setting/Main.js

@@ -354,7 +354,7 @@ MWF.xApplication.Setting.MobileExplorer = new Class({
             checkData();
             checkData();
         }.bind(this));
         }.bind(this));
         this.actions.mobile_currentStyle(function(json){
         this.actions.mobile_currentStyle(function(json){
-            this.nativeData = {"indexType": json.data.indexType, "indexPortal": json.data.indexPortal, "nativeAppList": Array.clone(json.data.nativeAppList)};
+            this.nativeData = {"indexType": json.data.indexType, "indexPortal": json.data.indexPortal, "simpleMode": json.data.simpleMode, "nativeAppList": Array.clone(json.data.nativeAppList)};
             this.imagesData = {"images": Array.clone(json.data.images)};
             this.imagesData = {"images": Array.clone(json.data.images)};
             //this.indexData = {"indexType": json.data.indexType, "indexId": json.data.indexId};
             //this.indexData = {"indexType": json.data.indexType, "indexId": json.data.indexId};
             this.portalData = {"portalList": Array.clone(json.data.portalList)};
             this.portalData = {"portalList": Array.clone(json.data.portalList)};

+ 8 - 0
o2web/source/x_component_Setting/SettingMobile.js

@@ -82,6 +82,14 @@ MWF.xApplication.Setting.MobileModuleDocument = new Class({
             "options": options
             "options": options
         });
         });
 
 
+        //移动端简易模式
+        var simpleModeTitle = this.lp.mobile_module_simple_mode;
+        var simpleModeInfor = this.lp.mobile_module_simple_mode_infor;
+        new MWF.xApplication.Setting.Document.Check(this.explorer, this.node, {
+            "lp": {"title": simpleModeTitle, "infor": simpleModeInfor},
+            "data": {"key": "nativeData", "valueKey": "simpleMode", "notEmpty": false },
+            "value": this.explorer.nativeData.simpleMode
+        });
 
 
         this.explorer.nativeData.nativeAppList.each(function(app, i){
         this.explorer.nativeData.nativeAppList.each(function(app, i){
             var title = this.lp.mobile_module.replace("{name}", app.name);
             var title = this.lp.mobile_module.replace("{name}", app.name);

+ 3 - 0
o2web/source/x_component_Setting/lp/zh-cn.js

@@ -151,6 +151,9 @@ MWF.xApplication.Setting.LP = {
     "mobile_module": "{name}模块",
     "mobile_module": "{name}模块",
     "mobile_module_infor": "移动端是否开启{name}模块",
     "mobile_module_infor": "移动端是否开启{name}模块",
 
 
+    "mobile_module_simple_mode": "移动端简易模式",
+    "mobile_module_simple_mode_infor": "移动端开启简易模式后只显示首页和设置页面",
+
     "mobile_styleSetting": "移动端图标样式配置",
     "mobile_styleSetting": "移动端图标样式配置",
     "mobile_style": "{name}图片 ",
     "mobile_style": "{name}图片 ",
     "mobile_style_infor": "点击更换{name}图片",
     "mobile_style_infor": "点击更换{name}图片",