人人商城

uc.html 8.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. {template 'common/header'}
  2. {template 'profile/common'}
  3. {if $do == 'uc_setting'}
  4. <div class="main js-profile-uc" ng-controller="ucCtrl">
  5. <form id="form1" action="{php echo url('profile/common/uc_setting')}" method="post" class="we7-form form ng-cloak" >
  6. <div class="panel panel-default">
  7. <div class="panel-heading">
  8. 设置UC参数
  9. </div>
  10. <div class="panel-body">
  11. <div class="alert alert-info">
  12. <p>
  13. 使用UC能够整合其他系统的会员信息. 如果你不清楚此功能的作用, 请咨询您的技术人员. <br />
  14. 1. 在UC系统中增加新的应用, 并填写[应用接口文件名称]为: uc.php?uniacid={$_W['uniacid']} <br />
  15. 2. 在下方启用UC, 并按照UC系统中新增的应用参数填写
  16. </p>
  17. </div>
  18. <div class="form-group">
  19. <label class="col-xs-12 col-sm-3 col-md-2 control-label">启用UC</label>
  20. <div class="col-sm-8">
  21. <input type="radio" id="status1" name="status" ng-model="uc.status" value="1"/>
  22. <label class="radio-inline" for="status1">开启</label>
  23. <input type="radio" id="status0" name="status" ng-model="uc.status" value="0"/>
  24. <label class="radio-inline" for="status0">关闭</label>
  25. <span class="help-block">使用UC能够整合其他系统的会员信息. 如果你不清楚此功能的作用, 请咨询您的技术人员.</span>
  26. </div>
  27. </div>
  28. <div ng-show="uc.status == '1'">
  29. <div class="form-group">
  30. <label class="col-xs-12 col-sm-3 col-md-2 control-label">快速录入</label>
  31. <div class="col-sm-8 col-xs-12">
  32. <textarea class="form-control" rows="6" id="textarea"></textarea>
  33. <span class="help-block">你可以直接复制UC中的[应用的 UCenter 配置信息]来快速搞定配置参数.</span>
  34. </div>
  35. </div>
  36. <div class="form-group">
  37. <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
  38. <div class="col-sm-8 col-xs-12">
  39. <input id="submit" type="button" class="btn btn-primary" value="一键录入">
  40. </div>
  41. </div>
  42. <div class="form-group">
  43. <label class="col-xs-12 col-sm-3 col-md-2 control-label">通行证名称</label>
  44. <div class="col-sm-8 col-xs-12">
  45. <input type="text" name="title" class="form-control" value="{{uc.title}}" autocomplete="off">
  46. <span class="help-block">请输入你的通行证名称, 方便与UC系统联系.比如: 你的论坛名字</span>
  47. </div>
  48. </div>
  49. <div class="form-group">
  50. <label class="col-xs-12 col-sm-3 col-md-2 control-label">应用ID</label>
  51. <div class="col-sm-8 col-xs-12">
  52. <input type="text" name="appid" class="form-control" value="{{uc.appid}}" autocomplete="off">
  53. </div>
  54. </div>
  55. <div class="form-group">
  56. <label class="col-xs-12 col-sm-3 col-md-2 control-label">通信密钥</label>
  57. <div class="col-sm-8 col-xs-12">
  58. <input type="text" name="key" class="form-control" value="{{uc.key}}" autocomplete="off"/>
  59. </div>
  60. </div>
  61. <div class="form-group">
  62. <label class="col-xs-12 col-sm-3 col-md-2 control-label">UCenter字符集</label>
  63. <div class="col-sm-8 col-xs-12">
  64. <input type="text" name="charset" class="form-control" value="{{uc.charset}}" autocomplete="off"/>
  65. </div>
  66. </div>
  67. <div class="form-group">
  68. <label class="col-xs-12 col-sm-3 col-md-2 control-label">通信方式</label>
  69. <div class="col-sm-8 col-xs-12">
  70. <input type="radio" id="connect-1" name="connect" ng-model="uc.connect" value="mysql"/>
  71. <label class="radio-inline" for="connect-1">MYSQL方式</label>
  72. <input type="radio" id="connect-2" name="connect" ng-model="uc.connect" value="http"/>
  73. <label class="radio-inline" for="connect-2">远程方式HTTP</label>
  74. </div>
  75. </div>
  76. <div class="tb mysql" ng-show="uc.connect == 'mysql';">
  77. <div class="form-group">
  78. <label class="col-xs-12 col-sm-3 col-md-2 control-label">数据库主机</label>
  79. <div class="col-sm-8 col-xs-12">
  80. <input type="text" name="dbhost" class="form-control" value="{{uc.dbhost}}" autocomplete="off">
  81. </div>
  82. </div>
  83. <div class="form-group">
  84. <label class="col-xs-12 col-sm-3 col-md-2 control-label">数据库用户名</label>
  85. <div class="col-sm-8 col-xs-12">
  86. <input type="text" name="dbuser" class="form-control" value="{{uc.dbuser}}" autocomplete="off"/>
  87. </div>
  88. </div>
  89. <div class="form-group">
  90. <label class="col-xs-12 col-sm-3 col-md-2 control-label">数据库密码</label>
  91. <div class="col-sm-8 col-xs-12">
  92. <input type="text" name="dbpw" class="form-control" value="{{uc.dbpw}}" autocomplete="off"/>
  93. </div>
  94. </div>
  95. <div class="form-group">
  96. <label class="col-xs-12 col-sm-3 col-md-2 control-label">数据库名称</label>
  97. <div class="col-sm-8 col-xs-12">
  98. <input type="text" name="dbname" class="form-control" value="{{uc.dbname}}" autocomplete="off"/>
  99. </div>
  100. </div>
  101. <div class="form-group">
  102. <label class="col-xs-12 col-sm-3 col-md-2 control-label">数据库字符集</label>
  103. <div class="col-sm-8 col-xs-12">
  104. <input type="text" name="dbcharset" class="form-control" value="{{uc.dbcharset}}" autocomplete="off"/>
  105. </div>
  106. </div>
  107. <div class="form-group">
  108. <label class="col-xs-12 col-sm-3 col-md-2 control-label">表前缀</label>
  109. <div class="col-sm-8 col-xs-12">
  110. <input type="text" name="dbtablepre" class="form-control" value="{{uc.dbtablepre}}" autocomplete="off"/>
  111. </div>
  112. </div>
  113. <div class="form-group">
  114. <label class="col-xs-12 col-sm-3 col-md-2 control-label">是否持久连接</label>
  115. <div class="col-sm-8 col-xs-12">
  116. <input type="radio" id="dbconnect-1" name="dbconnect" value="1" ng-model="uc.dbconnect"/>
  117. <label class="radio-inline" for="dbconnect-1">是</label>
  118. <input type="radio" id="dbconnect-2" name="dbconnect" value="0" ng-model="uc.dbconnect"/>
  119. <label class="radio-inline" for="dbconnect-2">否</label>
  120. </div>
  121. </div>
  122. </div>
  123. <div class="tb http" ng-show="uc.connect != 'mysql';">
  124. <div class="form-group">
  125. <label class="col-xs-12 col-sm-3 col-md-2 control-label">服务端URL地址</label>
  126. <div class="col-sm-8 col-xs-12">
  127. <input type="text" name="api" class="form-control" value="{{uc.api}}" autocomplete="off"/>
  128. </div>
  129. </div>
  130. <div class="form-group">
  131. <label class="col-xs-12 col-sm-3 col-md-2 control-label">服务端IP</label>
  132. <div class="col-sm-8 col-xs-12">
  133. <input type="text" name="ip" class="form-control" value="{{uc.ip}}" autocomplete="off"/>
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. </div>
  140. <div class="form-group col-sm-12">
  141. <input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1" />
  142. <input type="hidden" name="token" value="{$_W['token']}" />
  143. </div>
  144. </form>
  145. </div>
  146. <script type="text/javascript">
  147. angular.module('profileApp').value('config', {
  148. 'uc' : {php echo json_encode($uc)}
  149. });
  150. angular.bootstrap($('.js-profile-uc'), ['profileApp']);
  151. //处理快速录入
  152. </script>
  153. {elseif $do == 'upload_file'}
  154. <div class="main">
  155. <form id="form21" action="{php echo url('profile/common/upload_file')}" method="post" class="we7-form form" enctype="multipart/form-data">
  156. <div class="panel-body">
  157. <div class="alert alert-info">
  158. <p>
  159. 设置JS接口安全域名,需要上传的文件。 <br />
  160. </p>
  161. </div>
  162. <table class="we7-table table-hover table-form">
  163. <col width="150px"/>
  164. <col />
  165. <col width="150px"/>
  166. <tr>
  167. <th colspan="3">上传js接口文件</th>
  168. </tr>
  169. <tr>
  170. <td>上传文件</td>
  171. <td class="color-gray"></td>
  172. <td class="text-right">
  173. <div class="link-group">
  174. <a href="javascript:;" data-toggle="modal" data-target="#jsauth_acid">修改</a>
  175. </div>
  176. </td>
  177. </tr>
  178. </table>
  179. <div class="modal fade" id="jsauth_acid" tabindex="-1" role="dialog" aria-hidden="true">
  180. <div class="we7-modal-dialog modal-dialog">
  181. <div class="modal-content">
  182. <div class="modal-header">
  183. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  184. <div class="modal-title">选择公众号</div>
  185. </div>
  186. <div class="modal-body">
  187. <div class="form-group">
  188. <label class="col-xs-12 col-sm-3 col-md-2 control-label">上传文件</label>
  189. <div class="col-sm-8">
  190. <input type="file" name="file" value="">
  191. </div>
  192. </div>
  193. </div>
  194. <div class="modal-footer">
  195. <input type="hidden" name="token" value="{$_W['token']}" />
  196. <input type="submit" class="btn btn-primary" name="submit" value="上传" />
  197. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  198. </div>
  199. </div>
  200. </div>
  201. </div>
  202. </div>
  203. </form>
  204. </div>
  205. {/if}
  206. {template 'common/footer'}