Commit af0a46ec authored by 潘永坪's avatar 潘永坪

Merge remote-tracking branch 'remotes/origin/album' into develop

parents b4a70553 9cae3510
......@@ -141,4 +141,7 @@ export default {
border-color: #3688FF !important;
color: #ffffff !important;
}
checkbox.round .wx-checkbox-input {
border-radius: 50% !important;
}
</style>
......@@ -175,6 +175,8 @@ export default {
}else{
reject(false)
}
}).catch(() => {
reject(false)
})
})
},
......@@ -211,11 +213,11 @@ export default {
}
// 4.判断是否跳转投票页面
if(voteObj.alreadySurvey === 0) {// 未投过票
if(voteObj.alreadySurvey === 1) {// 未投过票
uni.navigateTo({
url: `./chooseFavorite?surveyConfig=${JSON.stringify(surveyResult)}`
})
}else if(voteObj.alreadySurvey === 1) {// 已投票
}else if(voteObj.alreadySurvey === 0) {// 已投票
this.show = true
}
},
......
......@@ -13,9 +13,9 @@
<image class="start" src="./static/album/star.png"></image>
</view>
<view class="img-box">
<view class="item" @click="imageChange(item)" v-for="(item, index) in imgArr" :key="item.templateId">
<view class="item" v-for="(item, index) in imgArr" :key="item.templateId" @click="imageChange(item)">
<image class="img" :src="item.templateUrl" mode="aspectFill"></image>
<u-checkbox class="checkbox" v-model="item.value" shape="circle"></u-checkbox>
<checkbox class="checkbox blue round" :checked="item.value" :value="item.templateId" shape="circle"></checkbox>
</view>
</view>
<button class="btn" @click="saveClick">提交</button>
......@@ -25,10 +25,12 @@
</template>
<script>
import UCheckboxGroup from '@/uview-ui/components/u-checkbox-group/u-checkbox-group.vue'
import UCheckbox from '@/uview-ui/components/u-checkbox/u-checkbox.vue'
export default {
components: {
UCheckboxGroup,
UCheckbox,
},
data() {
......@@ -43,6 +45,9 @@ export default {
}
},
methods: {
checkboxChange(e) {
console.log(e)
},
saveClick() {//---提交
const templateIds = this.imgArr.map(item => {
if(item.value) return item.templateId
......@@ -82,7 +87,11 @@ export default {
},
imageChange(item) {//---图片选择
this.$set(item, 'value', !item.value)
this.$forceUpdate()
this.$set(item, 'show', false)
this.$set(item, 'show', true)
console.log(item.value, item.show)
// item.show = false
// item.show = true
// item.value = !item.value
},
recordDeviceInfo() {//---记录设备信息
......@@ -100,7 +109,10 @@ export default {
this.companyArr.forEach(item => {
imgArr.push(...item.templateDetailList)
})
imgArr.forEach(item => this.$set(item, 'value', false))
imgArr.forEach(item => {
this.$set(item, 'value', false)
this.$set(item, 'show', true)
})
this.imgArr = this.companyArr[0].templateDetailList
}
}
......@@ -171,21 +183,10 @@ export default {
heigit: 100%;
}
.checkbox {
display: flex;
position: absolute;
right: 12rpx;
top: 12rpx;
width: 36rpx;
height: 36rpx;
}
.u-checkbox__label {
margin: 0;
}
/deep/.u-checkbox__icon-wrap {
border: 1px solid #fff;
}
/deep/.u-checkbox__icon-wrap--checked {
border: 1px solid #2979ff;
right: 0;
top: 8rpx;
transform: scale(0.8);
}
}
}
......
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