|
@@ -0,0 +1,152 @@
|
|
|
+<template>
|
|
|
+ <div class="work-userinfo">
|
|
|
+ <div class="account">
|
|
|
+ <div class="item-headimg">
|
|
|
+ <img :src="info.headimage" alt="">
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <h3 class="item-title i-name">{{info.name || '--'}},你好</h3>
|
|
|
+ <p class="item-subtitle" v-if="otherInfo.phone">{{otherInfo.phone}}</p>
|
|
|
+ <p class="item-subtitle" v-if="info.entname">{{info.entname}}</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="combo">
|
|
|
+ <div class="item-headimg">
|
|
|
+ <img v-if="otherInfo.bigmemberVip" :src="require(`../../assets/images/big-${otherInfo.bigmemberVip}.png`)" alt="">
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <h3 class="item-title c-name">大会员{{info.combo}}</h3>
|
|
|
+ <p class="item-subtitle">到期时间:{{info.member_endtime || '--'}}</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="customer">
|
|
|
+ <div class="item-headimg">
|
|
|
+ <img src="@/assets/images/customer.png" alt="kf">
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <h3 class="item-title">专属客服:赵秀臻</h3>
|
|
|
+ <p class="item-subtitle c-weixin">企业微信:
|
|
|
+ <el-popover
|
|
|
+ placement="bottom"
|
|
|
+ width="156"
|
|
|
+ trigger="click">
|
|
|
+ <div class="customer-wx"
|
|
|
+ style="display: flex;flex-direction: column;align-items: center;font-size: 14px;text-align: center;color: #1d1d1d;">
|
|
|
+ <img style="width:132px;height:132px;margin-bottom:8px;" src="@/assets/images/customer-wx.png" alt="">
|
|
|
+ <p>微信扫一扫</p>
|
|
|
+ </div>
|
|
|
+ <span class="click-look" slot="reference">点击查看</span>
|
|
|
+ </el-popover>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { Popover } from 'element-ui'
|
|
|
+import { getUseEquity, getUserOtherInfo } from '@/api/modules'
|
|
|
+import { dateFormatter } from '@/utils'
|
|
|
+export default {
|
|
|
+ name: 'work-userinfo',
|
|
|
+ computed: {},
|
|
|
+ components: {
|
|
|
+ [Popover.name]: Popover
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ info: {},
|
|
|
+ otherInfo: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ this.getUseEquity()
|
|
|
+ this.getOtherInfo()
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ console.log(this.info)
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getUseEquity () {
|
|
|
+ getUseEquity().then(res => {
|
|
|
+ if (res.error_code === 0 && res.data) {
|
|
|
+ if (res.data.member_endtime) {
|
|
|
+ res.data.member_endtime = dateFormatter(res.data.member_endtime * 1000, 'yyyy-MM-dd')
|
|
|
+ }
|
|
|
+ this.info = res.data
|
|
|
+ } else {
|
|
|
+ this.$toast(res.error_msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getOtherInfo () {
|
|
|
+ getUserOtherInfo().then(res => {
|
|
|
+ if (res.error_code === 0 && res.data) {
|
|
|
+ this.otherInfo = res.data
|
|
|
+ } else {
|
|
|
+ this.$toast(res.error_msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.work-userinfo{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 20px 40px;
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 4px;
|
|
|
+ box-shadow: 0px 0px 18px 0px rgba(0,0,0,0.02);
|
|
|
+ .account,
|
|
|
+ .combo,
|
|
|
+ .customer{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ width: 33.33%;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
+ .item-headimg{
|
|
|
+ width: 80px;
|
|
|
+ height: 80px;
|
|
|
+ overflow: hidden;
|
|
|
+ margin-right: 12px;
|
|
|
+ img{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .item-title{
|
|
|
+ color: #1d1d1d;
|
|
|
+ line-height: 24px;
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
+ .item-subtitle{
|
|
|
+ margin-top: 4px;
|
|
|
+ color: #686868;
|
|
|
+ line-height: 24px;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ .account{
|
|
|
+ border-right: 1px solid #ececec;
|
|
|
+ .i-name{
|
|
|
+ font-size: 18px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .combo{
|
|
|
+ border-right: 1px solid #ececec;
|
|
|
+ }
|
|
|
+ .customer{
|
|
|
+ .c-weixin{
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
+ .click-look{
|
|
|
+ color: #2CB7CA;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|