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.
66 lines
3.9 KiB
66 lines
3.9 KiB
<view class="profile">
|
|
<form bindtap="onTap" bindsubmit="onSubmit" bindreset="refresh">
|
|
<view class="header">
|
|
<view class="error {{showError?'show':''}}"><text class="single-line">{{error}}</text></view>
|
|
<view wx:if="{{!edited}}">点击相应项编辑信息</view>
|
|
<button wx:else form-type="reset" size="mini" type="main">重置信息</button>
|
|
<button class="submit" form-type="submit" size="mini" type="main">
|
|
<icon type="success_no_circle" color="white"></icon>
|
|
<text>保存</text>
|
|
</button>
|
|
</view>
|
|
<view class="form-item">
|
|
<text class="key">昵称头像</text>
|
|
<input class="value" id="nickname" placeholder="输入昵称" name="nickname" value="{{nickname}}"></input>
|
|
<image class="avatar" bindtap="catchAvatar" src="{{eduImgDir}}{{avatar_url}}"></image>
|
|
</view>
|
|
<view class="form-item">
|
|
<view class="key">
|
|
<text>姓名</text>
|
|
</view>
|
|
<input class="value" id="name" placeholder="输入姓名" disabled="{{authen}}" name="name" value="{{name}}"></input>
|
|
</view>
|
|
<view class="form-item">
|
|
<text class="key">显示姓名
|
|
<text class="tip">关闭后将展示您的昵称</text>
|
|
</text>
|
|
<switch color="#00b0f0" id="show_realname" name="show_realname" checked="{{show_realname}}"></switch>
|
|
</view>
|
|
<view class="form-item">
|
|
<text>性别</text>
|
|
<picker class="value" id="gender" name="gender" range="{{['男','女']}}" bindcolumnchange="log" value="{{gender}}" disabled="{{authen}}" bindchange="onGenderChange">{{gender==0?'男':gender==1?'女':'未设置'}}</picker>
|
|
</view>
|
|
<view class="form-item">
|
|
<text>所在地</text>
|
|
<picker class="value" id="location-city" bindcolumnchange="onCitiesChange" bindchange="onLocationChange" range="{{[locations,cities]}}" value="{{[location_index, city_index]}}" mode="multiSelector">{{locations[location_index]}}-{{cities[city_index]}}</picker>
|
|
<input hidden="1" disabled="1" name="location" value="{{locations[location_index]}}"></input>
|
|
<input hidden="1" disabled="1" name="location_city" value="{{cities[city_index]}}"></input>
|
|
</view>
|
|
<view class="gap"></view>
|
|
<view class="form-item">
|
|
<text class="key">职业</text>
|
|
<picker class="value" id="identity" range="{{identities}}" bindchange="onIdentityChange" range-key="text" value="{{identity_index}}">{{identities[identity_index].text||'请选择'}}</picker>
|
|
<input hidden="1" name="identity" disabled="1" value="{{identities[identity_index].value}}"/>
|
|
</view>
|
|
<view wx:if="{{identity_index==1}}" class="form-item">
|
|
<text class="key">学号</text>
|
|
<input class="value" id="school_id" type="number" name="student_id" placeholder="输入学号" cursor-spacing="100" value="{{student_id}}"></input>
|
|
</view>
|
|
<view wx:elif="{{identity_index==0||identity_index==2}}" class="form-item">
|
|
<text class="key">职称</text>
|
|
<picker class="value" id="technical_title" bindchange="onTechnicalChange" range="{{technicalTitles[identity_index]}}" value="{{technical_index}}">{{technicalTitles[identity_index][technical_index]||'请选择'}}</picker>
|
|
<input hidden="1" disabled="1" name="technical_title" value="{{technicalTitles[identity_index][technical_index]}}"></input>
|
|
</view>
|
|
<view class="form-item">
|
|
<text class="key">学校/单位</text>
|
|
<input hidden="1" disabled="1" name="school_id" type="number" value="{{school_id}}"></input>
|
|
<navigator class="value" id="school" hover-class="none" url="/account/pages/profile/school_select/school_select">{{school_name||'请选择'}}</navigator>
|
|
</view>
|
|
<view class="form-item" wx:if="{{school_id}}">
|
|
<text class="key">院系/部门</text>
|
|
<picker class="value" id="department" range="{{departments}}" range-key="name" bindchange="onDepartmentChange" value="{{department_index}}">{{departments[department_index].name||department_name||'请选择'}}</picker>
|
|
<input hidden="1" disabled="1" name="department_id" type="number" value="{{departments[department_index].id}}"></input>
|
|
</view>
|
|
</form>
|
|
|
|
</view> |