Commit 51a7dd2c authored by yuwenwen's avatar yuwenwen

移动端BUG修复

parent 688ebc98
......@@ -5,6 +5,10 @@
<image class="avatar" v-if="form.faceImg" :src="form.faceImg" @error="imgLoadFail"></image>
<!-- <image class="avatar" v-else src="/static/images/default-avatar.png"></image> -->
<view class="user-name">{{form.nickName}}</view>
<view class="top-icon" v-if="form.isTop==1">
<image class="icon" src="/static/images/is-top.png"></image>
</view>
<image v-if="deleteable || userInfo.bbsAdmin || form.isSelf==1" class="more-icon"
@click.stop="handleDelDynamics" src="/static/images/more-icon.png"></image>
<image v-else class="more-icon" src="/static/images/more-icon.png"></image>
......@@ -391,8 +395,9 @@
},
// 预览图片
preview(list, index) {
console.log(list, index)
let urls = list.map((item) => {
return item.url;
return item.imageUrl;
})
if (urls.length > 0) {
uni.previewImage({
......
......@@ -2,11 +2,14 @@
<view class="detail-page-container pk-detail-page">
<view class="pk-tab-box" v-if="voteOptions.length>0">
<view class="tab-item" v-for="(item,index) in voteOptions" @click="handleChange(item,index)">
<view class="text" :class="{'active':index==activeIndex}">{{item.name}}{{item.voteCount}}</view>
<view class="text"
:class="{'active-red':(index==0&&index==activeIndex),'active':(index==1&&index==activeIndex)}">
{{optionText[index].text}}{{item.voteCount}}</view>
</view>
</view>
<scroll-view class="scroll-view-pk" scroll-y :show-scrollbar="false" v-if="list.length>0" @scrolltolower="loadMore">
<scroll-view class="scroll-view-pk" scroll-y :show-scrollbar="false" v-if="list.length>0"
@scrolltolower="loadMore">
<view class="list-item" v-for="(item,index) in list">
<image src="/static/images/default-avatar.png" class="avatar"></image>
<view class="name">{{item.nickName}}</view>
......@@ -32,15 +35,20 @@
pageNum: 1,
pageSize: 10,
momentId: '',
optionCode:undefined
optionCode: undefined
},
total:0,
total: 0,
activeIndex: 0,
voteOptions: [],
list:[]
list: [],
optionText: [{
text: '红方'
}, {
text: '蓝方'
}]
}
},
components:{
components: {
ListEmpty
},
onLoad(options) {
......@@ -58,16 +66,16 @@
methods: {
getList() {
uni.showLoading({
title:'加载中...'
title: '加载中...'
})
voteList(this.queryParams).then(res => {
this.list = [...this.list,...res.rows];
this.list = [...this.list, ...res.rows];
this.total = res.total;
}).finally(()=>{
}).finally(() => {
uni.hideLoading()
})
},
handleChange(item,index){
handleChange(item, index) {
this.activeIndex = index
this.queryParams.optionCode = item.code;
this.queryParams.pageNum = 1;
......@@ -75,7 +83,7 @@
this.getList()
},
loadMore() {
if(this.list.length < this.total){
if (this.list.length < this.total) {
this.queryParams.pageNum += 1;
this.getList()
}
......@@ -89,6 +97,7 @@
.pk-detail-page {
background-color: white;
.pk-tab-box {
height: 92rpx;
display: flex;
......@@ -113,6 +122,11 @@
color: #3484FD;
border-bottom: 4rpx solid #3484FD;
}
.active-red {
color: #ff645f;
border-bottom: 4rpx solid #ff645f;
}
}
}
......
......@@ -48,8 +48,8 @@
<view class="choice-box" v-if="form.voteOptionType=='IMAGE'">
<view class="choice-item">
<image-upload v-model="voteOptionsAffirmative" :limit="1" :width="120" :height="120"
:showIcons="false"></image-upload>
<image-upload v-model="voteOptionsAffirmative" :mediaType="['image']" :limit="1" :width="120" :height="120"
:showIcons="false" ></image-upload>
<input class="text" maxlength="16" v-model="form.voteOptions[0].name"
placeholder="请输入选项1(16字以内)" />
</view>
......
......@@ -22,9 +22,22 @@
border-radius: 50%;
}
.user-name{
width: calc(100% - 168rpx);
width: calc(100% - 208rpx);
color: rgba(16, 16, 16, 1);
}
.top-icon{
width: 40rpx;
height: 40rpx;
border-radius: 6rpx;
background-color: rgba(242, 172, 57, 0.1);
display: flex;
align-items: center;
justify-content: center;
.icon{
width: 24rpx;
height: 24rpx;
}
}
.more-icon{
width: 48rpx;
height: 48rpx;
......
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