人人商城

wap.html 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. {template '_header'}
  2. <div class="page-heading"><h2>全网通设置</h2></div>
  3. <div class="alert alert-info">
  4. <p>说明:</p>
  5. <p>1. 不开启WAP只能在微信环境打开,开启WAP后可以从非微信浏览器打开(任何浏览器),可用手机号码作为登录凭证</p>
  6. <p class="text-danger">2. 开启WAP后分享参数只在微信、QQ中生效,其他社交软件或浏览器转发将有可能不会确立下线</p>
  7. <p class="text-danger">3. 请认真配置下面的参数</p>
  8. </div>
  9. <form action="" method="post" class="form-horizontal form-validate" enctype="multipart/form-data">
  10. <div class="tabs-container">
  11. <ul class="nav nav-tabs" id="myTab">
  12. <li class="active"><a href="#tab_basic">基本设置</a></li>
  13. <li><a href="#tab_style">样式设置</a></li>
  14. <li><a href="#tab_sms">验证码短信模板</a></li>
  15. {if com('h5app')}
  16. <li><a href="#tab_login">APP登录设置</a></li>
  17. <li><a href="#tab_style_app">APP样式设置</a></li>
  18. {/if}
  19. </ul>
  20. <div class="tab-content ">
  21. <div class="tab-pane active" id="tab_basic">
  22. <div class="form-group">
  23. <label class="col-xs-12 col-sm-3 col-md-2 control-label">是否开启WAP访问</label>
  24. <div class="col-sm-9">
  25. {ifp 'sysset.wap.edit'}
  26. <label class="radio-inline">
  27. <input type="radio" name="data[open]" value="0" {if empty($data['open'])} checked="checked"{/if} />关闭
  28. </label>
  29. <label class="radio-inline">
  30. <input type="radio" name="data[open]" value="1" {if $data['open']==1} checked="checked"{/if}/>开启
  31. </label>
  32. <div class="form-control-static">关闭后H5APP也将无法访问,如果只需在H5APP中访问可设置仅APP访问</div>
  33. {else}
  34. <div class='form-control-static'>{if $data['open']==1}开启{else}关闭{/if}</div>
  35. {/if}
  36. </div>
  37. </div>
  38. {if com('h5app')}
  39. <div class="form-group">
  40. <label class="col-xs-12 col-sm-3 col-md-2 control-label">仅H5APP访问</label>
  41. <div class="col-sm-9">
  42. {ifp 'sysset.wap.edit'}
  43. <label class="radio-inline">
  44. <input type="radio" name="data[inh5app]" value="0" {if empty($data['inh5app'])} checked="checked"{/if} />否
  45. </label>
  46. <label class="radio-inline">
  47. <input type="radio" name="data[inh5app]" value="1" {if $data['inh5app']==1} checked="checked"{/if}/>是
  48. </label>
  49. <div class="form-control-static">开启仅H5APP访问后非H5APP之外的WAP将无法访问,开启此功能前请确保开启WAP</div>
  50. {else}
  51. <div class='form-control-static'>{if $data['inh5app']==1}开启{else}关闭{/if}</div>
  52. {/if}
  53. </div>
  54. </div>
  55. {/if}
  56. <div class="form-group">
  57. <label class="col-xs-12 col-sm-3 col-md-2 control-label">强制绑定手机号</label>
  58. <div class="col-sm-9">
  59. {ifp 'sysset.wap.edit'}
  60. <label class="radio-inline">
  61. <input type="radio" name="data[mustbind]" value="0" {if empty($data['mustbind'])} checked="checked"{/if} />否
  62. </label>
  63. <label class="radio-inline">
  64. <input type="radio" name="data[mustbind]" value="1" {if $data['mustbind']==1} checked="checked"{/if}/>是
  65. </label>
  66. <div class="form-control-static">注意:设置强制绑定手机号后,在用户下单时将弹出提示并且无法下单</div>
  67. {else}
  68. <div class='form-control-static'>{if $data['mustbind']==1}是{else}否{/if}</div>
  69. {/if}
  70. </div>
  71. </div>
  72. </div>
  73. <div class="tab-pane " id="tab_style">
  74. <div class="form-group">
  75. <label class="col-sm-2 control-label">选择模板</label>
  76. <div class="col-sm-9 col-xs-12">
  77. <select class='form-control' {ifp 'sysset.wap.edit'}name='data[style]'{else}disabled{/if}>
  78. {loop $styles $style}
  79. <option value='{$style}' {if $style==$data['style']}selected{/if}>{$style}</option>
  80. {/loop}
  81. </select>
  82. <div class="help-block">您可以根据系统自带3套模板数据格式设计自己的模板上传至addons/ewei_shopv2/template/account/目录下并且在此处设置</div>
  83. </div>
  84. </div>
  85. <div class="form-group">
  86. <label class="col-sm-2 control-label">主色调</label>
  87. <div class="col-sm-9 col-xs-12" id="maincolor">
  88. {ifp 'sysset.wap.edit'}
  89. {php echo tpl_form_field_color('data[color]', $data['color'])}
  90. <div class='help-block'>
  91. <div class="btn btn-default btn-sm setcolor" data-color="#ffffff">恢复default默认色调</div>
  92. <div class="btn btn-default btn-sm setcolor" data-color="#fea119">恢复default2默认色调</div>
  93. <div class="btn btn-default btn-sm setcolor" data-color="#43afcf">恢复default3默认色调</div>
  94. </div>
  95. {else}
  96. <div class="form-control-static">{$data['color']}</div>
  97. {/if}
  98. </div>
  99. </div>
  100. <div class="form-group">
  101. <label class="col-sm-2 control-label">背景图片</label>
  102. <div class="col-sm-9 col-xs-12" id="bgimg">
  103. {ifp 'sysset.wap.edit'}
  104. {php echo tpl_form_field_image('data[bg]', empty($data['bg'])?'../addons/ewei_shopv2/template/account/default/bg.jpg':$data['bg'])}
  105. <div class='help-block'>建议尺寸:default模板640*1008 default2模板640*284 default3模板640*366</div>
  106. <div class='help-block'>
  107. <div class="btn btn-default btn-sm setimg" data-style="default">恢复default默认背景</div>
  108. <div class="btn btn-default btn-sm setimg" data-style="default2">恢复default2默认背景</div>
  109. <div class="btn btn-default btn-sm setimg" data-style="default3">恢复default3默认背景</div>
  110. </div>
  111. {else}
  112. <input type="hidden" name="data[bg]" value="{$data['bg']}"/>
  113. {if !empty($data['bg'])}
  114. <a href='{php echo tomedia($data['bg'])}' target='_blank'>
  115. <img src="{php echo tomedia($data['bg'])}" style='width:100px;border:1px solid #ccc;padding:1px' />
  116. </a>
  117. {/if}
  118. {/if}
  119. </div>
  120. </div>
  121. </div>
  122. <div class="tab-pane" id="tab_sms">
  123. <div class="form-group">
  124. <label class="col-sm-2 control-label must">图形验证码</label>
  125. <div class="col-sm-9 col-xs-12">
  126. <label class="radio-inline"><input type="radio" value="0" {ifp 'sysset.wap.edit'}name="data[smsimgcode]"{else}disabled{/if} {if empty($data['smsimgcode'])} checked="checked"{/if}>关闭</label>
  127. <label class="radio-inline"><input type="radio" value="1" {ifp 'sysset.wap.edit'}name="data[smsimgcode]"{else}disabled{/if} {if !empty($data['smsimgcode'])} checked="checked"{/if}>开启</label>
  128. <div class="help-block text-danger">提示:开启后用户在请求发送短信验证码时需先填写图形二维码并验证成功(仅在用户注册、找回密码、绑定手机号生效)</div>
  129. </div>
  130. </div>
  131. <div class="form-group">
  132. <label class="col-sm-2 control-label must">用户注册</label>
  133. <div class="col-sm-9 col-xs-12">
  134. <select class="select2" style="display: block; width: 100%" id="sms_reg" {ifp 'sysset.wap.edit'}name="data[sms_reg]"{else}disabled{/if}>
  135. <option value=''>从短信消息库中选择</option>
  136. {loop $template_sms $template_val}
  137. <option value="{$template_val['id']}" {if $data['sms_reg']==$template_val['id']}selected{/if}>{$template_val['name']}</option>
  138. {/loop}
  139. </select>
  140. </div>
  141. </div>
  142. <div class="form-group">
  143. <label class="col-sm-2 control-label must">找回密码</label>
  144. <div class="col-sm-9 col-xs-12">
  145. <select class="select2" style="display: block; width: 100%" id="sms_forget" {ifp 'sysset.wap.edit'}name="data[sms_forget]"{else}disabled{/if}>
  146. <option value=''>从短信消息库中选择</option>
  147. {loop $template_sms $template_val}
  148. <option value="{$template_val['id']}" {if $data['sms_forget']==$template_val['id']}selected{/if}>{$template_val['name']}</option>
  149. {/loop}
  150. </select>
  151. </div>
  152. </div>
  153. <div class="form-group">
  154. <label class="col-sm-2 control-label must">修改密码</label>
  155. <div class="col-sm-9 col-xs-12">
  156. <select class="select2" style="display: block; width: 100%" id="sms_changepwd" {ifp 'sysset.wap.edit'}name="data[sms_changepwd]"{else}disabled{/if}>
  157. <option value=''>从短信消息库中选择</option>
  158. {loop $template_sms $template_val}
  159. <option value="{$template_val['id']}" {if $data['sms_changepwd']==$template_val['id']}selected{/if}>{$template_val['name']}</option>
  160. {/loop}
  161. </select>
  162. </div>
  163. </div>
  164. <div class="form-group">
  165. <label class="col-sm-2 control-label must">绑定手机</label>
  166. <div class="col-sm-9 col-xs-12">
  167. <select class="select2" style="display: block; width: 100%" id="sms_bind" {ifp 'sysset.wap.edit'}name="data[sms_bind]"{else}disabled{/if}>
  168. <option value=''>从短信消息库中选择</option>
  169. {loop $template_sms $template_val}
  170. <option value="{$template_val['id']}" {if $data['sms_bind']==$template_val['id']}selected{/if}>{$template_val['name']}</option>
  171. {/loop}
  172. </select>
  173. </div>
  174. </div>
  175. </div>
  176. {if com('h5app')}
  177. <div class="tab-pane " id="tab_login">
  178. <div class="form-group">
  179. <label class="col-sm-2 control-label must">APP第三方登录</label>
  180. <div class="col-sm-9 col-xs-12">
  181. <label class="checkbox-inline"><input type="checkbox" {ifp 'sysset.wap.edit'}name="data[sns][qq]" value="1"{else}disabled{/if} {if !empty($data['sns']['qq'])}checked{/if}> QQ登录</label>
  182. <label class="checkbox-inline"><input type="checkbox" {ifp 'sysset.wap.edit'}name="data[sns][wx]" value="1"{else}disabled{/if} {if !empty($data['sns']['wx'])}checked{/if}> 微信登录</label>
  183. <div class="form-control-static">勾选后请在APP后台开启相应支付插件并且配置好参数</div>
  184. </div>
  185. </div>
  186. </div>
  187. <div class="tab-pane" id="tab_style_app">
  188. <div class="form-group">
  189. <label class="col-sm-2 control-label">标题栏背景颜色</label>
  190. <div class="col-sm-9 col-xs-12">
  191. {ifp 'sysset.wap.edit'}
  192. {php echo tpl_form_field_color('data[headerbgcolor]', $data['headerbgcolor'])}
  193. {else}
  194. <div class="form-control-static">{$data['headerbgcolor']}</div>
  195. {/if}
  196. </div>
  197. </div>
  198. <div class="form-group">
  199. <label class="col-sm-2 control-label">标题栏文字颜色</label>
  200. <div class="col-sm-9 col-xs-12">
  201. {ifp 'sysset.wap.edit'}
  202. {php echo tpl_form_field_color('data[headercolor]', $data['headercolor'])}
  203. {else}
  204. <div class="form-control-static">{$data['headercolor']}</div>
  205. {/if}
  206. </div>
  207. </div>
  208. <div class="form-group">
  209. <label class="col-sm-2 control-label">标题栏图标颜色</label>
  210. <div class="col-sm-9 col-xs-12">
  211. {ifp 'sysset.wap.edit'}
  212. {php echo tpl_form_field_color('data[headericoncolor]', $data['headericoncolor'])}
  213. {else}
  214. <div class="form-control-static">{$data['headericoncolor']}</div>
  215. {/if}
  216. </div>
  217. </div>
  218. <div class="form-group">
  219. <label class="col-sm-2 control-label">IOSAPP状态栏<br>文字颜色</label>
  220. <div class="col-sm-9 col-xs-12" style="padding-top: 10px;">
  221. {ifp 'sysset.wap.edit'}
  222. <label class="radio-inline"><input type="radio" name="data[statusbar]" value="0" {if empty($data['statusbar'])}checked{/if}>白色</label>
  223. <label class="radio-inline"><input type="radio" name="data[statusbar]" value="1" {if !empty($data['statusbar'])}checked{/if}>黑色</label>
  224. {else}
  225. <div class="form-control-static">{if empty($data['statusbar'])}白色{else}黑色{/if}</div>
  226. {/if}
  227. </div>
  228. </div>
  229. </div>
  230. {/if}
  231. </div>
  232. </div>
  233. <div class="form-group">
  234. <label class="col-sm-2 control-label"></label>
  235. <div class="col-sm-9 col-xs-12">
  236. {ifp 'sysset.wap.edit'}
  237. <input type="submit" value="提交" class="btn btn-primary" />
  238. {/if}
  239. </div>
  240. </div>
  241. </form>
  242. <script type="text/javascript">
  243. require(['bootstrap'], function () {
  244. $('#myTab a').click(function (e) {
  245. e.preventDefault();
  246. $(this).tab('show');
  247. })
  248. });
  249. $(function () {
  250. $("form").submit(function () {
  251. if(!$("#sms_reg option:selected").val()){
  252. $("#sms_reg").focus();
  253. tip.msgbox.err('请选择用户注册短信模板!');
  254. $('#myTab a[href="#tab_sms"]').tab('show');
  255. $('form').attr('stop',1);
  256. return false;
  257. }
  258. if(!$("#sms_forget option:selected").val()){
  259. $("#sms_forget").focus();
  260. tip.msgbox.err('请选择找回密码短信模板!');
  261. $('#myTab a[href="#tab_sms"]').tab('show');
  262. $('form').attr('stop',1);
  263. return false;
  264. }
  265. if(!$("#sms_changepwd option:selected").val()){
  266. $("#sms_changepwd").focus();
  267. tip.msgbox.err('请选择修改密码短信模板!');
  268. $('#myTab a[href="#tab_sms"]').tab('show');
  269. $('form').attr('stop',1);
  270. return false;
  271. }
  272. if(!$("#sms_bind option:selected").val()){
  273. $("#sms_bind").focus();
  274. tip.msgbox.err('请选择绑定用户短信模板!');
  275. $('#myTab a[href="#tab_sms"]').tab('show');
  276. $('form').attr('stop',1);
  277. return false;
  278. }
  279. $("form").removeAttr('stop');
  280. return true;
  281. });
  282. });
  283. $(".setcolor").click(function () {
  284. var color = $(this).data('color');
  285. if(color){
  286. $("#maincolor").find("input").val(color).next().css("background-color", color);
  287. }
  288. });
  289. $(".setimg").click(function () {
  290. var imgurl = $(this).data('style');
  291. if(imgurl){
  292. imgurl = "../addons/ewei_shopv2/template/account/"+imgurl+"/bg.jpg";
  293. $("#bgimg").find("input").val(imgurl);
  294. $("#bgimg").find("img").attr("src", imgurl);
  295. }
  296. });
  297. </script>
  298. {template '_footer'}