Browse Source

+ 我的报名列表

chen.cheng 10 months ago
parent
commit
af94eb5767

+ 11 - 97
README.md

@@ -1,98 +1,12 @@
-<p align="center">
-    <img alt="logo" src="https://uviewui.com/common/logo.png" width="120" height="120" style="margin-bottom: 10px;">
-</p>
-<h3 align="center" style="margin: 30px 0 30px;font-weight: bold;font-size:40px;">uView 2.0</h3>
-<h3 align="center">多平台快速开发的UI框架</h3>
-
-[![stars](https://img.shields.io/github/stars/umicro/uView2.0?style=flat-square&logo=GitHub)](https://github.com/umicro/uView2.0)
-[![forks](https://img.shields.io/github/forks/umicro/uView2.0?style=flat-square&logo=GitHub)](https://github.com/umicro/uView2.0)
-[![issues](https://img.shields.io/github/issues/umicro/uView2.0?style=flat-square&logo=GitHub)](https://github.com/umicro/uView2.0/issues)
-[![Website](https://img.shields.io/badge/uView-up-blue?style=flat-square)](https://uviewui.com)
-[![release](https://img.shields.io/github/v/release/umicro/uView2.0?style=flat-square)](https://gitee.com/umicro/uView2.0/releases)
-[![license](https://img.shields.io/github/license/umicro/uView2.0?style=flat-square)](https://en.wikipedia.org/wiki/MIT_License)
-
-## 说明
-
-uView UI,是[uni-app](https://uniapp.dcloud.io/)全面兼容nvue的uni-app生态框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水
-
-## [官方文档:https://uviewui.com](https://uviewui.com)
-
-### 官方1群:1042987248(已满)
-### 官方2群:249718512(已满)
-### 官方3群:1129077272(已满)
-### 官方4群:1084514613(已满)
-### 官方5群:863820668(已满)
-### 官方6群:745721078(已满)
-### 官方7群:627867855(已满)
-### 官方8群:496409492(已满)
-### 官方9群:828504448(已满)
-### 官方10群:232041042(已满)
-### 官方11群:364463526(已满)
-### 官方12群:229707069(已满)
-### [点击加13群交流反馈:879811455](https://jq.qq.com/?_wv=1027&k=vz4By4k5)
-
-## 特性
-
-- 全面兼容nvue,原生渲染,高性能
-- 兼容安卓,iOS,微信小程序,H5,QQ小程序,百度小程序,支付宝小程序,头条小程序
-- 60+精选组件,功能丰富,多端兼容,让您快速集成,开箱即用
-- 众多贴心的JS利器,让您飞镖在手,召之即来,百步穿杨
-- 众多的常用页面和布局,让您专注逻辑,事半功倍
-- 详尽的文档支持,现代化的演示效果
-- 按需引入,精简打包体积
-
-
-## 预览
-
-您可以通过**微信**扫码,查看最佳的演示效果。
-<br>
-<br>
-<img src="https://uviewui.com/common/weixin_mini_qrcode.png" width="220" height="220" >
-
-
-## 链接
-
-- [官方文档](https://www.uviewui.com/)
-- [更新日志](https://www.uviewui.com/components/changelog.html)
-- [升级指南](https://www.uviewui.com/components/changeGuide.html)
-- [关于我们](https://www.uviewui.com/cooperation/about.html)
-
-## 交流反馈
-
-欢迎加入我们的QQ群交流反馈:[点此跳转](https://www.uviewui.com/components/addQQGroup.html)
-
-## 关于PR
-
-> 我们非常乐意接受各位的优质PR,但在此之前我希望您了解uView2.0是一个需要兼容多个平台的(小程序、h5、ios app、android app)包括nvue页面、vue页面。
-> 所以希望在您修复bug并提交之前尽可能的去这些平台测试一下兼容性。最好能携带测试截图以方便审核。非常感谢!
-
-## 安装
-
-#### **uni-app插件市场链接** —— [https://ext.dcloud.net.cn/plugin?id=1593](https://ext.dcloud.net.cn/plugin?id=1593)
-
-请通过[官网安装文档](https://www.uviewui.com/components/install.html)了解更详细的内容
-
-## 快速上手
-
-请通过[快速上手](https://uviewui.com/components/quickstart.html)了解更详细的内容
-
-## 使用方法
-配置easycom规则后,自动按需引入,无需`import`组件,直接引用即可。
-
-```html
-<template>
-	<u-button text="按钮"></u-button>
-</template>
+### 多端融合开发
+- [ ] 1. 坑
+1. 子组件调用父组件的方法
+```html 
+<child :click-handle="handleClick" />
+``` 
+子组件的this指向为子组件。
+解决这个问题需要使用 
+```js 
+this.$emit('handleClick', '参数'); 
 ```
-
-
-## 捐赠uView的研发
-
-uView文档内容和框架源码全部开源免费,如果您认为uView帮到了您的开发工作,您可以捐赠uView的研发工作,捐赠无门槛,哪怕是一杯可乐也好(相信这比打赏主播更有意义)。
-
-<img src="https://uviewui.com/common/wechat.png" width="220" >
-<img style="margin-left: 100px;" src="https://uviewui.com/common/alipay.png" width="220" >
-
-## 版权信息
-uView遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将uView应用到您的产品中。
-
+2. 子组件样式问题,需要在common 文件中写样式

+ 13 - 0
common/api.js

@@ -125,6 +125,11 @@ export const fetchUsrTrip = () => {
     },
   });
 };
+const staticRules = {
+  'userInfo.email': {
+    pattern: /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/,
+  },
+};
 export const formCfg = (key) => {
   return http.get(
     `/system/config/configKey/${key}`);
@@ -133,3 +138,11 @@ export const formCfg = (key) => {
 export function getDicts(dictType) {
   return http.get(`/system/dict/data/type/${dictType}`);
 }
+
+export const getUsrApplyInfo = () => {
+  return http.get(`cp/usrApply/regist/list`, {
+    header: {
+      Authorization: `Bearer ${getToken()}`,
+    },
+  });
+};

+ 19 - 9
common/common.scss

@@ -97,17 +97,27 @@
   }
 }
 
-.u-form{
-  .u-form-item{
-    &.require{
-      /deep/ .u-form-item__body__left{
-        &::before{
-          content:"*";
-          color: #ff0000;
-          margin-right: 10rpx;
-          display: inline-block;
+.register-form-container {
+  .u-form {
+    .u-form-item {
+      &.require {
+        /deep/ .u-form-item__body__left {
+          &::before {
+            content: "*";
+            color: red;
+            margin-right: 10rpx;
+            display: inline-block;
+          }
         }
       }
     }
   }
 }
+
+.overflow-hidden{
+  display: -webkit-box;
+  -webkit-line-clamp: 2; /* 控制显示的行数 */
+  -webkit-box-orient: vertical;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}

+ 2 - 2
package.json

@@ -38,8 +38,8 @@
 				"title": "微信开发版",
 				"env": {
 					"UNI_PLATFORM": "mp-weixin",
-					"UNI_FILE_PREFIX": "http://127.0.0.1:18080/tfc",
-					"UNI_API_PREFIX": "http://127.0.0.1:18080/tfc"
+					"UNI_FILE_PREFIX": "http://192.168.0.110:18080/tfc",
+					"UNI_API_PREFIX": "http://192.168.0.110:18080/tfc"
 				},
 				"define": {
 					"MP-WEIXIN": true

+ 3 - 9
pages.json

@@ -71,17 +71,11 @@
           "style": {
             "navigationBarTitleText": "大会调研"
           }
-        }
-      ]
-    },
-    {
-      "root": "pasb",
-      "name": "sub-7",
-      "pages": [
+        },
         {
-          "path": "pages/usr-trip/index",
+          "path": "pages/myApply/index",
           "style": {
-            "navigationBarTitleText": "交通指引"
+            "navigationBarTitleText": "我的报名"
           }
         }
       ]

+ 40 - 0
pasb/pages/myApply/index.scss

@@ -0,0 +1,40 @@
+@import "../../../common/common.scss";
+
+.usr-regist-info-container {
+  .apply-item {
+    background-color: #fefefe;
+    border-radius: 10rpx;
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    justify-content: flex-start;
+    align-items: center;
+    margin-bottom: 20rpx;
+    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2), -5px -5px 10px rgba(0, 0, 0, 0.1);
+    box-sizing: border-box;
+    padding: 20rpx;
+    > view {
+      width: 100%;
+      &:not(:last-child){
+        margin-bottom: 20rpx;
+      }
+    }
+
+    .apply-item-header {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+    }
+
+    .apply-item-footer {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+    }
+  }
+}
+page{
+  background-color: #767a8212;
+}
+
+

+ 79 - 0
pasb/pages/myApply/index.vue

@@ -0,0 +1,79 @@
+<template>
+  <auth-wrap class="usr-regist-info-container" ref="authWrap">
+    <template slot="content">
+      <view class="u-page" v-if="indexList&&indexList.length>0">
+        <view class="apply-item" v-for="item in indexList" @click="()=>onContentClick(item)">
+          <view class="apply-item-header">
+            <view>{{ item.applyTypeName }}</view>
+            <view>
+              <u-tag
+                  plain
+                  :text="REVIEW_STATUS[item.reviewState].name"
+                  :type="REVIEW_STATUS[item.reviewState].tag">
+              </u-tag>
+            </view>
+          </view>
+          <view class="apply-item-title overflow-hidden" style="height: 50px" v-if="item.contentTitle">{{ item.contentTitle }}</view>
+          <view class="apply-item-footer">
+            <view>参会人:{{ item.usrName }}</view>
+            <view>{{ $u.timeFormat(item.createTime, 'yyyy-MM-dd hh:mm') }}</view>
+          </view>
+        </view>
+      </view>
+      <u-empty
+          v-else
+          mode="data"
+          text="还没有报名,赶紧去报名吧!"
+      >
+      </u-empty>
+    </template>
+  </auth-wrap>
+</template>
+
+<script>
+import { getUsrApplyInfo } from '@/common/api';
+import { REVIEW_STATUS } from '@/common/EnumConst';
+import AuthWrap from '@/components/AuthComp/index.vue';
+
+export default {
+  computed: {
+    REVIEW_STATUS() {
+      return REVIEW_STATUS;
+    },
+  },
+  components: {
+    AuthWrap,
+  },
+  data() {
+    return {
+      keyword: '',
+      indexList: [],
+    };
+  },
+  onLoad() {
+    this.$refs.authWrap.reloadPage();
+    this.loadmore();
+  },
+  methods: {
+    onContentClick(item) {
+      uni.navigateTo({
+        url: `/pasb/pages/detail/index?id=${item.id}`,
+      });
+    },
+    async loadmore() {
+      const { data } = await getUsrApplyInfo();
+      if (data) {
+        this.indexList = data;
+      }
+
+    },
+  },
+  onShareAppMessage() {
+    return {
+      title: 'First UI组件库',
+    };
+  },
+};
+</script>
+
+<style lang="scss" src="./index.scss" />

+ 29 - 5
pasb/pages/regist/index.vue

@@ -2,7 +2,7 @@
   <view class="register-bg">
     <auth-wrap class="register-container" ref="authWrap">
       <view class="form-content" slot="content">
-        <RegistForm v-if="rules" :rules="rules" ref="registForm"></RegistForm>
+        <RegistForm v-if="rules" :rules="rules" ref="registForm" @onSubmitHandle="onFormSubmit"></RegistForm>
       </view>
     </auth-wrap>
   </view>
@@ -10,11 +10,12 @@
 
 <script>
 
-import { formCfg } from '@/common/api';
-import { ICON_CFG, USR_TYPE_LIST } from '@/common/EnumConst';
+import { fetchUsrInfo, formCfg, putUsrRegist } from '@/common/api';
+import { ICON_CFG, MEETING_TYPE, USR_TYPE_LIST } from '@/common/EnumConst';
 import AuthWrap from '@/components/AuthComp/index.vue';
+import RegistForm from '@/components/RegistForm';
 import SingleDropList from '@/components/SingleDropList/index.vue';
-import RegistForm from '@/pasb/pages/regist/RegistForm.vue';
+import { getUserInfo, setUserInfo } from '@/util';
 
 const staticRules = {
   'userInfo.email': {
@@ -52,7 +53,9 @@ export default {
     if (msg) {
       const cfgJson = JSON.parse(msg);
         Object.keys(staticRules).forEach(item => {
-          Object.assign(cfgJson[item], staticRules[item]);
+          if (!cfgJson[item]) {
+            Object.assign(cfgJson[item], staticRules[item]);
+          }
         });
         this.rules = cfgJson;
       }
@@ -67,6 +70,27 @@ export default {
     hideKeyboard() {
       uni.hideKeyboard();
     },
+    async onFormSubmit(userInfo) {
+      const { code } = await putUsrRegist(userInfo, MEETING_TYPE.meeting.value);
+      if (code !== 200) {
+        return;
+      }
+      uni.showToast({
+        mask: true,
+        title: '报名完成',
+        icon: 'success',
+        success: async () => {
+          const user = getUserInfo();
+          const newUsr = await fetchUsrInfo(user.id);
+          if (newUsr.code === 200) {
+            setUserInfo(newUsr.data);
+          }
+          uni.navigateBack({
+            delta: 1,
+          });
+        },
+      });
+    },
   },
 };
 </script>

+ 0 - 6
pasb/pages/usr-collect/index.scss

@@ -1,6 +0,0 @@
-@import "../../../common/common.scss";
-.usr-collect-info-container {
-
-}
-
-

+ 0 - 75
pasb/pages/usr-collect/index.vue

@@ -1,75 +0,0 @@
-<template>
-  <auth-wrap class="usr-collect-info-container" ref="authWrap">
-    <template slot="content">
-      <view class="search-content">
-        <u-search placeholder="请输入关键字" v-model="keyword" @custom="onSearch" @search="onSearch"></u-search>
-      </view>
-      <view class="u-page" v-if="indexList&&indexList.length>0">
-        <item-list :ds="indexList" :onItemClick="onContentClick" />
-      </view>
-      <u-empty
-          v-else
-          mode="data"
-          text="还没有收藏,赶紧去收藏吧!"
-      >
-      </u-empty>
-    </template>
-  </auth-wrap>
-</template>
-
-<script>
-import { fetchUsrContentInfo } from '@/common/api';
-import AuthWrap from '@/components/AuthComp/index.vue';
-import ItemList from '@/components/ItemList/index.vue';
-import { getImageUrl } from '@/util';
-
-export default {
-  components: {
-    AuthWrap,
-    ItemList,
-  },
-  data() {
-    return {
-      keyword: '',
-      indexList: [],
-    };
-  },
-  onLoad() {
-    this.$refs.authWrap.reloadPage();
-    this.loadmore();
-  },
-  methods: {
-    onContentClick(item) {
-      uni.navigateTo({
-        url: `/pasb/pages/detail/index?id=${item.id}`,
-      });
-    },
-    async loadmore(keyword = '') {
-      const res = await fetchUsrContentInfo({
-        pageNum: 1,
-        pageSize: 999,
-        contentType: 3,
-        title: keyword,
-      });
-      this.indexList = res.rows.map(item => {
-        return {
-          id: item.id,
-          imgUrl: getImageUrl(item.thumbnail),
-          title: item.title,
-          date: item.updateTime,
-        };
-      });
-    },
-    onSearch(val) {
-      this.loadmore(val);
-    },
-  },
-  onShareAppMessage() {
-    return {
-      title: 'First UI组件库',
-    };
-  },
-};
-</script>
-
-<style lang="scss" src="./index.scss" />

+ 0 - 16
pasb/pages/usr-trip/index.scss

@@ -1,16 +0,0 @@
-@import "../../../common/common.scss";
-.usr-trip-info-container {
-  padding: 40rpx 0;
-  box-sizing: border-box;
-  height: 100%;
-  width: 90%;
-}
-
-.auth-wrap{
-  width: 100%;
-  height: 100%;
-  display: flex;
-  align-items: center;
-  flex-direction: column;
-  justify-content: flex-start;
-}

+ 0 - 56
pasb/pages/usr-trip/index.vue

@@ -1,56 +0,0 @@
-<template>
-  <auth-wrap  ref="authWrap">
-    <template class="usr-trip-info-container" slot="content">
-      <rich-text :content="content" v-if="content"></rich-text>
-      <u-empty
-          v-else
-          mode="data"
-          text="还没有添加行程,赶紧去报名吧!"
-          @click="regisClick"
-      >
-      </u-empty>
-    </template>
-  </auth-wrap>
-</template>
-
-<script>
-import { fetchUsrTrip } from '@/common/api';
-import AuthWrap from '@/components/AuthComp/index.vue';
-import ItemList from '@/components/ItemList/index.vue';
-import RichText from '@/components/RichText/index.vue';
-
-export default {
-  components: {
-    RichText,
-    AuthWrap,
-    ItemList,
-  },
-  data() {
-    return {
-      content: '',
-    };
-  },
-  onLoad() {
-    this.$refs.authWrap.reloadPage();
-    this.loadmore();
-  },
-  methods: {
-    async loadmore() {
-      const { data } = await fetchUsrTrip();
-      this.content = data.tripDetail;
-    },
-    regisClick() {
-      uni.navigateTo({
-        url: '/pasb/pages/regis/index',
-      });
-    },
-  },
-  onShareAppMessage() {
-    return {
-      title: 'First UI组件库',
-    };
-  },
-};
-</script>
-
-<style lang="scss" src="./index.scss" />

+ 3 - 1
pasbrg/pages/regtheme/index.scss

@@ -1,3 +1,4 @@
+@import "common/common.scss";
 .theme-regist-content-info-container {
   width: 90%;
   margin: 20rpx auto;
@@ -73,12 +74,13 @@
   }
   /deep/ .pop-form-content{
     padding: 20rpx;
-    height: 1000rpx;
+    height: 1200rpx;
     display: flex;
     align-items: center;
     justify-content: flex-start;
     flex-direction: column;
     box-sizing: border-box;
+    overflow: scroll;
     .u-form {
       width: 100%;
       .u-form-item {

+ 49 - 181
pasbrg/pages/regtheme/index.vue

@@ -7,105 +7,7 @@
     <rich-text :content="content"></rich-text>
     <u-popup :show="show" :round="5" mode="bottom" :closeOnClickOverlay="true" :overlay="true" @close="popClose">
       <view class="pop-form-content">
-        <u--form
-            labelPosition="left"
-            :model="model1"
-            :rules="rules"
-            ref="uForm"
-            @submit="onSubmit"
-        >
-          <u-form-item
-              label="姓名"
-              prop="userInfo.usrName"
-              borderBottom
-          >
-            <u--input
-                placeholder="输入姓名"
-                v-model="model1.userInfo.usrName"
-                border="none"
-            ></u--input>
-          </u-form-item>
-          <u-form-item
-              label="单位名称"
-              prop="userInfo.orgUnitName"
-              borderBottom
-          >
-            <u--input
-                placeholder="输入单位名称"
-                v-model="model1.userInfo.orgUnitName"
-                border="none"
-            ></u--input>
-          </u-form-item>
-          <u-form-item
-              label="职务"
-              prop="userInfo.uniLevel"
-              borderBottom
-          >
-            <u--input
-                placeholder="输入职务"
-                v-model="model1.userInfo.uniLevel"
-                border="none"
-            ></u--input>
-          </u-form-item>
-          <u-form-item
-              label="联系电话"
-              prop="userInfo.tel"
-              borderBottom
-          >
-            <u--input
-                placeholder="输入联系电话"
-                border="none"
-                type="number"
-                maxlength="11"
-                v-model="model1.userInfo.tel"
-            ></u--input>
-          </u-form-item>
-          <u-form-item
-              label="邮箱"
-              prop="userInfo.email"
-              borderBottom
-          >
-            <u--input
-                placeholder="输入邮箱"
-                border="none"
-                v-model="model1.userInfo.email"
-            ></u--input>
-          </u-form-item>
-          <u-form-item
-              label="人员类型"
-              prop="userInfo.usrType"
-              borderBottom
-          >
-            <u-radio-group
-                v-model="model1.userInfo.usrType"
-                placement="row"
-            >
-              <u-radio
-                  :style="{
-                  marginRight: '20rpx'
-                }"
-                  v-for="(item, index) in USR_TYPE_LIST"
-                  :key="index"
-                  :label="item.name"
-                  :name="item.value"
-              >
-              </u-radio>
-            </u-radio-group>
-          </u-form-item>
-        </u--form>
-        <u-button
-            :style="{
-              marginTop: 'auto',
-             marginBottom: '80rpx'
-            }"
-            type="primary"
-            text="提交"
-            :disabled="loading"
-            :loading="loading"
-            loadingText="正在提交..."
-            @click="onSubmit"
-        >
-        </u-button>
+        <RegistForm v-if="rules" :rules="rules" ref="registForm" @onSubmitHandle="onSubmit"></RegistForm>
       </view>
     </u-popup>
     <view class="regist-btn">
@@ -120,15 +22,22 @@
 </template>
 
 <script>
-import { fetchContentDetail,  putUsrRegist } from '@/common/api';
+import { fetchContentDetail, formCfg, putUsrRegist } from '@/common/api';
 import { CONTENT_TYPE, USR_TYPE_LIST } from '@/common/EnumConst';
+import RegistForm from '@/components/RegistForm';
 import RichText from '@/components/RichText/index.vue';
-import { authLogin, getStorageObj, getUserInfo, storageKey } from '@/util';
+import { authLogin, getStorageObj, storageKey } from '@/util';
 
+const staticRules = {
+  'userInfo.email': {
+    pattern: /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/,
+  },
+};
 export default {
   name: 'content',
   components: {
     RichText,
+    RegistForm,
   },
   props: {},
   data() {
@@ -149,46 +58,7 @@ export default {
           conferenceFlag: '1',
         },
       },
-      rules: {
-        'userInfo.usrName': {
-          type: 'string',
-          required: true,
-          message: '请填写姓名',
-          trigger: ['blur', 'change'],
-        },
-        'userInfo.tel': {
-          type: 'string',
-          len: 11,
-          required: true,
-          message: '请填写11位手机号',
-          trigger: ['blur', 'change'],
-        },
-        'userInfo.email': {
-          type: 'string',
-          required: true,
-          message: '请填写邮箱',
-          pattern: /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/,
-          trigger: ['blur', 'change'],
-        },
-        'userInfo.orgUnitName': {
-          type: 'string',
-          required: true,
-          message: '请填写单位名称',
-          trigger: ['blur', 'change'],
-        },
-        'userInfo.uniLevel': {
-          type: 'string',
-          required: true,
-          message: '请填写职务',
-          trigger: ['blur', 'change'],
-        },
-        'userInfo.usrType': {
-          type: 'string',
-          required: true,
-          message: '请填写人员类型',
-          trigger: ['blur', 'change'],
-        },
-      },
+      rules: null,
     };
   },
   created() {
@@ -197,35 +67,44 @@ export default {
     // 登录返回之后的页面
     this.queryParams = getStorageObj(storageKey.regtheme);
     this.getContentInfo();
-    this.restForm();
-    //如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
-    this.$refs.uForm.setRules(this.rules);
+    formCfg('theme_form_cfg').then(res => {
+      const { msg } = res;
+      if (msg) {
+        const cfgJson = JSON.parse(msg);
+        Object.keys(staticRules).forEach(item => {
+          if (!cfgJson[item]) {
+            Object.assign(cfgJson[item], staticRules[item]);
+          }
+        });
+        this.rules = cfgJson;
+      }
+      this.$refs.registForm?.setFormRules();
+    });
   },
   methods: {
-    onSubmit() {
-      this.loading = true;
-      this.$refs.uForm.validate().then(async (res) => {
-        const { code } = await putUsrRegist({
-          ...this.model1.userInfo,
-          contentId: this.queryParams.id,
-        }, this.queryParams.type);
-        this.loading = false;
-        if (code !== 200) {
-          return;
-        }
-        uni.showToast({
-          mask: true,
-          title: '报名完成',
-          icon: 'success',
-          success: async () => {
-            this.show = false;
-          },
-        });
-      }).catch(errors => {
-        this.loading = false;
+    async onSubmit(userInfo) {
+      const {
+        id,
+        type,
+      } = this.queryParams;
+      const { code } = await putUsrRegist({
+        ...userInfo,
+        contentId: id,
+      }, type);
+      if (code !== 200) {
+        return;
+      }
+      uni.showToast({
+        mask: true,
+        title: '报名完成',
+        icon: 'success',
+        success: async () => {
+          this.show = false;
+        },
       });
     },
     popClose() {
+      console.log(this.queryParams);
       this.show = false;
     },
     async getContentInfo() {
@@ -247,26 +126,15 @@ export default {
       });
       this.date = uni.$u.timeFormat(createTime, 'yyyy-mm-dd');
     },
-    restForm() {
-      this.model1 = {
-        userInfo: {
-          usrName: '',
-        },
-      };
-      const user = getUserInfo();
-      if (user) {
-        this.model1.userInfo.usrName = user.usrName;
-        this.model1.userInfo.tel = user.tel;
-      }
-    },
+
     onRegistClick() {
       authLogin(async (usr) => {
         this.show = true;
-        this.restForm();
-        this.$refs.uForm.clearValidate();
+        this.$refs.registForm?.restForm();
+        this.$refs.registForm?.clearValidate();
       });
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="scss" src="./index.scss" />;