<template>
<view>
<canvas canvas-id="myCanvas"></canvas>
<navigator url="/pages/index/index">to pianter</navigator>
</view>
</template>
<script>
export default {
mounted() {
const ctx = uni.createCanvasContext('myCanvas')
var t = this
uni.getImageInfo({
src: 'https://cdndis.hnqiweikeji.com/static/img_hf/poster_bg.png',
success:(res)=> {
console.log('res.tempFilePath', res.path)
ctx.drawImage(res.path, 0, 0, 150, 100)
ctx.draw()
}
})
},
methods: {
getImageInfo(src) {
}
}
}
</script>
<style>
</style>
8***@qq.com (作者)
第一次启动app可以显示图片, 第二次再次渲染加载app 图片不展示
2023-04-10 14:30