Ver código fonte

feat:大赛海选报名完成

zhubo 3 anos atrás
pai
commit
d3dcb8e847
31 arquivos alterados com 1938 adições e 1136 exclusões
  1. 66 7
      src/api/competition.js
  2. 13 17
      src/pages.json
  3. 196 145
      src/pages/competition/apply.vue
  4. 126 9
      src/pages/competition/components/myRegisterList.vue
  5. 52 49
      src/pages/competition/index.vue
  6. 137 61
      src/pages/competition/myRegister.vue
  7. 139 94
      src/pages/competitionRegister/addSchool.vue
  8. 364 137
      src/pages/competitionRegister/collectInformation.vue
  9. 58 40
      src/pages/competitionRegister/component/step-register.vue
  10. 76 35
      src/pages/competitionRegister/component/step-tabbar.vue
  11. 85 39
      src/pages/competitionRegister/index.vue
  12. 37 12
      src/pages/competitionRegister/schoolInformation.vue
  13. 589 491
      src/pages/user/index.vue
  14. BIN
      src/static/activity/select-button.png
  15. BIN
      src/static/competitionRegister/common/arrow.png
  16. 0 0
      src/static/competitionRegister/common/back-icon.png
  17. BIN
      src/static/competitionRegister/common/closeBtn.png
  18. BIN
      src/static/competitionRegister/common/submitSucess.png
  19. BIN
      src/static/image/ava.jpg
  20. BIN
      src/static/image/competitionImg.png
  21. BIN
      src/static/image/competitionTitle.png
  22. BIN
      src/static/image/competitionTitleText.png
  23. BIN
      src/static/image/inviteCodeImg.png
  24. BIN
      src/static/image/inviteCodeTitle.png
  25. BIN
      src/static/image/logo.png
  26. BIN
      src/static/image/noData.png
  27. BIN
      src/static/image/openSchoolAudit.png
  28. BIN
      src/static/image/poster.jpg
  29. BIN
      src/static/image/rect.png
  30. BIN
      src/static/image/regionalGardenImg.png
  31. BIN
      src/static/image/regionalGardenTitle.png

+ 66 - 7
src/api/competition.js

@@ -5,7 +5,7 @@ import { request } from '../utils/request'
  * @param { number }  competitionId  写死的 任意值 1
  */
 
-export function getCompetitionList (parmas) {
+export function getCompetitionList(parmas) {
     return request({
         url: `/agent/miniprogram/competitionStage`,
         method: 'GET',
@@ -20,7 +20,7 @@ export function getCompetitionList (parmas) {
  * 
  */
 
-export function getCloudSchool (parmas) {
+export function getCloudSchool(parmas) {
     return request({
         url: `/agent/miniprogram/competition/cloud/signup/info/school`,
         method: 'GET',
@@ -36,7 +36,7 @@ export function getCloudSchool (parmas) {
  * 
  */
 
-export function getCloudBaby (parmas) {
+export function getCloudBaby(parmas) {
     return request({
         url: `/agent/miniprogram/competition/cloud/signup/info/baby`,
         method: 'GET',
@@ -51,7 +51,7 @@ export function getCloudBaby (parmas) {
  * 
  */
 
-export function getCompetitionDate (parmas) {
+export function getCompetitionDate(parmas) {
     return request({
         url: `/agent/miniprogram/competition/startTime`,
         method: 'GET',
@@ -62,7 +62,7 @@ export function getCompetitionDate (parmas) {
 
 
 
-export function getMock (parmas) {
+export function getMock(parmas) {
     return request({
         url: `school`,
         method: 'GET',
@@ -77,7 +77,7 @@ export function getMock (parmas) {
  * 
  */
 
- export function getCompetitionId () {
+export function getCompetitionId() {
     return request({
         url: `/agent/miniprogram/competition/id`,
         method: 'GET'
@@ -90,11 +90,70 @@ export function getMock (parmas) {
  * 
  */
 
- export function getAllCompetition () {
+export function getAllCompetition() {
     return request({
         url: `/agent/miniprogram/competition/all`,
         method: 'GET'
     })
 }
 
+/**
+ * @description 提交海选报名
+ * 
+ */
+export function submitAgentRegister(data) {
+    return request({
+        url: `/agent/miniprogram/agent/register`,
+        method: 'POST',
+        query: data
+    })
+}
 
+
+/**
+ * @description 我的报名列表-分页
+ * 
+ */
+export function getAgentRegisterListByPage(parmas) {
+    return request({
+        url: `/agent/miniprogram/agent/register/page`,
+        method: 'GET',
+        query: parmas
+    })
+}
+
+
+/**
+ * @description 报名详情
+ * 
+ */
+export function getAgentRegisterDetail(parmas) {
+    return request({
+        url: `/agent/miniprogram/agent/register/detail`,
+        method: 'GET',
+        query: parmas
+    })
+}
+
+/**
+ * @description 参赛学校列表
+ * 
+ */
+export function getAgentRegisterSchoolList(parmas) {
+    return request({
+        url: `/agent/miniprogram/agent/register/school`,
+        method: 'GET',
+        query: parmas
+    })
+}
+
+/**
+ * @description 纲领邮寄地址
+ * 
+ */
+export function getAgentProgramAddress() {
+    return request({
+        url: `/agent/miniprogram/agent/program/address`,
+        method: 'GET',
+    })
+}

+ 13 - 17
src/pages.json

@@ -1,11 +1,11 @@
 {
-	"pages": [ 
+	"pages": [
 		{
 			"path": "pages/user/index",
 			"style": {
 				"navigationBarTitleText": "代理商",
 				"navigationStyle": "custom",
-				"usingComponents":{
+				"usingComponents": {
 					"van-button": "/wxcomponents/button/index",
 					"van-overlay": "/wxcomponents/overlay/index"
 				}
@@ -16,7 +16,7 @@
 			"style": {
 				"navigationBarTitleText": "代理商",
 				"navigationStyle": "custom",
-				"usingComponents":{
+				"usingComponents": {
 					"van-button": "/wxcomponents/button/index",
 					"van-overlay": "/wxcomponents/overlay/index"
 				}
@@ -34,7 +34,7 @@
 				"navigationBarTitleText": "代理商",
 				"disableScroll": true, // 禁止苹果手机滑动
 				"navigationStyle": "custom",
-				"usingComponents":{
+				"usingComponents": {
 					"van-button": "/wxcomponents/button/index"
 				}
 			}
@@ -45,7 +45,7 @@
 				"navigationBarTitleText": "我的地区园所",
 				"disableScroll": true, // 禁止苹果手机滑动
 				"navigationStyle": "custom",
-				"usingComponents":{
+				"usingComponents": {
 					"van-button": "/wxcomponents/button/index",
 					"van-overlay": "/wxcomponents/overlay/index",
 					"van-grid": "/wxcomponents/grid/index",
@@ -59,13 +59,13 @@
 				"navigationBarTitleText": "开园审核",
 				"disableScroll": true, // 禁止苹果手机滑动
 				"navigationStyle": "custom",
-				"usingComponents":{
+				"usingComponents": {
 					"van-button": "/wxcomponents/button/index",
 					"van-overlay": "/wxcomponents/overlay/index",
 					"van-grid": "/wxcomponents/grid/index",
 					"van-grid-item": "/wxcomponents/grid-item/index",
 					"van-tab": "/wxcomponents/tab/index",
-  				"van-tabs": "/wxcomponents/tabs/index"
+					"van-tabs": "/wxcomponents/tabs/index"
 				}
 			}
 		},
@@ -75,7 +75,7 @@
 				"navigationBarTitleText": "搜索园所",
 				"disableScroll": true, // 禁止苹果手机滑动
 				"navigationStyle": "custom",
-				"usingComponents":{
+				"usingComponents": {
 					"van-search": "/wxcomponents/search/index"
 				}
 			}
@@ -85,7 +85,7 @@
 			"style": {
 				"navigationBarTitleText": "园长开园邀请码",
 				"disableScroll": true, // 禁止苹果手机滑动
-				"usingComponents":{
+				"usingComponents": {
 					"van-search": "/wxcomponents/search/index"
 				}
 			}
@@ -110,15 +110,11 @@
 		},
 		{
 			"path": "pages/competition/schoolDetail",
-			"style": {
-				
-			}
+			"style": {}
 		},
 		{
 			"path": "pages/promoted/index",
-			"style": {
-				
-			}
+			"style": {}
 		},
 		{
 			"path": "pages/promoted/search",
@@ -137,7 +133,7 @@
 			"style": {
 				"navigationBarTitleText": "手动录入成绩",
 				"navigationStyle": "custom",
-				"disableScroll": true 
+				"disableScroll": true
 			}
 		},
 		{
@@ -212,4 +208,4 @@
 			}
 		]
 	}
-}
+}

+ 196 - 145
src/pages/competition/apply.vue

@@ -1,59 +1,81 @@
 <template>
   <view class="competition-apply">
-
-    <view class="tabs" >
-      <van-tabs 
-        class="van-tabs" 
-        color="#fff" 
-        :active="tabsActive" 
+    <view class="tabs">
+      <van-tabs
+        class="van-tabs"
+        color="#fff"
+        :active="tabsActive"
         @change="onChangeTabs"
         title-active-color="#fff"
         title-inactive-color="rgba(255, 255, 255, 0.5)"
       >
         <van-tab title="活动列表">
-          
-            <view class="competition-title">
+          <view class="competition-title">
+            <image mode="aspectFill" :src="staticImg.competitionTitleText" class="competition-title-text">
+          </view>
+
+          <view class="competition-list">
+            <!-- 地区 -->
+            <view
+              class="region"
+              v-for="(item, index) in competitionList"
+              :key="item.id"
+            >
               <image
-                class="apply-title"
-                mode='aspectFill'
-                :src="require('@/static/activity/apply-title.png')"
+                class="apply1"
+                :src="require(`@/static/activity/apply${index + 1}.png`)"
               />
-              <view class="competition-title-text" >
-                第17届逻辑狗大赛
+              <view class="label region-label">{{ item.name }}</view>
+              <view
+                class="date region-date"
+                :style="{
+                  marginBottom: index === 0 ? '16rpx' : '26rpx',
+                }"
+                >{{ item.startTime | filterStartTime }}</view
+              >
+              <view
+                v-if="index === 0"
+                class="select-button region-button"
+                @click="handleGoSignUp"
+              >
+                <image
+                  class="select-button"
+                  src="@/static/activity/select-button.png"
+                />
+                <text class="button-text">承办单位报名入口</text>
               </view>
-            </view>
-            
-            <view class="competition-list" >
-              <!-- 地区 -->
               <view
-                class="region"
-                v-for="(item, index) in competitionList"
-                :key="item.id"
+                :class="[
+                  formatDate(item.startTime, item.endTime)
+                    ? 'select-button'
+                    : 'unselect-button',
+                  'region-button',
+                ]"
+                @click="goApplySchoolPage(item, index)"
               >
                 <image
-                  class="apply1"
-                  :src="require(`@/static/activity/apply${index + 1}.png`)"
+                  :class="[
+                    formatDate(item.startTime, item.endTime)
+                      ? 'select-button'
+                      : 'unselect-button',
+                  ]"
+                  :src="
+                    require(`@/static/activity/${
+                      formatDate(item.startTime, item.endTime)
+                        ? 'select-button'
+                        : 'button'
+                    }.png`)
+                  "
                 />
-                  <view class="label region-label" >{{item.name}}</view>
-                  <view class="date region-date" >{{item.startTime | filterStartTime}}</view>
-                  <view
-                    :class="[formatDate(item.startTime, item.endTime) ?  'select-button' : 'unselect-button', 'region-button']"
-                    :style="{top:  formatDate(item.startTime, item.endTime) ?  '228rpx' : '236rpx'}"
-                    @click="goApplySchoolPage(item, index)"
-                  >
-                    <image 
-                      :class="[formatDate(item.startTime, item.endTime) ?  'select-button' : 'unselect-button']" 
-                      :src="require(`@/static/activity/${formatDate(item.startTime, item.endTime) ? 'select-button' : 'button'}.png`)"
-                    />
-                    <text class="button-text" >
-                      {{ index + 1 | filterButton }}
-                    </text>
-                  </view>
+                <text class="button-text">
+                  {{ (index + 1) | filterButton }}
+                </text>
               </view>
             </view>
+          </view>
         </van-tab>
         <van-tab title="我的报名">
-          <my-register-list /> 
+          <my-register-list :list="agentRegisterList" />
         </van-tab>
       </van-tabs>
     </view>
@@ -63,69 +85,112 @@
 </template>
 
 <script>
-import { getCompetitionList, getCompetitionId } from '@/api/competition'
+import {
+  getCompetitionList,
+  getCompetitionId,
+  getAgentRegisterListByPage,
+} from "@/api/competition";
 // import Toast from 'path/to/@vant/weapp/dist/toast/toast';
-import Toast from '@/wxcomponents/toast/toast';
-import dayjs from 'dayjs'
-import  MyRegisterList from './components/myRegisterList.vue'
+import Toast from "@/wxcomponents/toast/toast";
+import dayjs from "dayjs";
+import Tip from "@/utils/tip.js";
+import MyRegisterList from "./components/myRegisterList.vue";
+const staticImg = {
+  competitionTitleText: require("@/static/image/competitionTitleText.png"),
+};
+
 export default {
-  name: 'competition-apply',
+  name: "competition-apply",
   components: {
-    MyRegisterList
+    MyRegisterList,
   },
   filters: {
-    filterStartTime (records) {
-      const [ dayStr ] = records.split(' ')
-      const [year, month, day] =  dayStr.split('-')
-      return year + '年' + month + '月' + day + '日'
+    filterStartTime(records) {
+      const [dayStr] = records.split(" ");
+      const [year, month, day] = dayStr.split("-");
+      return year + "年" + month + "月" + day + "日";
     },
-    filterButton (index) {
+    filterButton(index) {
       switch (String(index)) {
-        case '1':
-          return '报名详情'
-        
-        case '2':
-          return '提交晋级名单'
-        
-        case '3':
-          return '成绩/排名'
+        case "1":
+          return "我的地区选手报名详情";
+
+        case "2":
+          return "提交晋级名单";
+
+        case "3":
+          return "成绩/排名";
       }
-    }
+    },
   },
-  async onLoad (options) {
-    const { competitionId, name } = options
-    this.competitionId = competitionId
-    this.name = name
-    this.getCompetitionList()
+  async onLoad(options) {
+    const { competitionId, name } = options;
+    this.competitionId = competitionId;
+    this.name = name;
+    await this.getCompetitionList();
+    await this.getAgentRegisterListByPage();
   },
-  data () {
+  data() {
     return {
+      staticImg,
       tabsActive: 0,
       competitionList: [],
-      name: '',
-      competitionId: ''
-    }
+      name: "",
+      competitionId: "",
+      queryParams: {
+        page: 1,
+        pageSize: 1000000,
+      },
+      agentRegisterList: [], // 园所报名列表
+    };
   },
   methods: {
-    onChangeTabs (e) {
-      console.log(e);
+    // 我的报名列表
+    async getAgentRegisterListByPage() {
+      const { data, msg, status } = await getAgentRegisterListByPage(
+        this.queryParams
+      );
+      if (status === 200) {
+        // console.log(data, "getAgentRegisterListByPage");
+        this.agentRegisterList = data.entityList;
+      } else {
+        Tip.error(msg);
+      }
+    },
+    // 去报名
+    handleGoSignUp() {
+      uni.navigateTo({
+        url: `/pages/competitionRegister/index?competitionId=${this.competitionId}`,
+      });
+    },
+    onChangeTabs(e) {
+      // console.log(e);
     },
     // 解析对比时间
-    formatDate (startStr, endStr) {
-      return dayjs().isBefore(dayjs(endStr)) && dayjs().isAfter(dayjs(startStr))
+    formatDate(startStr, endStr) {
+      return (
+        dayjs().isBefore(dayjs(endStr)) && dayjs().isAfter(dayjs(startStr))
+      );
     },
     // 参赛时间对比
-    applyFormatDate (startStr, endStr ) {
-      return [dayjs().isAfter(dayjs(startStr)) , dayjs().isBefore(dayjs(endStr))]
+    applyFormatDate(startStr, endStr) {
+      return [
+        dayjs().isAfter(dayjs(startStr)),
+        dayjs().isBefore(dayjs(endStr)),
+      ];
     },
     // 跳转页面
-    goApplySchoolPage (records, index) {
+    goApplySchoolPage(records, index) {
+      const { id, startTime, endTime } = records;
+      const competiitionLabel =
+        index + 1 === 2
+          ? this.competitionList[1].name
+          : index + 1 === 3
+          ? this.competitionList[2].name
+          : this.competitionList[0].name;
+      const [startState, endState] = this.applyFormatDate(startTime, endTime);
+      console.log(startTime, endTime, startState, endState);
 
-      const { id, startTime, endTime } = records
-      const competiitionLabel = index + 1 === 2 ? this.competitionList[1].name :  index + 1  === 3 ? this.competitionList[2].name : this.competitionList[0].name
-      const [ startState, endState] = this.applyFormatDate(startTime, endTime)
-      console.log(startTime, endTime, startState, endState );
- 
       if (!endState) {
         Toast(`${competiitionLabel}已结束\n ${this.formatStr(endTime)}`);
       } else if (!startState) {
@@ -133,38 +198,39 @@ export default {
       } else if (startState && endState) {
         if (index === 0) {
           uni.navigateTo({
-            url: `/pages/competition/applySchool?id=${id}`
-          })
-        } else if ( index === 1) {
+            url: `/pages/competition/applySchool?id=${id}`,
+          });
+        } else if (index === 1) {
           uni.navigateTo({
-            url: `/pages/promoted/index?stageId=${id}`
-          })
+            url: `/pages/promoted/index?stageId=${id}`,
+          });
         }
-        
       }
     },
-    formatStr (records) {
-      const [ dayStr ] = records.split(' ')
-      const [year, month, day] =  dayStr.split('-')
-      return year + '年' + month + '月' + day + '日'
+    formatStr(records) {
+      const [dayStr] = records.split(" ");
+      const [year, month, day] = dayStr.split("-");
+      return year + "年" + month + "月" + day + "日";
     },
     // 获取参赛列表
-    async getCompetitionList () {
-      const { status, data }  =  await getCompetitionList({competitionId: this.competitionId})
-      if ( status === 200 ) {
-        this.competitionList = data
+    async getCompetitionList() {
+      const { status, data } = await getCompetitionList({
+        competitionId: this.competitionId,
+      });
+      if (status === 200) {
+        this.competitionList = data;
       }
     },
     // 获取赛事id
-    async getCompetitionId () {
-      const { status, data }  =  await getCompetitionId()
+    async getCompetitionId() {
+      const { status, data } = await getCompetitionId();
       if (status === 200) {
         console.log(data);
-        this.competitionId = data
+        this.competitionId = data;
       }
-    }
-  }
-}
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
@@ -177,71 +243,57 @@ export default {
 .competition-apply {
   width: 100vw;
   min-height: 100vh;
-  background: #1677FF;
+  background: #1677ff;
   position: relative;
   overflow: hidden;
   padding-bottom: 100rpx;
 
   .competition-title {
-    position: relative;
+    margin: 16rpx auto 0;
     width: 718rpx;
     height: 118rpx;
-    margin: 0 auto;
-    top: 30rpx;
-    .apply-title {
-      width: 718rpx;
-      height: 118rpx;
-      position: absolute;
-      left: 50%;
-      transform: translateX(-50%);
-    }
     .competition-title-text {
-      width: 200rpx;
-      position: absolute;
-      left: 31%;
-      top: 49%;
-      transform: translate(-50%, -50%);
-      display: block;
-      overflow-wrap: break-word;
-      color: rgba(119, 119, 119, 1);
-      font-size: 12px;
-      font-family: PingFangSC-Regular;
-      line-height: 17px;
-      text-align: left;
+      width: 100%;
+      height: 100%;
+      object-fit: cover;
     }
   }
-  .competition-list {
-    margin-top: 16rpx;
-  }
   .region {
-    width: 718rpx;
-    height: 382rpx;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
     margin: 0 auto;
     position: relative;
+    width: 718rpx;
+    height: 416rpx;
     .apply1 {
+      position: absolute;
+      z-index: 0;
       width: 100%;
       height: 100%;
-      display: block;
+      object-fit: cover;
     }
     .region-label {
-      top: 82rpx;
-      .absoluted()
+      position: relative;
+      z-index: 2;
     }
     .region-date {
-      top: 146rpx;
-      .absoluted();
+      position: relative;
+      z-index: 2;
+      margin-top: 10rpx;
     }
     .region-button {
-      
-      .absoluted();
+      position: relative;
+      z-index: 2;
       .button-text {
         display: flex;
         justify-content: center;
         align-items: center;
+        width: 100%;
       }
     }
-  } 
-
+  }
 
   .label {
     font-size: 40rpx;
@@ -257,7 +309,6 @@ export default {
     font-family: PingFangSC-Regular, PingFang SC;
     font-weight: 400;
     color: #999999;
-    margin-top: 8rpx;
   }
   .apply-button {
     position: absolute;
@@ -272,28 +323,28 @@ export default {
   }
   .button-text {
     position: absolute;
-    top: 43%;
-    left: 50%;
-    transform: translate(-50%, -50%);
+    top: 28rpx;
+    height: 40rpx;
     font-size: 28rpx;
     font-family: PingFangSC-Medium, PingFang SC;
     font-weight: 500;
-    color: #FFFFFF;
+    color: #ffffff;
+    line-height: 40rpx;
   }
   .select-button {
-    width: 434rpx;
+    width: 432rpx;
     height: 100rpx;
+    object-fit: cover;
   }
   .unselect-button {
     width: 404rpx;
     height: 70rpx;
+    object-fit: cover;
   }
-
 }
 
-
 /deep/ .van-tabs__scroll {
-  background-color: transparent
+  background-color: transparent;
 }
 
 /deep/ .van-tabs {

+ 126 - 9
src/pages/competition/components/myRegisterList.vue

@@ -1,26 +1,143 @@
 <template>
-  <view class="my-register" >
-    <view class="my-register-item" >
-
+  <view class="my-register">
+    <view
+      class="my-register-item"
+      v-for="item in list"
+      :key="item.id"
+      @click="handleLookDetail(item.id)"
+    >
+      <view class="my-register-item-title">{{
+        item.competitionChildName
+      }}</view>
+      <view class="my-register-item-params">
+        <view class="my-register-item-params-label">提交时间</view>
+        <view class="my-register-item-params-content">{{
+          item.createTime
+        }}</view>
+      </view>
+      <view class="my-register-item-params">
+        <view class="my-register-item-params-label">参赛园所</view>
+        <view class="my-register-item-params-content"
+          >{{ item.totalSchool }}所</view
+        >
+      </view>
+      <view class="my-register-item-params">
+        <view class="my-register-item-params-label">承办人</view>
+        <view class="my-register-item-params-content">{{
+          item.unitPrincipal
+        }}</view>
+      </view>
+      <image :src="staticImg.returnArrow" class="return-arrow" />
+    </view>
+    <view v-if="list.length === 0" class="noData">
+      <image :src="staticImg.noData" />
+      <view class="text">暂无内容</view>
     </view>
   </view>
 </template>
 
 <script>
+const staticImg = {
+  noData: require("@/static/image/noData.png"),
+  returnArrow: require("@/static/image/right-arrow.png"),
+};
 export default {
-  name: 'my-register'
-}
+  name: "my-register",
+  props: {
+    list: {
+      type: Array,
+      default: () => [],
+    },
+  },
+  data() {
+    return {
+      staticImg,
+    };
+  },
+  methods: {
+    handleLookDetail(id) {
+      uni.navigateTo({
+        url: `/pages/competition/myRegister?id=${id}`,
+      });
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
 .my-register {
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
   .my-register-item {
+    position: relative;
+    padding: 40rpx;
+    margin-top: 48rpx;
     width: 686rpx;
     height: 352rpx;
-    background: #FFFFFF;
+    background: #ffffff;
     border-radius: 20rpx;
+    box-sizing: border-box;
+    &-title {
+      height: 44rpx;
+      font-size: 40rpx;
+      font-family: PingFangSC-Semibold, PingFang SC;
+      font-weight: 600;
+      color: #333333;
+      line-height: 44rpx;
+    }
+    &-params {
+      display: flex;
+      margin-top: 30rpx;
+      &-label {
+        width: 172rpx;
+        height: 44rpx;
+        font-size: 30rpx;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #777777;
+        line-height: 44rpx;
+      }
+      &-content {
+        height: 44rpx;
+        font-size: 30rpx;
+        font-family: PingFangSC-Medium, PingFang SC;
+        font-weight: 500;
+        color: #333333;
+        line-height: 44rpx;
+      }
+    }
+    &-params:first-child {
+      margin-top: 36rpx;
+    }
+    .return-arrow {
+      position: absolute;
+      right: 28rpx;
+      top: 50%;
+      width: 16rpx;
+      height: 26rpx;
+      object-fit: cover;
+      transform: translate(0, -50%);
+    }
+  }
+  .noData {
+    image {
+      margin: 300rpx auto 44rpx;
+      width: 316rpx;
+      height: 220rpx;
+      object-fit: cover;
+    }
+    .text {
+      margin: 0 auto;
+      width: 120rpx;
+      height: 44rpx;
+      font-size: 30rpx;
+      font-family: PingFangSC-Regular, PingFang SC;
+      font-weight: 400;
+      color: #fff;
+      line-height: 44rpx;
+    }
   }
 }
-</style>
-
-
+</style>

+ 52 - 49
src/pages/competition/index.vue

@@ -1,82 +1,86 @@
 <template>
-    <view class="competition" >
-      <view 
-        class="avtivity-item" 
-        v-for="item in competitionList"
-        :key="item.id" 
-        @click="goPage(item)"
-      >
-        <view class="overlay" ></view>
-        <image class="activity-img" mode="aspectFill" :src="item.imgUrl" />
-        <view class="activity-text"  > 
-          <view class="text" >
-            <view>{{item.name}}</view>
-            <van-icon class="right-arrow" name="arrow" color='#FFFFFF' />
-          </view>
-          <text class="date" > {{item.startTime}}-{{item.endTime}} </text>
+  <view class="competition">
+    <view
+      class="avtivity-item"
+      v-for="item in competitionList"
+      :key="item.id"
+      @click="goPage(item)"
+    >
+      <view class="overlay"></view>
+      <image class="activity-img" mode="aspectFill" :src="item.imgUrl" />
+      <view class="activity-text">
+        <view class="text">
+          <view>{{ item.name }}</view>
+          <van-icon class="right-arrow" name="arrow" color="#FFFFFF" />
         </view>
+        <text class="date"> {{ item.startTime }}-{{ item.endTime }} </text>
       </view>
     </view>
+  </view>
 </template>
 
 <script>
-import { getCompetitionDate, getCompetitionId, getAllCompetition } from '@/api/competition'
-import Tip from '@/utils/tip.js'
+import {
+  getCompetitionDate,
+  getCompetitionId,
+  getAllCompetition,
+} from "@/api/competition";
+import Tip from "@/utils/tip.js";
 export default {
-  name: 'competition',
-  async onLoad () {
-    await this.getAllCompetition()
+  name: "competition",
+  async onLoad() {
+    await this.getAllCompetition();
   },
-  data () {
+  data() {
     return {
-      startStr: '',
-      endStr: '',
-      competitionId: '',
-      competitionList: [] // 赛事列表
-    }
+      startStr: "",
+      endStr: "",
+      competitionId: "",
+      competitionList: [], // 赛事列表
+    };
   },
   methods: {
-    goPage (item) {
-      const { progress, id, name } = item
+    goPage(item) {
+      const { progress, id, name } = item;
       if (progress) {
         uni.navigateTo({
-          url: `/pages/competition/apply?competitionId=${id}&name=${name}`
-        })
+          url: `/pages/competition/apply?competitionId=${id}&name=${name}`,
+        });
       } else {
-        Tip.error('该比赛已结束')
+        Tip.error("该比赛已结束");
       }
     },
-    async getAllCompetition () {
-      const { status, data } = await getAllCompetition()
+    // 查询所有赛事
+    async getAllCompetition() {
+      const { status, data } = await getAllCompetition();
       if (status === 200) {
-        console.log(data, 'data');
-        this.competitionList = data.map( item => {
-          item.startTime = item.startTime.split(' ')[0].replace(/\-/g, '/')
-          item.endTime = item.endTime.split(' ')[0].replace(/\-/g, '/')
-          return item
-        })
+        // console.log(data, "data");
+        this.competitionList = data.map((item) => {
+          item.startTime = item.startTime.split(" ")[0].replace(/\-/g, "/");
+          item.endTime = item.endTime.split(" ")[0].replace(/\-/g, "/");
+          return item;
+        });
       }
     },
     // 获取赛事id
-    async getCompetitionId () {
-      const { status, data }  =  await getCompetitionId()
+    async getCompetitionId() {
+      const { status, data } = await getCompetitionId();
       if (status === 200) {
-        console.log(data);
-        this.competitionId = data
+        // console.log(data);
+        this.competitionId = data;
       }
     },
     // async getCompetitionDate () {
     //   const { status, data } = await getCompetitionDate({competitionId: this.competitionId})
     //   if (status === 200) {
     //     console.log(data);
-    //     const [ startStr, endStr ] = data 
+    //     const [ startStr, endStr ] = data
     //     this.startStr = startStr.split(' ')[0].replace(/\-/g, '/')
     //     this.endStr = endStr.split(' ')[0].replace(/\-/g, '/')
     //   }
     // },
-  
-  }
-}
+  },
+};
 </script>
 
 <style lang="less" scoped>
@@ -108,7 +112,7 @@ export default {
       font-size: 30rpx;
       font-family: PingFangSC-Medium, PingFang SC;
       font-weight: 500;
-      color: #FFFFFF;
+      color: #ffffff;
       position: absolute;
       z-index: 1;
       top: 50%;
@@ -131,6 +135,5 @@ export default {
       }
     }
   }
-
 }
 </style>

+ 137 - 61
src/pages/competition/myRegister.vue

@@ -1,78 +1,120 @@
 <template>
-  <view class="my-register" >
-    <view class="competiton-title" >
-      <image class="competiton-title-image"  :src="staticImg.competitionTitle" />
+  <view class="my-register">
+    <view class="competiton-title">
+      <image class="competiton-title-image" :src="staticImg.competitionTitle" />
     </view>
 
-    <view class="informtion-list" >
-      <view class="area-information" >
-        <view class="informtion-title" >
-          地区负责人信息
-        </view>
-        <view class="informtion-card" >
-          <view class="informtion-card-item" >
-            <view class="informtion-card-label" >承办人地址</view>
-            <view class="informtion-card-content" >2022/3/4</view>
+    <view class="informtion-list">
+      <view class="area-information">
+        <view class="informtion-title"> 地区负责人信息(承办人) </view>
+        <view class="informtion-card">
+          <view class="informtion-card-item">
+            <view class="informtion-card-label">承办人地址</view>
+            <view class="informtion-card-content">{{
+              detailData.district
+            }}</view>
           </view>
-          <view class="informtion-card-item" > 
-            <view class="informtion-card-label" >详细地址</view>
-            <view class="informtion-card-content" >北京市朝阳区高碑店西店记忆中德智慧教育6102室</view>
+          <view class="informtion-card-item">
+            <view class="informtion-card-label">详细地址</view>
+            <view class="informtion-card-content">{{
+              detailData.detailAddress
+            }}</view>
           </view>
-          <view class="informtion-card-item" >
-            <view class="informtion-card-label" >承办单位</view>
-            <view class="informtion-card-content" >北京欧若拉公司</view>
+          <view class="informtion-card-item">
+            <view class="informtion-card-label">承办单位</view>
+            <view class="informtion-card-content">{{ detailData.unit }}</view>
           </view>
-          <view class="informtion-card-item" >
-            <view class="informtion-card-label" >承办人</view>
-            <view class="informtion-card-content" >张丽丽</view>
+          <view class="informtion-card-item">
+            <view class="informtion-card-label">承办人</view>
+            <view class="informtion-card-content">{{
+              detailData.unitPrincipal
+            }}</view>
           </view>
         </view>
       </view>
-      <view class="school-infomation" >
-        <view class="informtion-title" >
-          参赛园所信息
-        </view>
-        <view class="school-button" >
-          参赛园所 <text>(33)</text> >
+      <view class="school-infomation" @click="handleLookAgent">
+        <view class="informtion-title"> 参赛园所信息 </view>
+        <view class="school-button">
+          <text>参赛园所</text>
+          <text>({{ detailData.totalSchool }})</text>
+          <image :src="staticImg.arrow" class="arrow" />
         </view>
       </view>
 
-      <view class="pre-matrial-package"  >
-        <view class="informtion-title" >
-          预定材料包数量
-        </view>
+      <view class="pre-matrial-package">
+        <view class="informtion-title"> 预定材料包数量 </view>
         <view class="informtion-card">
-          <view 
-            class="pre-matrial-package-item" 
-            v-for="item in 3" 
-            :key="item"
+          <view
+            class="pre-matrial-package-item"
+            v-for="item in detailData.materialList"
+            :key="item.id"
           >
             <view class="pre-matrial-package-item-label">
-              赛事标准物料包<text>(小班)</text>
+              赛事标准物料包<text>({{ item.materialName }})</text>
             </view>
-            <view class="pre-matrial-package-item-content" >1000套</view>
+            <view class="pre-matrial-package-item-content"
+              >{{ item.number }}套</view
+            >
           </view>
         </view>
       </view>
-    </view>
 
+      <view class="tabbar">
+        <view class="school">
+          <view class="title">合计参赛园所:</view>
+          <view class="number">{{ detailData.totalSchool }}</view>
+        </view>
+        <view class="school">
+          <view class="title">合计初赛人数预估:</view>
+          <view class="number">{{ detailData.totalPerson }}</view>
+        </view>
+      </view>
+    </view>
   </view>
 </template>
 
 <script>
-
+import { getAgentRegisterDetail } from "@/api/competition";
+import Tip from "@/utils/tip.js";
 const staticImg = {
-  competitionTitle: require('@/static/competitionRegister/common/competition-title.png')
-}
+  competitionTitle: require("@/static/competitionRegister/common/competition-title.png"),
+  arrow: require("@/static/competitionRegister/common/arrow.png"),
+};
 
 export default {
-  name: 'my-register',
-  data () {
+  name: "my-register",
+  data() {
     return {
-      staticImg
-    }
-  }
-}
+      staticImg,
+      id: "",
+      detailData: {},
+    };
+  },
+  async onLoad(options) {
+    this.id = options.id;
+    await this.getAgentRegisterDetail();
+  },
+  methods: {
+    handleLookAgent() {
+      uni.navigateTo({
+        url: `/pages/competitionRegister/schoolInformation?id=${this.id}`,
+      });
+    },
+    // 报名详情
+    async getAgentRegisterDetail() {
+      const params = {
+        id: this.id,
+      };
+      const { data, msg, status } = await getAgentRegisterDetail(params);
+      if (status === 200) {
+        // console.log(data, "getAgentRegisterDetail");
+        this.detailData = data;
+      } else {
+        Tip.error(msg);
+      }
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
@@ -96,10 +138,10 @@ export default {
   }
   .informtion-list {
     .area-information {
-    }  
+    }
     .informtion-card {
       width: 686rpx;
-      background: #FFFFFF;
+      background: #ffffff;
       box-shadow: 0rpx 0rpx 44rpx 0rpx rgba(226, 226, 226, 0.58);
       border-radius: 20rpx;
       padding: 40rpx 30rpx;
@@ -124,15 +166,15 @@ export default {
           font-family: PingFangSC-Medium, PingFang SC;
           font-weight: 500;
           color: #353535;
-        } 
         }
+      }
     }
 
     .school-infomation {
       .school-button {
         width: 686rpx;
         height: 108rpx;
-        background: #FFFFFF;
+        background: #ffffff;
         box-shadow: 0rpx 0rpx 44rpx 0rpx rgba(226, 226, 226, 0.58);
         border-radius: 20rpx;
         display: flex;
@@ -141,19 +183,21 @@ export default {
         font-size: 34rpx;
         font-family: PingFangSC-Regular, PingFang SC;
         font-weight: 400;
-        color: #4679FF;
+        color: #4679ff;
         text {
-          margin: 0 20rpx;
+          margin-right: 20rpx;
+          height: 34rpx;
+          line-height: 34rpx;
+        }
+        .arrow {
+          width: 18rpx;
+          height: 28rpx;
+          object-fit: cover;
         }
       }
     }
 
     .pre-matrial-package {
-
-      .informtion-title {
-
-      }
-
       .pre-matrial-package-item:first-child {
         margin-top: 0;
       }
@@ -172,20 +216,52 @@ export default {
             font-size: 28rpx;
             font-family: DINAlternate-Bold, DINAlternate;
             font-weight: bold;
-            color: #4679FF;
+            color: #4679ff;
           }
         }
         .pre-matrial-package-item-content {
           font-size: 30rpx;
           font-family: DINAlternate-Bold, DINAlternate;
           font-weight: bold;
-          color: #4679FF;
+          color: #4679ff;
         }
       }
+    }
 
+    .tabbar {
+      position: fixed;
+      left: 0;
+      bottom: 0;
+      z-index: 9999;
+      padding: 32rpx;
+      width: 100vw;
+      height: 212rpx;
+      background: #ffffff;
+      box-shadow: 0rpx -14rpx 20rpx 0rpx rgba(152, 152, 152, 0.05);
+      border-radius: 40rpx 40rpx 0rpx 0rpx;
+      box-sizing: border-box;
+      .school {
+        display: flex;
+        align-items: center;
+        .title {
+          height: 42rpx;
+          font-size: 30rpx;
+          font-family: PingFangSC-Regular, PingFang SC;
+          font-weight: 400;
+          color: #666666;
+          line-height: 42rpx;
+        }
+        .number {
+          height: 42rpx;
+          font-size: 30rpx;
+          font-family: PingFangSC-Semibold, PingFang SC;
+          font-weight: 600;
+          color: #4e78fc;
+          line-height: 42rpx;
+        }
+      }
     }
 
- 
     .informtion-title {
       font-size: 44rpx;
       font-family: PingFangSC-Semibold, PingFang SC;

+ 139 - 94
src/pages/competitionRegister/addSchool.vue

@@ -1,61 +1,71 @@
 <template>
-  <view class="add-school" >
-    <view
-      class="school-card-list"
-    > 
+  <view class="add-school">
+    <view class="school-card-list">
       <view
         class="school-card"
-        v-for="item in schoolList"
-        :key="item.index"
+        v-for="(item, index) in schoolList"
+        :key="item.code"
       >
         <view
           class="card-header"
           v-if="isEdit"
-          :style="{marginTop: isEdit ? '-40rpx' : '0'}"
+          :style="{ marginTop: isEdit ? '-40rpx' : '0' }"
         >
-          <image class="delete-icon" :src="staticImg.deleteIcon" />
+          <image
+            class="delete-icon"
+            :src="staticImg.deleteIcon"
+            @click="handleDelete(index)"
+          />
         </view>
-        <view class="school-information" >
-          <view class="school-information-item" >
-            <view class="school-label" >参赛园所名称</view>
-            <view class="school-content" >
-              <view v-if="!isEdit" class="school-content-input" >{{item.schoolName}}</view>
+        <view class="school-information">
+          <view class="school-information-item">
+            <view class="school-label">参赛园所名称</view>
+            <view class="school-content">
+              <view v-if="!isEdit" class="school-content-input">{{
+                item.schoolName
+              }}</view>
               <input
                 v-else
                 class="school-content-input"
                 placeholder="请选择/输入园所名称"
                 :placeholder-style="placeholderStyle"
                 :value="item.schoolName"
-                @input="changeForm($event, item.index, 'schoolName')"
+                @input="changeForm($event, index, 'schoolName')"
               />
               <image
                 class="close-icon"
                 :src="staticImg.closeIcon"
                 v-if="item.schoolName && isEdit"
-                @click="restForm( item.index, 'schoolName')"
+                @click="restForm(index, 'schoolName')"
+              />
+              <van-icon
+                v-if="!item.schoolName && isEdit"
+                color="#999999"
+                name="arrow-down"
               />
-              <van-icon v-if="!item.schoolName && isEdit" color="#999999" name="arrow-down" />
             </view>
           </view>
           <view class="school-information-item">
-            <view class="school-label" >初赛人数预估</view>
+            <view class="school-label">初赛人数预估</view>
             <view class="school-content">
-              <view v-if="!isEdit" class="school-content-input" >{{item.numberPeople}}</view>
+              <view v-if="!isEdit" class="school-content-input">{{
+                item.totalPerson
+              }}</view>
               <input
                 v-else
                 class="school-content-input"
                 placeholder="请输入参赛人员数"
                 :placeholder-style="placeholderStyle"
-                :value="item.numberPeople"
-                @input="changeForm($event, item.index, 'numberPeople')"
+                :value="item.totalPerson"
+                @input="changeForm($event, index, 'totalPerson')"
               />
             </view>
           </view>
         </view>
       </view>
     </view>
-    <view class="add-school-button"  v-if="isEdit" @click="addSchool" >
-      <view class="school-add-button" >
+    <view class="add-school-button" v-if="isEdit" @click="addSchool">
+      <view class="school-add-button">
         <image class="plus-icon" :src="staticImg.plusIcon" />
         <text>添加参赛园所</text>
         <van-icon color="#4679FF" name="arrow" />
@@ -63,72 +73,109 @@
     </view>
 
     <!-- 编辑与保存按钮 -->
-    <view class="opration-buttons" >
-      <view class="cancel-button" @click="cancelOpration" >取消</view>
-      <view 
+    <view class="opration-buttons">
+      <view class="cancel-button" @click="cancelOpration">返回</view>
+      <view
         :class="['opration-button', isEdit ? 'bg-b' : 'bg-r']"
         @click="changeOprationState"
-      > 
-        {{ isEdit ? '保存' : '编辑'}} 
+      >
+        {{ isEdit ? "保存" : "编辑" }}
       </view>
     </view>
   </view>
 </template>
 
 <script>
-
 const staticImg = {
-  closeIcon: require('@/static/competitionRegister/common/close-icon.png'),
-  deleteIcon: require('@/static/competitionRegister/common/delete-icon.png'),
-  plusIcon: require('@/static/competitionRegister/common/plus-icon.png')
-}
+  closeIcon: require("@/static/competitionRegister/common/close-icon.png"),
+  deleteIcon: require("@/static/competitionRegister/common/delete-icon.png"),
+  plusIcon: require("@/static/competitionRegister/common/plus-icon.png"),
+};
 export default {
-  name: 'add-school',
+  name: "add-school",
   computed: {
-    placeholderStyle () {
+    placeholderStyle() {
       return `font-size: 30rpx;
               font-family: PingFangSC-Regular, PingFang SC;
               font-weight: 400;
-              color: #D1D1D1;`
-    }
+              color: #D1D1D1;`;
+    },
   },
-  data () {
+  data() {
     return {
       staticImg,
-      isEdit: false, //是否是编辑状态
+      isEdit: true, //是否是编辑状态
       schoolList: [],
       form: {
-        schoolName: '',
-        numberPeople: ''
-      }
-    }
+        schoolName: "",
+        totalPerson: "",
+      },
+    };
+  },
+  onLoad() {
+    uni.getStorage({
+      key: "schoolList",
+      success: (res) => {
+        this.schoolList = res.data;
+      },
+      fail: (res) => {
+        console.log(res, "fail");
+        this.addSchool();
+      },
+    });
   },
   methods: {
-    cancelOpration () {
-      this.isEdit = false
+    handleDelete(index) {
+      this.schoolList.splice(index, 1);
+    },
+    cancelOpration() {
       uni.navigateBack({
-        delta: 1
-      })
+        delta: 1,
+      });
+      // uni.getStorage({
+      //   key: "schoolList",
+      //   success: (res) => {
+      //     this.schoolList = res.data;
+      //   },
+      //   fail: (res) => {
+      //     console.log(res, "fail");
+      //     this.schoolList = [];
+      //   },
+      // });
     },
-    changeOprationState () {
-      this.isEdit = !this.isEdit
+    changeOprationState() {
+      this.isEdit = !this.isEdit;
+      if (!this.isEdit) {
+        uni.setStorage({
+          key: "schoolList",
+          data: this.schoolList,
+          success: () => {
+            console.log("schoolList保存成功");
+          },
+        });
+      }
     },
-    addSchool () {
-      this.schoolList.push( JSON.parse(JSON.stringify({
-        ...this.form,
-        index: this.schoolList.length 
-      })) )
+    addSchool() {
+      const time = new Date().getTime();
+      console.log(time, "time");
+      this.schoolList.push(
+        JSON.parse(
+          JSON.stringify({
+            ...this.form,
+            code: time,
+          })
+        )
+      );
     },
-    restForm (index, key) {
-      this.schoolList[index][key] = ''
+    restForm(index, key) {
+      this.schoolList[index][key] = "";
     },
-    changeForm (e, index, key) {
-      console.log(e, index, key);
-      const value = e.detail.value
-      this.schoolList[index][key] = value
-    }
-  }
-}
+    changeForm(e, index, key) {
+      const value = e.detail.value;
+      this.schoolList[index][key] = value;
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
@@ -141,7 +188,7 @@ export default {
     box-sizing: border-box;
     .school-card {
       width: 686rpx;
-      background: #FFFFFF;
+      background: #ffffff;
       box-shadow: 0rpx 0rpx 44rpx 0rpx rgba(226, 226, 226, 0.58);
       border-radius: 20rpx;
       margin-bottom: 48rpx;
@@ -153,10 +200,10 @@ export default {
         display: flex;
         justify-content: flex-end;
         align-items: center;
-        border-bottom: 2px solid #EEE;
+        border-bottom: 2px solid #eee;
         .delete-icon {
           width: 24rpx;
-          height: 24rpx; 
+          height: 24rpx;
         }
       }
       .school-information {
@@ -191,35 +238,34 @@ export default {
               display: block;
             }
           }
-          
         }
       }
     }
   }
 
   .add-school-button {
-      .school-add-button {
-        width: 686rpx;
-        height: 108rpx;
-        border-radius: 20rpx;
-        border: 4rpx dashed rgba(0, 91, 255, 0.3);
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        margin: 0 auto;
-        .plus-icon {
-          width: 42rpx;
-          height: 40rpx;
-        }
-        text {
-          font-size: 34rpx;
-          font-family: PingFangSC-Regular, PingFang SC;
-          font-weight: 400;
-          color: #4679FF;
-          margin-left: 20rpx;
-          margin-right: 12rpx;
-        }
+    .school-add-button {
+      width: 686rpx;
+      height: 108rpx;
+      border-radius: 20rpx;
+      border: 4rpx dashed rgba(0, 91, 255, 0.3);
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      margin: 0 auto;
+      .plus-icon {
+        width: 42rpx;
+        height: 40rpx;
       }
+      text {
+        font-size: 34rpx;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #4679ff;
+        margin-left: 20rpx;
+        margin-right: 12rpx;
+      }
+    }
   }
 
   .opration-buttons {
@@ -236,8 +282,8 @@ export default {
       width: 318rpx;
       height: 90rpx;
       border-radius: 84rpx;
-      border: 2rpx solid #B4B4B4;
-      background-color: #FBFCFE;;
+      border: 2rpx solid #b4b4b4;
+      background-color: #fbfcfe;
       display: flex;
       justify-content: center;
       align-items: center;
@@ -245,7 +291,7 @@ export default {
       font-family: PingFangSC-Medium, PingFang SC;
       font-weight: 500;
       color: #999999;
-    } 
+    }
 
     .opration-button {
       width: 318rpx;
@@ -257,17 +303,16 @@ export default {
       font-size: 32rpx;
       font-family: PingFangSC-Medium, PingFang SC;
       font-weight: 500;
-      color: #FFFFFF;
+      color: #ffffff;
     }
 
     .bg-b {
-      background: #507BFC;
+      background: #507bfc;
     }
 
     .bg-r {
-      background: #FF7E8A;
+      background: #ff7e8a;
     }
-
   }
 }
 </style>

+ 364 - 137
src/pages/competitionRegister/collectInformation.vue

@@ -1,81 +1,80 @@
 <template>
-  <view class="collect-information" >
-    
+  <view class="collect-information">
     <step-register />
 
     <!-- 地区负责人信息 (づ ̄3 ̄)づ╭~ -->
-    <view class="area-principal-information" >
-      <view class="information-title" >
-        地区负责人信息(承办人)
-      </view>
-      <view class="information-form" >
-        <view class="information-form-item" >
-          <view class="information-form-label" >承办地区</view>
+    <view class="area-principal-information">
+      <view class="information-title"> 地区负责人信息(承办人) </view>
+      <view class="information-form">
+        <view class="information-form-item">
+          <view class="information-form-label">承办地区</view>
           <view class="information-form-filed">
-            <view class="filed-input-view" 
-              @click="selectArea"
-            >
+            <view class="filed-input-view" @click="selectArea">
               <text
-                :class="[form.address.startsWith('请')? `placeholder-class` : 'select-after-text text-Ellipsis']"
+                :class="[
+                  form.district.startsWith('请')
+                    ? `placeholder-class`
+                    : 'select-after-text text-Ellipsis',
+                ]"
                 style="width: 438rpx"
               >
-                {{form.address}}
+                {{ form.district }}
               </text>
               <van-icon name="arrow-down" />
             </view>
           </view>
         </view>
-        <view class="information-form-item" >
-          <view class="information-form-label" >详细地址 </view>
-          <view class="information-form-filed" >
+        <view class="information-form-item">
+          <view class="information-form-label">详细地址 </view>
+          <view class="information-form-filed">
             <input
-              class="filed-input" 
+              class="filed-input"
               placeholder="选填"
               placeholder-class="placeholder-class"
               :value="form.detailAddress"
               @input="(e) => changeForm(e, 'detailAddress')"
             />
             <image
-              class="close-icon" 
+              class="close-icon"
               :src="staticImg.closeIcon"
               v-if="form.detailAddress"
               @click="clearFormItem('detailAddress')"
             />
           </view>
         </view>
-        <view class="information-form-item" >
-          <view class="information-form-label" >承办单位</view>
-          <view class="information-form-filed" >
-            <input 
-              class="filed-input" 
-              placeholder="请输入承办单位" 
+        <view class="information-form-item">
+          <view class="information-form-label">承办单位</view>
+          <view class="information-form-filed">
+            <input
+              class="filed-input"
+              placeholder="请输入承办单位"
               placeholder-class="placeholder-class"
-              :value="form.organizer"
-              @input="(e) => changeForm(e, 'organizer')"
+              :value="form.unit"
+              @input="(e) => changeForm(e, 'unit')"
             />
             <image
-              class="close-icon" 
+              class="close-icon"
               :src="staticImg.closeIcon"
-              v-if="form.organizer"
-              @click="clearFormItem('organizer')" 
+              v-if="form.unit"
+              @click="clearFormItem('unit')"
             />
           </view>
         </view>
-        <view class="information-form-item" >
-          <view class="information-form-label" >承办人</view>
-          <view class="information-form-filed" >
-            <input 
-              class="filed-input" 
-              placeholder="请输入承办人姓名" 
+        <view class="information-form-item">
+          <view class="information-form-label">承办人</view>
+          <view class="information-form-filed">
+            <input
+              class="filed-input"
+              placeholder="请输入承办人姓名"
               placeholder-class="placeholder-class"
-              :value="form.undertaker"
-              @input="(e) => changeForm(e, 'undertaker')" 
+              :value="form.unitPrincipal"
+              @input="(e) => changeForm(e, 'unitPrincipal')"
             />
-             <image
-              class="close-icon" 
+            <image
+              class="close-icon"
               :src="staticImg.closeIcon"
-              v-if="form.undertaker"
-              @click="clearFormItem('undertaker')" 
+              v-if="form.unitPrincipal"
+              @click="clearFormItem('unitPrincipal')"
             />
           </view>
         </view>
@@ -83,128 +82,265 @@
     </view>
 
     <!-- 参赛园所信息 -->
-    <view class="school-information" >
-      <view class="information-title" >
-        参赛园所信息
-      </view>
-      <view class="school-add-area" >
-        <view class="school-add-button" >
+    <view class="school-information" @click="handleGoSchoolInfo">
+      <view class="information-title"> 参赛园所信息 </view>
+      <view v-if="form.schoolList.length === 0" class="school-add-area">
+        <view class="school-add-button">
           <image class="plus-icon" :src="staticImg.plusIcon" />
           <text>添加参赛园所</text>
-          <van-icon color="#4679FF" name="arrow" />
+          <image class="plus-arrow" :src="staticImg.arrow" />
+        </view>
+      </view>
+      <view v-else class="school-have-area">
+        <view class="school-add-button">
+          <image class="plus-icon" :src="staticImg.plusIcon" />
+          <text>参赛园所({{ form.schoolList.length }})</text>
+          <image class="plus-arrow" :src="staticImg.arrow" />
         </view>
       </view>
     </view>
 
     <!-- 预定物料包数量 -->
-    <view class="pre-material-package" >
-      <view class="information-title pre-material-package-title" >
-        预定物料包数量 <view class="tip" >(50套起订) </view>
+    <view class="pre-material-package">
+      <view class="information-title pre-material-package-title">
+        预定物料包数量 <view class="tip">(50套起订) </view>
       </view>
-      <view class="material-package-information" >
-        <view 
-          class="material-package-item" 
-          v-for="material in form.materialList" 
-          :key="material.name"
+      <view class="material-package-information">
+        <view
+          class="material-package-item"
+          v-for="material in form.materialList"
+          :key="material.materialName"
         >
           <view class="material-package-item-label">
-            <van-checkbox :value="true" shape="square" @change="onChange">
-              <view class="material-package-item-label-left" >
-                <view class="label-prefix" >赛事标准物料包</view><view class="clazz" >({{material.name}})</view>
+            <van-checkbox
+              :value="material.isShow"
+              shape="square"
+              @change="onChange(material.materialName)"
+            >
+              <view class="material-package-item-label-left">
+                <view class="label-prefix">赛事标准物料包</view
+                ><view class="clazz">({{ material.materialName }})</view>
               </view>
             </van-checkbox>
           </view>
-          <view class="material-count" >
-            <input class="material-input" type="number" :min="50" :value="material.count" /> 套
+          <view v-if="material.isShow" class="material-count">
+            <input
+              class="material-input"
+              type="number"
+              :min="50"
+              :value="material.number"
+              @blur="handleInputBlur(material, $event.target.value)"
+            />
+            套
           </view>
         </view>
       </view>
     </view>
 
-    <step-tabbar />
+    <step-tabbar
+      :totalSchool="totalSchool"
+      :totalPeople="totalPeople"
+      :submitIsShow="submitIsShow"
+      @handleSubmit="submitAgentRegister"
+    />
 
     <!-- 地区选择 -->
     <van-action-sheet
-     class="area-picker"
-     :show="showAreaPicker"
-     @click-overlay="showAreaPicker = false"
+      class="area-picker"
+      :show="showAreaPicker"
+      @click-overlay="showAreaPicker = false"
     >
-      <van-area 
+      <van-area
         :area-list="areaList"
+        :value="code"
         @confirm="confirmArea"
         @cancel="cancelArea"
       />
     </van-action-sheet>
 
-  </view> 
+    <!-- 提交成功弹窗 -->
+    <van-overlay :show="show" @click="handleReturnHome">
+      <view class="wrapper" @click.stop>
+        <view class="block">
+          <image
+            :src="staticImg.closeBtn"
+            class="closeBtn"
+            @click="handleReturnHome"
+          />
+          <image :src="staticImg.submitSucess" class="submitSucess" />
+          <view class="promptText">参与信息提交完成!</view>
+          <view class="returnHome" @click="handleReturnHome">返回首页</view>
+        </view>
+      </view>
+    </van-overlay>
+  </view>
 </template>
 
 <script>
-import StepRegister from './component/step-register.vue'
-import StepTabbar from './component/step-tabbar.vue'
-import { areaList } from '@vant/area-data'
+import { submitAgentRegister } from "@/api/competition.js";
+import StepRegister from "./component/step-register.vue";
+import StepTabbar from "./component/step-tabbar.vue";
+import { areaList } from "@vant/area-data";
+import Tip from "@/utils/tip.js";
 
 const staticImg = {
-  closeIcon: require('@/static/competitionRegister/common/close-icon.png'),
-  plusIcon: require('@/static/competitionRegister/common/plus-icon.png')
-}
+  closeIcon: require("@/static/competitionRegister/common/close-icon.png"),
+  plusIcon: require("@/static/competitionRegister/common/plus-icon.png"),
+  submitSucess: require("@/static/competitionRegister/common/submitSucess.png"),
+  closeBtn: require("@/static/competitionRegister/common/closeBtn.png"),
+  arrow: require("@/static/competitionRegister/common/arrow.png"),
+};
 
 export default {
-  name: 'collect-information', 
+  name: "collect-information",
   components: {
     StepRegister,
-    StepTabbar
-  },
-  computed: {
+    StepTabbar,
   },
-  data () {
+  data() {
     return {
+      show: false, // 提交成功弹窗
       showAreaPicker: false,
       staticImg,
       areaList: Object.freeze(areaList),
       form: {
-        address: '请选择所在地区',
-        detailAddress: '',
-        organizer: '',
-        undertaker: '',
+        district: "请选择所在地区",
+        detailAddress: "",
+        unit: "",
+        unitPrincipal: "",
         materialList: [
-          {name: "小班", count: 50},
-          {name: "中班", count: 50},
-          {name: "大班", count: 50},
-        ]
+          { id: 1, materialName: "小班", number: 50, isShow: true },
+          { id: 2, materialName: "中班", number: 50, isShow: true },
+          { id: 3, materialName: "大班", number: 50, isShow: true },
+        ],
+        schoolList: [],
+      },
+      competitionId: "",
+    };
+  },
+  computed: {
+    submitIsShow() {
+      let state = false;
+      if (
+        this.form.district !== "请选择所在地区" &&
+        this.form.unit !== "" &&
+        this.form.unitPrincipal !== "" &&
+        this.form.schoolList.length !== 0
+      ) {
+        state = true;
       }
-    }
+      return state;
+    },
+    totalSchool() {
+      return this.form.schoolList.length || 0;
+    },
+    totalPeople() {
+      let count = 0;
+      this.form.schoolList.forEach((item) => {
+        count += item.totalPerson * 1;
+      });
+      return count;
+    },
+  },
+  onLoad(options) {
+    this.competitionId = options.competitionId;
   },
-  created () {
+  onShow() {
+    uni.getStorage({
+      key: "schoolList",
+      success: (res) => {
+        this.$set(this.form, "schoolList", res.data);
+      },
+      fail: (res) => {
+        console.log(res, "fail");
+      },
+    });
   },
   methods: {
-    clearFormItem (key) {
-      this.form[key] = ''
+    // 去添加园所
+    handleGoSchoolInfo() {
+      uni.navigateTo({
+        url: `/pages/competitionRegister/addSchool`,
+      });
+    },
+    // 预料包数量小于50时,强制改成50
+    handleInputBlur(material, value) {
+      if (value * 1 < 50) {
+        // this.$set(this.form.materialList[material.id - 1], "number", 50);
+        this.form.materialList[material.id - 1].number = 50;
+        this.form.materialList[material.id - 1].isShow = false;
+        this.$nextTick(() => {
+          this.form.materialList[material.id - 1].isShow = true;
+        });
+      }
+    },
+    // 返回首页
+    handleReturnHome() {
+      uni.reLaunch({
+        url: "/pages/user/index",
+      });
+      this.show = false;
     },
-    changeForm (e, key) {
+    onChange(val) {
+      this.form.materialList.forEach((item) => {
+        if (item.materialName === val) item.isShow = !item.isShow;
+      });
+    },
+    // 提交海选报名
+    async submitAgentRegister() {
+      const materialList = this.form.materialList.filter((item) => {
+        if (item.isShow) {
+          return item;
+        }
+      });
+      const params = {
+        ...this.form,
+        materialList,
+        competitionChildId: this.competitionId,
+      };
+      const { data, msg, status } = await submitAgentRegister(params);
+      if (status === 200) {
+        this.show = true;
+        uni.removeStorage({
+          key: "schoolList",
+          success: function (res) {
+            console.log("已经移除内存中的schoolList");
+          },
+        });
+      } else {
+        Tip.error(msg);
+      }
+    },
+    // 清空表单项
+    clearFormItem(key) {
+      this.form[key] = "";
+    },
+    // 改变表单项
+    changeForm(e, key) {
       console.log(e, key);
-      const value = e.detail.value
-      this.form[key] = value
+      const value = e.detail.value;
+      this.form[key] = value;
     },
-    cancelArea () {
-      this.showAreaPicker = false
+    // 取消地区
+    cancelArea() {
+      this.showAreaPicker = false;
     },
-    
-    confirmArea (e) {
-      const { values, code } = e.detail
-      this.form.address = values.map( item => item.name ).join('')
-      this.showAreaPicker = false
+    // 确认地区
+    confirmArea(e) {
+      const { values } = e.detail;
+      this.form.district = values.map((item) => item.name).join(",");
+      this.showAreaPicker = false;
     },
-    selectArea () {
-      this.showAreaPicker = !this.showAreaPicker
-    }
-
-  }
-}
+    // 选择地区
+    selectArea() {
+      this.showAreaPicker = !this.showAreaPicker;
+    },
+  },
+};
 </script>
 
 <style lang="less">
-@import '@/utils/utils.less';
+@import "@/utils/utils.less";
 
 .collect-information {
   padding-bottom: 200rpx;
@@ -225,17 +361,17 @@ export default {
           color: #666666;
         }
         .information-form-filed {
-            width: 530rpx;
-            height: 88rpx;
-            background: #FFFFFF;
-            box-shadow: 0rpx 0rpx 44rpx 0rpx rgba(226, 226, 226, 0.58);
-            border-radius: 20rpx;
-            padding-left: 32rpx;
-            padding-right: 32rpx;
-            box-sizing: border-box;
-            display: flex;
-            justify-content: space-between;
-            align-items: center;
+          width: 530rpx;
+          height: 88rpx;
+          background: #ffffff;
+          box-shadow: 0rpx 0rpx 44rpx 0rpx rgba(226, 226, 226, 0.58);
+          border-radius: 20rpx;
+          padding-left: 32rpx;
+          padding-right: 32rpx;
+          box-sizing: border-box;
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
           .filed-input-view {
             height: 88rpx;
             box-sizing: border-box;
@@ -258,7 +394,7 @@ export default {
             font-size: 30rpx;
             font-family: PingFangSC-Regular, PingFang SC;
             font-weight: 400;
-            color: #D1D1D1;
+            color: #d1d1d1;
           }
           .select-after-text {
             font-size: 30rpx;
@@ -287,21 +423,59 @@ export default {
         .plus-icon {
           width: 42rpx;
           height: 40rpx;
+          object-fit: cover;
+        }
+        .plus-arrow {
+          width: 18rpx;
+          height: 28rpx;
+          object-fit: cover;
         }
         text {
+          margin-left: 20rpx;
+          margin-right: 10rpx;
+          height: 34rpx;
+          line-height: 34rpx;
           font-size: 34rpx;
           font-family: PingFangSC-Regular, PingFang SC;
           font-weight: 400;
-          color: #4679FF;
-          margin-left: 20rpx;
-          margin-right: 12rpx;
+          color: #4679ff;
+        }
+      }
+    }
+    .school-have-area {
+      .school-add-button {
+        width: 686rpx;
+        height: 108rpx;
+        border-radius: 20rpx;
+        background: #ffffff;
+        box-shadow: 0px 0px 22px 0px rgba(226, 226, 226, 0.58);
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        .plus-icon {
+          width: 42rpx;
+          height: 40rpx;
+          object-fit: cover;
+        }
+        .plus-arrow {
+          width: 18rpx;
+          height: 28rpx;
+          object-fit: cover;
+        }
+        text {
+          margin-left: 22rpx;
+          height: 34rpx;
+          line-height: 34rpx;
+          font-size: 34rpx;
+          font-family: PingFangSC-Regular, PingFang SC;
+          font-weight: 400;
+          color: #4679ff;
         }
       }
     }
   }
 
   .pre-material-package {
-    
     margin-top: 60rpx;
     padding: 0 32rpx;
     box-sizing: border-box;
@@ -314,22 +488,23 @@ export default {
         font-size: 30rpx;
         font-family: PingFangSC-Regular, PingFang SC;
         font-weight: 400;
-        color: #FE6573;
+        color: #fe6573;
       }
     }
     .material-package-information {
       width: 686rpx;
       height: 300rpx;
-      background: #FFFFFF;
+      background: #ffffff;
       box-shadow: 0rpx 0rpx 44rpx 0rpx rgba(226, 226, 226, 0.58);
       border-radius: 20rpx;
       padding: 34rpx 30rpx;
       box-sizing: border-box;
-      .material-package-item  {
+      .material-package-item {
         display: flex;
         justify-content: space-between;
         align-items: center;
         margin-bottom: 20rpx;
+        height: 64rpx;
         .material-package-item-label {
           display: flex;
           .material-package-item-label-left {
@@ -343,7 +518,7 @@ export default {
               margin-right: 10rpx;
             }
             .clazz {
-              color: #5F87F0;
+              color: #5f87f0;
             }
           }
         }
@@ -354,7 +529,7 @@ export default {
             width: 120rpx;
             height: 64rpx;
             border-radius: 10rpx;
-            border: 2rpx solid #E3E3E3;
+            border: 2rpx solid #e3e3e3;
             margin-right: 14rpx;
             text-align: center;
           }
@@ -364,18 +539,70 @@ export default {
   }
 
   .information-title {
-      font-size: 44rpx;
-      font-family: PingFangSC-Semibold, PingFang SC;
-      font-weight: 600;
-      color: #333333;
-      margin-bottom: 40rpx;
+    font-size: 44rpx;
+    font-family: PingFangSC-Semibold, PingFang SC;
+    font-weight: 600;
+    color: #333333;
+    margin-bottom: 40rpx;
   }
 
   .area-picker {
-      width: 100vw;
+    width: 100vw;
   }
-
 }
-</style>
 
+.wrapper {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  height: 100vh;
+}
 
+.block {
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  position: relative;
+  margin-top: -100rpx;
+  width: 686rpx;
+  height: 576rpx;
+  background: #ffffff;
+  border-radius: 20rpx;
+  .closeBtn {
+    position: absolute;
+    top: 40rpx;
+    right: 40rpx;
+    width: 24rpx;
+    height: 24rpx;
+    object-fit: cover;
+  }
+  .submitSucess {
+    width: 334rpx;
+    height: 336rpx;
+    object-fit: cover;
+  }
+  .promptText {
+    width: 234rpx;
+    height: 36rpx;
+    font-size: 26rpx;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #333333;
+    line-height: 36rpx;
+  }
+  .returnHome {
+    margin-top: 32rpx;
+    width: 278rpx;
+    height: 90rpx;
+    line-height: 90rpx;
+    font-size: 32rpx;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 500;
+    color: #ffffff;
+    background: linear-gradient(130deg, #466efc 0%, #84bdfc 100%);
+    border-radius: 84rpx;
+    text-align: center;
+  }
+}
+</style>

+ 58 - 40
src/pages/competitionRegister/component/step-register.vue

@@ -1,26 +1,31 @@
 <template>
-  <view class="step-register" >
+  <view class="step-register">
     <image class="competition-title" :src="staticImg.competitionTitle" />
-    <view  class="step-line" >
-
-      <view class="dashed-line-list" >
-        <view class="dashed-line" style="width: 172rpx" />
-        <view class="dashed-line" style="width: 234rpx" />
+    <view class="step-line">
+      <view class="dashed-line-list">
         <view class="dashed-line" style="width: 172rpx" />
+        <view
+          :class="['dashed-line', isStepOne ? 'op3' : '']"
+          style="width: 234rpx"
+        />
+        <view
+          :class="['dashed-line', isStepOne ? 'op3' : '']"
+          style="width: 172rpx"
+        />
       </view>
 
       <view class="step-title-list">
-        <view class="step-one" >
-          <view  class="red-circle">
+        <view class="step-one">
+          <view class="red-circle">
             <view class="red-dot" />
           </view>
-          <view class="step-title" >1.签署纲领</view>
+          <view class="step-title">1.签署纲领</view>
         </view>
-        <view class="step-two" >
+        <view :class="['step-two', isStepOne ? 'op3' : '']">
           <view class="red-circle">
             <view class="red-dot" />
           </view>
-          <view class="step-title" >2.填写信息</view>
+          <view class="step-title">2.填写信息</view>
         </view>
       </view>
     </view>
@@ -28,19 +33,24 @@
 </template>
 
 <script>
-
 const staticImg = {
-  competitionTitle: require('@/static/competitionRegister/common/competition-title.png')
-}
+  competitionTitle: require("@/static/competitionRegister/common/competition-title.png"),
+};
 
 export default {
-  name: 'step-register',
-  data () {
+  name: "step-register",
+  props: {
+    isStepOne: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
     return {
-      staticImg
-    }
-  }
-}
+      staticImg,
+    };
+  },
+};
 </script>
 
 <style lang="less" scoped>
@@ -66,12 +76,17 @@ export default {
       align-items: center;
       .dashed-line {
         height: 4rpx;
-        background-image: linear-gradient(to right, red 0%, red 50%, transparent 0%);
+        background-image: linear-gradient(
+          to right,
+          red 0%,
+          red 50%,
+          transparent 0%
+        );
         background-size: 20rpx 1rpx;
         background-repeat: repeat-x;
       }
     }
-    
+
     .step-title-list {
       width: 100vw;
       position: relative;
@@ -79,7 +94,7 @@ export default {
       font-size: 24rpx;
       font-family: PingFangSC-Semibold, PingFang SC;
       font-weight: 600;
-      color: #FF6271;
+      color: #ff6271;
       .step-one {
         width: 112rpx;
         position: absolute;
@@ -91,9 +106,9 @@ export default {
         align-items: center;
       }
       .step-title {
-        white-space:nowrap; 
-        overflow:hidden; 
-        text-overflow:ellipsis; 
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
       }
       .step-two {
         position: absolute;
@@ -107,25 +122,28 @@ export default {
       }
 
       .red-circle {
-          width: 36rpx;
-          height: 36rpx;
-          background: #FFFFFF;
+        width: 36rpx;
+        height: 36rpx;
+        background: #ffffff;
+        border-radius: 50%;
+        border: 2rpx solid #ff7e8a;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        margin-bottom: 10rpx;
+        .red-dot {
+          width: 24rpx;
+          height: 24rpx;
           border-radius: 50%;
-          border: 2rpx solid #FF7E8A;
-          display: flex;
-          justify-content: center;
-          align-items: center;
-          margin-bottom: 10rpx;
-          .red-dot {
-            width: 24rpx;
-            height: 24rpx;
-            border-radius: 50%;
-            background: #FF7E8A;
-          }
+          background: #ff7e8a;
         }
+      }
     }
   }
 }
+.op3 {
+  opacity: 0.3;
+}
 </style>
 
 整个世界都在用

+ 76 - 35
src/pages/competitionRegister/component/step-tabbar.vue

@@ -1,44 +1,90 @@
 <template>
   <view class="step-tabbar">
-    <view class="total-statistics" >
-      <text v-show="!isStepOne" >
-        <view class="total-school" >
-          合计参赛园所: <text class="count" >0</text>
-        </view>
-        <view class="total-people" >
-          合计初赛人数预估: <text class="count" >0</text>
-        </view>
-      </text>
+    <view class="total-statistics">
+      <view v-show="!isStepOne" class="total-school">
+        合计参赛园所:<text class="count">{{ totalSchool }}</text>
+      </view>
+      <view v-show="!isStepOne" class="total-people">
+        合计初赛人数预估:<text class="count">{{ totalPeople }}</text>
+      </view>
     </view>
-    <view class="next-button" >
-      <image class="next-icon" :src="staticImg.backIconO"  />
-      <view :class="['button', isStepOne? 'bgc-0': 'bgc']" >
-        {{isStepOne ?  '下一步' : '提交' }}
+    <view class="next-button">
+      <image
+        class="next-icon"
+        :src="isStepOne ? staticImg.backIconO : staticImg.backIcon"
+        @click="handleReturn"
+      />
+      <view
+        :class="['button', submitIsShow ? 'bgc-0' : 'bgc']"
+        @click="isStepOne ? handleNext() : handleSubmit()"
+      >
+        {{ isStepOne ? "下一步" : "提交" }}
       </view>
     </view>
   </view>
 </template>
 
 <script>
-
 const staticImg = {
-  backIconO: require('@/static/competitionRegister/common/back-icon-o.png')
-}
+  backIconO: require("@/static/competitionRegister/common/back-icon-o.png"),
+  backIcon: require("@/static/competitionRegister/common/back-icon.png"),
+};
 
 export default {
-  name: 'step-tabbar',
+  name: "step-tabbar",
   props: {
+    // 是否是第一步
     isStepOne: {
       type: Boolean,
-      default: false
-    }
+      default: false,
+    },
+    // 按钮背景
+    submitIsShow: {
+      type: Boolean,
+      default: false,
+    },
+    // 参赛园所总数
+    totalSchool: {
+      type: [String, Number],
+      default: 0,
+    },
+    // 预计参加人数
+    totalPeople: {
+      type: [String, Number],
+      default: 0,
+    },
+    // 赛事id
+    competitionId: {
+      type: [String, Number],
+      default: "",
+    },
   },
-  data () {
+  data() {
     return {
-      staticImg
-    }
-  }
-}
+      staticImg,
+    };
+  },
+  methods: {
+    // 返回上一步
+    handleReturn() {
+      if (!this.isStepOne) {
+        uni.navigateBack({
+          delta: 1,
+        });
+      }
+    },
+    // 下一步
+    handleNext() {
+      uni.navigateTo({
+        url: `/pages/competitionRegister/collectInformation?competitionId=${this.competitionId}`,
+      });
+    },
+    // 提交
+    handleSubmit() {
+      if (this.submitIsShow) this.$emit("handleSubmit");
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
@@ -50,7 +96,7 @@ export default {
   left: 0;
   height: calc(116rpx + constant(safe-area-inset-bottom));
   height: calc(116rpx + env(safe-area-inset-bottom));
-  background: #FFFFFF;
+  background: #ffffff;
   box-shadow: 0rpx -14rpx 20rpx 0rpx rgba(152, 152, 152, 0.05);
   border-radius: 40rpx 40rpx 0rpx 0rpx;
   display: flex;
@@ -63,17 +109,11 @@ export default {
     font-family: PingFangSC-Regular, PingFang SC;
     font-weight: 400;
     color: #666666;
-    .total-school {
-
-    }
-    .total-people {
-
-    }
     .count {
       font-size: 30rpx;
       font-family: PingFangSC-Semibold, PingFang SC;
       font-weight: 600;
-      color: #4E78FC;
+      color: #4e78fc;
     }
   }
 
@@ -82,6 +122,7 @@ export default {
     .next-icon {
       width: 84rpx;
       height: 84rpx;
+      object-fit: cover;
     }
     .button {
       width: 220rpx;
@@ -93,16 +134,16 @@ export default {
       font-size: 34rpx;
       font-family: PingFangSC-Medium, PingFang SC;
       font-weight: 500;
-      color: #FFFFFF;
+      color: #ffffff;
       margin-left: 20rpx;
     }
 
     .bgc-0 {
-      background: linear-gradient(130deg, #466EFC 0%, #84BDFC 100%);
+      background: linear-gradient(130deg, #466efc 0%, #84bdfc 100%);
     }
 
     .bgc {
-      background: linear-gradient(130deg, #466EFC 0%, #84BDFC 100%);
+      background: linear-gradient(130deg, #466efc 0%, #84bdfc 100%);
       opacity: 0.4;
     }
   }

+ 85 - 39
src/pages/competitionRegister/index.vue

@@ -1,70 +1,117 @@
 <template>
   <view class="competition-register">
-
     <!-- 注册步骤条 -->
-    <step-register />
+    <step-register isStepOne />
 
-    <view class="program-text" >
-      <view class="program-title" >
-        签署纲领
-      </view>
-      <view class="program-content" >
+    <view class="program-text">
+      <view class="program-title"> 签署纲领 </view>
+      <view class="program-content">
         联系在线客服,下载第17届“逻辑狗杯”全国儿童思维魔法嘉年华《共同行动纲领》,在线下载-打印-签署、盖章-邮寄。
       </view>
     </view>
 
     <!-- 邮寄地址 -->
-    <view class="express-adress" >
-      <view class="express-adress-header" >
-        <view class="express-adress-text" >邮寄地址</view>
-        <view class="copy-button" >
+    <view class="express-adress">
+      <view class="express-adress-header">
+        <view class="express-adress-text">邮寄地址</view>
+        <view class="copy-button" @click="setClipboardData">
           <image class="copy-icon" :src="staticImg.copyIcon" />
-          <view class="copy-text" >一键复制</view>
+          <view class="copy-text">一键复制</view>
         </view>
       </view>
-      <view class="express-adress-content" >
+      <view class="express-adress-content">
         <view class="express-adress-content-item">
-          <view class="title" >收件人:</view>
-          <view class="content" >第17届“逻辑狗杯”全国儿童思维魔法嘉年华组委会</view>
+          <view class="title">收件人:</view>
+          <view class="content">{{ addressInfo["收件人:"] }}</view>
         </view>
         <view class="express-adress-content-item">
-          <view class="title" >联系电话:</view>
-          <view class="content" >17800151521</view>
+          <view class="title">联系电话:</view>
+          <view class="content">{{ addressInfo["联系电话:"] }}</view>
         </view>
         <view class="express-adress-content-item">
-          <view class="title" >收货地址:</view>
-          <view class="content" >北京市朝阳区高碑店西店记忆中德智慧教育E6102室</view>
+          <view class="title">收货地址:</view>
+          <view class="content">{{ addressInfo["收货地址:"] }}</view>
         </view>
       </view>
     </view>
-    <view class="customer-service" >
-      在线领取
+    <view class="customer-service" @click="handlePickUp"
+      >下载《共同行动纲领》
     </view>
 
-    <step-tabbar 
-      isStepOne
-    />
+    <step-tabbar isStepOne submitIsShow :competitionId="competitionId" />
   </view>
 </template>
 
 <script>
-import StepRegister from "./component/step-register.vue"
+import { getAgentProgramAddress } from "@/api/competition.js";
+import Tip from "@/utils/tip.js";
+import StepRegister from "./component/step-register.vue";
 import StepTabbar from "./component/step-tabbar.vue";
 const staticImg = {
-  copyIcon: require('@/static/competitionRegister/index/copy-button.png')
-}
+  copyIcon: require("@/static/competitionRegister/index/copy-button.png"),
+};
+
 export default {
-  name: 'competition-register',
+  name: "competition-register",
   components: {
     StepRegister,
-    StepTabbar
+    StepTabbar,
   },
-  data () {
+  data() {
     return {
-      staticImg
-    }
-  }
-}
+      addressInfo: {
+        "收件人:": "第17届“逻辑狗杯”全国儿童思维魔法嘉年华组委会",
+        "联系电话:": "17800151521",
+        "收货地址:": "北京市朝阳区高碑店西店记忆中德智慧教育E6102室",
+      },
+      staticImg,
+      competitionId: "",
+    };
+  },
+  onLoad(options) {
+    this.competitionId = options.competitionId;
+    this.getAgentProgramAddress();
+  },
+  methods: {
+    async getAgentProgramAddress() {
+      const { data, msg, status } = await getAgentProgramAddress();
+      if (status == 200) {
+        this.addressInfo["收件人:"] = data.recipient;
+        this.addressInfo["联系电话:"] = data.phone;
+        this.addressInfo["收货地址:"] = data.address;
+      } else {
+        Tip.error(msg);
+      }
+    },
+    handlePickUp() {
+      uni.navigateToMiniProgram({
+        appId: "wx01e79cb36b9436ee",
+        path: "pages/contact/index",
+        extraData: {},
+        success(res) {
+          // 打开成功
+          console.log(res, "成功");
+        },
+      });
+    },
+    // 复制内容到剪切板
+    setClipboardData() {
+      let address = "";
+      for (let k in this.addressInfo) {
+        if (address !== "") address += ",";
+        address += k;
+        address += this.addressInfo[k];
+      }
+      uni.setClipboardData({
+        data: address,
+        success: function () {
+          // Tip.success("复制成功!");
+          console.log("复制成功!");
+        },
+      });
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
@@ -97,7 +144,7 @@ export default {
   .express-adress {
     width: 686rpx;
     height: 450rpx;
-    background: #FFFFFF;
+    background: #ffffff;
     box-shadow: 0rpx 0rpx 44rpx 0rpx rgba(226, 226, 226, 0.58);
     border-radius: 20rpx;
     margin: 0 auto;
@@ -126,7 +173,7 @@ export default {
           font-size: 24rpx;
           font-family: PingFangSC-Regular, PingFang SC;
           font-weight: 400;
-          color: #4C75FF;
+          color: #4c75ff;
         }
       }
     }
@@ -161,7 +208,7 @@ export default {
     margin-top: 64rpx;
     width: 586rpx;
     height: 88rpx;
-    background: #638AFD;
+    background: #638afd;
     border-radius: 44rpx;
     display: flex;
     justify-content: center;
@@ -169,8 +216,7 @@ export default {
     font-size: 34rpx;
     font-family: PingFangSC-Regular, PingFang SC;
     font-weight: 400;
-    color: #FFFFFF;
+    color: #ffffff;
   }
-  
 }
 </style>  

+ 37 - 12
src/pages/competitionRegister/schoolInformation.vue

@@ -3,25 +3,49 @@
     <view class="school-information-list">
       <view
         class="school-information-item"
-        v-for="item in 10"
-        :key="item"
+        v-for="item in schoolList"
+        :key="item.id"
       >
-        <view class="school-name" >北京市朝阳逻辑狗幼儿园  </view>
-        <view class="school-register-count" >初赛人数预估33人</view>
+        <view class="school-name">{{ item.schoolName }}</view>
+        <view class="school-register-count"
+          >初赛人数预估{{ item.totalPerson }}人</view
+        >
       </view>
     </view>
   </view>
 </template>
 
 <script>
+import { getAgentRegisterSchoolList } from "@/api/competition.js";
+import Tip from "@/utils/tip.js";
 export default {
-  name: 'school-information',
-  data () {
+  name: "school-information",
+  data() {
     return {
-      schoolList: []
-    }
-  }
-}
+      schoolList: [],
+      id: "",
+    };
+  },
+  onLoad(options) {
+    this.id = options.id;
+    this.getAgentRegisterSchoolList();
+  },
+  methods: {
+    // 参赛学校列表
+    async getAgentRegisterSchoolList() {
+      const params = {
+        id: this.id,
+      };
+      const { data, msg, status } = await getAgentRegisterSchoolList(params);
+      if (status === 200) {
+        // console.log(data, "getAgentRegisterSchoolList");
+        this.schoolList = data;
+      } else {
+        Tip.error(msg);
+      }
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
@@ -35,8 +59,9 @@ export default {
     .school-information-item {
       width: 686rpx;
       height: 198rpx;
-      background: #FFFFFF;
-      box-shadow: 0rpx -4rpx 0rpx 0rpx #FF8E99, 0px 4px 28px 0px rgba(123, 123, 123, 0.14);
+      background: #ffffff;
+      box-shadow: 0rpx -4rpx 0rpx 0rpx #ff8e99,
+        0px 4px 28px 0px rgba(123, 123, 123, 0.14);
       border-radius: 20rpx;
       margin-top: 48rpx;
       display: flex;

+ 589 - 491
src/pages/user/index.vue

@@ -1,517 +1,615 @@
 <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">
-					<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' : item.id === 2 ? '266rpx' : '176rpx' }" 
-									class="invite-code" 
-									:src="item.label" 
-									mode="aspectFit" 
-								/>
-								<image style="width: 16rpx; height: 28rpx" :src="require('@/static/image/right-arrow.png')" />
-							</view>
-							<text class="inviteCode-school-list-item-left-desc">
-							
-								<text>{{item.desc}}</text>
-							</text>
-						</view>
-						<view 
-							class="inviteCode-school-list-item-right"
-							:style="{width: item.width, height: item.height, right: item.right}"
-						>
-							<image 
-								:src="item.imgUrl"
-								mode="aspectFill"
-							/>
-						</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>
+  <!-- <Login v-if="" /> -->
+  <view class="Content">
+    <!-- 个人信息 -->
+    <view class="user">
+      <view class="empty" :style="{ height: statusBarHeight + 2 + 'px' }" />
+      <image class="rect" :src="staticPicture.rect" />
+      <view class="user-info">
+        <view class="user-left">
+          <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 class="schoolText">今日新增开园(个)</view>
+        </view>
+        <!-- <view class="line"></view> -->
+        <view class="school-new">
+          <view class="school-new-count">{{
+            userInfo.totalSchoolCount || 0
+          }}</view>
+          <view class="schoolText">全部园所(个)</view>
+        </view>
+      </view>
+    </view>
+    <!-- 开园审核 -->
+    <view class="audit">
+      <!-- 开园审核数目 -->
+      <view class="audit-count" @click="jumpStartSchoolAudit">
+        <image class="audit-count-left" :src="staticImg.openSchoolAudit" />
+        <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="#999999" />
+        </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'
+                        : item.id === 2
+                        ? '266rpx'
+                        : '176rpx',
+                  }"
+                  class="invite-code"
+                  :src="item.label"
+                  mode="aspectFit"
+                />
+                <image
+                  style="width: 16rpx; height: 28rpx"
+                  :src="require('@/static/image/right-arrow.png')"
+                />
+              </view>
+              <text class="inviteCode-school-list-item-left-desc">
+                <text>{{ item.desc }}</text>
+              </text>
+            </view>
+            <view
+              class="inviteCode-school-list-item-right"
+              :style="{
+                width: item.width,
+                height: item.height,
+                right: item.right,
+              }"
+            >
+              <image :src="item.imgUrl" mode="aspectFill" />
+            </view>
+          </view>
+        </view>
+      </view> -->
+    </view>
+
+    <!-- 邀请码与地区园所 -->
+    <view class="box">
+      <view class="inviteCodeBox" @click="hanlderInviteCodeWithSchool('1')">
+        <image class="inviteCodeImg" :src="staticImg.inviteCodeImg" />
+        <image class="inviteCodeTitle" :src="staticImg.inviteCodeTitle" />
+      </view>
+      <view class="regionalGarden" @click="hanlderInviteCodeWithSchool('2')">
+        <image
+          class="regionalGardenTitle"
+          :src="staticImg.regionalGardenTitle"
+        />
+        <image class="regionalGardenImg" :src="staticImg.regionalGardenImg" />
+      </view>
+    </view>
+    <view class="competitionBox" @click="hanlderInviteCodeWithSchool('3')">
+      <image class="competitionTitle" :src="staticImg.competitionTitle" />
+      <image class="competitionImg" :src="staticImg.competitionImg" />
+    </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 { CustomNavbar } from "@/components/CustomNavbar";
+import { staticPicture } from "@/utils/global.js";
 
-import { CustomNavbar } from '@/components/CustomNavbar'
-import { staticPicture } from '@/utils/global.js'
-
-import { waitCheckCount } from '@/api/audit'
-import InviteCode from '@/components/inviteCode'
-import Tip from '@/utils/tip.js'
-import Login from '@/pages/index/index'
-import { getUserInfo } from '@/api/user'
+import { waitCheckCount } from "@/api/audit";
+import InviteCode from "@/components/inviteCode";
+import Tip from "@/utils/tip.js";
+import Login from "@/pages/index/index";
+import { getUserInfo } from "@/api/user";
 const inviteCodeWithSchool = Object.freeze([
-	{
-		id: 1,
-		label: staticPicture.inviteCode,
-		desc: 'MY INVITATION CODE',
-		imgUrl: staticPicture.codeBg,
-		width: '208rpx',
-		height: '180rpx',
-		right: '10rpx'
-	},
-	{
-  	id: 2,
-  	label: staticPicture.school,
-  	desc: 'MY REGIONAL GARDEN OFFICE',
-  	imgUrl:  staticPicture.schoolBg,
-		width: '166rpx',
-		height: '178rpx',
-		right: '28rpx'
-	},
-	{
-  	id: 3,
-  	label: staticPicture.competition,
-  	desc: 'COMPETITION SITUATION',
-  	imgUrl:  staticPicture.competitionBg,
-		width: '166rpx',
-		height: '178rpx',
-		right: '28rpx'
-	},
-])
-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 = uni.getStorageSync('userInfo')
-		// }
-		this.getUserInfo()
-	
-	},
-	data() {
-		return {
-			staticPicture,
-			inviteCodeWithSchool, // 邀请码与地区园所
-			inviteCodeOverlay: false,
-			userInfo: {},	
-			waitCheckSchoolCount: 0
-		}
-	},
-	methods: {
-		// 获取用户个人信息
-		async getUserInfo () {
-			const { data, status } = await getUserInfo()
-			if (status === 200) {
-				console.log(data);
-				this.userInfo = data
-			}
-		},
-		// 获取园所审核数量
-		async waitCheckCount () {
-			const {data, status} = await waitCheckCount()
-			console.log(data, status);
-			if (status === 200) {
-				this.waitCheckSchoolCount = data
-			}
-		},
-		// 跳转开园审核
-		jumpStartSchoolAudit () {
-			uni.navigateTo({
-				url: '/pages/audit/index'
-			})
-		},
-		// 点击邀请码与地区园所
-		async hanlderInviteCodeWithSchool (item) {
-			const { id } = item
+  {
+    id: 1,
+    label: staticPicture.inviteCode,
+    desc: "MY INVITATION CODE",
+    imgUrl: staticPicture.codeBg,
+    width: "208rpx",
+    height: "180rpx",
+    right: "10rpx",
+  },
+  {
+    id: 2,
+    label: staticPicture.school,
+    desc: "MY REGIONAL GARDEN OFFICE",
+    imgUrl: staticPicture.schoolBg,
+    width: "166rpx",
+    height: "178rpx",
+    right: "28rpx",
+  },
+  {
+    id: 3,
+    label: staticPicture.competition,
+    desc: "COMPETITION SITUATION",
+    imgUrl: staticPicture.competitionBg,
+    width: "166rpx",
+    height: "178rpx",
+    right: "28rpx",
+  },
+]);
+const staticImg = {
+  openSchoolAudit: require("@/static/image/openSchoolAudit.png"),
+  inviteCodeImg: require("@/static/image/inviteCodeImg.png"),
+  inviteCodeTitle: require("@/static/image/inviteCodeTitle.png"),
+  regionalGardenTitle: require("@/static/image/regionalGardenTitle.png"),
+  regionalGardenImg: require("@/static/image/regionalGardenImg.png"),
+  competitionTitle: require("@/static/image/competitionTitle.png"),
+  competitionImg: require("@/static/image/competitionImg.png"),
+};
 
-			const {data, status } =  await getUserInfo()
+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 = uni.getStorageSync('userInfo')
+    // }
+    this.getUserInfo();
+  },
+  data() {
+    return {
+      staticImg,
+      staticPicture,
+      inviteCodeWithSchool, // 邀请码与地区园所
+      inviteCodeOverlay: false,
+      userInfo: {},
+      waitCheckSchoolCount: 0,
+    };
+  },
+  methods: {
+    // 获取用户个人信息
+    async getUserInfo() {
+      const { data, status } = await getUserInfo();
+      if (status === 200) {
+        console.log(data);
+        this.userInfo = data;
+      }
+    },
+    // 获取园所审核数量
+    async waitCheckCount() {
+      const { data, status } = await waitCheckCount();
+      console.log(data, status);
+      if (status === 200) {
+        this.waitCheckSchoolCount = data;
+      }
+    },
+    // 跳转开园审核
+    jumpStartSchoolAudit() {
+      uni.navigateTo({
+        url: "/pages/audit/index",
+      });
+    },
+    // 点击邀请码与地区园所
+    async hanlderInviteCodeWithSchool(id) {
+      const { data, status } = await getUserInfo();
 
-			if (status !== 200) return
-			
-			switch (id) {
-				case 1:
-					uni.navigateTo({
-						url: '/pages/invitePage/index'
-					})
-					break;
-				case 2:
-					uni.navigateTo({
-						url: '/pages/districtGarden/index'
-					})
-					break;
-				case 3:
-					uni.navigateTo({
-						url: '/pages/competition/index'
-					})
-					break
-			}
+      if (status !== 200) return;
 
-		},
-	}
-}
+      switch (id) {
+        case "1":
+          uni.navigateTo({
+            url: "/pages/invitePage/index",
+          });
+          break;
+        case "2":
+          uni.navigateTo({
+            url: "/pages/districtGarden/index",
+          });
+          break;
+        case "3":
+          uni.navigateTo({
+            url: "/pages/competition/index",
+          });
+          break;
+      }
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
 .Content {
-	width: 100vw;
+  width: 100vw;
+  // overflow: auto;
+  .user {
+    width: 100%;
+    padding: 72rpx 32rpx 32rpx;
+    box-sizing: border-box;
+    position: relative;
+    .rect {
+      width: 100vw;
+      height: 83.2vw;
+      position: absolute;
+      top: 0;
+      left: 0;
+      z-index: -1;
+      object-fit: cover;
+    }
+    .user-info {
+      display: flex;
+      margin-top: 54rpx;
+      .user-left {
+        width: 126rpx;
+        height: 126rpx;
+        border-radius: 50%;
+        overflow: hidden;
+        border: 1.1rpx solid rgba(255, 255, 255, 0.5);
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        box-sizing: border-box;
+        .user-left-userAvatarUrl {
+          width: 120rpx;
+          height: 120rpx;
+          border-radius: 50%;
+          overflow: hidden;
+        }
+      }
+      .user-right {
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+        margin-left: 46rpx;
+        box-sizing: border-box;
+        .user-name {
+          height: 74rpx;
+          line-height: 74rpx;
+          font-size: 52rpx;
+          font-family: PingFangSC-Semibold, PingFang SC;
+          font-weight: 600;
+          color: #333333;
+        }
+        .user-identity {
+          margin-top: 6rpx;
+          width: 148rpx;
+          height: 48rpx;
+          background: rgba(255, 255, 255, 0.78);
+          border-radius: 24rpx;
+          border: 2rpx solid #1677ff;
+          font-size: 32rpx;
+          font-family: PingFangSC-Light, PingFang SC;
+          font-weight: 400;
+          color: #1677ff;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+        }
+      }
+    }
+    .school {
+      display: flex;
+      align-items: center;
+      margin-top: 52rpx;
+      width: 686rpx;
+      height: 160rpx;
+      background: #ffffff;
+      border-radius: 32rpx;
+      opacity: 0.98;
 
-	// overflow: auto;
-	.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: 1.1rpx solid rgba(255, 255, 255, .5);
-				display: flex;
-				justify-content: center;
-				align-items: center;
-				box-sizing: border-box;
-				.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: 1rpx solid rgba(255, 255, 255, 0.5);
-					border-radius: 20rpx;
-					font-size: 28rpx;
-					font-family: PingFangSC-Light, PingFang SC;
-					font-weight: 300;
-					color: rgb(255, 255, 255);
-					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 {
+      &-new {
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        justify-content: center;
+        width: 50%;
+        &-count {
+          font-size: 44rpx;
+          font-family: DINAlternate-Bold, DINAlternate;
+          font-weight: bold;
+          color: #1677ff;
+        }
 
-					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;
-					position: relative;
-					&-left {
-						&-label {
-							display: flex;
-							align-items: center;
-							image {
-								display: block;
-							}
-							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;
-						position: absolute;
-						top: 50%;
-						transform: translateY(-50%);
-						image {
-							width: 100%;
-							height: 100%;
-						}
-					}
-				}
-			}
-		}
-
-	}
+        .schoolText {
+          font-size: 28rpx;
+          font-family: PingFangSC-Regular, PingFang SC;
+          font-weight: 400;
+          color: #749ed8;
+        }
+      }
+    }
+  }
+  .audit {
+    position: relative;
+    z-index: 1;
+    .audit-count {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      margin: 0 auto;
+      width: 686rpx;
+      height: 78rpx;
+      background: #eaf4ff;
+      border-radius: 64rpx;
+      box-sizing: border-box;
+      &-left {
+        margin-left: 42rpx;
+        width: 161rpx;
+        height: 34rpx;
+        object-fit: cover;
+      }
+      &-right {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        margin-right: 30rpx;
+        &-count {
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          margin-right: 6rpx;
+          width: 60rpx;
+          height: 36rpx;
+          background: #fa5d70;
+          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;
+          position: relative;
+          &-left {
+            &-label {
+              display: flex;
+              align-items: center;
+              image {
+                display: block;
+              }
+              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;
+            position: absolute;
+            top: 50%;
+            transform: translateY(-50%);
+            image {
+              width: 100%;
+              height: 100%;
+            }
+          }
+        }
+      }
+    }
+  }
+  .box {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 46rpx 32rpx;
+    .inviteCodeBox {
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      align-items: center;
+      width: 320rpx;
+      height: 382rpx;
+      background: linear-gradient(137deg, #62a3ff 0%, #abc9ff 100%);
+      border-radius: 42rpx;
+      .inviteCodeImg {
+        width: 274rpx;
+        height: 192rpx;
+        object-fit: cover;
+      }
+      .inviteCodeTitle {
+        margin-top: 10rpx;
+        width: 252rpx;
+        height: 100rpx;
+        object-fit: cover;
+      }
+    }
+    .regionalGarden {
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      align-items: center;
+      width: 320rpx;
+      height: 382rpx;
+      background: linear-gradient(134deg, #c08eff 0%, #d1baff 100%);
+      border-radius: 42rpx;
+      .regionalGardenTitle {
+        width: 266rpx;
+        height: 94rpx;
+        object-fit: cover;
+      }
+      .regionalGardenImg {
+        margin-top: 10rpx;
+        width: 274rpx;
+        height: 192rpx;
+        object-fit: cover;
+      }
+    }
+  }
+  .competitionBox {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    margin: 0 auto;
+    width: 686rpx;
+    height: 246rpx;
+    background: linear-gradient(227deg, #ff867f 0%, #ffccc1 100%);
+    border-radius: 42rpx;
+    .competitionTitle {
+      width: 394rpx;
+      height: 100rpx;
+      object-fit: cover;
+    }
+    .competitionImg {
+      margin-left: 10rpx;
+      width: 216rpx;
+      height: 194rpx;
+      object-fit: cover;
+    }
+  }
 }
 
-
 // 邀请码弹出层
 .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;
-	}
+  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: 0.9;
+  }
 }
 .overlay {
-	position: absolute;
-	top: 0;
-	left: 0;
-	right: 0;
-	bottom: 0;
-	background-color: rgba(73, 73, 76, .9);
-	z-index: 2;
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background-color: rgba(73, 73, 76, 0.9);
+  z-index: 2;
 }
 
 .invite-code {
-	width: 220rpx;
-	height: 38rpx;
-	margin-right: 44rpx;
+  width: 220rpx;
+  height: 38rpx;
+  margin-right: 44rpx;
 }
 </style>

BIN
src/static/activity/select-button.png


BIN
src/static/competitionRegister/common/arrow.png


+ 0 - 0
src/static/competitionRegister/common/back-icon .png → src/static/competitionRegister/common/back-icon.png


BIN
src/static/competitionRegister/common/closeBtn.png


BIN
src/static/competitionRegister/common/submitSucess.png


BIN
src/static/image/ava.jpg


BIN
src/static/image/competitionImg.png


BIN
src/static/image/competitionTitle.png


BIN
src/static/image/competitionTitleText.png


BIN
src/static/image/inviteCodeImg.png


BIN
src/static/image/inviteCodeTitle.png


BIN
src/static/image/logo.png


BIN
src/static/image/noData.png


BIN
src/static/image/openSchoolAudit.png


BIN
src/static/image/poster.jpg


BIN
src/static/image/rect.png


BIN
src/static/image/regionalGardenImg.png


BIN
src/static/image/regionalGardenTitle.png