<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber"></button>
getPhoneNumber (e) { wx.cloud.callFunction({ name:'user', data: { type:'phoneNumber', weRunData: wx.cloud.CloudID(e.detail.cloudID) } }).then(res=>{ var phoneNumber = res.result.data this.setData({ phoneNumber:phoneNumber }) }) },
exports.main = async (event, context) => { var type = event.type switch(type){ case 'phoneNumber': data = event.weRunData.data.phoneNumber break } return { data: data, type: type } }