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 25KB

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