Commit 32f31e67 authored by Mac's avatar Mac

1

parent e91e140e
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
<text style="font-size:12px;color: #666666;">标签</text> <text style="font-size:12px;color: #666666;">标签</text>
<div> <div>
<view class="flex-row" style="justify-content: flex-end;margin-bottom: 5px;"> <view class="flex-row" style="justify-content: flex-end;margin-bottom: 5px;">
<u-tag :text="x" mode="dark" :bg-color="mainColor" size='mini' style='margin-left: 5px;' v-for="(x, i) in addMsg.Label" :key="i" closeable @close="tagClick(i)"/> <u-tag :text="x" mode="dark" :bg-color="mainColor" size='mini' style='margin-left: 5px;' v-for="(x, i) in addMsg.LabelList" :key="i" closeable @close="tagClick(i)"/>
</view> </view>
<view class="flex-row" style="justify-content: flex-end;"> <view class="flex-row" style="justify-content: flex-end;">
<input type="text" v-model="labeldemo" :min='0' :maxlength="5" placeholder="活动标签" style="font-size: 12px;text-align: right;margin-right: 5px;"> <input type="text" v-model="labeldemo" :min='0' :maxlength="5" placeholder="活动标签" style="font-size: 12px;text-align: right;margin-right: 5px;">
...@@ -291,7 +291,7 @@ export default { ...@@ -291,7 +291,7 @@ export default {
Content:'', Content:'',
ImageList:[], ImageList:[],
Deadline:'', Deadline:'',
Label:[], LabelList:[],
IsOpenEnroll:1,//1 是开启 2 是不开启 IsOpenEnroll:1,//1 是开启 2 是不开启
StartTime:'', StartTime:'',
EndTime:'', EndTime:'',
...@@ -355,21 +355,29 @@ export default { ...@@ -355,21 +355,29 @@ export default {
}, },
methods: { methods: {
addlable(){ addlable(){
console.log(this.addMsg.Label.length) if(this.addMsg.LabelList.length>2){
if(this.addMsg.Label.length>2){
uni.showToast({ uni.showToast({
title: '标签最多3个', title: '标签最多3个',
icon: 'none', icon: 'none',
duration: 2500 duration: 2500
}) })
}else{ }else{
this.addMsg.Label.push(this.labeldemo) if(this.labeldemo == ''){
this.labeldemo = ''; uni.showToast({
title: '请输入标签内容',
icon: 'none',
duration: 2500
})
}else{
this.addMsg.LabelList.push(this.labeldemo)
this.labeldemo = '';
}
} }
}, },
tagClick(i){ tagClick(i){
this.addMsg.Label.splice(i,1) this.addMsg.LabelList.splice(i,1)
}, },
GetForumList(){ GetForumList(){
this.request2( this.request2(
......
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
{{x.ActivityTitle}} {{x.ActivityTitle}}
</view> </view>
<view class="max-b"> <view class="max-b">
<view class="tagBox"> <view class="tagBox" v-if="x.LabelList.length>0">
<u-tag :text="x.Label" mode="dark" :bg-color="mainColor" size='mini' <u-tag :text="item" mode="dark" :bg-color="mainColor" size='mini' style='margin-right: 5px;'
v-if="x.Label!=null && x.Label!=''" /> v-for="(item, index) in x.LabelList" :key="index" />
</view> </view>
<view class="infoBox"> <view class="infoBox">
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</view> </view>
<u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20" <u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20"
bg-color="#FFF" /> bg-color="#F5F5F5" />
<view style="width: 100%;height: 50px;"></view> <view style="width: 100%;height: 50px;"></view>
</scroll-view> </scroll-view>
......
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