有没有哪位 大佬看一下是不是引入路径的问题 。VM5854:1 Failed to load local image resource /components/canvasdrawer/cloud://xiaomayun-8uvw8.7869-xiaomayun-8uvw8-1259535674/my-image.jpg
the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error)
有没有哪位 大佬看一下是不是引入路径的问题 。VM5854:1 Failed to load local image resource /components/canvasdrawer/cloud://xiaomayun-8uvw8.7869-xiaomayun-8uvw8-1259535674/my-image.jpg
the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error)
2 个回答
//index.js const app = getApp(); const db = wx.cloud.database({}); Page({ /** * 页面的初始数据 */ data: { painting:{}, shareImage:'', imgurl:'' }, onReady: function () { var that = this; }, onLoad:function(options){ let that =this; db.collection('imglist').get({ success(res){ console.log(res.data[0].imgurl); that.setData({ imgurl:res.data[0].imgurl// 获取的云开发上传的图片路径 }) } }) }, eventDraw: function () { let that = this; wx.showLoading({ title: '绘制图片', mask: true }); that.setData({ painting:{ width: 375, height: 555, clear: true, views:[ { type: 'image', // url: '../../images/bj.jpg', url: that.data.imgurl, top: 0, left: 0, width: 375, height: 555 } ] } }) } })
我也碰到了,开发工具自己添加了本地的路径。。。