Commit ad450498 authored by liwei's avatar liwei

完善了实名认证相关页面,修改了动态详情页面

parent 2b77c5df
...@@ -36,3 +36,10 @@ export function getOssUrl(id) { ...@@ -36,3 +36,10 @@ export function getOssUrl(id) {
}) })
} }
//查看动态详情
export function articleDetail(articleId){
return request({
url: '/opmarticle/detail/' + articleId,
method: 'GET',
})
}
...@@ -23,7 +23,7 @@ export function userDetail(data){ ...@@ -23,7 +23,7 @@ export function userDetail(data){
} }
/** /**
* 实名认证 * 修改用户实名信息
*/ */
export function realAuth(data){ export function realAuth(data){
return request({ return request({
...@@ -32,3 +32,14 @@ export function realAuth(data){ ...@@ -32,3 +32,14 @@ export function realAuth(data){
data: data, data: data,
}); });
} }
/**
* 校验实名信息
*/
export function checkRealAuth(data){
return request({
method: "put",
url: '/app/memInfo/checkIdCard/'+ data.businessId,
data: data,
});
}
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
//查看动态详情 //查看动态详情
gotoDetail(item) { gotoDetail(item) {
uni.navigateTo({ uni.navigateTo({
url: '/pagesArticle/articleDetail?userId=' + item.userId url: '/pagesArticle/articleDetail?articleId=' + item.businessId
}) })
}, },
//查看用户详情 //查看用户详情
......
<template> <template>
<div> <div>
<view> <view>
<ArticleItem @delete="deleteFn" :info="item" @selectShare="selectShare(item)" @praise="praise" <ArticleItem @delete="deleteFn" :info="articleInfo" @selectShare="selectShare(item)" @praise="praise"
@close="close" @open="open"/> @close="close" @open="open"/>
</view> </view>
<view class="commentTitle"> <view class="commentTitle">
...@@ -9,22 +9,31 @@ ...@@ -9,22 +9,31 @@
<text>评论区</text> <text>评论区</text>
</view> </view>
<view> <view>
<text>点赞 1</text> <text>评论 {{articleInfo.commentCount}}</text>
<text class="c-title-segment">|</text> <text class="c-title-segment">|</text>
<text>评论 2</text> <text>点赞 {{articleInfo.likeCount}}</text>
</view> </view>
</view> </view>
<view class="comment" v-for="info in commentChildren" :key="info.id"> <view class="comment" v-for="info in articleInfo.articleCommentVOList" :key="info.id">
<div class="c-left"> <div class="c-left">
<image :src="info.avatar"></image> <image :src="info.avatarUrl"></image>
</div> </div>
<div class="c-right"> <div class="c-right">
<div class="c-name"> <div class="c-name">
{{ info.nickName }} {{ info.memNickName }}
</div> </div>
<div class="c-comment">{{ info.content }}</div> <div class="c-comment">{{ info.content }}</div>
<div class="c-actions"> <div class="c-actions">
<div class="c-time">{{ info.createTime }}</div> <div class="c-time">{{ info.createDate }}</div>
<div class="action-item">
<image
:src="baseUrl+'/article/104.png'"
@click="btnComment(info)"
></image>
<text>
{{ info.replyCount }}
</text>
</div>
<div class="action-item"> <div class="action-item">
<image <image
@click="btnPrarse(info)" @click="btnPrarse(info)"
...@@ -34,124 +43,114 @@ ...@@ -34,124 +43,114 @@
: baseUrl+'/article/105-no.png' : baseUrl+'/article/105-no.png'
" "
></image> ></image>
{{ info.likesNumber }} {{ info.likeCount }}
</div>
<div class="action-item">
<image
:src="baseUrl+'/article/104.png'"
@click="btnComment(info)"
></image>
<text v-if="info.childrenCommentInfos.length">
{{ info.childrenCommentInfos.length }}
</text>
<text v-else>0</text>
</div> </div>
</div> </div>
<div v-if="info.childrenCommentInfos.length > 0"> <!-- <div v-if="info.childrenCommentInfos.length > 0">-->
<div v-if="info.contentAll"> <!-- <div v-if="info.contentAll">-->
<view class="comment"> <!-- <view class="comment">-->
<div class="c-left"> <!-- <div class="c-left">-->
<image :src="info.childrenCommentInfos[0].avatar"></image> <!-- <image :src="info.childrenCommentInfos[0].avatar"></image>-->
</div> <!-- </div>-->
<div class="c-right"> <!-- <div class="c-right">-->
<div class="c-name"> <!-- <div class="c-name">-->
{{ info.childrenCommentInfos[0].nickName }} <!-- {{ info.childrenCommentInfos[0].nickName }}-->
<div style="color: #333; margin-top: 10rpx"> <!-- <div style="color: #333; margin-top: 10rpx">-->
回复 <!-- 回复-->
<text class="replyer"> <!-- <text class="replyer">-->
{{ info.childrenCommentInfos[0].beRepliedName }} <!-- {{ info.childrenCommentInfos[0].beRepliedName }}:-->
</text> <!-- </text>-->
<text class="c-comment"> <!-- <text class="c-comment">-->
{{ info.childrenCommentInfos[0].content }} <!-- {{ info.childrenCommentInfos[0].content }}-->
</text> <!-- </text>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="c-actions"> <!-- <div class="c-actions">-->
<div class="c-time"> <!-- <div class="c-time">-->
{{ info.childrenCommentInfos[0].createTime }} <!-- {{ info.childrenCommentInfos[0].createTime }}-->
</div> <!-- </div>-->
<div class="action-item"> <!-- <div class="action-item">-->
<image <!-- <image-->
@click="btnPrarse(info.childrenCommentInfos[0])" <!-- @click="btnPrarse(info.childrenCommentInfos[0])"-->
:src=" <!-- :src="-->
children.praise <!-- children.praise-->
? baseUrl+'/article/105.png' <!-- ? baseUrl+'/article/105.png'-->
: baseUrl+'/article/105-no.png' <!-- : baseUrl+'/article/105-no.png'-->
" <!-- "-->
></image> <!-- ></image>-->
{{ info.childrenCommentInfos[0].likesNumber }} <!-- {{ info.childrenCommentInfos[0].likesNumber }}-->
</div> <!-- </div>-->
<div class="action-item"> <!-- <div class="action-item">-->
<image <!-- <image-->
:src="baseUrl+'/article/104.png'" <!-- :src="baseUrl+'/article/104.png'"-->
@click="btnComment(info.childrenCommentInfos[0])" <!-- @click="btnComment(info.childrenCommentInfos[0])"-->
></image> <!-- ></image>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</view> <!-- </view>-->
</div> <!-- </div>-->
<div v-else>
<view
class="comment"
v-for="children in info.childrenCommentInfos"
:key="children.id"
>
<div class="c-left">
<image :src="children.avatar"></image>
</div>
<div class="c-right"> <!-- <div v-else>-->
<div class="c-name"> <!-- <view-->
{{ children.nickName }} <!-- class="comment"-->
<div style="color: #333; margin-top: 10rpx"> <!-- v-for="children in info.childrenCommentInfos"-->
回复 <!-- :key="children.id"-->
<text class="replyer">{{ children.beRepliedName }}</text>
<text class="c-comment">{{ children.content }}</text>
</div>
</div>
<div class="c-actions">
<div class="c-time">{{ children.createTime }}</div>
<div class="action-item">
<image
@click="btnPrarse(children)"
:src="
children.praise
? baseUrl+'/article/105.png'
: baseUrl+'/article/105-no.png'
"
></image>
{{ children.likesNumber }}
</div>
<div class="action-item">
<image
:src="baseUrl+'/article/104.png'"
@click="btnComment(children)"
></image>
</div>
</div>
</div>
</view>
</div>
<!-- <div class="more">-->
<!-- <div-->
<!-- style="color: #b6ea7a"-->
<!-- v-show="info.contentAll"-->
<!-- @click="changeAllFun(info)"-->
<!-- >-->
<!-- 展开剩余{{ info.childrenCommentInfos.length - 1 }}条回复-->
<!-- </div>-->
<!-- <div v-show="!info.contentAll"></div>-->
<!-- <div-->
<!-- v-show="!info.contentAll"-->
<!-- style="color: #b6ea7a"-->
<!-- @click="changeAllFun(info)"-->
<!-- >--> <!-- >-->
<!-- 收起--> <!-- <div class="c-left">-->
<!-- </div>--> <!-- <image :src="children.avatar"></image>-->
<!-- </div>-->
<!-- <div class="c-right">-->
<!-- <div class="c-name">-->
<!-- {{ children.nickName }}-->
<!-- <div style="color: #333; margin-top: 10rpx">-->
<!-- 回复-->
<!-- <text class="replyer">{{ children.beRepliedName }}</text>-->
<!-- <text class="c-comment">{{ children.content }}</text>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="c-actions">-->
<!-- <div class="c-time">{{ children.createTime }}</div>-->
<!-- <div class="action-item">-->
<!-- <image-->
<!-- @click="btnPrarse(children)"-->
<!-- :src="-->
<!-- children.praise-->
<!-- ? baseUrl+'/article/105.png'-->
<!-- : baseUrl+'/article/105-no.png'-->
<!-- "-->
<!-- ></image>-->
<!-- {{ children.likesNumber }}-->
<!-- </div>-->
<!-- <div class="action-item">-->
<!-- <image-->
<!-- :src="baseUrl+'/article/104.png'"-->
<!-- @click="btnComment(children)"-->
<!-- ></image>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </view>-->
<!-- </div>--> <!-- </div>-->
</div> <!--&lt;!&ndash; <div class="more">&ndash;&gt;-->
<!--&lt;!&ndash; <div&ndash;&gt;-->
<!--&lt;!&ndash; style="color: #b6ea7a"&ndash;&gt;-->
<!--&lt;!&ndash; v-show="info.contentAll"&ndash;&gt;-->
<!--&lt;!&ndash; @click="changeAllFun(info)"&ndash;&gt;-->
<!--&lt;!&ndash; >&ndash;&gt;-->
<!--&lt;!&ndash; 展开剩余{{ info.childrenCommentInfos.length - 1 }}条回复&ndash;&gt;-->
<!--&lt;!&ndash; </div>&ndash;&gt;-->
<!--&lt;!&ndash; <div v-show="!info.contentAll"></div>&ndash;&gt;-->
<!--&lt;!&ndash; <div&ndash;&gt;-->
<!--&lt;!&ndash; v-show="!info.contentAll"&ndash;&gt;-->
<!--&lt;!&ndash; style="color: #b6ea7a"&ndash;&gt;-->
<!--&lt;!&ndash; @click="changeAllFun(info)"&ndash;&gt;-->
<!--&lt;!&ndash; >&ndash;&gt;-->
<!--&lt;!&ndash; 收起&ndash;&gt;-->
<!--&lt;!&ndash; </div>&ndash;&gt;-->
<!--&lt;!&ndash; </div>&ndash;&gt;-->
<!-- </div>-->
</div> </div>
</view> </view>
<view class="bottom"> <view class="bottom">
...@@ -175,7 +174,7 @@ ...@@ -175,7 +174,7 @@
@click="" @click=""
:src="baseUrl+'/article/104.png'" :src="baseUrl+'/article/104.png'"
></image> ></image>
<text class="imageText">{{ 1 }}</text> <text class="imageText">{{ articleInfo.commentCount }}</text>
</view> </view>
<view class="bottom-button"> <view class="bottom-button">
<image <image
...@@ -184,7 +183,7 @@ ...@@ -184,7 +183,7 @@
? baseUrl+'/article/105.png' ? baseUrl+'/article/105.png'
: baseUrl+'/article/105-no.png'" : baseUrl+'/article/105-no.png'"
></image> ></image>
<text class="imageText">{{ 2 }}</text> <text class="imageText">{{ articleInfo.likeCount }}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -193,6 +192,9 @@ ...@@ -193,6 +192,9 @@
<script> <script>
import ArticleItem from './components/articleItem.vue' import ArticleItem from './components/articleItem.vue'
import {articleDetail} from '../api/article/index'
import {getCity, getValue} from "../common/options";
import {calculateAge, parseDate} from "../common";
export default{ export default{
components: { components: {
ArticleItem, ArticleItem,
...@@ -277,12 +279,46 @@ export default{ ...@@ -277,12 +279,46 @@ export default{
] ]
} }
], ],
title: 'Hello',
totle: 0,
flag: false, flag: false,
//动态id
articleId:'',
//动态详情
articleInfo:{}
} }
}, },
onLoad(params){
this.articleId = params.articleId
this.getArticleDetail()
},
methods: { methods: {
getArticleDetail(){
articleDetail(this.articleId).then(res=>{
this.articleInfo = res.data.data
//处理动态图片
if (res.data.data.url != null){
this.articleInfo.url = res.data.data.url.replace(/\\/g, '/').split(',')
}
//处理头像
if (res.data.data.memAvatar != null){
this.articleInfo.memAvatar = res.data.data.memAvatar.replace(/\\/g, '/').split(',')
}
//处理学历
this.articleInfo.memMaxEducation = getValue('education',res.data.data.memMaxEducation)
//处理性别
this.articleInfo.memSex = getValue('sex',res.data.data.memSex)
//处理地址
this.articleInfo.city = getCity(res.data.data.memResidenceProvince,res.data.data.memResidenceCity)
//通过生日计算年龄
const dataItem = parseDate(res.data.data.memBirthday)
this.articleInfo.memAge = calculateAge(dataItem.year,dataItem.month,dataItem.day)
//处理评论的头像
if (this.articleInfo.articleCommentVOList != null && this.articleInfo.articleCommentVOList.length > 0){
this.articleInfo.articleCommentVOList.forEach(item => {
item.avatarUrl = item.avatarUrl.replace(/\\/g, '/')
})
}
})
},
changeAllFun(info) { changeAllFun(info) {
// console.log(info) // console.log(info)
// let list = this.commentChildren // let list = this.commentChildren
......
<template> <template>
<view class="item"> <view class="item">
<view class="left"> <view class="left">
<image @click="gotoUserInfo(info)" :src="info.headPortrait" mode="aspectFill"></image> <image @click="gotoUserInfo(info)" :src="info.memAvatar" mode="aspectFill"></image>
</view> </view>
<view class="center"> <view class="center">
<template> <template>
<view class="name"> <view class="name">
<text @click="gotoUserInfo(info)">{{info.nickName}}</text> <text @click="gotoUserInfo(info)">{{info.memNickName}}</text>
<image v-if="info.gender!='MALE'" class="gender" :src="baseUrl+'/user/famale.png'" mode=""> <image v-if="info.gender != '男'" class="gender" :src="baseUrl+'/user/famale.png'" mode="">
</image> </image>
<image v-else class="gender" :src="baseUrl+'/user/male.png'" mode=""></image> <image v-else class="gender" :src="baseUrl+'/user/male.png'" mode=""></image>
</view> </view>
<view class="info"> <view class="info">
<text decode="true" style="color: #434343;">{{info.information}}</text> <text decode="true" style="color: #434343;">
{{info.memAge}}·{{info.city}}·{{info.memMaxEducation}}·{{info.memCareer}}
</text>
</view> </view>
</template> </template>
<view class="content"> <view class="content">
...@@ -33,7 +35,7 @@ ...@@ -33,7 +35,7 @@
@close="close"></q-previewImage> @close="close"></q-previewImage>
</view> </view>
<view class="time"> <view class="time">
{{info.time}} {{info.createDate}}
</view> </view>
</view> </view>
</view> </view>
...@@ -60,8 +62,8 @@ ...@@ -60,8 +62,8 @@
watch: { watch: {
info: { info: {
handler(newValue) { handler(newValue) {
if (newValue?.img?.length) { if (newValue?.url?.length) {
this.imgs = newValue.img this.imgs = newValue.url
} }
}, },
deep: true, deep: true,
......
...@@ -48,8 +48,7 @@ ...@@ -48,8 +48,7 @@
ELM ELM
}, },
onShow() { onShow() {
var that = this;
this.getUserIno();
}, },
methods: { methods: {
//身份认证 //身份认证
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</template> </template>
<script> <script>
import ELM from '@/components/elm-toast/index.vue'; import ELM from '@/components/elm-toast/index.vue';
import {realAuth} from "../../api/user"; import {checkRealAuth, realAuth} from "../../api/user";
export default { export default {
data() { data() {
return { return {
...@@ -139,65 +139,21 @@ ...@@ -139,65 +139,21 @@
} }
}, },
async authadd() { async authadd() {
uni.navigateTo({ const userInfo = uni.getStorageSync('userInfo')
url: "/webView/index" const params = {
}) businessId: userInfo.businessId,
// const userInfo = uni.getStorageSync('userInfo') memRealName: this.form.memRealName,
// const params = { memIdcard: this.form.memIdcard
// businessId: userInfo.businessId, }
// memRealName: this.form.memRealName, checkRealAuth(params).then(res => {
// memIdcard: this.form.memIdcard if (res.data.code == 200){
// } uni.navigateTo({
// realAuth(params).then(res => { url: "/webView/index"
// if (res.data.code == 200){ })
// uni.navigateTo({ }else {
// url: "/webView/index"
// })
// }else {
//
// }
// })
// var that = this; }
// var imgList = []; })
// if (!that.updatezImg) {
// this.tipMsg = "请上传正面照片";
// this.$refs.elm.showDialog();
// return false;
// } else {
// imgList.push(that.updatezImg)
// }
// if (!that.updatefImg) {
// this.tipMsg = "请上传反面照片";
// this.$refs.elm.showDialog();
// return false;
// } else {
// imgList.push(that.updatefImg)
// }
// var data = {
// "authType": "IdentityAuth",
// "imgList": imgList
// }
// uni.showLoading({
// title: "提交中"
// })
// const res = await that.$myRequest({
// url: '/nostalgia/fruserauth/add',
// withToken: true,
// data: data,
// method: 'POST',
// });
// uni.hideLoading();
// if (res.data.code == 200) {
// this.isConfirm=true;
// this.tipMsg = "提交成功";
// this.$refs.elm.showDialog();
//
// } else {
// this.tipMsg = res.data.msg;
// this.$refs.elm.showDialog();
// }
}, },
confirm() { confirm() {
this.isConfirm=false; this.isConfirm=false;
......
<template> <template>
<view> <view>
<web-view :src="'http://localhost:8080/test.html?token='+token"></web-view> <web-view :src="'http://106.3.97.198:20162/realAuth.html?token='+token"></web-view>
</view> </view>
</template> </template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment