修改报名专题
This commit is contained in:
@@ -29,11 +29,12 @@ class SsApi
|
||||
* @param $name
|
||||
* @param $mobile
|
||||
* @param $en_time
|
||||
* @param $remark
|
||||
* @param $to_customers 是否添加到客户池
|
||||
* @param $biz_id
|
||||
* @return array
|
||||
*/
|
||||
public function postClues($id, $name, $mobile, $en_time, $to_customers = 0, $biz_id = 0)
|
||||
public function postClues($id, $name, $mobile, $en_time, $remark, $to_customers = 0, $biz_id = 0)
|
||||
{
|
||||
$data = [
|
||||
'name' => $name,
|
||||
@@ -43,6 +44,7 @@ class SsApi
|
||||
'cf_platform' => self::CF_PLATFORM,
|
||||
'biz_id' => $biz_id,
|
||||
'to_customers' => $to_customers,
|
||||
'remark' => $remark,
|
||||
'nonce_str' => random_string('alpha'),
|
||||
'app_id' => $this->app_id,
|
||||
];
|
||||
@@ -134,7 +136,7 @@ class SsApi
|
||||
$options = [
|
||||
\GuzzleHttp\RequestOptions::HEADERS => ['Content-Type' => 'application/json'],
|
||||
];
|
||||
$url = $this->api_url . self::BIZ_METHOD.'?'.http_build_query($data);
|
||||
$url = $this->api_url . self::BIZ_METHOD . '?' . http_build_query($data);
|
||||
try {
|
||||
debug_log("[info]#请求地址:" . $url, $this->log_path);
|
||||
$response = $client->get($url, $options);
|
||||
|
||||
@@ -13,6 +13,8 @@ class Sytopic_enroll_entity
|
||||
$this->ci->load->model('market/market_sylive_organization_model');
|
||||
$this->ci->load->model('market/market_sytopic_enroll_model', 'sytopic_enroll_model');
|
||||
$this->ci->load->model('market/Market_sytopic_model', 'topic_model');
|
||||
$this->ci->load->model('market/Market_sytopic_module_option_model', 'module_option_model');
|
||||
$this->ci->load->model('market/Market_sytopic_module_model', 'module_model');
|
||||
$this->ci->load->library('ssApi');
|
||||
}
|
||||
|
||||
@@ -49,11 +51,20 @@ class Sytopic_enroll_entity
|
||||
} else { //同步到客户
|
||||
debug_log("[info]# 同步到空间站.", $this->log_file);
|
||||
$to_customers = 0;
|
||||
if($enrollDeal==$enrollModel::ENROLL_DEAL_PUSH_CUSTOMER){
|
||||
if ($enrollDeal == $enrollModel::ENROLL_DEAL_PUSH_CUSTOMER) {
|
||||
$to_customers = 1;
|
||||
}
|
||||
$modelOptionRow = $this->ci->module_option_model->get(['id' => $enrollRow['moduleOptionId']]);
|
||||
$modelRow = $this->ci->module_option_model->get(['id' => $enrollRow['moduleId']]);
|
||||
if ($modelOptionRow || $modelRow) {
|
||||
$remark = "用户通过 " . $modelRow['title'];
|
||||
$modelOptionRow && $remark .= "-" . $modelOptionRow['title'];
|
||||
$remark .= " 留资";
|
||||
} else {
|
||||
$remark = '用户通过 ' . $topicRow['title'] . ' 留资';
|
||||
}
|
||||
$res = $ssApi->postClues($enrollId, $enrollRow['name'],
|
||||
$enrollRow['mobile'], $enrollRow['enTime'], $to_customers, (int)$organizationRow['comments']);
|
||||
$enrollRow['mobile'], $enrollRow['enTime'], $remark, $to_customers, (int)$organizationRow['comments']);
|
||||
debug_log("[info]# 接口请求结果:" . json_encode($res, JSON_UNESCAPED_UNICODE), $this->log_file);
|
||||
return $res;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ class Market_sytopic_module_model extends HD_Model
|
||||
const TYPE_ENROLL_BANNER = 7; // 报名轮播图
|
||||
const TYPE_ENROLL_GIFT = 8; // 礼品模块
|
||||
|
||||
const TYPE_ENROLL = 9; // 报名模块
|
||||
|
||||
const TYPE_ARRAY = [
|
||||
// self::TYPE_BANNER => '主图',
|
||||
self::TYPE_DISCOUNT => '轮播报名',
|
||||
@@ -23,6 +25,7 @@ class Market_sytopic_module_model extends HD_Model
|
||||
self::TYPE_ARTICLE => '富文本',
|
||||
self::TYPE_ENROLL_BANNER => '横排轮播图',
|
||||
self::TYPE_ENROLL_GIFT => '礼品',
|
||||
self::TYPE_ENROLL => '直接报名',
|
||||
];
|
||||
|
||||
public function __construct()
|
||||
|
||||
@@ -45,7 +45,11 @@ class Market_sytopic_module_option_model extends HD_Model
|
||||
$modelOptionsList = $this->select($where, "FIELD (moduleId,{$modelIdsStr})", 1, 100);
|
||||
foreach ($modelOptionsList as $item) {
|
||||
$lists[] = [
|
||||
'banner' => $item['banner'] ? build_qiniu_image_url($item['banner']) : ''
|
||||
'id' => $item['id'],
|
||||
'title' => '',
|
||||
'popUpType' => $item['popUpType'],
|
||||
'banner' => $item['banner'] ? build_qiniu_image_url($item['banner']) : '',
|
||||
'type' => $moduleModel::TYPE_ENROLL_BANNER,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ class Welcome extends Wx
|
||||
$actUser['channelId'] && $channelRow = $this->user_model->get(['userId' => $actUser['channelId']]);
|
||||
$jsonData = json_decode($row['jsondata'], true);
|
||||
$info = [
|
||||
'id' =>$row['id'],
|
||||
'id' => $row['id'],
|
||||
'title' => $row['title'],
|
||||
'isAdmin' => $this->user_model->checkTopicIsAdmin($this->uid, $this->a_id),
|
||||
'channelName' => $channelRow ? $channelRow['uname'] : '',
|
||||
@@ -50,7 +50,7 @@ class Welcome extends Wx
|
||||
$this->data['modules'] = array_values($moduleLists);
|
||||
$this->data['logoList'] = $this->module_option_model->getTypeEnrollBannerList($this->a_id);
|
||||
//获取门店信息
|
||||
$orgRow = $this->organization_model->get(['organizationId' => $channelRow['bizId']]);
|
||||
$orgRow = $this->organization_model->get(['organizationId' => $row['organizationId']]);
|
||||
$ssBizId = (int)$orgRow['comments'];
|
||||
$biz = [];
|
||||
if ($ssBizId) {
|
||||
@@ -75,7 +75,7 @@ class Welcome extends Wx
|
||||
$redis = &load_cache();
|
||||
$optionId = intval($this->input->post('optionId'));
|
||||
$topicId = intval($this->input->post('topicId'));
|
||||
if(!$topicId){
|
||||
if (!$topicId) {
|
||||
$this->show_json('', 400, '参数错误');
|
||||
}
|
||||
$info = $this->input->post('info');
|
||||
@@ -86,10 +86,10 @@ class Welcome extends Wx
|
||||
$this->show_json('', 400, '请输入姓名');
|
||||
}
|
||||
$key = self::ENROLL_SIGN_KEY . $mobile;
|
||||
// if (!$code || $code != $redis->get($key)) {
|
||||
// $this->show_json('', 400, '请输入正确的验证码');
|
||||
// }
|
||||
$result = $this->sytopic_enroll_model->enroll($topicId,$optionId, $this->act_uid, $name, $mobile);
|
||||
if (!$code || $code != $redis->get($key)) {
|
||||
$this->show_json('', 400, '请输入正确的验证码');
|
||||
}
|
||||
$result = $this->sytopic_enroll_model->enroll($topicId, $optionId, $this->act_uid, $name, $mobile);
|
||||
if (!$result['code']) {
|
||||
$this->show_json('', 400, $result['msg']);
|
||||
}
|
||||
@@ -174,4 +174,5 @@ class Welcome extends Wx
|
||||
$this->data['share'] = $wx_info['share'];
|
||||
$this->show_view('h5/market/sytopic/share');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
<div v-if="logo_list.length>4" class="swiper swiperlogo">
|
||||
<div class="swiper-wrapper">
|
||||
<div class="swiper-slide" v-for="(item, index) in logo_list" :key="index">
|
||||
<a href="javascript:void(0)">
|
||||
<a href="javascript:void(0)" @click="showEnroll(item.type,item,false)">
|
||||
<img :src="item.banner" alt=""/>
|
||||
</a>
|
||||
</div>
|
||||
@@ -113,7 +113,7 @@
|
||||
<div v-else class="ml30">
|
||||
<ul class="fn-flex fn-flex-middle">
|
||||
<li class="mr20" v-for="(item, index) in logo_list" :key="index">
|
||||
<a href="javascript:void(0)">
|
||||
<a href="javascript:void(0)" @click="showEnroll(item.type,item,false)">
|
||||
<van-image width="20.8vw" height="27.6vw" :src="item.banner"></van-image>
|
||||
</a>
|
||||
</li>
|
||||
@@ -125,6 +125,46 @@
|
||||
</div>
|
||||
|
||||
<template v-for="(item,k) in modules" v-if="modules&&modules.length>0">
|
||||
|
||||
<div class="card-module" v-if="item.type && item.type==9 && item.lists && item.lists.length>0">
|
||||
<div class="ulib-rt30 bg-fff fn-flex overflowhidden" style="margin:0;">
|
||||
<div class="fn-flex fn-flex-center fn-flex-middle wp30"
|
||||
style="flex-direction: column;background-image: linear-gradient(to bottom, #f7f2ca,#fbfae8);">
|
||||
<div class="text-center pl5 pr5" style="width: 100%;">
|
||||
<van-image class="bds-2-fff" round width="12vw" height="12vw"
|
||||
:src="info.channelHeadImg"></van-image>
|
||||
<p class="font-28 mt10 text-nowrap">{{info.channelName}}</p>
|
||||
</div>
|
||||
<div class="text-center pl5 pr5 mt50" style="width: 100%;">
|
||||
<span class="bg-fff ulib-r750 inline-block pt5 pb5 pl15 pr15 font-24">成交经纪人</span>
|
||||
<p class="font-22 mt10 color-888 text-nowrap" v-if="info.biz">{{info.biz.biz_name}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inner30 fn-flex-item">
|
||||
<h3 class="text-center font-36 pt10 pb10 mb15">{{item.lists[0].title}}</h3>
|
||||
<div class="bg-f1 ulib-r20 mb30">
|
||||
<van-field v-model="form.name" label="" placeholder="请输入您的姓名"></van-field>
|
||||
</div>
|
||||
<div class="bg-f1 ulib-r20 mb30">
|
||||
<van-field v-model="form.phone" label="" placeholder="请输入您的常用手机号"></van-field>
|
||||
</div>
|
||||
<div class="bg-f1 ulib-r20 mb30">
|
||||
<van-field v-model="form.code" label="" placeholder="请输入手机验证码">
|
||||
<template #button>
|
||||
<p v-if="!show_retry" class="color-666 font-26" @click="getCode">发送验证码</p>
|
||||
<van-count-down style="color:#999;" v-else :time="counttime" :auto-start="true"
|
||||
format="ss 秒后重发" @finish="retrySend"/>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn ulib-r20 bg-f8e26a block font-30 wp100 pt20 pb20 mt50" @click="enrollModel(item.lists[0].id)">提交
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 报名模块 - 大图轮播 -->
|
||||
<div class="card-module" v-if="item.type && item.type==2 && item.lists && item.lists.length>0">
|
||||
<div v-if="0" class="absolute left-0 top-0 right-0" style="margin-top: -10vw;">
|
||||
@@ -311,7 +351,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<div class="btn ulib-r750 font-28 bg-f8e26a pt10 pb10 pl20 pr20"
|
||||
@click="showEnroll(item.type,val)" v-if="val.enroll">
|
||||
@click="showEnroll(item.type,val,false)" v-if="val.enroll">
|
||||
{{val.btnText}}
|
||||
</div>
|
||||
<div class="btn ulib-r750 font-28 bg-f8e26a pt10 pb10 pl20 pr20" v-else>
|
||||
@@ -352,7 +392,7 @@
|
||||
<div class="card-module" style="width: 84vw;">
|
||||
<div class="inner10">
|
||||
<h3 class="text-center font-36 pt10 pb10">{{info.title}}</h3>
|
||||
<div class="fn-flex fn-flex-center fn-flex-middle">
|
||||
<div class="fn-flex fn-flex-center fn-flex-middle" v-if="showOptionTitle">
|
||||
<div class="wp33">
|
||||
<van-image :src="popCarInfo.banner"></van-image>
|
||||
</div>
|
||||
@@ -392,7 +432,7 @@
|
||||
<div class="inner30 ulib-rt30 bg-fff" style="width: 100vw;margin:0;">
|
||||
<div class="inner10">
|
||||
<h3 class="text-center font-36 pt10 pb10">{{info.title}}</h3>
|
||||
<div class="fn-flex fn-flex-center fn-flex-middle">
|
||||
<div class="fn-flex fn-flex-center fn-flex-middle" v-if="showOptionTitle">
|
||||
<div class="wp33">
|
||||
<van-image :src="popCarInfo.banner"></van-image>
|
||||
</div>
|
||||
@@ -476,7 +516,8 @@
|
||||
</van-field>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn ulib-r20 bg-f8e26a block font-30 wp100 pt20 pb20 mt50" @click="enroll">提交</button>
|
||||
<button class="btn ulib-r20 bg-f8e26a block font-30 wp100 pt20 pb20 mt50" @click="enroll">提交
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -513,11 +554,12 @@
|
||||
show_retry: false,
|
||||
logo_list: <?=json_encode($logoList);?>,
|
||||
location_info: { // 地理位置信息 20240807
|
||||
lat: 23.099994,
|
||||
lng: 113.324520,
|
||||
name: '汽车之家空间站·厦门站',
|
||||
address: '福建省厦门市湖里区翔远福建省厦门市湖里区翔远'
|
||||
}
|
||||
lat: <?=$info['biz']['lat'] ?: 0?>,
|
||||
lng: <?=$info['biz']['lng'] ?: 0?>,
|
||||
name: "<?=$info['biz']['biz_name'] ?: ''?>",
|
||||
address: "<?=$info['biz']['address'] ?: ''?>"
|
||||
},
|
||||
showOptionTitle: true,//是否显示弹窗项目配置信息
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -527,7 +569,7 @@
|
||||
showGwEnroll() {
|
||||
this.show_signup_agent_bottom = true
|
||||
},
|
||||
showEnroll(type, row) {
|
||||
showEnroll(type, row, showOptionTitle = true) {
|
||||
let popUpType = row.popUpType ? parseInt(row.popUpType) : 0
|
||||
this.popCarInfo.title = row.title
|
||||
this.popCarInfo.subTitle = row.subTitle
|
||||
@@ -538,6 +580,7 @@
|
||||
} else {
|
||||
this.show_signup_center = true
|
||||
}
|
||||
this.showOptionTitle = showOptionTitle
|
||||
},
|
||||
getCode() { //获取验证码
|
||||
if (this.isSubmiting) {
|
||||
@@ -599,7 +642,10 @@
|
||||
});
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
},
|
||||
enrollModel($optionId) { //直接报名模块
|
||||
this.optionId = $optionId
|
||||
this.enroll();
|
||||
},
|
||||
bindCarNext() {
|
||||
this.$refs.carswiper.next();
|
||||
|
||||
@@ -10,6 +10,7 @@ class Enroll extends BaseController
|
||||
$this->load->model('market/Market_sytopic_model', 'mSytopic');
|
||||
$this->load->model('market/Market_sytopic_enroll_model', 'sytopic_enroll_model');
|
||||
$this->load->model('market/market_sylive_user_model', 'user_model');
|
||||
$this->load->model('market/market_sylive_organization_model');
|
||||
$this->load->library('MyEncryption');
|
||||
}
|
||||
|
||||
@@ -78,7 +79,7 @@ class Enroll extends BaseController
|
||||
if ($topicId) {
|
||||
$where['topicId'] = $topicId;
|
||||
}
|
||||
if(strlen($status)){
|
||||
if (strlen($status)) {
|
||||
$where['status'] = (int)$status;
|
||||
}
|
||||
$count = $this->sytopic_enroll_model->count($where);
|
||||
@@ -93,8 +94,13 @@ class Enroll extends BaseController
|
||||
$channelUserIds = array_column($res, 'channelId');
|
||||
$channelUserIdsStr = implode(',', array_unique($channelUserIds));
|
||||
$channelUserMap = [];
|
||||
$channelUserIdsStr && $channelUserMap = $this->user_model->map('userId', 'uname', ["userId in ({$channelUserIdsStr})" => null], '', '', '', 'userId,uname');
|
||||
$channelUserIdsStr && $channelUserMap = $this->user_model->map('userId', '', ["userId in ({$channelUserIdsStr})" => null], '', '', '', 'userId,uname,bizId');
|
||||
foreach ($res as $val) {
|
||||
$channelUser = $channelUserMap[$val['channelId']];
|
||||
$bizId = $channelUser[0]['bizId'];
|
||||
if ($bizId) {
|
||||
$biz = $this->market_sylive_organization_model->get(['organizationId' => $bizId]);
|
||||
}
|
||||
$tmp_data = [
|
||||
'id' => $val['id'],
|
||||
'name' => $val['name'],
|
||||
@@ -102,9 +108,10 @@ class Enroll extends BaseController
|
||||
'enTime' => $val['enTime'],
|
||||
'enrollDeal' => (int)$val['enrollDeal']
|
||||
];
|
||||
$tmp_data['channelName'] = $channelUserMap[$val['channelId']] ?: '';
|
||||
$tmp_data['channelName'] = $channelUser ? $channelUser[0]['uname'] : '';
|
||||
$tmp_data['topicTitle'] = $topicMap[$val['topicId']] ?: '';
|
||||
$tmp_data['status_cn'] = $statusCn[$val['status']];
|
||||
$tmp_data['bizName'] = $biz ? $biz['organizationName'] : '';
|
||||
if ($limit < 10000) {
|
||||
$tmp_data['status'] = intval($val['status']);
|
||||
}
|
||||
@@ -120,8 +127,9 @@ class Enroll extends BaseController
|
||||
/**
|
||||
* 专题管理列表
|
||||
*/
|
||||
public function topicList_get(){
|
||||
$lists = $this->mSytopic->select(['status>='=>0], 'id desc', 1, 10000,'id,title');
|
||||
public function topicList_get()
|
||||
{
|
||||
$lists = $this->mSytopic->select(['status>=' => 0], 'id desc', 1, 10000, 'id,title');
|
||||
!$lists && $lists = [];
|
||||
|
||||
$this->return_response_list($lists);
|
||||
|
||||
Reference in New Issue
Block a user