feat: 初始化项目
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"navigation-bar": "/components/navigation-bar/navigation-bar"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/**index.less**/
|
||||
page {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.scrollarea {
|
||||
flex: 1;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.userinfo {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
color: #aaa;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.userinfo-avatar {
|
||||
overflow: hidden;
|
||||
width: 128rpx;
|
||||
height: 128rpx;
|
||||
margin: 20rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.usermotto {
|
||||
margin-top: 200px;
|
||||
}
|
||||
.avatar-wrapper {
|
||||
padding: 0;
|
||||
width: 56px !important;
|
||||
border-radius: 8px;
|
||||
margin-top: 40px;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
display: block;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
}
|
||||
|
||||
.nickname-wrapper {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
padding: 16px;
|
||||
box-sizing: border-box;
|
||||
border-top: .5px solid rgba(0, 0, 0, 0.1);
|
||||
border-bottom: .5px solid rgba(0, 0, 0, 0.1);
|
||||
color: black;
|
||||
}
|
||||
|
||||
.nickname-label {
|
||||
width: 105px;
|
||||
}
|
||||
|
||||
.nickname-input {
|
||||
flex: 1;
|
||||
}
|
||||
@@ -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();
|
||||
// });
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,5 @@
|
||||
<!--index.wxml-->
|
||||
<navigation-bar title="Weixin" back="{{false}}" color="black" background="#FFF"></navigation-bar>
|
||||
<scroll-view class="scrollarea" scroll-y type="list">
|
||||
<view bind:tap="test">测试点击</view>
|
||||
</scroll-view>
|
||||
Reference in New Issue
Block a user