作者 lihongjuan

1

@@ -103,6 +103,13 @@ @@ -103,6 +103,13 @@
103 </script> 103 </script>
104 104
105 <style lang="less"> 105 <style lang="less">
  106 + .textblock{
  107 + height:auto;
  108 + display: -webkit-box;
  109 + -webkit-box-orient: vertical;
  110 + -webkit-line-clamp: 3;
  111 + overflow: hidden;
  112 + }
106 /*每个页面公共css */ 113 /*每个页面公共css */
107 image{ 114 image{
108 width:100%; 115 width:100%;
1 <template> 1 <template>
2 <view class="content"> 2 <view class="content">
3 <view class="item" @click="toschoolmate" v-for="(item,index) in likepeoplelist" :key="index" :data-id="item.user_id"> 3 <view class="item" @click="toschoolmate" v-for="(item,index) in likepeoplelist" :key="index" :data-id="item.user_id">
4 - <image class="photo" src="../../static/logo_img@2x.png"></image>  
5 - <view class="cont">  
6 - <view class="title">{{}}</view> 4 + <image class="photo" :src="item.head_image" style="border-radius: 50%;"></image>
  5 + <view class="cont">
  6 + <view class="title">{{item.nickname}}</view>
7 <view class="academy"> 7 <view class="academy">
8 - <image class="icon" src="../../static/xuexiao_icon@2x2.png"></image>河北工业大学 软件学院 软件工程 8 + <image class="icon" src="../../static/xuexiao_icon@2x2.png"></image>{{ item.university_name }} &nbsp;&nbsp;&nbsp;
  9 + {{ item.college_name }}&nbsp;&nbsp;&nbsp; {{ item.graduated_name }}
9 </view> 10 </view>
10 - <view class="fen">裸分</view>  
11 - </view>  
12 - <view class="right">  
13 - <image src="../../static/yiguanzhu_img@2x.png"></image>  
14 - <view class="text">已关注</view> 11 + <view class="fen">{{item.up_name}}</view>
15 </view> 12 </view>
  13 + <view class="right" >
  14 + <image src="../../static/yiguanzhu_img@2x.png"></image>
  15 + <view class="text">已关注</view>
  16 + </view>
  17 + <!-- <view class="right" v-else style="width:132rpx;height:54rpx;background:rgba(129,195,191,1);border-radius:32rpx 0rpx 0rpx 32rpx;">
  18 + <image src="../../static/yiguanzhu_img@2x.png"></image>
  19 + <view class="text" style="display:flex;align-items: center;">
  20 + <image class="icon" src="../../static/guanzhu_icon@2x.png" style="width:28rpx;height:28rpx;"></image>关注
  21 + </view>
  22 + </view> -->
16 </view> 23 </view>
17 <view class="nodata" v-if="likepeoplelist.length==0">暂无数据</view> 24 <view class="nodata" v-if="likepeoplelist.length==0">暂无数据</view>
18 25
@@ -57,13 +64,19 @@ methods:{ @@ -57,13 +64,19 @@ methods:{
57 }) 64 })
58 } 65 }
59 }, 66 },
  67 +onShow() {
  68 + this.page=1;
  69 + this.likepeoplelist=[];
  70 + this.getlikepeople()
  71 +},
60 onLoad(){ 72 onLoad(){
61 - this.getlikepeople() 73 +
62 } 74 }
63 } 75 }
64 </script> 76 </script>
65 77
66 <style lang="less"> 78 <style lang="less">
  79 +
67 .content{ 80 .content{
68 background:rgba(249,249,249,1); 81 background:rgba(249,249,249,1);
69 height: 100vh; 82 height: 100vh;
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 </view> 13 </view>
14 <view class="item"> 14 <view class="item">
15 <view class="name">高中</view> 15 <view class="name">高中</view>
16 - <view class="cont">{{userinfolist.school_info.name}} 16 + <view class="cont" >{{userinfolist.school_info.name==undefined?'':userinfolist.school_info.name}}
17 <!-- <image class="icon" src="../../static/dizhi_btn@2x.png"></image> --> 17 <!-- <image class="icon" src="../../static/dizhi_btn@2x.png"></image> -->
18 </view> 18 </view>
19 </view> 19 </view>
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 </picker> --> 22 </picker> -->
23 <view class="item" style="border-bottom:none"> 23 <view class="item" style="border-bottom:none">
24 <view class="name">入学年份</view> 24 <view class="name">入学年份</view>
25 - <view class="cont">{{userinfolist.starttime}} 25 + <view class="cont">{{userinfolist.starttime==undefined?'':userinfolist.starttime}}
26 <!-- <image class="icon" src="../../static/dizhi_btn@2x.png"></image> --> 26 <!-- <image class="icon" src="../../static/dizhi_btn@2x.png"></image> -->
27 </view> 27 </view>
28 </view> 28 </view>
@@ -52,6 +52,7 @@ @@ -52,6 +52,7 @@
52 } 52 }
53 }, 53 },
54 methods: { 54 methods: {
  55 +
55 // 选择年月日 56 // 选择年月日
56 bindDateChange: function(e) { 57 bindDateChange: function(e) {
57 this.userinfolist.starttime = e.target.value; 58 this.userinfolist.starttime = e.target.value;
@@ -88,6 +88,7 @@ export default { @@ -88,6 +88,7 @@ export default {
88 this.commentlist=[]; 88 this.commentlist=[];
89 this.getcommentlist() 89 this.getcommentlist()
90 }, 90 },
  91 +
91 onReachBottom(){ 92 onReachBottom(){
92 let newpage=this.page; 93 let newpage=this.page;
93 newpage++; 94 newpage++;
@@ -36,12 +36,13 @@ export default { @@ -36,12 +36,13 @@ export default {
36 university_id:"", 36 university_id:"",
37 graduated_id:"", 37 graduated_id:"",
38 up_id:"", 38 up_id:"",
39 -  
40 -  
41 - hightmatelist:[] 39 + hightmatelist:[],
  40 + type:'',
  41 + schooltype:''
42 } 42 }
43 }, 43 },
44 - onLoad(){ 44 + onLoad(options){
  45 + this.schooltype=options.schooltype
45 this.gethightmate() 46 this.gethightmate()
46 }, 47 },
47 methods:{ 48 methods:{
@@ -52,6 +53,7 @@ export default { @@ -52,6 +53,7 @@ export default {
52 var params={ 53 var params={
53 token:token, 54 token:token,
54 page:that.page, 55 page:that.page,
  56 + type:that.schooltype,
55 size:that.size, 57 size:that.size,
56 university_id:that.university_id, 58 university_id:that.university_id,
57 graduated_id:that.graduated_id, 59 graduated_id:that.graduated_id,
@@ -74,7 +74,7 @@ @@ -74,7 +74,7 @@
74 } 74 }
75 }, 75 },
76 onLoad(options){ 76 onLoad(options){
77 - this.code2Token(); 77 + this.code2Token();
78 this.token=uni.getStorageSync('token') 78 this.token=uni.getStorageSync('token')
79 console.log(options); 79 console.log(options);
80 // this.getschoollist(); 80 // this.getschoollist();
@@ -105,7 +105,7 @@ @@ -105,7 +105,7 @@
105 code: res.code 105 code: res.code
106 }).then(r=>{ 106 }).then(r=>{
107 console.log() 107 console.log()
108 - uni.setStorageSync('token',r.userInfo.token); 108 + // uni.setStorageSync('token',r.userInfo.token);
109 uni.setStorageSync('isRegister',r.userInfo.is_register); 109 uni.setStorageSync('isRegister',r.userInfo.is_register);
110 that.isRegister = r.userInfo.is_register; 110 that.isRegister = r.userInfo.is_register;
111 }) 111 })
@@ -179,6 +179,7 @@ @@ -179,6 +179,7 @@
179 console.log(3434) 179 console.log(3434)
180 }, 180 },
181 tosearchpage(){ 181 tosearchpage(){
  182 + let token=uni.getStorageSync("token")
182 183
183 if(uni.getStorageSync('token')==''){ 184 if(uni.getStorageSync('token')==''){
184 uni.showToast({ 185 uni.showToast({
@@ -236,11 +237,12 @@ @@ -236,11 +237,12 @@
236 237
237 <style lang="less"> 238 <style lang="less">
238 page{ 239 page{
239 - height: 100%; 240 + background: rgba(249, 249, 249, 1);
  241 + // height: 100%;
240 } 242 }
241 .content { 243 .content {
242 - background: rgba(249, 249, 249, 1);  
243 - height: 100%; 244 +
  245 + // height: 100%;
244 padding-bottom: 120rpx; 246 padding-bottom: 120rpx;
245 box-sizing: border-box; 247 box-sizing: border-box;
246 .search { 248 .search {
@@ -33,15 +33,15 @@ @@ -33,15 +33,15 @@
33 <view class="websit">本科生招生公众号:<text class="lianjie">{{university.wechat}}</text></view> 33 <view class="websit">本科生招生公众号:<text class="lianjie">{{university.wechat}}</text></view>
34 </view> 34 </view>
35 <view class="table"> 35 <view class="table">
36 - <navigator class="colum" hover-class="none" url="./highSchoolmate"> 36 + <navigator class="colum" hover-class="none" url="./highSchoolmate?schooltype=1">
37 <view class="num">{{university.same_school_total_num}}</view> 37 <view class="num">{{university.same_school_total_num}}</view>
38 <view class="title">高中校友</view> 38 <view class="title">高中校友</view>
39 </navigator> 39 </navigator>
40 - <view class="colum" @click="popupShow"> 40 + <view class="colum" @click="popupShow" data-type="1">
41 <view class="num">{{university.same_city_total_num}}</view> 41 <view class="num">{{university.same_city_total_num}}</view>
42 <view class="title">同城学长</view> 42 <view class="title">同城学长</view>
43 </view> 43 </view>
44 - <view class="colum" @click="popupShow" style="border-right:none"> 44 + <view class="colum" @click="popupShow" style="border-right:none" data-type="2">
45 <view class="num">{{university.same_province_total_num}}</view> 45 <view class="num">{{university.same_province_total_num}}</view>
46 <view class="title">同省学长</view> 46 <view class="title">同省学长</view>
47 </view> 47 </view>
@@ -133,7 +133,8 @@ export default { @@ -133,7 +133,8 @@ export default {
133 iscellect:true, 133 iscellect:true,
134 sel:0, 134 sel:0,
135 baseurl:app.globalData.imageBaseUrl, 135 baseurl:app.globalData.imageBaseUrl,
136 - isactive:false 136 + isactive:false,
  137 + vip_level:''
137 138
138 139
139 } 140 }
@@ -149,7 +150,9 @@ export default { @@ -149,7 +150,9 @@ export default {
149 this.getollege() 150 this.getollege()
150 this.getarticletype() 151 this.getarticletype()
151 152
152 - this.getAllArticle() 153 + this.getAllArticle();
  154 + // 获取个人信息
  155 + this.getpersoninfo()
153 156
154 }, 157 },
155 methods:{ 158 methods:{
@@ -160,13 +163,47 @@ export default { @@ -160,13 +163,47 @@ export default {
160 url:'./academyDetails?university_id='+id+'&name='+name 163 url:'./academyDetails?university_id='+id+'&name='+name
161 }) 164 })
162 }, 165 },
163 - popupShow(){  
164 - this.isPopupShow=true 166 + popupShow(e){
  167 + let type=e.currentTarget.dataset.type;
  168 + if(type==1){
  169 + if(this.vip_level==1||this.vip_level==2){
  170 + uni.navigateTo({
  171 + url:"./highSchoolmate?schooltype="+2
  172 + })
  173 + }else{
  174 + this.isPopupShow=true
  175 + }
  176 + }else if(type==2){
  177 + if(this.vip_level==2){
  178 + uni.navigateTo({
  179 + url:"./highSchoolmate?schooltype="+3
  180 + })
  181 +
  182 + }else{
  183 + this.isPopupShow=true
  184 + }
  185 + }
  186 +
  187 +
165 188
166 }, 189 },
167 popupHide(){ 190 popupHide(){
168 this.isPopupShow=false 191 this.isPopupShow=false
169 }, 192 },
  193 + // 获取个人信息
  194 + getpersoninfo(){
  195 + let that = this;
  196 + var url='student/getMyInfo';
  197 + var params={
  198 +
  199 + }
  200 + app.post(url,params,"get").then((res)=>{
  201 + console.log(res)
  202 + this.vip_level=res.vip_level
  203 + }).catch((err)=>{
  204 + console.log(err)
  205 + })
  206 + },
170 //获取大学详细信息 207 //获取大学详细信息
171 getschooldetails(){ 208 getschooldetails(){
172 var token = uni.getStorageSync('token') 209 var token = uni.getStorageSync('token')
1 <template> 1 <template>
2 - <view class="content">  
3 - <view class="msgCard">  
4 - <image :src="matemsg.head_image" class="photo"></image>  
5 - <view class="title">{{matemsg.nickname==undefined?'':matemsg.nickname}}</view>  
6 - <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>  
7 - <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>  
8 - <view class="mall">个人邮箱:{{matemsg.email==undefined?'':matemsg.email}}</view>  
9 - <view class="right" v-if="matemsg.is_like==1" @click="notlike">  
10 - <image src="../../static/yiguanzhu_img@2x.png"></image>  
11 - <view class="text">已关注</view>  
12 - </view>  
13 - <view class="right" @click="like" v-else style="width:132rpx;height:54rpx;background:rgba(129,195,191,1);border-radius:32rpx 0rpx 0rpx 32rpx;">  
14 - <!-- <image src="../../static/yiguanzhu_img@2x.png"></image> -->  
15 - <view class="text"> <image class="icon" src="../../static/guanzhu_icon@2x.png"></image>关注</view>  
16 - </view>  
17 - </view>  
18 - <view class="tabCard">  
19 - <!-- <view class="item" v-for="(item,index) in articletypelist" :key="index">{{item.name}}</view> -->  
20 - <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}}  
21 - <image class="selected" src="../../static/xuanzhong_icon@2x.png" v-if="sel==index"></image>  
22 - <!-- <image class="selected" src="" v-else></image> -->  
23 - </view>  
24 - </view> 2 + <view class="content">
  3 + <view class="msgCard">
  4 + <image :src="matemsg.head_image" class="photo"></image>
  5 + <view class="title">{{matemsg.nickname==undefined?'':matemsg.nickname}}</view>
  6 + <view class="o">{{matemsg.university_name==undefined?'':matemsg.university_name}} |
  7 + {{matemsg.college_name==undefined?'':matemsg.college_name}} | {{matemsg.end_year==undefined?'':matemsg.end_year}}</view>
  8 + <view class="t">{{matemsg.school_name==undefined?'':matemsg.school_name}} | <text v-for="(item,index) in matemsg.subject_names"
  9 + :key="index">{{item}}</text> | {{matemsg.up_name==undefined?'':matemsg.up_name}}</view>
  10 + <view class="mall">个人邮箱:{{matemsg.email==undefined?'':matemsg.email}}</view>
  11 + <view class="right" v-if="matemsg.is_like==1" @click="notlike">
  12 + <image src="../../static/yiguanzhu_img@2x.png"></image>
  13 + <view class="text">已关注</view>
  14 + </view>
  15 + <view class="right" @click="like" v-else style="width:132rpx;height:54rpx;background:rgba(129,195,191,1);border-radius:32rpx 0rpx 0rpx 32rpx;">
  16 + <!-- <image src="../../static/yiguanzhu_img@2x.png"></image> -->
  17 + <view class="text">
  18 + <image class="icon" src="../../static/guanzhu_icon@2x.png"></image>关注
  19 + </view>
  20 + </view>
  21 + </view>
  22 + <view class="tabCard">
  23 + <!-- <view class="item" v-for="(item,index) in articletypelist" :key="index">{{item.name}}</view> -->
  24 + <view class="item" :class="sel==index?'active':''" @click="selecttype(item,index)" v-for="(item,index) in articletypelist"
  25 + :key="index" :data-id="item.id">{{item.name}}
  26 + <image class="selected" src="../../static/xuanzhong_icon@2x.png" v-if="sel==index"></image>
  27 + <!-- <image class="selected" src="" v-else></image> -->
  28 + </view>
  29 + </view>
25 <view class="nodata" v-if="articleList.length==0">暂无数据</view> 30 <view class="nodata" v-if="articleList.length==0">暂无数据</view>
26 - <view class="articl" v-else>  
27 - <view v-for="(item,index) in articleList" :key="index" @click="toarticlemsg(item)">  
28 - <view class="articltitle">  
29 - <image class="photo" :src="item.head_image"></image>  
30 - <view class="msg">  
31 - <view class="name">{{item.nickname}}</view>  
32 - <view class="tips">{{item.article_type_name}}</view>  
33 - </view>  
34 - </view>  
35 - <view class="articleBox">  
36 - <view class="title">{{item.title}}</view>  
37 - <view class="txt">{{item.des_content}}</view>  
38 - <view style="display:flex;">  
39 - <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>  
40 - </view>  
41 -  
42 - <!-- <image src="../../static/bg_img@2x.png"></image> -->  
43 - </view>  
44 - </view>  
45 -  
46 -  
47 - </view>  
48 - <view v-if="type==1">  
49 - <view class="botmBox">  
50 - <view class="liuyan" @click="liuyanBoxShow">  
51 - <image src="../../static/liuyan_icon@2x.png"></image>  
52 - <view class="txt">我要留言</view>  
53 - </view>  
54 - <view class="daxie" style="border:none" @click="daxieShow">  
55 - <image src="../../static/dashang_icon@2x.png"></image>  
56 - <view class="txt">我要答谢</view>  
57 - </view>  
58 - </view>  
59 - <view class="popup" v-if="isliuyanBoxShow">  
60 - <view class="card">  
61 - <view class="title">我要留言</view>  
62 - <view class="liuyanContent">  
63 - <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>  
64 - <view class="num">{{content.length}}/200</view>  
65 -  
66 - </view>  
67 - <view class="btn" @click="sendmsg">发送留言</view>  
68 - <view class="close" @click="liuyanBoxHide">  
69 - <image src="../../static/guanbi_icon@2x.png"></image>  
70 - </view>  
71 - </view>  
72 - </view>  
73 - <view class="popup2" v-if="isdaxieBoxShow">  
74 - <view class="card">  
75 - <view class="title">我要答谢{{moneyshow}}</view>  
76 - <view v-if="moneyshow">  
77 - <view class="box" :class="{'active':isactive==1}" @click="picked" data-id=1 data-money=1>¥1</view>  
78 - <view class="box" :class="{'active':isactive==2}" @click="picked" data-id=2 data-money=6>¥6</view>  
79 - <view class="box" :class="{'active':isactive==3}" @click="picked" data-id=3 data-money=10>¥10</view>  
80 - <view class="box" :class="{'active':isactive==4}" @click="picked" data-id=4 data-money=30>¥30</view>  
81 - <view class="box" :class="{'active':isactive==5}" @click="picked" data-id=5 data-money=50>¥50</view>  
82 - <view class="box" :class="{'active':isactive==6}" @click="picked" data-id=6 data-money=100>¥100</view>  
83 - <view class="box" :class="{'active':isactive==7}" @click="moneyShow" data-id=7>其他金额</view>  
84 - </view>  
85 - <view v-else>  
86 - <view class="input">  
87 - <view class="txt">¥</view>  
88 - <input type="text" placeholder="请输入答谢金额" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;" @input="entermoney">  
89 - </view>  
90 - <view class="btn" @click="moneyHide">确定</view>  
91 - </view>  
92 - <view class="close" @click="daxieHide">  
93 - <image src="../../static/guanbi_icon@2x.png"></image>  
94 - </view>  
95 - </view>  
96 - </view>  
97 - </view>  
98 - </view> 31 + <view class="articl" v-else>
  32 + <view v-for="(item,index) in articleList" :key="index" @click="toarticlemsg(item)">
  33 + <view class="articltitle">
  34 + <image class="photo" :src="item.head_image" @click.stop="avatarjump(item.user_id)"></image>
  35 + <view class="msg">
  36 + <view class="name">{{item.nickname}}</view>
  37 + <view class="tips">{{item.article_type_name}}</view>
  38 + </view>
  39 + </view>
  40 + <view class="articleBox">
  41 + <view class="title">{{item.title}}</view>
  42 + <view class="txt">
  43 + <view class="textblock">
  44 + {{item.des_content}}
  45 + </view>
  46 +
  47 + <text class="alltext" style="color:#2D5575;font-size:24rpx;font-weight:bold;" @click="toarticlemsg(item)" v-if="item.des_content.length>150">全部</text>
  48 + </view>
  49 + <view style="display:flex;">
  50 + <image :src="item" v-for="(item,indexk) in item.des_images" :key="indexk" @click.stop="preimg(index,indexk)"
  51 + style="margin-right:10rpx;margin-bottom:10rpx"></image>
  52 + </view>
  53 +
  54 + <!-- <image src="../../static/bg_img@2x.png"></image> -->
  55 + </view>
  56 + </view>
  57 +
  58 +
  59 + </view>
  60 + <view v-if="type==1">
  61 + <view class="botmBox">
  62 + <view class="liuyan" @click="liuyanBoxShow">
  63 + <image src="../../static/liuyan_icon@2x.png"></image>
  64 + <view class="txt">我要留言</view>
  65 + </view>
  66 + <view class="daxie" style="border:none" @click="daxieShow">
  67 + <image src="../../static/dashang_icon@2x.png"></image>
  68 + <view class="txt">我要答谢</view>
  69 + </view>
  70 + </view>
  71 + <view class="popup" v-if="isliuyanBoxShow">
  72 + <view class="card">
  73 + <view class="title">我要留言</view>
  74 + <view class="liuyanContent">
  75 + <textarea name="" id="" cols="30" rows="10" class="txt" v-model="content" placeholder="请输入你想请教的问题"
  76 + placeholder-style="color:rgba(189,196,206,1);font-size:24rpx;"></textarea>
  77 + <view class="num">{{content.length}}/200</view>
  78 +
  79 + </view>
  80 + <view class="btn" @click="sendmsg">发送留言</view>
  81 + <view class="close" @click="liuyanBoxHide">
  82 + <image src="../../static/guanbi_icon@2x.png"></image>
  83 + </view>
  84 + </view>
  85 + </view>
  86 + <view class="popup2" v-if="isdaxieBoxShow">
  87 + <view class="card">
  88 + <view class="title">我要答谢</view>
  89 + <view v-if="moneyshow">
  90 + <view>
  91 + <view class="box" :class="{'active':isactive==1}" @click="picked" data-id=1 data-money=1>¥1</view>
  92 + <view class="box" :class="{'active':isactive==2}" @click="picked" data-id=2 data-money=6>¥6</view>
  93 + <view class="box" :class="{'active':isactive==3}" @click="picked" data-id=3 data-money=10>¥10</view>
  94 + <view class="box" :class="{'active':isactive==4}" @click="picked" data-id=4 data-money=30>¥30</view>
  95 + <view class="box" :class="{'active':isactive==5}" @click="picked" data-id=5 data-money=50>¥50</view>
  96 + <view class="box" :class="{'active':isactive==6}" @click="picked" data-id=6 data-money=100>¥100</view>
  97 + <view class="box" :class="{'active':isactive==7}" @click="moneyShow" data-id=7>其他金额</view>
  98 + </view>
  99 +
  100 + <view class="btn" @click="pickedsure" style="margin:28rpx auto 0;">确定</view>
  101 + </view>
  102 + <view v-else>
  103 + <view class="input">
  104 + <view class="txt">¥</view>
  105 + <input type="text" placeholder="请输入答谢金额" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;" @input="entermoney">
  106 + </view>
  107 + <view class="btn" @click="moneyHide">确定</view>
  108 + </view>
  109 + <view class="close" @click="daxieHide">
  110 + <image src="../../static/guanbi_icon@2x.png"></image>
  111 + </view>
  112 + </view>
  113 + </view>
  114 + </view>
  115 + </view>
99 </template> 116 </template>
100 117
101 <script> 118 <script>
102 -import app from "../../App.vue";  
103 -export default {  
104 -data(){  
105 - return{  
106 - isliuyanBoxShow:false,  
107 - isdaxieBoxShow:false,  
108 - moneyshow:true,  
109 - id:'',  
110 - matemsg:{},  
111 - articletypelist:[],  
112 - articleList:[],  
113 - user_id:'',  
114 - page:'1',  
115 - size:'10',  
116 - type_id:'',  
117 - content:'',  
118 - isactive:1,  
119 - type:'',  
120 - money:'',  
121 - sel:0  
122 -  
123 - }  
124 -},  
125 -onLoad(options){  
126 - console.log('我的数据',options)  
127 - this.id=options.id;  
128 - this.user_id=options.user_id  
129 - this.type=options.type  
130 - console.log(options)  
131 - this.getmatemsg()  
132 - this.getarticletype();  
133 - this.getAllArticle()  
134 -  
135 -},  
136 -methods:{  
137 - // 进入文章详情  
138 - toarticl(e) {  
139 - var id = e.currentTarget.dataset.id  
140 - uni.navigateTo({  
141 - url: '../school/article?article_id=' + id  
142 - })  
143 - },  
144 - preimg(index,indexk){  
145 - let that=this;  
146 - uni.previewImage({  
147 - current: that.articleList[index].des_images[indexk],  
148 - urls: that.articleList[index].des_images,  
149 - success: function (res) { },  
150 - fail: function (res) { },  
151 - complete: function (res) { },  
152 - })  
153 -  
154 - },  
155 - liuyanBoxShow(){  
156 - this.isliuyanBoxShow=true  
157 - },  
158 - liuyanBoxHide(){  
159 - this.isliuyanBoxShow=false  
160 - },  
161 - daxieShow(){  
162 - this.isdaxieBoxShow=true;  
163 -  
164 - },  
165 - daxieHide(){  
166 - this.isdaxieBoxShow=false  
167 - this.moneyshow=true  
168 - this.isactive=1  
169 - },  
170 - moneyShow(){  
171 - this.moneyshow=false  
172 - this.isactive=7  
173 - },  
174 - //输入其他金额  
175 - entermoney(e){  
176 - this.money=e.detail.value  
177 - },  
178 - moneyHide(){  
179 - // this.isactive=e.currentTarget.dataset.id  
180 - // this.money=e.currentTarget.dataset.money  
181 - var that = this  
182 - var url = "thank/pay"  
183 - var token = uni.getStorageSync('token')  
184 - var params = {  
185 - token:token,  
186 - money:that.money,  
187 - userb_id:that.user_id  
188 - }  
189 - app.post(url,params,"post").then((res)=>{  
190 - console.log(res)  
191 - var timeStamp = res.timeStamp.toString();  
192 - // console.log(timeStamp);  
193 - wx.requestPayment({  
194 - timeStamp: timeStamp,  
195 - nonceStr: res.nonceStr,  
196 - package: res.package,  
197 - signType: res.signType,  
198 - paySign: res.paySign,  
199 - success: function(res) {  
200 - console.log(res)  
201 - wx.navigateTo({  
202 - url: '/pages/orderbox/orderbox?index=' + 0  
203 - }) 119 + import app from "../../App.vue";
  120 + export default {
  121 + data() {
  122 + return {
  123 + isliuyanBoxShow: false,
  124 + isdaxieBoxShow: false,
  125 + moneyshow: true,
  126 + id: '',
  127 + matemsg: {},
  128 + articletypelist: [],
  129 + articleList: [],
  130 + user_id: '',
  131 + page: '1',
  132 + size: '10',
  133 + type_id: '',
  134 + content: '',
  135 + isactive: 0,
  136 + type: '',
  137 + money: '',
  138 + sel: 0
  139 +
  140 + }
204 }, 141 },
205 - fail: function(res) {  
206 - console.log(123);  
207 - console.log(res);  
208 - }  
209 - })  
210 - }).catch((err)=>{  
211 - console.log(err)  
212 - })  
213 - // this.moneyshow=true  
214 - },  
215 - getmatemsg(){  
216 - let token = uni.getStorageSync('token')  
217 - let that=this  
218 - var url = "student/getStudentInfo"  
219 - var params = {  
220 - user_id:that.user_id,  
221 - token:token  
222 - }  
223 - app.post(url,params,"get").then((res)=>{  
224 - console.log(res)  
225 - that.matemsg=res  
226 - // that.user_id=res.user_id  
227 - console.log(res.university_id)  
228 - }).catch((err)=>{  
229 - console.log(err)  
230 - })  
231 - },  
232 - getarticletype(){  
233 - var that = this  
234 - var url = "article/getArticleType"  
235 - var params = {}  
236 - app.post(url,params,"get").then((res)=>{  
237 - this.articletypelist=res;  
238 - let obj={  
239 - id:'',  
240 - name:'全部'  
241 - }  
242 - res.unshift(obj)  
243 -  
244 - console.log(res)  
245 - }).catch((err)=>{  
246 - console.log(err)  
247 - })  
248 -  
249 - },  
250 - getAllArticle(){  
251 - var token = uni.getStorageSync('token')  
252 - var that=this  
253 - var url="article/getArticleList"  
254 - var params = {  
255 - // university_id:that.university_id,  
256 - page:that.page,  
257 - size:that.size,  
258 - user_id:that.user_id,  
259 - type_id:that.type_id,  
260 - token:token  
261 - }  
262 - app.post(url,params,"get").then((res)=>{  
263 - // res.forEach(function(value,index,array){  
264 - // value.head_image=app.globalData.imageBaseUrl+value.head_image 142 + onLoad(options) {
  143 + console.log('我的数据', options)
  144 + this.id = options.id;
  145 + this.user_id = options.user_id
  146 + this.type = options.type
  147 + console.log(options)
  148 + this.getmatemsg()
  149 + this.getarticletype();
  150 + this.getAllArticle()
  151 +
  152 + },
  153 + methods: {
  154 + // 跳转作者头像
  155 + avatarjump(userid){
  156 + // uni.navigateTo({
  157 + // url: "../school/schoolmateMsg?user_id=" + id + "&type=" + this.type
265 // }) 158 // })
266 - this.articleList=res  
267 - }).catch((err)=>{  
268 - console.log(err)  
269 - })  
270 - },  
271 - sendmsg(){  
272 - var that = this  
273 - var url = "mes/sendMes"  
274 - var token = uni.getStorageSync('token')  
275 - var params = {  
276 - token:token,  
277 - userb_id:that.user_id,  
278 - des_content:that.content  
279 - }  
280 - app.post(url,params,"post").then((res)=>{  
281 - console.log(res)  
282 - that.content=''  
283 - that.isliuyanBoxShow=false  
284 - }).catch((err)=>{  
285 - console.log(err)  
286 - })  
287 - },  
288 - picked(e){  
289 - this.isactive=e.currentTarget.dataset.id  
290 - this.money=e.currentTarget.dataset.money  
291 - var that = this  
292 - var url = "thank/pay"  
293 - var token = uni.getStorageSync('token')  
294 - var params = {  
295 - token:token,  
296 - money:that.money,  
297 - userb_id:that.user_id  
298 - }  
299 - app.post(url,params,"post").then((res)=>{  
300 - console.log(res)  
301 - var timeStamp = res.timeStamp.toString();  
302 - // console.log(timeStamp);  
303 - wx.requestPayment({  
304 - timeStamp: timeStamp,  
305 - nonceStr: res.nonceStr,  
306 - package: res.package,  
307 - signType: res.signType,  
308 - paySign: res.paySign,  
309 - success: function(res) {  
310 - console.log(res)  
311 - wx.navigateTo({  
312 - url: '/pages/orderbox/orderbox?index=' + 0  
313 - })  
314 - },  
315 - fail: function(res) {  
316 - console.log(123);  
317 - console.log(res);  
318 - }  
319 - })  
320 - }).catch((err)=>{  
321 - console.log(err)  
322 - })  
323 - },  
324 - toarticlemsg(item){  
325 - console.log('文章详情',item)  
326 - uni.navigateTo({  
327 - url:'../school/article?article_id='+item.id  
328 - })  
329 - },  
330 - // payment(res) {  
331 - // let that = this;  
332 - // var timeStamp = res.timeStamp.toString();  
333 - // // console.log(timeStamp);  
334 - // wx.requestPayment({  
335 - // timeStamp: timeStamp,  
336 - // nonceStr: res.nonceStr,  
337 - // package: res.package,  
338 - // signType: res.signType,  
339 - // paySign: res.paySign,  
340 - // success: function(res) {  
341 - // console.log(res)  
342 - // wx.navigateTo({  
343 - // url: '/pages/orderbox/orderbox?index=' + 0  
344 - // })  
345 - // },  
346 - // fail: function(res) {  
347 - // console.log(123);  
348 - // console.log(res);  
349 - // }  
350 - // })  
351 - // },  
352 - like(){  
353 - var that = this  
354 - var url = "student/likeStudent"  
355 - var token = uni.getStorageSync('token')  
356 - var params = {  
357 - token:token,  
358 - userb_id:that.user_id  
359 - }  
360 - app.post(url,params,"post").then((res)=>{  
361 - console.log(res)  
362 - that.matemsg.is_like=1  
363 - }).catch((err)=>{  
364 - console.log(err)  
365 - })  
366 - },  
367 - notlike(){  
368 - var that = this  
369 - var url = "student/likeStudent"  
370 - var token = uni.getStorageSync('token')  
371 - var params = {  
372 - token:token,  
373 - userb_id:that.user_id  
374 - }  
375 - app.post(url,params,"post").then((res)=>{  
376 - console.log(res)  
377 - that.matemsg.is_like=0  
378 - }).catch((err)=>{  
379 - console.log(err)  
380 - })  
381 - },  
382 - selecttype(item,index){  
383 - this.sel=index  
384 - this.type_id=item.id  
385 - this.getAllArticle()  
386 - },  
387 -}  
388 -} 159 + this.page=1;
  160 + this.articleList=[];
  161 + this.sel = 0;
  162 + this.type_id = '';
  163 + this.user_id=userid;
  164 + this.getmatemsg();
  165 + this.getAllArticle()
  166 + },
  167 +
  168 + // 进入文章详情
  169 + toarticl(e) {
  170 + var id = e.currentTarget.dataset.id
  171 + uni.navigateTo({
  172 + url: '../school/article?article_id=' + id
  173 + })
  174 + },
  175 + preimg(index, indexk) {
  176 + let that = this;
  177 + uni.previewImage({
  178 + current: that.articleList[index].des_images[indexk],
  179 + urls: that.articleList[index].des_images,
  180 + success: function(res) {},
  181 + fail: function(res) {},
  182 + complete: function(res) {},
  183 + })
  184 +
  185 + },
  186 + liuyanBoxShow() {
  187 + this.isliuyanBoxShow = true
  188 + },
  189 + liuyanBoxHide() {
  190 + this.isliuyanBoxShow = false
  191 + },
  192 + daxieShow() {
  193 + this.isdaxieBoxShow = true;
  194 +
  195 + },
  196 + daxieHide() {
  197 + this.isdaxieBoxShow = false
  198 + this.moneyshow = true
  199 + this.isactive = 1
  200 + },
  201 + moneyShow() {
  202 + this.moneyshow = false
  203 + this.isactive = 7
  204 + },
  205 + //输入其他金额
  206 + entermoney(e) {
  207 + this.money = e.detail.value
  208 + },
  209 + moneyHide() {
  210 + // this.isactive=e.currentTarget.dataset.id
  211 + // this.money=e.currentTarget.dataset.money
  212 + var that = this;
  213 + var reg = /^-?\d+$/
  214 +
  215 + if (!reg.test(that.money)) {
  216 + uni.showToast({
  217 + title: '请输入整数金额',
  218 + icon: 'none'
  219 + })
  220 +
  221 + return false
  222 + }
  223 + var url = "thank/pay"
  224 + var token = uni.getStorageSync('token')
  225 + var params = {
  226 + token: token,
  227 + money: that.money,
  228 + userb_id: that.user_id
  229 + }
  230 + app.post(url, params, "post").then((res) => {
  231 + console.log(res)
  232 + var timeStamp = res.timeStamp.toString();
  233 + // console.log(timeStamp);
  234 + wx.requestPayment({
  235 + timeStamp: timeStamp,
  236 + nonceStr: res.nonceStr,
  237 + package: res.package,
  238 + signType: res.signType,
  239 + paySign: res.paySign,
  240 + success: function(res) {
  241 + console.log(res)
  242 + wx.navigateTo({
  243 + url: '/pages/orderbox/orderbox?index=' + 0
  244 + })
  245 + },
  246 + fail: function(res) {
  247 + console.log(123);
  248 + console.log(res);
  249 + }
  250 + })
  251 + }).catch((err) => {
  252 + console.log(err)
  253 + })
  254 + // this.moneyshow=true
  255 + },
  256 + getmatemsg() {
  257 + let token = uni.getStorageSync('token')
  258 + let that = this
  259 + var url = "student/getStudentInfo"
  260 + var params = {
  261 + user_id: that.user_id,
  262 + token: token
  263 + }
  264 + app.post(url, params, "get").then((res) => {
  265 + console.log(res)
  266 + that.matemsg = res
  267 + // that.user_id=res.user_id
  268 + console.log(res.university_id)
  269 + }).catch((err) => {
  270 + console.log(err)
  271 + })
  272 + },
  273 + getarticletype() {
  274 + var that = this
  275 + var url = "article/getArticleType"
  276 + var params = {}
  277 + app.post(url, params, "get").then((res) => {
  278 + this.articletypelist = res;
  279 + let obj = {
  280 + id: '',
  281 + name: '全部'
  282 + }
  283 + res.unshift(obj)
  284 +
  285 + console.log(res)
  286 + }).catch((err) => {
  287 + console.log(err)
  288 + })
  289 +
  290 + },
  291 + getAllArticle() {
  292 + var token = uni.getStorageSync('token')
  293 + var that = this
  294 + var url = "article/getArticleList"
  295 + var params = {
  296 + // university_id:that.university_id,
  297 + page: that.page,
  298 + size: that.size,
  299 + user_id: that.user_id,
  300 + type_id: that.type_id,
  301 + token: token
  302 + }
  303 + app.post(url, params, "get").then((res) => {
  304 + // res.forEach(function(value,index,array){
  305 + // value.head_image=app.globalData.imageBaseUrl+value.head_image
  306 + // })
  307 + this.articleList =this.articleList.concat(res)
  308 + }).catch((err) => {
  309 + console.log(err)
  310 + })
  311 + },
  312 + sendmsg() {
  313 + var that = this
  314 + var url = "mes/sendMes"
  315 + var token = uni.getStorageSync('token')
  316 + var params = {
  317 + token: token,
  318 + userb_id: that.user_id,
  319 + des_content: that.content
  320 + }
  321 + app.post(url, params, "post").then((res) => {
  322 + console.log(res)
  323 + that.content = ''
  324 + that.isliuyanBoxShow = false
  325 + }).catch((err) => {
  326 + console.log(err)
  327 + })
  328 + },
  329 + picked(e) {
  330 + this.isactive = e.currentTarget.dataset.id
  331 + this.money = e.currentTarget.dataset.money
  332 +
  333 + },
  334 + pickedsure() {
  335 + var that = this;
  336 + if (that.money == '') {
  337 + uni.showToast({
  338 + title: "请选择答谢金额",
  339 + icon: "none"
  340 + })
  341 + }
  342 + var url = "thank/pay"
  343 + var token = uni.getStorageSync('token')
  344 + var params = {
  345 + token: token,
  346 + money: that.money,
  347 + userb_id: that.user_id
  348 + }
  349 + app.post(url, params, "post").then((res) => {
  350 + console.log(res)
  351 + var timeStamp = res.timeStamp.toString();
  352 + // console.log(timeStamp);
  353 + wx.requestPayment({
  354 + timeStamp: timeStamp,
  355 + nonceStr: res.nonceStr,
  356 + package: res.package,
  357 + signType: res.signType,
  358 + paySign: res.paySign,
  359 + success: function(res) {
  360 + console.log(res)
  361 + wx.navigateTo({
  362 + url: '/pages/orderbox/orderbox?index=' + 0
  363 + })
  364 + },
  365 + fail: function(res) {
  366 + console.log(123);
  367 + console.log(res);
  368 + }
  369 + })
  370 + }).catch((err) => {
  371 + console.log(err)
  372 + })
  373 + },
  374 + toarticlemsg(item) {
  375 + console.log('文章详情', item)
  376 + uni.navigateTo({
  377 + url: '../school/article?article_id=' + item.id
  378 + })
  379 + },
  380 + // payment(res) {
  381 + // let that = this;
  382 + // var timeStamp = res.timeStamp.toString();
  383 + // // console.log(timeStamp);
  384 + // wx.requestPayment({
  385 + // timeStamp: timeStamp,
  386 + // nonceStr: res.nonceStr,
  387 + // package: res.package,
  388 + // signType: res.signType,
  389 + // paySign: res.paySign,
  390 + // success: function(res) {
  391 + // console.log(res)
  392 + // wx.navigateTo({
  393 + // url: '/pages/orderbox/orderbox?index=' + 0
  394 + // })
  395 + // },
  396 + // fail: function(res) {
  397 + // console.log(123);
  398 + // console.log(res);
  399 + // }
  400 + // })
  401 + // },
  402 + like() {
  403 + var that = this
  404 + var url = "student/likeStudent"
  405 + var token = uni.getStorageSync('token')
  406 + var params = {
  407 + token: token,
  408 + userb_id: that.user_id
  409 + }
  410 + app.post(url, params, "post").then((res) => {
  411 + console.log(res)
  412 + that.matemsg.is_like = 1
  413 + }).catch((err) => {
  414 + console.log(err)
  415 + })
  416 + },
  417 + notlike() {
  418 + var that = this
  419 + var url = "student/likeStudent"
  420 + var token = uni.getStorageSync('token')
  421 + var params = {
  422 + token: token,
  423 + userb_id: that.user_id
  424 + }
  425 + app.post(url, params, "post").then((res) => {
  426 + console.log(res)
  427 + that.matemsg.is_like = 0
  428 + }).catch((err) => {
  429 + console.log(err)
  430 + })
  431 + },
  432 + selecttype(item, index) {
  433 + this.sel = index
  434 + this.type_id = item.id;
  435 + this.page=1;
  436 + this.articleList=[];
  437 + this.getAllArticle()
  438 + },
  439 + }
  440 + }
389 </script> 441 </script>
390 442
391 <style lang="less"> 443 <style lang="less">
392 -.popup2{  
393 - width:100%;  
394 - height:100%;  
395 - background:rgba(0,0,0,.6);  
396 - // opacity:1;  
397 - // border-radius:8rpx;  
398 - position: fixed;  
399 - top: 0;  
400 - right: 0;  
401 - z-index: 999;  
402 - .card{  
403 - width:628rpx;  
404 - height:574rpx;  
405 - background:rgba(255,255,255,1);  
406 - opacity:1;  
407 - border-radius:8rpx;  
408 - position: absolute;  
409 - top: 50%;  
410 - left: 50%;  
411 - transform: translate(-50%,-50%);  
412 - padding: 0 8rpx 0 36rpx;  
413 - box-sizing: border-box;  
414 - .close{  
415 - width: 24rpx;  
416 - height: 24rpx;  
417 - position: absolute;  
418 - top: 22rpx;  
419 - right: 22rpx;  
420 - image{  
421 - width: 24rpx;  
422 - height: 24rpx;  
423 - }  
424 - }  
425 - .title{  
426 - color:rgba(6,18,30,1);  
427 - font-size: 28rpx;  
428 - text-align: center;  
429 - margin-top: 62rpx;  
430 - margin-bottom: 60rpx;  
431 - font-weight:500;  
432 - }  
433 - .input{  
434 - width:532rpx;  
435 - height:72rpx;  
436 - background:rgba(255,255,255,1);  
437 - border:1rpx solid rgba(6,18,30,1);  
438 - opacity:1;  
439 - border-radius:36rpx;  
440 - display: flex;  
441 - align-items: center;  
442 - padding: 0 144rpx;  
443 - box-sizing: border-box;  
444 - margin-top: 110rpx;  
445 - input{  
446 - width: 220rpx;  
447 - height: 72rpx;  
448 - margin-left: 20rpx;  
449 - }  
450 - }  
451 - .btn{  
452 - width:220rpx;  
453 - height:60rpx;  
454 - background:rgba(45,85,117,1);  
455 - opacity:1;  
456 - border-radius:8rpx;  
457 - color: #fff;  
458 - font-size: 28rpx;  
459 - line-height: 60rpx;  
460 - text-align: center;  
461 - margin: 0 auto;  
462 - margin-top: 110rpx;  
463 - }  
464 - .box{  
465 - width:166rpx;  
466 - height:56rpx;  
467 - background:rgba(255,255,255,1);  
468 - border:1rpx solid rgba(6,18,30,1);  
469 - opacity:1;  
470 - border-radius:40rpx;  
471 - text-align: center;  
472 - font-size: 28rpx;  
473 - line-height: 56rpx;  
474 - color:rgba(6,18,30,1);  
475 - display: inline-block;  
476 - margin-right: 26rpx;  
477 - margin-top: 40rpx;  
478 - }  
479 - .active{  
480 - background:rgba(129,195,191,1);  
481 - border:1rpx solid rgba(129,195,191);  
482 - color: #fff;  
483 -  
484 - }  
485 - }  
486 -  
487 -}  
488 -.popup{  
489 - width:100%;  
490 - height:100%;  
491 - background:rgba(0,0,0,.6);  
492 - // opacity:1;  
493 - // border-radius:8rpx;  
494 - position: fixed;  
495 - top: 0;  
496 - right: 0;  
497 - z-index: 999;  
498 - .card{  
499 - width:628rpx;  
500 - height:674rpx;  
501 - background:rgba(255,255,255,1);  
502 - opacity:1;  
503 - border-radius:8rpx;  
504 - position: absolute;  
505 - top: 50%;  
506 - left: 50%;  
507 - transform: translate(-50%,-50%);  
508 - .title{  
509 - color:rgba(6,18,30,1);  
510 - font-size: 28rpx;  
511 - text-align: center;  
512 - margin-top: 62rpx;  
513 - }  
514 - .liuyanContent{  
515 - width:538rpx;  
516 - height:366rpx;  
517 - background:rgba(249,249,249,1);  
518 - opacity:1;  
519 - border-radius:8rpx;  
520 - margin: 0 auto;  
521 - margin-top: 26rpx;  
522 - padding: 28rpx;  
523 - box-sizing: border-box;  
524 - position: relative;  
525 - .num{  
526 - position: absolute;  
527 - bottom: 16rpx;  
528 - right: 24rpx;  
529 - font-size: 24rpx;  
530 - }  
531 - .txt{  
532 - width: 100%;  
533 - height: 100%;  
534 -  
535 - }  
536 - }  
537 - .btn{  
538 - width:220rpx;  
539 - height:60rpx;  
540 - background:rgba(45,85,117,1);  
541 - opacity:1;  
542 - border-radius:8rpx;  
543 - color: #fff;  
544 - font-size: 28rpx;  
545 - line-height: 60rpx;  
546 - text-align: center;  
547 - margin: 0 auto;  
548 - margin-top: 60rpx;  
549 - }  
550 - .close{  
551 - width: 24rpx;  
552 - height: 24rpx;  
553 - position: absolute;  
554 - top: 22rpx;  
555 - right: 22rpx;  
556 - image{  
557 - width: 24rpx;  
558 - height: 24rpx;  
559 - }  
560 - }  
561 - }  
562 -  
563 -}  
564 -.content{  
565 - background: url("../../static/bg_img@2x(2).png") no-repeat;  
566 - // background-color: rgba(249,249,249,1);  
567 - // height: 100vh;  
568 - background-size: 750rpx 292rpx;  
569 - overflow: hidden;  
570 - color:rgba(6,18,30,1);  
571 - padding-bottom: 80rpx;  
572 - .msgCard{  
573 - width:686rpx;  
574 - height:438rpx;  
575 - background:rgba(255,255,255,1);  
576 - box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1);  
577 - opacity:1;  
578 - border-radius:20rpx;  
579 - margin: 0 auto;  
580 - margin-top: 26rpx;  
581 - text-align: center;  
582 - position: relative;  
583 - .photo{  
584 - width: 136rpx;  
585 - height: 136rpx;  
586 - margin-top: 50rpx;  
587 - border-radius: 50%;  
588 - }  
589 - .title{  
590 - font-size: 32rpx;  
591 - margin-top: 24rpx;  
592 - margin-bottom: 24rpx;  
593 - }  
594 - .o,.t{  
595 - color:rgba(140,145,152,1);  
596 - font-size: 22rpx;  
597 - margin-bottom: 4rpx;  
598 - }  
599 - .mall{  
600 - color:rgba(140,145,152,1);  
601 - font-size: 22rpx;  
602 - margin-top: 14rpx;  
603 - }  
604 - .right{  
605 - width: 132rpx;  
606 - height: 54rpx;  
607 - position: absolute;  
608 - right: 0;  
609 - top: 38rpx;  
610 - image{  
611 - width: 132rpx;  
612 - height: 54rpx;  
613 - }  
614 - .text{  
615 - color: #fff;  
616 - font-size: 24rpx;  
617 - width: 80rpx;  
618 - text-align: center;  
619 - position: absolute;  
620 - top: 50%;  
621 - left: 50%;  
622 - transform: translate(-50%,-50%);  
623 - display: flex;  
624 - align-items: center;  
625 - .icon{  
626 - width: 28rpx;  
627 - height: 28rpx;  
628 - }  
629 - }  
630 - }  
631 - }  
632 - // .tabCard{  
633 - // height:80rpx;  
634 - // margin: 0 auto;  
635 - // background:rgba(255,255,255,1);  
636 - // margin-top: 22rpx;  
637 - // overflow-x: auto;  
638 - // width: 686rpx;  
639 - // box-sizing: border-box;  
640 - // // display: flex;  
641 - // // flex-wrap: wrap;  
642 - // white-space:nowrap;  
643 - // padding: 10rpx 0 0 32rpx;  
644 - // .item{  
645 - // margin-right: 40rpx;  
646 - // color:rgba(6,18,30,1);  
647 - // font-size: 28rpx;  
648 - // // width: 112rpx;  
649 - // display: inline-block;  
650 - // margin-right: 44rpx;  
651 - // // float: left;  
652 - // // height: 70rpx;  
653 - // }  
654 - // .active{  
655 - // color:rgba(5,132,157,1);  
656 - // background: url("../../static/xuanzhong_icon@2x.png") no-repeat;  
657 - // background-size: 60rpx 15rpx;  
658 - // background-position: 0 44rpx;  
659 - // height: 60rpx;  
660 -  
661 - // }  
662 - // }  
663 - .tabCard{  
664 - height:70rpx;  
665 - background:rgba(255,255,255,1);  
666 - margin-top: 22rpx;  
667 - overflow-x: auto;  
668 - display: flex;  
669 - // flex-wrap: wrap;  
670 - white-space:nowrap;  
671 - padding: 10rpx 0 0 32rpx;  
672 - .item{  
673 - margin-right: 40rpx;  
674 - color:rgba(6,18,30,1);  
675 - font-size: 28rpx;  
676 - // width: 112rpx;  
677 - display: inline-block;  
678 - margin-right: 44rpx;  
679 - // float: left;  
680 - // height: 70rpx;  
681 - display: flex;  
682 - flex-direction: column;  
683 - align-items: center;  
684 - // justify-content: start;  
685 - }  
686 - .active{  
687 - color:rgba(5,132,157,1);  
688 -  
689 -  
690 -  
691 - }  
692 - .selected{  
693 - width: 60rpx;  
694 - height: 15rpx;  
695 -  
696 - margin-top: 8rpx;  
697 - }  
698 - }  
699 -  
700 - .articl{  
701 - background-color: #fff;  
702 - margin: 0 auto;  
703 - margin-top: 24rpx;  
704 - padding: 0 34rpx 32rpx; 444 + .popup2 {
  445 + width: 100%;
  446 + height: 100%;
  447 + background: rgba(0, 0, 0, .6);
  448 + // opacity:1;
  449 + // border-radius:8rpx;
  450 + position: fixed;
  451 + top: 0;
  452 + right: 0;
  453 + z-index: 999;
  454 +
  455 + .card {
  456 + width: 628rpx;
  457 + height: 574rpx;
  458 + background: rgba(255, 255, 255, 1);
  459 + opacity: 1;
  460 + border-radius: 8rpx;
  461 + position: absolute;
  462 + top: 50%;
  463 + left: 50%;
  464 + transform: translate(-50%, -50%);
  465 + padding: 0 8rpx 0 36rpx;
705 box-sizing: border-box; 466 box-sizing: border-box;
706 - box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1);  
707 - border-radius:20rpx;  
708 - margin-bottom: 42rpx;  
709 - width: 686rpx;  
710 - box-sizing: border-box;  
711 - height:auto!important;  
712 - .nodata{  
713 - font-size: 28rpx;  
714 - text-align: center;  
715 - }  
716 - .articltitle{  
717 - border-bottom: 1rpx solid rgba(238,238,238,1);  
718 - padding: 40rpx 0 26rpx 0;  
719 - display: flex;  
720 - font-size: 24rpx;  
721 - .name{  
722 - color:rgba(61,68,77,1);  
723 - }  
724 - .tips{  
725 - color:rgba(140,145,152,1);  
726 - }  
727 - .photo{  
728 - width: 68rpx;  
729 - height: 68rpx;  
730 - margin-right: 20rpx; 467 +
  468 + .close {
  469 + width: 24rpx;
  470 + height: 24rpx;
  471 + position: absolute;
  472 + top: 22rpx;
  473 + right: 22rpx;
  474 +
  475 + image {
  476 + width: 24rpx;
  477 + height: 24rpx;
  478 + }
  479 + }
  480 +
  481 + .title {
  482 + color: rgba(6, 18, 30, 1);
  483 + font-size: 28rpx;
  484 + text-align: center;
  485 + margin-top: 62rpx;
  486 + margin-bottom: 60rpx;
  487 + font-weight: 500;
  488 + }
  489 +
  490 + .input {
  491 + width: 532rpx;
  492 + height: 72rpx;
  493 + background: rgba(255, 255, 255, 1);
  494 + border: 1rpx solid rgba(6, 18, 30, 1);
  495 + opacity: 1;
  496 + border-radius: 36rpx;
  497 + display: flex;
  498 + align-items: center;
  499 + padding: 0 144rpx;
  500 + box-sizing: border-box;
  501 + margin-top: 110rpx;
  502 +
  503 + input {
  504 + width: 220rpx;
  505 + height: 72rpx;
  506 + margin-left: 20rpx;
  507 + }
  508 + }
  509 +
  510 + .btn {
  511 + width: 220rpx;
  512 + height: 60rpx;
  513 + background: rgba(45, 85, 117, 1);
  514 + opacity: 1;
  515 + border-radius: 8rpx;
  516 + color: #fff;
  517 + font-size: 28rpx;
  518 + line-height: 60rpx;
  519 + text-align: center;
  520 + margin: 0 auto;
  521 + margin-top: 110rpx;
  522 + }
  523 +
  524 + .box {
  525 + width: 166rpx;
  526 + height: 56rpx;
  527 + background: rgba(255, 255, 255, 1);
  528 + border: 1rpx solid rgba(6, 18, 30, 1);
  529 + opacity: 1;
  530 + border-radius: 40rpx;
  531 + text-align: center;
  532 + font-size: 28rpx;
  533 + line-height: 56rpx;
  534 + color: rgba(6, 18, 30, 1);
  535 + display: inline-block;
  536 + margin-right: 26rpx;
  537 + margin-top: 40rpx;
  538 + }
  539 +
  540 + .active {
  541 + background: rgba(129, 195, 191, 1);
  542 + border: 1rpx solid rgba(129, 195, 191);
  543 + color: #fff;
  544 +
  545 + }
  546 + }
  547 +
  548 + }
  549 +
  550 + .popup {
  551 + width: 100%;
  552 + height: 100%;
  553 + background: rgba(0, 0, 0, .6);
  554 + // opacity:1;
  555 + // border-radius:8rpx;
  556 + position: fixed;
  557 + top: 0;
  558 + right: 0;
  559 + z-index: 999;
  560 +
  561 + .card {
  562 + width: 628rpx;
  563 + height: 674rpx;
  564 + background: rgba(255, 255, 255, 1);
  565 + opacity: 1;
  566 + border-radius: 8rpx;
  567 + position: absolute;
  568 + top: 50%;
  569 + left: 50%;
  570 + transform: translate(-50%, -50%);
  571 +
  572 + .title {
  573 + color: rgba(6, 18, 30, 1);
  574 + font-size: 28rpx;
  575 + text-align: center;
  576 + margin-top: 62rpx;
  577 + }
  578 +
  579 + .liuyanContent {
  580 + width: 538rpx;
  581 + height: 366rpx;
  582 + background: rgba(249, 249, 249, 1);
  583 + opacity: 1;
  584 + border-radius: 8rpx;
  585 + margin: 0 auto;
  586 + margin-top: 26rpx;
  587 + padding: 28rpx;
  588 + box-sizing: border-box;
  589 + position: relative;
  590 +
  591 + .num {
  592 + position: absolute;
  593 + bottom: 16rpx;
  594 + right: 24rpx;
  595 + font-size: 24rpx;
  596 + }
  597 +
  598 + .txt {
  599 + width: 100%;
  600 + height: 100%;
  601 +
  602 + }
  603 + }
  604 +
  605 + .btn {
  606 + width: 220rpx;
  607 + height: 60rpx;
  608 + background: rgba(45, 85, 117, 1);
  609 + opacity: 1;
  610 + border-radius: 8rpx;
  611 + color: #fff;
  612 + font-size: 28rpx;
  613 + line-height: 60rpx;
  614 + text-align: center;
  615 + margin: 0 auto;
  616 + margin-top: 60rpx;
  617 + }
  618 +
  619 + .close {
  620 + width: 24rpx;
  621 + height: 24rpx;
  622 + position: absolute;
  623 + top: 22rpx;
  624 + right: 22rpx;
  625 +
  626 + image {
  627 + width: 24rpx;
  628 + height: 24rpx;
  629 + }
  630 + }
  631 + }
  632 +
  633 + }
  634 +
  635 + .content {
  636 + background: url("../../static/bg_img@2x(2).png") no-repeat;
  637 + // background-color: rgba(249,249,249,1);
  638 + // height: 100vh;
  639 + background-size: 750rpx 292rpx;
  640 + overflow: hidden;
  641 + color: rgba(6, 18, 30, 1);
  642 + padding-bottom: 80rpx;
  643 +
  644 + .msgCard {
  645 + width: 686rpx;
  646 + height: 438rpx;
  647 + background: rgba(255, 255, 255, 1);
  648 + box-shadow: 0rpx 4rpx 6rpx rgba(45, 85, 117, 0.1);
  649 + opacity: 1;
  650 + border-radius: 20rpx;
  651 + margin: 0 auto;
  652 + margin-top: 26rpx;
  653 + text-align: center;
  654 + position: relative;
  655 +
  656 + .photo {
  657 + width: 136rpx;
  658 + height: 136rpx;
  659 + margin-top: 50rpx;
  660 + border-radius: 50%;
  661 + }
  662 +
  663 + .title {
  664 + font-size: 32rpx;
  665 + margin-top: 24rpx;
  666 + margin-bottom: 24rpx;
  667 + }
  668 +
  669 + .o,
  670 + .t {
  671 + color: rgba(140, 145, 152, 1);
  672 + font-size: 22rpx;
  673 + margin-bottom: 4rpx;
  674 + }
  675 +
  676 + .mall {
  677 + color: rgba(140, 145, 152, 1);
  678 + font-size: 22rpx;
  679 + margin-top: 14rpx;
  680 + }
  681 +
  682 + .right {
  683 + width: 132rpx;
  684 + height: 54rpx;
  685 + position: absolute;
  686 + right: 0;
  687 + top: 38rpx;
  688 +
  689 + image {
  690 + width: 132rpx;
  691 + height: 54rpx;
  692 + }
  693 +
  694 + .text {
  695 + color: #fff;
  696 + font-size: 24rpx;
  697 + width: 80rpx;
  698 + text-align: center;
  699 + position: absolute;
  700 + top: 50%;
  701 + left: 50%;
  702 + transform: translate(-50%, -50%);
  703 + display: flex;
  704 + align-items: center;
  705 +
  706 + .icon {
  707 + width: 28rpx;
  708 + height: 28rpx;
  709 + }
  710 + }
  711 + }
  712 + }
  713 +
  714 + // .tabCard{
  715 + // height:80rpx;
  716 + // margin: 0 auto;
  717 + // background:rgba(255,255,255,1);
  718 + // margin-top: 22rpx;
  719 + // overflow-x: auto;
  720 + // width: 686rpx;
  721 + // box-sizing: border-box;
  722 + // // display: flex;
  723 + // // flex-wrap: wrap;
  724 + // white-space:nowrap;
  725 + // padding: 10rpx 0 0 32rpx;
  726 + // .item{
  727 + // margin-right: 40rpx;
  728 + // color:rgba(6,18,30,1);
  729 + // font-size: 28rpx;
  730 + // // width: 112rpx;
  731 + // display: inline-block;
  732 + // margin-right: 44rpx;
  733 + // // float: left;
  734 + // // height: 70rpx;
  735 + // }
  736 + // .active{
  737 + // color:rgba(5,132,157,1);
  738 + // background: url("../../static/xuanzhong_icon@2x.png") no-repeat;
  739 + // background-size: 60rpx 15rpx;
  740 + // background-position: 0 44rpx;
  741 + // height: 60rpx;
  742 +
  743 + // }
  744 + // }
  745 + .tabCard {
  746 + height: 70rpx;
  747 + background: rgba(255, 255, 255, 1);
  748 + margin-top: 22rpx;
  749 + overflow-x: auto;
  750 + display: flex;
  751 + // flex-wrap: wrap;
  752 + white-space: nowrap;
  753 + padding: 10rpx 0 0 32rpx;
  754 +
  755 + .item {
  756 + margin-right: 40rpx;
  757 + color: rgba(6, 18, 30, 1);
  758 + font-size: 28rpx;
  759 + // width: 112rpx;
  760 + display: inline-block;
  761 + margin-right: 44rpx;
  762 + // float: left;
  763 + // height: 70rpx;
  764 + display: flex;
  765 + flex-direction: column;
  766 + align-items: center;
  767 + // justify-content: start;
  768 + }
  769 +
  770 + .active {
  771 + color: rgba(5, 132, 157, 1);
  772 +
  773 +
  774 +
  775 + }
  776 +
  777 + .selected {
  778 + width: 60rpx;
  779 + height: 15rpx;
  780 +
  781 + margin-top: 8rpx;
  782 + }
  783 + }
  784 +
  785 + .articl {
  786 + background-color: #fff;
  787 + margin: 0 auto;
  788 + margin-top: 24rpx;
  789 + padding: 0 34rpx 32rpx;
  790 + box-sizing: border-box;
  791 + box-shadow: 0rpx 4rpx 6rpx rgba(45, 85, 117, 0.1);
  792 + border-radius: 20rpx;
  793 + margin-bottom: 42rpx;
  794 + width: 686rpx;
  795 + box-sizing: border-box;
  796 + height: auto !important;
  797 +
  798 + .nodata {
  799 + font-size: 28rpx;
  800 + text-align: center;
  801 + }
  802 +
  803 + .articltitle {
  804 + border-bottom: 1rpx solid rgba(238, 238, 238, 1);
  805 + padding: 40rpx 0 26rpx 0;
  806 + display: flex;
  807 + font-size: 24rpx;
  808 +
  809 + .name {
  810 + color: rgba(61, 68, 77, 1);
  811 + }
  812 +
  813 + .tips {
  814 + color: rgba(140, 145, 152, 1);
  815 + }
  816 +
  817 + .photo {
  818 + width: 68rpx;
  819 + height: 68rpx;
  820 + margin-right: 20rpx;
731 border-radius: 50%; 821 border-radius: 50%;
732 - }  
733 - }  
734 - .articleBox{  
735 - .title{  
736 - color:rgba(6,18,30,1);  
737 - font-size: 28rpx;  
738 - margin-top: 24rpx;  
739 - }  
740 - .txt{  
741 - color:rgba(91,94,99,1);  
742 - font-size: 24rpx;  
743 - margin-top: 8rpx;  
744 - margin-bottom: 20rpx;  
745 - }  
746 - image{  
747 - width: 128rpx;  
748 - height: 128rpx;  
749 - margin-right: 20rpx;  
750 - margin-bottom: 20rpx;  
751 - }  
752 -  
753 - }  
754 - }  
755 - .botmBox{  
756 - width: 750rpx;  
757 - height: 100rpx;  
758 - position: fixed;  
759 - bottom: 0;  
760 - z-index: 888;  
761 - display: flex;  
762 - background-color: #fff;  
763 - padding: 30rpx 0;  
764 - box-sizing: border-box;  
765 - .liuyan,.daxie{  
766 - display: flex;  
767 - width: 50%;  
768 - padding: 0rpx 110rpx;  
769 - box-sizing: border-box;  
770 - font-size: 28rpx;  
771 - height: 50rpx;  
772 - border-right: 1rpx solid rgba(238,238,238,1);  
773 - align-items: center;  
774 - image{  
775 - width: 32rpx;  
776 - height: 32rpx;  
777 - margin-right: 8rpx;  
778 -  
779 - }  
780 - }  
781 - }  
782 -  
783 -  
784 -}  
785 -</style>  
  822 + }
  823 + }
  824 +
  825 + .articleBox {
  826 + .title {
  827 + color: rgba(6, 18, 30, 1);
  828 + font-size: 28rpx;
  829 + margin-top: 24rpx;
  830 + }
  831 +
  832 + .txt {
  833 + color: rgba(91, 94, 99, 1);
  834 + font-size: 24rpx;
  835 + margin-top: 8rpx;
  836 + margin-bottom: 20rpx;
  837 + }
  838 +
  839 + image {
  840 + width: 128rpx;
  841 + height: 128rpx;
  842 + margin-right: 20rpx;
  843 + margin-bottom: 20rpx;
  844 + }
  845 +
  846 + }
  847 + }
  848 +
  849 + .botmBox {
  850 + width: 750rpx;
  851 + height: 100rpx;
  852 + position: fixed;
  853 + bottom: 0;
  854 + z-index: 888;
  855 + display: flex;
  856 + background-color: #fff;
  857 + padding: 30rpx 0;
  858 + box-sizing: border-box;
  859 +
  860 + .liuyan,
  861 + .daxie {
  862 + display: flex;
  863 + width: 50%;
  864 + padding: 0rpx 110rpx;
  865 + box-sizing: border-box;
  866 + font-size: 28rpx;
  867 + height: 50rpx;
  868 + border-right: 1rpx solid rgba(238, 238, 238, 1);
  869 + align-items: center;
  870 +
  871 + image {
  872 + width: 32rpx;
  873 + height: 32rpx;
  874 + margin-right: 8rpx;
  875 +
  876 + }
  877 + }
  878 + }
  879 +
  880 +
  881 + }
  882 +</style>
@@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
11 placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;" 11 placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;"
12 style="font-size:28rpx;" 12 style="font-size:28rpx;"
13 v-model="word" 13 v-model="word"
  14 + @confirm="getschoollist"
14 /> 15 />
15 </view> 16 </view>
16 <view class="searchBtn" @click="getschoollist">搜索</view> 17 <view class="searchBtn" @click="getschoollist">搜索</view>
@@ -19,25 +20,27 @@ @@ -19,25 +20,27 @@
19 <view class="paiming" :class="{ active: active1 }" @click="paimingShow">排名</view> 20 <view class="paiming" :class="{ active: active1 }" @click="paimingShow">排名</view>
20 <view class="diqu" :class="{ active: active2 }" @click="diquShow">地区</view> 21 <view class="diqu" :class="{ active: active2 }" @click="diquShow">地区</view>
21 <view class="paimingPopup" v-if="isPaimingShow"> 22 <view class="paimingPopup" v-if="isPaimingShow">
22 - <view class="title" @click="selectalllevel">全部</view>  
23 - <view class="item" @click="paimingHide" v-for="(item, index) in levelList" :key="index">{{ item.name }}</view> 23 + <view class="title" @click="selectalllevel" :class="levelindex==-2?'selactive':''">全部</view>
  24 + <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>
24 <!-- <view class="item" @click="paimingHide">{{item.name}}</view> --> 25 <!-- <view class="item" @click="paimingHide">{{item.name}}</view> -->
25 </view> 26 </view>
26 <view class="diquPopup" v-if="isDiquShow"> 27 <view class="diquPopup" v-if="isDiquShow">
27 - <view class="title" @click="selectallprovince">全部地区</view> 28 + <view class="title" @click="selectallprovince" :class="selpro==-1?'selactive':''" :data-index="-2">全部地区</view>
28 <view class="cont"> 29 <view class="cont">
29 <view class="colum"> 30 <view class="colum">
30 - <view class="item" @click="selectprovince" v-for="(item, index) in provinceList" :key="index" :data-id="item.code">{{ item.name }}</view> 31 + <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>
31 </view> 32 </view>
32 <view class="colum"> 33 <view class="colum">
33 - <view class="item" @click="selectcity" v-for="(item, index) in cityList" :key="index" :data-id="item.code">{{ item.name }}</view> 34 + <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>
34 </view> 35 </view>
35 </view> 36 </view>
36 </view> 37 </view>
37 </view> 38 </view>
38 </view> 39 </view>
  40 +
  41 + <view class="nodata" v-if="schoolList.length==0">暂无数据</view>
39 42
40 - <view class="contentBox"> 43 + <view class="contentBox" v-else>
41 <view class="item" v-for="(item, index) in schoolList" :key="index" @click="godetail(item)"> 44 <view class="item" v-for="(item, index) in schoolList" :key="index" @click="godetail(item)">
42 <view class="title">{{ item.name }}</view> 45 <view class="title">{{ item.name }}</view>
43 <image class="icon" :src="item.icon_image"></image> 46 <image class="icon" :src="item.icon_image"></image>
@@ -52,6 +55,9 @@ import app from '../../App.vue'; @@ -52,6 +55,9 @@ import app from '../../App.vue';
52 export default { 55 export default {
53 data() { 56 data() {
54 return { 57 return {
  58 + selpro:-1,
  59 + selcity:-1,
  60 + levelindex:-1,
55 isPaimingShow: false, 61 isPaimingShow: false,
56 isDiquShow: false, 62 isDiquShow: false,
57 active1: false, 63 active1: false,
@@ -74,7 +80,16 @@ export default { @@ -74,7 +80,16 @@ export default {
74 this.isDiquShow = false; 80 this.isDiquShow = false;
75 (this.active1 = true), (this.active2 = false); 81 (this.active1 = true), (this.active2 = false);
76 }, 82 },
77 - paimingHide() { 83 + paimingHide(e) {
  84 + let id=e.currentTarget.dataset.id;
  85 + let index=e.currentTarget.dataset.index;
  86 +
  87 + this.levelindex=index;
  88 + this.province_id='';
  89 + this.level_id=id;
  90 + this.page=1;
  91 + this.schoolList=[];
  92 + this.getschoollist();
78 this.isPaimingShow = false; 93 this.isPaimingShow = false;
79 (this.active1 = false), (this.active2 = false); 94 (this.active1 = false), (this.active2 = false);
80 }, 95 },
@@ -118,21 +133,38 @@ export default { @@ -118,21 +133,38 @@ export default {
118 //点击选中的省 133 //点击选中的省
119 selectprovince(e) { 134 selectprovince(e) {
120 this.province_id = e.currentTarget.dataset.id; 135 this.province_id = e.currentTarget.dataset.id;
  136 + this.selpro=e.currentTarget.dataset.index;
  137 + this.selcity=-1;
121 this.getAllCity(); 138 this.getAllCity();
122 }, 139 },
123 //点击全部省 140 //点击全部省
124 selectallprovince() { 141 selectallprovince() {
  142 + this.selpro=-2;
  143 + this.selcity=-1;
  144 + this.province_id='';
  145 + this.city_id='';
  146 + this.level_id='';
  147 + this.page=1;
  148 + this.schoolList=[];
125 this.getschoollist(); 149 this.getschoollist();
  150 +
126 this.isDiquShow = false; 151 this.isDiquShow = false;
127 }, 152 },
128 //点击选中全部市 153 //点击选中全部市
129 selectallcity() { 154 selectallcity() {
130 - this.getschoollist(); 155 + this.level_id='';
  156 + this.page=1;
  157 + this.schoolList=[];
131 this.isDiquShow = false; 158 this.isDiquShow = false;
  159 + this.getschoollist();
132 }, 160 },
133 //点击选中的市 161 //点击选中的市
134 selectcity(e) { 162 selectcity(e) {
135 this.city_id = e.currentTarget.dataset.id; 163 this.city_id = e.currentTarget.dataset.id;
  164 + this.selcity=e.currentTarget.dataset.index;
  165 + this.level_id='';
  166 + this.page=1;
  167 + this.schoolList=[];
136 this.getschoollist(); 168 this.getschoollist();
137 this.isDiquShow = false; 169 this.isDiquShow = false;
138 }, 170 },
@@ -159,10 +191,10 @@ export default { @@ -159,10 +191,10 @@ export default {
159 level_id: that.level_id, 191 level_id: that.level_id,
160 province_id: that.province_id 192 province_id: that.province_id
161 }; 193 };
162 - app.post(url, params, 'post') 194 + app.post(url, params,'post')
163 .then(res => { 195 .then(res => {
164 console.log(res); 196 console.log(res);
165 - that.schoolList = res; 197 + that.schoolList =that.schoolList.concat(res) ;
166 }) 198 })
167 .catch(err => {}); 199 .catch(err => {});
168 }, 200 },
@@ -182,6 +214,11 @@ export default { @@ -182,6 +214,11 @@ export default {
182 //点击全部排名 214 //点击全部排名
183 selectalllevel() { 215 selectalllevel() {
184 this.isPaimingShow = false; 216 this.isPaimingShow = false;
  217 + this.levelindex=-2;
  218 + this.level_id='';
  219 + this.province_id='';
  220 + this.page=1;
  221 + this.schoolList=[];
185 this.getschoollist(); 222 this.getschoollist();
186 }, 223 },
187 // 进入学校详情页 224 // 进入学校详情页
1 <template> 1 <template>
2 - <view class="content" @click="hide"> 2 + <view class="content" @click="hidekk">
3 <view @click.stop="showhide"> 3 <view @click.stop="showhide">
4 <view class="top"> 4 <view class="top">
5 <view class="search"> 5 <view class="search">
6 <image class="icon" src="../../static/sousuo_icon@2x.png"></image> 6 <image class="icon" src="../../static/sousuo_icon@2x.png"></image>
7 <input type="text" v-model="word" placeholder="请输入搜索内容" class="input" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;" 7 <input type="text" v-model="word" placeholder="请输入搜索内容" class="input" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;"
8 - style="font-size:28rpx;"> 8 + style="font-size:28rpx;" @confirm="getmatelist">
9 </view> 9 </view>
10 <view class="searchBtn" @click="getmatelist">搜索</view> 10 <view class="searchBtn" @click="getmatelist">搜索</view>
11 </view> 11 </view>
@@ -18,18 +18,18 @@ @@ -18,18 +18,18 @@
18 18
19 <view class="cont"> 19 <view class="cont">
20 <view class="colum" style="overflow: auto;height: 600rpx;"> 20 <view class="colum" style="overflow: auto;height: 600rpx;">
21 - <view class="title" @click="selectallprovince">全部</view>  
22 - <view class="item" @click="selectprovince" v-for="(item,index) in provinceList" :key="index" :data-id="item.code">{{item.name}}</view> 21 + <view class="title" @click="selectallprovince" :class="selpro==-2?'selactive':''" :data-index="-2">全部</view>
  22 + <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>
23 23
24 </view> 24 </view>
25 <view class="colum" style="overflow: auto;height: 600rpx;"> 25 <view class="colum" style="overflow: auto;height: 600rpx;">
26 <!-- <view class="title" @click="selectallcity" :data-id="null">这个省的市</view> --> 26 <!-- <view class="title" @click="selectallcity" :data-id="null">这个省的市</view> -->
27 - <view class="item" @click="selectcity" v-for="(item,index) in cityList" :key="index" :data-id="item.code">{{item.name}}</view> 27 + <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>
28 28
29 </view> 29 </view>
30 <view class="colum" style="overflow: auto;height: 600rpx;"> 30 <view class="colum" style="overflow: auto;height: 600rpx;">
31 <!-- <view class="title" @click="selectschool" :data-id="null">全部学校</view> --> 31 <!-- <view class="title" @click="selectschool" :data-id="null">全部学校</view> -->
32 - <view class="item" @click="selectschool" v-for="(item,index) in schoolList" :key="index" :data-id="item.id">{{item.name}}</view> 32 + <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>
33 </view> 33 </view>
34 </view> 34 </view>
35 </view> 35 </view>
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
45 <view class="majorPopup" v-if="isMajorShow"> 45 <view class="majorPopup" v-if="isMajorShow">
46 <view class="cont" style="display:flex;flex-direction: column;overflow: auto;height: 600rpx;"> 46 <view class="cont" style="display:flex;flex-direction: column;overflow: auto;height: 600rpx;">
47 <!-- <view class="title" @click="selectgraduated" :data-id="null">全部</view> --> 47 <!-- <view class="title" @click="selectgraduated" :data-id="null">全部</view> -->
48 - <view class="item" style="width:330rpx" @click="selectgraduated" v-for="(item,index) in graduatedList" :key="index" 48 + <view class="item" :class="major==index?'selactive':''" :data-index="index" style="width:330rpx" @click="selectgraduated" v-for="(item,index) in graduatedList" :key="index"
49 :data-id="item.id">{{item.name}}</view> 49 :data-id="item.id">{{item.name}}</view>
50 </view> 50 </view>
51 </view> 51 </view>
@@ -53,7 +53,7 @@ @@ -53,7 +53,7 @@
53 <view class="stylePopup" v-if="isStyleShow"> 53 <view class="stylePopup" v-if="isStyleShow">
54 <view class="cont" style="display:flex;flex-direction: column;overflow: auto;height: 600rpx;"> 54 <view class="cont" style="display:flex;flex-direction: column;overflow: auto;height: 600rpx;">
55 <!-- <view class="title" @click="selectup" :data-id="null">全部</view> --> 55 <!-- <view class="title" @click="selectup" :data-id="null">全部</view> -->
56 - <view class="item" style="width:230rpx" @click="selectup" v-for="(item,index) in upList" :key="index" :data-id="item.id">{{item.name}}</view> 56 + <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>
57 57
58 </view> 58 </view>
59 </view> 59 </view>
@@ -132,7 +132,11 @@ @@ -132,7 +132,11 @@
132 132
133 data() { 133 data() {
134 return { 134 return {
135 - 135 + selpro:-1,
  136 + selty:-1,
  137 + selstuent:-1,
  138 + major:-1,
  139 + upindex:-1,
136 isDiquShow: false, 140 isDiquShow: false,
137 // isSchoolShow:false, 141 // isSchoolShow:false,
138 isMajorShow: false, 142 isMajorShow: false,
@@ -169,11 +173,13 @@ @@ -169,11 +173,13 @@
169 provinceList: [], 173 provinceList: [],
170 cityList: [], 174 cityList: [],
171 schoolList: [], 175 schoolList: [],
172 - word: "" 176 + word: "",
  177 + vip_level:'',
  178 +
173 } 179 }
174 }, 180 },
175 methods: { 181 methods: {
176 - hide() { 182 + hidekk() {
177 console.log(3889348439) 183 console.log(3889348439)
178 this.isDiquShow = false 184 this.isDiquShow = false
179 }, 185 },
@@ -258,6 +264,22 @@ @@ -258,6 +264,22 @@
258 }) 264 })
259 265
260 }, 266 },
  267 + // 获取个人信息
  268 + getpersoninfo(){
  269 + let that = this;
  270 + var url='student/getMyInfo';
  271 + var params={
  272 +
  273 + }
  274 + app.post(url,params,"get").then((res)=>{
  275 + console.log(res)
  276 + this.vip_level=res.vip_level;
  277 + console.log('3478783473474',that.vip_level)
  278 + that.getmatelist()
  279 + }).catch((err)=>{
  280 + console.log(err)
  281 + })
  282 + },
261 //获取学长列表 283 //获取学长列表
262 getmatelist() { 284 getmatelist() {
263 if (uni.getStorageSync('token') == '') { 285 if (uni.getStorageSync('token') == '') {
@@ -276,10 +298,19 @@ @@ -276,10 +298,19 @@
276 this.schoolmateList=[]; 298 this.schoolmateList=[];
277 var url = "student/getStudentList" 299 var url = "student/getStudentList"
278 var token = uni.getStorageSync('token') 300 var token = uni.getStorageSync('token')
  301 + let type=1;
  302 + console.log('3443743873478',this.vip_level)
  303 + if(this.vip_level==0){
  304 + type=1
  305 + }else if(this.vip_level==1){
  306 + type=2
  307 + }else if(this.vip_level==2){
  308 + type=3
  309 + }
279 var params = { 310 var params = {
280 page: this.schoolmate.page, 311 page: this.schoolmate.page,
281 size: this.schoolmate.size, 312 size: this.schoolmate.size,
282 - type: this.schoolmate.type, 313 + type: type,
283 university_id: this.schoolmate.university_id, 314 university_id: this.schoolmate.university_id,
284 graduated_id: this.schoolmate.graduated_id, 315 graduated_id: this.schoolmate.graduated_id,
285 up_id: this.schoolmate.up_id, 316 up_id: this.schoolmate.up_id,
@@ -385,7 +416,8 @@ @@ -385,7 +416,8 @@
385 this.schoolmate.graduated_id='' 416 this.schoolmate.graduated_id=''
386 this.schoolmate.page = 1; 417 this.schoolmate.page = 1;
387 this.word=''; 418 this.word='';
388 - this.schoolmateList = [] 419 + this.schoolmateList = [];
  420 + this.upindex=e.currentTarget.dataset.index;
389 this.getmatelist() 421 this.getmatelist()
390 this.isStyleShow = false 422 this.isStyleShow = false
391 }, 423 },
@@ -400,11 +432,14 @@ @@ -400,11 +432,14 @@
400 this.schoolmate.university_id='' 432 this.schoolmate.university_id=''
401 this.schoolmate.up_id='' 433 this.schoolmate.up_id=''
402 this.word='' 434 this.word=''
403 - this.schoolmateList = [] 435 + this.schoolmateList = [];
  436 + this.major=e.currentTarget.dataset.index;
404 this.getmatelist() 437 this.getmatelist()
405 }, 438 },
406 //点击选中的学校 439 //点击选中的学校
407 selectschool(e) { 440 selectschool(e) {
  441 + this.selstuent=e.currentTarget.dataset.index;
  442 +
408 this.schoolmate.page = 1 443 this.schoolmate.page = 1
409 this.schoolmate.graduated_id = '' 444 this.schoolmate.graduated_id = ''
410 this.schoolmate.up_id = '' 445 this.schoolmate.up_id = ''
@@ -419,19 +454,26 @@ @@ -419,19 +454,26 @@
419 selectprovince(e) { 454 selectprovince(e) {
420 if (this.province_id != e.currentTarget.dataset.id) { 455 if (this.province_id != e.currentTarget.dataset.id) {
421 this.province_id = e.currentTarget.dataset.id; 456 this.province_id = e.currentTarget.dataset.id;
  457 + let index=e.currentTarget.dataset.index;
  458 + this.selpro=index;
  459 + this.selty=-1;
  460 + this.selstuent=-1;
422 this.schoolList = []; 461 this.schoolList = [];
423 this.getAllCity() 462 this.getAllCity()
424 } 463 }
425 464
426 }, 465 },
427 //点击全部省 466 //点击全部省
428 - selectallprovince() { 467 + selectallprovince(e) {
429 this.schoolmate.page = 1, 468 this.schoolmate.page = 1,
430 this.schoolmate.university_id = '' 469 this.schoolmate.university_id = ''
431 this.schoolmate.graduated_id = '' 470 this.schoolmate.graduated_id = ''
432 this.schoolmate.up_id = '' 471 this.schoolmate.up_id = ''
433 this.word = '' 472 this.word = ''
434 - this.schoolmateList = [] 473 + this.schoolmateList = [];
  474 + this.selpro=e.currentTarget.dataset.index;
  475 + this.selty=-1;
  476 + this.selstuent=-1;
435 this.getmatelist() 477 this.getmatelist()
436 this.isDiquShow = false 478 this.isDiquShow = false
437 }, 479 },
@@ -444,7 +486,10 @@ @@ -444,7 +486,10 @@
444 //点击选中的市 486 //点击选中的市
445 selectcity(e) { 487 selectcity(e) {
446 if (this.city_id != e.currentTarget.dataset.id) { 488 if (this.city_id != e.currentTarget.dataset.id) {
447 - this.city_id = e.currentTarget.dataset.id 489 + this.city_id = e.currentTarget.dataset.id;
  490 + let index=e.currentTarget.dataset.index;
  491 + this.selty=index;
  492 + this.selstuent=-1;
448 this.schoolList = []; 493 this.schoolList = [];
449 this.getAllSchool() 494 this.getAllSchool()
450 } 495 }
@@ -473,13 +518,16 @@ @@ -473,13 +518,16 @@
473 // this.getAllSchool() 518 // this.getAllSchool()
474 this.getAllGraduated() 519 this.getAllGraduated()
475 this.getAllUp() 520 this.getAllUp()
476 - this.getAllProvince() 521 + this.getAllProvince();
  522 +
477 523
478 }, 524 },
479 onShow() { 525 onShow() {
480 this.page = 1; 526 this.page = 1;
481 this.schoolmateList = [] 527 this.schoolmateList = []
482 - this.getmatelist() 528 +
  529 + // 获取个人信息
  530 + this.getpersoninfo()
483 } 531 }
484 532
485 } 533 }