清理代码
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
div<template>
|
||||
<template>
|
||||
<div class="Detail" v-if="pageShow">
|
||||
<div class="top">
|
||||
<div class="item-top">
|
||||
@@ -115,7 +115,7 @@ div<template>
|
||||
<div class="popup">
|
||||
<div class="popup-title">
|
||||
<h2>评论</h2>
|
||||
<image @click="isShowComment = false, focus = false" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-guanbi.png" />
|
||||
<image @click="isShowComment = false,focus = false" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-guanbi.png" />
|
||||
</div>
|
||||
<div class="form">
|
||||
<textarea :maxlength="100" :cursor-spacing="10" :placeholder="commentId ? '回复' + replyName : '请输入评论内容'" :focus="focus" v-model="content"></textarea>
|
||||
@@ -133,7 +133,6 @@ div<template>
|
||||
export default {
|
||||
name: 'Detail',
|
||||
appName: '详情',
|
||||
|
||||
data () {
|
||||
return {
|
||||
id: '',
|
||||
@@ -153,11 +152,9 @@ div<template>
|
||||
replyName: ''
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user', 'token'])
|
||||
},
|
||||
|
||||
onLoad (query) {
|
||||
this.isFrom = query.isFrom
|
||||
this.id = query.id
|
||||
@@ -175,10 +172,8 @@ div<template>
|
||||
this.getCommontList(query.id)
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapActions(['autoLogin']),
|
||||
|
||||
toTask() {
|
||||
if (!this.user.areaId) {
|
||||
this.$dialog.confirm({
|
||||
@@ -191,14 +186,12 @@ div<template>
|
||||
}
|
||||
this.$linkTo(`/mods/AppNewFarmerBank/taskDetail?id=${this.info.integralTaskId}`)
|
||||
},
|
||||
|
||||
previewImage (url, files) {
|
||||
uni.previewImage({
|
||||
current: url,
|
||||
urls: files.map(v => v.url)
|
||||
})
|
||||
},
|
||||
|
||||
showComment () {
|
||||
if (!this.user.areaId) {
|
||||
this.$dialog.confirm({
|
||||
@@ -222,7 +215,6 @@ div<template>
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
|
||||
replay (item) {
|
||||
if (!this.user.areaId) {
|
||||
this.$dialog.confirm({
|
||||
@@ -247,10 +239,9 @@ div<template>
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
|
||||
getInfo (id) {
|
||||
this.$instance.post(`/app/appneighborhoodassistance/queryDetailById?id=${id}`, null, {
|
||||
withoutToken: this.token ? false : true,
|
||||
withoutToken: !this.token,
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
@@ -260,7 +251,6 @@ div<template>
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
|
||||
reciate () {
|
||||
this.$loading()
|
||||
this.$instance.post(`/app/appneighborhoodassistance/appreciate?id=${this.id}`).then(res => {
|
||||
@@ -272,7 +262,6 @@ div<template>
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
|
||||
send () {
|
||||
if (!this.content) {
|
||||
return this.$toast('内容不能为空')
|
||||
@@ -303,7 +292,6 @@ div<template>
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toTopic (url) {
|
||||
if (this.isFrom === 'topic') {
|
||||
uni.navigateBack({
|
||||
@@ -313,13 +301,12 @@ div<template>
|
||||
this.$linkTo(url)
|
||||
}
|
||||
},
|
||||
|
||||
getCommontList (id) {
|
||||
if (this.isMore) return
|
||||
|
||||
this.$loading()
|
||||
this.$instance.post(`/app/appneighborhoodassistance/commontList`, null, {
|
||||
withoutToken: this.token ? false : true,
|
||||
withoutToken: !this.token,
|
||||
params: {
|
||||
id,
|
||||
current: this.current,
|
||||
@@ -349,11 +336,9 @@ div<template>
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
onReachBottom () {
|
||||
this.getCommontList()
|
||||
},
|
||||
|
||||
onShareTimeline () {
|
||||
return {
|
||||
title: this.info.content,
|
||||
@@ -463,7 +448,6 @@ div<template>
|
||||
width: 100px;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
text-align: right;
|
||||
text-align: center;
|
||||
font-size: 26px;
|
||||
color: #fff;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
div<template>
|
||||
<template>
|
||||
<div class="Detail" v-if="pageShow">
|
||||
<div class="top">
|
||||
<div class="item-top">
|
||||
@@ -250,7 +250,7 @@ div<template>
|
||||
|
||||
getInfo (id) {
|
||||
this.$instance.post(`/app/appneighborhoodassistance/queryDetailById?id=${id}`, null, {
|
||||
withoutToken: this.token ? false : true,
|
||||
withoutToken: !this.token,
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
@@ -319,7 +319,7 @@ div<template>
|
||||
|
||||
this.$loading()
|
||||
this.$instance.post(`/app/appneighborhoodassistance/commontList`, null, {
|
||||
withoutToken: this.token ? false : true,
|
||||
withoutToken: !this.token,
|
||||
params: {
|
||||
id,
|
||||
current: this.current,
|
||||
@@ -463,7 +463,6 @@ div<template>
|
||||
width: 100px;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
text-align: right;
|
||||
text-align: center;
|
||||
font-size: 26px;
|
||||
color: #fff;
|
||||
|
||||
Reference in New Issue
Block a user