@ -1,96 +0,0 @@ |
||||
<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: uni.getStorageSync('partnerId') || '', |
||||
list: [], |
||||
} |
||||
}, |
||||
onShow() { |
||||
this.getInfo() |
||||
}, |
||||
methods: { |
||||
// 获取团队 |
||||
getInfo() { |
||||
getTeamsByAccountId().then(({ data }) => { |
||||
const result = [] |
||||
data.map(e => { |
||||
result.push({ |
||||
text: e.partnerClassificationName, |
||||
value: e.partnerId |
||||
}) |
||||
}) |
||||
console.log(22, result) |
||||
if (result.length === 1) { |
||||
const val = result[0].value |
||||
this.partnerId = val |
||||
uni.setStorageSync('partnerId', val) |
||||
} |
||||
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> |
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 331 B |
After Width: | Height: | Size: 247 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 784 B |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.6 KiB |