|
@@ -235,7 +235,8 @@ public class SceneController extends BaseController {
|
|
|
}
|
|
|
|
|
|
model.put("summary", infoJson.get("summary"));
|
|
|
- model.put("camera_start", infoJson.getJSONObject("camera_start"));
|
|
|
+
|
|
|
+// model.put("camera_start", infoJson.getJSONObject("camera_start"));
|
|
|
|
|
|
if (guidesArray != null) {
|
|
|
model.put("images", guidesArray);
|
|
@@ -243,24 +244,20 @@ public class SceneController extends BaseController {
|
|
|
model.put("images", new JSONArray());
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ // camera_start放到最外层
|
|
|
+// someDataJson.put("camera_start", infoJson.getJSONObject("camera_start"));
|
|
|
}
|
|
|
|
|
|
// 更新someDataJson
|
|
|
someDataJson.put("model", model);
|
|
|
|
|
|
- // info信息除camera_start、hoticon, 其他字段都加到someDataJson最外层
|
|
|
+ // info信息添加到someDataJson最外层
|
|
|
Set<String> infoKey = infoJson.keySet();
|
|
|
for (String key : infoKey) {
|
|
|
-// if ("hoticon".equals(key) || "camera_start".equals(key)) {
|
|
|
-// continue;
|
|
|
-// }
|
|
|
+
|
|
|
someDataJson.put(key, infoJson.get(key));
|
|
|
}
|
|
|
|
|
|
-// someDataJson.put("loadlogo", infoJson.get("loadlogo"));
|
|
|
-// someDataJson.put("supportsVR", infoJson.getBoolean("supportsVR"));
|
|
|
-// someDataJson.put("backgroundMusic", infoJson.getString("backgroundMusic"));
|
|
|
|
|
|
// 删除旧someDataJson
|
|
|
FileUtil.del(someDataPath);
|
|
@@ -310,23 +307,7 @@ public class SceneController extends BaseController {
|
|
|
data2Json.put("overlays", new JSONArray());
|
|
|
}
|
|
|
|
|
|
- // host在data2.js、data.js都需要处理
|
|
|
- String hots = param.getHots();
|
|
|
- if (hots != null) {
|
|
|
- // 获取所有key
|
|
|
- JSONObject hotJson = JSONObject.parseObject(hots);
|
|
|
|
|
|
- Set<String> strings = hotJson.keySet();
|
|
|
- for (String key: strings) {
|
|
|
- JSONObject subJson = hotJson.getJSONObject(key);
|
|
|
- String url = "https://www.4dmodel.com/SuperTwo/hot_online/index.html?m=" + key;
|
|
|
- // 将link 添加进去
|
|
|
- subJson.put("link", url);
|
|
|
- }
|
|
|
- data2Json.put("hots", hotJson);
|
|
|
- } else {
|
|
|
- data2Json.put("hots", new JSONObject());
|
|
|
- }
|
|
|
|
|
|
// 处理guidesArray,将scan_id的值作为key, value: time":40000
|
|
|
JSONObject audioJson = new JSONObject();
|
|
@@ -360,6 +341,24 @@ public class SceneController extends BaseController {
|
|
|
|
|
|
// log.info("new datajs: " + data2Json.toJSONString());
|
|
|
|
|
|
+ // host在data2.js、data.js都需要处理
|
|
|
+ String hots = param.getHots();
|
|
|
+ if (hots != null) {
|
|
|
+ // 获取所有key
|
|
|
+ JSONObject hotJson = JSONObject.parseObject(hots);
|
|
|
+
|
|
|
+ Set<String> strings = hotJson.keySet();
|
|
|
+ for (String key: strings) {
|
|
|
+ JSONObject subJson = hotJson.getJSONObject(key);
|
|
|
+ String url = "https://www.4dmodel.com/SuperTwo/hot_online/index.html?m=" + key;
|
|
|
+ // 将link 添加进去
|
|
|
+ subJson.put("link", url);
|
|
|
+ }
|
|
|
+ data2Json.put("hots", hotJson);
|
|
|
+ } else {
|
|
|
+ data2Json.put("hots", new JSONObject());
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
// 删除旧data2.js
|
|
|
FileUtil.del(data2Path);
|