个人案例
- 开发工具报错@babel/runtime/helpers/...?
开发工具报错 预发布版 RC Build (1.05.2203251 | 1.06.2203251)Error: module '@babel/runtime/helpers/unsupportedIterableToArray.js' is not defined [图片]
2022-04-18 - dateToString()日期对象格式化输出错误?
createAt: db.serverDate()创建的日期,通过$.dateToString()格式化输出 const result = await db.collection('UserData') .aggregate() .match({ userId: wxContext.UNIONID, status: 'Effect', }).addFields({ at: $.dateToString({ date: '$createAt', format: '%Y-%m-%d %H:%M', timezone: 'Asia/Shanghai', }) }).end(); 输出结果不显示%H:%M [图片]
2022-04-01 - 录音功能的回调函数onStart()、onPause()返回undefined?
录音功能的回调函数onStart()、onPause()返回undefined?
2022-03-23 - 小程序不支持clip-path: path()吗?
小程序clip-path: path()使用后没有效果; path('M0.5,1 C0.5,1,0,0.7,0,0.3 A0.25,0.25,1,1,1,0.5,0.3 A0.25,0.25,1,1,1,1,0.3 C1,0.7,0.5,1,0.5,1 Z')的路径是svg里面导出来的。 .test { height: 500px; background: rgba(255, 255, 255, 0.36); backdrop-filter: blur(4px); position: absolute; left: 0; right: 0; top: 76vh; clip-path: path('M0.5,1 C0.5,1,0,0.7,0,0.3 A0.25,0.25,1,1,1,0.5,0.3 A0.25,0.25,1,1,1,1,0.3 C1,0.7,0.5,1,0.5,1 Z'); } 如果不支持clip-path: path()那有什么方法可以实现下图效果, 以为有毛玻璃效果,不能通过导出png实现,所以只能用代码写。 [图片] 相关语法 [图片]
2022-03-08 - 基础库2.22.1,wx.cloud.uploadFile报错wx is not defined?
基础库2.22.1,wx.cloud.uploadFile报错:wx is not defined; 换回2.21.3就不会报错; WAServiceMainContext.js:2 Unhandled promise rejection ReferenceError: wx is not defined [图片]
2022-03-01 - 小程序要求用户上传身份证照片,后台人工审核,可以上线吗?
小程序要求用户上传身份证照片,后台人工审核,可以上线吗?
2022-02-28 - 从page-container跳转下一页面,再返回,page-container页返回按钮无效?
page-container组件、开发工具最新版、基础库2.22; 问题描述:从首页跳转详情页,在详情页打开page-container并跳转编辑页(编辑页在分包中),再从编辑页返回详情页后,详情页的返回按钮失效,无法返回首页。只有再次打开page-container并关闭,返回按钮才有效。 代码片段: https://developers.weixin.qq.com/s/eRkZy2mh7Dxc
2022-02-13 - rich-text 富文本组件自定义的nodes如何修改?
rich-text 富文本组件自定义的nodes如何修改? 自定义nodes模块 const imgGrid = function () { const obj = { name: 'p', attrs: { class: 'rich-grid-2' }, children: [ { name: 'div', attrs: { class: 'img-grid' }, children: [ { name: 'img', attrs: { class: 'img-case', src: '' } } ] }, { name: 'div', attrs: { class: 'img-grid' }, children: [ { name: 'img', attrs: { class: 'img-case', src: '' } } ] }, { name: 'div', attrs: { class: 'grid-icon' }, children: [ { type: 'text', text: 'Vs' } ] } ] }; return obj }; export { imgGrid } js onLoad: function (options) { let imgGrid2 = imgGrid(); imgGrid2.children[0].children[0].attrs.src = ''; imgGrid2.children[1].children[0].attrs.src = ''; const h2 = header_h2(); const text = content(); h2.children[0].text = '智商税征收机'; text.children[0].text = '智商税征收机'; const text2 = text; const h3 = h2 this.setData({ nodes: [...this.data.nodes, h2, imgGrid2, text, h3, text2] }); console.log("nodes => ", this.data.nodes); }, [图片] wxml <rich-text nodes="{{nodes}}"></rich-text>
2022-01-27 - echarts 饼图不显示?
echarts 饼图不显示,柱形图可以正常显示。 [图片] const app = getApp(); import * as echarts from '../../components/ec-canvas/echarts'; var pieChart; Page({ data: { ecPie: { disableTouch: true, lazyLoad: true }, }, onLoad() { this._initPieChart(); }, _initPieChart: function () { this.chart2Componnet = this.selectComponent('#pie-chart'); this.chart2Componnet.init((canvas, width, height, dpr) => { pieChart = echarts.init(canvas, null, { width: width, height: height, devicePixelRatio: dpr }); canvas.setChart(pieChart); pieChart.setOption(this._getPieOption()); console.log("pieChart(23) => ", pieChart); return pieChart; }); }, _getPieOption: function () { let option = option = { tooltip: { trigger: 'item' }, legend: { top: '5%', left: 'center' }, series: [ { name: 'Access From', type: 'pie', radius: ['40%', '70%'], avoidLabelOverlap: false, itemStyle: { borderRadius: 10, borderColor: '#fff', borderWidth: 2 }, label: { show: false, position: 'center' }, emphasis: { label: { show: true, fontSize: '40', fontWeight: 'bold' } }, labelLine: { show: false }, data: [ { value: 1048, name: 'Search Engine' }, { value: 735, name: 'Direct' }, { value: 580, name: 'Email' }, { value: 484, name: 'Union Ads' } ] } ] }; return option }, }) <view class="pie_chart"> <ec-canvas id="pie-chart" canvas-id="pie-chart" ec="{{ ecPie }}"></ec-canvas> </view>
2022-01-21 - 云开发 存储 getaddrinfo ENOTFOUND 出问题了吗?
[图片]
2022-01-18