Merge branch 'xuebaoxin' of pplokijuhyg/falvpingtai into master

This commit is contained in:
asd 2019-12-02 09:09:56 +08:00
commit a2092ac5be
19 changed files with 328 additions and 247 deletions

View File

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

View File

@ -29,7 +29,7 @@
<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> <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> <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> <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 v-if="types==1" operation="发布了该文章" :day="item.time" :title="item.title" types="1" :id="item.id"></answer> <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> <answer v-if="types==2" operation="发布了该问题" :day="item.time" :title="item.title" types="2" :id="item.id"></answer>
</div> </div>
@ -117,6 +117,7 @@
import follow from "./components/PersonafFollow" import follow from "./components/PersonafFollow"
// import follows from "./components/PersonafFollows" // import follows from "./components/PersonafFollows"
import answer from "./components/PersonalAnswer" import answer from "./components/PersonalAnswer"
// import { log } from 'util';
export default { export default {
name: "Personal-homepage", name: "Personal-homepage",
data() { data() {
@ -138,6 +139,14 @@ export default {
answer answer
}, },
methods:{ methods:{
wzs(a,b){
// console.log(a,b,12)
// this.$router.replace('/')
this.$router.push({
path:'/articledetail?id=' + b
})
},
getlist(){ getlist(){
if(this.lock){ if(this.lock){
return ; return ;
@ -187,7 +196,9 @@ export default {
} }
}, },
mounted(){ mounted(){
if(localStorage.getItem('token') == ""){
this.$router.push("/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")
}).then((res)=>{ }).then((res)=>{
@ -237,10 +248,11 @@ export default {
this.getlist() this.getlist()
} }
}, },
beforeRouteLeave(){ beforeRouteLeave(a,b,c){
window.$(window).scroll(() => { window.$(window).scroll(() => {
}); });
c()
} }
}; };
</script> </script>

View File

@ -5,7 +5,15 @@
<img :src=" 'http://lawpro.earnest.pro' +list.data.img" alt class="toppic" /> <img :src=" 'http://lawpro.earnest.pro' +list.data.img" alt class="toppic" />
</div> </div>
<follow class="follow" :img="'http://lawpro.earnest.pro' + list.user.avatar" :nickname="list.user.nickname" :sole="list.user.industry_name" :text="list.data.articlecontent" :title="list.data.title" @pinglun="pl"></follow> <follow
class="follow"
:img="'http://lawpro.earnest.pro' + list.user.avatar"
:nickname="list.user.nickname"
:sole="list.user.industry_name"
:text="list.data.articlecontent"
:title="list.data.title"
@pinglun="pinglu"
></follow>
<div class="line"></div> <div class="line"></div>
<!-- <follow :indexs="1" class="follow"></follow> --> <!-- <follow :indexs="1" class="follow"></follow> -->
<!-- <div class="line"></div> --> <!-- <div class="line"></div> -->
@ -18,22 +26,22 @@
<p class="title" @click="show = true">热门推荐</p> <p class="title" @click="show = true">热门推荐</p>
<privatets></privatets> <privatets></privatets>
<articles></articles> <articles></articles>
<articles></articles> --> <articles></articles>-->
<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">389条评论</p> <p class="tiao">{{plist.length}}条评论</p>
<p class="qie"> <p class="qie">
<img class="qiehuan" src="./assets/qiehuan.png" alt srcset /> 切换为时间排序 <img class="qiehuan" src="./assets/qiehuan.png" alt srcset /> 切换为时间排序
</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></comment> <comment v-for="(item,index) in plist" :key="index"></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 />
<textarea placeholder="写下你的评论..." v-model="content"></textarea> <textarea placeholder="写下你的评论..." v-model="content"></textarea>
<p>发布</p> <p @click="pfb">发布</p>
<div v-show="biaoqing"> <div v-show="biaoqing">
<Emotion @emotion="handleEmotion" :height="4"></Emotion> <Emotion @emotion="handleEmotion" :height="4"></Emotion>
</div> </div>
@ -57,7 +65,8 @@ export default {
show: false, show: false,
content: "", content: "",
biaoqing: false, biaoqing: false,
list:[] list: [],
plist: []
}; };
}, },
components: { components: {
@ -73,19 +82,56 @@ export default {
handleEmotion(i) { handleEmotion(i) {
this.content += i; this.content += i;
}, },
pl(){ pfb() {
this.show = true 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.$route.query.id,
type: 3
})
.then(res => {
if (res.data.code == 200) {
this.pinglu(this.$route.query.id);
this.content = "";
}
});
}
}
},
pinglu() {
// this.pid = id;
this.axios
.post("http://lawpro.earnest.pro/api/login_main/CommentList", {
token: localStorage.getItem("token"),
type: 2,
type_id: this.$route.query.id
})
.then(res => {
window.console.log(res);
this.plist = res.data.data.data;
// this.list = res.data.data;
this.show = true;
});
} }
}, },
mounted() { mounted() {
this.axios.post("http://lawpro.earnest.pro/api/login_main/mainDetails", { this.axios
token: localStorage.getItem("token"), .post("http://lawpro.earnest.pro/api/login_main/mainDetails", {
id: 1688, token: localStorage.getItem("token"),
type: 1 id: this.$route.query.id,
}).then((res)=>{ type: 1
window.console.log(res) })
this.list = res.data.data .then(res => {
}) window.console.log(res);
this.list = res.data.data;
});
} }
}; };
</script> </script>

BIN
src/assets/img.zip Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 803 B

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/assets/pl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 794 B

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -12,7 +12,7 @@
分享 分享
</div> </div>
<div> <div>
<img src="../assets/share.png" alt srcset /> <img src="../assets/pl.png" alt srcset />
{{num}}评论 {{num}}评论
</div> </div>
<div v-show="false" class="more" @click="show = !show"> <div v-show="false" class="more" @click="show = !show">

View File

@ -26,7 +26,7 @@
分享 分享
</div> </div>
<div> <div>
<img src="../assets/share.png" alt="" srcset=""> <img src="../assets/pl.png" alt="" srcset="">
{{comment}}评论 {{comment}}评论
</div> </div>
<div> <div>

View File

@ -26,7 +26,7 @@
分享 分享
</div> </div>
<div> <div>
<img src="../assets/share.png" alt="" srcset=""> <img src="../assets/pl.png" alt="" srcset="">
{{comment}}评论 {{comment}}评论
</div> </div>
<div> <div>

View File

@ -37,13 +37,10 @@ export default {
methods:{ methods:{
tab(){ tab(){
window.console.log(this.types,"llk") window.console.log(this.types,"llk")
if(this.types=="1"){ this.$emit("wz",this.types,this.id)
this.$router.push({
path: '/sign'
});
window.console.log( this.$router) window.console.log( this.$router)
} }
} }
}
}; };
</script> </script>

View File

@ -20,7 +20,7 @@
分享 分享
</div> </div>
<div @click="pinglun"> <div @click="pinglun">
<img src="../assets/share.png" alt srcset /> <img src="../assets/pl.png" alt srcset />
{{comment}}评论 {{comment}}评论
</div> </div>
<div v-show="!show && lang" @click="hadd">收起</div> <div v-show="!show && lang" @click="hadd">收起</div>

View File

@ -32,7 +32,7 @@
分享 分享
</div> </div>
<div @click="$emit('pinglun')"> <div @click="$emit('pinglun')">
<img src="../assets/share.png" alt srcset /> <img src="../assets/pl.png" alt srcset />
{{num}}评论 {{num}}评论
</div> </div>
<div></div> <div></div>
@ -169,6 +169,7 @@
.right { .right {
width: 143px; width: 143px;
height: 62px; height: 62px;
line-height: 62px;
background: rgba(247, 247, 247, 1); background: rgba(247, 247, 247, 1);
border-radius: 10px; border-radius: 10px;
margin: auto 0; margin: auto 0;

View File

@ -11,7 +11,7 @@
<p>分享</p> <p>分享</p>
</div> </div>
<div> <div>
<img src="../assets/pinglun.png" alt class="icon" /> <img src="../assets/pl.png" alt class="icon" />
<p>{{num}}条评论</p> <p>{{num}}条评论</p>
</div> </div>
</div> </div>

View File

@ -9,9 +9,9 @@
</div> </div>
</van-popup> </van-popup>
<div class="head"> <div class="head">
<img class="logo" src alt srcset /> <img class="logo" src="../assets/logo1.png" alt srcset />
<div class="search"> <div class="search">
<img src alt /> <img src="../assets/zoom.png" alt />
<input type="text" placeholder="搜索" v-on:change ="shuru" v-model="serch"/> <input type="text" placeholder="搜索" v-on:change ="shuru" v-model="serch"/>
</div> </div>
<div class="mnue" @click="isshow"> <div class="mnue" @click="isshow">
@ -46,7 +46,7 @@
.logo { .logo {
width: 115px; width: 115px;
height: 37px; height: 37px;
background-color: #000; // background-color: #000;
display: block; display: block;
margin-left: 30px; margin-left: 30px;
} }
@ -64,7 +64,7 @@
margin-left: 23px; margin-left: 23px;
width: 30px; width: 30px;
height: 30px; height: 30px;
background-color: #000; // background-color: #000;
} }
> input { > input {
margin-left: 21px; margin-left: 21px;

View File

@ -57,7 +57,7 @@
.logo { .logo {
width: 115px; width: 115px;
height: 37px; height: 37px;
background-color: #000; // background-color: #000;
display: block; display: block;
margin-left: 30px; margin-left: 30px;
} }
@ -124,17 +124,18 @@ export default {
switch (e) { switch (e) {
case 0: case 0:
this.$router.push({ this.$router.push({
path: `/index` path: '/'
}); });
break; break;
case 1: case 1:
this.$router.push({ this.$router.push({
path: `/PersonalHomepage` path: '/PersonalHomepage'
}); });
break; break;
case 2: case 2:
localStorage.setItem("toekn","")
this.$router.push({ this.$router.push({
path: `/login` path: '/login'
}); });
break; break;
} }

View File

@ -2,19 +2,16 @@
<div class="box"> <div class="box">
<heads></heads> <heads></heads>
<div class="list"> <div class="list">
<div v-for="(item,index) in list" :key="index" @click="todetail(item.id)"> <div v-for="(item,index) in list" :key="index" @click="todetail(item.id,item.type)">
<list <list
:title="item.title"
:id="item.id"
:title="item.title" :num="item.comment"
:id="item.id" :img="item.img"
:num="item.comment" :text="item.text"
:img="item.img" ></list>
:text="item.text"
></list>
</div> </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.3rem">{{text}}</div>
<!-- <list></list> <!-- <list></list>
<list></list>--> <list></list>-->
@ -42,37 +39,42 @@ export default {
return { return {
list: [], list: [],
page: 1, page: 1,
lock:false, lock: false,
text:"加载中" text: "加载中"
}; };
}, },
methods: { methods: {
getlist(){ getlist() {
if(this.lock){ if (this.lock) {
return 'lock' return "lock";
} }
this.lock = true this.lock = true;
var t = this var t = this;
this.page += 1; this.page += 1;
this.axios this.axios
.post("http://lawpro.earnest.pro/api/login_main/articleList", { .post("http://lawpro.earnest.pro/api/login_main/articleList", {
page: t.page page: t.page
}) })
.then(res => { .then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
t.list = t.list.concat(res.data.data); t.list = t.list.concat(res.data.data);
t.lock = false t.lock = false;
}else{ } else {
t.text = "暂无更多" t.text = "暂无更多";
} }
});
})
}, },
todetail(e){ todetail(e, type) {
window.console.log(e) window.console.log(e);
this.$router.push({ if (type == 2) {
path: `/IndexArticleDetaill?id=`+e this.$router.push({
}); path: `/IndexArticleDetaill?id=` + e
});
} else {
this.$router.push({
path: `/articledetail?id=` + e
});
}
} }
}, },
components: { components: {
@ -97,12 +99,12 @@ export default {
if (windowH + scrollH >= documentH) { if (windowH + scrollH >= documentH) {
// do something // do something
// alert(2); // alert(2);
window.console.log(1) window.console.log(1);
t.getlist() t.getlist();
} }
}); });
}else{ } else {
t.text = "暂无数据" t.text = "暂无数据";
} }
}); });
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="login"> <div class="login">
<div class="logo"> <div class="logo">
<img src="./assets/quit.png" alt class="close" /> <!-- <img src="./assets/quit.png" alt class="close" /> -->
</div> </div>
<div class="tel"> <div class="tel">
<p>+86</p> <p>+86</p>
@ -12,7 +12,7 @@
<div class="tel yzm"> <div class="tel yzm">
<input type="text" class="shuru tel1" placeholder="输入6位验证码" v-model="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>
<div class="ale"> <div class="ale">
<p class="alert">未注册手机验证后自动登录</p> <p class="alert">未注册手机验证后自动登录</p>
@ -37,8 +37,8 @@
<div> <div>
<!-- <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" 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" 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>微信 --> <!-- <i class="icon-wechatl"></i>微信 -->
@ -69,7 +69,9 @@ export default {
yzm: "", yzm: "",
yztoken: "", yztoken: "",
Verification: "", Verification: "",
ifsign: false ifsign: false,
yzs: "获取验证码",
miao: 60
}; };
}, },
methods: { methods: {
@ -86,7 +88,22 @@ export default {
}, },
yz() { yz() {
let yz = ""; let yz = "";
if (this.tel != "") { 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"); window.console.log("aaaa");
var t = this; var t = this;
this.axios this.axios

View File

@ -2,7 +2,6 @@ import Vue from 'vue'
//1.导入路由组件vue-router //1.导入路由组件vue-router
import Router from 'vue-router' import Router from 'vue-router'
//2.调用vue-router //2.调用vue-router
Vue.use(Router)
import PersonalHomepage from "./PersonalHomepage" import PersonalHomepage from "./PersonalHomepage"
import index from "./index" import index from "./index"
// import PersonalHomepage from "./PersonalHomepage" // import PersonalHomepage from "./PersonalHomepage"
@ -16,8 +15,10 @@ import IndexReport1 from "./IndexReport1"
import IndexReport2 from "./IndexReport2" import IndexReport2 from "./IndexReport2"
import Answer from "./Answer" import Answer from "./Answer"
import sign from "./sign" import sign from "./sign"
import ArticleDetail from "./articledetail" import ArticleDetail from "./articledetail.vue"
Vue.use(Router)
const router=new Router({ const router=new Router({
mode:'history',
routes: [ routes: [
{ {
path: '/articledetail', path: '/articledetail',
@ -52,7 +53,7 @@ const router=new Router({
component: login component: login
}, },
{ {
path: '/index', path: '/',
component: index component: index
}, },
{ {