let that =this// 登陆codewx.login({success:function(res){if(res.code){// 发送code到后端换取openid和session_keythat.setData({openCode: res.code})console.log(that.data.openCode,'openCode');// 调用发送请求的方法,将code传给后端}else{console.log('登录失败!'+ res);}}});
题目: 题解:
func _rob(nums []int) int {first, second : nums[0], max(nums[0], nums[1])for _, v : range nums[2:] {first, second second, max(firstv, second)}return second
}func rob(nums []int) int {n : len(nums)if n 1 {return nums[0]}…