create the deatils page

kongweiyu_branch
孔维屿 2 years ago
parent e649f769f3
commit f0a3712530

@ -5,6 +5,7 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
currentTab: 0
}, },
/** /**

@ -5,8 +5,12 @@ Page({
//页面数据 //页面数据
data:{ data:{
avatarUrl: defaultAvatarUrl, avatarUrl: defaultAvatarUrl,
nickname: "昵称",
sex: null,
birthday: "", birthday: "",
region:"", region: "",
contact: "请输入",
details: "请输入"
}, },
onLoad(options) { onLoad(options) {
@ -21,6 +25,12 @@ Page({
} catch (e) { } catch (e) {
console.log(e); console.log(e);
} }
db.get({
success:(res) => {
console.log(res)
}
})
}, },
//选择头像后存储头像地址 //选择头像后存储头像地址

@ -5,25 +5,25 @@
</view> </view>
<button class="avatar-wrapper" hover-class="none" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar"> <button class="avatar-wrapper" hover-class="none" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar">
<image class="avatar" src="{{avatarUrl}}"></image> <image class="avatar" src="{{avatarUrl}}"/>
</button> </button>
<form bindsubmit="submit"> <form bindsubmit="submit">
<view class="section"> <view class="section">
<view class="title">昵称:</view> <view class="title">昵称:</view>
<input type="nickname" class="input" name="nickname" placeholder="昵称" /> <input type="nickname" class="input" name="nickname" placeholder="{{nickname}}" />
</view> </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" checked="{{sex}}"/>
</label> </label>
<label > <label >
<radio value="woman" /> <radio value="woman" checked="{{!sex && sex!=NULL}}"/>
</label> </label>
</radio-group> </radio-group>

Loading…
Cancel
Save