Commit bc334eb9 by 胡悦

添加个人中心引导页

1 parent 2d45e3da

2.42 MB | W: | H:

2.42 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
<template>
<view class="left-side">
<view class="user-info flex">
<view class="user-box">
<view class="user-info flex" @click="jumpPersonCenter">
<view class="user-avatar sprite-icon icon-avatar"></view>
<view class="user-name">{{ userInfo.name }}</view>
<view class="user-name">{{ userInfo.name }}
<view v-if="hasPerson" class="sprite-icon icon-arrow-next"></view>
</view>
</view>
</view>
<view :class="['left-tabs', { three: tabs.length == 3 }]">
<template v-for="(i, index) in tabs">
......@@ -68,7 +72,8 @@ export default {
recordDetailList: [],
total: 0
},
messageTotal: 0
messageTotal: 0,
hasPerson: false
}
},
watch: {
......@@ -113,11 +118,13 @@ export default {
scene
}).then(result=>{
if(result) {
this.tabs.push({
label: "个人中心",
icon: "point",
name: 'Point'
})
this.hasPerson = true
// this.tabs.push({
// label: "个人中心",
// icon: "point",
// name: 'Point'
// })
// uni.$storage.set('hasPerson', true)
}
})
},
......@@ -149,6 +156,12 @@ export default {
getMessageInfo() {
this.getMessage()
this.getMessageCount()
},
jumpPersonCenter() {
if(this.hasPerson) {
console.log('跳转个人个人中心')
this.$emit('update:tabIndex', 99)
}
}
}
}
......@@ -243,11 +256,12 @@ export default {
padding-bottom: toRpx(64);
}
}
.user-box {
padding-top: toRpx(92);
}
.user-info {
width: toRpx(184);
box-sizing: border-box;
padding-top: toRpx(92);
flex-direction: column;
position: relative;
z-index: 2;
......@@ -274,6 +288,8 @@ export default {
}
.user-name {
display: inline-flex;
align-items: center;
font-weight: 500;
font-size: toRpx(28);
color: #292d33;
......
......@@ -14,6 +14,9 @@
</view>
</view>
</template>
<template v-else-if="tabIndex == 99">
<component is="Point" :userInfo="userInfo" @showPage="handleShowPage" />
</template>
<template v-else>
<component :is="componentName" :userInfo="userInfo" @showPage="handleShowPage" />
</template>
......@@ -55,6 +58,8 @@
<update-box />
<slot name="content" />
<web-view @message="handlerMessage" ref="webview" src="/hybrid/html/index.html"></web-view>
<image v-if="showLeadPage" @click="showLeadPage = false" class="lead-page" src="../../assets/images/noviceGuide/lead-page.png" mode="scaleToFill"
/>
</view>
</template>
<script>
......@@ -97,13 +102,15 @@ export default {
showHome: true,
pointComponentName: 'Point',
userInfo: {},
tabIndex: 0
tabIndex: 0,
showLeadPage: false
}
},
mounted() {
const userInfo = uni.$storage.get('userInfo') || {}
this.userInfo = userInfo
this.checkVersion()
this.checkLead()
},
provide() {
return {
......@@ -142,6 +149,28 @@ export default {
this.transfer = transfer
this.showHome = false
this.pointComponentName = name
},
checkLead() {
let leadPage = uni.$storage.get('leadPage') || []
const { phone } = this.userInfo
const version = plus?.runtime?.version || '' // 平板
// const version = 14.57 // 浏览器
console.log(version, '---version')
if (version == '2.9.0') {
console.log(leadPage, typeof(leadPage), '===leadPage')
if(leadPage && leadPage.length) {
if (!leadPage.includes(phone)) {
this.showLeadPage = true
leadPage.push(phone)
uni.$storage.set('leadPage', leadPage)
}
} else {
// 没有值,则直接弹
this.showLeadPage = true
leadPage.push(phone)
uni.$storage.set('leadPage', leadPage)
}
}
}
}
}
......@@ -304,4 +333,10 @@ export default {
font-size: toRpx(24);
}
}
.lead-page {
height: 100vh;
width: 100vw;
z-index: 999999;
position: fixed;
}
</style>
......@@ -28,5 +28,6 @@ export const STORAGE_OBJECTKEY = {
clearVersion: 'clearVersion',
boutique_mock_data: 'boutique_mock_data',
findReceptionpriproConfigList: 'findReceptionpriproConfigList',
appInfoList: 'appInfoList'
appInfoList: 'appInfoList',
leadPage: 'leadPage'
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!