|
@@ -0,0 +1,474 @@
|
|
|
+<template>
|
|
|
+ <!-- <Login v-if="" /> -->
|
|
|
+ <view class="Content" >
|
|
|
+ <!-- 个人信息 -->
|
|
|
+ <view class="user">
|
|
|
+ <view class="empty" :style="{height: statusBarHeight + 2 +'px'}"/>
|
|
|
+ <image class="rect" :src="staticPicture.rect" mode="aspectFill" />
|
|
|
+ <view class="user-info">
|
|
|
+ <view class="user-left">
|
|
|
+ <!-- <img :src="userInfo.headImg" alt=""> -->
|
|
|
+ <view class="user-left-userAvatarUrl">
|
|
|
+ <open-data type="userAvatarUrl"></open-data>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <view class="user-right">
|
|
|
+ <view class="user-name">
|
|
|
+ {{userInfo.name || '代理商'}}
|
|
|
+ </view>
|
|
|
+ <view class="user-identity">
|
|
|
+ 代理商
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- 园所信息 -->
|
|
|
+ <view class="school">
|
|
|
+ <view class="school-new">
|
|
|
+ <view class="school-new-count">{{userInfo.increaseSchoolCount || 0}}</view>
|
|
|
+ <view>今日新增开园(个)</view>
|
|
|
+ </view>
|
|
|
+ <view class="line">
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <view class="school-all">
|
|
|
+ <view class="school-all-count">{{userInfo.totalSchoolCount || 0}}</view>
|
|
|
+ <view>全部园所(个)</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- 开园审核 -->
|
|
|
+ <view class="audit">
|
|
|
+ <!-- 开园审核数目 -->
|
|
|
+ <view class="audit-count" @click="jumpStartSchoolAudit">
|
|
|
+ <view class="audit-count-left">
|
|
|
+ 开园审核
|
|
|
+ </view>
|
|
|
+ <view class="audit-count-right">
|
|
|
+ <view class="audit-count-right-count" v-if="waitCheckSchoolCount !== 0">
|
|
|
+ {{userInfo.waitCheckSchoolCount > 99 ? '99+' : waitCheckSchoolCount }}
|
|
|
+ </view>
|
|
|
+ <van-icon name="arrow" color="#1677FF"/>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- 邀请码与地区园所 -->
|
|
|
+ <view class="inviteCode-school">
|
|
|
+ <view class="inviteCode-school-list">
|
|
|
+ <view class="inviteCode-school-list-item" @click="hanlderInviteCodeWithSchool(item)" v-for="item in inviteCodeWithSchool" :key="item.id">
|
|
|
+ <view class="inviteCode-school-list-item-left">
|
|
|
+ <view class="inviteCode-school-list-item-left-label">
|
|
|
+ <image
|
|
|
+ :style="{width: item.id === 1 ? '220rpx' : '266rpx'}"
|
|
|
+ class="invite-code"
|
|
|
+ :src="item.label"
|
|
|
+ mode="aspectFit"
|
|
|
+ />
|
|
|
+ <van-icon name="arrow" custom-style="color: #B0B9C0; font-weight: bold; opacity: .4;" />
|
|
|
+ </view>
|
|
|
+ <text class="inviteCode-school-list-item-left-desc">
|
|
|
+
|
|
|
+ <text>{{item.desc}}</text>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ <view class="inviteCode-school-list-item-right">
|
|
|
+ <image :src="item.imgUrl" mode="aspectFit" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- 邀请码弹出层 -->
|
|
|
+ <!-- class="overlay" -->
|
|
|
+ <view class="overlay" v-show="inviteCodeOverlay" @click="inviteCodeOverlay = false" >
|
|
|
+ <invite-code @inviteCodeOverlay="inviteCodeOverlay = false" v-if="inviteCodeOverlay" :name="userInfo.name" :codeUrl="userInfo.inviteQRCode"/>
|
|
|
+ </view >
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { getGarden } from '@/api/home.js'
|
|
|
+import { CustomNavbar } from '@/components/CustomNavbar'
|
|
|
+import { staticPicture } from '@/utils/global.js'
|
|
|
+import { setLocalStorage, getLocalStorage } from '@/utils/wxTool.js'
|
|
|
+import { waitCheckCount } from '@/api/audit'
|
|
|
+import InviteCode from '@/components/inviteCode'
|
|
|
+import Tip from '@/utils/tip.js'
|
|
|
+import Login from '@/pages/index/index'
|
|
|
+const inviteCodeWithSchool = Object.freeze([
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ label: staticPicture.inviteCode,
|
|
|
+ desc: 'MY INVITATION CODE',
|
|
|
+ imgUrl: staticPicture.codeBg
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 2,
|
|
|
+ label: staticPicture.school,
|
|
|
+ desc: 'MY REGIONAL GARDEN OFFICE',
|
|
|
+ imgUrl: staticPicture.schoolBg
|
|
|
+ }
|
|
|
+])
|
|
|
+export default {
|
|
|
+ name: 'Content',
|
|
|
+ components: {
|
|
|
+ CustomNavbar,
|
|
|
+ InviteCode,
|
|
|
+ Login
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ statusBarHeight () {
|
|
|
+ return this.$store.state.systemInfo.statusBarHeight
|
|
|
+ },
|
|
|
+ },
|
|
|
+ onLoad () {
|
|
|
+
|
|
|
+ },
|
|
|
+ onReady() {
|
|
|
+
|
|
|
+ },
|
|
|
+ onShow () {
|
|
|
+ this.waitCheckCount()
|
|
|
+ if (uni.getStorageSync('userInfo')) {
|
|
|
+ this.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ staticPicture,
|
|
|
+ inviteCodeWithSchool, // 邀请码与地区园所
|
|
|
+ inviteCodeOverlay: false,
|
|
|
+ userInfo: {},
|
|
|
+ waitCheckSchoolCount: 0
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 获取园所审核数量
|
|
|
+ async waitCheckCount () {
|
|
|
+ const {data, status} = await waitCheckCount()
|
|
|
+ console.log(data, status);
|
|
|
+ if (status === 200) {
|
|
|
+ this.waitCheckSchoolCount = data
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 跳转开园审核
|
|
|
+ jumpStartSchoolAudit () {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/audit/index'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 点击邀请码与地区园所
|
|
|
+ hanlderInviteCodeWithSchool (item) {
|
|
|
+
|
|
|
+ const { id } = item
|
|
|
+ if (id === 1) {
|
|
|
+ this.idIsOne()
|
|
|
+ } else {
|
|
|
+ this.idNoOne()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 点击邀请码与地区园所 如果id === 1
|
|
|
+ idIsOne () {
|
|
|
+
|
|
|
+ this.inviteCodeOverlay = true
|
|
|
+ setTimeout( () => {
|
|
|
+
|
|
|
+
|
|
|
+ }, 1000)
|
|
|
+
|
|
|
+ },
|
|
|
+ // 点击邀请码与地区园所 id !== 1
|
|
|
+ idNoOne () {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/districtGarden/index'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.Content {
|
|
|
+ .user {
|
|
|
+ width: 100%;
|
|
|
+ height: 625rpx;
|
|
|
+ padding: 72rpx 32rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+
|
|
|
+ position: relative;
|
|
|
+ .rect {
|
|
|
+ width: 100%;
|
|
|
+ height: 625rpx;
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
+ z-index: -1;
|
|
|
+ }
|
|
|
+ .user-info {
|
|
|
+
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ .user-left {
|
|
|
+ width: 140rpx;
|
|
|
+ height: 140rpx;
|
|
|
+ border-radius: 50%;
|
|
|
+ overflow: hidden;
|
|
|
+ border: 2rpx solid rgba(255, 255, 255, .5);
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ .user-left-userAvatarUrl {
|
|
|
+ width: 120rpx;
|
|
|
+ height: 120rpx;
|
|
|
+ border-radius: 50%;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .user-right {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-between;
|
|
|
+
|
|
|
+ padding: 14rpx 0px 22rpx;
|
|
|
+ margin-left: 9px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ .user-name {
|
|
|
+ font-size: 40rpx;
|
|
|
+ font-family: PingFangSC-Semibold, PingFang SC;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #FFFFFF;
|
|
|
+ }
|
|
|
+ .user-identity {
|
|
|
+ width: 132rpx;
|
|
|
+ height: 40rpx;
|
|
|
+ background: rgba(255, 255, 255, 0.6);
|
|
|
+ border-radius: 20rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-family: PingFangSC-Light, PingFang SC;
|
|
|
+ font-weight: 300;
|
|
|
+ color: #FFFFFF;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .school {
|
|
|
+ color: rgba(255, 255, 255, 0.8);
|
|
|
+ font-size: 24rpx;
|
|
|
+ font-family: PingFangSC-Medium, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 34rpx;
|
|
|
+
|
|
|
+ .line {
|
|
|
+ width: 2rpx;
|
|
|
+ height: 60rpx;
|
|
|
+ background-color: #fff;
|
|
|
+ margin-left: 144rpx;
|
|
|
+ margin-right: 42rpx;
|
|
|
+ opacity: .1;
|
|
|
+ }
|
|
|
+ &-new {
|
|
|
+
|
|
|
+ &-count {
|
|
|
+ font-size: 52rpx;
|
|
|
+ // font-weight: 600;
|
|
|
+ margin-bottom: 10rpx;
|
|
|
+ color: #FFFFFF;
|
|
|
+ line-height: 60rpx;
|
|
|
+ text-shadow: 0rpx 4rpx 8rpx #0028F0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &-all {
|
|
|
+
|
|
|
+ &-count {
|
|
|
+ font-size: 52rpx;
|
|
|
+ // font-weight: 600;
|
|
|
+ color: #FFFFFF;
|
|
|
+ line-height: 60rpx;
|
|
|
+ text-shadow: 0rpx 4rpx 8rpx #0028F0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .audit {
|
|
|
+ width: 100%;
|
|
|
+ height: 1142rpx;
|
|
|
+
|
|
|
+ background: linear-gradient(180deg, #FFFFFF 0%, #F2F4FF 100%);
|
|
|
+ border-radius: 88rpx 88rpx 0px 0px;
|
|
|
+ margin-top: -120rpx;
|
|
|
+ padding: 52rpx 28rpx 0rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ position: relative;
|
|
|
+ z-index: 1;
|
|
|
+ .audit-count {
|
|
|
+ width: 694rpx;
|
|
|
+ height: 100rpx;
|
|
|
+ background: #F2F4FF;
|
|
|
+ border-radius: 200rpx;
|
|
|
+ padding: 30rpx 44rpx 30rpx 46rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ &-left {
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-family: PingFangSC-Medium, PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #1677FF;
|
|
|
+ }
|
|
|
+ &-right {
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ &-count {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ width: 60rpx;
|
|
|
+ height: 36rpx;
|
|
|
+ background: #FF1226;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ font-size: 24rpx;
|
|
|
+ font-family: PingFangSC-Regular, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #FFFFFF;
|
|
|
+ /deep/ .van-icon-arrow {
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 邀请码与地区园所
|
|
|
+ .inviteCode-school {
|
|
|
+ margin-top: 58rpx;
|
|
|
+ &-list {
|
|
|
+ &-item {
|
|
|
+ width: 694rpx;
|
|
|
+ height: 200rpx;
|
|
|
+ background: #FFFFFF;
|
|
|
+ box-shadow: 0rpx 6rpx 16rpx 0rpx rgba(184, 184, 184, 0.27);
|
|
|
+ border-radius: 60rpx;
|
|
|
+ margin-bottom: 28rpx;
|
|
|
+ padding: 44rpx 34rpx 30rpx 46rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ &-left {
|
|
|
+ &-label {
|
|
|
+ text {
|
|
|
+ font-size: 48rpx;
|
|
|
+ font-family: "Helvetica Neue",Helvetica,Arial,"Microsoft Yahei","Hiragino Sans GB","Heiti SC","WenQuanYi Micro Hei",sans-serif;;
|
|
|
+ color: #3B4C6E;
|
|
|
+ margin-right: 32rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &-desc {
|
|
|
+ width: 210rpx;
|
|
|
+ height: 28rpx;
|
|
|
+ font-size: 20rpx;
|
|
|
+ font-family: PingFangSC-Regular, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ color: rgba(59, 76, 110, 0.5);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ &-right {
|
|
|
+ height: 183rpx;
|
|
|
+ width: 180rpx;
|
|
|
+ image {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+// 邀请码弹出层
|
|
|
+.inviteCode-wrapper {
|
|
|
+ width: 652rpx;
|
|
|
+ height: 890rpx;
|
|
|
+ background: #FFFFFF;
|
|
|
+ border-radius: 40rpx;
|
|
|
+ position: fixed;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ z-index: 2;
|
|
|
+ &-header {
|
|
|
+ width: 652rpx;
|
|
|
+ height: 246rpx;
|
|
|
+ background: url('../../static/image/invitePop.png') no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ padding-top: 34rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ &-teacher {
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-family: PingFangSC-Medium, PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #9C9AAB;
|
|
|
+ margin-bottom: 12rpx;
|
|
|
+ }
|
|
|
+ &-company {
|
|
|
+ font-size: 52rpx;
|
|
|
+ font-family: PingFangSC-Semibold, PingFang SC;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #666666;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &-qrcode {
|
|
|
+ width: 362rpx;
|
|
|
+ height: 360rpx;
|
|
|
+ margin: 0 auto;
|
|
|
+ text-align: center;
|
|
|
+ image {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ margin-bottom: 40rpx;
|
|
|
+ }
|
|
|
+ &-tip {
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-family: PingFangSC-Regular, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #9C9AAB;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /deep/ .van-icon-close {
|
|
|
+ position: absolute;
|
|
|
+ bottom: -88rpx;
|
|
|
+ left: 50%;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ opacity: .9;
|
|
|
+ }
|
|
|
+}
|
|
|
+.overlay {
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
+ background-color: rgba(73, 73, 76, .9);
|
|
|
+ z-index: 2;
|
|
|
+}
|
|
|
+
|
|
|
+.invite-code {
|
|
|
+ width: 220rpx;
|
|
|
+ height: 38rpx;
|
|
|
+ margin-right: 44rpx;
|
|
|
+}
|
|
|
+</style>
|