购物车,订单,霸王餐
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
<view class="paymentMethod">
|
||||
<view class="paymentMethod_content">
|
||||
<view class="paymentMethod_title">支付方式</view>
|
||||
<up-radio-group v-model="radiovalue" iconPlacement="right" @change="groupChange" :size="28"
|
||||
<up-radio-group v-model="radiovalue" iconPlacement="right" @change="groupChanges" :size="28"
|
||||
placement="column">
|
||||
<block v-for="(item,index) in paymentMethodList" :key="index">
|
||||
<view class="method_list" @click="groupChange(item.type)">
|
||||
<view class="method_list" @click="groupChanges(item.type)" v-if="index == 0?!changeFreeenable:true">
|
||||
<view class="method_list_top">
|
||||
<view class="method_list_top_left">
|
||||
<image class="icon" :src="item.url" mode="aspectFill" />
|
||||
@@ -38,7 +38,8 @@
|
||||
computed,
|
||||
defineEmits,
|
||||
watch,
|
||||
watchEffect
|
||||
watchEffect,
|
||||
defineExpose
|
||||
} from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
@@ -53,10 +54,15 @@
|
||||
freeCheck: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
changeFreeenable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
const orderVIP = ref(uni.cache.get('orderVIP'))
|
||||
const emits = defineEmits(['customevent', 'groupChange']);
|
||||
|
||||
@@ -113,7 +119,7 @@
|
||||
const storeInfo = ref({})
|
||||
|
||||
// * 监听支付方式切换
|
||||
const groupChange = (type) => {
|
||||
const groupChanges = (type) => {
|
||||
if (props.freeCheck && type == 1) {
|
||||
return;
|
||||
}
|
||||
@@ -132,6 +138,10 @@
|
||||
shopId: orderVIP.value.shopId
|
||||
})
|
||||
}
|
||||
// 将方法暴露给父组件
|
||||
defineExpose({
|
||||
groupChanges
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user