This commit is contained in:
pplokijuhyg 2019-12-01 15:52:42 +08:00
parent 71fb824b9c
commit 58eb28c680
4 changed files with 190 additions and 167 deletions

View File

@ -14,7 +14,6 @@
:text="item.articlecontent"
:comment="item.comment"
:num="item.islike"
></follow>
</div>
@ -54,7 +53,6 @@
</div>
<div class="bodys">
<comment v-for="(item,index) in plist" :key="index"></comment>
</div>
<div class="reply">
<img @click="biaoqing = !biaoqing" src="./assets/baoqing.png" alt srcset />
@ -85,8 +83,8 @@ export default {
biaoqing: false,
list: {},
huida: [],
plist:[],
pid:0
plist: [],
pid: 0
};
},
components: {
@ -99,27 +97,34 @@ export default {
Emotion
},
methods: {
pfb(){
window.console.log(this.content)
this.axios.post("http://lawpro.earnest.pro/api/login_main/appendComment",{
text:this.content,
token:localStorage.getItem('token'),
type_id:this.pid,
type:3
}).then((res)=>{
if(res.data.code == 200){
this.pinglu(this.pid);
pfb() {
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", {
text: this.content,
token: localStorage.getItem("token"),
type_id: this.pid,
type: 3
})
.then(res => {
if (res.data.code == 200) {
this.pinglu(this.pid);
this.content = ""
this.content = "";
}
});
}
})
}
},
handleEmotion(i) {
this.content += i;
},
pinglu(id) {
this.pid= id
this.pid = id;
this.axios
.post("http://lawpro.earnest.pro/api/login_main/CommentList", {
token: localStorage.getItem("token"),
@ -127,10 +132,10 @@ this.pinglu(this.pid);
type_id: id
})
.then(res => {
window.console.log(res)
this.plist = res.data.data.data
window.console.log(res);
this.plist = res.data.data.data;
// this.list = res.data.data;
this.show = true
this.show = true;
});
}
},
@ -139,7 +144,7 @@ this.pinglu(this.pid);
.post("http://lawpro.earnest.pro/api/login_main/mainDetails", {
token: localStorage.getItem("token"),
type: 2,
id: this. $route.query.id
id: this.$route.query.id
})
.then(res => {
// window.console.log(res)
@ -161,164 +166,163 @@ this.pinglu(this.pid);
</script>
<style lang="scss">
.box{
.linshi {
z-index: 999999 !important;
.top {
background-color: #fff;
position: absolute;
top: 0;
width: 100%;
height: 98px;
border-bottom: #f6f6f6 solid 1px;
display: flex;
align-items: center;
.tiao {
font-size: 30px;
color: #000;
font-weight: 500;
margin-left: 31px;
}
.qie {
font-size: 28px;
color: #95998f;
margin-left: 208px;
padding-right: 28px;
border-right: #f6f6f6 solid 2px;
height: 42px;
line-height: 42px;
.box {
.linshi {
z-index: 999999 !important;
.top {
background-color: #fff;
position: absolute;
top: 0;
width: 100%;
height: 98px;
border-bottom: #f6f6f6 solid 1px;
display: flex;
align-items: center;
.qiehuan {
width: 26px;
height: 22px;
display: block;
margin-right: 9px;
.tiao {
font-size: 30px;
color: #000;
font-weight: 500;
margin-left: 31px;
}
.qie {
font-size: 28px;
color: #95998f;
margin-left: 208px;
padding-right: 28px;
border-right: #f6f6f6 solid 2px;
height: 42px;
line-height: 42px;
display: flex;
align-items: center;
.qiehuan {
width: 26px;
height: 22px;
display: block;
margin-right: 9px;
}
}
.quit {
width: 28px;
height: 29px;
font-size: 29px;
margin-left: 34px;
display: flex;
> img {
width: 33px;
height: 33px;
}
// background-image: url("./assets/quit.png")
}
}
.quit {
width: 28px;
height: 29px;
font-size: 29px;
margin-left: 34px;
.bodys {
width: 100%;
height: 100%;
// background-color: #000;
overflow: hidden;
overflow-y: auto;
padding: 98px 0;
box-sizing: border-box;
}
.reply {
width: 100%;
height: 98px;
position: absolute;
bottom: 0;
background-color: #fff;
display: flex;
align-items: center;
> img {
width: 33px;
height: 33px;
margin-left: 30px;
}
> textarea {
margin-left: 21px;
border: none;
font-size: 30px;
height: 35px;
width: 550px;
// word-break: break-all;
// text-align: center;
}
> p {
margin-left: 30px;
font-size: 30px;
color: #6b9147;
}
> div {
position: absolute;
bottom: 98px;
background-color: #fff;
width: 100%;
}
// background-image: url("./assets/quit.png")
}
}
.bodys {
.line {
height: 0.2rem;
width: 100%;
height: 100%;
// background-color: #000;
overflow: hidden;
overflow-y: auto;
padding: 98px 0;
background-color: #f6f6f6;
}
.question {
height: auto;
width: 100%;
color: #333333;
font-size: 0.36rem;
text-indent: 0.3rem;
line-height: 0.5rem;
padding: 0.25rem;
box-sizing: border-box;
font-weight: 500;
}
.reply {
width: 100%;
height: 98px;
position: absolute;
bottom: 0;
background-color: #fff;
display: flex;
align-items: center;
> img {
width: 33px;
height: 33px;
margin-left: 30px;
}
> textarea {
margin-left: 21px;
border: none;
font-size: 30px;
height: 35px;
width: 550px;
// word-break: break-all;
// text-align: center;
}
> p {
margin-left: 30px;
font-size: 30px;
color: #6b9147;
}
> div {
position: absolute;
bottom: 98px;
background-color: #fff;
width: 100%;
}
}
}
.line {
height: 0.2rem;
width: 100%;
background-color: #f6f6f6;
}
.question {
height: auto;
width: 100%;
color: #333333;
font-size: 0.36rem;
text-indent: 0.3rem;
line-height: 0.5rem;
padding: 0.25rem;
box-sizing: border-box;
font-weight: 500;
}
.title {
color: #333333;
font-size: 0.34rem;
margin-top: 0.48rem;
text-indent: 0.31rem;
}
.recommend {
width: 6.9rem;
margin-top: 0.13rem;
margin: 0 auto;
border-bottom: 0.01rem solid #95998f;
display: flex;
justify-content: space-between;
.articlename {
.title {
color: #333333;
font-size: 0.3rem;
line-height: 0.4rem;
width: 4.65rem;
margin-top: 0.4rem;
font-size: 0.34rem;
margin-top: 0.48rem;
text-indent: 0.31rem;
}
.articlecontent {
color: #333333;
font-size: 0.26rem;
margin-top: 0.15rem;
margin-bottom: 0.14rem;
width: 6.74rem;
}
.author {
color: #999999;
font-size: 0.22rem;
.recommend {
width: 6.9rem;
margin-top: 0.13rem;
margin: 0 auto;
margin-top: 0.14rem;
margin-bottom: 0.35rem;
}
.pic {
width: 1.82rem;
height: 1.2rem;
margin: auto 0;
}
.pics {
border-bottom: 0.01rem solid #95998f;
display: flex;
justify-content: center;
margin-bottom: 0.31rem;
> img {
width: 2.23rem;
height: 1.47rem;
margin-right: 0.1rem;
justify-content: space-between;
.articlename {
color: #333333;
font-size: 0.3rem;
line-height: 0.4rem;
width: 4.65rem;
margin-top: 0.4rem;
}
.articlecontent {
color: #333333;
font-size: 0.26rem;
margin-top: 0.15rem;
margin-bottom: 0.14rem;
width: 6.74rem;
}
.author {
color: #999999;
font-size: 0.22rem;
margin: 0 auto;
margin-top: 0.14rem;
margin-bottom: 0.35rem;
}
.pic {
width: 1.82rem;
height: 1.2rem;
margin: auto 0;
}
.pics {
display: flex;
justify-content: center;
margin-bottom: 0.31rem;
> img {
width: 2.23rem;
height: 1.47rem;
margin-right: 0.1rem;
}
}
}
}
}
</style>

View File

@ -196,7 +196,9 @@ export default {
}
},
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)=>{

View File

@ -57,7 +57,7 @@
.logo {
width: 115px;
height: 37px;
background-color: #000;
// background-color: #000;
display: block;
margin-left: 30px;
}

View File

@ -12,7 +12,7 @@
<div class="tel yzm">
<input type="text" class="shuru tel1" placeholder="输入6位验证码" v-model="yzm" />
<button class="getyzm" @click="yz">发送验证码</button>
<button class="getyzm" @click="yz">{{yzs}}</button>
</div>
<div class="ale">
<p class="alert">未注册手机验证后自动登录</p>
@ -37,8 +37,8 @@
<div>
<!-- <a
href="https://open.weixin.qq.com/connect/qrconnect?appid=wxfe6e5d36322af62f&redirect_uri=http%3a%2f%2fwww.lawpro.cn%2f&response_type=code&scope=snsapi_login&state=lawpro#wechat_redirect"
> -->
<a
>-->
<a
href="https://open.weixin.qq.com/connect/qrconnect?appid=wxfe6e5d36322af62f&redirect_uri=http%3a%2f%2fwww.lawpro.cn%2f&response_type=code&scope=snsapi_login&state=lawpro#wechat_redirect"
>
<!-- <i class="icon-wechatl"></i>微信 -->
@ -69,7 +69,9 @@ export default {
yzm: "",
yztoken: "",
Verification: "",
ifsign: false
ifsign: false,
yzs: "获取验证码",
miao: 60
};
},
methods: {
@ -86,7 +88,22 @@ export default {
},
yz() {
let yz = "";
if (this.tel != "") {
if (this.yzs != "获取验证码") {
return;
} else {
let t = this;
let a = setInterval(() => {
t.yzs = t.miao + "秒";
t.miao = t.miao - 1;
if (t.miao < 0) {
t.miao = 5;
t.yzs = "获取验证码";
clearInterval(a);
}
}, 1000);
}
window.console.log("aaaa");
var t = this;
this.axios