No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

users_reg_field.htm 27KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. {eyou:volist name="$users_para" id="vo"}
  2. {eyou:switch name="vo.dtype"}
  3. {eyou:case value="hidden"}
  4. <!-- 隐藏域 start -->
  5. <div class="form-group group_z" style="display: none;">
  6. <div class="row">
  7. <div class="ey-form-file-title col-md-3"></div>
  8. <div class="col-md-9">
  9. <input type="hidden" class="input-txt" id="{$vo.fieldArr}_{$vo.name|default=''}" name="{$vo.fieldArr}[{$vo.name|default=''}]" value="{$vo.dfvalue|default=''}">
  10. </div>
  11. </div>
  12. </div>
  13. <!-- 隐藏域 start -->
  14. {/eyou:case}
  15. {eyou:case value="mobile"}
  16. <!-- 手机文本框 start -->
  17. <div class="form-group group_z">
  18. <div class="input-group">
  19. {eyou:eq name="$vo.is_required" value="1"}<em class="tis">(必填)</em>{/eyou:eq}
  20. <input type="text" class="form-control" required id="{$vo.fieldArr}_{$vo.name|default=''}" name="{$vo.fieldArr}[{$vo.name|default=''}]" maxlength="11" value="{$vo.dfvalue|default=''}" placeholder="{$vo.title}">
  21. </div>
  22. </div>
  23. {eyou:if condition="isset($usersConfig['users_verification']) && 3 == $usersConfig['users_verification']"}
  24. <div class="form-group group_z">
  25. <div class="input-group btn-direction">
  26. <input type="hidden" name="__mobile_1_token__" value="{$Request.token.__mobile_1_token__}" />
  27. <input type="text" class="form-control" id="{$vo.fieldArr}_{$vo.name|default=''}_code" name="{$vo.fieldArr}[{$vo.name|default=''}_code]" placeholder="手机验证码" autocomplete="off">
  28. <input type="button" id="{$vo.fieldArr}_{$vo.name|default=''}_button" onclick="get_{$vo.fieldArr}{$vo.name|default=''}_code();" class="btn btn-primary sento" value="获取验证码"/>
  29. </div>
  30. </div>
  31. <script type="text/javascript">
  32. function get_{$vo.fieldArr}{$vo.name|default=''}_code() {
  33. var mobile = $("#{$vo.fieldArr}_{$vo.name|default=''}").val();
  34. // 手机号是否为空
  35. if (!mobile) {
  36. $("#{$vo.fieldArr}_{$vo.name|default=''}").focus();
  37. layer.msg('请输入{$vo.title}!', {time: 1500});
  38. return false;
  39. }
  40. // 手机格式不正确
  41. var reg = /^1[0-9]{10}$/i;
  42. if (!reg.test(mobile)) {
  43. $("#{$vo.fieldArr}_{$vo.name|default=''}").focus();
  44. layer.msg('请输入正确的{$vo.title}!', {time: 1500});
  45. return false;
  46. }
  47. // 设置为不可点击
  48. $("#{$vo.fieldArr}_{$vo.name|default=''}_button").val('获取中…').attr('disabled', 'disabled');
  49. var __mobile_1_token__ = $('input[name=__mobile_1_token__]').val();
  50. $.ajax({
  51. url: "{eyou:url link='api/Ajax/SendMobileCode' /}",
  52. data: {type:'reg', mobile:mobile, is_mobile:true, title:'账号注册', source:0, __mobile_1_token__:__mobile_1_token__},
  53. type:'post',
  54. dataType:'json',
  55. success:function(res){
  56. if (res.code == 1) {
  57. {$vo.fieldArr}{$vo.name|default=''}_countdown();
  58. layer.msg(res.msg, {time: 1500});
  59. } else {
  60. $("#{$vo.fieldArr}_{$vo.name|default=''}_button").val('获取验证码').removeAttr("disabled");
  61. layer.alert(res.msg, {icon: 2, title: false, closeBtn: 0});
  62. }
  63. },
  64. error : function() {
  65. $("#{$vo.fieldArr}_{$vo.name|default=''}_button").val('获取验证码').removeAttr("disabled");
  66. layer.alert('发送失败,请尝试重新发送!', {icon: 5, title: false, closeBtn: 0});
  67. }
  68. });
  69. }
  70. function {$vo.fieldArr}{$vo.name|default=''}_countdown(){
  71. // 倒计时
  72. var setTime;
  73. var time = 120;
  74. setTime = setInterval(function() {
  75. if(0 >= time) {
  76. clearInterval(setTime);
  77. return false;
  78. }
  79. time--;
  80. $("#{$vo.fieldArr}_{$vo.name|default=''}_button").val(time + '秒').attr('disabled', 'disabled');
  81. if(time == 0) $("#{$vo.fieldArr}_{$vo.name|default=''}_button").val('获取验证码').removeAttr("disabled");
  82. }, 1000);
  83. }
  84. </script>
  85. {/eyou:if}
  86. <!-- 手机文本框 end -->
  87. <!-- 手机文本框 end -->
  88. {/eyou:case}
  89. {eyou:case value="email"}
  90. <!-- 邮箱文本框 start -->
  91. <div class="form-group group_z">
  92. <!-- {eyou:eq name="$vo.is_required" value="1"}<em class="tis">(必填)</em>{/eyou:eq} -->
  93. <input type="text" class="form-control h60" required id="{$vo.fieldArr}_{$vo.name|default=''}" name="{$vo.fieldArr}[{$vo.name|default=''}]" value="{$vo.dfvalue|default=''}" placeholder="{$vo.title}" >
  94. </div>
  95. {eyou:if condition="isset($usersConfig['users_verification']) && 2 == $usersConfig['users_verification']"}
  96. <div class="form-group group_z">
  97. <div class="input-group btn-direction">
  98. <input type="text" class="form-control" id="{$vo.fieldArr}_{$vo.name|default=''}_code" name="{$vo.fieldArr}[{$vo.name|default=''}_code]" value="" placeholder="邮箱验证码">
  99. <input type="button" id="{$vo.fieldArr}_{$vo.name|default=''}_button" onclick="get_{$vo.fieldArr}{$vo.name|default=''}_code();" class="btn btn-primary sento" value="点击发送" />
  100. </div>
  101. </div>
  102. <script type="text/javascript">
  103. function get_{$vo.fieldArr}{$vo.name|default=''}_code(){
  104. var email = $("#{$vo.fieldArr}_{$vo.name|default=''}").val();
  105. var reg = /^[a-z0-9]([a-z0-9\\.]*[-_]{0,4}?[a-z0-9-_\\.]+)*@([a-z0-9]*[-_]?[a-z0-9]+)+([\.][\w_-]+){1,5}$/i;
  106. // 邮箱格式不正确
  107. if(!reg.test(email)){
  108. layer.msg('请正确输入邮箱地址!', {time: 1500});
  109. return false;
  110. }
  111. $("#{$vo.fieldArr}_{$vo.name|default=''}_button").val('发送中…');
  112. $("#{$vo.fieldArr}_{$vo.name|default=''}_button").attr('disabled', 'disabled');
  113. $.ajax({
  114. // async:false,
  115. url: "{eyou:url link='user/Smtpmail/send_email' /}",
  116. data: {type:'reg',email:email,title:'账号注册',scene:2},
  117. type:'post',
  118. dataType:'json',
  119. success:function(res){
  120. if(res.code == 1){
  121. {$vo.fieldArr}{$vo.name|default=''}_countdown();
  122. layer.msg(res.msg, {time: 1500});
  123. }else{
  124. $("#{$vo.fieldArr}_{$vo.name|default=''}_button").val('点击发送');
  125. $("#{$vo.fieldArr}_{$vo.name|default=''}_button").removeAttr("disabled");
  126. showErrorAlert(res.msg);
  127. }
  128. },
  129. error : function(e) {
  130. $("#{$vo.fieldArr}_{$vo.name|default=''}_button").val('点击发送');
  131. $("#{$vo.fieldArr}_{$vo.name|default=''}_button").removeAttr("disabled");
  132. showErrorAlert(e.responseText);
  133. }
  134. });
  135. }
  136. function {$vo.fieldArr}{$vo.name|default=''}_countdown(){
  137. // 倒计时
  138. var setTime;
  139. var time = {php}echo config('global.email_send_time');{/php};
  140. setTime = setInterval(function(){
  141. if(0 >= time){
  142. clearInterval(setTime);
  143. return;
  144. }
  145. time--;
  146. $("#{$vo.fieldArr}_{$vo.name|default=''}_button").val(time+'秒');
  147. $("#{$vo.fieldArr}_{$vo.name|default=''}_button").attr('disabled', 'disabled');
  148. if(time == 0){
  149. $("#{$vo.fieldArr}_{$vo.name|default=''}_button").val('点击发送');
  150. $("#{$vo.fieldArr}_{$vo.name|default=''}_button").removeAttr("disabled");
  151. }
  152. },1000);
  153. }
  154. </script>
  155. {/eyou:if}
  156. <!-- 邮箱文本框 end -->
  157. {/eyou:case}
  158. {eyou:case value="text"}
  159. <!-- 单行文本框 start -->
  160. {eyou:if condition='($vo.title == "地区")'}
  161. <!--引入城市-->
  162. <link rel="stylesheet" href="https://www.zc10000.com/template/pc/js/city/style.css" media="all">
  163. <script src="https://www.zc10000.com/template/pc/js/jquery-v3.1.1.min.js?t=544151"></script>
  164. <script type="text/javascript" src="https://www.zc10000.com/template/pc/js/city/cityTemplate.js?t=225513619665"></script>
  165. <script src="https://www.zc10000.com/template/pc/js/layer/3.1.1/layer.js"></script>
  166. <div class="form-group group_z">
  167. <div class="input-group" style="position:relative;">
  168. {eyou:eq name="$vo.is_required" value="1"}<em class="tis">(必填)</em>{/eyou:eq}
  169. <input type="text" class="form-control" required id="{$vo.fieldArr}_{$vo.name|default=''}" name="{$vo.fieldArr}[{$vo.name|default=''}]" value="{$vo.dfvalue|default=''}" lay-verify="city" autocomplete="off"
  170. placeholder="请选择您的所在城市">
  171. <div id="in_city" style="display: none;"></div>
  172. </div>
  173. </div>
  174. <style>
  175. #in_city{
  176. position:absolute !important;top:60px !important;left:0px !important;
  177. }
  178. #in_city h1{
  179. font-size: 20px !important;
  180. }
  181. #quxiao{
  182. display: none !important;
  183. }
  184. </style>
  185. <script type="text/javascript">
  186. var cityA = $(".city_a_le1 a"); //城市
  187. var pla = $("#{$vo.fieldArr}_{$vo.name|default=''}"); //出发地
  188. var dest = $("#destination"); //目的地
  189. // 默认值
  190. inCity.width = "381"; //城市选择框 宽
  191. inCity.height = ""; //城市选择框 高
  192. inCity.id = "#in_city"; //城市选择框 父级ID
  193. inCity.Children = '.city_a_le1'; //城市名box
  194. // 初始化 城市HTML模板
  195. $(inCity.id).prepend(inCity._template.join(''));
  196. inCity.Hot(cityA);
  197. //城市 导航
  198. var apay = $(".screen a");
  199. var placeThis; //当前选择标签
  200. apay.click(function (obj) { //城市导航
  201. inCity.payment($(this));
  202. })
  203. inCity.place(pla); //出发地
  204. inCity.destination(dest); //目的地
  205. inCity.cityClick(cityA); //显示赋值城市
  206. $(document).on('click',function(e) {
  207. var $target = $(e.target);
  208. if (!$target.closest('#in_city').length && !$target.is('#in_city')) {
  209. /* alert('You clicked outside the div!');*/
  210. $("#in_city").hide();
  211. }
  212. });
  213. /* $(document).on('click','#quxiao',function(){
  214. $("#in_city").hide();
  215. });*/
  216. /*
  217. $(document).on('click','.container',function(){
  218. $("#in_city").hide();
  219. });
  220. $(document).on('click','.screen a',function(){
  221. $("#in_city").show();
  222. });
  223. */
  224. //改为layer弹窗
  225. /* $(document).on('focus','#users__para_5',function(){
  226. console.log('dfdf');
  227. layer.open({
  228. title: '在线调试'
  229. ,content: $("#city_div").html()
  230. ,area: ['500px','300px']
  231. });
  232. });*/
  233. </script>
  234. {eyou:else /}
  235. <div class="form-group group_z">
  236. <div class="input-group">
  237. {eyou:eq name="$vo.is_required" value="1"}<em class="tis">(必填)</em>{/eyou:eq}
  238. <input type="text" class="form-control" required id="{$vo.fieldArr}_{$vo.name|default=''}" name="{$vo.fieldArr}[{$vo.name|default=''}]" value="{$vo.dfvalue|default=''}" placeholder="{$vo.title}">
  239. </div>
  240. </div>
  241. {/eyou:if}
  242. <!-- 单行文本框 end -->
  243. {/eyou:case}
  244. {eyou:case value="multitext"}
  245. <!-- 多行文本框 start -->
  246. <div class="form-group group_z">
  247. <div class="input-group">
  248. <textarea rows="5" cols="60" class="form-control" id="{$vo.fieldArr}_{$vo.name|default=''}" name="{$vo.fieldArr}[{$vo.name|default=''}]" {eyou:eq name="$vo.is_required" value="1"} placeholder="{$vo.title}(必填)" {eyou:else/} placeholder="{$vo.title}" {/eyou:eq}>{$vo.dfvalue|default=''}</textarea>
  249. </div>
  250. </div>
  251. <!-- 多行文本框 end -->
  252. {/eyou:case}
  253. {eyou:case value="checkbox"}
  254. <!-- 复选框 start -->
  255. <div class="form-group group_z">
  256. <fieldset>
  257. <legend>{$vo.title}{eyou:if condition="1 == $vo.is_required"}(必填){/eyou:if}</legend>
  258. {eyou:volist name="$vo.dfvalue" id="v2"}
  259. <label class="checkbox-label">
  260. <span>{$v2}</span>
  261. <input type="checkbox" class="checkbox" name="{$vo.fieldArr}[{$vo.name|default=''}][]" value="{$v2}" {eyou:if condition="isset($vo['trueValue']) AND in_array($v2, $vo['trueValue'])"}checked="checked"{/eyou:if}>
  262. <span class="check-mark"></span>
  263. </label>
  264. {/eyou:volist}
  265. </fieldset>
  266. </div>
  267. <!-- 复选框 end -->
  268. {/eyou:case}
  269. {eyou:case value="radio"}
  270. <!-- 单选项 start -->
  271. <div class="form-group group_z" style="height: 60px;">
  272. <fieldset style="height: 60px; padding: 0.75em 0.625em 0.5em;">
  273. <!-- <legend>{$vo.title}{eyou:if condition="1 == $vo.is_required"}(必填){/eyou:if}</legend>-->
  274. {eyou:volist name="$vo.dfvalue" id="v2"}
  275. <label class="radio-label">
  276. <span>{$v2}</span>
  277. <input type="radio" class="radio" name="{$vo.fieldArr}[{$vo.name|default=''}]" value="{$v2}" {eyou:if condition="isset($vo['trueValue']) AND in_array($v2, $vo['trueValue'])"}checked="checked"{/eyou:if}>
  278. <span class="check-mark"></span>
  279. </label>
  280. {/eyou:volist}
  281. </fieldset>
  282. </div>
  283. <!-- 单选项 end -->
  284. {/eyou:case}
  285. {eyou:case value="select"}
  286. <!-- 下拉框 start -->
  287. <div class="form-group group_z">
  288. <fieldset>
  289. <legend>{$vo.title}{eyou:if condition="1 == $vo.is_required"}(必填){/eyou:if}</legend>
  290. <div class="select">
  291. <div class="dd">
  292. <select name="{$vo.fieldArr}[{$vo.name|default=''}]" id="{$vo.fieldArr}_{$vo.name|default=''}" class="form-control">
  293. <option value="">请选择</option>
  294. {eyou:volist name="$vo.dfvalue" id="v2"}
  295. <option value="{$v2}" {eyou:if condition="isset($vo['trueValue']) AND in_array($v2, $vo['trueValue'])"}selected{/eyou:if}>{$v2}</option>
  296. {/eyou:volist}
  297. </select>
  298. </div>
  299. </div>
  300. </fieldset>
  301. </div>
  302. <!-- 下拉框 end -->
  303. {/eyou:case}
  304. <!-- 扩展 start -->
  305. <!-- 扩展 -->
  306. {eyou:case value="img"}
  307. <!-- 单张图 start -->
  308. <div class="form-group group_z">
  309. <div class="input-group input-group-icon">
  310. <input type="text" class=" form-control" id="{$vo.fieldArr}_{$vo.name|default=''}" name="{$vo.fieldArr}[{$vo.name|default=''}]" value="" style="display: none;"><!--{$vo.info|default=''}-->
  311. <input class=" form-control {$vo.fieldArr}_{$vo.name|default=''}_input" placeholder="{$vo.title}" onClick="GetUploadify(1,'','allimg','{$vo.fieldArr}_{$vo.name|default=''}_call_back','{:url('user/Uploadify/upload',['resource'=>'reg'])}')">
  312. </div>
  313. </div>
  314. <script type="text/javascript">
  315. function {$vo.fieldArr}_{$vo.name|default=''}_call_back(fileurl_tmp)
  316. {
  317. $("#{$vo.fieldArr}_{$vo.name|default=''}").val(fileurl_tmp);
  318. $(".{$vo.fieldArr}_{$vo.name|default=''}_input").val(fileurl_tmp);
  319. }
  320. </script>
  321. <!-- 单张图 end -->
  322. {/eyou:case}
  323. {eyou:case value="imgs"}
  324. <!-- 多张图 start -->
  325. <div class="form-group group_z images_upload_main">
  326. <div class="input-group">
  327. <button type="button" style="text-align: left;" class="form-control" onClick="GetUploadify(100,'','allimg','{$vo.fieldArr}_{$vo.name|default=''}_call_back', '', '{$vo.title}');">
  328. {$vo.title}<span style="float: right;font-size: 16px;">点击上传</span>
  329. </button>
  330. </div>
  331. <div style="margin: 5px 0;padding: 3px;border: 1px dashed #ebeced;display: none;" id="upload_imgs_{$vo.fieldArr}_{$vo.name|default=''}">
  332. <!--上传填充-->
  333. </div>
  334. <!-- 上传图片显示的样板 start -->
  335. <div class="{$vo.fieldArr}_{$vo.name|default=''}_upload_tpl" style="display: none;">
  336. <div class="fieldext_upload fieldext_upload_html">
  337. <div class="images_upload_item">
  338. <input type="hidden" name="{$vo.fieldArr}[{$vo.name|default=''}][]" value="">
  339. <a href="" >
  340. <img src="__STATIC__/admin/images/add-button.jpg" width="42" height="42">
  341. </a>
  342. <a class="delete" href="javascript:void(0)" title="删除"></a>
  343. </div>
  344. </div>
  345. </div>
  346. <!-- 上传图片显示的样板 end -->
  347. </div>
  348. <script type="text/javascript">
  349. var GetUploadify_url = "{:url('user/Uploadify/upload',['resource'=>'reg'])}";
  350. // 上传多图回调函数
  351. function {$vo.fieldArr}_{$vo.name|default=''}_call_back(paths){
  352. var last_div = $(".{$vo.fieldArr}_{$vo.name|default=''}_upload_tpl").html();
  353. for (var i=0;i<paths.length ;i++ )
  354. {
  355. if ($("#upload_imgs_{$vo.fieldArr}_{$vo.name|default=''} .fieldext_upload_html").length == 0) {
  356. $("#upload_imgs_{$vo.fieldArr}_{$vo.name|default=''}").css('display','');
  357. }
  358. $("#upload_imgs_{$vo.fieldArr}_{$vo.name|default=''}").append(last_div); // 插入一个 新图片
  359. $("#upload_imgs_{$vo.fieldArr}_{$vo.name|default=''} .fieldext_upload_html:last").find('a:eq(0)').attr('href',paths[i]).attr('onclick','').attr('target', "_blank");// 修改他的链接地址
  360. $("#upload_imgs_{$vo.fieldArr}_{$vo.name|default=''} .fieldext_upload_html:last").find('img').attr('src',paths[i]);// 修改他的图片路径
  361. $("#upload_imgs_{$vo.fieldArr}_{$vo.name|default=''} .fieldext_upload_html:last").find('a:eq(1)').attr('onclick',"{$vo.fieldArr}_{$vo.name|default=''}_ClearPicArr2(this,'"+paths[i]+"')").text('');
  362. $("#upload_imgs_{$vo.fieldArr}_{$vo.name|default=''} .fieldext_upload_html:last").find('input').val(paths[i]); // 设置隐藏域 要提交的值
  363. }
  364. }
  365. /*
  366. * 上传之后删除组图input
  367. * @access public
  368. * @val string 删除的图片input
  369. */
  370. function {$vo.fieldArr}_{$vo.name|default=''}_ClearPicArr2(obj,path)
  371. {
  372. $(obj).parent().parent().remove();
  373. if ($("#upload_imgs_{$vo.fieldArr}_{$vo.name|default=''} .fieldext_upload_html").length == 0) {
  374. $("#upload_imgs_{$vo.fieldArr}_{$vo.name|default=''}").css('display','none');
  375. }
  376. }
  377. </script>
  378. <!-- 多张图 end -->
  379. {/eyou:case}
  380. {case value="file"}
  381. {eyou:static file="/public/plugins/layui/css/layui.css" /}
  382. {eyou:static file="/public/plugins/layui/layui.js" /}
  383. <!-- 单个文件 start -->
  384. <div class="form-group group_z">
  385. <div class="input-group">
  386. <input type="text" id="{$vo.fieldArr}_{$vo.name|default=''}" name="{$vo.fieldArr}[{$vo.name|default=''}]" value="{$vo.dfvalue|default=''}" style="display: none;">
  387. <button type="button" style="text-align: left;" class="form-control" id="upload_{$vo.fieldArr}_{$vo.name|default=''}" >{$vo.title}<span style="float: right;font-size: 16px;" id="btntxt_file_{$vo.fieldArr}_{$vo.name|default=''}">点击上传</span></button>
  388. <!-- <a id="download_file_{$vo.fieldArr}_{$vo.name|default=''}" style="margin-left: 10px;text-decoration: underline;{eyou:notempty name='$vo.dfvalue' /}display: 'block';{eyou:else /}display: none;{/eyou:notempty}" {eyou:notempty name='$vo.dfvalue' /} href="{$vo.dfvalue|default=''}" download="{$vo.dfvalue|get_filename=###}" {/eyou:notempty}>
  389. <img src="__STATIC__/common/images/file.png" alt="" style="width: 16px;height: 16px;">下载附件
  390. </a> -->
  391. </div>
  392. </div>
  393. <script>
  394. $(function(){
  395. layui.use('upload', function(){
  396. var upload = layui.upload;
  397. //执行实例
  398. upload.render({
  399. elem: "#upload_{$vo.fieldArr}_{$vo.name|default=''}" //绑定元素
  400. ,url: "{:url('user/Uploadify/DownloadUploadFileAjax')}"
  401. ,exts: '{$vo.ext}'
  402. ,size: {$vo.filesize} //限制文件大小,单位 KB
  403. ,accept: 'file' //普通文件
  404. ,done: function(res){
  405. //上传完毕回调
  406. if (res.state=="SUCCESS"){
  407. layer.msg('上传成功!')
  408. $("#btntxt_file_{$vo.fieldArr}_{$vo.name|default=''}").text('已上传');
  409. // $("#{$vo.fieldArr}_{$vo.name|default=''}").val(res.url);
  410. // $("#download_file_{$vo.fieldArr}_{$vo.name|default=''}").css('display','');
  411. // $("#download_file_{$vo.fieldArr}_{$vo.name|default=''}").attr('href',res.url);
  412. // var arr = res.url.split("/");
  413. // var download = arr[arr.length-1];
  414. // $("#download_file_{$vo.fieldArr}_{$vo.name|default=''}").attr('download',download);
  415. // $("#download_file_{$vo.fieldArr}_{$vo.name|default=''}").css('color','#000');
  416. // $("#download_file_{$vo.fieldArr}_{$vo.name|default=''}").html('<img src="__STATIC__/common/images/file.png" alt="" style="width: 16px;height: 16px;">下载附件');
  417. }else {
  418. $("#btntxt_file_{$vo.fieldArr}_{$vo.name|default=''}").text('点击上传');
  419. // $("#download_file_{$vo.fieldArr}_{$vo.name|default=''}").css('display','');
  420. // $("#download_file_{$vo.fieldArr}_{$vo.name|default=''}").css('color','red');
  421. // $("#download_file_{$vo.fieldArr}_{$vo.name|default=''}").text(res.state);
  422. }
  423. }
  424. ,error: function(){
  425. //请求异常回调
  426. }
  427. });
  428. });
  429. })
  430. </script>
  431. <!-- 单个文件 end -->
  432. {/case}
  433. <!-- 扩展 end -->
  434. {/eyou:switch}
  435. {/eyou:volist}
  436. <style>
  437. /* 整个滚动条 */
  438. ::-webkit-scrollbar {
  439. width: 12px; /* 滚动条的宽度 */
  440. height: 12px; /* 滚动条的高度,对水平滚动条有效 */
  441. background-color: #f9f9fd; /* 滚动条的背景颜色 */
  442. }
  443. /* 滚动条轨道 */
  444. ::-webkit-scrollbar-track {
  445. border-radius: 10px;
  446. background: #e1e1e1; /* 轨道的背景颜色 */
  447. }
  448. /* 滚动条滑块 */
  449. ::-webkit-scrollbar-thumb {
  450. border-radius: 10px;
  451. background-color: #c1c1c1; /* 滑块的背景颜色 */
  452. border: 3px solid #e1e1e1; /* 滑块的边框和轨道相同的颜色,可以制造“边距”的效果 */
  453. }
  454. /* 滚动条滑块:悬停效果 */
  455. ::-webkit-scrollbar-thumb:hover {
  456. background-color: #a8a8a8; /* 滑块的悬停颜色 */
  457. }
  458. /* 滚动条滑块:激活时的效果 */
  459. ::-webkit-scrollbar-thumb:active {
  460. background-color: #888888; /* 滑块的激活颜色 */
  461. }
  462. /* 滚动条按钮(上下箭头) */
  463. ::-webkit-scrollbar-button {
  464. display: none; /* 通常情况下不显示滚动条按钮 */
  465. }
  466. /* Firefox */
  467. html {
  468. scrollbar-width: thin; /* "auto" | "thin" | "none" */
  469. scrollbar-color: #c1c1c1 #e1e1e1; /* 滑块颜色 轨道颜色 */
  470. }
  471. </style>