小程序
小游戏
企业微信
微信支付
扫描小程序码分享
有没有哪位 大佬看一下是不是引入路径的问题 。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 } ] } }) } })
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
我也碰到了,开发工具自己添加了本地的路径。。。
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
//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 } ] } }) } })
我也碰到了,开发工具自己添加了本地的路径。。。