Commit c70b7cef by cen

feat: 活动中心入口

1 parent 665cb3be

2.79 MB | W: | H:

2.82 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-box"> <view class="user-box">
<view <view class="user-info flex" @click="jumpPersonCenter">
class="user-info flex"
@click="jumpPersonCenter"
>
<view :class="['user-avatar', 'sprite-icon', 'icon-avatar', tabIndex == 99 ? 'user-active' : '']"></view> <view :class="['user-avatar', 'sprite-icon', 'icon-avatar', tabIndex == 99 ? 'user-active' : '']"></view>
<view class="user-name"> <view class="user-name">
<view class="user-name-text">{{ userInfo.name }}</view> <view class="user-name-text">{{ userInfo.name }}</view>
<view <view v-if="hasPerson" class="sprite-icon icon-arrow-next"></view>
v-if="hasPerson"
class="sprite-icon icon-arrow-next"
></view>
</view> </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">
<view <view :class="['tab-item', { tabActive: tabIndex == index }]" :key="index" @click="changeIndex(index, i)" v-if="!i.hidden">
:class="['tab-item', { tabActive: tabIndex == index }]"
:key="index"
@click="changeIndex(index, i)"
v-if="!i.hidden"
>
<view class="icon-box"> <view class="icon-box">
<view :class="['sprite-icon', `icon-${i.icon}${tabIndex == index ? '-active' : ''}`]"></view> <view :class="['sprite-icon', `icon-${i.icon}${tabIndex == index ? '-active' : ''}`]"></view>
</view> </view>
{{ i.label }} {{ i.label }}
<view <view class="dot" v-if="i.icon == 'record' && perRecordNumber"></view>
class="dot" <view class="tip-box" v-if="i.icon == 'study' && readCount">待办事项:{{ readCount }}</view>
v-if="i.icon == 'record' && perRecordNumber"
></view>
<view
class="tip-box"
v-if="i.icon == 'study' && readCount"
>待办事项:{{ readCount }}</view>
</view> </view>
</template> </template>
</view> </view>
...@@ -49,40 +32,19 @@ ...@@ -49,40 +32,19 @@
v-if="messageTotal > 0" v-if="messageTotal > 0"
></view> ></view>
</view> --> </view> -->
<view <view class="btn" @click="openScenePopup">
class="btn"
@click="openScenePopup"
>
<view class="sprite-icon icon-scene-change"></view> <view class="sprite-icon icon-scene-change"></view>
</view> </view>
<view <view class="btn" @click="handleSetting">
class="btn"
@click="handleSetting"
>
<view class="sprite-icon icon-setting"></view> <view class="sprite-icon icon-setting"></view>
</view> </view>
</view> </view>
<!-- 客服弹框 --> <!-- 客服弹框 -->
<!-- <kf-box ref="kfRef" /> --> <!-- <kf-box ref="kfRef" /> -->
<message-pop <message-pop ref="kfRef" :type="messageType" :messageData="messageData"></message-pop>
ref="kfRef"
:type="messageType"
:messageData="messageData"
></message-pop>
<!-- 设置弹框 --> <!-- 设置弹框 -->
<setting-box <setting-box ref="settingRef" @stopAudio="$emit('stopAudio')" />
ref="settingRef" <center-popup :list="sceneTypeList" ref="sceneTypeRef" @choose="chooseSceneType" title="选择场景" tag="当前场景" :id="userInfo.sceneType" isLine />
@stopAudio="$emit('stopAudio')"
/>
<center-popup
:list="sceneTypeList"
ref="sceneTypeRef"
@choose="chooseSceneType"
title="选择场景"
tag="当前场景"
:id="userInfo.sceneType"
isLine
/>
</view> </view>
</template> </template>
...@@ -118,6 +80,7 @@ export default { ...@@ -118,6 +80,7 @@ export default {
}, },
watch: { watch: {
userInfo (n) { userInfo (n) {
console.log('userInfo', n)
if (n.shopMerchantId) this.haveCustomerAccess(n) if (n.shopMerchantId) this.haveCustomerAccess(n)
}, },
...@@ -193,6 +156,14 @@ export default { ...@@ -193,6 +156,14 @@ export default {
icon: "scene", icon: "scene",
name: 'SceneMarket', name: 'SceneMarket',
eventCode: 'app_scene_market' eventCode: 'app_scene_market'
},
{
label: "活动中心",
icon: "activity",
isTrack: true,
name: 'ActivityCenter',
eventCode: 'app_activity_center',
hidden: true
} }
] ]
let { sceneType } = uni.$storage.get("userInfo") let { sceneType } = uni.$storage.get("userInfo")
...@@ -327,12 +298,14 @@ export default { ...@@ -327,12 +298,14 @@ export default {
// uni.$storage.set('isSaleOpen', result) // uni.$storage.set('isSaleOpen', result)
if (result) { if (result) {
this.hasPerson = true this.hasPerson = true
this.tabs[4].hidden = false
} }
// const channelType = 1 // const channelType = 1
// // 非直营且非鸿蒙智行, 隐藏学习中心tab // 非直营, 隐藏活动中心tab
// if (result || channelType == 1) { if (!result ) {
// this.tabs[2].hidden = false
// } this.tabs[4].hidden = true
}
}) })
}, },
// 获取话术未读列表 // 获取话术未读列表
......
const target = ['ip', 'dev', 'uat', 'prod', 'beta'] const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 2 const index = 1
/** /**
* *
0本地 0本地
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!