优化功能
This commit is contained in:
@ -97,7 +97,6 @@
|
|||||||
<view>¥{{ bill?.order?.order_amount }}</view>
|
<view>¥{{ bill?.order?.order_amount }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx" v-if="bill.change_type != 9">
|
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx" v-if="bill.change_type != 9">
|
||||||
<view>优惠券</view>
|
<view>优惠券</view>
|
||||||
<view>-¥{{ bill?.order?.coupon_price }}</view>
|
<view>-¥{{ bill?.order?.coupon_price }}</view>
|
||||||
|
|||||||
@ -40,7 +40,12 @@
|
|||||||
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { toast } from '@/utils/toast'
|
import { useToast } from 'wot-design-uni'
|
||||||
|
import { useStoreStore } from '@/store'
|
||||||
|
import { scanVerifyCoupon } from '@/api/store'
|
||||||
|
|
||||||
|
const useStore = useStoreStore()
|
||||||
|
const toast = useToast()
|
||||||
|
|
||||||
const storeName = ref<string>('')
|
const storeName = ref<string>('')
|
||||||
|
|
||||||
@ -53,6 +58,7 @@
|
|||||||
|
|
||||||
onLoad((args) => {
|
onLoad((args) => {
|
||||||
storeName.value = args.storeName || ''
|
storeName.value = args.storeName || ''
|
||||||
|
console.log("🚀 ~ storeName.value:", storeName.value)
|
||||||
})
|
})
|
||||||
|
|
||||||
const VerifyCode = {
|
const VerifyCode = {
|
||||||
@ -61,11 +67,30 @@
|
|||||||
if (!model.code) {
|
if (!model.code) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
toast.loading({
|
||||||
|
msg: '验券中...'
|
||||||
|
})
|
||||||
|
try {
|
||||||
|
scanVerifyCoupon(model.code, useStore.defaultStore.id).then((res) => {
|
||||||
|
toast.close()
|
||||||
|
toast.info({
|
||||||
|
msg: '验券成功',
|
||||||
|
duration: 1500
|
||||||
|
})
|
||||||
|
uni.navigateBack()
|
||||||
|
}).catch((error) => {
|
||||||
|
toast.close()
|
||||||
|
return false
|
||||||
|
})
|
||||||
|
} catch(e) {
|
||||||
|
toast.close()
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
page {
|
page {
|
||||||
background-color: $cz-page-background;
|
background-color: $cz-page-background;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -87,7 +87,7 @@
|
|||||||
|
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
<price-format color="#FF5951" :first-size="36" :second-size="36" :subscript-size="24" :price="order.discount_price"></price-format>
|
<price-format color="#FF5951" :first-size="36" :second-size="36" :subscript-size="24" :price="order.discount_price"></price-format>
|
||||||
<view class="rounded-4rpx w-60rpx text-center text-[#FF5951] border-2rpx border-solid border-[#FF5951] text-22rpx pb-4rpx mx-14rpx">{{ order.discount }}折</view>
|
<view class="rounded-4rpx w-80rpx text-center text-[#FF5951] border-2rpx border-solid border-[#FF5951] text-22rpx pb-4rpx mx-14rpx">{{ order.discount }}折</view>
|
||||||
<price-format color="#BFC2CC" :first-size="22" :second-size="22" :subscript-size="22" :price="order.price" lineThrough></price-format>
|
<price-format color="#BFC2CC" :first-size="22" :second-size="22" :subscript-size="22" :price="order.price" lineThrough></price-format>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -231,7 +231,7 @@
|
|||||||
if (item.item.name === '扫码验券') {
|
if (item.item.name === '扫码验券') {
|
||||||
Index.handleScanCode()
|
Index.handleScanCode()
|
||||||
} else if (item.item.name === '输入券码') {
|
} else if (item.item.name === '输入券码') {
|
||||||
const storeName = '茶址24小时智能茶室(中新店)'
|
const storeName = useStore.defaultStore.name
|
||||||
router.navigateTo(`/bundle/store/verify-code?storeName=${storeName}`)
|
router.navigateTo(`/bundle/store/verify-code?storeName=${storeName}`)
|
||||||
} else if (item.item.name === '验券记录') {
|
} else if (item.item.name === '验券记录') {
|
||||||
router.navigateTo('/bundle/store/verify-record')
|
router.navigateTo('/bundle/store/verify-record')
|
||||||
|
|||||||
Reference in New Issue
Block a user