post_trim($_POST); $str = str_replace("\r\n", '', $_POST['sy_privateKey']); $baidu = array( 'sy_appKey' => $_POST['sy_appKey'], 'sy_dealId' => $_POST['sy_dealId'], 'sy_privateKey' => str_replace(PHP_EOL, '', $str), 'sy_publicKey' => $_POST['sy_publicKey'], 'sy_baidu_iospay' => isset($_POST['sy_baidu_iospay']) ? 1 : 2 ); foreach ($baidu as $v) { if (empty($v)) { $this->ACT_layer_msg('请将参数配置齐', 8); } } $baidu['sy_bdlogin_appKey'] = $_POST['sy_bdlogin_appKey']; $baidu['sy_bdlogin_appSecret'] = $_POST['sy_bdlogin_appSecret']; made_web(DATA_PATH . 'api/baidu/baidu_data.php', ArrayToString($baidu), 'baiduData'); unset($baidu['sy_weburl']); $configM = $this->MODEL('config'); $configM->setConfig($baidu); $this->web_config(); $this->ACT_layer_msg('百度小程序配置成功!', 9, $_SERVER['HTTP_REFERER'], 2, 1); } @include(DATA_PATH . 'api/baidu/baidu_data.php'); if (isset($baiduData)) { $this->yunset('baiduData', $baiduData); } $this->yuntpl(array('admin/admin_xcx_baidu')); } function makeCache_action() { $wxAppM = $this->MODEL('wxapp'); $wxAppM->makeBaiduCache(); } } ?>