This commit is contained in:
pplokijuhyg 2019-12-04 17:24:57 +08:00
parent 07f79a8140
commit f7a457dfec
13 changed files with 178 additions and 62 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -28,6 +28,7 @@
:title="item.title" :title="item.title"
:img="'http://lawpro.earnest.pro' +item.img" :img="'http://lawpro.earnest.pro' +item.img"
:sid="item.id" :sid="item.id"
:type="item.type"
></articles> ></articles>
<!-- <articles></articles> --> <!-- <articles></articles> -->
@ -39,6 +40,7 @@
:key="index" :key="index"
:title="item.title" :title="item.title"
:sid="item.id" :sid="item.id"
:type="item.type"
></privates> ></privates>
<!-- <articles></articles> --> <!-- <articles></articles> -->
@ -47,7 +49,8 @@
<div class="top"> <div class="top">
<p class="tiao">{{plist.length}}条评论</p> <p class="tiao">{{plist.length}}条评论</p>
<p class="qie" @click="shot = shot == 0 ? 1 : 0"> <p class="qie" @click="shot = shot == 0 ? 1 : 0">
<img class="qiehuan" src="./assets/qiehuan.png" alt srcset /> 切换为{{shot == 0 ? '时间' : "默认"}}排序 <img class="qiehuan" src="./assets/qiehuan.png" alt srcset />
切换为{{shot == 0 ? '时间' : "默认"}}排序
</p> </p>
<img class="quit" src="./assets/quit.png" alt @click="show = !show" /> <img class="quit" src="./assets/quit.png" alt @click="show = !show" />
</div> </div>
@ -94,7 +97,7 @@ export default {
pid: 0, pid: 0,
msg: "发布成功", msg: "发布成功",
msgs: false, msgs: false,
shot:0 shot: 0
}; };
}, },
components: { components: {
@ -124,12 +127,12 @@ export default {
if (res.data.code == 200) { if (res.data.code == 200) {
this.pinglu(this.pid); this.pinglu(this.pid);
this.content = ""; this.content = "";
this.msgs = true this.msgs = true;
setTimeout(()=>{ setTimeout(() => {
this.msgs = false this.msgs = false;
},2000) }, 2000);
}else{ } else {
this.$router.push({path:"/login"}) this.$router.push({ path: "/login" });
} }
}); });
} }
@ -147,7 +150,7 @@ export default {
token: localStorage.getItem("token"), token: localStorage.getItem("token"),
type: 3, type: 3,
type_id: id, type_id: id,
order:this.shot order: this.shot
}) })
.then(res => { .then(res => {
window.console.log(res); window.console.log(res);
@ -156,9 +159,9 @@ export default {
}); });
} }
}, },
watch:{ watch: {
shot(){ shot() {
this.pinglu(this.pid) this.pinglu(this.pid);
} }
}, },
mounted() { mounted() {
@ -199,11 +202,10 @@ export default {
border-radius: 5px; border-radius: 5px;
background: #666; background: #666;
box-sizing: border-box; box-sizing: border-box;
top:50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
color: #fff; color: #fff;
} }
.top { .top {
background-color: #fff; background-color: #fff;

View File

@ -177,7 +177,7 @@ export default {
} }
this.lock = true this.lock = true
this.page += 1 this.page += 1
this.axios.post("http://lawpro.earnest.pro/api/login_main/getUserListDetails",{ this.axios.post("http://lawpro.earnest.pro/api/login_main/getCollectList",{
token:localStorage.getItem("token"), token:localStorage.getItem("token"),
page:this.page page:this.page
}).then((res)=>{ }).then((res)=>{
@ -197,7 +197,7 @@ export default {
}, },
mounted(){ mounted(){
if(localStorage.getItem('token') == ""){ if(localStorage.getItem('token') == ""){
this.$router.push("/login") this.$router.push({path:"/login"})
} }
this.axios.post('http://lawpro.earnest.pro/api/login_main/getUserDetails',{ this.axios.post('http://lawpro.earnest.pro/api/login_main/getUserDetails',{
token:localStorage.getItem("token") token:localStorage.getItem("token")
@ -245,7 +245,12 @@ export default {
this.page = 0 this.page = 0
this.dynamiclist = [] this.dynamiclist = []
this.lock = false; this.lock = false;
if(this.types == 5){
this.getlists(0)
}else{
this.getlist() this.getlist()
}
} }
}, },
beforeRouteLeave(a,b,c){ beforeRouteLeave(a,b,c){

View File

@ -32,13 +32,20 @@
<van-popup v-model="show" position="bottom" :style="{ height: '100%' }" class="linshi"> <van-popup v-model="show" position="bottom" :style="{ height: '100%' }" class="linshi">
<div class="top"> <div class="top">
<p class="tiao">{{plist.length}}条评论</p> <p class="tiao">{{plist.length}}条评论</p>
<p class="qie"> <p class="qie" @click="shot = shot == 0 ? 1 : 0">
<img class="qiehuan" src="./assets/qiehuan.png" alt srcset /> 切换为时间排序 <img class="qiehuan" src="./assets/qiehuan.png" alt srcset />
切换为{{shot == 0 ? '时间' : "默认"}}排序
</p> </p>
<img class="quit" src="./assets/quit.png" alt @click="show = !show" /> <img class="quit" src="./assets/quit.png" alt @click="show = !show" />
</div> </div>
<div class="bodys"> <div class="bodys">
<comment v-for="(item,index) in plist" :key="index"></comment> <comment
v-for="(item,index) in plist"
:key="index"
:img="'http://lawpro.earnest.pro/' + item.avatar"
:name="item.nickname"
:text="item.text"
></comment>
</div> </div>
<div class="reply"> <div class="reply">
<img @click="biaoqing = !biaoqing" src="./assets/baoqing.png" alt srcset /> <img @click="biaoqing = !biaoqing" src="./assets/baoqing.png" alt srcset />
@ -69,8 +76,9 @@ export default {
biaoqing: false, biaoqing: false,
list: [], list: [],
plist: [], plist: [],
userid:0, userid: 0,
ifgz:false ifgz: false,
shot: 0
}; };
}, },
components: { components: {
@ -83,22 +91,22 @@ export default {
Emotion Emotion
}, },
methods: { methods: {
gz(e){ gz(e) {
if(e==1){ if (e == 1) {
let t=this; let t = this;
this.axios this.axios
.post("http://lawpro.earnest.pro/api/login_main/plusAttention", { .post("http://lawpro.earnest.pro/api/login_main/plusAttention", {
token:localStorage.getItem("token"), token: localStorage.getItem("token"),
passivity_id:t.userid, passivity_id: t.userid,
type:2 type: 2
}).then((res)=>{
window.console.log(res)
if(res.data.code==200){
this.ifgz=true
}
}) })
.then(res => {
window.console.log(res);
if (res.data.code == 200) {
this.ifgz = true;
}
});
} }
}, },
handleEmotion(i) { handleEmotion(i) {
this.content += i; this.content += i;
@ -114,13 +122,17 @@ export default {
text: this.content, text: this.content,
token: localStorage.getItem("token"), token: localStorage.getItem("token"),
type_id: this.$route.query.id, type_id: this.$route.query.id,
type: 3 type: 1
}) })
.then(res => { .then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.pinglu(this.$route.query.id); this.pinglu(this.$route.query.id);
this.content = ""; this.content = "";
} else {
this.$router.push({
path: "/login"
});
} }
}); });
} }
@ -131,8 +143,9 @@ export default {
this.axios this.axios
.post("http://lawpro.earnest.pro/api/login_main/CommentList", { .post("http://lawpro.earnest.pro/api/login_main/CommentList", {
token: localStorage.getItem("token"), token: localStorage.getItem("token"),
type: 2, type: 1,
type_id: this.$route.query.id type_id: this.$route.query.id,
order: this.shot
}) })
.then(res => { .then(res => {
window.console.log(res); window.console.log(res);
@ -142,9 +155,14 @@ export default {
}); });
} }
}, },
watch: {
shot() {
this.pinglu();
}
},
mounted() { mounted() {
// window.console.log(this.$route.query.userid,7946 ) // window.console.log(this.$route.query.userid,7946 )
this.userid=this.$route.query.userid this.userid = this.$route.query.userid;
this.axios this.axios
.post("http://lawpro.earnest.pro/api/login_main/mainDetails", { .post("http://lawpro.earnest.pro/api/login_main/mainDetails", {
token: localStorage.getItem("token"), token: localStorage.getItem("token"),

View File

@ -3,11 +3,17 @@
<div class="center">{{title}}</div> <div class="center">{{title}}</div>
<div class="answer"> <div class="answer">
<div class="content"> <div class="content">
<img v-if="img == ''?false : true " class="img" :src="'http://lawpro.earnest.pro' + img" alt srcset /> <img
v-if="img == ''?false : true "
class="img"
:src="'http://lawpro.earnest.pro' + img"
alt
srcset
/>
<p>{{text}}</p> <p>{{text}}</p>
</div> </div>
<div class="operation"> <div class="operation">
<div> <div @click.stop="shar">
<img src="../assets/share.png" alt srcset /> <img src="../assets/share.png" alt srcset />
分享 分享
</div> </div>
@ -130,7 +136,7 @@
height: 101px; height: 101px;
position: absolute; position: absolute;
top: 55px; top: 55px;
background-color: #FFFFFF; background-color: #ffffff;
left: -50px; left: -50px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -138,10 +144,9 @@
padding-left: 20px; padding-left: 20px;
box-sizing: border-box; box-sizing: border-box;
>p{ > p {
font-size: 22px; font-size: 22px;
color: #95998F; color: #95998f;
} }
&::after { &::after {
position: absolute; position: absolute;
@ -151,7 +156,7 @@
width: 0; width: 0;
height: 0; height: 0;
border-right: 7px solid transparent; border-right: 7px solid transparent;
border-bottom: 10px solid #FFFFFF; border-bottom: 10px solid #ffffff;
border-left: 7px solid transparent; border-left: 7px solid transparent;
} }
&::before { &::before {
@ -176,9 +181,25 @@ export default {
name: "PersonafFollow", name: "PersonafFollow",
data() { data() {
return { return {
show:false show: false
}; };
}, },
props:["title",'id','img','text','num'] props: ["title", "id", "img", "text", "num",'type'],
methods: {
shar() {
const input = document.createElement("input");
document.body.appendChild(input);
var url = this.type==1?`http://www.lawpro.cn/m/#/articledetail?id=${this.id}` : `http://www.lawpro.cn/m/#/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);
}
}
}; };
</script> </script>

View File

@ -15,7 +15,7 @@
<div class="gengduo" v-show="show" @click="shows">展开阅读全文</div> <div class="gengduo" v-show="show" @click="shows">展开阅读全文</div>
</div> </div>
<div class="operation"> <div class="operation">
<div> <div @click="shar">
<img src="../assets/share.png" alt srcset /> <img src="../assets/share.png" alt srcset />
分享 分享
</div> </div>
@ -160,6 +160,20 @@ export default {
}, },
pinglun(){ pinglun(){
this.$emit("pinglu",this.sid) this.$emit("pinglu",this.sid)
},
shar() {
const input = document.createElement("input");
document.body.appendChild(input);
var url = `http://www.lawpro.cn/m//#/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);
} }
}, },
mounted() { mounted() {

View File

@ -33,7 +33,7 @@
<!-- <div v-show="show" @click="shows">展开阅读全文</div> --> <!-- <div v-show="show" @click="shows">展开阅读全文</div> -->
</div> </div>
<div class="operation"> <div class="operation">
<div> <div @click="shar">
<img src="../assets/share.png" alt srcset /> <img src="../assets/share.png" alt srcset />
分享 分享
</div> </div>
@ -221,6 +221,20 @@ export default {
var a = window.document.getElementsByClassName("content")[this.indexs]; var a = window.document.getElementsByClassName("content")[this.indexs];
a.style.setProperty("max-height", "6.1rem", "important"); a.style.setProperty("max-height", "6.1rem", "important");
this.show = true; this.show = true;
},
shar() {
const input = document.createElement("input");
document.body.appendChild(input);
var url = `http://www.lawpro.cn/m/#/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);
} }
}, },
mounted() { mounted() {

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="recommend"> <div class="recommend" @click="link">
<div> <div>
<p class="articlename">{{title}}</p> <p class="articlename">{{title}}</p>
<!-- <p class="articlecontent">在信息唾手可得的时代拉开人与人差距的不是知识含</p> --> <!-- <p class="articlecontent">在信息唾手可得的时代拉开人与人差距的不是知识含</p> -->
@ -61,6 +61,20 @@ export default {
data() { data() {
return {}; 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:"IndexArticleDetaill?id=" + this.sid
})
}
}
}
}; };
</script> </script>

View File

@ -53,6 +53,8 @@ export default {
color: #333333; color: #333333;
font-size: 34px; font-size: 34px;
font-weight: 500; font-weight: 500;
padding: 0 41px;
text-indent:0;
padding-top: 34px; padding-top: 34px;
padding-bottom: 23px; padding-bottom: 23px;
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="recommend"> <div class="recommend" @click="link">
<div> <div>
<p class="articlename" style="width:100%">{{title}}</p> <p class="articlename" style="width:100%">{{title}}</p>
<!-- <p class="articlecontent">在信息唾手可得的时代拉开人与人差距的不是知识含</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> </script>

View File

@ -9,6 +9,7 @@
:num="item.comment" :num="item.comment"
:img="item.img" :img="item.img"
:text="item.text" :text="item.text"
:type="item.type"
></list> ></list>
</div> </div>

View File

@ -7,7 +7,7 @@
<p>+86</p> <p>+86</p>
<img src="./assets/order.png" alt class="order" /> <img src="./assets/order.png" alt class="order" />
<div class="line"></div> <div class="line"></div>
<input type="text" class="shuru" placeholder="输入手机号" v-model="tel" /> <input type="number" class="shuru" placeholder="输入手机号" v-model="tel" />
</div> </div>
<div class="tel yzm"> <div class="tel yzm">
@ -92,11 +92,13 @@ export default {
yz() { yz() {
let yz = ""; let yz = "";
if (this.tel != "") { if (this.tel != "" && (/^1[3456789]\d{9}$/.test(this.tel))) {
if (this.yzs != "获取验证码") { if (this.yzs != "获取验证码") {
return; return;
} else { } else {
let t = this; let t = this;
t.yzs = t.miao + "秒";
t.miao = t.miao - 1;
let a = setInterval(() => { let a = setInterval(() => {
t.yzs = t.miao + "秒"; t.yzs = t.miao + "秒";
t.miao = t.miao - 1; t.miao = t.miao - 1;
@ -115,6 +117,7 @@ export default {
}) })
.then(function(res) { .then(function(res) {
window.console.log(res.data.data); window.console.log(res.data.data);
yz = res.data.data.yz; yz = res.data.data.yz;
t.yztoken = yz; t.yztoken = yz;
t.ifsign = res.data.data.register; t.ifsign = res.data.data.register;
@ -123,7 +126,7 @@ export default {
window.console.log(error); window.console.log(error);
}); });
} else { } else {
window.console.log("请输入正确的手机号"); alert("请输入正确的手机号");
} }
}, },
sub() { sub() {

View File

@ -46,6 +46,14 @@ export default {
window.console.log(t. $route.query.yztoken,t.$route.query.yzm) 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("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)=>{
localStorage.setItem('token', res.data.data) localStorage.setItem('token', res.data.data)
}).then((res)=>{
if(res.data.code == 200){
this.$router({
path:"/"
})
}else{
alert(this.data.msg)
}
}) })
} }
} }