From 598b55ce39050cccd34604a9c8cb4c9f246ca497 Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq,com> Date: Mon, 30 Oct 2023 14:54:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=B9=E8=AE=AD=E6=8A=A5=E5=90=8D=20?= =?UTF-8?q?=E5=92=8C=20=E9=A6=96=E9=A1=B5banner=E6=B4=BB=E5=8A=A8=E6=8A=A5?= =?UTF-8?q?=E5=90=8D=20=E5=92=8C=E5=88=97=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/weliam_smartcity/api/Goods.php | 7 +++- .../plugin/headline/uniapp.php | 4 ++- .../headline/web/controller/headline.ctrl.php | 3 ++ .../web/view/default/headline/edit.html | 11 +++++++ .../member/campusActivities.ctrl.php | 1 + .../member/campus_activities/enroll_list.html | 33 ++++++++++++++++++- .../controller/goodshouse/goodshouse.ctrl.php | 5 ++- .../view/default/goodshouse/createactive.html | 13 ++++++++ 8 files changed, 71 insertions(+), 6 deletions(-) diff --git a/addons/weliam_smartcity/api/Goods.php b/addons/weliam_smartcity/api/Goods.php index f6dd59b..e3afe1d 100644 --- a/addons/weliam_smartcity/api/Goods.php +++ b/addons/weliam_smartcity/api/Goods.php @@ -28,7 +28,7 @@ class GoodsModuleUniapp extends Uniapp { case 1: $tableName = "rush_activity"; $table = tablename(PDO_NAME."rush_activity"); - $field = 'paidid,drawid,thumbs,detail,`describe`,pv,creditmoney,threestatus,pftotherinfo,alldaylimit,daylimit,monthlimit,usedatestatus,week,day,tag,isdistri,retainage,share_title,share_image,share_desc,lp_status,lp_set,unit,is_describe_tip,bgmusic,videourl'; + $field = 'paidid,drawid,thumbs,detail,`describe`,pv,creditmoney,threestatus,pftotherinfo,alldaylimit,daylimit,monthlimit,usedatestatus,week,day,tag,isdistri,retainage,share_title,share_image,share_desc,lp_status,lp_set,unit,is_describe_tip,bgmusic,videourl,diyformid_enroll'; $commentPlugin = 'rush'; $saletype = 1; break;//抢购商品 @@ -530,6 +530,11 @@ class GoodsModuleUniapp extends Uniapp { $info['barset']['playdesc'] = ''; $info['barset']['playdetail'] = ''; } + // 体验报名 + $info['is_enroll'] = 0; + if (isset($info['diyformid_enroll'])) { + $info['is_enroll'] = FormTemplate::isEnroll(2,$id); + } $this->renderSuccess('商品详细信息',$info); } /** diff --git a/addons/weliam_smartcity/plugin/headline/uniapp.php b/addons/weliam_smartcity/plugin/headline/uniapp.php index 94021cf..c237dc3 100644 --- a/addons/weliam_smartcity/plugin/headline/uniapp.php +++ b/addons/weliam_smartcity/plugin/headline/uniapp.php @@ -74,7 +74,8 @@ class HeadlineModuleUniapp extends Uniapp { a.goods_plugin, a.advs, b.name as one_name, - d.name as two_name + d.name as two_name, + a.diyformid FROM " . tablename(PDO_NAME . "headline_content") . " a LEFT JOIN " . tablename(PDO_NAME . "headline_class") @@ -156,6 +157,7 @@ class HeadlineModuleUniapp extends Uniapp { //内容转码 $info['content'] = htmlspecialchars_decode($info['content']); $info['content'] = str_replace("section","div",$info['content']); + $info['is_enroll'] = FormTemplate::isEnroll(3,$id); $this->renderSuccess('头条的详细信息',$info); } diff --git a/addons/weliam_smartcity/plugin/headline/web/controller/headline.ctrl.php b/addons/weliam_smartcity/plugin/headline/web/controller/headline.ctrl.php index 1bdf1ae..5b1b6bd 100644 --- a/addons/weliam_smartcity/plugin/headline/web/controller/headline.ctrl.php +++ b/addons/weliam_smartcity/plugin/headline/web/controller/headline.ctrl.php @@ -216,6 +216,8 @@ class Headline_WeliamController { $info['display_img'] = $result['thumb'];//封面图片 $info['content'] = $result['contents'];//具体内容 } + //获取自定义表单信息 + $diyFormList = FormTemplate::getAllDiyFormList($_W); include wl_template('headline/edit'); } @@ -256,6 +258,7 @@ class Headline_WeliamController { $data['advs'] = ''; } $data['content'] = base64_encode($data['content']); + $data['diyformid'] = $data['diyformid'] ?: 0; if ($_GPC['id']) { //修改操作 查看是否修改 $data['id'] = $_GPC['id']; diff --git a/addons/weliam_smartcity/plugin/headline/web/view/default/headline/edit.html b/addons/weliam_smartcity/plugin/headline/web/view/default/headline/edit.html index 7e417e6..29026dd 100644 --- a/addons/weliam_smartcity/plugin/headline/web/view/default/headline/edit.html +++ b/addons/weliam_smartcity/plugin/headline/web/view/default/headline/edit.html @@ -123,6 +123,17 @@ +
+
报名表单
+
+ +
+
diff --git a/addons/weliam_smartcity/sys/controller/member/campusActivities.ctrl.php b/addons/weliam_smartcity/sys/controller/member/campusActivities.ctrl.php index a12bd61..8fe1aec 100644 --- a/addons/weliam_smartcity/sys/controller/member/campusActivities.ctrl.php +++ b/addons/weliam_smartcity/sys/controller/member/campusActivities.ctrl.php @@ -231,6 +231,7 @@ class campusActivities_WeliamController { $item['template_title'] = $diyForm ? $diyForm['title'] : ''; $item['enroll_data'] = MemberEnrollData::getAll($item['id']); } + $template_type_list = FormTemplate::$template_type; include wl_template('member/campus_activities/enroll_list'); } diff --git a/addons/weliam_smartcity/sys/view/default/member/campus_activities/enroll_list.html b/addons/weliam_smartcity/sys/view/default/member/campus_activities/enroll_list.html index 4a2a630..70bf148 100644 --- a/addons/weliam_smartcity/sys/view/default/member/campus_activities/enroll_list.html +++ b/addons/weliam_smartcity/sys/view/default/member/campus_activities/enroll_list.html @@ -14,6 +14,12 @@ .content-clamp p { width: 400px; } + .truncate { + width: 100px; /* 定义元素的宽度,根据需要进行调整 */ + white-space: nowrap; /* 禁止文字换行 */ + overflow: hidden; /* 超出元素宽度的部分隐藏 */ + text-overflow: ellipsis; /* 超出元素宽度的部分显示省略号 */ + }
+
+ +
+
+ 全部 + {loop $template_type_list $temp_key $temp_val} + {$temp_val} + {/loop} +
+
+
@@ -88,7 +105,10 @@ {/loop} {else} - {$enroll_data_row['filed_key']}:{$enroll_data_row['field_value']} + {$enroll_data_row['filed_key']}: +
+ {$enroll_data_row['field_value']} +
{/if} {/loop} @@ -108,5 +128,16 @@
{php include wl_template('common/footer');} \ No newline at end of file diff --git a/addons/weliam_smartcity/web/controller/goodshouse/goodshouse.ctrl.php b/addons/weliam_smartcity/web/controller/goodshouse/goodshouse.ctrl.php index 1876572..4a896f1 100644 --- a/addons/weliam_smartcity/web/controller/goodshouse/goodshouse.ctrl.php +++ b/addons/weliam_smartcity/web/controller/goodshouse/goodshouse.ctrl.php @@ -157,6 +157,7 @@ class Goodshouse_WeliamController if (empty($_GPC['cc_child_id']) || !is_numeric($_GPC['cc_child_id'])) wl_message('请选择商品分类'); $goods['cc_id'] = $_GPC['cc_id']; $goods['cc_child_id'] = $_GPC['cc_child_id']; + $goods['diyformid_enroll'] = $_GPC['diyformid_enroll'] ?: 0; if ($goods['lp_status'] == 1 && is_array($_GPC['ld'])) { $lpSet = array_values($_GPC['ld']); $maxMax = max(array_column($lpSet , 'max')); @@ -423,9 +424,7 @@ class Goodshouse_WeliamController $fullreducelist = pdo_getall('wlmerchant_fullreduce_list',array('aid' => $_W['aid'],'uniacid' => $_W['uniacid']),array('id','title')); } //获取自定义表单信息 - $formWhere = ['uniacid'=>$_W['uniacid'],'aid'=>$_W['aid']]; - if(is_store()) $formWhere['sid'] = $_W['storeid']; - $diyFormList = pdo_getall(PDO_NAME."diyform",$formWhere,['id','title'],'','create_time DESC,id DESC'); + $diyFormList = FormTemplate::getAllDiyFormList($_W); //富文本处理 if(is_base64($goods['detail'])) $goods['detail'] = htmlspecialchars_decode(base64_decode($goods['detail'])); if(is_base64($goods['describe'])) $goods['describe'] = htmlspecialchars_decode(base64_decode($goods['describe'])); diff --git a/addons/weliam_smartcity/web/view/default/goodshouse/createactive.html b/addons/weliam_smartcity/web/view/default/goodshouse/createactive.html index 3ed8454..04ee9d5 100644 --- a/addons/weliam_smartcity/web/view/default/goodshouse/createactive.html +++ b/addons/weliam_smartcity/web/view/default/goodshouse/createactive.html @@ -223,6 +223,19 @@ + {if isset($goods['diyformid_enroll'])} +
+ +
+ +
+
+ {/if}