123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454 |
- <template>
- <view class="card">
- <view class="card-list" v-if="list">
- <view v-for='(item,index) in list' class="item flex">
- <view class="card-list-item"
- :style="'background:url('+item.currentBackground+');background-size:100% 100%;width:100%'">
- <view class="card-content style1" v-if="item.cuttentTemplate==1">
- <view class="left">
- <u--image :showLoading="true" :src="item.headSculpture" width="66px" height="66px"
- shape="circle"></u--image>
- </view>
- <view class="right">
- <view class="row1">
- <text class="name">{{item.name}}</text>
- <text class="post">{{item.post}}</text>
- </view>
- <view class="row2">
- {{item.companyName}}
- </view>
- <view class="row3 flex">
- <uni-icons type="map-filled" size="20" style="margin-right: 20rpx;"
- color="#5e6d82"></uni-icons>{{ item.province }}{{ item.city }}{{ item.area }}
- </view>
- <view class="row4 flex">
- <uni-icons type="phone-filled" size="20" style="margin-right: 20rpx;"
- color="#5e6d82"></uni-icons>{{ item.phone }}
- </view>
- <!-- <view class="">
- 备注
- </view> -->
- </view>
- </view>
- <view class="card-content style1 flex-between" v-if="item.cuttentTemplate==2">
- <view class="right">
- <view class="row1">
- <text class="name">{{item.name}}</text>
- <text class="post">{{item.post}}</text>
- </view>
- <view class="row2">
- {{item.companyName}}
- </view>
- <view class="row3 flex">
- <uni-icons type="map-filled" size="20" style="margin-right: 20rpx;"
- color="#5e6d82"></uni-icons>{{ item.province }}{{ item.city }}{{ item.area }}
- </view>
- <view class="row4 flex">
- <uni-icons type="phone-filled" size="20" style="margin-right: 20rpx;"
- color="#5e6d82"></uni-icons>{{ item.phone }}
- </view>
- <!-- <view class="">
- 备注
- </view> -->
- </view>
- <view class="left">
- <u--image :showLoading="true" :src="item.headSculpture" width="66px" height="66px"
- shape="circle" v-if="item.headSculpture"></u--image>
- <u--image :showLoading="true" src="/static/imgs/card/defaulthead.png" width="66px" height="66px"
- shape="circle" v-else></u--image>
- </view>
- </view>
- <view class="card-content style2" v-if="item.cuttentTemplate==3">
- <view class="top">
- <u--image :showLoading="true" :src="item.headSculpture" width="66px" height="66px"
- shape="circle" v-if="item.headSculpture"></u--image>
- <u--image :showLoading="true" src="/static/imgs/card/defaulthead.png" width="66px" height="66px"
- shape="circle" v-else></u--image>
- </view>
- <view class="bottom flex">
- <view class="left">
- <view class="row1">
- <text class="name">{{item.name}}</text>
- <text class="post">{{item.post}}</text>
- </view>
- <view class="row2">
- {{item.companyName}}
- </view>
- </view>
- <view class="right">
- <view class="row1 flex">
- <uni-icons type="map-filled" size="20" style="margin-right: 20rpx;"
- color="#5e6d82"></uni-icons>{{ item.province }}{{ item.city }}{{ item.area }}
- </view>
- <view class="row2 flex">
- <uni-icons type="phone-filled" size="20" style="margin-right: 20rpx;"
- color="#5e6d82"></uni-icons>{{ item.phone }}
- </view>
- </view>
- </view>
- </view>
- <view class="card-content style2" v-if="item.cuttentTemplate==4">
- <view class="top">
- <view class="row1">
- <text class="name">{{item.name}}</text>
- <text class="post">{{item.post}}</text>
- </view>
- <view class="row2">
- {{item.companyName}}
- </view>
- </view>
- <view class="bottom flex">
- <view class="left">
- <u--image :showLoading="true" :src="item.headSculpture" width="66px" height="66px"
- shape="circle" v-if="item.headSculpture"></u--image>
- <u--image :showLoading="true" src="/static/imgs/card/defaulthead.png" width="66px" height="66px"
- shape="circle" v-else></u--image>
- </view>
- <view class="right">
- <view class="row1 flex">
- <uni-icons type="map-filled" size="20" style="margin-right: 20rpx;"
- color="#5e6d82"></uni-icons>{{ item.province }}{{ item.city }}{{ item.area }}
- </view>
- <view class="row2 flex">
- <uni-icons type="phone-filled" size="20" style="margin-right: 20rpx;"
- color="#5e6d82"></uni-icons>{{ item.phone }}
- </view>
- </view>
- </view>
- </view>
- <view class="car-bottom flex">
- <view class="left" :style='styleList[0]'>
-
- </view>
- <view class="right" :style='styleList[1]'>
-
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="card-obj" v-if="obj">
- <view class="card-list-item" :style="obj.currentBackground?'background:url('+obj.currentBackground+');background-size:100% 100%':''">
- <view class="card-content style1" v-if="obj.cuttentTemplate==1">
- <view class="left">
- <u--image :showLoading="true" :src="obj.headSculpture" width="66px" height="66px"
- shape="circle"></u--image>
- </view>
- <view class="right">
- <view class="row1">
- <text class="name">{{obj.name}}</text>
- <text class="post">{{obj.post}}</text>
- </view>
- <view class="row2">
- {{obj.companyName}}
- </view>
- <view class="row3 flex">
- <uni-icons type="map-filled" size="20" style="margin-right: 20rpx;"
- color="#5e6d82"></uni-icons>{{ obj.province }}{{ obj.city }}{{ obj.area }}
- </view>
- <view class="row4 flex">
- <uni-icons type="phone-filled" size="20" style="margin-right: 20rpx;"
- color="#5e6d82"></uni-icons>{{ obj.phone }}
- </view>
- </view>
- </view>
- <view class="card-content style1 flex-between" v-if="obj.cuttentTemplate==2">
- <view class="right">
- <view class="row1">
- <text class="name">{{obj.name}}</text>
- <text class="post">{{obj.post}}</text>
- </view>
- <view class="row2">
- {{obj.companyName}}
- </view>
- <view class="row3 flex">
- <uni-icons type="map-filled" size="20" style="margin-right: 20rpx;"
- color="#5e6d82"></uni-icons>{{ obj.province }}{{ obj.city }}{{ obj.area }}
- </view>
- <view class="row4 flex">
- <uni-icons type="phone-filled" size="20" style="margin-right: 20rpx;"
- color="#5e6d82"></uni-icons>{{ obj.phone }}
- </view>
- </view>
- <view class="left">
- <u--image :showLoading="true" :src="obj.headSculpture" width="66px" height="66px" shape="circle"
- v-if="obj.headSculpture"></u--image>
- <u--image :showLoading="true" src="/static/imgs/card/defaulthead.png" width="66px" height="66px" shape="circle"
- v-else></u--image>
- </view>
- </view>
- <view class="card-content style2" v-if="obj.cuttentTemplate==3">
- <view class="top">
- <u--image :showLoading="true" :src="obj.headSculpture" width="66px" height="66px" shape="circle"
- v-if="obj.headSculpture"></u--image>
- <u--image :showLoading="true" src="/static/imgs/card/defaulthead.png" width="66px" height="66px" shape="circle"
- v-else></u--image>
- </view>
- <view class="bottom flex">
- <view class="left">
- <view class="row1">
- <text class="name">{{obj.name}}</text>
- <text class="post">{{obj.post}}</text>
- </view>
- <view class="row2">
- {{obj.companyName}}
- </view>
- </view>
- <view class="right">
- <view class="row1 flex">
- <uni-icons type="map-filled" size="20" style="margin-right: 20rpx;"
- color="#5e6d82"></uni-icons>{{ obj.province }}{{ obj.city }}{{ obj.area }}
- </view>
- <view class="row2 flex">
- <uni-icons type="phone-filled" size="20" style="margin-right: 20rpx;"
- color="#5e6d82"></uni-icons>{{ obj.phone }}
- </view>
- </view>
- </view>
- </view>
- <view class="card-content style2" v-if="obj.cuttentTemplate==4">
- <view class="top">
- <view class="row1">
- <text class="name">{{obj.name}}</text>
- <text class="post">{{obj.post}}</text>
- </view>
- <view class="row2">
- {{obj.companyName}}
- </view>
- </view>
- <view class="bottom flex">
- <view class="left">
- <u--image :showLoading="true" :src="obj.headSculpture" width="66px" height="66px"
- shape="circle" v-if="obj.headSculpture"></u--image>
- <u--image :showLoading="true" src="/static/imgs/card/defaulthead.png" width="66px"
- height="66px" shape="circle" v-else></u--image>
- </view>
- <view class="right">
- <view class="row1 flex">
- <uni-icons type="map-filled" size="20" style="margin-right: 20rpx;"
- color="#5e6d82"></uni-icons>{{ obj.province }}{{ obj.city }}{{ obj.area }}
- </view>
- <view class="row2 flex">
- <uni-icons type="phone-filled" size="20" style="margin-right: 20rpx;"
- color="#5e6d82"></uni-icons>{{ obj.phone }}
- </view>
- </view>
- </view>
- </view>
- <view class="car-bottom flex">
- <view class="left" :style='styleList[0]'>
- </view>
- <view class="right" :style='styleList[1]'>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: "Card",
- props: {
- obj: {
- type: Object,
- required: true
- },
- list: {
- type: Array,
- required: true
- },
- styleList: {
- type: Array,
- required: true
- },
- page: {
- type: String,
- required: true
- }
- },
- data() {
- return {
- };
- },
- watch: {
- list(newVal, oldVal) {
- }
- },
- mounted() {},
- methods: {}
- }
- </script>
- <style lang="scss" scoped>
- .style1 {
- display: flex;
- padding: 20rpx 30rpx;
- width: 85%;
- margin-bottom: 90rpx;
- .left {
- width: 132rpx;
- height: 132rpx;
- border-radius: 50%;
- }
- .right {
- margin-left: 40rpx;
- .row1 {
- .name {
- font-size: 38rpx;
- font-weight: bold;
- color: #040000;
- margin-right: 20rpx;
- }
- .post {
- font-size: 26rpx;
- font-weight: 500;
- color: #666666;
- }
- }
- .row2 {
- margin-top: 20rpx;
- font-size: 24rpx;
- font-weight: bold;
- color: #323333;
- }
- .row3 {
- margin-top: 30rpx;
- font-size: 24rpx;
- font-weight: 500;
- color: #323333;
- }
- }
- }
- .style2 {
- padding: 50rpx 30rpx;
- margin-bottom: 100rpx;
- .top {
- .row1 {
- .name {
- font-size: 38rpx;
- font-weight: bold;
- color: #040000;
- margin-right: 20rpx;
- }
- .post {
- font-size: 26rpx;
- font-weight: 500;
- color: #666666;
- }
- }
- .row2 {
- margin-top: 20rpx;
- font-size: 24rpx;
- font-weight: bold;
- color: #323333;
- }
- }
- .bottom {
- margin-top: 48rpx;
- .left {
- margin-right: 40rpx;
- .row1 {
- .name {
- font-size: 38rpx;
- font-weight: bold;
- color: #040000;
- margin-right: 20rpx;
- }
- .post {
- font-size: 26rpx;
- font-weight: 500;
- color: #666666;
- }
- }
- .row2 {
- margin-top: 20rpx;
- font-size: 24rpx;
- font-weight: bold;
- color: #323333;
- }
- }
- .right {
- .row1,
- .row2 {
- font-size: 24rpx;
- font-weight: 500;
- color: #323333;
- }
- .row2 {
- margin-top: 20rpx;
- }
- }
- }
- }
- .card-list-item {
- position: relative;
- border-radius: 30rpx;
- padding: 40rpx 40rpx 0 40rpx;
- box-sizing: border-box;
- .car-bottom {
- position: relative;
- bottom: 60rpx;
- left: -20rpx;
- }
- .left {
- width: 30%;
- .top {
- margin-bottom: 20rpx;
- }
- .img {
- width: 80%;
- }
- .bottom {}
- }
- .right {
- .row1 {
- .line {
- width: 1px;
- height: 20px;
- margin: 0 20rpx;
- background: black;
- }
- }
- }
- }
- </style>
|