Where possible begins

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

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

子枫
子枫 [Rainy] 03-29 11:39

zfcms更新系统sql新增多种方式

子枫cmsX2

格式是一样的,只是调用方法不同 1.直接调用(不推荐使用) ``` 'v0.0.3'=>$this->v0_0_3(), ``` 2.方法(新增) 在文件/application/common/controller/updateSql.php中方法__construct新增 ``` 'v0.240315'=>['type'=>'function','name'=>'v0_240315'], ``` 然后写对应的方法 3.文件(新增)(推荐使用) ![](//storage-x1.90ckm.com/uploads/beb8b8cc89e739e44c1421a8a6c6b064/20240329_40288微信截图_20240329113141.png) 这种方式不需要调用,直接写文件即可

179

子枫
子枫 [Rainy] 03-28 14:21

ueditor简单的参数

讨论专区

``` 'fullscreen', 'source', '|', 'undo', 'redo', '|', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|', 'rowspacingtop', 'rowspacingbottom', 'lineheight', '|', 'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|', 'directionalityltr', 'directionalityrtl', 'indent', '|'

152

子枫
子枫 [Rainy] 03-20 10:42

easywechat退款参考

开发调优

退款参考 ``` public function qx_order(){ $this->config = [ 'app_id' => 'wx6********9719', 'secret' => 'e2e3e**********0194ab3d6596fd', // 指定 API 调用返回结果的类型:array(default)/collection/object/raw/自定义类名 // 'response_type' => 'array', 'mch_id' => '151*********', 'key' => 'AAA66666666666666666666666666666', 'cert_path' => './cert/apiclient_cert.pem', // optional,退款等情况时用到 'key_path' => './cert/apiclient_key.pem',// optional,退款等情况时用到 // 'notify_u

181

子枫
子枫 [Rainy] 03-18 17:17

判断页面是否引入jq,如果没有则引入

开发调优

``` window.jQuery || document .write("<script src='/public/static/zfcms/style/jquery-1.8.3/jquery-1.8.3.min.js'>" + "<"+"/script>"); setTimeout(() => { if (typeof jQuery !== 'undefined') { console.log('jq已引用') } else { console.log('页面jQuery未引用,无法进行相关操作') } },100) ```

159

子枫
子枫 [Rainy] 03-18 11:25

小程序rich-text组件如何改变内部img图片样式的方法

开发调优

小程序rich-text组件如何改变内部img图片样式的方法 页面使用 ``` <rich-text nodes="{{content}}"></rich-text> ``` js获取后进行处理 ``` content = content.replace(/<p([\s\w"=\/\.:;]+)((?:(style="[^"]+")))/ig, '<p') .replace(/<p>/ig, '<p style="font-size: 15px; line-height: 25px;">') .replace(/<img([\s\w"-=\/\.:;]+)((?:(height="[^"]+")))/ig, '<img$1') .replace(/<img([\s\w"-=\/\.:;]+)((?:(width="[^"]+")))/ig, '<img$1') .replace(/<img([\s\w"-=\/\.:;]+)((?:(style="[^"]+")))/ig, '<img$1') .replace(/<img([\s\w"-=\/\.:;]

167

子枫
子枫 [Rainy] 03-16 15:09

推荐个好用的Tailwind库

讨论专区

https://www.hyperui.dev/

157

子枫
子枫 [Rainy] 03-14 15:31

分享-只有一个html文件的 ChatGPT 聊天网页

讨论专区

github地址是 https://github.com/lin2025/gpt3.5 真的只有一个文件 用的是vue ![](https://camo.githubusercontent.com/9068b7ddae9239c8108138decd31ab83fbc3e68b6fc1506233af387855186b71/68747470733a2f2f6c696e323032352e6769746875622e696f2f696d672f6f746865722d303730352e676966)

154

子枫
子枫 [Rainy] 03-14 11:50

分享给gpt提示词-用于截图生成前端代码

讨论专区

提示词如下 ``` You are an expert Tailwind developer You take screenshots of a reference web page from the user, and then build single page apps using Tailwind, HTML and JS. You might also be given a screenshot of a web page that you have already built, and asked to update it to look more like the reference image. - Make sure the app looks exactly like the screenshot. - Pay close attention to background color, text color, font size, font family, padding, margin, border, etc. Match the

183

子枫
子枫 [Rainy] 03-13 15:48

mysql格式化时间戳为时间

开发调优

DATE_FORMAT(FROM_UNIXTIME(ctime), "%Y-%m-%d %H:%i:%s") AS push_time ``` Db::name('aaaaa')->field('title,version,DATE_FORMAT(FROM_UNIXTIME(ctime), "%Y-%m-%d") AS push_time')->where([['post_id','=',$res['id']],['file','<>',''],['status','=',1]])->order('id desc')->limit(10)->select(); ```

148

子枫
子枫 [Rainy] 03-08 17:25

ZFCMS插件中的使用记录240308

子枫cmsX2

插件中的静态默认路径 : {$plug_static} 保存当前的链接: session('zf_login_tap_url',request()->url()); 获取插件保存在数据库中数据: $plugin_data = $this->Yun->get_plugin_config_db('addons','','zf_store_softclientv2'); 获取模板保存在数据库中数据: $theme_data = $this->Yun->get_plugin_config_db($this->zf_tpl_suffix,'theme','');

170

子枫
子枫 [Rainy] 03-08 09:51

子枫CMS内容模板使用form_time

子枫cmsX2

time_type可使用类型: year 年选择器,只提供年列表选择 month 年月选择器,只提供年、月选择 date 日期选择器(默认),可选择:年、月、日选择 time 时间选择器,只提供时、分、秒选择 datetime 日期时间选择器,可选择:年月日、时分秒 ![](//storage-x1.90ckm.com/uploads/beb8b8cc89e739e44c1421a8a6c6b064/20240308_196332.png)

156

子枫
子枫 [Rainy] 03-08 09:48

子枫CMS 内容模型使用select

子枫cmsX2

如果使用 ['上海','江苏','南京']这种形式的数据时,可以如下设置 ![](//storage-x1.90ckm.com/uploads/beb8b8cc89e739e44c1421a8a6c6b064/20240308_851711.png)

151

子枫
子枫 [Rainy] 03-07 14:29

分享个纯前端图片加水印

讨论专区

身份证加水印如何不想上传到第三方呢? 推荐这个 纯前端制作 http://watermark.dxcweb.com/

214

子枫
子枫 [Rainy] 03-05 14:42

PHP 根据日期获取节气

开发调优

有两种方式 第一种(不准确,会有误差) ``` function getJieQi($_year,$month,$day) { $year = substr($_year,-2)+0; $coefficient = array( array(5.4055,2019,-1),//小寒 array(20.12,2082,1),//大寒 array(3.87),//立春 array(18.74,2026,-1),//雨水 array(5.63),//惊蛰 array(20.646,2084,1),//春分 array(4.81),//清明 array(20.1),//谷雨 array(5.52,1911,1),//立夏

177

子枫
子枫 [Rainy] 03-02 17:50

子枫CMS系统升级240302

子枫cmsX2

``` - [x] 重写 authentication_sys.html页面 - [x] 删除一些不必要的静态文件 ```

167