|
@@ -3,10 +3,20 @@
|
|
|
<statusBar :item='navBarData'></statusBar>
|
|
|
<view class="block">
|
|
|
<button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
|
|
|
- <image class="avatar" :src="avatarUrl"></image>
|
|
|
+ <!-- <button class="avatar-wrapper" @click="getImg"> -->
|
|
|
+ <image class="avatar" :src="avatarUrl" ></image>
|
|
|
</button>
|
|
|
</view>
|
|
|
|
|
|
+ <view class="collpopul" v-if="popmsg">
|
|
|
+ <view class="contxt">
|
|
|
+ <!-- <image :src="i.collAoff?img1:img2" mode="aspectFill" style="width: 30rpx;height: 30rpx;">
|
|
|
+ </image> -->
|
|
|
+ 登录成功
|
|
|
+ <!-- 收藏成功 -->
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<!-- <view class="inp">
|
|
|
<view class="nc">昵称:</view>
|
|
|
<input type="nickname" class="weui-input" :value="nickname" @blur="inpvalue" placeholder="请输入昵称" />
|
|
@@ -65,17 +75,17 @@
|
|
|
</view>
|
|
|
<view class="txtcell">
|
|
|
<view class="" style="width: 100rpx;">
|
|
|
- <text class="dian">*</text><text class="celTit">学校</text>
|
|
|
+ <text class="dian">*</text><text class="celTit">学院</text>
|
|
|
</view>
|
|
|
<view class="pickerBlock" @click="show">
|
|
|
<view class="" style="position: relative;">
|
|
|
<view class="">
|
|
|
- {{ !stuName?'请选择学校':stuName }}
|
|
|
+ {{ !stuName?'请选择学院':stuName }}
|
|
|
</view>
|
|
|
|
|
|
<view class="stuListSty" v-if="isshow">
|
|
|
<view class="Usearch">
|
|
|
- <u-search placeholder="搜索学校" :showAction="false" shape="square"
|
|
|
+ <u-search placeholder="搜索学院" :showAction="false" shape="square"
|
|
|
v-model="searchStudent"></u-search>
|
|
|
<view class="UsearchBtn" @click.stop="typeIn(0)">
|
|
|
手动录入
|
|
@@ -111,7 +121,7 @@
|
|
|
</view>
|
|
|
<scroll-view scroll-y="true" show-scrollbar="true" class="list">
|
|
|
<view class="listcon" v-if="!majorList.length">
|
|
|
- 此学校暂时没有专业分类哦
|
|
|
+ 此学院暂时没有专业分类哦
|
|
|
</view>
|
|
|
<view id="demo1" class="listcon" @click.stop="addmajor" :data-jor="i"
|
|
|
v-for="(i,index) in majorList" :key="index">{{i.name}}</view>
|
|
@@ -149,7 +159,7 @@
|
|
|
<view style="width: 600rpx;box-sizing: border-box;padding: 40px 20rpx; padding-bottom: 30px;">
|
|
|
<view class="" style="display: flex;align-items: center;">
|
|
|
<!-- <text>{{ typyInall?'专业':'学校' }} :</text> -->
|
|
|
- <u--input :placeholder="typyInall?'请输入专业':'请输入学校'" border="surround" v-model="typyInCon"></u--input>
|
|
|
+ <u--input :placeholder="typyInall?'请输入专业':'请输入学院'" border="surround" v-model="typyInCon"></u--input>
|
|
|
</view>
|
|
|
<view style="display: flex;width: 100%;justify-content: space-around;margin-top: 20rpx;">
|
|
|
<view class="typyInbtn" @click="popupclose">
|
|
@@ -175,7 +185,7 @@
|
|
|
|
|
|
searchStudent: '', //学校搜索栏
|
|
|
searchMajor: '', //专业搜索栏
|
|
|
-
|
|
|
+ popmsg: false,
|
|
|
|
|
|
|
|
|
logbtn: 'logbtn',
|
|
@@ -205,7 +215,7 @@
|
|
|
|
|
|
navBarData: {
|
|
|
title: '登录',
|
|
|
- btn: 1 //判断是否显示返回按钮
|
|
|
+ btn: 2 //判断是否显示返回按钮
|
|
|
},
|
|
|
|
|
|
btnCol: [],
|
|
@@ -283,8 +293,8 @@
|
|
|
popupaffirm() {
|
|
|
if (!this.typyInall) {
|
|
|
if (!this.typyInCon) return uni.showToast({
|
|
|
- title:'请输入学校',
|
|
|
- icon:'none',
|
|
|
+ title: '请输入学院',
|
|
|
+ icon: 'none',
|
|
|
})
|
|
|
|
|
|
this.stuName = this.typyInCon
|
|
@@ -298,8 +308,8 @@
|
|
|
this.typyInCon = ''
|
|
|
} else {
|
|
|
if (!this.typyInCon) return uni.showToast({
|
|
|
- title:'请输入专业',
|
|
|
- icon:'none',
|
|
|
+ title: '请输入专业',
|
|
|
+ icon: 'none',
|
|
|
})
|
|
|
|
|
|
this.majorName = this.typyInCon
|
|
@@ -370,7 +380,7 @@
|
|
|
// 学校未选择则提示
|
|
|
if (!this.stuName) {
|
|
|
uni.showToast({
|
|
|
- title: '请先选择学校',
|
|
|
+ title: '请先选择学院',
|
|
|
icon: 'none',
|
|
|
duration: 1000
|
|
|
});
|
|
@@ -392,7 +402,7 @@
|
|
|
},
|
|
|
// 根据选择的学校来进行显示专业
|
|
|
selectMajor(e) {
|
|
|
- console.log('根据选择的学校来进行显示专业', e);
|
|
|
+ console.log('根据选择的学院来进行显示专业', e);
|
|
|
let data = {
|
|
|
mid: e
|
|
|
}
|
|
@@ -425,7 +435,7 @@
|
|
|
},
|
|
|
// 失去焦点查询学号工号
|
|
|
judgeNum() {
|
|
|
- if(!this.judgeNumber) return
|
|
|
+ if (!this.judgeNumber) return
|
|
|
let opid = uni.getStorageSync('oId')
|
|
|
let data = {
|
|
|
txt: this.judgeNumber
|
|
@@ -476,10 +486,11 @@
|
|
|
const {
|
|
|
avatarUrl
|
|
|
} = e.detail
|
|
|
-
|
|
|
+ // this.avatarUrl = avatarUrl
|
|
|
+ // console.log(avatarUrl)
|
|
|
let that = this
|
|
|
const uploadTask = uni.uploadFile({
|
|
|
- url: 'http://139.159.246.165:7006/img', // post请求地址
|
|
|
+ url: 'http://127.0.0.1:7334/img', // post请求地址
|
|
|
// url: 'https://cxcy.ssti.net.cn/api/UploadFirmFile', // post请求地址
|
|
|
// filePath: tempFilePaths,
|
|
|
filePath: avatarUrl,
|
|
@@ -489,8 +500,9 @@
|
|
|
// 'Content-Type': 'multipart/form-data',
|
|
|
},
|
|
|
success: function(res) {
|
|
|
- console.log('上传图片', res);
|
|
|
- that.avatarUrl = res.data
|
|
|
+ let img = JSON.parse(res.data)
|
|
|
+ console.log('上传图片', img);
|
|
|
+ that.avatarUrl = img.fileUrl
|
|
|
},
|
|
|
fail: function(uploadFileFail) {
|
|
|
console.log('Error:', uploadFileFail.data);
|
|
@@ -537,9 +549,13 @@
|
|
|
}).then(res => {
|
|
|
console.log('已注册过直接登录', res[0]);
|
|
|
this.$store.dispatch('asyncUpdateUser', res[0][0])
|
|
|
- uni.switchTab({
|
|
|
- url: '/pages/index/index'
|
|
|
- })
|
|
|
+ this.popmsg = true
|
|
|
+ setTimeout(() => {
|
|
|
+ uni.switchTab({
|
|
|
+ url: '/pages/index/index'
|
|
|
+ })
|
|
|
+ }, 1000)
|
|
|
+
|
|
|
})
|
|
|
})
|
|
|
} else {
|
|
@@ -565,7 +581,7 @@
|
|
|
icon: 'none'
|
|
|
});
|
|
|
if (!this.stuName) return uni.showToast({
|
|
|
- title: '请选择学校',
|
|
|
+ title: '请选择学院',
|
|
|
icon: 'none'
|
|
|
});
|
|
|
// if (this.majorInpTxt == '') return uni.showToast({
|
|
@@ -621,6 +637,18 @@
|
|
|
isDui() {
|
|
|
this.isShow = !this.isShow
|
|
|
},
|
|
|
+ //获取用户信息(授权)
|
|
|
+ getImg() {
|
|
|
+ uni.getUserProfile({
|
|
|
+ desc: "获取你的昵称、头像、地区及性别",
|
|
|
+ success: (res) => {
|
|
|
+ console.log("所有", res);
|
|
|
+ this.avatarUrl = res.userInfo.avatarUrl; //获取微信头像
|
|
|
+
|
|
|
+ },
|
|
|
+ fail() {}
|
|
|
+ })
|
|
|
+ },
|
|
|
getdata() {
|
|
|
this.$request('/selectUserInfo', "POST", {
|
|
|
openid: uni.getStorageSync('oId')
|
|
@@ -632,7 +660,7 @@
|
|
|
return
|
|
|
} else {
|
|
|
this.isLogin = true
|
|
|
- this.avatarUrl = data.avatar
|
|
|
+ // this.avatarUrl = data.avatar
|
|
|
this.nickname = data.username
|
|
|
}
|
|
|
})
|
|
@@ -658,10 +686,68 @@
|
|
|
height: 100vh;
|
|
|
background-color: #ffffff;
|
|
|
}
|
|
|
- ::v-deep .u-safe-bottom{
|
|
|
+
|
|
|
+ ::v-deep .u-safe-bottom {
|
|
|
display: none;
|
|
|
}
|
|
|
|
|
|
+ .collpopul {
|
|
|
+ position: absolute;
|
|
|
+ padding: 0 30rpx;
|
|
|
+ background-color: #fff;
|
|
|
+ top: 10%;
|
|
|
+ box-shadow: 0rpx 10rpx 10rpx 5rpx rgba(0, 0, 0, .1);
|
|
|
+ z-index: 100;
|
|
|
+ width: 650rpx;
|
|
|
+ height: 90rpx;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%, 0);
|
|
|
+ border-radius: 30rpx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ // animation: collpopul 1s cubic-bezier(0,0,0.25,1) forwards;
|
|
|
+
|
|
|
+ .contxt {
|
|
|
+ flex: 1;
|
|
|
+ font-weight: 580;
|
|
|
+ font-size: 30rpx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ image {
|
|
|
+ padding-right: 10rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .goMore {
|
|
|
+ // width: 120rpx;
|
|
|
+ display: flex;
|
|
|
+ // height: 35rpx;
|
|
|
+ height: 100%;
|
|
|
+ line-height: 30rpx;
|
|
|
+ align-items: center;
|
|
|
+ color: #F44265;
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @keyframes collpopul {
|
|
|
+ 0% {
|
|
|
+ // background: red;
|
|
|
+ top: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ 100% {
|
|
|
+ // background: red;
|
|
|
+ top: 15%;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 100%{
|
|
|
+ // opacity: 0;
|
|
|
+ // }
|
|
|
+ }
|
|
|
+
|
|
|
.typyInbtn {
|
|
|
box-sizing: border-box;
|
|
|
padding: 10rpx 60rpx;
|
|
@@ -681,7 +767,7 @@
|
|
|
color: #E7E7E7;
|
|
|
margin-right: 20px;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
.shade {
|
|
|
position: absolute;
|