我想将从本地获取的图片地址添加到我自己的数据库中并且替换掉之前数据库中的图片地址该怎么做呢?
发布于 5 年前 作者 yong22 8632 次浏览 来自 问答
addLogo: function() {
        var _this = this
        console.log("添加LOGO")
        wx.chooseImage({
            count1,
            sizeType: ['original''compressed'],
            sourceType: ['album''camera'],
            success(res) {
                console.log("xxxxxxxxxx")
                    // tempFilePath可以作为img标签的src属性显示图片
                const tempFilePaths = res.tempFilePaths
                console.log(tempFilePaths)
                _this.setData({
                    logopath: tempFilePaths[0],
                })
            }
        })
    }

 

1 回复

不是,你具体遇到了什么问题?不会使用数据库?

如是用云数据库可以看下云开发官方文档:https://developers.weixin.qq.com/miniprogram/dev/wxcloud/guide/

回到顶部