uniapp可视化-运动报名表单系统-代码生成器

张春  论坛元老 | 2025-2-18 03:28:32 | 显示全部楼层 | 阅读模式
打印 上一主题 下一主题

主题 1026|帖子 1026|积分 3078

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

x
运动报名表单系统小步伐旨在为各类运动组织者提供一个便捷、高效的线上报名管理平台,同时为参与者提供简单易用的报名途径。

主要功能



  • 运动发布:运动组织者可以发布运动的详细信息,包括运动名称、时间、所在、运动内容等。用户可以在小步伐中浏览并了解运动的相干信息,从而决定是否参与。
  • 个性化信息填写:针对不同运动,组织者可自定义预约时需填写的信息,支持多种自定义字段范例,如字符串、单选、复选、日期、列表、图片等。
  • 报名管理:运动组织者可以检察所有提交的报名信息,并进行审核、拒绝或确认等操作。同时,还可以对报名数据进行统计和分析,如已报名流数、各时段报名流数分布等,为运动的后续工作提供参考依据。
  • 消息和动态:定期更新公司的消息、行业动态和运动情况,让用户了解企业的最新进展。
  • 接洽方式:提供公司的接洽方式,如电话、地址、电子邮件和在线接洽表单等,方便用户与企业进行沟通和接洽。部分小步伐还支持舆图定位功能,用户点击“接洽我们”即可获取企业位置。
  • 在线客服:提供在线客服功能,让用户可以直接与客服代表进行实时沟通和问题解答。
  • 搜索功能:提供搜索功能,方便用户快速找到所需的信息。
  • 用户互动:设置表单、留言等体系,方便企业与用户进行线上互动,收集用户线索。
软件架构

本系统使用thinkphp8+uniapp来实现。移动端APP所有界面功能都是DIYGW可视化开发完成,背景使用diygw-ui-php集成运动报名表单系统。
首页可视化

自定义公告、轮播、列表可视化内容

API可视化

快速对接API接口

数据绑定




生成的源码
  1. <template>
  2.         <view class="container container335134">
  3.                 <view class="flex flex-wrap diygw-col-24 items-center flex13-clz">
  4.                         <view class="flex flex-wrap diygw-col-0 flex-direction-column flex14-clz">
  5.                                 <text class="diygw-col-0 text7-clz"> 最新 </text>
  6.                                 <text class="diygw-col-0"> 公告 </text>
  7.                         </view>
  8.                         <view class="flex diygw-col-0 noticebar-clz">
  9.                                 <diy-noticebar class="flex1 diy-notice-bar" :remote="true" :list="notices.rows" color="#00d6b9" bgColor="#fff" :speed="80" leftIcon="diy-icon-notification">
  10.                                         <block v-slot:content>
  11.                                                 <text class="diy-notice-item" v-for="(item, index) in notices.rows" :key="index">
  12.                                                         {{ item.title }}
  13.                                                 </text>
  14.                                         </block>
  15.                                 </diy-noticebar>
  16.                         </view>
  17.                 </view>
  18.                 <view class="flex diygw-col-24 swiper-clz">
  19.                         <swiper :current="swiperIndex" class="swiper swiper-indicator_rect_radius" @change="changeSwiper" indicator-color="rgba(51, 51, 51, 0.39)" indicator-active-color="#fff" indicator-dots="true" autoplay interval="3000" circular="true" style="height: 300rpx">
  20.                                 <swiper-item v-for="(item, index) in swipers.rows" :key="index" @tap="navigateTo" data-type="openFunction" :data-path="item.path" class="diygw-swiper-item">
  21.                                         <view class="diygw-swiper-item-wrap">
  22.                                                 <image :src="item.img" class="diygw-swiper-image"></image>
  23.                                                 <view class="diygw-swiper-item-title swiper-title">
  24.                                                         {{ item.title }}
  25.                                                 </view>
  26.                                         </view>
  27.                                 </swiper-item>
  28.                         </swiper>
  29.                 </view>
  30.                 <view class="flex flex-wrap diygw-col-24 justify-between items-center flex32-clz">
  31.                         <view class="flex flex-wrap diygw-col-0 items-center">
  32.                                 <view class="flex flex-wrap diygw-col-0 flex-direction-column">
  33.                                         <text class="diygw-col-0 text19-clz"> </text>
  34.                                         <text class="diygw-col-0 text24-clz"> </text>
  35.                                         <text class="diygw-text-line1 diygw-col-0 text26-clz"> 为你推荐 </text>
  36.                                 </view>
  37.                                 <text class="diygw-text-line1 diygw-col-0 text27-clz"> 报名预约参加 </text>
  38.                         </view>
  39.                         <view class="flex flex-wrap diygw-col-0 items-center" @tap="navigateTo" data-type="page" data-url="/pages/huodong">
  40.                                 <text class="diygw-col-0 text44-clz"> 查看更多 </text>
  41.                                 <text class="flex icon1 diygw-col-0 icon1-clz diy-icon-right"></text>
  42.                         </view>
  43.                 </view>
  44.                 <view v-if="huodongs.total > 0" class="flex flex-wrap diygw-col-24 flex-direction-column">
  45.                         <view v-for="(item, index) in huodongs.rows" :key="index" class="flex flex-wrap diygw-col-24 flex-direction-column items-stretch flex6-clz" @tap="navigateTo" data-type="page" data-url="/pages/huodong/page" :data-id="item.id">
  46.                                 <view class="flex flex-wrap diygw-col-24 items-center">
  47.                                         <image :src="item.img" class="response diygw-col-24" mode="widthFix"></image>
  48.                                 </view>
  49.                                 <view class="flex flex-wrap diygw-col-0 items-center flex20-clz">
  50.                                         <view class="flex flex-wrap diygw-col-0 flex-direction-column flex35-clz">
  51.                                                 <text class="diygw-col-0 text22-clz">
  52.                                                         {{ item.title }}
  53.                                                 </text>
  54.                                                 <view class="flex flex-wrap diygw-col-24 items-center flex9-clz">
  55.                                                         <text class="flex icon2 diygw-col-0 diy-icon-time"></text>
  56.                                                         <text class="diygw-text-line1 diygw-col-0 text2-clz"> {{ item.starttime }} 至 {{ item.endtime }} </text>
  57.                                                 </view>
  58.                                                 <view class="flex flex-wrap diygw-col-24 items-center flex15-clz">
  59.                                                         <text class="flex icon5 diygw-col-0 diy-icon-location"></text>
  60.                                                         <text class="diygw-text-line1 diygw-col-0 text8-clz">
  61.                                                                 {{ item.address }}
  62.                                                         </text>
  63.                                                 </view>
  64.                                         </view>
  65.                                 </view>
  66.                         </view>
  67.                 </view>
  68.                 <view v-if="globalData.isshow && huodongs.code == 200 && huodongs.total == 0" class="flex flex-wrap diygw-col-24 flex-direction-column items-center flex1-clz">
  69.                         <image src="/static/zwjl.png" class="image1-size diygw-image diygw-col-0" mode="widthFix"></image>
  70.                         <text class="diygw-col-0 text-clz"> 未找到任何数据 </text>
  71.                 </view>
  72.                 <view class="flex flex-wrap diygw-col-24 items-end diygw-bottom flex2-clz">
  73.                         <view class="flex flex-wrap diygw-col-6 flex-direction-column items-center flex8-clz">
  74.                                 <view class="flex flex-wrap diygw-col-0 flex-direction-column items-center">
  75.                                         <image src="/static/sy.png" class="image2-size diygw-image diygw-col-0" mode="widthFix"></image>
  76.                                 </view>
  77.                                 <text class="diygw-text-line1 diygw-col-0 text3-clz"> 首页 </text>
  78.                         </view>
  79.                         <view class="flex flex-wrap diygw-col-6 flex-direction-column items-center flex4-clz" @tap="navigateTo" data-type="page" data-url="/pages/huodong">
  80.                                 <view class="flex flex-wrap diygw-col-0 flex-direction-column items-center">
  81.                                         <image src="/static/cp1.png" class="image3-size diygw-image diygw-col-0" mode="widthFix"></image>
  82.                                 </view>
  83.                                 <text class="diygw-text-line1 diygw-col-0"> 活动 </text>
  84.                         </view>
  85.                         <view class="flex flex-wrap diygw-col-6 flex-direction-column items-center flex11-clz" @tap="navigateTo" data-type="page" data-url="/pages/articles">
  86.                                 <view class="flex flex-wrap diygw-col-0 flex-direction-column items-center">
  87.                                         <text class="diygw-text-line1 diygw-col-0 animate__animated animate__heartBeat animate__infinite text15-clz"> </text>
  88.                                         <image src="/static/xw1.png" class="image8-size diygw-image diygw-col-0" mode="widthFix"></image>
  89.                                 </view>
  90.                                 <text class="diygw-text-line1 diygw-col-0"> 新闻资讯 </text>
  91.                         </view>
  92.                         <view class="flex flex-wrap diygw-col-6 flex-direction-column items-center flex12-clz" @tap="navigateTo" data-type="page" data-url="/pages/user">
  93.                                 <view class="flex flex-wrap diygw-col-0 flex-direction-column items-center">
  94.                                         <image src="/static/wd.png" class="image4-size diygw-image diygw-col-0" mode="widthFix"></image>
  95.                                 </view>
  96.                                 <text class="diygw-text-line1 diygw-col-0"> 我的 </text>
  97.                         </view>
  98.                 </view>
  99.                 <view class="clearfix"></view>
  100.         </view>
  101. </template>
  102. <script>
  103.         export default {
  104.                 data() {
  105.                         return {
  106.                                 //用户全局信息
  107.                                 userInfo: {},
  108.                                 //页面传参
  109.                                 globalOption: {},
  110.                                 //自定义全局变量
  111.                                 globalData: { isshow: false },
  112.                                 swipersNum: 1,
  113.                                 swipers: {
  114.                                         rows: [
  115.                                                 {
  116.                                                         id: 0,
  117.                                                         title: '',
  118.                                                         remark: '',
  119.                                                         img: '',
  120.                                                         path: null,
  121.                                                         userId: 0,
  122.                                                         createTime: '',
  123.                                                         updateTime: '',
  124.                                                         deleteTime: null
  125.                                                 }
  126.                                         ],
  127.                                         total: 0,
  128.                                         code: 0,
  129.                                         msg: ''
  130.                                 },
  131.                                 noticesNum: 1,
  132.                                 notices: {
  133.                                         rows: [
  134.                                                 {
  135.                                                         id: 0,
  136.                                                         title: '',
  137.                                                         remark: '',
  138.                                                         userId: 0,
  139.                                                         createTime: '',
  140.                                                         updateTime: '',
  141.                                                         deleteTime: null
  142.                                                 }
  143.                                         ],
  144.                                         total: 0,
  145.                                         code: 0,
  146.                                         msg: ''
  147.                                 },
  148.                                 huodongsNum: 1,
  149.                                 huodongs: {
  150.                                         rows: [
  151.                                                 {
  152.                                                         id: 0,
  153.                                                         title: '',
  154.                                                         remark: '',
  155.                                                         starttime: null,
  156.                                                         endtime: '',
  157.                                                         address: null,
  158.                                                         num: 0,
  159.                                                         views: 0,
  160.                                                         baomingnum: 0,
  161.                                                         imgs: null,
  162.                                                         img: '',
  163.                                                         content: '',
  164.                                                         fields: '',
  165.                                                         userId: 0,
  166.                                                         createTime: '',
  167.                                                         updateTime: '',
  168.                                                         deleteTime: null,
  169.                                                         baomingEndtime: null
  170.                                                 }
  171.                                         ],
  172.                                         total: 0,
  173.                                         code: 0,
  174.                                         msg: ''
  175.                                 },
  176.                                 swiperIndex: 0
  177.                         };
  178.                 },
  179.                 onShow() {
  180.                         this.setCurrentPage(this);
  181.                 },
  182.                 onLoad(option) {
  183.                         this.setCurrentPage(this);
  184.                         if (option) {
  185.                                 this.setData({
  186.                                         globalOption: this.getOption(option)
  187.                                 });
  188.                         }
  189.                         this.init();
  190.                 },
  191.                 methods: {
  192.                         async init() {
  193.                                 this.swipersApi();
  194.                                 this.noticesApi();
  195.                                 await this.huodongsApi();
  196.                         },
  197.                         // 轮播数据 API请求方法
  198.                         async swipersApi(param) {
  199.                                 let thiz = this;
  200.                                 param = param || {};
  201.                                 //请求地址及请求数据,可以在加载前执行上面增加自己的代码逻辑
  202.                                 let http_url = '/cms/api.swiper/list';
  203.                                 let http_data = {
  204.                                         pageNum: this.swipersNum,
  205.                                         pageSize: 10,
  206.                                         pageSize: param.pageSize || '5'
  207.                                 };
  208.                                 let http_header = {};
  209.                                 let swipers = await this.$http.post(http_url, http_data, http_header, 'json');
  210.                                 this.swipers = swipers;
  211.                                 this.globalData.isshow = true;
  212.                         },
  213.                         // 公告数据 API请求方法
  214.                         async noticesApi(param) {
  215.                                 let thiz = this;
  216.                                 param = param || {};
  217.                                 //请求地址及请求数据,可以在加载前执行上面增加自己的代码逻辑
  218.                                 let http_url = '/cms/api.notice/list';
  219.                                 let http_data = {
  220.                                         pageNum: this.noticesNum,
  221.                                         pageSize: 10,
  222.                                         pageSize: param.pageSize || '5'
  223.                                 };
  224.                                 let http_header = {};
  225.                                 let notices = await this.$http.post(http_url, http_data, http_header, 'json');
  226.                                 this.notices = notices;
  227.                         },
  228.                         // 活动数据 API请求方法
  229.                         async huodongsApi(param) {
  230.                                 let thiz = this;
  231.                                 param = param || {};
  232.                                 //如果请求要重置页面,请配置点击附加参数refresh=1  增加判断如输入框回调param不是对象
  233.                                 if (param.refresh || typeof param != 'object') {
  234.                                         this.huodongsNum = 1;
  235.                                 }
  236.                                 //请求地址及请求数据,可以在加载前执行上面增加自己的代码逻辑
  237.                                 let http_url = '/cms/api.huodong/list';
  238.                                 let http_data = {
  239.                                         pageNum: this.huodongsNum,
  240.                                         pageSize: 10
  241.                                 };
  242.                                 let http_header = {};
  243.                                 http_data.baomingEndtime_gt = this.$tools.formatDateTime(new Date());
  244.                                 let huodongs = await this.$http.post(http_url, http_data, http_header, 'json');
  245.                                 let datarows = huodongs.rows;
  246.                                 if (http_data.pageNum == 1) {
  247.                                         this.huodongs = huodongs;
  248.                                 } else if (datarows) {
  249.                                         let rows = this.huodongs.rows.concat(datarows);
  250.                                         huodongs.rows = rows;
  251.                                         this.huodongs = Object.assign(this.huodongs, huodongs);
  252.                                 }
  253.                                 if (datarows && datarows.length > 0) {
  254.                                         this.huodongsNum = this.huodongsNum + 1;
  255.                                 }
  256.                                 this.globalData.isshow = true;
  257.                         },
  258.                         // 打开链接 自定义方法
  259.                         async openFunction(param) {
  260.                                 let thiz = this;
  261.                                 let path = param && (param.path || param.path == 0) ? param.path : thiz.item.path || '';
  262.                                 if (path) {
  263.                                         this.navigateTo({
  264.                                                 type: 'page',
  265.                                                 url: path
  266.                                         });
  267.                                 }
  268.                         },
  269.                         changeSwiper(evt) {
  270.                                 let swiperIndex = evt.detail.current;
  271.                                 this.setData({ swiperIndex });
  272.                         }
  273.                 },
  274.                 onPullDownRefresh() {
  275.                         // 活动数据 API请求方法
  276.                         this.huodongsNum = 1;
  277.                         this.huodongsApi();
  278.                         uni.stopPullDownRefresh();
  279.                 },
  280.                 onReachBottom() {
  281.                         // 活动数据 API请求方法
  282.                         this.huodongsApi();
  283.                 }
  284.         };
  285. </script>
  286. <style lang="scss" scoped>
  287.         .flex13-clz {
  288.                 padding-top: 6rpx;
  289.                 border-bottom-left-radius: 12rpx;
  290.                 padding-left: 0rpx;
  291.                 padding-bottom: 6rpx;
  292.                 border-top-right-radius: 12rpx;
  293.                 margin-right: 20rpx;
  294.                 background-color: #ffffff;
  295.                 margin-left: 20rpx;
  296.                 box-shadow: 0rpx 0rpx 12rpx 2px rgba(219, 219, 219, 0.31);
  297.                 overflow: hidden;
  298.                 width: calc(100% - 20rpx - 20rpx) !important;
  299.                 border-top-left-radius: 12rpx;
  300.                 margin-top: 10rpx;
  301.                 border-bottom-right-radius: 12rpx;
  302.                 margin-bottom: 10rpx;
  303.                 padding-right: 0rpx;
  304.         }
  305.         .flex14-clz {
  306.                 margin-left: 10rpx;
  307.                 padding-top: 0rpx;
  308.                 z-index: 1;
  309.                 font-weight: bold;
  310.                 letter-spacing: 4rpx !important;
  311.                 padding-left: 10rpx;
  312.                 padding-bottom: 0rpx;
  313.                 margin-top: 0rpx;
  314.                 font-style: italic;
  315.                 margin-bottom: 0rpx;
  316.                 margin-right: -20rpx;
  317.                 padding-right: 10rpx;
  318.         }
  319.         .text7-clz {
  320.                 color: #00d6b9;
  321.         }
  322.         .noticebar-clz {
  323.                 flex: 1;
  324.         }
  325.         .swiper-clz {
  326.                 background-color: #ffffff;
  327.                 margin-left: 20rpx;
  328.                 border-bottom-left-radius: 12rpx;
  329.                 box-shadow: 0rpx 0rpx 12rpx 2px rgba(219, 219, 219, 0.31);
  330.                 overflow: hidden;
  331.                 width: calc(100% - 20rpx - 20rpx) !important;
  332.                 border-top-left-radius: 12rpx;
  333.                 margin-top: 10rpx;
  334.                 border-top-right-radius: 12rpx;
  335.                 border-bottom-right-radius: 12rpx;
  336.                 margin-bottom: 10rpx;
  337.                 margin-right: 20rpx;
  338.         }
  339.         .swiper-title {
  340.                 background-color: rgba(0, 0, 0, 0.281);
  341.                 color: #e6e6e6;
  342.         }
  343.         .flex32-clz {
  344.                 margin-left: 20rpx;
  345.                 padding-top: 10rpx;
  346.                 padding-left: 10rpx;
  347.                 width: calc(100% - 20rpx - 20rpx) !important;
  348.                 padding-bottom: 10rpx;
  349.                 margin-top: 10rpx;
  350.                 margin-bottom: 10rpx;
  351.                 margin-right: 20rpx;
  352.                 padding-right: 10rpx;
  353.         }
  354.         .text19-clz {
  355.                 background-color: #7feadb;
  356.                 flex-shrink: 0;
  357.                 transform: translate(0rpx, 0rpx) skew(-9deg, 0deg);
  358.                 top: -4rpx;
  359.                 width: 24rpx !important;
  360.                 position: absolute;
  361.                 right: -10rpx;
  362.                 height: 24rpx !important;
  363.         }
  364.         .text24-clz {
  365.                 background-color: #7feadb;
  366.                 flex-shrink: 0;
  367.                 transform: translate(0rpx, 0rpx) skew(-9deg, 0deg);
  368.                 left: -10rpx;
  369.                 bottom: -4rpx;
  370.                 width: 24rpx !important;
  371.                 position: absolute;
  372.                 height: 24rpx !important;
  373.         }
  374.         .text26-clz {
  375.                 padding-top: 0rpx;
  376.                 font-weight: bold;
  377.                 flex: 1;
  378.                 padding-left: 0rpx;
  379.                 font-size: 32rpx !important;
  380.                 padding-bottom: 0rpx;
  381.                 padding-right: 0rpx;
  382.         }
  383.         .text27-clz {
  384.                 margin-left: 30rpx;
  385.                 color: #b3b2b2;
  386.                 margin-top: 0rpx;
  387.                 margin-bottom: 0rpx;
  388.                 margin-right: 0rpx;
  389.         }
  390.         .text44-clz {
  391.                 color: #666666;
  392.                 text-align: right;
  393.         }
  394.         .icon1-clz {
  395.                 color: #666666;
  396.         }
  397.         .icon1 {
  398.                 font-size: 24rpx;
  399.         }
  400.         .flex6-clz {
  401.                 background-color: #ffffff;
  402.                 margin-left: 20rpx;
  403.                 border-bottom-left-radius: 12rpx;
  404.                 box-shadow: 0rpx 0rpx 12rpx 2px rgba(219, 219, 219, 0.31);
  405.                 overflow: hidden;
  406.                 width: calc(100% - 20rpx - 20rpx) !important;
  407.                 border-top-left-radius: 12rpx;
  408.                 margin-top: 10rpx;
  409.                 border-top-right-radius: 12rpx;
  410.                 border-bottom-right-radius: 12rpx;
  411.                 margin-bottom: 10rpx;
  412.                 margin-right: 20rpx;
  413.         }
  414.         .flex20-clz {
  415.                 padding-top: 10rpx;
  416.                 flex: 1;
  417.                 padding-left: 10rpx;
  418.                 padding-bottom: 10rpx;
  419.                 padding-right: 10rpx;
  420.         }
  421.         .flex35-clz {
  422.                 padding-top: 10rpx;
  423.                 flex: 1;
  424.                 padding-left: 10rpx;
  425.                 padding-bottom: 10rpx;
  426.                 padding-right: 10rpx;
  427.         }
  428.         .text22-clz {
  429.                 font-weight: bold;
  430.                 font-size: 28rpx !important;
  431.         }
  432.         .flex9-clz {
  433.                 margin-left: 0rpx;
  434.                 width: calc(100% - 0rpx - 0rpx) !important;
  435.                 margin-top: 10rpx;
  436.                 margin-bottom: 10rpx;
  437.                 margin-right: 0rpx;
  438.         }
  439.         .icon2 {
  440.                 font-size: 32rpx;
  441.         }
  442.         .text2-clz {
  443.                 padding-top: 0rpx;
  444.                 flex: 1;
  445.                 padding-left: 0rpx;
  446.                 font-size: 28rpx !important;
  447.                 padding-bottom: 0rpx;
  448.                 padding-right: 0rpx;
  449.         }
  450.         .flex15-clz {
  451.                 margin-left: 0rpx;
  452.                 width: calc(100% - 0rpx - 0rpx) !important;
  453.                 margin-top: 10rpx;
  454.                 margin-bottom: 10rpx;
  455.                 margin-right: 0rpx;
  456.         }
  457.         .icon5 {
  458.                 font-size: 32rpx;
  459.         }
  460.         .text8-clz {
  461.                 padding-top: 0rpx;
  462.                 flex: 1;
  463.                 padding-left: 0rpx;
  464.                 font-size: 28rpx !important;
  465.                 padding-bottom: 0rpx;
  466.                 padding-right: 0rpx;
  467.         }
  468.         .flex1-clz {
  469.                 padding-top: 20rpx;
  470.                 padding-left: 20rpx;
  471.                 padding-bottom: 20rpx;
  472.                 padding-right: 20rpx;
  473.         }
  474.         .image1-size {
  475.                 height: 400rpx !important;
  476.                 width: 400rpx !important;
  477.         }
  478.         .text-clz {
  479.                 color: #969696;
  480.                 font-size: 28rpx !important;
  481.         }
  482.         .flex2-clz {
  483.                 border-top: 2rpx solid #e4e4e4;
  484.                 padding-top: 16rpx;
  485.                 border-bottom-left-radius: 0rpx;
  486.                 bottom: 0rpx;
  487.                 padding-left: 16rpx;
  488.                 padding-bottom: 16rpx;
  489.                 border-top-right-radius: 24rpx;
  490.                 background-color: #ffffff;
  491.                 box-shadow: 0rpx 4rpx 12rpx rgba(31, 31, 31, 0.16);
  492.                 overflow: visible;
  493.                 left: 0rpx;
  494.                 border-top-left-radius: 24rpx;
  495.                 border-bottom-right-radius: 0rpx;
  496.                 padding-right: 16rpx;
  497.         }
  498.         .flex8-clz {
  499.                 flex: 1;
  500.         }
  501.         .image2-size {
  502.                 height: 48rpx !important;
  503.                 width: 48rpx !important;
  504.         }
  505.         .text3-clz {
  506.                 color: #031aeb;
  507.         }
  508.         .flex4-clz {
  509.                 flex: 1;
  510.         }
  511.         .image3-size {
  512.                 height: 48rpx !important;
  513.                 width: 48rpx !important;
  514.         }
  515.         .flex11-clz {
  516.                 flex: 1;
  517.         }
  518.         .text15-clz {
  519.                 border: 2rpx solid #eee;
  520.                 border-bottom-left-radius: 40rpx;
  521.                 -webkit-animation-duration: 5000ms;
  522.                 color: #ffffff;
  523.                 animation-delay: 1000ms;
  524.                 -webkit-animation-delay: 1000ms;
  525.                 border-top-right-radius: 40rpx;
  526.                 right: -8rpx;
  527.                 background-color: rgba(255, 17, 17, 0.91);
  528.                 animation-duration: 5000ms;
  529.                 flex-shrink: 0;
  530.                 overflow: hidden;
  531.                 top: -8rpx;
  532.                 width: 16rpx !important;
  533.                 border-top-left-radius: 40rpx;
  534.                 border-bottom-right-radius: 40rpx;
  535.                 position: absolute;
  536.                 height: 16rpx !important;
  537.         }
  538.         .image8-size {
  539.                 height: 48rpx !important;
  540.                 width: 48rpx !important;
  541.         }
  542.         .flex12-clz {
  543.                 flex: 1;
  544.         }
  545.         .image4-size {
  546.                 height: 48rpx !important;
  547.                 width: 48rpx !important;
  548.         }
  549.         .container335134 {
  550.                 padding-bottom: 160rpx;
  551.                 background-color: #f5f5f5;
  552.                 background-image: url(/static/loginbg.png);
  553.                 background-size: cover;
  554.                 background-repeat: no-repeat;
  555.         }
  556. </style>
复制代码
运动发布

运动CRUD

运动发布CRUD功能发布,表单可视化

运动表单

运动表单可视化拖拉表单字段拖拉计划


  1. <template>
  2.         <view class="container container335134">
  3.                 <u-form-item :borderBottom="false" v-if="!showForm && globalData.isshow" class="diygw-col-24 title-clz" labelPosition="top" prop="title">
  4.                         <u-input @blur="listApi" :data-title_like="title" data-isself="1" placeholder="请输入活动标题" v-model="title"></u-input>
  5.                         <text @tap="navigateTo" data-type="listApi" :data-title_like="title" data-isself="1" class="diy-icon-search" style="color: #363636; font-size: 32rpx"></text>
  6.                 </u-form-item>
  7.                 <view v-if="!showForm && list.total > 0" class="flex flex-wrap diygw-col-24 flex-direction-column">
  8.                         <view v-for="(item, index) in list.rows" :key="index" class="flex flex-wrap diygw-col-24 flex-direction-column flex4-clz">
  9.                                 <view class="flex flex-wrap diygw-col-24 flex-direction-column items-center" @tap="navigateTo" data-type="page" data-url="/pages/huodong/page" :data-id="item.id">
  10.                                         <text class="diygw-text-line2 diygw-col-24 text1-clz">
  11.                                                 {{ item.title }}
  12.                                         </text>
  13.                                         <text v-if="item.remark" class="diygw-text-line3 diygw-col-24 text2-clz">
  14.                                                 {{ item.remark }}
  15.                                         </text>
  16.                                 </view>
  17.                                 <view class="flex flex-wrap diygw-col-24 justify-between items-center flex2-clz">
  18.                                         <text @tap="navigateTo" data-type="page" data-url="/pages/huodong/data" :data-id="item.id" class="diygw-col-0 text7-clz"> 报名数据 </text>
  19.                                         <text @tap="navigateTo" data-type="page" data-url="/pages/huodong/field" :data-id="item.id" class="diygw-col-0 text5-clz"> 表单字段 </text>
  20.                                         <text @tap="navigateTo" data-type="editFunction" :data-index="index" class="diygw-col-0 text4-clz"> 修改 </text>
  21.                                         <text @tap="navigateTo" data-type="delApi" :data-id="item.id" :data-index="index" class="diygw-col-0 text13-clz"> 删除 </text>
  22.                                 </view>
  23.                         </view>
  24.                 </view>
  25.                 <view v-if="globalData.isshow" class="flex flex-wrap diygw-col-24 justify-start diygw-bottom flex3-clz">
  26.                         <view v-if="showForm" class="flex diygw-col-24">
  27.                                 <button @tap="showForm = false" class="diygw-btn red radius flex-sub margin-xs button-button-clz">取消</button>
  28.                                 <button @click="submitForm" class="diygw-btn green radius flex-sub margin-xs button-button-clz">保存</button>
  29.                         </view>
  30.                         <view v-if="!showForm" class="flex flex-wrap diygw-col-24 justify-center items-center green flex20-clz" @tap="showForm = true">
  31.                                 <text class="flex icon2 diygw-col-0 diy-icon-add"></text>
  32.                                 <text class="diygw-col-0"> 新增活动 </text>
  33.                         </view>
  34.                 </view>
  35.                 <view v-if="!showForm && globalData.isshow && list.code == 200 && list.total == 0" class="flex flex-wrap diygw-col-24 flex-direction-column items-center flex-clz">
  36.                         <image src="/static/zwjl.png" class="image-size diygw-image diygw-col-0" mode="widthFix"></image>
  37.                         <text class="diygw-col-0 text-clz"> 未找到任何数据 </text>
  38.                 </view>
  39.                 <u-form :model="form" :rules="formRules" :errorType="['message', 'toast']" ref="formRef" v-if="showForm" class="flex diygw-form diygw-col-24 form-clz">
  40.                         <u-form-item class="diygw-col-24" :required="true" label="活动标题" prop="title">
  41.                                 <u-input placeholder="请输入活动标题" v-model="form.title"></u-input>
  42.                         </u-form-item>
  43.                         <u-form-item class="diygw-col-24" label="开始时间" :required="true" prop="starttime">
  44.                                 <u-input @click="formData.showStarttime = true" class="" placeholder="请选择开始时间" v-model="form.starttime" type="select"></u-input>
  45.                                 <u-picker :defaultTime="form.starttime" v-model="formData.showStarttime" mode="time" :params="formData.paramsStarttime" @confirm="changeFormStarttime"></u-picker>
  46.                         </u-form-item>
  47.                         <u-form-item class="diygw-col-24" label="结束时间" :required="true" prop="endtime">
  48.                                 <u-input @click="formData.showEndtime = true" class="" placeholder="请选择结束时间" v-model="form.endtime" type="select"></u-input>
  49.                                 <u-picker :defaultTime="form.endtime" v-model="formData.showEndtime" mode="time" :params="formData.paramsEndtime" @confirm="changeFormEndtime"></u-picker>
  50.                         </u-form-item>
  51.                         <u-form-item class="diygw-col-24" :required="true" label="活动地点" prop="address">
  52.                                 <u-input placeholder="请输入活动地点" v-model="form.address"></u-input>
  53.                         </u-form-item>
  54.                         <u-form-item :required="true" class="diygw-col-24" label="活动封面" prop="img">
  55.                                 <u-upload width="160" height="160" margin="0" maxCount="1" @on-success="uploadFormImg" @on-remove="delFormImg" action="/sys/storage/upload" v-model="form.img"> </u-upload>
  56.                         </u-form-item>
  57.                         <u-form-item :required="true" class="diygw-col-24" label="活动轮播图" prop="imgs">
  58.                                 <u-upload width="160" height="160" maxCount="6" @on-success="uploadFormImgs" @on-remove="delFormImgs" action="/sys/storage/upload" v-model="form.imgs"> </u-upload>
  59.                         </u-form-item>
  60.                         <u-form-item labelWidth="auto" class="diygw-col-24" label="报名结束时间" :required="true" prop="baomingEndtime">
  61.                                 <u-input @click="formData.showBaomingEndtime = true" class="" placeholder="请选择结束时间" v-model="form.baomingEndtime" type="select"></u-input>
  62.                                 <u-picker :defaultTime="form.baomingEndtime" v-model="formData.showBaomingEndtime" mode="time" :params="formData.paramsBaomingEndtime" @confirm="changeFormBaomingEndtime"></u-picker>
  63.                         </u-form-item>
  64.                         <u-form-item class="diygw-col-24" label="活动描述" prop="remark">
  65.                                 <u-input maxlength="200" height="60px" class="" placeholder="请输入备注" v-model="form.remark" type="textarea"></u-input>
  66.                         </u-form-item>
  67.                         <u-form-item :borderBottom="false" class="diygw-col-24" labelPosition="top" prop="content">
  68.                                 <diy-editor height="400px" v-model="form.content"></diy-editor>
  69.                         </u-form-item>
  70.                 </u-form>
  71.                 <view class="clearfix"></view>
  72.         </view>
  73. </template>
  74. <script>
  75.         export default {
  76.                 data() {
  77.                         return {
  78.                                 //用户全局信息
  79.                                 userInfo: {},
  80.                                 //页面传参
  81.                                 globalOption: {},
  82.                                 //自定义全局变量
  83.                                 globalData: { isshow: false },
  84.                                 listNum: 1,
  85.                                 list: {
  86.                                         rows: [],
  87.                                         total: 0,
  88.                                         code: 200,
  89.                                         msg: 'success'
  90.                                 },
  91.                                 del: {
  92.                                         code: 200,
  93.                                         msg: '删除成功'
  94.                                 },
  95.                                 title: '',
  96.                                 showForm: false,
  97.                                 formRules: {
  98.                                         title: [
  99.                                                 {
  100.                                                         trigger: ['change', 'blur'],
  101.                                                         required: true,
  102.                                                         message: '标题不能为空'
  103.                                                 }
  104.                                         ],
  105.                                         starttime: [
  106.                                                 {
  107.                                                         trigger: ['change', 'blur'],
  108.                                                         required: true,
  109.                                                         message: '结束时间不能为空哟'
  110.                                                 }
  111.                                         ],
  112.                                         endtime: [
  113.                                                 {
  114.                                                         trigger: ['change', 'blur'],
  115.                                                         required: true,
  116.                                                         message: '结束时间不能为空哟'
  117.                                                 }
  118.                                         ],
  119.                                         address: [
  120.                                                 {
  121.                                                         trigger: ['change', 'blur'],
  122.                                                         required: true,
  123.                                                         message: '标题不能为空'
  124.                                                 }
  125.                                         ],
  126.                                         img: [
  127.                                                 {
  128.                                                         trigger: ['change', 'blur'],
  129.                                                         required: true,
  130.                                                         message: '请上传图片哟'
  131.                                                 }
  132.                                         ],
  133.                                         imgs: [
  134.                                                 {
  135.                                                         trigger: ['change', 'blur'],
  136.                                                         required: true,
  137.                                                         message: '请上传图片哟'
  138.                                                 }
  139.                                         ],
  140.                                         baomingEndtime: [
  141.                                                 {
  142.                                                         trigger: ['change', 'blur'],
  143.                                                         required: true,
  144.                                                         message: '结束时间不能为空哟'
  145.                                                 }
  146.                                         ]
  147.                                 },
  148.                                 form: {
  149.                                         title: '',
  150.                                         starttime: '',
  151.                                         endtime: '',
  152.                                         address: '',
  153.                                         img: '',
  154.                                         imgs: '',
  155.                                         baomingEndtime: '',
  156.                                         remark: '',
  157.                                         content: ''
  158.                                 },
  159.                                 formData: {
  160.                                         paramsStarttime: {
  161.                                                 year: true,
  162.                                                 month: true,
  163.                                                 day: true,
  164.                                                 hour: true,
  165.                                                 minute: true,
  166.                                                 second: false
  167.                                         },
  168.                                         showStarttime: false,
  169.                                         paramsEndtime: {
  170.                                                 year: true,
  171.                                                 month: true,
  172.                                                 day: true,
  173.                                                 hour: true,
  174.                                                 minute: true,
  175.                                                 second: false
  176.                                         },
  177.                                         showEndtime: false,
  178.                                         paramsBaomingEndtime: {
  179.                                                 year: true,
  180.                                                 month: true,
  181.                                                 day: true,
  182.                                                 hour: true,
  183.                                                 minute: true,
  184.                                                 second: false
  185.                                         },
  186.                                         showBaomingEndtime: false
  187.                                 }
  188.                         };
  189.                 },
  190.                 onShow() {
  191.                         this.setCurrentPage(this);
  192.                 },
  193.                 onLoad(option) {
  194.                         this.setCurrentPage(this);
  195.                         if (option) {
  196.                                 this.setData({
  197.                                         globalOption: this.getOption(option)
  198.                                 });
  199.                         }
  200.                         this.init();
  201.                 },
  202.                 onReady() {
  203.                         this.$refs.formRef?.setRules(this.formRules);
  204.                 },
  205.                 methods: {
  206.                         async init() {
  207.                                 await this.listApi();
  208.                                 await this.initResetform();
  209.                         },
  210.                         // 列表数据 API请求方法
  211.                         async listApi(param) {
  212.                                 let thiz = this;
  213.                                 param = param || {};
  214.                                 //如果请求要重置页面,请配置点击附加参数refresh=1  增加判断如输入框回调param不是对象
  215.                                 if (param.refresh || typeof param != 'object') {
  216.                                         this.listNum = 1;
  217.                                 }
  218.                                 //请求地址及请求数据,可以在加载前执行上面增加自己的代码逻辑
  219.                                 let http_url = '/cms/huodong/list';
  220.                                 let http_data = {
  221.                                         pageNum: this.listNum,
  222.                                         pageSize: 10,
  223.                                         title_like: param.title_like || this.title,
  224.                                         isself: param.isself || '1'
  225.                                 };
  226.                                 let http_header = {};
  227.                                 //如果是管理员,可以看见所有的活动
  228.                                 if (this.userInfo.username == 'admin') {
  229.                                         delete http_data.isself;
  230.                                 }
  231.                                 let list = await this.$http.post(http_url, http_data, http_header, 'json');
  232.                                 let datarows = list.rows;
  233.                                 if (http_data.pageNum == 1) {
  234.                                         this.list = list;
  235.                                 } else if (datarows) {
  236.                                         let rows = this.list.rows.concat(datarows);
  237.                                         list.rows = rows;
  238.                                         this.list = Object.assign(this.list, list);
  239.                                 }
  240.                                 if (datarows && datarows.length > 0) {
  241.                                         this.listNum = this.listNum + 1;
  242.                                 }
  243.                                 this.globalData.isshow = true;
  244.                         },
  245.                         // 删除数据 API请求方法
  246.                         async delApi(param) {
  247.                                 let thiz = this;
  248.                                 param = param || {};
  249.                                 //请求地址及请求数据,可以在加载前执行上面增加自己的代码逻辑
  250.                                 let http_url = '/cms/huodong/del';
  251.                                 let http_data = {
  252.                                         id: param.id || this.item.id,
  253.                                         index: param.index || this.index
  254.                                 };
  255.                                 let http_header = {};
  256.                                 let flag = await this.showModal('是否确定删除该数据');
  257.                                 if (!flag) {
  258.                                         this.showToast('你已取消删');
  259.                                         return;
  260.                                 }
  261.                                 let del = await this.$http.post(http_url, http_data, http_header, 'json');
  262.                                 this.del = del;
  263.                                 if (del.code == 200) {
  264.                                         this.list.rows.splice(param.index, 1);
  265.                                         this.list.total = this.list.rows.length;
  266.                                         this.showToast('删除数据成功');
  267.                                 } else {
  268.                                         this.showToast('删除数据失败', 'error');
  269.                                 }
  270.                         },
  271.                         // 修改数据 自定义方法
  272.                         async editFunction(param) {
  273.                                 let thiz = this;
  274.                                 let index = param && (param.index || param.index == 0) ? param.index : thiz.index || '';
  275.                                 this.form = JSON.parse(JSON.stringify(this.list.rows[param.index]));
  276.                                 this.showForm = true;
  277.                         },
  278.                         changeFormStarttime(evt) {
  279.                                 this.form.starttime = evt.year + '-' + evt.month + '-' + evt.day + ' ' + evt.hour + ':' + evt.minute;
  280.                         },
  281.                         changeFormEndtime(evt) {
  282.                                 this.form.endtime = evt.year + '-' + evt.month + '-' + evt.day + ' ' + evt.hour + ':' + evt.minute;
  283.                         },
  284.                         changeFormImg(index, lists) {},
  285.                         delFormImg(index, lists) {
  286.                                 this.changeFormImg(index, lists);
  287.                         },
  288.                         uploadFormImg(res, index, lists) {
  289.                                 this.changeFormImg(index, lists);
  290.                         },
  291.                         changeFormImgs(index, lists) {},
  292.                         delFormImgs(index, lists) {
  293.                                 this.changeFormImgs(index, lists);
  294.                         },
  295.                         uploadFormImgs(res, index, lists) {
  296.                                 this.changeFormImgs(index, lists);
  297.                         },
  298.                         changeFormBaomingEndtime(evt) {
  299.                                 this.form.baomingEndtime = evt.year + '-' + evt.month + '-' + evt.day + ' ' + evt.hour + ':' + evt.minute;
  300.                         },
  301.                         initResetform() {
  302.                                 this.initform = JSON.stringify(this.form);
  303.                                 //如果想给表单默认初始值,其中row为某一行数据也可能是API返回的结果集,然后给到this.form
  304.                                 //this.form = this.$tools.changeRowToForm(row,this.form)
  305.                         },
  306.                         resetForm() {
  307.                                 this.form = JSON.parse(this.initform);
  308.                         },
  309.                         async submitForm(e) {
  310.                                 this.$refs.formRef?.setRules(this.formRules);
  311.                                 this.$nextTick(async () => {
  312.                                         let valid = await this.$refs.formRef.validate();
  313.                                         if (valid) {
  314.                                                 //保存数据
  315.                                                 let param = this.form;
  316.                                                 let header = {};
  317.                                                 let url = '/cms/huodong/add';
  318.                                                 if (this.form.id) {
  319.                                                         url = '/cms/huodong/update';
  320.                                                 }
  321.                                                 uni.showLoading({
  322.                                                         title: '正在保存...'
  323.                                                 });
  324.                                                 let res = await this.$http.post(url, param, header, 'json');
  325.                                                 uni.hideLoading();
  326.                                                 if (res.code == 200) {
  327.                                                         //更新列表数据
  328.                                                         this.listNum = 1;
  329.                                                         this.listApi();
  330.                                                         if (this.form.id) {
  331.                                                                 this.showToast('更新成功');
  332.                                                                 //关闭窗口
  333.                                                                 this.showForm = false;
  334.                                                         } else {
  335.                                                                 //提示是否继续新增
  336.                                                                 let flag = await this.showModal('是否继续新增');
  337.                                                                 if (flag) {
  338.                                                                         //重置表单
  339.                                                                         this.resetForm();
  340.                                                                 } else {
  341.                                                                         //关闭窗口
  342.                                                                         this.showForm = false;
  343.                                                                 }
  344.                                                         }
  345.                                                 } else {
  346.                                                         this.showModal(res.msg, '提示', false);
  347.                                                 }
  348.                                         } else {
  349.                                                 console.log('验证失败');
  350.                                         }
  351.                                 });
  352.                         }
  353.                 },
  354.                 onPullDownRefresh() {
  355.                         // 列表数据 API请求方法
  356.                         this.listNum = 1;
  357.                         this.listApi();
  358.                         uni.stopPullDownRefresh();
  359.                 },
  360.                 onReachBottom() {
  361.                         // 列表数据 API请求方法
  362.                         this.listApi();
  363.                 }
  364.         };
  365. </script>
  366. <style lang="scss" scoped>
  367.         .title-clz {
  368.                 background-color: #ffffff;
  369.                 margin-left: 16rpx;
  370.                 border-bottom-left-radius: 12rpx;
  371.                 overflow: hidden;
  372.                 width: calc(100% - 16rpx - 16rpx) !important;
  373.                 border-top-left-radius: 12rpx;
  374.                 margin-top: 16rpx;
  375.                 border-top-right-radius: 12rpx;
  376.                 border-bottom-right-radius: 12rpx;
  377.                 margin-bottom: 16rpx;
  378.                 margin-right: 16rpx;
  379.         }
  380.         .flex4-clz {
  381.                 padding-top: 10rpx;
  382.                 border-bottom-left-radius: 12rpx;
  383.                 padding-left: 10rpx;
  384.                 padding-bottom: 10rpx;
  385.                 border-top-right-radius: 12rpx;
  386.                 margin-right: 20rpx;
  387.                 background-color: #ffffff;
  388.                 margin-left: 20rpx;
  389.                 overflow: hidden;
  390.                 width: calc(100% - 20rpx - 20rpx) !important;
  391.                 border-top-left-radius: 12rpx;
  392.                 margin-top: 10rpx;
  393.                 border-bottom-right-radius: 12rpx;
  394.                 margin-bottom: 10rpx;
  395.                 padding-right: 10rpx;
  396.         }
  397.         .text1-clz {
  398.                 padding-top: 10rpx;
  399.                 padding-left: 10rpx;
  400.                 font-size: 28rpx !important;
  401.                 padding-bottom: 10rpx;
  402.                 padding-right: 10rpx;
  403.         }
  404.         .text2-clz {
  405.                 padding-top: 10rpx;
  406.                 color: #7c7c7c;
  407.                 padding-left: 10rpx;
  408.                 padding-bottom: 10rpx;
  409.                 padding-right: 10rpx;
  410.         }
  411.         .flex2-clz {
  412.                 border-top: 2rpx solid #eee;
  413.                 padding-top: 10rpx;
  414.                 color: #6b6b6b;
  415.                 padding-left: 10rpx;
  416.                 padding-bottom: 10rpx;
  417.                 padding-right: 10rpx;
  418.         }
  419.         .text7-clz {
  420.                 border: 2rpx solid #038af2;
  421.                 padding-top: 10rpx;
  422.                 border-bottom-left-radius: 10rpx;
  423.                 color: #038af2;
  424.                 padding-left: 20rpx;
  425.                 padding-bottom: 10rpx;
  426.                 border-top-right-radius: 10rpx;
  427.                 margin-right: 10rpx;
  428.                 background-color: #f0f1ff;
  429.                 margin-left: 10rpx;
  430.                 overflow: hidden;
  431.                 border-top-left-radius: 10rpx;
  432.                 margin-top: 10rpx;
  433.                 border-bottom-right-radius: 10rpx;
  434.                 margin-bottom: 10rpx;
  435.                 padding-right: 20rpx;
  436.         }
  437.         .text5-clz {
  438.                 border: 2rpx solid #038af2;
  439.                 padding-top: 10rpx;
  440.                 border-bottom-left-radius: 10rpx;
  441.                 color: #038af2;
  442.                 padding-left: 20rpx;
  443.                 padding-bottom: 10rpx;
  444.                 border-top-right-radius: 10rpx;
  445.                 margin-right: 10rpx;
  446.                 background-color: #f0f1ff;
  447.                 margin-left: 10rpx;
  448.                 overflow: hidden;
  449.                 border-top-left-radius: 10rpx;
  450.                 margin-top: 10rpx;
  451.                 border-bottom-right-radius: 10rpx;
  452.                 margin-bottom: 10rpx;
  453.                 padding-right: 20rpx;
  454.         }
  455.         .text4-clz {
  456.                 border: 2rpx solid #038af2;
  457.                 padding-top: 10rpx;
  458.                 border-bottom-left-radius: 10rpx;
  459.                 color: #038af2;
  460.                 padding-left: 20rpx;
  461.                 padding-bottom: 10rpx;
  462.                 border-top-right-radius: 10rpx;
  463.                 margin-right: 10rpx;
  464.                 background-color: #f0f1ff;
  465.                 margin-left: 10rpx;
  466.                 overflow: hidden;
  467.                 border-top-left-radius: 10rpx;
  468.                 margin-top: 10rpx;
  469.                 border-bottom-right-radius: 10rpx;
  470.                 margin-bottom: 10rpx;
  471.                 padding-right: 20rpx;
  472.         }
  473.         .text13-clz {
  474.                 border: 2rpx solid #ffb08f;
  475.                 padding-top: 10rpx;
  476.                 border-bottom-left-radius: 10rpx;
  477.                 color: #ff592c;
  478.                 padding-left: 20rpx;
  479.                 padding-bottom: 10rpx;
  480.                 border-top-right-radius: 10rpx;
  481.                 margin-right: 10rpx;
  482.                 background-color: #fff4f0;
  483.                 margin-left: 10rpx;
  484.                 overflow: hidden;
  485.                 border-top-left-radius: 10rpx;
  486.                 margin-top: 10rpx;
  487.                 border-bottom-right-radius: 10rpx;
  488.                 margin-bottom: 10rpx;
  489.                 padding-right: 20rpx;
  490.         }
  491.         .flex3-clz {
  492.                 padding-top: 16rpx;
  493.                 border-bottom-left-radius: 0rpx;
  494.                 color: #747474;
  495.                 bottom: 0rpx;
  496.                 padding-left: 16rpx;
  497.                 padding-bottom: 16rpx;
  498.                 border-top-right-radius: 20rpx;
  499.                 background-color: #ffffff;
  500.                 overflow: hidden;
  501.                 left: 0rpx;
  502.                 border-top-left-radius: 20rpx;
  503.                 border-bottom-right-radius: 0rpx;
  504.                 padding-right: 16rpx;
  505.         }
  506.         .button-button-clz {
  507.                 margin: 6rpx !important;
  508.         }
  509.         .flex20-clz {
  510.                 padding-top: 16rpx;
  511.                 border-bottom-left-radius: 200rpx;
  512.                 overflow: hidden;
  513.                 font-weight: bold;
  514.                 padding-left: 10rpx;
  515.                 font-size: 28rpx !important;
  516.                 padding-bottom: 16rpx;
  517.                 border-top-left-radius: 200rpx;
  518.                 border-top-right-radius: 200rpx;
  519.                 border-bottom-right-radius: 200rpx;
  520.                 padding-right: 10rpx;
  521.         }
  522.         .icon2 {
  523.                 font-size: 40rpx;
  524.         }
  525.         .flex-clz {
  526.                 padding-top: 20rpx;
  527.                 padding-left: 20rpx;
  528.                 padding-bottom: 20rpx;
  529.                 padding-right: 20rpx;
  530.         }
  531.         .image-size {
  532.                 height: 400rpx !important;
  533.                 width: 400rpx !important;
  534.         }
  535.         .text-clz {
  536.                 color: #969696;
  537.                 font-size: 28rpx !important;
  538.         }
  539.         .form-clz {
  540.                 padding-top: 10rpx;
  541.                 border-bottom-left-radius: 12rpx;
  542.                 padding-left: 10rpx;
  543.                 padding-bottom: 10rpx;
  544.                 border-top-right-radius: 12rpx;
  545.                 margin-right: 20rpx;
  546.                 background-color: #ffffff;
  547.                 margin-left: 20rpx;
  548.                 overflow: hidden;
  549.                 width: calc(100% - 20rpx - 20rpx) !important;
  550.                 border-top-left-radius: 12rpx;
  551.                 margin-top: 10rpx;
  552.                 border-bottom-right-radius: 12rpx;
  553.                 margin-bottom: 10rpx;
  554.                 padding-right: 10rpx;
  555.         }
  556.         .container335134 {
  557.                 padding-bottom: 160rpx;
  558.                 background-color: #f5f5f5;
  559.         }
  560. </style>
复制代码
运动表单自定义字段

自定义表单字段,支持多种字段范例


  1. <template>
  2.         <view class="container container335134">
  3.                 <u-form :model="form" :rules="formRules" :errorType="['message', 'toast']" ref="formRef" class="flex diygw-form diygw-col-24">
  4.                         <u-form-item class="diygw-col-24 hidden" label="标题" prop="input">
  5.                                 <u-input placeholder="由于表单验证至少保留一个输入" v-model="form.input"></u-input>
  6.                         </u-form-item>
  7.                         <view v-if="isData && form.fields.length > 0" class="flex flex-wrap diygw-col-24 flex-direction-column items-center flex8-clz">
  8.                                 <text class="diygw-col-0"> 已存在预约数据,不要修改变量字段类型。 </text>
  9.                         </view>
  10.                         <view class="flex flex-wrap diygw-col-24 flex-direction-column flex2-clz">
  11.                                 <view class="flex flex-wrap diygw-col-24">
  12.                                         <view class="diygw-col-24" v-for="(fieldsItem, fieldsIndex) in form.fields" :key="fieldsItem">
  13.                                                 <u-form class="diygw-col-24" :model="form.fields[fieldsIndex]" :errorType="['message', 'toast']" ref="fieldsRef" :rules="fieldsItemRules">
  14.                                                         <view class="flex flex-wrap diygw-col-24 flex-direction-column flex-clz">
  15.                                                                 <text class="diygw-col-24 text1-clz"> 字段{{ fieldsIndex + 1 }} </text>
  16.                                                                 <u-form-item class="diygw-col-24 diygw-form-border diygw-uform-item" label="字段标题" prop="title">
  17.                                                                         <view class="flex flex-sub padding-top-xs padding-bottom-xs align-center solid">
  18.                                                                                 <u-input placeholder="请输入字段标题" v-model="fieldsItem.title"></u-input>
  19.                                                                         </view>
  20.                                                                 </u-form-item>
  21.                                                                 <u-form-item class="diygw-col-24" label="是否必填" prop="required">
  22.                                                                         <view class="flex diygw-col-24 justify-end">
  23.                                                                                 <u-switch :size="44" :activeValue="1" :inactiveValue="0" inactiveTextColor="#000000" activeTextColor="#ffffff" v-model="fieldsItem.required" slot="right"></u-switch>
  24.                                                                         </view>
  25.                                                                 </u-form-item>
  26.                                                                 <u-form-item v-if="!isData || (isData && !fieldsItem.field)" class="diygw-col-24 diygw-uform-item diygw-form-border" label="字段类型" prop="type">
  27.                                                                         <diy-selectinput @click="formData.fieldsItemDatas[fieldsIndex].showType = true" class="diygw-col-24 solid" valueName="value" labelName="label" :list="formData.fieldsItemDatas[fieldsIndex].typeDatas" placeholder="请选择" v-model="fieldsItem.type" type="select"></diy-selectinput>
  28.                                                                         <u-select mode="single-column" valueName="value" labelName="label" :list="formData.fieldsItemDatas[fieldsIndex].typeDatas" isDefaultSelect :defaultSelectValue="fieldsItem.type" v-model="formData.fieldsItemDatas[fieldsIndex].showType" @confirm="changeFieldsItemType($event, fieldsIndex, fieldsItem)"></u-select>
  29.                                                                 </u-form-item>
  30.                                                                 <view v-if="isData && fieldsItem.field" class="flex flex-wrap diygw-col-24 flex9-clz">
  31.                                                                         <text class="diygw-col-0 text-clz"> 字段类型 </text>
  32.                                                                         <text class="diygw-col-0 text5-clz">
  33.                                                                                 {{ getType(fieldsItem) }}
  34.                                                                         </text>
  35.                                                                 </view>
  36.                                                                 <view v-if="['radio', 'checkbox', 'select'].includes(fieldsItem.type)" class="flex flex-wrap diygw-col-24 flex-direction-column flex1-clz">
  37.                                                                         <view class="flex flex-wrap diygw-col-24 flex-direction-column">
  38.                                                                                 <text class="diygw-col-24 text3-clz"> 选项值 </text>
  39.                                                                                 <view class="flex flex-wrap diygw-col-24 datas-clz">
  40.                                                                                         <view class="diygw-col-24" v-for="(datasItem, datasIndex) in fieldsItem.datas" :key="datasItem">
  41.                                                                                                 <u-form class="diygw-col-24" :model="fieldsItem.datas[datasIndex]" :errorType="['message', 'toast']" ref="datasRef" :rules="datasItemRules">
  42.                                                                                                         <view class="flex flex-wrap diygw-col-24 flex5-clz">
  43.                                                                                                                 <u-form-item class="diygw-col-0 value-clz diygw-form-border diygw-uform-item diygw-form-item-notpadding" labelPosition="top" prop="value">
  44.                                                                                                                         <view class="flex flex-sub padding-top-xs padding-bottom-xs align-center solid">
  45.                                                                                                                                 <u-input placeholder="请输入选项值" v-model="datasItem.value"></u-input>
  46.                                                                                                                         </view>
  47.                                                                                                                 </u-form-item>
  48.                                                                                                                 <view class="flex flex-wrap diygw-col-0 flex4-clz">
  49.                                                                                                                         <text @tap="navigateTo" data-type="upDatasItemFunction" :data-index="datasIndex" :data-fields-index="fieldsIndex" class="flex icon diygw-col-0 icon-clz diy-icon-fold"></text>
  50.                                                                                                                         <text @tap="navigateTo" data-type="downDatasItemFunction" :data-index="datasIndex" :data-fields-index="fieldsIndex" class="flex icon3 diygw-col-0 icon3-clz diy-icon-unfold"></text>
  51.                                                                                                                         <text @tap="navigateTo" data-type="addDatasItemFunction" :data-fields-index="fieldsIndex" class="flex icon2 diygw-col-0 icon2-clz diy-icon-add"></text>
  52.                                                                                                                         <text @tap="navigateTo" data-type="delDatasItemFunction" :data-fields-index="fieldsIndex" :data-index="datasIndex" class="flex icon1 diygw-col-0 icon1-clz diy-icon-close"></text>
  53.                                                                                                                 </view>
  54.                                                                                                         </view>
  55.                                                                                                 </u-form>
  56.                                                                                         </view>
  57.                                                                                 </view>
  58.                                                                         </view>
  59.                                                                 </view>
  60.                                                         </view>
  61.                                                 </u-form>
  62.                                                 <view class="formfieldstools flex justify-end">
  63.                                                         <button @tap="upFieldsItem" :data-index="fieldsIndex" class="diygw-btn flex-sub radius margin-xs">
  64.                                                                 <text class="button-icon diy-icon-fold"></text>
  65.                                                         </button>
  66.                                                         <button @tap="downFieldsItem" :data-index="fieldsIndex" class="diygw-btn flex-sub radius margin-xs">
  67.                                                                 <text class="button-icon diy-icon-unfold"></text>
  68.                                                         </button>
  69.                                                         <button @tap="addFieldsItem" :data-index="fieldsIndex" class="diygw-btn flex-sub radius margin-xs">
  70.                                                                 <text class="button-icon diy-icon-add"></text>
  71.                                                         </button>
  72.                                                         <button @tap="delFieldsItem" :data-index="fieldsIndex" class="diygw-btn flex-sub radius margin-xs">
  73.                                                                 <text class="button-icon diy-icon-close"></text>
  74.                                                         </button>
  75.                                                 </view>
  76.                                         </view>
  77.                                 </view>
  78.                         </view>
  79.                 </u-form>
  80.                 <view v-if="isshow && form.fields.length == 0" class="flex flex-wrap diygw-col-24 flex-direction-column items-center">
  81.                         <text class="diygw-col-0"> 字段为空,是否添加自定义活动字段 </text>
  82.                         <button @tap="addFieldsItem" class="diygw-col-24 btn-clz diygw-btn-default">新增字段</button>
  83.                 </view>
  84.                 <view v-if="form.fields.length > 0" class="flex flex-wrap diygw-col-24 justify-start diygw-bottom flex7-clz">
  85.                         <view class="flex diygw-col-24">
  86.                                 <button @tap="$tools.backpage()" class="diygw-btn red radius flex-sub margin-xs button-button-clz">取消</button>
  87.                                 <button @click="submitForm" class="diygw-btn green radius flex-sub margin-xs button-button-clz">保存</button>
  88.                         </view>
  89.                 </view>
  90.                 <view class="clearfix"></view>
  91.         </view>
  92. </template>
  93. <script>
  94.         export default {
  95.                 data() {
  96.                         return {
  97.                                 //用户全局信息
  98.                                 userInfo: {},
  99.                                 //页面传参
  100.                                 globalOption: {},
  101.                                 //自定义全局变量
  102.                                 globalData: {},
  103.                                 data: {
  104.                                         code: 200,
  105.                                         msg: 'success',
  106.                                         data: {
  107.                                                 id: 5,
  108.                                                 title: 'cms',
  109.                                                 remark: 'cmscmscms',
  110.                                                 endtime: '2025-02-12 00:00:00',
  111.                                                 num: 0,
  112.                                                 img: 'http://sell.t.com/storage/image/20250212/fe98841d27ec081580410b325ecf552903d33e0b.png',
  113.                                                 content: '<p>cmscmscmscmscmscmscms</p>',
  114.                                                 fields: null,
  115.                                                 userId: 1,
  116.                                                 createTime: '2025-02-12 16:57:07',
  117.                                                 updateTime: '2025-02-12 16:57:07',
  118.                                                 deleteTime: null
  119.                                         }
  120.                                 },
  121.                                 huodongDataNum: 1,
  122.                                 huodongData: {
  123.                                         rows: [
  124.                                                 {
  125.                                                         id: 0,
  126.                                                         title: '',
  127.                                                         img: '',
  128.                                                         remark: '',
  129.                                                         data: '',
  130.                                                         huodongId: 0,
  131.                                                         huodongTitle: '',
  132.                                                         userId: 0,
  133.                                                         createTime: '',
  134.                                                         updateTime: '',
  135.                                                         deleteTime: null
  136.                                                 }
  137.                                         ],
  138.                                         total: 0,
  139.                                         code: 0,
  140.                                         msg: ''
  141.                                 },
  142.                                 isData: false,
  143.                                 isshow: false,
  144.                                 datasItem: {
  145.                                         value: ''
  146.                                 },
  147.                                 datasItemRules: {},
  148.                                 form: {
  149.                                         input: '',
  150.                                         fields: []
  151.                                 },
  152.                                 fieldsItem: {
  153.                                         title: '',
  154.                                         required: 1,
  155.                                         type: 'input',
  156.                                         datasItemDatas: [],
  157.                                         datas: []
  158.                                 },
  159.                                 formRules: {},
  160.                                 fieldsItemData: {
  161.                                         showType: false,
  162.                                         typeDatas: [
  163.                                                 { value: 'input', label: '单选文本' },
  164.                                                 { value: 'textarea', label: '多行文本' },
  165.                                                 { value: 'phone', label: '手机号码' },
  166.                                                 { value: 'number', label: '数字' },
  167.                                                 { value: 'img', label: '图片' },
  168.                                                 { value: 'date', label: '日期' },
  169.                                                 { value: 'datetime', label: '年月日时分' },
  170.                                                 { value: 'radio', label: '单选' },
  171.                                                 { value: 'checkbox', label: '复选' },
  172.                                                 { value: 'select', label: '下拉' },
  173.                                                 { value: 'sign', label: '手写签名' }
  174.                                         ]
  175.                                 },
  176.                                 formData: {
  177.                                         fieldsItemDatas: []
  178.                                 },
  179.                                 fieldsItemRules: {}
  180.                         };
  181.                 },
  182.                 onShow() {
  183.                         this.setCurrentPage(this);
  184.                 },
  185.                 onLoad(option) {
  186.                         this.setCurrentPage(this);
  187.                         if (option) {
  188.                                 this.setData({
  189.                                         globalOption: this.getOption(option)
  190.                                 });
  191.                         }
  192.                         this.init();
  193.                 },
  194.                 onReady() {
  195.                         this.$refs.formRef?.setRules(this.formRules);
  196.                         this.initDatasData();
  197.                 },
  198.                 methods: {
  199.                         async init() {
  200.                                 await this.dataApi();
  201.                                 await this.initResetform();
  202.                         },
  203.                         // 获取数据 API请求方法
  204.                         async dataApi(param) {
  205.                                 let thiz = this;
  206.                                 param = param || {};
  207.                                 //请求地址及请求数据,可以在加载前执行上面增加自己的代码逻辑
  208.                                 let http_url = '/cms/huodong/get';
  209.                                 let http_data = {
  210.                                         id: param.id || this.globalOption.id || '5'
  211.                                 };
  212.                                 let http_header = {};
  213.                                 if (!this.globalOption.id) {
  214.                                         this.isshow = true;
  215.                                         return;
  216.                                 }
  217.                                 let data = await this.$http.post(http_url, http_data, http_header, 'json');
  218.                                 this.data = data;
  219.                                 if (data.code == 200 && data.data.fields) {
  220.                                         this.form.fields = JSON.parse(data.data.fields);
  221.                                         let fieldsItemDatas = [];
  222.                                         this.form.fields.forEach((item) => {
  223.                                                 fieldsItemDatas.push(JSON.parse(JSON.stringify(this.fieldsItemData)));
  224.                                         });
  225.                                         this.formData.fieldsItemDatas = fieldsItemDatas;
  226.                                 }
  227.                                 this.isChange = false;
  228.                                 await this.huodongDataApi({});
  229.                                 this.isshow = true;
  230.                         },
  231.                         // 预约数据 API请求方法
  232.                         async huodongDataApi(param) {
  233.                                 let thiz = this;
  234.                                 param = param || {};
  235.                                 //请求地址及请求数据,可以在加载前执行上面增加自己的代码逻辑
  236.                                 let http_url = '/cms/api.huodongData/list';
  237.                                 let http_data = {
  238.                                         pageNum: this.huodongDataNum,
  239.                                         pageSize: 10,
  240.                                         huodongId: param.huodongId || this.globalOption.id,
  241.                                         pageSize: param.pageSize || '1'
  242.                                 };
  243.                                 let http_header = {};
  244.                                 let huodongData = await this.$http.post(http_url, http_data, http_header, 'json');
  245.                                 this.huodongData = huodongData;
  246.                                 this.isData = huodongData.total;
  247.                         },
  248.                         // 新增选项值 自定义方法
  249.                         async addDatasItemFunction(param) {
  250.                                 let thiz = this;
  251.                                 let fieldsIndex = param && (param.fieldsIndex || param.fieldsIndex == 0) ? param.fieldsIndex : thiz.fieldsIndex || '0';
  252.                                 //由于默认生成的不支持多层嵌套,所以选项值这些自定义实现
  253.                                 let fieldsItem = this.form.fields[fieldsIndex];
  254.                                 fieldsItem.datas.push(JSON.parse(JSON.stringify(this.datasItem)));
  255.                                 this.fieldsItemData.datasItemDatas.push(JSON.parse(JSON.stringify(this.datasItemData)));
  256.                                 this.initDatasValid();
  257.                         },
  258.                         // 下移子表单 自定义方法
  259.                         async downDatasItemFunction(param) {
  260.                                 let thiz = this;
  261.                                 let index = param && (param.index || param.index == 0) ? param.index : thiz.datasIndex || '';
  262.                                 let fieldsIndex = param && (param.fieldsIndex || param.fieldsIndex == 0) ? param.fieldsIndex : thiz.fieldsIndex || '';
  263.                                 let fieldsItem = this.form.fields[fieldsIndex];
  264.                                 if (index == fieldsItem.datas.length - 1) {
  265.                                         this.navigateTo({
  266.                                                 type: 'tip',
  267.                                                 tip: '已经是最后一个'
  268.                                         });
  269.                                         return false;
  270.                                 }
  271.                                 fieldsItem.datas[index] = fieldsItem.datas.splice(index + 1, 1, fieldsItem.datas[index])[0];
  272.                                 this.fieldsItemData.datasItemDatas[index] = this.fieldsItemData.datasItemDatas.splice(index + 1, 1, this.fieldsItemData.datasItemDatas[index])[0];
  273.                                 this.initDatasValid();
  274.                         },
  275.                         // 上移子表单 自定义方法
  276.                         async upDatasItemFunction(param) {
  277.                                 let thiz = this;
  278.                                 let index = param && (param.index || param.index == 0) ? param.index : thiz.datasIndex || '';
  279.                                 let fieldsIndex = param && (param.fieldsIndex || param.fieldsIndex == 0) ? param.fieldsIndex : thiz.fieldsIndex || '';
  280.                                 let fieldsItem = this.form.fields[fieldsIndex];
  281.                                 if (index == 0) {
  282.                                         this.navigateTo({
  283.                                                 type: 'tip',
  284.                                                 tip: '已经是第一个'
  285.                                         });
  286.                                         return false;
  287.                                 }
  288.                                 fieldsItem.datas[index] = fieldsItem.datas.splice(index - 1, 1, fieldsItem.datas[index])[0];
  289.                                 this.fieldsItemData.datasItemDatas[index] = this.fieldsItemData.datasItemDatas.splice(index - 1, 1, this.fieldsItemData.datasItemDatas[index])[0];
  290.                                 this.initDatasValid();
  291.                         },
  292.                         // 删除子表单 自定义方法
  293.                         async delDatasItemFunction(param) {
  294.                                 let thiz = this;
  295.                                 let fieldsIndex = param && (param.fieldsIndex || param.fieldsIndex == 0) ? param.fieldsIndex : thiz.fieldsIndex || '';
  296.                                 let index = param && (param.index || param.index == 0) ? param.index : thiz.datasIndex || '';
  297.                                 let fieldsItem = this.form.fields[fieldsIndex];
  298.                                 fieldsItem.datas.splice(index, 1);
  299.                                 this.fieldsItemData.datasItemDatas.splice(index, 1);
  300.                                 this.initDatasValid();
  301.                         },
  302.                         //子表单验证
  303.                         initFieldsValid() {
  304.                                 this.$nextTick(() => {
  305.                                         this.$refs['fieldsRef']?.forEach((subform) => {
  306.                                                 subform.setRules(this.fieldsItemRules);
  307.                                         });
  308.                                 });
  309.                         },
  310.                         //验证所有的子表单
  311.                         checkFieldsValid() {
  312.                                 let flag = true;
  313.                                 this.$refs['fieldsRef']?.forEach((subform) => {
  314.                                         subform.validate((valid) => {
  315.                                                 if (!valid) {
  316.                                                         flag = false;
  317.                                                         return false;
  318.                                                 }
  319.                                         });
  320.                                 });
  321.                                 return flag;
  322.                         },
  323.                         //上移子表单
  324.                         upFieldsItem(evt) {
  325.                                 let { index } = evt.currentTarget.dataset;
  326.                                 if (index == 0) {
  327.                                         this.navigateTo({
  328.                                                 type: 'tip',
  329.                                                 tip: '已经是第一个'
  330.                                         });
  331.                                         return false;
  332.                                 }
  333.                                 this.form.fields[index] = this.form.fields.splice(index - 1, 1, this.form.fields[index])[0];
  334.                                 this.formData.fieldsItemDatas[index] = this.formData.fieldsItemDatas.splice(index - 1, 1, this.formData.fieldsItemDatas[index])[0];
  335.                                 this.initFieldsValid();
  336.                         },
  337.                         //下移子表单
  338.                         downFieldsItem(evt) {
  339.                                 let { index } = evt.currentTarget.dataset;
  340.                                 if (index == this.form.fields.length - 1) {
  341.                                         this.navigateTo({
  342.                                                 type: 'tip',
  343.                                                 tip: '已经是最后一个'
  344.                                         });
  345.                                         return false;
  346.                                 }
  347.                                 this.form.fields[index] = this.form.fields.splice(index + 1, 1, this.form.fields[index])[0];
  348.                                 this.formData.fieldsItemDatas[index] = this.formData.fieldsItemDatas.splice(index + 1, 1, this.formData.fieldsItemDatas[index])[0];
  349.                                 this.initFieldsValid();
  350.                         },
  351.                         //删除子表单
  352.                         delFieldsItem(evt) {
  353.                                 let { index } = evt.currentTarget.dataset;
  354.                                 this.form.fields.splice(index, 1);
  355.                                 this.formData.fieldsItemDatas.splice(index, 1);
  356.                                 this.initFieldsValid();
  357.                         },
  358.                         //增加子表单
  359.                         addFieldsItem() {
  360.                                 this.form.fields.push(JSON.parse(JSON.stringify(this.fieldsItem)));
  361.                                 this.formData.fieldsItemDatas.push(JSON.parse(JSON.stringify(this.fieldsItemData)));
  362.                                 this.initFieldsValid();
  363.                         },
  364.                         changeFieldsItemType(evt, fieldsIndex, fieldsItem) {
  365.                                 evt.map((val, index) => {
  366.                                         fieldsItem.type = val.value;
  367.                                 });
  368.                         },
  369.                         getType(item) {
  370.                                 let find = this.fieldsItemData.typeDatas.find((type) => {
  371.                                         return type.value == item.type;
  372.                                 });
  373.                                 return find ? find.label : '单行文本';
  374.                         },
  375.                         //初始化显示子表单数据条数
  376.                         initDatasData() {
  377.                                 for (let i = 0; i < 1; i++) {
  378.                                         this.fieldsItem.datas.push(JSON.parse(JSON.stringify(this.datasItem)));
  379.                                 }
  380.                                 this.initDatasValid();
  381.                         },
  382.                         //子表单验证
  383.                         initDatasValid() {
  384.                                 this.$nextTick(() => {
  385.                                         this.$refs['datasRef']?.forEach((subform) => {
  386.                                                 subform.setRules(this.datasItemRules);
  387.                                         });
  388.                                 });
  389.                         },
  390.                         //验证所有的子表单
  391.                         checkDatasValid() {
  392.                                 let flag = true;
  393.                                 this.$refs['datasRef']?.forEach((subform) => {
  394.                                         subform.validate((valid) => {
  395.                                                 if (!valid) {
  396.                                                         flag = false;
  397.                                                         return false;
  398.                                                 }
  399.                                         });
  400.                                 });
  401.                                 return flag;
  402.                         },
  403.                         initResetform() {
  404.                                 this.initform = JSON.stringify(this.form);
  405.                                 //如果想给表单默认初始值,其中row为某一行数据也可能是API返回的结果集,然后给到this.form
  406.                                 //this.form = this.$tools.changeRowToForm(row,this.form)
  407.                         },
  408.                         resetForm() {
  409.                                 this.form = JSON.parse(this.initform);
  410.                         },
  411.                         async submitForm(e) {
  412.                                 this.$refs.formRef?.setRules(this.formRules);
  413.                                 this.initFieldsValid();
  414.                                 this.initDatasValid();
  415.                                 this.$nextTick(async () => {
  416.                                         let fieldsvalid = await this.checkFieldsValid();
  417.                                         let datasvalid = await this.checkDatasValid();
  418.                                         let valid = await this.$refs.formRef.validate();
  419.                                         if (valid && fieldsvalid && datasvalid) {
  420.                                                 //保存数据
  421.                                                 let param = this.form;
  422.                                                 let header = {
  423.                                                         'Content-Type': 'application/json'
  424.                                                 };
  425.                                                 let url = '/cms/huodong/update';
  426.                                                 let find = this.form.fields.find((item) => {
  427.                                                         return !item.title;
  428.                                                 });
  429.                                                 if (find) {
  430.                                                         this.showToast('字段标题不能为空');
  431.                                                         return;
  432.                                                 }
  433.                                                 /*
  434.                                                 let finds = []
  435.                                                 this.form.fields.forEach(item=>{
  436.                                                          if(['radio', 'checkbox', 'select'].includes(item.type)){
  437.                                                                  find = item.datas.find(data=>{
  438.                                                                          return !data.value
  439.                                                                  })
  440.                                                                  if(find){
  441.                                                                          finds.push(item)
  442.                                                                  }
  443.                                                          }
  444.                                                 })
  445.                                                 if(finds.length>0){
  446.                                                         this.showToast(finds[0].title+"选项值不能为空")
  447.                                                         return
  448.                                                 }*/
  449.                                                 let time = new Date().getTime();
  450.                                                 this.form.fields.forEach((item, index) => {
  451.                                                         item.field = item.field ? item.field : 'field' + time + index;
  452.                                                 });
  453.                                                 param = {
  454.                                                         id: this.globalOption.id,
  455.                                                         fields: this.form.fields
  456.                                                 };
  457.                                                 let res = await this.$http.post(url, param, header, 'json');
  458.                                                 if (res.code == 200) {
  459.                                                         this.showToast(res.msg, 'success');
  460.                                                         uni.navigateBack();
  461.                                                 } else {
  462.                                                         this.showModal(res.msg, '提示', false);
  463.                                                 }
  464.                                                 if (res.code == 200) {
  465.                                                         this.showToast(res.msg, 'success');
  466.                                                 } else {
  467.                                                         this.showModal(res.msg, '提示', false);
  468.                                                 }
  469.                                         } else {
  470.                                                 console.log('验证失败');
  471.                                         }
  472.                                 });
  473.                         }
  474.                 }
  475.         };
  476. </script>
  477. <style lang="scss" scoped>
  478.         .flex8-clz {
  479.                 padding-top: 10rpx;
  480.                 color: #ff0000;
  481.                 padding-left: 10rpx;
  482.                 padding-bottom: 10rpx;
  483.                 padding-right: 10rpx;
  484.         }
  485.         .flex2-clz {
  486.                 padding-top: 10rpx;
  487.                 padding-left: 10rpx;
  488.                 padding-bottom: 10rpx;
  489.                 padding-right: 10rpx;
  490.         }
  491.         .formfieldstools {
  492.                 position: absolute;
  493.                 z-index: 1;
  494.                 right: 12rpx;
  495.                 top: 12rpx;
  496.         }
  497.         .formfieldstools .diygw-btn {
  498.                 padding: 5px;
  499.                 height: auto;
  500.                 flex: inherit;
  501.                 border-radius: 20px;
  502.         }
  503.         .flex-clz {
  504.                 background-color: #ffffff;
  505.                 margin-left: 10rpx;
  506.                 border-bottom-left-radius: 12rpx;
  507.                 box-shadow: 0rpx 2rpx 6rpx rgba(31, 31, 31, 0.16);
  508.                 overflow: hidden;
  509.                 width: calc(100% - 10rpx - 10rpx) !important;
  510.                 border-top-left-radius: 12rpx;
  511.                 margin-top: 10rpx;
  512.                 border-top-right-radius: 12rpx;
  513.                 border-bottom-right-radius: 12rpx;
  514.                 margin-bottom: 10rpx;
  515.                 margin-right: 10rpx;
  516.         }
  517.         .text1-clz {
  518.                 padding-top: 20rpx;
  519.                 font-weight: bold;
  520.                 flex: 1;
  521.                 padding-left: 30rpx;
  522.                 padding-bottom: 20rpx;
  523.                 padding-right: 30rpx;
  524.         }
  525.         .flex9-clz {
  526.                 margin-left: 20rpx;
  527.                 width: calc(100% - 20rpx - 20rpx) !important;
  528.                 margin-top: 10rpx;
  529.                 margin-bottom: 10rpx;
  530.                 border-bottom: 2rpx solid #ebedf0;
  531.                 margin-right: 20rpx;
  532.         }
  533.         .text-clz {
  534.                 padding-top: 20rpx;
  535.                 font-weight: bold;
  536.                 padding-left: 10rpx;
  537.                 padding-bottom: 20rpx;
  538.                 padding-right: 10rpx;
  539.         }
  540.         .text5-clz {
  541.                 margin-left: 20rpx;
  542.                 padding-top: 20rpx;
  543.                 flex: 1;
  544.                 padding-left: 36rpx;
  545.                 padding-bottom: 20rpx;
  546.                 margin-top: 0rpx;
  547.                 margin-bottom: 0rpx;
  548.                 margin-right: 30rpx;
  549.                 padding-right: 16rpx;
  550.         }
  551.         .flex1-clz {
  552.                 background-color: #ffffff;
  553.                 margin-left: 20rpx;
  554.                 border-bottom-left-radius: 12rpx;
  555.                 overflow: hidden;
  556.                 width: calc(100% - 20rpx - 20rpx) !important;
  557.                 border-top-left-radius: 12rpx;
  558.                 margin-top: 10rpx;
  559.                 border-top-right-radius: 12rpx;
  560.                 border-bottom-right-radius: 12rpx;
  561.                 margin-bottom: 10rpx;
  562.                 margin-right: 20rpx;
  563.         }
  564.         .text3-clz {
  565.                 padding-top: 20rpx;
  566.                 font-weight: bold;
  567.                 flex: 1;
  568.                 padding-left: 16rpx;
  569.                 padding-bottom: 20rpx;
  570.                 padding-right: 16rpx;
  571.         }
  572.         .datas-clz {
  573.                 padding-top: 20rpx;
  574.                 font-weight: bold;
  575.                 flex: 1;
  576.                 padding-left: 16rpx;
  577.                 padding-bottom: 20rpx;
  578.                 padding-right: 16rpx;
  579.         }
  580.         .flex5-clz {
  581.                 margin-left: 0rpx;
  582.                 width: calc(100% - 0rpx - 0rpx) !important;
  583.                 margin-top: 10rpx;
  584.                 margin-bottom: 10rpx;
  585.                 margin-right: 0rpx;
  586.         }
  587.         .value-clz {
  588.                 flex: 1;
  589.         }
  590.         .flex4-clz {
  591.                 color: #989898;
  592.         }
  593.         .icon-clz {
  594.                 margin-left: 10rpx;
  595.                 padding-top: 10rpx;
  596.                 padding-left: 10rpx;
  597.                 padding-bottom: 10rpx;
  598.                 margin-top: 10rpx;
  599.                 margin-bottom: 10rpx;
  600.                 margin-right: 10rpx;
  601.                 padding-right: 10rpx;
  602.         }
  603.         .icon {
  604.                 font-size: 28rpx;
  605.         }
  606.         .icon3-clz {
  607.                 margin-left: 10rpx;
  608.                 padding-top: 10rpx;
  609.                 padding-left: 10rpx;
  610.                 padding-bottom: 10rpx;
  611.                 margin-top: 10rpx;
  612.                 margin-bottom: 10rpx;
  613.                 margin-right: 10rpx;
  614.                 padding-right: 10rpx;
  615.         }
  616.         .icon3 {
  617.                 font-size: 28rpx;
  618.         }
  619.         .icon2-clz {
  620.                 margin-left: 10rpx;
  621.                 padding-top: 10rpx;
  622.                 padding-left: 10rpx;
  623.                 padding-bottom: 10rpx;
  624.                 margin-top: 10rpx;
  625.                 margin-bottom: 10rpx;
  626.                 margin-right: 10rpx;
  627.                 padding-right: 10rpx;
  628.         }
  629.         .icon2 {
  630.                 font-size: 28rpx;
  631.         }
  632.         .icon1-clz {
  633.                 margin-left: 10rpx;
  634.                 padding-top: 10rpx;
  635.                 padding-left: 10rpx;
  636.                 padding-bottom: 10rpx;
  637.                 margin-top: 10rpx;
  638.                 margin-bottom: 10rpx;
  639.                 margin-right: 10rpx;
  640.                 padding-right: 10rpx;
  641.         }
  642.         .icon1 {
  643.                 font-size: 28rpx;
  644.         }
  645.         .btn-clz {
  646.                 padding-top: 16rpx;
  647.                 border-bottom-left-radius: 120rpx;
  648.                 color: #fff;
  649.                 padding-left: 20rpx;
  650.                 font-size: 28rpx !important;
  651.                 padding-bottom: 16rpx;
  652.                 border-top-right-radius: 120rpx;
  653.                 margin-right: 30rpx;
  654.                 background-color: #07c160;
  655.                 margin-left: 30rpx;
  656.                 overflow: hidden;
  657.                 width: calc(100% - 30rpx - 30rpx) !important;
  658.                 border-top-left-radius: 120rpx;
  659.                 margin-top: 10rpx;
  660.                 border-bottom-right-radius: 120rpx;
  661.                 margin-bottom: 10rpx;
  662.                 text-align: center;
  663.                 padding-right: 20rpx;
  664.         }
  665.         .flex7-clz {
  666.                 padding-top: 16rpx;
  667.                 border-bottom-left-radius: 0rpx;
  668.                 color: #747474;
  669.                 bottom: 0rpx;
  670.                 padding-left: 16rpx;
  671.                 padding-bottom: 16rpx;
  672.                 border-top-right-radius: 20rpx;
  673.                 background-color: #ffffff;
  674.                 overflow: hidden;
  675.                 left: 0rpx;
  676.                 border-top-left-radius: 20rpx;
  677.                 border-bottom-right-radius: 0rpx;
  678.                 padding-right: 16rpx;
  679.         }
  680.         .button-button-clz {
  681.                 margin: 6rpx !important;
  682.         }
  683.         .container335134 {
  684.                 padding-bottom: 160rpx;
  685.                 background-color: #f5f5f5;
  686.         }
  687. </style>
复制代码
运动详情

运动展示页

运动详情包括轮播、签到时间、距运动竣事


运动表单可视化

运动表单根据运动自定义的表单可视化、自定义表单字段。

  1. <template>
  2.         <view class="container container335134">
  3.                 <u-form :model="form" :rules="formRules" :errorType="['message', 'toast']" ref="formRef" v-if="showForm" class="flex diygw-form diygw-col-24 form-clz">
  4.                         <u-form-item class="diygw-col-24" :required="true" label="联系人" prop="title">
  5.                                 <u-input placeholder="请输入联系人" v-model="form.title"></u-input>
  6.                         </u-form-item>
  7.                         <u-form-item class="diygw-col-24" label="备注" prop="remark">
  8.                                 <u-input maxlength="200" height="60px" class="" placeholder="请输入备注" v-model="form.remark" type="textarea"></u-input>
  9.                         </u-form-item>
  10.                         <view v-for="(item, index) in data.data.fields" :key="index" class="flex flex-wrap diygw-col-24 flex-direction-column">
  11.                                 <u-form-item v-if="item.type == 'kaiguang'" :required="item.required" :newprop="item.field" class="diygw-col-24" :label="item.title" prop="kaiguang">
  12.                                         <view class="flex diygw-col-24">
  13.                                                 <u-switch :size="44" :activeValue="1" :inactiveValue="0" inactiveTextColor="#000000" activeTextColor="#ffffff" v-model="item.kaiguang" slot="right"></u-switch>
  14.                                         </view>
  15.                                 </u-form-item>
  16.                                 <u-form-item v-if="item.type == 'date'" :required="item.required" :newprop="item.field" class="diygw-col-24" :label="item.title" prop="date">
  17.                                         <u-input @click="item.showDate = true" class="" placeholder="请选择" v-model="item.date" type="select"></u-input>
  18.                                         <u-calendar maxDate="2050-12-31" v-model="item.showDate" mode="date" @change="changeItemDate($event, index, item)"></u-calendar>
  19.                                 </u-form-item>
  20.                                 <u-form-item v-if="item.type == 'input'" :required="item.required" :newprop="item.field" class="diygw-col-24" :label="item.title" prop="input">
  21.                                         <u-input id="diyid" placeholder="请输入提示信息" v-model="item.input"></u-input>
  22.                                 </u-form-item>
  23.                                 <u-form-item v-if="item.type == 'phone'" :required="item.required" :newprop="item.field" class="diygw-col-24" :label="item.title" prop="phone">
  24.                                         <u-input placeholder="请输入提示信息" v-model="item.phone"></u-input>
  25.                                 </u-form-item>
  26.                                 <u-form-item v-if="item.type == 'sign'" :required="item.required" :newprop="item.field" class="diygw-col-24" :label="item.title" prop="sign">
  27.                                         <diy-signature v-model="item.sign"></diy-signature>
  28.                                 </u-form-item>
  29.                                 <u-form-item v-if="item.type == 'datetime'" :required="item.required" :newprop="item.field" class="diygw-col-24" :label="item.title" prop="datetime">
  30.                                         <u-input @click="item.showDatetime = true" class="" placeholder="请选择" v-model="item.datetime" type="select"></u-input>
  31.                                         <u-picker :defaultTime="item.datetime" v-model="item.showDatetime" mode="time" :params="item.paramsDatetime" @confirm="changeItemDatetime($event, index, item)"></u-picker>
  32.                                 </u-form-item>
  33.                                 <u-form-item v-if="item.type == 'img'" :required="item.required" :newprop="item.field" class="diygw-col-24" :label="item.title" prop="img">
  34.                                         <u-upload :index="index" width="160" height="160" maxCount="6" @on-success="uploadItemImg" @on-remove="delItemImg" action="/sys/storage/upload" v-model="item.img"> </u-upload>
  35.                                 </u-form-item>
  36.                                 <u-form-item v-if="item.type == 'rate'" :required="item.required" :newprop="item.field" class="diygw-col-24" :label="item.title" prop="rate">
  37.                                         <view class="flex diygw-col-24">
  38.                                                 <u-rate activeColor="#07c160" active-icon="starfill" inactive-icon="starfill" custom-prefix="diy-icon" size="48" inactiveColor="#eee" :count="5" @change="changeItemRate($event, index, item)" v-model="item.rate"></u-rate>
  39.                                         </view>
  40.                                 </u-form-item>
  41.                                 <u-form-item v-if="item.type == 'textarea'" :required="item.required" :newprop="item.field" class="diygw-col-24" :label="item.title" prop="textarea">
  42.                                         <u-input maxlength="200" height="60px" class="" placeholder="请输入提示信息" v-model="item.textarea" type="textarea"></u-input>
  43.                                 </u-form-item>
  44.                                 <u-form-item v-if="item.type == 'select'" :required="item.required" :newprop="item.field" class="diygw-col-24" :label="item.title" prop="select">
  45.                                         <diy-selectinput @click="item.showSelect = true" class="diygw-col-24" valueName="value" labelName="value" :list="item.datas" placeholder="请选择" v-model="item.select" type="select"></diy-selectinput>
  46.                                         <u-select mode="single-column" valueName="value" labelName="value" :list="item.datas" isDefaultSelect :defaultSelectValue="item.select" v-model="item.showSelect" @confirm="changeItemSelect($event, index, item)"></u-select>
  47.                                 </u-form-item>
  48.                                 <u-form-item v-if="item.type == 'slider'" :required="item.required" :newprop="item.field" class="diygw-col-24" :label="item.title" prop="slider">
  49.                                         <view class="flex1 flex align-center diygw-col-24">
  50.                                                 <u-slider class="flex1" active-color="#07c160" blockWidth="50" @change="changeItemSlider($event, index, item)" name="slider" v-model="item.slider" :min="0" :max="100" :step="1" />
  51.                                         </view>
  52.                                 </u-form-item>
  53.                                 <u-form-item class="diygw-col-24" v-if="item.type == 'checkbox'" :required="item.required" :newprop="item.field" :label="item.title" prop="checkbox">
  54.                                         <u-checkbox-group class="flex flex-wrap diygw-col-24 justify-between" wrapClass=" justify-between" v-model="item.checkbox">
  55.                                                 <u-checkbox class="diygw-col-24" v-for="(checkboxitem, checkboxindex) in item.datas" :key="checkboxindex" :name="checkboxitem.value">
  56.                                                         {{ checkboxitem.value }}
  57.                                                 </u-checkbox>
  58.                                         </u-checkbox-group>
  59.                                 </u-form-item>
  60.                                 <u-form-item v-if="item.type == 'radio'" :required="item.required" :newprop="item.field" class="diygw-col-24" :label="item.title" prop="radio">
  61.                                         <u-radio-group class="flex flex-wrap diygw-col-24 justify-between" wrapClass=" justify-between" v-model="item.radio">
  62.                                                 <u-radio class="diygw-col-24" shape="circle" v-for="(radioitem, radioindex) in item.datas" :key="radioindex" :name="radioitem.value">
  63.                                                         {{ radioitem.value }}
  64.                                                 </u-radio>
  65.                                         </u-radio-group>
  66.                                 </u-form-item>
  67.                         </view>
  68.                 </u-form>
  69.                 <view v-if="data.code == 200 && !showForm" class="flex flex-wrap diygw-col-24 flex-direction-column">
  70.                         <view class="flex diygw-col-24">
  71.                                 <swiper :current="swiperIndex" class="swiper swiper-indicator_rect_radius" @change="changeSwiper" indicator-color="rgba(51, 51, 51, 0.39)" indicator-active-color="#fff" indicator-dots="true" autoplay interval="3000" circular="true" style="height: 300rpx">
  72.                                         <swiper-item v-for="(item, index) in data.data.imgs" :key="index" class="diygw-swiper-item">
  73.                                                 <view class="diygw-swiper-item-wrap">
  74.                                                         <image :src="item" class="diygw-swiper-image"></image>
  75.                                                 </view>
  76.                                         </swiper-item>
  77.                                 </swiper>
  78.                         </view>
  79.                         <view class="flex flex-wrap diygw-col-24 flex-direction-column justify-center items-center flex6-clz">
  80.                                 <text class="diygw-text-line3 diygw-col-24 text20-clz">
  81.                                         {{ data.data.title }}
  82.                                 </text>
  83.                                 <view class="flex flex-wrap diygw-col-24 justify-between items-center flex4-clz">
  84.                                         <view class="flex flex-wrap diygw-col-0 justify-between items-baseline flex9-clz">
  85.                                                 <text class="flex icon1 diygw-col-0 diy-icon-attention"></text>
  86.                                                 <text class="diygw-text-line3 diygw-col-0"> 浏览: </text>
  87.                                                 <text class="diygw-text-line3 diygw-col-0">
  88.                                                         {{ data.data.views }}
  89.                                                 </text>
  90.                                         </view>
  91.                                         <view class="flex flex-wrap diygw-col-0 justify-between items-baseline flex10-clz">
  92.                                                 <text class="flex icon3 diygw-col-0 diy-icon-people"></text>
  93.                                                 <text class="diygw-text-line3 diygw-col-0"> 报名: </text>
  94.                                                 <text class="diygw-text-line3 diygw-col-0">
  95.                                                         {{ data.data.baomingnum }}
  96.                                                 </text>
  97.                                         </view>
  98.                                 </view>
  99.                         </view>
  100.                         <view v-if="!data.data.isover" class="flex flex-wrap diygw-col-24 justify-between items-center flex16-clz">
  101.                                 <view class="flex flex-wrap diygw-col-24 items-center flex17-clz">
  102.                                         <text class="flex icon6 diygw-col-0 icon6-clz diy-icon-titles"></text>
  103.                                         <text class="diygw-text-line1 diygw-col-0 text11-clz"> 距活动结束 </text>
  104.                                         <view class="flex flex-direction-column diygw-col-0 countdown-clz">
  105.                                                 <u-count-down ref="refCountdown" :timestamp="data.data.countdown" format="DD天HH时mm分ss秒" @end="finishCountdown"> </u-count-down>
  106.                                         </view>
  107.                                 </view>
  108.                         </view>
  109.                         <view class="flex flex-wrap diygw-col-24 justify-between items-center flex7-clz">
  110.                                 <view class="flex flex-wrap diygw-col-24 items-center flex34-clz">
  111.                                         <text class="flex icon diygw-col-0 icon-clz diy-icon-titles"></text>
  112.                                         <text class="diygw-text-line1 diygw-col-0 text26-clz"> 签到时间 </text>
  113.                                 </view>
  114.                                 <view class="flex flex-wrap diygw-col-24 items-center flex8-clz">
  115.                                         <text class="flex icon2 diygw-col-0 diy-icon-time"></text>
  116.                                         <text class="diygw-text-line1 diygw-col-0 text1-clz"> {{ data.data.starttime }} 至 {{ data.data.endtime }} </text>
  117.                                 </view>
  118.                         </view>
  119.                         <view class="flex flex-wrap diygw-col-24 justify-between items-center flex11-clz">
  120.                                 <view class="flex flex-wrap diygw-col-24 items-center flex12-clz">
  121.                                         <text class="flex icon4 diygw-col-0 icon4-clz diy-icon-titles"></text>
  122.                                         <text class="diygw-text-line1 diygw-col-0 text2-clz"> 活动地点 </text>
  123.                                 </view>
  124.                                 <view class="flex flex-wrap diygw-col-24 items-center flex13-clz">
  125.                                         <text class="flex icon5 diygw-col-0 diy-icon-location"></text>
  126.                                         <text class="diygw-text-line1 diygw-col-0 text4-clz">
  127.                                                 {{ data.data.address }}
  128.                                         </text>
  129.                                 </view>
  130.                         </view>
  131.                         <view v-if="data.data.content" class="flex flex-wrap diygw-col-24 flex-direction-column justify-center items-center flex5-clz">
  132.                                 <view class="flex flex-wrap diygw-col-24 items-center flex14-clz">
  133.                                         <view class="flex diygw-col-0 line1-clz">
  134.                                                 <view class="diygw-pzx" style="border-bottom: 1px solid #eee"></view>
  135.                                         </view>
  136.                                         <text class="diygw-text-line1 diygw-col-0 text5-clz"> 活动详情 </text>
  137.                                         <view class="flex diygw-col-0 line-clz">
  138.                                                 <view class="diygw-pzx" style="border-bottom: 1px solid #eee"></view>
  139.                                         </view>
  140.                                 </view>
  141.                                 <mp-html :content="data.data.content" class="diygw-col-24 ucontent1-clz"></mp-html>
  142.                         </view>
  143.                 </view>
  144.                 <view v-if="globalData.isshow" class="flex flex-wrap diygw-col-24 justify-start diygw-bottom flex3-clz">
  145.                         <view v-if="showForm" class="flex diygw-col-24">
  146.                                 <button @tap="showForm = false" class="diygw-btn red radius flex-sub margin-xs button1-button-clz">取消</button>
  147.                                 <button @click="submitForm" class="diygw-btn green radius flex-sub margin-xs button1-button-clz">预约</button>
  148.                         </view>
  149.                         <view v-if="!showForm && data.data.isover" class="flex flex-wrap diygw-col-24 justify-center items-center flex20-clz" @tap="showForm = true">
  150.                                 <text class="diygw-col-0"> 活动已结束 </text>
  151.                         </view>
  152.                         <view v-if="!showForm && !data.data.isover && data.data.isuser" class="flex flex-wrap diygw-col-24 justify-center items-center flex15-clz" @tap="showForm = true">
  153.                                 <text class="diygw-col-0"> 已报名 </text>
  154.                         </view>
  155.                         <view v-if="!showForm && !data.data.isover && !data.data.isuser" class="flex flex-wrap diygw-col-24 justify-center items-center green flex2-clz" @tap="navigateTo" data-type="addFunction">
  156.                                 <text class="diygw-col-0"> 立即预约 </text>
  157.                         </view>
  158.                 </view>
  159.                 <view class="clearfix"></view>
  160.         </view>
  161. </template>
  162. <script>
  163.         export default {
  164.                 data() {
  165.                         return {
  166.                                 //用户全局信息
  167.                                 userInfo: {},
  168.                                 //页面传参
  169.                                 globalOption: {},
  170.                                 //自定义全局变量
  171.                                 globalData: {
  172.                                         datas: [
  173.                                                 {
  174.                                                         field: 'radio',
  175.                                                         options: [
  176.                                                                 { id: 'A', content: '微信小程序' },
  177.                                                                 { id: 'B', content: '支付宝小程序' },
  178.                                                                 { id: 'C', content: 'UniApp小程序' },
  179.                                                                 { id: 'D', content: 'UniApp-uView小程序' }
  180.                                                         ],
  181.                                                         title: '单选标题',
  182.                                                         type: 'radio',
  183.                                                         radio: ''
  184.                                                 },
  185.                                                 {
  186.                                                         select: '',
  187.                                                         field: 'select',
  188.                                                         options: [
  189.                                                                 { id: 'A', content: '微信小程序' },
  190.                                                                 { id: 'B', content: '支付宝小程序' },
  191.                                                                 { id: 'C', content: 'UniApp小程序' },
  192.                                                                 { id: 'D', content: 'UniApp-uView小程序' }
  193.                                                         ],
  194.                                                         title: '下拉标题',
  195.                                                         type: 'select'
  196.                                                 },
  197.                                                 {
  198.                                                         field: 'checkbox',
  199.                                                         options: [
  200.                                                                 { id: 'A', content: 'UniApp' },
  201.                                                                 { id: 'B', content: '微信小程序' },
  202.                                                                 { id: 'C', content: '支付宝小程序' },
  203.                                                                 { id: 'D', content: 'QQ小程序' }
  204.                                                         ],
  205.                                                         checkbox: [],
  206.                                                         title: '多选标题',
  207.                                                         type: 'checkbox'
  208.                                                 },
  209.                                                 { input: '', field: 'input', title: '单行输入', type: 'input' },
  210.                                                 { kaiguang: '', field: 'kaiguang', title: '开关标题', type: 'kaiguang' },
  211.                                                 { slider: '', field: 'slider', title: '滑块', type: 'slider' },
  212.                                                 { field: 'textarea', textarea: '', title: '多行输入', type: 'textarea' },
  213.                                                 { field: 'rate', rate: '', title: '评分', type: 'rate' },
  214.                                                 { date: '', field: 'date', title: '日期', type: 'date' }
  215.                                         ]
  216.                                 },
  217.                                 dataNum: 1,
  218.                                 data: {
  219.                                         code: 0,
  220.                                         msg: '',
  221.                                         data: {
  222.                                                 id: 0,
  223.                                                 title: '',
  224.                                                 remark: '',
  225.                                                 starttime: '',
  226.                                                 endtime: '',
  227.                                                 address: '',
  228.                                                 num: 0,
  229.                                                 views: 0,
  230.                                                 baomingnum: 0,
  231.                                                 imgs: [],
  232.                                                 img: '',
  233.                                                 content: '',
  234.                                                 fields: [],
  235.                                                 userId: 0,
  236.                                                 createTime: '',
  237.                                                 updateTime: '',
  238.                                                 deleteTime: null,
  239.                                                 baomingEndtime: ''
  240.                                         }
  241.                                 },
  242.                                 huodongDataNum: 1,
  243.                                 huodongData: {
  244.                                         rows: [
  245.                                                 {
  246.                                                         id: 0,
  247.                                                         title: '',
  248.                                                         img: '',
  249.                                                         remark: '',
  250.                                                         data: null,
  251.                                                         huodongId: 0,
  252.                                                         huodongTitle: '',
  253.                                                         userId: 0,
  254.                                                         createTime: '',
  255.                                                         updateTime: '',
  256.                                                         deleteTime: null
  257.                                                 }
  258.                                         ],
  259.                                         total: 0,
  260.                                         code: 0,
  261.                                         msg: ''
  262.                                 },
  263.                                 viewNum: 1,
  264.                                 view: {
  265.                                         code: 200,
  266.                                         msg: '设置成功'
  267.                                 },
  268.                                 swiperIndex: 0,
  269.                                 showForm: false,
  270.                                 item: {
  271.                                         kaiguang: 1,
  272.                                         showDate: false,
  273.                                         date: '',
  274.                                         input: '',
  275.                                         phone: '',
  276.                                         sign: '',
  277.                                         paramsDatetime: {
  278.                                                 year: true,
  279.                                                 month: true,
  280.                                                 day: true,
  281.                                                 hour: true,
  282.                                                 minute: true,
  283.                                                 second: false
  284.                                         },
  285.                                         showDatetime: false,
  286.                                         datetime: '',
  287.                                         img: '',
  288.                                         rateCount: 5,
  289.                                         rate: 3,
  290.                                         textarea: '',
  291.                                         showSelect: false,
  292.                                         select: '',
  293.                                         slider: 66,
  294.                                         checkbox: [],
  295.                                         radio: ''
  296.                                 },
  297.                                 formRules: {
  298.                                         title: [
  299.                                                 {
  300.                                                         trigger: ['change', 'blur'],
  301.                                                         required: true,
  302.                                                         message: '不能为空哟'
  303.                                                 }
  304.                                         ]
  305.                                 },
  306.                                 form: {
  307.                                         title: '',
  308.                                         remark: ''
  309.                                 }
  310.                         };
  311.                 },
  312.                 watch: {
  313.                         data: {
  314.                                 handler(newVal, oldVal) {
  315.                                         newVal.data.fields.forEach((item) => {
  316.                                                 this.form[item.field] = item[item.type];
  317.                                         });
  318.                                 },
  319.                                 deep: true
  320.                         }
  321.                 },
  322.                 onShow() {
  323.                         this.setCurrentPage(this);
  324.                 },
  325.                 onLoad(option) {
  326.                         this.setCurrentPage(this);
  327.                         if (option) {
  328.                                 this.setData({
  329.                                         globalOption: this.getOption(option)
  330.                                 });
  331.                         }
  332.                         this.init();
  333.                 },
  334.                 onReady() {
  335.                         this.$refs.formRef?.setRules(this.formRules);
  336.                 },
  337.                 methods: {
  338.                         async init() {
  339.                                 this.dataApi();
  340.                                 await this.initResetform();
  341.                         },
  342.                         // 文章数据 API请求方法
  343.                         async dataApi(param) {
  344.                                 let thiz = this;
  345.                                 param = param || {};
  346.                                 //请求地址及请求数据,可以在加载前执行上面增加自己的代码逻辑
  347.                                 let http_url = '/cms/api.huodong/get';
  348.                                 let http_data = {
  349.                                         pageNum: this.dataNum,
  350.                                         pageSize: 10,
  351.                                         id: param.id || this.globalOption.id
  352.                                 };
  353.                                 let http_header = {};
  354.                                 let data = await this.$http.post(http_url, http_data, http_header, 'json');
  355.                                 if (!data.data) {
  356.                                         this.showToast('详情不存在');
  357.                                         uni.navigateBack();
  358.                                         return;
  359.                                 }
  360.                                 data.data.imgs = data.data.imgs ? data.data.imgs.split(',') : [];
  361.                                 data.data.fields = data.data.fields ? JSON.parse(data.data.fields) : [];
  362.                                 data.data.isover = new Date(data.data.baomingEndtime).getTime() < new Date().getTime();
  363.                                 data.data.countdown = data.data.isover ? 0 : new Date(data.data.baomingEndtime).getTime() - new Date().getTime();
  364.                                 data.data.isuser = false;
  365.                                 data.data.fields.forEach((item) => {
  366.                                         item['show' + item.type.charAt(0).toUpperCase() + item.type.slice(1)] = false;
  367.                                         if (item.required) {
  368.                                                 let rule = {
  369.                                                         trigger: ['change', 'blur'],
  370.                                                         required: true,
  371.                                                         message: item.title + '不能为空哟'
  372.                                                 };
  373.                                                 if (item.type == 'checkbox') {
  374.                                                         rule.type = 'array';
  375.                                                 }
  376.                                                 if (['checkbox', 'radio', 'select', 'date', 'datetime'].includes(item.type)) {
  377.                                                         rule.message = '请选择' + item.title;
  378.                                                 } else if (['img'].includes(item.type)) {
  379.                                                         rule.message = '请上传' + item.title;
  380.                                                 }
  381.                                                 this.formRules[item.field] = [rule];
  382.                                         }
  383.                                         if (item.type == 'datetime') {
  384.                                                 item.paramsDatetime = {
  385.                                                         year: true,
  386.                                                         month: true,
  387.                                                         day: true,
  388.                                                         hour: true,
  389.                                                         minute: true,
  390.                                                         second: false
  391.                                                 };
  392.                                         }
  393.                                         if (item.type == 'checkbox') {
  394.                                                 item['checkbox'] = [];
  395.                                                 this.form[item.field] = [];
  396.                                         } else if (item.type == 'number') {
  397.                                                 item['number'] = undefined;
  398.                                                 this.form[item.field] = undefined;
  399.                                         } else {
  400.                                                 item[item.type] = '';
  401.                                                 this.form[item.field] = '';
  402.                                         }
  403.                                 });
  404.                                 this.form.title = this.userInfo.nickname;
  405.                                 this.data = data;
  406.                                 if (this.userInfo.token) {
  407.                                         await this.huodongDataApi({});
  408.                                 }
  409.                                 await this.viewApi({});
  410.                                 this.data.data.view = this.data.data.view + 1;
  411.                                 this.globalData.isshow = true;
  412.                                 uni.setNavigationBarTitle({
  413.                                         title: data.data.title
  414.                                 });
  415.                         },
  416.                         // 查询用户是否已报名 API请求方法
  417.                         async huodongDataApi(param) {
  418.                                 let thiz = this;
  419.                                 param = param || {};
  420.                                 //请求地址及请求数据,可以在加载前执行上面增加自己的代码逻辑
  421.                                 let http_url = '/cms/api.huodongData/list';
  422.                                 let http_data = {
  423.                                         pageNum: this.huodongDataNum,
  424.                                         pageSize: 10,
  425.                                         huodongId: param.huodongId || this.globalOption.id,
  426.                                         isself: param.isself || '1'
  427.                                 };
  428.                                 let http_header = {};
  429.                                 let huodongData = await this.$http.post(http_url, http_data, http_header, 'json');
  430.                                 this.huodongData = huodongData;
  431.                                 this.data.data.isuser = huodongData.total > 0;
  432.                         },
  433.                         // 查看数据增加 API请求方法
  434.                         async viewApi(param) {
  435.                                 let thiz = this;
  436.                                 param = param || {};
  437.                                 //如果请求要重置页面,请配置点击附加参数refresh=1  增加判断如输入框回调param不是对象
  438.                                 if (param.refresh || typeof param != 'object') {
  439.                                         this.viewNum = 1;
  440.                                 }
  441.                                 //请求地址及请求数据,可以在加载前执行上面增加自己的代码逻辑
  442.                                 let http_url = '/cms/api.huodong/incOrDec';
  443.                                 let http_data = {
  444.                                         pageNum: this.viewNum,
  445.                                         pageSize: 10,
  446.                                         id: param.id || this.globalOption.id,
  447.                                         key: param.key || 'views',
  448.                                         value: param.value || '1'
  449.                                 };
  450.                                 let http_header = {};
  451.                                 let view = await this.$http.post(http_url, http_data, http_header, 'json');
  452.                                 let datarows = view.rows;
  453.                                 if (http_data.pageNum == 1) {
  454.                                         this.view = view;
  455.                                 } else if (datarows) {
  456.                                         let rows = this.view.rows.concat(datarows);
  457.                                         view.rows = rows;
  458.                                         this.view = Object.assign(this.view, view);
  459.                                 }
  460.                                 if (datarows && datarows.length > 0) {
  461.                                         this.viewNum = this.viewNum + 1;
  462.                                 }
  463.                         },
  464.                         // 倒计时结束 自定义方法
  465.                         async overFunction(param) {
  466.                                 let thiz = this;
  467.                                 this.data.data.isover = true;
  468.                         },
  469.                         // 新增预约 自定义方法
  470.                         async addFunction(param) {
  471.                                 let thiz = this;
  472.                                 if (!this.$session.getToken()) {
  473.                                         //比如未登录,转身到其他页面等
  474.                                         this.showToast('请先登录');
  475.                                         this.navigateTo({
  476.                                                 type: 'page',
  477.                                                 url: 'login'
  478.                                         });
  479.                                         return;
  480.                                 }
  481.                                 this.showForm = true;
  482.                                 this.$nextTick(() => {
  483.                                         if (this.$refs.formRef) {
  484.                                                 this.$refs.formRef.setRules(this.formRules);
  485.                                         }
  486.                                 });
  487.                         },
  488.                         changeItemDate(evt, index, item) {
  489.                                 item.date = evt.result;
  490.                         },
  491.                         changeItemDatetime(evt, index, item) {
  492.                                 item.datetime = evt.year + '-' + evt.month + '-' + evt.day + ' ' + evt.hour + ':' + evt.minute;
  493.                         },
  494.                         changeItemImg(index, lists, dataindex) {},
  495.                         delItemImg(index, lists, dataindex) {
  496.                                 this.changeItemImg(index, lists, index);
  497.                         },
  498.                         uploadItemImg(res, index, lists, dataindex) {
  499.                                 this.changeItemImg(index, lists, dataindex);
  500.                         },
  501.                         changeItemRate(evt, index, item) {},
  502.                         changeItemSelect(evt, index, item) {
  503.                                 evt.map((val, index) => {
  504.                                         item.select = val.value;
  505.                                 });
  506.                         },
  507.                         changeItemSlider(evt, index, item) {},
  508.                         initResetform() {
  509.                                 this.initform = JSON.stringify(this.form);
  510.                                 //如果想给表单默认初始值,其中row为某一行数据也可能是API返回的结果集,然后给到this.form
  511.                                 //this.form = this.$tools.changeRowToForm(row,this.form)
  512.                         },
  513.                         resetForm() {
  514.                                 this.form = JSON.parse(this.initform);
  515.                         },
  516.                         async submitForm(e) {
  517.                                 this.$refs.formRef?.setRules(this.formRules);
  518.                                 this.$nextTick(async () => {
  519.                                         let valid = await this.$refs.formRef.validate();
  520.                                         if (valid) {
  521.                                                 //保存数据
  522.                                                 let param = this.form;
  523.                                                 let header = {};
  524.                                                 let url = '/cms/huodongData/add';
  525.                                                 param.huodongId = this.data.data.id;
  526.                                                 param.huodongTitle = this.data.data.title;
  527.                                                 param.img = this.data.data.img;
  528.                                                 param.data = JSON.stringify(param);
  529.                                                 param.fields = JSON.stringify(this.data.data.fields);
  530.                                                 let res = await this.$http.post(url, param, header, 'json');
  531.                                                 this.data.data.isuer = true;
  532.                                                 this.showForm = false;
  533.                                                 this.data.data.baomingnum = this.data.data.baomingnum + 1;
  534.                                                 if (res.code == 200) {
  535.                                                         this.showToast('预约成功', 'success');
  536.                                                 } else {
  537.                                                         this.showModal(res.msg, '提示', false);
  538.                                                 }
  539.                                         } else {
  540.                                                 console.log('验证失败');
  541.                                         }
  542.                                 });
  543.                         },
  544.                         changeSwiper(evt) {
  545.                                 let swiperIndex = evt.detail.current;
  546.                                 this.setData({ swiperIndex });
  547.                         },
  548.                         finishCountdown() {
  549.                                 this.navigateTo({ type: 'overFunction' });
  550.                         }
  551.                 },
  552.                 onPullDownRefresh() {
  553.                         // 查看数据增加 API请求方法
  554.                         this.viewNum = 1;
  555.                         this.viewApi();
  556.                         uni.stopPullDownRefresh();
  557.                 },
  558.                 onReachBottom() {
  559.                         // 查看数据增加 API请求方法
  560.                         this.viewApi();
  561.                 }
  562.         };
  563. </script>
  564. <style lang="scss" scoped>
  565.         .form-clz {
  566.                 background-color: #ffffff;
  567.                 margin-left: 10rpx;
  568.                 border-bottom-left-radius: 12rpx;
  569.                 overflow: hidden;
  570.                 width: calc(100% - 10rpx - 10rpx) !important;
  571.                 border-top-left-radius: 12rpx;
  572.                 margin-top: 10rpx;
  573.                 border-top-right-radius: 12rpx;
  574.                 border-bottom-right-radius: 12rpx;
  575.                 margin-bottom: 10rpx;
  576.                 margin-right: 10rpx;
  577.         }
  578.         .swiper-title {
  579.                 background-color: rgba(0, 0, 0, 0.281);
  580.         }
  581.         .flex6-clz {
  582.                 background-color: #fcfcfc;
  583.         }
  584.         .text20-clz {
  585.                 padding-top: 20rpx;
  586.                 font-weight: bold;
  587.                 padding-left: 20rpx;
  588.                 font-size: 28rpx !important;
  589.                 padding-bottom: 20rpx;
  590.                 border-bottom: 2rpx solid #eee;
  591.                 padding-right: 20rpx;
  592.         }
  593.         .flex4-clz {
  594.                 padding-top: 20rpx;
  595.                 padding-left: 20rpx;
  596.                 font-size: 28rpx !important;
  597.                 padding-bottom: 20rpx;
  598.                 padding-right: 20rpx;
  599.         }
  600.         .flex9-clz {
  601.                 padding-top: 10rpx;
  602.                 padding-left: 0rpx;
  603.                 padding-bottom: 10rpx;
  604.                 padding-right: 0rpx;
  605.         }
  606.         .icon1 {
  607.                 font-size: 32rpx;
  608.         }
  609.         .flex10-clz {
  610.                 padding-top: 10rpx;
  611.                 padding-left: 0rpx;
  612.                 padding-bottom: 10rpx;
  613.                 padding-right: 0rpx;
  614.         }
  615.         .icon3 {
  616.                 font-size: 32rpx;
  617.         }
  618.         .flex16-clz {
  619.                 background-color: #ffffff;
  620.                 margin-left: 0rpx;
  621.                 width: calc(100% - 0rpx - 0rpx) !important;
  622.                 margin-top: 20rpx;
  623.                 margin-bottom: 0rpx;
  624.                 border-bottom: 2rpx solid #eee;
  625.                 margin-right: 0rpx;
  626.         }
  627.         .flex17-clz {
  628.                 padding-top: 16rpx;
  629.                 padding-left: 10rpx;
  630.                 padding-bottom: 16rpx;
  631.                 border-bottom: 2rpx solid #eee;
  632.                 padding-right: 20rpx;
  633.         }
  634.         .icon6-clz {
  635.                 color: #00bc25;
  636.         }
  637.         .icon6 {
  638.                 font-size: 32rpx;
  639.         }
  640.         .text11-clz {
  641.                 padding-top: 0rpx;
  642.                 flex: 1;
  643.                 padding-left: 0rpx;
  644.                 font-size: 28rpx !important;
  645.                 padding-bottom: 0rpx;
  646.                 padding-right: 0rpx;
  647.         }
  648.         .countdown-clz {
  649.                 font-weight: bold;
  650.                 font-size: 28rpx !important;
  651.         }
  652.         .flex7-clz {
  653.                 background-color: #ffffff;
  654.                 margin-left: 0rpx;
  655.                 width: calc(100% - 0rpx - 0rpx) !important;
  656.                 margin-top: 20rpx;
  657.                 margin-bottom: 0rpx;
  658.                 border-bottom: 2rpx solid #eee;
  659.                 margin-right: 0rpx;
  660.         }
  661.         .flex34-clz {
  662.                 padding-top: 16rpx;
  663.                 padding-left: 10rpx;
  664.                 padding-bottom: 16rpx;
  665.                 border-bottom: 2rpx solid #eee;
  666.                 padding-right: 10rpx;
  667.         }
  668.         .icon-clz {
  669.                 color: #00bc25;
  670.         }
  671.         .icon {
  672.                 font-size: 32rpx;
  673.         }
  674.         .text26-clz {
  675.                 padding-top: 0rpx;
  676.                 flex: 1;
  677.                 padding-left: 0rpx;
  678.                 font-size: 28rpx !important;
  679.                 padding-bottom: 0rpx;
  680.                 padding-right: 0rpx;
  681.         }
  682.         .flex8-clz {
  683.                 padding-top: 16rpx;
  684.                 padding-left: 20rpx;
  685.                 padding-bottom: 16rpx;
  686.                 padding-right: 20rpx;
  687.         }
  688.         .icon2 {
  689.                 font-size: 32rpx;
  690.         }
  691.         .text1-clz {
  692.                 padding-top: 0rpx;
  693.                 flex: 1;
  694.                 padding-left: 0rpx;
  695.                 font-size: 28rpx !important;
  696.                 padding-bottom: 0rpx;
  697.                 padding-right: 0rpx;
  698.         }
  699.         .flex11-clz {
  700.                 background-color: #ffffff;
  701.                 margin-left: 0rpx;
  702.                 width: calc(100% - 0rpx - 0rpx) !important;
  703.                 margin-top: 20rpx;
  704.                 margin-bottom: 0rpx;
  705.                 border-bottom: 2rpx solid #eee;
  706.                 margin-right: 0rpx;
  707.         }
  708.         .flex12-clz {
  709.                 padding-top: 16rpx;
  710.                 padding-left: 10rpx;
  711.                 padding-bottom: 16rpx;
  712.                 border-bottom: 2rpx solid #eee;
  713.                 padding-right: 10rpx;
  714.         }
  715.         .icon4-clz {
  716.                 color: #00bc25;
  717.         }
  718.         .icon4 {
  719.                 font-size: 32rpx;
  720.         }
  721.         .text2-clz {
  722.                 padding-top: 0rpx;
  723.                 flex: 1;
  724.                 padding-left: 0rpx;
  725.                 font-size: 28rpx !important;
  726.                 padding-bottom: 0rpx;
  727.                 padding-right: 0rpx;
  728.         }
  729.         .flex13-clz {
  730.                 padding-top: 16rpx;
  731.                 padding-left: 20rpx;
  732.                 padding-bottom: 16rpx;
  733.                 padding-right: 20rpx;
  734.         }
  735.         .icon5 {
  736.                 font-size: 32rpx;
  737.         }
  738.         .text4-clz {
  739.                 padding-top: 0rpx;
  740.                 flex: 1;
  741.                 padding-left: 0rpx;
  742.                 font-size: 28rpx !important;
  743.                 padding-bottom: 0rpx;
  744.                 padding-right: 0rpx;
  745.         }
  746.         .flex5-clz {
  747.                 background-color: #ffffff;
  748.                 margin-left: 0rpx;
  749.                 width: calc(100% - 0rpx - 0rpx) !important;
  750.                 margin-top: 20rpx;
  751.                 margin-bottom: 0rpx;
  752.                 border-bottom: 2rpx solid #eee;
  753.                 margin-right: 0rpx;
  754.         }
  755.         .flex14-clz {
  756.                 padding-top: 16rpx;
  757.                 padding-left: 10rpx;
  758.                 padding-bottom: 16rpx;
  759.                 border-bottom: 2rpx solid #eee;
  760.                 padding-right: 10rpx;
  761.         }
  762.         .line1-clz {
  763.                 flex: 1;
  764.         }
  765.         .text5-clz {
  766.                 margin-left: 10rpx;
  767.                 font-size: 28rpx !important;
  768.                 margin-top: 10rpx;
  769.                 margin-bottom: 10rpx;
  770.                 margin-right: 10rpx;
  771.         }
  772.         .line-clz {
  773.                 flex: 1;
  774.         }
  775.         .ucontent1-clz {
  776.                 padding-top: 16rpx;
  777.                 padding-left: 20rpx;
  778.                 padding-bottom: 16rpx;
  779.                 border-bottom: 2rpx solid #eee;
  780.                 padding-right: 20rpx;
  781.         }
  782.         .flex3-clz {
  783.                 border-top: 2rpx solid #eee;
  784.                 padding-top: 16rpx;
  785.                 border-bottom-left-radius: 0rpx;
  786.                 color: #747474;
  787.                 bottom: 0rpx;
  788.                 padding-left: 16rpx;
  789.                 padding-bottom: 16rpx;
  790.                 border-top-right-radius: 20rpx;
  791.                 background-color: #ffffff;
  792.                 box-shadow: 0rpx 2rpx 6rpx rgba(31, 31, 31, 0.21);
  793.                 overflow: hidden;
  794.                 left: 0rpx;
  795.                 border-top-left-radius: 20rpx;
  796.                 border-bottom-right-radius: 0rpx;
  797.                 padding-right: 16rpx;
  798.         }
  799.         .button1-button-clz {
  800.                 margin: 6rpx !important;
  801.         }
  802.         .flex20-clz {
  803.                 background-color: #d6d6d6;
  804.                 padding-top: 16rpx;
  805.                 border-bottom-left-radius: 200rpx;
  806.                 overflow: hidden;
  807.                 font-weight: bold;
  808.                 padding-left: 10rpx;
  809.                 font-size: 28rpx !important;
  810.                 padding-bottom: 16rpx;
  811.                 border-top-left-radius: 200rpx;
  812.                 border-top-right-radius: 200rpx;
  813.                 border-bottom-right-radius: 200rpx;
  814.                 padding-right: 10rpx;
  815.         }
  816.         .flex15-clz {
  817.                 background-color: #d6d6d6;
  818.                 padding-top: 16rpx;
  819.                 border-bottom-left-radius: 200rpx;
  820.                 overflow: hidden;
  821.                 font-weight: bold;
  822.                 padding-left: 10rpx;
  823.                 font-size: 28rpx !important;
  824.                 padding-bottom: 16rpx;
  825.                 border-top-left-radius: 200rpx;
  826.                 border-top-right-radius: 200rpx;
  827.                 border-bottom-right-radius: 200rpx;
  828.                 padding-right: 10rpx;
  829.         }
  830.         .flex2-clz {
  831.                 padding-top: 16rpx;
  832.                 border-bottom-left-radius: 200rpx;
  833.                 overflow: hidden;
  834.                 font-weight: bold;
  835.                 padding-left: 10rpx;
  836.                 font-size: 28rpx !important;
  837.                 padding-bottom: 16rpx;
  838.                 border-top-left-radius: 200rpx;
  839.                 border-top-right-radius: 200rpx;
  840.                 border-bottom-right-radius: 200rpx;
  841.                 padding-right: 10rpx;
  842.         }
  843.         .container335134 {
  844.                 padding-bottom: 160rpx;
  845.                 background-color: #f5f5f5;
  846.         }
  847. </style>
复制代码
个人中央
个人中央把其他功能串起来,方便发布其他内容 


  1. <template>
  2.         <view class="container container335134">
  3.                 <!-- #ifdef MP-WEIXIN -->
  4.                 <u-navbar @change="changeNavbarHeight" :isFixed="true" :isMarginRight="false" :borderBottom="false" title="" :background="{}" :backTextStyle="{ color: 'inherit' }" backIconColor="#fff" titleColor="inherit" :isHome="false" :isBack="false">
  5.                         <view class="flex align-center diygw-text-md text-bold align-center flex-nowrap diygw-col-24"> </view>
  6.                 </u-navbar>
  7.                 <!--  #endif -->
  8.                 <view class="flex diygw-col-24 flex-direction-column items-start flex-nowrap flex73-clz">
  9.                         <view class="flex flex-wrap diygw-col-24 items-center flex74-clz">
  10.                                 <image :src="userInfo.avatar || '/static/avatar.png'" class="image8-size diygw-image diygw-col-0 image8-clz" mode="widthFix"></image>
  11.                                 <view class="flex flex-wrap diygw-col-0 justify-between flex3-clz">
  12.                                         <text class="diygw-text-line1 diygw-col-0 text5-clz">
  13.                                                 {{ userInfo.nickname || '请先登录' }}
  14.                                         </text>
  15.                                 </view>
  16.                         </view>
  17.                         <view class="flex flex-wrap diygw-col-24 flex-direction-column flex-clz">
  18.                                 <view class="flex flex-wrap diygw-col-24">
  19.                                         <view class="flex flex-wrap diygw-col-8 flex-direction-column items-center" @tap="navigateTo" data-type="page" data-url="/pages/cms/cate">
  20.                                                 <image src="/static/sc.png" class="image7-size diygw-image diygw-col-0" mode="widthFix"></image>
  21.                                                 <text class="diygw-text-line1 diygw-col-0"> 我的收藏 </text>
  22.                                         </view>
  23.                                         <view class="flex flex-wrap diygw-col-8 flex-direction-column items-center" @tap="navigateTo" data-type="page" data-url="/pages/huodong/mydata">
  24.                                                 <image src="/static/bmjl.png" class="image10-size diygw-image diygw-col-0" mode="widthFix"></image>
  25.                                                 <text class="diygw-text-line1 diygw-col-0"> 我的报名 </text>
  26.                                         </view>
  27.                                         <view class="flex flex-wrap diygw-col-8 flex-direction-column items-center" @tap="navigateTo" data-type="page" data-url="/pages/article" data-id="1">
  28.                                                 <image src="/static/gy.png" class="image11-size diygw-image diygw-col-0" mode="widthFix"></image>
  29.                                                 <text class="diygw-text-line1 diygw-col-0"> 关于我们 </text>
  30.                                         </view>
  31.                                 </view>
  32.                         </view>
  33.                         <view class="flex flex-wrap diygw-col-24 flex-direction-column flex1-clz">
  34.                                 <view class="flex flex-wrap diygw-col-24">
  35.                                         <view class="flex flex-wrap diygw-col-24 items-center flex2-clz" @tap="navigateTo" data-type="page" data-url="/pages/huodong/index">
  36.                                                 <image src="/static/yy.png" class="image17-size diygw-image diygw-col-0" mode="widthFix"></image>
  37.                                                 <text class="diygw-text-line1 diygw-col-0 text-clz"> 我的活动 </text>
  38.                                         </view>
  39.                                         <view class="flex flex-wrap diygw-col-24 items-center flex27-clz" @tap="navigateTo" data-type="phone" data-phone="15913132246">
  40.                                                 <image src="/static/kfdh.png" class="image12-size diygw-image diygw-col-0" mode="widthFix"></image>
  41.                                                 <text class="diygw-text-line1 diygw-col-0 text18-clz"> 客服电话 </text>
  42.                                         </view>
  43.                                         <view class="flex flex-wrap diygw-col-24 items-center flex30-clz" @tap="navigateTo" data-type="page" data-url="/pages/msg/edit">
  44.                                                 <image src="/static/fkjl.png" class="image19-size diygw-image diygw-col-0" mode="widthFix"></image>
  45.                                                 <text class="diygw-text-line1 diygw-col-0 text21-clz"> 在线预约 </text>
  46.                                         </view>
  47.                                         <view class="flex flex-wrap diygw-col-24 items-center flex5-clz" @tap="navigateTo" data-type="page" data-url="/pages/article" data-id="1">
  48.                                                 <image src="/static/gy.png" class="image-size diygw-image diygw-col-0" mode="widthFix"></image>
  49.                                                 <text class="diygw-text-line1 diygw-col-0 text1-clz"> 关于我们 </text>
  50.                                         </view>
  51.                                 </view>
  52.                         </view>
  53.                         <view v-if="userInfo.username == 'admin'" class="flex flex-wrap diygw-col-24 flex-direction-column flex7-clz">
  54.                                 <text class="diygw-col-24 text17-clz"> 管理员管理功能 </text>
  55.                                 <view class="flex flex-wrap diygw-col-24">
  56.                                         <view class="flex flex-wrap diygw-col-6 flex-direction-column items-center" @tap="navigateTo" data-type="page" data-url="/pages/cms/cate">
  57.                                                 <image src="/static/cl.png" class="image2-size diygw-image diygw-col-0 image2-clz" mode="widthFix"></image>
  58.                                                 <text class="diygw-text-line1 diygw-col-0 text3-clz"> 我的收藏 </text>
  59.                                         </view>
  60.                                         <view class="flex flex-wrap diygw-col-6 flex-direction-column items-center" @tap="navigateTo" data-type="page" data-url="/pages/cms/article">
  61.                                                 <image src="/static/zxxjsbbf.png" class="image9-size diygw-image diygw-col-0 image9-clz" mode="widthFix"></image>
  62.                                                 <text class="diygw-text-line1 diygw-col-0 text11-clz"> 文章管理 </text>
  63.                                         </view>
  64.                                         <view class="flex flex-wrap diygw-col-6 flex-direction-column items-center" @tap="navigateTo" data-type="page" data-url="/pages/cms/product">
  65.                                                 <image src="/static/zxxjsbbf.png" class="image13-size diygw-image diygw-col-0 image13-clz" mode="widthFix"></image>
  66.                                                 <text class="diygw-text-line1 diygw-col-0 text14-clz"> 产品管理 </text>
  67.                                         </view>
  68.                                         <view class="flex flex-wrap diygw-col-6 flex-direction-column items-center" @tap="navigateTo" data-type="page" data-url="/pages/cms/swiper">
  69.                                                 <image src="/static/cb.png" class="image14-size diygw-image diygw-col-0 image14-clz" mode="widthFix"></image>
  70.                                                 <text class="diygw-text-line1 diygw-col-0 text15-clz"> 轮播管理 </text>
  71.                                         </view>
  72.                                         <view class="flex flex-wrap diygw-col-6 flex-direction-column items-center" @tap="navigateTo" data-type="page" data-url="/pages/cms/notice">
  73.                                                 <image src="/static/cb.png" class="image15-size diygw-image diygw-col-0 image15-clz" mode="widthFix"></image>
  74.                                                 <text class="diygw-text-line1 diygw-col-0 text16-clz"> 消息管理 </text>
  75.                                         </view>
  76.                                 </view>
  77.                         </view>
  78.                 </view>
  79.                 <view class="flex flex-wrap diygw-col-24 items-end diygw-bottom flex6-clz">
  80.                         <view class="flex flex-wrap diygw-col-6 flex-direction-column items-center flex8-clz" @tap="navigateTo" data-type="page" data-url="/pages/index" data-redirect="1">
  81.                                 <view class="flex flex-wrap diygw-col-0 flex-direction-column items-center">
  82.                                         <image src="/static/sy3.png" class="image1-size diygw-image diygw-col-0" mode="widthFix"></image>
  83.                                 </view>
  84.                                 <text class="diygw-text-line1 diygw-col-0"> 首页 </text>
  85.                         </view>
  86.                         <view class="flex flex-wrap diygw-col-6 flex-direction-column items-center flex10-clz" @tap="navigateTo" data-type="page" data-url="/pages/huodong" data-redirect="1">
  87.                                 <view class="flex flex-wrap diygw-col-0 flex-direction-column items-center">
  88.                                         <image src="/static/cp1.png" class="image3-size diygw-image diygw-col-0" mode="widthFix"></image>
  89.                                 </view>
  90.                                 <text class="diygw-text-line1 diygw-col-0"> 活动 </text>
  91.                         </view>
  92.                         <view class="flex flex-wrap diygw-col-6 flex-direction-column items-center flex14-clz" @tap="navigateTo" data-type="page" data-url="/pages/articles" data-redirect="1">
  93.                                 <view class="flex flex-wrap diygw-col-0 flex-direction-column items-center">
  94.                                         <text class="diygw-text-line1 diygw-col-0 animate__animated animate__heartBeat animate__infinite text7-clz"> </text>
  95.                                         <image src="/static/xw1.png" class="image4-size diygw-image diygw-col-0" mode="widthFix"></image>
  96.                                 </view>
  97.                                 <text class="diygw-text-line1 diygw-col-0"> 新闻资讯 </text>
  98.                         </view>
  99.                         <view class="flex flex-wrap diygw-col-6 flex-direction-column items-center flex15-clz">
  100.                                 <view class="flex flex-wrap diygw-col-0 flex-direction-column items-center">
  101.                                         <image src="/static/wd1.png" class="image5-size diygw-image diygw-col-0" mode="widthFix"></image>
  102.                                 </view>
  103.                                 <text class="diygw-text-line1 diygw-col-0 text9-clz"> 我的 </text>
  104.                         </view>
  105.                 </view>
  106.                 <view class="clearfix"></view>
  107.         </view>
  108. </template>
  109. <script>
  110.         export default {
  111.                 data() {
  112.                         return {
  113.                                 //用户全局信息
  114.                                 userInfo: {},
  115.                                 //页面传参
  116.                                 globalOption: {},
  117.                                 //自定义全局变量
  118.                                 globalData: {},
  119.                                 navbarHeight: 0
  120.                         };
  121.                 },
  122.                 onShow() {
  123.                         this.setCurrentPage(this);
  124.                 },
  125.                 onLoad(option) {
  126.                         this.setCurrentPage(this);
  127.                         if (option) {
  128.                                 this.setData({
  129.                                         globalOption: this.getOption(option)
  130.                                 });
  131.                         }
  132.                         this.init();
  133.                 },
  134.                 methods: {
  135.                         async init() {
  136.                                 await this.isloginFunction();
  137.                         },
  138.                         // 判断是否登录 自定义方法
  139.                         async isloginFunction(param) {
  140.                                 let thiz = this;
  141.                                 if (!this.$session.getToken()) {
  142.                                         //比如未登录,转身到其他页面等
  143.                                         this.showToast('请先登录');
  144.                                         this.navigateTo({
  145.                                                 type: 'page',
  146.                                                 url: 'login'
  147.                                         });
  148.                                         return;
  149.                                 }
  150.                         },
  151.                         changeNavbarHeight(val) {
  152.                                 this.navbarHeight = val;
  153.                         }
  154.                 }
  155.         };
  156. </script>
  157. <style lang="scss" scoped>
  158.         .flex73-clz {
  159.                 margin-left: 10rpx;
  160.                 padding-top: 20rpx;
  161.                 padding-left: 20rpx;
  162.                 width: calc(100% - 10rpx - 10rpx) !important;
  163.                 padding-bottom: 20rpx;
  164.                 margin-top: 10rpx;
  165.                 margin-bottom: 10rpx;
  166.                 margin-right: 10rpx;
  167.                 padding-right: 20rpx;
  168.         }
  169.         .flex74-clz {
  170.                 margin-left: 0rpx;
  171.                 width: calc(100% - 0rpx - 0rpx) !important;
  172.                 margin-top: 10rpx;
  173.                 margin-bottom: 10rpx;
  174.                 margin-right: 0rpx;
  175.         }
  176.         .image8-clz {
  177.                 border-bottom-left-radius: 120rpx;
  178.                 overflow: hidden;
  179.                 border-top-left-radius: 120rpx;
  180.                 border-top-right-radius: 120rpx;
  181.                 border-bottom-right-radius: 120rpx;
  182.         }
  183.         .image8-size {
  184.                 height: 96rpx !important;
  185.                 width: 96rpx !important;
  186.         }
  187.         .flex3-clz {
  188.                 padding-top: 10rpx;
  189.                 flex: 1;
  190.                 padding-left: 10rpx;
  191.                 padding-bottom: 10rpx;
  192.                 padding-right: 10rpx;
  193.         }
  194.         .text5-clz {
  195.                 font-weight: bold;
  196.                 font-size: 40rpx !important;
  197.         }
  198.         .flex-clz {
  199.                 padding-top: 20rpx;
  200.                 border-bottom-left-radius: 12rpx;
  201.                 padding-left: 10rpx;
  202.                 padding-bottom: 20rpx;
  203.                 border-top-right-radius: 12rpx;
  204.                 margin-right: 0rpx;
  205.                 background-color: #ffffff;
  206.                 margin-left: 0rpx;
  207.                 overflow: hidden;
  208.                 width: calc(100% - 0rpx - 0rpx) !important;
  209.                 border-top-left-radius: 12rpx;
  210.                 margin-top: 20rpx;
  211.                 border-bottom-right-radius: 12rpx;
  212.                 margin-bottom: 20rpx;
  213.                 padding-right: 10rpx;
  214.         }
  215.         .image7-size {
  216.                 height: 72rpx !important;
  217.                 width: 72rpx !important;
  218.         }
  219.         .image10-size {
  220.                 height: 72rpx !important;
  221.                 width: 72rpx !important;
  222.         }
  223.         .image11-size {
  224.                 height: 72rpx !important;
  225.                 width: 72rpx !important;
  226.         }
  227.         .flex1-clz {
  228.                 padding-top: 10rpx;
  229.                 border-bottom-left-radius: 12rpx;
  230.                 padding-left: 10rpx;
  231.                 padding-bottom: 10rpx;
  232.                 border-top-right-radius: 12rpx;
  233.                 margin-right: 0rpx;
  234.                 background-color: #ffffff;
  235.                 margin-left: 0rpx;
  236.                 overflow: hidden;
  237.                 width: calc(100% - 0rpx - 0rpx) !important;
  238.                 border-top-left-radius: 12rpx;
  239.                 margin-top: 20rpx;
  240.                 border-bottom-right-radius: 12rpx;
  241.                 margin-bottom: 20rpx;
  242.                 padding-right: 10rpx;
  243.         }
  244.         .flex2-clz {
  245.                 margin-left: 10rpx;
  246.                 padding-top: 10rpx;
  247.                 padding-left: 10rpx;
  248.                 width: calc(100% - 10rpx - 10rpx) !important;
  249.                 padding-bottom: 10rpx;
  250.                 margin-top: 10rpx;
  251.                 margin-bottom: 10rpx;
  252.                 border-bottom: 2rpx solid #eee;
  253.                 margin-right: 10rpx;
  254.                 padding-right: 10rpx;
  255.         }
  256.         .image17-size {
  257.                 height: 60rpx !important;
  258.                 width: 60rpx !important;
  259.         }
  260.         .text-clz {
  261.                 padding-top: 10rpx;
  262.                 padding-left: 10rpx;
  263.                 padding-bottom: 10rpx;
  264.                 padding-right: 10rpx;
  265.         }
  266.         .flex27-clz {
  267.                 margin-left: 10rpx;
  268.                 padding-top: 10rpx;
  269.                 padding-left: 10rpx;
  270.                 width: calc(100% - 10rpx - 10rpx) !important;
  271.                 padding-bottom: 10rpx;
  272.                 margin-top: 10rpx;
  273.                 margin-bottom: 10rpx;
  274.                 border-bottom: 2rpx solid #eee;
  275.                 margin-right: 10rpx;
  276.                 padding-right: 10rpx;
  277.         }
  278.         .image12-size {
  279.                 height: 60rpx !important;
  280.                 width: 60rpx !important;
  281.         }
  282.         .text18-clz {
  283.                 padding-top: 10rpx;
  284.                 padding-left: 10rpx;
  285.                 padding-bottom: 10rpx;
  286.                 padding-right: 10rpx;
  287.         }
  288.         .flex30-clz {
  289.                 margin-left: 10rpx;
  290.                 padding-top: 10rpx;
  291.                 padding-left: 10rpx;
  292.                 width: calc(100% - 10rpx - 10rpx) !important;
  293.                 padding-bottom: 10rpx;
  294.                 margin-top: 10rpx;
  295.                 margin-bottom: 10rpx;
  296.                 border-bottom: 2rpx solid #eee;
  297.                 margin-right: 10rpx;
  298.                 padding-right: 10rpx;
  299.         }
  300.         .image19-size {
  301.                 height: 64rpx !important;
  302.                 width: 64rpx !important;
  303.         }
  304.         .text21-clz {
  305.                 padding-top: 10rpx;
  306.                 padding-left: 10rpx;
  307.                 padding-bottom: 10rpx;
  308.                 padding-right: 10rpx;
  309.         }
  310.         .flex5-clz {
  311.                 margin-left: 10rpx;
  312.                 padding-top: 10rpx;
  313.                 padding-left: 10rpx;
  314.                 width: calc(100% - 10rpx - 10rpx) !important;
  315.                 padding-bottom: 10rpx;
  316.                 margin-top: 10rpx;
  317.                 margin-bottom: 10rpx;
  318.                 border-bottom: 2rpx solid #eee;
  319.                 margin-right: 10rpx;
  320.                 padding-right: 10rpx;
  321.         }
  322.         .image-size {
  323.                 height: 64rpx !important;
  324.                 width: 64rpx !important;
  325.         }
  326.         .text1-clz {
  327.                 padding-top: 10rpx;
  328.                 padding-left: 10rpx;
  329.                 padding-bottom: 10rpx;
  330.                 padding-right: 10rpx;
  331.         }
  332.         .flex7-clz {
  333.                 padding-top: 10rpx;
  334.                 border-bottom-left-radius: 12rpx;
  335.                 padding-left: 10rpx;
  336.                 padding-bottom: 10rpx;
  337.                 border-top-right-radius: 12rpx;
  338.                 margin-right: 0rpx;
  339.                 background-color: #ffffff;
  340.                 margin-left: 0rpx;
  341.                 overflow: hidden;
  342.                 width: calc(100% - 0rpx - 0rpx) !important;
  343.                 border-top-left-radius: 12rpx;
  344.                 margin-top: 20rpx;
  345.                 border-bottom-right-radius: 12rpx;
  346.                 margin-bottom: 20rpx;
  347.                 padding-right: 10rpx;
  348.         }
  349.         .text17-clz {
  350.                 margin-left: 10rpx;
  351.                 padding-top: 10rpx;
  352.                 font-weight: bold;
  353.                 padding-left: 10rpx;
  354.                 width: calc(100% - 10rpx - 10rpx) !important;
  355.                 font-size: 28rpx !important;
  356.                 padding-bottom: 10rpx;
  357.                 margin-top: 10rpx;
  358.                 margin-bottom: 10rpx;
  359.                 margin-right: 10rpx;
  360.                 padding-right: 10rpx;
  361.         }
  362.         .image2-clz {
  363.                 border-bottom-left-radius: 120rpx;
  364.                 overflow: hidden;
  365.                 border-top-left-radius: 120rpx;
  366.                 border-top-right-radius: 120rpx;
  367.                 border-bottom-right-radius: 120rpx;
  368.         }
  369.         .image2-size {
  370.                 height: 80rpx !important;
  371.                 width: 80rpx !important;
  372.         }
  373.         .text3-clz {
  374.                 padding-top: 10rpx;
  375.                 padding-left: 10rpx;
  376.                 padding-bottom: 10rpx;
  377.                 padding-right: 10rpx;
  378.         }
  379.         .image9-clz {
  380.                 border-bottom-left-radius: 120rpx;
  381.                 overflow: hidden;
  382.                 border-top-left-radius: 120rpx;
  383.                 border-top-right-radius: 120rpx;
  384.                 border-bottom-right-radius: 120rpx;
  385.         }
  386.         .image9-size {
  387.                 height: 80rpx !important;
  388.                 width: 80rpx !important;
  389.         }
  390.         .text11-clz {
  391.                 padding-top: 10rpx;
  392.                 padding-left: 10rpx;
  393.                 padding-bottom: 10rpx;
  394.                 padding-right: 10rpx;
  395.         }
  396.         .image13-clz {
  397.                 border-bottom-left-radius: 120rpx;
  398.                 overflow: hidden;
  399.                 border-top-left-radius: 120rpx;
  400.                 border-top-right-radius: 120rpx;
  401.                 border-bottom-right-radius: 120rpx;
  402.         }
  403.         .image13-size {
  404.                 height: 80rpx !important;
  405.                 width: 80rpx !important;
  406.         }
  407.         .text14-clz {
  408.                 padding-top: 10rpx;
  409.                 padding-left: 10rpx;
  410.                 padding-bottom: 10rpx;
  411.                 padding-right: 10rpx;
  412.         }
  413.         .image14-clz {
  414.                 border-bottom-left-radius: 120rpx;
  415.                 overflow: hidden;
  416.                 border-top-left-radius: 120rpx;
  417.                 border-top-right-radius: 120rpx;
  418.                 border-bottom-right-radius: 120rpx;
  419.         }
  420.         .image14-size {
  421.                 height: 80rpx !important;
  422.                 width: 80rpx !important;
  423.         }
  424.         .text15-clz {
  425.                 padding-top: 10rpx;
  426.                 padding-left: 10rpx;
  427.                 padding-bottom: 10rpx;
  428.                 padding-right: 10rpx;
  429.         }
  430.         .image15-clz {
  431.                 border-bottom-left-radius: 120rpx;
  432.                 overflow: hidden;
  433.                 border-top-left-radius: 120rpx;
  434.                 border-top-right-radius: 120rpx;
  435.                 border-bottom-right-radius: 120rpx;
  436.         }
  437.         .image15-size {
  438.                 height: 80rpx !important;
  439.                 width: 80rpx !important;
  440.         }
  441.         .text16-clz {
  442.                 padding-top: 10rpx;
  443.                 padding-left: 10rpx;
  444.                 padding-bottom: 10rpx;
  445.                 padding-right: 10rpx;
  446.         }
  447.         .flex6-clz {
  448.                 border-top: 2rpx solid #e4e4e4;
  449.                 padding-top: 16rpx;
  450.                 border-bottom-left-radius: 0rpx;
  451.                 bottom: 0rpx;
  452.                 padding-left: 16rpx;
  453.                 padding-bottom: 16rpx;
  454.                 border-top-right-radius: 24rpx;
  455.                 background-color: #ffffff;
  456.                 box-shadow: 0rpx 4rpx 12rpx rgba(31, 31, 31, 0.16);
  457.                 overflow: visible;
  458.                 left: 0rpx;
  459.                 border-top-left-radius: 24rpx;
  460.                 border-bottom-right-radius: 0rpx;
  461.                 padding-right: 16rpx;
  462.         }
  463.         .flex8-clz {
  464.                 flex: 1;
  465.         }
  466.         .image1-size {
  467.                 height: 48rpx !important;
  468.                 width: 48rpx !important;
  469.         }
  470.         .flex10-clz {
  471.                 flex: 1;
  472.         }
  473.         .image3-size {
  474.                 height: 48rpx !important;
  475.                 width: 48rpx !important;
  476.         }
  477.         .flex14-clz {
  478.                 flex: 1;
  479.         }
  480.         .text7-clz {
  481.                 border: 2rpx solid #eee;
  482.                 border-bottom-left-radius: 40rpx;
  483.                 -webkit-animation-duration: 5000ms;
  484.                 color: #ffffff;
  485.                 animation-delay: 1000ms;
  486.                 -webkit-animation-delay: 1000ms;
  487.                 border-top-right-radius: 40rpx;
  488.                 right: -8rpx;
  489.                 background-color: rgba(255, 17, 17, 0.91);
  490.                 animation-duration: 5000ms;
  491.                 flex-shrink: 0;
  492.                 overflow: hidden;
  493.                 top: -8rpx;
  494.                 width: 16rpx !important;
  495.                 border-top-left-radius: 40rpx;
  496.                 border-bottom-right-radius: 40rpx;
  497.                 position: absolute;
  498.                 height: 16rpx !important;
  499.         }
  500.         .image4-size {
  501.                 height: 48rpx !important;
  502.                 width: 48rpx !important;
  503.         }
  504.         .flex15-clz {
  505.                 flex: 1;
  506.         }
  507.         .image5-size {
  508.                 height: 48rpx !important;
  509.                 width: 48rpx !important;
  510.         }
  511.         .text9-clz {
  512.                 color: #031aeb;
  513.         }
  514.         .container335134 {
  515.                 background-image: url(/static/loginbg.png);
  516.                 background-position: top center;
  517.                 background-size: cover;
  518.                 background-repeat: no-repeat;
  519.         }
  520. </style>
复制代码


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

张春

论坛元老
这个人很懒什么都没写!
快速回复 返回顶部 返回列表