专题活动
This commit is contained in:
@@ -19,8 +19,8 @@ class Market_sytopic_enroll_model extends HD_Model
|
||||
$topicUser = $this->topic_user_model->get(['id' => $topicUserId]);
|
||||
$row = $this->get(['status' => 0, 'moduleOptionId' => $id, 'userId' => $topicUser['userId']]);
|
||||
if ($row) {
|
||||
$this->update(['name' => $name, 'mobile' => $mobile], ['id' => $row['id']]);
|
||||
return ['code' => 1, 'msg' => '保存成功'];
|
||||
// $this->update(['name' => $name, 'mobile' => $mobile], ['id' => $row['id']]);
|
||||
return ['code' => 0, 'msg' => '您的信息已收到,无需重复操作'];
|
||||
}
|
||||
$data = [
|
||||
'topicUserId' => $topicUserId,
|
||||
@@ -28,6 +28,7 @@ class Market_sytopic_enroll_model extends HD_Model
|
||||
'channelId' => $topicUser['channelId'],
|
||||
'name' => $name,
|
||||
'mobile' => $mobile,
|
||||
'enTime' => date('Y-m-d H:i:s'),
|
||||
'createTime' => date('Y-m-d H:i:s'),
|
||||
];
|
||||
$optionRow['id'] && $data['moduleOptionId'] = $optionRow['id'];
|
||||
@@ -39,4 +40,14 @@ class Market_sytopic_enroll_model extends HD_Model
|
||||
}
|
||||
return ['code' => 1, 'msg' => '保存成功'];
|
||||
}
|
||||
|
||||
public function statusCn()
|
||||
{
|
||||
$statusArray = [
|
||||
0 => '待确认',
|
||||
1 => '已确认',
|
||||
2 => '无效单'
|
||||
];
|
||||
return $statusArray;
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ class Market_sytopic_module_model extends HD_Model
|
||||
{
|
||||
private $table_name = 'lc_market_sytopic_module';
|
||||
|
||||
const TYPE_BANNER = 1; //banner图
|
||||
// const TYPE_BANNER = 1; //banner图
|
||||
const TYPE_DISCOUNT = 2; //特惠报名
|
||||
const TYPE_SWIPER_BANNER = 3; //广告轮播图
|
||||
const TYPE_GRID = 4; //网格排列表
|
||||
@@ -13,12 +13,12 @@ class Market_sytopic_module_model extends HD_Model
|
||||
const TYPE_ARTICLE = 6; // 文章
|
||||
|
||||
const TYPE_ARRAY = [
|
||||
self::TYPE_BANNER => 'banner图',
|
||||
self::TYPE_DISCOUNT => '特惠报名',
|
||||
self::TYPE_SWIPER_BANNER => '轮播图',
|
||||
// self::TYPE_BANNER => '主图',
|
||||
self::TYPE_DISCOUNT => '轮播报名',
|
||||
self::TYPE_GRID => '网格报名',
|
||||
self::TYPE_HORIZONTAL => '横排报名',
|
||||
self::TYPE_ARTICLE => '文章',
|
||||
self::TYPE_SWIPER_BANNER => '轮播图',
|
||||
self::TYPE_ARTICLE => '富文本',
|
||||
];
|
||||
|
||||
public function __construct()
|
||||
|
||||
@@ -8,6 +8,7 @@ class Biz extends Admin
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('market/Market_sytopic_enroll_model', 'sytopic_enroll_model');
|
||||
}
|
||||
|
||||
//活动列表
|
||||
@@ -17,8 +18,10 @@ class Biz extends Admin
|
||||
$this->data['multi_org'] = $_SESSION[self::SESSION_KEY]['multi_org'] ? 1 : 0;
|
||||
$this->data['isBiz'] = $user['bizId'] == $user['organizationId'] ? 1 : 0;
|
||||
//微信分享
|
||||
$type = $this->input->get('type');
|
||||
$wx_info = $this->share_info();
|
||||
$this->data['sign_package'] = $wx_info['sign_package'];
|
||||
$this->data['type'] = $type;
|
||||
$this->show_view('h5/market/sylive2/biz/index');
|
||||
}
|
||||
|
||||
@@ -100,11 +103,20 @@ class Biz extends Admin
|
||||
$rows = $this->topic_model->select($where, 'id desc', $page, $size);
|
||||
foreach ($rows as $item) {
|
||||
$banner = $item['banner'] ? build_qiniu_image_url($item['banner']) : '';
|
||||
//浏览数
|
||||
$userCount = $this->topic_user_model->count(['topicId' => $item['id'], 'bizId' => $user['bizId']]);
|
||||
if ($userCount > 10000) {
|
||||
$userCount = sprintf("%.2f", $userCount / 10000) . 'W';
|
||||
}
|
||||
//留资数
|
||||
$lzCount = $this->sytopic_enroll_model->count(['topicId' => $item['id'], 'bizId' => $user['bizId'], 'status <> -1' => null]);
|
||||
$lists[] = [
|
||||
'title' => $item['title'],
|
||||
'img' => $banner,
|
||||
'time' => date('Y-m-d H:i', strtotime($item['timeStart'])) . '-' . date('Y-m-d H:i', strtotime($item['timeEnd'])),
|
||||
'url' => "/h5/market/sytopic?skey=".$this->myencryption->base64url_encode(Common::SIGN_TOP_KEY.'='.$item['id'])
|
||||
'url' => "/h5/market/sytopic?skey=" . $this->myencryption->base64url_encode(Common::SIGN_TOP_KEY . '=' . $item['id']),
|
||||
'userCount' => $userCount,
|
||||
'lzCount' => $lzCount,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ class User extends Admin
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('market/Market_sylive_organization_model', 'mdSyliveOrganization');
|
||||
$this->load->model('market/Market_sytopic_enroll_model', 'sytopic_enroll_model');
|
||||
$this->load->library('market/sylive_entity');
|
||||
$this->user = $this->user_model->get(['userId' => $this->uid], 'bizId,topOrgId');
|
||||
$this->biz_id = $this->user['bizId'];
|
||||
@@ -20,6 +21,8 @@ class User extends Admin
|
||||
$row = $this->market_sylive_organization_model->get(['organizationId' => $this->user['topOrgId']]);
|
||||
$biz_row = $this->market_sylive_organization_model->get(['organizationId' => $this->biz_id]);
|
||||
$headimg = $row['logo'] ? build_qiniu_image_url($row['logo']) : Sylive_entity::HD_IMG;
|
||||
$type = $this->input->get('type');
|
||||
$this->data['type'] = $type;
|
||||
$this->data['headimg'] = $headimg;
|
||||
$this->data['biz_name'] = $biz_row['organizationName'];
|
||||
$this->data['biz_id'] = $this->biz_id;
|
||||
@@ -219,4 +222,61 @@ class User extends Admin
|
||||
$this->data['_title'] = '我的推广';
|
||||
$this->show_view('h5/market/sylive2/user/enroll');
|
||||
}
|
||||
|
||||
public function enLists()
|
||||
{
|
||||
$page = intval($this->input->get('page'));
|
||||
$status = $this->input->get('status');
|
||||
!$page && $page = 1;
|
||||
$size = 20;
|
||||
$user = $this->user_model->get(['userId' => $this->session['userId']]);
|
||||
$where = [
|
||||
'status<>' => -1,
|
||||
];
|
||||
if ($user['bizId'] == $user['organizationId']) { //店长
|
||||
$where['bizId'] = $user['bizId'];
|
||||
} else {
|
||||
$where['channelId'] = $this->session['userId'];
|
||||
}
|
||||
if (strlen($status)) {
|
||||
$where['status'] = intval($status);
|
||||
}
|
||||
$total = $this->sytopic_enroll_model->count($where);
|
||||
$lists = [];
|
||||
if ($total) {
|
||||
$res = $this->sytopic_enroll_model->select($where, 'id desc', $page, $size);
|
||||
$status_array = [
|
||||
0 => ['name' => '待确认', 'class' => 'bg-f8e26a'],
|
||||
1 => ['name' => '已确认', 'class' => 'bg-2fdc53'],
|
||||
2 => ['name' => '无效单', 'class' => 'bg-f7']
|
||||
];
|
||||
$topicIds = array_column($res, 'topicId');
|
||||
$topicIdsStr = implode(',', $topicIds);
|
||||
$topicMap = [];
|
||||
$topicIdsStr && $topicMap = $this->topic_model->map('id', 'title', ["id in ({$topicIdsStr})" => null], '', '', '', 'id,title');
|
||||
$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');
|
||||
foreach ($res as $val) {
|
||||
$topicTitle = $topicMap[$val['topicId']];
|
||||
$channelName = $channelUserMap[$val['channelId']];
|
||||
$temp = [
|
||||
'name' => $val['name'],
|
||||
'phone' => mobile_asterisk($val['mobile']),
|
||||
'time' => date('Y-m-d H:i', strtotime($val['enTime'])),
|
||||
'source' => [
|
||||
['name' => $topicTitle, 'class' => 'bg-f8e26a'],
|
||||
['name' => '团队带客·' . $channelName, 'class' => 'bg-f7'],
|
||||
// ['name' => '自然客', 'class' => 'bg-2fdc53']
|
||||
],
|
||||
'status' => $status_array[$val['status']],
|
||||
];
|
||||
$lists[] = $temp;
|
||||
}
|
||||
}
|
||||
$data['list'] = $lists;
|
||||
$data['total'] = $total;
|
||||
$this->show_json($data, 200);
|
||||
}
|
||||
}
|
||||
@@ -32,11 +32,14 @@ class Welcome extends Wx
|
||||
}
|
||||
$channelRow = [];
|
||||
$actUser['channelId'] && $channelRow = $this->user_model->get(['userId' => $actUser['channelId']]);
|
||||
$jsonData = json_decode($row['jsondata'], true);
|
||||
$info = [
|
||||
'title' => $row['title'],
|
||||
'isAdmin' => $this->user_model->checkTopicIsAdmin($this->uid, $this->a_id),
|
||||
'channelName' => $channelRow ? $channelRow['uname'] : '',
|
||||
'channelHeadImg' => $channelRow ? $channelRow['headimg'] : '',
|
||||
'channelHeadImg' => $channelRow['headimg'] ?: 'https://img.liche.cn/liche/market/202407/p_e1065373f27937f69142c28ce975a398.png',
|
||||
'banner' => $jsonData['banner'] ? build_qiniu_image_url($jsonData['banner']) : '',
|
||||
'bgColor' => $jsonData['bg_color'] ?: '',
|
||||
];
|
||||
$moduleLists = $this->module_option_model->getTopicModelOptionsList($this->a_id);
|
||||
$this->data['modules'] = array_values($moduleLists);
|
||||
@@ -60,9 +63,9 @@ class Welcome extends Wx
|
||||
$this->show_json('', 400, '请输入姓名');
|
||||
}
|
||||
$key = self::ENROLL_SIGN_KEY . $mobile;
|
||||
// if (!$code || $code != $redis->get($key)) {
|
||||
// $this->show_json('', 400, '请输入正确的验证码');
|
||||
// }
|
||||
if (!$code || $code != $redis->get($key)) {
|
||||
$this->show_json('', 400, '请输入正确的验证码');
|
||||
}
|
||||
$result = $this->sytopic_enroll_model->enroll($optionId, $this->act_uid, $name, $mobile);
|
||||
if (!$result['code']) {
|
||||
$this->show_json('', 400, $result['msg']);
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
<div class="font-26" @click="logout()"><i class="iconfont icon-tuichu"></i><span class="ml5">退出</span>
|
||||
</div>
|
||||
<a class="fn-flex" href="/h5/market/sylive2">
|
||||
<van-tag color="#1a1a1a" round class="ml20">
|
||||
<span class="ulib-r750 inline-block pt5 pb5 pl10 pr10 font-24 bg-000 color-fff"><i class="iconfont icon-refresh"></i>切换机构</span>
|
||||
<!--van-tag color="#1a1a1a" round class="ml20">
|
||||
<van-icon name="replay" class="mr5"></van-icon>
|
||||
切换机构
|
||||
</van-tag>
|
||||
</van-tag-->
|
||||
</a>
|
||||
<!--
|
||||
<div class="fn-flex" v-if="multi_org===1" @click="orgSelect">
|
||||
@@ -23,26 +24,26 @@
|
||||
</header>
|
||||
<!-- 选择 -->
|
||||
<div class="choose relative" style="height:100%">
|
||||
<div class="absolute bg-size-fullheight bg-no-repeat left-0 top-0 bottom-0 right-0 pt80"
|
||||
<div class="absolute bg-size-cover bg-no-repeat left-0 top-0 bottom-0 right-0 pt80"
|
||||
:style="'background-image: url('+bg+');'">
|
||||
<div class="card-module">
|
||||
<div class="inner30">
|
||||
<div class="pt40 pb40">
|
||||
<h3 class="font-42">欢迎来到好店云</h3>
|
||||
<p class="font-26 mt20">好店云私域活动系统</p>
|
||||
<h3 class="font-42">欢迎使用</h3>
|
||||
<p class="font-26 mt20">好店云私域营销系统</p>
|
||||
</div>
|
||||
<div class="pt100">
|
||||
<ul>
|
||||
<a href="/h5/market/sylive2/biz">
|
||||
<li class="bg-f9 inner30 ulib-r20 fn-flex fn-flex-middle mb30">
|
||||
<i class="d-icon-1 inline-block"></i><h5 class="ml20 mr10 font-32">私域直播</h5><i
|
||||
class="d-icon-3"></i>
|
||||
<i class="d-icon-1 inline-block"></i><h5 class="ml20 mr10 font-32">私域直播</h5>
|
||||
<!--i class="d-icon-3"></i-->
|
||||
</li>
|
||||
</a>
|
||||
<a href="/h5/market/sylive2/biz?type=1">
|
||||
<li class="bg-f9 inner30 ulib-r20 fn-flex fn-flex-middle mb30">
|
||||
<i class="d-icon-2 inline-block"></i><h5 class="ml20 mr10 font-32">营销专题</h5><i
|
||||
class="d-icon-4"></i>
|
||||
<i class="d-icon-2 inline-block"></i><h5 class="ml20 mr10 font-32">营销专题</h5>
|
||||
<i class="d-icon-4"></i>
|
||||
</li>
|
||||
</a>
|
||||
</ul>
|
||||
|
||||
@@ -7,22 +7,42 @@
|
||||
<div class="fn-flex fn-flex-between fn-flex-middle ulib-rb30 bg-fff pl30 pr30 pt20 pb20">
|
||||
<div class="font-26"><span class="ml5"></span></div>
|
||||
<a class="fn-flex" href="/h5/market/sylive2/biz/applists">
|
||||
<van-tag color="#1a1a1a" round class="ml20">
|
||||
<span class="ulib-r750 inline-block pt5 pb5 pl10 pr10 font-24 bg-000 color-fff"><i class="iconfont icon-refresh"></i>切换应用</span>
|
||||
<!--van-tag color="#1a1a1a" round class="ml20">
|
||||
<van-icon name="replay" class="mr5"></van-icon>
|
||||
切换应用
|
||||
</van-tag>
|
||||
</van-tag-->
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</header>
|
||||
<div class="container">
|
||||
<div class="inner30 pt0">
|
||||
<!--
|
||||
<a class="block mt30 pb30 bg-fff overflowhidden box-shadow-lightGray ulib-r20" :href="item.url"
|
||||
v-for="(item,index) in list">
|
||||
<img class="imgsize-690X310" :src="item.img" alt="#">
|
||||
<div class="mt20 pl30 pr30 font-30 color-333">{{item.title}}</div>
|
||||
<div class="mt10 pl30 pr30 font-24 color-999">{{item.time}}</div>
|
||||
</a>
|
||||
-->
|
||||
<a v-for="(item,index) in list" :key="index" class="overflowhidden ulib-r20 bg-fff mb30 box-shadow-lightGray" :href="item.url">
|
||||
<van-image :src="item.img"></van-image>
|
||||
<div class="inner30 fn-flex fn-flex-between">
|
||||
<div class="wp70">
|
||||
<h4 class="font-28 text-nowrap">{{item.title}}</h4>
|
||||
<p class="font-22 color-999 mt20">{{item.time}}</p>
|
||||
</div>
|
||||
<div class="font-24 text-right">
|
||||
<span class="block text-nowrap mt10 pr10 pb10" v-if="item.userCount">
|
||||
<van-icon name="eye-o"></van-icon> 浏览 {{item.userCount}}
|
||||
</span>
|
||||
<span class="ulib-r750 bg-f8e26a inline-block pt5 pb5 pl10 pr10" v-if="item.lzCount">
|
||||
<van-icon name="gold-coin-o"></van-icon> 留资 {{item.lzCount}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<mugen-scroll :handler="fetchData" :should-handle="!loading" scroll-container="app">
|
||||
<div class="pt100 pb100 text-center color-ccc" v-if="isNoData"><span
|
||||
class="text-middle font-22">暂无数据</span></div>
|
||||
@@ -35,14 +55,14 @@
|
||||
</mugen-scroll>
|
||||
</div>
|
||||
</div>
|
||||
<aside class="fixed right-0 bottom-0 mr30 mb100 z-index-10" v-if="isBiz">
|
||||
<aside class="fixed right-0 bottom-0 mr30 mb100 z-index-10">
|
||||
<ul>
|
||||
<a href="/h5/market/sylive2/user/enroll">
|
||||
<li class="mt20" v-if="type==1">
|
||||
<a href="/h5/market/sylive2/user/enroll" v-if="type===1">
|
||||
<li class="mt20">
|
||||
<i class="inline-block d-icon-5"></i>
|
||||
</li>
|
||||
</a>
|
||||
<a href="/h5/market/sylive2/user">
|
||||
<a href="/h5/market/sylive2/user?type=<?=$type?>" v-if="isBiz">
|
||||
<li class="mt20">
|
||||
<i class="inline-block d-icon-6"></i>
|
||||
</li>
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
<link rel="stylesheet" href="/css/h5/market/sytopic/h5.css?20230225">
|
||||
<body>
|
||||
<div id="app" style="min-height: 100vh;" class="bg-f6 relative">
|
||||
|
||||
<!-- 列表 -->
|
||||
<div class="relative pb30">
|
||||
<van-tabs v-model="active" sticky color="#000">
|
||||
<van-tabs v-model="active" sticky color="#000" @click="onChange">
|
||||
<van-tab v-for="(item,index) in tab_list" :title="item.title"></van-tab>
|
||||
</van-tabs>
|
||||
<div class="list">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
finished-text="没有更多了"
|
||||
@load="onLoad"
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
finished-text="没有更多了"
|
||||
:error.sync="error"
|
||||
error-text="请求失败,点击重新加载"
|
||||
@load="onLoad"
|
||||
>
|
||||
<div v-for="(item,index) in list" class="card-module overflowhidden">
|
||||
<h3 class="font-32">{{item.name}} {{item.phone}}</h3>
|
||||
@@ -37,94 +38,74 @@
|
||||
tab_list: [{
|
||||
title: '全部',
|
||||
id: 1,
|
||||
type: 1
|
||||
type: 0
|
||||
}, {
|
||||
title: '待确认',
|
||||
id: 2,
|
||||
type: 2
|
||||
type: 0
|
||||
}, {
|
||||
title: '已确认',
|
||||
id: 3,
|
||||
type: 3
|
||||
type: 1
|
||||
}, {
|
||||
title: '无效',
|
||||
id: 4,
|
||||
type: 4
|
||||
type: 2
|
||||
}],
|
||||
active: 0,
|
||||
list: [{
|
||||
name: '林先生',
|
||||
phone: '134****0000',
|
||||
time: '2024.06.08 18:00',
|
||||
source: [
|
||||
{name: '白城车展', class: 'bg-f8e26a'},
|
||||
{name: '团队带客·校长', class: 'bg-f7'},
|
||||
{name: '自然客', class: 'bg-2fdc53'}
|
||||
],
|
||||
status: {
|
||||
name: '待确认',
|
||||
class: 'bg-f8e26a'
|
||||
// name: '已确认',
|
||||
// class: 'bg-2fdc53'
|
||||
// name: '待确认',
|
||||
// class: 'bg-f7'
|
||||
}
|
||||
}, {
|
||||
name: '林先生',
|
||||
phone: '134****0000',
|
||||
time: '2024.06.08 18:00',
|
||||
source: [
|
||||
{name: '白城车展', class: 'bg-f8e26a'},
|
||||
{name: '团队带客·校长', class: 'bg-f7'},
|
||||
{name: '自然客', class: 'bg-2fdc53'}
|
||||
],
|
||||
status: {
|
||||
// name: '待确认',
|
||||
// class: 'bg-f8e26a'
|
||||
// name: '已确认',
|
||||
// class: 'bg-2fdc53'
|
||||
name: '无效单',
|
||||
class: 'bg-f7'
|
||||
}
|
||||
}, {
|
||||
name: '林先生',
|
||||
phone: '134****0000',
|
||||
time: '2024.06.08 18:00',
|
||||
source: [
|
||||
{name: '白城车展', class: 'bg-f8e26a'},
|
||||
{name: '团队带客·校长', class: 'bg-f7'},
|
||||
{name: '自然客', class: 'bg-2fdc53'}
|
||||
],
|
||||
status: {
|
||||
// name: '待确认',
|
||||
// class: 'bg-f8e26a'
|
||||
name: '已确认',
|
||||
class: 'bg-2fdc53'
|
||||
// name: '待确认',
|
||||
// class: 'bg-f7'
|
||||
}
|
||||
}],
|
||||
list: [],
|
||||
loading: false,
|
||||
finished: false,
|
||||
page: 1,
|
||||
error: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onChange() {
|
||||
this.page = 1
|
||||
this.list = []
|
||||
this.onLoad()
|
||||
},
|
||||
onLoad() {
|
||||
let that = this
|
||||
let type = ''
|
||||
if (that.active) {
|
||||
type = that.tab_list[that.active].type
|
||||
}
|
||||
//请求接口
|
||||
$.get('/h5/market/sylive2/user/enLists', {page: that.page, status: type}, function (res) {
|
||||
that.loading = false;
|
||||
if (res.code == 200) {
|
||||
that.page = that.page + 1
|
||||
that.list = that.list.concat(res.data.list);
|
||||
if (that.list.length >= res.data.total) {
|
||||
that.finished = true;
|
||||
}
|
||||
} else {
|
||||
that.error = true;
|
||||
msgDia = mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: res.msg
|
||||
});
|
||||
}
|
||||
|
||||
}, 'json');
|
||||
// 异步更新数据
|
||||
// setTimeout 仅做示例,真实场景中一般为 ajax 请求
|
||||
setTimeout(() => {
|
||||
for (let i = 0; i < 10; i++) {
|
||||
this.list.push(this.list.length + 1);
|
||||
}
|
||||
|
||||
// 加载状态结束
|
||||
this.loading = false;
|
||||
|
||||
// 数据全部加载完成
|
||||
if (this.list.length >= 40) {
|
||||
this.finished = true;
|
||||
}
|
||||
}, 1000);
|
||||
// setTimeout(() => {
|
||||
// for (let i = 0; i < 10; i++) {
|
||||
// this.list.push(this.list.length + 1);
|
||||
// }
|
||||
//
|
||||
// // 加载状态结束
|
||||
// this.loading = false;
|
||||
//
|
||||
// // 数据全部加载完成
|
||||
// if (this.list.length >= 40) {
|
||||
// this.finished = true;
|
||||
// }
|
||||
// }, 1000);
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
<div class="absolute box-middle right-0 mr30 space-nowrap font-26">
|
||||
<a class="text-middle" href="javascript:void(0);" v-if="!item.wxuname" @click="showForm(index)">修改</a>
|
||||
|
||||
<? if($is_manager){ ?>
|
||||
<span class="text-middle font-22 pl5 pr5" v-if="!item.wxuname">|</span>
|
||||
<a class="text-middle" href="javascript:void(0);" @click="showDel(index)" >删除</a>
|
||||
<span class="text-middle font-22 pl5 pr5">|</span>
|
||||
@@ -41,7 +41,7 @@
|
||||
@click=showAble(index)>启用</a>
|
||||
<a class="text-middle color-ffa85a" href="javascript:void(0);" v-else-if="item.status==0"
|
||||
@click=showAble(index)>禁用</a>
|
||||
|
||||
<? }?>
|
||||
</div>
|
||||
</div>
|
||||
<!--end活动列表-->
|
||||
@@ -65,7 +65,7 @@
|
||||
<a class="block bg-1a1a1a pt25 pb25 text-center font-36 color-fff ulib-r10" @click="showForm(-1)"
|
||||
href="javascript:void(0)">新增顾问</a>
|
||||
</div>
|
||||
<a class="bottom-opt pt15 bg-1a1a1a ulib-r750 text-center color-fff" href="/h5/market/sylive2/biz">
|
||||
<a class="bottom-opt pt15 bg-1a1a1a ulib-r750 text-center color-fff" href="/h5/market/sylive2/biz?type=<?=$type?>">
|
||||
<i class="iconfont icon-shouye text-middle font-36"></i>
|
||||
<div class="font-22">首页</div>
|
||||
</a>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<link rel="stylesheet" href="/css/h5/market/sytopic/h5.css?20230225">
|
||||
<link rel="stylesheet" href="/css/h5/market/sytopic/h5.css?2024111">
|
||||
<body>
|
||||
<div id="app" style="min-height: 100vh;" class="bg-f6 relative">
|
||||
|
||||
<header class="absolute left-0 top-0 right-0 z-index-1">
|
||||
<style>.wp31{width: 31%;box-sizing:border-box;}</style>
|
||||
<div id="app" style="min-height: 100vh;background-color:<?= $info['bgColor'] ?: '#f6f6f6' ?>" class="relative">
|
||||
<header v-if="0" class="absolute left-0 top-0 right-0 z-index-1">
|
||||
<div class="fn-flex fn-flex-between fn-flex-middle ulib-rb30 bg-fff pl30 pr30 pt20 pb20">
|
||||
<a href="/h5/market/sylive2/biz?type=1" v-if="info.isAdmin">
|
||||
<div class="font-26"><i class="iconfont icon-tuichu"></i><span class="ml5">返回</span></div>
|
||||
@@ -21,12 +21,40 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="fixed right-0 top-0 z-index-1 mt100">
|
||||
<ul class="font-24 color-fff">
|
||||
<!--
|
||||
<li class="bg-000-op50 inner10 mb15 ulib-rl750">
|
||||
<i class="iconfont icon-tuichu"></i><span class="ml10">退出</span>
|
||||
</li>
|
||||
<li class="bg-000-op50 inner10 mb15 ulib-rl750">
|
||||
<a class="" href="/h5/market/sylive2/biz?type=1" class="color-fff" v-if="info.isAdmin">
|
||||
<van-icon name="revoke"></van-icon>
|
||||
<span class="ml10">返回</span>
|
||||
</a>
|
||||
</li>
|
||||
-->
|
||||
<!--
|
||||
<li class="bg-000-op50 inner10 mb15 ulib-rl750"><a href="/h5/market/sytopic/ucenter?skey=<?= $skey ?>" class="color-fff"><van-icon name="gem-o"></van-icon><span class="ml10">权益</span></a></li>
|
||||
-->
|
||||
<li class="bg-000-op50 inner10 mb15 ulib-rl750" v-if="info.isAdmin">
|
||||
<a href="/h5/market/sylive2/biz?type=1" class="color-fff">
|
||||
<van-icon name="replay"></van-icon>
|
||||
<span class="ml10">切换</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="bg-000-op50 inner10 mb15 ulib-rl750" v-if="info.isAdmin">
|
||||
<a href="/h5/market/sytopic/welcome/share?skey=<?= $skey ?>" class="color-fff">
|
||||
<i class="iconfont icon-fenxiang"></i><span class="ml10">分享</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 头图模块 -->
|
||||
<div style="margin-bottom: -7vw;" v-if="info && info.banner">
|
||||
<van-image :src="info.banner"></van-image>
|
||||
</div>
|
||||
<template v-for="(item,k) in modules" v-if="modules">
|
||||
<!-- 头图模块 -->
|
||||
<div style="margin-bottom: -7vw;" v-if="item.type && item.type==1 && item.lists && item.lists.length>0">
|
||||
<van-image :src="item.lists[0]['banner']"></van-image>
|
||||
</div>
|
||||
|
||||
<!-- 报名模块 - 大图轮播 -->
|
||||
<div class="card-module" v-if="item.type && item.type==2 && item.lists && item.lists.length>0">
|
||||
<div class="absolute left-0 top-0 right-0" style="margin-top: -10vw;">
|
||||
@@ -38,7 +66,7 @@
|
||||
:autoplay="3000"
|
||||
:show-indicators="false"
|
||||
>
|
||||
<van-swipe-item>
|
||||
<van-swipe-item v-if="0">
|
||||
<span class="font-24 bg-000-op50 ulib-r750 pt5 pb5 pl15 pr15 inline-block">
|
||||
<van-icon name="point-gift" class="mr5"></van-icon>张三1领取了51000元大礼包
|
||||
</span>
|
||||
@@ -69,8 +97,9 @@
|
||||
</div>
|
||||
<div class="fn-flex fn-flex-wrap fn-flex-between"
|
||||
v-if="val.otherImg && val.otherImg.length>0">
|
||||
<div class="wp48 mb15" v-for="val1 in val.otherImg">
|
||||
<van-image :src="val1"></van-image>
|
||||
<!-- 一行一图wp100 一行两图wp48 一行三图wp31 -->
|
||||
<div :class="[val.otherImg.length==1?'wp100':val.otherImg.length==2?'wp48':'wp31','mb15']" v-for="val1 in val.otherImg">
|
||||
<van-image class="wp100" :src="val1"></van-image>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pt20" v-if="val.showBtn">
|
||||
@@ -184,10 +213,20 @@
|
||||
|
||||
<aside class="fixed right-0 bottom-0 mr30 mb100 z-index-10">
|
||||
<ul>
|
||||
<li class="mt20">
|
||||
<span @click="showEnroll(item.type,val,1)"><i class="inline-block d-icon-7"></i></span>
|
||||
</li>
|
||||
<li class="mt20" v-if="val.showBtn">
|
||||
<div class="imgsize-120X120 relative" @click="showEnroll(item.type,val,1)">
|
||||
<van-image
|
||||
style="border: 0.6vw solid #ff3c3a;"
|
||||
width="16vw"
|
||||
height="16vw"
|
||||
fit="cover"
|
||||
round
|
||||
:src="info.channelHeadImg"
|
||||
></van-image>
|
||||
<i class="absolute left-0 right-0 bottom-0 mb5 d-icon-9"></i>
|
||||
</div>
|
||||
</li>
|
||||
<li class="mt20">
|
||||
<span @click="showEnroll(item.type,val)"><i class="inline-block d-icon-8"></i></span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -235,7 +274,9 @@
|
||||
<div class="bg-f1 ulib-r20 mb30">
|
||||
<van-field v-model="form.code" label="" placeholder="请输入手机验证码">
|
||||
<template #button>
|
||||
<p class="color-666 font-26" @click="getCode">发送验证码</p>
|
||||
<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>
|
||||
@@ -280,7 +321,9 @@
|
||||
<div class="bg-f1 ulib-r20 mb30">
|
||||
<van-field v-model="form.code" label="" placeholder="请输入手机验证码">
|
||||
<template #button>
|
||||
<p class="color-666 font-26" @click="getCode">发送验证码</p>
|
||||
<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>
|
||||
@@ -318,7 +361,9 @@
|
||||
subTitle: ''
|
||||
},
|
||||
isSubmiting: false,
|
||||
optionId: 0
|
||||
optionId: 0,
|
||||
counttime: 60000,
|
||||
show_retry: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -352,6 +397,8 @@
|
||||
return false
|
||||
}
|
||||
this.isSubmiting = true
|
||||
this.show_retry = true
|
||||
this.counttime = 60000
|
||||
var that = this;
|
||||
$.post('/h5/market/sytopic/welcome/get_code', {
|
||||
'mobile': this.form.phone,
|
||||
@@ -365,6 +412,9 @@
|
||||
});
|
||||
}, 'json');
|
||||
},
|
||||
retrySend() {
|
||||
this.show_retry = false
|
||||
},
|
||||
enroll() {
|
||||
if (this.isSubmiting) {
|
||||
return false
|
||||
|
||||
@@ -134,7 +134,16 @@ class Module extends BaseController
|
||||
public function types_get()
|
||||
{
|
||||
$mSModule = new Market_sytopic_module_model();
|
||||
$data = ['list' => $mSModule::TYPE_ARRAY];
|
||||
$list = [];
|
||||
if ($mSModule::TYPE_ARRAY) {
|
||||
foreach ($mSModule::TYPE_ARRAY as $key => $item) {
|
||||
$list[] = [
|
||||
'key' => $key,
|
||||
'value' => $item
|
||||
];
|
||||
}
|
||||
}
|
||||
$data = ['list' => $list];
|
||||
$this->return_response_list($data);
|
||||
}
|
||||
|
||||
@@ -206,6 +215,7 @@ class Module extends BaseController
|
||||
}
|
||||
$this->return_response();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改状态
|
||||
*/
|
||||
|
||||
@@ -8,6 +8,7 @@ class Topic extends BaseController
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->model('market/Market_sytopic_model', 'mSytopic');
|
||||
$this->load->library('MyEncryption');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -44,6 +45,8 @@ class Topic extends BaseController
|
||||
$res = $this->mSytopic->select($where, $sort_order, $page, $limit);
|
||||
foreach ($res as $v) {
|
||||
$shareImg = $sharePhoto = $banner = [];
|
||||
$jsonData = json_decode($v['jsondata'], true);
|
||||
$jsonData['bg_color'] = $jsonData['bg_color'] ?: '';
|
||||
if ($v['banner']) {
|
||||
$banner = [['uid' => 1, 'fileUrl' => $v['banner'], 'url' => build_qiniu_image_url($v['banner']), 'status' => 'done']];
|
||||
}
|
||||
@@ -56,6 +59,11 @@ class Topic extends BaseController
|
||||
$shareImg[] = ['uid' => $k2, 'fileUrl' => $v2, 'url' => build_qiniu_image_url($v2), 'status' => 'done'];
|
||||
}
|
||||
}
|
||||
if($jsonData['banner']){
|
||||
$jsonData['banner'] = [['uid' => 1, 'fileUrl' => $jsonData['banner'], 'url' => build_qiniu_image_url($jsonData['banner']), 'status' => 'done']];
|
||||
}else{
|
||||
$jsonData['banner'] = [];
|
||||
}
|
||||
$v['status'] = intval($v['status']);
|
||||
$v['sharePhoto'] = $sharePhoto;
|
||||
$v['banner'] = $banner;
|
||||
@@ -63,6 +71,7 @@ class Topic extends BaseController
|
||||
$v['organizationId'] = intval($v['organizationId']);
|
||||
$v['dateRange'] = $v['timeStart'] ? [$v['timeStart'], $v['timeEnd']] : [];
|
||||
$v['shareTitle'] = $v['shareTitle'] ? json_decode($v['shareTitle'], true) : [];
|
||||
$v['json'] = $jsonData;
|
||||
$list[] = $v;
|
||||
}
|
||||
}
|
||||
@@ -70,6 +79,18 @@ class Topic extends BaseController
|
||||
$this->return_response_list($date);
|
||||
}
|
||||
|
||||
public function detail_get()
|
||||
{
|
||||
$id = $this->input_param('id');
|
||||
$res = $this->mSytopic->get(['id' => $id]);
|
||||
if (!$res) {
|
||||
$this->return_json('参数错误');
|
||||
}
|
||||
$skey = $this->myencryption->base64url_encode("a_id=" . $res['id']);
|
||||
$date = ['url' => http_host_com('home') . "/h5/market/sylive2?skey=" . $skey];
|
||||
$this->return_response_list($date);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加专题
|
||||
*/
|
||||
@@ -83,6 +104,7 @@ class Topic extends BaseController
|
||||
$organizationId = intval($this->input_param('organizationId'));
|
||||
$banner = $this->input_param('banner');
|
||||
$introduction = $this->input_param('introduction');
|
||||
$jsonData = $this->input_param('json');
|
||||
if (!$title) {
|
||||
$this->return_json('请输入活动标题');
|
||||
}
|
||||
@@ -102,22 +124,22 @@ class Topic extends BaseController
|
||||
}
|
||||
$setShareImg = json_encode($setShareImg, JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
$setJsonData = [];
|
||||
if ($jsonData['banner']) {
|
||||
$setJsonData['banner'] = $jsonData['banner'] ? $jsonData['banner'][0]['fileUrl'] : '';
|
||||
} else {
|
||||
$setJsonData['banner'] = '';
|
||||
}
|
||||
$setJsonData['bg_color'] = $jsonData['bg_color'] ?: '';
|
||||
$createTime = date('Y-m-d H:i:s');
|
||||
$addData = ['title' => $title, 'banner' => $banner, 'status' => 1, 'createTime' => $createTime, 'organizationId' => $organizationId,
|
||||
'sharePhoto' => $sharePhoto, 'shareTitle' => $shareTitle, 'timeStart' => $dateRange[0], 'timeEnd' => $dateRange[1]];
|
||||
'sharePhoto' => $sharePhoto, 'shareTitle' => $shareTitle, 'timeStart' => $dateRange[0], 'timeEnd' => $dateRange[1], 'jsondata' => json_encode($setJsonData, JSON_UNESCAPED_UNICODE)];
|
||||
$setShareImg && $addData['shareImg'] = $setShareImg;
|
||||
$addData['introduction'] = $introduction ?: '';
|
||||
$topicId = $this->mSytopic->add($addData);
|
||||
if (!$topicId) {
|
||||
$this->return_json('添加专题失败');
|
||||
}
|
||||
// if ($organizationId) {
|
||||
// $re = $this->mdSyliveOrganization->get(['organizationId' => $organizationId, 'status' => 0]);
|
||||
// if ($re['organizationName']) {//加顶级分组
|
||||
// $this->mdSyliveGroups->add(['groupsName' => $re['organizationName'], 'activityId' => $activityId,
|
||||
// 'statisticsType' => 4, 'createTime' => $createTime]);
|
||||
// }
|
||||
// }
|
||||
$this->return_response();
|
||||
}
|
||||
|
||||
@@ -135,6 +157,7 @@ class Topic extends BaseController
|
||||
$organizationId = intval($this->input_param('organizationId'));
|
||||
$banner = $this->input_param('banner');
|
||||
$introduction = $this->input_param('introduction');
|
||||
$jsonData = $this->input_param('json');
|
||||
if (!$title) {
|
||||
$this->return_json('请输入活动标题');
|
||||
}
|
||||
@@ -154,8 +177,15 @@ class Topic extends BaseController
|
||||
}
|
||||
$setShareImg = json_encode($setShareImg, JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
$addData = ['title' => $title, 'banner' => $banner, 'status' => 1, 'organizationId' => $organizationId,
|
||||
'sharePhoto' => $sharePhoto, 'shareTitle' => $shareTitle, 'timeStart' => $dateRange[0], 'timeEnd' => $dateRange[1]];
|
||||
$setJsonData = [];
|
||||
if ($jsonData['banner']) {
|
||||
$setJsonData['banner'] = $jsonData['banner'] ? $jsonData['banner'][0]['fileUrl'] : '';
|
||||
} else {
|
||||
$setJsonData['banner'] = '';
|
||||
}
|
||||
$setJsonData['bg_color'] = $jsonData['bg_color'] ?: '';
|
||||
$addData = ['title' => $title, 'banner' => $banner, 'status' => 1, 'organizationId' => $organizationId, 'sharePhoto' => $sharePhoto,
|
||||
'shareTitle' => $shareTitle, 'timeStart' => $dateRange[0], 'timeEnd' => $dateRange[1], 'jsondata' => json_encode($setJsonData, JSON_UNESCAPED_UNICODE)];
|
||||
$setShareImg && $addData['shareImg'] = $setShareImg;
|
||||
$addData['introduction'] = $introduction ?: '';
|
||||
$topicId = $this->mSytopic->update($addData, ['id' => $id]);
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user