Commit 8d6b9d8c authored by yuwenwen's avatar yuwenwen

移动端调整

parent 3153e911
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
}, },
displayComment:{ displayComment:{
type: Boolean, type: Boolean,
default: true default: false
} }
}, },
watch: { watch: {
...@@ -198,6 +198,7 @@ ...@@ -198,6 +198,7 @@
} }
this.userInfo = JSON.parse(JSON.parse(getUserInfo())) this.userInfo = JSON.parse(JSON.parse(getUserInfo()))
this.form.faceImg = generateSignature(this.userInfo.userName) this.form.faceImg = generateSignature(this.userInfo.userName)
console.log(this.form.faceImg)
this.preNodes = this.formatContent(val) this.preNodes = this.formatContent(val)
} }
} }
...@@ -356,7 +357,6 @@ ...@@ -356,7 +357,6 @@
optionCode: item.code optionCode: item.code
} }
dynamicVote(data).then(res => { dynamicVote(data).then(res => {
console.log(res)
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
title: '投票成功' title: '投票成功'
...@@ -402,7 +402,7 @@ ...@@ -402,7 +402,7 @@
} }
}, },
imgLoadFail() { imgLoadFail() {
this.userInfo.faceImg = defalutAvatar this.form.faceImg = defalutAvatar
}, },
//预览视频 //预览视频
videoPreview(url) { videoPreview(url) {
......
<template> <template>
<view class="detail-page-container"> <view class="detail-page-container">
<dynamic-item :form="form" @refresh="handleRefresh" @refreshCurrent="handleRefresh" @deleteSuccess="deleteSuccess"></dynamic-item> <dynamic-item :form="form" :displayComment="true" @refresh="handleRefresh" @refreshCurrent="handleRefresh" @deleteSuccess="deleteSuccess"></dynamic-item>
<!-- 评论管理区 --> <!-- 评论管理区 -->
<comment-item :form="form" ></comment-item> <comment-item :form="form" ></comment-item>
</view> </view>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<scroll-view class="scroll-view-index" scroll-y :show-scrollbar="false" v-if="list.length>0" <scroll-view class="scroll-view-index" scroll-y :show-scrollbar="false" v-if="list.length>0"
@scrolltolower="loadMore"> @scrolltolower="loadMore">
<template v-for="(item,index) in list"> <template v-for="(item,index) in list">
<dynamic-item :form="item" :displayComment="false" @refresh="refreshContentList" <dynamic-item :form="item" @refresh="refreshContentList"
@refreshCurrent="refreshCurrent"></dynamic-item> @refreshCurrent="refreshCurrent"></dynamic-item>
</template> </template>
</scroll-view> </scroll-view>
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
<view class="mine-header"> <view class="mine-header">
<view class="user-info-box"> <view class="user-info-box">
<view class="info-box" v-if="userInfo"> <view class="info-box" v-if="userInfo">
<image v-if="!userInfo.avatar" src="/static/images/default-avatar.png" class="avatar" <!-- <image v-if="!userInfo.avatar" src="/static/images/default-avatar.png" class="avatar"
@click="handleEditAvatar"></image> @click="handleEditAvatar"></image> -->
<image v-else :src="userInfo.avatar" class="avatar" @click="handleEditAvatar"></image> <image v-if="faceImg" :src="faceImg" class="avatar" @error="imgLoadFail" @click="handleEditAvatar"></image>
<view class="name-class"> <view class="name-class">
<view class="name">{{userInfo.nickName}}</view> <view class="name">{{userInfo.nickName}}</view>
<view class="class-name">{{userInfo.dept.deptName}}</view> <view class="class-name">{{userInfo.dept.deptName}}</view>
...@@ -60,6 +60,8 @@ ...@@ -60,6 +60,8 @@
updateUserInfo updateUserInfo
} from '@/api/api.js'; } from '@/api/api.js';
import HelangCompress from '@/components/HelangCompress.vue'; import HelangCompress from '@/components/HelangCompress.vue';
import {generateSignature} from '@/utils/common.js';
import defalutAvatar from '/static/images/default-avatar.png'
export default { export default {
data() { data() {
return { return {
...@@ -73,6 +75,7 @@ ...@@ -73,6 +75,7 @@
total: 0, total: 0,
uploadUrl: '/bbs/mobile/common/upload', //上传地址 uploadUrl: '/bbs/mobile/common/upload', //上传地址
baseUrl: config.requestUrl, baseUrl: config.requestUrl,
faceImg:''
} }
}, },
components: { components: {
...@@ -94,6 +97,7 @@ ...@@ -94,6 +97,7 @@
getUserInfo() { getUserInfo() {
getInfo().then(res => { getInfo().then(res => {
this.userInfo = res.data this.userInfo = res.data
this.faceImg = generateSignature(this.userInfo.userName)
}) })
}, },
// 统计数据 // 统计数据
...@@ -166,6 +170,9 @@ ...@@ -166,6 +170,9 @@
} }
}); });
}, },
imgLoadFail() {
this.faceImg = defalutAvatar
},
//将base64转换为blob //将base64转换为blob
dataURLtoBlob(dataurl) { dataURLtoBlob(dataurl) {
var arr = dataurl.split(','), var arr = dataurl.split(','),
......
...@@ -131,11 +131,11 @@ ...@@ -131,11 +131,11 @@
.topic-container { .topic-container {
width: 92vw; width: 92vw;
height: 180rpx; min-height: 160rpx;
border-radius: 12rpx; border-radius: 12rpx;
background: linear-gradient(89.31deg, rgba(230, 246, 254, 1) 1.2%, rgba(186, 239, 255, 1) 99.53%); background: linear-gradient(89.31deg, rgba(230, 246, 254, 1) 1.2%, rgba(186, 239, 255, 1) 99.53%);
text-align: center; text-align: center;
padding: 0 30rpx; padding: 10rpx 30rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
......
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