Browse Source

修改bug

dev
岳鹏龙 1 year ago
parent
commit
3b81067886
  1. 2
      src/pages/myElection/index.vue
  2. 22
      src/pages/votingElection/index.vue

2
src/pages/myElection/index.vue

@ -182,7 +182,7 @@
.election-item {
margin-bottom: 30rpx;
padding: 40rpx;
padding: 34rpx;
border-radius: 24rpx;
background: linear-gradient(0deg, rgba(0, 0, 0, 0.001), rgba(0, 0, 0, 0.001)), #FFFFFF;
box-sizing: border-box;

22
src/pages/votingElection/index.vue

@ -65,11 +65,22 @@ const buttlist = ref([
}
])
const selectBut = (data: any, cardid: any,type: string) => {
const selectBut = (data : any, cardid : any, type : string, butname: string) => {
const target = data.find((card : { id : any; }) => card.id === cardid);
uni.showModal({
title: '您本轮选举投' + butname + '票',
content: '确定吗?',
success: function (res) {
if (res.confirm) {
if (target) {
target.yijian = target.yijian === type ? null : type;
}
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
</script>
@ -97,13 +108,8 @@ const selectBut = (data: any, cardid: any,type: string) => {
</view>
</view>
<view class="bottomp">
<view
class="minbut"
v-for="(item, ele) in buttlist"
:key="ele"
@click="selectBut(data,row.id,item.type)"
:class="{ active: row.yijian === item.type }"
>
<view class="minbut" v-for="(item, ele) in buttlist" :key="ele"
@click="selectBut(data,row.id,item.type,item.butname)" :class="{ active: row.yijian === item.type }">
{{ item.butname }}
</view>
</view>

Loading…
Cancel
Save