feat: 初始化项目
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
// index.ts
|
||||
import callCloud from '../../base/callCloud';
|
||||
|
||||
// 获取应用实例
|
||||
Component({
|
||||
data: {},
|
||||
methods: {
|
||||
test() {
|
||||
console.log('1test');
|
||||
this.getOpenId();
|
||||
},
|
||||
async getOpenId() {
|
||||
const res = await callCloud('getOpenId');
|
||||
console.log('res-----:', res);
|
||||
|
||||
// const areaIds = await callCloud('createArea');
|
||||
// console.log('areaIds-----:', areaIds);
|
||||
|
||||
// const stationIds = await callCloud('createStation');
|
||||
const reslut = await callCloud('createPDF');
|
||||
console.log('reslut-----:', reslut);
|
||||
// wx.cloud
|
||||
// .callFunction({
|
||||
// name: 'user',
|
||||
// data: {
|
||||
// type: 'getOpenId',
|
||||
// },
|
||||
// })
|
||||
// .then((resp: Record<string, any>) => {
|
||||
// console.log('resp-----:', resp);
|
||||
// this.setData({
|
||||
// haveGetOpenId: true,
|
||||
// openId: resp.result.openid,
|
||||
// });
|
||||
// wx.hideLoading();
|
||||
// })
|
||||
// .catch((error: any) => {
|
||||
// console.log('error:', error);
|
||||
// wx.hideLoading();
|
||||
// });
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user