|
@@ -6,22 +6,25 @@ use Dever;
|
|
|
|
|
|
class Data
|
|
class Data
|
|
{
|
|
{
|
|
- private function applet()
|
|
|
|
|
|
+ public function applet()
|
|
{
|
|
{
|
|
$host = Dever::config('base')->applet_content;
|
|
$host = Dever::config('base')->applet_content;
|
|
|
|
|
|
if ($host) {
|
|
if ($host) {
|
|
|
|
+ $uphost = $host . 'data.applet_wechat';
|
|
$host .= 'data.applet';
|
|
$host .= 'data.applet';
|
|
- $uphost .= 'data.applet_wechat';
|
|
|
|
|
|
|
|
- $data = Dever::curl($host);
|
|
|
|
|
|
+ $data = Dever::json_decode(Dever::curl($host));
|
|
|
|
|
|
if ($data) {
|
|
if ($data) {
|
|
|
|
+ $data = $data['data'];
|
|
foreach ($data as $k => $v) {
|
|
foreach ($data as $k => $v) {
|
|
$update = array();
|
|
$update = array();
|
|
$update['appid'] = $v['appid'];
|
|
$update['appid'] = $v['appid'];
|
|
$update['name'] = $v['name'];
|
|
$update['name'] = $v['name'];
|
|
$update['secret'] = $v['secret'];
|
|
$update['secret'] = $v['secret'];
|
|
|
|
+ $update['key'] = 'null';
|
|
|
|
+ $update['token'] = 'null';
|
|
$update['type'] = 3;
|
|
$update['type'] = 3;
|
|
|
|
|
|
$where = array();
|
|
$where = array();
|