临时完成
This commit is contained in:
parent
d9162bbdf2
commit
bdf3d3b851
@ -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) {
|
||||
|
@ -48,13 +48,14 @@
|
||||
<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">
|
||||
<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">
|
||||
<div style="min-height:101%">
|
||||
<comment
|
||||
v-for="(item,index) in plist"
|
||||
:key="index"
|
||||
@ -63,10 +64,12 @@
|
||||
: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>
|
||||
@ -110,7 +113,24 @@ 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 {
|
||||
@ -127,7 +147,7 @@ export default {
|
||||
if (res.data.code == 200) {
|
||||
this.pinglu(this.pid);
|
||||
this.content = "";
|
||||
this.msgs = true;
|
||||
this.msg="发布成功"
|
||||
setTimeout(() => {
|
||||
this.msgs = false;
|
||||
}, 2000);
|
||||
@ -208,6 +228,7 @@ export default {
|
||||
color: #fff;
|
||||
}
|
||||
.top {
|
||||
z-index: 9999;
|
||||
background-color: #fff;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@ -253,6 +274,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.bodys {
|
||||
z-index: 9900;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// background-color: #000;
|
||||
|
@ -22,15 +22,15 @@
|
||||
<div :class="types == 3?'select':''" @click="types=3">回答</div>
|
||||
<div :class="types == 1?'select':''" @click="types=1">文章</div>
|
||||
<div :class="types == 2?'select':''" @click="types=2">提问</div>
|
||||
<div :class="types == 5?'select':''" @click="types=5">收藏</div>
|
||||
<!-- <div :class="types == 5?'select':''" @click="types=5">收藏</div> -->
|
||||
</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="'http://lawpro.earnest.pro' + item.img" :num="item.islike" :img="'http://lawpro.earnest.pro' + item.avatar" :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="'http://lawpro.earnest.pro' + userimg" :num="item.islike" :img="'http://lawpro.earnest.pro' + 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="item.status"></answer>
|
||||
<answer v-if="types==2" operation="我发布了该问题" :day="item.time" :title="item.title" types="2" :sid="item.id" :type="item.status"></answer>
|
||||
|
||||
</div>
|
||||
|
||||
@ -128,7 +128,7 @@ export default {
|
||||
attention:"",
|
||||
dynamiclist:[],
|
||||
status:['','文章','问题','回答'],
|
||||
type:['','点赞','收藏','关注','评论','回答'],
|
||||
type:['','我点赞','我收藏','我关注','我评论','我回答'],
|
||||
types:4,
|
||||
page:1,
|
||||
lock:false
|
||||
|
@ -32,11 +32,11 @@
|
||||
<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">
|
||||
<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
|
||||
@ -47,9 +47,11 @@
|
||||
: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>
|
||||
@ -78,7 +80,9 @@ export default {
|
||||
plist: [],
|
||||
userid: 0,
|
||||
ifgz: false,
|
||||
shot: 0
|
||||
shot: 0,
|
||||
msg:"",
|
||||
msgs:false
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@ -91,6 +95,21 @@ 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(){
|
||||
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;
|
||||
@ -112,6 +131,10 @@ export default {
|
||||
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 {
|
||||
@ -129,6 +152,10 @@ export default {
|
||||
this.pinglu(this.$route.query.id);
|
||||
|
||||
this.content = "";
|
||||
this.msg="发布成功"
|
||||
setTimeout(() => {
|
||||
this.msgs = false;
|
||||
}, 2000);
|
||||
} else {
|
||||
this.$router.push({
|
||||
path: "/login"
|
||||
@ -140,6 +167,7 @@ export default {
|
||||
},
|
||||
pinglu() {
|
||||
// this.pid = id;
|
||||
|
||||
this.axios
|
||||
.post("http://lawpro.earnest.pro/api/login_main/CommentList", {
|
||||
token: localStorage.getItem("token"),
|
||||
@ -152,6 +180,8 @@ export default {
|
||||
this.plist = res.data.data.data;
|
||||
// this.list = res.data.data;
|
||||
this.show = true;
|
||||
// alert(window.document.body.scrollTop)
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -161,6 +191,8 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
window.console.log(window.document.body.scrollTop,123)
|
||||
|
||||
// window.console.log(this.$route.query.userid,7946 )
|
||||
this.userid = this.$route.query.userid;
|
||||
this.axios
|
||||
@ -183,9 +215,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;
|
||||
@ -229,6 +275,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.bodys {
|
||||
z-index: 9000;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// background-color: #000;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="PersonafFollow">
|
||||
<div class="PersonafFollow" @click="tiaozhuan">
|
||||
<div class="title">
|
||||
<p>{{operation}}</p>
|
||||
<p>{{day}}</p>
|
||||
@ -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>
|
@ -33,12 +33,24 @@ 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
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,19 +61,18 @@ export default {
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
props:['title','img','sid','type'],
|
||||
methods:{
|
||||
link(){
|
||||
if(this.type == 1){
|
||||
this.$router.push({
|
||||
path:"articledetail?id=" + this.sid
|
||||
})
|
||||
}else{
|
||||
props: ["title", "img", "sid", "type"],
|
||||
methods: {
|
||||
link() {
|
||||
if (this.type == 1) {
|
||||
this.$router.push({
|
||||
path:"IndexArticleDetaill?id=" + this.sid
|
||||
})
|
||||
path: "/articledetail?id=" + this.sid
|
||||
});
|
||||
} else {
|
||||
this.$router.push({
|
||||
path: "/detaillurl?id=" + this.sid
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
22
src/detaillurl.vue
Normal file
22
src/detaillurl.vue
Normal 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>
|
@ -76,6 +76,7 @@ export default {
|
||||
},
|
||||
mounted(){
|
||||
window.localStorage.setItem('token','')
|
||||
// alert(this.yzs)
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
@ -252,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;
|
||||
|
@ -16,6 +16,7 @@ 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',
|
||||
@ -72,6 +73,10 @@ const router=new Router({
|
||||
{
|
||||
path: '/Answer',
|
||||
component: Answer
|
||||
},
|
||||
{
|
||||
path:"/detaillurl",
|
||||
component:detaillurl
|
||||
}
|
||||
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user