|
|
@@ -22,6 +22,7 @@ import {
|
|
|
const CryptoJS = require("crypto-js");
|
|
|
const Order = require('../model/OrderModel')
|
|
|
const Server = require('../model/ServerModel')
|
|
|
+const System = require('../model/SystemModel')
|
|
|
const User = require('../model/UserModel')
|
|
|
const Version = require('../model/VersionModel')
|
|
|
const CDK = require("../model/CDK")
|
|
|
@@ -1146,19 +1147,46 @@ class ApiController {
|
|
|
platform = ctx.query.platform
|
|
|
}
|
|
|
|
|
|
- switch (platform) {
|
|
|
+ let content = ''
|
|
|
+ let content_wh = ''
|
|
|
+ const system = await System.getSystemConfig()
|
|
|
+
|
|
|
+ if(system){
|
|
|
+ system.forEach(element => {
|
|
|
+
|
|
|
+ if(element.key == 'content'){
|
|
|
+ content = element.value
|
|
|
+ }
|
|
|
+
|
|
|
+ if(element.key == 'content_wh'){
|
|
|
+ content_wh = element.value
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ let notice_data = {
|
|
|
+ status : 1,
|
|
|
+ content: content,
|
|
|
+ content_wh:content_wh
|
|
|
+ }
|
|
|
+
|
|
|
+ if(notice_data.content == ''){
|
|
|
+ switch (platform) {
|
|
|
case 'th':
|
|
|
- ctx.body = th_notice
|
|
|
+ notice_data = th_notice
|
|
|
break;
|
|
|
case '360':
|
|
|
- ctx.body = notice
|
|
|
+ notice_data = notice
|
|
|
break;
|
|
|
case 'xky':
|
|
|
- ctx.body = xky_notice
|
|
|
+ notice_data = xky_notice
|
|
|
break;
|
|
|
default:
|
|
|
- ctx.body = notice
|
|
|
+ notice_data = notice
|
|
|
+ }
|
|
|
}
|
|
|
+ ctx.body = notice_data
|
|
|
}
|
|
|
|
|
|
|