You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
438 B

const app = getApp();
Page({
data: {
info:'获取中...'
},
onLoad: function (options) {
this.setData({info:"获取中"})
wx.cloud.callFunction({name:"login"})
.then(res=>{
this.setData(res.result);
}).catch(e=>{
this.setData({info:"获取失败"});
})
},
copy(){
if(this.data.openid)
wx.setClipboardData({data: "openid: " + this.data.openid});
else
this.onLoad();
}
})