收藏
回答

小程序云开发登录不上

框架类型 问题类型 终端类型 AppID 基础库版本
小程序 Bug 工具 wx38369e8c688673ed 2.2.5

- 当前 Bug 的表现(可附上截图)

不能登录云平台,错误为

登录失败关闭

{"base_resp":{"ret":-1,"errmsg":""}}


- 预期表现

查询数据库中的相关数据

- 复现路径

使用代码进行一次库操作之后,再用开发工具直接登录


- 提供一个最简复现 Demo

const cloud = require('wx-server-sdk')


cloud.init({ env: 'wxcloudtest-399ef4' })


// 云函数入口函数

exports.main = async (event, context) => {

   const db = cloud.database()

   return db.collection('menu').where({

_id: event._id,

}).get().then(res => {

   if (res.data.length == 0) {

    return db.collection('menu').add({

data: {

_id: 123456789,

startTime: 123456789,

endTime: 987654321,

startDate: '2018-01-01',

endDate: '2018-01-08',

title: 'lllllll',

fileID: 'llllllll',

filePath: 'llllllll'

}

}).then(res => {

      return {

errno: '0',

errmsg: '写入menu成功',

res: res

}

}).catch(rej => {

      return rej

})

} else {

    return db.collection('menu').where({

_id: event._id,

}).update({

data: {

endTime: 987654321,

endDate: '2018-01-08',

title: 'lllllll',

fileID: 'llllllll',

filePath: 'llllllll'

}

})

.then(res => {

    return {

errno: '0',

errmsg: '修改menu成功',

res: res

}

})

.catch(rej => {

   return rej

})

}

})

}


  



回答关注问题邀请回答
收藏

2 个回答

  • 灵芝
    灵芝
    置顶回答2018-11-06

    抱歉,故障已修复,请重试

    2018-11-06
    有用 1
    回复
  • 无不无聊哦
    无不无聊哦
    2018-11-06

    貌似都登陆不上,

    2018-11-06
    有用
    回复 4
    • 2018-11-06

      你好我是刚刚出现这个问题,现在还是登录不上报的是{"base_resp":{"ret":-1,"errmsg":""}},你是不是这个问题?

      2018-11-06
      回复
    • The king of APCarry
      The king of APCarry
      2018-11-06

      好像我也是下午才出现的问题

      2018-11-06
      回复
    • Js·平克曼🕶
      Js·平克曼🕶
      2018-11-06

      好像就是下午才出的问题,我上午用的时候好好的,来论坛一看 貌似大家都是这一会出问题。官方大大呢?

      2018-11-06
      回复
    • 无不无聊哦
      无不无聊哦
      2018-11-06回复

      是的,下午2点40的样子登不上的,我之前一直在用

      2018-11-06
      回复
登录 后发表内容