iphone图片上传不了请指教
发布于 5 年前 作者 ligao 6802 次浏览 来自 问答

 模拟器上可以上传图片 安卓也可以 IOS不能上传 

3 回复

      count: 0,

      sizeType: [],

      sourceType: [],

请不要将这三个参数设置为空

wxml:    <view bindtap=“cimng” class=“img”></view>

wxss:

.img{

  width: 500rpx;

  height: 500rpx;

  background: red

}

js:

  cimng: function () {

    wx.chooseImage({

      count: 0,

      sizeType: [],

      sourceType: [],

      success: function (res) {

        wx.showModal({

          title: ‘’,

          content: ‘ok’,

          showCancel: true,

          cancelText: ‘’,

          cancelColor: ‘’,

          confirmText: ‘’,

          confirmColor: ‘’,

          success: function(res) {},

          fail: function(res) {},

          complete: function(res) {},

        })

        console.log(111)

      },

      fail: function (res) { },

      complete: function (res) { },

    })

  },

你好,请提供一下能复现问题的简单代码示例。

回到顶部