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> <template>
<view class="left-side"> <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-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>
<view :class="['left-tabs', { three: tabs.length == 3 }]"> <view :class="['left-tabs', { three: tabs.length == 3 }]">
<template v-for="(i, index) in tabs"> <template v-for="(i, index) in tabs">
...@@ -68,7 +72,8 @@ export default { ...@@ -68,7 +72,8 @@ export default {
recordDetailList: [], recordDetailList: [],
total: 0 total: 0
}, },
messageTotal: 0 messageTotal: 0,
hasPerson: false
} }
}, },
watch: { watch: {
...@@ -113,11 +118,13 @@ export default { ...@@ -113,11 +118,13 @@ export default {
scene scene
}).then(result=>{ }).then(result=>{
if(result) { if(result) {
this.tabs.push({ this.hasPerson = true
label: "个人中心", // this.tabs.push({
icon: "point", // label: "个人中心",
name: 'Point' // icon: "point",
}) // name: 'Point'
// })
// uni.$storage.set('hasPerson', true)
} }
}) })
}, },
...@@ -149,6 +156,12 @@ export default { ...@@ -149,6 +156,12 @@ export default {
getMessageInfo() { getMessageInfo() {
this.getMessage() this.getMessage()
this.getMessageCount() this.getMessageCount()
},
jumpPersonCenter() {
if(this.hasPerson) {
console.log('跳转个人个人中心')
this.$emit('update:tabIndex', 99)
}
} }
} }
} }
...@@ -243,11 +256,12 @@ export default { ...@@ -243,11 +256,12 @@ export default {
padding-bottom: toRpx(64); padding-bottom: toRpx(64);
} }
} }
.user-box {
padding-top: toRpx(92);
}
.user-info { .user-info {
width: toRpx(184); width: toRpx(184);
box-sizing: border-box; box-sizing: border-box;
padding-top: toRpx(92);
flex-direction: column; flex-direction: column;
position: relative; position: relative;
z-index: 2; z-index: 2;
...@@ -274,6 +288,8 @@ export default { ...@@ -274,6 +288,8 @@ export default {
} }
.user-name { .user-name {
display: inline-flex;
align-items: center;
font-weight: 500; font-weight: 500;
font-size: toRpx(28); font-size: toRpx(28);
color: #292d33; color: #292d33;
......
...@@ -14,6 +14,9 @@ ...@@ -14,6 +14,9 @@
</view> </view>
</view> </view>
</template> </template>
<template v-else-if="tabIndex == 99">
<component is="Point" :userInfo="userInfo" @showPage="handleShowPage" />
</template>
<template v-else> <template v-else>
<component :is="componentName" :userInfo="userInfo" @showPage="handleShowPage" /> <component :is="componentName" :userInfo="userInfo" @showPage="handleShowPage" />
</template> </template>
...@@ -55,6 +58,8 @@ ...@@ -55,6 +58,8 @@
<update-box /> <update-box />
<slot name="content" /> <slot name="content" />
<web-view @message="handlerMessage" ref="webview" src="/hybrid/html/index.html"></web-view> <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> </view>
</template> </template>
<script> <script>
...@@ -97,13 +102,15 @@ export default { ...@@ -97,13 +102,15 @@ export default {
showHome: true, showHome: true,
pointComponentName: 'Point', pointComponentName: 'Point',
userInfo: {}, userInfo: {},
tabIndex: 0 tabIndex: 0,
showLeadPage: false
} }
}, },
mounted() { mounted() {
const userInfo = uni.$storage.get('userInfo') || {} const userInfo = uni.$storage.get('userInfo') || {}
this.userInfo = userInfo this.userInfo = userInfo
this.checkVersion() this.checkVersion()
this.checkLead()
}, },
provide() { provide() {
return { return {
...@@ -142,6 +149,28 @@ export default { ...@@ -142,6 +149,28 @@ export default {
this.transfer = transfer this.transfer = transfer
this.showHome = false this.showHome = false
this.pointComponentName = name 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 { ...@@ -304,4 +333,10 @@ export default {
font-size: toRpx(24); font-size: toRpx(24);
} }
} }
.lead-page {
height: 100vh;
width: 100vw;
z-index: 999999;
position: fixed;
}
</style> </style>
...@@ -28,5 +28,6 @@ export const STORAGE_OBJECTKEY = { ...@@ -28,5 +28,6 @@ export const STORAGE_OBJECTKEY = {
clearVersion: 'clearVersion', clearVersion: 'clearVersion',
boutique_mock_data: 'boutique_mock_data', boutique_mock_data: 'boutique_mock_data',
findReceptionpriproConfigList: 'findReceptionpriproConfigList', 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!