在安卓上wx.request和wx.chooseImage的问题
发布于 6 年前 作者 iliao 18658 次浏览 来自 问答

一个是wx.request会出错,返回request:fail ssl hand shake error,服务器用的是let’s encrypt的证书,nginx配置如下:

        #ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;

        ssl_ciphers AES128+EECDH:AES128+EDH:!aNULL;

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

        ssl on;


        ssl_certificate     /root/ssl/chained.pem;

        ssl_certificate_key /root/ssl/domain.key;

在iOS上一切正常。

还有一个问题是在安卓上使用wx.chooseImage能正常进入success并获取图片,但是之后屏幕会闪一下然后就跟刷新了一样,还触发了onShow

on_add_pic:function(){
  if (uploading)return;
  var that = this;
  wx.chooseImage({
    count:1,
    sizeType: ['compressed'],
    sourceType: ['album','camera'],
    success: function(res) {
      var p_list = that.data.pic_list;
      if (p_list.length < 3)
      {
        p_list.push(res.tempFilePaths[i]);
      }
      that.setData({ pic_list: p_list});
    },
    fail:function(){},
    complete:function(){}
  });
},
1 回复

wx.chooseImage点了取消也会导致页面刷新。。。。。为什么呢

回到顶部