emis-sapp/components/buns-post-edit-templates/bpe-checkagree-tmp.vue
2024-08-07 12:14:51 +08:00

83 lines
1.8 KiB
Vue

<template>
<u-row v-if="showPrivacy" align="top">
<u-checkbox-group placement="column" @change="handleAgree()">
<u-checkbox size="26" labelSize="26" :checked="modelInfo._agreePrivacy" label="我已同意接受"
label-color=":#999" activeColor="#B12D29"
custom-style="margin-bottom: 10rpx;"></u-checkbox>
</u-checkbox-group>
<view @click="handleDialogClick(privacyModal)" class="pl-10" style="padding-top: 6rpx;">
<u-text text="《快件运单契约条款》" size="26"></u-text>
</view>
</u-row>
<view @click="handleAgree()">
<u-row>
<view class="mr-10">
<u-text text="预估" :bold="true" size="28"></u-text>
</view>
<u-text :text="modelInfo.freight || 0" mode="price" color="#B12D29" :bold="true" size="28"></u-text>
</u-row>
<u-text margin="10rpx 0 0 0" text="温馨提示:具体费用以快递小哥核实为准" color="#999" size="26"></u-text>
</view>
<buns-privacy-dialog v-model:show="privacyModal.show" :content="privacyModal.content" title="快件运单契约条款"> </buns-privacy-dialog>
</template>
<script>
import * as apiService from "@/common/api"
export default {
computed: {
modelInfo: {
get(){
return this.value
}
},
},
watch: {
},
props: {
value: {
default () {
return { }
}
},
showPrivacy: {
default () {
return true
}
},
},
data() {
return {
privacyModal: {
show: false,
},
}
},
created() {
this.initData()
},
onHide() {
},
unmounted() {
},
methods: {
async initData(){
let res = await apiService.getAgreementTxt()
this.privacyModal.content = res?.data || ''
},
handleAgree() {
this.modelInfo._agreePrivacy = !this.modelInfo._agreePrivacy
},
handleDialogClick(curModal){
curModal.show = true
}
}
}
</script>
<style scoped lang="scss">
</style>