企业微信服务商
当前位置:首页文档模板语法渠道申请语法说明

渠道申请语法说明

更新时间:2019-12-10
一、请求地址:
/addchannel.html
二、 提交的字段:
  • 必填: 渠道分类(cateid)、渠道范围(channelid)、组织名称(title)、昵称(nickname)
  • 非必填: 电话(mobile)、邮箱(email)
注:渠道申请字段暂时不可自定义添加
使用示例:
<form action="/addchannel.html" method="post"> 
  分类ID:<input type="text" name="cateid" placeholder="请输入分类id"><br> 
  渠道范围ID:<input type="text" name="channelid" placeholder="请输入渠道范围id"><br> 
  组织名:<input type="text" name="title" placeholder="请输入组织名"><br> 
  称呼:<input type="text" name="nickname" placeholder="请输入称呼"><br> 
  电话:<input type="text" name="mobile" placeholder="请输入电话"><br> 
  邮箱:<input type="text" name="email" placeholder="请输入邮箱地址"><br> 
  <input type="hidden" name="id" value="{{Pageinfo['_id']}}"><br> 
  <input type="hidden" name="moduletype" value="{{globalviewdata['model']}}"><br> 
  <input type="hidden" name="basetype" value="{{globalviewdata['basetype']}}"> 
  <div>
  <label>完成验证:</label> 
  <div class="captcha">
  <div class="text">行为验证™ 安全组件加载中</div> 
  <div class="show  wait"><div class="loading"><div class="loading-dot"></div>          
  <div class="loading-dot"></div>   
  <div class="loading-dot"></div>    
  <div class="loading-dot"></div>       
</div>       
</div>
</div>
</div>
<input type="submit" value="提交"></form>
<script src="//static.westarcloud.com/test/5c048df6a8497e03aa0665a0/js/jquery1.11.3.min.js"></script>
<script src="https://www.geetest.com/demo/libs/gt.js"></script>
<script>
 function geTest(ele) {
 this.handler = function (captchaObj) {
 captchaObj.appendTo(ele);
 captchaObj.onReady(function () {
 $(".wait").hide();
 });
 $('.send').click(function (e) {
 e.preventDefault();
 let result = captchaObj.getValidate();
 if (!result) {
 return alert('请完成验证');
 };
 });
 window.gt = captchaObj;
 };
 var that=this;
 this.init = function () {
 $.ajax({
 url: "/front/interface/geetest?t=" + (new Date()).getTime(), // 加随机数防止缓存
 type: "get",
 dataType: "json",
 success: function (data) {
 $('.text').hide();
 $('.wait').show();
 initGeetest({
 gt: data.gt,
 challenge: data.challenge,
 offline: !data.success, // 表示用户后台检测极验服务器是否宕机
 new_captcha: data.new_captcha, // 用于宕机时表示是新验证码的宕机
 product: "float", // 产品形式,包括:float,popup
 width: "300px"
 }, that.handler);
 }
 });
 }
 }
new geTest('.captcha').init();
</script>