小程序 | wxss复用
定义 common.wxss 引用 @import "../common.wxss"
定义 common.wxss 引用 @import "../common.wxss"
使用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:
/** * 修改扩展配置文件 * @param array $arr 需要更新或添加的配置 * @param string $file 配置文件名(不需要后辍) * @return bool */ function extraconfig($arr = [], $file = 'extraconfig') { if (is_array($arr)) { $f
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
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