mobile.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. {include file="public/header" /}
  2. <div class="page">
  3. <div class="fixed-bar">
  4. <div class="item-title">
  5. <div class="subject">
  6. <h3>{$Think.lang.ds_message}</h3>
  7. <h5></h5>
  8. </div>
  9. {include file="public/admin_items" /}
  10. </div>
  11. </div>
  12. <form method="post">
  13. <table class="ds-default-table">
  14. <tbody>
  15. <tr>
  16. <td class="required w120">{$Think.lang.smscf_sign}</td>
  17. <td class="vatop rowform">
  18. <input type="text" name="smscf_sign" id="smscf_sign" value="{$list_config.smscf_sign}" class="w200"/>
  19. </td>
  20. <td class="vatop tips">{$Think.lang.smscf_sign_tips}</td>
  21. </tr>
  22. <tr>
  23. <td class="required w120">{$Think.lang.smscf_type}</td>
  24. <td class="vatop rowform">
  25. <select id="smscf_type" name="smscf_type">
  26. <option value="wj" {if $list_config.smscf_type=='wj'}selected{/if}>{$Think.lang.smscf_type_wj}</option>
  27. <option value="ali" {if $list_config.smscf_type=='ali'}selected{/if}>{$Think.lang.smscf_type_ali}</option>
  28. <option value="ten" {if $list_config.smscf_type=='ten'}selected{/if}>{$Think.lang.smscf_type_ten}</option>
  29. </select>
  30. </td>
  31. <td class="vatop tips"></td>
  32. </tr>
  33. <tr class="noborder smscf_type_wj" {if $list_config.smscf_type!='wj'}style="display:none"{/if}>
  34. <td class="required w120">{$Think.lang.smscf_wj_username}</td>
  35. <td class="vatop rowform">
  36. <input type="text" name="smscf_wj_username" id="smscf_wj_username" value="{$list_config.smscf_wj_username}" class="w200"/>
  37. </td>
  38. <td class="vatop tips"></td>
  39. </tr>
  40. <tr class="noborder smscf_type_wj" {if $list_config.smscf_type!='wj'}style="display:none"{/if}>
  41. <td class="required w120">{$Think.lang.smscf_wj_key}</td>
  42. <td class="vatop rowform">
  43. <input type="text" name="smscf_wj_key" id="smscf_wj_key" value="{$list_config.smscf_wj_key}" class="w200"/>
  44. <a href="http://sms.webchinese.com.cn/" target="_blank" class="btn btn-blue btn-mini">{$Think.lang.ds_apply}</a>
  45. </td>
  46. <td class="vatop tips"></td>
  47. </tr>
  48. {notempty name='smscf_num'}
  49. <tr class="noborder">
  50. <td class="required w120">{$Think.lang.smscf_num}</td>
  51. <td>{$smscf_num}</td>
  52. <td class="vatop tips"></td>
  53. </tr>
  54. {/notempty}
  55. <tr class="noborder smscf_type_ali" {if $list_config.smscf_type!='ali'}style="display:none"{/if}>
  56. <td class="required w120">{$Think.lang.smscf_ali_id}</td>
  57. <td class="vatop rowform">
  58. <input type="text" name="smscf_ali_id" id="smscf_ali_id" value="{$list_config.smscf_ali_id}" class="w200"/>
  59. <a href="https://www.aliyun.com/product/sms" target="_blank" class="btn btn-blue btn-mini">{$Think.lang.ds_apply}</a>
  60. </td>
  61. <td class="vatop tips"></td>
  62. </tr>
  63. <tr class="noborder smscf_type_ali" {if $list_config.smscf_type!='ali'}style="display:none"{/if}>
  64. <td class="required w120">{$Think.lang.smscf_ali_secret}</td>
  65. <td class="vatop rowform">
  66. <input type="text" name="smscf_ali_secret" id="smscf_ali_secret" value="{$list_config.smscf_ali_secret}" class="w200"/>
  67. </td>
  68. <td class="vatop tips"></td>
  69. </tr>
  70. <tr class="noborder smscf_type_ten" {if $list_config.smscf_type!='ten'}style="display:none"{/if}>
  71. <td class="required w120">{$Think.lang.smscf_ten_id}</td>
  72. <td class="vatop rowform">
  73. <input type="text" name="smscf_ten_id" id="smscf_ten_id" value="{$list_config.smscf_ten_id}" class="w200"/>
  74. <a href="https://cloud.tencent.com/product/sms" target="_blank" class="btn btn-blue btn-mini">{$Think.lang.ds_apply}</a>
  75. </td>
  76. <td class="vatop tips"></td>
  77. </tr>
  78. <tr class="noborder smscf_type_ten" {if $list_config.smscf_type!='ten'}style="display:none"{/if}>
  79. <td class="required w120">{$Think.lang.smscf_ten_secret}</td>
  80. <td class="vatop rowform">
  81. <input type="text" name="smscf_ten_secret" id="smscf_ten_secret" value="{$list_config.smscf_ten_secret}" class="w200"/>
  82. </td>
  83. <td class="vatop tips"></td>
  84. </tr>
  85. <tr class="noborder">
  86. <td class="required w120">{$Think.lang.sms_register}</td>
  87. <td class="vatop rowform">
  88. <div class="onoff">
  89. <label for="sms_register_show1" class="cb-enable {if condition="$list_config.sms_register eq 1"}selected{/if}">{$Think.lang.ds_yes}</label>
  90. <label for="sms_register_show0" class="cb-disable {if condition="$list_config.sms_register eq 0"}selected{/if}">{$Think.lang.ds_no}</label>
  91. <input id="sms_register_show1" name="sms_register" value="1" type="radio" {if condition="$list_config.sms_register eq 1"} checked="checked"{/if}>
  92. <input id="sms_register_show0" name="sms_register" value="0" type="radio" {if condition="$list_config.sms_register eq 0"} checked="checked"{/if}>
  93. </div>
  94. </td>
  95. <td class="vatop tips"></td>
  96. </tr>
  97. <tr class="noborder">
  98. <td class="required">{$Think.lang.sms_login}</td>
  99. <td class="vatop rowform">
  100. <div class="onoff">
  101. <label for="sms_login_show1" class="cb-enable {if condition="$list_config.sms_login eq 1"}selected{/if}">{$Think.lang.ds_yes}</label>
  102. <label for="sms_login_show0" class="cb-disable {if condition="$list_config.sms_login eq 0"}selected{/if}">{$Think.lang.ds_no}</label>
  103. <input id="sms_login_show1" name="sms_login" value="1" type="radio" {if condition="$list_config.sms_login eq 1"} checked="checked"{/if}>
  104. <input id="sms_login_show0" name="sms_login" value="0" type="radio" {if condition="$list_config.sms_login eq 0"} checked="checked"{/if}>
  105. </div>
  106. </td>
  107. </tr>
  108. <tr class="noborder">
  109. <td class="required">{$Think.lang.sms_password}</td>
  110. <td class="vatop rowform">
  111. <div class="onoff">
  112. <label for="sms_password_show1" class="cb-enable {if condition="$list_config.sms_password eq 1"}selected{/if}">{$Think.lang.ds_yes}</label>
  113. <label for="sms_password_show0" class="cb-disable {if condition="$list_config.sms_password eq 0"}selected{/if}">{$Think.lang.ds_no}</label>
  114. <input id="sms_password_show1" name="sms_password" value="1" type="radio" {if condition="$list_config.sms_password eq 1"} checked="checked"{/if}>
  115. <input id="sms_password_show0" name="sms_password" value="0" type="radio" {if condition="$list_config.sms_password eq 0"} checked="checked"{/if}>
  116. </div>
  117. </td>
  118. </tr>
  119. <tr class="noborder">
  120. <td class="required w120">{$Think.lang.test_mobile_address}</td>
  121. <td class="vatop rowform">
  122. <input type="text" name="mobile_test" id="mobile_test" value="" class="w200"/>
  123. <input type="button" value="{$Think.lang.test_mail}" name="send_test_mobile" class="btn btn-small" id="send_test_mobile" >
  124. </td>
  125. </tr>
  126. <tr class="noborder smscf_type_ali" {if $list_config.smscf_type!='ali'}style="display:none"{/if}>
  127. <td class="required w120">{$Think.lang.ali_template_code}</td>
  128. <td class="vatop rowform">
  129. <input type="text" name="ali_template_code" id="ali_template_code" value="" class="w200"/>
  130. </td>
  131. </tr>
  132. <tr class="noborder smscf_type_ali" {if $list_config.smscf_type!='ali'}style="display:none"{/if}>
  133. <td class="required w120">{$Think.lang.ali_template_content}</td>
  134. <td class="vatop rowform">
  135. <textarea name="ali_template_content" id="ali_template_content" class="w200"></textarea>
  136. </td>
  137. <td class="vatop tips"></td>
  138. </tr>
  139. <tr class="noborder smscf_type_ali" {if $list_config.smscf_type!='ali'}style="display:none"{/if}>
  140. <td class="required w120">{$Think.lang.ali_template_param}</td>
  141. <td class="vatop rowform">
  142. <textarea name="ali_template_param" id="ali_template_param" class="w200"></textarea>
  143. </td>
  144. <td class="vatop tips">{$Think.lang.ali_template_param_tips}</td>
  145. </tr>
  146. <tr class="noborder smscf_type_ten" {if $list_config.smscf_type!='ten'}style="display:none"{/if}>
  147. <td class="required w120">{$Think.lang.ten_template_code}</td>
  148. <td class="vatop rowform">
  149. <input type="text" name="ten_template_code" id="ten_template_code" value="" class="w200"/>
  150. </td>
  151. </tr>
  152. <tr class="noborder smscf_type_ten" {if $list_config.smscf_type!='ten'}style="display:none"{/if}>
  153. <td class="required w120">{$Think.lang.ten_template_content}</td>
  154. <td class="vatop rowform">
  155. <textarea name="ten_template_content" id="ten_template_content" class="w200"></textarea>
  156. </td>
  157. <td class="vatop tips"></td>
  158. </tr>
  159. <tr class="noborder smscf_type_ten" {if $list_config.smscf_type!='ten'}style="display:none"{/if}>
  160. <td class="required w120">{$Think.lang.ten_template_param}</td>
  161. <td class="vatop rowform">
  162. <textarea name="ten_template_param" id="ten_template_param" class="w200"></textarea>
  163. </td>
  164. <td class="vatop tips">{$Think.lang.ten_template_param_tips}</td>
  165. </tr>
  166. <tr class="noborder smscf_type_wj" {if $list_config.smscf_type!='wj'}style="display:none"{/if}>
  167. <td class="required w120">{$Think.lang.test_mobile_content}</td>
  168. <td class="vatop rowform">
  169. <textarea name="mobile_test_content" id="mobile_test_content" class="w200"></textarea>
  170. </td>
  171. </tr>
  172. </tbody>
  173. <tfoot>
  174. <tr class="tfoot">
  175. <td></td>
  176. <td colspan="15"><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
  177. </tr>
  178. </tfoot>
  179. </table>
  180. </form>
  181. </div>
  182. <script>
  183. $(document).ready(function(){
  184. $('#send_test_mobile').click(function(){
  185. $.ajax({
  186. type:'POST',
  187. url:"{:url('Message/mobile_testing')}",
  188. data:{
  189. 'smscf_sign':$('#smscf_sign').val(),
  190. 'smscf_type':$('#smscf_type').val(),
  191. 'smscf_ali_secret':$('#smscf_ali_secret').val(),
  192. 'smscf_ali_id':$('#smscf_ali_id').val(),
  193. 'ali_template_content':$('#ali_template_content').val(),
  194. 'ali_template_param':$('#ali_template_param').val(),
  195. 'ali_template_code':$('#ali_template_code').val(),
  196. 'smscf_ten_secret':$('#smscf_ten_secret').val(),
  197. 'smscf_ten_id':$('#smscf_ten_id').val(),
  198. 'ten_template_content':$('#ten_template_content').val(),
  199. 'ten_template_param':$('#ten_template_param').val(),
  200. 'ten_template_code':$('#ten_template_code').val(),
  201. 'mobile_test_content':$('#mobile_test_content').val(),
  202. 'smscf_wj_username':$('#smscf_wj_username').val(),
  203. 'smscf_wj_key':$('#smscf_wj_key').val(),
  204. 'mobile_test':$('#mobile_test').val()
  205. },
  206. error:function(html){
  207. layer.alert('{$Think.lang.ds_common_op_fail}');
  208. },
  209. success:function(html){
  210. if(html.msg){
  211. layer.alert(html.msg);
  212. }
  213. },
  214. dataType:'json'
  215. });
  216. });
  217. $('#smscf_type').change(function(){
  218. if($(this).val()=='wj'){
  219. $('.smscf_type_ali').hide()
  220. $('.smscf_type_wj').show()
  221. $('.smscf_type_ten').hide()
  222. }
  223. if($(this).val()=='ali'){
  224. $('.smscf_type_ali').show()
  225. $('.smscf_type_wj').hide()
  226. $('.smscf_type_ten').hide()
  227. }
  228. if($(this).val()=='ten'){
  229. $('.smscf_type_ali').hide()
  230. $('.smscf_type_wj').hide()
  231. $('.smscf_type_ten').show()
  232. }
  233. })
  234. });
  235. </script>