显示用户信息

This commit is contained in:
406803045 2019-06-14 14:58:20 +08:00
parent 1aef0b35ca
commit 1952fd1fde
2 changed files with 48 additions and 49 deletions

View File

@ -9,7 +9,7 @@ module.exports = {
node: true, node: true,
es6: true es6: true
}, },
extends: ['plugin:vue/recommended', 'eslint:recommended'], extends: ['plugin:vue/essential', 'eslint:recommended'],
// add your custom rules here // add your custom rules here
//it is base on https://github.com/vuejs/eslint-config-vue //it is base on https://github.com/vuejs/eslint-config-vue

View File

@ -1,6 +1,7 @@
<!-- home.vue --> <!-- home.vue -->
<template> <template>
<div class="app-container"> <div class="app-container">
<template v-if="{{ vipInfo }}">
<div class="user-info-container"> <div class="user-info-container">
<div class="user-info-warpper"> <div class="user-info-warpper">
<div class="user-info"> <div class="user-info">
@ -41,11 +42,11 @@
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
</div> </div>
</template>
<!-- 绑定手机 --> <!-- 绑定手机 -->
<msg-code :visible="codeVisible" @close="closeCodePop"></msg-code> <msg-code :visible="codeVisible" @close="closeCodePop"></msg-code>
<!-- 二维码 --> <!-- 二维码 -->
<qrcode-popup :visible="qrcodeVisible" :src="qrSrc" :title="qrTitle" :tips="qrTips" @close="()=>{ qrcodeVisible = false }"> <qrcode-popup :visible="qrcodeVisible" :src="qrSrc" :title="qrTitle" :tips="qrTips" @close="()=>{ qrcodeVisible = false }">
</qrcode-popup> </qrcode-popup>
</div> </div>
</template> </template>
@ -63,7 +64,7 @@ export default {
'qrcode-popup': QrCodePopup, 'qrcode-popup': QrCodePopup,
'qrcode': VueQrcode 'qrcode': VueQrcode
}, },
data () { data() {
return { return {
qrcodeVisible: false, qrcodeVisible: false,
codeVisible: false, codeVisible: false,
@ -77,12 +78,12 @@ export default {
}, },
computed: { computed: {
}, },
mounted () { mounted() {
this.init() this.init()
}, },
methods: { methods: {
// //
init () { init() {
// //
getAccountInfo().then(res => { getAccountInfo().then(res => {
this.vipInfo = res.data.vipUserInfo this.vipInfo = res.data.vipUserInfo
@ -95,7 +96,7 @@ export default {
} }
}) })
}, },
closeCodePop () { closeCodePop() {
this.codeVisible = false this.codeVisible = false
// //
if (this.access === '1') { if (this.access === '1') {
@ -103,7 +104,7 @@ export default {
} }
}, },
// //
showUserQrcode () { showUserQrcode() {
this.qrSrc = this.vipInfo.userPhone this.qrSrc = this.vipInfo.userPhone
this.qrTitle = '小蚁货仓会员码' this.qrTitle = '小蚁货仓会员码'
this.qrTips = '<p>会员码用于会员储值及支付</p> <p>请勿随意泄漏给</p>' this.qrTips = '<p>会员码用于会员储值及支付</p> <p>请勿随意泄漏给</p>'
@ -111,7 +112,7 @@ export default {
}, },
// //
doorAccessKey () { doorAccessKey() {
this.qrTitle = '小蚁货仓入场券' this.qrTitle = '小蚁货仓入场券'
this.qrTips = '<p>凭入场券二维码入场</p>' this.qrTips = '<p>凭入场券二维码入场</p>'
// //
@ -207,7 +208,7 @@ h1 {
} }
} }
&:after { &:after {
content: ""; content: '';
width: 425px; width: 425px;
height: 75px; height: 75px;
background: #fff; background: #fff;
@ -227,8 +228,7 @@ h1 {
height: 19px; height: 19px;
margin-right: 10px; margin-right: 10px;
display: inline-block; display: inline-block;
background: url("../../assets/images/account/s-ticket@2x.png") no-repeat background: url('../../assets/images/account/s-ticket@2x.png') no-repeat center center;
center center;
background-size: cover; background-size: cover;
} }
.icon-coupon { .icon-coupon {
@ -236,8 +236,7 @@ h1 {
height: 15px; height: 15px;
margin-right: 10px; margin-right: 10px;
display: inline-block; display: inline-block;
background: url("../../assets/images/account/s-conpon@2x.png") no-repeat background: url('../../assets/images/account/s-conpon@2x.png') no-repeat center center;
center center;
background-size: cover; background-size: cover;
} }
.coupon-number { .coupon-number {