|
@@ -11,15 +11,15 @@
|
|
|
<image :src="userData.avatar" mode="aspectFill"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="setName">
|
|
|
+ <view class="setPicker">
|
|
|
<view class="edit_title">
|
|
|
<text>姓名</text>
|
|
|
</view>
|
|
|
<view class="input_details">
|
|
|
<view class="nickname">
|
|
|
- <input type="text" style=" text-align: right;" maxlength="10" placeholder="请输入昵称"
|
|
|
+ <input type="text" style=" text-align: right;" placeholder="请输入姓名"
|
|
|
placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);"
|
|
|
- v-model="userData.username" />
|
|
|
+ v-model="usname" />
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -47,9 +47,16 @@
|
|
|
<view class="setPicker">
|
|
|
<!-- <view class="content"> -->
|
|
|
<view class="edit_title">
|
|
|
- <text>学院</text>
|
|
|
+ <text>院校全称</text>
|
|
|
+ </view>
|
|
|
+ <view class="input_details">
|
|
|
+ <view class="nickname">
|
|
|
+ <input type="text" style=" text-align: right;" placeholder="请输入院校全称"
|
|
|
+ placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);"
|
|
|
+ v-model="stunam" />
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="InpLeft" @click="show">
|
|
|
+ <!-- <view class="InpLeft" @click="show">
|
|
|
<view class="" style="position: relative;">
|
|
|
<view class="">
|
|
|
{{ !userData.stuName?'请选择学院':userData.stuName }}
|
|
@@ -72,13 +79,20 @@
|
|
|
<image src="https://teacherapi.cocorobo.cn/teaching-file/static/mine/arrow-right_gray.png"
|
|
|
mode="aspectFill"></image>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
</view>
|
|
|
<view class="setPicker">
|
|
|
<view class="edit_title">
|
|
|
- <text>专业</text>
|
|
|
+ <text>所在部门</text>
|
|
|
+ </view>
|
|
|
+ <view class="input_details">
|
|
|
+ <view class="nickname">
|
|
|
+ <input type="text" style=" text-align: right;" placeholder="请输入所在部门"
|
|
|
+ placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);"
|
|
|
+ v-model="majname" />
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="InpLeft" @click.stop="majorshow">
|
|
|
+ <!-- <view class="InpLeft" @click.stop="majorshow">
|
|
|
<view class="" style="position: relative;">
|
|
|
<view class="">
|
|
|
{{ !userData.majorName?'请选择专业':userData.majorName }}
|
|
@@ -104,18 +118,7 @@
|
|
|
<image src="https://teacherapi.cocorobo.cn/teaching-file/static/mine/arrow-right_gray.png"
|
|
|
mode="aspectFill"></image>
|
|
|
</view>
|
|
|
- <!--
|
|
|
- <input class="uni-input" v-model="searchMajor" style="width: 100%;" @click.stop="majorshow"
|
|
|
- placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" placeholder="请选择专业" /> -->
|
|
|
- <!-- <scroll-view scroll-y="true" show-scrollbar="true" class="list" v-if="jorshow">
|
|
|
- <view id="demo1" class="listcon" @click="addmajor" :data-jor="i" v-for="(i,index) in majorList"
|
|
|
- :key="index">{{i.name}}</view>
|
|
|
- </scroll-view>
|
|
|
- <view class="arrow">
|
|
|
- <image src="https://teacherapi.cocorobo.cn/teaching-file/static/mine/arrow-right_gray.png"
|
|
|
- mode="aspectFill"></image>
|
|
|
- </view> -->
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
|
|
|
</view>
|
|
|
<view class="setPicker">
|
|
@@ -143,7 +146,7 @@
|
|
|
<view class="selfdomIntro">
|
|
|
<textarea type="text" placeholder="请输入你的个性签名" maxlength="75"
|
|
|
placeholder-style="font-size: 28rpx; color: rgb(153, 153, 153);" style="color: black;"
|
|
|
- v-model="userData.brief" />
|
|
|
+ v-model="bri" />
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -262,6 +265,11 @@
|
|
|
// 这两个因为要监视,所以不能放对象里面
|
|
|
inpTxt: '', //学校id
|
|
|
majorInpTxt: '', //专业id
|
|
|
+
|
|
|
+ usname: '',
|
|
|
+ stunam: '',
|
|
|
+ majname: '',
|
|
|
+ bri:'',
|
|
|
userData: {
|
|
|
// oid: '',
|
|
|
// avatar: '', //头像
|
|
@@ -500,14 +508,23 @@
|
|
|
openid: this.$store.state.user.openid
|
|
|
}).then(res => {
|
|
|
// 假如简介为null
|
|
|
- // console.log('res[0][0].brief', res);
|
|
|
+ console.log('res[0][0]', res);
|
|
|
if (!res[0][0].brief) {
|
|
|
res[0][0].brief = ''
|
|
|
}
|
|
|
// console.log('获取渲染数据', res[0][0]);
|
|
|
this.userData = res[0][0]
|
|
|
- this.inpTxt = res[0][0].school
|
|
|
- this.majorInpTxt = res[0][0].spe
|
|
|
+
|
|
|
+ // 将原来的学校,专业id清除
|
|
|
+ // this.inpTxt = res[0][0].school
|
|
|
+ this.inpTxt = ''
|
|
|
+ // this.majorInpTxt = res[0][0].spe
|
|
|
+ this.majorInpTxt = ''
|
|
|
+ this.usname=res[0][0].username
|
|
|
+ this.stunam=res[0][0].stuName
|
|
|
+ this.majname=res[0][0].majorName
|
|
|
+ this.bri=res[0][0].brief
|
|
|
+
|
|
|
// this.stuName = res[0][0].stuName
|
|
|
// console.log('this.stuName', this.stuName);
|
|
|
this.majorName = res[0][0].majorName
|
|
@@ -515,10 +532,10 @@
|
|
|
|
|
|
})
|
|
|
// 获取学院
|
|
|
- this.$request('/selectColleges', "get", {}).then(res => {
|
|
|
- // console.log(res);
|
|
|
- this.colleges = res[0]
|
|
|
- })
|
|
|
+ // this.$request('/selectColleges', "get", {}).then(res => {
|
|
|
+ // // console.log(res);
|
|
|
+ // this.colleges = res[0]
|
|
|
+ // })
|
|
|
},
|
|
|
// 取消操作
|
|
|
closePopup() {
|
|
@@ -530,15 +547,17 @@
|
|
|
// console.log(' this.userData', this.userData);
|
|
|
this.userData.school = this.inpTxt
|
|
|
this.userData.spe = this.majorInpTxt
|
|
|
- this.userData.username=encodeURIComponent(this.userData.username)
|
|
|
- this.userData.stuName=encodeURIComponent(this.userData.stuName)
|
|
|
- this.userData.majorName=encodeURIComponent(this.userData.majorName)
|
|
|
- this.userData.brief=encodeURIComponent(this.userData.brief)
|
|
|
-
|
|
|
|
|
|
+ this.userData.username = encodeURIComponent(this.usname)
|
|
|
+ this.userData.stuName = encodeURIComponent(this.stunam)
|
|
|
+ this.userData.majorName = encodeURIComponent(this.majname)
|
|
|
+ this.userData.brief = encodeURIComponent(this.bri)
|
|
|
+
|
|
|
+
|
|
|
// return console.log('提交修改', this.userData);
|
|
|
this.$request('/updateUserInfo', "POST", this.userData).then(res => {
|
|
|
this.showPopupConfirm = true
|
|
|
+ // this.userData = {}
|
|
|
// console.log('this', this);
|
|
|
this.$request('/selectUser', 'POST', {
|
|
|
oId: this.$store.state.user.openid
|
|
@@ -560,14 +579,14 @@
|
|
|
title: '未登录',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
- if (!this.userData.username) {
|
|
|
+ if (!this.usname) {
|
|
|
return uni.showToast({
|
|
|
title: '昵称不能为空',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- if (!this.userData.stuName) {
|
|
|
+ if (!this.stunam) {
|
|
|
return uni.showToast({
|
|
|
title: '学院不能为空',
|
|
|
icon: 'none'
|
|
@@ -861,7 +880,7 @@
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
font-size: 32rpx;
|
|
|
- width: 60px;
|
|
|
+ width: 80px;
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
|
@@ -891,27 +910,14 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .setName {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- height: 92rpx;
|
|
|
- border-top: 1px solid #E7E7E7;
|
|
|
+ // .setName {
|
|
|
+ // display: flex;
|
|
|
+ // justify-content: space-between;
|
|
|
+ // height: 92rpx;
|
|
|
+ // border-top: 1px solid #E7E7E7;
|
|
|
|
|
|
- .input_details {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- flex-direction: row;
|
|
|
|
|
|
- .nickname {
|
|
|
- width: 350rpx;
|
|
|
- text-align: end;
|
|
|
- // padding-right: 10rpx;
|
|
|
- // margin-right: 10rpx;
|
|
|
- font-size: 28rpx;
|
|
|
- color: rgb(153, 153, 153);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ // }
|
|
|
|
|
|
.setPicker {
|
|
|
height: 92rpx;
|
|
@@ -933,14 +939,33 @@
|
|
|
// display: flex;
|
|
|
// align-items: center;
|
|
|
// justify-content: space-between;
|
|
|
-
|
|
|
.input_details {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- justify-content: flex-end;
|
|
|
+ flex-direction: row;
|
|
|
+ flex: 1;
|
|
|
|
|
|
+ .nickname {
|
|
|
+ width: 100%;
|
|
|
+ text-align: end;
|
|
|
+ // padding-right: 10rpx;
|
|
|
+ // margin-right: 10rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: rgb(153, 153, 153);
|
|
|
+
|
|
|
+ input {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+ // .input_details {
|
|
|
+ // display: flex;
|
|
|
+ // align-items: center;
|
|
|
+ // justify-content: flex-end;
|
|
|
+
|
|
|
+ // }
|
|
|
+
|
|
|
// }
|
|
|
}
|
|
|
|