123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430 |
- <template>
- <view class="self-card" :style="{'--height': tovw(+CustomBar+10)}">
- <view class="head" :style="[{ height: tovw(+CustomBar+184) }]" style="background: linear-gradient( 225deg, #F43A50 0%, #C30D23 100%)">
- <view class="custom" :style="{ height: tovw(Custom.height), top: tovw(Custom.top - 3) }">
- <view v-if="userInfo.name">{{userInfo.name}}的名片</view>
- <view v-else>暂无信息</view>
- <view class="back" :style="{ lineHeight: tovw(Custom.height) }" @click="onBack">
- <text class=" iconfont icon-a-wodetiaozhuan" />
- </view>
- </view>
- <image class="bg-bottom" mode="widthFix" src="/static/workbench/减去.svg">
- </image>
- <view class="card">
- <view class="header">
- <view class="left">
- <view class="title">
- <text>{{ userInfo.name||'暂无' }}</text>
- <text>{{ userInfo.rolenames||'暂无' }}</text>
- </view>
- <text class="phone">{{ userInfo.phonebumber||'暂无' }}</text>
- <view class="redline"></view>
- </view>
- <view class="right">
- <image :src="userInfo.headpic || 'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg'" mode="widthFix">
-
- </image>
- </view>
- </view>
- <view class="bottom">
- <view class="left">
- <view>
- <i class="iconfont icon-qiye-hui"></i>
- <view class="text">{{ userInfo.enterprisename||'暂无' }}</view>
- </view>
- <view>
- <i class="iconfont icon-youxiang"></i>
- <view class="text">{{ userInfo.email ||'暂无' }}</view>
- </view>
- <view style="margin-bottom: 0 !important;">
- <i class="iconfont icon-dizhi_xian"></i>
- <view class="text u-line-2">{{ userInfo.address ||'暂无' }}都是第三方神鼎飞丹砂发斯蒂芬斯蒂芬是的防守打法收到防守打法</view>
- </view>
- </view>
- <view class="right">
- <image class="code" src="/static/workbench/二维码.svg" />
- <text>名片码</text>
- </view>
- </view>
- </view>
- </view>
- <view class="card-handle">
- <view class="top">
- <view class="left">
- <view class="avatar">
- <block v-for="item in userInfo.readusers">
- <image :src="item.headpic||'https://yossys06593.obs.cn-east-3.myhuaweicloud.com:443/202404231713854678447B26b4363.svg'" v-if="item.rowindex<4" :key="item.rowindex"/>
- </block>
- <text style="color:#BBBBBB">...</text>
- </view>
- <view class="readcount">浏览了{{ userInfo.count_read }}</view>
- </view>
- <navigator url="#" class="right" @click="goodClick">
- <i :class="['iconfont',userInfo.islike==1?' icon-yidianzan':' icon-weidianzan']" :style="{color:userInfo.islike?'#C30D23':'#666666'}"></i>
- <text>点赞{{ userInfo.count_like}}</text>
- </navigator>
- </view>
- <view class="bottom">
- <view class="but" hover-class="navigator-hover" @click="copy">
- <i class="iconfont icon-fuzhi" style="color: #C30D23;"></i>
- 复制电话
- </view>
- <view class="but" hover-class="navigator-hover" @click="shareClick">
- <i class="iconfont icon-zhuanfa"></i>
- 转发名片
- </view>
- </view>
- </view>
- <u-popup :show="shareShow" mode="bottom" @close="shareShow=false">
- <view class="share-box">
- <contact openType="share">
- <view class="item" hover-class="navigator-hover" @click="shareWx">
- <image mode="widthFix" src="/static/workbench/微信好友.svg" />
- <text>微信好友</text>
- </view>
- </contact>
-
- <view class="item" hover-class="navigator-hover" @click="goCard">
- <image mode="widthFix" src="/static/workbench/名片海报.svg" />
- <text>名片海报</text>
- </view>
- </view>
- </u-popup>
- </view>
- </template>
- <script>
- import contact from "../../components/contact"
- export default {
- components:{contact},
- data () {
- return {
- userInfo:{},
- userid:uni.getStorageSync('userMsg').userid,
- shareShow:false
- }
- },
- methods: {
- async getuserInfo () {
- let res = await this.$Http.basic({
- "id": 20240514161502,
- "content": {
- userid:this.userid
- },
- })
- this.userInfo = res.data
- console.log(this.userInfo,'用户信息');
- },
- shareClick () {
- this.shareShow = true
- },
- onBack() {
- uni.navigateBack()
- },
- async goodClick () {
- let res = await this.$Http.basic({
- "id": 20240416133702,
- "content": {
- "ownertable": "sys_users",
- "ownerid": this.userid,
- "type":2//1:收藏,2:点赞
- },
- })
- if (this.cutoff(res.msg)) return;
- this.getuserInfo()
- },
- copy() {
- uni.setClipboardData({
- data:this.userInfo.phonebumber,
- success: (result) => {
- uni.showToast({
- title: "已复制",
- icon: "none",
- duration: 1500,
- })
- }
- });
- },
- shareWx () {
- },
- goCard () {
- },
- getSheraDate() {
-
- }
- },
- onShareAppMessage(res) {
- return {
- title: this.userInfo.name, // 标题
- path: "/cloud/businessCard/index?id=" + this.userid, // 分享路径
- imageUrl: ""// 分享图
- };
- },
- onLoad(options) {
- console.log("被邀请加入团队", options)
- this.sys_enterpriseid = options.userid;
- const systemInitIsComplete = this.$Http.systemInitIsComplete;
- if (!systemInitIsComplete || typeof systemInitIsComplete == 'object') {
- this.$Http.HomePageStartRendering = render(this)
- } else {
- render(this)
- }
- function render(that) {
- that.getuserInfo()
- }
- },
- }
- </script>
- <style lang="scss">
- .self-card {
- .head {
- position: relative;
- width: 100vw;
- .bg-bottom {
- position: absolute;
- bottom: 0px;
- left: 0;
- width: 100vw;
- }
- .custom {
- position: absolute;
- width: 100vw;
- display: flex;
- justify-content: center;
- align-items: center;
- font-family: PingFang SC, PingFang SC;
- font-weight: 500;
- font-size: 17px;
- color: #FFFFFF;
- .back {
- position: absolute;
- padding: 0 10px;
- left: 0;
- color: #fff;
- font-size: 12px;
- transform: rotateY(180deg);
- }
- }
- .card {
- width: 355px;
- height: 220px;
- box-sizing: border-box;
- background: #FFFFFF;
- box-shadow: 0px 2px 10px 1px rgba(0,0,0,0.16);
- border-radius: 8px 8px 8px 8px;
- position: absolute;
- top: var(--height);
- left: 10px;
- padding: 20px;
- font-family: Source Han Sans SC, Source Han Sans SC;
- .header {
- display: flex;
- justify-content: space-between;
- align-content: center;
- align-items: center;
- .left {
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .title {
- display: flex;
- align-items: center;
- text {
- &:first-child {
- font-weight: 500;
- font-size: 18px;
- color: #333333;
- }
- &:last-child {
- font-weight: 400;
- font-size: 12px;
- color: #999999;
- margin-left: 10px;
- }
- }
- margin-bottom: 5px;
- }
- .phone {
- font-weight: 500;
- font-size: 16px;
- color: #333333;
- }
- .redline {
- width: 24px;
- height: 2px;
- background: #C30D23;
- margin-top: 15px;
- }
- }
- .right {
- width: 56px;
- height: 56px;
- background: #DCEBF8;
- box-shadow: 0px 3px 6px 1px #E0D6D7;
- border: 2px solid #FFFFFF;
- border-radius: 50%;
- image {
- width: 100%;
- height: 100%;
- border-radius: 50%;
- }
- }
- }
- .bottom {
- display: flex;
- justify-content: space-between;
- font-family: Source Han Sans SC, Source Han Sans SC;
- font-weight: 400;
- font-size: 12px;
- color: #666666;
- margin-top: 22px;
- .left {
- display: flex;
- flex-direction: column;
- >view {
- margin-bottom: 13px;
- display: flex;
- align-content: center;
- align-items: center;
- .text {
- margin-left: 10px;
- max-width: 211px;
- }
- }
- }
- .right {
- display: flex;
- flex-direction: column;
- align-items: center;
- align-content: center;
- text {
- font-weight: 400;
- font-size: 12px;
- color: #666666;
-
- }
- .code {
- width: 32px;
- height: 32px;
- margin-bottom: 4px;
- }
- }
- }
- }
- }
- .card-handle {
- padding: 50px 10px 20px 10px;
- background: #ffffff;
- margin-top: 25px;
- .top {
- display: flex;
- justify-content: space-between;
- align-items: center;
- align-content: center;
- font-family: Source Han Sans SC, Source Han Sans SC;
- font-size: 12px;
- color: #999999;
- .left {
- display: flex;
- flex-direction: column;
- .avatar {
- display: flex;
- align-items:flex-start;
- align-content: center;
- image {
- margin-right: 5px;
- width: 24px;
- height: 24px;
- }
- text {
- transform: scale(1.5);
- }
- }
- .readcount{
- margin-top: 5px;
- display: block;
- }
- }
- .right {
- display: flex;
- flex-direction: column;
- align-content: center;
- align-items: center;
- i {
- display: block;
- color: #666666;
- }
- text {
- margin-top: 5px;
- display: block;
- }
- }
- }
- .bottom {
- display: flex;
- justify-content: space-between;
- align-items: center;
- align-content: center;
- margin-top: 25px;
- .but {
- display: flex;
- align-items: center;
- justify-content: center;
- box-sizing: border-box;
- border-radius: 8px 8px 8px 8px;
- font-family: Source Han Sans SC, Source Han Sans SC;
- font-weight: 400;
- font-size: 16px;
- width: 173px;
- height: 50px;
- line-height: 50px;
- text-align: center;
- &:nth-child(1) {
- background: #FFFFFF;
- border: 1px solid #CCCCCC;
- color: #666666;
- }
- &:nth-child(2) {
- background: #C30D23;
- color: #FFFFFF;
- }
- view {
- margin-right: 10px;
- }
- }
- }
- }
- }
- .share-box {
- padding: 30px 0;
- display: flex;
- align-items: center;
- align-content: center;
- justify-content: space-evenly;
- .item {
- display: flex;
- flex-direction: column;
- align-items:center;
- align-content:center;
- image {
- width:50px;
- height:50px;
- }
- text {
- margin-top: 5px;
- font-family: Source Han Sans SC, Source Han Sans SC;
- font-weight: 400;
- font-size: 12px;
- color: #333333;
- }
- }
- }
- </style>
|