作者 lihongjuan

1

... ... @@ -103,6 +103,13 @@
</script>
<style lang="less">
.textblock{
height:auto;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
/*每个页面公共css */
image{
width:100%;
... ...
<template>
<view class="content">
<view class="item" @click="toschoolmate" v-for="(item,index) in likepeoplelist" :key="index" :data-id="item.user_id">
<image class="photo" src="../../static/logo_img@2x.png"></image>
<view class="cont">
<view class="title">{{}}</view>
<image class="photo" :src="item.head_image" style="border-radius: 50%;"></image>
<view class="cont">
<view class="title">{{item.nickname}}</view>
<view class="academy">
<image class="icon" src="../../static/xuexiao_icon@2x2.png"></image>河北工业大学 软件学院 软件工程
<image class="icon" src="../../static/xuexiao_icon@2x2.png"></image>{{ item.university_name }} &nbsp;&nbsp;&nbsp;
{{ item.college_name }}&nbsp;&nbsp;&nbsp; {{ item.graduated_name }}
</view>
<view class="fen">裸分</view>
</view>
<view class="right">
<image src="../../static/yiguanzhu_img@2x.png"></image>
<view class="text">已关注</view>
<view class="fen">{{item.up_name}}</view>
</view>
<view class="right" >
<image src="../../static/yiguanzhu_img@2x.png"></image>
<view class="text">已关注</view>
</view>
<!-- <view class="right" v-else style="width:132rpx;height:54rpx;background:rgba(129,195,191,1);border-radius:32rpx 0rpx 0rpx 32rpx;">
<image src="../../static/yiguanzhu_img@2x.png"></image>
<view class="text" style="display:flex;align-items: center;">
<image class="icon" src="../../static/guanzhu_icon@2x.png" style="width:28rpx;height:28rpx;"></image>关注
</view>
</view> -->
</view>
<view class="nodata" v-if="likepeoplelist.length==0">暂无数据</view>
... ... @@ -57,13 +64,19 @@ methods:{
})
}
},
onShow() {
this.page=1;
this.likepeoplelist=[];
this.getlikepeople()
},
onLoad(){
this.getlikepeople()
}
}
</script>
<style lang="less">
.content{
background:rgba(249,249,249,1);
height: 100vh;
... ...
... ... @@ -13,7 +13,7 @@
</view>
<view class="item">
<view class="name">高中</view>
<view class="cont">{{userinfolist.school_info.name}}
<view class="cont" >{{userinfolist.school_info.name==undefined?'':userinfolist.school_info.name}}
<!-- <image class="icon" src="../../static/dizhi_btn@2x.png"></image> -->
</view>
</view>
... ... @@ -22,7 +22,7 @@
</picker> -->
<view class="item" style="border-bottom:none">
<view class="name">入学年份</view>
<view class="cont">{{userinfolist.starttime}}
<view class="cont">{{userinfolist.starttime==undefined?'':userinfolist.starttime}}
<!-- <image class="icon" src="../../static/dizhi_btn@2x.png"></image> -->
</view>
</view>
... ... @@ -52,6 +52,7 @@
}
},
methods: {
// 选择年月日
bindDateChange: function(e) {
this.userinfolist.starttime = e.target.value;
... ...
... ... @@ -88,6 +88,7 @@ export default {
this.commentlist=[];
this.getcommentlist()
},
onReachBottom(){
let newpage=this.page;
newpage++;
... ...
... ... @@ -36,12 +36,13 @@ export default {
university_id:"",
graduated_id:"",
up_id:"",
hightmatelist:[]
hightmatelist:[],
type:'',
schooltype:''
}
},
onLoad(){
onLoad(options){
this.schooltype=options.schooltype
this.gethightmate()
},
methods:{
... ... @@ -52,6 +53,7 @@ export default {
var params={
token:token,
page:that.page,
type:that.schooltype,
size:that.size,
university_id:that.university_id,
graduated_id:that.graduated_id,
... ...
... ... @@ -74,7 +74,7 @@
}
},
onLoad(options){
this.code2Token();
this.code2Token();
this.token=uni.getStorageSync('token')
console.log(options);
// this.getschoollist();
... ... @@ -105,7 +105,7 @@
code: res.code
}).then(r=>{
console.log()
uni.setStorageSync('token',r.userInfo.token);
// uni.setStorageSync('token',r.userInfo.token);
uni.setStorageSync('isRegister',r.userInfo.is_register);
that.isRegister = r.userInfo.is_register;
})
... ... @@ -179,6 +179,7 @@
console.log(3434)
},
tosearchpage(){
let token=uni.getStorageSync("token")
if(uni.getStorageSync('token')==''){
uni.showToast({
... ... @@ -236,11 +237,12 @@
<style lang="less">
page{
height: 100%;
background: rgba(249, 249, 249, 1);
// height: 100%;
}
.content {
background: rgba(249, 249, 249, 1);
height: 100%;
// height: 100%;
padding-bottom: 120rpx;
box-sizing: border-box;
.search {
... ...
... ... @@ -33,15 +33,15 @@
<view class="websit">本科生招生公众号:<text class="lianjie">{{university.wechat}}</text></view>
</view>
<view class="table">
<navigator class="colum" hover-class="none" url="./highSchoolmate">
<navigator class="colum" hover-class="none" url="./highSchoolmate?schooltype=1">
<view class="num">{{university.same_school_total_num}}</view>
<view class="title">高中校友</view>
</navigator>
<view class="colum" @click="popupShow">
<view class="colum" @click="popupShow" data-type="1">
<view class="num">{{university.same_city_total_num}}</view>
<view class="title">同城学长</view>
</view>
<view class="colum" @click="popupShow" style="border-right:none">
<view class="colum" @click="popupShow" style="border-right:none" data-type="2">
<view class="num">{{university.same_province_total_num}}</view>
<view class="title">同省学长</view>
</view>
... ... @@ -133,7 +133,8 @@ export default {
iscellect:true,
sel:0,
baseurl:app.globalData.imageBaseUrl,
isactive:false
isactive:false,
vip_level:''
}
... ... @@ -149,7 +150,9 @@ export default {
this.getollege()
this.getarticletype()
this.getAllArticle()
this.getAllArticle();
// 获取个人信息
this.getpersoninfo()
},
methods:{
... ... @@ -160,13 +163,47 @@ export default {
url:'./academyDetails?university_id='+id+'&name='+name
})
},
popupShow(){
this.isPopupShow=true
popupShow(e){
let type=e.currentTarget.dataset.type;
if(type==1){
if(this.vip_level==1||this.vip_level==2){
uni.navigateTo({
url:"./highSchoolmate?schooltype="+2
})
}else{
this.isPopupShow=true
}
}else if(type==2){
if(this.vip_level==2){
uni.navigateTo({
url:"./highSchoolmate?schooltype="+3
})
}else{
this.isPopupShow=true
}
}
},
popupHide(){
this.isPopupShow=false
},
// 获取个人信息
getpersoninfo(){
let that = this;
var url='student/getMyInfo';
var params={
}
app.post(url,params,"get").then((res)=>{
console.log(res)
this.vip_level=res.vip_level
}).catch((err)=>{
console.log(err)
})
},
//获取大学详细信息
getschooldetails(){
var token = uni.getStorageSync('token')
... ...
<template>
<view class="content">
<view class="msgCard">
<image :src="matemsg.head_image" class="photo"></image>
<view class="title">{{matemsg.nickname==undefined?'':matemsg.nickname}}</view>
<view class="o">{{matemsg.university_name==undefined?'':matemsg.university_name}} | {{matemsg.college_name==undefined?'':matemsg.college_name}} | {{matemsg.end_year==undefined?'':matemsg.end_year}}</view>
<view class="t">{{matemsg.school_name==undefined?'':matemsg.school_name}} | <text v-for="(item,index) in matemsg.subject_names" :key="index">{{item}}</text> | {{matemsg.up_name==undefined?'':matemsg.up_name}}</view>
<view class="mall">个人邮箱:{{matemsg.email==undefined?'':matemsg.email}}</view>
<view class="right" v-if="matemsg.is_like==1" @click="notlike">
<image src="../../static/yiguanzhu_img@2x.png"></image>
<view class="text">已关注</view>
</view>
<view class="right" @click="like" v-else style="width:132rpx;height:54rpx;background:rgba(129,195,191,1);border-radius:32rpx 0rpx 0rpx 32rpx;">
<!-- <image src="../../static/yiguanzhu_img@2x.png"></image> -->
<view class="text"> <image class="icon" src="../../static/guanzhu_icon@2x.png"></image>关注</view>
</view>
</view>
<view class="tabCard">
<!-- <view class="item" v-for="(item,index) in articletypelist" :key="index">{{item.name}}</view> -->
<view class="item" :class="sel==index?'active':''" @click="selecttype(item,index)" v-for="(item,index) in articletypelist" :key="index" :data-id="item.id">{{item.name}}
<image class="selected" src="../../static/xuanzhong_icon@2x.png" v-if="sel==index"></image>
<!-- <image class="selected" src="" v-else></image> -->
</view>
</view>
<view class="content">
<view class="msgCard">
<image :src="matemsg.head_image" class="photo"></image>
<view class="title">{{matemsg.nickname==undefined?'':matemsg.nickname}}</view>
<view class="o">{{matemsg.university_name==undefined?'':matemsg.university_name}} |
{{matemsg.college_name==undefined?'':matemsg.college_name}} | {{matemsg.end_year==undefined?'':matemsg.end_year}}</view>
<view class="t">{{matemsg.school_name==undefined?'':matemsg.school_name}} | <text v-for="(item,index) in matemsg.subject_names"
:key="index">{{item}}</text> | {{matemsg.up_name==undefined?'':matemsg.up_name}}</view>
<view class="mall">个人邮箱:{{matemsg.email==undefined?'':matemsg.email}}</view>
<view class="right" v-if="matemsg.is_like==1" @click="notlike">
<image src="../../static/yiguanzhu_img@2x.png"></image>
<view class="text">已关注</view>
</view>
<view class="right" @click="like" v-else style="width:132rpx;height:54rpx;background:rgba(129,195,191,1);border-radius:32rpx 0rpx 0rpx 32rpx;">
<!-- <image src="../../static/yiguanzhu_img@2x.png"></image> -->
<view class="text">
<image class="icon" src="../../static/guanzhu_icon@2x.png"></image>关注
</view>
</view>
</view>
<view class="tabCard">
<!-- <view class="item" v-for="(item,index) in articletypelist" :key="index">{{item.name}}</view> -->
<view class="item" :class="sel==index?'active':''" @click="selecttype(item,index)" v-for="(item,index) in articletypelist"
:key="index" :data-id="item.id">{{item.name}}
<image class="selected" src="../../static/xuanzhong_icon@2x.png" v-if="sel==index"></image>
<!-- <image class="selected" src="" v-else></image> -->
</view>
</view>
<view class="nodata" v-if="articleList.length==0">暂无数据</view>
<view class="articl" v-else>
<view v-for="(item,index) in articleList" :key="index" @click="toarticlemsg(item)">
<view class="articltitle">
<image class="photo" :src="item.head_image"></image>
<view class="msg">
<view class="name">{{item.nickname}}</view>
<view class="tips">{{item.article_type_name}}</view>
</view>
</view>
<view class="articleBox">
<view class="title">{{item.title}}</view>
<view class="txt">{{item.des_content}}</view>
<view style="display:flex;">
<image :src="item" v-for="(item,indexk) in item.des_images" :key="indexk" @click.stop="preimg(index,indexk)" style="margin-right:10rpx;margin-bottom:10rpx"></image>
</view>
<!-- <image src="../../static/bg_img@2x.png"></image> -->
</view>
</view>
</view>
<view v-if="type==1">
<view class="botmBox">
<view class="liuyan" @click="liuyanBoxShow">
<image src="../../static/liuyan_icon@2x.png"></image>
<view class="txt">我要留言</view>
</view>
<view class="daxie" style="border:none" @click="daxieShow">
<image src="../../static/dashang_icon@2x.png"></image>
<view class="txt">我要答谢</view>
</view>
</view>
<view class="popup" v-if="isliuyanBoxShow">
<view class="card">
<view class="title">我要留言</view>
<view class="liuyanContent">
<textarea name="" id="" cols="30" rows="10" class="txt" v-model="content" placeholder="请输入你想请教的问题" placeholder-style="color:rgba(189,196,206,1);font-size:24rpx;"></textarea>
<view class="num">{{content.length}}/200</view>
</view>
<view class="btn" @click="sendmsg">发送留言</view>
<view class="close" @click="liuyanBoxHide">
<image src="../../static/guanbi_icon@2x.png"></image>
</view>
</view>
</view>
<view class="popup2" v-if="isdaxieBoxShow">
<view class="card">
<view class="title">我要答谢{{moneyshow}}</view>
<view v-if="moneyshow">
<view class="box" :class="{'active':isactive==1}" @click="picked" data-id=1 data-money=1>¥1</view>
<view class="box" :class="{'active':isactive==2}" @click="picked" data-id=2 data-money=6>¥6</view>
<view class="box" :class="{'active':isactive==3}" @click="picked" data-id=3 data-money=10>¥10</view>
<view class="box" :class="{'active':isactive==4}" @click="picked" data-id=4 data-money=30>¥30</view>
<view class="box" :class="{'active':isactive==5}" @click="picked" data-id=5 data-money=50>¥50</view>
<view class="box" :class="{'active':isactive==6}" @click="picked" data-id=6 data-money=100>¥100</view>
<view class="box" :class="{'active':isactive==7}" @click="moneyShow" data-id=7>其他金额</view>
</view>
<view v-else>
<view class="input">
<view class="txt">¥</view>
<input type="text" placeholder="请输入答谢金额" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;" @input="entermoney">
</view>
<view class="btn" @click="moneyHide">确定</view>
</view>
<view class="close" @click="daxieHide">
<image src="../../static/guanbi_icon@2x.png"></image>
</view>
</view>
</view>
</view>
</view>
<view class="articl" v-else>
<view v-for="(item,index) in articleList" :key="index" @click="toarticlemsg(item)">
<view class="articltitle">
<image class="photo" :src="item.head_image" @click.stop="avatarjump(item.user_id)"></image>
<view class="msg">
<view class="name">{{item.nickname}}</view>
<view class="tips">{{item.article_type_name}}</view>
</view>
</view>
<view class="articleBox">
<view class="title">{{item.title}}</view>
<view class="txt">
<view class="textblock">
{{item.des_content}}
</view>
<text class="alltext" style="color:#2D5575;font-size:24rpx;font-weight:bold;" @click="toarticlemsg(item)" v-if="item.des_content.length>150">全部</text>
</view>
<view style="display:flex;">
<image :src="item" v-for="(item,indexk) in item.des_images" :key="indexk" @click.stop="preimg(index,indexk)"
style="margin-right:10rpx;margin-bottom:10rpx"></image>
</view>
<!-- <image src="../../static/bg_img@2x.png"></image> -->
</view>
</view>
</view>
<view v-if="type==1">
<view class="botmBox">
<view class="liuyan" @click="liuyanBoxShow">
<image src="../../static/liuyan_icon@2x.png"></image>
<view class="txt">我要留言</view>
</view>
<view class="daxie" style="border:none" @click="daxieShow">
<image src="../../static/dashang_icon@2x.png"></image>
<view class="txt">我要答谢</view>
</view>
</view>
<view class="popup" v-if="isliuyanBoxShow">
<view class="card">
<view class="title">我要留言</view>
<view class="liuyanContent">
<textarea name="" id="" cols="30" rows="10" class="txt" v-model="content" placeholder="请输入你想请教的问题"
placeholder-style="color:rgba(189,196,206,1);font-size:24rpx;"></textarea>
<view class="num">{{content.length}}/200</view>
</view>
<view class="btn" @click="sendmsg">发送留言</view>
<view class="close" @click="liuyanBoxHide">
<image src="../../static/guanbi_icon@2x.png"></image>
</view>
</view>
</view>
<view class="popup2" v-if="isdaxieBoxShow">
<view class="card">
<view class="title">我要答谢</view>
<view v-if="moneyshow">
<view>
<view class="box" :class="{'active':isactive==1}" @click="picked" data-id=1 data-money=1>¥1</view>
<view class="box" :class="{'active':isactive==2}" @click="picked" data-id=2 data-money=6>¥6</view>
<view class="box" :class="{'active':isactive==3}" @click="picked" data-id=3 data-money=10>¥10</view>
<view class="box" :class="{'active':isactive==4}" @click="picked" data-id=4 data-money=30>¥30</view>
<view class="box" :class="{'active':isactive==5}" @click="picked" data-id=5 data-money=50>¥50</view>
<view class="box" :class="{'active':isactive==6}" @click="picked" data-id=6 data-money=100>¥100</view>
<view class="box" :class="{'active':isactive==7}" @click="moneyShow" data-id=7>其他金额</view>
</view>
<view class="btn" @click="pickedsure" style="margin:28rpx auto 0;">确定</view>
</view>
<view v-else>
<view class="input">
<view class="txt">¥</view>
<input type="text" placeholder="请输入答谢金额" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;" @input="entermoney">
</view>
<view class="btn" @click="moneyHide">确定</view>
</view>
<view class="close" @click="daxieHide">
<image src="../../static/guanbi_icon@2x.png"></image>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
isliuyanBoxShow:false,
isdaxieBoxShow:false,
moneyshow:true,
id:'',
matemsg:{},
articletypelist:[],
articleList:[],
user_id:'',
page:'1',
size:'10',
type_id:'',
content:'',
isactive:1,
type:'',
money:'',
sel:0
}
},
onLoad(options){
console.log('我的数据',options)
this.id=options.id;
this.user_id=options.user_id
this.type=options.type
console.log(options)
this.getmatemsg()
this.getarticletype();
this.getAllArticle()
},
methods:{
// 进入文章详情
toarticl(e) {
var id = e.currentTarget.dataset.id
uni.navigateTo({
url: '../school/article?article_id=' + id
})
},
preimg(index,indexk){
let that=this;
uni.previewImage({
current: that.articleList[index].des_images[indexk],
urls: that.articleList[index].des_images,
success: function (res) { },
fail: function (res) { },
complete: function (res) { },
})
},
liuyanBoxShow(){
this.isliuyanBoxShow=true
},
liuyanBoxHide(){
this.isliuyanBoxShow=false
},
daxieShow(){
this.isdaxieBoxShow=true;
},
daxieHide(){
this.isdaxieBoxShow=false
this.moneyshow=true
this.isactive=1
},
moneyShow(){
this.moneyshow=false
this.isactive=7
},
//输入其他金额
entermoney(e){
this.money=e.detail.value
},
moneyHide(){
// this.isactive=e.currentTarget.dataset.id
// this.money=e.currentTarget.dataset.money
var that = this
var url = "thank/pay"
var token = uni.getStorageSync('token')
var params = {
token:token,
money:that.money,
userb_id:that.user_id
}
app.post(url,params,"post").then((res)=>{
console.log(res)
var timeStamp = res.timeStamp.toString();
// console.log(timeStamp);
wx.requestPayment({
timeStamp: timeStamp,
nonceStr: res.nonceStr,
package: res.package,
signType: res.signType,
paySign: res.paySign,
success: function(res) {
console.log(res)
wx.navigateTo({
url: '/pages/orderbox/orderbox?index=' + 0
})
import app from "../../App.vue";
export default {
data() {
return {
isliuyanBoxShow: false,
isdaxieBoxShow: false,
moneyshow: true,
id: '',
matemsg: {},
articletypelist: [],
articleList: [],
user_id: '',
page: '1',
size: '10',
type_id: '',
content: '',
isactive: 0,
type: '',
money: '',
sel: 0
}
},
fail: function(res) {
console.log(123);
console.log(res);
}
})
}).catch((err)=>{
console.log(err)
})
// this.moneyshow=true
},
getmatemsg(){
let token = uni.getStorageSync('token')
let that=this
var url = "student/getStudentInfo"
var params = {
user_id:that.user_id,
token:token
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.matemsg=res
// that.user_id=res.user_id
console.log(res.university_id)
}).catch((err)=>{
console.log(err)
})
},
getarticletype(){
var that = this
var url = "article/getArticleType"
var params = {}
app.post(url,params,"get").then((res)=>{
this.articletypelist=res;
let obj={
id:'',
name:'全部'
}
res.unshift(obj)
console.log(res)
}).catch((err)=>{
console.log(err)
})
},
getAllArticle(){
var token = uni.getStorageSync('token')
var that=this
var url="article/getArticleList"
var params = {
// university_id:that.university_id,
page:that.page,
size:that.size,
user_id:that.user_id,
type_id:that.type_id,
token:token
}
app.post(url,params,"get").then((res)=>{
// res.forEach(function(value,index,array){
// value.head_image=app.globalData.imageBaseUrl+value.head_image
onLoad(options) {
console.log('我的数据', options)
this.id = options.id;
this.user_id = options.user_id
this.type = options.type
console.log(options)
this.getmatemsg()
this.getarticletype();
this.getAllArticle()
},
methods: {
// 跳转作者头像
avatarjump(userid){
// uni.navigateTo({
// url: "../school/schoolmateMsg?user_id=" + id + "&type=" + this.type
// })
this.articleList=res
}).catch((err)=>{
console.log(err)
})
},
sendmsg(){
var that = this
var url = "mes/sendMes"
var token = uni.getStorageSync('token')
var params = {
token:token,
userb_id:that.user_id,
des_content:that.content
}
app.post(url,params,"post").then((res)=>{
console.log(res)
that.content=''
that.isliuyanBoxShow=false
}).catch((err)=>{
console.log(err)
})
},
picked(e){
this.isactive=e.currentTarget.dataset.id
this.money=e.currentTarget.dataset.money
var that = this
var url = "thank/pay"
var token = uni.getStorageSync('token')
var params = {
token:token,
money:that.money,
userb_id:that.user_id
}
app.post(url,params,"post").then((res)=>{
console.log(res)
var timeStamp = res.timeStamp.toString();
// console.log(timeStamp);
wx.requestPayment({
timeStamp: timeStamp,
nonceStr: res.nonceStr,
package: res.package,
signType: res.signType,
paySign: res.paySign,
success: function(res) {
console.log(res)
wx.navigateTo({
url: '/pages/orderbox/orderbox?index=' + 0
})
},
fail: function(res) {
console.log(123);
console.log(res);
}
})
}).catch((err)=>{
console.log(err)
})
},
toarticlemsg(item){
console.log('文章详情',item)
uni.navigateTo({
url:'../school/article?article_id='+item.id
})
},
// payment(res) {
// let that = this;
// var timeStamp = res.timeStamp.toString();
// // console.log(timeStamp);
// wx.requestPayment({
// timeStamp: timeStamp,
// nonceStr: res.nonceStr,
// package: res.package,
// signType: res.signType,
// paySign: res.paySign,
// success: function(res) {
// console.log(res)
// wx.navigateTo({
// url: '/pages/orderbox/orderbox?index=' + 0
// })
// },
// fail: function(res) {
// console.log(123);
// console.log(res);
// }
// })
// },
like(){
var that = this
var url = "student/likeStudent"
var token = uni.getStorageSync('token')
var params = {
token:token,
userb_id:that.user_id
}
app.post(url,params,"post").then((res)=>{
console.log(res)
that.matemsg.is_like=1
}).catch((err)=>{
console.log(err)
})
},
notlike(){
var that = this
var url = "student/likeStudent"
var token = uni.getStorageSync('token')
var params = {
token:token,
userb_id:that.user_id
}
app.post(url,params,"post").then((res)=>{
console.log(res)
that.matemsg.is_like=0
}).catch((err)=>{
console.log(err)
})
},
selecttype(item,index){
this.sel=index
this.type_id=item.id
this.getAllArticle()
},
}
}
this.page=1;
this.articleList=[];
this.sel = 0;
this.type_id = '';
this.user_id=userid;
this.getmatemsg();
this.getAllArticle()
},
// 进入文章详情
toarticl(e) {
var id = e.currentTarget.dataset.id
uni.navigateTo({
url: '../school/article?article_id=' + id
})
},
preimg(index, indexk) {
let that = this;
uni.previewImage({
current: that.articleList[index].des_images[indexk],
urls: that.articleList[index].des_images,
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
liuyanBoxShow() {
this.isliuyanBoxShow = true
},
liuyanBoxHide() {
this.isliuyanBoxShow = false
},
daxieShow() {
this.isdaxieBoxShow = true;
},
daxieHide() {
this.isdaxieBoxShow = false
this.moneyshow = true
this.isactive = 1
},
moneyShow() {
this.moneyshow = false
this.isactive = 7
},
//输入其他金额
entermoney(e) {
this.money = e.detail.value
},
moneyHide() {
// this.isactive=e.currentTarget.dataset.id
// this.money=e.currentTarget.dataset.money
var that = this;
var reg = /^-?\d+$/
if (!reg.test(that.money)) {
uni.showToast({
title: '请输入整数金额',
icon: 'none'
})
return false
}
var url = "thank/pay"
var token = uni.getStorageSync('token')
var params = {
token: token,
money: that.money,
userb_id: that.user_id
}
app.post(url, params, "post").then((res) => {
console.log(res)
var timeStamp = res.timeStamp.toString();
// console.log(timeStamp);
wx.requestPayment({
timeStamp: timeStamp,
nonceStr: res.nonceStr,
package: res.package,
signType: res.signType,
paySign: res.paySign,
success: function(res) {
console.log(res)
wx.navigateTo({
url: '/pages/orderbox/orderbox?index=' + 0
})
},
fail: function(res) {
console.log(123);
console.log(res);
}
})
}).catch((err) => {
console.log(err)
})
// this.moneyshow=true
},
getmatemsg() {
let token = uni.getStorageSync('token')
let that = this
var url = "student/getStudentInfo"
var params = {
user_id: that.user_id,
token: token
}
app.post(url, params, "get").then((res) => {
console.log(res)
that.matemsg = res
// that.user_id=res.user_id
console.log(res.university_id)
}).catch((err) => {
console.log(err)
})
},
getarticletype() {
var that = this
var url = "article/getArticleType"
var params = {}
app.post(url, params, "get").then((res) => {
this.articletypelist = res;
let obj = {
id: '',
name: '全部'
}
res.unshift(obj)
console.log(res)
}).catch((err) => {
console.log(err)
})
},
getAllArticle() {
var token = uni.getStorageSync('token')
var that = this
var url = "article/getArticleList"
var params = {
// university_id:that.university_id,
page: that.page,
size: that.size,
user_id: that.user_id,
type_id: that.type_id,
token: token
}
app.post(url, params, "get").then((res) => {
// res.forEach(function(value,index,array){
// value.head_image=app.globalData.imageBaseUrl+value.head_image
// })
this.articleList =this.articleList.concat(res)
}).catch((err) => {
console.log(err)
})
},
sendmsg() {
var that = this
var url = "mes/sendMes"
var token = uni.getStorageSync('token')
var params = {
token: token,
userb_id: that.user_id,
des_content: that.content
}
app.post(url, params, "post").then((res) => {
console.log(res)
that.content = ''
that.isliuyanBoxShow = false
}).catch((err) => {
console.log(err)
})
},
picked(e) {
this.isactive = e.currentTarget.dataset.id
this.money = e.currentTarget.dataset.money
},
pickedsure() {
var that = this;
if (that.money == '') {
uni.showToast({
title: "请选择答谢金额",
icon: "none"
})
}
var url = "thank/pay"
var token = uni.getStorageSync('token')
var params = {
token: token,
money: that.money,
userb_id: that.user_id
}
app.post(url, params, "post").then((res) => {
console.log(res)
var timeStamp = res.timeStamp.toString();
// console.log(timeStamp);
wx.requestPayment({
timeStamp: timeStamp,
nonceStr: res.nonceStr,
package: res.package,
signType: res.signType,
paySign: res.paySign,
success: function(res) {
console.log(res)
wx.navigateTo({
url: '/pages/orderbox/orderbox?index=' + 0
})
},
fail: function(res) {
console.log(123);
console.log(res);
}
})
}).catch((err) => {
console.log(err)
})
},
toarticlemsg(item) {
console.log('文章详情', item)
uni.navigateTo({
url: '../school/article?article_id=' + item.id
})
},
// payment(res) {
// let that = this;
// var timeStamp = res.timeStamp.toString();
// // console.log(timeStamp);
// wx.requestPayment({
// timeStamp: timeStamp,
// nonceStr: res.nonceStr,
// package: res.package,
// signType: res.signType,
// paySign: res.paySign,
// success: function(res) {
// console.log(res)
// wx.navigateTo({
// url: '/pages/orderbox/orderbox?index=' + 0
// })
// },
// fail: function(res) {
// console.log(123);
// console.log(res);
// }
// })
// },
like() {
var that = this
var url = "student/likeStudent"
var token = uni.getStorageSync('token')
var params = {
token: token,
userb_id: that.user_id
}
app.post(url, params, "post").then((res) => {
console.log(res)
that.matemsg.is_like = 1
}).catch((err) => {
console.log(err)
})
},
notlike() {
var that = this
var url = "student/likeStudent"
var token = uni.getStorageSync('token')
var params = {
token: token,
userb_id: that.user_id
}
app.post(url, params, "post").then((res) => {
console.log(res)
that.matemsg.is_like = 0
}).catch((err) => {
console.log(err)
})
},
selecttype(item, index) {
this.sel = index
this.type_id = item.id;
this.page=1;
this.articleList=[];
this.getAllArticle()
},
}
}
</script>
<style lang="less">
.popup2{
width:100%;
height:100%;
background:rgba(0,0,0,.6);
// opacity:1;
// border-radius:8rpx;
position: fixed;
top: 0;
right: 0;
z-index: 999;
.card{
width:628rpx;
height:574rpx;
background:rgba(255,255,255,1);
opacity:1;
border-radius:8rpx;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
padding: 0 8rpx 0 36rpx;
box-sizing: border-box;
.close{
width: 24rpx;
height: 24rpx;
position: absolute;
top: 22rpx;
right: 22rpx;
image{
width: 24rpx;
height: 24rpx;
}
}
.title{
color:rgba(6,18,30,1);
font-size: 28rpx;
text-align: center;
margin-top: 62rpx;
margin-bottom: 60rpx;
font-weight:500;
}
.input{
width:532rpx;
height:72rpx;
background:rgba(255,255,255,1);
border:1rpx solid rgba(6,18,30,1);
opacity:1;
border-radius:36rpx;
display: flex;
align-items: center;
padding: 0 144rpx;
box-sizing: border-box;
margin-top: 110rpx;
input{
width: 220rpx;
height: 72rpx;
margin-left: 20rpx;
}
}
.btn{
width:220rpx;
height:60rpx;
background:rgba(45,85,117,1);
opacity:1;
border-radius:8rpx;
color: #fff;
font-size: 28rpx;
line-height: 60rpx;
text-align: center;
margin: 0 auto;
margin-top: 110rpx;
}
.box{
width:166rpx;
height:56rpx;
background:rgba(255,255,255,1);
border:1rpx solid rgba(6,18,30,1);
opacity:1;
border-radius:40rpx;
text-align: center;
font-size: 28rpx;
line-height: 56rpx;
color:rgba(6,18,30,1);
display: inline-block;
margin-right: 26rpx;
margin-top: 40rpx;
}
.active{
background:rgba(129,195,191,1);
border:1rpx solid rgba(129,195,191);
color: #fff;
}
}
}
.popup{
width:100%;
height:100%;
background:rgba(0,0,0,.6);
// opacity:1;
// border-radius:8rpx;
position: fixed;
top: 0;
right: 0;
z-index: 999;
.card{
width:628rpx;
height:674rpx;
background:rgba(255,255,255,1);
opacity:1;
border-radius:8rpx;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
.title{
color:rgba(6,18,30,1);
font-size: 28rpx;
text-align: center;
margin-top: 62rpx;
}
.liuyanContent{
width:538rpx;
height:366rpx;
background:rgba(249,249,249,1);
opacity:1;
border-radius:8rpx;
margin: 0 auto;
margin-top: 26rpx;
padding: 28rpx;
box-sizing: border-box;
position: relative;
.num{
position: absolute;
bottom: 16rpx;
right: 24rpx;
font-size: 24rpx;
}
.txt{
width: 100%;
height: 100%;
}
}
.btn{
width:220rpx;
height:60rpx;
background:rgba(45,85,117,1);
opacity:1;
border-radius:8rpx;
color: #fff;
font-size: 28rpx;
line-height: 60rpx;
text-align: center;
margin: 0 auto;
margin-top: 60rpx;
}
.close{
width: 24rpx;
height: 24rpx;
position: absolute;
top: 22rpx;
right: 22rpx;
image{
width: 24rpx;
height: 24rpx;
}
}
}
}
.content{
background: url("../../static/bg_img@2x(2).png") no-repeat;
// background-color: rgba(249,249,249,1);
// height: 100vh;
background-size: 750rpx 292rpx;
overflow: hidden;
color:rgba(6,18,30,1);
padding-bottom: 80rpx;
.msgCard{
width:686rpx;
height:438rpx;
background:rgba(255,255,255,1);
box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1);
opacity:1;
border-radius:20rpx;
margin: 0 auto;
margin-top: 26rpx;
text-align: center;
position: relative;
.photo{
width: 136rpx;
height: 136rpx;
margin-top: 50rpx;
border-radius: 50%;
}
.title{
font-size: 32rpx;
margin-top: 24rpx;
margin-bottom: 24rpx;
}
.o,.t{
color:rgba(140,145,152,1);
font-size: 22rpx;
margin-bottom: 4rpx;
}
.mall{
color:rgba(140,145,152,1);
font-size: 22rpx;
margin-top: 14rpx;
}
.right{
width: 132rpx;
height: 54rpx;
position: absolute;
right: 0;
top: 38rpx;
image{
width: 132rpx;
height: 54rpx;
}
.text{
color: #fff;
font-size: 24rpx;
width: 80rpx;
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
display: flex;
align-items: center;
.icon{
width: 28rpx;
height: 28rpx;
}
}
}
}
// .tabCard{
// height:80rpx;
// margin: 0 auto;
// background:rgba(255,255,255,1);
// margin-top: 22rpx;
// overflow-x: auto;
// width: 686rpx;
// box-sizing: border-box;
// // display: flex;
// // flex-wrap: wrap;
// white-space:nowrap;
// padding: 10rpx 0 0 32rpx;
// .item{
// margin-right: 40rpx;
// color:rgba(6,18,30,1);
// font-size: 28rpx;
// // width: 112rpx;
// display: inline-block;
// margin-right: 44rpx;
// // float: left;
// // height: 70rpx;
// }
// .active{
// color:rgba(5,132,157,1);
// background: url("../../static/xuanzhong_icon@2x.png") no-repeat;
// background-size: 60rpx 15rpx;
// background-position: 0 44rpx;
// height: 60rpx;
// }
// }
.tabCard{
height:70rpx;
background:rgba(255,255,255,1);
margin-top: 22rpx;
overflow-x: auto;
display: flex;
// flex-wrap: wrap;
white-space:nowrap;
padding: 10rpx 0 0 32rpx;
.item{
margin-right: 40rpx;
color:rgba(6,18,30,1);
font-size: 28rpx;
// width: 112rpx;
display: inline-block;
margin-right: 44rpx;
// float: left;
// height: 70rpx;
display: flex;
flex-direction: column;
align-items: center;
// justify-content: start;
}
.active{
color:rgba(5,132,157,1);
}
.selected{
width: 60rpx;
height: 15rpx;
margin-top: 8rpx;
}
}
.articl{
background-color: #fff;
margin: 0 auto;
margin-top: 24rpx;
padding: 0 34rpx 32rpx;
.popup2 {
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .6);
// opacity:1;
// border-radius:8rpx;
position: fixed;
top: 0;
right: 0;
z-index: 999;
.card {
width: 628rpx;
height: 574rpx;
background: rgba(255, 255, 255, 1);
opacity: 1;
border-radius: 8rpx;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 0 8rpx 0 36rpx;
box-sizing: border-box;
box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1);
border-radius:20rpx;
margin-bottom: 42rpx;
width: 686rpx;
box-sizing: border-box;
height:auto!important;
.nodata{
font-size: 28rpx;
text-align: center;
}
.articltitle{
border-bottom: 1rpx solid rgba(238,238,238,1);
padding: 40rpx 0 26rpx 0;
display: flex;
font-size: 24rpx;
.name{
color:rgba(61,68,77,1);
}
.tips{
color:rgba(140,145,152,1);
}
.photo{
width: 68rpx;
height: 68rpx;
margin-right: 20rpx;
.close {
width: 24rpx;
height: 24rpx;
position: absolute;
top: 22rpx;
right: 22rpx;
image {
width: 24rpx;
height: 24rpx;
}
}
.title {
color: rgba(6, 18, 30, 1);
font-size: 28rpx;
text-align: center;
margin-top: 62rpx;
margin-bottom: 60rpx;
font-weight: 500;
}
.input {
width: 532rpx;
height: 72rpx;
background: rgba(255, 255, 255, 1);
border: 1rpx solid rgba(6, 18, 30, 1);
opacity: 1;
border-radius: 36rpx;
display: flex;
align-items: center;
padding: 0 144rpx;
box-sizing: border-box;
margin-top: 110rpx;
input {
width: 220rpx;
height: 72rpx;
margin-left: 20rpx;
}
}
.btn {
width: 220rpx;
height: 60rpx;
background: rgba(45, 85, 117, 1);
opacity: 1;
border-radius: 8rpx;
color: #fff;
font-size: 28rpx;
line-height: 60rpx;
text-align: center;
margin: 0 auto;
margin-top: 110rpx;
}
.box {
width: 166rpx;
height: 56rpx;
background: rgba(255, 255, 255, 1);
border: 1rpx solid rgba(6, 18, 30, 1);
opacity: 1;
border-radius: 40rpx;
text-align: center;
font-size: 28rpx;
line-height: 56rpx;
color: rgba(6, 18, 30, 1);
display: inline-block;
margin-right: 26rpx;
margin-top: 40rpx;
}
.active {
background: rgba(129, 195, 191, 1);
border: 1rpx solid rgba(129, 195, 191);
color: #fff;
}
}
}
.popup {
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .6);
// opacity:1;
// border-radius:8rpx;
position: fixed;
top: 0;
right: 0;
z-index: 999;
.card {
width: 628rpx;
height: 674rpx;
background: rgba(255, 255, 255, 1);
opacity: 1;
border-radius: 8rpx;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
.title {
color: rgba(6, 18, 30, 1);
font-size: 28rpx;
text-align: center;
margin-top: 62rpx;
}
.liuyanContent {
width: 538rpx;
height: 366rpx;
background: rgba(249, 249, 249, 1);
opacity: 1;
border-radius: 8rpx;
margin: 0 auto;
margin-top: 26rpx;
padding: 28rpx;
box-sizing: border-box;
position: relative;
.num {
position: absolute;
bottom: 16rpx;
right: 24rpx;
font-size: 24rpx;
}
.txt {
width: 100%;
height: 100%;
}
}
.btn {
width: 220rpx;
height: 60rpx;
background: rgba(45, 85, 117, 1);
opacity: 1;
border-radius: 8rpx;
color: #fff;
font-size: 28rpx;
line-height: 60rpx;
text-align: center;
margin: 0 auto;
margin-top: 60rpx;
}
.close {
width: 24rpx;
height: 24rpx;
position: absolute;
top: 22rpx;
right: 22rpx;
image {
width: 24rpx;
height: 24rpx;
}
}
}
}
.content {
background: url("../../static/bg_img@2x(2).png") no-repeat;
// background-color: rgba(249,249,249,1);
// height: 100vh;
background-size: 750rpx 292rpx;
overflow: hidden;
color: rgba(6, 18, 30, 1);
padding-bottom: 80rpx;
.msgCard {
width: 686rpx;
height: 438rpx;
background: rgba(255, 255, 255, 1);
box-shadow: 0rpx 4rpx 6rpx rgba(45, 85, 117, 0.1);
opacity: 1;
border-radius: 20rpx;
margin: 0 auto;
margin-top: 26rpx;
text-align: center;
position: relative;
.photo {
width: 136rpx;
height: 136rpx;
margin-top: 50rpx;
border-radius: 50%;
}
.title {
font-size: 32rpx;
margin-top: 24rpx;
margin-bottom: 24rpx;
}
.o,
.t {
color: rgba(140, 145, 152, 1);
font-size: 22rpx;
margin-bottom: 4rpx;
}
.mall {
color: rgba(140, 145, 152, 1);
font-size: 22rpx;
margin-top: 14rpx;
}
.right {
width: 132rpx;
height: 54rpx;
position: absolute;
right: 0;
top: 38rpx;
image {
width: 132rpx;
height: 54rpx;
}
.text {
color: #fff;
font-size: 24rpx;
width: 80rpx;
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
align-items: center;
.icon {
width: 28rpx;
height: 28rpx;
}
}
}
}
// .tabCard{
// height:80rpx;
// margin: 0 auto;
// background:rgba(255,255,255,1);
// margin-top: 22rpx;
// overflow-x: auto;
// width: 686rpx;
// box-sizing: border-box;
// // display: flex;
// // flex-wrap: wrap;
// white-space:nowrap;
// padding: 10rpx 0 0 32rpx;
// .item{
// margin-right: 40rpx;
// color:rgba(6,18,30,1);
// font-size: 28rpx;
// // width: 112rpx;
// display: inline-block;
// margin-right: 44rpx;
// // float: left;
// // height: 70rpx;
// }
// .active{
// color:rgba(5,132,157,1);
// background: url("../../static/xuanzhong_icon@2x.png") no-repeat;
// background-size: 60rpx 15rpx;
// background-position: 0 44rpx;
// height: 60rpx;
// }
// }
.tabCard {
height: 70rpx;
background: rgba(255, 255, 255, 1);
margin-top: 22rpx;
overflow-x: auto;
display: flex;
// flex-wrap: wrap;
white-space: nowrap;
padding: 10rpx 0 0 32rpx;
.item {
margin-right: 40rpx;
color: rgba(6, 18, 30, 1);
font-size: 28rpx;
// width: 112rpx;
display: inline-block;
margin-right: 44rpx;
// float: left;
// height: 70rpx;
display: flex;
flex-direction: column;
align-items: center;
// justify-content: start;
}
.active {
color: rgba(5, 132, 157, 1);
}
.selected {
width: 60rpx;
height: 15rpx;
margin-top: 8rpx;
}
}
.articl {
background-color: #fff;
margin: 0 auto;
margin-top: 24rpx;
padding: 0 34rpx 32rpx;
box-sizing: border-box;
box-shadow: 0rpx 4rpx 6rpx rgba(45, 85, 117, 0.1);
border-radius: 20rpx;
margin-bottom: 42rpx;
width: 686rpx;
box-sizing: border-box;
height: auto !important;
.nodata {
font-size: 28rpx;
text-align: center;
}
.articltitle {
border-bottom: 1rpx solid rgba(238, 238, 238, 1);
padding: 40rpx 0 26rpx 0;
display: flex;
font-size: 24rpx;
.name {
color: rgba(61, 68, 77, 1);
}
.tips {
color: rgba(140, 145, 152, 1);
}
.photo {
width: 68rpx;
height: 68rpx;
margin-right: 20rpx;
border-radius: 50%;
}
}
.articleBox{
.title{
color:rgba(6,18,30,1);
font-size: 28rpx;
margin-top: 24rpx;
}
.txt{
color:rgba(91,94,99,1);
font-size: 24rpx;
margin-top: 8rpx;
margin-bottom: 20rpx;
}
image{
width: 128rpx;
height: 128rpx;
margin-right: 20rpx;
margin-bottom: 20rpx;
}
}
}
.botmBox{
width: 750rpx;
height: 100rpx;
position: fixed;
bottom: 0;
z-index: 888;
display: flex;
background-color: #fff;
padding: 30rpx 0;
box-sizing: border-box;
.liuyan,.daxie{
display: flex;
width: 50%;
padding: 0rpx 110rpx;
box-sizing: border-box;
font-size: 28rpx;
height: 50rpx;
border-right: 1rpx solid rgba(238,238,238,1);
align-items: center;
image{
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
}
}
}
}
</style>
\ No newline at end of file
}
}
.articleBox {
.title {
color: rgba(6, 18, 30, 1);
font-size: 28rpx;
margin-top: 24rpx;
}
.txt {
color: rgba(91, 94, 99, 1);
font-size: 24rpx;
margin-top: 8rpx;
margin-bottom: 20rpx;
}
image {
width: 128rpx;
height: 128rpx;
margin-right: 20rpx;
margin-bottom: 20rpx;
}
}
}
.botmBox {
width: 750rpx;
height: 100rpx;
position: fixed;
bottom: 0;
z-index: 888;
display: flex;
background-color: #fff;
padding: 30rpx 0;
box-sizing: border-box;
.liuyan,
.daxie {
display: flex;
width: 50%;
padding: 0rpx 110rpx;
box-sizing: border-box;
font-size: 28rpx;
height: 50rpx;
border-right: 1rpx solid rgba(238, 238, 238, 1);
align-items: center;
image {
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
}
}
}
}
</style>
... ...
... ... @@ -11,6 +11,7 @@
placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;"
style="font-size:28rpx;"
v-model="word"
@confirm="getschoollist"
/>
</view>
<view class="searchBtn" @click="getschoollist">搜索</view>
... ... @@ -19,25 +20,27 @@
<view class="paiming" :class="{ active: active1 }" @click="paimingShow">排名</view>
<view class="diqu" :class="{ active: active2 }" @click="diquShow">地区</view>
<view class="paimingPopup" v-if="isPaimingShow">
<view class="title" @click="selectalllevel">全部</view>
<view class="item" @click="paimingHide" v-for="(item, index) in levelList" :key="index">{{ item.name }}</view>
<view class="title" @click="selectalllevel" :class="levelindex==-2?'selactive':''">全部</view>
<view class="item" @click="paimingHide" :class="levelindex==index?'selactive':''" :data-id="item.id" :data-index="index" v-for="(item, index) in levelList" :key="index">{{ item.name }}</view>
<!-- <view class="item" @click="paimingHide">{{item.name}}</view> -->
</view>
<view class="diquPopup" v-if="isDiquShow">
<view class="title" @click="selectallprovince">全部地区</view>
<view class="title" @click="selectallprovince" :class="selpro==-1?'selactive':''" :data-index="-2">全部地区</view>
<view class="cont">
<view class="colum">
<view class="item" @click="selectprovince" v-for="(item, index) in provinceList" :key="index" :data-id="item.code">{{ item.name }}</view>
<view class="item" :class="selpro==index?'selactive':''" @click="selectprovince" v-for="(item, index) in provinceList" :key="index" :data-index="index" :data-id="item.code">{{ item.name }}</view>
</view>
<view class="colum">
<view class="item" @click="selectcity" v-for="(item, index) in cityList" :key="index" :data-id="item.code">{{ item.name }}</view>
<view class="item" :class="selcity==index?'selactive':''" @click="selectcity" v-for="(item, index) in cityList" :key="index" :data-index="index" :data-id="item.code">{{ item.name }}</view>
</view>
</view>
</view>
</view>
</view>
<view class="nodata" v-if="schoolList.length==0">暂无数据</view>
<view class="contentBox">
<view class="contentBox" v-else>
<view class="item" v-for="(item, index) in schoolList" :key="index" @click="godetail(item)">
<view class="title">{{ item.name }}</view>
<image class="icon" :src="item.icon_image"></image>
... ... @@ -52,6 +55,9 @@ import app from '../../App.vue';
export default {
data() {
return {
selpro:-1,
selcity:-1,
levelindex:-1,
isPaimingShow: false,
isDiquShow: false,
active1: false,
... ... @@ -74,7 +80,16 @@ export default {
this.isDiquShow = false;
(this.active1 = true), (this.active2 = false);
},
paimingHide() {
paimingHide(e) {
let id=e.currentTarget.dataset.id;
let index=e.currentTarget.dataset.index;
this.levelindex=index;
this.province_id='';
this.level_id=id;
this.page=1;
this.schoolList=[];
this.getschoollist();
this.isPaimingShow = false;
(this.active1 = false), (this.active2 = false);
},
... ... @@ -118,21 +133,38 @@ export default {
//点击选中的省
selectprovince(e) {
this.province_id = e.currentTarget.dataset.id;
this.selpro=e.currentTarget.dataset.index;
this.selcity=-1;
this.getAllCity();
},
//点击全部省
selectallprovince() {
this.selpro=-2;
this.selcity=-1;
this.province_id='';
this.city_id='';
this.level_id='';
this.page=1;
this.schoolList=[];
this.getschoollist();
this.isDiquShow = false;
},
//点击选中全部市
selectallcity() {
this.getschoollist();
this.level_id='';
this.page=1;
this.schoolList=[];
this.isDiquShow = false;
this.getschoollist();
},
//点击选中的市
selectcity(e) {
this.city_id = e.currentTarget.dataset.id;
this.selcity=e.currentTarget.dataset.index;
this.level_id='';
this.page=1;
this.schoolList=[];
this.getschoollist();
this.isDiquShow = false;
},
... ... @@ -159,10 +191,10 @@ export default {
level_id: that.level_id,
province_id: that.province_id
};
app.post(url, params, 'post')
app.post(url, params,'post')
.then(res => {
console.log(res);
that.schoolList = res;
that.schoolList =that.schoolList.concat(res) ;
})
.catch(err => {});
},
... ... @@ -182,6 +214,11 @@ export default {
//点击全部排名
selectalllevel() {
this.isPaimingShow = false;
this.levelindex=-2;
this.level_id='';
this.province_id='';
this.page=1;
this.schoolList=[];
this.getschoollist();
},
// 进入学校详情页
... ...
<template>
<view class="content" @click="hide">
<view class="content" @click="hidekk">
<view @click.stop="showhide">
<view class="top">
<view class="search">
<image class="icon" src="../../static/sousuo_icon@2x.png"></image>
<input type="text" v-model="word" placeholder="请输入搜索内容" class="input" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;"
style="font-size:28rpx;">
style="font-size:28rpx;" @confirm="getmatelist">
</view>
<view class="searchBtn" @click="getmatelist">搜索</view>
</view>
... ... @@ -18,18 +18,18 @@
<view class="cont">
<view class="colum" style="overflow: auto;height: 600rpx;">
<view class="title" @click="selectallprovince">全部</view>
<view class="item" @click="selectprovince" v-for="(item,index) in provinceList" :key="index" :data-id="item.code">{{item.name}}</view>
<view class="title" @click="selectallprovince" :class="selpro==-2?'selactive':''" :data-index="-2">全部</view>
<view class="item" :class="selpro==index?'selactive':''" @click="selectprovince" v-for="(item,index) in provinceList" :key="index" :data-index="index" :data-id="item.code">{{item.name}}</view>
</view>
<view class="colum" style="overflow: auto;height: 600rpx;">
<!-- <view class="title" @click="selectallcity" :data-id="null">这个省的市</view> -->
<view class="item" @click="selectcity" v-for="(item,index) in cityList" :key="index" :data-id="item.code">{{item.name}}</view>
<view class="item" @click="selectcity" :class="selty==index?'selactive':''" v-for="(item,index) in cityList" :key="index" :data-index="index" :data-id="item.code">{{item.name}}</view>
</view>
<view class="colum" style="overflow: auto;height: 600rpx;">
<!-- <view class="title" @click="selectschool" :data-id="null">全部学校</view> -->
<view class="item" @click="selectschool" v-for="(item,index) in schoolList" :key="index" :data-id="item.id">{{item.name}}</view>
<view class="item" @click="selectschool" :class="selstuent==index?'selactive':''" v-for="(item,index) in schoolList" :key="index" :data-id="item.id" :data-index="index">{{item.name}}</view>
</view>
</view>
</view>
... ... @@ -45,7 +45,7 @@
<view class="majorPopup" v-if="isMajorShow">
<view class="cont" style="display:flex;flex-direction: column;overflow: auto;height: 600rpx;">
<!-- <view class="title" @click="selectgraduated" :data-id="null">全部</view> -->
<view class="item" style="width:330rpx" @click="selectgraduated" v-for="(item,index) in graduatedList" :key="index"
<view class="item" :class="major==index?'selactive':''" :data-index="index" style="width:330rpx" @click="selectgraduated" v-for="(item,index) in graduatedList" :key="index"
:data-id="item.id">{{item.name}}</view>
</view>
</view>
... ... @@ -53,7 +53,7 @@
<view class="stylePopup" v-if="isStyleShow">
<view class="cont" style="display:flex;flex-direction: column;overflow: auto;height: 600rpx;">
<!-- <view class="title" @click="selectup" :data-id="null">全部</view> -->
<view class="item" style="width:230rpx" @click="selectup" v-for="(item,index) in upList" :key="index" :data-id="item.id">{{item.name}}</view>
<view class="item" :class="upindex==index?'selactive':''" style="width:230rpx" @click="selectup" :data-index="index" v-for="(item,index) in upList" :key="index" :data-id="item.id">{{item.name}}</view>
</view>
</view>
... ... @@ -132,7 +132,11 @@
data() {
return {
selpro:-1,
selty:-1,
selstuent:-1,
major:-1,
upindex:-1,
isDiquShow: false,
// isSchoolShow:false,
isMajorShow: false,
... ... @@ -169,11 +173,13 @@
provinceList: [],
cityList: [],
schoolList: [],
word: ""
word: "",
vip_level:'',
}
},
methods: {
hide() {
hidekk() {
console.log(3889348439)
this.isDiquShow = false
},
... ... @@ -258,6 +264,22 @@
})
},
// 获取个人信息
getpersoninfo(){
let that = this;
var url='student/getMyInfo';
var params={
}
app.post(url,params,"get").then((res)=>{
console.log(res)
this.vip_level=res.vip_level;
console.log('3478783473474',that.vip_level)
that.getmatelist()
}).catch((err)=>{
console.log(err)
})
},
//获取学长列表
getmatelist() {
if (uni.getStorageSync('token') == '') {
... ... @@ -276,10 +298,19 @@
this.schoolmateList=[];
var url = "student/getStudentList"
var token = uni.getStorageSync('token')
let type=1;
console.log('3443743873478',this.vip_level)
if(this.vip_level==0){
type=1
}else if(this.vip_level==1){
type=2
}else if(this.vip_level==2){
type=3
}
var params = {
page: this.schoolmate.page,
size: this.schoolmate.size,
type: this.schoolmate.type,
type: type,
university_id: this.schoolmate.university_id,
graduated_id: this.schoolmate.graduated_id,
up_id: this.schoolmate.up_id,
... ... @@ -385,7 +416,8 @@
this.schoolmate.graduated_id=''
this.schoolmate.page = 1;
this.word='';
this.schoolmateList = []
this.schoolmateList = [];
this.upindex=e.currentTarget.dataset.index;
this.getmatelist()
this.isStyleShow = false
},
... ... @@ -400,11 +432,14 @@
this.schoolmate.university_id=''
this.schoolmate.up_id=''
this.word=''
this.schoolmateList = []
this.schoolmateList = [];
this.major=e.currentTarget.dataset.index;
this.getmatelist()
},
//点击选中的学校
selectschool(e) {
this.selstuent=e.currentTarget.dataset.index;
this.schoolmate.page = 1
this.schoolmate.graduated_id = ''
this.schoolmate.up_id = ''
... ... @@ -419,19 +454,26 @@
selectprovince(e) {
if (this.province_id != e.currentTarget.dataset.id) {
this.province_id = e.currentTarget.dataset.id;
let index=e.currentTarget.dataset.index;
this.selpro=index;
this.selty=-1;
this.selstuent=-1;
this.schoolList = [];
this.getAllCity()
}
},
//点击全部省
selectallprovince() {
selectallprovince(e) {
this.schoolmate.page = 1,
this.schoolmate.university_id = ''
this.schoolmate.graduated_id = ''
this.schoolmate.up_id = ''
this.word = ''
this.schoolmateList = []
this.schoolmateList = [];
this.selpro=e.currentTarget.dataset.index;
this.selty=-1;
this.selstuent=-1;
this.getmatelist()
this.isDiquShow = false
},
... ... @@ -444,7 +486,10 @@
//点击选中的市
selectcity(e) {
if (this.city_id != e.currentTarget.dataset.id) {
this.city_id = e.currentTarget.dataset.id
this.city_id = e.currentTarget.dataset.id;
let index=e.currentTarget.dataset.index;
this.selty=index;
this.selstuent=-1;
this.schoolList = [];
this.getAllSchool()
}
... ... @@ -473,13 +518,16 @@
// this.getAllSchool()
this.getAllGraduated()
this.getAllUp()
this.getAllProvince()
this.getAllProvince();
},
onShow() {
this.page = 1;
this.schoolmateList = []
this.getmatelist()
// 获取个人信息
this.getpersoninfo()
}
}
... ...