限时免费试用:欢迎注册 api.bigmodel.org ,快速体验大模型 API 接入服务。
当前位置:首页 >开发者

开发者

小程序 | 使用wxs当(过滤器)函数方法使用

使用wxs当(过滤器)函数方法使用: util/filter.wxs 定义 //定义 var format=function(text){ if(!text){ return } var reg = getRegExp('\\\\n','g') return text.replace(reg,'\n ') } //定义 // 限制字数 var limit =

小程序 | 时间

// components/epsoide/index.js Component({ /** * 组件的属性列表 */ properties: { index:{ type:String, //观察者模式 属性值被更改时的响应函数 observer:function(newVal,oldVal,changedPath){ // console.log(new

小程序 | 背景音乐

//实例化 const mMgr = wx.getBackgroundAudioManager() import { classicBeh } from '../classic-beh.js' const mMgr = wx.getBackgroundAudioManager() Component({ /** * 组件的属性列表 */ behaviors:

tp5设置永久配置项

/** * 修改扩展配置文件 * @param array $arr 需要更新或添加的配置 * @param string $file 配置文件名(不需要后辍) * @return bool */ function extraconfig($arr = [], $file = 'extraconfig') { if (is_array($arr)) { $f

php图片验证码显示不出来的解决过程

1.代码是否有问题 2.编码问题 3.是否开启gd库 4.缓存问题 使用ob_clean(),清除缓存。 ob_clean的作用就是用来丢弃输出缓冲区中的内容,如果你的有许多生成的图片类文件,那么想要访问正确,就要经常清除缓冲区。

小程序 | 获取用户信息

wxml 获取用户信息 js onGotUserInfo:function(event){ console.log(event.detail.errMsg)//getUserInfo:ok console.log(event.detail.userInfo)//用户信息 console.log(event.detail.rawData)//json形式的数据

小程序 | 分享给朋友

必须为button 类型为open-type="share" xml 分享给朋友 js /** * 分享 */ onShareAppMessage: function () { // var article_id = wx.getStorageSync('current_article_id'); var path = '/pages/index/index

小程序 | 点击预览多图并保存

wxml js data: { mz: [ 'http://t2.hddhhn.com/uploads/tu/201608/317/qlxs1dmwbi5.jpg', 'http://t2.hddhhn.com/uploads/tu/201706/395/c4.jpg', 'http://t2.hddhhn.com/uploads/tu/201704/101

实例 | 7个简单的curl实例

1. 抓取百度 $curl = curl_init("http://www.baidu.com"); curl_exec($curl); curl_close($curl); 2. 抓取百度并替换 $curl = curl_init(); curl_setopt($curl,CURLOPT_URL, "http://www.baidu.com");//设置u