|
@@ -0,0 +1,42 @@
|
|
|
+<?php
|
|
|
+/**
|
|
|
+ * 更新
|
|
|
+ */
|
|
|
+
|
|
|
+defined('InShopNC') or exit('Access Invalid!');
|
|
|
+
|
|
|
+class configControl extends mobileHomeControl
|
|
|
+{
|
|
|
+ public function __construct()
|
|
|
+ {
|
|
|
+ parent::__construct();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取配置文件
|
|
|
+ *
|
|
|
+ * 参数: platform 1:android 2:ios
|
|
|
+ */
|
|
|
+ public function getconfigOp()
|
|
|
+ {
|
|
|
+ $platform = trim($_GET['platform']);
|
|
|
+ $ver_code = trim($_GET['ver_code']);
|
|
|
+ if (!isset($platform) || empty($platform)) {
|
|
|
+ return joutput_error(errcode::ErrInputParam);
|
|
|
+ }
|
|
|
+ if (!isset($ver_code) || empty($ver_code)) {
|
|
|
+ return joutput_error(errcode::ErrInputParam);
|
|
|
+ }
|
|
|
+
|
|
|
+ $result = Model()->table('config')->select();
|
|
|
+ if (empty($result)) {
|
|
|
+ return joutput_error(errcode::ErrGetConfig);
|
|
|
+ } else {
|
|
|
+ $ret = array();
|
|
|
+ foreach ($result as $value) {
|
|
|
+ $ret[$value['name']] = array('value'=>$value['value']);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return joutput_data($ret);
|
|
|
+ }
|
|
|
+}
|