parent
323c52a972
commit
8de4d1fa7a
13 changed files with 287 additions and 110 deletions
@ -0,0 +1,97 @@ |
||||
<template> |
||||
<view class="page"> |
||||
<view class="team"> |
||||
<uni-data-picker class="picker-input" placeholder="切换团队" popup-title="切换团队" preload :clear-icon="false" :localdata="list" v-model="partnerId" @change="teamChange"></uni-data-picker> |
||||
</view> |
||||
|
||||
<image class="banner" src="../../static/image/index/index1.png" mode="widthFix"></image> |
||||
<ul class="entry"> |
||||
<li @click="$util.to('../clients/clients')"> |
||||
<image class="icon" src="../../static/image/index/index3.png" mode="widthFix"></image> |
||||
<view class="text">客户</view> |
||||
</li> |
||||
<li @click="$util.to('../plans/plans')"> |
||||
<image class="icon" src="../../static/image/index/index4.png" mode="widthFix"></image> |
||||
<view class="text">方案</view> |
||||
</li> |
||||
<li @click="$util.to('../orders/orders')"> |
||||
<image class="icon" src="../../static/image/index/index5.png" mode="widthFix"></image> |
||||
<view class="text">订单</view> |
||||
</li> |
||||
<li @click="$util.to('../products/products')"> |
||||
<image class="icon" src="../../static/image/index/index6.png" mode="widthFix"></image> |
||||
<view class="text">产品</view> |
||||
</li> |
||||
</ul> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import { getTeamsByAccountId } from '@/apis/modules/client.js' |
||||
export default { |
||||
data() { |
||||
return { |
||||
partnerId: this.$util.getBmId() || '', |
||||
list: [], |
||||
} |
||||
}, |
||||
onShow() { |
||||
this.getInfo() |
||||
}, |
||||
methods: { |
||||
// 获取团队 |
||||
getInfo() { |
||||
getTeamsByAccountId().then(({ data }) => { |
||||
const result = [] |
||||
data.map(e => { |
||||
result.push({ |
||||
text: e.partnerClassificationName, |
||||
value: e.partnerId |
||||
}) |
||||
}) |
||||
// 默认选择第一个团队 |
||||
if (result.length) { |
||||
const val = result[0].value |
||||
this.partnerId = val |
||||
uni.setStorageSync('partnerId', val) |
||||
uni.setStorageSync('partnerClassificationName', result[0].text) |
||||
} |
||||
this.list = result |
||||
}).catch(e => {}) |
||||
}, |
||||
// 团队选择回调 |
||||
teamChange() { |
||||
uni.setStorageSync('partnerId', this.partnerId) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped lang="scss"> |
||||
.page { |
||||
min-height: 100%; |
||||
padding: 30rpx 22rpx; |
||||
background: url(../../static/image/index/index2.png) 0 0/100% 100% no-repeat; |
||||
} |
||||
.team { |
||||
width: 200rpx; |
||||
margin-bottom: 30rpx; |
||||
} |
||||
.banner { |
||||
width: 100%; |
||||
} |
||||
.entry { |
||||
display: flex; |
||||
justify-content: space-around; |
||||
align-items: center; |
||||
margin-top: 10rpx; |
||||
text-align: center; |
||||
.icon { |
||||
width: 78rpx; |
||||
} |
||||
.text { |
||||
font-size: 28rpx; |
||||
color: #333; |
||||
} |
||||
} |
||||
</style> |
Loading…
Reference in new issue