提交 cca229c5 authored 作者: matian's avatar matian

名片查询图片修改

上级 e82c47fc
...@@ -18,7 +18,8 @@ onMounted(() => { ...@@ -18,7 +18,8 @@ onMounted(() => {
getUserInfo() getUserInfo()
}) })
// 名片图片 // 名片图片
const imgUrl = ref('') const imgUrl1 = ref('')
const imgUrl2 = ref('')
// 获取用户信息 // 获取用户信息
function getUserInfo() { function getUserInfo() {
api.getUserInfo().then(res => { api.getUserInfo().then(res => {
...@@ -35,14 +36,15 @@ function handleSubmit() { ...@@ -35,14 +36,15 @@ function handleSubmit() {
} }
api.getBussinessCard(params).then(res => { api.getBussinessCard(params).then(res => {
console.log(res, '0000') console.log(res, '0000')
imgUrl.value = res.data.url imgUrl1.value = res.data.url.jpg1
imgUrl2.value = res.data.url.jpg2
}) })
} }
</script> </script>
<template> <template>
<div class="main_content"> <div class="main_content">
<van-form v-if="imgUrl === ''"> <van-form v-if="imgUrl1 === ''">
<van-cell-group inset> <van-cell-group inset>
<van-field <van-field
v-model="userInfo.name" v-model="userInfo.name"
...@@ -98,9 +100,11 @@ function handleSubmit() { ...@@ -98,9 +100,11 @@ function handleSubmit() {
</van-form> </van-form>
<div v-else> <div v-else>
<div class="main_content_card"> <div class="main_content_card">
<img :src="imgUrl" alt="" /> <!-- <div class="img">{{ imgUrl }}</div> -->
<img :src="imgUrl1" alt="" />
<img :src="imgUrl2" alt="" class="imgUrl2" />
</div> </div>
<div class="main_content_bottom"></div> <!-- <div class="main_content_bottom"></div> -->
</div> </div>
</div> </div>
</template> </template>
...@@ -111,20 +115,25 @@ function handleSubmit() { ...@@ -111,20 +115,25 @@ function handleSubmit() {
border-radius: 0.2rem; border-radius: 0.2rem;
.main_content_card { .main_content_card {
margin: 0.83rem 0.38rem 0 0.34rem; margin: 0.83rem 0.38rem 0 0.34rem;
background-color: red; background: #ffffff;
// background-color: red;
img { img {
width: 100%; width: 100%;
display: block; display: block;
} }
.imgUrl2 {
margin-top: 0.66rem;
}
} }
.main_content_bottom { // .main_content_bottom {
width: 100%; // width: 100%;
height: 3.28rem; // height: 3.28rem;
display: block; // display: block;
margin-top: 0.66rem; // margin-top: 0.66rem;
background: url(https://webapp-pub.oss-cn-beijing.aliyuncs.com/prp_h5/card_img.png) no-repeat; // background: url(https://webapp-pub.oss-cn-beijing.aliyuncs.com/prp_h5/card_img.png) no-repeat;
background-size: 100% 100%; // background-size: 100% 100%;
} // }
} }
::v-deep .van-button { ::v-deep .van-button {
font-size: 0.28rem; font-size: 0.28rem;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论