- live-player 组件播放视频前的黑屏可以优化吗?
live-player 组件播放视频,mode=rtc 视频流是rtmp格式,播放视频,会有一段时间的黑屏这个可以优化吗
07-26 - sns/oauth2/component/access_toke 接口提示48001?
公众号授权第三方平台,调用提示48001。查看了第三方平台公众号权限集有用户管理,公众号接口权限也有access_token
2023-12-15 - chooseMedia 无法使用,已经授权了小程序隐私?
errMsg: "chooseMedia:fail api scope is not declared in the privacy agreement", errno: 112 已经授权隐私了 [图片] 版本库3.0.2
2023-09-20 - lottie动画在真机上,画面失帧,锯齿严重?
[图片] <view class='bannerHead' catchtap='getDes' data-curmodule='dx' > <canvas id="canvas" type="2d" style="width:730rpx;height:350rpx"></canvas> </view> wx.createSelectorQuery().select('#canvas').node(res => { const canvas = res.node; const context = canvas.getContext('2d'); wx.getImageInfo({ src:'https://leukehelp.bj.bcebos.com/banner-1.json', success:res => { console.log(res) }, fail: rej => { console.log(rej) } }) // canvas.width = 730;//设置宽高,也可以放到wxml中的canvas标签的style中 // canvas.hight = 300; lottie.setup(canvas)//要执行动画,必须调用setup,传入canvas对象 lottie.loadAnimation({//微信小程序给的接口,调用就完事了,原理不太懂 loop: true,//是否循环播放(选填) autoplay: true,//是否自动播放(选填) path:'https://leukehelp.bj.bcebos.com/banner-1.json',//lottie json包的网络链接,可以防止小程序的体积过大,要注意请求域名要添加到小程序的合法域名中 rendererSettings: { context, }, }) }).exec()
2019-12-21 - 获取的小程序二维码图片失败?
// 云函数入口文件 const cloud = require('wx-server-sdk'); cloud.init(); const { WXMINIUser WXMINIQR } = require('wx-js-utils'); const appId = ''; // 小程序 appId const secret = ''; // 小程序 secret // 获取小程序码,A接口 let wXMINIUser = newWXMINIUser({ appId, secret }); // 一般需要先获取 access_token // 云函数入口函数 exports.main = async (event, context) => { let access_token = await wXMINIUser.getAccessToken(); let wXMINIQR = newWXMINIQR(); let qrResult = await wXMINIQR.getMiniQR({ scene: `?agent=${event.agent}&name=${event.name}&mobile=${event.mobile} access_token, path: 'src/register/index' is_hyaline: true }); return await cloud.uploadFile({ cloudPath:'qr.jpg', fileContent: qrResult }) 存储的二维码图片无法打开
2019-12-18 - 在一个页面里用f2图表插件,生成俩个图表,第二个图表就会报错是什么问题?
[代码]initChart_cate(canvas, width, height) { [代码][代码]// 使用 F2 绘制图表[代码][代码] [代码][代码]let cur_cate_order = [代码][代码]this[代码][代码].data.cur_cate_order;[代码][代码] [代码][代码]let data = [];[代码][代码] [代码][代码]for[代码][代码](let i = 0; i < cur_cate_order.length; i++){[代码][代码] [代码][代码]let name = cur_cate_order[i].cate;[代码][代码] [代码][代码]if[代码][代码](name.length > 4){[代码][代码] [代码][代码]name = name.slice(0,4) + [代码][代码]'...'[代码][代码];[代码][代码] [代码][代码]}[代码][代码] [代码][代码]data.push({[代码][代码] [代码][代码]label:name,[代码][代码] [代码][代码]type:[代码][代码]'销售额'[代码][代码],[代码][代码] [代码][代码]value:cur_cate_order[i].total_price[代码][代码] [代码][代码]},{[代码][代码] [代码][代码]label:name,[代码][代码] [代码][代码]type:[代码][代码]'成本'[代码][代码],[代码][代码] [代码][代码]value:cur_cate_order[i].total_cost[代码][代码] [代码][代码]})[代码][代码] [代码] [代码] [代码][代码]};[代码][代码] [代码] [代码] [代码][代码]var[代码] [代码]chart_cate = [代码][代码]new[代码] [代码]F2.Chart({[代码][代码] [代码][代码]el: canvas,[代码][代码] [代码][代码]width,[代码][代码] [代码][代码]height[代码][代码] [代码][代码]});[代码][代码] [代码] [代码] [代码][代码]chart_cate.source(data.reverse(), {[代码][代码] [代码][代码]value: {[代码][代码] [代码][代码]tickCount: 5[代码][代码] [代码][代码]}[代码][代码] [代码][代码]});[代码][代码] [代码][代码]chart_cate.coord({[代码][代码] [代码][代码]transposed: [代码][代码]true[代码][代码] [代码][代码]});[代码][代码] [代码] [代码] [代码][代码]chart_cate.tooltip({[代码][代码] [代码][代码]custom: [代码][代码]true[代码][代码], [代码][代码]// 自定义 tooltip 内容框[代码][代码] [代码][代码]onChange: [代码][代码]function[代码] [代码]onChange(obj) {[代码][代码] [代码][代码]var[代码] [代码]legend = chart_cate.get([代码][代码]'legendController'[代码][代码]).legends.top[0];[代码][代码] [代码][代码]var[代码] [代码]tooltipItems = obj.items;[代码][代码] [代码][代码]var[代码] [代码]legendItems = legend.items;[代码][代码] [代码][代码]var[代码] [代码]map = {};[代码][代码] [代码][代码]legendItems.map([代码][代码]function[代码][代码](item) {[代码][代码] [代码][代码]map[item.name] = F2.Util.mix({}, item);[代码][代码] [代码][代码]});[代码][代码] [代码][代码]tooltipItems.map([代码][代码]function[代码][代码](item) {[代码][代码] [代码][代码]var[代码] [代码]name = item.name;[代码][代码] [代码][代码]var[代码] [代码]value = item.value;[代码][代码] [代码][代码]if[代码] [代码](map[name]) {[代码][代码] [代码][代码]map[name].value = value;[代码][代码] [代码][代码]}[代码][代码] [代码][代码]});[代码][代码] [代码][代码]legend.setItems(Object.values(map));[代码][代码] [代码][代码]},[代码][代码] [代码][代码]onHide: [代码][代码]function[代码] [代码]onHide() {[代码][代码] [代码][代码]var[代码] [代码]legend = chart_cate.get([代码][代码]'legendController'[代码][代码]).legends.top[0];[代码][代码] [代码][代码]legend.setItems(chart_cate.getLegendItems().country);[代码][代码] [代码][代码]}[代码][代码] [代码][代码]});[代码][代码] [代码][代码]chart_cate.axis([代码][代码]'label'[代码][代码], {[代码][代码] [代码][代码]line: F2.Global._defaultAxis.line,[代码][代码] [代码][代码]grid: [代码][代码]null[代码][代码] [代码][代码]});[代码][代码] [代码][代码]chart_cate.axis([代码][代码]'value'[代码][代码], {[代码][代码] [代码][代码]line: [代码][代码]null[代码][代码],[代码][代码] [代码][代码]grid: F2.Global._defaultAxis.grid,[代码][代码] [代码][代码]label: [代码][代码]function[代码] [代码]label(text, index, total) {[代码][代码] [代码][代码]var[代码] [代码]textCfg = {};[代码][代码] [代码][代码]if[代码] [代码](index === 0) {[代码][代码] [代码][代码]textCfg.textAlign = [代码][代码]'left'[代码][代码];[代码][代码] [代码][代码]} [代码][代码]else[代码] [代码]if[代码] [代码](index === total - 1) {[代码][代码] [代码][代码]textCfg.textAlign = [代码][代码]'right'[代码][代码];[代码][代码] [代码][代码]}[代码][代码] [代码][代码]return[代码] [代码]textCfg;[代码][代码] [代码][代码]}[代码][代码] [代码][代码]});[代码][代码] [代码][代码]chart_cate.interval().position([代码][代码]'label*value'[代码][代码]).color([代码][代码]'type'[代码][代码]).adjust({[代码][代码] [代码][代码]type: [代码][代码]'dodge'[代码][代码],[代码][代码] [代码][代码]marginRatio: 1 / 32[代码][代码] [代码][代码]});[代码][代码] [代码][代码]chart_cate.render();[代码][代码] [代码][代码]},[代码][图片] 是我用了延迟加载的关系? [图片] [图片]
2019-09-13