| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <template>
- <view class="manager">
- <view class="flex-row justify-center">
- <view class="grid">
- <view class="flex-col gridItem" @click="navigateToPage('/pages/specialistsList/specialistsList')">
- <view class="title flex-row justify-center">
- <text>累计专员数量</text>
- </view>
- <view class="number flex-row justify-center">
- <text>{{homeStaticsData.expandUserTotal || 0}}</text>
- </view>
- </view>
- <view class="flex-col gridItem leftBorder" @click="navigateToPage('/pages/todaySpecialistsList/todaySpecialistsList')">
- <view class="title flex-row justify-center">
- <text>今日新增专员</text>
- </view>
- <view class="number flex-row justify-center">
- <text>{{homeStaticsData.expandUserTotalToday || 0}}</text>
- </view>
- </view>
- <view class="flex-col gridItem leftBorder">
- <view class="title flex-row justify-center">
- <text>本月任务</text>
- </view>
- <view class="number flex-row justify-center">
- <text>0/0</text>
- </view>
- </view>
- <view class="flex-col gridItem">
- <view class="title flex-row justify-center">
- <text>累计异业伙伴</text>
- </view>
- <view class="number flex-row justify-center">
- <text>0</text>
- </view>
- </view>
- <view class="flex-col gridItem leftBorder">
- <view class="title flex-row justify-center">
- <text>累计卖券金额</text>
- </view>
- <view class="number flex-row justify-center">
- <text>0</text>
- </view>
- </view>
- </view>
- </view>
- <view class="flex-row">
- <text>选择角色:</text>
- <text v-for="i in roleList">{{i.name}}</text>
- </view>
- <view class="flex-row justify-center">
- <view class="qrView" @click="qrCodePopup">
- <uv-qrcode ref="qrcode" size="600rpx" :value="qrcodeUrl" :options="options"></uv-qrcode>
- </view>
- </view>
- <uni-popup ref="createQrCodePopup" type="center">
- <view class="createQrCodePopup flex-col justify-center">
- <view class="flex-row justify-center">
- <uv-qrcode ref="qrcode" size="600rpx" :value="qrcodeUrl" :options="options"></uv-qrcode>
- </view>
- <view class="xoIcon" @click="closePopup">
- <u-icon name="close-circle" color="#666" size="35"></u-icon>
- </view>
- </view>
- </uni-popup>
- </view>
- </template>
- <script>
- import commonUtils from "../../../common/js/utils/commonUtils";
- export default {
- props: {
- height: {
- type: String,
- default () {
- return ''
- }
- },
- },
- data() {
- return {
- qrcodeUrl:this.$xcxUrl+'?expandUserId={expandUserId}&ruleId={ruleId}×tamp={timestamp}&type=2&expand1=2',
- options: {
- // 指定二维码前景,一般可在中间放logo
- foregroundImagePadding:2,
- foregroundImageBorderRadius:5,
- foregroundImageSrc: '/static/logo.png'
- },
- homeStaticsData:{},
- roleList:[]
- }
- },
- created() {
- console.log('接收到的高度', this.height)
- this.userInfo = uni.getStorageSync('spreadUserInfo')
- this.homeStatics()
- this.getRoleList()
- },
- methods: {
- formatDate() {
- this.qrCreateTime = commonUtils.formatDate(new Date())
- },
- qrCodePopup(){
- this.$refs.createQrCodePopup.open()
- },
- closePopup(){
- this.$refs.createQrCodePopup.close()
- },
- navigateToPage(url){
- uni.navigateTo({
- url:url
- })
- },
- getRoleList(){
- this.$api.service.getRoleList().then(res=>{
- console.log('获取角色列表',res)
- this.roleList = res.data.data
- })
- },
- homeStatics(){
- this.$api.service.homeStatics({
- type:2
- }).then(res=>{
- console.log('获取首页拓客数据',res)
- this.homeStaticsData = res.data.data
- })
- },
- }
- }
- </script>
- <style scoped lang="scss">
- @import './index.rpx.css';
- </style>
|