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 @@ +