作者 lihongjuan

2

... ... @@ -3,6 +3,8 @@
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
uni.hideTabBar({
... ... @@ -19,7 +21,8 @@
let that = this,
token = uni.getStorageSync('token'),
header = {
'token': token || ''
'token': token || '',
'Content-Type':'application/x-www-form-urlencoded'
},
postData;
//网络请求
... ...
<template>
<view class="content">
<!-- {{chosetypename}} -->
<view class="teacherfooter">
<view class="teacherfootitem" @click="gotab(item,index)" v-for="(item,index) in list" :key="index">
... ... @@ -16,50 +17,21 @@
</template>
<script>
let chosetype=uni.getStorageSync("chosetype");
// let chosetype=uni.getStorageSync("chosetype");
export default {
data() {
return {
list:chosetype==1? [{
"pagePath": "/pages/school/school",
"iconPath": "/static/xuexiao_icon@2x3.png",
"selectedIconPath": "/static/xuexiao_icon@2x.png",
"text": "学校",
}, {
"pagePath": "/pages/schoolmate/schoolmate",
"iconPath": "/static/zhaoxiaoyou_icon@2x.png",
"selectedIconPath": "/static/zhaoxiaoyou_icon@2x2.png",
"text": "找校友"
},
{
"pagePath": "/pages/homePage/homePage",
"iconPath": "/static/wodezhuye_icon@2x.png",
"selectedIconPath": "/static/wodezhuye_icon@2x2.png",
"text": "我的主页"
}
list:[],
]:[{
"pagePath": "/pages/schoolmate/schoolmate",
"iconPath": "/static/zhaoxiaoyou_icon@2x.png",
"selectedIconPath": "/static/zhaoxiaoyou_icon@2x2.png",
"text": "找校友"
},
{
"pagePath": "/pages/homePage/collegeHome",
"iconPath": "/static/wodezhuye_icon@2x.png",
"selectedIconPath": "/static/wodezhuye_icon@2x2.png",
"text": "我的主页"
}
],
currentTabIndex: this.current
// currentTabIndex: this.current,
currentTabIndex:"",
choosecanshu:''
}
},
// props: ["current"],
props: {
current: { type: [Number, String],default: 0 },
chosetypename:Number
},
onLoad() {
... ... @@ -113,16 +85,77 @@
let url=item.pagePath;
uni.switchTab({url})
// uni.switchTab({
// url:"/pages/nearshop/nearshop"
// })
}
},
onShow(){
created() {
let that=this
this.choosecanshu=this.chosetypename
console.log('我是底部菜单',this.chosetypename,this.choosecanshu)
let chosetype=uni.getStorageSync("chosetype");
console.log(chosetype)
uni.$on('update',function(data){
console.log('监听到事件来自 update ,携带参数 msg 为:' ,data);
that.currentTabIndex=data.currentTabIndex
if(data.chosenum==1){
console.log(449898)
that.list=[{
"pagePath": "/pages/school/school",
"iconPath": "/static/xuexiao_icon@2x3.png",
"selectedIconPath": "/static/xuexiao_icon@2x.png",
"text": "学校",
}, {
"pagePath": "/pages/schoolmate/schoolmate",
"iconPath": "/static/zhaoxiaoyou_icon@2x.png",
"selectedIconPath": "/static/zhaoxiaoyou_icon@2x2.png",
"text": "找校友"
},
{
"pagePath": "/pages/homePage/homePage",
"iconPath": "/static/wodezhuye_icon@2x.png",
"selectedIconPath": "/static/wodezhuye_icon@2x2.png",
"text": "我的主页"
}
]
}else{
that.list=[{
"pagePath": "/pages/schoolmate/schoolmate",
"iconPath": "/static/zhaoxiaoyou_icon@2x.png",
"selectedIconPath": "/static/zhaoxiaoyou_icon@2x2.png",
"text": "找校友"
},
{
"pagePath": "/pages/homePage/collegeHome",
"iconPath": "/static/wodezhuye_icon@2x.png",
"selectedIconPath": "/static/wodezhuye_icon@2x2.png",
"text": "我的主页"
}
]
}
})
console.log(that.list)
},
watch: {
    paramsDate: {
      handler(newValue, oldValue) {
        console.log(newValue,console.log(oldValue))
        this.init();
      },
      deep: true
    }
  }
}
</script>
... ...
{
"pages": [
{
"path": "pages/register/register",
"style": {
... ... @@ -10,7 +11,7 @@
}
},
{
"path": "pages/school/school",
"path": "pages/register/highRegister",
"style": {
"navigationBarTitleText": "学长说",
"navigationBarBackgroundColor": "#2D5575",
... ... @@ -19,7 +20,7 @@
}
},
{
"path": "pages/register/highRegister",
"path": "pages/school/school",
"style": {
"navigationBarTitleText": "学长说",
"navigationBarBackgroundColor": "#2D5575",
... ... @@ -28,6 +29,7 @@
}
},
{
"path": "pages/register/selectSchool",
"style": {
... ...
... ... @@ -68,15 +68,15 @@
-->
<view class="textBox">
YHA青年旅舍会员卡(一年)是国际青年旅舍联盟会员身份证明,全球通用,也是旅行者入住青年旅舍的凭证。拥有会员卡,可以享受国内外国际青年旅舍住宿价格的优惠,同时部分海外青年旅舍只允许会员入住。
成为YHA青年旅舍会员的好处:
<view>1)入住青年旅舍享受房价上的优惠;</view>
<!-- <view class="textBox">
YHA会员卡(一年)是会员身份证明,全球通用。拥有会员卡,可以享受价格优惠。
成为YHA会员的好处:
<view>1)入住旅舍享受房价上的优惠;</view>
<view>2)在世界各地享有食、住、行、游、购、娱等逾3,000项优惠,如:在全球多个国际机场和车船站,凭会员卡兑换外币可免收手续费;观光、租车、购物、参团、购买车船票等均可能有折扣,折扣率高达50%。单是在澳大利亚,优惠项目便接近800种;</view>
<view>3)以优惠价格参与多项由青年旅舍举办的各类文化、旅游等方面的交流活动;</view>
<view>4)优先参与青年旅舍组织的国际交流活动。</view>
<view>3)以优惠价格参与各类文化、旅游等方面的交流活动;</view>
<view>4)优先参与国际交流活动。</view>
</view>
</view> -->
</view>
</template>
... ...
... ... @@ -21,7 +21,12 @@
<view class="cont">
<view class="title">{{item.nickname}}</view>
<view class="fen">{{item.title}}</view>
<view class="txt">{{item.content}}</view>
<view class="txt textcontent">
<rich-text :nodes="item.content"></rich-text>
</view>
</view>
<view class="right" :class="item.is_like_user==0?'like':''">
<view class="text" @click.stop="attention(item,index)" v-if="item.is_like_user==0" style="display:flex;justify-content: center;align-items: center;color:#81C3BF;">
... ... @@ -60,7 +65,10 @@
<view class="cont">
<view class="title">{{item.nickname}}</view>
<view class="fen">{{item.title}}</view>
<view class="txt">{{item.content}}</view>
<view class="txt textcontent">
<rich-text :nodes="item.content"></rich-text>
</view>
</view>
<view class="right" :class="item.is_like_user==0?'like':''">
<view class="text" @click.stop="attention(item,index)" v-if="item.is_like_user==0" style="display:flex;justify-content: center;align-items: center;color:#81C3BF;">
... ... @@ -316,6 +324,12 @@
font-size: 28rpx;
text-align: center;
}
.textcontent{
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
.title {
background-color: #fff;
... ...
... ... @@ -21,7 +21,10 @@
<view class="cont" :style="{width:width}" @click="toarticl" :data-id="item.id">
<view class="rowOne">{{item.nickname}}</view>
<view class="rowTwo">{{item.title}}</view>
<view class="rowThree">{{item.des_content}}</view>
<!-- <view class="rowThree">{{item.des_content}}</view> -->
<view style="rowThree textcontent">
<rich-text :nodes="item.des_content"></rich-text>
</view>
</view>
</view>
</view>
... ... @@ -48,7 +51,11 @@
<view class="title">{{item.nickname}}</view>
<view class="fen">{{item.title}}</view>
<view class="txt">{{item.des_content}}</view>
<view style="textcontent">
<rich-text :nodes="item.des_content"></rich-text>
</view>
<!-- <view class="txt">{{item.des_content}}</view> -->
</view>
<view class="right" :class="item.is_like_user==0?'like':''">
<view class="text" @click.stop="attention(item,index)" v-if="item.is_like_user==0" style="display:flex;justify-content: center;align-items: center;color:#81C3BF;">
... ... @@ -67,7 +74,9 @@
</view>
<!-- <view>
</view> -->
<view class="nodata" v-if="cellectlist.length==0">暂无数据</view>
<view v-else>
<view class="cellcetBox" v-if="isHistoryShow==false&&isMineShow==false">
... ... @@ -84,7 +93,10 @@
<view class="title">{{item.nickname}}</view>
<view class="fen">{{item.title}}</view>
<view class="txt">{{item.des_content}}</view>
<!-- <view class="txt">{{item.des_content}}</view> -->
<view style="txt textcontent">
<rich-text :nodes="item.des_content"></rich-text>
</view>
</view>
<view class="right">
<view class="text" @click.stop="attention(item,index)" v-if="item.is_like_user==0" style="display:flex;justify-content: center;align-items: center;color:#81C3BF;">
... ... @@ -377,6 +389,12 @@
text-align: center;
font-size: 28rpx;
}
.textcontent{
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
.title {
background-color: #fff;
... ...
... ... @@ -47,13 +47,17 @@
<view class="teacherfootname" :class="footersel==3?'selactive':''">我的主页</view>
</view>
</view> -->
<tabBar :current="currentTabIndex" backgroundColor="#fbfbfb" color="#999" tintColor="#42b983"></tabBar>
<!-- :chosetypename="chosetypenumber" -->
<!-- :current="currentTabIndex" -->
<tabBar backgroundColor="#fbfbfb" color="#999" tintColor="#42b983"></tabBar>
</view>
</template>
<script>
import app from "../../App.vue";
import tabBar from '../../components/tabvue/tabvue.vue'
let chosetype=uni.getStorageSync("chosetype");
console.log('344',chosetype)
export default {
components: {
tabBar,
... ... @@ -66,7 +70,8 @@ data(){
type:"",
userinfolist:{},
token:'',
user_id:""
user_id:"",
chosetypenumber:chosetype,
}
},
methods:{
... ... @@ -78,7 +83,9 @@ methods:{
icon:'none'
})
}else{
uni.navigateTo({
url:'/pages/homePage/pubArticle'
})
}
},
... ... @@ -201,6 +208,9 @@ onLoad(options){
this.token=uni.getStorageSync('token')
},
onShow(){
let chosetype=uni.getStorageSync("chosetype");
this.chosetypenumber=chosetype;
uni.$emit('update',{chosenum:chosetype,currentTabIndex:1})
this.getuserinfo()
}
}
... ...
... ... @@ -85,14 +85,17 @@
</view>
-->
<tabBar :current="currentTabIndex" backgroundColor="#fbfbfb" color="#999" tintColor="#42b983"></tabBar>
<!-- :chosetypename="chosetypenumber" -->
<!-- :current="currentTabIndex" -->
<tabBar backgroundColor="#fbfbfb" color="#999" tintColor="#42b983"></tabBar>
</view>
</template>
<script>
import app from "../../App.vue";
import tabBar from '../../components/tabvue/tabvue.vue'
let chosetype=uni.getStorageSync("chosetype");
console.log('437489',chosetype)
export default {
components: {
... ... @@ -108,6 +111,7 @@
head_image:'',
jumpschool:true,
jumpschoolk:true,
chosetypenumber:chosetype,
}
},
... ... @@ -254,6 +258,12 @@
this.type=type
this.getuserinfo()
},
onShow() {
let chosetype=uni.getStorageSync("chosetype");
this.chosetypenumber=chosetype;
uni.$emit('update',{chosenum:chosetype,currentTabIndex:2})
console.log(this.chosetypenumber)
}
}
</script>
... ...
... ... @@ -11,15 +11,17 @@
</view>
<view v-if="item.usera_id==user_id">
<view class="right" style="color:#BDC4CE">已读</view>
<view class="delname" @click.stop="del(item)">删除</view>
</view>
<view v-else>
<view class="right" v-if="item.readtime==null">未读</view>
<view class="right" style="color:#BDC4CE" v-else>已读</view>
<view class="delname" @click.stop="del(item)">删除</view>
</view>
</view>
<view class="bottomrow">
<view class="bottomrow" @click.stop="hide">
{{item.des_content}}
</view>
</view>
... ... @@ -82,6 +84,37 @@ export default {
}).catch((err)=>{
console.log(err)
})
},
del(item){
var that = this
uni.showModal({
title: '提示',
content: '是否删除该留言',
success: function (res) {
if (res.confirm) {
var url = "mes/delMes"
var token = uni.getStorageSync('token')
var params = {
mes_id:item.id
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.commentlist=[];
that.page=1;
that.getcommentlist()
}).catch((err)=>{
console.log(err)
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
},
onLoad(options){
... ... @@ -114,6 +147,12 @@ export default {
text-align: center;
padding: 20rpx 0;
}
.delname{
color:#FF0E0E;
font-size: 26rpx;
margin-top:10rpx
}
.item{
width: 686rpx;
margin: 0 auto;
... ...
... ... @@ -28,8 +28,9 @@
</view>
</view>
<view class="item2">
<textarea v-model="articlecontent" name="" id="" cols="30" rows="10" class="textarea" placeholder="请输入文章内容" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx" maxlength="1000"></textarea>
<view class="tips">可输入1000字</view>
<editor id="editor" class="ql-container" :placeholder="placeholder" @input="onEditorReady"></editor>
<!-- <textarea v-model="articlecontent" name="" id="" cols="30" rows="10" class="textarea" placeholder="请输入文章内容" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx" maxlength="1000"></textarea> -->
<view class="tips">可输入3000字</view>
</view>
<view class="picBox">
<!-- <view class="boxitem">
... ... @@ -79,6 +80,7 @@ export default {
isUpload:false,
article_type_id:'',
show_type:1,
placeholder: '请输入文章内容'
}
},
... ... @@ -87,6 +89,11 @@ export default {
this.show_type=e.currentTarget.dataset.id
},
onEditorReady(e) {
console.log(e)
this.articlecontent = e.detail.html;
console.log(this.articlecontent)
},
seltype(){
this.istypeshow=true
},
... ... @@ -274,6 +281,9 @@ export default {
.item2{
padding: 32rpx;
width: 686rpx;
.ql-container{
width:615rpx;
}
.textarea{
width: 622rpx;
font-size: 28rpx;
... ... @@ -282,6 +292,7 @@ export default {
font-size: 24rpx;
text-align: right;
width: 622rpx;
margin-top:10rpx;
}
}
.picBox{
... ...
... ... @@ -8,7 +8,7 @@
<view class="text">最多可提{{yue}}元,<text @click="tixianall">全部提现</text></view>
<view class="btn" @click="tixian">提现</view>
</view>
<view class="textBox">
<!-- <view class="textBox">
YHA青年旅舍会员卡(一年)是国际青年旅舍联盟会员身份证明,全球通用,也是旅行者入住青年旅舍的凭证。拥有会员卡,可以享受国内外国际青年旅舍住宿价格的优惠,同时部分海外青年旅舍只允许会员入住。
成为YHA青年旅舍会员的好处:
<view>1)入住青年旅舍享受房价上的优惠;</view>
... ... @@ -16,7 +16,7 @@
<view>3)以优惠价格参与多项由青年旅舍举办的各类文化、旅游等方面的交流活动;</view>
<view>4)优先参与青年旅舍组织的国际交流活动。</view>
</view>
</view> -->
</view>
</template>
... ...
... ... @@ -27,7 +27,7 @@
<view class="title">毕业年份</view>
<!-- <view class="selectBtn">请选择毕业年份<image class="icon" src="../../static/zhuandao_icon@2x.png"></image></view> -->
<view @click="selDate" style="display: flex;justify-content: space-between;align-items: center;">
<picker mode="date" :value="date" start="2000-01-01" @change="bindTimeChange">
<picker fields="year" mode ="date" :value="date" :start="startDate" :end="endDate" @change="bindTimeChange">
<view class="selectBtn">{{ isDateShow ? date : '请选择毕业年份' }}</view>
</picker>
<image class="icon" src="../../static/zhuandao_icon@2x.png"></image>
... ... @@ -123,13 +123,16 @@ import app from '../../App.vue';
export default {
data() {
const currentDate = this.getDate({
format: true,
})
return {
isSubPopupShow: false,
isStylePopupShow: false,
username: '',
image: '',
isUpload: false,
date: '请选择毕业年份',
date: currentDate,
isDateShow: false,
uplist: [],
upid: '',
... ... @@ -154,10 +157,34 @@ export default {
academyid: '',
chuanimg: '',
baseUrl: app.globalData.imageBaseUrl,
uploadImg: ''
uploadImg: '',
start:''
};
},
computed: {
startDate() {
return this.getDate('start');
},
endDate() {
return this.getDate('end');
}
},
methods: {
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 20;
}
month = month > 9 ? month : '0' + month;;
day = day > 9 ? day : '0' + day;
return `${year}`;
},
selDate() {
this.isDateShow = true;
},
... ... @@ -396,6 +423,10 @@ export default {
onLoad() {
this.getUpType();
this.getAllSub();
},
onShow() {
var date=new Date()
this.start=date.getFullYear()
}
};
</script>
... ... @@ -529,7 +560,7 @@ export default {
z-index: 999;
.styleCard {
width: 750rpx;
height: 228rpx;
// height: 228rpx;
background: rgba(255, 255, 255, 1);
// opacity:1;
border-radius: 20px 20px 0px 0px;
... ...
... ... @@ -24,7 +24,7 @@
<view class="title">入学年份</view>
<view class="select" @click="selDate">
<picker mode="date" :value="date" start="2000-01-01" @change="bindTimeChange">
<picker fields="year" mode ="date" :value="date" :start="startDate" :end="endDate" @change="bindTimeChange">
<view class="uni-input">{{isDateShow? date : '请选择入学年份'}}</view>
</picker>
<image class="icon" src="../../static/zhuandao_icon@2x.png"></image>
... ... @@ -39,9 +39,13 @@
<script>
import app from "../../App.vue";
export default {
data(){
const currentDate = this.getDate({
format: true
})
return{
level:'1',
nickname:'',
... ... @@ -50,17 +54,54 @@ export default {
school_id:'',
email:'',
isUpload:false,
date: '请选择入学年份',
date: currentDate,
isDateShow: false,
isNameShow:false,
chuanimg:''
chuanimg:'',
startdate:'',
endate:''
}
},
onLoad(options) {
console.log(options)
// this.school_id=options.school_id
},
onShow(){
var date=new Date();
console.log(date)
this.startdate=date.getFullYear();
this.date=date.getFullYear();
console.log(this.date,'我是年份')
this.endate=Number(this.startdate)+20
console.log(this.startdate,1234567890,this.endate);
},
computed: {
startDate() {
return this.getDate('start');
},
endDate() {
return this.getDate('end');
}
},
methods:{
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 20;
}
month = month > 9 ? month : '0' + month;;
day = day > 9 ? day : '0' + day;
return `${year}`;
},
selDate(){
this.isDateShow=true
},
... ... @@ -184,6 +225,8 @@ export default {
});
},
}
}
</script>
... ...
... ... @@ -30,7 +30,8 @@
session_key: '',
openid: '',
type:'',
istoken:''
istoken:'',
date:''
}
},
onLoad(options) {
... ... @@ -51,6 +52,10 @@
this.get_code();
},
onShow() {
var date=new Date()
this.start=date.getFullYear()
},
methods: {
// 用code 换token
code2Token(){
... ... @@ -94,7 +99,7 @@
}
}).catch((err)=>{
console.log(err)
uni.setStorageSync("chosetype",1)
// uni.setStorageSync("chosetype",1)
wx.switchTab({
url:'../school/school'
})
... ...
... ... @@ -46,7 +46,10 @@
</view>
<view class="articleBox">
<view class="title">{{item.title}}</view>
<view class="txt">{{item.des_content}}</view>
<view class="txt textcontent">
<rich-text :nodes="item.des_content"></rich-text>
<!-- {{item.des_content}} -->
</view>
<image :src="item" v-for="(item,index) in item.des_images" :key="index"></image>
<!-- <image src="../../static/bg_img@2x.png"></image> -->
</view>
... ... @@ -215,6 +218,12 @@ export default {
top: 0;
z-index: -1;
}
.textcontent{
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
// background: url('../../static/bg_img@2x.png') no-repeat;
// background-size: 750rpx 334rpx;
// height: 100vh;
... ...
... ... @@ -20,8 +20,9 @@
<view class="txt" style="color: #BDC4CE;">已收藏</view>
</view>
</view>
<view class="text">
{{articlelist.des_content==undefined?'':articlelist.des_content}}
<view class="text" v-if="articlelist.des_content!=undefined">
<rich-text :nodes="articlelist.des_content"></rich-text>
<!-- {{articlelist.des_content==undefined?'':articlelist.des_content}} -->
</view>
<view style="display:flex;">
<image :src="item" v-for="(item,index) in articlelist.des_images" :key="indexk" @click.stop="preimg(index)" style="margin-right:10rpx;margin-bottom:10rpx;width:128rpx;
... ...
... ... @@ -51,19 +51,22 @@
<view class="teacherfootname" :class="footersel==3?'selactive':''">我的主页</view>
</view>
</view> -->
<tabBar :current="currentTabIndex" backgroundColor="#fbfbfb" color="#999" tintColor="#42b983"></tabBar>
<tabBar backgroundColor="#fbfbfb" color="#999" tintColor="#42b983"></tabBar>
<!-- :current="currentTabIndex" -->
<!-- <tabBar v-else :current="currentTabIndex" :chosetypename="2" backgroundColor="#fbfbfb" color="#999" tintColor="#42b983"></tabBar> -->
</view>
</template>
<script>
import app from "../../App.vue";
import tabBar from '../../components/tabvue/tabvue.vue'
let chosetype=uni.getStorageSync("chosetype");
console.log(chosetype,'11111111')
export default {
components: {
tabBar,
},
data() {
return {
... ... @@ -75,7 +78,8 @@
isnulldata:false,
token:'',
isRegister: 0,
jumpshchool:true
jumpshchool:true,
chosetypenumber:chosetype
}
},
onLoad(options){
... ... @@ -93,6 +97,11 @@
uni.hideTabBar({
})
let chosetype=uni.getStorageSync("chosetype");
this.chosetypenumber=chosetype;
console.log('3489438438',this.chosetypenumber)
uni.$emit('update',{chosenum:chosetype,currentTabIndex:0})
this.page=1;
this.schoollist=[];
this.getlikeschool();
... ...
... ... @@ -14,15 +14,11 @@
</view>
<view class="msg" @click="tomsgpage" style="display:flex">
<view class="magboxitem">
<text v-if="university.des_content==''">暂无简介</text>
<view v-if="university.des_content==''" style="height:100rpx">暂无简介</view>
<rich-text :nodes="university.des_content" v-else></rich-text>
</view>
<text style="color:#81C3BF;width:520rpx" v-if="university.des_content!=''">[更多]</text>
<view style="color:#81C3BF;width:520rpx;heihgt:40rpx;display:flex;align-items: flex-end;" v-if="university.des_content!=''">[更多]</view>
</view>
</view>
... ... @@ -90,7 +86,11 @@
</view>
<view class="articleBox">
<view class="title">{{item.title}}</view>
<view class="txt">{{item.des_content}}</view>
<view class="txt textcontent">
<rich-text :nodes="item.des_content"></rich-text>
<!-- {{item.des_content}} -->
</view>
<image :src="item" v-for="(item,indexk) in item.des_images" :key="indexk" @click.stop="preimg(index,indexk)"></image>
</view>
</view>
... ... @@ -397,6 +397,13 @@ export default {
// top: 0;
// z-index: 999;
}
.textcontent{
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
.contentBox{
position: relative;
display: flex;
... ... @@ -472,6 +479,7 @@ export default {
color:#06121E;
font-size: 24rpx;
width: 500rpx;
justify-content: flex-end;
// height: 118rpx;sss
... ...
... ... @@ -41,7 +41,8 @@
<view class="title">{{item.title}}</view>
<view class="txt">
<view class="textblock">
{{item.des_content}}
<rich-text :nodes="item.des_content"></rich-text>
</view>
<!-- <text class="alltext" style="color:#2D5575;font-size:24rpx;font-weight:bold;" @click="toarticlemsg(item)" v-if="item.des_content.length>150">全部</text> -->
... ...
... ... @@ -4,15 +4,8 @@
<view class="top">
<view class="search">
<image class="icon" src="../../static/sousuo_icon@2x.png"></image>
<input
type="text"
placeholder="请输入搜索内容"
class="input"
placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;"
style="font-size:28rpx;"
v-model="word"
@confirm="getschoollistk"
/>
<input type="text" placeholder="请输入搜索内容" class="input" placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;"
style="font-size:28rpx;" v-model="word" @confirm="getschoollistk" />
</view>
<view class="searchBtn" @click="getschoollistk">搜索</view>
</view>
... ... @@ -21,17 +14,20 @@
<view class="diqu" :class="{ active: active2 }" @click="diquShow">地区</view>
<view class="paimingPopup" v-if="isPaimingShow">
<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" :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" :class="selpro==-1?'selactive':''" :data-index="-2">全部地区</view>
<view class="cont">
<view class="colum">
<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 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" :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 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>
... ... @@ -39,25 +35,28 @@
</view>
<view class="nodata" v-if="schoolList.length==0">暂无数据</view>
<view class="contentBox" v-else>
<!-- <scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltolower="lower" v-else> -->
<scroll-view class="contentBox" :scroll-top="scrollTop" scroll-y="true" @scrolltolower="lower" 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>
</view>
</view>
</scroll-view>
<!-- </scroll-view> -->
</view>
</template>
<script>
import app from '../../App.vue';
import app from '../../App.vue';
export default {
export default {
data() {
return {
selpro:-1,
selcity:-1,
levelindex:-1,
selpro: -1,
selcity: -1,
levelindex: -1,
isPaimingShow: false,
isDiquShow: false,
active1: false,
... ... @@ -71,7 +70,9 @@ export default {
schoolList: [],
word: '',
page: '1',
levelList: []
levelList: [],
scrollTop:0,
nomore:false
};
},
methods: {
... ... @@ -81,14 +82,14 @@ export default {
(this.active1 = true), (this.active2 = false);
},
paimingHide(e) {
let id=e.currentTarget.dataset.id;
let index=e.currentTarget.dataset.index;
this.levelindex=index;
this.city_id='';
this.level_id=id;
this.page=1;
this.schoolList=[];
let id = e.currentTarget.dataset.id;
let index = e.currentTarget.dataset.index;
this.levelindex = index;
this.city_id = '';
this.level_id = id;
this.page = 1;
this.schoolList = [];
this.getschoollist();
this.isPaimingShow = false;
(this.active1 = false), (this.active2 = false);
... ... @@ -133,44 +134,44 @@ export default {
//点击选中的省
selectprovince(e) {
this.province_id = e.currentTarget.dataset.id;
this.selpro=e.currentTarget.dataset.index;
this.selcity=-1;
this.selpro = e.currentTarget.dataset.index;
this.selcity = -1;
this.getAllCity();
},
//点击全部省
selectallprovince() {
this.selpro=-2;
this.selcity=-1;
this.city_id='';
this.city_id='';
this.level_id='';
this.page=1;
this.schoolList=[];
this.selpro = -2;
this.selcity = -1;
this.city_id = '';
this.city_id = '';
this.level_id = '';
this.page = 1;
this.schoolList = [];
this.getschoollist();
this.isDiquShow = false;
},
getschoollistk(){
this.page=1;
this.schoolList=[];
getschoollistk() {
this.page = 1;
this.schoolList = [];
this.getschoollist();
},
//点击选中全部市
selectallcity() {
this.level_id='';
this.page=1;
this.schoolList=[];
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.selcity = e.currentTarget.dataset.index;
this.level_id = '';
this.page = 1;
this.schoolList = [];
this.getschoollist();
this.isDiquShow = false;
},
... ... @@ -197,10 +198,19 @@ export default {
level_id: that.level_id,
city_id: that.city_id
};
app.post(url, params,'post')
app.post(url, params, 'post')
.then(res => {
console.log(res);
that.schoolList =that.schoolList.concat(res) ;
that.schoolList = that.schoolList.concat(res);
if(that.page>1){
if(res.length==0){
that.nomore=true
uni.showToast({
title:'没有更多了~',
icon:'none'
})
}
}
})
.catch(err => {});
},
... ... @@ -220,11 +230,11 @@ export default {
//点击全部排名
selectalllevel() {
this.isPaimingShow = false;
this.levelindex=-2;
this.level_id='';
this.province_id='';
this.page=1;
this.schoolList=[];
this.levelindex = -2;
this.level_id = '';
this.province_id = '';
this.page = 1;
this.schoolList = [];
this.getschoollist();
},
// 进入学校详情页
... ... @@ -233,6 +243,18 @@ export default {
uni.navigateTo({
url: './schoolDetails?id=' + id
});
},
// 触底事件
lower(){
if(this.nomore==false){
console.log(34389349889)
let newpage = this.page;
newpage++;
this.page = newpage;
this.getschoollist();
}
}
},
onLoad() {
... ... @@ -241,30 +263,46 @@ export default {
this.getAllLevel();
},
onReachBottom() {
let newpage=this.page;
newpage++;
this.page=newpage;
this.getschoollist();
// console.log(34348493989)
// let newpage = this.page;
// newpage++;
// this.page = newpage;
// this.getschoollist();
}
};
// onReachBottom: function() {
// }
};
</script>
<style lang="less">
page{
page {
height: 100%;
width: 100%;
}
.content {
}
.content {
background-color: rgba(249, 249, 249, 1);
height: 100%;
display: flex;
flex-direction: column;
.top {
padding: 18rpx 32rpx;
display: flex;
// display: flex;
background-color: #fff;
}
.conet_top{
position: fixed;
top:0;
left:0;
width:750rpx;
}
.search {
display: flex;
align-items: center;
... ... @@ -275,22 +313,26 @@ page{
border-radius: 40rpx;
padding: 0 28rpx;
box-sizing: border-box;
.icon {
width: 30rpx;
height: 30rpx;
}
.input {
height: 64rpx;
width: 500rpx;
text-align: center;
}
}
.searchBtn {
color: rgba(6, 18, 30, 1);
font-size: 28rpx;
line-height: 64rpx;
margin-left: 20rpx;
}
.type {
display: flex;
color: rgba(6, 18, 30, 1);
... ... @@ -298,10 +340,12 @@ page{
background-color: #fff;
padding: 24rpx 32rpx;
margin-top: 2rpx;
.paiming,
.diqu {
margin-right: 72rpx;
}
.paimingPopup,
.diquPopup {
width: 750rpx;
... ... @@ -315,19 +359,23 @@ page{
z-index: 999;
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.06);
border-top: 1rpx solid rgba(249, 249, 249, 1);
.item {
margin-bottom: 22rpx;
// height: 74rpx;
width: 170rpx;
}
.title {
margin-bottom: 20rpx;
}
.cont {
display: flex;
// flex-direction: column;
flex-wrap: wrap;
justify-content: start;
.colum {
overflow: auto;
height: 500rpx;
... ... @@ -335,15 +383,19 @@ page{
}
}
}
.active {
color: #05849d;
}
}
.contentBox {
padding: 24rpx 32rpx;
padding: 24rpx 32rpx 0;
box-sizing: border-box;
flex: 1;
// flex: 1;
overflow-y: scroll;
margin-top:276rpx;
.item {
width: 686rpx;
height: 160rpx;
... ... @@ -357,9 +409,11 @@ page{
padding: 0 40rpx;
box-sizing: border-box;
margin-bottom: 24rpx;
.title {
line-height: 160rpx;
}
.icon {
width: 120rpx;
height: 120rpx;
... ... @@ -368,5 +422,5 @@ page{
}
}
}
}
}
</style>
... ...
... ... @@ -85,8 +85,9 @@
<view class="text"><text @click="tobuy">购买畅读卡</text>可以额外找到888人</view>
</view> -->
<!-- <tab :current="currentTabIndex" @getData="tabClick"></tab> -->
<tabBar :current="currentTabIndex" backgroundColor="#fbfbfb" color="#999" tintColor="#42b983"></tabBar>
<!-- :chosetypename="chosetypenumber" -->
<!-- :current="currentTabIndex" -->
<tabBar backgroundColor="#fbfbfb" color="#999" tintColor="#42b983"></tabBar>
<!-- <view class="teacherfooter" v-if="type == 1">
<view class="teacherfootitem" @click="jumpschool==true?footerselChange(1,'/pages/school/school?type=1'):''" :data-id="1" :data-url="'/pages/school/school?type='+1">
... ... @@ -139,6 +140,7 @@
data() {
return {
selpro:-1,
chosetypenumber:chosetype,
selty:-1,
selstuent:-1,
major:-1,
... ... @@ -179,8 +181,10 @@
word: "",
vip_level:'',
jumpschool:true,
jumpschoolk:true
jumpschoolk:true,
}
},
methods: {
hidekk() {
... ... @@ -541,11 +545,13 @@
url: '../register/register?istoken=' + 1
})
} else {
var type = this.type
let chosetype=uni.getStorageSync("chosetype")
var id = e.currentTarget.dataset.id.user_id
console.log(e.currentTarget.dataset.id)
uni.navigateTo({
url: "../school/schoolmateMsg?user_id=" + id + "&type=" + type
url: "../school/schoolmateMsg?user_id=" + id + "&type=" + chosetype
})
}
... ... @@ -567,6 +573,12 @@
uni.hideTabBar({
})
let chosetype=uni.getStorageSync("chosetype");
this.chosetypenumber=chosetype;
console.log('12345678',this.chosetypenumber)
let num=chosetype==1?1:0;
uni.$emit('update',{chosenum:chosetype,currentTabIndex:num})
this.page = 1;
this.schoolmateList = []
... ...