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