人人商城

payset.html 28KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. {template '_header'}
  2. <style>
  3. .tabs-container .tab-pane .panel-body {border-left: none; border-right: none; border-bottom: none;}
  4. </style>
  5. <form action="" method="post" class="form-horizontal form-validate" enctype="multipart/form-data" >
  6. <div class="page-heading">
  7. <span class="pull-right">
  8. {ifp 'sysset.payset.edit'}
  9. <input type="submit" value="提交" class="btn btn-primary" />
  10. {/if}
  11. </span>
  12. <h2>支付方式</h2>
  13. </div>
  14. {if $resp['code']!=200}
  15. <div class="alert alert-danger">
  16. <p style="font-size:18px;font-weight: bold;word-break: break-all">{$url} 访问受限, 请检查您的服务器设置</p>
  17. <p style="font-size:18px;font-weight: bold;word-break: break-all">HTTP 错误代码: {$resp['code']}</p>
  18. </div>
  19. {/if}
  20. <div class="tabs-container">
  21. <ul class="nav nav-tabs" id="myTab">
  22. <li class="active"><a href="#tab_wechat">支付设置</a></li>
  23. <li><a href="#tab_wap">WAP端</a></li>
  24. {if com('h5app')}
  25. <li><a href="#tab_app">APP端</a></li>
  26. {/if}
  27. <li><a href="#tab_alipay">支付宝打款</a></li>
  28. <li><a href="#tab_paytype">打款方式</a></li>
  29. </ul>
  30. <div class="tab-content ">
  31. <!-- 微信端开始-->
  32. <div class="tab-pane active" id="tab_wechat">
  33. <div class="panel panel-default">
  34. <div class="panel-body">
  35. <div class="col-sm-9 col-xs-12">
  36. <h4>商城支付</h4>
  37. <span>
  38. <p class="text text-danger">如果是微信支付,授权目录与“支付选项”中的说明不同,应在 公众平台->微信支付->公众号支付 追加一条支付授权目录: <b>{$_W['siteroot']}app/</b> </p>
  39. <p class="text text-danger"><b>特约商户一般申请没有订单或者充值余额退款权限,需要 <a href='http://kf.qq.com/faq/120911VrYVrA150929imAfuU.html' target="_blank">点击跳转</a> 在这里申请一下 </b></p>
  40. </span>
  41. </div>
  42. <div class="col-sm-2 pull-right" style="padding-top:10px;text-align: right" >
  43. <input type="checkbox" class="js-switch" name="data[weixin]" value="1" {if $data['weixin']==1}checked{/if} />
  44. </div>
  45. </div>
  46. <div class="panel-body" id='certs' {if empty($data['weixin'])}style="display:none"{/if}>
  47. <div class="form-group">
  48. <label class="col-sm-2 control-label">选择支付</label>
  49. <div class="col-sm-9 col-xs-12">
  50. {ifp 'sysset.payset.edit'}
  51. <select name='data[weixin_id]' class='form-control'>
  52. <option value='0'>未选择任何支付</option>
  53. {loop $payments $val}
  54. <option value='{$val['id']}' {if $data['weixin_id']==$val['id']}selected{/if}>{$val['title']}</option>
  55. {/loop}
  56. </select>
  57. {else}
  58. <div class='form-control-static'></div>
  59. {/if}
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. <div class="panel panel-default" >
  65. <div class="panel-body">
  66. <div class="col-sm-9 col-xs-12">
  67. <h4>余额支付</h4>
  68. <span>开启后,粉丝可以用账户余额去商城消费.</span>
  69. </div>
  70. <div class="col-sm-2 pull-right" style="padding-top:10px;text-align: right" >
  71. <input type="checkbox" class="js-switch" name="data[credit]" value="1" {if $data['credit']==1}checked{/if} />
  72. </div>
  73. </div>
  74. </div>
  75. <div class="panel panel-default" >
  76. <div class="panel-body">
  77. <div class="col-sm-9 col-xs-12">
  78. <h4>货到付款</h4>
  79. <span>如果要支持货到付款,也需要将商品设置成货到付款。</span>
  80. </div>
  81. <div class="col-sm-2 pull-right" style="padding-top:10px;text-align: right" >
  82. <input type="checkbox" class="js-switch" name="data[cash]" value="1" {if $data['cash']==1}checked{/if} />
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. <!--微信端 结束-->
  88. <!--wap端开始-->
  89. <div class="tab-pane " id="tab_wap">
  90. <div class="panel panel-default" >
  91. <div class="panel-body">
  92. <div class="col-sm-9 col-xs-12">
  93. <h4>支付宝支付</h4>
  94. <p> 在开启支付宝支付方式前,请到 <a href='{php echo url('profile/payment')}' target="_blank">支付选项</a> 去设置好参数。(微信中支付宝支付也属于WAP支付)</p>
  95. <p class="text text-danger">如果未选择新版支付宝,则默认使用旧版。</p>
  96. <p class="text text-danger">新版支付宝请到 <a href="{php echo weburl('sysset/payment')}"><b>【支付管理】</b></a>页面添加模板</p>
  97. <p class="text text-danger">请在使用新版支付宝之前,确保之前支付宝支付订单已经完结,以免造成不必要的调整。</p>
  98. </div>
  99. <div class="col-sm-2 pull-right" style="padding-top:10px;text-align: right" >
  100. <input type="checkbox" class="js-switch" name="data[alipay]" value="1" {if $data['alipay']==1}checked{/if} />
  101. </div>
  102. </div>
  103. <div class="form-group" id="alipay" {if $data['alipay']==0}style="display: none;"{/if}>
  104. <label class="col-sm-2 control-label">新版支付宝</label>
  105. <div class="col-sm-9 col-xs-12">
  106. {ifp 'sysset.payset.edit'}
  107. <select name='data[alipay_id]' class='form-control'>
  108. <option value='0'>未选择任何支付</option>
  109. {loop $paymentalis $val}
  110. <option value='{$val['id']}' {if $data['alipay_id']==$val['id']}selected{/if}>{$val['title']}</option>
  111. {/loop}
  112. </select>
  113. {else}
  114. <div class='form-control-static'></div>
  115. {/if}
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. <!--wap端结束-->
  121. <!--app端开始-->
  122. <div class="tab-pane " id="tab_app">
  123. <div class="panel panel-default" >
  124. <div class="panel-body">
  125. <div class="col-sm-9 col-xs-12">
  126. <h4>微信支付</h4>
  127. <span> 开启后在APP中可以调起微信进行支付</span>
  128. </div>
  129. <div class="col-sm-2 pull-right" style="padding-top:10px;text-align: right" >
  130. <input type="checkbox" class="js-switch" name="data[app_wechat]" value="1" {if $data['app_wechat']==1}checked{/if} />
  131. </div>
  132. </div>
  133. <div class="panel-body" id="app_wechat" {if empty($data['app_wechat'])}style="display:none"{/if}>
  134. <div class="form-group" >
  135. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">微信AppId</label>
  136. <div class="col-sm-9">
  137. {ifp 'sysset.payset.edit'}
  138. <input type="text" name="data[app_wechat_appid]" class="form-control" value="{if !empty($sec['app_wechat']['appid'])}{$sec['app_wechat']['appid']}{/if}"/>
  139. {else}
  140. <div class='form-control-static'>{if !empty($sec['app_wechat']['appid'])}{$sec['app_wechat']['appid']}{/if}</div>
  141. {/if}
  142. </div>
  143. </div>
  144. <div class="form-group" >
  145. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">微信AppSecret</label>
  146. <div class="col-sm-9">
  147. {ifp 'sysset.payset.edit'}
  148. <input type="text" name="data[app_wechat_appsecret]" class="form-control" value="{if !empty($sec['app_wechat']['appsecret'])}{$sec['app_wechat']['appsecret']}{/if}"/>
  149. {else}
  150. <div class='form-control-static'>{if !empty($sec['app_wechat']['appsecret'])}{$sec['app_wechat']['appsecret']}{/if}</div>
  151. {/if}
  152. </div>
  153. </div>
  154. <div class="form-group" >
  155. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">微信商户名称</label>
  156. <div class="col-sm-9">
  157. {ifp 'sysset.payset.edit'}
  158. <input type="text" name="data[app_wechat_merchname]" class="form-control" value="{if !empty($sec['app_wechat']['merchname'])}{$sec['app_wechat']['merchname']}{/if}"/>
  159. {else}
  160. <div class='form-control-static'>{if !empty($sec['app_wechat']['merchname'])}{$sec['app_wechat']['merchname']}{/if}</div>
  161. {/if}
  162. </div>
  163. </div>
  164. <div class="form-group" >
  165. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">微信商户ID</label>
  166. <div class="col-sm-9">
  167. {ifp 'sysset.payset.edit'}
  168. <input type="text" name="data[app_wechat_merchid]" class="form-control" value="{if !empty($sec['app_wechat']['merchid'])}{$sec['app_wechat']['merchid']}{/if}"/>
  169. {else}
  170. <div class='form-control-static'>{if !empty($sec['app_wechat']['merchid'])}{$sec['app_wechat']['merchid']}{/if}</div>
  171. {/if}
  172. </div>
  173. </div>
  174. <div class="form-group" >
  175. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">微信商户API密钥</label>
  176. <div class="col-sm-9">
  177. {ifp 'sysset.payset.edit'}
  178. <input type="text" name="data[app_wechat_apikey]" class="form-control" value="{if !empty($sec['app_wechat']['apikey'])}{$sec['app_wechat']['apikey']}{/if}"/>
  179. {else}
  180. <div class='form-control-static'>{if !empty($sec['app_wechat']['apikey'])}{$sec['app_wechat']['apikey']}{/if}</div>
  181. {/if}
  182. </div>
  183. </div>
  184. <div class="form-group">
  185. <label class="col-sm-2 control-label">CERT证书文件</label>
  186. <div class="col-sm-9 col-xs-12">
  187. <input type="hidden" name="data[app_wechat_cert]" value="{$data['app_wechat_cert']}"/>
  188. {ifp 'sysset.payset.edit'}
  189. <input type="file" name="app_wechat_cert_file" class="form-control" />
  190. <span class="help-block">
  191. {if !empty($sec['app_wechat']['cert'])}
  192. <span class='label label-success'>已上传</span>
  193. {else}
  194. <span class='label label-danger'>未上传</span>
  195. {/if}
  196. 下载证书 cert.zip 中的 apiclient_cert.pem 文件</span>
  197. {else}
  198. {if !empty($sec['app_wechat']['cert'])}
  199. <span class='label label-success'>已上传</span>
  200. {else}
  201. <span class='label label-danger'>未上传</span>
  202. {/if}
  203. {/if}
  204. </div>
  205. </div>
  206. <div class="form-group">
  207. <label class="col-sm-2 control-label">KEY密钥文件</label>
  208. <div class="col-sm-9 col-xs-12">
  209. <input type="hidden" name="data[app_wechat_key]" value="{$data['app_wechat_key']}"/>
  210. {ifp 'sysset.payset.edit'}
  211. <input type="file" name="app_wechat_key_file" class="form-control" />
  212. <span class="help-block">
  213. {if !empty($sec['app_wechat']['key'])}
  214. <span class='label label-success'>已上传</span>
  215. {else}
  216. <span class='label label-danger'>未上传</span>
  217. {/if}
  218. 下载证书 cert.zip 中的 apiclient_key.pem 文件
  219. </span>
  220. {else}
  221. {if !empty($sec['app_wechat']['key'])}
  222. <span class='label label-success'>已上传</span>
  223. {else}
  224. <span class='label label-danger'>未上传</span>
  225. {/if}
  226. {/if}
  227. </div>
  228. </div>
  229. <div class="form-group">
  230. <label class="col-sm-2 control-label">ROOT文件</label>
  231. <div class="col-sm-9 col-xs-12">
  232. <input type="hidden" name="data[app_wechat_root]" value="{$data['app_wechat_root']}"/>
  233. {ifp 'sysset.payset.edit'}
  234. <input type="file" name="app_wechat_root_file" class="form-control" />
  235. <span class="help-block">
  236. {if !empty($sec['app_wechat']['root'])}
  237. <span class='label label-success'>已上传</span>
  238. {else}
  239. <span class='label label-danger'>未上传</span>
  240. {/if}
  241. 下载证书 cert.zip 中的 rootca.pem 文件,新下载证书无需上传此文件!
  242. </span>
  243. {else}
  244. {if !empty($sec['app_wechat']['root'])}
  245. <span class='label label-success'>已上传</span>
  246. {else}
  247. <span class='label label-danger'>未上传</span>
  248. {/if}
  249. {/if}
  250. </div>
  251. </div>
  252. </div>
  253. </div>
  254. <div class="panel panel-default" >
  255. <div class="panel-body">
  256. <div class="col-sm-9 col-xs-12">
  257. <h4>支付宝支付</h4>
  258. <span> 开启后在APP中可以调起支付宝进行支付</span>
  259. </div>
  260. <div class="col-sm-2 pull-right" style="padding-top:10px;text-align: right" >
  261. <input type="checkbox" class="js-switch" name="data[app_alipay]" value="1" {if $data['app_alipay']==1}checked{/if} />
  262. </div>
  263. </div>
  264. <div class="panel-body" id="app_alipay" {if empty($data['app_alipay'])}style="display:none"{/if}>
  265. <div class="form-group" >
  266. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">APPID</label>
  267. <div class="col-sm-9">
  268. {ifp 'sysset.payset.edit'}
  269. <input class="form-control" name="data[app_alipay_appid]" value="{if !empty($sec['app_alipay']['appid'])}{$sec['app_alipay']['appid']}{/if}" />
  270. <div class="help-block">开放平台应用id</div>
  271. {else}
  272. <div class='form-control-static'>{if !empty($sec['app_alipay']['appid'])}{$sec['app_alipay']['appid']}{/if}</div>
  273. {/if}
  274. </div>
  275. </div>
  276. <div class="form-group" >
  277. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">支付宝公钥(public_key)</label>
  278. <div class="col-sm-9">
  279. {ifp 'sysset.payset.edit'}
  280. <textarea name="data[app_alipay_public_key]" rows="4" class="form-control">{if !empty($sec['app_alipay']['public_key'])}{$sec['app_alipay']['public_key']}{/if}</textarea>
  281. <div class="help-block">一行且不能有空格</div>
  282. {else}
  283. <div class='form-control-static'>{if !empty($sec['app_alipay']['public_key'])}{$sec['app_alipay']['public_key']}{/if}</div>
  284. {/if}
  285. </div>
  286. </div>
  287. <div class="form-group" >
  288. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">应用私钥(private_key)</label>
  289. <div class="col-sm-9">
  290. {ifp 'sysset.payset.edit'}
  291. <textarea name="data[app_alipay_private_key]" rows="4" class="form-control">{if !empty($sec['app_alipay']['private_key'])}{$sec['app_alipay']['private_key']}{/if}</textarea>
  292. <div class="help-block">一行且不能有空格</div>
  293. {else}
  294. <div class='form-control-static'>{if !empty($sec['app_alipay']['private_key'])}{$sec['app_alipay']['private_key']}{/if}</div>
  295. {/if}
  296. </div>
  297. </div>
  298. </div>
  299. </div>
  300. </div>
  301. <!--app端结束-->
  302. <!--支付宝打款 开始-->
  303. <div class="tab-pane " id="tab_alipay">
  304. <div class="panel panel-default" >
  305. <div class="panel-body">
  306. <div class="col-sm-9 col-xs-12">
  307. <h4>支付宝打款</h4>
  308. <span> 开启之后,佣金打款,可以使用支付宝(前提是要登录支付宝)</span>
  309. </div>
  310. <div class="col-sm-2 pull-right" style="padding-top:10px;text-align: right" >
  311. <input type="checkbox" class="js-switch" name="data[alipay_pay][open]" value="1" {if !empty($sec['alipay_pay']['open'])}checked{/if} />
  312. </div>
  313. </div>
  314. <div class="panel-body" id="alipay_pay" {if empty($sec['alipay_pay']['open'])}style="display:none"{/if}>
  315. <div class="form-group" >
  316. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">合作伙伴身份(PID)</label>
  317. <div class="col-sm-9">
  318. {ifp 'sysset.payset.edit'}
  319. <input type="text" name="data[alipay_pay][partner]" class="form-control" value="{if !empty($sec['alipay_pay']['partner'])}{$sec['alipay_pay']['partner']}{/if}"/>
  320. {else}
  321. <div class='form-control-static'>{if !empty($sec['alipay_pay']['partner'])}{$sec['alipay_pay']['partner']}{/if}</div>
  322. {/if}
  323. </div>
  324. </div>
  325. <div class="form-group" >
  326. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">支付账户姓名</label>
  327. <div class="col-sm-9">
  328. {ifp 'sysset.payset.edit'}
  329. <input type="text" name="data[alipay_pay][account_name]" class="form-control" value="{if !empty($sec['alipay_pay']['account_name'])}{$sec['alipay_pay']['account_name']}{/if}"/>
  330. {else}
  331. <div class='form-control-static'>{if !empty($sec['alipay_pay']['account_name'])}{$sec['alipay_pay']['account_name']}{/if}</div>
  332. {/if}
  333. <div class="help-block">支付宝实名认证的名称(个人就填写个人姓名,企业就填写企业名称 , 要与支付宝上面的认证姓名一致)</div>
  334. </div>
  335. </div>
  336. <div class="form-group" >
  337. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">支付账号</label>
  338. <div class="col-sm-9">
  339. {ifp 'sysset.payset.edit'}
  340. <input type="text" name="data[alipay_pay][email]" class="form-control" value="{if !empty($sec['alipay_pay']['email'])}{$sec['alipay_pay']['email']}{/if}"/>
  341. {else}
  342. <div class='form-control-static'>{if !empty($sec['alipay_pay']['email'])}{$sec['alipay_pay']['email']}{/if}</div>
  343. {/if}
  344. <div class="help-block">支付宝账号 一般是 email </div>
  345. </div>
  346. </div>
  347. <div class="form-group" >
  348. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">MD5秘钥</label>
  349. <div class="col-sm-9">
  350. {ifp 'sysset.payset.edit'}
  351. <input type="text" name="data[alipay_pay][key]" class="form-control" value="{if !empty($sec['alipay_pay']['key'])}{$sec['alipay_pay']['key']}{/if}"/>
  352. {else}
  353. <div class='form-control-static'>{if !empty($sec['alipay_pay']['key'])}{$sec['alipay_pay']['key']}{/if}</div>
  354. {/if}
  355. <div class="help-block">安全校验码(key)MD5密钥 </div>
  356. </div>
  357. </div>
  358. </div>
  359. </div>
  360. </div>
  361. <!--支付宝打款 结束-->
  362. <!--微信打款方式 开始-->
  363. <div class="tab-pane " id="tab_paytype">
  364. <div class="panel-body">
  365. <div class="form-group" >
  366. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">佣金打款</label>
  367. <div class="col-sm-9">
  368. {ifp 'sysset.payset.edit'}
  369. <label class="radio-inline"><input type="radio" name="data[paytype][commission]" value="0" {if empty($data['paytype']['commission'])}checked="checked"{/if}/>企业打款</label>
  370. <label class="radio-inline"><input type="radio" name="data[paytype][commission]" value="1" {if $data['paytype']['commission'] == '1'}checked="checked"{/if}/>红包付款</label>
  371. {else}
  372. <div class='form-control-static'>{if empty($data['paytype']['commission'])}企业打款{else}红包付款{/if}</div>
  373. {/if}
  374. <span class="help-block">一般 小额打款 可以用微信红包 建议使用微信打款金额 超过1000</span>
  375. </div>
  376. </div>
  377. <div class="form-group" >
  378. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">提现申请</label>
  379. <div class="col-sm-9">
  380. {ifp 'sysset.payset.edit'}
  381. <label class="radio-inline"><input type="radio" name="data[paytype][withdraw]" value="0" {if empty($data['paytype']['withdraw'])}checked="checked"{/if}/>企业打款</label>
  382. <label class="radio-inline"><input type="radio" name="data[paytype][withdraw]" value="1" {if $data['paytype']['withdraw'] == '1'}checked="checked"{/if}/>红包付款</label>
  383. {else}
  384. <div class='form-control-static'>{if empty($data['paytype']['withdraw'])}企业打款{else}红包付款{/if}</div>
  385. {/if}
  386. <span class="help-block">一般 小额打款 可以用微信红包 建议使用微信打款金额 超过1000</span>
  387. </div>
  388. </div>
  389. <div class="form-group" >
  390. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">红包金额</label>
  391. <div class="col-sm-9">
  392. {ifp 'sysset.payset.edit'}
  393. <label class="radio-inline"><input type="radio" name="data[paytype][redpack]" value="0" {if empty($data['paytype']['redpack'])}checked="checked"{/if}/>188元</label>
  394. <label class="radio-inline"><input type="radio" name="data[paytype][redpack]" value="1" {if $data['paytype']['redpack'] == '1'}checked="checked"{/if}/>288元</label>
  395. <label class="radio-inline"><input type="radio" name="data[paytype][redpack]" value="2" {if $data['paytype']['redpack'] == '2'}checked="checked"{/if}/>388元</label>
  396. {else}
  397. <div class='form-control-static'>{if empty($data['paytype']['redpack'])}188元{elseif $data['paytype']['redpack'] == '1'}288元{else}388元{/if}</div>
  398. {/if}
  399. <span class="help-block">如果选用 红包打款 , 请选择每个红包最大面值;<br/>如果是 申请额度是 500 元 选择的是 188元 红包 将会发送 两个188元红包 和 一个 124元 红包</span>
  400. </div>
  401. </div>
  402. </div>
  403. </div>
  404. </div>
  405. </div>
  406. </form>
  407. </div>
  408. <script type="text/javascript">
  409. require(['bootstrap'], function () {
  410. $('#myTab a').click(function (e) {
  411. e.preventDefault();
  412. $(this).tab('show');
  413. })
  414. });
  415. $(function () {
  416. $(":checkbox[name='data[weixin]']").click(function () {
  417. var weixin_sub = $(":checkbox[name='data[weixin_sub]']");
  418. if ($(this).prop('checked')) {
  419. $("#certs").show();
  420. if(weixin_sub.next().hasClass("checked")){
  421. weixin_sub.next().click();
  422. }
  423. }
  424. else {
  425. $("#certs").hide();
  426. }
  427. });
  428. $(":checkbox[name='data[weixin_jie]']").click(function () {
  429. var weixin_jie_sub = $(":checkbox[name='data[weixin_jie_sub]']");
  430. if ($(this).prop('checked')) {
  431. $("#weixin_jie").show();
  432. if(weixin_jie_sub.next().hasClass("checked")){
  433. weixin_jie_sub.next().click();
  434. }
  435. }
  436. else {
  437. $("#weixin_jie").hide();
  438. }
  439. });
  440. $(":checkbox[name='data[weixin_sub]']").click(function () {
  441. var weixin = $(":checkbox[name='data[weixin]']");
  442. if ($(this).prop('checked')) {
  443. $("#weixin_sub").show();
  444. if(weixin.next().hasClass("checked")){
  445. weixin.next().click();
  446. }
  447. }
  448. else {
  449. $("#weixin_sub").hide();
  450. }
  451. });
  452. $(":checkbox[name='data[weixin_jie_sub]']").click(function () {
  453. var weixin_jie = $(":checkbox[name='data[weixin_jie]']");
  454. if ($(this).prop('checked')) {
  455. $("#weixin_jie_sub").show();
  456. if(weixin_jie.next().hasClass("checked")){
  457. weixin_jie.next().click();
  458. }
  459. }
  460. else {
  461. $("#weixin_jie_sub").hide();
  462. }
  463. });
  464. $(":checkbox[name='data[app_wechat]']").click(function () {
  465. if ($(this).prop('checked')) {
  466. $("#app_wechat").show();
  467. }
  468. else {
  469. $("#app_wechat").hide();
  470. }
  471. });
  472. $(":checkbox[name='data[app_alipay]']").click(function () {
  473. if ($(this).prop('checked')) {
  474. $("#app_alipay").show();
  475. }
  476. else {
  477. $("#app_alipay").hide();
  478. }
  479. });
  480. $(":checkbox[name='data[alipay_pay][open]']").click(function () {
  481. if ($(this).prop('checked')) {
  482. $("#alipay_pay").show();
  483. }
  484. else {
  485. $("#alipay_pay").hide();
  486. }
  487. });
  488. })
  489. </script>
  490. {template '_footer'}