Compare commits

...

27 Commits

Author SHA1 Message Date
36ed688d95 完善 2020-03-01 09:56:53 +08:00
861e48a6d0 修复 2020-01-19 11:26:32 +08:00
3ab6b2ec4d 图片 2019-12-27 15:47:39 +08:00
c92b25fa8a 完成 2019-12-27 15:13:48 +08:00
dec51c79cc 下拉 2019-12-27 14:14:32 +08:00
60eed37be3 图片 2019-12-27 11:15:22 +08:00
e738bc61b6 搜索 2019-12-26 10:41:59 +08:00
faeb1f9ae1 登陆跳转 2019-12-26 10:00:24 +08:00
c901454332 url 2019-12-25 15:31:23 +08:00
c8b19546b7 密码 2019-12-25 11:21:01 +08:00
f67814f8b9 字体 2019-12-23 16:51:10 +08:00
adcf905e5d 修读 2019-12-20 10:39:01 +08:00
9b3f63ea96 修复 2019-12-20 09:18:23 +08:00
c6566e2551 一期修复 2019-12-19 10:18:52 +08:00
62c0426cc5 添加标题 2019-12-19 09:12:50 +08:00
d41465615d 修复 2019-12-18 18:27:06 +08:00
bb8292a2c6 修复零 2019-12-18 18:23:33 +08:00
5195fcfa8a 点赞 2019-12-18 17:37:50 +08:00
7296d226f4 修复 2019-12-17 09:29:34 +08:00
da8e780b11 Merge branch 'xuebaoxin' of http://git.luyuan.tk/pplokijuhyg/falvpingtai into xuebaoxin 2019-12-09 09:08:15 +08:00
6ab3290473 chushihua 2019-12-09 09:07:56 +08:00
58a8289b81 Merge branch 'xuebaoxin' of http://git.luyuan.tk/pplokijuhyg/falvpingtai into xuebaoxin 2019-12-07 15:32:46 +08:00
6bd42ea968 huanxitong 2019-12-07 15:32:42 +08:00
9bee78842a 换系统 2019-12-06 17:37:00 +08:00
bdf3d3b851 临时完成 2019-12-05 14:23:51 +08:00
d9162bbdf2 Merge branch 'master' into xuebaoxin 2019-12-04 17:25:32 +08:00
f7a457dfec 回复 2019-12-04 17:24:57 +08:00
36 changed files with 1332 additions and 417 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -11,12 +11,13 @@
"axios": "^0.19.0",
"babel-plugin-import": "^1.12.2",
"core-js": "^3.3.2",
"node-sass": "^4.13.0",
"node-sass": "^4.13.1",
"postcss-pxtorem": "^4.0.1",
"sass-loader": "^8.0.0",
"vant": "^2.2.14",
"vue": "^2.6.10",
"vue-router": "^3.1.3"
"vue-router": "^3.1.3",
"weixin-js-sdk": "^1.4.0-test"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.0.0",

View File

@ -5,8 +5,29 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="stylesheet" href="./normalize.css">
<script>
window.onload=function () {
document.addEventListener('touchstart',function (event) {
if(event.touches.length>1){
event.preventDefault();
}
});
var lastTouchEnd=0;
document.addEventListener('touchend',function (event) {
var now=(new Date()).getTime();
if(now-lastTouchEnd<=300){
event.preventDefault();
}
lastTouchEnd=now;
},false);
document.addEventListener('gesturestart', function (event) {
event.preventDefault();
});
}
</script>
<script>
//designWidth:设计稿的实际宽度值,需要根据实际设置
//maxWidth:制作稿的最大宽度值,需要根据实际设置
@ -23,7 +44,9 @@
maxWidth = maxWidth || 540;
width > maxWidth && (width = maxWidth);
var rem = width * 100 / designWidth;
remStyle.innerHTML = 'html{font-size:' + rem + 'px;}';
// alert(rem)
remStyle.innerHTML = 'html{font-size:' + Math.floor(rem) + 'px;}';
// alert(window.getComputedStyle(window.document.documentElement)["fontSize"])
}
if (docEl.firstElementChild) {
@ -59,7 +82,7 @@
})(750, 1024);
</script>
<script src="./jquery-3.4.1.min.js"></script>
<title>falv</title>
<title>Lawpro社区</title>
</head>
<body>

View File

@ -149,8 +149,17 @@ sup {
img {
border-style: none;
box-shadow: none;
border: none;
/* background-color: red; */
/* opacity:0 !important; */
}
img[src=""],img:not([src]){
opacity:0 !important;
border: none !important;
margin: -1px;
}
/* Forms
========================================================================== */

View File

@ -9,11 +9,14 @@
@pinglu="pinglu"
:sid="item.id"
:indexs="index"
:userimg="'http://lawpro.earnest.pro' + item.avatar"
:userimg="'https://admin.lawpro.cn' + item.avatar"
:nickname="item.nickname"
:text="item.articlecontent"
:comment="item.comment"
:num="item.islike"
:like="item.islike"
:collect="item.collect"
:islike="item.isClick"
:iscllect="item.isCollect"
></follow>
</div>
@ -26,19 +29,21 @@
v-for="(item,index) in list.correlation"
:key="index"
:title="item.title"
:img="'http://lawpro.earnest.pro' +item.img"
:img="'https://admin.lawpro.cn' +item.img"
:sid="item.id"
:type="item.type"
></articles>
<!-- <articles></articles> -->
<p class="title" @click="show = true">热门推荐</p>
<p class="title">热门推荐</p>
<!-- <privatets></privatets> -->
<privates
v-for="(item,index) in list.correlation"
:key="index"
:title="item.title"
:sid="item.id"
:type="item.type"
></privates>
<!-- <articles></articles> -->
@ -46,24 +51,28 @@
<van-popup v-model="show" position="bottom" :style="{ height: '100%' }" class="linshi">
<div class="top">
<p class="tiao">{{plist.length}}条评论</p>
<p class="qie" @click="shot = shot == 0 ? 1 : 0">
<img class="qiehuan" src="./assets/qiehuan.png" alt srcset /> 切换为{{shot == 0 ? '时间' : "默认"}}排序
<p class="qie" @click="qshot">
<img class="qiehuan" src="./assets/qiehuan.png" alt srcset />
切换为{{shot == 0 ? '时间' : "默认"}}排序
</p>
<img class="quit" src="./assets/quit.png" alt @click="show = !show" />
<img class="quit" src="./assets/quit.png" alt @click="qshow" />
</div>
<div class="bodys">
<comment
<div style="min-height:101%">
<comment
v-for="(item,index) in plist"
:key="index"
:img="'http://lawpro.earnest.pro/' + item.avatar"
:img="'https://admin.lawpro.cn/' + item.avatar"
:name="item.nickname"
:text="item.text"
></comment>
</div>
</div>
<div class="msg" v-show="msgs">{{msg}}</div>
<div class="reply">
<img @click="biaoqing = !biaoqing" src="./assets/baoqing.png" alt srcset />
<textarea placeholder="写下你的评论..." v-model="content"></textarea>
<textarea placeholder="写下你的评论..." v-model="content" @blur="body"></textarea>
<p @click="pfb">发布</p>
<div v-show="biaoqing">
<Emotion @emotion="handleEmotion" :height="4"></Emotion>
@ -94,7 +103,7 @@ export default {
pid: 0,
msg: "发布成功",
msgs: false,
shot:0
shot: 0
};
},
components: {
@ -107,14 +116,31 @@ export default {
Emotion
},
methods: {
body(){
// alert(1)
// let a = window.document.body.scrollTop
// window.document.body && (window.document.body.scrollTop = a);
// window.scroll(0,0);
window.$(window).scrollTop(window.$(window).scrollTop)
},
qshow(){
this.show = !this.show
},
qshot(){
this.shot = this.shot == 0 ? 1 : 0
},
pfb() {
this.msg= "发布中"
this.msgs = true;
window.$(window).scrollTop(window.$(window).scrollTop)
if (localStorage.getItem("token") == "") {
this.$router.push("/login");
} else {
window.console.log(this.content);
if (this.content != "") {
this.axios
.post("http://lawpro.earnest.pro/api/login_main/appendComment", {
.post("https://admin.lawpro.cn/api/login_main/appendComment", {
text: this.content,
token: localStorage.getItem("token"),
type_id: this.pid,
@ -124,12 +150,12 @@ export default {
if (res.data.code == 200) {
this.pinglu(this.pid);
this.content = "";
this.msgs = true
setTimeout(()=>{
this.msgs = false
},2000)
}else{
this.$router.push({path:"/login"})
this.msg="发布成功"
setTimeout(() => {
this.msgs = false;
}, 2000);
} else {
this.$router.push({ path: "/login" });
}
});
}
@ -140,14 +166,14 @@ export default {
},
pinglu(id) {
this.pid = id;
this.show = true;
this.show = true;
this.axios
.post("http://lawpro.earnest.pro/api/login_main/CommentList", {
.post("https://admin.lawpro.cn/api/login_main/CommentList", {
token: localStorage.getItem("token"),
type: 3,
type_id: id,
order:this.shot
order: this.shot
})
.then(res => {
window.console.log(res);
@ -156,14 +182,27 @@ export default {
});
}
},
watch:{
shot(){
this.pinglu(this.pid)
watch: {
shot() {
this.pinglu(this.pid);
}
},
mounted() {
let sid = this.$route.query.sid ==undefined ? false : this.$route.query.sid
if(sid){
this.axios
.post("https://admin.lawpro.cn/api/main/plusTransmit ", {
transmitstatus: sid,
id: this.$route.query.id,
type: 2
})
.then(res => {
window.console.log(res);
});
}
this.axios
.post("http://lawpro.earnest.pro/api/login_main/mainDetails", {
.post("https://admin.lawpro.cn/api/login_main/mainDetails", {
token: localStorage.getItem("token"),
type: 2,
id: this.$route.query.id
@ -171,9 +210,11 @@ export default {
.then(res => {
// window.console.log(res)
this.list = res.data.data;
document.title=this.list.data.title
});
this.axios
.post("http://lawpro.earnest.pro/api/login_main/answerList", {
.post("https://admin.lawpro.cn/api/login_main/answerList", {
token: localStorage.getItem("token"),
page: 1,
article_id: this.$route.query.id
@ -198,14 +239,14 @@ export default {
max-height: 70px;
border-radius: 5px;
background: #666;
box-sizing: border-box;
top:50%;
box-sizing: border-box;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #fff;
}
.top {
z-index: 9999;
background-color: #fff;
position: absolute;
top: 0;
@ -251,6 +292,7 @@ export default {
}
}
.bodys {
z-index: 9900;
width: 100%;
height: 100%;
// background-color: #000;

View File

@ -6,10 +6,27 @@
</div>
<div class="all" v-if="no==0">
<div class="all1" v-for="(i,j) in list" :key="j" @click="todetail(i.id,i.type)">
<indexfindall :title="i.title" :num="i.comment" :right="i.avatar" :content="i.text"></indexfindall>
<indexfindall
:title="i.title"
:num="i.comment"
:content="i.text"
:right="'https://admin.lawpro.cn/'+i.avatar"
:islike="i.isClick"
:iscllect="i.isCollect"
:like="i.islike"
:collect="i.collect"
:id="i.id"
:type="i.type"
:keys="keys"
></indexfindall>
</div>
<div style="width:100%;height:0.5rem;text-align:center;line-height:0.3rem">{{text}}</div>
<div
style="width:100%;height:0.5rem;text-align:center;line-height:0.5rem;display:flex; flex-direction: column; align-items: center;font-size:0.2rem;"
>
<img :src="login" style="width:0.5rem" alt v-if="text == '加载中' " />
{{text}}
</div>
<!-- <div class="all1">
<indexfindall title="学法律后,对你最大的影响或改变是什么?" num="1532" :right="pics"></indexfindall>
</div>-->
@ -21,11 +38,16 @@
:article="i.article"
:attention="i.attention"
:username="i.topic_name"
:pic="'http://lawpro.earnest.pro/'+i.img"
:pic="'https://admin.lawpro.cn/'+i.img"
></indedfinduser>
</div>
<div style="width:100%;height:0.5rem;text-align:center;line-height:0.3rem">{{text}}</div>
<div
style="width:100%;height:0.5rem;text-align:center;line-height:0.5rem;display:flex; flex-direction: column; align-items: center;font-size:0.2rem;"
>
<img :src="login" style="width:0.5rem" alt v-if="text == '加载中' " />
{{text}}
</div>
<!-- <div class="user1">
<indedfinduser></indedfinduser>
</div>
@ -39,16 +61,21 @@
<div class="user" v-if="no==5">
<div class="user1" v-for="(i,j) in list" :key="j">
<!-- klmklvnklnkvl -->
<!-- <indedfinduser :username="i.topic_name" :pic="'http://lawpro.earnest.pro/'+i.img" :desc="i.text" :ifnum="false" v-if="i.img"></indedfinduser> -->
<!-- <indedfinduser :username="i.topic_name" :pic="'https://admin.lawpro.cn/'+i.img" :desc="i.text" :ifnum="false" v-if="i.img"></indedfinduser> -->
<indedfinduser
:username="i.nickname"
:pic="'http://lawpro.earnest.pro/'+i.avatar"
:pic="'https://admin.lawpro.cn/'+i.avatar"
:desc="i.text"
:ifnum="false"
></indedfinduser>
</div>
<div style="width:100%;height:0.5rem;text-align:center;line-height:0.3rem">{{text}}</div>
<div
style="width:100%;height:0.5rem;text-align:center;line-height:0.5rem;display:flex; flex-direction: column; align-items: center;font-size:0.2rem;"
>
<img :src="login" style="width:0.5rem" alt v-if="text == '加载中' " />
{{text}}
</div>
<!-- <div class="user1">
<indedfinduser></indedfinduser>
</div>-->
@ -63,6 +90,7 @@
import indexfindhead from "./components/indexfindhead";
import indexfindtab from "./components/indexfindtab";
import indexfindall from "./components/indexfindall";
import login from "./assets/login.gif";
import pics from "./assets/ad.png";
import indedfinduser from "./components/indexfinduser";
export default {
@ -73,60 +101,69 @@ export default {
indedfinduser
},
mounted() {
this.getlist1()
},
document.title = this.$route.query.word + "-搜索";
this.getlist1(0);
},
watch: {
no() {
this.page = 0;
this.page = 1;
this.dynamiclist = [];
this.list = [];
this.lock = false;
// this.getlist1();
this.text="加载中"
this.text = "加载中";
}
},
beforeRouteLeave(a, b, c) {
window.$(window).scroll(() => {});
c();
},
computed: {
keys() {
return this.$route.query.word;
}
},
methods: {
getlist1(){
let t=this;
t.list=[]
getlist1(e) {
let t = this;
t.list = [];
t.axios
.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {
.post("https://admin.lawpro.cn/api/login_main/indexsearch", {
where: t.$route.query.word,
type: t.no,
}).then((res)=>{
if(res.data.data){
t.list=res.data.data
window.console.log(t.list.length,"hfihaifohog")
if(t.list.length<5){
t.text="暂无数据"
token: localStorage.getItem("token")
})
.then(res => {
if (res.data.data) {
if(t.no == e){
t.list = res.data.data;
}else{
return ;
}
window.console.log(t.list.length, "hfihaifohog");
if (t.list.length < 5) {
t.text = "暂无相关数据";
}
window.$(window).scroll(() => {
var windowH = window.$(window).height(); //
var documentH = window.$(document).height(); //
var scrollH = window.$(window).scrollTop(); //
// scrollH = $(document).scrollTop();
if (windowH + scrollH >= documentH) {
// do something
// alert(2);
window.console.log(1);
t.getlist();
}
});
}else{
window.console.log("errir")
t.text="暂无数据"
var windowH = window.$(window).height(); //
var documentH = window.$(document).height(); //
var scrollH = window.$(window).scrollTop(); //
// scrollH = $(document).scrollTop();
if (windowH + scrollH >= documentH) {
// do something
// alert(2);
window.console.log(1);
t.getlist(e);
}
});
} else {
window.console.log("errir");
t.text = "暂无相关数据";
}
})
});
},
getlist() {
getlist(e) {
if (this.lock) {
return "lock";
}
@ -134,7 +171,7 @@ export default {
var t = this;
t.page += 1;
t.axios
.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {
.post("https://admin.lawpro.cn/api/login_main/indexsearch", {
where: t.$route.query.word,
type: t.no,
page: t.page
@ -142,36 +179,40 @@ export default {
.then(res => {
window.console.log(res);
if (res.data.code == 200) {
if(res.data.data){
t.list = t.list.concat(res.data.data);
if (res.data.data) {
if(t.no == e){
t.list = t.list.concat(res.data.data);
}else{
return ;
}
}
t.lock = false;
window.$(window).scroll(() => {
var windowH = window.$(window).height(); //
var documentH = window.$(document).height(); //
var scrollH = window.$(window).scrollTop(); //
// scrollH = $(document).scrollTop();
if (windowH + scrollH >= documentH) {
// do something
// alert(2);
window.console.log(1);
t.getlist();
}
});
window.$(window).scroll(() => {
var windowH = window.$(window).height(); //
var documentH = window.$(document).height(); //
var scrollH = window.$(window).scrollTop(); //
// scrollH = $(document).scrollTop();
if (windowH + scrollH >= documentH) {
// do something
// alert(2);
window.console.log(1);
t.getlist();
}
});
} else {
t.text = "暂无更多";
t.text = "暂无相关数据";
}
// t.list=res.data.data
});
},
getno(e) {
window.console.log(e);
this.no = e;
this.list = [];
this.getlist1()
window.console.log(this.list.length,"list")
this.getlist1(e);
window.console.log(this.list.length, "list");
},
todetail(e, type) {
window.console.log(e);
@ -191,53 +232,53 @@ export default {
});
// let t=this;
// window.console.log(e)
// t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:e,type:this.no}).then((res)=>{
// t.axios.post("https://admin.lawpro.cn/api/login_main/indexsearch", {where:e,type:this.no}).then((res)=>{
// // window.console.log(res)
// // for(let i in res.data.data){
// // res.data.data[i].avatar= res.data.data[i].avatar.substr(1)
// // res.data.data[i].avatar= "http://lawpro.earnest.pro/"+res.data.data[i].avatar
// // res.data.data[i].avatar= "https://admin.lawpro.cn/"+res.data.data[i].avatar
// // }
// // t.list=res.data.data
// if (res.data.code == 200) {
// t.list = res.data.data;
// window.$(window).scroll(() => {
// var windowH = window.$(window).height(); //
// var documentH = window.$(document).height(); //
// var scrollH = window.$(window).scrollTop(); //
// // scrollH = $(document).scrollTop();
// if (windowH + scrollH >= documentH) {
// // do something
// // alert(2);
// window.console.log(1);
// t.getlist();
// }
// });
// } else {
// if (res.data.code == 200) {
// t.list = res.data.data;
// window.$(window).scroll(() => {
// var windowH = window.$(window).height(); //
// var documentH = window.$(document).height(); //
// var scrollH = window.$(window).scrollTop(); //
// // scrollH = $(document).scrollTop();
// if (windowH + scrollH >= documentH) {
// // do something
// // alert(2);
// window.console.log(1);
// t.getlist();
// }
// });
// } else {
// t.text = "";
// }
// })
// t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:e,type:0}).then((res)=>{
// t.axios.post("https://admin.lawpro.cn/api/login_main/indexsearch", {where:e,type:0}).then((res)=>{
// window.console.log(res)
// for(let i in res.data.data){
// res.data.data[i].avatar= res.data.data[i].avatar.substr(1)
// res.data.data[i].avatar= "http://lawpro.earnest.pro/"+res.data.data[i].avatar
// res.data.data[i].avatar= "https://admin.lawpro.cn/"+res.data.data[i].avatar
// }
// t.list=res.data.data
// })
// t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:e,type:2}).then((res)=>{
// t.axios.post("https://admin.lawpro.cn/api/login_main/indexsearch", {where:e,type:2}).then((res)=>{
// window.console.log(res)
// for(let i in res.data.data){
// res.data.data[i].img= res.data.data[i].img.substr(1)
// res.data.data[i].img= "http://lawpro.earnest.pro/"+res.data.data[i].img
// res.data.data[i].img= "https://admin.lawpro.cn/"+res.data.data[i].img
// }
// t.list3=res.data.data
// })
// t.axios.post("http://lawpro.earnest.pro/api/login_main/indexsearch", {where:e,type:5}).then((res)=>{
// t.axios.post("https://admin.lawpro.cn/api/login_main/indexsearch", {where:e,type:5}).then((res)=>{
// window.console.log(res)
// for(let i in res.data.data){
// res.data.data[i].avatar= res.data.data[i].avatar.substr(1)
// res.data.data[i].avatar= "http://lawpro.earnest.pro/"+res.data.data[i].avatar
// res.data.data[i].avatar= "https://admin.lawpro.cn/"+res.data.data[i].avatar
// }
// t.list2=res.data.data
// })
@ -251,9 +292,10 @@ export default {
list1: [],
list2: [],
list3: [],
page: 0,
page: 1,
lock: false,
text: "加载中"
text: "加载中",
login
};
}
};

View File

@ -1,10 +1,19 @@
<template>
<div class="box">
<!-- <img :src="'https://api.luyuan.tk/getdata?data=' + imgurl" alt=""> -->
<div class="header">
<img class="portrait" :src="'http://lawpro.earnest.pro' + userimg" alt />
<img class="portrait" :src="'https://admin.lawpro.cn' + userimg" alt />
<div class="introduce">
<p class="name">{{username}}</p>
<!-- <div class="follow">
<p class="name">
<span>{{username}}</span>
<img
:src="home"
alt
style="width:0.5rem;position: absolute;right:0.5rem;top:0.3rem"
@click="gohome"
/>
</p>
<div class="follow">
<p>
<span>{{attention}}</span>
关注我的
@ -13,7 +22,7 @@
<span>{{myfollow}}</span>
我关注的
</p>
</div> -->
</div>
</div>
</div>
<div class="classification">
@ -26,14 +35,93 @@
</div>
<div class="list">
<div v-for="(item,index) in dynamiclist" :key="index">
<follow v-if="item.status == 3 " :operation="type[item.type] + '了该' + status[item.status]" :day="item.time + '前'" :title="item.title" :nickname="item.nickname" :userimg="'http://lawpro.earnest.pro' + item.img" :num="item.islike" :img="'http://lawpro.earnest.pro' + item.avatar" :text="item.text" :comment="item.comment"></follow>
<answer v-if="item.status == 1 || item.status == 2" :operation="type[item.type] + '了该' + status[item.status]" :day="item.time + '前'" :title="item.title" :types="item.status" :id="item.id"></answer>
<follow v-if="types == 3" operation="发布了该回答" :day="item.time" :title="item.title" :nickname="item.nickname" :userimg="'http://lawpro.earnest.pro' + userimg" :num="item.islike" :img="'http://lawpro.earnest.pro' + item.avatar" :text="item.text" :comment="item.comment"></follow>
<answer @wz="wzs" v-if="types==1" operation="发布了该文章" :day="item.time" :title="item.title" types="1" :id="item.id"></answer>
<answer v-if="types==2" operation="发布了该问题" :day="item.time" :title="item.title" types="2" :id="item.id"></answer>
<follow
v-if="item.status == 3 "
:operation="type[item.type] + '了该' + status[item.status]"
:day="item.time + '前'"
:title="item.title"
:nickname="item.nickname"
:userimg="'https://admin.lawpro.cn' + item.avatar"
:num="item.islike"
:img="'https://admin.lawpro.cn' + item.img"
:text="item.text"
:comment="item.comment"
:sid="item.id"
:type="item.status"
></follow>
<answer
v-if="item.status == 1 || item.status == 2"
:operation="type[item.type] + '了该' + status[item.status]"
:day="item.time + '前'"
:title="item.title"
:types="item.status"
:id="item.id"
:sid="item.id"
:type="item.status"
></answer>
<follow
v-if="types == 3"
operation="我发布了该回答"
:day="item.time"
:title="item.title"
:nickname="item.nickname"
:userimg="'https://admin.lawpro.cn' + userimg"
:num="item.islike"
:img="'https://admin.lawpro.cn' + item.avatar"
:text="item.text"
:comment="item.comment"
:sid="item.id"
:type="item.status"
></follow>
<answer
v-if="types==1"
operation="我发布了该文章"
:day="item.time"
:title="item.title"
types="1"
:sid="item.id"
:type="1"
></answer>
<answer
v-if="types==2"
operation="我发布了该问题"
:day="item.time"
:title="item.title"
types="2"
:sid="item.id"
:type="item.status"
></answer>
<follow
v-if="types == 5 && item.type==3"
:operation="'我收藏了该'+ status[item.type]"
:day="item.time"
:title="item.title"
:nickname="item.nickname"
:userimg="'https://admin.lawpro.cn' + userimg"
:num="item.islike"
:img="'https://admin.lawpro.cn' + item.avatar"
:text="item.text"
:comment="item.comment"
:sid="item.id"
:type="item.type"
:types="item.type"
></follow>
<answer
v-if="types==5 && (item.type == 1|| item.type == 2)"
:operation="'我收藏了该'+ status[item.type]"
:day="item.time"
:title="item.title"
:types="item.type"
:sid="item.id"
:type="item.type"
></answer>
</div>
<div
style="width:100%;height:0.5rem;text-align:center;line-height:0.5rem;display:flex; flex-direction: column; align-items: center;font-size:0.2rem;"
>
<img :src="login" style="width:0.5rem" alt v-if="text == '加载中' " />
{{text}}
</div>
</div>
</div>
</div>
@ -99,160 +187,226 @@
border-bottom: 1px solid #dfdfdf;
> div {
width: 100%;
font-size: 32px;
font-size: 28px;
text-align: center;
}
.select{
border-bottom: 4px solid #6B9147;
.select {
border-bottom: 4px solid #6b9147;
}
}
.list{
width: 100%;
.list {
width: 100%;
}
}
}
</style>
<script>
import follow from "./components/PersonafFollow"
import follow from "./components/PersonafFollow";
// import follows from "./components/PersonafFollows"
import answer from "./components/PersonalAnswer"
import answer from "./components/PersonalAnswer";
import login from "./assets/login.gif";
import home from "./assets/home.png";
// import { log } from 'util';
export default {
name: "Personal-homepage",
data() {
return {
userimg:"",
username:"",
myfollow:"",
attention:"",
dynamiclist:[],
status:['','文章','问题','回答'],
type:['','点赞','收藏','关注','评论','回答'],
types:4,
page:1,
lock:false
home,
userimg: "",
username: "",
myfollow: "",
attention: "",
dynamiclist: [],
status: ["", "文章", "问题", "回答"],
type: ["", "我点赞", "我收藏", "我关注", "我评论", "我回答"],
types: 4,
page: 0,
lock: false,
text: "加载中",
login
// imgurl:""
};
},
components:{
follow,
answer
components: {
follow,
answer
},
methods:{
wzs(a,b){
methods: {
wzs(a, b) {
// console.log(a,b,12)
// this.$router.replace('/')
this.$router.push({
path:'/articledetail?id=' + b
})
this.$router.push({
path: "/articledetail?id=" + b
});
},
getlist(){
if(this.lock){
return ;
}
this.lock = true
this.page += 1
this.axios.post("http://lawpro.earnest.pro/api/login_main/getUserListDetails",{
token:localStorage.getItem("token"),
type:this.types,
page:this.page
}).then((res)=>{
window.console.log(res)
if(res.data.code == 200){
if(res.data.data.length == 0){
// alert(1)
return ;
}
this.dynamiclist = this.dynamiclist.concat(res.data.data)
this.lock = false
}
})
gohome() {
this.$router.push({
path: "/"
});
},
getlists(){
if(this.lock){
return ;
getlist(types) {
if (this.lock) {
return;
}
this.lock = true
this.page += 1
this.axios.post("http://lawpro.earnest.pro/api/login_main/getUserListDetails",{
token:localStorage.getItem("token"),
page:this.page
}).then((res)=>{
window.console.log(res)
if(res.data.code == 200){
if(res.data.data.length == 0){
// alert(1)
this.text = "加载中";
this.lock = true;
this.page += 1;
this.axios
.post("https://admin.lawpro.cn/api/login_main/getUserListDetails", {
token: localStorage.getItem("token"),
type: this.types,
page: this.page
})
.then(res => {
this.lock = false;
return ;
}
this.dynamiclist = this.dynamiclist.concat(res.data.data)
this.lock = false
}
})
}
},
mounted(){
if(localStorage.getItem('token') == ""){
this.$router.push("/login")
}
this.axios.post('http://lawpro.earnest.pro/api/login_main/getUserDetails',{
token:localStorage.getItem("token")
}).then((res)=>{
// window.console.log(res.data)
if(res.data.code == 200){
this.userimg = res.data.data.user.avatar,
this.username = res.data.data.user.nickname,
this.myfollow = res.data.data.myfollow,
this.attention = res.data.data.user.attention
}
})
this.axios.post("http://lawpro.earnest.pro/api/login_main/getUserListDetails",{
token:localStorage.getItem("token"),
type:4,
page:1
}).then((res)=>{
window.console.log(res)
if(res.data.code == 200){
this.dynamiclist = res.data.data
}
})
var t = this
window.$(window).scroll(() => {
var windowH = window.$(window).height(); //
var documentH = window.$(document).height(); //
var scrollH = window.$(window).scrollTop(); //
// scrollH = $(document).scrollTop();
if (windowH + scrollH >= documentH) {
// do something
// alert(2);
window.console.log(1)
if(this.types == 5){
t.getlists(0)
}else{
t.getlist()
window.console.log(res);
if (res.data.code == 200) {
if (types != this.types) {
// alert(1)
}
return;
}
});
},
watch:{
types(){
this.page = 0
this.dynamiclist = []
this.lock = false;
this.getlist()
window.console.log(this.page, 261);
if (this.page == 1) {
this.dynamiclist = res.data.data;
if (res.data.data.length < 20) {
this.text = "暂无更多数据";
}
window.console.log(1, res.data.data.length);
} else if (res.data.data.length > 0) {
this.dynamiclist.push(...res.data.data);
window.console.log(2);
if (res.data.data.length < 20) {
this.text = "暂无更多数据";
}
} else {
this.lock = true;
window.console.log(3, res.data.data.length > 0);
this.text = "暂无更多数据";
}
window.console.log(this.lock);
}
});
},
getlists(types) {
if (this.lock) {
return;
}
this.text = "加载中";
this.lock = true;
this.page += 1;
this.axios
.post("https://admin.lawpro.cn/api/login_main/getCollectList", {
token: localStorage.getItem("token"),
page: this.page
})
.then(res => {
this.lock = false;
if (types != this.types) window.console.log(res);
if (res.data.code == 200) {
// if(res.data.data.length == 0){
// return ;
// }
// alert(1)
window.console.log(this.page, 299);
if (this.page == 1) {
this.dynamiclist = res.data.data;
window.console.log(1, res.data.data.length);
if (res.data.data.length < 20) {
this.text = "暂无更多数据";
}
} else if (res.data.data.length > 0) {
this.dynamiclist.push(...res.data.data);
if (res.data.data.length < 20) {
this.text = "暂无更多数据";
}
window.console.log(2);
} else {
this.lock = true;
window.console.log(3);
this.text = "暂无更多数据";
}
window.console.log(this.lock);
}
});
}
},
beforeRouteLeave(a,b,c){
mounted() {
document.title = "个人中心";
if (localStorage.getItem("token") == "") {
this.$router.push({ path: "/login" });
}
this.axios
.post("https://admin.lawpro.cn/api/login_main/getUserDetails", {
token: localStorage.getItem("token")
})
.then(res => {
// this.imgurl = JSON.stringify(res)
// window.console.log(res.data)
if (res.data.code == 200) {
(this.userimg = res.data.data.user.avatar),
(this.username = res.data.data.user.nickname),
(this.myfollow = res.data.data.myfollow),
(this.attention = res.data.data.user.attention);
}
});
// this.axios
// .post("https://admin.lawpro.cn/api/login_main/getUserListDetails", {
// token: localStorage.getItem("token"),
// type: 4,
// page: 1
// })
// .then(res => {
// window.console.log(res);
// if (res.data.code == 200) {
// this.dynamiclist = res.data.data;
// }
// });
this.getlist(4);
var t = this;
window.$(window).scroll(() => {
});
c()
var windowH = window.$(window).height(); //
var documentH = window.$(document).height(); //
var scrollH = window.$(window).scrollTop(); //
// scrollH = $(document).scrollTop();
if (windowH + scrollH >= documentH) {
// do something
// alert(2);
// window.console.log(1);
if (this.types == 5) {
t.getlists(this.types);
} else {
t.getlist(this.types);
}
}
});
},
watch: {
types() {
// window.console.log(a,b)
// if(this.lock == true){
// this.types = b
// return ;
// }
this.page = 0;
this.dynamiclist = [];
this.lock = false;
if (this.types == 5) {
this.getlists(this.types);
} else {
this.getlist(this.types);
}
}
},
beforeRouteLeave(a, b, c) {
window.$(window).scroll(() => {});
c();
}
};
</script>

View File

@ -2,17 +2,21 @@
<div style="padding-top:0.88rem">
<heads></heads>
<div class="picbox">
<img :src=" 'http://lawpro.earnest.pro' +list.data.img" alt class="toppic" />
<img :src=" 'https://admin.lawpro.cn' +list.data.img" alt class="toppic" v-if="list.data.img" />
</div>
<follow
class="follow"
:img="'http://lawpro.earnest.pro' + list.user.avatar"
:img="'https://admin.lawpro.cn' + list.user.avatar"
:nickname="list.user.nickname"
:sole="list.user.industry_name"
:text="list.data.articlecontent"
:title="list.data.title"
:guanzhu="ifgz"
:like="list.data.islike"
:collect="list.data.collect"
:islike="list.data.isClick"
:iscllect="list.data.isCollect"
@pinglun="pinglu"
@guanzhu="gz"
></follow>
@ -32,17 +36,27 @@
<van-popup v-model="show" position="bottom" :style="{ height: '100%' }" class="linshi">
<div class="top">
<p class="tiao">{{plist.length}}条评论</p>
<p class="qie">
<img class="qiehuan" src="./assets/qiehuan.png" alt srcset /> 切换为时间排序
<p class="qie" @click="qshot">
<img class="qiehuan" src="./assets/qiehuan.png" alt srcset />
切换为{{shot == 0 ? '时间' : "默认"}}排序
</p>
<img class="quit" src="./assets/quit.png" alt @click="show = !show" />
<img class="quit" src="./assets/quit.png" alt @click="qshow" />
</div>
<div class="bodys">
<comment v-for="(item,index) in plist" :key="index"></comment>
<comment
v-for="(item,index) in plist"
:key="index"
:img="'https://admin.lawpro.cn/' + item.avatar"
:name="item.nickname"
:text="item.text"
></comment>
</div>
<div class="msg" v-show="msgs">{{msg}}</div>
<div class="reply">
<img @click="biaoqing = !biaoqing" src="./assets/baoqing.png" alt srcset />
<textarea placeholder="写下你的评论..." v-model="content"></textarea>
<textarea placeholder="写下你的评论..." v-model="content" @blur="body"></textarea>
<p @click="pfb">发布</p>
<div v-show="biaoqing">
<Emotion @emotion="handleEmotion" :height="4"></Emotion>
@ -69,8 +83,11 @@ export default {
biaoqing: false,
list: [],
plist: [],
userid:0,
ifgz:false
userid: 0,
ifgz: false,
shot: 0,
msg:"",
msgs:false
};
},
components: {
@ -83,44 +100,71 @@ export default {
Emotion
},
methods: {
gz(e){
if(e==1){
let t=this;
this.axios
.post("http://lawpro.earnest.pro/api/login_main/plusAttention", {
token:localStorage.getItem("token"),
passivity_id:t.userid,
type:2
}).then((res)=>{
window.console.log(res)
if(res.data.code==200){
this.ifgz=true
}
})
body(){
// alert(1)
// let a = window.document.body.scrollTop
// window.document.body && (window.document.body.scrollTop = a);
// window.scroll(0,0);
window.$(window).scrollTop(window.$(window).scrollTop)
},
qshow(){
window.console.log(window.$(window).scrollTop(window.$(window).scrollTop),1234)
this.show = !this.show
},
qshot(){
this.shot = this.shot == 0 ? 1 : 0
},
gz(e) {
if (e == 1) {
let t = this;
this.axios
.post("https://admin.lawpro.cn/api/login_main/plusAttention", {
token: localStorage.getItem("token"),
passivity_id: t.userid,
type: 2
})
.then(res => {
window.console.log(res);
if (res.data.code == 200) {
this.ifgz = true;
}
});
}
},
handleEmotion(i) {
this.content += i;
},
pfb() {
// alert(window.document.body.scrollTop)
this.msg = "发布中"
this.msgs= true
window.$(window).scrollTop(window.$(window).scrollTop)
if (localStorage.getItem("token") == "") {
this.$router.push("/login");
} else {
window.console.log(this.content);
if (this.content != "") {
this.axios
.post("http://lawpro.earnest.pro/api/login_main/appendComment", {
.post("https://admin.lawpro.cn/api/login_main/appendComment", {
text: this.content,
token: localStorage.getItem("token"),
type_id: this.$route.query.id,
type: 3
type: 1
})
.then(res => {
if (res.data.code == 200) {
this.pinglu(this.$route.query.id);
this.content = "";
this.msg="发布成功"
setTimeout(() => {
this.msgs = false;
}, 2000);
} else {
this.$router.push({
path: "/login"
});
}
});
}
@ -128,25 +172,48 @@ export default {
},
pinglu() {
// this.pid = id;
this.axios
.post("http://lawpro.earnest.pro/api/login_main/CommentList", {
.post("https://admin.lawpro.cn/api/login_main/CommentList", {
token: localStorage.getItem("token"),
type: 2,
type_id: this.$route.query.id
type: 1,
type_id: this.$route.query.id,
order: this.shot
})
.then(res => {
window.console.log(res);
this.plist = res.data.data.data;
// this.list = res.data.data;
this.show = true;
// alert(window.document.body.scrollTop)
});
}
},
watch: {
shot() {
this.pinglu();
}
},
mounted() {
window.console.log(window.document.body.scrollTop,123)
let sid = this.$route.query.sid ==undefined ? false : this.$route.query.sid
if(sid){
this.axios
.post("https://admin.lawpro.cn/api/main/plusTransmit ", {
transmitstatus: sid,
id: this.$route.query.id,
type: 1
})
.then(res => {
window.console.log(res);
});
}
// window.console.log(this.$route.query.userid,7946 )
this.userid=this.$route.query.userid
this.userid = this.$route.query.userid;
this.axios
.post("http://lawpro.earnest.pro/api/login_main/mainDetails", {
.post("https://admin.lawpro.cn/api/login_main/mainDetails", {
token: localStorage.getItem("token"),
id: this.$route.query.id,
type: 1
@ -154,6 +221,8 @@ export default {
.then(res => {
window.console.log(res);
this.list = res.data.data;
document.title=this.list.data.title
});
}
};
@ -165,9 +234,23 @@ export default {
}
.linshi {
z-index: 999999 !important;
.msg {
position: absolute;
padding: 10px;
max-width: 60%;
max-height: 70px;
border-radius: 5px;
background: #666;
box-sizing: border-box;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #fff;
}
.top {
background-color: #fff;
position: absolute;
z-index: 9999;
top: 0;
width: 100%;
height: 98px;
@ -211,6 +294,7 @@ export default {
}
}
.bodys {
z-index: 9000;
width: 100%;
height: 100%;
// background-color: #000;
@ -264,9 +348,9 @@ export default {
width: 100%;
color: #333333;
font-size: 0.36rem;
text-indent: 0.3rem;
// text-indent: 0.3rem;
line-height: 1rem;
font-weight: 500;
font-weight: 600;
}
.title {
color: #333333;

BIN
src/assets/collect.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

BIN
src/assets/collects.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

BIN
src/assets/home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

File diff suppressed because one or more lines are too long

BIN
src/assets/like.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

BIN
src/assets/likes.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

BIN
src/assets/login.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 132 KiB

View File

@ -3,17 +3,31 @@
<div class="center">{{title}}</div>
<div class="answer">
<div class="content">
<img v-if="img == ''?false : true " class="img" :src="'http://lawpro.earnest.pro' + img" alt srcset />
<p>{{text}}</p>
<img
v-if="img == ''?false : true "
class="img"
:src="'https://admin.lawpro.cn' + img"
alt
srcset
/>
<p v-html="text" style="white-space: pre-wrap;" ></p>
</div>
<div class="operation">
<div>
<!-- <div @click.stop="shar">
<img src="../assets/share.png" alt srcset />
分享
</div>
</div> -->
<div>
<img src="../assets/pl.png" alt srcset />
{{num}}回答
{{num}}{{type == 1 ? '评论':'回答'}}
</div>
<div @click.stop="clike">
<img :src="islike?plikes:plike" alt srcset />
{{like}}点赞
</div>
<div @click.stop="ccollect">
<img :src="iscllect?pcollects:pcollect" alt srcset />
{{collect}}收藏
</div>
<div v-show="false" class="more" @click="show = !show">
<div></div>
@ -40,7 +54,7 @@
.title {
display: flex;
justify-content: space-between;
font-size: 26px;
font-size: 16px;
color: #95998f;
margin-bottom: 28px;
}
@ -48,6 +62,20 @@
font-size: 30px;
color: #000;
line-height: 46px;
font-weight: bold;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
overflow:hidden;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
}
.answer {
.user {
@ -130,18 +158,17 @@
height: 101px;
position: absolute;
top: 55px;
background-color: #FFFFFF;
background-color: #ffffff;
left: -50px;
display: flex;
flex-direction: column;
justify-content: space-around;
padding-left: 20px;
box-sizing: border-box;
>p{
font-size: 22px;
color: #95998F;
box-sizing: border-box;
> p {
font-size: 22px;
color: #95998f;
}
&::after {
position: absolute;
@ -151,7 +178,7 @@
width: 0;
height: 0;
border-right: 7px solid transparent;
border-bottom: 10px solid #FFFFFF;
border-bottom: 10px solid #ffffff;
border-left: 7px solid transparent;
}
&::before {
@ -172,13 +199,78 @@
}
</style>
<script>
import plike from "../assets/like.png"
import plikes from "../assets/likes.png"
import pcollect from '../assets/collect.png'
import pcollects from '../assets/collects.png'
export default {
name: "PersonafFollow",
data() {
return {
show:false
show: false,
plike,
plikes,
pcollect,
pcollects
};
},
props:["title",'id','img','text','num']
props: ["title", "id", "img", "text", "num",'type','like','collect','islike','iscllect'],
methods: {
shar() {
const input = document.createElement("input");
document.body.appendChild(input);
var url = this.type==1?`http://mobile.lawpro.cn/articledetail?id=${this.id}` : `http://mobile.lawpro.cn/IndexArticleDetaill?id=${this.id}`
input.setAttribute("value", url);
input.select();
if (document.execCommand("copy")) {
document.execCommand("copy");
// window.console.log("");
alert("已复制链接,请到对应平台粘贴发布")
}
document.body.removeChild(input);
},
clike(){
this.axios.post("https://admin.lawpro.cn/api/login_main/clickLike",{
token:localStorage.getItem("token"),
type:this.type,
click_id:this.id,
status: 1
}).then((res)=>{
if(res.data.code != 200){
this.$router.push({
path:"/login"
})
}
if(this.islike){
this.like = parseInt(this.like) - 1
}else{
this.like = parseInt(this.like) + 1
}
this.islike = !this.islike
})
},
ccollect(){
this.axios.post("https://admin.lawpro.cn/api/login_main/plusCollect",{
token:localStorage.getItem("token"),
type:this.type,
id:this.id
}).then((res)=>{
if(res.data.code != 200){
this.$router.push({
path:"/login"
})
}
if(this.iscllect){
this.collect = parseInt(this.collect) - 1
}else{
this.collect = parseInt(this.collect) + 1
}
this.iscllect = !this.iscllect
})
}
}
};
</script>

View File

@ -1,5 +1,5 @@
<template>
<div class="PersonafFollow">
<div class="PersonafFollow" @click="tiaozhuan">
<div class="title">
<p>{{operation}}</p>
<p>{{day}}</p>
@ -15,20 +15,20 @@
</div>
<div class="agree">{{num}}人赞同了该回答</div>
<div class="content">
<img :src="img" alt srcset />
<img :src="img" v-if="!img" alt srcset />
<p>
{{text}}
</p>
</div>
<div class="operation">
<div>
<!-- <div>
<img src="../assets/share.png" alt="" srcset="">
分享
</div>
<div>
<img src="../assets/pl.png" alt="" srcset="">
{{comment}}评论
</div>
</div> -->
<div>
</div>
@ -125,6 +125,20 @@ export default {
data() {
return {};
},
props:['operation','day','title','userimg','nickname','img','role','num','text','comment']
props:['operation','day','title','userimg','nickname','img','role','num','text','comment','type','sid'],
methods:{
tiaozhuan(){
// alert(this.type)
if(this.type == 1){
this.$router.push({
path:"/articledetail?id=" + this.sid
})
}else{
this.$router.push({
path:"/IndexArticleDetaill?id=" + this.sid
})
}
}
}
};
</script>

View File

@ -21,10 +21,10 @@
</p>
</div>
<div class="operation">
<div>
<!-- <div>
<img src="../assets/share.png" alt="" srcset="">
分享
</div>
</div> -->
<div>
<img src="../assets/pl.png" alt="" srcset="">
{{comment}}评论

View File

@ -33,14 +33,26 @@ export default {
data() {
return {};
},
props:['operation','day','title',"types","id"],
props:['operation','day','title',"types","sid","type"],
methods:{
tab(){
window.console.log(this.types,"llk")
this.$emit("wz",this.types,this.id)
window.console.log( this.$router)
// window.console.log(this.types,"llk")
// this.$emit("wz",this.types,this.id)
// window.console.log( this.$router)
// }
// alert(this.type)
if(this.type == 1){
this.$router.push({
path:"/articledetail?id=" + this.sid
})
}else{
this.$router.push({
path:"/IndexArticleDetaill?id=" + this.sid
})
}
}
}
};
</script>

View File

@ -11,17 +11,25 @@
<div class="agree">{{num}}人赞同了该回答</div>
<div class="content" style="max-height: 6.1rem;">
<div v-html="text"></div>
<div v-html="text" style="white-space: pre-wrap;"></div>
<div class="gengduo" v-show="show" @click="shows">展开阅读全文</div>
</div>
<div class="operation">
<div>
<!-- <div @click="shar">
<img src="../assets/share.png" alt srcset />
分享
</div>
</div> -->
<div @click="pinglun">
<img src="../assets/pl.png" alt srcset />
{{comment}}评论
</div>
<div @click.stop="clike">
<img :src="islike?plikes:plike" alt srcset />
{{like}}点赞
</div>
<div @click.stop="ccollect">
<img :src="iscllect?pcollects:pcollect" alt srcset />
{{collect}}收藏
</div>
<div v-show="!show && lang" @click="hadd">收起</div>
</div>
@ -79,7 +87,7 @@
line-height: 40px;
font-size: 26px;
overflow: hidden;
img {
/deep/ img {
max-width: 690px;
// height: 374px;
// background-color: #000;
@ -87,6 +95,10 @@
margin-top: 39px;
margin-bottom: 32px;
}
/deep/ *{
line-height: 1.5;
font-size:26rpx;
}
// p {
// }
@ -118,7 +130,7 @@
}
}
> div:last-child {
margin-left: 300px;
margin-left: 150px;
margin-right: 0;
}
}
@ -126,12 +138,20 @@
}
</style>
<script>
import plike from "../assets/like.png"
import plikes from "../assets/likes.png"
import pcollect from '../assets/collect.png'
import pcollects from '../assets/collects.png'
export default {
name: "PersonafFollow",
data() {
return {
show: false,
lang: true
lang: true,
plike,
plikes,
pcollect,
pcollects
};
},
props: {
@ -141,10 +161,13 @@ export default {
userimg: {},
nickname: {},
role: {},
num: {},
like: {},
comment: {},
text: {},
sid:{}
sid:{},
collect:{},
islike:{},
iscllect:{}
},
methods: {
@ -160,6 +183,61 @@ export default {
},
pinglun(){
this.$emit("pinglu",this.sid)
},
shar() {
const input = document.createElement("input");
document.body.appendChild(input);
var url = `http://mobile.lawpro.cn/IndexArticleDetaill?id=${this.$route.query.id}`
input.setAttribute("value", url);
input.select();
if (document.execCommand("copy")) {
document.execCommand("copy");
// window.console.log("");
alert("已复制链接,请到对应平台粘贴发布")
}
document.body.removeChild(input);
},
clike(){
this.axios.post("https://admin.lawpro.cn/api/login_main/clickLike",{
token:localStorage.getItem("token"),
type:3,
click_id:this.sid,
status: 1
}).then((res)=>{
if(res.data.code != 200){
this.$router.push({
path:"/login"
})
}
if(this.islike){
this.like = parseInt(this.like) - 1
}else{
this.like = parseInt(this.like) + 1
}
this.islike = !this.islike
})
},
ccollect(){
this.axios.post("https://admin.lawpro.cn/api/login_main/plusCollect",{
token:localStorage.getItem("token"),
type:3,
id:this.sid
}).then((res)=>{
if(res.data.code != 200){
this.$router.push({
path:"/login"
})
}
if(this.iscllect){
this.collect = parseInt(this.collect) - 1
}else{
this.collect = parseInt(this.collect) + 1
}
this.iscllect = !this.iscllect
})
}
},
mounted() {

View File

@ -28,20 +28,28 @@
<!-- <div class="line"></div> -->
<!-- <div class="agree">1345人赞同了该回答</div> -->
<div class="agree">{{date}}</div>
<div class="content" v-html="text">
<div class="content" v-html="text" style="white-space: pre-wrap;">
<!-- <div v-ho></div> -->
<!-- <div v-show="show" @click="shows">展开阅读全文</div> -->
</div>
<div class="operation">
<div>
<!-- <div @click="shar">
<img src="../assets/share.png" alt srcset />
分享
</div>
</div> -->
<div @click="$emit('pinglun')">
<img src="../assets/pl.png" alt srcset />
{{num}}评论
</div>
<div></div>
<div @click.stop="clike">
<img :src="islike?plikes:plike" alt srcset />
{{like}}点赞
</div>
<div @click.stop="ccollect">
<img :src="iscllect?pcollects:pcollect" alt srcset />
{{collect}}收藏
</div>
<!-- <div></div> -->
<!-- <div v-show="!show && lang" @click="hadd">收起</div> -->
</div>
</div>
@ -58,10 +66,10 @@
height: auto;
width: 100%;
color: #333333;
font-size: 0.36rem;
text-indent: 0.3rem;
font-size: 0.3rem;
// text-indent: 0.3rem;
line-height: 0.45rem;
font-weight: 500;
font-weight: 600;
}
.title {
color: #333333;
@ -134,6 +142,10 @@
margin-top: 39px;
margin-bottom: 32px;
}
/deep/ *{
line-height: 1.5;
font-size: 26px;
}
> p {
line-height: 40px;
font-size: 26px;
@ -166,7 +178,7 @@
}
}
> div:last-child {
margin-left: 300px;
// margin-left: 300px;
margin-right: 0;
}
}
@ -198,12 +210,20 @@
}
</style>
<script>
import plike from "../assets/like.png"
import plikes from "../assets/likes.png"
import pcollect from '../assets/collect.png'
import pcollects from '../assets/collects.png'
export default {
name: "PersonafFollow",
data() {
return {
show: false,
lang: true
lang: true,
plike,
plikes,
pcollect,
pcollects
};
},
@ -221,6 +241,61 @@ export default {
var a = window.document.getElementsByClassName("content")[this.indexs];
a.style.setProperty("max-height", "6.1rem", "important");
this.show = true;
},
shar() {
const input = document.createElement("input");
document.body.appendChild(input);
var url = `http://mobile.lawpro.cn/articledetail?id=${this.$route.query.id}`
input.setAttribute("value", url);
input.select();
if (document.execCommand("copy")) {
document.execCommand("copy");
// window.console.log("");
alert("已复制链接,请到对应平台粘贴发布")
}
document.body.removeChild(input);
},
clike(){
this.axios.post("https://admin.lawpro.cn/api/login_main/clickLike",{
token:localStorage.getItem("token"),
type:1,
click_id:this.$route.query.id,
status: 1
}).then((res)=>{
if(res.data.code != 200){
this.$router.push({
path:"/login"
})
}
if(this.islike){
this.like = parseInt(this.like) - 1
}else{
this.like = parseInt(this.like) + 1
}
this.islike = !this.islike
})
},
ccollect(){
this.axios.post("https://admin.lawpro.cn/api/login_main/plusCollect",{
token:localStorage.getItem("token"),
type:1,
id:this.$route.query.id
}).then((res)=>{
if(res.data.code != 200){
this.$router.push({
path:"/login"
})
}
if(this.iscllect){
this.collect = parseInt(this.collect) - 1
}else{
this.collect = parseInt(this.collect) + 1
}
this.iscllect = !this.iscllect
})
}
},
mounted() {
@ -239,6 +314,6 @@ export default {
}
});
},
props:['img','nickname','sole','title','date','num','text','guanzhu']
props:['img','nickname','sole','title','date','num','text','guanzhu','like','collect','islike','iscllect']
};
</script>

View File

@ -1,11 +1,11 @@
<template>
<div class="recommend">
<div class="recommend" @click="link">
<div>
<p class="articlename">{{title}}</p>
<!-- <p class="articlecontent">在信息唾手可得的时代拉开人与人差距的不是知识含</p> -->
<div class="author"></div>
</div>
<img :src="img" alt class="pic" />
<img :src="img" v-if="img != 'https://admin.lawpro.cn' " alt class="pic" />
</div>
</template>
<style lang="scss" scoped>
@ -61,6 +61,19 @@ export default {
data() {
return {};
},
props:['title','img']
props: ["title", "img", "sid", "type"],
methods: {
link() {
if (this.type == 1) {
this.$router.push({
path: "/articledetail?id=" + this.sid
});
} else {
this.$router.push({
path: "/detaillurl?id=" + this.sid
});
}
}
}
};
</script>

View File

@ -1,18 +1,26 @@
<template>
<div class="indexfindall">
<p class="title">{{title}}</p>
<p class="title" v-html="titles" ></p>
<div class="content">
<div class="left">
<!-- <p class="text"> <b>职问</b>因为学习工作而在不同程度上变得麻木实际上长期从事法律</p> -->
<p class="text">{{content}}</p>
<p class="text" v-html="contents" style="white-space: pre-wrap;"></p>
<div class="operation">
<div>
<!-- <div>
<img src="../assets/share.png" alt class="icon" />
<p>分享</p>
</div>
</div> -->
<div>
<img src="../assets/pl.png" alt class="icon" />
<p>{{num}}条评论</p>
<p>{{num}}{{type == 1 ? '评论':'回答'}}</p>
</div>
<div @click.stop="clike">
<img :src="islike?plikes:plike" alt srcset />
<p>{{like}}点赞</p>
</div>
<div @click.stop="ccollect">
<img :src="iscllect?pcollects:pcollect" alt srcset />
<p>{{collect}}收藏</p>
</div>
</div>
</div>
@ -22,11 +30,19 @@
</template>
<script>
import plike from "../assets/like.png"
import plikes from "../assets/likes.png"
import pcollect from '../assets/collect.png'
import pcollects from '../assets/collects.png'
export default {
name: "indexfindall",
data() {
return {
aaa: "../assets/ad.png"
aaa: "../assets/ad.png",
plike,
plikes,
pcollect,
pcollects
};
},
props: {
@ -39,7 +55,67 @@ export default {
content: {
type: String
},
right: {}
right: {},
like:{},
collect:{},
islike:{},
iscllect:{},
id:{},
type:{},
keys:{}
},
methods:{
clike(){
this.axios.post("https://admin.lawpro.cn/api/login_main/clickLike",{
token:localStorage.getItem("token"),
type:this.type,
click_id:this.id,
status: 1
}).then((res)=>{
if(res.data.code != 200){
this.$router.push({
path:"/login"
})
}
if(this.islike){
this.like = parseInt(this.like) - 1
}else{
this.like = parseInt(this.like) + 1
}
this.islike = !this.islike
})
},
ccollect(){
this.axios.post("https://admin.lawpro.cn/api/login_main/plusCollect",{
token:localStorage.getItem("token"),
type:this.type,
id:this.id
}).then((res)=>{
if(res.data.code != 200){
this.$router.push({
path:"/login"
})
}
if(this.iscllect){
this.collect = parseInt(this.collect) - 1
}else{
this.collect = parseInt(this.collect) + 1
}
this.iscllect = !this.iscllect
})
}
},
computed:{
titles(){
return this.title.replace(new RegExp(this.keys,'gm'),"<span>"+this.keys+"</span>")
},
contents(){
return this.content.replace(new RegExp(this.keys,'gm'),"<span>"+this.keys+"</span>")
}
}
};
</script>
@ -51,10 +127,15 @@ export default {
background-color: white;
.title {
color: #333333;
font-size: 34px;
font-weight: 500;
font-size: 30px;
font-weight: bold;
padding: 0 41px;
text-indent: 0;
padding-top: 34px;
padding-bottom: 23px;
>span{
color: red;
}
}
.content {
width: 689px;
@ -62,19 +143,23 @@ export default {
margin: 0 auto;
display: flex;
padding-bottom: 41px;
// justify-content: center;
.left {
width: 457px;
.text {
color: #333333;
font-size: 28px;
font-size: 21px;
line-height: 35px;
overflow: hidden; //
display: -webkit-box; //
-webkit-box-orient: vertical; //--
-webkit-line-clamp: 2; //
text-overflow: ellipsis; //
>span{
color: red;
}
}
.operation {
// width: 271px;
@ -86,9 +171,13 @@ export default {
> div {
display: flex;
> p {
margin-right: 60px;
margin-right: 10px;
margin-left: 10px;
}
>img{
width: 18px;
height: 18px;
}
}
// justify-content: space-between;
@ -103,6 +192,7 @@ export default {
height: 139px;
border-radius: 5px;
margin-left: 23px;
object-fit: cover;
}
}
}

View File

@ -2,7 +2,7 @@
<div class="indexfindtab">
<p @click="change(0)" :class="no==0?'text':''">综合</p>
<p @click="change(5)" :class="no==5?'text':''">用户</p>
<p @click="change(2)" :class="no==2?'text':''">话题</p>
<!-- <p @click="change(2)" :class="no==2?'text':''">话题</p> -->
</div>
</template>

View File

@ -5,7 +5,7 @@
<div class="userinfo">
<div class="username">
<p>{{username}}</p>
<img src="../assets/renzheng.png" alt class="icon" />
<img :src="pic" alt class="icon" />
</div>
<p class="desc">{{desc}}</p>
<p class="desc1" v-if="ifnum">{{answer}} 回答·{{article}} 文章</p>

View File

@ -4,19 +4,22 @@
<div style="height:0.88rem"></div>
<div class="mnuelist">
<div @click="tab(0)">
<img src="../assets/index.png" alt="" class="icon">
首页</div>
<img src="../assets/index.png" alt class="icon" />
首页
</div>
<div @click="tab(1)">
<img src="../assets/mine.png" alt="" class="icon">
我的主页</div>
<img src="../assets/mine.png" alt class="icon" />
我的主页
</div>
<div @click="tab(2)">
<img src="../assets/logout.png" alt="" class="icon">
{{token==''?'登录':'退出登录'}}</div>
<img src="../assets/logout.png" alt class="icon" />
{{token=='' || token == null?'登录':'退出登录'}}
</div>
</div>
</van-popup>
<div class="head">
<img class="logo" src="../assets/logo1.png" alt srcset />
<img class="logo" src="../assets/logo1.png" alt srcset />
<div class="search">
<img src="../assets/zoom.png" alt />
<input type="text" placeholder="搜索" v-on:change="shuru" v-model="serch" />
@ -39,7 +42,7 @@
flex-direction: column;
color: #333;
font-size: 24px;
.icon{
.icon {
width: 26px;
height: 30px;
margin-right: 15px;
@ -56,7 +59,7 @@
align-items: center;
.logo {
width: 115px;
height: 37px;
// height: 37px;
// background-color: #000;
display: block;
margin-left: 30px;
@ -108,17 +111,17 @@ export default {
return {
show: false,
serch: "",
token:""
token: ""
};
},
mounted(){
window.console.log(localStorage.getItem("token")=='',465)
this.token=localStorage.getItem("token")
// if (localStorage.getItem("token") == ""){
// this.menu3=""
// }else{
// this.menu3="退"
// }
mounted() {
window.console.log(localStorage.getItem("token") == "", 465);
this.token = localStorage.getItem("token");
// if (localStorage.getItem("token") == ""){
// this.menu3=""
// }else{
// this.menu3="退"
// }
},
methods: {
isshow() {
@ -134,18 +137,25 @@ export default {
switch (e) {
case 0:
this.$router.push({
path: '/'
path: "/"
});
break;
case 1:
this.$router.push({
path: '/PersonalHomepage'
});
if (this.token == "" || this.token == null) {
this.$router.push({
path: "/login"
});
} else {
this.$router.push({
path: "/PersonalHomepage"
});
}
break;
case 2:
localStorage.setItem('toekn',"")
localStorage.clear();
this.$router.push({
path: '/login'
path: "/login"
});
break;
}

View File

@ -1,5 +1,5 @@
<template>
<div class="recommend">
<div class="recommend" @click="link">
<div>
<p class="articlename" style="width:100%">{{title}}</p>
<!-- <p class="articlecontent">在信息唾手可得的时代拉开人与人差距的不是知识含</p> -->
@ -62,6 +62,20 @@ export default {
}
},
props:['title']
props:['title','sid','type'],
methods:{
link(){
if(this.type == 1){
this.$router.push({
path:"articledetail?id=" + this.sid
})
}else{
this.$router.push({
path:"IndexArticleDetaill?id=" + this.sid
})
}
}
}
};
</script>

22
src/detaillurl.vue Normal file
View File

@ -0,0 +1,22 @@
<template>
<div></div>
</template>
<style scoped>
</style>
<script>
export default {
name:"url",
data(){
return {
}
},
mounted(){
this.$router.replace({
path:"/IndexArticleDetaill?id=" + this.$route.query.id
})
}
}
</script>

View File

@ -2,17 +2,31 @@
<div class="box">
<heads></heads>
<div class="list">
<div v-for="(item,index) in list" :key="index" @click="todetail(item.id,item.type,item.user_id)" >
<div
v-for="(item,index) in list"
:key="index"
@click="todetail(item.id,item.type,item.user_id)"
>
<list
:title="item.title"
:id="item.id"
:num="item.comment"
:num="item.type == 1 ?item.comment:item.answer"
:img="item.img"
:text="item.text"
:type="item.type"
:like="item.islike"
:collect="item.collect"
:islike="item.isClick"
:iscllect="item.isCollect"
></list>
</div>
<div style="width:100%;height:0.5rem;text-align:center;line-height:0.3rem">{{text}}</div>
<div
style="width:100%;height:0.5rem;text-align:center;line-height:0.5rem;display:flex; flex-direction: column; align-items: center;font-size:0.2rem;"
>
<img :src="login" style="width:0.5rem" alt v-if="text == '加载中' " />
{{text}}
</div>
<!-- <list></list>
<list></list>-->
</div>
@ -33,6 +47,7 @@
<script>
import list from "./components/IndexList";
import heads from "./components/indexhead";
import login from "./assets/login.gif"
export default {
name: "index",
data() {
@ -40,11 +55,11 @@ export default {
list: [],
page: 1,
lock: false,
text: "加载中"
text: "加载中",
login
};
},
methods: {
getlist() {
if (this.lock) {
return "lock";
@ -53,7 +68,8 @@ export default {
var t = this;
this.page += 1;
this.axios
.post("http://lawpro.earnest.pro/api/login_main/articleList", {
.post("https://admin.lawpro.cn/api/Login_main/articleList", {
token: localStorage.getItem("token"),
page: t.page
})
.then(res => {
@ -61,11 +77,11 @@ export default {
t.list = t.list.concat(res.data.data);
t.lock = false;
} else {
t.text = "暂无更多";
t.text = "暂无更多数据";
}
});
},
todetail(e, type,userid) {
todetail(e, type, userid) {
window.console.log(e);
if (type == 2) {
this.$router.push({
@ -73,7 +89,7 @@ export default {
});
} else {
this.$router.push({
path: `/articledetail?id=` + e+`&userid=`+userid
path: `/articledetail?id=` + e + `&userid=` + userid
});
}
}
@ -83,10 +99,12 @@ export default {
heads
},
mounted() {
document.title="Lawpro社区"
var t = this;
this.axios
.post("http://lawpro.earnest.pro/api/login_main/articleList", {
page: t.page
.post("https://admin.lawpro.cn/api/Login_main/articleList", {
page: t.page,
token: localStorage.getItem("token")
})
.then(res => {
window.console.log(res.data);
@ -108,12 +126,11 @@ export default {
t.text = "暂无数据";
}
});
window.console.log(this.wxcfg)
},
beforeRouteLeave(a,b,c){
window.$(window).scroll(() => {
});
c()
beforeRouteLeave(a, b, c) {
window.$(window).scroll(() => {});
c();
}
};
</script>

View File

@ -7,7 +7,7 @@
<p>+86</p>
<img src="./assets/order.png" alt class="order" />
<div class="line"></div>
<input type="text" class="shuru" placeholder="输入手机号" v-model="tel" />
<input type="number" class="shuru" placeholder="输入手机号" v-model="tel" />
</div>
<div class="tel yzm">
@ -76,6 +76,7 @@ export default {
},
mounted(){
window.localStorage.setItem('token','')
// alert(this.yzs)
},
methods: {
open() {
@ -92,11 +93,13 @@ export default {
yz() {
let yz = "";
if (this.tel != "") {
if (this.tel != "" && (/^1[3456789]\d{9}$/.test(this.tel))) {
if (this.yzs != "获取验证码") {
return;
} else {
let t = this;
t.yzs = t.miao + "秒";
t.miao = t.miao - 1;
let a = setInterval(() => {
t.yzs = t.miao + "秒";
t.miao = t.miao - 1;
@ -110,11 +113,12 @@ export default {
window.console.log("aaaa");
var t = this;
this.axios
.post("http://lawpro.earnest.pro/api/Main/Verification", {
.post("https://admin.lawpro.cn/api/Main/Verification", {
mobile: this.tel
})
.then(function(res) {
window.console.log(res.data.data);
yz = res.data.data.yz;
t.yztoken = yz;
t.ifsign = res.data.data.register;
@ -123,7 +127,7 @@ export default {
window.console.log(error);
});
} else {
window.console.log("请输入正确的手机号");
alert("请输入正确的手机号");
}
},
sub() {
@ -133,7 +137,7 @@ export default {
if (t.ifsign) {
if (t.tel && t.yzm) {
this.axios
.post("http://lawpro.earnest.pro/api/Main/isVerification", {
.post("https://admin.lawpro.cn/api/Main/isVerification", {
Verification: t.yzm,
yz: this.yztoken,
mobile: this.tel
@ -141,7 +145,7 @@ export default {
.then(res => {
if (res.data.code == 200) {
this.axios
.post("http://lawpro.earnest.pro/api/Main/sign", {
.post("https://admin.lawpro.cn/api/Main/sign", {
yz: t.yztoken,
Verification: t.yzm,
mobile: this.tel
@ -249,8 +253,9 @@ export default {
background-color: white;
margin: auto 0;
color: #6b9147;
font-size: 24px;
font-size: 22px;
line-height: 54px;
white-space:nowrap;
}
.ale {
height: 58px;

View File

@ -1,7 +1,7 @@
<template>
<div class="login">
<div class="logo">
<img src="./assets/quit.png" alt class="close" />
<!-- <img src="./assets/quit.png" alt class="close" /> -->
</div>
<!-- <div class="tel">
<p>+86</p>
@ -18,15 +18,15 @@
<!-- <button class="getyzm">发送验证码</button> -->
</div>
<div class="ale">
<p class="alert">未注册手机验证后自动登录</p>
<p>注册即同意隐私保护指引</p>
<!-- <p class="alert">未注册手机验证后自动登录</p> -->
<!-- <p>注册即同意隐私保护指引</p> -->
</div>
<button class="submit" @click="sub">登录</button>
<div class="other">
<p>密码登录</p>
<p @click="open">需要帮助</p>
<!-- <p>密码登录</p> -->
<!-- <p @click="open">需要帮助</p> -->
</div>
<div class="ways">
<!-- <div class="ways">
<div class="top">
<div class="line"></div>
<p class="text">社交帐号登录</p>
@ -37,7 +37,7 @@
<img src="./assets/weibo.png" alt class="icon" />
<img src="./assets/qq.png" alt class="icon" />
</div>
</div>
</div> -->
<div class="tanchuangbox" v-if="ifshow">
<div class="tanchuang">
<p class="desc desc1">找回密码</p>
@ -57,6 +57,9 @@ export default {
pwd:""
};
},
mounted(){
document.title = "登录"
},
methods: {
open() {
this.ifshow=true
@ -67,11 +70,17 @@ export default {
sub(){
let t=this;
this.axios.post("http://lawpro.earnest.pro/api/Main/login",{uname:t.username,password:t.pwd}).then((res)=>{
localStorage.setItem('token', res.data.data)
this.axios.post("https://admin.lawpro.cn/api/Main/login",{uname:t.username,password:t.pwd}).then((res)=>{
if(res.data.code == 200){
localStorage.setItem('token', res.data.data)
this.$router.push({
path: `/index`,
path: `/PersonalHomepage`,
})
}else{
alert("登录失败,请重试")
}
})
}
}
@ -103,6 +112,7 @@ export default {
display: flex;
border-bottom: 2px solid #dfdfdf;
margin-left: 30px;
padding: 10px 0;
.order {
width: 13px;
height: 24px;
@ -118,7 +128,7 @@ export default {
}
.shuru {
width: 75%;
height: 74px;
height: 44px;
color: #333333;
font-size: 28px;
margin: auto 0;

View File

@ -1,13 +1,92 @@
import Vue from 'vue'
import App from './App.vue'
import router from "./router"
// import wx from "./assets/jweixin-1.6.0"
import wx from 'weixin-js-sdk'
// let wx = require("./assets/jweixin-1.6.0")
import { Popup } from 'vant';
Vue.use(Popup);
Vue.config.productionTip = false
import axios from "axios"
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
Vue.prototype.axios = axios
new Vue({
let el = new Vue({
render: h => h(App),
router
}).$mount('#app')
let gettitle = () => {
return new Promise((res) => {
setInterval(() => {
if (document.title != 'Lawpro社区' || GetUrlRelativePath() == "/") {
res(document.title)
}
}, 200)
})
}
function GetUrlRelativePath() {
var url = document.location.toString();
var arrUrl = url.split("//");
var start = arrUrl[1].indexOf("/");
var relUrl = arrUrl[1].substring(start);//stop省略截取从start开始到结尾的所有字符
if (relUrl.indexOf("?") != -1) {
relUrl = relUrl.split("?")[0];
}
return relUrl;
}
el.axios({url:"https://admin.lawpro.cn/api/main/wxfx",method:'POST',data:"url="+window.location.href.replace(/&/g, '#')}).then((res) => {
// window.console.log(res)
// alert(JSON.stringify(res.data.data))
if (res.data.code == 200) {
let data = res.data.data
let wxcfg = {
debug: false,
appId: data.appId,
timestamp: data.timestamp,
nonceStr: data.nonceStr,
signature: data.signature,
jsApiList: [
// 所有要调用的 API 都要加到这个列表中
'checkJsApi',
'onMenuShareTimeline',
'onMenuShareAppMessage',
'onMenuShareQQ',
'onMenuShareWeibo',
'onMenuShareQZone'
]
}
gettitle().then((res) => {
// window.console.log(res)
// el.wxcfg.
wx.config({
...wxcfg
});
let href = window.location.href
wx.ready(function () {
//分享到朋友圈
wx.onMenuShareTimeline({
title: res + " -Lawpro.cn", // 分享标题
link: href,
imgUrl: 'https://admin.lawpro.cn/uploads/image/logo.jpg'
});
//分享给朋友
wx.onMenuShareAppMessage({
title: res,
desc: '',
link: href,
imgUrl: 'https://admin.lawpro.cn/uploads/image/logo.jpg', // 分享图标
trigger: function () {
// 不要尝试在trigger中使用ajax异步请求修改本次分享的内容因为客户端分享操作是一个同步操作这时候使用ajax的回包会还没有返回
},
fail: function (res) {
alert(JSON.stringify(res));
}
});
});
})
}
})

View File

@ -7,7 +7,7 @@ import index from "./index"
// import PersonalHomepage from "./PersonalHomepage"
import ManualAppeal from "./ManualAppeal"
import IndexArticleDetail from "./IndexArticleDetail"
import login from "./login"
// import login from "./login"
import loginpwd from "./loginpwd"
import indexfind from "./IndexFind"
import IndexReport from "./IndexReport"
@ -16,9 +16,10 @@ import IndexReport2 from "./IndexReport2"
import Answer from "./Answer"
import sign from "./sign"
import ArticleDetail from "./articledetail.vue"
import detaillurl from "./detaillurl"
Vue.use(Router)
const router=new Router({
mode:'hash',
mode:"history",
routes: [
{
path: '/articledetail',
@ -50,11 +51,11 @@ const router=new Router({
},
{
path: '/login',
component: login
component: loginpwd
},
{
path: '/',
component: index
component: index,
},
{
path: '/IndexArticleDetaill',
@ -72,8 +73,22 @@ const router=new Router({
{
path: '/Answer',
component: Answer
},
{
path:"/detaillurl",
component:detaillurl
}
]
});
router.beforeEach((to, from, next) => {
// window.console.log(to,from);
// location.href = "loaclhost:8080" + to.fullPath
window.console.log(to,from,88)
next()
if(from.name !== null){
window.location.reload();
}
})
export default router;

View File

@ -44,8 +44,16 @@ export default {
sign(){
let t=this;
window.console.log(t. $route.query.yztoken,t.$route.query.yzm)
this.axios.post("http://lawpro.earnest.pro/api/Main/sign",{yz:t. $route.query.yztoken,Verification:t.$route.query.yzm,mobile:t.$route.query.tel,username:t.username,password:t.pwd}).then((res)=>{
this.axios.post("https://admin.lawpro.cn/api/Main/sign",{yz:t. $route.query.yztoken,Verification:t.$route.query.yzm,mobile:t.$route.query.tel,username:t.username,password:t.pwd}).then((res)=>{
localStorage.setItem('token', res.data.data)
}).then((res)=>{
if(res.data.code == 200){
this.$router({
path:"/"
})
}else{
alert(this.data.msg)
}
})
}
}

View File

@ -5561,10 +5561,10 @@ node-releases@^1.1.40:
dependencies:
semver "^6.3.0"
node-sass@^4.13.0:
version "4.13.0"
resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.13.0.tgz#b647288babdd6a1cb726de4545516b31f90da066"
integrity sha512-W1XBrvoJ1dy7VsvTAS5q1V45lREbTlZQqFbiHb3R3OTTCma0XBtuG6xZ6Z4506nR4lmHPTqVRwxT6KgtWC97CA==
node-sass@^4.13.1:
version "4.13.1"
resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.13.1.tgz#9db5689696bb2eec2c32b98bfea4c7a2e992d0a3"
integrity sha512-TTWFx+ZhyDx1Biiez2nB0L3YrCZ/8oHagaDalbuBSlqXgUPsdkUSzJsVxeDO9LtPB49+Fh3WQl3slABo6AotNw==
dependencies:
async-foreach "^0.1.3"
chalk "^1.1.1"
@ -8598,6 +8598,11 @@ websocket-extensions@>=0.1.1:
resolved "https://registry.npm.taobao.org/websocket-extensions/download/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29"
integrity sha1-XS/yKXcAPsaHpLhwc9+7rBRszyk=
weixin-js-sdk@^1.4.0-test:
version "1.4.0-test"
resolved "https://registry.npm.taobao.org/weixin-js-sdk/download/weixin-js-sdk-1.4.0-test.tgz#612bbafcc97ad84f5afe6dc84701534cc59fc3ca"
integrity sha1-YSu6/Ml62E9a/m3IRwFTTMWfw8o=
which-module@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f"