Browse Source

部署到git

master
wanghongjun 2 years ago
parent
commit
cd8c81b9a1
  1. 52
      addons/weliam_smartcity/web/controller/agentset/agentSetAccount.ctrl.php
  2. 82
      addons/weliam_smartcity/web/controller/agentset/agentSetCommunity.ctrl.php
  3. 121
      addons/weliam_smartcity/web/controller/agentset/agentSetStaff.ctrl.php
  4. 84
      addons/weliam_smartcity/web/controller/agentset/agentSetTags.ctrl.php
  5. 110
      addons/weliam_smartcity/web/controller/agentset/diyForm.ctrl.php
  6. 49
      addons/weliam_smartcity/web/controller/agentset/userset.ctrl.php
  7. 77
      addons/weliam_smartcity/web/controller/dashboard/adv.ctrl.php
  8. 70
      addons/weliam_smartcity/web/controller/dashboard/banner.ctrl.php
  9. 259
      addons/weliam_smartcity/web/controller/dashboard/category.ctrl.php
  10. 36
      addons/weliam_smartcity/web/controller/dashboard/cube.ctrl.php
  11. 42
      addons/weliam_smartcity/web/controller/dashboard/dashboard.ctrl.php
  12. 84
      addons/weliam_smartcity/web/controller/dashboard/foot.ctrl.php
  13. 70
      addons/weliam_smartcity/web/controller/dashboard/nav.ctrl.php
  14. 98
      addons/weliam_smartcity/web/controller/dashboard/notice.ctrl.php
  15. 49
      addons/weliam_smartcity/web/controller/dashboard/pagelinks.ctrl.php
  16. 20
      addons/weliam_smartcity/web/controller/dashboard/plugin.ctrl.php
  17. 78
      addons/weliam_smartcity/web/controller/dashboard/ruleCenter.ctrl.php
  18. 12
      addons/weliam_smartcity/web/controller/dashboard/sort.ctrl.php
  19. 643
      addons/weliam_smartcity/web/controller/diy/diy.ctrl.php
  20. 169
      addons/weliam_smartcity/web/controller/finace/finaceWithdrawal.ctrl.php
  21. 389
      addons/weliam_smartcity/web/controller/finace/wlCash.ctrl.php
  22. 216
      addons/weliam_smartcity/web/controller/goodshouse/category.ctrl.php
  23. 1113
      addons/weliam_smartcity/web/controller/goodshouse/goodshouse.ctrl.php
  24. 129
      addons/weliam_smartcity/web/controller/store/category.ctrl.php
  25. 55
      addons/weliam_smartcity/web/controller/store/comment.ctrl.php
  26. 58
      addons/weliam_smartcity/web/controller/store/group.ctrl.php
  27. 970
      addons/weliam_smartcity/web/controller/store/merchant.ctrl.php
  28. 88
      addons/weliam_smartcity/web/controller/store/register.ctrl.php
  29. 18
      addons/weliam_smartcity/web/controller/store/settled.ctrl.php
  30. 86
      addons/weliam_smartcity/web/controller/store/storeApply.ctrl.php
  31. 100
      addons/weliam_smartcity/web/controller/store/storeCertified.ctrl.php
  32. 185
      addons/weliam_smartcity/web/controller/store/storeComment.ctrl.php
  33. 191
      addons/weliam_smartcity/web/controller/store/storeDynamic.ctrl.php
  34. 94
      addons/weliam_smartcity/web/controller/store/storeSetMeal.ctrl.php
  35. 207
      addons/weliam_smartcity/web/controller/user/login.ctrl.php
  36. 153
      addons/weliam_smartcity/web/controller/user/storelogin.ctrl.php
  37. 372
      addons/weliam_smartcity/web/controller/utility/attachment.ctrl.php
  38. 21
      addons/weliam_smartcity/web/controller/utility/member.ctrl.php
  39. 21
      addons/weliam_smartcity/web/controller/utility/qrcode.ctrl.php
  40. 721
      addons/weliam_smartcity/web/controller/utility/select.ctrl.php
  41. 6727
      addons/weliam_smartcity/web/resource/address/bootstrap.css
  42. 1
      addons/weliam_smartcity/web/resource/address/bootstrap.min.css
  43. 5832
      addons/weliam_smartcity/web/resource/address/fastadmin.css
  44. 1
      addons/weliam_smartcity/web/resource/address/fastadmin.min.css
  45. 9814
      addons/weliam_smartcity/web/resource/address/jquery.js
  46. 4
      addons/weliam_smartcity/web/resource/address/jquery.min.js
  47. 1
      addons/weliam_smartcity/web/resource/css/bootstrap-table.min.css
  48. 5
      addons/weliam_smartcity/web/resource/css/bootstrap.min.css
  49. 724
      addons/weliam_smartcity/web/resource/css/common_v2.css
  50. 104
      addons/weliam_smartcity/web/resource/css/select2.min.css
  51. 1227
      addons/weliam_smartcity/web/resource/css/style.min.css
  52. 55
      addons/weliam_smartcity/web/resource/css/utility.css
  53. 598
      addons/weliam_smartcity/web/resource/diyForm/edit.css
  54. BIN
      addons/weliam_smartcity/web/resource/diyForm/img/checkbox.png
  55. BIN
      addons/weliam_smartcity/web/resource/diyForm/img/city.png
  56. BIN
      addons/weliam_smartcity/web/resource/diyForm/img/datetime.png
  57. BIN
      addons/weliam_smartcity/web/resource/diyForm/img/img.png
  58. BIN
      addons/weliam_smartcity/web/resource/diyForm/img/select.png
  59. BIN
      addons/weliam_smartcity/web/resource/diyForm/img/text.png
  60. BIN
      addons/weliam_smartcity/web/resource/diyForm/img/textarea.png
  61. BIN
      addons/weliam_smartcity/web/resource/diyForm/img/time.png
  62. 10
      addons/weliam_smartcity/web/resource/download/activationcode.csv
  63. 1
      addons/weliam_smartcity/web/resource/download/aliarea.json
  64. 2
      addons/weliam_smartcity/web/resource/download/checkcodelist.csv
  65. 2
      addons/weliam_smartcity/web/resource/download/deliveryActivity.csv
  66. 1
      addons/weliam_smartcity/web/resource/download/locations.json
  67. BIN
      addons/weliam_smartcity/web/resource/download/members.xlsx
  68. 2
      addons/weliam_smartcity/web/resource/download/mobilelist.csv
  69. 4703
      addons/weliam_smartcity/web/resource/download/robotnickname.csv
  70. BIN
      addons/weliam_smartcity/web/resource/fonts/pingfang.ttf
  71. 88
      addons/weliam_smartcity/web/resource/goods/css/list.css
  72. 156
      addons/weliam_smartcity/web/resource/goods/js/category.js
  73. 255
      addons/weliam_smartcity/web/resource/goods/js/list.js
  74. BIN
      addons/weliam_smartcity/web/resource/image/bg_repno.gif
  75. BIN
      addons/weliam_smartcity/web/resource/image/card.png
  76. BIN
      addons/weliam_smartcity/web/resource/image/cube/1.png
  77. BIN
      addons/weliam_smartcity/web/resource/image/cube/2.png
  78. BIN
      addons/weliam_smartcity/web/resource/image/cube/3.png
  79. BIN
      addons/weliam_smartcity/web/resource/image/cube/4.png
  80. BIN
      addons/weliam_smartcity/web/resource/image/cube/5.png
  81. BIN
      addons/weliam_smartcity/web/resource/image/cube/6.png
  82. BIN
      addons/weliam_smartcity/web/resource/images/chenggong.png
  83. BIN
      addons/weliam_smartcity/web/resource/images/dating_dynamic.png
  84. BIN
      addons/weliam_smartcity/web/resource/images/dating_home.png
  85. BIN
      addons/weliam_smartcity/web/resource/images/dating_matchmaker.png
  86. BIN
      addons/weliam_smartcity/web/resource/images/dating_video.png
  87. BIN
      addons/weliam_smartcity/web/resource/images/default.png
  88. BIN
      addons/weliam_smartcity/web/resource/images/default_adv.png
  89. BIN
      addons/weliam_smartcity/web/resource/images/festival_redpack.png
  90. BIN
      addons/weliam_smartcity/web/resource/images/festival_redpack_2.png
  91. BIN
      addons/weliam_smartcity/web/resource/images/festival_redpack_3.png
  92. BIN
      addons/weliam_smartcity/web/resource/images/festival_redpack_4.png
  93. BIN
      addons/weliam_smartcity/web/resource/images/festival_redpack_5.png
  94. BIN
      addons/weliam_smartcity/web/resource/images/festival_redpack_6.png
  95. BIN
      addons/weliam_smartcity/web/resource/images/gengxin.png
  96. BIN
      addons/weliam_smartcity/web/resource/images/icon_popup3696b4.png
  97. BIN
      addons/weliam_smartcity/web/resource/images/loading.gif
  98. BIN
      addons/weliam_smartcity/web/resource/images/new_redpack.png
  99. BIN
      addons/weliam_smartcity/web/resource/images/nopic-small.jpg
  100. BIN
      addons/weliam_smartcity/web/resource/images/nopic.jpg

52
addons/weliam_smartcity/web/controller/agentset/agentSetAccount.ctrl.php

@ -0,0 +1,52 @@
<?php
defined('IN_IA') or exit('Access Denied');
/**
* Comment: 账号管理
* Author: zzw
* Date: 2021/1/8 10:04
* Class Userset_WeliamController
*/
class AgentSetAccount_WeliamController{
//代理商账号管理
public function profile()
{
global $_W , $_GPC;
$user = pdo_get(PDO_NAME . 'agentusers' , ['uniacid' => $_W['uniacid'] , 'id' => $_W['aid']]);
if (checksubmit('submit')) {
if (empty($_GPC['pw']) || empty($_GPC['pw2'])) {
wl_message('密码不能为空,请重新填写!' , 'referer' , 'error');
}
if ($_GPC['pw'] == $_GPC['pw2']) {
wl_message('新密码与原密码一致,请检查!' , 'referer' , 'error');
}
$password_old = Util::encryptedPassword($_GPC['pw'] , $user['salt']);
if ($user['password'] != $password_old) {
wl_message('原密码错误,请重新填写!' , 'referer' , 'error');
}
$result = '';
$members = ['password' => Util::encryptedPassword($_GPC['pw2'] , $user['salt'])];
$result = pdo_update(PDO_NAME . 'agentusers' , $members , ['id' => $_W['aid']]);
wl_message('修改成功!' , 'referer' , 'success');
}
include wl_template('agentset/profile');
}
//代理商分享信息设置
public function shareSet(){
global $_W,$_GPC;
if (checksubmit('submit')) {
$share = $_GPC['share'];
Setting::agentsetting_save($share, 'share_set');
wl_message('更新设置成功!',referer());
}
//获取设置信息
$settings = Setting::agentsetting_read('share_set');;
include wl_template('agentset/shareSet');
}
}

82
addons/weliam_smartcity/web/controller/agentset/agentSetCommunity.ctrl.php

@ -0,0 +1,82 @@
<?php
defined('IN_IA') or exit('Access Denied');
/**
* Comment: 社群管理
* Author: zzw
* Date: 2021/1/8 10:15
* Class agentSetCommunity_WeliamController
*/
class agentSetCommunity_WeliamController{
//社群列表
function communityList()
{
global $_W , $_GPC;
$pindex = max(1 , intval($_GPC['page']));
$psize = 10;
$where['uniacid'] = $_W['uniacid'];
$where['aid'] = $_W['aid'];
if (!empty($_GPC['keyword'])) {
$keyword = trim($_GPC['keyword']);
$where['communname@'] = trim($keyword);
}
$communityData = Util::getNumData("*" , PDO_NAME . 'community' , $where , 'createtime desc' , $pindex , $psize , 1);
$communitylist = $communityData[0];
$pager = $communityData[1];
$commset = Setting::agentsetting_read('community');
include wl_template('agentset/communityList');
}
//设置为首页社群
function changecomm()
{
global $_W , $_GPC;
$id = $_GPC['id'];
$community = pdo_get('wlmerchant_community' , ['id' => $id]);
Setting::agentsetting_save($community , 'community');
show_json(1);
}
//社群添加
function communityAdd()
{
global $_W , $_GPC;
$id = $_GPC['id'];
$community = pdo_get('wlmerchant_community' , ['id' => $id]);
if ($_W['ispost']) {
$data = $_GPC['community'];
if ($id) {
if ($community['communqrcode'] != $data['communqrcode']) {
$data['media_id'] = '';
$data['media_endtime'] = 0;
}
$res = pdo_update('wlmerchant_community' , $data , ['id' => $id]);
}
else {
$data['uniacid'] = $_W['uniacid'];
$data['aid'] = $_W['aid'];
$data['createtime'] = time();
$res = pdo_insert(PDO_NAME . 'community' , $data);
}
if ($res) {
wl_message('操作成功!' , web_url('agentset/agentSetCommunity/communityList'));
}
else {
wl_message('操作失败,请重试!');
}
}
include wl_template('agentset/communityAdd');
}
//删除社群
function deletecommunity()
{
global $_W , $_GPC;
$id = $_GPC['id'];
$res = pdo_delete('wlmerchant_community' , ['id' => $id]);
if ($res) {
show_json(1);
}
else {
show_json(0 , '删除失败,请重试');
}
}
}

121
addons/weliam_smartcity/web/controller/agentset/agentSetStaff.ctrl.php

@ -0,0 +1,121 @@
<?php
defined('IN_IA') or exit('Access Denied');
/**
* Comment: 员工管理
* Author: zzw
* Date: 2021/1/8 9:57
* Class AgentSetStaff_WeliamController
*/
class AgentSetStaff_WeliamController{
//员工列表
public function adminset(){
global $_W , $_GPC;
//校验代理入口文件
$cityagent = IA_ROOT . '/web/citysys.php';
$mcityagent = PATH_MODULE . '/web/citysys.php';
if (!file_exists($cityagent) || md5_file($cityagent) != md5_file($mcityagent)) {
copy($mcityagent, $cityagent);
}
//获取员工列表
$pindex = max(1 , intval($_GPC['page']));
$psize = 10;
$datas = Util::getNumData('*' , 'wlmerchant_agentadmin' , [
'uniacid' => $_W['uniacid'] ,
'aid' => $_W['aid']
] , 'id DESC' , $pindex , $psize , 1);
$tags = $datas[0];
$pager = $datas[1];
foreach ($tags as $key => &$value) {
$value['nickname'] = pdo_getcolumn(PDO_NAME . 'member' , ['id' => $value['mid']] , 'nickname');
}
//获取登录地址
if($_W['aid'] > 0) $loginUrl = $_W['siteroot']."web/cityagent.php?p=user&ac=login&do=agent_login&aid={$_W['aid']}";//代理商员工登录
else $loginUrl = $_W['siteroot']."web/citysys.php?p=user&ac=login&do=adminStaffLogin&i={$_W['uniacid']}";//平台员工登录
include wl_template('agentset/adminset');
}
//添加、编辑员工信息
public function adminedit()
{
global $_W , $_GPC;
if (!empty($_GPC['id'])) {
$admin = pdo_get('wlmerchant_agentadmin' , ['id' => $_GPC['id']]);
$admin['nickname'] = pdo_getcolumn(PDO_NAME . 'member' , ['id' => $admin['mid']] , 'nickname');
$jurisdiction = unserialize($admin['jurisdiction']);
$noticeauthority = unserialize($admin['noticeauthority']);
}
if (checksubmit('submit')) {
$admin = [];
$admin['account'] = trim($_GPC['account']);
//判断是否已经有了
$adminid = $_GPC['adminid'] ? $_GPC['adminid'] : 0;
$flag = pdo_fetch("SELECT id FROM " . tablename('wlmerchant_agentadmin') . "WHERE uniacid = {$_W['uniacid']} AND aid = {$_W['aid']} AND account = {$admin['account']} AND id != {$adminid}");
if ($flag) {
wl_message('账户名已被注册' , referer() , 'error');
}
if($adminid > 0){
$flag2 = pdo_fetch("SELECT id FROM " . tablename('wlmerchant_agentadmin') . "WHERE uniacid = {$_W['uniacid']} AND aid = {$_W['aid']} AND mid = {$_GPC['mid']} AND id != {$adminid}");
if ($flag2) {
wl_message('此用户已经是管理员' , referer() , 'error');
}
}
$password = trim($_GPC['password']);
$admin['openid'] = trim($_GPC['openid']);
$admin['mid'] = trim($_GPC['mid']);
$admin['notice'] = intval($_GPC['notice']);
$admin['manage'] = intval($_GPC['manage']);
$admin['jurisdiction'] = serialize($_GPC['jurisdiction']);
$admin['noticeauthority'] = serialize($_GPC['noticeauthority']);
if (empty($_GPC['adminid'])) {
$admin['uniacid'] = $_W['uniacid'];
$admin['aid'] = $_W['aid'];
$admin['createtime'] = time();
$admin['password'] = md5($password);
$res = pdo_insert(PDO_NAME . 'agentadmin' , $admin);
}
else {
$pwd = pdo_getcolumn(PDO_NAME . 'agentadmin' , ['id' => $_GPC['adminid']] , 'password');
if ($password != $pwd) {
//密码已被修改 从新进行加密
$admin['password'] = md5($password);
}
$res = pdo_update('wlmerchant_agentadmin' , $admin , ['id' => $_GPC['adminid']]);
}
if ($res) {
wl_message('保存成功' , web_url('agentset/agentSetStaff/adminset') , 'success');
}
else {
wl_message('保存失败' , referer() , 'error');
}
}
//获取菜单列表
$list = Jurisdiction::menuList();
include wl_template('agentset/adminedit');
}
//修改、删除员工通知权限
public function changeadmin()
{
global $_W , $_GPC;
$id = $_GPC['id'];
$type = $_GPC['type'];
$newvalue = trim($_GPC['value']);
if ($type == 1) {
$res = pdo_update('wlmerchant_agentadmin' , ['notice' => $newvalue] , ['id' => $id]);
}
else if ($type == 2) {
$res = pdo_update('wlmerchant_agentadmin' , ['manage' => $newvalue] , ['id' => $id]);
}
else if ($type == 3) {
$res = pdo_delete('wlmerchant_agentadmin' , ['id' => $id]);
}
if ($res) {
show_json(1 , '修改成功');
}
else {
show_json(0 , '修改失败,请重试');
}
}
}

84
addons/weliam_smartcity/web/controller/agentset/agentSetTags.ctrl.php

@ -0,0 +1,84 @@
<?php
defined('IN_IA') or exit('Access Denied');
/**
* Comment: 标签管理
* Author: zzw
* Date: 2021/1/8 10:21
* Class AgentSetTags_WeliamController
*/
class AgentSetTags_WeliamController{
//标签列表
public function tags()
{
global $_W , $_GPC;
$pindex = max(1 , intval($_GPC['page']));
$psize = 10;
$type = $_GPC['type'] ? $_GPC['type'] : 0;
$datas = Util::getNumData('*' , 'wlmerchant_tags' , [
'uniacid' => $_W['uniacid'] ,
'aid' => $_W['aid'] ,
'type' => $type
] , 'type ASC,sort DESC,id DESC' , $pindex , $psize , 1);
$tags = $datas[0];
$pager = $datas[1];
include wl_template('agentset/tagsindex');
}
//添加、编辑标签信息
public function tagsedit()
{
global $_W , $_GPC;
if (!empty($_GPC['id'])) {
$tag = pdo_get('wlmerchant_tags' , ['id' => $_GPC['id']]);
}
if (checksubmit('submit')) {
$tag = $_GPC['tag'];
$tag['title'] = trim($tag['title']);
$tag['sort'] = intval($tag['sort']);
$tag['enabled'] = intval($_GPC['enabled']);
if (empty($_GPC['tagid'])) {
$tag['uniacid'] = $_W['uniacid'];
$tag['aid'] = $_W['aid'];
$tag['createtime'] = time();
$res = pdo_insert(PDO_NAME . 'tags' , $tag);
}
else {
$res = pdo_update('wlmerchant_tags' , $tag , ['id' => $_GPC['tagid']]);
}
if ($res) {
wl_message('保存成功' , web_url('agentset/agentSetTags/tags') , 'success');
}
else {
wl_message('保存失败' , referer() , 'error');
}
}
include wl_template('agentset/tagsedit');
}
//修改、删除标签信息
public function changeinfo()
{
global $_W , $_GPC;
$id = $_GPC['id'];
$type = $_GPC['type'];
$newvalue = trim($_GPC['value']);
if ($type == 1) {
$res = pdo_update('wlmerchant_tags' , ['title' => $newvalue] , ['id' => $id]);
}
else if ($type == 2) {
$res = pdo_update('wlmerchant_tags' , ['sort' => $newvalue] , ['id' => $id]);
}
else if ($type == 3) {
$res = pdo_update('wlmerchant_tags' , ['enabled' => $newvalue] , ['id' => $id]);
}
else if ($type == 4) {
$res = pdo_delete('wlmerchant_tags' , ['id' => $id]);
}
if ($res) {
show_json(1 , '修改成功');
}
else {
show_json(0 , '修改失败,请重试');
}
}
}

110
addons/weliam_smartcity/web/controller/agentset/diyForm.ctrl.php

@ -0,0 +1,110 @@
<?php
defined('IN_IA') or exit('Access Denied');
/**
* Comment: 自定义表单控制器
* Author: zzw
* Class DiyForm_WeliamController
*/
class DiyForm_WeliamController{
/**
* Comment: 自定义表单列表
* Author: zzw
* Date: 2020/11/19 10:42
*/
public function index(){
global $_W,$_GPC;
//参数获取
$page = max(1 , intval($_GPC['page']));
$pageIndex = 10;
$pageStart = $page * $pageIndex - $pageIndex;
$title = $_GPC['title'] ? : '';//表单名称
//条件生成
$where = " WHERE a.uniacid = {$_W['uniacid']} AND a.aid = {$_W['aid']} ";
if(is_store()) $where .= " AND a.sid = {$_W['storeid']} ";
if($title) $where .= " AND a.title LIKE '%{$title}%'";
//列表信息获取
$field = "a.id,a.title,a.create_time,a.update_time,b.storename";
$sql = "SELECT {$field} FROM ".tablename(PDO_NAME."diyform")
." as a LEFT JOIN ".tablename(PDO_NAME."merchantdata")
." as b ON a.sid = b.id {$where}";
$list = pdo_fetchall($sql." ORDER BY a.update_time DESC,a.create_time DESC limit {$pageStart},{$pageIndex}");
//总数信息获取
$countSql = str_replace($field,"count(*)",$sql);
$total = pdo_fetchcolumn($countSql);
//分页操作
$pager = wl_pagination($total, $page, $pageIndex);
include wl_template('agentset/diy_form/list');
}
/**
* Comment: 添加|编辑 自定义表单
* Author: zzw
* Date: 2020/11/19 10:56
*/
public function edit(){
global $_W,$_GPC;
//参数信息获取
$id = $_GPC['id'] ? : '';
if($_W['aid'] == 0 && p('attestation')){
$attflag = 1;
}else{
$attflag = 0;
}
//添加储存/编辑修改 信息处理
if($_W['ispost']){
//参数信息获取
$data = $_GPC['data'] OR wl_json(0,'请添加组件');
$t_name = [];
foreach($data['list'] as $da){
$t_name[] = $da['data']['title'];
}
if (count($t_name) != count(array_unique($t_name))) {
wl_json(0,'组件请勿设置相同标题');
}
//信息拼装
$params = [
'title' => $data['base']['title'] ? : '自定义表单',
'info' => base64_encode(json_encode($data,JSON_UNESCAPED_UNICODE)),
'update_time' => time()
];
//判断是添加还是修改
if($id > 0){
//修改操作
pdo_update(PDO_NAME."diyform",$params,['id'=>$id]);
}else{
//添加操作
$params['uniacid'] = $_W['uniacid'];
$params['aid'] = $_W['aid'];
$params['create_time'] = time();
if(is_store()) $params['sid'] = $_W['storeid'];
pdo_insert(PDO_NAME."diyform",$params);
}
wl_json(1,$id > 0 ? '编辑成功' : '添加成功');
}
//id存在 编辑信息 获取表单信息
if($id > 0){
$info = pdo_getcolumn(PDO_NAME."diyform",['id'=>$id],'info');
$info = json_decode(base64_decode($info), true);//页面的配置信息
}
include wl_template('agentset/diy_form/edit');
}
/**
* Comment: 删除表单
* Author: zzw
* Date: 2020/11/19 10:58
*/
public function delete(){
global $_W,$_GPC;
//参数信息获取
$id = $_GPC['id'] OR show_json(0, '参数错误,请刷新重试!');
//删除内容
$res = pdo_delete(PDO_NAME."diyform",['id'=>$id]);
if ($res) show_json(1 , '删除成功');
else show_json(0 , '删除失败,请刷新重试');
}
}

49
addons/weliam_smartcity/web/controller/agentset/userset.ctrl.php

@ -0,0 +1,49 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Userset_WeliamController{
/**
* Comment: 个人中心按钮设置
* Author: zzw
* Date: 2020/3/27 14:58
*/
public function userindex()
{
global $_W , $_GPC;
if (checksubmit('submit')) {
$set = $_GPC['set'];
//循环处理数组
foreach ($set as $setK => &$setV) {
if (!array_key_exists('switch' , $setV)) {
$setV['switch'] = 0;
}
}
$res = Setting::wlsetting_save($set , 'userindex');
if ($res) show_json(1);
else show_json(0 , '设置保存失败');
}
$setInfo = User::userSet();
foreach ($setInfo as $index => &$item) {
$item['show_img'] = tomedia($item['image']);
}
$identityList = User::getUserIdentityList();
$keyList = [];
include wl_template('agentset/userindex');
}
/**
* Comment: 代理客服设置
* Author: wlf
* Date: 2020/08/10 10:57
*/
public function agentcustomer()
{
global $_W , $_GPC;
$settings = Setting::agentsetting_read('agentcustomer');
if (checksubmit('submit')) {
$base = Util::trimWithArray($_GPC['customer']);
Setting::agentsetting_save($base , 'agentcustomer');
wl_message('更新设置成功!' , web_url('agentset/userset/agentcustomer'));
}
include wl_template('agentset/customer');
}
}

77
addons/weliam_smartcity/web/controller/dashboard/adv.ctrl.php

@ -0,0 +1,77 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Adv_WeliamController{
/**
* 幻灯片查询
*/
public function index(){
global $_W,$_GPC;
$pindex = max(1, intval($_GPC['page']));
$psize = 10;
$adves = Dashboard::getAllAdv($pindex-1,$psize,'',$_GPC['type'],$_GPC['keyname']);
$advs = $adves['data'];
foreach ($advs as $k => &$val) {
if (!empty($val['cateid'])) {
$val['catename'] = pdo_getcolumn('wlmerchant_groupon_category', array('uniacid' => $_W['uniacid'], 'aid' => $_W['aid'], 'id' => $val['cateid']), 'name');
}
}
$pager = wl_pagination($adves['count'], $pindex, $psize);
include wl_template('dashboard/advIndex');
}
/**
* 编辑幻灯片
*/
public function edit(){
global $_W,$_GPC;
$cateid = intval($_GPC['cateid']);
if(checksubmit('submit')){
$adv = $_GPC['adv'];
$adv['advname'] = trim($adv['advname']);
$adv['displayorder'] = intval($adv['displayorder']);
$adv['enabled'] = intval($_GPC['enabled']);
if(!empty($_GPC['id'])){
if(Dashboard::editAdv($adv,$_GPC['id'])) wl_message('保存成功',web_url('dashboard/adv/index'),'success');
}else{
$adv['cateid'] = $cateid;
if(Dashboard::editAdv($adv)) wl_message('保存成功',web_url('dashboard/adv/index'),'success');
}
wl_message('保存失败',referer(),'error');
}
if(!empty($_GPC['id'])) $adv = Dashboard::getSingleAdv($_GPC['id']);
if (!empty($cateid) && p('groupon')) {
$catename = pdo_getcolumn('wlmerchant_groupon_category', array('uniacid' => $_W['uniacid'], 'aid' => $_W['aid'], 'id' => $cateid), 'name');
}
include wl_template('dashboard/advEdit');
}
/**
* Comment: 删除幻灯片
* Author: zzw
* Date: 2019/9/19 18:26
*/
public function delete (){
global $_W , $_GPC;
#1、参数获取
$id = $_GPC['id'] OR show_json(0 , '删除失败,缺少id!');
#2、删除操作
pdo_delete(PDO_NAME . "adv" , [ 'id' => $id ]) OR show_json(0 , '失败');
show_json(1 , '成功');
}
/**
* Comment: 修改状态
* Author: zzw
* Date: 2019/9/18 15:41
*/
public function changeStatus (){
global $_W , $_GPC;
#1、获取参数信息
$id = $_GPC['id'] OR Commons::sRenderError('缺少参数:幻灯片id');
$status = $_GPC['status'] ? : 0;
#1、修改操作
$res = pdo_update(PDO_NAME."adv",['enabled'=>$status],['id'=>$id]);
if($res) Commons::sRenderSuccess('修改成功');
else Commons::sRenderError('修改失败,请刷新重试!');
}
}

70
addons/weliam_smartcity/web/controller/dashboard/banner.ctrl.php

@ -0,0 +1,70 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Banner_WeliamController{
/**
* 广告位查询
*/
public function index(){
global $_W,$_GPC;
$pindex = max(1, intval($_GPC['page']));
$psize = 10;
$banneres = Dashboard::getAllBanner($pindex-1,$psize);
$banners = $banneres['data'];
$pager = wl_pagination($banneres['count'], $pindex, $psize);
include wl_template('dashboard/bannerIndex');
}
/**
* 编辑广告位
*/
public function edit(){
global $_W,$_GPC;
if(checksubmit('submit')){
$banner = $_GPC['banner'];
$banner['name'] = trim($banner['name']);
$banner['displayorder'] = intval($banner['displayorder']);
$banner['enabled'] = intval($_GPC['enabled']);
if(!empty($_GPC['id'])){
if(Dashboard::editBanner($banner,$_GPC['id'])) wl_message('保存成功',web_url('dashboard/banner/index'),'success');
}else{
if(Dashboard::editBanner($banner)) wl_message('保存成功',web_url('dashboard/banner/index'),'success');
}
wl_message('保存失败',referer(),'error');
}
if(!empty($_GPC['id'])) $banner = Dashboard::getSingleBanner($_GPC['id']);
include wl_template('dashboard/bannerEdit');
}
/**
* Comment: 删除广告位
* Author: zzw
* Date: 2019/9/20 9:10
*/
public function delete(){
global $_W , $_GPC;
#1、参数获取
$id = $_GPC['id'] OR show_json(0 , '删除失败,缺少id!');
#2、删除操作
pdo_delete(PDO_NAME . "banner" , [ 'id' => $id ]) OR show_json(0 , '失败');
show_json(1 , '成功');
}
/**
* Comment: 修改状态
* Author: zzw
* Date: 2019/9/18 15:56
*/
public function changeStatus (){
global $_W , $_GPC;
#1、获取参数信息
$id = $_GPC['id'] OR Commons::sRenderError('缺少参数:导航id');
$status = $_GPC['status'] ? : 0;
#1、修改操作
$res = pdo_update(PDO_NAME."banner",['enabled'=>$status],['id'=>$id]);
if($res) Commons::sRenderSuccess('修改成功');
else Commons::sRenderError('修改失败,请刷新重试!');
}
}

259
addons/weliam_smartcity/web/controller/dashboard/category.ctrl.php

@ -0,0 +1,259 @@
<?php
defined('IN_IA') or exit('Access Denied');
class category_WeliamController
{
protected $typeArr = ['1' => '商品', '2' => '招聘', '0' => '其他'];
public function index()
{
global $_W, $_GPC;
$pindex = max(1, intval($_GPC['page']));
$psize = 100;
$categoryes = Category::getAllCategory($pindex - 1, $psize, 0);
$categorys = $categoryes['data'];
$pager = wl_pagination($categoryes['count'], $pindex, $psize);
if (!empty($categorys)) {
foreach ($categorys as $key => $value) {
$childrens = Category::getAllCategory(0, 100, $value['id']);
$categorys[$key]['children'] = $childrens['data'];
}
}
include wl_template('dashboard/category/indexList');
}
public function edit()
{
global $_W, $_GPC;
if (checksubmit('submit')) {
$category = $_GPC['category'];
if (!empty($_GPC['parentid'])) {
if (!empty($category['parentid']) && preg_match('/^\d+$/',$category['parentid'])) {
$_GPC['parentid'] = $category['parentid'];
}
$category['parentid'] = intval($_GPC['parentid']);
$category['visible_level'] = 2;
$parentData = Category::getSingleCategory($_GPC['parentid'],'type');
if ($parentData) $category['type'] = $parentData['type'];
} else {
$category['parentid'] = 0;
$category['visible_level'] = 1;
}
$category['name'] = trim($category['name']);
$category['displayorder'] = intval($category['displayorder']);
$category['status'] = intval($_GPC['status']);
if (is_numeric($_GPC['type'])) $category['type'] = intval($_GPC['type']);
$advlogo = $_GPC['advlogo'];
$advlink = $_GPC['advlink'];
$advarray = [];
foreach ($advlogo as $dkey => $dle) {
$dlea['thumb'] = $advlogo[$dkey];
$dlea['link'] = $advlink[$dkey];
$advarray[] = $dlea;
}
$category['advs'] = serialize($advarray);
if (!empty($_GPC['id'])) {
Category::syncCategroyType($_GPC['id'],$category);
if (Category::categoryEdit($category, $_GPC['id'])) wl_message('保存成功', web_url('dashboard/category/index',array('active' => 1)), 'success');
} else {
if (Category::categoryEdit($category)) wl_message('保存成功', web_url('dashboard/category/index',array('active' => 1)), 'success');
}
wl_message('保存失败', referer(), 'error');
}
if (!empty($_GPC['id'])) {
$category = Category::getSingleCategory($_GPC['id']);
if ($category['parentid']) {
$category['advs'] = unserialize($category['advs']);
$videoRes = Category::categoryVideoAll($_GPC['id']);
$category['video'] = $videoRes['list'];
}
}
if (empty($category)) $category = ['type' => $_GPC['category_type']];
$typeArr = $this->typeArr;
include wl_template('dashboard/category/indexEdit');
}
/**
* Comment: 删除商户
*/
public function delete()
{
global $_W, $_GPC;
if (Category::categoryDelete($_GPC['id'])) wl_message('删除成功', web_url('dashboard/category/index',array('active' => 1)), 'success');
wl_message('删除失败', referer(), 'error');
}
/**
* Comment: 修改状态
* Author: zzw
* Date: 2023/5/6 13:52
*/
public function changeStatus()
{
global $_W, $_GPC;
#1、获取参数信息
$id = $_GPC['id'] or Commons::sRenderError('缺少参数:导航id');
$status = $_GPC['status'] ?: 0;
#1、修改操作
$res = pdo_update(PDO_NAME . "cultivate_class", ['status' => $status], ['id' => $id]);
if ($res) Commons::sRenderSuccess('修改成功');
else Commons::sRenderError('修改失败,请刷新重试!');
}
public function videoIndex()
{
global $_W, $_GPC;
$cc_id = $_GPC['cc_id'];
$pindex = $_GPC['page'] ?: 1;
$psize = $_GPC['psize'] ?: 5;
$videoRes = Category::categoryVideoAll($cc_id,'*',false,'',$pindex,$psize);
$video = $videoRes['list'];
$pager = $videoRes['pager'];
$total = $videoRes['total'];
$category = Category::getSingleCategory($cc_id);
$parentCategory = Category::getSingleCategory($category['parentid']);
include wl_template('dashboard/category/videoIndex');
}
public function videoEdit()
{
global $_W, $_GPC;
$id = $_GPC['id'];
$cc_id = $_GPC['cc_id'];
$category = Category::getSingleCategory($cc_id);
$parentCategory = Category::getSingleCategory($category['parentid']);
if (checksubmit('submit')) {
$data = $_GPC['video'];
if (empty($data['title'])) wl_message('请填写视频标题', referer(), 'error');
if (empty($data['video_link'])) wl_message('请上传视频', referer(), 'error');
$data['uniacid'] = $_W['uniacid'];
if (!empty($id)) {
$res = pdo_update(PDO_NAME . 'cultivate_class_video',$data,['id' => $id]);
} else {
$data['create_time'] = time();
$res = pdo_insert(PDO_NAME . 'cultivate_class_video',$data);
}
if ($res) wl_message('保存成功', web_url('dashboard/category/videoIndex',['cc_id' =>$_GPC['cc_id']]), 'success');
wl_message('保存失败', referer(), 'error');
}
if (!empty($id)) $video = Category::categoryVideoFind($id);
include wl_template('dashboard/category/videoEdit');
}
public function videoDelete()
{
global $_W, $_GPC;
if (empty($_GPC['id'])) wl_message('缺少id', referer(), 'error');
if (empty($_GPC['cc_id'])) wl_message('缺少分类id', referer(), 'error');
$result = pdo_delete(PDO_NAME . 'cultivate_class_video' , ['id' => $_GPC['id']]);
if ($result) wl_message('删除成功', web_url('dashboard/category/videoIndex',['cc_id' =>$_GPC['cc_id']]), 'success');
wl_message('删除失败', referer(), 'error');
}
public function videoComment()
{
global $_W, $_GPC;
$pindex = max(1, intval($_GPC['page']));
$psize = $_GPC['psize'] ?: 10;
$where = ['aid' => $_W['aid']];
if (!empty($_GPC['keyword'])) {
$keyword = trim($_GPC['keyword']);
if ($_GPC['keywordtype'] == 1) {
$where['id'] = $keyword;
} elseif ($_GPC['keywordtype'] == 2) {
$where['video_id'] = $keyword;
} elseif ($_GPC['keywordtype'] == 3) {
$videoRes = pdo_getall(PDO_NAME . 'cultivate_class_video'," title like '%{$keyword}%'",['id']);
$videoIdArr = array_column($videoRes,'id');
$where['video_id#'] = $videoIdArr ? implode(",",$videoIdArr) : 0;
} elseif ($_GPC['keywordtype'] == 4) {
$where['mid'] = $keyword;
}
}
$data = Category::getVideoComment($where,'',$pindex,$psize,0,' status asc,id asc');
$list = $data['list'];
$pager = $data['pager'];
$total = $data['total'];
foreach ($list as &$item) {
$video = pdo_get(PDO_NAME . 'cultivate_class_video',['id' => $item['video_id']],['video_link','title']);
$item['video_link'] = $video['video_link'] ? tomedia($video['video_link']) : '';
$item['video_title'] = $video['title'] ?: '';
Member::getMemberInfo($item,$item['mid']);
}
include wl_template('dashboard/category/videoComment');
}
public function videoCommentCheck()
{
global $_W, $_GPC;
$id = $_GPC['id'];
$status = $_GPC['status'];
if (empty($id)) wl_message('缺少id', referer(), 'error');
if (!in_array($status,array(1,2))) wl_message('参数错误:status', referer(), 'error');
$update = ['status' => $status];
$res = pdo_update(PDO_NAME . 'cultivate_class_comment',$update,['id' => $id]);
if ($res) wl_message('审核成功', web_url('dashboard/category/videoComment',array('active' => 2)), 'success');
wl_message('审核失败', referer(), 'error');
}
/**
* 删除视频评论
*/
public function videoCommentDel()
{
global $_W, $_GPC;
if (Category::videoCommentDelete($_GPC['id'])) wl_message('删除成功', web_url('dashboard/category/videoComment',array('active' => 2)), 'success');
wl_message('删除失败', referer(), 'error');
}
/**
* Comment: 修改状态
* Author: zzw
* Date: 2023/5/6 13:52
*/
public function changeStatusVideo()
{
global $_W, $_GPC;
#1、获取参数信息
$id = $_GPC['id'] or Commons::sRenderError('缺少参数:导航id');
$status = $_GPC['status'] ?: 0;
#1、修改操作
$res = pdo_update(PDO_NAME . "cultivate_class_video", ['status' => $status], ['id' => $id]);
if ($res) Commons::sRenderSuccess('修改成功');
else Commons::sRenderError('修改失败,请刷新重试!');
}
public function queryVideo()
{
global $_W, $_GPC;
$video_link = $_GPC['video_link'];
$title = $_GPC['title'];
include wl_template('dashboard/category/queryVideo');
}
}

36
addons/weliam_smartcity/web/controller/dashboard/cube.ctrl.php

@ -0,0 +1,36 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Cube_WeliamController{
/**
* 查看排版
*/
public function index(){
global $_W;
$cubes = Dashboard::readSetting('cube');
if(empty($cubes)) $cubes = array(array(''),array(''),array(''),array(''),array(''),array(''));
include wl_template('dashboard/cube');
}
/**
* 保存排版
*/
public function save(){
global $_W,$_GPC;
$cubes_thumbs = $_GPC['cubes_thumbs'];
$cubes_links = $_GPC['cubes_links'];
$checkbox = $_GPC['on'];
$new_arr = array();
for($i=0;$i<6;$i++){
$new_arr[$i]['thumb'] = $cubes_thumbs[$i];
$new_arr[$i]['link'] = trim($cubes_links[$i]);
if(!empty($checkbox) && in_array($i, $checkbox)){
$new_arr[$i]['on']=1;
}else{
$new_arr[$i]['on']=0;
}
}
Dashboard::saveSetting($new_arr, 'cube');
wl_message('保存成功',web_url('dashboard/cube/index'),'success');
}
}

42
addons/weliam_smartcity/web/controller/dashboard/dashboard.ctrl.php

@ -0,0 +1,42 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Dashboard_WeliamController {
public function index() {
global $_W, $_GPC;
if(is_store()){
$name = pdo_getcolumn(PDO_NAME . 'merchantdata', array('id' => $_W['storeid']), 'storename');
}else{
$name = pdo_getcolumn(PDO_NAME . 'agentusers', array('id' => $_W['aid']), 'agentname');
//初始化总后台数据
Area::initAgent();
}
if ($_W['isajax']) {
if(is_store()){
$data = Merchant::newSurvey($_W['aid'],$_W['storeid']);
$data2 = Cache::getCache('storeinfo' . $_W['storeid'], 'data');
if ($data2['time'] < strtotime(date("Y-m-d"), time()) || $_GPC['refresh']) {
$data2 = Merchant::cacheSurvey($_W['aid'],$_W['storeid']);
Cache::setCache('storeinfo'.$_W['storeid'],'data',$data2);
}
}else{
$data = Merchant::newSurvey($_W['aid']);
$data2 = Cache::getCache('cachesur' . $_W['aid'], 'data');
if ($data2['time'] < strtotime(date("Y-m-d"), time()) || $_GPC['refresh']) {
$data2 = Merchant::cacheSurvey($_W['aid']);
Cache::setCache('cachesur' . $_W['aid'], 'data', $data2);
}
}
$data = array_merge($data, $data2);
$li = array('year' => date('m-d', time()), '金额' => $data['allmoney']);
$data['list'][] = $li;
die(json_encode($data));
}
include wl_template('dashboard/index');
}
}

84
addons/weliam_smartcity/web/controller/dashboard/foot.ctrl.php

@ -0,0 +1,84 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Foot_WeliamController {
public function index() {
global $_W, $_GPC;
//接收并且储存设置信息
if (checksubmit('submit')) {
$info = $_GPC['info'];
$res1 = Setting::agentsetting_save($info, 'foot');
if ($res1) {
wl_message('保存设置成功!', referer(), 'success');
} else {
wl_message('保存设置失败!', referer(), 'error');
}
}
//获取设置信息
$set = self::getMenuInfo();
include wl_template('dashboard/footIndex');
}
/**
* Comment: 获取菜单设置信息
* Author: zzw
* Date: 2019/11/2 10:06
* @return array|bool|mixed
*/
protected static function getMenuInfo(){
$set = Setting::agentsetting_read('foot');
if(!is_array($set['list']) || !is_array($set['list']['one']) || count($set['list']) != 5){
return [
'status' => $set['status'] ? $set['status'] : 0 ,//0=使用默认;1=使用当前自定义菜单
'list' => [
'one' => [
'default_name' => '首页' ,//默认名称
'diy_name' => '' ,//自定义名称
'default_img' => '' ,//默认图片
'selected_img' => '' ,//选中图片
'link' => '' ,//跳转链接
'switch' => 0 ,//是否开启:0=关,1=开启
] ,
'two' => [
'default_name' => '附近' ,//默认名称
'diy_name' => '' ,//自定义名称
'default_img' => '' ,//默认图片
'selected_img' => '' ,//选中图片
'link' => '' ,//跳转链接
'switch' => 0 ,//是否开启:0=关,1=开启
] ,
'three' => [
'default_name' => '一卡通' ,//默认名称
'diy_name' => '' ,//自定义名称
'default_img' => '' ,//默认图片
'selected_img' => '' ,//选中图片
'link' => '' ,//跳转链接
'switch' => 0 ,//是否开启:0=关,1=开启
] ,
'four' => [
'default_name' => '入驻' ,//默认名称
'diy_name' => '' ,//自定义名称
'default_img' => '' ,//默认图片
'selected_img' => '' ,//选中图片
'link' => '' ,//跳转链接
'switch' => 0 ,//是否开启:0=关,1=开启
] ,
'five' => [
'default_name' => '我的' ,//默认名称
'diy_name' => '' ,//自定义名称
'default_img' => '' ,//默认图片
'selected_img' => '' ,//选中图片
'link' => '' ,//跳转链接
'switch' => 0 ,//是否开启:0=关,1=开启
] ,
] ,
];
}
return $set;
}
}

70
addons/weliam_smartcity/web/controller/dashboard/nav.ctrl.php

@ -0,0 +1,70 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Nav_WeliamController{
/**
* 导航栏查询
*/
public function index(){
global $_W,$_GPC;
$pindex = max(1, intval($_GPC['page']));
$psize = 10;
$naves = Dashboard::getAllNav($pindex-1,$psize);
$navs = $naves['data'];
$pager = wl_pagination($naves['count'], $pindex, $psize);
include wl_template('dashboard/navIndex');
}
/**
* 编辑导航栏
*/
public function edit(){
global $_W,$_GPC;
if(checksubmit('submit')){
$nav = $_GPC['nav'];
$nav['name'] = trim($nav['name']);
$nav['displayorder'] = intval($nav['displayorder']);
$nav['enabled'] = intval($_GPC['enabled']);
$nav['link'] = $_GPC['link'];
if(!empty($_GPC['id'])){
if(Dashboard::editNav($nav,$_GPC['id'])) wl_message('保存成功',web_url('dashboard/nav/index'),'success');
}else{
if(Dashboard::editNav($nav)) wl_message('保存成功',web_url('dashboard/nav/index'),'success');
}
wl_message('保存失败',referer(),'error');
}
if(!empty($_GPC['id'])) $nav = Dashboard::getSingleNav($_GPC['id']);
include wl_template('dashboard/navEdit');
}
/**
* Comment: 删除导航栏
* Author: zzw
* Date: 2019/9/19 18:33
*/
public function delete(){
global $_W , $_GPC;
#1、参数获取
$id = $_GPC['id'] OR show_json(0 , '删除失败,缺少id!');
#2、删除操作
pdo_delete(PDO_NAME . "nav" , [ 'id' => $id ]) OR show_json(0 , '失败');
show_json(1 , '成功');
}
/**
* Comment: 修改状态
* Author: zzw
* Date: 2019/9/18 15:41
*/
public function changeStatus (){
global $_W , $_GPC;
#1、获取参数信息
$id = $_GPC['id'] OR Commons::sRenderError('缺少参数:导航id');
$status = $_GPC['status'] ? : 0;
#1、修改操作
$res = pdo_update(PDO_NAME."nav",['enabled'=>$status],['id'=>$id]);
if($res) Commons::sRenderSuccess('修改成功');
else Commons::sRenderError('修改失败,请刷新重试!');
}
}

98
addons/weliam_smartcity/web/controller/dashboard/notice.ctrl.php

@ -0,0 +1,98 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Notice_WeliamController{
/**
* Comment: 获取公告列表信息
* Author: zzw
* Date: 2019/9/18 11:38
*/
public function index(){
global $_W,$_GPC;
#1、参数获取
$page = $_GPC['page'] ? : 1;
$pageIndex = $_GPC['page_index'] ? : 10;
$pageStart = $page * $pageIndex - $pageIndex;
#1、条件生成
$where = " WHERE aid = {$_W['aid']} AND uniacid = {$_W['uniacid']} ";
$table = tablename(PDO_NAME."notice");
#1、列表信息获取
$list = pdo_fetchall("SELECT id,title,enabled,createtime FROM ".$table.$where ." ORDER BY createtime DESC limit {$pageStart},{$pageIndex}");
#1、分页操作
$total = pdo_fetchcolumn("SELECT count(*) FROM ".$table.$where);
$pager = wl_pagination(ceil($total / $pageIndex), $page, $pageIndex);
include wl_template('dashboard/noticeIndex');
}
/**
* Comment: 编辑公告
* Author: zzw
* Date: 2019/9/19 10:03
*/
public function edit(){
global $_W,$_GPC;
#1、参数接收
$id = $_GPC['id'] ? : '';
if(checksubmit('submit')){
#1、接收数据并且做出对应的操作
$data = $_GPC['notice'];
$data['content'] = htmlspecialchars_decode($data['content']);
if($id){
#2、修改操作 - 判断是否修改
$data['id'] = $id;
$res = pdo_get(PDO_NAME."notice",$data);
if($res) wl_message('请修改后提交!',web_url('dashboard/notice/edit',['id'=>$id]),'success');
#3、修改操作
unset($data['id']);
$res = pdo_update(PDO_NAME."notice",$data,['id'=>$id]);
}else{
#2、添加操作
$data['aid'] = $_W[ 'aid' ];
$data['uniacid'] = $_W[ 'uniacid' ];
$data['createtime'] = time();
$res = pdo_insert(PDO_NAME."notice",$data);
}
#3、返回结果
if($res) wl_message('操作成功',web_url('dashboard/notice/index'),'success');
else wl_message('操作失败',referer(),'error');
}
#2、编辑信息准备
if($id) $notice = pdo_get(PDO_NAME."notice",['id'=>$id],['id','title','content','link','enabled']);
include wl_template('dashboard/noticeEdit');
}
/**
* Comment: 删除公告
* Author: zzw
* Date: 2019/9/19 10:03
*/
public function delete (){
global $_W , $_GPC;
#1、参数获取
$id = $_GPC['id'] OR show_json(0, '删除失败,缺少id!');
#2、删除操作
pdo_delete(PDO_NAME."notice",['id'=>$id]) OR show_json(0, '失败');
show_json(1, '成功');
}
/**
* Comment: 修改状态
* Author: zzw
* Date: 2019/9/18 15:20
*/
public function changeStatus (){
global $_W , $_GPC;
#1、获取参数信息
$id = $_GPC['id'] OR Commons::sRenderError('缺少参数:公告id');
$status = $_GPC['status'] ? : 0;
#1、修改操作
$res = pdo_update(PDO_NAME."notice",['enabled'=>$status],['id'=>$id]);
if($res) Commons::sRenderSuccess('修改成功');
else Commons::sRenderError('修改失败,请刷新重试!');
}
public function clear(){
global $_W , $_GPC;
pdo_delete('wlmerchant_diypage',array('uniacid'=>$_W['uniacid'],'aid'=>$_W['aid'],'name' => 'weliam_default_index'));
show_json(1, '清理成功');
}
}

49
addons/weliam_smartcity/web/controller/dashboard/pagelinks.ctrl.php

@ -0,0 +1,49 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Pagelinks_WeliamController{
/**
* Comment: 获取页面链接基本信息
* Author: zzw
* Date: 2019/9/6 11:31
*/
public function index() {
global $_W,$_GPC;
#1、获取链接信息
$system = Links::getLinks('system');
unset($system['shop_cate']);
unset($system['pock_cate']);
include wl_template('dashboard/pagelinks');
}
/**
* Comment: 获取小程序太阳码信息
* Author: zzw
* Date: 2019/12/2 16:49
*/
public function getWxAppQrCode(){
global $_W,$_GPC;
#1、参数获取
$path = $_GPC['path'] OR Commons::sRenderError('path不存在');
#1、二维码生成
if(p('wxapp')){
$imageUrl = tomedia(WeApp::getQrCode($path,'system_url'.md5($path).'.png'));
Commons::sRenderSuccess('太阳码图片地址',$imageUrl);
}else{
Commons::sRenderError('无小程序信息');
}
}
public function getWxWechatQrCode(){
global $_W,$_GPC;
#1、参数获取
$path = $_GPC['link'] OR Commons::sRenderError('连接不存在');
$filename = md5('system_url'. md5($path));
$qrCodeLink = Poster::qrcodeimg($path , $filename);
$imageUrl = tomedia($qrCodeLink);
Commons::sRenderSuccess('二维码图片地址',$imageUrl);
}
}

20
addons/weliam_smartcity/web/controller/dashboard/plugin.ctrl.php

@ -0,0 +1,20 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Plugin_WeliamController{
public function index(){
global $_W,$_GPC;
$plugin = Setting::agentsetting_read('pluginlist');
if(checksubmit('submit')){
$plugin = $_GPC['plugin'];
$res1 = Setting::agentsetting_save($plugin,'pluginlist');
if ($res1) {
wl_message('保存设置成功!', referer(), 'success');
} else {
wl_message('保存设置失败!', referer(), 'error');
}
}
include wl_template('dashboard/pluginIndex');
}
}
?>

78
addons/weliam_smartcity/web/controller/dashboard/ruleCenter.ctrl.php

@ -0,0 +1,78 @@
<?php
defined('IN_IA') or exit('Access Denied');
class ruleCenter_WeliamController
{
public function index()
{
global $_W, $_GPC;
$where = [];
$pindex = max(1, intval($_GPC['page']));
$psize = 10;
$memberData = Util::getNumData("*", PDO_NAME . 'rule_center', $where, 'sort desc', $pindex, $psize, 1);
$list = $memberData[0];
$pager = $memberData[1];
include wl_template('dashboard/rule_center/index');
}
public function edit()
{
global $_W, $_GPC;
$id = $_GPC['id'];
if (checksubmit('submit')) {
$data = $_GPC['data'];
if (empty($data['img'])) wl_message('请上传规则图片', referer(), 'error');
$arr = [
'uniacid' => $_W['uniacid'],
'img' => $data['img'],
'sort' => $data['sort'],
'status' => $data['status']
];
if (!empty($id)) {
$result = pdo_update(PDO_NAME . 'rule_center',$arr,['id' => $id]);
} else {
$arr['create_time'] = time();
$result = pdo_insert(PDO_NAME . 'rule_center',$arr);
}
if ($result) wl_message('保存成功', web_url('dashboard/ruleCenter/index'), 'success');
wl_message('保存失败', referer(), 'error');
}
if ($id) {
$data = pdo_get(PDO_NAME . 'rule_center',['id' => $id]);
}
include wl_template('dashboard/rule_center/edit');
}
public function changeStatus()
{
global $_W, $_GPC;
#1、获取参数信息
$id = $_GPC['id'] or Commons::sRenderError('缺少参数:导航id');
$status = $_GPC['status'] ?: 0;
#1、修改操作
$res = pdo_update(PDO_NAME . "rule_center", ['status' => $status], ['id' => $id]);
if ($res) Commons::sRenderSuccess('修改成功');
else Commons::sRenderError('修改失败,请刷新重试!');
}
public function delete()
{
global $_W, $_GPC;
$id = $_GPC['id'];
if (empty($id) || !is_numeric($id)) wl_message('缺少id参数', referer(), 'error');
$deleteRes = pdo_delete(PDO_NAME . "rule_center",['id' => $id]);
if ($deleteRes) wl_message('删除成功', web_url('dashboard/ruleCenter/index'), 'success');
wl_message('删除失败', referer(), 'error');
}
}

12
addons/weliam_smartcity/web/controller/dashboard/sort.ctrl.php

@ -0,0 +1,12 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Sort_WeliamController{
/*
* 排版展示
*/
public function index(){
global $_W;
include wl_template('dashboard/sort');
}
}

643
addons/weliam_smartcity/web/controller/diy/diy.ctrl.php

@ -0,0 +1,643 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Diy_WeliamController {
/**
* Comment: 进入页面的编辑页面
* Author: zzw
*/
public function editPage() {
global $_W, $_GPC;
$back = $_GPC['back_url'];//返回的地址
$id = $_GPC['id'] ? $_GPC['id'] : -1;//id 存在修改配置 不存在是添加配置;//页面id
$tid = $_GPC['tid'] ? $_GPC['tid'] : -1;//模板id 存在调用模板信息
$type = $_GPC['type'];//页面的类型 1=自定义;2=商城首页;3=会员中心;4=分销中心;5=商品详情页;6=积分商城;7=整点秒杀;8=兑换中心;9=快速购买;99=公用模块
//返回的页面地址
$result = Diy::verify($id, $type, $tid);
extract($result);
//获取公共的内容
$common = Diy::getCommon();
#3、获取其他信息
if (empty($_W['aid'])) {
$diyadvs = pdo_getall(PDO_NAME . "diypage_adv", array('uniacid' => $_W['uniacid']));
$diymenu = pdo_getall(PDO_NAME . "diypage_menu", array('uniacid' => $_W['uniacid']));
$category = pdo_getall(PDO_NAME . "diypage_temp_cate", array('uniacid' => $_W['uniacid'],'aid' => $_W['aid']), array('id', 'name'));
} else {
//启动广告信息
$diyadvs = pdo_getall(PDO_NAME . "diypage_adv", array('aid' => $_W['aid'], 'uniacid' => $_W['uniacid']));
//菜单信息
$diymenu = pdo_getall(PDO_NAME . "diypage_menu", array('aid' => [$_W['aid'],0], 'uniacid' => $_W['uniacid']));
//模板分类信息
$category = pdo_getall(PDO_NAME . "diypage_temp_cate", array('aid' => $_W['aid'], 'uniacid' => $_W['uniacid']), array('id', 'name'));
}
include wl_template('diy/page_edit');
}
/**
* Comment: 保存页面信息
* Author: zzw
*/
public function savePage() {
global $_W, $_GPC;
#1、参数接收
$id = $_GPC['id'];//修改的id
$data = json_decode(base64_decode($_GPC['data']), true);//页面的配置信息
#2、组装页面配置基本信息
$diypage = [
'data' => base64_encode(json_encode($data,JSON_UNESCAPED_UNICODE)),
'name' => $data['page']['name'],
'type' => $data['page']['type'],
'lastedittime' => time(),
];
#3、进行数据的添加||修改
if ($id > 0) {
if(!$diypage['name']) unset($diypage['name']);//修改时如果页面标题为空则删除
if(!$diypage['type']) unset($diypage['type']);//修改时如果页面类型为空则删除
//修改已存在的页面配置信息
pdo_update(PDO_NAME . 'diypage', $diypage, array('id' => $id));
} else {
//添加储存新的页面配置信息
$diypage['uniacid'] = $_W['uniacid'];
$diypage['aid'] = $_W['aid'];
$diypage['createtime'] = time();
if (empty($diypage['aid'])) {
$diypage['is_public'] = 1;
}
pdo_insert(PDO_NAME . 'diypage', $diypage);
$id = pdo_insertid();
}
#4、返回最终的结果
$backUrl = "diypage/diy/pagelist";
wl_json(1, '操作成功', array('id' => $id, 'url' => web_url('diy/diy/editPage', array('id' => $id, 'type' => $data['page']['type'], 'page_type' => 'page', 'back_url' => $backUrl))));
}
/**
* Comment: 删除一个页面
* Author: zzw
*/
public function delPage() {
global $_W,$_GPC;
$ids = $_GPC['ids'] ? : [];
pdo_delete(PDO_NAME."diypage",['id IN'=>$ids]);
show_json(1, "删除成功");
}
/**
* Comment: 保存菜单信息
* Author: zzw
*/
public function saveMenu() {
global $_W, $_GPC;
$id = intval($_GPC['id']);
$data = $_GPC['menu'];
$menuClass = intval($_GPC['menu_class']);
$menudata = array('name' => $data['name'], 'data' => base64_encode(json_encode($data)), 'lastedittime' => time());
if (!empty($id)) {
pdo_update(PDO_NAME . 'diypage_menu', $menudata, array('id' => $id, 'uniacid' => $_W['uniacid']));
} else {
$menudata['uniacid'] = $_W['uniacid'];
$menudata['aid'] = $_W['aid'];
if (empty($menudata['aid'])) {
$menudata['is_public'] = 1;
}
$menudata['createtime'] = time();
$menudata['menu_class'] = $menuClass;
pdo_insert(PDO_NAME . 'diypage_menu', $menudata);
$id = pdo_insertid();
}
if ($menuClass == 1) {
$Url = "diypage/diy/menuEdit";
} else {
$Url = "chosen/diy/menuEdit";
}
wl_json(1, '保存成功', web_url($Url, array('id' => $id, 'menu_class' => $menuClass)));
}
/**
* Comment: 删除菜单
* Author: zzw
*/
public function delMenu() {
global $_W, $_GPC;
$id = intval($_GPC['id']);
if (empty($id)) {
show_json(0, '参数错误,请刷新重试!');
} else {
pdo_delete(PDO_NAME . 'diypage_menu', array('id' => $id));
show_json(1);
}
}
/**
* Comment: 保存广告信息
* Author: zzw
*/
public function saveAdv() {
global $_W, $_GPC;
$id = intval($_GPC['id']);
$advClass = $_GPC['adv_class'];
$data = $_GPC['advs'];
$advsdata = array('name' => $data['name'], 'data' => base64_encode(json_encode($data)), 'lastedittime' => time(), 'type' => 1, 'aid' => intval($_W['aid']));
if (empty($advsdata['aid'])) {
$advsdata['is_public'] = 1;
}
if (!empty($id)) {
pdo_update(PDO_NAME . 'diypage_adv', $advsdata, array('id' => $id, 'uniacid' => $_W['uniacid']));
} else {
$advsdata['uniacid'] = $_W['uniacid'];
$advsdata['createtime'] = time();
$advsdata['adv_class'] = $advClass;
pdo_insert(PDO_NAME . 'diypage_adv', $advsdata);
$id = pdo_insertid();
}
if ($advClass == 1) {
$Url = "diypage/diy/advEdit";
} else {
$Url = "chosen/diy/advEdit";
}
wl_json(1, '保存成功', web_url($Url, array('id' => $id, 'adv_class' => $advClass)));
}
/**
* Comment: 删除广告信息
* Author: zzw
*/
public function delAdv() {
global $_W, $_GPC;
$id = intval($_GPC['id']);
if (empty($id)) {
show_json(0, '参数错误,请刷新重试!');
} else {
pdo_delete(PDO_NAME . 'diypage_adv', array('id' => $id, 'aid' => intval($_W['aid'])));
show_json(1);
}
}
/**
* Comment: 保存模板预览图片 并且返回图片路径
* Author: zzw
* Date: 2020/8/28 9:20
*/
public function saveTempImage(){
global $_W, $_GPC;
//进行预览图-图片的处理
$pageImg = $_GPC['pageImg'];//预览图base64码
$imageName = "page_image" . time() . rand(1000, 9999) . '.png';
$imageName = "images/" . MODULE_NAME . "/" . $imageName;//文件储存路径 图片地址
$fullName = PATH_ATTACHMENT . $imageName;//文件在本地服务器暂存地址
if (strstr($pageImg, ",")) {
$pageImg = explode(',', $pageImg);
$pageImg = $pageImg[1];
}
file_put_contents($fullName, base64_decode($pageImg));
wl_json(1, '操作成功',['img_name'=>$imageName]);
}
/**
* Comment: 保存模板信息
* Author: zzw
*/
public function saveTemp() {
global $_W, $_GPC;
#1、数据获取
$id = $_GPC['id'];//模板id
$type = $_GPC['type'];//页面类型
$cate = $_GPC['cate'];//模板分类id
$name = $_GPC['name'];//模板名称
$data = $_GPC['data'];//模板配置信息
$pageImg = $_GPC['pageImg'];//预览图
#2、组装页面配置基本信息
$temp = array(
'type' => intval($type),//页面类型
'cate' => intval($cate),//分类id
'name' => trim($name), //模板名称
'preview' => trim($pageImg),//预览图片
'data' => base64_encode(json_encode($data, JSON_UNESCAPED_UNICODE)),//模板配置信息
'aid' => $_W['aid'],
'uniacid' => $_W['uniacid']
);
#3、进行数据的添加
pdo_insert(PDO_NAME . 'diypage_temp', $temp);
$id = pdo_insertid();
#4、返回最终的结果
wl_json(1, '操作成功');
}
/**
* Comment: 删除一个模板
* Author: zzw
*/
public function delTemp() {
global $_W, $_GPC;
$id = intval($_GPC['id']);
$result = pdo_delete(PDO_NAME . "diypage_temp", array('id' => $id));
if ($result) {
show_json(0);
} else {
show_json(1, '删除失败');
}
}
/**
* Comment: 保存模板分类信息
* Author: zzw
*/
public function saveCate() {
global $_W, $_GPC;
$name = trim($_GPC['name']);
$cateClass = $_GPC['cateClass'];
if (empty($name)) {
show_json(0, '分类名称为空!');
}
$result = pdo_insert(PDO_NAME . 'diypage_temp_cate'
, array('name' => $name, 'uniacid' => $_W['uniacid'], 'aid' => intval($_W['aid']), 'cate_class' => $cateClass));
if ($result) {
show_json(1);
} else {
show_json(1, '添加失败');
}
}
/**
* Comment: 编辑模板分类信息
* Author: zzw
*/
public function editCate() {
global $_W, $_GPC;
$id = intval($_GPC['id']);
$name = trim($_GPC['value']);
$item = pdo_fetch('SELECT id, name, uniacid FROM ' . tablename(PDO_NAME . 'diypage_temp_cate') . ' WHERE id=:id and aid=:aid and uniacid=:uniacid ', array(':aid' => intval($_W['aid']), ':uniacid' => $_W['uniacid'], ':id' => $id));
if (!empty($item)) {
pdo_update(PDO_NAME . 'diypage_temp_cate', array('name' => $name), array('id' => $id, 'aid' => intval($_W['aid'])));
show_json(1, '分类名称编辑成功!');
} else {
show_json(0, '分类不存在,请刷新页面重试!');
}
}
/**
* Comment: 删除模板分类信息
* Author: zzw
*/
public function delCate() {
global $_W, $_GPC;
$id = intval($_GPC['id']);
if (empty($id)) {
show_json(0, '参数错误,请刷新重试!');
}
$item = pdo_fetch('SELECT id, name, uniacid FROM ' . tablename(PDO_NAME . 'diypage_temp_cate') . ' WHERE id=:id and aid=:aid and uniacid=:uniacid ', array(':aid' => intval($_W['aid']), ':uniacid' => $_W['uniacid'], ':id' => $id));
if (!empty($item)) {
pdo_delete(PDO_NAME . 'diypage_temp_cate', array('id' => $id, 'aid' => intval($_W['aid'])));
}
show_json(1);
}
/**
* Comment: 根据图片地址下载当前页面要使用的图片信息
* Author: zzw
*/
public function getImgInfo() {
global $_W, $_GPC;
$imgUrl = $_GPC['img_url'];
foreach ($imgUrl as $k => $v) {
$imgResources = file_get_contents($v);
$setting = $_W['setting']['upload']['image'];
$setting['folder'] = "images/" . MODULE_NAME;
$imageName = date("Y-m-dHisw") . time() . rand(1000, 9999) . '.png';
$imageName = $setting['folder'] . "/" . $imageName;//文件储存路径
$fullName = PATH_ATTACHMENT . $imageName;//文件在本地服务器暂存地址
file_put_contents($fullName, $imgResources);
$image_info = getimagesize($fullName);
$image_data = fread(fopen($fullName, 'r'), filesize($fullName));
$base64_image = 'data:' . $image_info['mime'] . ';base64,' . chunk_split(base64_encode($image_data));
$base64[$k] = $base64_image;
unlink($fullName);
}
wl_json(1, '处理后的图片', $base64);
}
/**
* Comment: 获取对应的商品信息
* Author: zzw
*/
public function getGoodsInfo() {
global $_W, $_GPC;
$plugin = $_GPC['plugin'];//商品类型:0=全部,1=抢购,2=团购,3=拼团,4=大礼包,5=优惠券,6=折扣卡,7=砍价商品,8=积分商品,9=同城活动,10=配送商品
$search = $_GPC['search'];//搜索内容 商品名称
$page = $_GPC['page'] ? $_GPC['page'] : 1;
$pageNum = $_GPC['pageNum'] ? $_GPC['pageNum'] : 8;
$geturl = $_GPC['geturl'] ? $_GPC['geturl'] : 0;
$start = $page * $pageNum - $pageNum;
if ($plugin == 0) {
$rush = self::getGoods(1, $search);//抢购商品
$groupon = self::getGoods(2, $search);//团购商品
$wlfightgroup = self::getGoods(3, $search);//拼团商品
$coupon = self::getGoods(5, $search);//优惠券
$bargain = self::getGoods(7, $search);//砍价
$integral = [];//self::getGoods(8, $search);//积分
$activity = self::getGoods(9, $search);//活动
$goods = array_merge($rush, $groupon, $wlfightgroup, $coupon, $bargain,$integral,$activity);
} else {
$goods = self::getGoods($plugin, $search, $start, $pageNum);
}
if (!$goods) {
wl_json(0, '暂无该类型商品!');
}
//获取总页数 进行分页
$data['page_number'] = ceil(count($goods) / $pageNum);//总页数
$goods = array_slice($goods, $start, $pageNum);
//只有抢购、团购、拼团、优惠券才会进行下面的操作
$initPlugin = $plugin;
foreach ($goods as $k => &$v) {
//查询全部商品时 每个商品从新定义内容
if ($initPlugin == 0) {
switch ($v['plugin']) {
case 'rush':
$plugin = 1;
break;//抢购商品
case 'groupon':
$plugin = 2;
break;//团购商品
case 'wlfightgroup':
$plugin = 3;
break;//拼团商品
case 'coupon':
$plugin = 5;
break;//优惠券
case 'bargain':
$plugin = 7;
break;//砍价商品
case 'integral':
$plugin = 8;
break;//砍价商品
case 'activity':
$plugin = 9;
break;//同城活动
}
}
$v = WeliamWeChat::getHomeGoods($plugin, $v['id']);
//获取商品详情页面的跳转地址
if ($geturl == 1) {
switch ($plugin) {
case 1:
$v['detail_url'] = h5_url('pages/subPages/goods/index', ['type' => 1, 'id' => $v['id']]);
break;//抢购商品
case 2:
$v['detail_url'] = h5_url('pages/subPages/goods/index', ['type' => 2, 'id' => $v['id']]);
break;//团购商品
case 3:
$v['detail_url'] = h5_url('pages/subPages/goods/index', ['type' => 3, 'id' => $v['id']]);
break;//拼团商品
case 5:
$v['detail_url'] = h5_url('pages/subPages/goods/index', ['type' => 5, 'id' => $v['id']]);
break;//优惠券
case 7:
$v['detail_url'] = h5_url('pages/subPages/goods/index', ['type' => 7, 'id' => $v['id']]);
break;//砍价商品
case 8:
$v['detail_url'] = h5_url('pages/subPages/goods/index', ['goodsType' => 'integral', 'goods_id' => $v['id']]);
break;//砍价商品
case 9:
$v['detail_url'] = h5_url('pages/subPages2/coursegoods/localindex/localindex');
break;//同城活动
}
}
}
//信息拼装
$data['goods'] = $goods;//商品信息
$data['page'] = $page;//当前页
//输出结果
if ($goods) {
wl_json(1, '获取商品信息', $data);
} else {
wl_json(0, '获取失败');
}
}
/**
* Comment: 获取头条信息
* Author: zzw
*/
public function getHeadline() {
global $_W, $_GPC;
$search = $_GPC['search'];//搜索内容 头条标题/作者名称
$page = $_GPC['page'] ? $_GPC['page'] : 1;
$pageNum = $_GPC['pageNum'] ? $_GPC['pageNum'] : 10;
$start = $page * $pageNum - $pageNum;
$where = " uniacid = {$_W['uniacid']} AND aid = {$_W['aid']} ";
if ($search) {
$where .= " AND (title LIKE '%{$search}%' || author LIKE '%{$search}%') ";
}
//获取头条列表
$list = pdo_fetchall("SELECT id,title,summary,display_img,author,author_img,browse,one_id,two_id FROM "
. tablename(PDO_NAME . "headline_content")
. " WHERE {$where} ORDER BY release_time DESC ");
$data['page_number'] = ceil(count($list) / $pageNum);//总页数
$list = array_slice($list, $start, $pageNum);
foreach ($list as $k => &$v) {
$v['display_img'] = tomedia($v['display_img']);
$v['author_img'] = tomedia($v['author_img']);
$v['one_name'] = implode(pdo_get(PDO_NAME . 'headline_class', array('id' => $v['one_id']), array('name')));
$v['two_name'] = implode(pdo_get(PDO_NAME . 'headline_class', array('id' => $v['two_id']), array('name')));
unset($v['one_id']);
unset($v['two_id']);
}
$data['list'] = $list;//头条信息
$data['page'] = $page;//当前页
if ($list) {
wl_json(1, '获取商品信息', $data);
} else {
wl_json(0, '获取失败');
}
}
/**
* Comment: 获取商户信息
* Author: zzw
*/
public function getShop() {
global $_W, $_GPC;
$search = $_GPC['search'];//搜索内容 店铺名称
$page = $_GPC['page'] ? $_GPC['page'] : 1;
$pageNum = $_GPC['pageNum'] ? $_GPC['pageNum'] : 10;
$start = $page * $pageNum - $pageNum;
$where = " uniacid = {$_W['uniacid']} AND aid = {$_W['aid']} AND status = 2 AND enabled = 1 ";
if ($search) {
$where .= " AND storename LIKE '%{$search}%' ";
}
$shopList = pdo_fetchall("SELECT id,storename,logo,address,location,storehours,pv,score,tag FROM "
. tablename(PDO_NAME . "merchantdata")
. " WHERE {$where}");
foreach ($shopList as $shop_key => &$shop_val) {
$shop_val['salesVolume'] = Store::getShopSales($shop_val['id'], 1, 0);
$shop_val['score'] = sprintf("%.1f", $shop_val['score']);
//标签信息处理
$tag = unserialize($shop_val['tag']);
if(is_array($tag) && count($tag) > 0){
$tags = pdo_getall(PDO_NAME.'tags' , ['id' => $tag] , ['title']);
$shop_val['tag'] = is_array($tag) && count($tag) > 0 ? array_column($tags , 'title') : [];
}else{
$shop_val['tag'] = [];
}
}
$shopList = Store::getstores($shopList, 0, 0, 4);
$data['page_number'] = ceil(count($shopList) / $pageNum);//总页数
$shopList = array_slice($shopList, $start, $pageNum);
//获取店铺商品活动信息
$shopList = WeliamWeChat::getStoreList($shopList);
$data['list'] = $shopList;//店铺信息
$data['page'] = $page;//当前页
if ($shopList) {
wl_json(1, '获取商品信息', $data);
} else {
wl_json(0, '获取失败');
}
}
/**
* Comment: 预览页面内容
* Author: zzw
*/
public function previewPage() {
global $_W, $_GPC;
$id = intval($_GPC['id']);
$url = h5_url('pages/mainPages/index/diypage?type=1', ['id' => $id]);
$path = 'pages/mainPages/index/diypage?type=1&id='.$id;
$imageUrl = tomedia(WeApp::getQrCode($path,'system_url'.md5($path).'.png'));
include wl_template('diy/preview');
}
/**
* Comment: 根据状态获取商品信息
* Author: zzw
* @param $plugin int 商品类型 1=抢购 2=团购 3=拼团 5=优惠券
* @param $search string 搜索内容
* @return array
*/
protected function getGoods($plugin, $search) {
global $_W;
$where = " AND a.uniacid = {$_W['uniacid']} AND a.aid = {$_W['aid']} ";
switch ($plugin) {
case 1:
$goods = pdo_fetchall("SELECT a.id,REPLACE('table','table','rush') as `plugin` FROM "
. tablename(PDO_NAME . "rush_activity")
. " a LEFT JOIN " . tablename(PDO_NAME . "merchantdata")
. " b ON a.sid = b.id WHERE a.status IN (1,2,3) {$where} AND a.name LIKE '%{$search}%'");//
break;//抢购商品
case 2:
$goods = pdo_fetchall("SELECT a.id,REPLACE('table','table','groupon') as `plugin` FROM "
. tablename(PDO_NAME . "groupon_activity")
. " a LEFT JOIN " . tablename(PDO_NAME . "merchantdata")
. " b ON a.sid = b.id WHERE a.status IN (1,2,3) {$where} AND a.name LIKE '%{$search}%'");
break;//团购商品
case 3:
$goods = pdo_fetchall("SELECT a.id,REPLACE('table','table','wlfightgroup') as `plugin` FROM "
. tablename(PDO_NAME . "fightgroup_goods")
. " a LEFT JOIN " . tablename(PDO_NAME . "merchantdata")
. " b ON a.merchantid = b.id WHERE a.status IN (1,2,3) {$where} AND b.storename != '' AND a.name LIKE '%{$search}%'");
break;//拼团商品
case 4:
$goods = pdo_fetchall("SELECT a.id,REPLACE('table','table','package') as `plugin` FROM "
. tablename(PDO_NAME . "package")
. " a LEFT JOIN " . tablename(PDO_NAME . "merchantdata")
. " b ON a.merchantid = b.id WHERE a.status = 1 {$where} AND b.storename != '' AND a.title LIKE '%{$search}%'");
break;//大礼包
case 5:
$goods = pdo_fetchall("SELECT a.id,REPLACE('table','table','coupon') as `plugin` FROM "
. tablename(PDO_NAME . "couponlist")
. " a LEFT JOIN " . tablename(PDO_NAME . "merchantdata")
. " b ON a.merchantid = b.id WHERE a.status IN (1,2,3) {$where} AND b.storename != '' AND a.title LIKE '%{$search}%'");
break;//优惠券
case 6:
$goods = pdo_fetchall("SELECT a.id,REPLACE('table','table','halfcard') as `plugin` FROM "
. tablename(PDO_NAME . "halfcardlist")
. " a LEFT JOIN " . tablename(PDO_NAME . "merchantdata")
. " b ON a.merchantid = b.id WHERE a.status = 1 {$where} AND b.storename != '' AND a.title LIKE '%{$search}%'");
break;//折扣卡
case 7:
$goods = pdo_fetchall("SELECT a.id,REPLACE('table','table','bargain') as `plugin` FROM "
. tablename(PDO_NAME . "bargain_activity")
. " a LEFT JOIN " . tablename(PDO_NAME . "merchantdata")
. " b ON a.sid = b.id WHERE a.status IN (1,2,3) {$where} AND b.storename != '' AND a.name LIKE '%{$search}%'");
break;//砍价
case 8:
$goods = pdo_fetchall("SELECT id,REPLACE('table','table','integral') as `plugin` FROM "
. tablename(PDO_NAME . "consumption_goods")
. " WHERE status = 1 AND uniacid = {$_W['uniacid']} AND title LIKE '%{$search}%'");
break;//砍价
case 9:
$goods = pdo_fetchall("SELECT a.id,REPLACE('table','table','activity') as `plugin` FROM "
. tablename(PDO_NAME . "activitylist")
. " a LEFT JOIN " . tablename(PDO_NAME . "merchantdata")
. " b ON a.sid = b.id WHERE a.status IN (1,2) {$where} AND b.storename != '' AND a.title LIKE '%{$search}%'");
break;//同城活动
case 10:
$goods = pdo_fetchall("SELECT a.id,REPLACE('table','table','citydelivery') as `plugin` FROM "
. tablename(PDO_NAME . "delivery_activity")
. " a LEFT JOIN " . tablename(PDO_NAME . "merchantdata")
. " b ON a.sid = b.id WHERE a.status = 2 {$where} AND b.storename != '' AND a.name LIKE '%{$search}%'");
break;//配送商品
}
return $goods;
}
/**
* Comment: 在这里配置diy编辑页面中选项卡组件的详细信息
* Author: zzw
*/
public function getOption() {
//商家sotre;抢购rush;卡券coupon;特权halfcard;拼团fight;同城pocket;活动activity;团购groupon;砍价bargain;积分consumption;礼包package
$configInfo = [
['status' => 1 , 'name' => '商家' , 'plugin' => '' , 'nickname' => '商家' , 'type' => 'store'] ,
['status' => 1 , 'name' => '抢购' , 'plugin' => 'rush' , 'nickname' => '抢购' , 'type' => 'rush'] ,
['status' => 1 , 'name' => '卡券' , 'plugin' => 'wlcoupon' , 'nickname' => '卡券' , 'type' => 'coupon'] ,
['status' => 1 , 'name' => '特权' , 'plugin' => 'halfcard' , 'nickname' => '特权' , 'type' => 'halfcard'] ,
['status' => 1 , 'name' => '拼团' , 'plugin' => 'wlfightgroup' , 'nickname' => '拼团' , 'type' => 'fight'] ,
['status' => 1 , 'name' => '同城' , 'plugin' => 'pocket' , 'nickname' => '同城' , 'type' => 'pocket'] ,
['status' => 1 , 'name' => '团购' , 'plugin' => 'groupon' , 'nickname' => '团购' , 'type' => 'groupon'] ,
['status' => 1 , 'name' => '砍价' , 'plugin' => 'bargain' , 'nickname' => '砍价' , 'type' => 'bargain'] ,
['status' => 1 , 'name' => '积分' , 'plugin' => '' , 'nickname' => '积分' , 'type' => 'consumption'] ,
['status' => 1 , 'name' => '礼包' , 'plugin' => 'halfcard' , 'nickname' => '礼包' , 'type' => 'package'] ,
['status' => 1 , 'name' => '活动' , 'plugin' => 'activity' , 'nickname' => '活动' , 'type' => 'activity'] ,
['status' => 1 , 'name' => '招聘' , 'plugin' => 'recruit' , 'nickname' => '招聘' , 'type' => 'recruit'] ,
];
$data = array();
foreach ($configInfo as $k => &$v) {
if ($v['plugin']) {
if (!p($v['plugin'])) {
unset($configInfo[$k]);
continue;
}
}
unset($v['plugin']);
$name = 'C012345678910' . (count($data) + 1);
$v['sort'] = (count($data) + 1);
$data[$name] = $v;
}
echo json_encode($data, JSON_UNESCAPED_UNICODE);
}
/**
* Comment: 获取社群信息
* Author: zzw
* Date: 2019/11/21 14:52
*/
public function getCommunityInfo() {
global $_W, $_GPC;
#1、参数获取
$id = $_GPC['id'] OR Commons::sRenderError('id错误,请刷新重试!');
#2、获取社群信息
$info = pdo_get(PDO_NAME . "community", ['id' => $id], ['communname', 'commundesc', 'communimg', 'communqrcode']);
$info['communimg'] = tomedia($info['communimg']);
$info['communqrcode'] = tomedia($info['communqrcode']);
Commons::sRenderSuccess('社群信息', $info);
}
}

169
addons/weliam_smartcity/web/controller/finace/finaceWithdrawal.ctrl.php

@ -0,0 +1,169 @@
<?php
defined('IN_IA') or exit('Access Denied');
/**
* Comment: 代理商提现管理
* Author: zzw
* Date: 2021/1/7 18:06
* Class FinaceWithdrawal_WeliamController
*/
class FinaceWithdrawal_WeliamController {
//余额提现
public function cashApplyAgent() {
global $_W, $_GPC;
$a = Util::getSingelData('percent,cashopenid,allmoney,nowmoney,payment_type,alipay,card_number', PDO_NAME . 'agentusers', array('id' => $_W['aid']));
//提现账号
if(!empty($a['cashopenid'])){
if(intval($a['cashopenid']) > 0){
$user = pdo_get(PDO_NAME.'member', ['id' => $a['cashopenid']], ['avatar', 'id', 'realname', 'nickname','openid','wechat_openid']);
}else{
$user = pdo_get(PDO_NAME.'member', ['openid' => $a['cashopenid']], ['avatar', 'id', 'realname', 'nickname','openid','wechat_openid']);
}
}else{
$user = [];
}
//提现申请
$p = unserialize($a['percent']);
$cashsets = Setting::wlsetting_read('cashset');
$agentpercent = $p['agentpercent'] ? $p['agentpercent'] : $cashsets['agentpercent'];
$cashsets['lowsetmoney'] = $cashsets['lowsetmoney'] ? $cashsets['lowsetmoney'] : 0;
$money = $num = 0;
/*提现申请*/
if ($_GPC['money'] > 0) {
$money = $_GPC['money'];
$num = $_GPC['num'];
if ($num < $cashsets['lowsetmoney']) {
Commons::sRenderError('申请金额小于最低结算金额!');
} else if ($num > $a['nowmoney']) {
Commons::sRenderError('申请金额大于账户现有金额!');
} else {
$data = array(
'uniacid' => $_W['uniacid'] ,
'sid' => 0 , 'aid' => $_W['aid'] ,
'status' => 2 , 'type' => 2 ,
'sapplymoney' => $num ,
'sgetmoney' => sprintf("%.2f" , $num - $agentpercent * $num / 100) ,
'spercentmoney' => sprintf("%.2f" , $agentpercent * $num / 100) ,
'spercent' => $agentpercent ,
'applytime' => TIMESTAMP ,
'updatetime' => TIMESTAMP ,
'sopenid' => $user['openid']?$user['openid']:$user['wechat_openid'],
'source' => $user['openid']?1:3
);
if ($a['payment_type'] == 1) {
//支付宝
if ($a['alipay']) {
$data['payment_type'] = 1;
} else {
Commons::sRenderError('请填写支付宝账号信息!');
}
} else if ($a['payment_type'] == 2) {
//微信
$data['payment_type'] = 2;
if(empty($user['openid']) && empty($user['wechat_openid'])){
Commons::sRenderError('打款账号无微信账户信息,无法提现');
}
} else if ($a['payment_type'] == 3) {
//银行卡
if ($a['card_number']) {
$data['payment_type'] = 3;
} else {
Commons::sRenderError('请填写银行卡账号信息!');
}
} else {
Commons::sRenderError('请选择收款方式!');
}
if ($cashsets['noaudit']) {
$data['status'] = 3;
$trade_no = time() . random(4, true);
$data['trade_no'] = $trade_no;
$data['updatetime'] = time();
}
if (pdo_insert(PDO_NAME . 'settlement_record', $data)) {
$settid = pdo_insertid();
$res = Store::settlement($settid, 0, 0, -$num, 0, 0, 7);
if ($cashsets['agentautocash']) {
Queue::addTask(4, $settid, time(), $settid);
}
if ($res) {
if (!empty($_W['wlsetting']['adminmid'])) {
$storename = pdo_getcolumn(PDO_NAME . 'agentusers', array('id' => $_W['aid']), 'agentname');
$first = '您好,有一个代理提现申请待审核。';
$type = '代理[' . $storename . ']申请提现';
$status = '待审核';
$remark = '请尽快前往系统后台审核';
$content = '申请金额:¥' . $num;
News::jobNotice($_W['wlsetting']['adminmid'], $first, $type, $content, $status, $remark,$data['applytime']);
}
Commons::sRenderSuccess('申请成功!');
} else {
Commons::sRenderError('申请失败!');
}
}
}
Commons::sRenderError('申请失败!');
}
if ($_GPC['num']) {
$num = $_GPC['num'];
if ($num > $a['nowmoney']) {
Commons::sRenderError('申请金额大于账户现有金额!');
}
$percentMoney = sprintf("%.2f", $agentpercent * $num / 100);
$money = sprintf("%.2f", $num - $agentpercent * $num / 100);
Commons::sRenderSuccess('申请成功!',['num' => $num, 'percentMoney' => $percentMoney, 'money' => $money]);
}
include wl_template('finace/agentApply');
}
//代理商提现账户设置
public function account() {
global $_W, $_GPC;
$a = Util::getSingelData('cashopenid,bank_username,payment_type,bank_name,card_number,alipay', PDO_NAME . 'agentusers', array('id' => $_W['aid']));
//提现账号
if ($a['cashopenid']) {
$user = Member::wl_member_get($a['cashopenid']);
}
if (checksubmit('submit')) {
$cashmid = $_GPC['openid'];
$realname = $_GPC['realname'];
$data = $_GPC['data'];
$data['cashopenid'] = $cashmid;
pdo_update(PDO_NAME . 'agentusers', $data, array('id' => $_W['aid']));
$upwhere = empty(intval($cashmid)) ? array('openid' => $cashmid) : array('id' => $cashmid);
pdo_update(PDO_NAME . 'member', array('realname' => $realname), $upwhere);
wl_message('保存成功!', referer(), 'success');
}
//获取平台开通的打款方式
$cashset = Setting::wlsetting_read('cashset')['payment_type'];
include wl_template('finace/useraccount');
}
//代理商提现记录
public function cashApplyAgentRecord() {
global $_W, $_GPC;
$pindex = max(1, intval($_GPC['page']));
$psize = 10;
$where = array('uniacid' => $_W['uniacid'], 'type' => array(1, 2), 'aid' => $_W['aid']);
if ($_GPC['orderid']) {
$where['id'] = $_GPC['orderid'];
}
$list = pdo_getslice(PDO_NAME . 'settlement_record', $where, array($pindex, $psize), $total, array(), '', 'id DESC');
foreach ($list as $key => &$value) {
if ($value['type'] == 1) {
$value['aName'] = pdo_getcolumn(PDO_NAME . 'merchantdata', array('id' => $value['sid']), 'storename');
} else {
$value['aName'] = Util::idSwitch('aid', 'aName', $value['aid']);
$value['spercent'] = sprintf("%.2f", $value['spercent']);
}
}
$pager = wl_pagination($total, $pindex, $psize);
include wl_template('finace/cashApplyAgentRecord');
}
}

389
addons/weliam_smartcity/web/controller/finace/wlCash.ctrl.php

@ -0,0 +1,389 @@
<?php
defined('IN_IA') or exit('Access Denied');
class WlCash_WeliamController {
public function cashSurvey() {
global $_W, $_GPC;
$refresh = $_GPC['refresh'] ? 1 : 0;
$timetype = $_GPC['timetype'];
$time_limit = $_GPC['time_limit'];
$merchantid = $_GPC['merid'];
if ($time_limit) {
$starttime = strtotime($_GPC['time_limit']['start']);
$endtime = strtotime($_GPC['time_limit']['end']);
}
if (empty($starttime) || empty($endtime)) {
$starttime = strtotime('-1 month');
$endtime = time();
}
$merchants = pdo_getall('wlmerchant_merchantdata', array('aid' => $_W['aid']));
$data = Merchant::agentCashSurvey($refresh, $timetype, $starttime, $endtime, $merchantid);
$agents = $data[0];
$children = $data[1];
$max = $data[2];
$allMoney = $data[3];
$time = $data[4];
$newdata = $data[5];
// wl_debug($merchantid);
include wl_template('finace/cashSurvey');
}
public function cashset() {
global $_W, $_GPC;
$cashset = Setting::agentsetting_read('cashset');
if (checksubmit('submit')) {
$set = $_GPC['cashset'];
$res1 = Setting::agentsetting_save($set, 'cashset');
if ($res1) {
wl_message('保存设置成功!', referer(), 'success');
} else {
wl_message('保存设置失败!', referer(), 'error');
}
}
include wl_template('finace/cashset');
}
public function cashApply() {
global $_W, $_GPC;
//提现申请
if ($_GPC['type'] == 'submit' && !empty($_GPC['id'])) {
pdo_update(PDO_NAME . 'settlement_record', array('status' => 2, 'updatetime' => TIMESTAMP), array('id' => $_GPC['id']));
wl_message('提交成功!', web_url('finace/finaceWithdrawalApply/cashApply', array('status' => 2)), 'success');
} else if ($_GPC['type'] == 'reject' && !empty($_GPC['id'])) {
pdo_update(PDO_NAME . 'settlement_record', array('status' => '-2', 'updatetime' => TIMESTAMP), array('id' => $_GPC['id']));
$record = pdo_get(PDO_NAME . 'settlement_record', array('id' => $_GPC['id']), array('type', 'sid', 'aid', 'sapplymoney', 'id'));
// wl_debug($record);
if ($record['type'] == 1) {
Store::settlement($record['id'], 0, $record['sid'], $record['sapplymoney'], 0, $record['sapplymoney'], 7, 0);
} else if ($record['type'] == 2) {
Store::settlement($record['id'], 0, $record['sid'], $record['sapplymoney'], 0, 0, 7, 0);
}
wl_message('驳回成功!', web_url('finace/finaceWithdrawalApply/cashApply', array('status' => 6)), 'success');
} else {
$where = array();
$status = $_GPC['status'] ? $_GPC['status'] : 1;
if ($status == 1)
$where['status'] = 1;
if ($status == 2)
$where['status'] = 2;
if ($status == 3)
$where['status'] = 3;
if ($status == 4)
$where['status'] = 4;
if ($status == 5)
$where['status'] = 5;
if ($status == 6)
$where['#status#'] = '(-1,-2)';
$where['type'] = 1;
$where['aid'] = $_W['aid'];
$list = Util::getNumData('*', PDO_NAME . 'settlement_record', $where);
$list = $list[0];
foreach ($list as $key => &$value) {
$value['sName'] = Util::idSwitch('sid', 'sName', $value['sid']);
$value['aName'] = Util::idSwitch('aid', 'aName', $value['aid']);
}
}
include wl_template('finace/cashConfirm');
}
/**
* Comment: 编辑代理商分账信息
*/
public function allidset(){
global $_W, $_GPC;
$cashset = Util::getSingelData('wxpaysetid,apppaysetid', PDO_NAME . 'agentusers', array('id' => $_W['aid']));
//支付信息列表
if($_W['wlsetting']['cashset']['allocationtype'] == 1){
$paylist = pdo_getall(PDO_NAME."payment",['uniacid'=>$_W['uniacid'],'type'=>1],['id','name']);
}
if (checksubmit('submit')) {
$set = $_GPC['cashset'];
// if ($set['wxsysalltype'] == 1) {
// if (empty($set['wxmerchantid'])) {
// show_json(0, '请设置公众号代理分账商户号');
// }
// if (empty($set['wxmerchantname'])) {
// show_json(0, '请设置公众号代理分账商户名称');
// }
// } else if ($set['wxsysalltype'] == 2) {
// if (empty($set['wxallmid'])) {
// show_json(0, '请设置公众号代理分账个人微信号');
// } else {
// $member = pdo_get('wlmerchant_member', array('id' => $set['wxallmid']), array('openid'));
// if (empty($member['openid'])) {
// show_json(0, '所选用户无微信公众号账户信息,请重选');
// }
// }
// }
// if ($set['appsysalltype'] == 1) {
// if (empty($set['appmerchantid'])) {
// show_json(0, '请设置小程序代理分账商户号');
// }
// if (empty($set['appmerchantname'])) {
// show_json(0, '请设置小程序代理分账商户名称');
// }
// } else if ($set['appsysalltype'] == 2) {
// if (empty($set['appallmid'])) {
// show_json(0, '请设置小程序代理分账个人微信号');
// } else {
// $member = pdo_get('wlmerchant_member', array('id' => $set['appallmid']), array('wechat_openid'));
// if (empty($member['wechat_openid'])) {
// show_json(0, '所选用户无微信小程序账户信息,请重选');
// }
// }
// }
$res1 = pdo_update(PDO_NAME . 'agentusers', $set, array('id' => $_W['aid']));
if ($res1) {
show_json(1);
} else {
show_json(0,'保存设置失败,请重试');
}
}
include wl_template('finace/allidset');
}
public function detail() {
global $_W, $_GPC;
//提现申请详情
$id = $_GPC['id'];
$where = array();
$where['id'] = $id;
$settlementRecord = Util::getSingelData('*', PDO_NAME . 'settlement_record', $where);
$settlementRecord['sName'] = Util::idSwitch('sid', 'sName', $settlementRecord['sid']);
$settlementRecord['aName'] = Util::idSwitch('aid', 'aName', $settlementRecord['aid']);
$orders = unserialize($settlementRecord['ids']);
$list = array();
foreach ($orders as $id) {
if ($settlementRecord['type'] == 1) {
if ($settlementRecord['type2'] == 1) {
$v = Util::getSingelData('*', PDO_NAME . 'order', array('id' => $id));
$coupon = pdo_get('wlmerchant_couponlist', array('id' => $v['fkid']), array('title', 'logo'));
$merchant = pdo_get('wlmerchant_merchantdata', array('id' => $v['sid']), array('storename'));
$member = pdo_get('wlmerchant_member', array('id' => $v['mid']), array('nickname', 'avatar', 'mobile'));
$v['gname'] = $coupon['title'];
$v['gimg'] = tomedia($coupon['logo']);
$v['storename'] = $merchant['storename'];
$v['nickname'] = $member['nickname'];
$v['headimg'] = $member['avatar'];
$v['mobile'] = $member['mobile'];
$list[] = $v;
} else if ($settlementRecord['type2'] == 2) {
$v = Util::getSingelData('*', PDO_NAME . 'order', array('id' => $id));
$fightgoods = pdo_get('wlmerchant_fightgroup_goods', array('id' => $v['fkid']), array('name', 'logo'));
$merchant = pdo_get('wlmerchant_merchantdata', array('id' => $v['sid']), array('storename'));
$member = pdo_get('wlmerchant_member', array('id' => $v['mid']), array('nickname', 'avatar', 'mobile'));
$v['gname'] = $fightgoods['name'];
$v['gimg'] = tomedia($fightgoods['logo']);
$v['storename'] = $merchant['storename'];
$v['nickname'] = $member['nickname'];
$v['headimg'] = $member['avatar'];
$v['mobile'] = $member['mobile'];
$list[] = $v;
} else {
$list[] = Rush::getSingleOrder($id, "*");
}
}
if ($settlementRecord['type'] == 2)
$list[] = Util::getSingelData("*", PDO_NAME . 'vip_record', array('id' => $id));
if ($settlementRecord['type'] == 3)
$list[] = Util::getSingelData("*", PDO_NAME . 'halfcard_record', array('id' => $id));
}
if ($settlementRecord['type'] == 2) {
foreach ($list as $key => &$value) {
$value['areaName'] = Util::idSwitch('areaid', 'areaName', $value['areaid']);
$value['member'] = Member::wl_member_get($value['mid']);
}
}
if ($settlementRecord['type'] == 3) {
foreach ($list as $key => &$v) {
$user = pdo_get('wlmerchant_member', array('id' => $v['mid']));
$v['nickname'] = $user['nickname'];
$v['avatar'] = $user['avatar'];
$v['mobile'] = $user['mobile'];
}
}
include wl_template('finace/cashDetail');
}
public function settlement() {
global $_W, $_GPC;
$id = $_GPC['id'];
$where = array();
$where['id'] = $id;
$settlementRecord = Util::getSingelData('*', PDO_NAME . 'settlement_record', $where);
$settlementRecord['sName'] = Util::idSwitch('sid', 'sName', $settlementRecord['sid']);
$settlementRecord['aName'] = Util::idSwitch('aid', 'aName', $settlementRecord['aid']);
$_GPC['type'] = $_GPC['type'] ? $_GPC['type'] : 'settlement';
if ($_GPC['type'] == 'money_record') {
$pindex = max(1, intval($_GPC['page']));
$psize = 15;
$moneyRecordData = SingleMerchant::getMoneyRecord($id, $pindex, $psize, 1);
$moneyRecord = $moneyRecordData[0];
$pager = $moneyRecordData[1];
foreach ($moneyRecord as &$item) {
if ($item['orderid'])
$item['order'] = Rush::getSingleOrder($item['orderid'], '*');
}
}
if ($_GPC['type'] == 'settlement_record') {
//结算记录
$id = $_GPC['id'];
$merchant = Store::getSingleStore($id);
$account = pdo_fetch("SELECT * FROM " . tablename('tg_merchant_account') . " WHERE uniacid = {$_W['uniacid']} and merchantid={$id}");
$merchant['amount'] = $account['amount'];
$merchant['no_money'] = $account['no_money'];
$merchant['no_money_doing'] = $account['no_money_doing'];
$list = pdo_fetchall("select * from" . tablename('tg_merchant_record') . "where merchantid='{$id}' and uniacid={$_W['uniacid']} ");
}
if ($_GPC['type'] == 'settlement') {
//结算操作
$merchant = Store::getSingleStore($settlementRecord['sid']);
$_GPC['accountType'] = $_GPC['accountType'] ? $_GPC['accountType'] : 'f2f';
if (checksubmit('submit') && $_GPC['accountType'] == 'weixin') {
}
if (checksubmit('submit') && $_GPC['accountType'] == 'f2f') {
if ($settlementRecord['status'] != 4)
wl_message('结算状态错误!', web_url('finace/finaceWithdrawalApply/cashApply'), 'error');
$money = $_GPC['money'];
//实际结算给商家
$spercent = $_GPC['spercent'] ? $_GPC['spercent'] : $settlementRecord['spercent'];
//佣金百分比
$spercentMoney = $_GPC['spercentMoney'];
//佣金
if (is_numeric($money)) {
if (pdo_update(PDO_NAME . 'settlement_record', array('status' => 5, 'updatetime' => TIMESTAMP, 'spercentmoney' => $spercentMoney, 'spercent' => $spercent, 'sgetmoney' => $money), array('id' => $_GPC['id']))) {
$orders = unserialize($settlementRecord['ids']);
foreach ($orders as $iid) {
if ($settlementRecord['type2']) {
pdo_update(PDO_NAME . 'order', array('issettlement' => 2), array('id' => $iid));
} else {
pdo_update(PDO_NAME . 'rush_order', array('issettlement' => 2), array('id' => $iid));
}
}
}
wl_message('已结算给商家!', web_url('finace/finaceWithdrawalApply/cashApply', array('status' => 5)), 'success');
} else {
wl_message('结算金额输入错误!', referer(), 'error');
}
wl_message('操作成功!', referer(), 'success');
}
}
include wl_template('finace/account');
}
public function output() {
global $_W, $_GPC;
$where['id'] = $_GPC['id'];
$settlementRecord = Util::getSingelData('*', PDO_NAME . 'settlement_record', $where);
$orders = unserialize($settlementRecord['ids']);
$list = array();
if ($settlementRecord['type'] == 1) {
foreach ($orders as $id) {
if ($settlementRecord['type2'] == 1) {
$v = Util::getSingelData('*', PDO_NAME . 'order', array('id' => $id));
$coupon = pdo_get('wlmerchant_couponlist', array('id' => $v['fkid']), array('title', 'logo'));
$merchant = pdo_get('wlmerchant_merchantdata', array('id' => $v['sid']), array('storename'));
$member = pdo_get('wlmerchant_member', array('id' => $v['mid']), array('nickname', 'avatar', 'mobile'));
$v['title'] = $coupon['title'];
$v['gimg'] = tomedia($coupon['logo']);
$v['storename'] = $merchant['storename'];
$v['nickname'] = $member['nickname'];
$v['headimg'] = $member['avatar'];
$v['mobile'] = $member['mobile'];
$v['actualprice'] = $v['price'];
$v['gname'] = $v['title'];
$list[] = $v;
} else {
$list[] = Rush::getSingleOrder($id, "*");
}
}
}
if ($settlementRecord['type'] == 2) {
foreach ($orders as $id) {
$order = Util::getSingelData("*", PDO_NAME . 'vip_record', array('id' => $id));
$member = Member::wl_member_get($order['mid']);
$order['nickname'] = $member['nickname'];
$order['actualprice'] = $order['price'];
$order['mobile'] = $member['mobile'];
$order['gname'] = 'VIP充值';
$list[] = $order;
}
}
if ($settlementRecord['type'] == 3) {
foreach ($orders as $id) {
$order = Util::getSingelData("*", PDO_NAME . 'halfcard_record', array('id' => $id));
$member = Member::wl_member_get($order['mid']);
$order['nickname'] = $member['nickname'];
$order['actualprice'] = $order['price'];
$order['mobile'] = $member['mobile'];
$order['gname'] = '一卡通充值';
$list[] = $order;
}
}
$orders = $list;
if ($settlementRecord['status'] == 1)
$settleStatus = '代理审核中';
if ($settlementRecord['status'] == 2)
$settleStatus = '系统审核中';
if ($settlementRecord['status'] == 3)
$settleStatus = '系统审核通过,待结算';
if ($settlementRecord['status'] == 4)
$settleStatus = '已结算到代理';
if ($settlementRecord['status'] == 5)
$settleStatus = '已结算到商家';
if ($settlementRecord['status'] == -1)
$settleStatus = '系统审核不通过';
if ($settlementRecord['status'] == -2)
$settleStatus = '代理审核不通过';
$html = "\xEF\xBB\xBF";
$filter = array('aa' => '商户单号', 'bb' => '昵称', 'cc' => '电话', 'dd' => '支付金额', 'ee' => '订单状态', 'jj' => '结算状态', 'ff' => '支付时间', 'gg' => '商品名称', 'hh' => '微信订单号');
foreach ($filter as $key => $title) {
$html .= $title . "\t,";
}
$html .= "\n";
foreach ($orders as $k => $v) {
if ($v['status'] == '0')
$thisstatus = '未支付';
if ($v['status'] == '1')
$thisstatus = '已支付';
if ($v['status'] == '2')
$thisstatus = '已消费';
$time = date('Y-m-d H:i:s', $v['paytime']);
$orders[$k]['aa'] = $v['orderno'];
$orders[$k]['bb'] = $v['nickname'];
$orders[$k]['cc'] = $v['mobile'];
$orders[$k]['dd'] = $v['actualprice'];
$orders[$k]['ee'] = $thisstatus;
$orders[$k]['jj'] = $settleStatus;
$orders[$k]['ff'] = $time;
$orders[$k]['gg'] = $v['gname'];
$orders[$k]['hh'] = $v['transid'];
foreach ($filter as $key => $title) {
$html .= $orders[$k][$key] . "\t,";
}
$html .= "\n";
}
header("Content-type:text/csv");
header("Content-Disposition:attachment; filename=未结算订单.csv");
echo $html;
exit();
}
}

216
addons/weliam_smartcity/web/controller/goodshouse/category.ctrl.php

@ -0,0 +1,216 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Category_WeliamController {
/**
* Comment: 商品分类名称修改
* Author: zzw
* Date: 2019/12/20 14:20
*/
public function cateNameChange(){
global $_W,$_GPC;
#1、参数获取
$plugin = $_GPC['plugin'] OR show_json(0,'参数错误,请刷新重试!');
$id = $_GPC['id'] OR show_json(0,'参数错误,请刷新重试!');
$value = $_GPC['value'] OR show_json(0,'参数错误,请刷新重试!');
#1、信息修改
switch ($plugin) {
case 'rush':
$tableName = PDO_NAME."rush_category";
break;//抢购
case 'groupon':
$tableName = PDO_NAME."groupon_category";
break;//团购
case 'wlfightgroup':
$tableName = PDO_NAME."fightgroup_category";
break;//拼团
case 'bargain':
$tableName = PDO_NAME."bargain_category";
break;//砍价
}
$res = pdo_update($tableName,['name'=>$value],['id'=>$id]);
if($res) show_json(1,'修改成功');
else show_json(0,'修改失败,请刷新重试!');
}
/**
* Comment: 调取分类编辑页面
* Author: zzw
* Date: 2019/12/20 14:35
*/
public function cateModel(){
global $_W,$_GPC;
#1、参数获取
$plugin = $_GPC['plugin'] OR show_json(0,'参数错误,请刷新重试!');
$id = $_GPC['id'];
#1、参数获取
if($id){
switch ($plugin) {
case 'rush':
$tableName = PDO_NAME."rush_category";
break;//抢购
case 'groupon':
$tableName = PDO_NAME."groupon_category";
break;//团购
case 'wlfightgroup':
$tableName = PDO_NAME."fightgroup_category";
break;//拼团
case 'bargain':
$tableName = PDO_NAME."bargain_category";
break;//砍价
}
$info = pdo_get($tableName,['id'=>$id]);
if(!$info) show_json(0,'分类不存在,请刷新重试!');
if($plugin == 'wlfightgroup'){
$info['sort'] = $info['listorder'];
$info['thumb'] = $info['logo'];
unset($info['listorder']);
unset($info['logo']);
}
}
include wl_template('goodshouse/cate_model');
}
/**
* Comment: 商品分类添加/编辑
* Author: zzw
* Date: 2019/12/20 14:48
*/
public function cateEdit(){
global $_W,$_GPC;
#1、参数获取
$plugin = $_GPC['plugin'] OR show_json(0,'参数错误,请刷新重试!');
$id = $_GPC['id'];
$data = $_GPC['data'];
#2、表获取
switch ($plugin) {
case 'rush':
$tableName = PDO_NAME."rush_category";
break;//抢购
case 'groupon':
$tableName = PDO_NAME."groupon_category";
break;//团购
case 'wlfightgroup':
$tableName = PDO_NAME."fightgroup_category";
$data['listorder'] = $data['sort'];
$data['logo'] = $data['thumb'];
unset($data['sort']);
unset($data['thumb']);
break;//拼团
case 'bargain':
$tableName = PDO_NAME."bargain_category";
break;//砍价
}
#3、添加/修改 操作
if($id > 0){
//修改操作
$res = pdo_update($tableName,$data,['id'=>$id]);
}else{
//添加操作
if(empty($data['name'])) show_json(0,'分类名称不能为空!');
$data['aid'] = $_W['aid'];
$data['uniacid'] = $_W['uniacid'];
$res = pdo_insert($tableName,$data);
}
#4、判断操作是否超过
if($res) show_json(1, '操作成功');
else show_json(0, '操作失败,请刷新页面重试!');
}
/**
* Comment: 删除分类
* Author: zzw
* Date: 2019/12/20 14:54
*/
public function cateDelete(){
global $_W,$_GPC;
#1、参数获取
$plugin = $_GPC['plugin'] OR show_json(0,'参数错误,请刷新重试!');
$id = $_GPC['id'];
#2、表获取
switch ($plugin) {
case 'rush':
$tableName = PDO_NAME."rush_category";
break;//抢购
case 'groupon':
$tableName = PDO_NAME."groupon_category";
break;//团购
case 'wlfightgroup':
$tableName = PDO_NAME."fightgroup_category";
break;//拼团
case 'bargain':
$tableName = PDO_NAME."bargain_category";
break;//砍价
}
#3、删除分类
$res = pdo_delete($tableName,['id'=>$id]);
#4、判断操作是否超过
if($res) show_json(1, '操作成功');
else show_json(0, '操作失败,请刷新页面重试!');
}
/**
* Comment: 导入商家分类信息
* Author: zzw
* Date: 2019/12/20 15:27
*/
public function cateImportShop(){
global $_W,$_GPC;
global $_W,$_GPC;
#1、参数获取
$plugin = $_GPC['plugin'] OR show_json(0,'参数错误,请刷新重试!');
#2、表获取
switch ($plugin) {
case 'rush':
$tableName = PDO_NAME."rush_category";
break;//抢购
case 'groupon':
$tableName = PDO_NAME."groupon_category";
break;//团购
case 'wlfightgroup':
$tableName = PDO_NAME."fightgroup_category";
break;//拼团
case 'bargain':
$tableName = PDO_NAME."bargain_category";
break;//砍价
case 'activity':
$tableName = PDO_NAME."activity_category";
break;//活动
}
#3、商家分类获取(仅获取一级)
$shopList = pdo_fetchall("SELECT `name`,thumb FROM ".tablename(PDO_NAME."category_store")
." WHERE aid = {$_W['aid']} AND uniacid = {$_W['uniacid']} AND parentid = 0 AND state = 0 ORDER BY displayorder ASC ");
#4、获取当前分类列表最大排序
$where = " WHERE aid = {$_W['aid']} AND uniacid = {$_W['uniacid']} ";
if($plugin == 'wlfightgroup'){
$max = pdo_fetchcolumn("SELECT MAX(listorder) FROM ".tablename($tableName).$where);
}else{
$max = pdo_fetchcolumn("SELECT MAX(sort) FROM ".tablename($tableName).$where);
}
#4、循环进行导入操作
foreach ($shopList as $key => $val) {
$max++;
$data = [
'aid' => $_W['aid'] ,
'uniacid' => $_W['uniacid'] ,
'name' => $val['name'] ,
];
//根据类型 进行排序和图片的定义
if($plugin == 'wlfightgroup'){
$data['logo'] = $val['thumb'];
$data['listorder'] = $max;
}else if($plugin == 'activity'){
$data['logo'] = $val['thumb'];
$data['sort'] = $max;
$data['status'] = 1;
} else{
$data['thumb'] = $val['thumb'];
$data['sort'] = $max;
}
//判断是否已经存在同名称的分类 不存在则添加 存在则跳过
if(!pdo_get($tableName,['name'=>$data['name'],'uniacid'=>$_W['uniacid'],'aid'=>$_W['aid']])){
pdo_insert($tableName,$data);
}
}
show_json(1, '操作成功');
}
}

1113
addons/weliam_smartcity/web/controller/goodshouse/goodshouse.ctrl.php

File diff suppressed because it is too large

129
addons/weliam_smartcity/web/controller/store/category.ctrl.php

@ -0,0 +1,129 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Category_WeliamController{
/**
* 商户分类列表
*/
public function index(){
global $_W,$_GPC;
$pindex = max(1, intval($_GPC['page']));
$psize = 100;
$categoryes = Store::getAllCategory($pindex-1,$psize,0);
$categorys = $categoryes['data'];
$pager = wl_pagination($categoryes['count'], $pindex, $psize);
if(!empty($categorys)){
foreach($categorys as $key=>$value){
$childrens = Store::getAllCategory(0,100,$value['id']);
$categorys[$key]['children'] = $childrens['data'];
}
}
include wl_template('store/categoryIndex');
}
/**
* Comment: 编辑商户
*/
public function Edit(){
global $_W,$_GPC;
if(checksubmit('submit')){
$category = $_GPC['category'];
if(!empty($_GPC['parentid'])){
$category['parentid'] =intval($_GPC['parentid']);
$category['visible_level']=2;
}else{
$category['parentid'] =0;
$category['visible_level']=1;
}
$category['name'] = trim($category['name']);
$category['displayorder'] = intval($category['displayorder']);
$category['enabled'] = intval($_GPC['enabled']);
//判断时候有值进行改状态
if(!empty($category['abroad'])) {
$category['abroad'] = $category['abroad'];
$category['state'] = 1;
}
else {
$category['abroad'] = $category['abroad'];
$category['state'] = 0;
}
if(Customized::init('storecate1520') > 0){
$advlogo = $_GPC['advlogo'];
$advlink = $_GPC['advlink'];
$advarray = [];
foreach($advlogo as $dkey => $dle){
$dlea['thumb'] = $advlogo[$dkey];
$dlea['link'] = $advlink[$dkey];
$advarray[] = $dlea;
}
$category['advs'] = serialize($advarray);
}
if(!empty($_GPC['id'])){
if(Store::categoryEdit($category,$_GPC['id'])) wl_message('保存成功',web_url('store/category/index'),'success');
}else{
if(Store::categoryEdit($category)) wl_message('保存成功',web_url('store/category/index'),'success');
}
wl_message('保存失败',referer(),'error');
}
if(!empty($_GPC['id']))
$category = Store::getSingleCategory($_GPC['id']);
$category['adv'] = unserialize($category['advs']);
include wl_template('store/categoryEdit');
}
/**
* Comment: 删除商户
*/
public function Delete(){
global $_W,$_GPC;
if(Store::categoryDelete($_GPC['id'])) wl_message('删除成功',web_url('store/category/index'),'success');
wl_message('删除失败',referer(),'error');
}
/**
* Comment: 商户分类获取
*/
public function getCategory(){
global $_W,$_GPC;
if(!empty($_GPC['parentid'])){
$categoryes = Store::getAllCategory(0,100,$_GPC['parentid']);
}else{
$categoryes = Store::getAllCategory();
}
$categorys = $categoryes['data'];
die(json_encode(array('status'=>1,'data'=>$categorys,'msg'=>'')));
}
/**
* Comment: 修改状态
* Author: zzw
* Date: 2019/9/18 16:44
*/
public function changeStatus (){
global $_W , $_GPC;
#1、获取参数信息
$id = $_GPC['id'] OR Commons::sRenderError('缺少参数:导航id');
$status = $_GPC['status'] ? : 0;
#1、修改操作
$res = pdo_update(PDO_NAME."category_store",['enabled'=>$status],['id'=>$id]);
if($res) Commons::sRenderSuccess('修改成功');
else Commons::sRenderError('修改失败,请刷新重试!');
}
/**
* Comment: 1520定制一级分类幻灯片页面
* Author: wlf
* Date: 2021/12/22 15:34
*/
public function advinfo(){
global $_W, $_GPC;
$kw = $_GPC['kw'];
include wl_template('store/advinfo');
}
}

55
addons/weliam_smartcity/web/controller/store/comment.ctrl.php

@ -0,0 +1,55 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Comment_WeliamController{
public function setting(){
global $_W,$_GPC;
$data = Setting::agentsetting_read('comment');
if($_GPC['token']){
Setting::agentsetting_save($_GPC['data'], 'comment');
wl_message("操作成功!",web_url('store/storeComment/index'),'success');
}
include wl_template('store/comment_setting');
}
/**
* Comment: 代理端商户设置
* Author: zzw
*/
public function storeSet(){
global $_W,$_GPC;
if (checksubmit('submit')) {
//处理数据值
$storeSet = $_GPC['store_set'];
$order = $_GPC['order'];
$storeSet['order'] = serialize($order);
$res1 = Setting::wlsetting_save($storeSet,'agentsStoreSet');
wl_message('保存设置成功!', referer(),'success');
}
$storeSet = Setting::wlsetting_read('agentsStoreSet');
if(empty($storeSet['order'])){
$order = [
'sporder' => 8,
'spstatus' => 1,
'xqorder' => 7,
'xqstatus' => 1,
'dtorder' => 6,
'dtstatus' => 1,
'plorder' => 5,
'plstatus' => 1,
'xcorder' => 4,
'xcstatus' => 1,
'xcxmorder' => 3,
'xcxmstatus' => 1,
'sjzzorder' => 2,
'sjzzstatus' => 1,
'zporder' => 1,
'zpstatus' => 1,
];
}else{
$order = unserialize($storeSet['order']);
}
include wl_template('store/storeSet');
}
}

58
addons/weliam_smartcity/web/controller/store/group.ctrl.php

@ -0,0 +1,58 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Group_WeliamController{
/**
* 商户分组列表
*/
public function index(){
global $_W,$_GPC;
$pindex = max(1, intval($_GPC['page']));
$psize = 10;
$groupes = Store::getAllGroup($pindex-1,$psize);
$groups = $groupes['data'];
$pager = wl_pagination($groupes['count'], $pindex, $psize);
include wl_template('store/sgroupIndex');
}
/**
* 编辑商户分组
*/
public function edit(){
global $_W,$_GPC;
$chargelist = pdo_getall('wlmerchant_chargelist',array('uniacid' => $_W['uniacid'],'status'=>1),array('id','name'));
$agentgroupid = pdo_getcolumn(PDO_NAME.'agentusers',array('id'=>$_W['aid']),'groupid');
$pluginswitch = pdo_getcolumn(PDO_NAME.'agentusers_group',array('id'=>$agentgroupid),'package');
$pluginswitch = unserialize($pluginswitch);
if(checksubmit('submit')){
$group = $_GPC['group'];
$group['createtime'] = time();
$group['name'] = trim($group['name']);
$group['enabled'] = $_GPC['enabled'];
$group['isdefault'] = $_GPC['isdefault'];
$group['package'] = $group['package'];
$group['authority'] = serialize($_GPC['authority']);
if(!empty($_GPC['id'])){
if(Store::editGroup($group,$_GPC['id'])) wl_message('保存成功',web_url('store/group/index'),'success');
}else{
if(Store::editGroup($group)) wl_message('保存成功',web_url('store/group/index'),'success');
}
wl_message('保存失败',referer(),'error');
}
if(!empty($_GPC['id'])){
$group = Store::getSingleGroup($_GPC['id']);
$group['authority'] = unserialize($group['authority']);
}
include wl_template('store/sgroupEdit');
}
/**
* 删除分组
*/
public function delete(){
global $_W,$_GPC;
if(Store::deleteGroup($_GPC['id'])) wl_message('删除成功',web_url('store/group/index'),'success');
wl_message('删除失败',referer(),'error');
}
}

970
addons/weliam_smartcity/web/controller/store/merchant.ctrl.php

@ -0,0 +1,970 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Merchant_WeliamController {
public function index() {
global $_W, $_GPC;
//校验商户入口文件
$citystore = IA_ROOT . '/web/citystore.php';
$mcitystore = PATH_MODULE . '/web/citystore.php';
if (!file_exists($citystore) || md5_file($citystore) != md5_file($mcitystore)) {
copy($mcitystore, $citystore);
}
$pindex = max(1, intval($_GPC['page']));
$psize = 10;
$where = array('uniacid' => $_W['uniacid'], 'status' => 2, 'aid' => $_W['aid']);
$deliverystatus = $_GPC['deliverystatus'] ? : 0;
$isExport = $_GPC['export'] ? : 0;
if($_W['aid'] > 0){
$groups = pdo_fetchall("SELECT id,name FROM " . tablename('wlmerchant_chargelist') . "WHERE uniacid = {$_W['uniacid']} AND aid IN (0,{$_W['aid']}) AND status = 1 ORDER BY sort DESC,id DESC", [], 'id');
}else{
$groups = pdo_fetchall("SELECT id,name FROM " . tablename('wlmerchant_chargelist') . "WHERE uniacid = {$_W['uniacid']} AND aid = 0 AND status = 1 ORDER BY sort DESC,id DESC", [], 'id');
}
if ($_GPC['keyword']) {
if ($_GPC['keywordtype'] == 1) {
$where['id'] = trim($_GPC['keyword']);
} else if ($_GPC['keywordtype'] == 2) {
$where['@storename@'] = trim($_GPC['keyword']);
} else if ($_GPC['keywordtype'] == 3) {
$where['@realname@'] = trim($_GPC['keyword']);
} else if ($_GPC['keywordtype'] == 4) {
$where['mobile^tel'] = trim($_GPC['keyword']);
} else if ($_GPC['keywordtype'] == 5) {
$sid = pdo_getcolumn(PDO_NAME.'merchantuser',array('id'=>trim($_GPC['keyword'])),'storeid');
$where['id'] = trim($sid);
}
}
if ($_GPC['groupid']) {
$where['groupid'] = $_GPC['groupid'];
}
if ($_GPC['enabled'] == 5) {
$where['enabled'] = 0;
$where['status'] = 1;
} elseif ($_GPC['enabled'] == 6) {
$where['enabled'] = 0;
} else {
$where['enabled'] = $_GPC['enabled'] = $_GPC['enabled'] != '' ? $_GPC['enabled'] : 1;
}
if (!empty($_GPC['time_limit']) && $_GPC['timetype'] ) {
$starttime = strtotime($_GPC['time_limit']['start']);
$endtime = strtotime($_GPC['time_limit']['end']);
if($_GPC['timetype'] == 1){
$where['createtime>'] = $starttime;
$where['createtime<'] = $endtime + 86400;
}else{
$where['endtime>'] = $starttime;
$where['endtime<'] = $endtime + 86400;
}
}
if (empty($starttime) || empty($endtime)) {
$starttime = strtotime('-1 month');
$endtime = time();
}
if($deliverystatus > 0) $where['deliverystatus'] = $deliverystatus == 2 ? 0 : $deliverystatus;
if (!empty($_GPC['merchant_type'])) $where['merchant_type'] = $_GPC['merchant_type'];
//判断是否为导出操作
if($isExport == 1){
$whereData = Util::createStandardWhereString($where);
foreach($whereData[1] as $key => $icon){
$whereData[0] = str_replace($key,"'{$icon}'",$whereData[0]);
}
Store::exportShop($whereData[0]);
die;
}
$field = "id,logo,storename,mobile,nowmoney,realname,tel,createtime,endtime,enabled,nowmoney,groupid,merchant_type";
$storesData = Util::getNumData($field, PDO_NAME . 'merchantdata', $where, 'listorder desc,id desc', $pindex, $psize, 1);
$stores = $storesData[0];
foreach ($stores as $key => &$value) {
$value['logo'] = tomedia($value['logo']);
//店铺过期操作
if ($_GPC['enabled'] != 4) {
if ($value['endtime'] < time() && !empty($value['endtime'])) {
$res = pdo_update(PDO_NAME . 'merchantdata', array('enabled' => 3), array('uniacid' => $_W['uniacid'], 'id' => $value['id']));
if ($res) { //下架商品
//抢购商品
pdo_update('wlmerchant_rush_activity', array('status' => 4), array('uniacid' => $_W['uniacid'], 'sid' => $value['id']));
//拼团商品
pdo_update('wlmerchant_fightgroup_goods', array('status' => 0), array('uniacid' => $_W['uniacid'], 'merchantid' => $value['id']));
//卡券
pdo_update('wlmerchant_couponlist', array('status' => 0), array('uniacid' => $_W['uniacid'], 'merchantid' => $value['id']));
//特权
pdo_update('wlmerchant_halfcardlist', array('status' => 0), array('uniacid' => $_W['uniacid'], 'merchantid' => $value['id']));
//礼包
pdo_update('wlmerchant_package', array('status' => 0), array('uniacid' => $_W['uniacid'], 'merchantid' => $value['id']));
}
}
}
//查询店员
$value['clerknum'] = pdo_fetchcolumn('SELECT count(id) FROM ' . tablename('wlmerchant_merchantuser') . " WHERE storeid = {$value['id']} AND ismain != 1");
$value['groupname'] = $value['groupid'] ? pdo_getcolumn('wlmerchant_chargelist', array('id' => $value['groupid']), 'name') : '';
}
$pager = $storesData[1];
$status0 = pdo_fetchcolumn('SELECT COUNT(id) FROM ' . tablename(PDO_NAME . 'merchantdata') . " WHERE enabled = 0 and uniacid={$_W['uniacid']} and status=2 and aid={$_W['aid']}");
$status1 = pdo_fetchcolumn('SELECT COUNT(id) FROM ' . tablename(PDO_NAME . 'merchantdata') . " WHERE enabled = 1 and uniacid={$_W['uniacid']} and status=2 and aid={$_W['aid']}");
$status2 = pdo_fetchcolumn('SELECT COUNT(id) FROM ' . tablename(PDO_NAME . 'merchantdata') . " WHERE enabled = 2 and uniacid={$_W['uniacid']} and status=2 and aid={$_W['aid']}");
$status3 = pdo_fetchcolumn('SELECT COUNT(id) FROM ' . tablename(PDO_NAME . 'merchantdata') . " WHERE enabled = 3 and uniacid={$_W['uniacid']} and status=2 and aid={$_W['aid']}");
$status4 = pdo_fetchcolumn('SELECT COUNT(id) FROM ' . tablename(PDO_NAME . 'merchantdata') . " WHERE enabled = 4 and uniacid={$_W['uniacid']} and status=2 and aid={$_W['aid']}");
$status5 = pdo_fetchcolumn('SELECT COUNT(id) FROM ' . tablename(PDO_NAME . 'merchantdata') . " WHERE enabled = 0 and uniacid={$_W['uniacid']} and status=1 and aid={$_W['aid']}");
include wl_template('store/userIndex');
}
public function edit() {
global $_W, $_GPC;
$isAuth = Customized::init('printing');
$id = intval($_GPC['id']);
if (is_store()) {
$id = $_W['storeid'];
}
$page = $_GPC['page'];
$allgroup = pdo_fetchall("SELECT name,id FROM " . tablename('wlmerchant_chargelist') . "WHERE uniacid = {$_W['uniacid']} AND aid IN (0,{$_W['aid']}) AND status = 1 ORDER BY sort DESC");
//海报获取
if(p('diyposter')){
$posters = pdo_getall(PDO_NAME . 'poster',array('uniacid' => $_W['uniacid'],'type' => 1),array('id','title'));
}
//社群获取
$community = pdo_fetchall("SELECT communname,id FROM " . tablename('wlmerchant_community') . "WHERE uniacid = {$_W['uniacid']} AND storeid IN (0,{$id}) AND aid = {$_W['aid']} ORDER BY id DESC");
// $categoryes = pdo_getall(PDO_NAME . 'category_store', array('uniacid' => $_W['uniacid'], 'aid' => $_W['aid'], 'state' => '0')); //商家分类
// if (empty($categoryes)) wl_message("请先添加商家类别!", web_url('store/category/Edit'));
// $moduels = uni_modules();
// if (!empty($categoryes)) {
// $parents = $childrens = array();
// foreach ($categoryes as $cid => $cate) {
// if (!empty($cate['parentid'])) {
// $childrens[$cate['parentid']][] = $cate;
// } else {
// $parents[$cate['id']] = $cate;
// }
// }
// }
//一级分类获取
$categoryes = pdo_getall(PDO_NAME . 'category_store' , [
'uniacid' => $_W['uniacid'] ,
'aid' => $_W['aid'] ,
'enabled' => 1,
'parentid'=> 0,
'state' => '0'
],['id','name'],'','displayorder DESC');
//二级分类信息获取
foreach($categoryes as $key => &$val){
$val['list'] = pdo_getall(PDO_NAME . 'category_store' , [
'uniacid' => $_W['uniacid'] ,
'aid' => $_W['aid'] ,
'enabled' => 1,
'parentid'=> $val['id'],
'state' => '0'
],['id','name'],'','displayorder DESC');
//兼容 删除没有二级分类的一级分类信息
if(!$val['list']){
unset($categoryes[$key]);
}
}
//商户分类
$levelids = pdo_getall('wlmerchant_merchant_cate', array('sid' => $id), 'twolevel');
if (!empty($levelids)) {
$cateids = array_column($levelids, 'twolevel');
}
//家政服务分类
$keeplevelids = pdo_getall('wlmerchant_housekeep_relation', array('objid' => $id,'type' => 3), 'twolevelid');
if (!empty($keeplevelids)) {
$keepcateids = array_column($keeplevelids, 'twolevelid');
}
if ($id) {
$register = Store::getSingleStore($id);
$proportion = unserialize($register['proportion']);
}else{
$register['aid'] = $_W['aid'];
$register['recruit_switch'] = 1;# 默认开启求职招聘
}
//获取云喇叭设置信息
if ($register['cloudspeaker']) {
$cloudspeaker = unserialize($register['cloudspeaker']);
}
//获取推送设置信息
if ($register['printing']) {
$printing = unserialize($register['printing']);
}
if ($id) {
$register['member'] = Store::getSingleRegister(array('uniacid' => $_W['uniacid'], 'storeid' => $id, 'ismain' => 1));
}
$member = Member::wl_member_get($register['member']['mid'], array('id', 'nickname', 'openid'));
$register['location'] = unserialize($register['location']);
//$register['location'] = Util::Convert_GCJ02_To_BD09($register['location']['lat'], $register['location']['lng']);
$register['endtime'] = $register['endtime'] ? $register['endtime'] : time() + 31536000;
$register['adv'] = unserialize($register['adv']);
$register['recruit_adv'] = unserialize($register['recruit_adv']);
$register['recruit_long_img'] = $register['recruit_long_img'] ? explode('||',$register['recruit_long_img']) : '';
$register['delivery_adv'] = unserialize($register['delivery_adv']);
$register['album'] = unserialize($register['album']);
$register['examineimg'] = unserialize($register['examineimg']);
$register['videourl'] = tomedia($register['videourl']);
$deliverytype = unserialize($register['deliverytype']);
$allArea = json_encode(Area::get_all_in_use());
$sett = unserialize($register['settlementtext']);
$payback = unserialize($register['payback']);
//活动时间处理
$storehours = unserialize($register['storehours']);
if(!empty($storehours['startTime'])){
$newstorehours = [];
$houreinfo['startTime'] = $storehours['startTime'];
$houreinfo['endTime'] = $storehours['endTime'];
$newstorehours[] = $houreinfo;
$storehours = $newstorehours;
}
//评分等级
$on_array = array();
$off_array = array();
if (empty($register['score'])) $register['score'] = 5;
if ($register['score'] == 1) {
$html = '<span class="label label-default">非常差</span>';
} else if ($register['score'] == 2) {
$html = '<span class="label label-warning">不太好</span>';
} else if ($register['score'] == 3) {
$html = '<span class="label label-info">一般</span>';
} else if ($register['score'] == 4) {
$html = '<span class="label label-success">很好!</span>';
} else if ($register['score'] == 5) {
$html = '<span class="label label-danger">非常棒!!</span>';
}
for ($i = 1; $i <= $register['score']; $i++) {
$on_array[$i] = $i;
}
for ($j = $register['score']; $j < 5; $j++) {
$off_array[$j] = $j + 1;
}
//标签
$presettags = pdo_getall('wlmerchant_tags', array('uniacid' => $_W['uniacid'], 'aid' => $_W['aid'], 'type' => 0), array('id', 'title'), '', 'sort DESC');
$tags = unserialize($register['tag']);
//店员
if ($id) {
$mains = pdo_getall('wlmerchant_merchantuser', array('uniacid' => $_W['uniacid'], 'storeid' => $id));
foreach ($mains as $key => &$main) {
$main['avatar'] = pdo_getcolumn(PDO_NAME . 'member', array('id' => $main['mid']), 'avatar');
}
}
//满减活动
if(p('fullreduce')){
$fullreducelist = pdo_getall('wlmerchant_fullreduce_list',array('aid' => $_W['aid'],'uniacid' => $_W['uniacid'],'status' => 1),array('id','title'));
}
//支付有礼
if(p('paidpromotion')){
$paidlist = pdo_getall('wlmerchant_payactive',array('uniacid' => $_W['uniacid'],'aid' => $_W['aid'],'status' => 1),array('id','title'));
}
if(agent_p('luckydraw')){
$drawlist = pdo_getall('wlmerchant_luckydraw',array('uniacid' => $_W['uniacid'],'aid' => $_W['aid'],'status' => 1),array('id','title'));
}
//支付信息列表
if($_W['wlsetting']['cashset']['allocationtype'] == 1){
$paylist = pdo_getall(PDO_NAME."payment",['uniacid'=>$_W['uniacid'],'type'=>1],['id','name']);
}
$logo = $register['logo'];
if (checksubmit('submit')) {
//表单提交
//判断是否修改了店长
$noticeflag = '';
$oldMid = $member['id'];
if ($member['id'] != $_GPC['storemid']) {
$noticeflag = 1;
}
$uid = intval($_GPC['uid']);
if (!empty($_GPC['storemid'])) {
$member['id'] = $_GPC['storemid'];
}
$register = $_GPC['register'];
if(empty($register['groupid']) && !is_store()){
wl_message('请设置商户所属套餐');
}
$count = preg_match_all("/[\x{4e00}-\x{9fa5}]/u", $register['recruit_brighten']);
if ($count > 20) wl_message('企业亮点最多填写20个汉字');
if (empty($register['business_license'])) wl_message('请上传营业执照');
$register['wxappswitch'] = intval($_GPC['wxappswitch']);
$register['iscommon'] = intval($_GPC['iscommon']);
//$register['location'] = Util::Convert_BD09_To_GCJ02($register['location']['lat'], $register['location']['lng']);
$register['lng'] = $register['location']['lng'];
$register['lat'] = $register['location']['lat'];
$register['location'] = serialize($register['location']);
$register['adv'] = serialize($register['adv']);
$register['recruit_adv'] = serialize($register['recruit_adv']);
$register['recruit_long_img'] = empty($register['recruit_long_img']) ? array() : implode('||',$register['recruit_long_img']);
$register['delivery_adv'] = serialize($register['delivery_adv']);
$register['album'] = serialize($register['album']);
$register['tag'] = serialize($register['tag']);
$register['storename'] = trim($register['storename']);
if (!empty($register['endtime'])) {
$register['endtime'] = strtotime($register['endtime']);
}
$register['introduction'] = htmlspecialchars_decode($register['introduction']);
$register['uniacid'] = $_W['uniacid'];
if(empty($register['aid']) && is_store()){
$register['aid'] = $_W['aid'];
}
$user['name'] = $register['realname'];
$user['mobile'] = $register['tel'];
if (!empty($_GPC['storemid'])) {
$user['mid'] = $member['id'];
if (empty($id)) {
$validate = Member::validateMemberIdentity($user['mid']);
if (!$validate['status']) wl_message('当前店长微信已是'.$validate['identity']);
}
}
$user['enabled'] = 1;
$user['uniacid'] = $_W['uniacid'];
$user['aid'] = $register['aid'];
//轮播图大小数组
$register['proportion'] = serialize($_GPC['proportion']);
//营业时间段
$startTime = $_GPC['startTime'];
$endTime = $_GPC['endTime'];
if(empty($startTime)){
wl_message('请设置营业时间');
}
foreach($startTime as $tk => $stime){
$sdate = [];
$sdate['startTime'] = $startTime[$tk];
$sdate['endTime'] = $endTime[$tk];
$registerdate[] = $sdate;
}
$register['storehours'] = serialize($registerdate);
//达达和UU城市列表
if($_W['wlsetting']['api']['citydelivery']['type'] == 1){
//达达设置
$third_city_info = $_GPC['third_city_info'];
$third_city_info = explode( ",",$third_city_info);
$register['third_city_code'] = $third_city_info[0];
$register['third_city_name'] = $third_city_info[1];
}else if($_W['wlsetting']['api']['citydelivery']['type'] == 2){
//UU设置
$register['third_city_name'] = $_GPC['third_city_name'];
}
//结算设置
$sett = $_GPC['sett'];
foreach ($sett as $key => &$se) {
if ($se > 100) {
$se = 100;
}
if ($se > 0.01) {
$se = sprintf("%.2f", $se);
}
}
$register['settlementtext'] = serialize($sett);
//支付返现(L304定制)
if($register['paybackstatus'] > 0){
$payback = $_GPC['payback'];
foreach ($payback as $key => &$pa) {
if ($pa > 100) {
$pa = 100;
}
if ($pa > 0.01) {
$pa = sprintf("%.2f", $pa);
}
}
$register['payback'] = serialize($payback);
}
$register['yuecashback'] = $register['yuecashback'] > 100 ? 100 : sprintf("%.2f", $register['yuecashback']);
$register['vipyuecashback'] = $register['vipyuecashback'] > 100 ? 100 : sprintf("%.2f", $register['vipyuecashback']);
//同城配送
if(empty($register['deliverytype'])){
$register['deliverytype'][] = 'own';
}
$register['deliverytype'] = serialize($register['deliverytype']);
//云喇叭设置信息
$cloudspeaker = $_GPC['cloudspeaker'];
if ($cloudspeaker) {
$cloudspeaker['volume'] = $cloudspeaker['volume'] ? $cloudspeaker['volume'] : 50;
}
$register['cloudspeaker'] = serialize($cloudspeaker);
//消息推送设置
$register['printing'] = serialize($_GPC['printing']);
if ($id) {
//修改店铺信息
$result = Store::registerEditData($register, $id);
if (empty($uid)) {
$user['storeid'] = $id;
$user['ismain'] = 1;
$user['status'] = 2;
$user['createtime'] = time();
}
$result2 = Store::registerEditUser($user, $uid);
//修改店铺信息 判断是否修改aid 并且进行对应的操作
self::updateGoodsAid($id,$register['aid']);//aid被改变 修改对应信息
} else {
$register['aid'] = $_W['aid'];
$register['status'] = 2;
$register['createtime'] = time();
$uid = Store::registerEditData($register);
$user['storeid'] = $uid;
$user['ismain'] = 1;
$user['status'] = 2;
$user['createtime'] = time();
$result = Store::registerEditUser($user);
$id = $uid;
}
# 店长变更后回退为 游客
if ($noticeflag) {
Member::returnIdentity($oldMid);
}
if ($result) {
if (!empty($id)) {
//处理分类
pdo_delete('wlmerchant_merchant_cate', array('sid' => $id));
foreach ($_GPC['category'] as $item) {
$scate = pdo_get(PDO_NAME . 'category_store', array('id' => $item), array('parentid'));
pdo_insert('wlmerchant_merchant_cate', ['sid' => $id, 'onelevel' => $scate['parentid'], 'twolevel' => $item]);
}
//处理家政服务分类
if($register['housekeepstatus'] > 0){
$housekeepcate = $_GPC['housekeepcate'];
pdo_delete('wlmerchant_housekeep_relation', array('type' => 3,'objid' => $id));
foreach ($housekeepcate as $keepitem) {
$keepscate = pdo_get(PDO_NAME . 'housekeep_type', array('id' => $keepitem), array('onelevelid'));
pdo_insert('wlmerchant_housekeep_relation', ['type' => 3,'objid' => $id, 'onelevelid' => $keepscate['onelevelid'], 'twolevelid' => $keepitem]);
}
}
$enabled = pdo_getcolumn(PDO_NAME . 'merchantdata', array('id' => $id), 'enabled');
if ($enabled != 1) {
//抢购商品
pdo_update('wlmerchant_rush_activity', array('status' => 4), array('uniacid' => $_W['uniacid'], 'sid' => $id));
//拼团商品
pdo_update('wlmerchant_fightgroup_goods', array('status' => 5), array('uniacid' => $_W['uniacid'], 'merchantid' => $id));
//卡券
pdo_update('wlmerchant_couponlist', array('status' => 3), array('uniacid' => $_W['uniacid'], 'merchantid' => $id));
//特权
pdo_update('wlmerchant_halfcardlist', array('status' => 0), array('uniacid' => $_W['uniacid'], 'merchantid' => $id));
//礼包
pdo_update('wlmerchant_package', array('status' => 0), array('uniacid' => $_W['uniacid'], 'merchantid' => $id));
//砍价
pdo_update('wlmerchant_bargain_activity', array('status' => 0), array('sid' => $id));
//同城配送
pdo_update('wlmerchant_delivery_activity', array('status' => 4), array('sid' => $id));
}
}
if ($noticeflag) {
$usermid = $_GPC['storemid'];
$firse = '您已被管理员设置为[' . $register['storename'] . ']的店长';
$content = '商户名:' . $register['storename'];
$link = h5_url('pages/subPages/merchant/merchantChangeShop/merchantChangeShop');
News::jobNotice($usermid, $firse, '绑定店长通知', $content, '已绑定', '点击链接进入商户管理页面', time(),$link);
}
if ($register['logo'] != $logo) {
Tools::clearwxapp();
Tools::clearposter();
}
Member::updateStoreUserIdentity($id);
if (is_store()) {
wl_message('商家信息保存成功', web_url('store/merchant/edit'), 'success');
} else {
if($_GPC['houseflag'] > 0){
wl_message('商家信息保存成功', web_url('housekeep/KeepWeb/storelist'), 'success');
}else{
wl_message('商家信息保存成功', web_url('store/merchant/index', array('enabled' => $register['enabled'], 'page' => $page)), 'success');
}
}
} else {
if (is_store()) {
wl_message('商家信息保存失败,请重试', web_url('store/merchant/edit'), 'error');
} else {
wl_message('商家信息保存失败,请重试', web_url('store/merchant/edit', array('id' => $id)), 'error');
}
}
}
//获取代理商列表
$default[] = ['id' => 0,'agentname' => '总后台'];
$agentList = pdo_getall(PDO_NAME."agentusers",['uniacid'=>$_W['uniacid']],['id','agentname']);
$agentList = array_merge($default,$agentList);
//同城配送权限判断
if(p('citydelivery')){
$apps = App::get_account_perm();
if(!empty($apps['plugins'])){
if(in_array('citydelivery',$apps['plugins'])){
$citydefl = 1;
}
}else{
$citydefl = 1;
}
}
//求职招聘相关信息
if(p('recruit')){
$nature = Recruit::getLabelList(5);//企业性质标签
$scale = Recruit::getLabelList(4);//企业规模标签
$industry = Recruit::getIndustryList(['pid'=>0],['id','title']);//上级行业列表
}
//达达和UU城市列表
if($_W['wlsetting']['api']['citydelivery']['type'] == 1){
$city_code_list = Citydelivery::postDadaApi('',8);
$city_code_list = $city_code_list['result'];
}else if($_W['wlsetting']['api']['citydelivery']['type'] == 2){
$city_code_list = Citydelivery::postUUApi([],8);
$city_code_list = $city_code_list['CityList'];
}
//家政服务相关信息
if(p('housekeep')){
$housekeepcate = Housekeep::getCategory();
}
include wl_template('store/userEdit');
}
public function detelemain() {
global $_W, $_GPC;
$id = $_GPC['id'];
$ismain = pdo_getcolumn(PDO_NAME . 'merchantuser', array('id' => $id), 'ismain');
if ($ismain == 1) {
show_json(0, '不能删除店长');
} else {
$res = pdo_delete('wlmerchant_merchantuser', array('id' => $id));
}
if ($res) {
show_json(1, '删除成功');
} else {
show_json(0, '删除失败,请重试');
}
}
public function urlindex() {
global $_W, $_GPC;
$id = intval($_GPC['id']);
$pindex = max(1, intval($_GPC['page']));
$psize = 10;
$register = Store::getSingleStore($id);
$naves = Dashboard::getAllNav($pindex - 1, $psize, '', $id);
$navs = $naves['data'];
$pager = wl_pagination($naves['count'], $pindex, $psize);
include wl_template('store/userEdit');
}
public function addurl() {
global $_W, $_GPC;
$id = intval($_GPC['id']);
$register = Store::getSingleStore($id);
if (!empty($_GPC['navid'])) $nav = Dashboard::getSingleNav($_GPC['navid']);
if (checksubmit('submit')) {
$nav = $_GPC['nav'];
$nav['name'] = trim($nav['name']);
$nav['displayorder'] = intval($nav['displayorder']);
$nav['enabled'] = intval($_GPC['enabled']);
if (!empty($_GPC['navid'])) {
if (Dashboard::editNav($nav, $_GPC['navid'])) wl_message('保存成功', web_url('store/merchant/urlindex', array('id' => $nav['merchantid'])), 'success');
} else {
if (Dashboard::editNav($nav)) wl_message('保存成功', web_url('store/merchant/urlindex', array('id' => $nav['merchantid'])), 'success');
}
wl_message('保存失败', referer(), 'error');
}
include wl_template('store/userEdit');
}
public function delete() {
global $_W, $_GPC;
if (pdo_update(PDO_NAME . 'merchantdata', array('enabled' => 4), array('id' => $_GPC['id']))) {
pdo_delete('wlmerchant_storefans', array('sid' => $_GPC['id']));
//抢购商品
pdo_update('wlmerchant_rush_activity', array('status' => 4), array('uniacid' => $_W['uniacid'], 'sid' => $_GPC['id']));
//拼团商品
pdo_update('wlmerchant_fightgroup_goods', array('status' => 0), array('uniacid' => $_W['uniacid'], 'merchantid' => $_GPC['id']));
//卡券
pdo_update('wlmerchant_couponlist', array('status' => 0), array('uniacid' => $_W['uniacid'], 'merchantid' => $_GPC['id']));
//特权
pdo_update('wlmerchant_halfcardlist', array('status' => 0), array('uniacid' => $_W['uniacid'], 'merchantid' => $_GPC['id']));
//礼包
pdo_update('wlmerchant_package', array('status' => 0), array('uniacid' => $_W['uniacid'], 'merchantid' => $_GPC['id']));
show_json(1, '删除成功');
} else {
show_json(0, '删除失败,请重试');
}
}
function deletes() {
global $_W, $_GPC;
$ids = $_GPC['ids'];
$type = $_GPC['type'];
if ($type == 1) {
foreach ($ids as $key => $id) {
pdo_update(PDO_NAME . 'merchantdata', array('enabled' => 4), array('id' => $id));
pdo_delete('wlmerchant_storefans', array('sid' => $id));
}
} else {
foreach ($ids as $key => $id) {
pdo_delete(PDO_NAME . 'merchantdata', array('id' => $id));
$userData = pdo_getall(PDO_NAME . 'merchantuser',array('uniacid' => $_W['uniacid'], 'storeid' => $id));
pdo_delete(PDO_NAME . 'merchantuser', array('uniacid' => $_W['uniacid'], 'storeid' => $id));
foreach ($userData as $userRow) {
Member::returnIdentity($userRow['mid']);
}
}
}
die(json_encode(array('errno' => 0, 'message' => '', 'id' => '')));
}
public function sureDelete() {
global $_W, $_GPC;
if (pdo_delete(PDO_NAME . 'merchantdata', array('id' => $_GPC['id']))) {
$userData = pdo_getall(PDO_NAME . 'merchantuser',array('uniacid' => $_W['uniacid'], 'storeid' => $_GPC['id']));
pdo_delete(PDO_NAME . 'merchantuser', array('uniacid' => $_W['uniacid'], 'storeid' => $_GPC['id']));
foreach ($userData as $userRow) {
Member::returnIdentity($userRow['mid']);
}
show_json(1, '删除成功');
}
show_json(0, '删除失败,请重试');
}
/**
* 函数的含义说明
*
* @access public
* @name 方法名称
* @param mixed 参数一的说明
* @return array
*/
function keeper() {
global $_W, $_GPC;
$id = intval($_GPC['id']);
$register = Store::getSingleStore($id);
$register['onelevel'] = Util::idSwitch('cateParentId', 'cateParentName', $register['onelevel']);
$register['twolevel'] = Util::idSwitch('cateChildId', 'cateChildName', $register['twolevel']);
$where['storeid'] = $id;
$keeperData = Util::getNumData("*", PDO_NAME . 'merchantuser', $where, 'ismain asc');
$keeper = $keeperData[0];
foreach ($keeper as $key => &$value) {
$value['member'] = Member::wl_member_get($value['mid']);
}
include wl_template('store/userEdit');
}
/**
* Comment: 代理后台进行店铺余额提现申请的操作
* Author: zzw
*/
public function cash() {
global $_W, $_GPC;
#1、获取基本参数信息
$sid = $_GPC['sid'];//商户id
$money = $_GPC['money'];//提现金额
$cashsets = Setting::wlsetting_read('cashset');//提现设置
$agent = Area::getSingleAgent($_W['aid']);
$syssalepercent = $agent['percent']['syssalepercent'];//系统抽成比例
if (empty($syssalepercent)) {
$syssalepercent = sprintf("%.2f" , $_W['wlsetting']['cashset']['syssalepercent']);
}else {
$syssalepercent = sprintf("%.2f" , $syssalepercent);
}
$userInfo = Store::getShopOwnerInfo($sid, $_W['aid']);//收款人信息
if(!empty($userInfo['openid'])){
$sopenid = $userInfo['openid'];
$source = 1;
}else if(!empty($userInfo['wechat_openid'])){
$sopenid = $userInfo['wechat_openid'];
$source = 3;
}else{
wl_json(0, '店长无微信打款信息,无法结算');
}
#2、判断商家的提现时间限制
$shopIntervalTime = $cashsets['shopIntervalTime'];
if ($shopIntervalTime > 0) {
//获取上次提现申请时间
$startTime = pdo_fetchcolumn("SELECT applytime FROM "
. tablename(PDO_NAME . "settlement_record")
. " WHERE sid = {$sid} AND uniacid = {$_W['uniacid']} ORDER BY applytime DESC ");
$interval = time() - $startTime;
$intervalDay = $interval / 3600 / 24;
//判断间隔时间
$intercalRes = ceil($shopIntervalTime - $intervalDay);
if ($intercalRes > 0) {
wl_json(0, '请等' . $intercalRes . '天后再申请!');
}
}
#3、判断提现金额限制
if ($money < $cashsets['lowsetmoney']) {
wl_json(0, '申请失败,最低提现金额为' . $cashsets['lowsetmoney'] . '元。');
}
#4、拼装提现信息
$data = array(
'uniacid' => $_W['uniacid'],
'sid' => $sid,
'aid' => $_W['aid'],
'status' => 2,
'type' => 1,
'sapplymoney' => $money,
'sgetmoney' => sprintf("%.2f", $money - $syssalepercent * $money / 100),
'spercentmoney' => sprintf("%.2f", $syssalepercent * $money / 100),
'spercent' => $syssalepercent,
'applytime' => TIMESTAMP,
'updatetime' => TIMESTAMP,
'sopenid' => $sopenid,
'payment_type' => 5,
'source' => $source
);
#5、保存提现信息
if (pdo_insert(PDO_NAME . 'settlement_record', $data)) {
$orderid = pdo_insertid();
$res = Store::settlement($orderid, 0, $data['sid'], -$money, 0, -$money, 7, 0, 0, $_W['aid']);
if ($res) {
if (!empty($_W['wlsetting']['adminmid'])) {
$storename = pdo_getcolumn(PDO_NAME . 'merchantdata', array('id' => $sid), 'storename');
$first = '您好,有一个商户提现申请待审核。';
$content = '商户[' . $storename . ']申请提现' . $money . '元';
News::jobNotice($_W['wlsetting']['adminmid'], $first, '商户提现审核通知', $content, '待审核', '请尽快前往系统后台审核', time());
}
wl_json(1, '申请成功');
} else {
wl_json(0, '申请失败,请重试');
}
} else {
wl_json(0, '申请失败,请重试');
}
}
public function moneychange() {
global $_W, $_GPC;
$id = intval($_GPC['id']);
$balance = trim($_GPC['balance']);
if ($_W['ispost']) {
$moneychange = trim($_GPC['moneychange']);
$moneynum = sprintf("%.2f", trim($_GPC['moneynum']));
$remark = trim($_GPC['remark']);
if ($moneynum < 0) {
show_json(0, '变更金额错误');
}
if ($moneychange == 1) {
$settlementmoney = $moneynum;
} else {
$settlementmoney = -$moneynum;
}
pdo_fetch("update" . tablename('wlmerchant_merchantdata') . "SET nowmoney = nowmoney + {$settlementmoney},allmoney = allmoney + {$settlementmoney} WHERE id = {$id}");
$merchantnowmoney = pdo_getcolumn(PDO_NAME . 'merchantdata', array('id' => $id), 'nowmoney');
Store::addcurrent(1, -1, $id, $settlementmoney, $merchantnowmoney, 0, $remark);
show_json(1, '商户余额变更成功');
}
include wl_template('store/moneychange');
}
/**
* Comment: 商户二维码生成
* Author: zzw
* Date: 2019/11/28 11:51
*/
public function storeQrCode() {
global $_W, $_GPC;
#1、参数获取
$id = $_GPC['id'] ? $_GPC['id'] : 0;
#2、基本链接生成
$shopLink = h5_url('pages/mainPages/store/index', ['sid' => $id]);
if(Customized::init('customized336')){
$buyLink = h5_url('pages/mainPages/store/newBuyOrder/newBuyOrder', ['sid' => $id]);
}else{
$buyLink = h5_url('pages/subPages2/newBuyOrder/buyOrder', ['sid' => $id]);
}
$followLink = Storeqr::get_storeqr($id);//获取关注二维码
#3、获取小程序码信息
if (p('wxapp')) {
$logo = pdo_getcolumn(PDO_NAME . "merchantdata", ['id' => $id], 'logo');
$wxappShopLink = Store::getShopWxAppQrCode($id, tomedia($logo));
if(Customized::init('customized336')){
$wxappBuyLink = Store::getShopWxAppQrCode($id, tomedia($logo), 'pages/mainPages/store/newBuyOrder/newBuyOrder');
}else{
$wxappBuyLink = Store::getShopWxAppQrCode($id, tomedia($logo), 'pages/subPages2/newBuyOrder/buyOrder');
}
//同城配送二维码
$link = "pages/subPages2/businessCenter/foodList/foodList?id={$id}&storeid={$id}";
$wxappDistributionLink = Store::getShopWxAppQrCode('', tomedia($logo),$link);
}
//同城配送信息
$distributionLink = h5_url('pages/subPages2/businessCenter/foodList/foodList' , ['id' => $id,'storeid' => $id]);
include wl_template('store/qrcode_store');
}
/**
* Comment: 修改店铺商品信息
* Author: zzw
* Date: 2020/3/9 11:22
* @param $sid
* @param $aid
*/
public static function updateGoodsAid($sid,$aid){
#1、商品信息修改
pdo_update(PDO_NAME."rush_activity",['aid'=>$aid],['sid'=>$sid]);//修改抢购商品
pdo_update(PDO_NAME."groupon_activity",['aid'=>$aid],['sid'=>$sid]);//修改团购商品
pdo_update(PDO_NAME."bargain_activity",['aid'=>$aid],['sid'=>$sid]);//修改砍价商品
pdo_update(PDO_NAME."fightgroup_goods",['aid'=>$aid],['merchantid'=>$sid]);//修改拼团商品
pdo_update(PDO_NAME."couponlist",['aid'=>$aid],['merchantid'=>$sid]);//修改卡卷商品
pdo_update(PDO_NAME."activitylist",['aid'=>$aid],['sid'=>$sid]);//修改活动商品
pdo_update(PDO_NAME."delivery_activity",['aid'=>$aid],['sid'=>$sid]);//修改活动商品
#1、商品信息修改
pdo_update(PDO_NAME."merchantuser",['aid'=>$aid],['storeid'=>$sid]);//修改店员信息
}
//店员列表
public function clerkindex() {
global $_W, $_GPC;
$storeid = $_GPC['storeid'];
if (is_store()) {
$storeid = $_W['storeid'];
}
$storename = pdo_getcolumn(PDO_NAME . 'merchantdata', array('id' => $storeid), 'storename');
$pindex = max(1, intval($_GPC['page']));
$psize = 10;
$where = array('storeid' => $storeid, 'ismain!=' => 1);
if (!empty($_GPC['keyword'])) {
if ($_GPC['keywordtype'] == 1) {
$where['name@'] .= trim($_GPC['keyword']);
} else if ($_GPC['keywordtype'] == 2) {
$where['mobile@'] .= trim($_GPC['keyword']);
}
}
$clerkData = Util::getNumData("*", PDO_NAME . 'merchantuser', $where, 'id desc', $pindex, $psize, 1);
$clerklist = $clerkData[0];
$pager = $clerkData[1];
foreach ($clerklist as &$li) {
$member = pdo_get('wlmerchant_member', array('id' => $li['mid']), array('nickname', 'avatar'));
$li['nickname'] = $member['nickname'];
$li['avatar'] = tomedia($member['avatar']);
}
include wl_template('store/clerklist');
}
//店员编辑
public function editclerk() {
global $_W, $_GPC;
$id = $_GPC['id'];
$storeid = $_GPC['storeid'];
$store = pdo_get('wlmerchant_merchantdata',array('id' => $storeid),array('aid'));
if ($id) {
$clerk = pdo_get('wlmerchant_merchantuser', array('id' => $id));
$member = pdo_get('wlmerchant_member', array('id' => $clerk['mid']), array('nickname', 'avatar'));
$clerk['nickname'] = $member['nickname'];
$clerk['avatar'] = $member['avatar'];
}
if ($_W['ispost']) {
$data = array(
'mid' => $_GPC['memberid'],
'name' => $_GPC['name'],
'mobile' => $_GPC['mobile'],
'ismain' => $_GPC['ismain'],
'orderwrite' => $_GPC['orderwrite'],
'viewdata' => $_GPC['viewdata'],
'enabled' => $_GPC['enabled']
);
if ($id) {
$res = pdo_update('wlmerchant_merchantuser', $data, array('id' => $id));
} else {
$data['uniacid'] = $_W['uniacid'];
$data['storeid'] = $_GPC['storeid'];
$data['aid'] = $store['aid'];
$data['createtime'] = time();
//$data['enabled'] = $store['enabled'];
$res = pdo_insert(PDO_NAME . 'merchantuser', $data);
}
if ($res) {
show_json(1, '操作成功');
} else {
show_json(0, '操作失败,请重试');
}
}
include wl_template('store/clerkedit');
}
//删除店员
public function deleteclerk() {
global $_W, $_GPC;
$id = $_GPC['id'];
$ids = $_GPC['ids'];
if (!empty($id)) {
$res = pdo_delete('wlmerchant_merchantuser', array('id' => $id));
}
if (!empty($ids)) {
foreach ($ids as $key => $id) {
$res = pdo_delete('wlmerchant_merchantuser', array('id' => $id));
}
}
if ($res) {
show_json(1, '操作成功');
} else {
show_json(0, '操作失败,请重试');
}
}
//时间段引入方法
public function storehours() {
include wl_template('store/storehours');
}
//获取可用店铺列表
public function getstorelist(){
global $_W, $_GPC;
$where = "uniacid = {$_W['uniacid']} AND status = 2 AND enabled = 1 AND aid = {$_W['aid']}";
$data = [];
if (!empty($_GPC['search'])) {
$where .= " AND (storename LIKE '%".trim($_GPC['search'])."%' or id LIKE '%".trim($_GPC['search'])."%')";
}else{
$data[] = ['id' => 0, 'text' => '无关联商户'];
}
$members = pdo_fetchall("SELECT id,storename FROM ".tablename('wlmerchant_merchantdata')."WHERE {$where} ORDER BY id DESC LIMIT 100");
foreach ($members as &$member) {
$data[] = ['id' => $member['id'], 'text' => $member['storename'].'(SID:'.$member['id'].')'];
}
die(json_encode($data));
}
// 编辑商户分类
public function editStoreCategory()
{
global $_W,$_GPC;
$storeId = $_GPC['storeId'];
$categoryList = Category::getTreeCategory(0,'*',1);
$categoryIdArr = [];
$queryRes = pdo_getall(PDO_NAME . 'merchant_class',['storeid' => $storeId],['cc_id']);
foreach ($queryRes as $queryRow) $categoryIdArr[] = $queryRow['cc_id'];
include wl_template('store/editStoreCategory');
}
// 保存商户分类
public function saveStoreCategory()
{
global $_W,$_GPC;
$storeId = $_GPC['storeId'];
$id_arr = $_GPC['id_arr'];
if (empty($storeId) || !is_numeric($storeId)) show_json(0, '缺少商户id');
$queryRes = pdo_getall(PDO_NAME . 'merchant_class',['storeid' => $storeId],['id']);
$deleteIdAll = [];
foreach ($queryRes as $queryRow) $deleteIdAll[] = $queryRow['id'];
if ($deleteIdAll) pdo_delete(PDO_NAME . 'merchant_class',['id' => $deleteIdAll]);
if (!empty($id_arr)) {
foreach ($id_arr as $cate_id) {
$insert_data = [
'storeid' => $storeId,
'cc_id' => $cate_id,
'create_time' => time()
];
pdo_insert(PDO_NAME . 'merchant_class',$insert_data);
}
}
show_json(1, '保存成功');
}
}

88
addons/weliam_smartcity/web/controller/store/register.ctrl.php

@ -0,0 +1,88 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Register_WeliamController {
/*
* 添加商户
*/
public function add() {
global $_W, $_GPC;
if ($_GPC['op'] == 'selectnickname') {
//搜索会员
$con = "uniacid='{$_W['uniacid']}' ";
$keyword = $_GPC['keyword'];
if ($keyword != '') {
$con .= " and (openid LIKE '%{$keyword}%' or id LIKE '%{$keyword}%' or nickname LIKE '%{$keyword}%') ";
}
$ds = Store::registerNickname($con);
if ($ds) {
foreach ($ds as $key => &$v) {
$v['nickname'] = str_replace("'", '', $v['nickname']);
}
}
include wl_template('store/registerQueryNickname');
exit;
}
}
/*
* 入驻设置
*/
public function set() {
global $_W, $_GPC;
if ($_GPC['set']) {
$_GPC['set']['detail'] = htmlspecialchars_decode($_GPC['set']['detail']);
$res1 = Setting::agentsetting_save($_GPC['set'], 'register');
wl_message('保存成功!', referer(), 'succuss');
}
$set = Setting::agentsetting_read('register');
include wl_template('store/registerSet');
exit;
}
//付费记录
public function chargerecode() {
global $_W, $_GPC;
$pindex = max(1, intval($_GPC['page']));
$psize = 10;
$where = array(
'uniacid' => $_W['uniacid'],
'status' => 3,
'plugin' => 'store'
);
if (is_agent()) {
$where['aid'] = $_W['aid'];
}
if ($_GPC['orderid']) {
$where['id'] = $_GPC['orderid'];
}
$records = pdo_getslice('wlmerchant_order', $where, array($pindex, $psize), $total, array(), '', "id DESC");
$pager = wl_pagination($total, $pindex, $psize);
foreach ($records as $key => &$re) {
$merchant = pdo_get('wlmerchant_merchantdata', array('id' => $re['sid']), array('logo', 'storename'));
$re['logo'] = $merchant['logo'];
$re['storename'] = $merchant['storename'];
$re['typename'] = pdo_getcolumn(PDO_NAME . 'chargelist', array('id' => $re['fkid']), 'name');
}
include wl_template('store/chargerecode');
exit;
}
//搜索用户
public function searchmember() {
global $_W, $_GPC;
$con = $con2 = "uniacid='{$_W['uniacid']}' ";
$keyword = $_GPC['keyword'];
if ($keyword != '') {
$con .= " and nickname LIKE '%{$keyword}%' or uid LIKE '%{$keyword}%' or openid LIKE '%{$keyword}%'";
$con2 .= " and nickname LIKE '%{$keyword}%' or uid LIKE '%{$keyword}%'";
}
$ds = pdo_fetchall("select * from" . tablename('wlmerchant_member') . "where $con");
include wl_template('store/searchmember');
}
}

18
addons/weliam_smartcity/web/controller/store/settled.ctrl.php

@ -0,0 +1,18 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Settled_WeliamController{
//入驻设置
public function baseset(){
global $_W,$_GPC;
$register = Setting::wlsetting_read('register');
if (checksubmit('submit')){
$base = $_GPC['base'];
$base['detail'] = htmlspecialchars_decode($base['detail']);
$base['description'] = htmlspecialchars_decode($base['description']);
Setting::wlsetting_save($base,'register');
wl_message('设置成功', 'referer', 'success');
}
include wl_template('store/register');
}
}

86
addons/weliam_smartcity/web/controller/store/storeApply.ctrl.php

@ -0,0 +1,86 @@
<?php
defined('IN_IA') or exit('Access Denied');
/**
* Comment: 商户入驻申请
* Author: zzw
* Date: 2021/1/7 15:35
* Class StoreApply_WeliamController
*/
class StoreApply_WeliamController {
//入驻申请列表
public function index() {
global $_W, $_GPC;
$pindex = max(1, intval($_GPC['page']));
$psize = 10;
$where['uniacid'] = $_W['uniacid'];
$where['aid'] = $_W['aid'];
$where['ismain'] = 1;
$where['status'] = array(0, 1,3);
$registers = pdo_getslice('wlmerchant_merchantuser', $where, array($pindex, $psize), $total, array(), '', "id DESC");
$pager = wl_pagination($total, $pindex, $psize);
foreach ($registers as $key => $value) {
$registers[$key]['member'] = Member::wl_member_get($value['mid'], array('id', 'nickname','encodename'));
$registers[$key]['storedata'] = Store::getSingleStore($value['storeid']);
}
include wl_template('store/registerIndex');
}
//对申请信息进行 审核、删除操作
public function edit() {
global $_W, $_GPC;
if ($_GPC['op'] == 'reject') {
if (pdo_update(PDO_NAME . 'merchantdata', array('status' => 3), array('id' => $_GPC['id']))) {
Store::editSingleRegister($_GPC['uid'], array('status' => 3, 'reject' => $_GPC['reject']));
$mid = pdo_getcolumn(PDO_NAME . 'merchantuser', array('id' => $_GPC['uid']), 'mid');
$store = pdo_get(PDO_NAME . 'merchantdata', array('id' => $_GPC['id']), array('storename'));
$storename = $store['storename'];
$content = '企业名:' . $storename;
$link = h5_url('pages/mainPages/Settled/Settled',['storeid' => $_GPC['id']]);
News::jobNotice($mid, '您好,您的企业入驻审核已完成', '企业入驻审核通知', $content, '未通过', '点击查看未通过原因', time(), $link);
// $content = '商户名:' . $storename;
// $link = h5_url('pages/subPages/merchant/merchantChangeShop/merchantChangeShop');
// News::jobNotice($mid, '您好,您的商家入驻审核已完成', '商户入驻审核通知', $content, '未通过', '点击查看未通过原因', time(), $link);
wl_message('驳回成功', referer(), 'succuss');
} else {
wl_message('驳回失败', referer(), 'error');
}
}
if ($_GPC['op'] == 'pass') {
$status = pdo_getcolumn(PDO_NAME . 'merchantdata',array('id' => $_GPC['id']),'status');
if (pdo_update(PDO_NAME . 'merchantdata', array('status' => 2, 'enabled' => 1), array('id' => $_GPC['id']))) {
if($status == 0){
//修改过期时间
$chargeid = pdo_getcolumn(PDO_NAME . 'order',array('sid' => $_GPC['id'],'status' => 0,'plugin' => 'store','payfor'=>'merchant'),'fkid');
$day = pdo_getcolumn(PDO_NAME . 'chargelist',array('id' => $chargeid),'days');
$endtime = time() + 86400*$day;
pdo_update(PDO_NAME . 'merchantdata', array('groupid' => $chargeid, 'endtime' => $endtime), array('id' => $_GPC['id']));
pdo_update('wlmerchant_order',array('status' => 3,'paytype' => 6 ,'paytime' => time(), 'issettlement' => 1,'price' => 0),array('sid' => $_GPC['id'],'plugin' => 'store'));
}
Store::editSingleRegister($_GPC['uid'], array('status' => 2, 'reject' => $_GPC['reject']));
$member = pdo_get('wlmerchant_merchantuser', array('id' => $_GPC['uid']), array('mid'));
$store = pdo_get('wlmerchant_merchantdata', array('id' => $_GPC['id']), array('storename'));
$storename = $store['storename'];
$content = '商户名:' . $storename;
News::jobNotice($member['mid'], '您好,您的商家入驻审核已完成', '商户入驻审核通知', $content, '已通过', '请您尽快完善商家信息', time());
Member::updateStoreUserIdentity($_GPC['id'],1);
wl_message('通过操作成功', web_url('store/merchant/index', array('enabled' => 1)), 'succuss');
} else {
wl_message('通过操作失败', referer(), 'error');
}
}
if ($_GPC['op'] == 'del') {
if (pdo_delete(PDO_NAME . 'merchantuser', array('id' => $_GPC['uid']))) {
pdo_delete(PDO_NAME . 'merchantdata', array('id' => $_GPC['id']));
wl_message('删除申请成功', referer(), 'succuss');
} else {
wl_message('删除申请失败', referer(), 'error');
}
}
}
}

100
addons/weliam_smartcity/web/controller/store/storeCertified.ctrl.php

@ -0,0 +1,100 @@
<?php
defined('IN_IA') or exit('Access Denied');
class storeCertified_WeliamController{
public function index()
{
global $_W, $_GPC;
$where = [];
$pindex = max(1, intval($_GPC['page']));
$psize = 10;
if (!empty($_GPC['keyword'])) {
if ($_GPC['keywordtype'] == 1) {
$where['storeid'] = trim($_GPC['keyword']);
} else if ($_GPC['keywordtype'] == 2) {
$storeIdArr = [];
$storeAll = pdo_getall(PDO_NAME . 'merchantdata',['storename like' => '%'.trim($_GPC['keyword']).'%'],'id');
foreach ($storeAll as $storeRow) $storeIdArr[] = $storeRow['id'];
$where['storeid#'] = $storeIdArr ? implode(",",$storeIdArr) : '0';
} else if ($_GPC['keywordtype'] == 3) {
$where['@name@'] = trim($_GPC['keyword']);
} else if ($_GPC['keywordtype'] == 4) {
$where['mobile'] = trim($_GPC['keyword']);
}
}
if (is_numeric($_GPC['status'])) $where['status'] = trim($_GPC['status']);
$memberData = Util::getNumData("*", PDO_NAME . 'merchant_certified', $where, 'id desc', $pindex, $psize, 1);
$list = $memberData[0];
$pager = $memberData[1];
foreach ($list as &$item) {
$storeData = pdo_get(PDO_NAME . 'merchantdata',['id' => $item['storeid']],['storename','logo']);
$item['storename'] = $storeData['storename'];
$item['logo'] = tomedia($storeData['logo']);
$item['create_time'] = date("Y-m-d H:i:s",$item['create_time']);
}
include wl_template('store/certified/index');
}
/*
* 认证审核
*/
public function check() {
global $_W, $_GPC;
if ($_W['ispost']) {
try {
$id = $_GPC['data']['id'];
$check_result = $_GPC['data']['result'];
$reason = $_GPC['data']['reason']?:'';
if (empty($id) || !is_numeric($id)) show_json('缺少id参数');
if (!in_array($check_result,['reject','pass'])) show_json(0,'参数错误');
if ($check_result == 'reject' && empty($reason)) show_json(0,'请填写不通过的原因');
$query_res = pdo_get(PDO_NAME . 'merchant_certified',['id' => $id, 'status' => 0]);
if (!$query_res) show_json(0,'已审核,请勿重复审核');
$status = $check_result == 'pass' ? 1 : 2;
$update_arr = [
'status' => $status,
'remark' => $reason,
'check_userid' => $_W['uid'],
'check_time' => time()
];
pdo_begin(); // 开始事务
$up_res = pdo_update(PDO_NAME . 'merchant_certified',$update_arr,['id' => $id]);
if (!$up_res) throw new Exception('失败');
// 通过修改为商家身份
if ($status == 1) {
$up_res2 = pdo_update(PDO_NAME . 'merchantdata',['merchant_type' => 2],['id' => $query_res['storeid']]);
if (!$up_res2) throw new Exception('失败');
Member::updateStoreUserIdentity($query_res['storeid'],2);
} else {
$mid = pdo_getcolumn(PDO_NAME . 'merchantuser',['storeid' => $query_res['storeid'],'ismain' => [1,3]],'mid');
$content = '驳回原因:' . truncate_chinese_string($reason) . '...';
$link = h5_url('pagesA/businessCooperation/index',['sid' => $query_res['storeid']]);
News::jobNotice($mid, '您好,您的商户认证审核已完成', '商户认证审核通知', $content, '未通过', '点击重新申请', time(), $link);
}
pdo_commit(); // 提交事务
show_json(1,['message' => '成功', 'span' => $check_result == 'pass' ? '认证成功' : '认证失败']);
} catch (Exception $e) {
pdo_rollback(); // 回滚
show_json(0,$e->getMessage());
}
}
show_json(0,'请求失败');
}
}

185
addons/weliam_smartcity/web/controller/store/storeComment.ctrl.php

@ -0,0 +1,185 @@
<?php
defined('IN_IA') or exit('Access Denied');
class StoreComment_WeliamController{
//商户评论列表
public function index(){
global $_W,$_GPC;
$pindex = max(1, intval($_GPC['page']));
$psize = 10;
$where=array();
$where['uniacid'] = $_W['uniacid'];
$where['aid'] = $_W['aid'];
$stores = pdo_getall('wlmerchant_merchantdata',array('uniacid' => $_W['uniacid'],'aid'=>$_W['aid']),array('id'));
if(is_store()){
$where['sid'] = $_W['storeid'];
}
if (empty($starttime) || empty($endtime)) {//初始化时间
$starttime = strtotime('-1 month');
$endtime = time();
}
if (!empty($_GPC['time'])) {
$starttime = strtotime($_GPC['time']['start']);
$endtime = strtotime($_GPC['time']['end']);
switch($_GPC['timetype']){
case 1:$where['createtime>'] = $starttime;
$where['createtime<'] = $endtime;break;
}
}
if (!empty($_GPC['type'])) $where['true'] = $_GPC['type'];
if (!empty($_GPC['keyword'])) $where['sid'] = $_GPC['keyword'];
if (!empty($_GPC['checkone'])) $where['checkone'] = $_GPC['checkone'];
$data = Util::getNumData("*", PDO_NAME.'comment', $where, 'createtime desc', $pindex, $psize, 1);
$lists = $data[0];
$pager = $data[1];
foreach($lists as $key=>&$value){
$starNum = array();
for($i=0;$i<$value['star'];$i++){
$starNum[$i] = $i;
}
$value['star'] = $starNum;
$value['sName'] = Util::idSwitch('sid', 'sName', $value['sid']);
}
include wl_template('store/comment');
}
//商户评论审核
public function check(){
global $_W,$_GPC;
$id = $_GPC['id'];
$pindex = $_GPC['pindex'];
$page = $_GPC['page'];
$data = Util::getSingelData("*", PDO_NAME.'comment', array('id'=>$id));
$starNum = array();
for($i=0;$i<$data['star'];$i++){
$starNum[$i] = $i;
}
$data['star'] = $starNum;
$data['pic'] = unserialize($data['pic']);
$data['sName'] = Util::idSwitch('sid', 'sName', $data['sid']);
if($_GPC['checkone']){
$update = array(
'checkone'=>$_GPC['checkone'],
'pic'=>serialize($_GPC['pic']),
);
//送积分
if($_W['wlsetting']['creditset']['commentcredit'] && $update['checkone'] == 2){
Member::credit_update_credit1($data['mid'], $_W['wlsetting']['creditset']['commentcredit'], '评价赠送积分');
}
pdo_update(PDO_NAME.'comment',$update,array('id'=>$id));
wl_message("操作成功!",web_url('store/storeComment/index',array('page'=>$page)),'success');
}
if($_GPC['ids']){
$ids = explode(",", $_GPC['ids']);;
foreach($ids as$k=>$v){
pdo_update(PDO_NAME.'comment',array('checkone'=>$_GPC['check']),array('id'=>$v));
if($_W['wlsetting']['creditset']['commentcredit'] && $_GPC['check'] == 2){
$mid = pdo_getcolumn(PDO_NAME.'comment',array('id'=>$v),'mid');
Member::credit_update_credit1($mid, $_W['wlsetting']['creditset']['commentcredit'], '评价赠送积分');
}
}
wl_message("操作成功!",web_url('store/storeComment/index'),'success');
}
include wl_template('store/comment_check');
}
//商户评论回复
public function reply(){
global $_W,$_GPC;
$id = $_GPC['id'];
$pindex = $_GPC['pindex'];
$page = $_GPC['page'];
$data = Util::getSingelData("*", PDO_NAME.'comment', array('id'=>$id));
$starNum = array();
for($i=0;$i<$data['star'];$i++){
$starNum[$i] = $i;
}
$data['star'] = $starNum;
$data['pic'] = unserialize($data['pic']);
$data['sName'] = Util::idSwitch('sid', 'sName', $data['sid']);
$data['replypicone'] = unserialize($data['replypicone']);
if($_GPC['replytextone']){
$replyone = $_GPC['replytextone']?2:1;
$update = array(
'replytextone'=>$_GPC['replytextone'],
'replypicone'=>serialize($_GPC['replypicone']),
'replyone'=>$replyone,
);
pdo_update(PDO_NAME.'comment',$update,array('id'=>$id));
//发送模板消息
$comment = pdo_get('wlmerchant_comment',array('id' => $id),array('mid','replytextone','sid'));
$storename = pdo_getcolumn(PDO_NAME.'merchantdata',array('id'=>$comment['sid']),'storename');
$openid = pdo_getcolumn(PDO_NAME.'member',array('id'=>$comment['mid']),'openid');
$first = '商家回复了您的评论';
$type = '商家评论回复';
$status = '已回复';
$remark = '回复内容:'.$comment['replytextone'];
$content = '商家名:['.$storename.']';
News::jobNotice($comment['mid'],$first,$type,$content,$status,$remark,time());
wl_message("操作成功!",web_url('store/storeComment/index',array('page'=>$page)),'success');
}
include wl_template('store/comment_reply');
}
//添加商户评论
public function add(){
global $_W,$_GPC;
$id = $_GPC['id'];
$pindex = $_GPC['pindex'];
$page = $_GPC['page'];
if(empty($id) && !is_store()){
$storeList = pdo_getall('wlmerchant_merchantdata',array('uniacid' => $_W['uniacid'],'aid' => $_W['aid'],'status' => 2,'enabled' => 1),array('id','storename'));
}else{
if($id) $data = Util::getSingelData("*", PDO_NAME.'comment', array('id'=>$id));
}
if($_GPC['data']){
unset($data['id']);
$update = $_GPC['data'];
if(empty($id)){
$data['sid'] = $update['sid'];
$data['gid'] = $update['gid'];
$data['plugin'] = $update['plugin'];
$data['uniacid'] = $_W['uniacid'];
$data['aid'] = $_W['aid'];
$data['status'] = 1;
}
$data['star'] = $update['star'];
if($data['star'] > 3){
$data['level'] = 1;
}else if($data['star'] == 3){
$data['level'] = 2;
}else{
$data['level'] = 3;
}
$data['headimg'] = tomedia($update['headimg']);
$data['nickname'] = $update['nickname'];
$data['text'] = $update['text'];
$data['createtime'] = strtotime($update['time']);
$data['replytextone'] = $update['replytextone'];
if(!empty($data['replytextone'])){
$data['replyone'] = 2;
}
$data['true'] = 2;
$data['checkone'] = 2;
$data['pic']=serialize($_GPC['pic']);
$data['replypicone']=serialize($_GPC['replypicone']);
pdo_insert(PDO_NAME.'comment',$data);
wl_message("操作成功!",web_url('store/storeComment/index',array('page'=>$page)),'success');
}
include wl_template('store/comment_add');
}
//删除商户评论
public function delete(){
global $_W,$_GPC;
$pindex = $_GPC['pindex'];
if($_GPC['id']){
$ids = explode(",", $_GPC['id']);;
foreach($ids as$k=>$v){
pdo_delete(PDO_NAME.'comment',array('id'=>$v));
}
}
show_json(1);
}
}

191
addons/weliam_smartcity/web/controller/store/storeDynamic.ctrl.php

@ -0,0 +1,191 @@
<?php
defined('IN_IA') or exit('Access Denied');
/**
* Comment: 商户动态
* Author: zzw
* Date: 2021/1/7 16:25
* Class StoreDynamic_WeliamController
*/
class StoreDynamic_WeliamController{
//批量审核
public function dyncheck(){
global $_W,$_GPC;
if($_GPC['ids']){
$ids = explode(",", $_GPC['ids']);;
foreach($ids as$k=>$v){
pdo_update(PDO_NAME.'store_dynamic',array('status'=>$_GPC['check']),array('id'=>$v));
}
wl_message("操作成功!",web_url('store/storeDynamic/dynamic'),'success');
}
}
//动态详情
public function checkdyn(){
global $_W,$_GPC;
$id = $_GPC['id'];
$data = pdo_get(PDO_NAME.'store_dynamic',array('id' => $id));
$data['pic'] = unserialize($data['imgs']);
$data['sName'] = Util::idSwitch('sid', 'sName', $data['sid']);
if($_GPC['token']){
$update = array(
'content' => $_GPC['content'],
'status' => $_GPC['checkone'],
'imgs' => serialize($_GPC['pic']),
);
pdo_update(PDO_NAME.'store_dynamic',$update,array('id'=>$id));
wl_message("操作成功!",web_url('store/storeDynamic/dynamic'),'success');
}
include wl_template('store/dynamic_check');
}
//批量删除动态
public function dyndelete(){
global $_W,$_GPC;
if($_GPC['ids']){
$ids = explode(",", $_GPC['ids']);;
foreach($ids as$k=>$v){
pdo_delete(PDO_NAME.'store_dynamic',array('id'=>$v));
}
}
wl_message("操作成功!",web_url('store/storeDynamic/dynamic'),'success');
}
//动态列表
public function dynamic(){
global $_W,$_GPC;
$pindex = max(1, intval($_GPC['page']));
$psize = 10;
$where=array();
$where['uniacid'] = $_W['uniacid'];
$where['aid'] = $_W['aid'];
if(is_store()){
$where['sid'] = $_W['storeid'];
}
if (empty($starttime) || empty($endtime)) {//初始化时间
$starttime = strtotime('-1 month');
$endtime = time();
}
if (!empty($_GPC['time'])) {
$starttime = strtotime($_GPC['time']['start']);
$endtime = strtotime($_GPC['time']['end']);
switch($_GPC['timetype']){
case 1:$where['createtime>'] = $starttime;
$where['createtime<'] = $endtime;break;
case 2:$where['passtime>'] = $starttime;
$where['passtime<'] = $endtime;break;
case 3:$where['sendtime>'] = $starttime;
$where['sendtime<'] = $endtime;break;
}
}
if (!empty($_GPC['type'])){
if($_GPC['type'] == 4){
$where['status'] = 0;
}else {
$where['status'] = $_GPC['type'];
}
}
if (!empty($_GPC['keyword'])) $where['sid'] = $_GPC['keyword'];
$data = Util::getNumData("*",PDO_NAME.'store_dynamic',$where,'createtime desc',$pindex,$psize,1);
$lists = $data[0];
$pager = $data[1];
foreach($lists as $key=>&$dyn){
$dyn['sName'] = pdo_getcolumn(PDO_NAME.'merchantdata',array('id'=>$dyn['sid']),'storename');
$member = pdo_get(PDO_NAME.'member',array('id'=>$dyn['mid']),array('avatar','nickname'));
$dyn['headimg'] = tomedia($member['avatar']);
$dyn['nickname'] = $member['nickname'];
}
include wl_template('store/dynamic');
}
//删除动态
public function deletedyn() {
global $_W,$_GPC;
if ($_W['ispost']) {
$id = intval($_GPC['id']);
if (empty($id)) {
show_json(0, '参数错误,请刷新重试!');
}else {
$res = pdo_delete('wlmerchant_store_dynamic', array('id' => $id,'aid' => intval($_W['aid'])));
}
if($res){
show_json(1);
}else {
show_json(0, '删除失败,请刷新页面重试!');
}
}
}
//动态审核
public function passdyn() {
global $_W,$_GPC;
if ($_W['ispost']) {
$id = intval($_GPC['id']);
if (empty($id)) {
show_json(0, '参数错误,请刷新重试!');
}else {
$type = $_GPC['type'];
if($type == 'pass'){
$res = pdo_update('wlmerchant_store_dynamic',array('status' => 1,'passtime'=>time()),array('id' => $id));
}else if($type == 'reject'){
$res = pdo_update('wlmerchant_store_dynamic',array('status' => 3,'passtime'=>time()),array('id' => $id));
}
}
if($res){
show_json(1,'审核成功');
}else {
show_json(0, '删除失败,请刷新页面重试!');
}
}
}
//推送动态
public function senddyn(){
global $_W,$_GPC;
$id = intval($_GPC['id']);
$dynamic = pdo_get('wlmerchant_store_dynamic',array('id' => $id,'status'=>1));
if(empty($dynamic)){
wl_message('此动态已删除或已推送');
}
$fans = pdo_getall('wlmerchant_storefans',array('uniacid'=>$_W['uniacid'],'sid' => $dynamic['sid']),array('mid'));
$fannum = count($fans);
if(checksubmit('submit')){
$firsttext = $_GPC['firsttext'];
$remark = $_GPC['remark'];
$content = $_GPC['content'];
$source = $_GPC['source'] ? : 1;
include wl_template('store/dyn-process');
exit;
}
include wl_template('store/dynamicmodel');
}
//批量推送
public function senddyning(){
global $_W,$_GPC;
$id = intval($_GPC['id']);
$firsttext = $_GPC['firsttext'];
$remark = $_GPC['remark'];
$content = $_GPC['content'];
$source = $_GPC['source'] ? : 1;
$psize = 50;
$request_body = file_get_contents('php://input');
$data = json_decode($request_body, true);
$pindex = $data['pindex'];
$success = $data['success'];
$dynamic = pdo_get('wlmerchant_store_dynamic',array('id' => $id,'status'=>1));
$fans = pdo_fetchall("SELECT mid FROM ".tablename('wlmerchant_storefans')."WHERE sid = {$dynamic['sid']} AND uniacid = {$_W['uniacid']} ORDER BY id DESC LIMIT ".$pindex * $psize . ',' . $psize);
if($fans){
$url = h5_url('pages/mainPages/store/index',['sid'=>$dynamic['sid']]);
foreach($fans as $key => $fan) {
//模板消息
News::jobNotice($fan['mid'],$firsttext,'商家动态推送',$content,'已完成',$remark,time(),$url,$source);
//站内私信
pdo_insert(PDO_NAME.'im', array('uniacid' => $_W['uniacid'],'send_id'=> $dynamic['sid'],'send_type'=> 2,'receive_id'=>$fan['mid'],'receive_type'=>1,'create_time'=>time(),'content'=>$content));
$success++;
}
$return = array('result' => 1,'success' => $success);
}else{
pdo_update('wlmerchant_store_dynamic',array('status' => 2,'sendtime'=>time(),'successnum'=>$success),array('id' => $id));
$return = array('result' => 3,'success' => $success);
}
die(json_encode($return));
}
}

94
addons/weliam_smartcity/web/controller/store/storeSetMeal.ctrl.php

@ -0,0 +1,94 @@
<?php
defined('IN_IA') or exit('Access Denied');
/**
* Comment: 商户套餐管理(入驻套餐)
* Author: zzw
* Date: 2021/1/7 15:36
* Class StorePayMeal_WeliamController
*/
class StoreSetMeal_WeliamController{
//套餐列表
public function chargelist(){
global $_W,$_GPC;
$pindex = max(1, $_GPC['page']);
$where['uniacid'] = $_W['uniacid'];
if(is_agent()){
$where['aid'] = $_W['aid'];
}
$listData = Util::getNumData("*", PDO_NAME . 'chargelist',$where, 'sort desc,id desc', $pindex, 10, 1);
$list = $listData[0];
$pager = $listData[1];
foreach ($list as $key => &$v) {
if($v['aid']){
$v['agentname'] = pdo_getcolumn(PDO_NAME.'agentusers',array('id'=>$v['aid']),'agentname');
}else{
$v['agentname'] = '平台通用';
}
}
include wl_template('store/chargelist');
}
/**
* Comment: 商户套餐添加、修改操作
* Author: zzw
* Date: 2020/4/13 11:04
*/
public function add() {
global $_W, $_GPC;
#1、参数获取
$id = $_GPC['id'] ? : '';
if (checksubmit('submit')) {
//添加、修改操作
$memberType = $_GPC['data'] ? : [];
$memberType['authority'] = serialize($_GPC['authority']);
//根据是否存在id 判断是添加信息还是修改信息
if ($id) {
//判断是否修改信息
$isUpdate = pdo_get(PDO_NAME."chargelist",$memberType);
if($isUpdate) wl_message('请修改后提交!' , web_url('store/storeSetMeal/add',['id'=>$id]) , 'error');
$res = pdo_update(PDO_NAME . 'chargelist' , $memberType , ['id' => $_GPC['id']]);
}else {
$memberType['aid'] = $_W['aid'];
$memberType['uniacid'] = $_W['uniacid'];
$res = pdo_insert(PDO_NAME . 'chargelist' , $memberType);
}
//判断操作是否成功
if ($res) wl_message('操作成功!' , web_url('store/storeSetMeal/chargelist') , 'success');
else wl_message('操作失败!' , web_url('store/storeSetMeal/chargelist') , 'error');
}
#2、获取基本信息
if ($id) {
$data = Util::getSingelData("*", PDO_NAME . 'chargelist', ['id' => $id]);
$data['authority'] = unserialize($data['authority']);
}
$agents = pdo_getall(PDO_NAME.'agentusers',['uniacid' => $_W['uniacid'],'status'=>1],['id','agentname']);
include wl_template('store/chargeadd');
}
//删除套餐
public function delete() {
global $_W, $_GPC;
$res = pdo_delete(PDO_NAME . 'chargelist', array('id' => $_GPC['id']));
if($res){
show_json(1);
}else{
show_json(0,'删除失败,请刷新重试');
}
}
/**
* Comment: 修改状态
* Author: zzw
* Date: 2019/9/18 16:33
*/
public function changeStatus (){
global $_W , $_GPC;
#1、获取参数信息
$id = $_GPC['id'] OR Commons::sRenderError('缺少参数:id');
$status = $_GPC['status'] ? : 0;
#1、修改操作
$res = pdo_update(PDO_NAME."chargelist",['status'=>$status],['id'=>$id]);
if($res) Commons::sRenderSuccess('修改成功');
else Commons::sRenderError('修改失败,请刷新重试!');
}
}

207
addons/weliam_smartcity/web/controller/user/login.ctrl.php

@ -0,0 +1,207 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Login_WeliamController{
/**
* Comment: 代理商/代理商员工登录
* Author: zzw
*/
public function agent_login(){
global $_W,$_GPC;
if(!empty($_GPC['i'])){
$_W['uniacid'] = $_GPC['i'];
}
if(empty($_W['uniacid']) && !empty($_GPC['aid'])){
$_W['uniacid'] = pdo_getcolumn(PDO_NAME.'agentusers',array('id'=>$_GPC['aid']),'uniacid');
$_W['aid'] = $_GPC['aid'];
}
$set = Setting::wlsetting_read('base');
if(checksubmit() || $_W['isajax']) {
if($_GPC['aid']){
$this->staffLogin($_GPC);//代理商员工登录
}else{
isetcookie('__wlagent_staff_session', '', -10000);//删除员工登录信息
$this->_login($_GPC['referer']);//代理商登陆
}
}
include wl_template('user/agent_login');
}
/**
* Comment: 代理商/员工退出登录
*/
public function logout(){
global $_W,$_GPC;
if($_GPC['__wlagent_staff_session']){
isetcookie('__wlagent_session', '', -10000);//删除代理商登录信息
isetcookie('__wlagent_staff_session', '', -10000);//删除员工登录信息
header('Location:' . web_url('user/login/agent_login',array('aid'=>$_W['aid'])));
}else if($_GPC['__wlagent_session']){
isetcookie('__wlagent_session', '', -10000);//删除代理商登录信息
isetcookie('__wlagent_staff_session', '', -10000);//删除员工登录信息
header('Location:' . web_url('user/login/agent_login'));
}
}
/**
* Comment: 代理商登陆操作
* @param string $forward
*/
public function _login($forward = '') {
global $_GPC, $_W;
$member = array();
$username = trim($_GPC['username']);
pdo_query('DELETE FROM'.tablename('users_failed_login'). ' WHERE lastupdate < :timestamp', array(':timestamp' => TIMESTAMP-300));
$failed = pdo_get('users_failed_login', array('username' => $username, 'ip' => CLIENT_IP));
if ($failed['count'] >= 5) {
wl_message('输入密码错误次数超过5次,请在5分钟后再登录',referer(), 'info');
}
if(empty($username)) {
wl_message('请输入要登录的用户名');
}
$member['uniacid'] = $_GPC['i'];
$member['username'] = $username;
$member['password'] = $_GPC['password'];
if(empty($member['password'])) {
wl_message('请输入密码');
}
$record = User::agentuser_single($member);
if(!empty($record)) {
if($record['status'] != 1) {
wl_message('您的账号正在审核或是已经被系统禁止,请联系网站管理员解决!');
}
if (!empty($record['endtime']) && $record['endtime'] < TIMESTAMP) {
wl_message('您的账号有效期限已过,请联系网站管理员解决!');
}
$cookie = array();
$cookie['id'] = $record['id'];
$cookie['uniacid'] = $record['uniacid'];
$cookie['hash'] = md5($record['password'] . $record['salt']);
$session = base64_encode(json_encode($cookie));
isetcookie('__wlagent_session', $session, 7 * 86400, true);
$status = array();
$status['id'] = $record['id'];
$status['lastvisit'] = TIMESTAMP;
$status['lastip'] = CLIENT_IP;
User::agentuser_update($status);
pdo_delete('users_failed_login', array('id' => $failed['id']));
wl_message("欢迎回来,{$record['username']}。", web_url('dashboard/dashboard'));
} else {
if (empty($failed)) {
pdo_insert('users_failed_login', array('ip' => CLIENT_IP, 'username' => $username, 'count' => '1', 'lastupdate' => TIMESTAMP));
} else {
pdo_update('users_failed_login', array('count' => $failed['count'] + 1, 'lastupdate' => TIMESTAMP), array('id' => $failed['id']));
}
wl_message('登录失败,请检查您输入的用户名和密码!');
}
}
/**
* Comment: 代理商员工登录
* Author: zzw
* @param $info 登录信息
*/
protected function staffLogin($info){
global $_W;
#1、接收参数信息
$aid = $info['aid'];
$account = $info['username'];
$password = $info['password'];
#2、判断信息是否完整
if(!$account){
wl_message('登录失败!请填写账号信息。');
}else if (!$password){
wl_message('登录失败!请填写账号密码。');
}
#3、判断代理商是否存在
$agent = pdo_get(PDO_NAME."agentusers",array('id'=>$aid));
if(!$agent){
wl_message('登录失败!代理商信息不存在。');
}else if ($agent['status'] != 1){
wl_message('登录失败!该代理商正在审核或是已经被禁用,请联系网站管理员解决。');
}else if(!empty($agent['endtime']) && $agent['endtime'] < TIMESTAMP){
wl_message('登录失败!该代理商运营有效期已过,请联系网站管理员解决。');
}
#4、判断是否存在该账号
$existence = pdo_get(PDO_NAME."agentadmin",array('account'=>$account));
if(!$existence){
wl_message('登录失败!账号不存在。');
}
#5、判断账号密码是否正确
$userInfo = pdo_get(PDO_NAME."agentadmin",array('account'=>$account,'password'=>md5($password)));
if(!$userInfo){
wl_message('登录失败!密码错误。');
}
#6、登录成功后的操作 - 模拟代理商登录成功
$cookie['id'] = $agent['id'];
$cookie['uniacid'] = $agent['uniacid'];
$cookie['hash'] = md5($agent['password'] . $agent['salt']);
$session = base64_encode(json_encode($cookie));
isetcookie('__wlagent_session', $session, 7 * 86400, true);
#7、登录成功后的操作 - 员工登录成功,储存员工登录信息
$userCookie['aid'] = $aid;
$userCookie['uniacid'] = $_W['uniacid'];
$userCookie['account'] = $account;
$userCookie['password'] = md5($password);
$userSession = base64_encode(json_encode($userCookie));
isetcookie('__wlagent_staff_session', $userSession, 7 * 86400, true);
#8、获取该管理员的昵称信息
$mid = $userInfo['mid'];
$nickname = pdo_getcolumn(PDO_NAME."member",array('id'=>$mid),'nickname');
wl_message("欢迎回来,{$nickname}。", web_url('dashboard/dashboard'));
}
//平台员工登录
public function adminStaffLogin(){
global $_W,$_GPC;
//参数信息获取
$account = $_GPC['username'] ? : '';
$password = $_GPC['password'] ? : '';
$uniacid = $_GPC['i'] ? : $_W['uniacid'];
$set = Setting::wlsetting_read('base');
if($account) {
if(!$account || !$password) wl_message('请完善账号密码!');
//判断账号密码是否正确
$where = [
'account' => $account,
'password' => md5($password),
'uniacid' => $uniacid,
'aid' => 0,//平台员工aid固定为1
];
$existence = pdo_get(PDO_NAME."agentadmin",$where);
if(!$existence) wl_message('账号密码错误!');
//模拟后台登录
$_W['highest_role'] = 'founder';
//记录员工登录信息
$user = [
'uniacid' => $uniacid,
'account' => $account,
'password' => md5($password)
];
$userSession = base64_encode(json_encode($user));
isetcookie('__wlsystem_staff_session', $userSession, 7 * 86400, true);
//获取该管理员的昵称信息
$nickname = pdo_getcolumn(PDO_NAME."member",['id' => $existence['mid']],'nickname');
$url = web_url('dashboard/dashboard/index');
wl_message("欢迎回来,{$nickname}。", $url);
}
include wl_template('user/agent_login');
}
//平台员工退出登录
public function adminStaffLogout(){
global $_W,$_GPC;
//删除员工登录信息
if($_GPC['__wlsystem_staff_session'] || $_GPC['__session']){
isetcookie('__session', '', -10000);//删除模拟的管理员登录信息
isetcookie('__wlsystem_staff_session', '', -10000);//删除员工登录信息
}
$loginUrl = $_W['siteroot']."web/citysys.php?p=user&ac=login&do=adminStaffLogin&i={$_W['uniacid']}";//平台员工登录
header('Location:' . $loginUrl);
}
}

153
addons/weliam_smartcity/web/controller/user/storelogin.ctrl.php

@ -0,0 +1,153 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Storelogin_WeliamController {
/**
* Comment: 进入商户登录页面(扫码登录)
* Author: zzw
* Date: 2019/10/30 11:08
*/
public function store_login() {
global $_W, $_GPC;
#1、建立储存字段信息 值为-1(-1=初始化;-2=取消登录;-3=二维码失效;1=扫描成功;2=确认登录)
$onlyKey = md5(uniqid(microtime(true), true));
$time = intval(180);//3分钟过期
$endTime = time() + $time;//到期时间
$data = [
'status' => -1,
'end_time' => $endTime
];
Cache::setCache('storeLoginInfo', $onlyKey, json_encode($data));
#2、判断公众号是否存在
if(p('wxplatform')) {
$wechat = 1;
//获取微信公众号二维码信息
$path = h5_url('pages/subPages/merchant/storePcLogin/storePcLogin', ['only_key' => $onlyKey]);
} else {
$wechat = 0;
}
#3、判断小程序是否存在
$weapp = 0;
if(p('wxapp')) {
//获取小程序二维码信息
$weAppPath = WeApp::getQrCode('pages/subPages/merchant/storePcLogin/storePcLogin?only_key='.$onlyKey,'store_login_'.$onlyKey.'.png');//保存名称));
if(is_string($weAppPath) && $weAppPath){
$weapp = 1;
$weAppPath = tomedia($weAppPath);
}
}
include wl_template('user/store_login');
}
/**
* Comment: 更新二维码过期时间
* Author: zzw
* Date: 2019/11/7 14:57
*/
public function changeEndTime(){
global $_W,$_GPC;
#1、参数获取
$onlyKey = $_GPC['only_key'] OR Commons::sRenderError('请刷新重试');
#2、修改过期时间
$loginInfo = json_decode(Cache::getCache('storeLoginInfo', $onlyKey), true);
#3、更新到期时间
$time = intval(180);//3分钟过期
$endTime = time() + $time;//到期时间
$data = [
'status' => -1,
'end_time' => $endTime
];
Cache::setCache('storeLoginInfo', $onlyKey, json_encode($data));
Commons::sRenderSuccess('新的过期信息',$data);
}
/**
* Comment: 获取商户登录状态
* Author: zzw
* Date: 2019/10/30 17:08
*/
public function getLoginStatus() {
global $_W, $_GPC;
#1、参数获取
$onlyKey = $_GPC['only_key'] OR Commons::sRenderError('请刷新重试');
#2、获取当前用户的扫描状态
$loginInfo = json_decode(Cache::getCache('storeLoginInfo', $onlyKey), true);
#3、判断储存内容是否正确
if (!is_array($loginInfo)) Commons::sRenderSuccess('登录状态', ['status' => intval(-3)]);
#4、判断是否过期
if ($loginInfo['end_time'] <= time()) Commons::sRenderSuccess('登录状态', ['status' => intval(-3)]);
if ($loginInfo['status'] == 2) {
$cookie = array();
$cookie['mid'] = $loginInfo['mid'];
$cookie['uniacid'] = $_W['uniacid'];
$session = base64_encode(json_encode($cookie));
isetcookie('__wlstore_session', $session, 7 * 86400, true);
}
Commons::sRenderSuccess('登录状态', ['status' => intval($loginInfo['status']), 'mid' => intval($loginInfo['mid'])]);
}
/**
* Comment: 通过用户mid获取用户名下的所有店铺
* Author: zzw
* Date: 2019/10/31 14:43
*/
public function storeLogin() {
global $_W, $_GPC;
#1、获取当前用户的所有店铺列表
$list = pdo_fetchall("SELECT a.name,b.id,b.storename,b.logo,b.endtime,a.ismain FROM "
. tablename(PDO_NAME . "merchantuser") . " as a RIGHT JOIN " . tablename(PDO_NAME . "merchantdata")
. " as b ON a.storeid = b.id WHERE a.mid = {$_W['mid']} AND a.enabled = 1 AND b.enabled = 1 AND a.ismain != 2 GROUP BY a.storeid ORDER BY a.createtime ASC ");
#1、循环处理商户信息
if (empty($list)) {
wl_message("您没有可管理商户", web_url('user/storelogin/storeLogin', ['mid' => $_W['mid']]), 'fixed');
}
//检测认证功能
if(p('attestation')){
$attset = Setting::wlsetting_read('attestation');
}else{
$attset = [];
}
foreach ($list as $key => &$val) {
//处理logo图
$val['logo'] = tomedia($val['logo']);
//处理店铺到期时间
$val['endtime'] = $val['endtime'] > time() ? floor(($val['endtime']-time())/86400) . '天后到期' : '已到期';
//处理店员类型
if ($val['ismain'] == 1) {
$val['ismain'] = '店长';
} else if ($val['ismain'] == 3) {
$val['ismain'] = '管理员';
} else if ($val['ismain'] == 4) {
$val['ismain'] = '业务员';
}
//认证
if($attset['attmanage'] == 1){
$attestation = Attestation::checkAttestation(2,$val['id']);
if($attestation['attestation'] != 2){
$val['noatt'] = 1;
}
}
}
include wl_template('user/select_shop');
}
public function on_store() {
global $_W, $_GPC;
$this->select_store(intval($_GPC['sid']));
}
public function logout() {
isetcookie('__wlstore_session', '', -10000);
isetcookie('__wlstoreid_session', '', -10000);
header('Location:' . web_url('user/storelogin/store_login'));
}
private function select_store($storeid) {
isetcookie('__wlstoreid_session', $storeid, 7 * 86400, true);
header('Location:' . web_url('dashboard/dashboard'));
}
}

372
addons/weliam_smartcity/web/controller/utility/attachment.ctrl.php

@ -0,0 +1,372 @@
<?php
defined('IN_IA') or exit('Access Denied');
/**
* Comment: 附件管理
* Author: zzw
* Class attachment_WeliamController
*/
class attachment_WeliamController{
/**
* Comment: 进入附件操作选择页面
* Author: zzw
* Date: 2020/8/31 13:43
*/
public function index(){
global $_W,$_GPC;
//基本参数信息获取
$mimeType = $_GPC['mime_type'] ? : 'image';//附件类型:image、video、application、audio
$multi = $_GPC['multi'] ? : '';
$page = intval($_GPC['page']) ? : 1;
$pageIndex = intval($_GPC['page_index']) ? : 35;
$group_id = intval($_GPC['group_id']) ? : 0;
$shop_id = $_GPC['storeid'] ? : $_W['storeid'] ? : 0;
$aid = $_GPC['aid'] ? : $_W['aid'] ? : 0;
$uniacid = $_W['uniacid'];
//如果是post请求则获取附件列表信息
if($_W['ispost']){
//条件生成
$where = [
'uniacid' => $uniacid ,
'mimetype like' => "%{$mimeType}%" ,
];
if ($group_id > 0) $where['group_id'] = $group_id;
if ($shop_id > 0) $where['shop_id'] = $shop_id;
if ($shop_id < 0) $where['shop_id'] = 0;
if ($aid > 0) $where['aid'] = $aid;
//分页操作
$limit = [$page,$pageIndex];
//列表信息获取
$field = ['id','aid','shop_id','url','imagewidth','imageheight','filesize','uploadtime','storage','name'];
$list = pdo_getall(PDO_NAME.'attachment',$where,$field,'','id DESC',$limit);
foreach($list as $key => &$val){
//获取上传方信息
if($val['aid'] > 0) $val['upload_user'] = pdo_getcolumn(PDO_NAME."agentusers",['id'=>$val['aid']],'agentname');
if($val['shop_id'] > 0) $val['upload_user'] = pdo_getcolumn(PDO_NAME."merchantdata",['id'=>$val['shop_id']],'storename');
//处理基本信息
$val['http_url'] = tomedia($val['url']);//附件地址
$val['filesize'] = sprintf("%.2f",$val['filesize'] / 1024);//附件大小 精确到M
$val['uploadtime'] = date("Y-m-d H:i:s",$val['uploadtime']);//附件大小 精确到M
//删除多余的信息
unset($val['aid'],$val['shop_id']);
}
//生成分页数据
$total = pdo_count(PDO_NAME.'attachment',$where);
$totalPage = ceil($total / $pageIndex);
Commons::sRenderSuccess('附件信息列表',['list'=>$list,'total_page'=>$totalPage]);
}
include wl_template('utility/attachment_index');
}
/**
* Comment: 文件上传
* Author: zzw
* Date: 2020/8/28 16:44
* @throws Exception
*/
public function uploadFile(){
global $_W,$_GPC;
//基本参数信息获取
$params = [
'uniacid' => $_W['uniacid'] ,
'aid' => $_W['aid'] ? : 0 ,
'shop_id' => $_W['storeid'] ? : 0 ,
'group_id' => intval($_GPC['group_id']) ? : 0 ,
'filesize' => $_FILES['file']['size'] ,
'mimetype' => $_FILES['file']['type'] ,
'name' => $_FILES['file']['name'] ,
];
UploadFile::uploadIndex($_FILES,1,0,$params);
}
/**
* Comment: 删除附件信息
* Author: zzw
* Date: 2020/8/31 13:51
*/
public function delAttachment(){
global $_W,$_GPC;
//基本参数信息获取
$ids = $_GPC['ids'] OR Commons::sRenderError('参数错误,请刷新重试!');
//循环处理判断图片信息
if(is_array($ids)){
foreach($ids as $id){
$this->delAttachmentFile($id);
}
}else{
$this->delAttachmentFile($ids);
}
//删除信息
if(pdo_delete(PDO_NAME."attachment",['id IN'=>$ids])) Commons::sRenderSuccess('删除成功');
else Commons::sRenderError('删除失败,请刷新重试!');
}
/**
* Comment: 删除附件信息的同时删除本地文件信息
* Author: zzw
* Date: 2020/12/7 14:54
* @param $id
*/
public function delAttachmentFile($id){
global $_W;
//判断附件是否储存在本地
$info = pdo_get(PDO_NAME."attachment",['id'=>$id],['storage','url']);
if($info['storage'] == 0){
$fullName = PATH_ATTACHMENT . $info['url'];//文件在本地服务器暂存地址
unlink($fullName);
}
}
/**
* Comment: 移动附件到其他分组
* Author: zzw
* Date: 2020/9/1 11:06
*/
public function moveAttachment(){
global $_W,$_GPC;
//参数信息获取
$ids = $_GPC['ids'] OR Commons::sRenderError("未选择附件,请重试!");
$group_id = $_GPC['group_id'] OR Commons::sRenderError("不存在的分组!");
//移动操作
pdo_update(PDO_NAME."attachment",['group_id'=>$group_id],['id IN'=>$ids]);
Commons::sRenderSuccess("操作成功");
}
/**
* Comment: 获取分组列表信息
* Author: zzw
* Date: 2020/8/28 17:31
*/
public function groupIndex(){
global $_W,$_GPC;
//基本参数信息获取
$mimeType = $_GPC['mime_type'] ? : 'image';//附件类型:image、video、application
$shop_id = intval($_W['storeid']) ? : 0;
$aid = intval($_W['aid']) ? : 0;
$uniacid = $_W['uniacid'];
//条件生成 总后可以查看所有图片但是只能查看总后台的分组
$type = $this->groupValueTransformation($mimeType);
$where = [
'uniacid' => $uniacid ,
'type' => $type ,
'shop_id' => $shop_id ,
'aid' => $aid ,
];
// if ($shop_id > 0) $where['shop_id'] = $shop_id;
// if ($aid > 0) $where['aid'] = $aid;
//列表信息获取
$list = pdo_getall(PDO_NAME."attachment_group",$where,['id','name'],'','id DESC');
Commons::sRenderSuccess('分组信息',$list);
}
/**
* Comment: 添加分组
* Author: zzw
* Date: 2020/8/28 16:57
*/
public function groupAdd(){
global $_W , $_GPC;
//信息获取
$name = $_GPC['name'] OR Commons::sRenderError('请输入组名称!');
$mimeType = $_GPC['mime_type'] ? : 'image';//附件类型:image、video、application
$shop_id = $_W['storeid'];
$aid = $_W['aid'];
$uniacid = $_W['uniacid'];
//条件生成 分组类型:1=图片,2=视频,3=文件
$type = $this->groupValueTransformation($mimeType);
$where = [
'name' => $name,
'uniacid' => $uniacid ,
'type' => $type ,
];
if ($shop_id > 0) $where['shop_id'] = $shop_id;
if ($aid > 0) $where['aid'] = $aid;
//判断是否已经存在
$isHave = pdo_get(PDO_NAME . "attachment_group" , $where);
if ($isHave) Commons::sRenderError('分组已存在!');
//添加操作
$data = [
'uniacid' => $uniacid ,
'aid' => $aid ,
'shop_id' => $shop_id ,
'type' => $type ,
'name' => $name ,
];
pdo_insert(PDO_NAME."attachment_group",$data);
Commons::sRenderSuccess('添加成功');
}
/**
* Comment: 编辑组信息
* Author: zzw
* Date: 2020/8/28 18:35
*/
public function groupEdit(){
global $_W , $_GPC;
//信息获取
$id = $_GPC['id'] OR Commons::sRenderError('参数错误,请刷新重试!');
$name = $_GPC['name'] OR Commons::sRenderError('请输入组名称!');
$mimeType = $_GPC['mime_type'] ? : 'image';//附件类型:image、video、application
$shop_id = $_W['storeid'];
$aid = $_W['aid'];
$uniacid = $_W['uniacid'];
//条件生成 分组类型:1=图片,2=视频,3=文件
$type = $this->groupValueTransformation($mimeType);
$where = [
'name' => $name,
'uniacid' => $uniacid ,
'type' => $type ,
];
if ($shop_id > 0) $where['shop_id'] = $shop_id;
if ($aid > 0) $where['aid'] = $aid;
//判断是否已经存在
$isHave = pdo_get(PDO_NAME . "attachment_group" , $where);
if ($isHave) Commons::sRenderError('分组已存在!');
//修改操作
pdo_update(PDO_NAME."attachment_group",['name'=>$name],['id'=>$id]);
Commons::sRenderSuccess('修改成功');
}
/**
* Comment: 删除分组
* Author: zzw
* Date: 2020/8/28 18:08
*/
public function groupDelete(){
global $_W,$_GPC;
//参数信息获取
$id = $_GPC['id'] OR Commons::sRenderError('参数错误,请刷新重试!');
//删除信息
pdo_delete(PDO_NAME."attachment_group",['id'=>$id]);
Commons::sRenderSuccess('删除成功');
}
/**
* Comment: 导入微擎图片信息
* Author: zzw
* Date: 2020/8/31 16:49
*/
public function importAttachment(){
global $_W,$_GPC;
//获取微擎图片信息
$list = Cache::getCache('import_attachment','list');
if(!$list){
$field = ['filename','attachment','type','createtime','module_upload_dir','group_id'];
$where = ['uniacid'=>$_W['uniacid'],'type'=>1];
$list = table('core_attachment')
->select($field)
->where($where)
->getall();
Cache::setCache('import_attachment','list',json_encode($list));
}else{
$list = json_decode($list,true);
}
//循环储存附件信息 一次最多50条
$index = 0;
$tips = true;
(new MysqlFunction())->startTrans();//开启事务
foreach($list as $key => $value){
//到达限制 跳出循环
if(++$index > 50) break;
//判断附件是否已经存在
$isHave = pdo_get(PDO_NAME."attachment",['url'=>$value['attachment']]);
if($isHave) {
//已经存在当前图片 跳出当前循环
unset($list[$key]);
continue;
}
//获取图片基本信息
$params = [
'uniacid' => $_W['uniacid'] ,
'aid' => $_W['aid'] ,
'url' => $value['attachment'] ,
'name' => $value['filename'] ,
'uploadtime' => $value['createtime'] ,
'mimetype' => 'image' ,
];
$url = tomedia($value['attachment']);
list($params['imagewidth'] , $params['imageheight']) = getimagesize($url);//基本参数获取
$nameArr = explode('.' , $value['attachment']);
$params['suffix'] = $nameArr[count($nameArr) - 1];
//储存图片信息
$res = pdo_insert(PDO_NAME."attachment",$params);
if(!$res){
(new MysqlFunction())->rollback();
$tips = false;
break;
}else{
unset($list[$key]);
}
}
//步骤完成 进行其他操作
if($tips){
//操作成功
(new MysqlFunction())->commit();
if(count($list) > 0){
$list = array_values($list);
Cache::setCache('import_attachment','list',json_encode($list));
}else{
Cache::deleteCache('import_attachment','list');
}
Commons::sRenderSuccess('操作成功',['surplus'=>count($list)]);
}else{
//操作失败
Commons::sRenderSuccess('操作失败');
}
}
/**
* Comment: 文件mimetype信息转换 字符串转code
* Author: zzw
* Date: 2020/8/28 17:03
* @param $mimeType
* @return int
*/
protected function groupValueTransformation($mimeType){
$type = 1;
switch ($mimeType) {
case 'image':
$type = 1;
break;
case 'video':
$type = 2;
break;
case 'application':
$type = 3;
break;
}
return $type;
}
/**
* Comment: 获取代理商列表
* Author: zzw
* Date: 2020/9/23 11:05
*/
public function getAgentList(){
global $_W,$_GPC;
$field = ['id','agentname'];
$list = pdo_getall(PDO_NAME."agentusers",['uniacid'=>$_W['uniacid']],$field);
Commons::sRenderSuccess('代理商列表',['list'=>$list]);
}
/**
* Comment: 获取店铺信息列表
* Author: zzw
* Date: 2020/9/23 11:16
*/
public function getShopList(){
global $_W,$_GPC;
$aid = $_GPC['aid'] ? : $_W['aid'];
$field = ['id','storename'];
$list = pdo_getall(PDO_NAME."merchantdata",['uniacid'=>$_W['uniacid'],'aid'=>$aid],$field);
Commons::sRenderSuccess('店铺信息列表',['list'=>$list]);
}
}

21
addons/weliam_smartcity/web/controller/utility/member.ctrl.php

@ -0,0 +1,21 @@
<?php
defined('IN_IA') or exit('Access Denied');
class Member_WeliamController {
public function mc_select() {
global $_W, $_GPC;
//参数信息获取
$search = $_GPC['search'] ? : '';
//条件生成
$where = " WHERE uniacid = {$_W['uniacid']} ";
if($search) $where .= " AND (nickname like '%{$search}%' OR mobile like '%{$search}%' OR id like '%{$search}%')";
//信息查询
$sql = "SELECT id,nickname,mobile FROM ".tablename(PDO_NAME."member");
$members = pdo_fetchall($sql.$where." LIMIT 10");
foreach ($members as &$member) {
$data[] = ['id' => $member['id'], 'text' => $member['nickname'].'(MID:'. $member['id'].')'.($member['mobile'] ? ' - ' . $member['mobile'] : '')];
}
die(json_encode($data));
}
}

21
addons/weliam_smartcity/web/controller/utility/qrcode.ctrl.php

@ -0,0 +1,21 @@
<?php
/**
* Comment: ...
* Author: ZZW
* Date: 2018/11/20
* Time: 12:06
*/
defined('IN_IA') or exit('Access Denied');
class qrcode_WeliamController{
public function getQrCode(){
global $_W,$_GPC;
$url = urldecode($_GPC['url']);
if(!$url){
return false;
}
m('qrcode/QRcode')->png($url, false, QR_ECLEVEL_H, 4);
}
}

721
addons/weliam_smartcity/web/controller/utility/select.ctrl.php

@ -0,0 +1,721 @@
<?php
defined('IN_IA') or exit('Access Denied');
class select_WeliamController{
/**
* Comment: 获取公众号地址
* Author: zzw
*/
public function comurl()
{
global $_W , $_GPC;
#1、获取公共链接信息
$data = Links::getLinks();
#1、规避url前缀字符串 将完整超链接变为内部path路径
//获取将要规避的url字符串信息
$string = 'h5/#/';
$urlStr = trim(json_encode(explode($string , h5_url(''))[0] . $string) , '"');
//将要规避的ulr字符串替换为空
$data = json_decode(str_replace($urlStr , '' , json_encode($data)) , true);
#3、重定义链接信息
$shop_pageNum = 5;
$rush_pageNum = 5;
$fightgroup_pageNum = 5;
$groupon_pageNum = 5;
$coupon_pageNum = 5;
$bargain_pageNum = 5;
$system = $data['system'];
$shop_total = $data['shop_total'];
$shopList = $data['shopList'];
$rush_total = $data['rush_total'];
$rush = $data['rush'];
$fightgroup_total = $data['fightgroup_total'];
$fightgroup = $data['fightgroup'];
$groupon_total = $data['groupon_total'];
$groupon = $data['groupon'];
$coupon_total = $data['coupon_total'];
$coupon = $data['coupon'];
$bargain_total = $data['bargain_total'];
$bargain = $data['bargain'];
$pageInfo = $data['pageInfo'];
$rushSpecial = $data['rush_special'];
$cate = $data['cate'];
include wl_template('utility/selecturl');
}
/**
* Comment: 获取店铺信息
* Author: zzw
*/
public function getShop()
{
global $_W , $_GPC;
$search = $_GPC['search'] ? $_GPC['search'] : '';
$page = $_GPC['page'];
$pageNum = $_GPC['pageNum'];
$limit = ' LIMIT ' . ($page * $pageNum - $pageNum) . ',' . $pageNum;
$shopWhere = " aid = {$_W['aid']} AND uniacid = {$_W['uniacid']} AND enabled = 1 ";
if ($search) {
$shopWhere .= " AND storename LIKE '%{$search}%' ";
}
$shop = pdo_fetchall("SELECT id,storename,logo,storehours FROM " . tablename(PDO_NAME . "merchantdata") . " WHERE {$shopWhere} {$limit}");
$shop_total = pdo_fetchcolumn('SELECT COUNT(*) FROM ' . tablename(PDO_NAME . 'merchantdata') . " WHERE {$shopWhere}");
foreach ($shop as $k => &$v) {
$v['url'] = h5_url('pages/mainPages/store/index' , ['sid' => $v['id']]);
$v['page_path'] = 'pages/mainPages/store/list';
$v['logo'] = tomedia($v['logo']);
$storehours = unserialize($v['storehours']);
$v['storehours'] = $storehours['startTime'] . '-' . $storehours['endTime'];
unset($v['id']);
}
$data['page'] = $page;
$data['pageNum'] = $pageNum;
$data['total'] = $shop_total;
$data['list'] = $shop;
$data['search'] = $search;
//获取将要规避的url字符串信息
$string = 'h5/#/';
$urlStr = trim(json_encode(explode($string , h5_url(''))[0] . $string) , '"');
//将要规避的ulr字符串替换为空
$data = json_decode(str_replace($urlStr , '' , json_encode($data)) , true);
wl_json(1 , '商户分页信息' , $data);
}
/**
* Comment: 获取商品信息
* Author: zzw
*/
public function getGoods()
{
global $_W , $_GPC;
$search = $_GPC['search'] ? $_GPC['search'] : '';
$page = $_GPC['page'];
$pageNum = $_GPC['pageNum'];
$limit = ' LIMIT ' . ($page * $pageNum - $pageNum) . ',' . $pageNum;
$type = $_GPC['type'];
$where = " aid = {$_W['aid']} AND uniacid = {$_W['uniacid']} ";
switch ($type) {
case 1:
if ($search) {
$where .= " AND name LIKE '%{$search}%' ";
}
$info = pdo_fetchall(" SELECT id,name,thumb FROM " . tablename(PDO_NAME . "rush_activity") . " WHERE status IN (1,2) AND {$where} {$limit}");
$infoTotal = pdo_fetchcolumn('SELECT COUNT(*) FROM ' . tablename(PDO_NAME . 'rush_activity') . " WHERE status IN (1,2) AND {$where}");
foreach ($info as $k => &$v) {
$v['url'] = h5_url('pages/subPages/goods/index' , ['id' => $v['id'] , 'type' => 1]);
$v['page_path'] = 'pages/subPages/goods/index?type=1';
$v['logo'] = tomedia($v['thumb']);
unset($v['id']);
}
break;//抢购商品
case 2:
if ($search) {
$where .= " AND name LIKE '%{$search}%' ";
}
$info = pdo_fetchall(" SELECT id,name,thumb FROM " . tablename(PDO_NAME . "groupon_activity") . " WHERE status IN (1,2) AND {$where} {$limit}");
$infoTotal = pdo_fetchcolumn('SELECT COUNT(*) FROM ' . tablename(PDO_NAME . 'groupon_activity') . " WHERE status IN (1,2) AND {$where}");
foreach ($info as $k => &$v) {
$v['url'] = h5_url('pages/subPages/goods/index' , ['id' => $v['id'] , 'type' => 2]);
$v['page_path'] = 'pages/subPages/goods/index?type=2';
$v['logo'] = tomedia($v['thumb']);
unset($v['id']);
}
break;//团购商品
case 3:
if ($search) {
$where .= " AND name LIKE '%{$search}%' ";
}
$info = pdo_fetchall(" SELECT id,name,logo FROM " . tablename(PDO_NAME . "fightgroup_goods") . " WHERE status IN (1,2) AND {$where} {$limit}");
$infoTotal = pdo_fetchcolumn('SELECT COUNT(*) FROM ' . tablename(PDO_NAME . 'fightgroup_goods') . " WHERE status IN (1,2) AND {$where}");
foreach ($info as $k => &$v) {
$v['url'] = h5_url('pages/subPages/goods/index' , ['id' => $v['id'] , 'type' => 3]);
$v['page_path'] = 'pages/subPages/goods/index?type=3';
$v['logo'] = tomedia($v['logo']);
unset($v['id']);
}
break;//拼团商品
case 5:
$where .= " AND status IN (1,2) ";
if ($search) {
$where .= " AND title LIKE '%{$search}%' ";
}
$info = pdo_fetchall(" SELECT id,title,logo FROM " . tablename(PDO_NAME . "couponlist") . " WHERE {$where} {$limit}");
$infoTotal = pdo_fetchcolumn('SELECT COUNT(*) FROM ' . tablename(PDO_NAME . 'couponlist') . " WHERE {$where}");
foreach ($info as $k => &$v) {
$v['url'] = h5_url('pages/subPages/goods/index' , ['id' => $v['id'] , 'type' => 5]);
$v['page_path'] = 'pages/subPages/goods/index?type=5';
$v['name'] = $v['title'];
$v['logo'] = tomedia($v['logo']);
unset($v['id']);
unset($v['title']);
}
break;//卡券信息
case 6:
if ($search) {
$where .= " AND name LIKE '%{$search}%' ";
}
$info = pdo_fetchall(" SELECT id,name,thumb FROM " . tablename(PDO_NAME . "bargain_activity") . " WHERE status IN (1,2) AND {$where} {$limit}");
$infoTotal = pdo_fetchcolumn('SELECT COUNT(*) FROM ' . tablename(PDO_NAME . 'bargain_activity') . " WHERE status IN (1,2) AND {$where}");
foreach ($info as $k => &$v) {
$v['url'] = h5_url('pages/subPages/goods/index' , ['id' => $v['id'] , 'type' => 7]);
$v['page_path'] = 'pages/subPages/goods/index?type=7';
$v['logo'] = tomedia($v['thumb']);
unset($v['id']);
unset($v['title']);
}
break;//砍价信息
}
$data['page'] = $page;
$data['pageNum'] = $pageNum;
$data['total'] = $infoTotal;
$data['list'] = $info;
$data['search'] = $search;
//获取将要规避的url字符串信息
$string = 'h5/#/';
$urlStr = trim(json_encode(explode($string , h5_url(''))[0] . $string) , '"');
//将要规避的ulr字符串替换为空
$data = json_decode(str_replace($urlStr , '' , json_encode($data)) , true);
wl_json(1 , '商品信息' , $data);
}
/**
* Comment: 获取小图标信息
* Author: zzw
*/
public function comicon()
{
global $_W , $_GPC;
include wl_template('utility/selecticon');
}
/**
* Comment: 根据状态获取商品信息
* Author: zzw
* @param $plugin 商品类型1=抢购 2=团购 3=拼团 5=优惠券
* @param $search 搜索内容
* @return array
*/
protected function getGoodsReturn($plugin , $search,$sid = 0,$addWhere = [])
{
global $_W;
$where = " AND a.uniacid = {$_W['uniacid']} AND a.aid = {$_W['aid']} ";
if($sid > 0) $where .= " AND b.id = {$sid} ";
if($addWhere['is_optionstatus'] == 1) $where .= " AND a.optionstatus = 0 ";
if($addWhere['is_specstatus'] == 1) $where .= " AND a.specstatus = 0 ";
switch ($plugin) {
case 1:
$goods = pdo_fetchall("SELECT a.id,REPLACE('table','table','rush') as `plugin` FROM "
. tablename(PDO_NAME . "rush_activity")
. " a LEFT JOIN " . tablename(PDO_NAME . "merchantdata")
. " b ON a.sid = b.id WHERE a.status IN (1,2,3) {$where} AND b.storename != '' AND a.name LIKE '%{$search}%'");//
break;//抢购商品
case 2:
$goods = pdo_fetchall("SELECT a.id,REPLACE('table','table','groupon') as `plugin` FROM " . tablename(PDO_NAME . "groupon_activity") . " a LEFT JOIN " . tablename(PDO_NAME . "merchantdata") . " b ON a.sid = b.id WHERE a.status IN (1,2,3) {$where} AND b.storename != '' AND a.name LIKE '%{$search}%'");
break;//团购商品
case 3:
$goods = pdo_fetchall("SELECT a.id,REPLACE('table','table','wlfightgroup') as `plugin` FROM " . tablename(PDO_NAME . "fightgroup_goods") . " a LEFT JOIN " . tablename(PDO_NAME . "merchantdata") . " b ON a.merchantid = b.id WHERE a.status IN (1,2) {$where} AND b.storename != '' AND a.name LIKE '%{$search}%'");
break;//拼团商品
case 4:
$goods = pdo_fetchall("SELECT a.id,REPLACE('table','table','package') as `plugin` FROM " . tablename(PDO_NAME . "package") . " a LEFT JOIN " . tablename(PDO_NAME . "merchantdata") . " b ON a.merchantid = b.id WHERE a.status = 1 {$where} AND b.storename != '' AND a.title LIKE '%{$search}%'");
break;//大礼包
case 5:
$goods = pdo_fetchall("SELECT a.id,REPLACE('table','table','coupon') as `plugin` FROM " . tablename(PDO_NAME . "couponlist") . " a LEFT JOIN " . tablename(PDO_NAME . "merchantdata") . " b ON a.merchantid = b.id WHERE a.status IN (1,2) {$where} AND b.storename != '' AND a.title LIKE '%{$search}%'");
break;//优惠券
case 6:
$goods = pdo_fetchall("SELECT a.id,REPLACE('table','table','halfcard') as `plugin` FROM " . tablename(PDO_NAME . "halfcardlist") . " a LEFT JOIN " . tablename(PDO_NAME . "merchantdata") . " b ON a.merchantid = b.id WHERE a.status = 1 {$where} AND b.storename != '' AND a.title LIKE '%{$search}%'");
break;//折扣卡
case 7:
$goods = pdo_fetchall("SELECT a.id,REPLACE('table','table','bargain') as `plugin` FROM " . tablename(PDO_NAME . "bargain_activity") . " a LEFT JOIN " . tablename(PDO_NAME . "merchantdata") . " b ON a.sid = b.id WHERE a.status IN (1,2,3) {$where} AND b.storename != '' AND a.name LIKE '%{$search}%'");
break;//砍价
}
return $goods;
}
/**
* Comment: 获取全部商品信息
* Author: zzw
* Date: 2019/7/9 17:50
*/
public function getWholeGoods()
{
global $_W , $_GPC;
$plugin = 0;//商品类型 0=全部 1=抢购 2=团购 3=拼团 4=大礼包 5=优惠券 6=折扣卡 7=砍价商品
$search = $_GPC['search'];//搜索内容 商品名称
$isOptionstatus = intval($_GPC['is_optionstatus']) ? intval($_GPC["is_optionstatus"]) : 0;//是否只获取单规格商品0=不,1=是
$page = $_GPC['page'] ? $_GPC['page'] : 1;
$pageNum = $_GPC['pageNum'] ? $_GPC['pageNum'] : 7;
$geturl = $_GPC['geturl'] ? $_GPC['geturl'] : 0;
$sid = $_GPC['sid']? $_GPC['sid'] : 0;
$start = $page * $pageNum - $pageNum;
//获取商品信息
$rush = self::getGoodsReturn(1 , $search , $sid,['is_optionstatus' => $isOptionstatus]);//抢购商品
$groupon = self::getGoodsReturn(2 , $search , $sid,['is_optionstatus' => $isOptionstatus]);//团购商品
$wlfightgroup = self::getGoodsReturn(3 , $search , $sid,['is_specstatus' => $isOptionstatus]);//拼团商品
$coupon = self::getGoodsReturn(5 , $search , $sid);//优惠券
$bargain = self::getGoodsReturn(7 , $search , $sid);//砍价
$goods = array_merge($rush , $groupon , $wlfightgroup , $coupon , $bargain);
if (!$goods) {
$popup = '暂无该类型商品';
include wl_template('utility/selecetgoods');
die;
}
//获取总页数 进行分页
$totalPgae = ceil(count($goods) / $pageNum);
$goods = array_slice($goods , $start , $pageNum);
//只有抢购、团购、拼团、优惠券才会进行下面的操作
$initPlugin = $plugin;
foreach ($goods as $k => &$v) {
//查询全部商品时 每个商品从新定义内容
if ($initPlugin == 0) {
switch ($v['plugin']) {
case 'rush':
$plugin = 1;
break;//抢购商品
case 'groupon':
$plugin = 2;
break;//团购商品
case 'wlfightgroup':
$plugin = 3;
break;//拼团商品
case 'coupon':
$plugin = 5;
break;//优惠券
case 'bargain':
$plugin = 7;
break;//砍价商品
}
}
$v = WeliamWeChat::getHomeGoods($plugin , $v['id']);
//获取商品详情页面的跳转地址
if ($geturl == 1) {
switch ($plugin) {
case 1:
$v['detail_url'] = h5_url('pages/subPages/goods/index' , ['id' => $v['id'] , 'type' => 1]);
$v['page_path'] = 'pages/subPages/goods/index?type=1';
break;//抢购商品
case 2:
$v['detail_url'] = h5_url('pages/subPages/goods/index' , ['id' => $v['id'] , 'type' => 2]);
$v['page_path'] = 'pages/subPages/goods/index?type=2';
break;//团购商品
case 3:
$v['detail_url'] = h5_url('pages/subPages/goods/index' , ['id' => $v['id'] , 'type' => 3]);
$v['page_path'] = 'pages/subPages/goods/index?type=3';
break;//拼团商品
case 5:
$v['detail_url'] = h5_url('pages/subPages/goods/index' , ['id' => $v['id'] , 'type' => 5]);
$v['page_path'] = 'pages/subPages/goods/index?type=5';
break;//优惠券
case 7:
$v['detail_url'] = h5_url('pages/subPages/goods/index' , ['id' => $v['id'] , 'type' => 7]);
$v['page_path'] = 'pages/subPages/goods/index?type=7';
break;//砍价商品
}
}
}
include wl_template('utility/selecetgoods');
}
/**
* Comment: 用户选择器
* Author: zzw
* Date: 2019/11/29 17:30
*/
public function selectUserInfo(){
global $_W , $_GPC;
#1、参数获取
$getType = $_GPC['get_type'] ? : 'main';//main=主要信息;list=仅列表信息
$search = $_GPC['search'] ? : '';
$params = $_GPC['params'] ? : '';// data-params='{"is_salesman":1}'>
$list = [];
if (!empty($search)) {
#1、条件生成
$where = " WHERE uniacid = {$_W['uniacid']} and identity_id = 1";
$where .= " AND ( nickname LIKE '%{$search}%' OR id = '{$search}' OR realname LIKE '%{$search}%' OR mobile LIKE '%{$search}%' )";
$params = json_decode(base64_decode($params),true);
if($params){
//获取业务员信息
if($params['is_salesman'] == 1){
$members = pdo_getall(PDO_NAME.'distributor', ['uniacid' => $_W['uniacid'], 'disflag' => 1], ['mid']);
$ids = implode(array_column($members,'mid'),',');
$where .= " AND id IN ($ids) ";
}
}
# 限制用户申请企业变更过程中的用户,不得申请
$midArr = Member::applyChangeInentityUser();
if ($midArr) $where .= " AND id not in (".implode(",",$midArr).") ";
#2、获取用户信息
$field = " id,nickname,avatar,realname,mobile,openid,wechat_openid,webapp_openid ";
$list = pdo_fetchall(" SELECT {$field} FROM " . tablename(PDO_NAME . "member") . $where . " ORDER BY createtime ASC LIMIT 0,30 ");
}
$params = base64_encode(json_encode($_GPC['params']));
include wl_template($getType == 'main' ? 'utility/select_user' : 'utility/select_user_tpl');
}
/**
* Comment: 商户选择器
* Author: zzw
* Date: 2020/12/1 17:14
*/
public function selectShopInfo(){
global $_W , $_GPC;
#1、参数获取
$getType = $_GPC['get_type'] ? : 'main';//main=主要信息;list=仅列表信息
$search = $_GPC['search'] ? : '';
$params = $_GPC['params'] ? : '';// data-params='{"is_salesman":1}'>
if (!empty($search)) {
#1、条件生成
$where = " WHERE uniacid = {$_W['uniacid']} AND aid = {$_W['aid']} ";
$where .= " AND ( storename LIKE '%{$search}%' OR id = '{$search}' OR mobile LIKE '%{$search}%' )";
$params = json_decode(base64_decode($params),true);
if($params){
}
#2、获取商户信息
$field = " id,storename,mobile,logo,address";
$order = " ORDER BY createtime ASC LIMIT 0,30 ";
$sql = " SELECT {$field} FROM " . tablename(PDO_NAME . "merchantdata");
$list = pdo_fetchall($sql.$where.$order);
}
$params = base64_encode(json_encode($_GPC['params']));
include wl_template($getType == 'main' ? 'utility/select_shop' : 'utility/select_shop_tpl');
}
/**
* Comment: 获取图文抓取模板
* Author: zzw
* Date: 2019/12/24 16:08
*/
public function importTextModel(){
global $_W,$_GPC;
include wl_template('utility/import');
}
/**
* Comment: 通过链接获取商品详情
* Author: zzw
* Date: 2019/12/24 14:51
*/
public function importTextInfo(){
global $_W , $_GPC;
#1、参数获取
$url = $_GPC['url'] OR Commons::sRenderError("url错误!");
#2、抓取内容
$result = file_get_contents($url);
if (empty($result['contents'])) {
$result = (new GatherArticle())->get_caiji($url);
}
#2、抓取内容
if (!empty($result['contents'])) {
$result['contents'] = htmlspecialchars_decode($result['contents']);
Commons::sRenderSuccess('内容' , $result);
} else {
Commons::sRenderError('获取失败,请检查链接是否可用!');
}
}
/**
* Comment: 地图定位选择坐标
* Author: zzw
* Date: 2020/9/8 16:22
*/
public function mapPositioning(){
global $_W,$_GPC;
//基本信息获取
$address = $_GPC['address'] ? : '';
$lat = $_GPC['lat'] ? : '39.90960456049752';
$lng = $_GPC['lng'] ? : '116.3972282409668';
$zoom = 12;
$tencentkey = $_W['wlsetting']['api']['txmapkey'];
if(!$address || !$lat || !$lng){
//未传递默认信息 则根据ip自动获取
$area = MapService::guide_ip($_W['clientip']);
if (!is_error($area)) {
$lat = $area['result']['location']['lat'];
$lng = $area['result']['location']['lng'];
$location = $area['result']['ad_info']['city'];
}
}else{
//通过经纬度获取城市信息
$area = MapService::guide_gcoder($lat . ',' . $lng , 0);
$location = $area['result']['ad_info']['city'];
}
include wl_template('utility/select_address');
}
/**
* Comment: 红包选择器 —— 红包列表
* Author: zzw
* Date: 2020/9/14 14:58
*/
public function selectRedPack(){
global $_W,$_GPC;
//基本参数信息获取
$page = max(1 , intval($_GPC['page']));
$pageIndex = 10;
$pageStart = $page * $pageIndex - $pageIndex;
$title = trim($_GPC['name']) ? : '';
//获取红包列表信息
if($_W['ispost']){
//条件生成
$where = " WHERE uniacid = {$_W['uniacid']} AND aid = {$_W['aid']} AND
CASE WHEN usetime_type = 0 AND use_end_time <= unix_timestamp(now()) THEN 2
ELSE status
END = 1";
if ($title) $where .= " AND title LIKE '%" . $title . "%'";
//sql语句生成
$field = "id,title,use_start_time,use_end_time,usetime_day1,usetime_day2,usetime_type,all_count,limit_count,full_money,cut_money";
$sql = "SELECT {$field} FROM ".tablename(PDO_NAME."redpacks");
$order = " ORDER BY createtime DESC ";
$limit = " LIMIT {$pageStart},{$pageIndex} ";
//信息获取
$list = pdo_fetchall($sql.$where.$order.$limit);
foreach ($list as $key => &$val) {
$usetimes = [
date('Y-m-d' , $val['use_start_time']) . ' ~ ' . date('Y-m-d' , $val['use_end_time']) ,
'领取当日起' . $val['usetime_day1'] . '天内有效' ,
'领取次日起' . $val['usetime_day2'] . '天内有效'
];
$val['usetime_text'] = $usetimes[$val['usetime_type']];
$val['all_count'] = $val['all_count'] ? $val['all_count'] . '个' : '无限';
$val['limit_count'] = $val['limit_count'] ? $val['limit_count'] . '个' : '无限';
$val['get_count'] = pdo_getcolumn(PDO_NAME.'redpack_records' , ['packid' => $val['id']] , 'COUNT(id)');
//删除多余的信息
unset($val['use_start_time'],$val['use_end_time'],$val['usetime_day1'],$val['usetime_day2'],$val['usetime_type']);
}
//获取红包信息总数
$totalSql = str_replace($field,'count(*)',$sql);
$total = pdo_fetchcolumn($totalSql.$where);
Commons::sRenderSuccess('红包列表',['list'=>$list,'total'=>ceil($total / $pageIndex)]);
}
include wl_template('utility/select_red_pack');
}
/**
* Comment: 获取抽奖奖品信息列表
* Author: zzw
* Date: 2020/9/16 11:05
*/
public function selectDrawPrize(){
global $_W,$_GPC;
if($_W['ispost']){
//基本参数信息获取
$page = max(1 , intval($_GPC['page']));
$pageIndex = 10;
$pageStart = $page * $pageIndex - $pageIndex;
$title = trim($_GPC['name']) ? : '';
//条件生成
$where = " WHERE uniacid = {$_W['uniacid']} AND aid = {$_W['aid']}";
if ($title) $where .= " AND title LIKE '%{$title}%'";
//基本sql语句生成 列表信息获取及处理
$field = "id,type,title,image,probability,status,day_number,total_number,create_time";
$sql = "SELECT {$field} FROM ".tablename(PDO_NAME."draw_goods");
$order = " ORDER BY create_time DESC,id DESC ";
$limit = " LIMIT {$pageStart},{$pageIndex} ";
$list = pdo_fetchall($sql.$where.$order.$limit);
foreach($list as $key => &$val){
//基本信息处理
$val['image'] = tomedia($val['image']);
$val['create_time'] = date("Y-m-d H:i:s",$val['create_time']);
//提供数量处理
$val['day_number'] = ($val['day_number'] == 0) ? '无限制' : $val['day_number']."份" ;
$val['total_number'] = ($val['total_number'] == 0) ? '无限制' : $val['total_number']."份" ;
}
//获取总数信息 数据分页信息获取
$totalSql = str_replace($field,'count(*)',$sql);
$total = pdo_fetchcolumn($totalSql.$where);
Commons::sRenderSuccess('抽奖奖品列表' , ['list' => $list , 'total' => ceil($total / $pageIndex)]);
}
include wl_template('utility/select_draw_prize');
}
/**
* Comment: 求职招聘 - 获取企业信息列表(企业选择器)
* Author: zzw
* Date: 2020/12/8 17:28
*/
public function selectEnterprise(){
global $_W,$_GPC;
//参数信息获取
$search = $_GPC['search'];
$returnType = $_GPC['return_type'] ? : 'html';
//条件生成
$where = '';
if($search) $where = " AND (storename LIKE '%{$search}%' OR id LIKE '%{$search}%' OR mobile LIKE '%{$search}%') ";
$field = "id,logo,storename,recruit_nature_id,recruit_scale_id,recruit_industry_id,provinceid,areaid,distid";
$limit = " limit 0,30 ";
[$list,$total] = Recruit::getEnterpriseList($where,$field,'',$limit);
//信息返回
if($returnType == 'json') wl_json(1,'企业列表',$list);
//else wl_template('');
}
/**
* Comment: 求职招聘 - 获取招聘信息列表(招聘选择器)
* Author: zzw
* Date: 2020/12/9 15:36
*/
public function selectRecruit(){
global $_W,$_GPC;
//参数信息获取
$page = $_GPC['page'] ? : 1;
$pageIndex = 10;
$pageStart = $page * $pageIndex - $pageIndex;
$search = $_GPC['search'];
$returnType = $_GPC['return_type'] ? : 'html';
//条件生成
$where = " AND status IN (4,5) ";
if($search) $where .= " AND title LIKE '%{$search}%' ";
$field = "id,title,recruitment_type,release_mid,release_sid,job_type,full_type,full_salary_min,full_salary_max,
welfare,part_type,part_salary,part_settlement,work_province,work_city,work_area,status,create_time,is_top";
$limit = " limit {$pageStart},{$pageIndex} ";
[$list,$total] = Recruit::getRecruitList($where,$field,'',$limit);
foreach($list as &$del){
unset($del['position_id'] , $del['release_mid'] , $del['release_sid'] , $del['full_type'] , $del['full_salary_min'] , $del['full_salary_max'] , $del['welfare'] , $del['part_type'] , $del['part_salary'] , $del['part_settlement'] , $del['work_province'] , $del['work_city'] , $del['work_area'] , $del['create_time']);
}
//信息返回
if($returnType == 'json') wl_json(1,'招聘列表',['list'=>$list,'page'=>$page,'page_number'=>ceil($total / $pageIndex)]);
//else wl_template('');
}
/**
* Comment: 求职招聘 - 获取简历信息列表(简历选择器)
* Author: zzw
* Date: 2020/12/10 11:07
*/
public function selectResume(){
global $_W,$_GPC;
//参数信息获取
$page = $_GPC['page'] ? : 1;
$pageIndex = 10;
$search = $_GPC['search'];
$returnType = $_GPC['return_type'] ? : 'html';
//条件生成
$where = [];
if($search) $where['name LIKE'] .= "%{$search}%";
$field = [
'id' ,
'name' ,
'phone' ,
'avatar' ,
'gender' ,
'work_status' ,
'experience_label_id' ,
'education_label_id' ,
'birth_time' ,
'expect_position' ,
'job_type' ,
'expect_salary_min' ,
'expect_salary_max' ,
'expect_work_province',
'expect_work_city',
'expect_work_area'
];
[$list,$total] = Recruit::getResumeList($where,$field,'id DESC',[$page,$pageIndex]);
foreach($list as &$del){
unset($del['work_status'],$del['experience_label_id'],$del['education_label_id'],$del['birth_time'],$del['expect_salary_min'],$del['expect_salary_max'], $del['expect_work_province'],$del['expect_work_city'],$del['expect_work_area'],$del['expect_position']);
}
//信息返回
if($returnType == 'json') wl_json(1,'招聘列表',['list'=>$list,'page'=>$page,'page_number'=>ceil($total / $pageIndex)]);
//else wl_template('');
}
/**
* Comment: 相亲交友 - 获取会员信息列表
* Author: zzw
* Date: 2021/3/17 17:05
*/
public function selectDating(){
global $_W,$_GPC;
//参数信息获取
$page = $_GPC['page'] ? : 1;
$pageIndex = 10;
$pageStart = $page * $pageIndex - $pageIndex;
$search = $_GPC['search'];
//条件生成
$where = " WHERE a.uniacid = {$_W['uniacid']} ";
if($search) $where .= " AND (b.nickname LIKE '%{$search}%' OR a.real_name LIKE '%{$search}%')";
//列表信息获取
$field = "a.id,a.mid,a.gneder,a.birth,a.current_province,a.current_city,a.current_area,a.live,a.travel,a.pv,a.is_top,a.cover";
$order = " ORDER BY create_time DESC ";
$limit = " LIMIT {$pageStart},{$pageIndex} ";
$sql = "SELECT {$field} FROM ".tablename(PDO_NAME."dating_member")
." as a LEFT JOIN ".tablename(PDO_NAME."member")
." as b ON a.mid = b.id ";
$list = pdo_fetchall($sql.$where.$order.$limit);
foreach($list as &$item){
//获取用户信息
[$item['nickname'],$item['avatar']] = Dating::handleUserInfo($item['mid']);
//处理区域信息 只取最小一级
if ($item['current_area']) $item['area'] = pdo_getcolumn(PDO_NAME."area",['id' => $item['current_area']],'name');
else if ($item['current_city']) $item['area'] = pdo_getcolumn(PDO_NAME."area",['id' => $item['current_city']],'name');
else if ($item['current_province']) $item['area'] = pdo_getcolumn(PDO_NAME."area",['id' => $item['current_province']],'name');
//判断是否为vip
[$item['is_vip'],$numTime] = Dating::isVip($item['mid']);
//封面图
$item['cover'] = tomedia($item['cover']);
//年龄获取
$item['age'] = Dating::getAge(date("Y-m-d",$item['birth']));
//删除多余的信息
unset($item['birth'],$item['current_province'],$item['current_city'],$item['current_area']);
}
//总数获取
//获取总数信息 数据分页信息获取
$totalSql = str_replace($field,'count(*)',$sql);
$total = pdo_fetchcolumn($totalSql.$where);
//信息返回
wl_json(1,'招聘列表',['list'=>$list,'page'=>$page,'page_number'=>ceil($total / $pageIndex)]);
}
/**
* Comment: 家政服务选择器
* Author: zzw
* Date: 2021/4/30 17:47
*/
public function selectHouseKeep(){
global $_W,$_GPC;
//参数信息获取
$page = $_GPC['page'] ? : 1;
$pageIndex = 10;
$search = $_GPC['search'];
//基本信息生成
$shopWhere = " AND enabled = 1 AND housekeepstatus = 1 ";
$artificerWhere = $demandWhere = $serviceWhere = " AND status = 1 ";
if($search){
//商户名称
$shopWhere .= " AND storename LIKE '%{$search}%' ";
//师傅姓名
$artificerWhere .= " AND name LIKE '%{$search}%' ";
//需求类型
$typeListSql = "SELECT id FROM ".tablename(PDO_NAME."housekeep_type")
." WHERE uniacid = {$_W['uniacid']} AND aid = {$_W['aid']} AND title LIKE '%{$search}%' ";
$typeList = pdo_fetchall($typeListSql);
if(count($typeList) > 0) {
$typeIds = array_column($typeList,'id');
$typeIds = implode($typeIds,',');
$demandWhere .= " AND type IN ({$typeIds}) ";
}else{
//无分类被查询出来 强制查询为空
$demandWhere .= " AND type = -1 ";
}
//服务标题
$serviceWhere .= " AND title LIKE '%{$search}%' ";
}
//获取列表信息
$data = Housekeep::getList(0,$page,$pageIndex,$shopWhere,$artificerWhere,$demandWhere,$serviceWhere);
//信息返回
wl_json(1,'服务列表',$data);
}
}

6727
addons/weliam_smartcity/web/resource/address/bootstrap.css

File diff suppressed because it is too large

1
addons/weliam_smartcity/web/resource/address/bootstrap.min.css

File diff suppressed because one or more lines are too long

5832
addons/weliam_smartcity/web/resource/address/fastadmin.css

File diff suppressed because it is too large

1
addons/weliam_smartcity/web/resource/address/fastadmin.min.css

File diff suppressed because one or more lines are too long

9814
addons/weliam_smartcity/web/resource/address/jquery.js

File diff suppressed because it is too large

4
addons/weliam_smartcity/web/resource/address/jquery.min.js

File diff suppressed because one or more lines are too long

1
addons/weliam_smartcity/web/resource/css/bootstrap-table.min.css

@ -0,0 +1 @@
.bootstrap-table .table{margin-bottom:0!important;border-bottom:1px solid #e4eaec;border-collapse:collapse!important}.bootstrap-table .table,.bootstrap-table .table>tbody>tr>td,.bootstrap-table .table>tbody>tr>th,.bootstrap-table .table>tfoot>tr>td,.bootstrap-table .table>tfoot>tr>th,.bootstrap-table .table>thead>tr>td{padding:8px!important}.bootstrap-table .table.table-no-bordered>tbody>tr>td,.bootstrap-table .table.table-no-bordered>thead>tr>th{border-right:2px solid transparent}.fixed-table-container{position:relative;clear:both;border:1px solid #e4eaec}.fixed-table-container.table-no-bordered{border:1px solid transparent}.fixed-table-footer,.fixed-table-header{height:37px;overflow:hidden}.fixed-table-header{border-bottom:1px solid #e4eaec}.fixed-table-footer{border-top:1px solid #e4eaec}.fixed-table-body{overflow-x:auto;overflow-y:auto;height:100%}.fixed-table-container table{width:100%}.fixed-table-container thead th{height:0;padding:0;margin:0;border-left:1px solid #e4eaec}.fixed-table-container thead th:first-child{border-left:none}.fixed-table-container tbody td .th-inner,.fixed-table-container thead th .th-inner{padding:8px;line-height:20px;vertical-align:top;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fixed-table-container thead th .sortable{cursor:pointer;background-position:right;background-repeat:no-repeat;padding-right:30px}.fixed-table-container th.detail{width:30px}.fixed-table-container tbody td{border-left:1px solid #e4eaec}.fixed-table-container tbody tr:first-child td{border-top:none}.fixed-table-container tbody td:first-child{border-left:none}.fixed-table-container .table .icon,.fixed-table-container table .icon{top:auto;margin:0 5px}.fixed-table-container tbody .selected td{background-color:#f3f7f9}.fixed-table-container .bs-checkbox{text-align:center}.fixed-table-container .bs-checkbox .th-inner{padding:8px 0}.fixed-table-container input[type=radio],.fixed-table-container input[type=checkbox]{margin:0 auto!important}.fixed-table-container .no-records-found{text-align:center}.fixed-table-pagination .pagination-detail,.fixed-table-pagination div.pagination{margin-top:10px;margin-bottom:10px}.fixed-table-pagination div.pagination .pagination{margin:0}.fixed-table-pagination .pagination a{padding:6px 12px;line-height:1.428571429}.fixed-table-pagination .pagination-info{line-height:34px;margin-right:5px}.fixed-table-pagination .btn-group{position:relative;display:inline-block;vertical-align:middle}.fixed-table-pagination .dropup .dropdown-menu{margin-bottom:0}.fixed-table-pagination .page-list{display:inline-block}.fixed-table-toolbar .columns-left{margin-right:5px}.fixed-table-toolbar .columns-right{margin-left:5px}.fixed-table-toolbar .columns label{display:block;padding:3px 20px;clear:both;font-weight:300;line-height:1.428571429}.fixed-table-toolbar .bars,.fixed-table-toolbar .columns,.fixed-table-toolbar .search{position:relative;margin-top:10px;margin-bottom:10px;line-height:34px}.fixed-table-pagination li.disabled a{pointer-events:none;cursor:default}.fixed-table-loading{display:none;position:absolute;top:42px;right:0;bottom:0;left:0;z-index:6;background-color:#fff;text-align:center}.fixed-table-body .card-view .title{font-weight:400;display:inline-block;min-width:30%;text-align:left!important}.fixed-table-body thead th .th-inner{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.table td,.table th{vertical-align:middle;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.fixed-table-toolbar .dropdown-menu{text-align:left;max-height:300px;overflow:auto}.fixed-table-toolbar .btn-group>.btn-group{display:inline-block;margin-left:-1px!important}.fixed-table-toolbar .btn-group>.btn-group>.btn{border-radius:0}.fixed-table-toolbar .btn-group>.btn-group:first-child>.btn{border-top-left-radius:3px;border-bottom-left-radius:3px}.fixed-table-toolbar .btn-group>.btn-group:last-child>.btn{border-top-right-radius:3px;border-bottom-right-radius:3px}.bootstrap-table .table>thead>tr>th{vertical-align:bottom;border-bottom:1px solid #e4eaec}.bootstrap-table .table thead>tr>th{padding:0;margin:0}.bootstrap-table .fixed-table-footer tbody>tr>td{padding:0!important}.bootstrap-table .fixed-table-footer .table{border-bottom:none;border-radius:0}.pull-right .dropdown-menu{right:0;left:auto}p.fixed-table-scroll-inner{width:100%;height:200px}div.fixed-table-scroll-outer{top:0;left:0;visibility:hidden;width:200px;height:150px;overflow:hidden}

5
addons/weliam_smartcity/web/resource/css/bootstrap.min.css

File diff suppressed because one or more lines are too long

724
addons/weliam_smartcity/web/resource/css/common_v2.css

@ -0,0 +1,724 @@
html,body,h1,h2,h3{font-family:arial, 'Hiragino Sans GB', 'Microsoft Yahei', '微软雅黑', '宋体', \5b8b\4f53, Tahoma, Arial, Helvetica, STHeiti}
em, i{font-style: normal;}
body{height: 100vh;overflow-y:scroll;background: #f2f2f2;overflow-x:hidden;}
[v-cloak]{display: none;}
a:hover{text-decoration:none;}
a:focus{outline:none; -moz-outline:none}
.icon {font-family:"iconfont" !important;font-size:16px;font-style:normal;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}
.ng-cloak{display:none;}
.main{margin: 0!important;}
.list-group .list-group-item.active{background-color:#428bca;border-color:#428bca;}
.list-group .list-group-item a{color:#555;}
.list-group .list-group-item a:hover{text-decoration:none;}
.list-group .list-group-item.active a{color:#fff;}
.row .row, .form-group .form-group{margin-left:auto;margin-right:auto;}
.row.row-fix, .form-group.form-group-fix{margin-left:-15px;margin-right:-15px;}
.breadcrumb{background:#F9F9F9;}
.container-fluid{padding: 0;}
.head{width: 100px;height: 100%;background-color: #273543;border-bottom: 1px solid #d9dadc;position: fixed;top: 0;left: 0;z-index: 9;}
.app-sidebar {width: 100px;}
.head-before{height: 63px;line-height: 63px;text-align: center;padding: 0;display: -webkit-flex;display: flex;align-items: center;}
.head-logo{width: 38px;height: 38px;margin: 0 auto;border-radius: 50%;background-color: #fff;background-position: top;background-repeat: no-repeat;background-size: contain;display: inline-block;}
.head-fater{width: 1011px;}
.head-text{white-space:nowrap; overflow:hidden; text-overflow:ellipsis;display:block;}
.head-navbar{margin-bottom: 0px;background-color: #FFFFFF;border-color: #FFFFFF;border: 0px solid transparent;}
.main-body{margin-top: 0;}
.layui-input-block{margin-left: 0px!important;}
.layui-form-switch{width: 50px!important;height: 25px!important;}
.must-fill{color:red;font-size: 16px;position: relative;top:5px;font-size: 18px;}
.we7-body-alert .alert-info{padding: 7px 30px;background-color: #f9edbe;border-bottom: 1px solid #f0c36d;font-size: 12px;border-radius: 0;}
.alert-info .fa{font-size: 21px;position: relative;top: 2px;margin-top: -5px;margin-right: 5px;color: #428bca;}
.text-lue{overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important;}
.order-detail{overflow: hidden;}
.nopaddingleft{padding-left: 0px!important;}
.app-sidebar-list li a {height: 36px;line-height: 36px;color: #d0d0d0;margin-bottom: 10px;padding: 0 5px 0 20px;display: block;}
.app-sidebar-list li a i {width: 18px;}
.app-sidebar-list li a:hover {color: #fff!important;background-color: rgba(26,179,148,.3);}
.app-sidebar-list .active a {color: #fff!important;background-color: #1ab394;}
.app-sidebar-list .active a:hover {color: #fff!important;background-color: #1ab394;}
.we7-body-alert {margin-top: 0;}
.max-with-all{max-width: 100%!important;}
.with100{width: 100px!important;}
.with200{width: 200px!important;}
.padding-0{padding: 0!important;}
.padding-l-0{padding-left: 0!important;}
.padding-r-0{padding-right: 0!important;}
.padding-t-0{padding-top: 0!important;}
.margin-0{margin: 0!important;;}
.margin-t-0{margin-top: 0!important;}
.margin-b-10{margin-bottom: 10px!important;;}
.margin-t-5{margin-top: 5px!important;;}
.margin-t-20{margin-top: 20px!important;;}
.flex-row{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}
.flex-col{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
.flex-align-c{align-items:center;}
.flex-justify-b{justify-content:space-between;}
.category-caret{display:inline-block; width:20px; margin: 0 10px; text-align:center; cursor:pointer; color:#d9534f;}
.js-clip{cursor: pointer;}
/** checkbox radio*/
.table .checkbox-inline{margin-top: -10px!important;}
.checkbox-inline,.radio-inline{position: relative;color:#666;padding-left:24px;vertical-align: middle;padding-top:7px;}
.checkbox input[type=checkbox] ,
.checkbox-inline input[type=checkbox] ,
.radio input[type=radio] ,
.radio-inline input[type=radio]{position:absolute;margin-left:-24px;top:50%;margin-top:-5px;cursor: pointer;}
input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:0px auto -webkit-focus-ring-color;outline-offset:-2px}
input[type=checkbox],
input[type=radio]{-webkit-appearance: none;-moz-appearance: none;appearance: none;position: relative;width: 16px;height:16px;border: 1px solid #e0e0e0;outline: 0;border-radius: 18px;box-sizing: border-box;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;background:#fff;vertical-align:middle;-moz-transition-duration: 300ms;-webkit-transition-duration: 300ms;transition-duration: 300ms;-webkit-transition-property: border-color ;transition-property:border-color ;}
input[type=checkbox].large,
input[type=radio].large{-webkit-appearance: none;-moz-appearance: none;appearance: none;position: relative;width: 18px;height:18px;border: 1px solid #e0e0e0;outline: 0;border-radius: 18px;box-sizing: border-box;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;background:#fff;vertical-align:middle;-moz-transition-duration: 300ms;-webkit-transition-duration: 300ms;transition-duration: 300ms;-webkit-transition-property: border-color ;transition-property:border-color ;}
input[type=checkbox],input[type=checkbox].large{-webkit-border-radius:0px;-moz-border-radius:0px;border-radius:0px;}
input[type=checkbox]:checked,input[type=radio]:checked{border-color: #1ab394;; background: #1ab394;}
input[type=checkbox]:checked:before{content: " ";display: inline-block;-webkit-transform: rotate(135deg);-ms-transform: rotate(135deg);-moz-transform: rotate(135deg);transform: rotate(135deg);height:6px;width: 9px;border-width: 2px 2px 0 0;border-color: #fff;border-style: solid;position: absolute;top: 3px;margin-left:3px;}
input[type=checkbox].large:checked:before{top: 4px;margin-left:4px;}
input[type=radio]:checked:before{content: " ";display: inline-block;height:8px;width: 8px;background: #1ab394;border-radius: 50%;position: absolute;top: 2px;margin-left:2px;}
input[type=radio].large:checked:before{top: 3px;margin-left:3px;}
input[type=radio]:checked{border:2px solid #1ab394;background: #fff;}
input[type=checkbox].success,
input[type=radio].success{border: 1px solid #e0e0e0;}
input[type=checkbox].success:checked,input[type=radio].success:checked:before{border-color: #54c952;background-color: #54c952;}
input[type=radio].success:checked{background: #fff;border:2px solid #54c952;}
input[type=checkbox].warning,
input[type=radio].warning{border:1px solid #e0e0e0;}
input[type=checkbox].warning:checked,input[type=radio].warning:checked:before{border-color: #ffc000;background-color: #ffc000;}
input[type=radio].warning:checked{border:2px solid #ffc000;background-color: #fff;}
input[type=checkbox].danger,
input[type=radio].danger{border:1px solid #e0e0e0;}
input[type=checkbox].danger:checked,input[type=radio].danger:checked:before{border-color: #eb6060;background-color: #eb6060;}
input[type=radio].danger:checked{border:2px solid #eb6060;background-color: #fff;}
input[type=checkbox].gray,
input[type=radio].gray{border:1px solid #e0e0e0;}
input[type=checkbox].gray:checked,input[type=radio].gray:checked:before{border-color: #ccc;background-color: #ccc;}
input[type=radio].gray:checked{border:2px solid #ccc;background-color: #fff;}
input[type=checkbox].success:checked:before,
input[type=checkbox].primary:checked:before,
input[type=checkbox].warning:checked:before,
input[type=checkbox].danger:checked:before,
input[type=radio].success:checked:before,
input[type=radio].primary:checked:before,
input[type=radio].warning:checked:before,
input[type=radio].danger:checked:before{border-color:#fff !important;}
/*登录注册*/
.login,.register{background:#3a3a3a url('../images/gw-bg.jpg') no-repeat fixed; background-size:cover; -webkit-background-size:cover; -o-background-size:cover;padding-top:5em;}
.login .logo,.register .logo{width:100%; text-align:center; margin-bottom:2em;}
.login .logo a,.register .logo a{background:url('../images/gw-logo.png') no-repeat; display:inline-block;width:420px;height:95px;margin-left:0 !important;}
.login .panel,.register .panel{padding:30px 15px;}
.login i,.register i{color:#999999;}
.login .footer,.register .footer{padding:2em 0;}
.login .footer,.register .footer,.login .footer a,.register .footer a{color:#ffffff;}
/*首页*/
.home .panel{border-radius:0;}
.home .panel-default{border-color:#EEE;}
.home .content h4{border-bottom:1px #E9E9E9 solid; padding:15px 15px 15px 25px; margin:0; font-weight:normal; font-size:18px;}
.home .content h6{font-size:16px; color:#333;}
.home .content .con .panel-body .row{text-align:center;}
.home .content .con .panel-body .row>div{overflow:hidden; text-align:center;}
.home .content .con .panel-body .row p{color:#666;}
.home .content .con .panel-body .system-announcement{margin:0 10px;}
.home .content .con .panel-body .system-announcement li{margin:15px 0; height:40px; line-height:40px; background:#f7f7f9;}
.home .content .con .panel-body .system-announcement li a{display:block; float:left; text-align:left; padding:0 15px; color:#666;}
.home .content .con .panel-body .system-announcement li span{display:inline-block; float:left; color:#FFF; width:50px;}
.home .content .con .panel-body .system-announcement li span.style-1{background:#6592df;}
.home .content .con .panel-body .system-announcement li span.style-2{background:#60bc6a;}
.home .content .con .panel-body .system-info>div{display:inline-block; margin:20px 0;}
.home .content .con .panel-body .system-info .icon{display:inline-block; width:100px; height:100px; border-radius:50%; background:#4eacea;}
.home .content .con .panel-body .system-info .icon i{font-size:50px; color:#FFF; margin-top:25px;}
.home .content .con .panel-body .module-info>div{display:inline-block; margin:20px 0;}
.home .content .con .panel-body .module-info .icon img{width:62px; height:62px;}
.home .content .contact .info{font-size:16px;}
.home #head{position:absolute; z-index:1; text-align:center; width:100%; top:10%;}
.home #head .logo{display:inline-block; background:url('../images/gw-logo.png') no-repeat; width:420px; height:95px;}
.home #head .advertisement{font-size:50px; color:#FFF; margin:5% 0 10% 0;}
.home #head .btns .btn{margin:0 10px;}
.home #banner{width:100%; margin:0 auto;}
.home #banner .item{width:100%; background-size:cover; background-position:50% 50%;}
.home #banner .carousel-indicators .fa{color:#FFF; font-size:50px; background:none !important;}
.home .content .banner{background-image:url('../images/banner-bg.png'); background-size: 990px 380px; background-position: center 15px; border-top: 1px solid #EEEEEE; border-bottom: 1px solid #EEEEEE; background-repeat: no-repeat; height:380px; background-color:#FFFFFF; min-width: 1014px; min-height: 180px;}
.home .content .con{padding-top:20px;}
.home .footer{height:50px; line-height:25px; margin-bottom:30px; color:#666;}
.home .footer a{color:#666;}
.home .footer a:hover{color:#428bca; text-decoration:none;}
.navbar-inverse ul li i{display:inline-block; margin-right:5px;}
.nav.navbar-nav .dropdown{z-index:1001;}
.welcome-container .shortcut a{display:block;float:left;text-align:center;margin-right:1.2em;padding:8px 5px;width:7em;height:7em;overflow:hidden;color:#333;}
.welcome-container .shortcut a:hover{text-decoration:none;background:#eee;border-radius:3px;padding:7px 4px;border:1px solid #d5d5d5;}
.welcome-container .shortcut a i{display:block;font-size:3em;margin:.28em .2em;}
.welcome-container .shortcut a img{display:block;height:3em;margin:.85em auto;}
.welcome-container .shortcut a span{display:block;font-size:1em;overflow:hidden;white-space:nowrap;}
.welcome-container .account img{width:6em;height:6em;}
.nav{background-color: white;}
.nav.nav-tabs{margin-bottom:20px; border-color:#428bca;}
.nav-tabs>li>a {color: black;border-radius: 0 0 0 0;}
.nav-tabs>li>a:hover{border-color:#eee #eee #428bca #eee;}
.nav-tabs>li.active>a, .nav-tabs>li.active>a:hover, .nav-tabs>li.active>a:focus{color:black; background-color:#428bca; border-color:#428bca;}
.page-header{padding-bottom:0;}
.page-header:first-child{margin-top:0;}
.gw-logo{background:url('../images/gw-logo.png') no-repeat;display:inline-block;width:420px;height:95px;margin-left:0 !important;}
.gw-container .footer{font-size:1.1em;padding:2em 0;}
.gw-container{background:#3a3a3a url('../images/gw-bg.jpg') no-repeat fixed; background-size:cover; -webkit-background-size:cover; -o-background-size:cover;}
.gw-container .page-header{border:none; border-left:0.3em #333 solid; padding-left:1em;}
.gw-container .tile{display:block; float:left; margin:0.4em;padding:.2em 1em .5em 1em; width:8em; text-align:center; background:#EEE; color:#333; text-decoration:none;}
.gw-container .tile.tile-2x{width:10em;margin-top: 0.5em}
.gw-container .tile.tile-3x{width:15em;}
.gw-container .tile:hover{background:#7dacdd; color:#FFF;}
.gw-container .tile > i{display:block; font-size:2em; margin:0.3em auto 0 auto;}
.gw-container .tile > span{display:block;}
.gw-container .navbar-toggle {border-color: #ddd;}
.gw-container .navbar-toggle .icon-bar{background-color: #ccc;}
.gw-container .navbar-toggle:hover, .navbar-default .navbar-toggle:focus {background-color: #ddd;}
.gw-container .navbar-nav.navbar-right:last-child {margin-right: 0;}
.gw-container .navbar-nav .tile{background:#31b8ef; color:#FFF; box-shadow:0 2px 4px rgba(0, 0, 0, 0.05);}
.gw-container .navbar-nav .tile:hover{background:#4ccafd;}
.gw-container .navbar-nav .tile.active{background:#1e95c9;}
.gw-container .well .breadcrumb{padding-left:0;padding-right:0;}
.gw-container .breadcrumb{margin-bottom:0.5em; background:#F5F5F5;}
.gw-container .breadcrumb a{color:#333;}
.gw-container .footer, .gw-container .footer a{color:#fff;}
.gw-container .well .account{margin:15px 0;}
.gw-container .well .account .panel-heading{border-bottom:1px solid #E9E9E9; background:#FFF;}
.gw-container .well .account .panel-heading a{display:inline-block; color:#66667C; text-align:center; font-size:14px; padding:0 6px; font-weight:bold;}
.gw-container .well .account .panel-heading a i{margin-right:5px;}
.gw-container .well .account .panel-heading a:focus{text-decoration:none;}
.gw-container .well .account .panel-heading a.manage{color:#d9534f;}
.gw-container .well .account .panel-heading .manage{color:#d9534f;}
.gw-container .well .account .panel-body{padding:0 15px;}
.gw-container .well .account .panel-body li{padding:0;}
.gw-container .well .account .panel i{display:inline-block;}
.gw-container .well .account .panel .list-group-bottom{height:40px; line-height:40px; background:#f5f5f5;}
.gw-container .well .account .panel .list-group-bottom-left > span{display:inline-block; color:#999;}
.gw-container .well .account .panel .list-group-bottom-right > a{color:#999; padding:0 6px;}
.gw-container .well .account .panel .list-group-bottom-right > a i{margin-right:5px;}
.table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td{vertical-align:middle;}
.table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td{white-space:inherit; overflow:hidden; text-overflow:ellipsis;}
.table>thead>tr>th{border-top:none;}
.table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th{border-top:none;}
@media screen and (max-width:767px){.tpl-calendar>div,.tpl-district-container>div{margin-bottom:10px;}}
/*左侧菜单*/
.big-menu {width: 220px;}
.big-menu .panel{margin-bottom:20px; border-bottom:0; border-top-width:0; border-top-left-radius:0; border-top-right-radius:0; border-radius:0;}
.big-menu .panel .panel-heading{border-top-left-radius:0; border-top-right-radius:0; position:relative; overflow:hidden; padding-right:50px;}
.big-menu .panel .panel-heading .panel-title,.big-menu .panel .list-group-item{overflow:hidden; white-space:nowrap; text-overflow:clip;}
.big-menu .panel>.list-group:last-child .list-group-item:last-child{border-bottom-right-radius:0; border-bottom-left-radius:0; border-bottom:1px #DDD solid;}
.big-menu .panel:first-child{border-top-width:1px; border-top-left-radius:3px; border-top-right-radius:3px;}
.big-menu .panel:first-child .panel-heading{border-top-left-radius:3px; border-top-right-radius:3px;}
.big-menu .panel:last-child{margin-bottom:10px; border-bottom-right-radius:4px; border-bottom-left-radius:4px;}
/*.big-menu .panel:last-child>.list-group:last-child .list-group-item:last-child{border-bottom-right-radius:3px; border-bottom-left-radius:3px;}*/
.big-menu .panel .panel-collapse{width:50px; height:38px; line-height:38px; position:absolute; top:0; right:0; color:#CCC; text-align:center; background:#EEE; border-left:1px #DDD solid;}
.big-menu .btn-group{width:100%;}
.big-menu .btn-group>.btn{border-radius:0; width:33.5%; text-align:center; border-top:0;}
/*更新提醒*/
.upgrade-tips{width:100%; position:absolute; top:0; text-align:center; z-index:99999;}
.upgrade-tips a{display:inline-block; margin:0 auto; height:25px; line-height:25px; padding:0 5px; color:#FFF; background:#EE5023; }
.upgrade-tips a.module{background:#3C9D40;}
.upgrade-tips span{display:inline-block; height:25px; line-height:25px; background:#328233; padding:0 10px; color:#FFF; cursor:pointer;}
/*多图上传*/
.multi-img-details{margin-top:.5em;}
.multi-img-details .multi-item{height: 150px; max-width: 150px; position:relative; float: left; margin-right: 18px;}
.multi-img-details .multi-item img{max-width: 150px; max-height: 150px;}
.multi-img-details .multi-item em{position:absolute; top: 0; right: -14px;}
.modal-dialog .avatar-browser{min-height:480px;line-height:0;color:#428bca;}
.modal-dialog .avatar-browser .thumbnail{display:block;float:left;width:100px;height:100px;margin-right:13px;cursor:pointer;overflow:hidden;}
.modal-dialog .avatar-browser .thumbnail:hover{border-color:#428bca;}
.modal-dialog .avatar-browser{min-height:480px;line-height:0;color:#428bca;}
.modal-dialog .avatar-browser .thumbnail{display:block;float:left;width:100px;height:100px;margin-right:13px;cursor:pointer;overflow:hidden;}
.modal-dialog .avatar-browser .thumbnail:hover{border-color:#428bca;}
.pagination { margin:0;}
.history .img-list { margin: 4px; display: block; clear: both; list-style: outside none none; padding:0px;}
.history .img-list .img-item { float: left; padding: 1px; cursor: pointer; position: relative;}
.history .img-list .img-item .img-container { position: relative; width:75px; height:75px; text-align:center; background-color:#eee; background-size: contain; background-repeat: no-repeat; background-position: 50% 50%;}
.history .img-list .img-item .img-container:hover .img-meta{display:none; }
.history .img-list .img-item .img-container .img-meta { width:100%; position: absolute; bottom: 0; z-index:1; background:rgba(0,0,0,0.5); color:#eee;}
.history .img-list .img-item .img-container .select-status {display:inline-block; width:50px; height:50px; position: absolute; bottom:0; right:0; z-index:2;}
.history .img-list .img-item-selected .img-container .select-status {display:inline-block; width:50px; height:50px; position: absolute; bottom:0; right:0; background: url('../images/success-small.png') no-repeat right bottom; z-index:2;}
.history .img-list .img-item-selected .img-container .img-meta {display:none;}
.history .img-list .img-item .btnClose{text-align:right; position:absolute; top:-10px; right:-5px; display:none; z-index:10;}
.history .img-list .img-item:hover .btnClose{display:block;}
.history .img-list .img-item .btnClose a{display:inline-block; width:20px; height:20px; text-align:center; line-height:20px; color:#fff; background:rgba(0,0,0,.3); border-radius:50%;}
.history .img-list .img-item .btnClose a i.fa-times{font-size:14px; padding:3px;margin-top: 0;}
.history .img-list .img-item .btnClose a:hover{background:rgba(0,0,0,1);}
.pagination { margin:0;}
/*图文回复列表样式*/
.reply .panel-group .panel:first-child{margin:0; border-bottom-left-radius:0; border-bottom-right-radius:0;}
.reply .panel-group .panel:first-child .img{overflow:hidden; position:relative; height:160px; background-color:#ececec; color:#c0c0c0; text-align:center; line-height:132px;}
.reply .panel-group .panel:first-child .img img{max-height:160px; max-width:100%; vertical-align:middle;}
.reply .panel-group .panel:first-child .img span{display:block; position:absolute; bottom:0; left:0; height:28px; line-height:28px; width:100%; background:rgba(0,0,0,0.7); color:#fff; padding:0 10px;}
.reply .panel-group .panel+.panel{border-radius:0; margin-top:0; border-top:0;}
.reply .panel-group .panel+.panel .panel-body{height:104px; padding-right:105px; position:relative; overflow:hidden;}
.reply .panel-group .panel+.panel .img{float:right; position:absolute; right:15px; top:12px; height:80px; width:80px; background-color:#ececec; color:#c0c0c0; line-height:80px; text-align:center; overflow:hidden;}
.reply .panel-group .panel+.panel .img img{max-width:80px; max-height:80px; vertical-align:middle; border:0;}
.reply .panel-group .panel+.panel .text h4{word-break:break-all; font-size:14px; line-height:1.5em; height:54px; overflow:hidden; text-overflow:ellipsis;}
.reply .panel-group .panel-body .mask{position:absolute; width:100%; height:100%; line-height:104px; left:0; top:0; z-index:999; background-color:rgba(229, 229, 229, 0.85) !important; text-align:center; display:none;}
.reply .panel-group .panel:first-child .panel-body .mask{line-height:160px;}
.reply .panel-group .panel-body .mask a{color:#333; display:inline-block; margin:0 3px; cursor:pointer;}
.reply .panel-group .panel-body:hover .mask{display:block;}
.reply .panel-group .panel-body .default{ font-style:normal; font-size:16px;}
.reply .panel-group .panel:last-child{margin-bottom:20px; border-bottom-left-radius:4px; border-bottom-right-radius:4px;}
.reply .panel-group .panel:last-child .panel-body{padding:15px;}
.reply .panel-group .panel-body .add{border:3px dotted #b8b8b8; height:72px; line-height:72px; text-align:center; cursor:pointer; border-radius:5px;}
.reply .panel-group img{position:absolute; left:0; top:0; display:inline-block; width:100%; height:100%;}
.reply .panel-group{clear: both;margin-bottom: 20px; position: relative;}
.reply .panel-group .del,.panel-group .no{position: absolute; top:-10px; width:20px; height:20px; color:#fff; background:rgba(0,0,0,0.3); text-align:center; line-height:20px; cursor:pointer; border-radius:100%;}
.reply .panel-group .del{right:-10px;}
.reply .panel-group .no{left:-10px;background: #3071a9}
.reply .panel-group .del:hover{background:rgba(0,0,0,0.7);}
.reply .panel-group .panel:last-child{margin-bottom: 0;}
/*素材回复列表样式*/
.material .panel-group{position:relative; cursor:pointer;}
.material .panel-group .panel:first-child{margin:0; border-bottom-left-radius:0; border-bottom-right-radius:0;}
.material .panel-group .panel:first-child .img{overflow:hidden; position:relative; height:160px; background-color:#ececec; color:#c0c0c0; text-align:center; line-height:132px;}
.material .panel-group .panel:first-child .img img{max-height:160px; max-width:100%; vertical-align:middle;}
.material .panel-group .panel:first-child .img span{display:block; position:absolute; bottom:0; left:0; height:28px; line-height:28px; width:100%; background:rgba(0,0,0,0.7); color:#fff; padding:0 10px;}
.material .panel-group .panel+.panel{border-radius:0; margin-top:0; border-top:0;}
.material .panel-group .panel+.panel .panel-body{height:104px; padding-right:105px; position:relative; overflow:hidden;}
.material .panel-group .panel+.panel .img{float:right; position:absolute; right:15px; top:12px; height:80px; width:80px; background-color:#ececec; color:#c0c0c0; line-height:80px; text-align:center; overflow:hidden;}
.material .panel-group .panel+.panel .img img{max-width:80px; max-height:80px; vertical-align:middle; border:0;}
.material .panel-group .panel+.panel .text h4{word-break:break-all; font-size:14px; line-height:1.5em; height:54px; overflow:hidden; text-overflow:ellipsis;}
.material .panel-group .panel-body .default{ font-style:normal; font-size:16px;}
.material .panel-group .panel:last-child{margin-bottom:0px; border-bottom-left-radius:20px; border-bottom-right-radius:4px;}
.material .panel-group .panel:last-child .panel-body{padding:15px;}
.material .panel-group img{position:absolute; left:0; top:0; display:inline-block; width:100%; height:100%;}
.material .panel-group .mask{position:absolute; width:100%; height:100%; left:0; top:0; z-index:10; background-color:rgba(0,0,0,0.6 ) !important; text-align:center; display:none; border-radius:4px;}
.material .panel-group:hover .mask,.panel-group.selected .mask{display:block;}
.material .panel-group>i{display:none; width:46px; height:46px; color:#fff; text-align:center; line-height:46px; z-index:20; position:absolute; top:50%; left:50%; margin-top:-23px; margin-left:-23px; font-size:46px; font-weight:200;}
.material .panel-group.selected>i{display:inline-block}
/*图文回复编辑样式*/
.reply .aside{}
.reply .aside .card{position:relative;}
.reply .aside .panel-body{min-height:50px;}
.reply .aside .arrow-left,.reply .aside .arrow-left:after{width: 0; height: 0; border-style: solid; border-width: 8px 10px 8px 0; border-color: transparent #d1d1d1 transparent transparent; position: absolute; left: -10px; top: 15px;}
.reply .aside .arrow-left:after{content: ""; border-right-color: #fff; left: 1px; top: -8px;}
.reply .aside .img{height:92px; text-align:center; position:relative; overflow:hidden; padding:0;}
.reply .aside .img img{display:inline-block; max-width:100%; vertical-align:middle; margin:0; border:0;}
.reply .aside .img h3{position:absolute; bottom:0; left:0; width:100%; text-align:center; z-index:2; color:#fff; background:rgba(51,51,51,0.5); padding:5px 15px; font-size:14px; line-height:1.5em; margin:0; cursor:pointer;}
.reply .aside .img>span{display:block; border:1px solid #eee; height:100%; text-align:center; line-height:92px; cursor:pointer;}
.reply .aside .img>span i{color:green;}
/*导航栏公告样式*/
.topbar-notice{cursor: pointer;}
.topbar-notice .dropdown-menu{width:440px; left:-183px; padding:0;}
.topbar-notice .topbar-notice-arrow,.topbar-notice .topbar-notice-arrow:after{width: 0; height: 0; border-style: solid; position: absolute; border-width: 0 8px 10px 8px; border-color:transparent transparent rgba(0,0,0,.4) transparent; left: 50%; top:-11px; margin-left:-9px;}
.topbar-notice .topbar-notice-arrow:after{content: ""; border-bottom-color:#eaedf1; left:1px; top:1px;}
.topbar-notice .topbar-notice-head{height:50px; padding:0 15px; font-size:14px; line-height:50px; background:#eaedf1; color:#333; border-top-left-radius:4px; border-top-right-radius:4px;}
.topbar-notice .topbar-notice-body ul{margin:0; padding:0; list-style:none; height:305px; overflow-y:auto; background:#fff;}
.topbar-notice .topbar-notice-body ul li{border-bottom:1px solid #eaedf1;}
.topbar-notice .topbar-notice-body ul li a{display:table; width:100%; padding:10px; overflow:hidden; background-color:#fff;}
.topbar-notice .topbar-notice-body ul li:hover a{background-color:#f2f2f2;}
.topbar-notice .topbar-notice-body ul li a div{display:table-cell; }
.topbar-notice .topbar-notice-body ul li a div:first-child{width:20px; vertical-align:middle; font-size:10px}
.topbar-notice .topbar-notice-body ul li a div:first-child i.new{color:#ff9900}
.topbar-notice .topbar-notice-body ul li a div:first-child i.old{color:#d5d5d5}
.topbar-notice .topbar-notice-body ul li a h3{font-size:14px; max-width:300px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; height:20px; line-height:20px; margin:0;}
.topbar-notice .topbar-notice-body ul li a .date{color:#333;}
.topbar-notice .topbar-notice-body ul li a div:nth-of-type(3){width:60px; text-align:right; vertical-align:middle; height:10px;}
.topbar-notice .topbar-notice-footer{height:50px; line-height:50px; text-align:center;}
/*新闻公告页面样式*/
.notice-show .breadcrumb{padding-left:0;}
.notice-show .category-btn{margin-bottom:10px;}
.notice-show .panel{padding:0 50px;}
.notice-show .panel .panel-heading{background-color:#fff; padding-left:0;}
.notice-show h5{color:#428BCA; border-left:3px solid #428BCA; padding-left:15px;}
.notice-show .small span{display:inline-block; margin:0 10px 0 0;}
.notice-show .panel ul{list-style:none; padding:0; margin:0;}
.notice-show .panel ul li{height:30px; line-height:30px; white-space:nowrap; overflow:hidden; padding-right:150px; position:relative;}
.notice-show .panel ul li a{display:inline-block; width:100%; overflow:hidden; text-overflow:ellipsis;}
.notice-show .date{ position:absolute; right:0;}
.notice-show h6{font-size:24px;}
/*图片弹出框*/
#modal-webuploader{z-index:1000000000}
/*表单验证插件*/
.bv-form .help-block{margin-bottom: 0}
.has-error .help-text, .has-success .help-text{color:#737373}
/*系统弹窗模态框*/
#modal-message{z-index:10000000000}
#map-dialog{z-index:10000000001}
/*超级券列表*/
#counpon-Modal .table td, #counpon-Modal .table th{text-align:center;}
#counpon-Modal .coupon-content .info{height:100px; line-height:100px; text-align:center; font-size:22px; font-weight:normal}
/*素材列表*/
#material-Modal #wxcard .table td, #material-Modal #wxcard .table th{text-align:center;}
#material-Modal .material-content .info{height:100px; line-height:100px; text-align:center; font-size:22px; font-weight:normal}
/*工具类*/
.padding-b-0{padding-bottom:0;}
/*计划任务日志弹出框*/
.mass-log:hover{cursor:wait;}
.table-cron.table{margin-bottom:0}
.table-cron.table tr td{white-space:normal; overflow:auto}
.table-cron.table tr:first-child td{border-top:none}
/*菜单样式*/
.menu .page-header{border:none; border-left:0.3em #333 solid; padding-left:1em;}
.menu .tile{display:block; float:left; margin:0.4em;padding:.2em 1em .5em 1em; width:8em; text-align:center; background:#EEE; color:#333; text-decoration:none;}
.menu .tile:hover{background:#7dacdd; color:#FFF;}
.menu .tile > i{display:block; font-size:2em; margin:0.3em auto 0 auto;}
.menu .tile > span{display:block;}
.module .thumbnails{padding:0; margin:0 0 0 -15px;}
.module li{position:relative; margin-left:15px; float:left;}
.module-priority{vertical-align:middle; height:30px; line-height:30px;cursor:pointer;}
span.module-priority{cursor:default;}
.module-priority select{vertical-align:middle; width:inherit; margin:0;}
.module-pic{width:100%;min-height:135px; overflow:hidden;position:relative;}
.module-pic > img{display:block; width:100%; height:147px; margin:0 auto;}
.module-pic .official{position:absolute; top:5px; right:5px;}
.module-button{padding:9px 0; height:30px; line-height:30px; box-sizing:content-box;}
.module-button .popover{width:auto;left:auto;top:auto;bottom:0;right:0;margin:0;margin-bottom:55px;line-height:20px;}
.module-button .popover-content {padding:5px 10px; overflow:hidden;}
.module-button .popover .arrow{left:85%;}
.module-button .popover select{width:100%;}
.module-detail{position:absolute;bottom:0;filter:Alpha(opacity=70);background:#000;background:rgba(0, 0, 0, 0.7);width:100%;font-family:arial,b8b\4f53,sans-serif;}
.module-detail p{padding:0 9px; margin:0;}
.module-detail h5{color:#FFF;font-weight:normal;padding:0 9px;}
.module-detail h5 small,.module-detail p{color:#CCC;}
p.module-brief{margin-bottom:10px; font-size:12px;}
p.module-description{display:block;padding:3px 10px;}
.require{color:red; margin-right:5px}
.deskmenu .cover{display : none;position: absolute;background : #000000;opacity: 0.5;width: 111px;height: 21px;}
.deskmenu .edit{color : #FFF;position: absolute;display: none;}
.deskmenu .del{color : #FFF;position: absolute;display: none;}
/*卡券*/
.marbot0{margin-bottom:0}
.clear{width:100%;height:0;clear:both;}
.form-area{margin:1px 0;padding:10px 15px;background:#F5F5F5;}
.card-title{background: url("../image/card.png") no-repeat scroll 0 -84px rgba(0, 0, 0, 0);color: #ffffff;font-size: 17px;height: 62px;line-height: 85px;text-align: center;}
.shop-panel{padding:21px 12px 12px;color:#FFF;position: relative}
.logo-area{margin-bottom:7px;}
.logo-area .logo{width:38px;height: 38px;padding-top: 0;margin-right: 7px;border-radius: 22px;border: 1px solid #d3d3d3;}
.logo-area .logo img{width:38px;height: 38px;border-radius: 22px;}
.msg-area{}
.tick-msg{text-align: center;margin-bottom: 6px;color:#fff;}
.tick-msg b{font-weight: normal;font-size:24px;color:#fff}
.tick-time{text-align: center;color:#fff}
.deco{position:absolute;bottom: -1px;left: 0;width: 100%;height: 5px;background: url(../images/card_tpl.png) repeat-x;}
.card-dispose{padding:15px 0;border-bottom: 1px solid #e7e7eb;margin-bottom: 15px;background: #fff;position: relative}
.unset{height:30px;line-height:30px;padding-left:15px;display: none;}
.barcode{width:320px;height:71px;margin:0 auto;background:url("../images/card.png") 27px -156px no-repeat}
.qrcode{width:320px;height:174px;margin:0 auto;background:url("../images/card.png") 70px -237px no-repeat}
.sn-area{text-align: center;font-size:25px;color:#000;}
.code_num{font-size:15px;text-align: center;margin-bottom: 10px;}
.list{border-top:1px solid #e7e7eb;border-bottom:1px solid #e7e7eb;background: #fff;padding:0;}
.list li{padding-left:15px;list-style: none;position: relative}
.li-panel{padding:11px 30px 11px 0;display:block;border-bottom: 1px solid #e7e7eb;}
.ricon{position: absolute;right:20px;top:15px}
.cicon{position: absolute;left:50%;top:25%;display:none;}
.hover{background: #E9E9E9;opacity:0.8}
.arrow_in{position: absolute;width:0;height:0;border-width: 12px;border-style: dashed;border-color: transparent;top:100px;left:-13px;border-left-width: 0;border-right-color: #f4f5f9;border-right-style: solid;}
.code_preview{display: none}
.app-container {margin: 0;padding-left: 210px;}
.app-container.empty-big-menu {
padding-left: 100px;
}
/*公共css*/
.second-sidebar {width: 110px;height: 100%;background-color: #fff;-webkit-box-shadow: 0 0 1px 0 rgba(153, 153, 153, 0.2);box-shadow: 0 0 1px 0 rgba(153, 153, 153, 0.2);position: fixed;left: 100px;top: 0;z-index: 8;overflow-y: auto;}
.second-sidebar .list-group-item {height: 30px;line-height: 30px;margin: 0 0 9px 0;padding: 0 10px!important;display: block;color: #333;}
.second-sidebar .panel-title {height: 30px;line-height: 30px;color: #c3c3c3;font-size: 12px;margin-bottom: 14px;}
.second-sidebar .panel .panel-heading {padding: 0;padding-top: 15px;background-color: #fff;border-bottom: none;position: relative;}
.second-sidebar .panel .panel-heading:before {content: "";width: 100%;height: 1px;background-color: #f2f2f2;position: absolute;top: 0;left: 0;}
.second-sidebar-c .panel:first-child .panel-heading:before {height: 0;}
.second-sidebar-t {height: 51px;line-height: 50px;color: #333;font-size: 14px;padding: 0 10px 0 20px;border: 1px solid #fff;border-bottom: 1px solid #f2f2f2;}
.second-sidebar .list-group .list-group-item.active {color: #3a3a3a;background-color: rgba(26,179,148,.1);}
.second-sidebar .list-group .list-group-item.active:hover {color: #333;background-color: rgba(26,179,148,.1);}
.second-sidebar .list-group .list-group-item:hover {background-color: #fff;}
.second-sidebar .list-group:last-child .list-group-item {border-bottom: none!important;}
.second-sidebar .panel {margin-bottom: 0;padding: 0 10px 5px;}
.second-sidebar .panel:first-child .panel-heading {border-top: 10 solid #f2f2f2;}
.panel {border: none;}
.topNav{border-bottom-color: rgb(0, 0, 0);border-bottom-width: 0.1em;border-bottom-style: inset;}
.panel>.list-group .list-group-item {border-width: 0px 0;}
.panel-title {color: #8d8d8d;}
.second-sidebar .panel-title i {display: none;}
.navbar-nav>li>a {line-height: 30px;}
.list-group .list-group-item.active{background-color:#1ab394;border-color:#1ab394;}
.home .footer a:hover{color:#1ab394;}
.modal-dialog .avatar-browser{color:#1ab394;}
.modal-dialog .avatar-browser .thumbnail:hover{border-color:#1ab394;}
.modal-dialog .avatar-browser{color:#1ab394;}
.modal-dialog .avatar-browser .thumbnail:hover{border-color:#1ab394;}
.notice-show h5{color:#1ab394; border-left:3px solid #1ab394; padding-left:15px;}
#tips-container {position: fixed;top: 50%;left: 0;width: 100%;display: none;z-index: 99999;}
#tips-container span {display:inline-block; padding:10px 40px; background:rgba(0,0,0,0.8); color:#fff; border-radius:4px;}
a, a:hover, a:focus { text-decoration: none; cursor: pointer;}
/*util.popover*/
.mall-popover{position:absolute; top: 0; left: 0; z-index: 1060; padding: 9px 14px; text-align: left; white-space: normal; background-color: #fff; -webkit-background-clip: padding-box; background-clip: padding-box; border: 1px solid rgba(0,0,0,.2); border-radius: 6px; -webkit-box-shadow: 2px 1px 3px rgba(0,0,0,.2); box-shadow: 2px 1px 3px rgba(0,0,0,.2)}
.mall-popover .arrow,.mall-popover .arrow:after{width: 0; height: 0; border-style: solid; position: absolute;}
.mall-popover .arrow:after{content: "";}
.mall-popover.top .arrow,.mall-popover.top .arrow:after{border-width: 10px 8px 0 8px; border-color:rgba(0,0,0,.2) transparent transparent transparent; left: 50%; bottom:-11px; margin-left:-9px;}
.mall-popover.top .arrow:after{border-top-color: #fff; left:1px; top: -12px;}
.mall-popover.right .arrow,.mall-popover.right .arrow:after{border-width: 8px 10px 8px 0; border-color: transparent rgba(0,0,0,.2) transparent transparent; left: -11px; top: 50%; margin-top:-8px;}
.mall-popover.right .arrow:after{border-right-color: #fff; left: 2px; top:0;}
.mall-popover.bottom .arrow,.mall-popover.bottom .arrow:after{border-width: 0 8px 10px 8px; border-color:transparent transparent rgba(0,0,0,.4) transparent; left: 50%; top:-11px; margin-left:-9px;}
.mall-popover.bottom .arrow:after{border-bottom-color:#fff; left:1px; top:1px;}
.mall-popover.left .arrow,.mall-popover.left .arrow:after{border-width: 8px 0 8px 10px; border-color: transparent transparent transparent rgba(0,0,0,.2); right:-11px; top: 50%; margin-top:-8px;}
.mall-popover.left .arrow:after{border-left-color: #fff; left: -12px; top: 0px;}
.mall-popover.top{margin-bottom:10px;}
.mall-popover.right{margin-left:10px;}
.mall-popover.bottom{margin-top:10px;}
.mall-popover.left{margin-right:10px;}
.btn.min-width {min-width: 104px;}
.scrollLoading{background:url(../images/loading.gif) no-repeat center center;}
.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:hover, .navbar-default .navbar-nav>.active>a:focus {color: #f60;background-color: #e7e7e7;border-bottom: 2px solid transparent;border-color: #f60;}
.bs-callout{padding:20px;margin-bottom:20px;border:1px solid #eee;border-left-width:5px;border-radius:3px;background-color: white;}
.bs-callout h4{margin-top:0;margin-bottom:5px}
.bs-callout p:last-child{margin-bottom:0}
.bs-callout code{border-radius:3px}
.bs-callout+.bs-callout{margin-top:-5px}
.bs-callout-danger{border-left-color:#ce4844}
.bs-callout-danger h4{color:#ce4844}
.bs-callout-warning{border-left-color:#aa6708}
.bs-callout-warning h4{color:#aa6708}
.bs-callout-info{border-left-color:#1b809e}
.bs-callout-info h4{color:#1b809e}
.app-container-right .nav-tabs {width: 100%;height: 50px;line-height: 50px;margin-bottom: 0;padding-left: 215px;border-bottom: none;-webkit-box-shadow: 0 0 1px 0 rgba(153, 153, 153, 0.2);box-shadow: 0 0 1px 0 rgba(153, 153, 153, 0.2);position: fixed;z-index: 7;top: 0;left: 0;}
.app-container-right .nav-tabs a {height: 50px;line-height: 50px;padding: 0 20px;display: block;}
.app-container-right .nav-tabs a:hover {background-color: #fff;border: 1px solid #fff;}
.app-container-right .nav-tabs .active a {color: #333;background-color: #fff;border: 1px solid #fff;position: relative;}
.app-container-right .nav-tabs .active a:after {content: "";width: calc(100% - 40px);height: 2px;background: #1ab394;position: absolute;left: 20px;bottom: -1px;}
.app-container-right .nav-tabs .active:nth-last-child(1):first-child a:after {height: 0;}
.app-container-right .nav-tabs>li.active>a, .app-container-right .nav-tabs>li.active>a:hover, .app-container-right .nav-tabs>li.active>a:focus {color: #333;background-color: #fff;border: 1px solid #fff;}
.app-container-right .nav-tabs .label {padding: 3px 5px;margin-left: 5px!important;margin-top: 15px;}
.app-container-right .app-content {min-height: calc(100vh - 125px);margin: 65px 15px 15px 15px;padding: 20px;background-color: #fff;-webkit-box-shadow: 0 0 1px 0 rgba(153, 153, 153, 0.2);box-shadow: 0 0 1px 0 rgba(153, 153, 153, 0.2);}
.app-content .app-filter .filter-action{margin-bottom: 20px;}
.app-content .app-filter .filter-list{background: #f8f8f8;border-radius: 0;padding: 20px 15px 5px;margin-bottom: 20px;}
.app-content .app-filter .filter-list .panel-body{padding: 0;}
.app-content .app-filter .filter-list .form-group{max-width: 980px;margin-left: 0;margin-right: 0;margin-bottom: 15px;}
.app-content .app-filter .filter-list .form-group .control-label{max-width: 120px;text-align: left!important;}
.app-content .app-filter .filter-list .form-group .form-control{max-width: 300px;min-width: 120px;}
.app-content .app-table-list .no-result{padding: 40px 0;text-align: center;border: 1px solid #eee;}
.app-content .app-table-list table{border: 1px solid #e5e5e5;margin-bottom: 20px;}
.app-content .app-table-list table thead{background-color: #f8f8f8;}
.app-content .app-table-list table th{padding: 10px!important;}
.app-content .app-table-list table td{padding: 10px!important;}
.app-content .app-table-list table td.text-lue {max-width: 300px;}
.app-content .app-table-list table .goods-info span {max-width: 432px;white-space: normal;overflow: auto;text-overflow:initial;}
.app-content .app-form{}
.app-content .app-form .panel{margin-bottom: 0;}
.app-content .app-form .panel-heading{border-bottom:0;background-color:#f8f8f8;position: relative;padding-left: 24px;margin-bottom: 30px;}
.app-content .app-form .panel-heading:after,.form-group-title:after{ content: '';position: absolute;width:4px;height:16px;background:#1AB394;-webkit-border-radius:30%;-moz-border-radius:30%;border-radius:30%;top: 12px;left: 10px;}
.app-content .app-form .panel-body{padding: 0;}
.app-content .app-form .form-group{max-width: 980px;margin-left: 0;margin-right: 0;}
.form-group-title{background-color: #f8f8f8;position: relative;margin-bottom: 30px;padding: 10px 15px 10px 24px;color: #333;}
.form-must{color: red;margin-right: 3px;}
/*底部*/
.ft.links{margin-bottom: 0px;}
.ft .links_item{border-left-color:#f2f2f2;*line-height:15px}
.foot{height: 70px;line-height: 70px;color:#999;text-align:center;background-color:#f2f2f2;bottom: 0px;position: inherit;width: 100%;}
.foot ul {list-style-type: none;}
.copyright{display:inline}
.head .dropdown>a {padding-left: 10px!important;padding-right: 10px!important;}
.head .navbar-default {border-bottom: 1px solid #FFFFFF!important;}
.msgbox {position:fixed;margin:auto;height:32px;line-height:32px;top:-32px; width:100%; text-align:center;z-index:111111111; transition-duration: 300ms;-webkit-transition-duration: 300ms;opacity:0;}
.msgbox.in {top:0;opacity: 1;}
.msgbox .msg {display:inline-block;white-space:nowrap;height:32px; line-height:32px; color:#fff; font-size:14px;min-width: 350px;}
.msgbox .msg-success { background:#5cb85c }
.msgbox .msg-error { background:#eaa000 }
.has-error .help-block,
.has-error .input-group-addon,
.has-error .input-group-btn .btn,
.has-error .control-label{color:#eb6060 !important;}
.has-error .input-group-addon,
.has-error .input-group-btn .btn,
.has-error .form-control,
.has-error.form-group .form-control:focus ,
.has-error .select2-container .select2-drop{border-color: #eb6060 !important;}
.has-error .input-group-addon,
.has-error .input-group-btn .btn{background: #fce9e6 !important;}
.has-error .help-block-validate{color: #eb6060;}
.has-success .help-block,
.has-success .input-group-addon,
.has-success .input-group-btn .btn,
.has-success .control-label{color:#54c952 !important;}
.has-success .input-group-addon,
.has-success .input-group-btn .btn,
.has-success .form-control,
.has-success .form-control:focus{border-color: #54c952 !important;}
.has-success .input-group-addon,
.has-success .input-group-btn .btn{background: #e7f7f1 !important;;}
.has-warning .help-block,
.has-warning .input-group-addon,
.has-warning .input-group-btn .btn,
.has-warning .control-label{color:#ffc000 !important;}
.has-warning .input-group-addon,
.has-warning .input-group-btn .btn,
.has-warning .form-control,
.has-warning .form-control:focus{border-color: #ffc000 !important;;}
.has-warning .input-group-addon,
.has-warning .input-group-btn .btn{background: #fdf6e7 !important;}
#page-loading{position: fixed;width:100%;height:100%;background:rgba(255,255,255,0.5);left:100px;top:0;z-index:9999}
#page-loading .page-loading-inner{position:fixed;top:50%;left:50%;margin-left:-35px;margin-top:-35px;}
#page-loading .sk-spinner-three-bounce div{background-color: #06c1ae}
/*概况统计*/
.pages-dashboard {min-height: calc(100vh - 70px);position: relative;}
.dashb-header {height: 63px;background-color: #FF4343;}
.dashb-check {color: #fff;padding: 10px 43px;display: -webkit-flex;display: flex;justify-content: flex-start;}
.dashb-check-l p {height: 20px;line-height: 20px;font-size: 12px;margin: 0;}
.dashb-check-l span {height: 20px;line-height: 20px;font-size: 12px;margin-top: 3px;display: block;}
.dashb-check-r {margin-left: 20px;}
.dashb-check-r a {height: 35px;line-height: 35px;color: #FF4343;margin-top: 4px;padding: 0 30px;background-color: #fff;border-radius: 2px;display: inline-block;margin-right: 10px;}
.dashb-h {width: 100%;height: 63px;line-height: 63px;font-size: 18px;font-weight: 600;padding-left: 43px;background-color: #fff;-webkit-box-shadow: 0 0 1px 0 rgba(153, 153, 153, 0.2);box-shadow: 0 0 1px 0 rgba(153, 153, 153, 0.2);}
.dashb-c {padding: 0 20px 20px;}
.dashb-c-top {margin-top: 20px;padding: 20px 25px;background-color: #fff;}
.dashb-c-p-title {font-size: 16px;font-weight: 600;display: -webkit-flex;display: flex;justify-content: space-between;}
.dashb-c-p-title i {color: #999;font-size: 12px;font-style: normal;font-weight: normal;}
.dashb-c-t1-c {padding: 10px 16px;}
.dashb-c-t1-c:after {content: "";display: block;clear: both;}
.dashb-c-p {width: 25%;margin: 15px 0;display: inline-block;float: left;}
.dashb-c-p-l {height: 75px;margin-right: 20px;display: -webkit-flex;display: flex;align-items: center;float: left;}
.dashb-c-p-l .icon {width: 46px;height: 46px;line-height: 44px;text-align: center;border-radius: 50%;display: inline-block;}
.p-l-icon1 {background-color: #009AFE;}
.p-l-icon2 {background-color: #F85959;}
.p-l-icon3 {background-color: #11CD6E;}
.p-l-icon4 {background-color: #FEB822;}
.dashb-c-p-l i {color: #fff;font-size: 25px;}
.dashb-c-p-r .h2 {height: 20px;line-height: 20px;font-size: 13px;margin: 0;}
.dashb-c-p-r .h1 {height: 35px;line-height: 35px;font-size: 22px;font-weight: 600;margin: 0;}
.dashb-c-p-r .p {height: 20px;line-height: 20px;color: #999;font-size: 13px;}
.dashb-c-t2-c {padding: 10px 16px;}
.dashb-c-t2-c:after {content: "";display: block;clear: both;}
.dashb-c-t2-b{margin-left: -30px;height: 500px;}
.dashb-c-t1-c{display: flex;flex-flow: wrap;padding-top: 20px;padding-bottom: 0;}
.dashb-c-t1-c .item{width: 50%;margin-bottom: 20px;}
.dashb-c-t1-c .item .item_tit{color: #333333;line-height: 30px;font-size: 15px;}
.dashb-c-t1-c .item .item_body{display: flex;flex-flow: wrap;}
.dashb-c-t1-c .item .item_body a{width:calc(100% / 3);line-height: 30px;}
.dashb-c-t1-c .item .item_body a .item_info{color: #999999;}
.dashb-c-t1-c .item .item_body .item_info span{color: #3388ff;}
/*统计列表*/
.panel-stat{border: none;}
.panel-stat .panel-heading, .panel-display .panel-heading, .panel-trend .panel-heading{border: none; background-color: #f8f8f8;}
.panel-stat .panel-heading h3, .panel-trend .panel-heading h3, .panel-display .panel-heading h3{display: inline-block; margin-top: 0; margin-bottom: 0; padding-left: 10px; font-size: 14px; font-weight: bold; border-left: 4px solid #06c1ae}
.panel-stat .panel-heading .pull-right a{color: #2A2A2A}
.panel-stat .panel-body, .panel-trend .panel-body{margin-top: 15px; background-color: #f8f8f8;}
.panel-stat .panel-body>div[class*=col-]{border-right: 1px dotted #ccc;}
.panel-stat .panel-body>div[class*=col-]:last-child{border-right: none}
.panel-stat .panel-body .title{text-align: center}
.panel-stat .panel-body .num-wrapper{text-align: center; }
.panel-stat .panel-body .num{color: #333; font-size: 40px; display: block}
.panel-stat .panel-body .info{display: inline-block; color: #999}
.panel-trend form{margin-top: 15px}
.panel-trend .panel-body, .panel-display .panel-body{background-color: #FFF; border: 1px solid #e4e4e4; margin-top: 15px;}
/*应用列表*/
.product-list .data-box{margin-bottom:30px;}
.product-list .data-box .data-hd{margin-bottom:20px;height:16px;line-height:16px;}
.product-list .data-box.with-padding .data-bd{padding:0 13px;}
.product-list .data-box.with-button .data-hd .more-info{margin-top:-9px;}
.product-list .data-box .data-hd h3,.data-box .data-hd h4{font-size: 16px;margin-top: 0;}
.product-list .list-view{overflow:hidden;margin-bottom:-20px;}
.product-list .list-view ul{width:105%;padding-left: 0;}
.product-list .list-view li{float:left;width:307px;margin:0px 20px 20px 0px;}
.product-list .list-view li a{display:block;height:80px;padding:19px 19px 15px 76px;background-color: #F5F7FA;cursor:pointer;position:relative;zoom:1;}
.product-list .list-view li a:hover{text-decoration:none;background:#f7f7f7;}
.product-list .list-view li .icon{position:absolute;left:17px;top:19px;width:42px;height:42px;overflow:hidden;border-radius:5px;text-align: center;padding-top: 5px;}
.product-list .list-view li .icon img{width:32px;height:32px;}
.product-list .list-view li .title{overflow: hidden;margin: 0 0 5px 0;color: #333;font-size: 16px;line-height: 20px;}
.product-list .list-view li .desc{color:#8d8d8d;font-size:12px;}
.product-list .list-view li .desc{height:19px;overflow:hidden;}
/*订单*/
.order-detail table tr:first-child td{border: none}
/*左侧登录信息*/
.app-login-info {width: 100%;position: absolute;left: 0;bottom: 0;}
.app-login-info-name {width: 100%;padding: 10px;background-color: #364555;}
.app-login-info-name-d {height: 25px;line-height: 25px;display: -webkit-flex;display: flex;-webkit-justify-content: space-between;justify-content: space-between;}
.app-login-info-name .face {width: 16px;height: 16px;line-height: 16px;text-align: center;margin-top: 4px;border: 1px solid rgba(255,255,255,.9);-webkit-border-radius: 50%;border-radius: 50%;-webkit-flex-shrink: 0;flex-shrink: 0;overflow: hidden;}
.app-login-info-name .face i {color: #fff;font-size: 12px;}
.app-login-info-name .name {height: 25px;line-height: 25px;color: #fff;font-size: 14px;padding-left: 5px;-webkit-flex: 1;flex: 1;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
.app-login-info-sel {width: 196px;background-color: #fff;-webkit-border-radius: 3px;border-radius: 3px;-webkit-box-shadow: 0 1px 6px 0 rgba(0, 0, 0, .2);box-shadow: 0 1px 6px 0 rgba(0, 0, 0, .2);position: absolute;left: 10px;bottom: 100%;display: none;}
.app-login-info-sel-arrow {content: "";width: 0;height: 0;border-width: 10px;border-style: solid;border-color: #f2f2f2 transparent transparent transparent;position: absolute;left: 15px;bottom: -17px;}
.app-login-info-sel-d {position: relative;z-index: 1;-webkit-border-radius: 3px;border-radius: 3px;overflow: hidden;}
.app-login-info-sel .sel-p {color: #333;font-size: 14px;padding: 15px;padding-bottom: 16px;display: -webkit-flex;display: flex;-webkit-justify-content: space-between;justify-content: space-between;position: relative;}
.app-login-info-sel .sel-p:hover {color: #fff!important;background-color: #1ab394!important;}
.app-login-info-sel .sel-p:hover:after {background-color: #1ab394;}
.app-login-info-sel .sel-p:hover .sel-p-r i {color: #fff;}
.app-login-info-sel .sel-p:after {content: "";width: calc(100% - 30px);height: 1px;background-color: #f2f2f2;position: absolute;left: 15px;bottom: 0;}
.app-login-info-sel .sel-p-l {padding-right: 10px;-webkit-flex-shrink: 1;flex-shrink: 1;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
.app-login-info-sel .sel-p-l .h3 {height: 17px;line-height: 17px;font-size: 12px;margin: 0;}
.app-login-info-sel .sel-p-r {-webkit-flex-shrink: 0;flex-shrink: 0;display: -webkit-flex;display: flex;-webkit-align-items: center;align-items: center;}
.app-login-info-sel .sel-p-r i {color: #999;font-size: 16px;margin-top: -6px;display: block;}
.app-login-info-sel .sel-p.login-out {padding-bottom: 15px;background-color: #f2f2f2;}
.app-login-info-sel .sel-p.login-out:after {height: 0;}
.app-login-info-sel .sel-p.sel-p-no-line:after {height: 0;}
/*提示说明*/
.alert-warning{background: #fff7cc!important;border-color: #feb!important;color: #333!important;}
/* form-editor-group*/
.form-editor-group .form-editor-show{display: block;}
.form-editor-group .form-editor-show .form-editor-btn{cursor: pointer;padding-left: 4px;}
.form-editor-group .form-editor-edit{display: none;}
.form-editor-group .help-block-validate{color: #eb6060;}
.hourselect{width:75px!important;}
.minuteselect{width:75px!important;}
/*页面链接*/
.pagelink-box{background: #fff;border-radius: 4px;}
.pagelink-header{font-size: 16px;padding: 11px 20px;background-color: #1ab394;color: white;border-radius: 4px 4px 0 0;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-khtml-user-select:none;user-select:none;}
.pagelink-header .pagelink-header-qr{cursor: pointer;font-size: 20px;line-height: 22px;}
.pagelink-content{padding: 20px;border: 1px solid #eee;border-width: 0 1px 1px 1px;}
.pagelink-content .flex-row{display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: horizontal;-ms-flex-direction: row;flex-direction: row;}
.pagelink-content .flex-row:first-child{margin-bottom: 10px}
.pagelink-content .link-title{white-space: nowrap;}
.pagelink-content .js-clip{word-break: break-all;color: #38f;}
/*渠道配置*/
.channel-set{background: #f8f8f8;color: #333;padding: 20px 25px;margin: 0 0 20px;overflow: hidden;}
.channel-set .channel-title{font-weight: 600;font-size: 18px;margin-bottom: 10px;}
.channel-set .pull-right{line-height: 55px}
/*系统更新*/
.upgrade-modal-page{display: none;}
.upgrade-modal-page .upgrade-modal-mask{position: fixed;top: 0;bottom: 0;left: 0;right: 0;background-color: rgba(55, 55, 55, 0.6);height: 100%;z-index: 1005;}
.upgrade-modal-page .upgrade-modal{width: 600px;z-index: 1001;position: absolute;padding: 30px 50px;background: #ffffff;top: 50%;left: 50%;transform: translate(-50%,-50%);border-radius: 2px;box-shadow: 1px 1px 50px rgba(0,0,0,.3);}
.upgrade-modal-page .upgrade-modal img{display: block;margin: 0 auto 20px;width: 255px;}
.upgrade-modal-page .upgrade-modal .progress{margin-bottom: 0;height: 15px;border-radius: 10px;-webkit-box-shadow: none;box-shadow: none;}
.upgrade-modal-page .upgrade-modal .progress .progress-bar{min-width: 40px;line-height: 15px;}
.upgrade-modal-page .upgrade-modal .upgrade-modal-tip{text-align: center;margin-top: 20px;}
.system-upgrade{font-size: 14px;}
.system-upgrade .upgrade-body{position: relative;background: #ffffff;padding: 30px 0 40px 0;}
.system-upgrade .upgrade-body .main-title{font-size: 28px;font-weight: bold;color: rgba(51, 51, 51, 1);margin: 11px 0 18px;}
.system-upgrade .upgrade-body .new-text{background: rgba(248, 248, 248, 1);border-radius: 10px;padding: 30px;}
.system-upgrade .upgrade-body .new-text .title{margin-bottom: 15px;}
/*更新日志*/
.update-log{font-size: 14px;background: #ffffff;}
.update-log .f-20{font-size: 20px;}
.update-log .loadmore{margin-left: 110px;margin-top: 15px;}
.update-log .update-title{padding: 20px 30px;border-bottom: 1px solid rgb(238, 238, 238);font-size: 18px;font-weight: bold;}
.update-log .updata-content .main-height{height: 52px;}
.update-log .updata-content .big{line-height: 52px;}
.update-log .updata-content .left{margin: 42px 30px 0;text-align: center;white-space: nowrap;flex-shrink:0;}
.update-log .updata-content .right{position: relative;padding: 42px 30px 40px;border-left: 1px solid rgb(238, 238, 238);border-bottom: 1px solid rgb(238, 238, 238);width: 100%;}
.update-log .updata-content .right .title{margin-bottom: 12px;font-weight: 600;}
.update-log .updata-content .right .dian{height: 6px;width: 6px;border-radius: 50%;position: absolute;background: #409EFF;top:64px;left: -3px;}

104
addons/weliam_smartcity/web/resource/css/select2.min.css

@ -0,0 +1,104 @@
.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}
.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:34px;user-select:none;-webkit-user-select:none}
.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.select2-container .select2-selection--single .select2-selection__clear{position:relative}
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}
.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}
.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}
.select2-container .select2-search--inline{float:left}
.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}
.select2-dropdown{background-color:white;border:1px solid #e5e6e7;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:3000}
.select2-results{display:block}
.select2-results__options{list-style:none;margin:0;padding:0}
.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}
.select2-results__option[aria-selected]{cursor:pointer}
.select2-container--open .select2-dropdown{left:0}
.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}
.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}
.select2-search--dropdown{display:block;padding:4px}
.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}
.select2-search--dropdown.select2-search--hide{display:none}
.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}
.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}
.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #e5e6e7;}
.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:34px}
.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}
.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}
.select2-container--default .select2-selection--single .select2-selection__arrow{height:32px;position:absolute;top:1px;right:1px;width:20px}
.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}
.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}
.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #e5e6e7;border-radius:4px;cursor:text}
.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}
.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}
.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}
.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}
.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #e5e6e7;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}
.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid #1ab394 1px;outline:0}
.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}
.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}
.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #e5e6e7}
.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}
.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}
.select2-container--default .select2-results__option[role=group]{padding:0}
.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}
.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}
.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}
.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}
.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}
.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}
.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}
.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #e5e6e7;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}
.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}
.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}
.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}
.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}
.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #e5e6e7;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}
.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #e5e6e7;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}
.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}
.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #e5e6e7;border-radius:4px;cursor:text;outline:0}
.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}
.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}
.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}
.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #e5e6e7;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}
.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}
.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #e5e6e7;outline:0}
.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}
.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}
.select2-container--classic .select2-dropdown--above{border-bottom:none}
.select2-container--classic .select2-dropdown--below{border-top:none}
.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}
.select2-container--classic .select2-results__option[role=group]{padding:0}
.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}
.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}
.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}
.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}

1227
addons/weliam_smartcity/web/resource/css/style.min.css

File diff suppressed because it is too large

55
addons/weliam_smartcity/web/resource/css/utility.css

@ -0,0 +1,55 @@
#selectUrl .modal-body {padding: 10px 15px;}
#selectUrl .tab-pane {margin-top: 5px; min-height: 400px; max-height: 460px; overflow-y: auto;}
#selectUrl .page-head {padding: 9px 0; margin-bottom: 8px;}
#selectUrl .page-head h4 {margin: 0;}
#selectUrl .btn {margin-bottom: 3px;}
#selectUrl .modal-dialog {width: 930px;}
#selectUrl .line {border-bottom: 1px dashed #ddd; color: #999; height: 36px; line-height: 36px;}
#selectUrl .line .icon {height: 35px; width: 30px; position: relative; float: left;}
#selectUrl .line .icon.icon-1:before {content: ""; width: 10px; height: 10px; border: 1px dashed #ccc; position: absolute; top: 12px; left: 10px;}
#selectUrl .line .icon.icon-2 {width: 50px;}
#selectUrl .line .icon.icon-2:before {content: ""; width: 10px; height: 10px; border-left: 1px dashed #ccc; border-bottom: 1px dashed #ccc; position: absolute; top: 12px; left: 20px;}
#selectUrl .line .icon.icon-3 {width: 60px;}
#selectUrl .line .icon.icon-3:before {content: ""; width: 10px; height: 10px; border-left: 1px dashed #ccc; border-bottom: 1px dashed #ccc; position: absolute; top: 12px; left: 30px;}
#selectUrl .line .btn-sm {float: right; margin-top: 5px; margin-right: 5px; height: 24px; line-height: 24px; padding: 0 10px;}
#selectUrl .line .text {display: block;}
#selectUrl .line .label-sm {padding: 2px 5px;}
#selectUrl .line.good {height: 60px; padding: 4px 0;}
#selectUrl .line.good .image {height: 50px; width: 50px; border: 1px solid #ccc; float: left;}
#selectUrl .line.good .image img {height: 100%; width: 100%;}
#selectUrl .line.good .text {padding-left: 60px; height: 52px;}
#selectUrl .line.good .text p {padding: 0; margin: 0;}
#selectUrl .line.good .text .name {font-size: 15px; line-height: 32px; height: 28px;}
#selectUrl .line.good .text .price {font-size: 12px; line-height: 18px; height: 18px;}
#selectUrl .line.good .btn-sm {height: 32px; padding: 5px 10px; line-height: 22px; margin-top: 9px;}
#selectUrl .tip {line-height: 250px; text-align: center;}
#selectUrl .nav.nav-tabs{border-color: #1ab394;}
#selectUrl .nav-tabs > li > a {padding: 8px 15px;}
#selectUrl .nav-tabs>li>a:hover {border-color: #eee #eee #1ab394 #eee;}
#selectUrl .nav-tabs>li.active>a, #selectUrl .nav-tabs>li.active>a:hover, .nav-tabs>li.active>a:focus {color: white;background-color: #1ab394;border-color: #1ab394;}
#selectUrlContent .page-search{margin-bottom: 20px;}
#selectUrlContent .page-search .col-sm-10{padding-left: 0;}
#selectUrlContent .app-table-list table{border: 1px solid #e5e5e5;}
#selectUrlContent tbody tr td .url_images{width: 30px; height: 30px;}
#selectUrlContent .pagerContent{height: 35px; line-height: 35px; margin-top: 20px; text-align: right;}
#selectUrlContent .pagerContent span:first-child{border-radius: 4px 0 0 4px;}
#selectUrlContent .pagerContent span:last-child{border-radius: 0 4px 4px 0;border-right: 1px solid #DDD;}
#selectUrlContent .pagerContent span{padding: 7px 15px; border: 1px solid #DDD; cursor: pointer; border-right: 0;}
#selectUrlContent .pagerContent .active, .pagerContent span:hover{background: #f4f4f4;}
#url_add_appid .form-group{height: 35px;line-height: 35px;}

598
addons/weliam_smartcity/web/resource/diyForm/edit.css

@ -0,0 +1,598 @@
/*顶部菜单*/
.nav.nav-tabs.diypage-nav-tabs {
height: 51px;
line-height: 51px;
color: #fff;
padding-right: 27px;
background-color: #273543;
border-bottom: none;
overflow: hidden;
}
.nav.nav-tabs.diypage-nav-tabs li {
margin-left: 15px;
margin-bottom: 0;
float: right;
}
.nav.nav-tabs.diypage-nav-tabs .li-flo-le {
float: left;
}
.nav.nav-tabs.diypage-nav-tabs a {
height: 21px;
line-height: 21px;
color: #fff;
font-size: 14px;
margin: 0;
padding: 15px;
border: none;
box-sizing: initial;
display: inline-block;
}
.nav.nav-tabs.diypage-nav-tabs .diypage-icon-txt {
padding: 15px 10px;
}
.nav.nav-tabs.diypage-nav-tabs .diypage-icon-txt i {
font-size: 16px;
}
.nav.nav-tabs.diypage-nav-tabs a i {
font-size: 20px;
padding-right: 4px;
margin-top: -2px;
float: left;
}
.nav.nav-tabs.diypage-nav-tabs a:hover, .nav.nav-tabs.diypage-nav-tabs a:active, .nav.nav-tabs.diypage-nav-tabs a:focus {
background-color: #272A3B;
}
.nav.nav-tabs.diypage-nav-tabs a:active {
background-color: transparent;
}
.nav.nav-tabs.diypage-nav-tabs .diypage-save-page {
min-width: 80px;
text-align: center;
margin-top: 8px;
margin-left: 15px;
padding: 6px 10px;
background-color: #1ab394;
border-radius: 3px;
}.nav.nav-tabs.diypage-nav-tabs .diypage-save-page i {
height: 24px;
font-size: 17px;
float: none;
vertical-align: -1px;
display: inline-block;
}
.nav.nav-tabs.diypage-nav-tabs .diypage-save-page:hover, .nav.nav-tabs.diypage-nav-tabs .diypage-save-page:active, .nav.nav-tabs.diypage-nav-tabs .diypage-save-page:focus {
background-color: #1ab394;
}
/*主要内容*/
.page-content {
width: 100%;
background: #fff;
position: relative;
height: calc(100vh - 141px);
overflow: hidden;
min-height: 100px;
}
.page-content .pagediy {
height: 100%;
position: relative;
margin: 0;
}
/*菜单样式*/
.diy-menu {
float: left;
overflow-y: auto;
height: 100%;
position: relative;
}
.diy-menu:before {
content: "";
width: 1px;
height: 100%;
background-color: #f3f3f3;
position: absolute;
top: 0;
left: 0;
}
.diy-menu:after {
content: "";
width: 1px;
height: 100%;
background-color: #f3f3f3;
position: absolute;
top: 0;
right: 0;
}
.diy-menu .navs {
float: left;
width: 300px;
}
.diy-menu .head_title {
height: 28px;
line-height: 28px;
padding: 11px 0;
display: -webkit-flex;
display: flex;
-webkit-justify-content: space-between;
justify-content: space-between;
box-sizing: initial;
border-bottom: 1px solid #F2F2F3;
}
.diy-menu .head_title .title {
color: #333;
font-size: 15px;
text-align: left;
padding-left: 20px;
}
.diy-menu .head_title .title:after {
content: '';
position: absolute;
width: 4px;
height: 16px;
background: #1AB394;
-webkit-border-radius: 30%;
-moz-border-radius: 30%;
border-radius: 30%;
top: 17px;
left: 10px;
}
.diy-menu .navs .nav{
float: left;
width: 100px;
height: 100px;
text-align: center;
border: 1px solid #F2F2F3;
border-top: none;
border-left: none;
border-radius: 0;
position: relative;
padding: 15px 5px;
font-size: 14px;
cursor: pointer;
}
.diy-menu .navs .nav:hover {
color: #333;
background: #fff;
}
.diy-menu .navs .nav:hover:after {
content: "";
width: 100%;
height: 100%;
border: 1px solid #1ab394;
position: absolute;
top: 0;
left: 0;
}
.diy-menu .navs .nav .img{
height: 45px;
width: 100%;
padding: 0 22px;
}
.diy-menu .navs .nav .img img{
width: 100%;
height: 100%;
}
.diy-menu .navs .nav .title{
height: 20px;
line-height: 20px;
}
/*模拟手机*/
#phone-margin{
position: absolute;
top: 0;
left: 300px;
width: calc(100% - 302px - 427px);
overflow-y: scroll;
height: 100%;
}
#phone-margin .diy-phone {
width: 375px;
height: auto;
border: 1px solid #ddd;
border-radius: 0;
background: #f6f6f6;
padding: 0;
padding-bottom: 0;
overflow: hidden;
/*margin-bottom: 150px;*/
margin: 25px auto;
box-sizing: initial;
}
#phone-margin .diy-phone .phone-head {
height: 52px;
position: relative;
display: none;
}
#phone-margin .diy-phone .phone-head:before {
content: "";
position: absolute;
top: 17px;
left: 140px;
height: 10px;
width: 10px;
background: #ddd;
border-radius: 8px;
}
#phone-margin .diy-phone .phone-head:after {
content: "";
position: absolute;
top: 18px;
left: 158px;
height: 8px;
width: 50px;
background: #ddd;
border-radius: 8px;
}
#phone-margin .diy-phone .phone-body {
background-color: #fff;
}
#phone-margin .diy-phone .phone-title {
height: 42px;
line-height: 42px;
/*background: url("../images/wx-top.png") 0 0 no-repeat;*/
background-size: 100% auto;
background-color: #000;
padding: 0 50px;
font-size: 15px;
color: #fff;
text-align: center;
cursor: default;
overflow: hidden;
display:block;
white-space:nowrap;
text-overflow:ellipsis;
}
#phone-margin .diy-phone .phone-main {
min-height: 667px;
border: none;
border-top: 0;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
#phone-margin .diy-phone .phone-block {
float: left;
cursor: pointer;
position: relative;
}
#phone-margin .diy-phone .phone-block .phone-operation{
float: left;
width: 100%;
height: 100%;
position: absolute;
left: 0;
bottom: 0;
}
#phone-margin .diy-phone .phone-block .phone-operation-del{
display: none;
}
#phone-margin .diy-phone .phone-block-active .phone-operation{
border: 2px dashed #00a0e9;
display: inline-block!important;
}
#phone-margin .diy-phone .phone-block-active .phone-operation-del{
position: absolute;
right: 0;
bottom: 0;
display: inline-block;
text-align: center;
font-size: 12px;
color: #fff;
background: rgba(0,0,0,.4);
cursor: pointer;
width: 35px;
height: 15px;
line-height: 17px;
}
#phone-margin .diy-phone .phone-align-left{
text-align: left;
}
#phone-margin .diy-phone .phone-align-center{
text-align: center;
}
#phone-margin .diy-phone .phone-align-right{
text-align: right;
}
#phone-margin .diy-phone .phone-main p {
margin: 0;
padding: 0;
}
#phone-margin .diy-phone .phone-main a {
color: #337ab7;
}
#phone-margin .diy-phone .phone-foot {
height: 52px;
width: 52px;
margin: 8px auto;
background-color: #fff;
border: 1px solid #ddd;
box-shadow: inset 0 0 1px rgba(0,0,0,.1);
border-radius: 50%;
display: none;
}
#phone-margin .backTop{
position: fixed;
bottom: 20%;
z-index: 0;
left: calc((100% - 300px - 407px) / 2 + 500px);
cursor: pointer;
color: #fff;
background: #ddd;
-webkit-border-radius: 4px;
border-radius: 4px;
width: 50px;
height: 50px;
line-height: 50px;
text-align: center;
font-size: 16px;
font-weight: 600;
}
#phone-margin .backTop:hover {
color: #666;
}
/*拖动中虚拟组件的样式*/
#phone-margin .diy-phone .fictitious_block .phone-operation{
border: 2px dashed #e53818;
}
/*配置信息*/
.diy-editor {
float: right;
width: 407px;
height: calc(100vh - 51px);
background: #fff;
padding: 0 10px;
border: none;
border-radius: 5px;
right: 0;
overflow-y: scroll;
box-sizing: initial;
position: absolute;
}
.diy-editor .editor_title {
height: 28px;
line-height: 28px;
padding: 11px 0;
display: -webkit-flex;
display: flex;
-webkit-justify-content: space-between;
justify-content: space-between;
box-sizing: initial;
}
.diy-editor .edit_title {
color: #333;
font-size: 15px;
text-align: left;
padding-left: 15px;
}
.diy-editor .edit_title:after {
content: '';
position: absolute;
width: 4px;
height: 16px;
background: #1AB394;
-webkit-border-radius: 30%;
-moz-border-radius: 30%;
border-radius: 30%;
top: 17px;
left: 10px;
}
.diy-editor .inner_content{
width: 407px;
padding: 15px ;
background-color: #f8f8fa;
border: 1px solid #F2F2F3;
border-radius: 4px;
}
.diy-editor .form-group {
margin: 20px 0 0 0;
}
.diy-editor .form-group:first-child {
margin: 0;
}
.diy-editor .col-sm-10 .form-group {
margin: 0;
padding: 0;
}
.diy-editor .col-sm-10 .form-group .count span {
padding-left: 5px;
}
.diy-editor .form-group .control-label {
line-height: 16px;
padding: 9px 7px 9px 0;
text-align: left;
font-size: 14px;
min-width: 75px;
}
.diy-editor .input-group .input-group-addon {
color: #666;
background-color: #f3f3f3;
}
.diy-editor .item-form .input-group .input-group-addon {
border-radius: 0;
}
.diy-editor .pagediy .diy-editor .form-group .col-sm-10,.pagediy .diy-editor .form-group .col-sm-4 {
padding-left: 0;
padding-right: 0;
max-width: 300px;
}
.diy-editor .form-group .col-sm-10 .help-block {
color: #999;
font-size: 12px;
margin: 10px 0 0 0;
}
.diy-editor .form-group .form-control {
height: 34px;
padding: 0 5px;
border-color: #e0e0e0;
}
.diy-editor .form-group .noblr {
border-left: 0;
border-right: 0;
}
.diy-editor .color {
padding: 0;
cursor: pointer;
}
.diy-editor .form-group .ui-slider {
margin-top: 11px;
height: 10px;
border: 1px solid #aaa;
background: #FFF;
color: #222;
border-radius: 15px;
width: 150px;
}
.diy-editor .form-group .ui-slider a{
border: 1px solid #d3d3d3;
background: #DDD;
height: 20px;
width: 20px;
display: inline-block;
position: absolute;
left: 0;
top: -5px;
border-radius: 5px;
}
.diy-editor .form-group .count {
margin-top: 6px;
margin-left: 160px;
}
/*组件公共样式*/
.phone-main .block{
float: left;
width: 100%;
padding: 5px 10px;
background: #FFF;
}
.phone-main .title{
float: left;
width: 100px;
height: 30px;
line-height: 30px;
font-size: 14px;
padding: 0 5px;
overflow: hidden;
display: block;
white-space: nowrap;
text-overflow: ellipsis;
}
.phone-main .title .form-must{
margin: 0!important;
padding: 0!important;
}
.phone-main .content{
float: left;
width: 255px;
}
/*单行文本*/
.phone-text input{
width: 100%;
border: 1px solid #e8e9eb;
height: 30px;
line-height: 30px;
outline: none;
}
/*文本域*/
.phone-textarea textarea{
width: 100%;
resize: none;
outline: none;
border: 1px solid #e8e9eb;
}
/*下拉框*/
.phone-select .select-content{
height: 30px;
line-height: 30px;
width: 100%;
text-align: right;
color: #888;
}
.phone-select i{
float: right;
height: 30px;
line-height: 28px;
width: 15px;
color: #e8e9eb;
}
.config_select .select_block{
margin-bottom: 5px;
}
.config_select a{
width: 100%;
}
/*多选框*/
.phone-checkbox .checkbox-item{
min-height: 30px;
line-height: 30px;
text-align: left;
border: 1px solid #e8e9eb;
margin: 0 3px 3px 0;
padding: 0px 10px;
font-size: 13px;
float: left;
}
.config_checkbox .select_block{
margin-bottom: 5px;
}
.config_checkbox a{
width: 100%;
}
/*图片*/
.phone-img .img-upload{
width: 50px;
height: 50px;
line-height: 50px;
text-align: center;
border: 1px solid #CCC;
}
/*时间*/
.phone-time .time-content{
height: 30px;
line-height: 30px;
width: 100%;
text-align: right;
}
.phone-time i{
float: right;
height: 30px;
line-height: 28px;
width: 15px;
color: #e8e9eb;
}
/*时间范围*/
.phone-datetime .time-content{
height: 30px;
line-height: 30px;
width: 100%;
font-size: 12px;
text-align: right;
}
/*城市*/
.phone-city .content{
text-align: right;
}
.phone-city span{
display: inline-block;
height: 30px;
line-height: 30px;
padding: 0 10px;
text-align: center;
font-size: 14px;
}
.phone-city i{
float: right;
height: 30px;
line-height: 28px;
width: 15px;
color: #e8e9eb;
}

BIN
addons/weliam_smartcity/web/resource/diyForm/img/checkbox.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
addons/weliam_smartcity/web/resource/diyForm/img/city.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
addons/weliam_smartcity/web/resource/diyForm/img/datetime.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
addons/weliam_smartcity/web/resource/diyForm/img/img.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
addons/weliam_smartcity/web/resource/diyForm/img/select.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
addons/weliam_smartcity/web/resource/diyForm/img/text.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
addons/weliam_smartcity/web/resource/diyForm/img/textarea.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
addons/weliam_smartcity/web/resource/diyForm/img/time.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

10
addons/weliam_smartcity/web/resource/download/activationcode.csv

@ -0,0 +1,10 @@
序号,激活码,时长(天),匹配等级id,备注(选填)
1,A11111111,10,0,此激活码无效
2,A22222222,9,0,此激活码无效
3,A33333333,5,1,此激活码无效
4,A44444444,5,2,此激活码无效
5,A55555555,8,3,此激活码有效
6,A66666666,6,5,此激活码有效
7,A77777777,6,8,此激活码有效
8,A88888888,1,8,此激活码有效
9,A99999999,9,8,此激活码有效
1 序号 激活码 时长(天) 匹配等级id 备注(选填)
2 1 A11111111 10 0 此激活码无效
3 2 A22222222 9 0 此激活码无效
4 3 A33333333 5 1 此激活码无效
5 4 A44444444 5 2 此激活码无效
6 5 A55555555 8 3 此激活码有效
7 6 A66666666 6 5 此激活码有效
8 7 A77777777 6 8 此激活码有效
9 8 A88888888 1 8 此激活码有效
10 9 A99999999 9 8 此激活码有效

1
addons/weliam_smartcity/web/resource/download/aliarea.json

File diff suppressed because one or more lines are too long

2
addons/weliam_smartcity/web/resource/download/checkcodelist.csv

@ -0,0 +1,2 @@
╨коЗбК
12345678
1 ╨коЗбК
2 12345678

2
addons/weliam_smartcity/web/resource/download/deliveryActivity.csv

@ -0,0 +1,2 @@
商品名,商家名,分类,缩略图,图集(英文逗号分隔),价格(最多保留两位小数),原价(最多保留两位小数),额外配送费(最多保留两位小数),会员特权(0 无 1减免 2特供),会员减免,商品状态(2上架 4下架),排序
测试商品,测试商户,测试分类,http://weilamdemo.oss-cn-qingdao.aliyuncs.com/images/26/2020/04/uOCdrhA18NZnr2D77R6XJN8RoGj6w6.jpg,"http://weilamdemo.oss-cn-qingdao.aliyuncs.com/images/26/2020/03/aS1r0C8cxx8n5A0RyAANrSesAF8EfD.png,http://weilamdemo.oss-cn-qingdao.aliyuncs.com/images/26/2020/03/YreD3DQ7lYpGLrCCqpiGIG1rq7gZII.jpg,http://weilamdemo.oss-cn-qingdao.aliyuncs.com/images/26/2020/03/TrdQw3XQQSBB88bs4Yov4hZpSp2Wc2.jpg",10,15,0.5,1,0.5,2,0
1 商品名 商家名 分类 缩略图 图集(英文逗号分隔) 价格(最多保留两位小数) 原价(最多保留两位小数) 额外配送费(最多保留两位小数) 会员特权(0 无 1减免 2特供) 会员减免 商品状态(2上架 4下架) 排序
2 测试商品 测试商户 测试分类 http://weilamdemo.oss-cn-qingdao.aliyuncs.com/images/26/2020/04/uOCdrhA18NZnr2D77R6XJN8RoGj6w6.jpg http://weilamdemo.oss-cn-qingdao.aliyuncs.com/images/26/2020/03/aS1r0C8cxx8n5A0RyAANrSesAF8EfD.png,http://weilamdemo.oss-cn-qingdao.aliyuncs.com/images/26/2020/03/YreD3DQ7lYpGLrCCqpiGIG1rq7gZII.jpg,http://weilamdemo.oss-cn-qingdao.aliyuncs.com/images/26/2020/03/TrdQw3XQQSBB88bs4Yov4hZpSp2Wc2.jpg 10 15 0.5 1 0.5 2 0

1
addons/weliam_smartcity/web/resource/download/locations.json

File diff suppressed because one or more lines are too long

BIN
addons/weliam_smartcity/web/resource/download/members.xlsx

Binary file not shown.

2
addons/weliam_smartcity/web/resource/download/mobilelist.csv

@ -0,0 +1,2 @@
手机号
17708000555
1 手机号
2 17708000555

4703
addons/weliam_smartcity/web/resource/download/robotnickname.csv

File diff suppressed because it is too large

BIN
addons/weliam_smartcity/web/resource/fonts/pingfang.ttf

Binary file not shown.

88
addons/weliam_smartcity/web/resource/goods/css/list.css

@ -0,0 +1,88 @@
/*商品列表搜索栏样式*/
#search .form-group{
width: 26%;
margin: 0;
display: inline-block;
}
#search .form-group .no_padding{
padding: 0;
}
/*商品列表表格样式*/
#goodsList .image{
display: inline-block;
line-height: 60px;
height: 60px;
width: 60px;
text-align: center;
float: left;
}
#goodsList img{
max-width: 60px;
max-height: 60px;
}
#goodsList .text{
float: left;
margin-left: 5px;
height: 60px;
line-height: 20px;
font-size: 13px;
width: calc(100% - 65px);
}
#goodsList .text .shop{
white-space: nowrap;/*一行显示*/
overflow: hidden;/*超出部分隐藏*/
text-overflow: ellipsis;/*用...代替超出部分*/
max-width: 300px;
}
#goodsList .text .name{
word-break:break-all;
display:-webkit-box;/**对象作为伸缩盒子模型展示**/
-webkit-box-orient:vertical;/**设置或检索伸缩盒子对象的子元素的排列方式**/
-webkit-line-clamp:2;/**显示的行数**/
overflow:hidden;/**隐藏超出的内容**/
}
#goodsList .isUpdateData{
color: #33a6dc;
cursor: pointer;
}
#goodsList .orderLink{
color: #ff4500;
}
/*商品分类列表表格样式*/
#categoryList .cate_information{
text-align: left;
padding-left: 60px!important;
}
#categoryList .image{
display: inline-block;
}
#categoryList img{
width: 50px;
height: 50px;
}
#categoryList .cate_name{
max-width: calc(100% - 50px);
margin-left: 15px;
line-height: 50px;
display: inline-block;
}
#categoryList .cate_two_info{
text-align: left;
padding-left: 180px!important;
}
#categoryList .cate_left{
float: left;
}
#categoryList .switchButton{
cursor: pointer;
}
/*商品分类编辑表单样式*/
#editGoodsCate {
display: none;
padding-right: 4px;
position: fixed;
top: 15%;
left: 30%;
z-index: 2041;
}

156
addons/weliam_smartcity/web/resource/goods/js/category.js

@ -0,0 +1,156 @@
var goodsCateVue = new Vue({
el: '#listContent',
data: {
modularList:commonVue.getModular(),//获取模块信息列表
cate_type: 0,//分类类型:1=团购(groupon),2=抢购(rush),3=拼团(wlfightgroup),4=砍价(bargain)
type_name: '团购',//当前分类类型名称
infoData: [],//分类列表信息数组
page:1,//当前页
page_num:1,//总页数
getCateLink: '',//获取商品信息列表的请求地址
categoryParent:[],//上级分类列表
},
methods: {
//获取默认分类类型
goodClass(){
let cate_type = common.getUrlParam("cate_type");
if(cate_type > 0){
this.cate_type = cate_type;
}else{
if(this.modularList['groupon'] == 1){
this.cate_type = 1;
}else if(this.modularList['rush'] == 1){
this.cate_type = 2;
}else if(this.modularList['wlfightgroup'] == 1){
this.cate_type = 3;
}else if(this.modularList['bargain'] == 1){
this.cate_type = 4;
}
}
},
//更换类型按钮被点击 更换操作开始
changeCate(params){
this.cate_type = params;
},
//进行翻页操作
changePage (index) {
this.page = index;
},
//清空搜索内容
delSearch(state = false){
$("[name='name']").val('');
if(state){
this.cateList();
}
},
//返回移动端的完整链接信息
appUrl(path,params){
return common.appUrl(path, params,true)
},
//返回后台的完整链接信息
webUrl(path,params){
return common.webUrl(path, params,true)
},
//获取分类信息列表
cateList(){
//获取搜索的条件
let params = {
page:this.page,
cate_type:this.cate_type,
name: $("[name='name']").val(),
};
//请求获取列表信息
let res = commonVue.requestAjax('goods/Goods/getCateList',params);
//重新赋值
this.infoData = res['list'];
this.page_num = res['page_num'];
},
//改变基本信息 商品类型:1=团购,2=抢购,3=拼团,4=砍价
changeInfo() {
//配置当前商品的基本操作信息
switch (this.cate_type) {
case 1:case '1':
//分类类型 - 团购
this.type_name = '团购';
break;
case 2:case '2':
//分类类型 - 抢购
this.type_name = '抢购';
break;
case 3:case '3':
//分类类型 - 拼团
this.type_name = '拼团';
break;
case 4:case '4':
//分类类型 - 砍价
this.type_name = '砍价';
break;
}
},
//修改分类的开启&关闭
updateSwitch(id,value){
//请求修改内容
let params = {
id: id,
cate_type: this.cate_type,
field: 'is_show',
value: value,
};
let res = commonVue.requestAjax('goods/Goods/updateGoodsCate',params,true);
//重新渲染列表信息
this.cateList();//从新获取分类信息列表
},
//删除分类信息
deleteCate(id){
//参数配置
let params = {
id: id,
cate_type: this.cate_type,
};
//请求删除
tip.confirm( '此操作会删除当前分类,同时会导致商品分类数据缺失或其他问题,确定要删除吗?',function () {
let res = commonVue.requestAjax('goods/Goods/delGoodsCate',params,true);
if(res.status == 0){
tip.msgbox.err(res.result.message);
}else{
tip.msgbox.suc(res.result.message);
goodsCateVue.cateList();//重新渲染列表信息
}
});
},
//添加/编辑分类信息
edit(state){
//团购时获取所有的一级分类
if(this.cate_type == 1){
//获取搜索的条件
let params = {
page:1,
cate_type:this.cate_type,
index:100,
};
//请求获取列表信息
let res = commonVue.requestAjax('goods/Goods/getCateList',params);
//重新赋值
this.categoryParent = res['list'];
}
//弹出表单内容
$("#editGoodsCate").modal();
}
},
watch: {
//cate_type 被改变
cate_type(){
this.delSearch();//清空搜索内容
this.changeInfo();//改变基本配置信息
this.cateList();//从新获取分类信息列表
},
//page 被改变
page(){
this.cateList();
},
},
//进入页面请求获取信息
mounted() {
this.goodClass();//改变默认商品类型
}
});

255
addons/weliam_smartcity/web/resource/goods/js/list.js

@ -0,0 +1,255 @@
var goodsVue = new Vue({
el: '#listContent',
data: {
modularList:commonVue.getModular(),//获取模块信息列表
goods_type: 0,//商品类型:1=团购(groupon),2=抢购(rush),3=拼团(wlfightgroup),4=砍价(bargain)
type_name: '团购',//当前商品类型名称
infoData: [],//商品信息数组
page:1,//当前页
page_num:1,//总页数
statusList:[],//状态列表
classList:[],//分类列表
getGoodsLink: '',//获取商品信息列表的请求地址
copyGoodsLink: '',//复制商品请求地址
setGoodsSale: '',//设置商品上架/下架请求地址
toExamineLink: '',//商品审核请求地址
deleteGoodsLink:'',//删除商品请求地址
},
methods: {
//获取默认商品类型
goodClass(){
let goods_type = common.getUrlParam("goods_type");
if(goods_type > 0){
this.goods_type = goods_type;
}else{
if(this.modularList['groupon'] == 1){
this.goods_type = 1;
}else if(this.modularList['rush'] == 1){
this.goods_type = 2;
}else if(this.modularList['wlfightgroup'] == 1){
this.goods_type = 3;
}else if(this.modularList['bargain'] == 1){
this.goods_type = 4;
}
}
},
//获取商品信息列表
goodsList(){
//获取搜索的条件
let params = {
page:this.page,
name:$("[name='name']").val(),
status:$("[name='status']").val(),
goods_id:$("[name='goods_id']").val(),
shop_name:$("[name='shop_name']").val(),
cate_id:$("[name='cate_id']").val(),
shop_id:$("[name='shop_id']").val()
};
//获取请求的地址
if(this.getGoodsLink){
//请求获取商品列表
let res = commonVue.requestAjax(this.getGoodsLink,params);
//重新赋值
this.infoData = res['list'];
this.page_num = res['page_num'];
}else{
this.infoData = [];
this.page_num = 0;
}
},
//更换商品按钮被点击 更换操作开始
changeGoods(params){
this.goods_type = params;
},
//进行翻页操作
changePage (index) {
this.page = index;
},
//清空搜索内容
delSearch(state = false){
$("[name='name']").val('');
$("[name='status']").val(-1);
$("[name='goods_id']").val('');
$("[name='shop_name']").val('');
$("[name='cate_id']").val(-1);
$("[name='shop_id']").val('');
if(state){
this.goodsList();
}
},
//返回移动端的完整链接信息
appUrl(path,params){
return common.appUrl(path, params,true)
},
//返回后台的完整链接信息
webUrl(path,params){
return common.webUrl(path, params,true)
},
//推荐商品 目前仅团购商品由此功能
goodsRecommend(id){
tip.confirm( '确认将此商品设置为推荐商品?',function () {
let res = commonVue.requestAjax('groupon/active/recommend',{id:id});
goodsVue.goodsList();//重新获取信息列表
});
},
//商品信息复制
goodCopying(id){
tip.confirm( '确认复制该活动?被复制的活动会在已下架中显示',function () {
let res = commonVue.requestAjax(goodsVue.copyGoodsLink,{id:id});
goodsVue.goodsList();//重新获取信息列表
});
},
//商品的上下架管理
isSale(id,status){
let statushtml = (status == 4) ? "上架" : "下架";
tip.confirm( '确认将此商品'+statushtml+'?',function () {
let res = commonVue.requestAjax(goodsVue.setGoodsSale,{id:id,status:status});
goodsVue.goodsList();//重新获取信息列表
});
},
//审核商品是否通过
goodsToExamine(id,flag){
let statushtml = (flag == 1) ? "通过" : "不通过";
tip.confirm( '确认商品审核'+statushtml+'?',function () {
let res = commonVue.requestAjax(goodsVue.toExamineLink,{id:id,flag:flag});
goodsVue.goodsList();//重新获取信息列表
});
},
//删除商品信息
deleteGoodsInfo(id){
tip.confirm( '此操作会删除当前商品,同时会导致订单商品数据缺失或其他问题,确定要删除吗?',function () {
let res = commonVue.requestAjax(goodsVue.deleteGoodsLink,{id:id});
goodsVue.goodsList();//重新获取信息列表
});
},
//改变基本信息 商品类型:1=团购,2=抢购,3=拼团,4=砍价
changeInfo() {
//配置当前商品的基本操作信息
switch (this.goods_type) {
case 1:case '1':
//商品类型 - 团购
this.type_name = '团购';
//获取团购商品状态列表
this.statusList = [
{'name':'未上架','status':0},
{'name':'未开始','status':1},
{'name':'进行中','status':2},
{'name':'已结束','status':3},
{'name':'下架中','status':4},
{'name':'待审核','status':5},
{'name':'未通过','status':6},
{'name':'已抢完','status':7},
];
//获取团购商品的分类列表(可使用的分类)
this.classList = commonVue.requestAjax('groupon/active/getClassList');
//获取团购商品信息列表的请求地址
this.getGoodsLink = 'groupon/active/groupList';
//复制团购商品的请求地址
this.copyGoodsLink = 'groupon/active/copygood';
//设置团购商品上架/下架请求地址
this.setGoodsSale = 'groupon/active/delete';
//团购商品审核请求地址
this.toExamineLink = 'groupon/active/examine';
//删除团购商品请求地址
this.deleteGoodsLink = 'groupon/active/delall';
break;
case 2:case '2':
//商品类型 - 抢购
this.type_name = '抢购';
//获取抢购商品状态列表
this.statusList = [
{'name':'待开始','status':1},
{'name':'进行中','status':2},
{'name':'已结束','status':3},
{'name':'已下架','status':4},
{'name':'待审核','status':5},
{'name':'未通过','status':6},
{'name':'已抢完','status':7},
];
//获取抢购商品的分类列表(可使用的分类)
this.classList = commonVue.requestAjax('rush/active/getClassList');
//获取抢购商品信息列表的请求地址
this.getGoodsLink = 'rush/active/rushList';
//复制抢购商品的请求地址
this.copyGoodsLink = 'rush/active/copygood';
//设置抢购商品上架/下架请求地址
this.setGoodsSale = 'rush/active/delete';
//抢购商品审核请求地址
this.toExamineLink = 'rush/active/examine';
//删除抢购商品请求地址
this.deleteGoodsLink = 'rush/active/delall';
break;
case 3:case '3':
//商品类型 - 拼团
this.type_name = '拼团';
//获取拼团商品状态列表
this.statusList = [
{'name':'未上架','status':0},
{'name':'销售中','status':1},
{'name':'已删除','status':4},
{'name':'审核中','status':5},
{'name':'未通过','status':6},
];
//获取拼团商品的分类列表(可使用的分类)
this.classList = commonVue.requestAjax('wlfightgroup/fightgoods/getClassList');
//获取拼团商品信息列表的请求地址
this.getGoodsLink = 'wlfightgroup/fightgoods/fightList';
//复制拼团商品的请求地址
this.copyGoodsLink = 'wlfightgroup/fightgoods/copygood';
//设置拼团商品上架/下架请求地址
this.setGoodsSale = 'wlfightgroup/fightgoods/delete';
//拼团商品审核请求地址
this.toExamineLink = 'wlfightgroup/fightgoods/toExamine';
//删除拼团商品请求地址
this.deleteGoodsLink = 'wlfightgroup/fightgoods/deleteGoods';
break;
case 4:case '4':
//商品类型 - 砍价
this.type_name = '砍价';
//获取砍价商品状态列表
this.statusList = [
{'name':'未上架','status':0},
{'name':'未开始','status':1},
{'name':'进行中','status':2},
{'name':'已结束','status':3},
{'name':'下架中','status':4},
{'name':'待审核','status':5},
{'name':'未通过','status':6},
];
//获取砍价商品的分类列表(可使用的分类)
this.classList = commonVue.requestAjax('bargain/bargain_web/getClassList');
//获取砍价商品信息列表的请求地址
this.getGoodsLink = 'bargain/bargain_web/bargainList';
//复制砍价商品的请求地址
this.copyGoodsLink = 'bargain/bargain_web/copygood';
//设置砍价商品上架/下架请求地址
this.setGoodsSale = 'bargain/bargain_web/changestatus';
//砍价商品审核请求地址
this.toExamineLink = 'bargain/bargain_web/pass';
//删除砍价商品请求地址
this.deleteGoodsLink = 'bargain/bargain_web/delall';
break;
}
//使用jq方法 遍历需要复制链接的内容
common.copyLink();
},
},
watch: {
//goods_type 被改变
goods_type(){
this.delSearch();//清空搜索内容
this.changeInfo();//改变基本配置信息
this.goodsList();//从新获取商品信息列表
},
//page 被改变
page(){
this.goodsList();
},
},
//进入页面请求获取信息
mounted() {
this.goodClass();//改变默认商品类型
}
});

BIN
addons/weliam_smartcity/web/resource/image/bg_repno.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
addons/weliam_smartcity/web/resource/image/card.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
addons/weliam_smartcity/web/resource/image/cube/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
addons/weliam_smartcity/web/resource/image/cube/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
addons/weliam_smartcity/web/resource/image/cube/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
addons/weliam_smartcity/web/resource/image/cube/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
addons/weliam_smartcity/web/resource/image/cube/5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
addons/weliam_smartcity/web/resource/image/cube/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
addons/weliam_smartcity/web/resource/images/chenggong.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
addons/weliam_smartcity/web/resource/images/dating_dynamic.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

BIN
addons/weliam_smartcity/web/resource/images/dating_home.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
addons/weliam_smartcity/web/resource/images/dating_matchmaker.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
addons/weliam_smartcity/web/resource/images/dating_video.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
addons/weliam_smartcity/web/resource/images/default.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
addons/weliam_smartcity/web/resource/images/default_adv.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
addons/weliam_smartcity/web/resource/images/festival_redpack.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

BIN
addons/weliam_smartcity/web/resource/images/festival_redpack_2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

BIN
addons/weliam_smartcity/web/resource/images/festival_redpack_3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

BIN
addons/weliam_smartcity/web/resource/images/festival_redpack_4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
addons/weliam_smartcity/web/resource/images/festival_redpack_5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

BIN
addons/weliam_smartcity/web/resource/images/festival_redpack_6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

BIN
addons/weliam_smartcity/web/resource/images/gengxin.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
addons/weliam_smartcity/web/resource/images/icon_popup3696b4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
addons/weliam_smartcity/web/resource/images/loading.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 B

BIN
addons/weliam_smartcity/web/resource/images/new_redpack.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

BIN
addons/weliam_smartcity/web/resource/images/nopic-small.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
addons/weliam_smartcity/web/resource/images/nopic.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save