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

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

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