some small changes

kongweiyu_branch
孔维屿 1 year ago
parent b0508e3050
commit e41319be09

@ -0,0 +1,6 @@
{
"permissions": {
"openapi": [
]
}
}

@ -0,0 +1,19 @@
// 云函数入口文件
const cloud = require('wx-server-sdk')
cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV }) // 使用当前云环境
//获取老师集合
const teacher = cloud.database().collection("teacher_Data")
// 云函数入口函数
exports.main = async (event, context) => {
const wxContext = cloud.getWXContext()
return {
event,
openid: wxContext.OPENID,
appid: wxContext.APPID,
unionid: wxContext.UNIONID,
}
}

@ -0,0 +1,14 @@
{
"name": "recommend",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"wx-server-sdk": "~2.6.3"
}
}

@ -3,6 +3,7 @@ const db = wx.cloud.database().collection("user_Data");
Page({ Page({
//页面数据 //页面数据
data:{ data:{
avatarUrl: "cloud://cloud1-7gyjwcyfbdf819da.636c-cloud1-7gyjwcyfbdf819da-1321167991/1678762683308.png",
birthday: "", birthday: "",
region:"", region:"",
}, },

@ -1,27 +1,32 @@
<view class="body"> <view class="body">
<form bindsubmit="submit"> <view class="button-container" >
<view class="button-container" > <button bindtap="navigateToPageTpro">Be a teacher</button>
<button bindtap="navigateToPageTpro">Be a teacher</button> </view>
</view>
<view class="user-avatar">
<image src="{{avatarUrl}}" mode="aspectFill"/>
</view>
<view class="section"> <form bindsubmit="submit">
<view class="title">昵称:</view>
<input type="nickname" class="input" name="nickname" placeholder="昵称" /> <view class="section">
</view> <view class="title">昵称:</view>
<input type="nickname" class="input" name="nickname" placeholder="昵称" />
</view>
<view class="section"> <view class="section">
<view class="title">性别:</view> <view class="title">性别:</view>
<radio-group class="mg" name="gender"> <radio-group class="mg" name="gender">
<label > <label >
<radio value="man" /> <radio value="man" />
</label> </label>
<label > <label >
<radio value="woman" /> <radio value="woman" />
</label> </label>
</radio-group> </radio-group>
</view> </view>
<view class="section"> <view class="section">
<view class="title">年龄:</view> <view class="title">年龄:</view>

@ -6,6 +6,19 @@
height: 200px; /* 适当调整容器的高度 */ height: 200px; /* 适当调整容器的高度 */
} }
/* 头像 */
.user-avatar {
display: flex;
justify-content: center;
}
/* 子元素选择器 */
.user-avatar > image {
height: 100px;
width: 100px;
border-radius: 50%;
}
.user-image { .user-image {
max-width: 10%; max-width: 10%;
max-height: 10%; max-height: 10%;
@ -15,7 +28,7 @@
position: relative; position: relative;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: flex-start; align-items: flex-end;
} }
.small-button { .small-button {

Loading…
Cancel
Save