12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace Main\Src;
- use Dever;
- class Data
- {
- private function applet()
- {
- $host = Dever::config('base')->applet_content;
- if ($host) {
- $host .= 'data.applet';
- $uphost .= 'data.applet_wechat';
- $data = Dever::curl($host);
- if ($data) {
- foreach ($data as $k => $v) {
- $update = array();
- $update['appid'] = $v['appid'];
- $update['name'] = $v['name'];
- $update['secret'] = $v['secret'];
- $update['type'] = 3;
- $where = array();
- $where['option_appid'] = $v['appid'];
- $where['option_type'] = $update['type'];
- $id = Dever::upinto('main/project', $where, $update);
- if ($id > 0) {
- Dever::curl($uphost, array('id' => $v['id'], 'wechat_project_id' => $id));
- }
- }
- }
- }
- }
- }
|