[更新]添加国际短信支持

This commit is contained in:
Anyon 2019-07-18 10:36:30 +08:00
parent 5fb2bee54a
commit 71e4ccc7f9
4 changed files with 54 additions and 4 deletions

View File

@ -15,6 +15,7 @@
namespace app\store\controller;
use app\store\service\Extend;
use app\store\service\ExtendService;
use library\Controller;
@ -38,6 +39,7 @@ class Config extends Controller
$this->title = '商城参数配置';
$this->applyCsrfToken('save');
$this->query = ExtendService::querySmsBalance();
$this->query2 = ExtendService::querySmsBalance2();
$this->fetch();
}

View File

@ -0,0 +1,46 @@
<form onsubmit="return false;" data-auto="true" action="{:url('save')}" method="post" class='layui-form layui-card' autocomplete="off">
<div class="layui-card-body padding-40">
<label class="layui-form-item block relative">
<span class="color-green margin-right-10">接口查询状态</span><span class="nowrap color-desc">UserState</span>
{if empty($query2.code)}
<p class="layui-input layui-bg-gray color-red">{$query2.msg|default=''}</p>
{elseif $query2.code eq 1}
<p class="layui-input layui-bg-gray color-green">平台剩余 {$query2.num|default=0} 元可用余额,{$query2.msg|default=''}</p>
{else}
<p class="layui-input layui-bg-gray color-text">没有结果</p>
{/if}
</label>
<label class="layui-form-item margin-top-20 block relative">
<span class="color-green margin-right-10">短信平台账号</span><span class="nowrap color-desc">Username</span>
<input name="sms_zt_username2" required placeholder="请输入助通短信平台账号" value="{:sysconf('sms_zt_username2')}" class="layui-input">
<p class="help-block">助通短信平台账号可以联系18122377655获取账号与密码</p>
</label>
<label class="layui-form-item margin-top-20 block relative">
<span class="color-green margin-right-10">短信平台密码</span><span class="nowrap color-desc">Password</span>
<input name="sms_zt_password2" required placeholder="请输入助通短信平台密码" value="{:sysconf('sms_zt_password2')}" class="layui-input">
<p class="help-block">助通短信平台账号可以联系18122377655获取账号与密码</p>
</label>
<label class="layui-form-item margin-top-20 block relative">
<span class="color-green margin-right-10">短信发送安全码</span><span class="nowrap color-desc">Secure</span>
<input name="sms_secure2" required placeholder="请输入短信发送安全码" value="{:sysconf('sms_secure2')}" class="layui-input">
<p class="help-block">短信发送安全码,调用接口发短信时需要传入此参数</p>
</label>
<label class="layui-form-item margin-top-20 block relative">
<span class="color-green margin-right-10">注册短信模板</span><span class="nowrap color-desc">Template</span>
<textarea class="layui-textarea" required name="sms_reg_template2" placeholder="请输入助通短信平台密码">{:sysconf('sms_reg_template2')}</textarea>
<p class="help-block">会员注册短信模板,验证码变量使用 {code} 代替</p>
</label>
<div class="layui-form-item text-center margin-top-20">
<button class="layui-btn" type="submit">保存配置</button>
</div>
</div>
</form>

View File

@ -2,14 +2,16 @@
{block name="content"}
<div class="layui-tab layui-tab-card" style="background:#fff">
<div class="layui-tab layui-tab-card think-bg-white">
<ul class="layui-tab-title notselect">
<li data-type='store-config-type-params'>商城参数设置</li>
<li data-type="store-config-type-sms">商城短信设置</li>
<li data-type="store-config-type-sms1">国内短信设置</li>
<li data-type="store-config-type-sms2">国际短信设置</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item">{include file='config/index-store-config'}</div>
<div class="layui-tab-item">{include file='config/index-store-message'}</div>
<div class="layui-tab-item">{include file='config/index-store-message1'}</div>
<div class="layui-tab-item">{include file='config/index-store-message2'}</div>
</div>
</div>