Commit 6182ffc6 authored by Facius's avatar Facius

feat: 名片滑动查看

parent c2d8a26c
Pipeline #3240 canceled with stages
<template>
<view
class="cell-card"
hover-class="u-hover-class"
@click.stop="$u.throttle(handleClickCard, 500)"
>
<swiper
class="swiper"
:indicator-dots="true"
indicator-color="rgba(252, 184, 42, 0.45)"
indicator-active-color="#FCB82A"
style="height: 420rpx"
>
<swiper-item>
<Card
ref="card"
:info="info"
@save="handleCanvas"
@update="handleUpdate"
/>
</swiper-item>
<swiper-item>
<CardBack ref="cardBack" :info="info" @save="handleCanvasBack" />
</swiper-item>
</swiper>
</view>
</template>
<script>
import Card from '@/components/cell-card'
import CardBack from '@/components/cell-card-back'
export default {
components: {
Card,
CardBack,
},
props: {
info: {
type: Object,
default() {
return {}
},
},
},
data() {
return {}
},
computed: {},
methods: {
updateImage() {
this.$refs.card.updateImage()
},
saveImage() {
this.$refs.card.saveImage()
return
this.$refs.cardBack.saveImage()
},
handleClickCard() {
this.$emit('click')
},
handleCanvas(res) {
this.$emit('save', res)
},
handleUpdate(url) {
this.$emit('update', url)
},
handleCanvasBack(res) {
this.$refs.card.saveImage()
},
},
}
</script>
<style scoped lang="scss">
.cell-card {
width: 100%;
height: 420rpx;
border-radius: 16rpx;
background-color: #ffffff;
position: relative;
overflow: hidden;
}
</style>
<template>
<view
class="cell-card"
hover-class="u-hover-class"
@click.stop="$u.throttle(handleClick, 500)"
>
<view class="cell-card">
<template v-if="isGreen">
<view class="back-view">
<image :src="settings.image"></image>
......
......@@ -31,7 +31,7 @@
</view>
<template v-else>
<view class="card-content">
<Card
<CardSwiper
ref="card"
:info="info"
@click="handleClickCard"
......@@ -114,7 +114,7 @@
<script>
import NavbarRight from '@/components/navbar-right'
import NoData from '@/components/no-data'
import Card from '@/components/cell-card'
import CardSwiper from '@/components/cell-card-swiper'
import CellRelation from '@/components/cell-relation'
import {
getBusinessCardSelf,
......@@ -128,7 +128,7 @@ export default {
components: {
NavbarRight,
NoData,
Card,
CardSwiper,
CellRelation,
},
data() {
......
......@@ -205,7 +205,7 @@ export default {
date: this.$u.timeFormat(new Date().getTime(), 'yyyy-mm') + '-01',
daterange: [],
showDatePicker: false,
infoIndex: 0,
infoIndex: 1,
info: {},
loading: false,
triggered: true,
......@@ -693,12 +693,13 @@ export default {
align-items: center;
justify-content: space-between;
padding: 0 24rpx;
font-size: 24rpx;
.left-view {
display: flex;
align-items: center;
.item-view {
height: 48rpx;
width: 104rpx;
width: 96rpx;
line-height: 48rpx;
font-weight: bold;
color: #8d8d8d;
......
......@@ -277,14 +277,18 @@ export default {
if (this.billId) {
this.repairDetail();
} else {
this.getLocation();
}
uni.$on('maintain-bill-detail', (res) => {
this.repairDetail()
})
this.getLocation();
},
onReady() {
this.$refs.uForm.setRules(this.rules);
},
onUnload() {},
onUnload() {
uni.$off('maintain-bill-detail')
},
onShow() {},
methods: {
preview() {
......
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