diff --git a/dist.zip b/dist.zip index 90572a0..659c6dd 100644 Binary files a/dist.zip and b/dist.zip differ diff --git a/src/IndexArticleDetail.vue b/src/IndexArticleDetail.vue index cfdd750..e7da73c 100644 --- a/src/IndexArticleDetail.vue +++ b/src/IndexArticleDetail.vue @@ -28,6 +28,7 @@ :title="item.title" :img="'http://lawpro.earnest.pro' +item.img" :sid="item.id" + :type="item.type" > @@ -39,6 +40,7 @@ :key="index" :title="item.title" :sid="item.id" + :type="item.type" > @@ -47,7 +49,8 @@

{{plist.length}}条评论

- 切换为{{shot == 0 ? '时间' : "默认"}}排序 + + 切换为{{shot == 0 ? '时间' : "默认"}}排序

@@ -94,7 +97,7 @@ export default { pid: 0, msg: "发布成功", msgs: false, - shot:0 + shot: 0 }; }, components: { @@ -124,12 +127,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.msgs = true; + setTimeout(() => { + this.msgs = false; + }, 2000); + } else { + this.$router.push({ path: "/login" }); } }); } @@ -140,14 +143,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", { token: localStorage.getItem("token"), type: 3, type_id: id, - order:this.shot + order: this.shot }) .then(res => { window.console.log(res); @@ -156,9 +159,9 @@ export default { }); } }, - watch:{ - shot(){ - this.pinglu(this.pid) + watch: { + shot() { + this.pinglu(this.pid); } }, mounted() { @@ -198,12 +201,11 @@ 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 { background-color: #fff; diff --git a/src/PersonalHomepage.vue b/src/PersonalHomepage.vue index ede889b..fc31ea4 100644 --- a/src/PersonalHomepage.vue +++ b/src/PersonalHomepage.vue @@ -177,7 +177,7 @@ export default { } this.lock = true 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"), page:this.page }).then((res)=>{ @@ -197,7 +197,7 @@ export default { }, mounted(){ if(localStorage.getItem('token') == ""){ - this.$router.push("/login") + this.$router.push({path:"/login"}) } this.axios.post('http://lawpro.earnest.pro/api/login_main/getUserDetails',{ token:localStorage.getItem("token") @@ -245,7 +245,12 @@ export default { this.page = 0 this.dynamiclist = [] this.lock = false; + if(this.types == 5){ + this.getlists(0) + }else{ this.getlist() + + } } }, beforeRouteLeave(a,b,c){ diff --git a/src/articledetail.vue b/src/articledetail.vue index 490bd8e..725f955 100644 --- a/src/articledetail.vue +++ b/src/articledetail.vue @@ -32,13 +32,20 @@

{{plist.length}}条评论

-

- 切换为时间排序 +

+ + 切换为{{shot == 0 ? '时间' : "默认"}}排序

- +
@@ -69,8 +76,9 @@ export default { biaoqing: false, list: [], plist: [], - userid:0, - ifgz:false + userid: 0, + ifgz: false, + shot: 0 }; }, components: { @@ -83,22 +91,22 @@ 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 - } - }) + 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; + } + }); } - }, handleEmotion(i) { this.content += i; @@ -114,13 +122,17 @@ export default { 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 = ""; + } else { + this.$router.push({ + path: "/login" + }); } }); } @@ -131,8 +143,9 @@ export default { this.axios .post("http://lawpro.earnest.pro/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); @@ -142,9 +155,14 @@ export default { }); } }, + watch: { + shot() { + this.pinglu(); + } + }, mounted() { // 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", { token: localStorage.getItem("token"), diff --git a/src/components/IndexList.vue b/src/components/IndexList.vue index 6252c5b..7f7cce1 100644 --- a/src/components/IndexList.vue +++ b/src/components/IndexList.vue @@ -3,11 +3,17 @@
{{title}}
- +

{{text}}

-
+
分享
@@ -130,18 +136,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 +156,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 { @@ -176,9 +181,25 @@ export default { name: "PersonafFollow", data() { 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); + } + } }; \ No newline at end of file diff --git a/src/components/indexFollow.vue b/src/components/indexFollow.vue index a0e6a1f..d2c43e1 100644 --- a/src/components/indexFollow.vue +++ b/src/components/indexFollow.vue @@ -15,7 +15,7 @@
展开阅读全文
-
+
分享
@@ -160,6 +160,20 @@ export default { }, pinglun(){ 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() { diff --git a/src/components/indexFollow1.vue b/src/components/indexFollow1.vue index 65bbf67..0e5476f 100644 --- a/src/components/indexFollow1.vue +++ b/src/components/indexFollow1.vue @@ -33,7 +33,7 @@
-
+
分享
@@ -221,6 +221,20 @@ 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://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() { diff --git a/src/components/indexarticle.vue b/src/components/indexarticle.vue index 14dae1c..9871bbe 100644 --- a/src/components/indexarticle.vue +++ b/src/components/indexarticle.vue @@ -1,5 +1,5 @@