作者 lihongjuan

1

<template>
<view class="content">
<image class="bg" src="../../static/bg_img@2x(2).png"></image>
<view class="card">
<image src="../../static/card_img@2x.png"></image>
</view>
<view class="cardText">
<swiper class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration" :indicator-color="indicatorColor" :indicator-active-color="indicatorActiveColor" @change="swiperChange" :circle="true" circular="true">
<view v-for="(item,index) in cardlist" :key="index">
<swiper-item>
<view class="title">{{item.name}}</view>
<view class="money">{{item.money}}/月</view>
<view class="time" v-if="item.vip_endtime">到期日期:{{item.vip_endtime}}</view>
<view class="btn" @click="buycard" :data-id="item.id">立即购买<image class="icon" src="../../static/dizhi_btn@2x2.png"></image></view>
<!-- <image class="big" src="../../static/juxing.png"></image>
<image class="small" src="../../static/tuoyuan.png"></image> -->
</swiper-item>
</view>
</swiper>
<view class="dots">
<block v-for="(item,index) in cardlist" :key="index">
<view class="dot" :class="index == currentSwiper ? 'active' : ''"></view>
</block>
<view class="content">
<view class="bg" style="position: relative;">
<image src="../../static/bg_img@2x(2).png"></image>
<view class="swiper_image" style="position: absolute;top:26rpx;left:58rpx">
<swiper :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration" class="swiper_item_img"
@change="swiperChange" :circular="true">
<block v-for="(item,index) in cardlist" :key="index">
<swiper-item style="position: relative;">
<image src="../../static/card_img@2x.png" class="slide-image" />
<view style="position: absolute;top:62rpx;left:40rpx;width:500rpx;height:284rpx">
<view class="title">{{item.name}}</view>
<view class="money">{{item.money}}/月</view>
<view style="display:flex;align-items:center;margin-top:70rpx;justify-content: space-between;width:556rpx">
<view class="time" v-if="item.vip_endtime">到期日期:{{item.vip_endtime}}</view>
<view class="time" v-else style="width:200rpx"></view>
<view class="btn" style="margin-left:20rpx" @click="buycard" :data-id="item.id">立即购买<image class="icon" src="../../static/dizhi_btn@2x2.png"></image>
</view>
</view>
</view>
</swiper-item>
</block>
</swiper>
<view class="dots">
<block v-for="(item,index) in cardlist" :key="index">
<view class="dot" :class="index == currentSwiper ? ' active' : ''"></view>
</block>
</view>
</view>
</view>
<!-- <view class="cardText">
<view style="position: relative;">
<swiper class="swiper" style="636rpx;height:360rpx;position: relative;" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration" :indicator-color="indicatorColor" :indicator-active-color="indicatorActiveColor" @change="swiperChange" :circle="true" circular="true">
<swiper-item style="636rpx;height:360rpx" v-for="(item,index) in cardlist" :key="index">
<image src="../../static/card_img@2x.png"></image>
<view style="position: absolute;top:62rpx;left:40rpx;width:500rpx;height:284rpx">
<view class="title">{{item.name}}</view>
<view class="money">{{item.money}}/月</view>
<view style="display:flex;align-items:center;margin-top:70rpx;justify-content: space-between;width:556rpx">
<view class="time" v-if="item.vip_endtime">到期日期:{{item.vip_endtime}}</view>
<view class="time" v-else style="width:200rpx"></view>
<view class="btn" style="margin-left:20rpx" @click="buycard" :data-id="item.id">立即购买<image class="icon" src="../../static/dizhi_btn@2x2.png"></image></view>
</view>
</view>
</swiper-item>
</swiper>
<view class="dots">
<block v-for="(item,index) in cardlist" :key="index">
<view class="dot" :class="index == currentSwiper ? 'active' : ''"></view>
</block>
</view>
</view>
</view>
<view class="textBox">
YHA青年旅舍会员卡(一年)是国际青年旅舍联盟会员身份证明,全球通用,也是旅行者入住青年旅舍的凭证。拥有会员卡,可以享受国内外国际青年旅舍住宿价格的优惠,同时部分海外青年旅舍只允许会员入住。
成为YHA青年旅舍会员的好处:
<view>1)入住青年旅舍享受房价上的优惠;</view>
<view>2)在世界各地享有食、住、行、游、购、娱等逾3,000项优惠,如:在全球多个国际机场和车船站,凭会员卡兑换外币可免收手续费;观光、租车、购物、参团、购买车船票等均可能有折扣,折扣率高达50%。单是在澳大利亚,优惠项目便接近800种;</view>
<view>3)以优惠价格参与多项由青年旅舍举办的各类文化、旅游等方面的交流活动;</view>
<view>4)优先参与青年旅舍组织的国际交流活动。</view>
-->
</view>
</view>
<view class="textBox">
YHA青年旅舍会员卡(一年)是国际青年旅舍联盟会员身份证明,全球通用,也是旅行者入住青年旅舍的凭证。拥有会员卡,可以享受国内外国际青年旅舍住宿价格的优惠,同时部分海外青年旅舍只允许会员入住。
成为YHA青年旅舍会员的好处:
<view>1)入住青年旅舍享受房价上的优惠;</view>
<view>2)在世界各地享有食、住、行、游、购、娱等逾3,000项优惠,如:在全球多个国际机场和车船站,凭会员卡兑换外币可免收手续费;观光、租车、购物、参团、购买车船票等均可能有折扣,折扣率高达50%。单是在澳大利亚,优惠项目便接近800种;</view>
<view>3)以优惠价格参与多项由青年旅舍举办的各类文化、旅游等方面的交流活动;</view>
<view>4)优先参与青年旅舍组织的国际交流活动。</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
name:'',
province_id:'',
city_id:'',
cardlist:[],
background: ['color1', 'color2', 'color3'],
indicatorDots: false,
autoplay: true,
interval: 3000,
duration: 500,
indicatorColor:'rgba(255,255,255,1)',
indicatorActiveColor:'#ffffff',
currentSwiper: 0,
imgUrls:[1,2],
vip_id:''
}
},
methods:{
getcardmsg(){
var that = this
var url = "vip/getVipConf"
var params = {
name:that.name,
province_id:that.name,
city_id:that.name
}
app.post(url,params,"post").then((res)=>{
console.log(res)
that.cardlist=res
}).catch((err)=>{
console.log(err)
})
},
swiperChange: function(e) {
this.currentSwiper= e.detail.current
},
buycard(e){
var that = this
let vip_id=e.currentTarget.dataset.id;
console.log(vip_id)
var url = "vip/buyVip"
var header = {
// token:uni.getStorageSync('token'),
}
var params = {
token:uni.getStorageSync('token'),
vip_id:vip_id
}
console.log(params)
app.post(url,params,"post").then((res)=>{
console.log(res)
that.payment(res)
}).catch((err)=>{
console.log(err)
})
},
payment(res) {
let that = this;
var timeStamp = res.timeStamp.toString();
// console.log(timeStamp);
wx.requestPayment({
timeStamp: timeStamp,
nonceStr: res.nonceStr,
package: res.package,
signType: res.signType,
paySign: res.paySign,
success: function(res) {
console.log(res)
that.getcardmsg()
// wx.navigateTo({
// url: '/pages/orderbox/orderbox?index=' + 0
// })
},
fail: function(res) {
console.log(123);
console.log(res);
}
})
},
},
onLoad(){
this.getcardmsg()
}
}
import app from "../../App.vue";
export default {
data() {
return {
name: '',
province_id: '',
city_id: '',
cardlist: [],
background: ['color1', 'color2', 'color3'],
indicatorColor: 'rgba(255,255,255,1)',
indicatorActiveColor: '#ffffff',
imgUrls: [1, 2],
vip_id: '',
indicatorDots: false,
autoplay: true,
interval: 3000,
duration: 2000,
currentSwiper: 0,
}
},
methods: {
getcardmsg() {
var that = this
var url = "vip/getVipConf"
var params = {
name: that.name,
province_id: that.name,
city_id: that.name
}
app.post(url, params, "post").then((res) => {
console.log(res)
that.cardlist = res
}).catch((err) => {
console.log(err)
})
},
swiperChange: function(e) {
this.currentSwiper = e.detail.current
},
buycard(e) {
var that = this
let vip_id = e.currentTarget.dataset.id;
console.log(vip_id)
var url = "vip/buyVip"
var header = {
// token:uni.getStorageSync('token'),
}
var params = {
token: uni.getStorageSync('token'),
vip_id: vip_id
}
console.log(params)
app.post(url, params, "post").then((res) => {
console.log(res)
that.payment(res)
}).catch((err) => {
console.log(err)
})
},
payment(res) {
let that = this;
var timeStamp = res.timeStamp.toString();
// console.log(timeStamp);
wx.requestPayment({
timeStamp: timeStamp,
nonceStr: res.nonceStr,
package: res.package,
signType: res.signType,
paySign: res.paySign,
success: function(res) {
console.log(res)
that.getcardmsg()
// wx.navigateTo({
// url: '/pages/orderbox/orderbox?index=' + 0
// })
},
fail: function(res) {
console.log(123);
console.log(res);
}
})
},
},
onLoad() {
this.getcardmsg()
}
}
</script>
<style lang="less">
.content{
.bg{
width: 750rpx;
height: 292rpx;
}
.card{
width: 636rpx;
height: 360rpx;
position: absolute;
top: 26rpx;
left: 50%;
transform: translate(-50%);
}
.cardText{
width: 636rpx;
height: 360rpx;
position: absolute;
top: 26rpx;
left: 50%;
transform: translate(-50%);
padding: 30rpx 40rpx;
box-sizing: border-box;
z-index: 777;
.title{
color:rgba(130,75,59,1);
font-size: 50rpx;
}
.money{
color:rgba(130,75,59,1);
font-size: 36rpx;
}
.time{
color:rgba(130,75,59,1);
font-size: 24rpx;
margin-top: 70rpx;
.content {
/* 轮播图 */
.swiper_image {
width: 636rpx;
height: 360rpx;
font-size: 0;
margin: 0 auto;
position: relative;
// border-radius: 20rpx;
}
swiper {
width: 636rpx;
height: 360rpx;
// border-radius: 20rpx;
}
.swiper_image image {
width: 100%;
height: 100%;
border-radius: 20rpx;
}
.swiper_item_img swiper-item {
width: 636rpx;
height: 360rpx;
// border-radius: 20rpx;
}
.swiper_item_img swiper-item image {
width: 100%;
height: 100%;
border-radius: 20rpx;
}
swiper-item {
position: relative;
}
swiper-item image {
border-radius: 20rpx;
}
.picimg {
width: 156rpx;
height: 76rpx;
position: absolute;
right: 36rpx;
bottom: 30rpx;
}
.dots {
height: 36rpx;
display: flex;
flex-direction: row;
position: absolute;
left:26rpx;
bottom:68rpx
}
.btn{
width:206rpx;
height:60rpx;
background:rgba(130,75,59,1);
opacity:1;
border-radius:42rpx;
color:rgba(255,255,255,1);
font-size:32rpx;
text-align: center;
line-height: 60rpx;
position: absolute;
right: 26rpx;
bottom: 52rpx;
.icon{
width: 15rpx;
height: 27rpx;
margin-left: 10rpx;
}
}
.dots{
// position: absolute;
bottom: 36rpx;
left: 50%;
transform: translate(-50%);
width: 50rpx;
height: 10rpx;
z-index: 999;
overflow: hidden;
margin:0 auto;
// display: flex;
// justify-content: space-between;
.dot{
width: 10rpx;
height: 10rpx;
background-color: #fff;
border-radius:12rpx;
float: left;
}
.active{
width: 30rpx;
height: 10rpx;
}
}
.big{
width: 24rpx;
height: 8rpx;
position: absolute;
bottom: 10rpx;
left: 298rpx;
}
.small{
width: 8rpx;
height: 8rpx;
position: absolute;
bottom: 10rpx;
left: 330rpx;
}
}
.textBox{
font-size: 24rpx;
width: 640rpx;
margin: 0 auto;
margin-top: 138rpx;
}
}
</style>
\ No newline at end of file
left: 50%;
transform: translateX(-50%);
bottom: 10rpx;
}
/*未选中时的小圆点样式 */
.dot {
width: 8rpx;
height: 8rpx;
border-radius: 50%;
margin-right: 16rpx;
background-color: #fff;
}
/*选中以后的小圆点样式 */
.active {
width: 24rpx;
height: 8rpx;
border-radius: 10rpx;
background-color: #fff;
}
.title {
color: rgba(130, 75, 59, 1);
font-size: 50rpx;
}
.money {
color: rgba(130, 75, 59, 1);
font-size: 36rpx;
}
.time {
color: rgba(130, 75, 59, 1);
font-size: 24rpx;
// margin-top: 70rpx;
// position: absolute;
// left:26rpx;
// bottom:68rpx
}
.btn {
width: 206rpx;
height: 60rpx;
background: rgba(130, 75, 59, 1);
opacity: 1;
border-radius: 42rpx;
color: rgba(255, 255, 255, 1);
font-size: 32rpx;
text-align: center;
line-height: 60rpx;
// margin-left:20rpx;
// position: absolute;
// right: 26rpx;
// bottom: 52rpx;
.icon {
width: 15rpx;
height: 27rpx;
margin-left: 10rpx;
}
}
.bg {
width: 750rpx;
height: 292rpx;
}
.card {
width: 636rpx;
height: 360rpx;
// position: absolute;
// top: 26rpx;
// left: 50%;
// transform: translate(-50%);
}
.cardText {
width: 636rpx;
height: 360rpx;
position: absolute;
top: 26rpx;
left: 50%;
transform: translate(-50%);
// padding: 30rpx 40rpx;
// box-sizing: border-box;
z-index: 777;
.title {
color: rgba(130, 75, 59, 1);
font-size: 50rpx;
}
.money {
color: rgba(130, 75, 59, 1);
font-size: 36rpx;
}
.time {
color: rgba(130, 75, 59, 1);
font-size: 24rpx;
// margin-top: 70rpx;
// position: absolute;
// left:26rpx;
// bottom:68rpx
}
.btn {
width: 206rpx;
height: 60rpx;
background: rgba(130, 75, 59, 1);
opacity: 1;
border-radius: 42rpx;
color: rgba(255, 255, 255, 1);
font-size: 32rpx;
text-align: center;
line-height: 60rpx;
// margin-left:20rpx;
// position: absolute;
// right: 26rpx;
// bottom: 52rpx;
.icon {
width: 15rpx;
height: 27rpx;
margin-left: 10rpx;
}
}
.dots {
position: absolute;
bottom: 36rpx;
left: 50%;
transform: translate(-50%);
width: 50rpx;
height: 10rpx;
z-index: 999;
// overflow: hidden;
// margin:0 auto;
// display: flex;
// justify-content: space-between;
.dot {
width: 10rpx;
height: 10rpx;
background-color: #fff;
border-radius: 12rpx;
float: left;
}
.active {
width: 30rpx;
height: 10rpx;
}
}
.big {
width: 24rpx;
height: 8rpx;
position: absolute;
bottom: 10rpx;
left: 298rpx;
}
.small {
width: 8rpx;
height: 8rpx;
position: absolute;
bottom: 10rpx;
left: 330rpx;
}
}
.textBox {
font-size: 24rpx;
width: 640rpx;
margin: 0 auto;
margin-top: 138rpx;
}
}
</style>
... ...
<template>
<view class="content">
<view class="title">
<view class="history" :class="{active:active1}" @click="historyShow">浏览历史</view>
<view class="cellect" :class="{active:active2}" @click="cellectShow">我的收藏</view>
</view>
<view class="historyBox" v-if="isHistoryShow">
<view class="liulan">
<view class="liulantitle">浏览历史</view>
<view class="del">清空</view>
<!-- <view class="del">完成</view> -->
</view>
<view class="mateitem" v-for="(item,index) in historylist" :key="index">
<view class="contentBox">
<image class="photo" :src="item.head_img"></image>
<view class="cont">
<view class="title">{{item.nickname}}</view>
<view class="fen">{{item.title}}</view>
<view class="txt">{{item.content}}</view>
</view>
<view class="right" :class="item.is_like_user==0?'like':''">
<view class="text" @click="attention(item,index)" v-if="item.is_like_user==0" style="display:flex;justify-content: center;align-items: center;color:#81C3BF;">
<view class='xin' style="width:28rpx;height:28rpx;font-size: 0;">
<image src="../../static/xin.png" mode=""></image>
</view>
关注
</view>
<view class="text" @click="noattention(item,index)" v-else>已关注</view>
</view>
</view>
</view>
<view class="nodata" v-if="historylist.length==0">暂无数据</view>
</view>
<!-- 我的收藏 -->
<view class="cellectBox" v-else>
<view class="liulan">
<view class="liulantitle">我的收藏</view>
<view class="del" @click="change2" v-if="isdel">完成</view>
<view class="del" @click="change" v-else>编辑</view>
</view>
<view class="mateitem" v-for="(item,index) in cellectlist" :key="index">
<image class="delBtn" src="../../static/shanchu_icon@2x.png" v-if="isdel"></image>
<view class="contentBox" :style="{width:width}">
<image class="photo" :src="item.head_img"></image>
<view class="cont">
<view class="title">{{item.nickname}}</view>
<view class="fen">{{item.title}}</view>
<view class="txt">{{item.content}}</view>
</view>
<view class="right" :class="item.is_like_user==0?'like':''">
<view class="text" @click="attention(item,index)" v-if="item.is_like_user==0" style="display:flex;justify-content: center;align-items: center;color:#81C3BF;">
<view class='xin' style="width:28rpx;height:28rpx;font-size: 0;">
<image src="../../static/xin.png" mode=""></image>
</view>
关注
</view>
<view class="text" @click="noattention(item,index)" v-else>已关注</view>
</view>
</view>
</view>
<view class="nodata" v-if="cellectlist.length==0">暂无数据</view>
</view>
</view>
<view class="content">
<view class="title">
<view class="history" :class="{active:active1}" @click="historyShow">浏览历史</view>
<view class="cellect" :class="{active:active2}" @click="cellectShow">我的收藏</view>
</view>
<view class="historyBox" v-if="isHistoryShow">
<view class="nodata" v-if="historylist.length==0">暂无数据</view>
<view v-else>
<view class="liulan">
<view class="liulantitle">浏览历史</view>
<view class="del" @click="delhistory">清空</view>
<!-- <view class="del">完成</view> -->
</view>
<view class="mateitem" v-for="(item,index) in historylist" :key="index" @click="toarticl" :data-id="item.id">
<view class="contentBox">
<image class="photo" style="border-radius: 50%;" :src="item.head_image"></image>
<view class="cont">
<view class="title">{{item.nickname}}</view>
<view class="fen">{{item.title}}</view>
<view class="txt">{{item.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;">
<view class='xin' style="width:28rpx;height:28rpx;font-size: 0;">
<image src="../../static/xin.png" mode=""></image>
</view>
关注
</view>
<view class="text" @click.stop="noattention(item,index)" v-else>已关注</view>
</view>
</view>
</view>
</view>
</view>
<!-- 我的收藏 -->
<view class="cellectBox" v-else>
<view class="nodata" v-if="cellectlist.length==0">暂无数据</view>
<view v-else>
<view class="liulan">
<view class="liulantitle">我的收藏</view>
<!-- <view class="del" @click="change2" v-if="isdel">完成</view>
<view class="del" @click="change" v-else>编辑</view> -->
</view>
<view class="mateitem" v-for="(item,index) in cellectlist" :key="index" @click="toarticl" :data-id="item.id">
<image class="delBtn" src="../../static/shanchu_icon@2x.png" v-if="isdel" @click.stop="delarcial(item,index)"></image>
<view class="contentBox" :style="{width:width}">
<image class="photo" :src="item.head_image" style="border-radius: 50%;"></image>
<view class="cont">
<view class="title">{{item.nickname}}</view>
<view class="fen">{{item.title}}</view>
<view class="txt">{{item.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;">
<view class='xin' style="width:28rpx;height:28rpx;font-size: 0;">
<image src="../../static/xin.png" mode=""></image>
</view>
关注
</view>
<view class="text" @click.stop="noattention(item,index)" v-else>已关注</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data(){
return{
active1:true,
active2:false,
isHistoryShow:true,
isdel:false,
width:"660rpx",
page:1,
size:10,
cellectlist:[],
historylist:[]
}
},
methods:{
// 关注和取消关注
attention(item, index) {
var that = this
var url = "article/likeArticle"
var token = uni.getStorageSync('token')
var params = {
article_id: item.id
import app from "../../App.vue";
export default {
data() {
return {
active1: true,
active2: false,
isHistoryShow: true,
isdel: false,
width: "660rpx",
historypage: 1,
collectpage: 1,
page: 1,
size: 10,
cellectlist: [],
historylist: []
}
app.post(url, params, "get").then((res) => {
uni.showToast({
title: "关注成功",
icon: 'none'
},
methods: {
toarticl(e) {
var id = e.currentTarget.dataset.id
uni.navigateTo({
url: '../school/article?article_id=' + id
})
if (that.active1 == true) {
that.historylist[index].is_like_user = 1
} else if (that.active2 == true) {
that.cellectlist[index].is_like_user = 1
},
//
delarcial(item, index) {
var that = this
uni.showModal({
title: '提示',
content: '是否删除该收藏',
success: function(res) {
if (res.confirm) {
var url = "article/delArticle"
var params = {
token: uni.getStorageSync('token'),
article_id: item.id
}
app.post(url, params, "post").then((res) => {
console.log(res)
that.cellectlist.splice(index, 1);
uni.showToast({
title: '删除成功',
icon: 'none'
})
}).catch((err) => {
console.log(err)
uni.showToast({
title:err.msg,
icon:'none'
})
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
// 关注和取消关注
attention(item, index) {
var that = this
var url = "article/likeArticle"
var token = uni.getStorageSync('token')
var params = {
article_id: item.id
}
}).catch((err) => {
console.log(err)
})
},
noattention(item, index) {
var that = this
var url = "article/likeArticle"
var token = uni.getStorageSync('token')
var params = {
article_id: item.id
}
app.post(url, params, "get").then((res) => {
uni.showToast({
title: "取消关注成功",
icon: 'none'
app.post(url, params, "get").then((res) => {
uni.showToast({
title: "关注成功",
icon: 'none'
})
if (that.active1 == true) {
that.historylist[index].is_like_user = 1
} else if (that.active2 == true) {
that.cellectlist[index].is_like_user = 1
}
}).catch((err) => {
console.log(err)
})
},
noattention(item, index) {
var that = this
var url = "article/likeArticle"
var token = uni.getStorageSync('token')
var params = {
article_id: item.id
}
app.post(url, params, "get").then((res) => {
uni.showToast({
title: "取消关注成功",
icon: 'none'
})
if (that.active1 == true) {
that.historylist[index].is_like_user = 0
} else if (that.active2 == true) {
that.cellectlist[index].is_like_user = 0
}
}).catch((err) => {
console.log(err)
})
if (that.active1 == true) {
that.historylist[index].is_like_user = 0
} else if (that.active2 == true) {
that.cellectlist[index].is_like_user = 0
},
historyShow() {
this.active1 = true;
this.active2 = false;
this.isHistoryShow = true;
this.historypage = 1;
this.historylist = [];
this.gethistory()
},
cellectShow() {
this.isHistoryShow = false;
this.active2 = true;
this.active1 = false;
this.collectpage = 1;
this.cellectlist = [];
this.getMyCellect()
},
change() {
this.isdel = true
this.width = "620rpx"
},
change2() {
this.isdel = false
this.width = "660rpx"
},
getMyCellect() {
var that = this
var url = "article/getMyLikeArticle"
var token = uni.getStorageSync('token')
var params = {
token: token,
page: that.collectpage,
size: that.size
}
}).catch((err) => {
console.log(err)
})
app.post(url, params, "get").then((res) => {
console.log(res)
that.cellectlist = that.cellectlist.concat(res)
}).catch((err) => {
console.log(err)
})
},
gethistory() {
var that = this
var url = "article/getLookArticleList"
var token = uni.getStorageSync('token')
var params = {
token: token,
page: that.historypage,
size: that.size
}
app.post(url, params, "get").then((res) => {
console.log(res)
that.historylist = that.historylist.concat(res)
}).catch((err) => {
console.log(err)
})
},
delhistory() {
var that = this;
uni.showModal({
title: '提示',
content: '是否清空浏览记录',
success: function(res) {
if (res.confirm) {
var url = "article/delLookArticle"
var token = uni.getStorageSync('token')
var params = {
token: token
}
app.post(url, params, "post").then((res) => {
that.historylist = res
console.log(res)
uni.showToast({
title: '浏览记录已清空',
icon:"none"
})
this.historypage=1;
this.historylist=[];
this.gethistory()
}).catch((err) => {
console.log(err)
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
},
historyShow(){
this.active1=true,
this.active2=false,
this.isHistoryShow=true
},
cellectShow(){
this.isHistoryShow=false,
this.active2=true,
this.active1=false
},
change(){
this.isdel=true
this.width="620rpx"
},
change2(){
this.isdel=false
this.width="660rpx"
},
getMyCellect(){
var that = this
var url = "article/getMyLikeArticle"
var token = uni.getStorageSync('token')
var params = {
token:token,
page:that.page,
size:that.size
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.cellectlist=res
}).catch((err)=>{
console.log(err)
})
},
gethistory(){
var that = this
var url = "article/getLookArticleList"
var token = uni.getStorageSync('token')
var params = {
token:token,
page:that.page,
size:that.size
}
app.post(url,params,"get").then((res)=>{
console.log(res)
that.historylist=res
}).catch((err)=>{
console.log(err)
})
}
},
onLoad(){
this.getMyCellect()
}
}
onLoad() {
this.gethistory()
},
onReachBottom() {
if (this.active1 == true) {
let newpage = this.historypage;
newpage++;
this.historypage = newpage
this.gethistory();
} else if (this.active2 == true) {
let newpage = this.collectpage;
this.collectpage = newpage;
newpage++;
this.getMyCellect();
}
}
}
</script>
<style lang="less">
.content{
// background-color: #F9F9F9;
.nodata{
font-size: 28rpx;
text-align: center;
}
.title{
background-color: #fff;
display: flex;
.history,.cellect{
width: 50%;
text-align: center;
font-size:28rpx;
padding: 24rpx 0;
}
.active{
background: url("../../static/xuanzhong_icon@2x.png") no-repeat;
background-size: 60rpx 12rpx;
background-position: 156rpx 70rpx;
color: rgba(5,132,157,1);
}
}
.liulan{
display: flex;
font-size:32rpx;
width: 686rpx;
margin: 0 auto;
justify-content: space-between;
padding: 30rpx 0;
.liulantitle{
color:rgba(45,85,117,1);
}
.del{
font-size:24rpx;
}
}
.mateitem{
display: flex;
align-items: center;
width:686rpx;
// height:172rpx;
background:rgba(255,255,255,1);
opacity:1;
border-radius:20rpx;
margin: 0 auto;
background-color: #fff;
padding: 24rpx 0;
// box-sizing: border-box;
margin-bottom: 24rpx;
.delBtn{
width: 28rpx;
height: 28rpx;
// position: absolute;
// top: 50%;
// transform: translateY(-50%);
// left: 28rpx;
margin-left: 26rpx;
}
.contentBox{
display: flex;
// align-items: center;
position: relative;
flex-wrap: wrap;
margin-left: 26rpx;
width: 660rpx;
.photo{
width: 68rpx;
height: 68rpx;
margin-right: 26rpx;
margin-top: 6rpx;
}
.cont{
.title{
color:rgba(61,68,77,1);
font-size: 24rpx;
}
.fen{
font-size: 24rpx;
color:rgba(140,145,152,1);
margin-top: 4rpx;
}
}
.right{
width:118rpx;
height:44rpx;
border:2rpx solid rgba(189,196,206,1);
opacity:1;
border-radius:40rpx;
position: absolute;
right: 26rpx;
top: 32rpx;
.text{
color:rgba(189,196,206,1);
text-align: center;
line-height: 44rpx;
font-size:24rpx;
}
}
.txt{
// width: 600rpx;
font-size:28rpx;
margin-top: 24rpx;
}
}
}
}
</style>
\ No newline at end of file
.content {
// background-color: #F9F9F9;
.nodata {
font-size: 28rpx;
text-align: center;
}
.title {
background-color: #fff;
display: flex;
.history,
.cellect {
width: 50%;
text-align: center;
font-size: 28rpx;
padding: 24rpx 0;
}
.active {
background: url("../../static/xuanzhong_icon@2x.png") no-repeat;
background-size: 60rpx 12rpx;
background-position: 156rpx 70rpx;
color: rgba(5, 132, 157, 1);
}
}
.liulan {
display: flex;
font-size: 32rpx;
width: 686rpx;
margin: 0 auto;
justify-content: space-between;
padding: 30rpx 0;
.liulantitle {
color: rgba(45, 85, 117, 1);
}
.del {
font-size: 24rpx;
}
}
.mateitem {
display: flex;
align-items: center;
width: 686rpx;
// height:172rpx;
background: rgba(255, 255, 255, 1);
opacity: 1;
border-radius: 20rpx;
margin: 0 auto;
background-color: #fff;
padding: 24rpx 0;
// box-sizing: border-box;
margin-bottom: 24rpx;
.delBtn {
width: 28rpx;
height: 28rpx;
// position: absolute;
// top: 50%;
// transform: translateY(-50%);
// left: 28rpx;
margin-left: 26rpx;
}
.contentBox {
display: flex;
// align-items: center;
position: relative;
flex-wrap: wrap;
margin-left: 26rpx;
width: 660rpx;
.photo {
width: 68rpx;
height: 68rpx;
margin-right: 26rpx;
margin-top: 6rpx;
}
.cont {
.title {
color: rgba(61, 68, 77, 1);
font-size: 24rpx;
}
.fen {
font-size: 24rpx;
color: rgba(140, 145, 152, 1);
margin-top: 4rpx;
}
}
.right {
width: 118rpx;
height: 44rpx;
border: 2rpx solid rgba(189, 196, 206, 1);
opacity: 1;
border-radius: 40rpx;
position: absolute;
right: 26rpx;
top: 32rpx;
.text {
color: rgba(189, 196, 206, 1);
text-align: center;
line-height: 44rpx;
font-size: 24rpx;
}
}
.txt {
// width: 600rpx;
font-size: 28rpx;
margin-top: 24rpx;
}
}
}
}
</style>
... ...
... ... @@ -5,84 +5,103 @@
<view class="history" :class="{active:active1}" @click="historyShow">浏览历史</view>
<view class="cellect" :class="{active:active2}" @click="cellectShow">我的收藏</view>
</view>
<view class="mineBox" v-if="isMineShow==true&&isHistoryShow==false">
<view class="minetop">
<view class="mineTitle">我的发布</view>
<view class="del" @click="edit" v-if="isedit==false">编辑</view>
<view class="del" @click="editok" v-if="isedit==true">完成</view>
<!-- <view class="del">完成</view> -->
</view>
<view class="item" v-for="(item,index) in articlelist" :key="index">
<image class="icon" src="../../static/shanchu_icon@2x.png" v-if="isedit" @click.stop="delarcial(item,index)"></image>
<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="mineBox" v-if="isMineShow==true&&isHistoryShow==false">
<view class="nodata" v-if="articlelist.length==0">暂无数据</view>
<view v-else>
<view class="minetop">
<view class="mineTitle">我的发布</view>
<view class="del" @click="edit" v-if="isedit==false">编辑</view>
<view class="del" @click="editok" v-if="isedit==true">完成</view>
<!-- <view class="del">完成</view> -->
</view>
<view class="item" v-for="(item,index) in articlelist" :key="index">
<image class="icon" src="../../static/shanchu_icon@2x.png" v-if="isedit" @click.stop="delarcial(item,index)"></image>
<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>
</view>
</view>
</view>
<view class="nodata" v-if="articlelist.length==0">暂无数据</view>
</view>
<view class="historyBox" v-if="isHistoryShow==true&&isMineShow==false">
<view class="liulan">
<view class="liulantitle">浏览历史</view>
<view class="del" @click="delhistory">清空</view>
<!-- <view class="del">完成</view> -->
</view>
<view class="mateitem" v-for="(item,index) in historylist" :key="index" @click="toarticl" :data-id="item.id">
<view class="contentBox">
<image class="photo" :src="item.head_image"></image>
<view class="cont">
<view class="title">{{item.nickname}}</view>
<view class="fen">{{item.title}}</view>
<view class="txt">{{item.des_content}}</view>
<view class="historyBox" v-if="isHistoryShow==true&&isMineShow==false">
<view class="nodata" v-if="historylist.length==0">暂无消息</view>
<view v-else>
<view class="liulan">
<view class="liulantitle">浏览历史</view>
<view class="del" @click="delhistory">清空</view>
<!-- <view class="del">完成</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;">
<view class='xin' style="width:28rpx;height:28rpx;font-size: 0;">
<image src="../../static/xin.png" mode=""></image>
<view class="mateitem" v-for="(item,index) in historylist" :key="index" @click="toarticl" :data-id="item.id">
<view class="contentBox">
<image class="photo" :src="item.head_image"></image>
<view class="cont">
<view class="title">{{item.nickname}}</view>
<view class="fen">{{item.title}}</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;">
<view class='xin' style="width:28rpx;height:28rpx;font-size: 0;">
<image src="../../static/xin.png" mode=""></image>
</view>
关注
</view>
<view class="text" @click="noattention(item,index)" v-else>已关注</view>
</view>
关注
</view>
<view class="text" @click="noattention(item,index)" v-else>已关注</view>
</view>
</view>
</view>
<view class="nodata" v-if="historylist.length==0">暂无消息</view>
</view>
<view class="cellcetBox" v-if="isHistoryShow==false&&isMineShow==false">
<view class="liulan">
<view class="liulantitle">我的收藏</view>
<view class="del" @click="change2" v-if="isdel">完成</view>
<view class="del" @click="change" v-else>编辑</view>
</view>
<view class="mateitem" v-for="(item,index) in cellectlist" :key="index" @click="toarticl" :data-id="item.id">
<image class="delBtn" src="../../static/shanchu_icon@2x.png" v-if="isdel" @click.stop="delarcial(item,index)"></image>
<view class="contentBox" :style="{width:width2}">
<image class="photo" :src="item.head_image"></image>
<view class="cont">
<view class="title">{{item.nickname}}</view>
<view class="fen">{{item.title}}</view>
<view class="txt">{{item.des_content}}</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;">
<view class='xin' style="width:28rpx;height:28rpx;font-size: 0;">
<image src="../../static/xin.png" mode=""></image>
<view class="nodata" v-if="cellectlist.length==0">暂无数据</view>
<view v-else>
<view class="cellcetBox" v-if="isHistoryShow==false&&isMineShow==false">
<view class="liulan">
<view class="liulantitle">我的收藏</view>
<!-- <view class="del" @click="change2" v-if="isdel">完成</view>
<view class="del" @click="change" v-else>编辑</view> -->
</view>
<view class="mateitem" v-for="(item,index) in cellectlist" :key="index" @click="toarticl" :data-id="item.id">
<image class="delBtn" src="../../static/shanchu_icon@2x.png" v-if="isdel" @click.stop="delarcial(item,index)"></image>
<view class="contentBox" :style="{width:width2}">
<image class="photo" :src="item.head_image"></image>
<view class="cont">
<view class="title">{{item.nickname}}</view>
<view class="fen">{{item.title}}</view>
<view class="txt">{{item.des_content}}</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;">
<view class='xin' style="width:28rpx;height:28rpx;font-size: 0;">
<image src="../../static/xin.png" mode=""></image>
</view>
关注
</view>
关注
<view class="text" @click="noattention(item,index)" v-else>已关注</view>
</view>
<view class="text" @click="noattention(item,index)" v-else>已关注</view>
</view>
</view>
</view>
<view class="nodata" v-if="cellectlist.length==0">暂无数据</view>
</view>
</view>
</template>
... ... @@ -232,7 +251,7 @@
}
app.post(url, params, "get").then((res) => {
console.log(res)
that.historylist = res
that.historylist = that.historylist.concat(res)
console.log(res)
}).catch((err) => {
console.log(err)
... ... @@ -241,31 +260,34 @@
delhistory() {
var that = this;
uni.showModal({
title: '提示',
content: '是否清空浏览记录',
success: function (res) {
if (res.confirm) {
var url = "article/delLookArticle"
var token = uni.getStorageSync('token')
var params = {
token: token
}
app.post(url, params, "post").then((res) => {
that.historylist = res
console.log(res)
uni.showToast({
title: '浏览记录已清空'
})
}).catch((err) => {
console.log(err)
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
title: '提示',
content: '是否清空浏览记录',
success: function(res) {
if (res.confirm) {
var url = "article/delLookArticle"
var token = uni.getStorageSync('token')
var params = {
token: token
}
app.post(url, params, "post").then((res) => {
that.historylist = res
console.log(res)
uni.showToast({
title: '浏览记录已清空'
})
}).catch((err) => {
console.log(err)
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
getMyCellect() {
var that = this
var url = "article/getMyLikeArticle"
... ... @@ -291,36 +313,36 @@
delarcial(item, index) {
var that = this
uni.showModal({
title: '提示',
content: '是否删除该发布',
success: function (res) {
if (res.confirm) {
var url = "article/delArticle"
var params = {
token: uni.getStorageSync('token'),
article_id: item.id
}
app.post(url, params, "post").then((res) => {
console.log(res)
console.log(that.active3)
if(that.active3==true){
that.articlelist.splice(index, 1)
}else if(that.active2==true){
that.cellectlist.splice(index, 1)
title: '提示',
content: '是否删除该发布',
success: function(res) {
if (res.confirm) {
var url = "article/delArticle"
var params = {
token: uni.getStorageSync('token'),
article_id: item.id
}
uni.showToast({
title: '删除成功',
icon: 'none'
})
}).catch((err) => {
console.log(err)
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
app.post(url, params, "post").then((res) => {
console.log(res)
console.log(that.active3)
if (that.active3 == true) {
that.articlelist.splice(index, 1)
} else if (that.active2 == true) {
that.cellectlist.splice(index, 1)
}
uni.showToast({
title: '删除成功',
icon: 'none'
})
}).catch((err) => {
console.log(err)
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
},
onLoad() {
... ... @@ -491,6 +513,7 @@
}
.cont {
width:500rpx;
.title {
color: rgba(61, 68, 77, 1);
font-size: 24rpx;
... ... @@ -506,7 +529,7 @@
.right {
width: 118rpx;
height: 44rpx;
border: 2rpx solid rgba(189, 196, 206, 1);
border: 2rpx solid #81C3BF;
opacity: 1;
border-radius: 40rpx;
position: absolute;
... ... @@ -529,6 +552,11 @@
// width: 600rpx;
font-size: 28rpx;
margin-top: 24rpx;
height:auto;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
}
... ...
<template>
<view class="content">
<image class="bg" src="../../static/bg_img2.png"></image>
<image class="bg" src="../../static/bg_img2.png"></image>
<image class="photo" :src="token=='' ? '../../static/touxiang_img@2x.png' : userinfolist.head_image"></image>
<view class="title">{{userinfolist.nickname}}</view>
<view class="bannerBox" @click="toPubArticle">
... ... @@ -34,13 +34,13 @@
</view>
<!-- <tab></tab> -->
<view class="collegefooter" v-if="type == 2">
<view class="teacherfootitem" @click="footerselChange" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+2">
<view class="teacherfootitem" @click="footerselChange" :data-id="2" data-jump="1" :data-url="'/pages/schoolmate/schoolmate?type='+2">
<view class="teacherfootitemtop">
<image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view>
</view>
<view class="teacherfootitem" @click="footerselChange" :data-id="3" :data-url="'/pages/homePage/homePage?type='+2">
<view class="teacherfootitem" @click="footerselChange" :data-id="3" >
<view class="teacherfootitemtop">
<image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image>
</view>
... ... @@ -88,9 +88,10 @@ methods:{
// 底部导航跳转
footerselChange(e){
let url=e.currentTarget.dataset.url;
console.log(url)
uni.redirectTo({
uni.reLaunch({
url:url
})
},
... ...
... ... @@ -136,8 +136,8 @@ methods:{
that.image = tempFilePaths[0];
app.upload('image',res.tempFilePaths[0],"post").then((res)=>{
// let newimage=that.image
that.image=app.globalData.imageBaseUrl+res.url
that.image2=res.url
that.image=app.globalData.imageBaseUrl+res.kurl
that.image2=res.kurl
console.log(res)
console.log(that.image)
console.log(res.url)
... ...
... ... @@ -89,8 +89,8 @@ export default {
console.log(res)
var date=new Date();
var year=date.getFullYear();
var month=date.getMonth()+1;
var day=date.getDate();
var month=date.getMonth()+1<10?'0'+(date.getMonth()+1):date.getMonth()+1;
var day=date.getDate()<10?'0'+(date.getDate()):date.getDate();
var datek=year+'-'+month+'-'+day
let obj={}
if(that.user_id==that.usera_id){
... ...
... ... @@ -84,9 +84,10 @@
that.image = tempFilePaths[0];
that.image2 = tempFilePaths[0];
app.upload('image', res.tempFilePaths[0], "post").then((res) => {
console.log(res)
// let newimage=that.image
that.image = app.globalData.imageBaseUrl + res.url
that.image2 = res.url
that.image = app.globalData.imageBaseUrl+kurl
that.image2 = res.kurl
console.log(res)
console.log(that.image)
console.log(res.url)
... ... @@ -109,7 +110,7 @@
var date = new Date(timestamp * 1000);//时间戳为10位需*1000,
var Y = date.getFullYear();
var M = date.getMonth() + 1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1
var D = date.getDate();
var D = date.getDate()<10?'0'+(date.getDate()):date.getDate();
var h = date.getHours() + ':';
var m = date.getMinutes() + ':';
var s = date.getSeconds();
... ...
... ... @@ -3,7 +3,15 @@
<image class="bg" src="../../static/bg_img2.png"></image>
<image class="photo" :src="token=='' ? '../../static/touxiang_img@2x.png' :head_image" style="border-radius:50%;"></image>
<view class="title">{{userinfolist.nickname}}</view>
<image class="banner" src="../../static/banner_img@2x.png" @click="toBuyCard"></image>
<view class="cardchang">
<image class="banner" src="../../static/banner_img@2x.png" @click="toBuyCard"></image>
<view class="cardread">
<view class="buynow">立即购买畅读卡</view>
<view class="readmany">畅读更多优秀文章</view>
</view>
</view>
<view class="item" @click="togeren">
<view class="name">
<image class="icon" src="../../static/8_icon@2x.png"></image>个人信息
... ... @@ -13,7 +21,7 @@
<view class="item" @click="tocellect">
<view class="name">
<image class="icon" src="../../static/7_icon@2x.png"></image>我的文章
<image class="icon" src="../../static/7_icon@2x.png"></image>收藏文章
</view>
<image class="right" src="../../static/dizhi_btn@2x.png"></image>
</view>
... ... @@ -40,21 +48,21 @@
</view>
<!-- <tab></tab> -->
<!-- <tab :current="currentTabIndex" @getData="tabClick"></tab> -->
<view class="teacherfooter">
<view class="teacherfooter" v-if="type==1">
<view class="teacherfootitem" v-if="type==1">
<view class="teacherfootitemtop" @click="footerselChange" :data-id="1" :data-url="'/pages/school/school?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">
<view class="teacherfootitemtop" >
<image :src="footersel==1?'/static/xuexiao_icon@2x.png':'/static/xuexiao_icon@2x3.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==1?'selactive':''">学校</view>
</view>
<view class="teacherfootitem" @click="footerselChange" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+1">
<view class="teacherfootitem" @click="jumpschool==true?footerselChange(2,'/pages/schoolmate/schoolmate?type=1'):''" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+1">
<view class="teacherfootitemtop">
<image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view>
</view>
<view class="teacherfootitem" @click="footerselChange" :data-id="3" :data-url="'/pages/homePage/homePage?type='+1">
<view class="teacherfootitem" :data-id="3" :data-url="'/pages/homePage/homePage?type='+1">
<view class="teacherfootitemtop">
<image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image>
</view>
... ... @@ -62,13 +70,13 @@
</view>
</view>
<view class="collegefooter" v-if="type == 2">
<view class="teacherfootitem" @click="footerselChange" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+2">
<view class="teacherfootitem" @click="jumpschoolk==true?footerselChangek(2,'/pages/schoolmate/schoolmate?type=2'):''" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+2">
<view class="teacherfootitemtop">
<image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view>
</view>
<view class="teacherfootitem" @click="footerselChange" :data-id="3" :data-url="'/pages/homePage/collegeHome?type='+2">
<view class="teacherfootitem" :data-id="3" :data-url="'/pages/homePage/collegeHome?type='+2">
<view class="teacherfootitemtop">
<image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image>
</view>
... ... @@ -91,7 +99,9 @@
type:"",
userinfolist:{},
token:'',
head_image:''
head_image:'',
jumpschool:true,
jumpschoolk:true
}
},
methods: {
... ... @@ -107,13 +117,21 @@
}
},
// 底部导航跳转
footerselChange(e){
let url=e.currentTarget.dataset.url;
footerselChange(id,url){
// let url=e.currentTarget.dataset.url;
console.log(url)
uni.redirectTo({
url:url
})
this.jumpschool=false
},
footerselChangek(id,url){
uni.redirectTo({
url:url
})
this.jumpschoolk=false
},
getuserinfo(){
var that = this
... ... @@ -234,6 +252,7 @@
<style lang="less">
.content {
text-align: center;
color: rgba(6, 18, 30, 1);
... ... @@ -262,6 +281,25 @@
height: 216rpx;
margin-bottom: 30rpx;
}
.cardchang{
position: relative;
}
.buynow{
color:#fff;
font-size: 28rpx;
text-align: left;
}
.readmany{
color:#fff;
font-size: 36rpx;
text-align: left;
font-weight: bold;
}
.cardread{
position: absolute;
top:111rpx;
left:72rpx;
}
.item {
display: flex;
... ...
... ... @@ -9,9 +9,15 @@
<view class="time">{{item.createtime}}</view>
</view>
</view>
<view v-if="item.usera_id==user_id">
<view class="right" style="color:#BDC4CE">已读</view>
</view>
<view v-else>
<view class="right" v-if="item.readtime==null">未读</view>
<view class="right" style="color:#BDC4CE" v-else>已读</view>
</view>
<view class="right" v-if="item.readtime==null">未读</view>
<view class="right" style="color:#BDC4CE" v-else>已读</view>
</view>
<view class="bottomrow">
{{item.des_content}}
... ...
... ... @@ -94,7 +94,8 @@ export default {
console.log(e.target)
this.type = e.target.value
console.log(e.currentTarget)
this.article_type_id=e.currentTarget.dataset.id
this.article_type_id=this.typearray[e.target.value].id;
console.log(this.article_type_id,999999)
},
upload(){
var that = this;
... ... @@ -184,7 +185,7 @@ export default {
app.post(url,params,"post").then((res)=>{
console.log(res)
uni.showToast({
title:"文章已发布,审核中",
title:"发布成功",
icon:"none"
})
setTimeout(() => {
... ...
... ... @@ -4,8 +4,8 @@
<view class="card">
<view class="title">提现到微信余额(元)</view>
<!-- <view class="money">100.00</view> -->
<input type="text" v-model="money" class="money" placeholder="100.00" placeholder-style="padding-bottom: 10rpx;color:rgba(189,196,206,1);font-size: 80rpx;margin-top: 16rpx;border-bottom: 1rpx solid rgba(112,112,112,1);">
<view class="text">最多可提{{yue}}元,<text>全部提现</text></view>
<input type="digit" v-model="money" class="money" placeholder-style="padding-bottom: 10rpx;color:rgba(189,196,206,1);font-size: 80rpx;margin-top: 16rpx;border-bottom: 1rpx solid rgba(112,112,112,1);">
<view class="text">最多可提{{yue}}元,<text @click="tixianall">全部提现</text></view>
<view class="btn" @click="tixian">提现</view>
</view>
<view class="textBox">
... ... @@ -32,39 +32,107 @@ export default {
methods:{
tixian(){
var that = this
if(that.money==''){
uni.showToast({
title:"提现金额不能为空",
icon:"none"
})
return false
}
if(that.money>that.yue){
uni.showToast({
title:"提现金额不足",
icon:"none"
})
return false
}
var url = "money/gotMoney"
var token = uni.getStorageSync('token')
var params = {
token:token,
money:that.money
}
app.post(url,params,"post").then((res)=>{
console.log(res)
}).catch((err)=>{
console.log(err);
if(that.money==0){
uni.showToast({
title:err.msg,
title:'提现金额不能为0',
icon:'none'
})
})
}
}else{
if(that.money==''){
uni.showToast({
title:"提现金额不能为空",
icon:"none"
})
return false
}
if(that.money>that.yue){
uni.showToast({
title:"提现金额不足",
icon:"none"
})
return false
}
var url = "money/gotMoney"
var token = uni.getStorageSync('token')
var params = {
token:token,
money:that.money
}
app.post(url,params,"post").then((res)=>{
console.log(res)
uni.showToast({
title:'提现成功',
icon:'none'
})
setTimeout(function(){
uni.navigateBack({
checked:true
})
},1500)
}).catch((err)=>{
console.log(err);
uni.showToast({
title:err.msg,
icon:'none',
duration:2500
})
})
}
},
// 全部提现
tixianall(){
let that=this;
if(that.yue==0.00){
uni.showToast({
title:"余额为0,不能提现",
icon:"none"
})
}else{
uni.showModal({
title: '提示',
content: '是否要全部提现',
success: function (res) {
if (res.confirm) {
that.money=that.yue
var url = "money/gotMoney"
var token = uni.getStorageSync('token')
var params = {
token:token,
money:that.yue
}
app.post(url,params,"post").then((res)=>{
console.log(res)
uni.showToast({
title:'提现成功',
icon:'none'
})
setTimeout(function(){
uni.navigateBack({
checked:true
})
},1500)
}).catch((err)=>{
console.log(err);
uni.showToast({
title:err.msg,
icon:'none'
})
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
}
},
onLoad(options){
this.yue=options.money
this.yue=options.money;
this.money=options.money
}
}
... ...
... ... @@ -44,11 +44,32 @@
url:'../school/school'
})
}
this.get_code()
this.get_code();
},
methods: {
// 用code 换token
code2Token(){
let that = this;
uni.login({
success(res) {
let url = 'common/codeToToken'
app.post(url,{
code: res.code
}).then(r=>{
console.log('code换取token',r)
uni.setStorageSync("token",r.userInfo.token)
// uni.setStorageSync('token',r.userInfo.token);
// uni.setStorageSync('isRegister',r.userInfo.is_register);
// that.isRegister = r.userInfo.is_register;
})
}
})
},
// 获取个人信息
getusermsg(){
console.log('3743473734737487834')
var url = "student/getMyInfo"
var params={
... ... @@ -66,6 +87,7 @@
}
}).catch((err)=>{
console.log(err)
uni.clearStorageSync()
wx.redirectTo({
url:'../school/school'
})
... ...
... ... @@ -7,6 +7,7 @@
</view>
<view class="searchBtn">搜索</view>
</view> -->
<view class="nodata" v-if="collegeList.length==0">暂无数据</view>
<view class="contentBox">
<view class="item" @click="tocollegepage(item)" v-for="(item,index) in collegeList" :key="index">{{item.name}}</view>
... ... @@ -42,7 +43,7 @@ methods:{
let id = item.university_id
let name = item.name
uni.navigateTo({
url:'./academyDetails?university_id='+id+'&name='+name
url:'./academyDetails?university_id='+id+'&name='+name+'&college_id='+item.id
})
}
},
... ...
<template>
<view class="content">
<image class="background" :src="university.des_image=='http://school.t.brotop.cn'?'../../static/bg_img@2x.png':university.des_image"></image>
<image class="background" :src="university.data.des_image==''?'../../static/bg_img@2x.png':university.des_image"></image>
<view class="titleBox">
<view class="title">{{university.name}}</view>
<view class="eng">{{name}}</view>
</view>
<view class="table">
<navigator class="colum" hover-class="none" url="./highSchoolmate">
<view class="num">{{university.same_school_total_num}}</view>
<view class="colum" @click="highschoollist">
<view class="num">{{university.total1}}</view>
<view class="title">高中校友</view>
</navigator>
<view class="colum" @click="popupShow">
<view class="num">{{university.same_city_total_num}}</view>
</view>
<view class="colum" @click="popupShow" data-type="1">
<view class="num">{{university.total3}}</view>
<view class="title">同城学长</view>
</view>
<view class="colum" @click="popupShow">
<view class="num">{{university.same_province_total_num}}</view>
<view class="colum" @click="popupShow" data-type=2>
<view class="num">{{university.total2}}</view>
<view class="title">同省学长</view>
</view>
</view>
... ... @@ -36,8 +36,8 @@
</view>
<view class="nodata" v-if="articleList.length==0">暂无数据</view>
<view class="articl" v-else>
<block v-for="(item,index) in articleList" :key="index">
<view class="articltitle">
<view v-for="(item,index) in articleList" :key="index" style="border-bottom:1rpx solid #eee">
<view class="articltitle" >
<image class="photo" :src="item.head_image"></image>
<view class="msg">
<view class="name">{{item.nickname}}</view>
... ... @@ -50,7 +50,7 @@
<image :src="item" v-for="(item,index) in item.des_images" :key="index"></image>
<!-- <image src="../../static/bg_img@2x.png"></image> -->
</view>
</block>
</view>
</view>
... ... @@ -88,28 +88,71 @@ export default {
size:'10',
type_id:'',
sel:0,
isPopupShow:false
isPopupShow:false,
vip_level:'',
college_id:''
}
},
onLoad(options){
console.log(348348934,options)
this.university_id=options.university_id
this.name=options.name
this.name=options.name;
this.college_id=options.college_id
this.getschooldetails()
this.getarticletype()
this.getAllArticle()
this.getpersoninfo()
},
methods:{
popupShow(){
this.isPopupShow=true
// 获取个人信息
getpersoninfo(){
let that = this;
var url='student/getMyInfo';
var params={
}
app.post(url,params,"get").then((res)=>{
console.log(res)
this.vip_level=res.vip_level
}).catch((err)=>{
console.log(err)
})
},
highschoollist(){
uni.navigateTo({
url:'./highSchoolmate?schooltype='+1+'&university_id='+this.university_id+'&college_id='+this.college_id
})
},
popupShow(e){
let type=e.currentTarget.dataset.type;
if(type==1){
if(this.vip_level==1||this.vip_level==2){
uni.navigateTo({
url:"./highSchoolmate?schooltype="+2+'&university_id='+this.university_id+'&college_id='+this.college_id
})
}else{
this.isPopupShow=true
}
}else if(type==2){
if(this.vip_level==2){
uni.navigateTo({
url:"./highSchoolmate?schooltype="+3+'&university_id='+this.university_id+'&college_id='+this.college_id
})
}else{
this.isPopupShow=true
}
}
},
getschooldetails(){
var token = uni.getStorageSync('token')
let that = this;
var url='university/getUniversityInfo'
var url='university/getCollegeDetail'
var params={
university_id:that.university_id,
college_id:that.college_id,
token:token
}
app.post(url,params,"get").then((res)=>{
... ... @@ -137,6 +180,7 @@ export default {
var url="article/getArticleList"
var params = {
university_id:that.university_id,
college_id:that.college_id,
page:that.page,
size:that.size,
type_id:that.type_id,
... ... @@ -289,8 +333,10 @@ export default {
box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1);
border-radius:20rpx;
margin-bottom: 42rpx;
padding-bottom: 32rpx;
box-sizing: border-box;
.articltitle{
border-bottom: 1rpx solid rgba(238,238,238,1);
// border-bottom: 1rpx solid rgba(238,238,238,1);
padding: 40rpx 0 26rpx 0;
display: flex;
font-size: 24rpx;
... ...
... ... @@ -55,6 +55,15 @@ export default {
that.articlelist=res
}).catch((err)=>{
console.log(err)
uni.showToast({
title:'文章已删除',
icon:"none"
})
setTimeout(function(){
uni.navigateBack({
checked:true
})
},1500)
})
},
preimg(index){
... ...
<template>
<view class="content">
<view class="nodata" v-if="hightmatelist.length==0">暂无数据</view>
<view v-else>
<view class="item" v-for="(item,index) in hightmatelist" :key="index" @click="toacademypage(item)">
<image class="photo" :src="item.head_image" style="border-radius:50%"></image>
<view class="cont">
<view class="title">{{item.nickname}}</view>
<view class="academy">
<image class="icon" src="../../static/xuexiao_icon@2x2.png"></image>{{item.university_name}} {{item.college_name}} {{item.graduated_name}}
</view>
<view class="fen">{{item.up_name}}</view>
</view>
<!-- <view class="right">
<image src="../../static/yiguanzhu_img@2x.png"></image>
<view class="text">已关注</view>
</view> -->
<view class="right" v-if="item.is_like==1" @click="notlike(item)">
<image src="../../static/yiguanzhu_img@2x.png"></image>
<view class="text">已关注</view>
</view>
<view class="right" @click="like(item)" v-else style="width:132rpx;height:54rpx;background:rgba(129,195,191,1);border-radius:32rpx 0rpx 0rpx 32rpx;">
<!-- <image src="../../static/yiguanzhu_img@2x.png"></image> -->
<view class="text"> <image class="icon" src="../../static/guanzhu_icon@2x.png"></image>关注</view>
</view>
</view>
</view>
<view class="item" v-for="(item,index) in hightmatelist" :key="index" @click="toacademypage(item)">
<image class="photo" :src="item.head_image"></image>
<view class="cont">
<view class="title">{{item.nickname}}</view>
<view class="academy">
<image class="icon" src="../../static/xuexiao_icon@2x2.png"></image>{{item.university_name}} {{item.college_name}} {{item.graduated_name}}
</view>
<view class="fen">{{item.up_name}}</view>
</view>
<!-- <view class="right">
<image src="../../static/yiguanzhu_img@2x.png"></image>
<view class="text">已关注</view>
</view> -->
<view class="right" v-if="item.is_like==1" @click="notlike(item)">
<image src="../../static/yiguanzhu_img@2x.png"></image>
<view class="text">已关注</view>
</view>
<view class="right" @click="like(item)" v-else style="width:132rpx;height:54rpx;background:rgba(129,195,191,1);border-radius:32rpx 0rpx 0rpx 32rpx;">
<!-- <image src="../../static/yiguanzhu_img@2x.png"></image> -->
<view class="text"> <image class="icon" src="../../static/guanzhu_icon@2x.png"></image>关注</view>
</view>
</view>
</view>
</template>
... ... @@ -38,12 +44,18 @@ export default {
up_id:"",
hightmatelist:[],
type:'',
schooltype:''
schooltype:'',
college_id:''
}
},
onLoad(options){
this.schooltype=options.schooltype
this.gethightmate()
console.log('32348394893',options)
this.schooltype=options.schooltype;
this.university_id=options.university_id;
if(options.college_id){
this.college_id=options.college_id;
}
this.gethightmate();
},
methods:{
gethightmate(){
... ... @@ -57,6 +69,7 @@ export default {
size:that.size,
university_id:that.university_id,
graduated_id:that.graduated_id,
college_id:that.college_id,
up_id:that.up_id
}
app.post(url,params,"get").then((res)=>{
... ...
... ... @@ -33,18 +33,18 @@
<!-- <tab :current="currentTabIndex" @getData="tabClick"></tab> -->
<view class="teacherfooter">
<view class="teacherfootitem">
<view class="teacherfootitemtop" @click="footerselChange" :data-id="1" :data-url="'/pages/school/school?type='+1">
<view class="teacherfootitemtop" @click="footerselChange" :data-id="1" >
<image :src="footersel==1?'/static/xuexiao_icon@2x.png':'/static/xuexiao_icon@2x3.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==1?'selactive':''">学校</view>
</view>
<view class="teacherfootitem" @click="footerselChange" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+1">
<view class="teacherfootitem" @click="jumpshchool==true?footerselChange(2,'/pages/schoolmate/schoolmate?type=1'):''" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+1">
<view class="teacherfootitemtop">
<image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view>
</view>
<view class="teacherfootitem" @click="footerselChange" :data-id="3" :data-url="'/pages/homePage/homePage?type='+1">
<view class="teacherfootitem" @click="jumpshchool==true?footerselChange(3,'/pages/homePage/homePage?type=1'):''" :data-id="3" :data-url="'/pages/homePage/homePage?type='+1">
<view class="teacherfootitemtop">
<image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image>
</view>
... ... @@ -71,6 +71,7 @@
isnulldata:false,
token:'',
isRegister: 0,
jumpshchool:true
}
},
onLoad(options){
... ... @@ -85,16 +86,19 @@
onShow() {
this.page=1;
this.schoollist=[];
this.getlikeschool()
this.getlikeschool();
this.jumpshchool=true
},
methods: {
// 底部导航跳转
footerselChange(e) {
let url = e.currentTarget.dataset.url;
console.log(url)
footerselChange(id,url) {
console.log(34783478)
// let url = e.currentTarget.dataset.url;
// console.log(url)
uni.redirectTo({
url: url
})
this.jumpshchool=false
},
code2Token(){
let that = this;
... ...
... ... @@ -24,19 +24,19 @@
</view>
<view class="schoolMsg">
<view class="row">
<view class="row" @click="copaywang">
<image src="../../static/guanwang_icon@2x.png" class="icon"></image>
<view class="websit">官方网站:<text class="lianjie">{{university.url}}</text></view>
</view>
<view class="row">
<view class="row" @click="copyzhong">
<image src="../../static/gongzhonghao_icon@2x.png" class="icon"></image>
<view class="websit">本科生招生公众号:<text class="lianjie">{{university.wechat}}</text></view>
</view>
<view class="table">
<navigator class="colum" hover-class="none" url="./highSchoolmate?schooltype=1">
<view class="colum" hover-class="none" @click="highschoollist">
<view class="num">{{university.same_school_total_num}}</view>
<view class="title">高中校友</view>
</navigator>
</view>
<view class="colum" @click="popupShow" data-type="1">
<view class="num">{{university.same_city_total_num}}</view>
<view class="title">同城学长</view>
... ... @@ -55,9 +55,10 @@
<image class="right" src="../../static/dizhi_btn@2x.png"></image>
</view>
</view>
<view class="card">
<view class="nodata" v-if="collegeList.length==0" style="margin:27rpx auto 32rpx">暂无数据</view>
<view class="card" v-else>
<view class="item" style="width: 188rpx;" v-for="(item,index) in collegeList" :key="index" @click="tocollegepage(item)"><view class="bor">{{item.name}}</view></view>
<view class="item" style="width: 188rpx;" v-for="(item,index) in collegeList" :key="index" @click="tocollegepage(item)"><view class="bor">{{item.name}}</view></view>
</view>
... ... @@ -76,7 +77,7 @@
<view class="articl" v-else>
<view v-for="(item,index) in articleList" :key="index" @click="toarticlemsg(item)">
<view class="listitem" v-for="(item,index) in articleList" :key="index" @click="toarticlemsg(item)" style="border-bottom:1rpx solid #eee">
<view class="articltitle">
<image class="photo" :src="item.head_image" style="border-radius: 50%;"></image>
<view class="msg">
... ... @@ -87,7 +88,7 @@
<view class="articleBox">
<view class="title">{{item.title}}</view>
<view class="txt">{{item.des_content}}</view>
<image :src="item" v-for="(item,indexk) in item.des_images" :kry="index" @click.stop="preimg(index,indexk)"></image>
<image :src="item" v-for="(item,indexk) in item.des_images" :key="indexk" @click.stop="preimg(index,indexk)"></image>
</view>
</view>
</view>
... ... @@ -135,40 +136,62 @@ export default {
baseurl:app.globalData.imageBaseUrl,
isactive:false,
vip_level:''
}
},
onLoad(options){
console.log(options)
this.uni_id=options.id
this.id=options.id;
console.log(this.id)
console.log(this.baseurl)
this.getschooldetails()
this.getollege()
this.getarticletype()
this.getAllArticle();
// 获取个人信息
this.getpersoninfo()
this.getschooldetails()
this.getollege()
this.getarticletype()
this.getAllArticle();
},
onShow() {
// 获取个人信息
this.getpersoninfo();
this.isPopupShow=false
},
methods:{
// 复制官网
copaywang(){
uni.setClipboardData({
data: this.university.url
});
},
copyzhong(){
uni.setClipboardData({
data: this.university.wechat
});
},
tocollegepage(item){
let id = item.university_id
console.log(item)
let id = item.university_id
let name = item.name
let college_id=item.id
uni.navigateTo({
url:'./academyDetails?university_id='+id+'&name='+name
url:'./academyDetails?university_id='+this.id+'&name='+name+"&college_id="+college_id
})
},
highschoollist(){
uni.navigateTo({
url:'./highSchoolmate?schooltype='+1+'&university_id='+this.id
})
},
popupShow(e){
let type=e.currentTarget.dataset.type;
if(type==1){
if(this.vip_level==1||this.vip_level==2){
uni.navigateTo({
url:"./highSchoolmate?schooltype="+2
url:"./highSchoolmate?schooltype="+2+'&university_id='+this.id
})
}else{
this.isPopupShow=true
... ... @@ -176,16 +199,14 @@ export default {
}else if(type==2){
if(this.vip_level==2){
uni.navigateTo({
url:"./highSchoolmate?schooltype="+3
url:"./highSchoolmate?schooltype="+3+'&university_id='+this.id
})
}else{
this.isPopupShow=true
}
}
},
popupHide(){
this.isPopupShow=false
... ... @@ -266,7 +287,8 @@ export default {
token:token
}
app.post(url,params,"get").then((res)=>{
this.articleList=res
this.articleList=this.articleList.concat(res)
// this.articleList=res;
}).catch((err)=>{
console.log(err)
})
... ... @@ -289,7 +311,9 @@ export default {
},
selecttype(item,index){
this.sel=index
this.type_id=item.id
this.type_id=item.id;
this.articleList=[];
this.page=1;
this.getAllArticle()
},
toacademypage(item){
... ... @@ -351,6 +375,11 @@ export default {
}
},
onReachBottom() {
// let newpage=this.page;
// newpage++;
// this.getAllArticle()
}
}
... ... @@ -505,6 +534,11 @@ export default {
color:rgba(45,85,117,1);
font-size: 32rpx;
margin-left: 16rpx;
height:auto;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
.more{
display: flex;
... ... @@ -596,12 +630,16 @@ export default {
.articl{
background-color: #fff;
margin-top: 24rpx;
padding: 0 34rpx;
padding: 0 34rpx 32rpx;
box-sizing: border-box;
box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1);
border-radius:20rpx;
margin-bottom: 42rpx;
.listitem:last-child{
border-bottom:none
}
.articltitle{
border-bottom: 1rpx solid rgba(238,238,238,1);
// border-bottom: 1rpx solid rgba(238,238,238,1);
padding: 40rpx 0 26rpx 0;
display: flex;
font-size: 24rpx;
... ... @@ -628,6 +666,11 @@ export default {
font-size: 24rpx;
margin-top: 8rpx;
margin-bottom: 20rpx;
hieght:auto;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
image{
width: 128rpx;
... ...
<template>
<view class="content">
<image class="background" :src="universitylist.des_image"></image>
<image class="background" :src="universitylist.des_image=='http://school.t.brotop.cn'?'../../static/bg_img@2x.png':universitylist.des_image"></image>
<view class="titleBox">
<view class="title">{{universitylist.name}}</view>
<view class="eng">Hebei University of Technology</view>
</view>
<view class="schoolMsg">
<view class="titleAcademy">
<image class="icon" :src="universitylist.icon_image"></image>
<image class="icon" :src="universitylist.icon_image=='http://school.t.brotop.cn'?'../../static/logo_img@2x.png':universitylist.icon_image"></image>
<view class="txt">学校介绍</view>
</view>
<view class="text">
<view class="" v-if="universitylist.des_content==''">暂无简介</view>
<rich-text :nodes="universitylist.des_content"></rich-text>
</view>
<!-- <view
{{universitylist.des_content}}
</view> -->
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
... ... @@ -66,7 +65,7 @@ export default {
// background: url('../../static/bg_img@2x.png') no-repeat;
// background-size: 750rpx 334rpx;
// height: 100vh;
overflow: hidden;
// overflow: hidden;
// padding: 0 32rpx;
.titleBox{
... ... @@ -83,7 +82,7 @@ export default {
}
.schoolMsg{
width:686rpx;
height:2294rpx;
// height:2294rpx;
background:rgba(255,255,255,1);
box-shadow:0rpx 4rpx 6rpx rgba(45,85,117,0.1);
opacity:1;
... ...
... ... @@ -44,7 +44,7 @@
{{item.des_content}}
</view>
<text class="alltext" style="color:#2D5575;font-size:24rpx;font-weight:bold;" @click="toarticlemsg(item)" v-if="item.des_content.length>150">全部</text>
<!-- <text class="alltext" style="color:#2D5575;font-size:24rpx;font-weight:bold;" @click="toarticlemsg(item)" v-if="item.des_content.length>150">全部</text> -->
</view>
<view style="display:flex;">
<image :src="item" v-for="(item,indexk) in item.des_images" :key="indexk" @click.stop="preimg(index,indexk)"
... ... @@ -304,7 +304,21 @@
// res.forEach(function(value,index,array){
// value.head_image=app.globalData.imageBaseUrl+value.head_image
// })
this.articleList =this.articleList.concat(res)
console.log(res)
if(res.length!=0){
this.articleList =this.articleList.concat(res)
}else{
if(that.page>1){
uni.showToast({
title:'没有更多了~',
icon:"none"
})
}
}
}).catch((err) => {
console.log(err)
})
... ... @@ -320,6 +334,10 @@
}
app.post(url, params, "post").then((res) => {
console.log(res)
uni.showToast({
title:'发送成功',
icon:"none"
})
that.content = ''
that.isliuyanBoxShow = false
}).catch((err) => {
... ... @@ -358,9 +376,16 @@
paySign: res.paySign,
success: function(res) {
console.log(res)
wx.navigateTo({
url: '/pages/orderbox/orderbox?index=' + 0
uni.showToast({
title:'打赏成功',
icon:'none'
})
setTimeout(function(){
wx.navigateTo({
url: '/pages/orderbox/orderbox?index=' + 0
})
},1500)
},
fail: function(res) {
console.log(123);
... ... @@ -436,6 +461,12 @@
this.articleList=[];
this.getAllArticle()
},
},
onReachBottom() {
let newpage=this.page;
newpage++;
this.page=newpage;
this.getAllArticle()
}
}
</script>
... ...
... ... @@ -11,10 +11,10 @@
placeholder-style="color:rgba(189,196,206,1);font-size:28rpx;"
style="font-size:28rpx;"
v-model="word"
@confirm="getschoollist"
@confirm="getschoollistk"
/>
</view>
<view class="searchBtn" @click="getschoollist">搜索</view>
<view class="searchBtn" @click="getschoollistk">搜索</view>
</view>
<view class="type">
<view class="paiming" :class="{ active: active1 }" @click="paimingShow">排名</view>
... ... @@ -85,7 +85,7 @@ export default {
let index=e.currentTarget.dataset.index;
this.levelindex=index;
this.province_id='';
this.city_id='';
this.level_id=id;
this.page=1;
this.schoolList=[];
... ... @@ -141,7 +141,7 @@ export default {
selectallprovince() {
this.selpro=-2;
this.selcity=-1;
this.province_id='';
this.city_id='';
this.city_id='';
this.level_id='';
this.page=1;
... ... @@ -150,6 +150,12 @@ export default {
this.isDiquShow = false;
},
getschoollistk(){
this.page=1;
this.schoolList=[];
this.getschoollist();
},
//点击选中全部市
selectallcity() {
this.level_id='';
... ... @@ -189,7 +195,7 @@ export default {
size: 10,
word: that.word,
level_id: that.level_id,
province_id: that.province_id
city_id: that.city_id
};
app.post(url, params,'post')
.then(res => {
... ... @@ -233,6 +239,13 @@ export default {
this.getAllProvince();
this.getschoollist();
this.getAllLevel();
},
onReachBottom() {
let newpage=this.page;
newpage++;
this.page=newpage;
this.getschoollist();
}
};
</script>
... ...
... ... @@ -68,13 +68,13 @@
</view>
<view class="fen">{{item.up_name}}</view>
</view>
<view class="right" v-if="item.is_like==1">
<view class="right" v-if="item.is_like==1" @click.stop=like(index,item.user_id,2)>
<image src="../../static/yiguanzhu_img@2x.png"></image>
<view class="text">已关注</view>
</view>
<view class="right" v-else style="width:132rpx;height:54rpx;background:rgba(129,195,191,1);border-radius:32rpx 0rpx 0rpx 32rpx;">
<!-- <image src="../../static/yiguanzhu_img@2x.png"></image> -->
<view class="text" style="align-items: center;">
<view class="text" style="align-items: center;" @click.stop=like(index,item.user_id,1)>
<image class="icon" src="../../static/guanzhu_icon@2x.png"></image>关注
</view>
</view>
... ... @@ -87,19 +87,19 @@
<!-- <tab :current="currentTabIndex" @getData="tabClick"></tab> -->
<view class="teacherfooter" v-if="type == 1">
<view class="teacherfootitem">
<view class="teacherfootitemtop" @click="footerselChange" :data-id="1" :data-url="'/pages/school/school?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">
<view class="teacherfootitemtop" >
<image :src="footersel==1?'/static/xuexiao_icon@2x.png':'/static/xuexiao_icon@2x3.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==1?'selactive':''">学校</view>
</view>
<view class="teacherfootitem" @click="footerselChange" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+1">
<view class="teacherfootitem" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+1">
<view class="teacherfootitemtop">
<image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view>
</view>
<view class="teacherfootitem" @click="footerselChange" :data-id="3" :data-url="'/pages/homePage/homePage?type='+1">
<view class="teacherfootitem" @click="jumpschool==true?footerselChange(3,'/pages/homePage/homePage?type=1'):''" :data-id="3" :data-url="'/pages/homePage/homePage?type='+1">
<view class="teacherfootitemtop">
<image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image>
</view>
... ... @@ -107,13 +107,14 @@
</view>
</view>
<view class="collegefooter" v-if="type == 2">
<view class="teacherfootitem" @click="footerselChange" :data-id="2" :data-url="'/pages/schoolmate/schoolmate?type='+2">
<view class="teacherfootitem" >
<view class="teacherfootitemtop">
<image :src="footersel==2?'/static/zhaoxiaoyou_icon@2x2.png':'/static/zhaoxiaoyou_icon@2x.png'"></image>
</view>
<view class="teacherfootname" :class="footersel==2?'selactive':''">找校友</view>
</view>
<view class="teacherfootitem" @click="footerselChange" :data-id="3" :data-url="'/pages/homePage/collegeHome?type='+2">
<!-- -->
<view class="teacherfootitem" @click="footerselChangek" :data-id="3">
<view class="teacherfootitemtop">
<image :src="footersel==3?'/static/wodezhuye_icon@2x2.png':'/static/wodezhuye_icon@2x.png'"></image>
</view>
... ... @@ -122,14 +123,10 @@
</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data() {
return {
selpro:-1,
... ... @@ -150,7 +147,6 @@
type: "",
province_id: "",
city_id: '',
schoolmate: {
page: '1',
size: '10',
... ... @@ -160,13 +156,11 @@
up_id: '',
},
school: {
page: '1',
size: '10',
word: ''
},
graduatedList: [],
upList: [],
schoolmateList: [],
... ... @@ -175,17 +169,47 @@
schoolList: [],
word: "",
vip_level:'',
jumpschool:true,
jumpschoolk:true
}
},
methods: {
hidekk() {
console.log(3889348439)
this.isDiquShow = false
},
showhide() {
},
// 关注和取消关注
like(index,userid,type) {
var that = this
var url = "student/likeStudent"
var token = uni.getStorageSync('token')
var params = {
token: token,
userb_id: userid
}
app.post(url, params, "post").then((res) => {
if(type==1){
uni.showToast({
title:"关注成功",
icon:"none"
})
that.schoolmateList[index].is_like=1;
that.schoolmateList=that.schoolmateList
}else{
uni.showToast({
title:"取消关注成功",
icon:"none"
})
that.schoolmateList[index].is_like=2;
that.schoolmateList=that.schoolmateList
}
}).catch((err) => {
console.log(err)
})
},
tobuy() {
if (uni.getStorageSync('token') == '') {
uni.navigateTo({
... ... @@ -199,22 +223,22 @@
},
diquShow() {
this.isDiquShow = true;
this.isDiquShow = !this.isDiquShow;
this.isSchoolShow = false;
this.isMajorShow = false
this.isStyleShow = false
this.active1 = true,
this.active2 = false
this.active2 = false
this.active3 = false
this.active4 = false
},
hide() {
this.isDiquShow = false,
this.isSchoolShow = false;
this.isSchoolShow = false;
this.isMajorShow = false
this.isStyleShow = false
this.isStyleShow = false,
this.active1 = false,
this.active2 = false
this.active2 = false
this.active3 = false
this.active4 = false
},
... ... @@ -230,7 +254,7 @@
// },
majorShow() {
this.isMajorShow = true
this.isMajorShow = !this.isMajorShow;
this.isDiquShow = false,
this.isSchoolShow = false;
this.isStyleShow = false
... ... @@ -242,27 +266,37 @@
styleShow() {
console.log(37844374378)
this.isStyleShow = true
this.isMajorShow = false
this.isSchoolShow = false
this.isDiquShow = false
this.active1 = false,
this.active2 = false
this.active3 = false
this.isStyleShow = !this.isStyleShow;
this.isMajorShow = false;
this.isSchoolShow = false;
this.isDiquShow = false;
this.active1 = false;
this.active2 = false;
this.active3 = false;
this.active4 = true;
// this.this.schoolmate.page=1;
// this.schoolmateList=[]
},
},
// 底部导航跳转
footerselChange(e) {
let url = e.currentTarget.dataset.url;
footerselChange(id,url) {
// let url = e.currentTarget.dataset.url;
// console.log(e)
uni.redirectTo({
url: url
})
this.jumpschool=false
},
footerselChangek(e){
// let url = e.currentTarget.dataset.url;
// console.log(e)
uni.navigateTo({
url: '/pages/homePage/collegeHome?type=2'
})
this.jumpschoolk=false
},
// 获取个人信息
getpersoninfo(){
... ... @@ -294,11 +328,11 @@
}, 1500);
} else {
this.schoolmate.page=1;
this.schoolmateList=[];
// this.schoolmate.page=1;
// this.schoolmateList=[];
var url = "student/getStudentList"
var token = uni.getStorageSync('token')
let type=1;
let type='';
console.log('3443743873478',this.vip_level)
if(this.vip_level==0){
type=1
... ... @@ -316,15 +350,14 @@
up_id: this.schoolmate.up_id,
word: this.word,
token: token
}
}
app.post(url, params, "get").then((res) => {
console.log(res)
this.schoolmateList = this.schoolmateList.concat(res)
this.schoolmateList = this.schoolmate.page==1?res:this.schoolmateList.concat(res)
}).catch((err) => {
console.log(err)
})
}
},
//获取所有专业
... ... @@ -344,11 +377,11 @@
var params = {}
app.post(url, params, "get").then((res) => {
console.log(res[0].name)
let obj = {
id: '',
name: '全部'
}
res.unshift(obj)
// let obj = {
// id: '',
// name: '全部'
// }
// res.unshift(obj)
this.upList = res
}).catch((err) => {
console.log(err)
... ... @@ -528,6 +561,14 @@
// 获取个人信息
this.getpersoninfo()
this.jumpschool=true;
this.jumpschoolk=true
},
onReachBottom() {
let newpage=this.schoolmate.page;
newpage++;
this.schoolmate.page=newpage;
this.getmatelist()
}
}
... ...

81.6 KB | 宽: | 高:

71.6 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖