Forráskód Böngészése

Merge branch 'master' of https://git.luojigou.vip/luojigou_h5/luojigou_xcx_agent

lvkun996 1 éve
szülő
commit
e37dc54db5
59 módosított fájl, 3870 hozzáadás és 1973 törlés
  1. 1 29
      README.md
  2. 74 7
      src/api/competition.js
  3. 28 3
      src/api/districtGarden.js
  4. 64 57
      src/components/CustomNavbar/index.vue
  5. 1 1
      src/components/empty-page/empty-page.vue
  6. 153 218
      src/components/garden-card/garden-card.vue
  7. 9 9
      src/components/popup/index.vue
  8. 1 1
      src/components/student-info/student-info.vue
  9. 26 25
      src/pages.json
  10. 232 233
      src/pages/audit/card.vue
  11. 12 11
      src/pages/audit/index.vue
  12. 8 8
      src/pages/audit/needAudit.vue
  13. 215 141
      src/pages/competition/apply.vue
  14. 127 10
      src/pages/competition/components/myRegisterList.vue
  15. 79 88
      src/pages/competition/index.vue
  16. 137 61
      src/pages/competition/myRegister.vue
  17. 251 123
      src/pages/competitionRegister/addSchool.vue
  18. 411 137
      src/pages/competitionRegister/collectInformation.vue
  19. 58 40
      src/pages/competitionRegister/component/step-register.vue
  20. 76 35
      src/pages/competitionRegister/component/step-tabbar.vue
  21. 317 40
      src/pages/competitionRegister/index.vue
  22. 37 12
      src/pages/competitionRegister/schoolInformation.vue
  23. 279 0
      src/pages/competitionRegister/selectSchool.vue
  24. 515 0
      src/pages/districtGarden/detail.vue
  25. 117 145
      src/pages/districtGarden/index.vue
  26. 23 20
      src/pages/invitePage/index.vue
  27. 591 491
      src/pages/user/index.vue
  28. BIN
      src/static/activity/select-button.png
  29. BIN
      src/static/competitionRegister/common/arrow.png
  30. 0 0
      src/static/competitionRegister/common/back-icon.png
  31. BIN
      src/static/competitionRegister/common/closeBtn.png
  32. BIN
      src/static/competitionRegister/common/selectBtn.png
  33. BIN
      src/static/competitionRegister/common/submitSucess.png
  34. BIN
      src/static/competitionRegister/index/allNoSelectBtn.png
  35. BIN
      src/static/competitionRegister/index/allSelectBtn.png
  36. BIN
      src/static/competitionRegister/index/noSelectBtn.png
  37. BIN
      src/static/competitionRegister/index/selectBtn.png
  38. BIN
      src/static/image/ava.jpg
  39. BIN
      src/static/image/competitionImg.png
  40. BIN
      src/static/image/competitionTitle.png
  41. BIN
      src/static/image/competitionTitleText.png
  42. BIN
      src/static/image/defaultSchoolDetail.png
  43. BIN
      src/static/image/inviteCodeImg.png
  44. BIN
      src/static/image/inviteCodeTitle.png
  45. BIN
      src/static/image/logo.png
  46. BIN
      src/static/image/noData.png
  47. BIN
      src/static/image/noSelectBtn.png
  48. BIN
      src/static/image/openSchoolAudit.png
  49. BIN
      src/static/image/poster.jpg
  50. BIN
      src/static/image/rect.png
  51. BIN
      src/static/image/regionalGardenImg.png
  52. BIN
      src/static/image/regionalGardenTitle.png
  53. BIN
      src/static/image/returnHome.png
  54. BIN
      src/static/image/schoolInfoBGI.png
  55. BIN
      src/static/image/selectBtn.png
  56. 3 4
      src/utils/config.js
  57. 20 10
      src/utils/global.js
  58. 4 12
      src/wxcomponents/image/index.vue
  59. 1 2
      src/wxcomponents/notify/index.vue

+ 1 - 29
README.md

@@ -1,29 +1 @@
-# uni-template
-
-## Project setup
-```
-npm install
-```
-
-### Compiles and hot-reloads for development
-```
-npm run serve
-```
-
-### Compiles and minifies for production
-```
-npm run build
-```
-
-### Run your tests
-```
-npm run test
-```
-
-### Lints and fixes files
-```
-npm run lint
-```
-
-### Customize configuration
-See [Configuration Reference](https://cli.vuejs.org/config/).
+### invitePage页面里打开的webview地址是来自h5-singlePage项目中的agent模块

+ 74 - 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,78 @@ 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',
+    })
+}
+
+// 查询上一次报名基本信息
+export function getAgentRegisterLastInfo() {
+    return request({
+        url: `/agent/miniprogram/agent/register/last/info`,
+        method: 'GET',
+    })
+}

+ 28 - 3
src/api/districtGarden.js

@@ -1,7 +1,7 @@
 import { request } from '../utils/request'
 
-// districtGarden列表
-export function getDistrictGarden (parmas) {
+// 我的地区园所列表
+export function getDistrictGarden(parmas) {
     return request({
         url: `/agent/miniprogram/school`,
         method: 'GET',
@@ -9,10 +9,35 @@ export function getDistrictGarden (parmas) {
     })
 }
 // 模糊搜索
-export function dimSearch (parmas) {
+export function dimSearch(parmas) {
     return request({
         url: `/agent/miniprogram/school/name`,
         method: 'GET',
         query: parmas
     })
+}
+
+// 园所详情
+export function querySchoolDetail(id) {
+    return request({
+        url: `/agent/miniprogram/school/${id}`,
+        method: 'GET',
+    })
+}
+
+// 取消合作
+export function deleteSchoolRelation(schoolId) {
+    return request({
+        url: `/agent/miniprogram/school/delete/relation/${schoolId}`,
+        method: 'GET',
+    })
+}
+
+// 更新学校信息
+export function updateSchoolRelation(data) {
+    return request({
+        url: `/agent/miniprogram/school/update/relation`,
+        method: 'PUT',
+        query: data,
+    })
 }

+ 64 - 57
src/components/CustomNavbar/index.vue

@@ -1,73 +1,80 @@
 <template>
-    <view class="CustomNavbar" :style="{backgroundColor: bgColor}">
-        <view class="empty" :style="{height: statusBarHeight + 2 +'px'}"></view>
-        <view 
-            class="Navbar" 
-            :style="{height: ( bounding.top - statusBarHeight ) * 2 + bounding.height + 'px'}"
-        >
-            <van-icon name="arrow-left" size="40rpx" class="arrow-left"  @click="jumpPage"/>
-            <view class="title">{{title}}</view>
-        </view>
-        
+  <view class="CustomNavbar" :style="{ backgroundColor: bgColor }">
+    <view class="empty" :style="{ height: statusBarHeight + 2 + 'px' }"></view>
+    <view
+      class="Navbar"
+      :style="{
+        height: (bounding.top - statusBarHeight) * 2 + bounding.height + 'px',
+      }"
+    >
+      <van-icon
+        name="arrow-left"
+        size="40rpx"
+        class="arrow-left"
+        @click="jumpPage"
+      />
+      <view class="title">{{ title }}</view>
     </view>
+  </view>
 </template>
 
 <script>
 export default {
-    name: 'CustomNavbar',
-    props: {
-        title: {
-            type: String,
-            default: ''
-        },
-        bgColor: {
-            type: String,
-            default: '#fff'
-        }
+  name: "CustomNavbar",
+  props: {
+    title: {
+      type: String,
+      default: "",
     },
-    computed: {
-        statusBarHeight () {
-            return this.$store.state.systemInfo.statusBarHeight
-        },
-        bounding () {
-            return this.$store.state.bounding
-        }
+    bgColor: {
+      type: String,
+      default: "#fff",
     },
-    methods: {
-        jumpPage () {
-          
-            uni.navigateBack({
-                delta: 1
-            })
-        }
-    }
-}
+  },
+  computed: {
+    statusBarHeight() {
+      return this.$store.state.systemInfo.statusBarHeight;
+    },
+    bounding() {
+      return this.$store.state.bounding;
+    },
+  },
+  methods: {
+    jumpPage() {
+      uni.navigateBack({
+        delta: 1,
+      });
+    },
+  },
+};
 </script>
 <style scoped lang="less">
 .CustomNavbar {
-    background-color: #fff;
+  background-color: #fff;
+  width: 100%;
+  z-index: 10;
+  .empty {
     width: 100%;
-    z-index: 10;
-    .empty {
-        width: 100%;
+  }
+  .Navbar {
+    display: flex;
+    align-items: center;
+    position: relative;
+    .arrow-left {
+      position: absolute;
+      left: 40rpx;
     }
-    .Navbar {
-        display: flex;
-        align-items: center;
-        position: relative;
-        .arrow-left {
-            position: absolute;
-            left: 40rpx;
-        }
-        .title {
-            width: 300rpx;
-            height: 300rpx;
-            font-size: 36rpx;
-            font-weight:500;
-            position: absolute;
-            left: 50%;
-            transform: translateX(-50%);
-        }
+    .title {
+      width: 300rpx;
+      height: 28rpx;
+      line-height: 28rpx;
+      font-size: 28rpx;
+      font-weight: 500;
+      position: absolute;
+      left: 50%;
+      transform: translateX(-50%);
+      text-align: center;
     }
+  }
 }
 </style>

+ 1 - 1
src/components/empty-page/empty-page.vue

@@ -19,7 +19,7 @@ export default {
         },
         image: {
             type: String,
-            default: () => require('static/common/empty.png')
+            default: "https://img.luojigou.vip/FiUlGeC-RFU1I6gKJNiN-WwJsoh5"
         }
     }
 }

+ 153 - 218
src/components/garden-card/garden-card.vue

@@ -1,251 +1,186 @@
 <template>
-    <view class="garden-card" >
-       <view class="garden-list-item" v-for="(item, index) in listData" :key="item.id">
-                    <view class="garden-list-item-time">
-                        开园时间: {{item.createTime}}
-                    </view>
-                    <view class="garden-list-item-card">
-                        <view class="garden-list-item-card-top">
-                            <view class="garden-list-item-card-top-label">
-                                <text>{{item.schoolName.length > 7 ? item.schoolName.substr(0, 7) + '...': item.schoolName}}</text>
-                                <view class="rect">
-                                    {{item.principalName.length > 5 ? item.principalName.substr(0, 5)+ '...' : item.principalName }}
-                                </view>
-                            </view>
-                            <view class="garden-list-item-card-top-city">
-                                {{item.address.address}}
-                            </view>
-                        </view>
-                        <view class="line" />
+  <view class="garden-card">
+    <view
+      class="garden-list-item"
+      v-for="item in listData"
+      :key="item.id"
+      @click="jumpDetail(item)"
+    >
+      <!-- <view class="garden-list-item-time">
+        开园时间: {{ item.createTime }}
+      </view> -->
+      <view class="garden-list-item-card">
+        <view class="garden-list-item-card-top">
+          <view class="garden-list-item-card-top-label">
+            <text>{{
+              item.schoolName.length > 7
+                ? item.schoolName.substr(0, 7) + "..."
+                : item.schoolName
+            }}</text>
+            <view class="rect">
+              {{
+                item.principalName.length > 5
+                  ? item.principalName.substr(0, 5) + "..."
+                  : item.principalName
+              }}
+            </view>
+          </view>
+          <view class="garden-list-item-card-top-time"
+            >开园时间:{{ item.createTime }}</view
+          >
 
-                        <view class="garden-info" >
-                            <view class="garden-info-item" >
-                                  班级数量: {{item.classCount}}
-                            </view>
-                            <view class="garden-info-item" >
-                                  教职工数量:{{item.teachUserCount}}
-                            </view>
-                            <view class="garden-info-item" >
-                                  学生数量:{{item.studentCount}}
-                            </view>
-                            <view class="garden-info-item" >
-                                  手机:{{item.phone}}
-                            </view>
-                        </view>
-                        <view class="garden-product">
-                            <view class="garden-product-label">使用产品:</view>
-                            <view :class="item.isExpand ? 'garden-product-content-true': 'garden-product-content-false'" v-if="item.courseNames && item.courseNames.length !== 0">
-                                <view class="garden-product-content-item" v-for="i in item.courseNames" :key="i.catId">
-                                    {{ i.catName }}
-                                </view>
-                            </view>
-                            <view v-else class="garden-product-content-false">无</view>
-                            <view class="garden-product-expand" v-if="item.courseNames && item.courseNames.length !== 0 && item.courseNames.length > 1" @click="handleExpand(index)">{{item.isExpand ? '收起更多': '展开更多'}}</view>
-                        </view>
-                    </view>
-                </view>
+          <image src="@/static/image/right-arrow.png" alt="" />
+          <!-- <view class="garden-list-item-card-top-city">
+            {{ item.address.address }}
+          </view> -->
+        </view>
+        <!-- <view class="line" />
+        <view class="garden-info">
+          <view class="garden-info-item">
+            班级数量: {{ item.classCount }}
+          </view>
+          <view class="garden-info-item">
+            教职工数量:{{ item.teachUserCount }}
+          </view>
+          <view class="garden-info-item">
+            学生数量:{{ item.studentCount }}
+          </view>
+          <view class="garden-info-item"> 手机:{{ item.phone }} </view>
+        </view>
+        <view class="garden-product">
+          <view class="garden-product-label">使用产品:</view>
+          <view
+            :class="
+              item.isExpand
+                ? 'garden-product-content-true'
+                : 'garden-product-content-false'
+            "
+            v-if="item.courseNames && item.courseNames.length !== 0"
+          >
+            <view
+              class="garden-product-content-item"
+              v-for="i in item.courseNames"
+              :key="i.catId"
+            >
+              {{ i.catName }}
+            </view>
+          </view>
+          <view v-else class="garden-product-content-false">无</view>
+          <view
+            class="garden-product-expand"
+            v-if="
+              item.courseNames &&
+              item.courseNames.length !== 0 &&
+              item.courseNames.length > 1
+            "
+            @click="handleExpand(index)"
+            >{{ item.isExpand ? "收起更多" : "展开更多" }}</view
+          >
+        </view> -->
+      </view>
     </view>
+  </view>
 </template>
 
 <script>
 export default {
-  name: 'garden-card',
+  name: "garden-card",
   props: {
     districtGardenData: {
       type: Array,
-      default: () => []
-    }
+      default: () => [],
+    },
   },
   computed: {
-      listData() {
-          return this.districtGardenData
-      }
+    listData() {
+      return this.districtGardenData;
+    },
   },
   methods: {
+    jumpDetail(item) {
+      // console.log(item, "jumpDetail");
+      uni.navigateTo({
+        url: `/pages/districtGarden/detail?id=${item.id}`,
+      });
+    },
     //   展开与收起
-      handleExpand(i) {
-          if(this.listData[i].isExpand === true) {
-              this.$set(this.listData[i],'isExpand', false)
-          } else {
-              this.$set(this.listData[i],'isExpand', true)
-          }
+    handleExpand(i) {
+      if (this.listData[i].isExpand === true) {
+        this.$set(this.listData[i], "isExpand", false);
+      } else {
+        this.$set(this.listData[i], "isExpand", true);
       }
-  }
-}
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
-
 .garden-list-item {
-      
-  &-time {
-    font-size: 24rpx;
-    font-family: PingFangSC-Regular, PingFang SC;
-    font-weight: 400;
-    color: #9C9AAB;
-    height: 92rpx;
-    width: 100%;
-    text-align: center;
-    line-height: 92rpx;
-  }
   &-card {
+    position: relative;
+    margin-top: 52rpx;
+    padding: 40rpx 30rpx;
     width: 686rpx;
-    background: #FFFFFF;
+    background: #ffffff;
     box-shadow: 0rpx 6rpx 20rpx 0rpx rgba(235, 235, 235, 0.5);
     border-radius: 20rpx;
-    position: relative;
     overflow: hidden;
+    box-sizing: border-box;
     &-top {
-        padding: 32rpx 0rpx 32rpx 24rpx;
-        &-label {
-            display: flex;
-            align-items: center;
-            text {
-                font-size: 36rpx;
-                font-family: PingFangSC-Medium, PingFang SC;
-                font-weight: 500;
-                color: #42516C;
-                margin-right: 34rpx;
-            }
-            .rect {
-                // width: 122rpx;
-                height: 38rpx;
-                background-color: #1677FF;
-                text-align:center;
-                transform: skewX(-14deg);
-                -webkit-transform:skewX(-14deg); 
-                -moz-transform:skewX(-14deg);
-                font-size: 28rpx;
-                font-family: PingFangSC-Regular, PingFang SC;
-                font-weight: 400;
-                color: #FFFFFF;
-                border-radius: 10rpx;
-                padding: 0rpx 18rpx;
-                box-sizing: border-box;
-            }
+      &-label {
+        display: flex;
+        align-items: center;
+        text {
+          margin-right: 16rpx;
+          height: 44rpx;
+          line-height: 44rpx;
+          font-size: 36rpx;
+          font-family: PingFangSC-Medium, PingFang SC;
+          font-weight: 500;
+          color: #42516c;
         }
-        &-city {
-            margin-top: 14rpx;
-            font-size: 24rpx;
-            font-family: PingFangSC-Regular, PingFang SC;
-            font-weight: 400;
-            color: #9C9AAB;
+        .rect {
+          padding: 0rpx 18rpx;
+          height: 38rpx;
+          background-color: #1228b9;
+          text-align: center;
+          transform: skewX(-14deg);
+          -webkit-transform: skewX(-14deg);
+          -moz-transform: skewX(-14deg);
+          font-size: 28rpx;
+          font-family: PingFangSC-Regular, PingFang SC;
+          font-weight: 400;
+          color: #ffffff;
+          border-radius: 10rpx;
+          box-sizing: border-box;
         }
-    }
-    .line {
-        width: 100%;
-        height: 2rpx;
-        background: #F6F6F6;
-    }
-    .garden-info {
-        display: flex;
-        flex-wrap: wrap;
-        justify-content: center;
-        align-items: space-between;
-        font-size: 28rpx;
+      }
+      &-time {
+        margin-top: 14rpx;
+        width: 370rpx;
+        height: 28rpx;
+        font-size: 24rpx;
         font-family: PingFangSC-Regular, PingFang SC;
         font-weight: 400;
-        color: #42516C;
-        padding: 32rpx 24rpx 24rpx;
-        box-sizing: border-box;
-        .garden-info-item {
-            flex: 50%;
-        }
-    }
-    .garden-info .garden-info-item:nth-child(n + 3) {
-        margin-top: 24rpx;
-    }
-    // .grid {
-    //     font-size: 28rpx;
-    //     font-family: PingFangSC-Regular, PingFang SC;
-    //     font-weight: 400;
-    //     color: #42516C;
-    //     box-sizing: border-box;
-    //     /deep/ .van-grid-item__content {
-    //         padding-left: 24rpx;
-    //     }
-    // }
-    }
-    .garden-product {
-        display: flex;
-        position: relative;
-        margin-bottom: 32rpx;
-        &-label {
-            margin-left: 24rpx;
-            width: 140rpx;
-            height: 42rpx;
-            font-size: 28rpx;
-            font-family: PingFangSC-Regular, PingFang SC;
-            font-weight: 400;
-            color: #42516C;
-            line-height: 42rpx;
-        }
-        // 未展开
-        &-content-false {
-            display: flex;
-            flex-direction: column;
-            width: 388rpx;
-            font-size: 28rpx;
-            font-family: PingFangSC-Regular, PingFang SC;
-            font-weight: 400;
-            color: #42516C;
-            line-height: 42rpx;
-            .garden-product-content-item {
-                display: none;
-            }
-            .garden-product-content-item:first-child {
-                display: block;
-                width: 388rpx;
-                height: 42rpx;
-                overflow: hidden;    
-                text-overflow:ellipsis;    
-                white-space: nowrap; 
-            }
-        }
-        // 已展开
-        &-content-true {
-            display: flex;
-            flex-direction: column;
-            width: 388rpx;
-            font-size: 28rpx;
-            font-family: PingFangSC-Regular, PingFang SC;
-            font-weight: 400;
-            color: #42516C;
-            line-height: 42rpx;
-            .garden-product-content-item {
-                margin-bottom: 16rpx;
-                width: 388rpx;
-            }
-            .garden-product-content-item:first-child {
-                display: block;
-                width: 388rpx;
-            }
-            .garden-product-content-item:last-child {
-                margin-bottom: 0;
-            }
-        }
-        &-ellipsis {
-            position: absolute;
-            top: 0;
-            right: 180rpx;
-            height: 42rpx;
-            line-height: 42rpx;
-            font-size: 28rpx;
-        }
-        &-expand {
-            position: absolute;
-            top: 0;
-            right: 24rpx;
-            height: 42rpx;
-            font-size: 24rpx;
-            font-family: PingFangSC-Regular, PingFang SC;
-            font-weight: 400;
-            color: #1677FF;
-            line-height: 42rpx;
-        } 
+        color: #9c9aab;
+        line-height: 28rpx;
+      }
+
+      image {
+        position: absolute;
+        top: 50%;
+        right: 42rpx;
+        display: block;
+        width: 14rpx;
+        height: 20rpx;
+        object-fit: cover;
+        transform: translateY(-50%);
+      }
     }
   }
-  &-item:last-child {
-      padding-bottom: 200rpx;
-  }
+}
+&-item:last-child {
+  padding-bottom: 200rpx;
+}
 </style>

+ 9 - 9
src/components/popup/index.vue

@@ -8,22 +8,22 @@
 
 <script>
 export default {
-  name: 'Popup',
+  name: "Popup",
   props: {
     show: {
       type: Boolean,
-      default: false
-    }
+      default: false,
+    },
   },
   methods: {
     handleClose() {
-      this.$emit('close')
+      this.$emit("close");
     },
     handleStop() {
-      return false
-    }
-  }
-}
+      return false;
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
@@ -31,7 +31,7 @@ export default {
   position: fixed;
   top: 0;
   left: 0;
-  z-index: 2;
+  z-index: 99;
   width: 100%;
   height: 100%;
   background: rgba(0, 0, 0, 0.7);

+ 1 - 1
src/components/student-info/student-info.vue

@@ -1,6 +1,6 @@
 <template>
   <view class="student-info"  >
-    <image class="ava" :src="require('@/static/image/ava.jpg')" />
+    <image class="ava" src="https://img.luojigou.vip/FsnmpbROociCBWdk0Wy9fmknBcej" />
     <view class="content-info" >
       <view class="top" >
         <view class="name" >{{itemData.babyName}}</view>

+ 26 - 25
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"
 				}
@@ -32,9 +32,9 @@
 			"path": "pages/index/index",
 			"style": {
 				"navigationBarTitleText": "代理商",
-				"disableScroll": true, // 禁止苹果手机滑动
+				"disableScroll": true,
 				"navigationStyle": "custom",
-				"usingComponents":{
+				"usingComponents": {
 					"van-button": "/wxcomponents/button/index"
 				}
 			}
@@ -43,9 +43,9 @@
 			"path": "pages/districtGarden/index",
 			"style": {
 				"navigationBarTitleText": "我的地区园所",
-				"disableScroll": true, // 禁止苹果手机滑动
+				"disableScroll": true,
 				"navigationStyle": "custom",
-				"usingComponents":{
+				"usingComponents": {
 					"van-button": "/wxcomponents/button/index",
 					"van-overlay": "/wxcomponents/overlay/index",
 					"van-grid": "/wxcomponents/grid/index",
@@ -53,19 +53,22 @@
 				}
 			}
 		},
+		{
+			"path": "pages/districtGarden/detail"
+		},
 		{
 			"path": "pages/audit/index",
 			"style": {
 				"navigationBarTitleText": "开园审核",
-				"disableScroll": true, // 禁止苹果手机滑动
+				"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"
 				}
 			}
 		},
@@ -73,9 +76,9 @@
 			"path": "pages/search/index",
 			"style": {
 				"navigationBarTitleText": "搜索园所",
-				"disableScroll": true, // 禁止苹果手机滑动
+				"disableScroll": true,
 				"navigationStyle": "custom",
-				"usingComponents":{
+				"usingComponents": {
 					"van-search": "/wxcomponents/search/index"
 				}
 			}
@@ -83,11 +86,7 @@
 		{
 			"path": "pages/invitePage/index",
 			"style": {
-				"navigationBarTitleText": "园长开园邀请码",
-				"disableScroll": true, // 禁止苹果手机滑动
-				"usingComponents":{
-					"van-search": "/wxcomponents/search/index"
-				}
+				"navigationBarTitleText": "园长开园邀请码"
 			}
 		},
 		{
@@ -110,15 +109,11 @@
 		},
 		{
 			"path": "pages/competition/schoolDetail",
-			"style": {
-				
-			}
+			"style": {}
 		},
 		{
 			"path": "pages/promoted/index",
-			"style": {
-				
-			}
+			"style": {}
 		},
 		{
 			"path": "pages/promoted/search",
@@ -137,7 +132,7 @@
 			"style": {
 				"navigationBarTitleText": "手动录入成绩",
 				"navigationStyle": "custom",
-				"disableScroll": true 
+				"disableScroll": true
 			}
 		},
 		{
@@ -168,6 +163,12 @@
 				"navigationBarTitleText": "添加参赛园所"
 			}
 		},
+		{
+			"path": "pages/competitionRegister/selectSchool",
+			"style": {
+				"navigationBarTitleText": "选择幼儿园"
+			}
+		},
 		{
 			"path": "pages/competitionRegister/schoolInformation",
 			"style": {
@@ -212,4 +213,4 @@
 			}
 		]
 	}
-}
+}

+ 232 - 233
src/pages/audit/card.vue

@@ -1,271 +1,270 @@
 <template>
-    <view class="Card">
-        <view class="Card-item">
-            <view class="Card-item-time">
-                {{item.createTime}}
+  <view class="Card">
+    <view class="Card-item">
+      <view class="Card-item-time">
+        {{ item.createTime }}
+      </view>
+      <view class="Card-item-card">
+        <view class="Card-item-card-top">
+          <view class="Card-item-card-top-school">
+            {{ item.schoolName }}-园长
+          </view>
+          <!-- refuse or pass -->
+          <view class="Card-item-card-top-audit">
+            <view class="Card-item-card-top-audit-left">
+              <image :src="item.schoolImg" />
+              <text>{{ item.principalName }}</text>
             </view>
-            <view class="Card-item-card">
-                <view class="Card-item-card-top">
-                    <view class="Card-item-card-top-school">
-                        {{item.schoolName}}-园长
-                    </view>
-                    <!-- refuse or pass -->
-                    <view class="Card-item-card-top-audit">
-                        <view class="Card-item-card-top-audit-left">
-                            <image :src="item.schoolImg" />
-                            <text >{{item.principalName}}</text>
-                        </view>
-                        <view class="Card-item-card-top-audit-right">
-                            <slot>
-
-                            </slot>
-                        </view>
-                    </view>
-                </view>
-                 <!-- line -->
-                <view class="line" />
-                <!-- 详细信息 -->
-                <view class="detail-message">
-                    <view class="use-product" @click="handleTip">
-                        使用产品:{{ item.courseNames | handleCourseNames }}
-                    </view>
-                    <view class="school-adress">
-                        园所地址:{{item.address.address}}
-                    </view>
-                    <view class="phone">
-                        手机:{{item.phone}}
-                    </view>
-                    <view class="school-count">
-                        班级数量: {{item.classCount}}
-                    </view>
-                </view>
+            <view class="Card-item-card-top-audit-right">
+              <slot> </slot>
             </view>
+          </view>
         </view>
-
-        <popup :show="show" @close="show = false">
-            <view class="popupBox" >
-                <image :src="closeBtnImg" class="closeBtn" @click="show = false"></image>
-                <h1 class="title">使用产品</h1>
-                <view class="course" v-for="i in item.courseNames" :key="i.catId">
-                    <view class="courseName"><image class="circle" src="@/static/image/circle.png"></image>{{ i.catName }}</view>
-                </view>
-                <button class="confirmBtn" @click="show = false">确定</button>
-            </view>
-        </popup>
+        <!-- line -->
+        <view class="line" />
+        <!-- 详细信息 -->
+        <view class="detail-message">
+          <view class="use-product" @click="handleTip">
+            使用产品:{{ item.courseNames | handleCourseNames }}
+          </view>
+          <view class="school-adress">
+            园所地址:{{ item.address.address }}
+          </view>
+          <view class="phone"> 手机:{{ item.phone }} </view>
+          <view class="school-count"> 班级数量: {{ item.classCount }} </view>
+        </view>
+      </view>
     </view>
+
+    <popup :show="show" @close="show = false">
+      <view class="popupBox">
+        <image
+          :src="closeBtnImg"
+          class="closeBtn"
+          @click="show = false"
+        ></image>
+        <h1 class="title">使用产品</h1>
+        <view class="course" v-for="i in item.courseNames" :key="i.cardId">
+          <view class="courseName">
+            <image class="circle" src="@/static/image/circle.png"></image>
+            {{ i.cardName }}
+          </view>
+        </view>
+        <button class="confirmBtn" @click="show = false">确定</button>
+      </view>
+    </popup>
+  </view>
 </template>
 
 <script>
-import Popup from '@/components/popup/index'
-import Tip from '@/utils/tip.js'
+import Popup from "@/components/popup/index";
+import Tip from "@/utils/tip.js";
 
 export default {
-  name: 'Card',
+  name: "Card",
   props: {
-      item: {
-          type: Object,
-          required: true
-      }
-  }, 
+    item: {
+      type: Object,
+      required: true,
+    },
+  },
   components: {
-      Popup
+    Popup,
   },
   computed: {
-      item1  () {
-          return 1
-      },
+    item1() {
+      return 1;
+    },
   },
   filters: {
-      handleCourseNames(list) {
-          let name = ''
-          if(list && list.length !== 0) {
-              list.forEach(item => {
-                  if(name !== '') name += '、'
-                  name += item.catName
-              })
-          }else {
-              name = '无合作产品'
-          }
-          return name
+    handleCourseNames(list) {
+      let name = "";
+      if (list && list.length !== 0) {
+        list.forEach((item) => {
+          if (name !== "") name += "、";
+          name += item.cardName;
+        });
+      } else {
+        name = "无合作产品";
       }
+      return name;
+    },
   },
   data() {
-      return {
-          show: false,
-          closeBtnImg: require('@/static/image/closeBtn.png')
-      }
+    return {
+      show: false,
+      closeBtnImg: "https://img.luojigou.vip/FsYUqsiyptxoNjMXbkS9owmT6TNm"
+    };
   },
   methods: {
-      handleTip() {
-          if(this.item.courseNames && this.item.courseNames.length !== 0) {
-            this.show = true
-          }else {
-            Tip.error('无合作产品')
-          }
+    handleTip() {
+      if (this.item.courseNames && this.item.courseNames.length !== 0) {
+        this.show = true;
+      } else {
+        Tip.error("无合作产品");
       }
-  }
-}
+    },
+  },
+};
 </script>
 <style scoped lang="less">
 .Card {
-    background: #F5F6FA;
-    &-item {
-        &-time {
-            height: 92rpx;
-            font-size: 24rpx;
-            font-family: PingFangSC-Regular, PingFang SC;
-            font-weight: 400;
-            color: #9C9AAB;
-            text-align: center;
-            line-height: 92rpx;
+  background: #f5f6fa;
+  &-item {
+    &-time {
+      height: 92rpx;
+      font-size: 24rpx;
+      font-family: PingFangSC-Regular, PingFang SC;
+      font-weight: 400;
+      color: #9c9aab;
+      text-align: center;
+      line-height: 92rpx;
+    }
+    &-card {
+      width: 686rpx;
+      background: #ffffff;
+      box-shadow: 0rpx 6rpx 20rpx 0rpx rgba(235, 235, 235, 0.5);
+      border-radius: 20rpx;
+      box-sizing: border-box;
+      margin: 0 auto;
+      &-top {
+        padding: 30rpx 28rpx 26rpx 26rpx;
+        box-sizing: border-box;
+        &-school {
+          font-size: 24rpx;
+          font-family: PingFangSC-Regular, PingFang SC;
+          font-weight: 400;
+          color: #9c9aab;
+          margin-bottom: 20rpx;
         }
-        &-card {
-            width: 686rpx;
-            background: #FFFFFF;
-            box-shadow: 0rpx 6rpx 20rpx 0rpx rgba(235, 235, 235, 0.5);
-            border-radius: 20rpx;
-            box-sizing: border-box;
-            margin: 0 auto;
-            &-top {
-                padding: 30rpx 28rpx 26rpx 26rpx;
-                box-sizing: border-box;
-                &-school {
-                    font-size: 24rpx;
-                    font-family: PingFangSC-Regular, PingFang SC;
-                    font-weight: 400;
-                    color: #9C9AAB;
-                    margin-bottom: 20rpx;
-                }
-                &-audit {
-                    display: flex;
-                    justify-content: space-between;
-                    align-items: center;
-                    &-left {
-                        display: flex;
-                        align-items: center;
-                        image {
-                            width: 40rpx;
-                            height: 40rpx;
-                            border-radius: 50%;
-                            margin-right: 16rpx;
-                            display: block;
-                            object-fit: cover;
-                        }
-                        text {
-                            font-size: 36rpx;
-                            font-family: PingFangSC-Medium, PingFang SC;
-                            font-weight: 500;
-                            color: #42516C;
-                        }
-                    }
-             
-                }
-
-            }
-            .line {
-                width: 100%;
-                height: 2rpx;
-                background: #F6F6F6;
-                margin-bottom: 26rpx;
+        &-audit {
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+          &-left {
+            display: flex;
+            align-items: center;
+            image {
+              width: 40rpx;
+              height: 40rpx;
+              border-radius: 50%;
+              margin-right: 16rpx;
+              display: block;
+              object-fit: cover;
             }
-            .detail-message {
-                font-size: 28rpx;
-                font-family: PingFangSC-Regular, PingFang SC;
-                font-weight: 400;
-                color: #9C9AAB;
-                padding: 0 24rpx 40rpx 24rpx;
-                box-sizing: border-box;
-                .phone {
-                    padding-left: 20rpx;
-                    margin-top: 24rpx;
-                    margin-bottom: 24rpx;
-                }
-                .use-product {
-                    padding: 0 20rpx;
-                    margin-bottom: 24rpx;
-                    width: 638rpx;
-                    height: 72rpx;
-                    line-height: 72rpx;
-                    background: #F7F7F7;
-                    border-radius: 8rpx;
-                    box-sizing: border-box;
-                    overflow: hidden;    
-                    text-overflow:ellipsis;    
-                    white-space: nowrap; 
-                }
-                .school-count {
-                    padding-left: 20rpx;
-                }
-                .school-adress {
-                    padding-left: 20rpx;
-                }
+            text {
+              font-size: 36rpx;
+              font-family: PingFangSC-Medium, PingFang SC;
+              font-weight: 500;
+              color: #42516c;
             }
+          }
         }
+      }
+      .line {
+        width: 100%;
+        height: 2rpx;
+        background: #f6f6f6;
+        margin-bottom: 26rpx;
+      }
+      .detail-message {
+        font-size: 28rpx;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #9c9aab;
+        padding: 0 24rpx 40rpx 24rpx;
+        box-sizing: border-box;
+        .phone {
+          padding-left: 20rpx;
+          margin-top: 24rpx;
+          margin-bottom: 24rpx;
+        }
+        .use-product {
+          padding: 0 20rpx;
+          margin-bottom: 24rpx;
+          width: 638rpx;
+          height: 72rpx;
+          line-height: 72rpx;
+          background: #f7f7f7;
+          border-radius: 8rpx;
+          box-sizing: border-box;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+        }
+        .school-count {
+          padding-left: 20rpx;
+        }
+        .school-adress {
+          padding-left: 20rpx;
+        }
+      }
     }
+  }
 }
 
 .popupBox {
-    position: relative;
-    width: 686rpx;
-    background: #FFFFFF;
-    border-radius: 24rpx;
-    overflow: hidden;
-    .closeBtn {
+  position: relative;
+  width: 686rpx;
+  background: #ffffff;
+  border-radius: 24rpx;
+  overflow: hidden;
+  .closeBtn {
+    position: absolute;
+    top: 40rpx;
+    right: 40rpx;
+    width: 26rpx;
+    height: 26rpx;
+    object-fit: cover;
+  }
+  .title {
+    margin: 60rpx 0 32rpx;
+    height: 52rpx;
+    font-size: 38rpx;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 550;
+    color: #333333;
+    line-height: 52rpx;
+    text-align: center;
+  }
+  .course {
+    margin-left: 88rpx;
+    margin-bottom: 40rpx;
+
+    .courseName {
+      position: relative;
+      padding-left: 30rpx;
+      width: 480rpx;
+      min-height: 44rpx;
+      font-size: 32rpx;
+      font-family: PingFangSC-Regular, PingFang SC;
+      font-weight: 400;
+      color: #333333;
+      line-height: 44rpx;
+      overflow: hidden;
+      .circle {
         position: absolute;
-        top: 40rpx;
-        right: 40rpx;
-        width: 26rpx;
-        height: 26rpx;
+        display: block;
+        top: 16rpx;
+        left: 0;
+        width: 16rpx;
+        height: 16rpx;
         object-fit: cover;
+      }
     }
-    .title {
-        margin: 60rpx 0 32rpx;
-        height: 52rpx;
-        font-size: 38rpx;
-        font-family: PingFangSC-Medium, PingFang SC;
-        font-weight: 550;
-        color: #333333;
-        line-height: 52rpx;
-        text-align: center;
-    }
-    .course {
-        margin-left: 88rpx;
-        margin-bottom: 40rpx;
-        
-        .courseName {
-            position: relative;
-            padding-left: 30rpx;
-            width: 480rpx;
-            min-height: 44rpx;
-            font-size: 32rpx;
-            font-family: PingFangSC-Regular, PingFang SC;
-            font-weight: 400;
-            color: #333333;
-            line-height: 44rpx;
-            overflow: hidden;
-            .circle {
-                position: absolute;
-                display: block;
-                top: 16rpx;
-                left: 0;
-                width: 16rpx;
-                height: 16rpx;
-                object-fit: cover;
-            }
-        }
-    }
-    .confirmBtn {
-        margin: 0 auto 60rpx;
-        width: 586rpx;
-        height: 84rpx;
-        line-height: 84rpx;
-        background: #1677FF;
-        border-radius: 84rpx;
-        font-size: 32rpx;
-        font-family: PingFangSC-Medium, PingFang SC;
-        font-weight: 550;
-        color: #FFFFFF;
-        text-align: center;
-    }
+  }
+  .confirmBtn {
+    margin: 0 auto 60rpx;
+    width: 586rpx;
+    height: 84rpx;
+    line-height: 84rpx;
+    background: #0548BB;
+    border-radius: 84rpx;
+    font-size: 32rpx;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 550;
+    color: #ffffff;
+    text-align: center;
+  }
 }
 </style>

+ 12 - 11
src/pages/audit/index.vue

@@ -11,16 +11,17 @@
                 :lazy-render="false"
                 class="tabs-element"
                 >
-                <van-tab  title="待审核" :name="0"><NeedAudit v-if="active === 0" :height="height" /></van-tab>
-                <van-tab  title="已审核" :name="1"><AlreadyAudit v-if="active === 1"/></van-tab>
+                <van-tab  title="待审核" :name="0">
+                  <NeedAudit v-if="active === 0" :height="height" />
+                </van-tab>
+                <van-tab  title="已审核" :name="1">
+                  <AlreadyAudit v-if="active === 1"/>
+                </van-tab>
             </van-tabs>
             <view class="tabs-line">
                 <view class="tabs-line-item" :style="{left: mulTabsLineSite }">
-               
                 </view>
             </view>
-
-            
         </view>
     </view>
 </template>
@@ -53,7 +54,7 @@ export default {
   data () {
       return {
           active: 0,
-          height: ''
+          height: undefined
       }
   },
   methods: {
@@ -79,14 +80,14 @@ export default {
             position: absolute;
             bottom: 16rpx;
             width: 100%;
-            height: 6px;
+            height: 12rpx;
             z-index: 1;
             &-item {
                 width: 40rpx;
                 height: 6rpx;
-                background: #1677FF;
-                box-shadow: 0px 2px 12px 0px rgba(22, 119, 255, 0.43);
-                border-radius: 200px;
+                background: #0548BB;
+                box-shadow: 0 4rpx 24rpx 0 rgba(5,72,187, 0.43);
+                border-radius: 400rpx;
                 position: absolute;
                 transition: left .5s;
             }
@@ -110,6 +111,6 @@ export default {
 }
 
 /deep/ .tabs-element .van-tab--active .van-ellipsis {
-  color: #1677FF;
+  color: #0548BB;
 }
 </style>

+ 8 - 8
src/pages/audit/needAudit.vue

@@ -28,7 +28,6 @@
                     </view>
                 </a-card>
                 </view>
-            
             </view>
          </scroll-view>
     </view>
@@ -154,22 +153,23 @@ export default {
         width: 120rpx;
         height: 52rpx;
         border-radius: 200rpx;
-        border: 2rpx solid #1677FF;
-        color: #1677FF;
+        border: 2rpx solid #0548BB;
+        color: #0548BB;
         display: flex;
         justify-content: center;
         align-items: center;
     }
     .pass {
+      display: flex;
+      justify-content: center;
+      align-items: center;
         width: 120rpx;
         height: 52rpx;
-        background: #1677FF;
-        box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(22, 119, 255, 0.63);
+      line-height: 52rpx;
+        background: #0548BB;
+        //box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(22, 119, 255, 0.63);
         border-radius: 200rpx;
         color: #FFFFFF;
-        display: flex;
-        justify-content: center;
-        align-items: center;
         margin-left: 40rpx;
     }
 }

+ 215 - 141
src/pages/competition/apply.vue

@@ -1,59 +1,82 @@
 <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">
+              <text class="competition-title-text">第17届“逻辑狗杯”全国儿童思维魔法嘉年华</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 +86,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: "https://img.luojigou.vip/Fsawk3QwFkX5ENh88coyjU88WGcZ"
+};
+
 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 +199,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 +244,77 @@ 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;
+    image {
       position: absolute;
-      left: 50%;
-      transform: translateX(-50%);
+      top: 0;
+      left: 0;
+      z-index: 0;
+      width: 100%;
+      height: 100%;
+      object-fit: cover;
     }
     .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;
+      top: 42rpx;
+      left: 0;
+      right: 0;
+      z-index: 1;
+      margin: 0 auto;
+      height: 36rpx;
+      font-size: 26rpx;
+      font-family: PingFangSC-Regular, PingFang SC;
+      font-weight: 400;
+      color: #868585;
+      line-height: 36rpx;
+      text-align: center;
     }
   }
-  .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 +330,6 @@ export default {
     font-family: PingFangSC-Regular, PingFang SC;
     font-weight: 400;
     color: #999999;
-    margin-top: 8rpx;
   }
   .apply-button {
     position: absolute;
@@ -272,28 +344,30 @@ 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 {
+    position: absolute;
+    top: 12rpx;
     width: 404rpx;
     height: 70rpx;
+    object-fit: cover;
   }
-
 }
 
-
 /deep/ .van-tabs__scroll {
-  background-color: transparent
+  background-color: transparent;
 }
 
 /deep/ .van-tabs {

+ 127 - 10
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;
+    min-height: 352rpx;
+    background: #ffffff;
     border-radius: 20rpx;
+    box-sizing: border-box;
+    &-title {
+      min-height: 44rpx;
+      font-size: 40rpx;
+      font-family: PingFangSC-Semibold, PingFang SC;
+      font-weight: 600;
+      color: #333333;
+      line-height: 50rpx;
+    }
+    &-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>

+ 79 - 88
src/pages/competition/index.vue

@@ -1,136 +1,127 @@
 <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>
+  <view class="competition">
+    <view
+      class="avtivity-item"
+      v-for="item in competitionList"
+      :key="item.id"
+      @click="goPage(item)"
+    >
+      <image class="activity-img" mode="aspectFill" :src="item.imgUrl" />
+      <view class="activity-text">
+        <view class="text">{{ item.name }}</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>
 .competition {
-  padding-bottom: 200px;
+  padding-top: 20px;
+  width: 100vw;
+  height: 100vh;
+  box-sizing: border-box;
+  background: linear-gradient(145deg, #bfd6ff 0%, #fefefe 100%);
+  overflow-y: auto;
   .avtivity-item {
     position: relative;
-    width: 100vw;
-    height: 358rpx;
-    .overlay {
-      width: 100vw;
-      height: 358rpx;
-      background-color: #000;
-      opacity: 0.3;
-      position: absolute;
-      top: 0;
-      left: 0;
-    }
+    margin: 40rpx auto 0;
+    width: 686rpx;
+    min-height: 442rpx;
+    background: #ffffff;
+    box-shadow: 0px 4rpx 40rpx 0px rgba(191, 216, 255, 0.7);
+    border-radius: 40rpx;
+    overflow: hidden;
     .activity-img {
-      width: 100vw;
-      height: 358rpx;
+      display: block;
+      width: 100%;
+      height: 292rpx;
+      object-fit: cover;
     }
     .activity-text {
-      width: 100vw;
-      display: flex;
-      flex-direction: column;
-      justify-content: center;
-      align-items: center;
-      font-size: 30rpx;
-      font-family: PingFangSC-Medium, PingFang SC;
-      font-weight: 500;
-      color: #FFFFFF;
-      position: absolute;
-      z-index: 1;
-      top: 50%;
-      left: 50%;
-      transform: translate(-50%, -50%);
+      margin: 26rpx 24rpx;
       .text {
-        display: flex;
-        align-items: center;
-        width: 100vw;
-        display: flex;
-        justify-content: center;
-        .right-arrow {
-          display: block;
-          width: 30rpx;
-          height: 30rpx;
-        }
+        min-height: 46rpx;
+        font-size: 30rpx;
+        font-family: PingFangSC-Medium, PingFang SC;
+        font-weight: 500;
+        color: #333333;
+        line-height: 46rpx;
       }
       .date {
-        margin-top: 8rpx;
+        margin-top: 4rpx;
+        height: 40rpx;
+        font-size: 24rpx;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #999999;
+        line-height: 40rpx;
       }
     }
   }
-
 }
 </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;

+ 251 - 123
src/pages/competitionRegister/addSchool.vue

@@ -1,166 +1,289 @@
 <template>
-  <view class="add-school" >
-    <view
-      class="school-card-list"
-    > 
+  <view class="add-school">
+    <!-- 顶部的邀请入园 -->
+    <view class="toInvite">
+      <view class="toInviteContent">
+        *未加入我的地区幼儿园,可【分享专属邀请-园长注册-地区负责人审核通过】
+      </view>
+      <view class="toInviteBtn" @click="toInvite">去邀请</view>
+    </view>
+
+    <view class="selectSchoolBtn" @click="selectMySchool">
+      <image class="selectBtn" :src="staticImg.selectBtn" />
+      <text>选择我的地区幼儿园</text>
+    </view>
+
+    <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>
-              <input
-                v-else
-                class="school-content-input"
-                placeholder="请选择/输入园所名称"
-                :placeholder-style="placeholderStyle"
-                :value="item.schoolName"
-                @input="changeForm($event, item.index, 'schoolName')"
-              />
-              <image
-                class="close-icon"
-                :src="staticImg.closeIcon"
-                v-if="item.schoolName && isEdit"
-                @click="restForm( item.index, 'schoolName')"
-              />
-              <van-icon v-if="!item.schoolName && isEdit" color="#999999" name="arrow-down" />
+        <view class="school-information">
+          <view class="school-information-item">
+            <view class="school-label">参赛园所名称</view>
+            <view class="school-content">
+              <text class="school-content-school-name">{{
+                item.schoolName
+              }}</text>
             </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>
+              <text v-if="!isEdit" class="school-content-school-name">{{
+                item.totalPerson
+              }}</text>
               <input
                 v-else
+                type="number"
                 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')"
               />
+              <text
+                :class="['endText', isEdit ? '' : 'school-content-school-name']"
+                >人</text
+              >
             </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" />
       </view>
-    </view>
+    </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>
+import Tip from "@/utils/tip.js";
 
 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"),
+  selectBtn: require("@/static/competitionRegister/common/selectBtn.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: "",
+      },
+      formData: {},
+    };
+  },
+  onLoad(options) {
+    uni.getStorage({
+      key: "formData",
+      success: (res) => {
+        this.formData = res.data;
+        this.schoolList = res.data.schoolList;
+      },
+      fail: (res) => {
+        console.log(res, "fail");
+      },
+    });
+    this.$nextTick(() => {
+      if (options.schoolList) {
+        const schoolList = JSON.parse(decodeURIComponent(options.schoolList));
+        schoolList.forEach((item) => {
+          if (
+            this.schoolList.findIndex((i) => i.schoolId === item.schoolId) !==
+            -1
+          ) {
+            item.totalPerson = this.schoolList.filter(
+              (i) => i.schoolId === item.schoolId
+            )[0].totalPerson;
+          }
+        });
+        this.schoolList = schoolList;
       }
-    }
+    });
   },
   methods: {
-    cancelOpration () {
-      this.isEdit = false
-      uni.navigateBack({
-        delta: 1
-      })
+    toInvite() {
+      uni.navigateTo({
+        url: "/pages/invitePage/index",
+      });
     },
-    changeOprationState () {
-      this.isEdit = !this.isEdit
+    selectMySchool() {
+      uni.redirectTo({
+        url: `/pages/competitionRegister/selectSchool?schoolList=${encodeURIComponent(
+          JSON.stringify(this.schoolList)
+        )}`,
+      });
     },
-    addSchool () {
-      this.schoolList.push( JSON.parse(JSON.stringify({
-        ...this.form,
-        index: this.schoolList.length 
-      })) )
+    handleDelete(index) {
+      this.schoolList.splice(index, 1);
     },
-    restForm (index, key) {
-      this.schoolList[index][key] = ''
+    cancelOpration() {
+      uni.redirectTo({
+        url: `/pages/competitionRegister/collectInformation`,
+      });
     },
-    changeForm (e, index, key) {
-      console.log(e, index, key);
-      const value = e.detail.value
-      this.schoolList[index][key] = value
-    }
-  }
-}
+    changeOprationState() {
+      if (
+        this.schoolList.findIndex(
+          (item) => item.totalPerson === undefined || item.totalPerson * 1 < 1
+        ) !== -1
+      ) {
+        Tip.error("请填写初赛预估人数!");
+        return;
+      }
+      this.isEdit = !this.isEdit;
+      if (!this.isEdit) {
+        uni.setStorage({
+          key: "formData",
+          data: { ...this.formData, schoolList: this.schoolList },
+          success: () => {
+            console.log("formData保存成功");
+          },
+        });
+      }
+    },
+    restForm(index, key) {
+      this.schoolList[index][key] = "";
+    },
+    changeForm(e, index, key) {
+      const value = e.detail.value;
+      this.schoolList[index][key] = value;
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
 .add-school {
-  padding-top: 48rpx;
+  min-height: 100vh;
+  background-color: #fff;
   box-sizing: border-box;
-  padding-bottom: 1000rpx;
-  .school-card-list {
+  overflow: hidden;
+
+  .toInvite {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
     padding: 0 32rpx;
+    height: 88rpx;
+    background: #ffe7e9;
+    .toInviteContent {
+      width: 514rpx;
+      height: 64rpx;
+      font-size: 22rpx;
+      font-family: PingFangSC-Regular, PingFang SC;
+      font-weight: 400;
+      color: #ff808c;
+      line-height: 32rpx;
+    }
+    .toInviteBtn {
+      width: 152rpx;
+      height: 60rpx;
+      line-height: 60rpx;
+      background: #ff7e8a;
+      border-radius: 30rpx;
+      font-size: 26rpx;
+      font-family: PingFangSC-Medium, PingFang SC;
+      font-weight: 500;
+      color: #ffffff;
+      text-align: center;
+      box-sizing: border-box;
+    }
+  }
+
+  .selectSchoolBtn {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    margin: 40rpx auto 0;
+    width: 686rpx;
+    height: 108rpx;
+    background: #507bfc;
+    box-shadow: 0px 0px 44rpx 0px rgba(226, 226, 226, 0.58);
+    border-radius: 20rpx;
+    .selectBtn {
+      display: block;
+      width: 40rpx;
+      height: 40rpx;
+      object-fit: cover;
+    }
+    text {
+      margin-left: 22rpx;
+      width: 308rpx;
+      height: 48rpx;
+      font-size: 34rpx;
+      font-family: PingFangSC-Regular, PingFang SC;
+      font-weight: 400;
+      color: #ffffff;
+      line-height: 48rpx;
+    }
+  }
+  .school-card-list {
+    padding: 0 32rpx 258rpx;
     box-sizing: border-box;
     .school-card {
+      margin-top: 48rpx;
+      padding: 40rpx 32rpx;
       width: 686rpx;
-      background: #FFFFFF;
+      background: #ffffff;
       box-shadow: 0rpx 0rpx 44rpx 0rpx rgba(226, 226, 226, 0.58);
       border-radius: 20rpx;
-      margin-bottom: 48rpx;
       box-sizing: border-box;
-      padding: 40rpx 32rpx;
       .card-header {
-        width: 100%;
-        height: 68rpx;
         display: flex;
         justify-content: flex-end;
         align-items: center;
-        border-bottom: 2px solid #EEE;
+        margin-bottom: 24rpx;
+        width: 100%;
+        height: 68rpx;
+        border-bottom: 2rpx solid #eee;
         .delete-icon {
+          display: block;
           width: 24rpx;
-          height: 24rpx; 
+          height: 24rpx;
         }
       }
       .school-information {
-        padding-top: 24rpx;
         .school-information-item:last-child {
           margin-bottom: 0;
         }
@@ -179,47 +302,53 @@ export default {
           .school-content {
             width: 393rpx;
             display: flex;
-            justify-content: space-between;
             align-items: center;
+            .school-content-school-name {
+              color: #999999 !important;
+            }
             .school-content-input {
-              width: 286rpx;
-              text-align: left;
+              width: 124rpx;
+              height: 64rpx;
+              border-radius: 10rpx;
+              border: 2rpx solid #e3e3e3;
+              text-align: center;
             }
-            .close-icon {
-              width: 26rpx;
-              height: 28rpx;
-              display: block;
+            .endText {
+              margin-left: 20rpx;
+              font-size: 30rpx;
+              font-family: PingFangSC-Regular, PingFang SC;
+              font-weight: 400;
+              color: #333333;
             }
           }
-          
         }
       }
     }
   }
 
   .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 +365,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 +374,7 @@ export default {
       font-family: PingFangSC-Medium, PingFang SC;
       font-weight: 500;
       color: #999999;
-    } 
+    }
 
     .opration-button {
       width: 318rpx;
@@ -257,17 +386,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>

+ 411 - 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,312 @@
     </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"
+              @change="changeMaterialNumber(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,
+  getAgentRegisterLastInfo,
+} 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
+    StepTabbar,
   },
-  computed: {
-  },
-  data () {
+  data() {
     return {
+      show: false, // 提交成功弹窗
       showAreaPicker: false,
       staticImg,
       areaList: Object.freeze(areaList),
       form: {
-        address: '请选择所在地区',
-        detailAddress: '',
-        organizer: '',
-        undertaker: '',
+        competitionChildId: "",
+        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: [],
+      },
+    };
+  },
+  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) {
+    if (options && options.competitionId) {
+      this.form.competitionChildId = options.competitionId;
     }
   },
-  created () {
+  async onReady() {
+    await this.getAgentRegisterLastInfo();
+  },
+  onShow() {
+    uni.getStorage({
+      key: "formData",
+      success: (res) => {
+        console.log("success", res.data);
+        this.form = res.data;
+      },
+      fail: (res) => {
+        console.log(res, "fail");
+      },
+    });
   },
   methods: {
-    clearFormItem (key) {
-      this.form[key] = ''
+    // 查询上一次报名基本信息
+    async getAgentRegisterLastInfo() {
+      const { data, msg, status } = await getAgentRegisterLastInfo();
+      if (status === 200 && data) {
+        // console.log(data, "getAgentRegisterLastInfo");
+        const obj = {
+          district: data.district,
+          unit: data.unit,
+          unitPrincipal: data.unitPrincipal,
+          detailAddress: data.detailAddress,
+        };
+        Object.assign(this.form, obj);
+        // console.log(this.form, "form");
+      }
+    },
+    changeMaterialNumber(key, value) {
+      key.number = value;
+      this.$forceUpdate();
+    },
+    // 去添加园所
+    handleGoSchoolInfo() {
+      uni.setStorage({
+        key: "formData",
+        data: this.form,
+        success: () => {
+          console.log("form保存成功");
+        },
+      });
+      uni.redirectTo({
+        url: `/pages/competitionRegister/addSchool`,
+      });
+    },
+    // 预料包数量小于50时,强制改成50  @blur="handleInputBlur(material, $event.target.value)"
+    // 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;
+      });
+    },
+    beforeSubmit() {
+      let total = 0;
+      this.form.materialList.map((item) => {
+        if (item.isShow) total += item.number * 1;
+      });
+      if (total < 50) {
+        Tip.error("预定物料包数量总和不得低于50套");
+        return false;
+      } else {
+        return true;
+      }
+    },
+    // 提交海选报名
+    async submitAgentRegister() {
+      if (!this.beforeSubmit()) return;
+      const materialList = this.form.materialList.filter((item) => {
+        if (item.isShow) {
+          return item;
+        }
+      });
+      const params = {
+        ...this.form,
+        materialList,
+      };
+      const { data, msg, status } = await submitAgentRegister(params);
+      if (status === 200) {
+        this.show = true;
+        uni.removeStorage({
+          key: "formData",
+          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';
+<style lang="less" scoped>
+@import "@/utils/utils.less";
 
 .collect-information {
   padding-bottom: 200rpx;
@@ -225,17 +408,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 +441,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 +470,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 +535,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 +565,7 @@ export default {
               margin-right: 10rpx;
             }
             .clazz {
-              color: #5F87F0;
+              color: #5f87f0;
             }
           }
         }
@@ -354,7 +576,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 +586,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.redirectTo({
+          url: `/pages/competitionRegister/index?competitionId=${this.competitionId}`,
+        });
+      }
+    },
+    // 下一步
+    handleNext() {
+      uni.redirectTo({
+        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;
     }
   }

+ 317 - 40
src/pages/competitionRegister/index.vue

@@ -1,70 +1,253 @@
 <template>
   <view class="competition-register">
-
     <!-- 注册步骤条 -->
-    <step-register />
+    <step-register isStepOne />
 
-    <view class="program-text" >
-      <view class="program-title" >
-        签署纲领
-      </view>
-      <view class="program-content" >
-        联系在线客服,下载第17届“逻辑狗杯”全国儿童思维魔法嘉年华《共同行动纲领》,在线下载-打印-签署、盖章-邮寄。
+    <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.recipient }}</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.phone }}</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.address }}</view>
         </view>
       </view>
     </view>
-    <view class="customer-service" >
-      在线领取
+    <view class="customer-service" @click="handleOpenFile">
+      下载《共同行动纲领》
     </view>
 
-    <step-tabbar 
-      isStepOne
-    />
+    <step-tabbar isStepOne submitIsShow :competitionId="competitionId" />
+
+    <!-- 纲领弹窗 -->
+    <van-overlay :show="programShow">
+      <view class="wrapper">
+        <view class="block">
+          <image
+            :src="staticImg.closeBtn"
+            class="closeBtn"
+            @click="handleReturnHome"
+          />
+          <view class="programContent">
+            <view class="programTitle">
+              第17届“逻辑狗杯”全国儿童思维魔法嘉年华——联办协议
+            </view>
+            
+            <scroll-view scroll-y="true" class="programText">
+              <view class="em2">为了给儿童成长提供良好的环境,打造智能+体能游戏新空间,营造教育新生态,第17届“逻辑狗杯”全国儿童思维魔法嘉年华,首创“科体融合,智体共育”的活动模式,以锻炼强健体魄,培养最强大脑,成就具有文化自信的中华宝贝为目标,唤醒孩子的好奇心,培养孩子乐群能力,团队协调能力,让孩子拥有开放热情的性格,带着想象与热爱去探究世界,成就有梦想的未来。</view>
+              <view>甲方:第17届“逻辑狗杯”全国儿童思维魔法嘉年华组委会</view>
+              <view>乙方:</view>
+              <view class="em2"
+                >本协议一经甲乙双方签署,乙方即成为甲方【第17届“逻辑狗杯”全国儿童思维魔法嘉年华】2022年5月15日至7月10日_______站(城市)承办单位,负责组织、运营在该地区的园所/专柜嘉年华,表明双方同意本协议所列全部内容。本协议签署之前双方的任何口头或书面交流及沟通与本协议不一致的,均以本协议为准。</view
+              >
+              <view class="em2">参与资格:</view>
+              <view class="em2"
+                >1、乙方须为甲方签约合作教育机构,以此联合协议为活动准则,负责当地园所/专柜与地区活动组织工作;</view
+              >
+              <view class="em2">2、报名选手须为甲方出品的所有产品的直接使用用户;</view>
+              <view class="em2">3、当地报名选手人数须200人起。</view>
+              <view class="em2">4、统一报名方式:</view>
+              <view class="em2">1)	扫码进入思维芯精英俱乐部</view>
+              <view class="em2">2)	进入教学俱乐部,点击“逻辑狗杯”全国儿童思维魔法嘉年华报名入口</view>
+              <view class="em2">3)	点击进入第17届报名入口</view>
+              <view class="em2">4)	报名第一步-签署《联办协议》下载/签署</view>
+              <view class="em2">5)	报名第二步-填写地区承办信息,填写完成后点击“提交”按钮,完成报名</view>
+              <view class="em2"
+                >为明确甲乙双方在活动运营上的责任权利和义务关系,在自愿、平等、互利的基础上,甲乙双方本着精诚合作、共同发展的原则,特制定本协议,以期甲乙双方共同遵守:</view
+              >
+              <view>一、本届活动统一名称</view>
+              <view class="em2">统一名称:</view>
+              <view class="em2">第17届“逻辑狗杯”全国儿童思维魔法嘉年华</view>
+              <view class="em2">地区名称:</view>
+              <view class="em2">第17届“逻辑狗杯”全国儿童思维魔法嘉年华——站(城市)</view>
+              <view>二、活动组织</view>
+              <view class="em2">1、本次活动由北京中德智慧教育文化有限公司全程支持,北京思维魔法教育科技有限公司全程提供技术支持与服务。</view>
+              <view class="em2">2、全国各地签约合作教育机构</view>
+              <view>三、双方权利与义务</view>
+              <view class="em2">(一)甲方的权利与义务</view>
+              <view class="em2">1、甲方拥有与活动相关的一切权利,并有权通过合法程序将其中的部分或全部权利授权给其他单位、团体或个人;</view>
+              <view class="em2">2、甲方负责活动整体方案的制定和活动的监督、管理与指导;</view>
+              <view class="em2">3、甲方拥有对活动合作单位与所承办活动有关一切活动的管理监督权;</view>
+              <view class="em2">4、甲方可根据实际情况决定活动项目设置,制定活动奖励形式;</view>
+              <view class="em2">5、甲方负责活动组织物料的设计、制作和各授权地区的活动物料配发;</view>
+              <view class="em2">6、甲方负责全国嘉年华的组织和承办;</view>
+              <view class="em2">7、甲方负责活动商业宣传、推广,有义务通过商业活动、公益活动、广告宣传提高活动的知名度和美誉度,维护活动品牌形象;</view>
+              <view class="em2">8、甲方拥有第17届“逻辑狗杯”全国儿童思维魔法嘉年华的最终解释权。</view>
+              <view class="em2">(二)乙方的权利与义务</view>
+              <view class="em2">1、乙方积极推动3~7岁儿童广泛参与并有规模地组织开展本届活动,全力传播国际化思维教育科学理念及其教育内容;</view>
+              <view class="em2">2、乙方自行负责当地活动的宣传、组织、实施、活动安全等,并对当地的活动结果负责,有义务告知参与家庭注意事项及其所承担的责任;</view>
+              <view class="em2">3、参加全国嘉年华,乙方须派领队一名带队参加全国嘉年华活动,参加全国嘉年华地区选手及陪同家长的一应事宜,由领队负责管理,同时,选手家长负责参与活动人员及家长在途和全国嘉年华现场之外的一切安全问题;</view>
+              <view class="em2">4、乙方地区嘉年华于2022年5月15日—7月10日举行,活动结束后向组织单位提交详细的活动工作成果物(文字、照片及视频)用于本次活动宣传与推广,须将活动结果在三日内告知甲方;乙方派出各年龄组晋级选手1名参加2022年7月底举行的全国嘉年华及相关活动;</view>
+              <view class="em2">5、乙方参与选手须在甲方提供的全国统一报名通道进行线上登记报名,获得官方认可的唯一选手识别码,并凭此识别码参加园所/专柜嘉年华、地区嘉年华和全国嘉年华;</view>
+              <view class="em2">6、乙方组织的园所/专柜嘉年华和地区嘉年华须按照甲方制定的活动方案进行,具体活动规则要求请查阅附件。如有特殊情况需调整活动规则须以书面形式向甲方呈报,经甲方审议通过后方可执行;</view>
+              <view class="em2">7、乙方决选出参加全国嘉年华活动的选手,须提供符合参加活动岁段的身份证明,同时出具该选手在地区嘉年华中最终晋级的公示证明材料,如晋级选手主动放弃参加全国嘉年华资格,则须该选手监护人出具书面证明表示弃权;</view>
+              <view class="em2">8、各城市站的活动费用由乙方负责。全国嘉年华收取相应活动物料费用(包含每位选手的活动费和一名监护人的会务费),由甲方统一提供的唯一指定报名入口缴纳;</view>
+              <view class="em2">9、乙方征集的活动各级赞助商企业及品牌不得与组织单位赞助商相冲突,征集前须将潜在赞助商名称和赞助意向书面报组织单位批准,获得组织单位批准后方可与赞助商签订赞助协议;</view>
+              <view class="em2">10、在本届嘉年华整体活动中,如乙方未与甲方沟通擅自改动本协议中的相关规定,则甲方有权取消本年度乙方呈报选手活动资格并取消下一年度乙方在所在地区承办活动的权利;</view>
+              <view class="em2">11、疫情当前,乙方须严格遵守当地防疫防控相关政策,如乙方自行违背政策,乙方须全权承担相应法律后果。</view>
+              <view>四、双方承诺</view>
+              <view class="em2">本着公平、公正、公开原则,保证全国嘉年华的透明性与公正性,给每个孩子一个平等的挑战自我的机会。</view>
+              <view>五、协议的变更与解除</view>
+              <view class="em2">甲、乙双方经友好协商达成一致,如需变更须征得双方同意,如协商不成,可向北京市朝阳区人民法院法院提起诉讼。</view>
+              <view>六、协议生效、终止及续约</view>
+              <view
+                >本协议须甲乙双方签字及加盖公章后,即具法律效力,双方约定本协议有效期为2022年5月1日起-7月31日止。</view
+              >
+              <view>本协议一式二份,双方各执一份,均具有同等法律效力,本协议未尽事宜可另订附件,附件与本协议具有同等法律效力。</view>
+              <view>第17届“逻辑狗杯”全国儿童思维魔法嘉年华组委会</view>
+              <view>甲方:</view>
+              <view>乙方:</view>
+              <view>2022年____月____日</view>
+            </scroll-view>
+            <view class="programCondition">
+              <image
+                class="programConditionBtn"
+                :src="agreeOrNot ? staticImg.selectBtn : staticImg.noSelectBtn"
+                @click.stop="handleChangeAgreeImg"
+              />
+              <view class="programConditionContent">
+                我已阅读第17届“逻辑狗杯”全国儿童思维魔法嘉年华
+                <view>《共同行动纲领》</view>
+              </view>
+            </view>
+            <view
+              :class="['agreeAndGoBtn', agreeOrNot ? '' : 'op3']"
+              @click.stop="handleAgree"
+            >
+              同意并继续
+            </view>
+          </view>
+        </view>
+      </view>
+    </van-overlay>
   </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')
-}
+  closeBtn: require("@/static/competitionRegister/common/closeBtn.png"),
+  copyIcon: require("@/static/competitionRegister/index/copy-button.png"),
+  selectBtn: require("@/static/competitionRegister/index/selectBtn.png"),
+  noSelectBtn: require("@/static/competitionRegister/index/noSelectBtn.png"),
+};
+
 export default {
-  name: 'competition-register',
+  name: "competition-register",
   components: {
     StepRegister,
-    StepTabbar
+    StepTabbar,
   },
-  data () {
+  data() {
     return {
-      staticImg
-    }
-  }
-}
+      // 这个信息是从接口获取的
+      addressInfo: {},
+      staticImg,
+      competitionId: "",
+      programShow: true,
+      agreeOrNot: false,
+    };
+  },
+  onLoad(options) {
+    this.competitionId = options.competitionId;
+    this.getAgentProgramAddress();
+    uni.removeStorage({
+      key: "formData",
+      success: function (res) {
+        console.log("已经移除内存中的schoolList");
+      },
+    });
+  },
+  methods: {
+    handleChangeAgreeImg() {
+      this.agreeOrNot = !this.agreeOrNot;
+    },
+    // 同意并继续
+    handleAgree() {
+      if (!this.agreeOrNot) return;
+      this.programShow = false;
+    },
+    // 返回首页
+    handleReturnHome() {
+      uni.reLaunch({
+        url: "/pages/user/index",
+      });
+      this.programShow = false;
+    },
+    // 打开纲领文件
+    handleOpenFile() {
+      uni.downloadFile({
+        url: this.addressInfo.program,
+        success: function (res) {
+          const filePath = res.tempFilePath;
+          uni.openDocument({
+            filePath: filePath,
+            showMenu: true,
+            success: function (res) {
+              console.log("打开文档成功");
+            },
+          });
+        },
+      });
+    },
+    // 获取纲领地址
+    async getAgentProgramAddress() {
+      const { data, msg, status } = await getAgentProgramAddress();
+      if (status == 200) {
+        this.addressInfo = data;
+      } else {
+        Tip.error(msg);
+      }
+    },
+    // 打开逻辑狗商城小程序
+    handlePickUp() {
+      uni.navigateToMiniProgram({
+        appId: "wx01e79cb36b9436ee",
+        path: "pages/contact/index",
+        extraData: {},
+        success(res) {
+          // 打开成功
+          console.log(res, "成功");
+        },
+      });
+    },
+    // 复制内容到剪切板
+    setClipboardData() {
+      const address = `邮寄地址:收件人:${this.addressInfo.recipient},联系电话:${this.addressInfo.phone},收货地址:${this.addressInfo.address}。`;
+      uni.setClipboardData({
+        data: address,
+        success: function () {
+          // Tip.success("复制成功!");
+          console.log("复制成功!");
+        },
+      });
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
@@ -97,7 +280,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 +309,7 @@ export default {
           font-size: 24rpx;
           font-family: PingFangSC-Regular, PingFang SC;
           font-weight: 400;
-          color: #4C75FF;
+          color: #4c75ff;
         }
       }
     }
@@ -161,7 +344,7 @@ export default {
     margin-top: 64rpx;
     width: 586rpx;
     height: 88rpx;
-    background: #638AFD;
+    background: #638afd;
     border-radius: 44rpx;
     display: flex;
     justify-content: center;
@@ -169,8 +352,102 @@ export default {
     font-size: 34rpx;
     font-family: PingFangSC-Regular, PingFang SC;
     font-weight: 400;
-    color: #FFFFFF;
+    color: #ffffff;
+  }
+}
+
+.wrapper {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  height: 100vh;
+}
+
+.block {
+  position: relative;
+  background: #ffffff;
+  border-radius: 20rpx;
+  .closeBtn {
+    position: absolute;
+    top: 40rpx;
+    right: 40rpx;
+    z-index: 999;
+    width: 24rpx;
+    height: 24rpx;
+    object-fit: cover;
+  }
+  .programContent {
+    width: 686rpx;
+    // height: 1154rpx;
+    background: #ffffff;
+    border-radius: 24rpx;
+    box-sizing: border-box;
+    .programTitle {
+      margin: 74rpx auto 0;
+      width: 614rpx;
+      font-size: 38rpx;
+      font-family: PingFangSC-Medium, PingFang SC;
+      font-weight: 550;
+      color: #333333;
+      line-height: 52rpx;
+      text-align: center;
+    }
+    .programText {
+      margin: 26rpx auto 32rpx;
+      width: 590rpx;
+      height: 672rpx;
+      font-size: 26rpx;
+      font-family: PingFangSC-Medium, PingFang SC;
+      font-weight: 500;
+      color: #181818;
+      line-height: 48rpx;
+    }
+    .programCondition {
+      display: flex;
+      justify-content: space-between;
+      margin: 0 auto;
+      width: 590rpx;
+      .programConditionBtn {
+        width: 32rpx;
+        height: 32rpx;
+        object-fit: cover;
+      }
+      .programConditionContent {
+        width: 542rpx;
+        height: 68rpx;
+        font-size: 24rpx;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #666666;
+        line-height: 34rpx;
+        text-align: center;
+        view {
+          display: inline;
+          color: #547ffc;
+        }
+      }
+    }
+    .agreeAndGoBtn {
+      margin: 34rpx auto 56rpx;
+      width: 282rpx;
+      height: 76rpx;
+      line-height: 76rpx;
+      background: linear-gradient(130deg, #466efc 0%, #84bdfc 100%);
+      border-radius: 42rpx;
+      font-size: 30rpx;
+      font-family: PingFangSC-Regular, PingFang SC;
+      font-weight: 400;
+      color: #ffffff;
+      text-align: center;
+    }
+    .op3 {
+      opacity: 0.3;
+    }
+    
+  }
+
+  .em2 {
+    text-indent: 2em;
   }
-  
 }
 </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;

+ 279 - 0
src/pages/competitionRegister/selectSchool.vue

@@ -0,0 +1,279 @@
+<template>
+  <view class="selectSchool">
+    <view class="schoolList">
+      <view class="schoolItem" v-for="item in schoolList" :key="item.id">
+        <image
+          :src="item.isSelect ? staticImg.selectBtn : staticImg.noSelectBtn"
+          class="selectBtn"
+          @click="changeSelectState(item)"
+        />
+        <view class="schoolItemContent">
+          <view class="schoolItemName">
+            <view class="label">园所名称</view>
+            <view class="value">{{ item.schoolName }}</view>
+          </view>
+          <view class="schoolItemName">
+            <view class="label">园长姓名</view>
+            <view class="value">{{ item.principalName }}</view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="selectSchoolFooter">
+      <div class="footerContent">
+        <image
+          :src="allIsSelect ? staticImg.allSelectBtn : staticImg.allNoSelectBtn"
+          class="allSelectBtn"
+          @click="allSelect"
+        />
+        <view class="allSelectText" @click="allSelect">全选</view>
+        <view class="toInvite" @click="toInvite">邀请幼儿园加入</view>
+        <view class="confirmBtn" @click="confirm">
+          <view>确定</view>
+          <view v-if="selectNum > 0" class="selectNum">
+            (已选择:{{ selectNum }})
+          </view>
+        </view>
+      </div>
+    </view>
+  </view>
+</template>
+
+<script>
+import Tip from "@/utils/tip.js";
+import { getDistrictGarden } from "@/api/districtGarden.js";
+const staticImg = {
+  selectBtn: require("@/static/competitionRegister/index/selectBtn.png"),
+  noSelectBtn: require("@/static/competitionRegister/index/noSelectBtn.png"),
+  allNoSelectBtn: require("@/static/competitionRegister/index/allNoSelectBtn.png"),
+  allSelectBtn: require("@/static/competitionRegister/index/allSelectBtn.png"),
+};
+export default {
+  name: "SelectSchool", // 选择幼儿L园
+  data() {
+    return {
+      staticImg,
+      schoolList: [],
+      allIsSelect: false,
+      selectNum: 0,
+      selectSchoolList: [],
+    };
+  },
+  async onLoad(options) {
+    await this.getDistrictGarden();
+    if (options.schoolList) {
+      const schoolList = JSON.parse(decodeURIComponent(options.schoolList));
+      schoolList.map((item) => {
+        const index = this.schoolList.findIndex((i) => i.id === item.schoolId);
+        this.changeSelectState(this.schoolList[index]);
+      });
+      this.selectSchoolList = schoolList;
+    }
+  },
+  methods: {
+    toInvite() {
+      uni.reLaunch({
+        url: "/pages/invitePage/index",
+      });
+    },
+    confirm() {
+      uni.redirectTo({
+        url: `/pages/competitionRegister/addSchool?schoolList=${encodeURIComponent(
+          JSON.stringify(this.selectSchoolList)
+        )}`,
+      });
+    },
+    setSelectSchoolList() {
+      let list = this.schoolList.map((item) => {
+        if (item.isSelect)
+          return {
+            schoolId: item.id,
+            schoolName: item.schoolName,
+          };
+      });
+      list = list.filter((item) => item);
+      list.forEach((item) => {
+        const index = this.selectSchoolList.findIndex(
+          (i) => i.schoolId === item.schoolId
+        );
+        if (index !== -1) {
+          item.totalPerson = this.selectSchoolList[index].totalPerson;
+        }
+      });
+      this.selectSchoolList = list;
+    },
+    // 全选
+    allSelect() {
+      this.allIsSelect = !this.allIsSelect;
+      this.addSchoolIsSelect(this.allIsSelect);
+      if (this.allIsSelect) {
+        this.selectNum = this.schoolList.length;
+      } else {
+        this.selectNum = 0;
+      }
+    },
+    // 改变选中状态
+    changeSelectState(val) {
+      val.isSelect = !val.isSelect;
+      if (val.isSelect) {
+        this.selectNum++;
+      } else {
+        this.selectNum--;
+      }
+      if (this.selectNum === this.schoolList.length) {
+        this.allIsSelect = true;
+      } else {
+        this.allIsSelect = false;
+      }
+      this.setSelectSchoolList();
+      this.$forceUpdate();
+    },
+    // 给每个幼儿园添加选中状态
+    addSchoolIsSelect(state) {
+      this.schoolList.forEach((item) => {
+        item.isSelect = state;
+      });
+      this.setSelectSchoolList();
+      this.$forceUpdate();
+    },
+    // 获取幼儿园列表
+    async getDistrictGarden() {
+      Tip.loading("加载中");
+      const params = {
+        page: 1,
+        pageSize: 10000,
+      };
+      const { data, status, msg } = await getDistrictGarden(params);
+      Tip.loaded();
+      if (status === 200) {
+        const { entityList } = data;
+        this.schoolList = entityList;
+        this.addSchoolIsSelect(false);
+      } else {
+        Tip.error(msg);
+      }
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.selectSchool {
+  min-height: 100vh;
+  .schoolList {
+    padding-bottom: 240rpx;
+    .schoolItem {
+      display: flex;
+      align-items: center;
+      padding: 0 36rpx;
+      margin: 28rpx auto 0;
+      width: 686rpx;
+      height: 198rpx;
+      background: #ffffff;
+      box-shadow: 0px 0px 44rpx 0px rgba(226, 226, 226, 0.58);
+      border-radius: 20rpx;
+      box-sizing: border-box;
+      .selectBtn {
+        display: block;
+        width: 44rpx;
+        height: 44rpx;
+        object-fit: cover;
+      }
+      .schoolItemContent {
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+        margin-left: 38rpx;
+        height: 118rpx;
+        .schoolItemName {
+          display: flex;
+          .label {
+            width: 120rpx;
+            height: 44rpx;
+            font-size: 30rpx;
+            font-family: PingFangSC-Medium, PingFang SC;
+            font-weight: 500;
+            color: #777777;
+            line-height: 44rpx;
+          }
+          .value {
+            margin-left: 48rpx;
+            height: 44rpx;
+            font-size: 30rpx;
+            font-family: PingFangSC-Regular, PingFang SC;
+            font-weight: 400;
+            color: #333333;
+            line-height: 44rpx;
+          }
+        }
+      }
+    }
+  }
+  .selectSchoolFooter {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    width: 100vw;
+    height: 212rpx;
+    background: #ffffff;
+    box-shadow: 0px -14rpx 20rpx 0px rgba(152, 152, 152, 0.05);
+    border-radius: 40rpx 40rpx 0px 0px;
+    .footerContent {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      width: 100vw;
+      height: 146rpx;
+      .allSelectBtn {
+        display: block;
+        width: 38rpx;
+        height: 38rpx;
+        object-fit: cover;
+      }
+      .allSelectText {
+        padding-left: 12rpx;
+        margin-right: 24rpx;
+        width: 72rpx;
+        height: 42rpx;
+        font-size: 30rpx;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #666666;
+        line-height: 42rpx;
+        box-sizing: border-box;
+      }
+      .toInvite {
+        width: 260rpx;
+        height: 90rpx;
+        line-height: 90rpx;
+        border-radius: 46rpx;
+        border: 2rpx solid #507bfc;
+        font-size: 30rpx;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #507bfc;
+        text-align: center;
+      }
+      .confirmBtn {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        margin-left: 20rpx;
+        width: 260rpx;
+        height: 90rpx;
+        background: #507bfc;
+        border-radius: 46rpx;
+        font-size: 30rpx;
+        color: #ffffff;
+        text-align: center;
+        .selectNum {
+          font-size: 22rpx;
+          font-family: PingFangSC-Medium, PingFang SC;
+          font-weight: 500;
+          color: #ffffff;
+        }
+      }
+    }
+  }
+}
+</style>

+ 515 - 0
src/pages/districtGarden/detail.vue

@@ -0,0 +1,515 @@
+<template>
+  <view :class="['schoolDetail', isEdit ? '' : 'schoolDetailLong']">
+    <view
+      class="schoolBGI"
+      :style="{
+        backgroundImage: `url(${
+          schoolDetail && schoolDetail.schoolImg
+            ? staticImg.defaultSchoolDetail
+            : staticImg.defaultSchoolDetail
+        })`,
+      }"
+    >
+      <image class="schoolInfoBGI" :src="staticImg.schoolInfoBGI" alt="" />
+      <view class="schoolName">{{ schoolDetail.schoolName }}</view>
+      <view class="address">
+        <text v-for="txt in schoolDetail.regionList" :key="txt.code">{{
+          txt.name
+        }}</text>
+        <text>{{ schoolDetail.address.address }}</text>
+      </view>
+    </view>
+    <view class="schoolInfo">
+      <view class="infoItem" v-for="item in fieldList" :key="item.id">
+        <view :class="['label', isEdit ? 'editLabel' : '']"
+          >{{ item.label }}:</view
+        >
+        <view :class="['value', isEdit ? 'editValue' : '']">{{
+          schoolDetail[item.key]
+        }}</view>
+      </view>
+      <view class="infoItem productInfo">
+        <view class="label">使用产品:</view>
+        <!-- <template v-if="!isEdit">
+          <view class="value productList" v-if="productIsNull">
+            <template v-for="pro in schoolDetail.courseNames">
+              <view v-if="pro.use" class="product" :key="pro.cardId">{{
+                pro.cardName
+              }}</view>
+            </template>
+          </view>
+          <view v-else class="value productList">
+            <view class="product">无</view>
+          </view>
+        </template> -->
+      </view>
+
+      <!-- 使用产品列表 -->
+      <view class="cardList">
+        <view
+          class="card"
+          v-for="item in schoolDetail.courseNames"
+          :key="item.cardId"
+          @click="selectCard(item)"
+        >
+          <image
+            v-if="isEdit"
+            :src="item.use ? staticImg.selectBtn : staticImg.noSelectBtn"
+            class="allSelectBtn"
+          />
+          <text>{{ item.cardName }}</text>
+        </view>
+      </view>
+    </view>
+
+    <view
+      :class="['btn', 'editBtn', isEdit ? 'saveBtn' : '']"
+      @click="handleClick"
+    >
+      {{ isEdit ? "保存" : "编辑" }}
+    </view>
+    <view v-if="!isEdit" class="btn cancelBtn" @click="show = true">
+      取消合作
+    </view>
+
+    <popup :show="show" @close="show = false">
+      <view class="popupBox">
+        <image
+          :src="staticImg.closeBtnImg"
+          class="closeBtn"
+          @click="show = false"
+        ></image>
+        <h1 class="title">取消合作</h1>
+        <view class="remind firstLine">确认取消合作?取消合作后,</view>
+        <view class="remind secondLine">该园所不再享有家园共育服务特权。</view>
+        <view class="btn">
+          <button class="cancel" @click="show = false">取消</button>
+          <button class="confirm" @click="confirmDeleteSchoolRelation">
+            确定
+          </button>
+        </view>
+      </view>
+    </popup>
+  </view>
+</template>
+
+<script>
+import Popup from "@/components/popup/index";
+import Tip from "@/utils/tip.js";
+import {
+  querySchoolDetail,
+  deleteSchoolRelation,
+  updateSchoolRelation,
+} from "@/api/districtGarden";
+const fieldList = [
+  {
+    id: 1,
+    label: "园长",
+    key: "principalName",
+  },
+  {
+    id: 2,
+    label: "手机号",
+    key: "phone",
+  },
+  {
+    id: 3,
+    label: "班级数量",
+    key: "classCount",
+  },
+  {
+    id: 4,
+    label: "教职工数量",
+    key: "teachUserCount",
+  },
+  {
+    id: 5,
+    label: "学生数量",
+    key: "studentCount",
+  },
+];
+
+const staticImg = {
+  defaultSchoolDetail: require("@/static/image/defaultSchoolDetail.png"),
+  schoolInfoBGI: require("@/static/image/schoolInfoBGI.png"),
+  closeBtnImg: require("@/static/image/closeBtn.png"),
+  selectBtn: require("@/static/image/selectBtn.png"),
+  noSelectBtn: require("@/static/image/noSelectBtn.png"),
+};
+
+export default {
+  name: "detail",
+  data() {
+    return {
+      staticImg,
+      fieldList,
+      schoolDetail: {},
+      isEdit: false, // 是否是编辑状态
+      show: false,
+      id: "",
+    };
+  },
+  components: {
+    Popup,
+  },
+  computed: {
+    // 有无正在使用的合作产品
+    productIsNull() {
+      if (
+        this.schoolDetail &&
+        Array.isArray(this.schoolDetail.courseNames) &&
+        this.schoolDetail.courseNames.length !== 0
+      ) {
+        return this.schoolDetail.courseNames.filter((i) => i.use).length !== 0;
+      } else {
+        return false;
+      }
+    },
+  },
+  async onLoad(options) {
+    const { id } = options;
+    this.id = id;
+    await this.querySchoolDetail(id);
+  },
+  methods: {
+    async updateSchoolRelation() {
+      let arr = [];
+      this.schoolDetail.courseNames.map((item) => {
+        if (item.use) arr.push(item.cardId);
+      });
+      const params = {
+        id: this.schoolDetail.id,
+        cardIds: arr,
+      };
+      Tip.loading("加载中");
+      const { data, msg, status } = await updateSchoolRelation(params);
+      Tip.loaded();
+      if (status === 200) {
+        Tip.success(msg);
+        this.querySchoolDetail(this.id);
+      } else {
+        Tip.error(msg);
+      }
+    },
+    // 切换合作课程选中状态
+    selectCard(val) {
+      val.use = !val.use;
+    },
+    handleClick() {
+      this.isEdit = !this.isEdit;
+      if (!this.isEdit) {
+        // 保存操作
+        console.log("保存操作");
+        this.updateSchoolRelation();
+      }
+    },
+    // 取消合作
+    async confirmDeleteSchoolRelation() {
+      await this.deleteSchoolRelation(this.schoolDetail.id);
+      this.show = false;
+      uni.navigateBack({
+        delta: 1,
+      });
+    },
+    async deleteSchoolRelation(schoolId) {
+      Tip.loading("加载中");
+      const { data, msg, status } = await deleteSchoolRelation(schoolId);
+      Tip.loaded();
+      if (status === 200) {
+        Tip.success(msg);
+      } else {
+        Tip.error(msg);
+      }
+    },
+    // 获取园所详情
+    async querySchoolDetail(id) {
+      Tip.loading("加载中");
+      const { data, msg, status } = await querySchoolDetail(id);
+      Tip.loaded();
+      if (status === 200) {
+        // console.log(data, "querySchoolDetail");
+        this.schoolDetail = data;
+        uni.setNavigationBarTitle({
+          title: data.schoolName,
+        });
+      } else {
+        Tip.error(msg);
+      }
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.schoolDetail {
+  min-height: 100vh;
+  background-color: #f5f6fa;
+  box-sizing: border-box;
+  overflow: hidden;
+  .schoolBGI {
+    position: relative;
+    margin: 52rpx auto 30rpx;
+    width: 686rpx;
+    height: 346rpx;
+    background-size: cover;
+    background-repeat: no-repeat;
+    background-position: center;
+    border-radius: 40rpx;
+    overflow: hidden;
+
+    .schoolInfoBGI {
+      position: absolute;
+      top: 0;
+      left: 0;
+      display: block;
+      width: 100%;
+      height: 100%;
+      object-fit: cover;
+    }
+
+    .schoolName {
+      position: relative;
+      z-index: 3;
+      margin: 32rpx;
+      margin-bottom: 18rpx;
+      height: 60rpx;
+      font-size: 44rpx;
+      font-family: PingFangSC-Semibold, PingFang SC;
+      font-weight: 600;
+      color: #ffffff;
+      line-height: 60rpx;
+      text-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.16);
+    }
+
+    .address {
+      position: relative;
+      z-index: 3;
+      margin-left: 32rpx;
+      height: 28rpx;
+      font-size: 30rpx;
+      font-family: PingFangSC-Regular, PingFang SC;
+      font-weight: 550;
+      color: #ffffff;
+      line-height: 28rpx;
+      text-shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.16);
+    }
+  }
+
+  .schoolInfo {
+    margin: 0 auto;
+    padding: 50rpx 36rpx 50rpx 40rpx;
+    width: 686rpx;
+    background: #ffffff;
+    box-shadow: 0 6rpx 20rpx 0 rgba(235, 235, 235, 0.5);
+    border-radius: 20rpx;
+    box-sizing: border-box;
+
+    .infoItem {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      margin-bottom: 56rpx;
+      .label {
+        height: 28rpx;
+        font-size: 32rpx;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #666666;
+        line-height: 28rpx;
+      }
+      .editLabel {
+        font-weight: 550;
+        color: #333333;
+      }
+      .value {
+        width: 400rpx;
+        height: 28rpx;
+        font-size: 28rpx;
+        font-family: PingFangSC-Medium, PingFang SC;
+        font-weight: 550;
+        color: #333333;
+        line-height: 28rpx;
+        text-align: right;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      .editValue {
+        color: #666666;
+        font-weight: 400;
+      }
+    }
+
+    .infoItem:last-child {
+      margin-bottom: 0;
+    }
+
+    .productInfo {
+      align-items: flex-start;
+
+      .productList {
+        width: 400rpx;
+        height: auto;
+        text-overflow: none;
+        white-space: normal;
+
+        .product {
+          margin-bottom: 24rpx;
+          height: auto;
+          line-height: 42rpx;
+        }
+
+        .product:last-child {
+          margin-bottom: 0;
+        }
+      }
+    }
+
+    .cardList {
+      margin-top: -4rpx;
+      .card {
+        display: flex;
+        align-items: center;
+        margin-bottom: 24rpx;
+
+        .allSelectBtn {
+          margin-right: 10rpx;
+          display: block;
+          width: 32rpx;
+          height: 32rpx;
+          object-fit: cover;
+        }
+        text {
+          height: 42rpx;
+          font-size: 28rpx;
+          font-family: PingFangSC-Regular, PingFang SC;
+          font-weight: 400;
+          color: #333333;
+          line-height: 42rpx;
+        }
+      }
+
+      .card:last-child {
+        margin-bottom: 0;
+      }
+    }
+  }
+
+  .btn {
+    position: fixed;
+    left: 50%;
+    width: 586rpx;
+    height: 84rpx;
+    line-height: 84rpx;
+    transform: translateX(-50%);
+    font-size: 32rpx;
+    text-align: center;
+    border-radius: 84rpx;
+    font-family: PingFangSC-Medium, PingFang SC;
+    font-weight: 500;
+  }
+
+  .editBtn {
+    bottom: 212rpx;
+    color: #ffffff;
+    background: #1228b9;
+  }
+
+  .saveBtn {
+    bottom: 96rpx;
+  }
+
+  .cancelBtn {
+    bottom: 108rpx;
+    color: #ff5556;
+    border: 1px solid #ff5556;
+  }
+
+  .popupBox {
+    position: relative;
+    top: -50rpx;
+    width: 686rpx;
+    height: 542rpx;
+    background: #ffffff;
+    border-radius: 24rpx;
+    overflow: hidden;
+
+    .closeBtn {
+      position: absolute;
+      top: 40rpx;
+      right: 40rpx;
+      display: block;
+      width: 26rpx;
+      height: 26rpx;
+      object-fit: cover;
+    }
+
+    .title {
+      margin-top: 60rpx;
+      height: 52rpx;
+      font-size: 38rpx;
+      font-family: PingFangSC-Medium, PingFang SC;
+      font-weight: 550;
+      color: #333333;
+      line-height: 52rpx;
+      text-align: center;
+    }
+
+    .remind {
+      height: 44rpx;
+      font-size: 32rpx;
+      font-family: PingFangSC-Regular, PingFang SC;
+      font-weight: 400;
+      color: #333333;
+      line-height: 44rpx;
+      text-align: center;
+    }
+
+    .firstLine {
+      margin-top: 74rpx;
+    }
+
+    .secondLine {
+      margin-top: 12rpx;
+    }
+
+    .btn {
+      position: absolute;
+      bottom: 60rpx;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+
+      .cancel {
+        width: 264rpx;
+        height: 84rpx;
+        line-height: 84rpx;
+        font-size: 32rpx;
+        font-family: PingFangSC-Medium, PingFang SC;
+        font-weight: 500;
+        color: #1228b9;
+        border-radius: 84rpx;
+        border: 2rpx solid #1228b9;
+        text-align: center;
+      }
+
+      .confirm {
+        width: 264rpx;
+        height: 84rpx;
+        line-height: 84rpx;
+        font-size: 32rpx;
+        font-family: PingFangSC-Medium, PingFang SC;
+        font-weight: 500;
+        color: #ffffff;
+        background: #1228b9;
+        text-align: center;
+        border-radius: 84rpx;
+      }
+    }
+  }
+}
+
+.schoolDetailLong {
+  padding-bottom: 316rpx;
+}
+</style>

+ 117 - 145
src/pages/districtGarden/index.vue

@@ -1,174 +1,146 @@
 <template>
-    <view class="DistrictGarden">
-        <custom-navbar title="我的地区园所" id="custom-navbar"/>
-        <!-- search -->
-        <view class="search">
-            <view class="search-btn" @click="jumpSearchPage">
-                搜索园所名称/园长姓名
-            </view>
-        </view>
-        <!-- 园所列表 -->
-          <!-- refresher-enabled -->
-        <scroll-view 
-            :scroll-y="true" 
-            class="scroll-view"
-            :style="{height: scrollViewHeight}"
-         
-            enable-back-to-top
-            @scrolltolower="scrolltolower"
-            >
-            <view class="garden-list">
-                 <garden-card :districtGardenData='districtGardenData'  />
-            </view>
-        </scroll-view>
+  <view class="DistrictGarden">
+    <custom-navbar title="我的地区园所" id="custom-navbar" />
+    <!-- search -->
+    <view class="search">
+      <view class="search-btn" @click="jumpSearchPage">
+        搜索园所名称/园长姓名
+      </view>
     </view>
+    <!-- 园所列表 -->
+    <!-- refresher-enabled -->
+    <scroll-view
+      :scroll-y="true"
+      class="scroll-view"
+      :style="{ height: scrollViewHeight }"
+      enable-back-to-top
+      @scrolltolower="scrolltolower"
+    >
+      <view class="garden-list">
+        <garden-card :districtGardenData="districtGardenData" />
+      </view>
+    </scroll-view>
+  </view>
 </template>
 
 <script>
-import CustomNavbar from '@/components/CustomNavbar'
-import { getNodeInfo } from '@/utils/wxTool.js'
-import { getDistrictGarden } from '@/api/districtGarden.js'
-import Tip from '@/utils/tip.js'
-const districtGardenData = Object.freeze([
-    {
-        id: 1,
-        createTime: '2020-09-09',
-        name: '流程帅哥21321',
-        label: '中德智慧幼儿圆',
-        city: '河北省唐山市朝阳区似的县',
-        classCount: 10,
-        staffCount: 20,
-        studentCount: 30,
-        phone: 18811361102
-    },
-    {
-        id: 2,
-        createTime: '2020-09-09',
-        name: '流程帅哥',
-        label: '中德智慧幼儿圆',
-        city: '河北省唐山市朝阳区似的县',
-        classCount: 10,
-        staffCount: 20,
-        studentCount: 30,
-        phone: 18811361102
-    },
-    {
-        id: 3,
-        createTime: '2020-09-09',
-        name: '流程帅哥',
-        label: '中德智慧幼儿圆',
-        city: '河北省唐山市朝阳区似的县',
-        classCount: 10,
-        staffCount: 20,
-        studentCount: 30,
-        phone: 18811361102
-    },
-])
+import CustomNavbar from "@/components/CustomNavbar";
+import { getNodeInfo } from "@/utils/wxTool.js";
+import { getDistrictGarden } from "@/api/districtGarden.js";
+import Tip from "@/utils/tip.js";
 export default {
-  name: 'DistrictGarden',
+  name: "DistrictGarden",
   components: {
-      CustomNavbar
+    CustomNavbar,
   },
   computed: {
-    scrollViewHeight  () {
-      return  this.$store.state.systemInfo.windowHeight - this.height - 44 + 'px'
+    scrollViewHeight() {
+      return (
+        this.$store.state.systemInfo.windowHeight - this.height - 44 + "px"
+      );
+    },
+  },
+  data() {
+    return {
+      districtGardenData: [],
+      height: "",
+      pegation: {
+        page: 1,
+        name: "",
+      },
+      ifOnShow: false,
+    };
+  },
+  onHide() {
+    this.ifOnShow = true;
+  },
+  onShow() {
+    if (this.ifOnShow) {
+      this.pegation.page = 1;
+      this.districtGardenData = [];
+      this.getDistrictGarden();
     }
   },
+  onLoad(options) {
+    this.getNodeInfo();
 
-  onLoad (options) {
-      this.getNodeInfo()
-    
-      const { name } = options
-        console.log(name, 'namenamename');
-        if (name) {
-          this.pegation.name = name
-        }
-        this.getDistrictGarden()
-  },
-  data () {
-      return {
-          districtGardenData: [],
-          height: '',
-          pegation: {
-              page: 1,
-              name: ''
-          }
-      }
+    const { name } = options;
+    if (name) {
+      this.pegation.name = name;
+    }
+    this.getDistrictGarden();
   },
   methods: {
-      scrolltolower (item) {
-          this.pegation.page ++
-          this.getDistrictGarden()
-      },
+    scrolltolower(item) {
+      this.pegation.page++;
+      this.getDistrictGarden();
+    },
     //   getDistrictGarden数据
-    async getDistrictGarden () {
-        Tip.loading('加载中')
-        const {data, status} = await getDistrictGarden({...this.pegation})
-        Tip.loaded()
-        // console.log('?????', data);
-        if (status === 200) {
-            const { entityList } = data
-            if (entityList.length === 0) {
-                this.pegation.page--
-                Tip.error('没有更多了')
-                return
-            }
-            this.districtGardenData.push(...Object.freeze(entityList))
+    async getDistrictGarden() {
+      Tip.loading("加载中");
+      const { data, status } = await getDistrictGarden({ ...this.pegation });
+      Tip.loaded();
+      // console.log('?????', data);
+      if (status === 200) {
+        const { entityList } = data;
+        if (entityList.length === 0) {
+          this.pegation.page--;
+          Tip.error("没有更多了");
+          return;
         }
+        this.districtGardenData.push(...Object.freeze(entityList));
+      }
     },
     // 跳转到search页面
-    jumpSearchPage () {
-        uni.navigateTo({
-            url: '/pages/search/index'
-        })
+    jumpSearchPage() {
+      uni.navigateTo({
+        url: "/pages/search/index",
+      });
     },
     //  获取节点高度
-    async getNodeInfo () {
-      const res =  await getNodeInfo('#custom-navbar', 'single')
-    
-      this.height = res.height
-    }
-  }
-}
+    async getNodeInfo() {
+      const res = await getNodeInfo("#custom-navbar", "single");
+
+      this.height = res.height;
+    },
+  },
+};
 </script>
 <style scoped lang="less">
 .DistrictGarden {
-    height: 100vh;
-    background: #F5F6FA;
-    .search {
-        width: 100%;
-        height: 102rpx;
-        background-color: #fff;
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        &-btn {
-            width: 670rpx;
-            height: 70rpx;
-            background: #F7F7F7;
-            border-radius: 35rpx;
-            margin: 0 auto;
-            padding-left: 36rpx;
-            box-sizing: border-box;
-            font-size: 28rpx;
-            font-family: PingFangSC-Regular, PingFang SC;
-            font-weight: 400;
-            color: #999999;
-            line-height: 70rpx;
-        }
-    }
-    // 园所列表
-    .garden-list {
-         width: 686rpx;
-         margin: 0 auto;
-         padding-bottom: 200rpx;
+  height: 100vh;
+  background: #f5f6fa;
+  .search {
+    width: 100%;
+    height: 102rpx;
+    background-color: #fff;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    &-btn {
+      width: 670rpx;
+      height: 70rpx;
+      background: #f7f7f7;
+      border-radius: 35rpx;
+      margin: 0 auto;
+      padding-left: 36rpx;
+      box-sizing: border-box;
+      font-size: 28rpx;
+      font-family: PingFangSC-Regular, PingFang SC;
+      font-weight: 400;
+      color: #999999;
+      line-height: 70rpx;
     }
+  }
+  // 园所列表
+  .garden-list {
+    width: 686rpx;
+    margin: 0 auto;
+    padding-bottom: 200rpx;
+  }
 }
 
 .scroll-view {
-    
-    // -webkit-overflow-scrolling: touch;
+  // -webkit-overflow-scrolling: touch;
 }
-
-
 </style>

+ 23 - 20
src/pages/invitePage/index.vue

@@ -1,32 +1,35 @@
 <template>
   <view class="invite-page">
-      <web-view :src="URL" />
-      <!-- <web-view :src="`http://localhost:8081/#/agent?customParam=${customParam}`" /> -->
+    <web-view :src="URL"></web-view>
+    <!-- <web-view :src="`http://localhost:8081/#/agent?customParam=${customParam}`" /> -->
   </view>
 </template>
 
 <script>
 export default {
-    name: 'invite-page',
-    onLoad () {
-      const userInfo = uni.getStorageSync('userInfo')
-      console.log(userInfo, 'userInfouserInfo');
-      const customParam = encodeURIComponent(JSON.stringify(userInfo))
-      const timestamp = new Date().getTime()
-      this.URL = `https://api.zaojiao.net/agentQrcode/#/agent?customParam=${customParam}&timestamp=${timestamp}`
-      // this.URL = `http://localhost:8081/#/agent?customParam=${customParam}&timestamp=${timestamp}`
-    },
-    data () {
-      return {
-        URL: '',
-      }
-    },
-    methods: {
+  name: "invite-page",
+  onLoad() {
+    const userInfo = uni.getStorageSync("userInfo");
+    console.log(userInfo, "userInfo");
+    const customParam = encodeURIComponent(JSON.stringify(userInfo));
+    const timestamp = new Date().getTime();
 
+    if(process.env.NODE_ENV === 'development') {
+      this.URL = `http://nginx.test.luojigou.vip:8899/singlepage/#/agent?customParam=${customParam}&timestamp=${timestamp}`
+    }else {
+      this.URL = `https://luojigou.vip/singlepage/#/agent?customParam=${customParam}&timestamp=${timestamp}`;
     }
-}
-</script>
 
-<style lang="scss" scoped>
+    console.log(this.URL, "URL");
+  },
+  data() {
+    return {
+      URL: "",
+    };
+  },
+  methods: {},
+};
+</script>
 
+<style lang="less" scoped>
 </style>

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

@@ -1,517 +1,617 @@
 <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>
+
+    <!-- 邀请码弹出层 -->
+    <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: "https://img.luojigou.vip/Fnx0_1pqYvdH5t1pD8Xjgt9XBN19",
+  inviteCodeImg: "https://img.luojigou.vip/FtYM0ogdN3zq2y0IonHWsppFWTOE",
+  inviteCodeTitle: "https://img.luojigou.vip/FhriH_a7Rqd4aGPTFQKsE3R1cJ__",
+  regionalGardenTitle: "https://img.luojigou.vip/FrH6tvXFiK3VpfrxKOEiBAJ7HK6g",
+  regionalGardenImg: "https://img.luojigou.vip/FtEzcQyzA0Bx96MYswy_dRoC3Hg3",
+  competitionTitle: "https://img.luojigou.vip/Fp2bpZgQXYbdvGLeP9RNUA-IjJ0C",
+  competitionImg: "https://img.luojigou.vip/FvA5SY09bV9e_fOOgKApgW7AJBJk",
+  // 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;
+    },
+  },
+  onReady() {},
+  onShow() {
+    this.waitCheckCount();
+    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/selectBtn.png


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


BIN
src/static/competitionRegister/index/allNoSelectBtn.png


BIN
src/static/competitionRegister/index/allSelectBtn.png


BIN
src/static/competitionRegister/index/noSelectBtn.png


BIN
src/static/competitionRegister/index/selectBtn.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/defaultSchoolDetail.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/noSelectBtn.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


BIN
src/static/image/returnHome.png


BIN
src/static/image/schoolInfoBGI.png


BIN
src/static/image/selectBtn.png


+ 3 - 4
src/utils/config.js

@@ -2,12 +2,11 @@ let BASEURL = ""
 
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
-    // BASEURL = 'http://agentminiprogram.test.luojigou.vip:8899'
-    BASEURL = 'https://api.zaojiao.net'
+    // BASEURL = 'https://open.api.luojigou.vip'
+    BASEURL = 'https://open.test.luojigou.vip'
 }else{
     // 生产环境
-    BASEURL = 'https://api.zaojiao.net'
-    // BASEURL = 'http://agentminiprogram.test.luojigou.vip:8899'
+    BASEURL = 'https://open.api.luojigou.vip'
 }
 
 export default BASEURL

+ 20 - 10
src/utils/global.js

@@ -1,12 +1,22 @@
 export const staticPicture = Object.freeze({
-    invitePop: require('@/static/image/invitePop.png'),   
-    poster: require('@/static/image/poster.jpg'),   
-    codeBg: require('@/static/image/codeBg.png'),  
-    inviteCode: require('@/static/image/inviteCode.png'),  
-    rect: require('@/static/image/rect.png'),  
-    school: require('@/static/image/school.png'),  
-    schoolBg: require('@/static/image/schoolBg.png'),
-    competition:  require('@/static/image/Competition.png'),
-    competitionBg: require('@/static/image/CompetitionBg.png'),
-    logo: require('@/static/image/logo.png'),
+    invitePop: "https://img.luojigou.vip/FtxEpUUpBBHbfwO8mG1SZDLcwGht",
+    // invitePop: "require('@/static/image/invitePop.png')",
+    poster: "https://img.luojigou.vip/Fi87OTRzsl1U8KWhVrrkrxjgCkDW",
+    // poster: require('@/static/image/poster.jpg'),
+    codeBg: "https://img.luojigou.vip/FvWxQtDGtx4Tc1wR7BMTZQUxtHds",
+    // codeBg: require('@/static/image/codeBg.png'),
+    inviteCode: "https://img.luojigou.vip/Fgn4rGekhUyJJBrhGoE-XfjHuRuH",
+    // inviteCode: require('@/static/image/inviteCode.png'),
+    rect: "https://img.luojigou.vip/FjQWqE7kc9bHuI5ikyYvQBM8Cit0",
+    // rect: require('@/static/image/rect.png'),
+    school: "https://img.luojigou.vip/Fvxs5-VXRo98uWJPNvmW2qxwpNH7",
+    // school: require('@/static/image/school.png'),
+    schoolBg: "https://img.luojigou.vip/FlwrWOmdv3RvuGNBvqjgwMPiEJUa",
+    // schoolBg: require('@/static/image/schoolBg.png'),
+    competition: "https://img.luojigou.vip/FupH-_GpIJwdP-zXArwtsFjC5Fxy",
+    // competition:  require('@/static/image/Competition.png'),
+    competitionBg: "https://img.luojigou.vip/Fhp3yAh06mV1Myr7r5ReeDorUaWb",
+    // competitionBg: require('@/static/image/CompetitionBg.png'),
+    logo: "https://img.luojigou.vip/FhaixpX2FZ32mBNOtUPrxsdU0uSl",
+    // logo: require('@/static/image/logo.png'),
 })

+ 4 - 12
src/wxcomponents/image/index.vue

@@ -1,15 +1,7 @@
 <template>
 <uni-shadow-root class="image-index"><view :style="computed.rootStyle({ width, height, radius })" :class="'custom-class '+(utils.bem('image', { round }))" @click="onClick">
-  <image 
-    v-if="(!error)" 
-    :src="src" 
-    :mode="computed.mode(fit)" 
-    :lazy-load="lazyLoad" 
-    class="image-class van-image__img" 
-    :show-menu-by-longpress="showMenuByLongpress" 
-    @load="onLoad" 
-    @error="onError"
-  ></image>
+  <image v-if="(!error)" :src="src" :mode="computed.mode(fit)" :lazy-load="lazyLoad" class="image-class van-image__img" :show-menu-by-longpress="showMenuByLongpress" @load="onImageLoad" @error="onImageError"></image>
+
   <view v-if="loading && showLoading" class="loading-class van-image__loading">
     <slot v-if="useLoadingSlot" name="loading"></slot>
     <van-icon v-else name="photo" custom-class="van-image__loading-icon"></van-icon>
@@ -70,13 +62,13 @@ VantComponent({
     viewStyle: '',
   },
   methods: {
-    onLoad(event) {
+    onImageLoad(event) {
       this.setData({
         loading: false,
       });
       this.$emit('load', event.detail);
     },
-    onError(event) {
+    onImageError(event) {
       this.setData({
         loading: false,
         error: true,

+ 1 - 2
src/wxcomponents/notify/index.vue

@@ -1,5 +1,5 @@
 <template>
-<uni-shadow-root class="notify-index"><van-transition name="slide-down" :show="showNotify" custom-class="van-notify__container" :custom-style="computed.rootStyle({ zIndex, top })" @click.native="onTap">
+<uni-shadow-root class="notify-index"><van-transition name="slide-down" :show="show" custom-class="van-notify__container" :custom-style="computed.rootStyle({ zIndex, top })" @click.native="onTap">
   <view :class="'van-notify van-notify--'+(type)" :style="computed.notifyStyle({ background, color })">
     <view v-if="safeAreaInsetTop" :style="'height: '+(statusBarHeight)+'px'"></view>
     <text>{{ message }}</text>
@@ -30,7 +30,6 @@ VantComponent({
     duration: {
       type: Number,
       value: 3000,
-      
     },
     zIndex: {
       type: Number,