Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -70,6 +70,7 @@ export const user = {
|
||||
//checkType 1、登录认证 2、居民认证 3、党员认证
|
||||
//判断是否需要校验认证信息
|
||||
let {user: userInfo, token} = rootState
|
||||
console.log();
|
||||
if (!checkType) {
|
||||
//如果需要校验认证信息,必定要先验证是否登录
|
||||
uni.navigateTo({url: modulePath});
|
||||
@@ -94,6 +95,19 @@ export const user = {
|
||||
return uni.showToast({title: "您还不是党员,暂时无法使用该功能", icon: "none"});
|
||||
}
|
||||
uni.navigateTo({url: modulePath});
|
||||
} else if (checkType == 4) {
|
||||
if (!token) {
|
||||
return dispatch('autoLogin').then(() => dispatch('authCheck', { checkType, modulePath }));
|
||||
}
|
||||
if (!userInfo.areaId) {
|
||||
this.$dialog.confirm({
|
||||
content: '您只有完成信息认证后,才可进行相关操作。',
|
||||
confirmText: '去认证'
|
||||
}).then(() => {
|
||||
uni.switchTab({ url: '/pages/AppMine/userInfo' })
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,6 +53,8 @@
|
||||
export default {
|
||||
name: 'Add',
|
||||
appName: '发新贴',
|
||||
navigationBarBackgroundColor: '#ffffff',
|
||||
navigationBarTextStyle: 'black',
|
||||
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -96,6 +96,9 @@
|
||||
}
|
||||
},
|
||||
|
||||
onReady () {
|
||||
},
|
||||
|
||||
onLoad () {
|
||||
this.getTopicList()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
div<template>
|
||||
<div class="Detail" v-if="pageShow">
|
||||
<div class="top">
|
||||
<div class="item-top">
|
||||
@@ -41,7 +41,7 @@
|
||||
<p>{{ item.content }}</p>
|
||||
<div class="bottom">
|
||||
<span>{{ item.createTime }}</span>
|
||||
<div hover-class="text-hover" @click="commentId = item.id, replyName = item.createUserName, focus = true">回复</div>
|
||||
<div hover-class="text-hover" @click="replay(item)">回复</div>
|
||||
</div>
|
||||
<div class="replay-list" v-if="item.replyList.length">
|
||||
<div class="replay-item" v-for="replay in item.replyList" :key="replay.id">
|
||||
@@ -64,9 +64,9 @@
|
||||
<AiEmpty v-if="!list.length"></AiEmpty>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<input :placeholder="commentId ? '回复' + replyName : '请输入评论内容'" :focus="focus" v-model="content">
|
||||
<div hover-class="hover-class" @click="send">发送</div>
|
||||
<div class="footer" @click="showComment">
|
||||
<span>请输入评论内容</span>
|
||||
<!-- <div hover-class="hover-class">发送</div> -->
|
||||
</div>
|
||||
<u-popup v-model="isShow" mode="bottom" hidden height="350rpx" border-radius="30">
|
||||
<div class="popup">
|
||||
@@ -90,7 +90,20 @@
|
||||
</div>
|
||||
</div>
|
||||
</u-popup>
|
||||
<AiLogin ref="login"/>
|
||||
<u-popup v-model="isShowComment" mode="bottom" hidden height="400rpx" border-radius="30" @close="focus = false">
|
||||
<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" />
|
||||
</div>
|
||||
<div class="form">
|
||||
<textarea :maxlength="100" :cursor-spacing="10" :placeholder="commentId ? '回复' + replyName : '请输入评论内容'" :focus="focus" v-model="content"></textarea>
|
||||
<div>
|
||||
<div class="send-btn" hover-class="hover-class" @click="send">发送</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</u-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -99,6 +112,8 @@
|
||||
export default {
|
||||
name: 'Detail',
|
||||
appName: '详情',
|
||||
navigationBarBackgroundColor: '#ffffff',
|
||||
navigationBarTextStyle: 'black',
|
||||
|
||||
data () {
|
||||
return {
|
||||
@@ -110,6 +125,7 @@
|
||||
isFrom: '',
|
||||
list: [],
|
||||
isMore: false,
|
||||
isShowComment: false,
|
||||
current: 1,
|
||||
content: '',
|
||||
focus: false,
|
||||
@@ -151,6 +167,31 @@
|
||||
})
|
||||
},
|
||||
|
||||
showComment () {
|
||||
this.commentId = ''
|
||||
this.replyName = ''
|
||||
this.isShowComment = true
|
||||
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
this.focus = true
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
|
||||
replay (item) {
|
||||
this.commentId = item.id
|
||||
this.replyName = item.createUserName
|
||||
|
||||
this.isShowComment = true
|
||||
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
this.focus = true
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
|
||||
getInfo (id) {
|
||||
this.$instance.post(`/app/appneighborhoodassistance/queryDetailById?id=${id}`, null, {
|
||||
withoutToken: this.token ? false : true,
|
||||
@@ -191,6 +232,7 @@
|
||||
}).then(res => {
|
||||
uni.hideLoading()
|
||||
if (res.code === 0) {
|
||||
this.isShowComment = false
|
||||
this.$toast('提交成功')
|
||||
this.content = ''
|
||||
this.replyName = ''
|
||||
@@ -289,7 +331,7 @@
|
||||
}
|
||||
|
||||
.popup {
|
||||
height: 700px;
|
||||
height: 400px;
|
||||
border-radius: 20px 20px 0 0;
|
||||
|
||||
.popup-title {
|
||||
@@ -339,6 +381,41 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form {
|
||||
padding: 0 32px;
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
height: 200px;
|
||||
line-height: 1.3;
|
||||
padding: 20px;
|
||||
font-size: 28px;
|
||||
color: #333;
|
||||
box-sizing: border-box;
|
||||
background: #eeeeee;
|
||||
}
|
||||
|
||||
& > div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.send-btn {
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
text-align: right;
|
||||
text-align: center;
|
||||
font-size: 26px;
|
||||
color: #fff;
|
||||
border-radius: 30px;
|
||||
background: #2d7dffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
.footer {
|
||||
display: flex;
|
||||
@@ -351,16 +428,17 @@
|
||||
padding: 14px 32px;
|
||||
background: #fff;
|
||||
|
||||
input {
|
||||
span {
|
||||
flex: 1;
|
||||
height: 60px;
|
||||
margin-right: 16px;
|
||||
line-height: 60px;
|
||||
// margin-right: 16px;
|
||||
padding: 0 24px;
|
||||
border-radius: 30px;
|
||||
font-size: 26px;
|
||||
color: #333;
|
||||
box-sizing: border-box;
|
||||
background: #eeeeeeff;
|
||||
background: #eeeeee;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
div {
|
||||
|
||||
@@ -127,6 +127,8 @@
|
||||
export default {
|
||||
name: 'MyPostList',
|
||||
appName: '我的帖子',
|
||||
navigationBarBackgroundColor: '#ffffff',
|
||||
navigationBarTextStyle: 'black',
|
||||
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
export default {
|
||||
name: 'Topic',
|
||||
appName: '更多话题',
|
||||
navigationBarBackgroundColor: '#ffffff',
|
||||
navigationBarTextStyle: 'black',
|
||||
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -60,6 +60,8 @@
|
||||
export default {
|
||||
name: 'TopicDetail',
|
||||
appName: '话题详情',
|
||||
navigationBarBackgroundColor: '#ffffff',
|
||||
navigationBarTextStyle: 'black',
|
||||
|
||||
data () {
|
||||
return {
|
||||
|
||||
@@ -118,38 +118,27 @@ export default {
|
||||
})
|
||||
},
|
||||
handleClick({type, appId, modulePath, url, checkType, corpId}) {
|
||||
if(this.user.areaId) {
|
||||
//先判读是不是系统应用
|
||||
if (type != "0") {
|
||||
if (type == "1") {
|
||||
uni.navigateToMiniProgram({appId});
|
||||
} else if (type == "2") {
|
||||
uni.navigateTo({url: "/subPages/h5/webview?link=" + url});
|
||||
} else if (type == "3") {
|
||||
this.$linkTo(url);
|
||||
} else if (type == "4") {
|
||||
uni.openCustomerServiceChat({
|
||||
extInfo: {url: url},
|
||||
corpId: corpId,
|
||||
fail: () => {
|
||||
this.$u.toast('请使用普通微信打开小程序进行咨询');
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (type && type == "0") {
|
||||
uni.showLoading({title: '正在进入应用...'})
|
||||
this.authCheck({checkType, modulePath}).finally(() => uni.hideLoading())
|
||||
//先判读是不是系统应用
|
||||
if (type != "0") {
|
||||
if (type == "1") {
|
||||
uni.navigateToMiniProgram({appId});
|
||||
} else if (type == "2") {
|
||||
uni.navigateTo({url: "/subPages/h5/webview?link=" + url});
|
||||
} else if (type == "3") {
|
||||
this.$linkTo(url);
|
||||
} else if (type == "4") {
|
||||
uni.openCustomerServiceChat({
|
||||
extInfo: {url: url},
|
||||
corpId: corpId,
|
||||
fail: () => {
|
||||
this.$u.toast('请使用普通微信打开小程序进行咨询');
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.$dialog.confirm({
|
||||
content: '您只有完成信息认证后,才可进行相关操作。',
|
||||
confirmText: '去认证'
|
||||
}).then(() => {
|
||||
uni.switchTab({ url: '/pages/AppMine/userInfo' })
|
||||
}).catch(() => {
|
||||
})
|
||||
} else if (type && type == "0") {
|
||||
uni.showLoading({title: '正在进入应用...'})
|
||||
this.authCheck({checkType, modulePath}).finally(() => uni.hideLoading())
|
||||
}
|
||||
|
||||
},
|
||||
handleBannerClick(index) {
|
||||
if (!this.swiperList[index].linkUrl) return
|
||||
|
||||
@@ -161,7 +161,7 @@ export default {
|
||||
},
|
||||
getAuth() {
|
||||
this.$nextTick(() => {
|
||||
this.token && this.getUserInfo()
|
||||
this.token && this.getUserInfo('qujing')
|
||||
})
|
||||
},
|
||||
onLogout() {
|
||||
|
||||
Reference in New Issue
Block a user