查看: 598|回复: 0

微擎云参数

[复制链接]

748

主题

39

回帖

3907

积分

管理员

总舵主

积分
3907
QQ
发表于 2024-5-25 20:13:25 | 显示全部楼层 |阅读模式
setting.html代码:
  1. {template 'common/header'}
  2. <div class="main">
  3.           <div class="alert alert-info" role="alert">参数设置说明:<br />
  4.                   <p>1、短信模板采用通用验证码模板,请在阿里云提交模板时复制下方引号内的短信模板内容到阿里云;短信签名需要是阿里云审核通过的签名;{$settings['key']}</p>
  5.               <p>2、短信模板内容:“您的验证码是:${code},5分钟内有效,请不要告诉其他人。”;</p>
  6.           </div>
  7.         <iframe src="{$iframe}" marginheight="0" marginwidth="0" frameborder="0" width="100%" style="height:900px;" scrolling="yes" allowTransparency="true"></iframe>
  8. </div>
  9.       
  10. {template 'common/footer'}
复制代码
module.php代码:
  1. <?php
  2. /**
  3. * wc_aliyun模块定义
  4. *
  5. * @author winchung
  6. * @url
  7. */
  8. defined('IN_IA') or exit('Access Denied');

  9. class Wc_aliyunModule extends WeModule {

  10.         public function settingsDisplay($settings) {
  11.                 global $_W, $_GPC;

  12.                 load()->classs('cloudapi');
  13.                 $api = new CloudApi(true);
  14.                 $iframe = $api->url('debug', 'settingsDisplay', array(
  15.                         'referer' => urlencode($_W['siteurl']),
  16.                         'version' => $this->module['version'],
  17.                         'v' => random(3),
  18.                 ), 'html');
  19.                 if (is_error($iframe)) {
  20.                         message($iframe['message'], '', 'error');
  21.                 }

  22.                 if($_W['ispost']) {
  23.                         $settings = $_GPC['setting'];
  24.                         $setting = $api->post('debug', 'saveSettings', array('setting' => $settings, 'version' => $this->module['version'], 'v' => random(3),), 'json');

  25.                         if (is_error($setting)) {
  26.                                 die("<script>alert('{$setting['message']}');location.href = '{$iframe}';</script>");
  27.                         }
  28.                  
  29.                         $this->saveSettings($settings);
  30.                         die("<script>location.href = '{$iframe}';</script>");
  31.                 }

  32.                 include $this->template('setting');
  33.         }

  34. }
复制代码
参数本地存储到ims_uni_account_modules表中,我们使用$this->module['config'][字段名]进行调用即可!
道不同,不相为谋!理想要有,万一实现了呢?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注公众号

相关侵权、举报、投诉及建议等,请发 E-mail:2513533699@qq.com

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.|鲁ICP备19000917号|鲁公网安备37078302000320号

在本版发帖
关注公众号
QQ客服返回顶部