Where possible begins

希望你喜欢这里。有问题,请提问,或搜索现有帖子。

真诚、友善、团结、专业,共建你我引以为荣之社区。《常见问题解答》

zfsys_sso_7
zfsys_sso_7 普通用户 10-15 21:06

vant/area-data地址库地址

资源分享

.. ``` vant/area-data地址库地址 https://classic.yarnpkg.com/en/package/@vant/area-data https://cdn.jsdelivr.net/npm/@vant/area-data@1.5.1/dist/index.esm.mjs ```

27

zfsys_sso_7
zfsys_sso_7 普通用户 10-15 21:04

分享个在线翻译的js,可用作网站多语言

资源分享

代码地址: https://gitee.com/mail_osc/translate 演示地址: https://res.zvo.cn/translate/demo.html 翻译还是有点差强人意 ``` <script src="https://cdn.staticfile.net/translate.js/3.1.7/translate.js"></script> <script> // 获取保存的语言设置 var savedLang = localStorage.getItem('browserLang') || 'zh'; console.log('保存的语言:', savedLang); // 设置默认语言 translate.language.setLocal('english'); // 根据保存的语言设置进行翻译 if (savedLang === 'zh') { // translate.changeLangua

24

zfsys_sso_7
zfsys_sso_7 普通用户 10-15 20:28

将 Chrome 浏览器默认搜索引擎替换成 GPTSearch

讨论专区

## 配置 打开google浏览器配置 chrome://settings/search ![](//storage-x1.90ckm.com/uploads/beb8b8cc89e739e44c1421a8a6c6b064/20241015_29633iShot_2024-10-15_20.22.51.png) ``` 官网 https://chatgpt.com/?hints=search&q=%s 始皇GPT https://shared.oaifree.com/?hints=search&q=%s 二选一,需要翻墙 ``` ![](//storage-x1.90ckm.com/uploads/beb8b8cc89e739e44c1421a8a6c6b064/20241015_21531iShot_2024-10-15_20.23.20.png) ## 使用 @gpt_search空格,然后输入你的问题 ![](//storage-x1.90ckm.com/uploads/beb8b8cc89e739e44c1421a8

40

zfsys_sso_9
zfsys_sso_9 普通用户 10-15 15:14

链接失效

讨论专区

http://pan.baidu.com/s/1eQEnzSA http://pan.baidu.com/s/1hqCN2Ag 失效了

34

Hello
Hello 普通用户 10-15 14:50

点击绽放彩带

资源分享

``` <!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <title>彩带效果</title> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background-color: #f0f0f0; } button { font-size: 18px; padding: 10px 20px; } #confetti-canvas { position: fixed; top

28

Hello
Hello 普通用户 10-15 14:46

html加载效果

资源分享

![](//storage-x1.90ckm.com/uploads/beb8b8cc89e739e44c1421a8a6c6b064/20241015_78496101108jiic94c833z9a3zr.png) ``` <div class="loader"></div> function showLoader() { $('.loader').show(); } function hideLoader() { $('.loader').hide(); } .loader { border: 4px solid rgba(0, 0, 0, 0.1); border-radius: 50%; border-top: 4px solid #3498db; width: 60px; height: 60px; animation: spin 2s linear infinite; position: fixed; top: 50%; left: 50%;

26

Hello
Hello 普通用户 10-15 12:11

页面使用editormd展示html

开发调优

``` <link rel="stylesheet" href="/public/static/zfcms/style/meditor/css/editormd.preview.css" /> <script src="/public/static/zfcms/style/meditor/lib/marked.min.js"></script> <script src="/public/static/zfcms/style/meditor/lib/prettify.min.js"></script> <script src="/public/static/zfcms/style/meditor/lib/raphael.min.js"></script> <script src="/public/static/zfcms/style/meditor/lib/underscore.min.js"></script> <script src="/public/static/zfcms/style/meditor/lib/sequence-diagram.min.js"></scr

35

Hello
Hello 普通用户 10-15 11:00

测试

讨论专区

aaa 123 1333

102

子枫
子枫 [Rainy] 10-10 16:50

php 导入表格去除样式,代码仅供参考

子枫cmsX2

``` public function import_demo(){ // 设置PHP默认字符集为UTF-8 ini_set('default_charset', 'UTF-8'); //获取表格的大小,限制上传表格的大小5M $file_size = $_FILES['file']['size']; if ($file_size > 5 * 1024 * 1024) { $this->error('文件大小不能超过5M'); exit(); } // dd($file_size); //限制上传表格类型 $fileExtendName = substr(strrchr($_FILES['file']["name"], '.'), 1); //application/vnd.ms-excel 为xls文件类型 if ($fileE

41

子枫
子枫 [Rainy] 09-29 11:49

页面拉动到id="kecheng" 的位置

开发调优

``` $(document).ready(function() { var ccid = {$ccid}; if(ccid != 10){ $('html, body').animate({ scrollTop: $('#kecheng').offset().top }, 1000); // 页面滚动时间为1秒 } }); ```

49

子枫
子枫 [Rainy] 09-27 16:37

widget_st样式引用

子枫cmsX2

``` {:widget_st('layui','css')} {:widget_st('admin','css')} {:widget_st('tailwind','css')} {:widget_st('jq','js')} {:widget_st('laydate','js')} {:widget_st('layui','js')} {:widget_st('layer','js')} {:widget_st('common','js')} {:widget_st('webuploader')} {:widget_st('ueditor')} {:widget_st('bootstrap')} {:widget_st('input-tag')} {:widget_st('viewer')} {:widget_st('tinymce')} {:widget_st('meditor')} {:widget_st('wangEditor')} {:widget_st('vditor')} {:widget_

46

Hello
Hello 普通用户 09-27 15:39

动态svg显示在img中

开发调优

![](//storage-x1.90ckm.com/uploads/beb8b8cc89e739e44c1421a8a6c6b064/20240927_87833iShot_2024-09-27_15.39.18.png) ## 前台显示 img ``` <img src="/api?text=未授权1"> ``` ## 服务端 ``` $this->show_text_img('未授权1'); private function show_text_img($text){ ob_clean(); $svg = $this->createSvg($text); // 调试信息 error_log("Generate method called. Text: " . $text); error_log("SVG content: " . $svg); header('Content-Type: image/s

53

子枫
子枫 [Rainy] 09-26 13:48

get_post_list_v2参考

子枫cmsX2

``` $_append_list = get_post_list_v2(['child'=>1,'cid'=>2,'where'=>[['p.status','=',1],['p.id','in',$v['append']]]]); ```

39

子枫
子枫 [Rainy] 09-26 11:30

常用的form_widget 写法

子枫cmsX2

常用的form_widget 写法 ``` add {$form_widget->form_input(['title'=>'标题','name'=>'title','data'=>'','theme'=>1])|raw} {$form_widget->form_textarea(['title'=>'描述','name'=>'summary','data'=>'','theme'=>1])|raw} {$form_widget->form_input_tag(['title'=>'Tag','name'=>'tags','data'=>'','theme'=>1])|raw} {$form_widget->filesystem_album(['title'=>'图集','name'=>'album','data'=>'','theme'=>1])|raw} {$form_widget->form_ueditor(['title'=>'内容详情','name'=>'content','data'=>'','theme'=>1])|raw} {$form_widget

43

子枫
子枫 [Rainy] 09-26 10:08

常用内容模型

子枫cmsX2

标题-描述-排序 ``` [{"position":1,"name":"\u6807\u9898","key":"title","value":"","type":"form_input","status":1,"readonly":0,"hidden":0,"sort":0,"is_multi":0,"token":"","theme":1,"append1":null,"append2":null,"append3":null,"lang":"","lang_pid":0,"notes":null},{"position":1,"name":"\u5185\u5bb9","key":"summary","value":"","type":"form_textarea","status":1,"readonly":0,"hidden":0,"sort":0,"is_multi":0,"token":"","theme":1,"append1":"","append2":"","append3":"","lang":"","lang_pid":0,"notes":""},{"pos

45