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.
45 lines
816 B
45 lines
816 B
const { envList } = require('../../envList');
|
|
|
|
// pages/me/index.js
|
|
Page({
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
openId: '',
|
|
showUploadTip: false,
|
|
},
|
|
|
|
getOpenId() {
|
|
wx.showLoading({
|
|
title: '',
|
|
});
|
|
wx.cloud
|
|
.callFunction({
|
|
name: 'quickstartFunctions',
|
|
data: {
|
|
type: 'getOpenId',
|
|
},
|
|
})
|
|
.then((resp) => {
|
|
this.setData({
|
|
haveGetOpenId: true,
|
|
openId: resp.result.openid,
|
|
});
|
|
wx.hideLoading();
|
|
})
|
|
.catch((e) => {
|
|
this.setData({
|
|
showUploadTip: true,
|
|
});
|
|
wx.hideLoading();
|
|
});
|
|
},
|
|
|
|
gotoWxCodePage() {
|
|
wx.navigateTo({
|
|
url: `/pages/exampleDetail/index?envId=${envList?.[0]?.envId}&type=getMiniProgramCode`,
|
|
});
|
|
},
|
|
});
|