首页
系统
阅读
工具
文档
登录
系统对象方法
系统DOM方法
卡片套件合集
页面加载[pagemid]
消息弹窗[msg]
提示弹出[alert]
确认框[confirm]
选择弹窗[prompt]
扩展插件[plugin]
转盘[wheel]
轮播图[slide]
系统对象方法
什么是系统对象方法?
直接基于$Q的方法
常用方法
$Q.arrtostr(ctx,lmt)
数组转字符串
$Q.arr2str(ctx,lmt)
arrtostr的别名
$Q.arraybuffer2string(arraybuffer,encoding)
二进制对象转字符串
$Q.base64encode(stream)
base64编码
$Q.base64decode(stream)
base64解码
$Q.clearParam()
清空参数
$Q.code2str:function(code)
代码转显示字符串
$Q.code2str:function(code)
代码转显示字符串
$Q.createElement(tagName)
创建一个元素
$Q.createID(scale,isRand)
创建唯一ID
$Q.deg2range(deg)
角度转幅度
$Q.range2deg(range)
幅度转角度
$Q.extend(object,extobject)
深度复制
$Q.fetch(opts)
Fetch请求
$Q.filebyte2size(b)
字节大小转文件大小
$Q.filesize2byte(t)
文件大小转字节大小
$Q.getCssparam(name)
获取一个CSS参数
$Q.getParam(n)
获取一个参数
$Q.isFullscreen()
判定是否全屏
$Q.isIos()
判断是否苹果端
$Q.isMobile()
判断是否移动端
$Q.isWeixin(o)
判断是否微信体系
$Q.jsonDecode(o)
jsondecode
$Q.jsonEncode(o)
jsonencode
$Q.jump(link,scene)
页面跳转
$Q.loadjs(path,_ckb,opts)
载入JS
$Q.loadcss(path,_ckb)
载入CSS
$Q.md5(a)
字符串MD5
$Q.html2text(s,c)
Html转text
$Q.inArray(need,ordarr)
判断字符串是否在数组中
$Q.int2unit(int)
数字转带单位的数字
$Q.int2filesize(int)
数字转文件大小
$Q.intotime(timestamp)
时间戳显示
$Q.opts(opts,init,defcode)
参数格式化
$Q.pageCancel(name)
关闭子页面
$Q.parseHTML(a,justDom,plabel)
字符串转HTML代码
$Q.parseJSON(s)
字符串转JSON
$Q.parseXML(xmlString)
字符串转XML
$Q.postMessage(name,message)
页面通讯
$Q.priceEncode(code)
数字转价格
$Q.priceDecode(code)
价格转数字
$Q.quitFullscreen(callback)
退出全屏
$Q.rand()
随机数生成器,跟随系统
$Q.random(num_min,num_max)
随机数生成器
$Q.randRgb()
随机一个RGB颜色
$Q.removeParam(n)
移除一个参数
$Q.renderPartial(code,data)
代码片段解析
$Q.screenHorizontal()
切换为横屏
$Q.screenVertical()
切换为竖屏
$Q.setCssparam(name,value)
设置CSS的参数
$Q.setParam(name,value)
设置前端参数
$Q.stopEvent(evt)
停止事件后续执行
$Q.stringifyJSON(o)
字符串转JSON字符串
$Q.strtoarr(ctx,lmt)
字符串转数组
$Q.strTobinary(str,limiter)
字符串转二进制代码
$Q.strspad(s,c,l)
左侧填补字符串到指定长度
$Q.strepad(s,c,l)
右侧填补字符串到指定长度
$Q.strtoupper(s)
字符串大写
$Q.strtolower(s)
字符串小写
$Q.strtoworder(s)
字符串转驼峰写法
$Q.text2char(stream)
字符串转二进制字符串
$Q.timeformat(code)
时间格式化
$Q.trim(code)
去除字符串首尾空格
$Q.unitlen2int(code)
其它单位转像素
$Q.url(base,query)
组装URL
$Q.urlDecode(code)
URL链接转HASH
$Q.urlEncode(code)
HASH转URL链接
$Q.waiting(timelen,_callback,id)
防重复执行策略
$Q.validata(type,data)
常用数据验证
$Q.warn(msg,code)
提示日志
高级方法
$Q.ajax(config)
正常的AJAX
$Q.ajaxGet(url,dataType,success,error)
快速GET使用AJAX
$Q.ajaxPost(url,data,success,error)
快速POST使用AJAX
$Q.alert(opts)
alert卡片
$Q.broken(config)
一个折线图
$Q.canvas(opts)
一个画布
$Q.card(opts)
一个卡片
$Q.chartPie(opts)
一个饼图
$Q.color(opts)
一个颜色选择卡片
$Q.confirm(opts)
confirm卡片
$Q.cursor()
一个光标
$Q.date(options)
日期时间对象
$Q.debug(dataer)
页面调试
$Q.Editor()
一个编辑器核心
$Q.file(opts)
一个文件
$Q.flow(func,data,timelen)
一个流程
$Q.form(opts)
一个FORM表单
$Q.image(opts)
一个图片
$Q.msg(opts)
MSG卡片
$Q.imgs(config)
图片合集显示
$Q.loading(status)
loading
$Q.matrix(row,col)
矩阵使用
$Q.pageload(config)
子页面加载
$Q.loadpage(config)
$Q.pageload(config)别名
$Q.pagemdi(opts)
创建MDI子页面
$Q.prompt(opts)
prompt卡片
$Q.proxy(opts)
服务代理数据请求
$Q.socket(opts)
WebSocket客户端使用
$Q.upload(config)
文件上传
$Q.Url(url,query)
解析为URL对象
幻冰小站提供技术支持