Przeglądaj źródła

wesmiler 更新第5期更新代码合并

wesmiler 4 lat temu
rodzic
commit
9da5b9dffd
40 zmienionych plików z 2300 dodań i 926 usunięć
  1. 79 0
      app/api/controller/IndexController.php
  2. 14 4
      app/api/controller/MemberController.php
  3. 8 0
      app/weixin/controller/IndexController.php
  4. 1 1
      app/weixin/model/Meals.php
  5. 30 6
      app/weixin/model/Member.php
  6. 9 6
      app/weixin/model/Payment.php
  7. 11 9
      app/weixin/service/Award.php
  8. 1 0
      data/lang/admin_menu.php
  9. 1 1
      public/themes/admin_simpleboot3/admin/activity/edit.html
  10. 17 17
      public/themes/admin_simpleboot3/admin/market/marketexamine.html
  11. 13 2
      public/themes/admin_simpleboot3/admin/market/marketset.html
  12. 9 1
      public/themes/admin_simpleboot3/admin/market/marketsetlist.html
  13. 43 19
      public/themes/admin_simpleboot3/admin/market/marketuser.html
  14. 177 0
      public/themes/admin_simpleboot3/admin/pic/add.html
  15. 207 0
      public/themes/admin_simpleboot3/admin/pic/edit.html
  16. 165 0
      public/themes/admin_simpleboot3/admin/pic/index.html
  17. 76 61
      public/themes/admin_simpleboot3/admin/user/add.html
  18. 18 0
      public/themes/admin_simpleboot3/admin/user/edit.html
  19. 2 0
      public/themes/admin_simpleboot3/admin/user/index.html
  20. 1 0
      public/themes/default/weixin/auth/vip.html
  21. 60 0
      public/themes/default/weixin/index/pic.html
  22. 10 0
      public/themes/default/weixin/match/index.html
  23. 2 2
      public/themes/default/weixin/member/invite.html
  24. 4 1
      public/themes/default/weixin/public/assets/css/auth-vip.css
  25. 15 0
      public/themes/default/weixin/public/assets/css/match.css
  26. 95 0
      public/themes/default/weixin/public/assets/css/pic.css
  27. BIN
      public/themes/default/weixin/public/assets/img/activity.jpg
  28. BIN
      public/themes/default/weixin/public/assets/img/jh.jpg
  29. BIN
      public/themes/default/weixin/public/assets/img/jiehun.jpg
  30. BIN
      public/themes/default/weixin/public/assets/img/love.jpg
  31. 1 1
      public/themes/default/weixin/public/assets/js/auth-vip.js
  32. 2 1
      public/themes/default/weixin/public/assets/js/home.js
  33. 205 183
      public/themes/default/weixin/public/assets/js/match.js
  34. 185 0
      public/themes/default/weixin/public/assets/js/pic.js
  35. 1 1
      public/themes/default/weixin/public/assets/js/privacy.js
  36. 626 609
      vendor/thinkcmf/cmf-app/src/admin/controller/MarketController.php
  37. 180 0
      vendor/thinkcmf/cmf-app/src/admin/controller/PicController.php
  38. 1 1
      vendor/thinkcmf/cmf-app/src/admin/controller/PublicController.php
  39. 29 0
      vendor/thinkcmf/cmf-app/src/admin/validate/PortalPostValidate.php
  40. 2 0
      vendor/thinkcmf/cmf/src/lang/zh-cn.php

+ 79 - 0
app/api/controller/IndexController.php

@@ -4,14 +4,93 @@
  * @author wesmiler
  */
 namespace app\api\controller;
+use app\admin\model\SlideItemModel;
 use app\portal\model\PortalPostModel;
 use app\weixin\model\Member;
 use app\weixin\service\Article;
 use app\weixin\model\Wechat;
 use app\weixin\service\PRedis;
 use cmf\controller\HomeBaseController;
+use think\db\Query;
+use function AlibabaCloud\Client\value;
+
 class IndexController extends HomeBaseController
 {
+    /**
+     * 获取轮播图
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     */
+    public function getBanners(){
+        $cacheKey = "cache:banners:index";
+        $datas = PRedis::get($cacheKey);
+        if($datas){
+            showJson(1005, 1001, $datas);
+        }
+
+        $datas = SlideItemModel::where(['slide_id'=>1, 'status'=>1])
+                ->field('id,title,image,url')
+                ->order('list_order asc,id asc')
+                ->select();
+        $datas = $datas? $datas->toArray() : [];
+        if($datas){
+            foreach ($datas as &$v){
+                $v['image'] = $v['image']? cmf_get_image_preview_url($v['image']) : '';
+            }
+            unset($v);
+
+            PRedis::set($cacheKey, $datas, rand(10, 300));
+        }
+
+        showJson(1005, 1001, $datas);
+    }
+
+    /**
+     * 图文
+     * @throws \think\exception\DbException
+     */
+    public function getPicList(){
+        $page = input('page', 1);
+        $type = input('type', 1);
+        $pageSize = input('pageSize', 1);
+        $cacheKey = "cache:pics:index:{$type}_{$page}_{$pageSize}";
+        $datas = PRedis::get($cacheKey);
+        if($datas){
+            showJson(1005, 1001, $datas);
+        }
+
+        $datas = PortalPostModel::alias('p')
+            ->leftJoin('sg_user u','u.id=p.user_id')
+            ->where(['p.post_status'=>1,'p.post_type'=>3])
+            ->where(function (Query $query) use ($type) {
+                if($type){
+                    $query->where('p.type', $type);
+                }
+
+            })
+            ->field('p.id,p.post_title,p.post_type,p.type,p.user_id,p.published_time,p.post_excerpt,p.thumbnail,p.albums,p.post_status,u.user_nickname,u.avatar')
+            ->order("p.is_top DESC,p.published_time DESC")
+            ->paginate($pageSize)
+            ->each(function($item, $k){
+                $albums = isset($item['albums']) && $item['albums']? explode(',', $item['albums']) : [];
+                foreach ($albums as &$v){
+                    $v = $v? cmf_get_image_preview_url($v) : '';
+                }
+                unset($v);
+
+                $item['avatar'] = $item['avatar']? cmf_get_image_preview_url($item['avatar']) : '';
+                $item['published_time_text'] = $item['published_time']? date('Y-m-d H:i:s',$item['published_time']) : '';
+                $item['albums'] = $albums;
+                return $item;
+            });
+
+        if($datas){
+            PRedis::set($cacheKey, $datas, rand(10, 30));
+        }
+
+        showJson(1005, 1001, $datas);
+    }
 
     /**
      * 获取JSSDK参数

+ 14 - 4
app/api/controller/MemberController.php

@@ -1561,25 +1561,34 @@ class MemberController extends BaseController
         $this->checkUser();
 
         $mealId = input('mealId', 0);
-        $mealInfo = Meals::where(['status' => 1, 'id' => $mealId])->field('id,name,time,price')->find();
+        $mealInfo = Meals::where(['status' => 1, 'id' => $mealId])->field('id,name,time,price,num')->find();
         if (empty($mealId) || empty($mealInfo)) {
             showJson(1004, 7001);
         }
         $mealTime = isset($mealInfo['time']) ? $mealInfo['time'] : 0;
         $mealPrice = isset($mealInfo['price']) ? $mealInfo['price'] : 0;
+        $mealNum = isset($mealInfo['num']) ? $mealInfo['num'] : 0;
         if (empty($mealTime)) {
             showJson(1004, 7002);
         }
         if (empty($mealPrice)) {
             showJson(1004, 7003);
         }
-
+        if ($mealNum<=0) {
+            showJson(1004, 7006);
+        }
         $orderSn = makeTradeNo('VP', $this->userId);
-        $memberInfo = Member::where(['id' => $this->userId])->field('openid,vip_auth,vip_expire')->find();
+        $memberInfo = Member::where(['id' => $this->userId])->field('openid,vip_auth,vip_expire,vip_num')->find();
         $vipAuth = isset($memberInfo['vip_auth']) ? intval($memberInfo['vip_auth']) : 0;
         $vipExpire = isset($memberInfo['vip_expire']) ? intval($memberInfo['vip_expire']) : 0;
+        $vipNum = isset($memberInfo['vip_num']) ? intval($memberInfo['vip_num']) : 0;
         $openid = isset($memberInfo['openid']) ? $memberInfo['openid'] : '';
         $expireText = $vipExpire > time() && $vipAuth ? ',原先' . date('Y-m-d H:i:s', $vipExpire) . '到期' : ',原先未开通';
+
+        if($vipExpire>time() && $vipNum>0){
+            showJson(1004, '您还有'.$vipNum.'次申请微信机会未使用完,请先使用完再续购');
+        }
+
         $log = [
             'order_sn' => $orderSn,
             'money' => $mealTime,
@@ -1587,7 +1596,8 @@ class MemberController extends BaseController
             'pay_money' => $mealPrice,
             'user_id' => $this->userId,
             'balance' => 0,
-            'remark' => "购买VIP套餐[ID:{$mealId}]:会员续费{$mealTime}个月{$expireText}",
+            'use_num' => $mealNum,
+            'remark' => "购买VIP套餐[ID:{$mealId}]:会员续费{$mealTime}个月可使用{$mealNum}次{$expireText}",
             'created_at' => date('Y-m-d H:i:s')
         ];
 

+ 8 - 0
app/weixin/controller/IndexController.php

@@ -52,6 +52,14 @@ class IndexController extends BaseController
         return $this->fetch('entry1');
     }
 
+    /**
+     * 图文
+     * @return mixed|string
+     */
+    public function pic(){
+        return $this->fetch();
+    }
+
 }
 
 

+ 1 - 1
app/weixin/model/Meals.php

@@ -28,7 +28,7 @@ class Meals extends Model
             $where['type'] = $type;
         }
         $dataList = Meals::where($where)
-            ->field('id,name,price,type,time')
+            ->field('id,name,price,num,type,time')
             ->select()
             ->each(function($item){
                 $item['price'] = round($item['price'], 2);

+ 30 - 6
app/weixin/model/Member.php

@@ -1431,7 +1431,7 @@ class Member extends Model
             ->field('id,openid,user_nickname,sex,real_name,is_reg_profile')
             ->find();
         $memberInfo = Member::where(['id' => $userId, 'user_type' => 2, 'user_status' => 1])
-            ->field('id,openid,user_nickname,real_name,sex,is_reg_profile,redheart,vip_auth,vip_expire')
+            ->field('id,openid,user_nickname,real_name,sex,is_reg_profile,redheart,vip_auth,vip_expire,vip_num')
             ->find();
         if (empty($contactInfo) || empty($memberInfo)) {
             return false;
@@ -1472,6 +1472,7 @@ class Member extends Model
         // 会员不需要收录费
         $vipAuth = isset($memberInfo['vip_auth']) ? intval($memberInfo['vip_auth']) : 0;
         $vipExpire = isset($memberInfo['vip_expire']) ? intval($memberInfo['vip_expire']) : 0;
+        $vipNum = isset($memberInfo['vip_num']) ? intval($memberInfo['vip_num']) : 0;
         $contactPay = $vipAuth && $vipExpire >= time() ? 0 : $contactPay;
         if ($contactPay > 0) {
             $redheart = isset($memberInfo['redheart']) ? intval($memberInfo['redheart']) : 0;
@@ -1496,7 +1497,7 @@ class Member extends Model
                 'change_type' => 2,
                 'money' => $contactPay,
                 'balance' => $redheart,
-                'remark' => "认识【{$cNickname}】请求成功,扣除{$contactPay}个爱心",
+                'remark' => "认识【{$cNickname}】请求成功,".($contactPay>0?"扣除{$contactPay}个爱心":'VIP会员使用1次机会'),
                 'created_at' => date('Y-m-d H:i:s'),
                 'status' => 2,
             ];
@@ -1506,6 +1507,18 @@ class Member extends Model
                 return false;
             }
         }
+        // 扣除会员微信申请次数
+        else{
+            if ($vipNum < 1 || $vipExpire < time()) {
+                Db::rollback();
+                return 2148;
+            }
+            $memberData = ['vip_num' => ($vipNum - 1), 'updated_at' => date('Y-m-d H:i:s')];
+            if (!Member::where(['id' => $userId])->update($memberData)) {
+                Db::rollback();
+                return false;
+            }
+        }
 
         $data = [
             'user_id' => $userId,
@@ -1559,7 +1572,7 @@ class Member extends Model
             }
 
             // 操作日志
-            UserLog::saveLog(['user_id' => $userId, 'type' => 4, 'content' => "申请用户{$cNickname}微信"]);
+            UserLog::saveLog(['user_id' => $userId, 'type' => 4, 'content' => ($contactPay>0?'花费'.$contactPay.'爱心':'使用一次机会')."申请用户{$cNickname}微信"]);
 
             return ['id' => $cid];
         } else {
@@ -1614,12 +1627,13 @@ class Member extends Model
             return 1011;
         }
 
-        $field = 'm.redheart,m.user_nickname,m.real_name,m.openid,up.wechat_code,up.qq';
+        $field = 'm.redheart,m.user_nickname,m.real_name,m.openid,up.wechat_code,m.vip_num,up.qq';
         $contactUserInfo = Member::getHomeInfo($contactUid, $field, 6);
         $cOpenid = isset($contactUserInfo['openid']) ? $contactUserInfo['openid'] : '';
         $cNickname = isset($contactUserInfo['user_nickname']) ? $contactUserInfo['user_nickname'] : '';
         $redheart = isset($contactUserInfo['redheart']) ? intval($contactUserInfo['redheart']) : 0;
         $contactPay = isset($contactData['cost_redheart']) ? intval($contactData['cost_redheart']) : 0;
+        $vipNum = isset($contactUserInfo['vip_num']) ? intval($contactUserInfo['vip_num']) : 0;
         if (empty($contactUserInfo)) {
             Db::rollback();
             return 1017;
@@ -1665,6 +1679,14 @@ class Member extends Model
                 return false;
             }
         }
+        // 退还申请次数
+        else if($checkStatus == 3 || $checkStatus == 4){
+            $memberData = ['vip_num' => $vipNum+1, 'updated_at' => date('Y-m-d H:i:s')];
+            if (!Member::where(['id' => $contactUid])->update($memberData)) {
+                Db::rollback();
+                return 2031;
+            }
+        }
 
         Db::commit();
 
@@ -1727,8 +1749,9 @@ class Member extends Model
                 // 是否扣除爱心
 
                 $remark = $applyRefundPay ? "扣除{$applyRefundPay}颗后已经原路退回" : "已经全部原路退回";
+                $remark = $contactPay<=0? "您的微信申请次数已返还": "您支付的爱心{$remark}";
                 $params = [
-                    'title' => "Soory!亲亲!{$nickname}拒绝了您的加微信申请,您支付的爱心{$remark}。别灰心哦,您一定会遇到更好的另一半~\n\n申请时间:\t{$dateTime}\n查看状态:\t{$read}",
+                    'title' => "Soory!亲亲!{$nickname}拒绝了您的加微信申请,{$remark}。别灰心哦,您一定会遇到更好的另一半~\n\n申请时间:\t{$dateTime}\n查看状态:\t{$read}",
                     'remark' => "天涯何处无芳草,去看看其他的异性吧!",
                     'type' => 'contact_confirm',
                     'keywords' => [
@@ -1746,8 +1769,9 @@ class Member extends Model
             } else {
                 // 是否已读
                 $remark = $isRead && $applyRefundPay ? "扣除{$applyRefundPay}颗后已经原路退回" : "已经全部原路退回";
+                $remark = $contactPay<=0? "您的微信申请次数已返还": "您被扣除的爱心{$remark}";
                 $params = [
-                    'title' => "您好亲亲,非常抱歉{$nickname}未及时反馈而导致申请超时,您被扣除的爱心{$remark}。您还可以请客服帮您牵线增加成功率哦~\n\n申请时间:\t{$dateTime}\n查看状态:\t{$read}",
+                    'title' => "您好亲亲,非常抱歉{$nickname}未及时反馈而导致申请超时,{$remark}。您还可以请客服帮您牵线增加成功率哦~\n\n申请时间:\t{$dateTime}\n查看状态:\t{$read}",
                     'remark' => "当你有勇气主动时,其实已经打败了那些看似优秀的人,遇见不易让客服牵线试试吧!",
                     'type' => 'contact_confirm',
                     'keywords' => [

+ 9 - 6
app/weixin/model/Payment.php

@@ -326,7 +326,7 @@ class Payment
         // 验证订单是否存在
         $where = ['order_sn' => $outTradeNo, 'type'=> 4];
         $orderInfo = db('user_recharge_log')
-            ->field('money,pay_money,user_id,order_sn,status')
+            ->field('money,pay_money,user_id,use_num,order_sn,status')
             ->where($where)
             ->find();
         if(empty($orderInfo)){
@@ -363,6 +363,7 @@ class Payment
 
             $userId = isset($orderInfo['user_id']) ? $orderInfo['user_id'] : 0;
             $num = isset($orderInfo['money']) ? $orderInfo['money'] : 0;
+            $mealNum = isset($orderInfo['use_num']) ? intval($orderInfo['use_num']) : 0;
 
             $updateData = [
                 'pay_money' => $orderPayMoney,
@@ -380,11 +381,13 @@ class Payment
             }
 
             // 更新账户
+            $vipNum = 0;
             if ($userId && $num > 0) {
                 $dateTime = strtotime(date('Y-m-d 00:00:00'));
-                $memberInfo = Member::where(['id' => $userId])->field('openid,vip_auth,user_nickname,vip_expire')->find();
+                $memberInfo = Member::where(['id' => $userId])->field('openid,vip_auth,user_nickname,vip_expire,vip_num')->find();
                 $vipAuth = isset($memberInfo['vip_auth']) ? intval($memberInfo['vip_auth']) : 0;
                 $vipExpire = isset($memberInfo['vip_expire']) && !empty($memberInfo['vip_expire'])? intval($memberInfo['vip_expire']) : 0;
+                $vipNum = isset($memberInfo['vip_num']) && !empty($memberInfo['vip_num'])? intval($memberInfo['vip_num']) : 0;
                 $newVipExpire = $vipExpire>$dateTime && $vipAuth? $vipExpire + $num*30*24*3600+86400 : $dateTime+$num*30*24*3600+86400;
                 if($newVipExpire - time() > 200*24*3600){
                     $siteInfo = cmf_get_site_info();
@@ -410,7 +413,7 @@ class Payment
                         Wechat::sendTplMsg($customOpenid, $params);
                     }
                 }
-                $data = ['vip_time'=> date('Y-m-d H:i:s'), 'vip_auth'=> 1, 'vip_expire' => $newVipExpire];
+                $data = ['vip_time'=> date('Y-m-d H:i:s'), 'vip_auth'=> 1, 'vip_expire' => $newVipExpire,'vip_num'=> $mealNum];
                 PRedis::set("accounts:vipUpdate:{$userId}_".$outTradeNo, ['data'=> $data,'info'=> $memberInfo,'new'=> $newVipExpire], 20 * 24 * 3600);   
                 if (!Member::where(['id' => $userId])->update($data)) {
                     db()->rollback();
@@ -425,7 +428,7 @@ class Payment
                     'money' => $orderPayMoney,
                     'balance' => 0,
                     'created_at' => date('Y-m-d H:i:s'),
-                    'remark' => "购买VIP:单号[{$outTradeNo}],时长{$num}个月,支付金额" . $orderPayMoney,
+                    'remark' => "购买VIP:单号[{$outTradeNo}],时长{$num}个月可申请{$mealNum}次微信,支付金额" . $orderPayMoney,
                 ];
                 PRedis::set('payments:vip:account_' . $outTradeNo, ['notify' => $notifyData, 'log' => $accountData,'user'=> $memberInfo], 600);
                 db('account_log')->insertGetId($accountData);
@@ -435,7 +438,7 @@ class Payment
                 if($openid) {
                     $monthTxt = $num ==6? '半年' : ($num == 12? '一年' : $num.'个月');
                     $params = [
-                        'title' => "恭喜您购买{$monthTxt}VIP成功\n\n到期时间:\t".date('Y.m.d',$newVipExpire).'到期',
+                        'title' => "恭喜您购买{$monthTxt}VIP成功\n\n到期时间:\t".date('Y.m.d',$newVipExpire).'到期'."\n使用次数:\t".$mealNum.'次',
                         'remark' => "感谢您的使用,点击详情查看购买明细",
                         'type' => 'pay',
                         'keywords' => [
@@ -459,7 +462,7 @@ class Payment
             db()->commit();
 
             // 操作日志
-            UserLog::saveLog(['user_id' => $userId, 'type' => 3, 'content' => "购买VIP:{$num}个月,支付金额:{$orderPayMoney},原到期时间:{$vipExpire}"]);
+            UserLog::saveLog(['user_id' => $userId, 'type' => 3, 'content' => "购买VIP:{$num}个月可申请{$mealNum}次微信,支付金额:{$orderPayMoney},原剩余{$vipNum}次,原到期时间:{$vipExpire}"]);
 
             // 分销收益结算
             $inviteInfo = MemberModel::getInviteInfo($userId);

+ 11 - 9
app/weixin/service/Award.php

@@ -101,18 +101,10 @@ class Award
         // 分销参数配置
         $cacheKey = "market:award:u_{$userId}_{$sourceUid}_{$type}";
         $logData = ['money' => $money, 'sourceUid' => $sourceUid, 'userId'=> $userId];
-        $marketConfig = Market::where(['id' => $type, 'status' => 1])->find();
-        $marketType = isset($marketConfig['type']) ? $marketConfig['type'] : 2;
-        $logData['config'] = $marketConfig;
-        if (empty($marketConfig)) {
-            PRedis::set("{$cacheKey}:error_config", $logData, 7200);
-            return false;
-        }
 
         // 验证上级用户是否符合奖励条件
-
         $where = ['id' => $userId, 'agent_type' => 1, 'agent_status' => 1];
-        $field = 'id,openid,user_nickname,parent_id,user_login,balance,create_time';
+        $field = 'id,openid,user_nickname,parent_id,user_login,shop_type,balance,create_time';
         $userInfo = Member::getInfo($where, $field);
         $nickname = isset($userInfo['user_nickname']) ? trim($userInfo['user_nickname']) : '';
         $userLogin = isset($userInfo['user_login']) ? trim($userInfo['user_login']) : '';
@@ -125,6 +117,16 @@ class Award
             return false;
         }
 
+        // 按类型获取分销配置
+        $shopType = isset($userInfo['shop_type'])? $userInfo['shop_type'] : 0;
+        $marketConfig = Market::where(['id' => $type, 'status' => 1,'shop_type'=> $shopType])->find();
+        $marketType = isset($marketConfig['type']) ? $marketConfig['type'] : 2;
+        $logData['config'] = $marketConfig;
+        if (empty($marketConfig)) {
+            PRedis::set("{$cacheKey}:error_config", $logData, 7200);
+            return false;
+        }
+
         // 收益原始来源用户
         $sWhere = ['id' => $sourceUid, 'user_type' => 2];
         $sourceInfo = Member::getInfo($sWhere, $field);

+ 1 - 0
data/lang/admin_menu.php

@@ -59,6 +59,7 @@ return array (
   'ADMIN_NAVMENU_EDITPOST' => '编辑导航菜单提交保存',
   'ADMIN_NAVMENU_INDEX' => '导航菜单',
   'ADMIN_NAVMENU_LISTORDER' => '导航菜单排序',
+  'ADMIN_PIC_INDEX' => '图文管理',
   'ADMIN_PLUGIN_DEFAULT' => '插件中心',
   'ADMIN_PLUGIN_INDEX' => '插件列表',
   'ADMIN_PLUGIN_INSTALL' => '插件安装',

+ 1 - 1
public/themes/admin_simpleboot3/admin/activity/edit.html

@@ -19,7 +19,7 @@
         <div class="row">
             <div class="col-md-9">
                 <table class="table table-bordered">
-                   
+
                     <tr>
                         <th style="width:120px;">活动标题<span class="form-required">*</span></th>
                         <td>

+ 17 - 17
public/themes/admin_simpleboot3/admin/market/marketexamine.html

@@ -3,20 +3,20 @@
 <body>
 <div class="wrap js-check-wrap">
     <ul class="nav nav-tabs">
-        <li <if condition="params.type==0">class="active"</if> href="{:url('Market/marketexamine',array('u'=>1,'type'=>0))}">
-        <a> 推广用户待审核</a>
+        <li <if condition="$params.type==0">class="active"</if>>
+        <a href="{:url('Market/marketexamine',array('u'=>1,'type'=>0))}"> 推广用户待审核</a>
         </li>
-        <li <if condition="params.type==1">class="active"</if> href="{:url('Market/marketexamine',array('u'=>1,'type'=>1))}">
-            <a> 商户用户待审核</a>
+        <li <if condition="$params.type==1">class="active"</if>>
+            <a href="{:url('Market/marketexamine',array('u'=>1,'type'=>1))}"> 商户用户待审核</a>
         </li>
-        <li <if condition="params.type==2">class="active"</if>  href="{:url('Market/marketexamine',array('u'=>1,'type'=>1))}">
-            <a> 机构用户待审核</a>
+        <li <if condition="$params.type==2">class="active"</if>>
+            <a href="{:url('Market/marketexamine',array('u'=>1,'type'=>2))}"> 机构用户待审核</a>
         </li>
 
     </ul>
 
     
-      <form class="well form-inline margin-top-20" method="post" action="{:url('Market/marketexamine',array('u'=>1))}">
+      <form class="well form-inline margin-top-20" method="post" action="{:url('Market/marketexamine',array('u'=>1,'type'=>$params.type))}">
     
         <!-- 用户ID:
         <input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
@@ -28,35 +28,35 @@
         <input type="submit" class="btn btn-primary"  value="搜索"/>
           
           <if condition="$Request.action eq 'custom' || $Request.param.u eq 2">
-        <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>2))}">清空</a>
+        <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>2,'type'=>$params.type))}">清空</a>
         
          <elseif condition="$Request.action eq 'userban' || $Request.param.u eq 3">
-        <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>3))}">清空</a>
+        <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>3,'type'=>$params.type))}">清空</a>
 
         <elseif condition="$Request.action eq 'screen' || $Request.param.u eq 4">
           
-         <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>4))}">清空</a>
+         <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>4,'type'=>$params.type))}">清空</a>
 
         <elseif condition="$Request.action eq 'userlogout' || $Request.param.u eq 5">
           
-         <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>5))}">清空</a>
+         <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>5,'type'=>$params.type))}">清空</a>
 
          <else/>
-        <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>1))}">清空</a>
+        <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>1,'type'=>$params.type))}">清空</a>
         </if>
 
         <if condition="$Request.action eq 'custom' || $Request.param.u eq 2">
-        <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>2))}">导出</a>
+        <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>2,'type'=>$params.type))}">导出</a>
         
         <elseif condition="$Request.action eq 'userban' || $Request.param.u eq 3">
-             <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>3))}">导出</a>
+             <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>3,'type'=>$params.type))}">导出</a>
         <elseif condition="$Request.action eq 'screen' || $Request.param.u eq 4">     
-             <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>4))}">导出</a>
+             <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>4,'type'=>$params.type))}">导出</a>
        <elseif condition="$Request.action eq 'userlogout' || $Request.param.u eq 5">     
-             <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>5))}">导出</a>
+             <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>5,'type'=>$params.type))}">导出</a>
 
         <else/>
-         <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>1))}">导出</a>
+         <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>1,'type'=>$params.type))}">导出</a>
        </if>
 
         <a class="btn btn-danger" onclick="doDelete()">批量删除</a>

+ 13 - 2
public/themes/admin_simpleboot3/admin/market/marketset.html

@@ -4,8 +4,19 @@
 <div class="wrap js-check-wrap">
 
     <ul class="nav nav-tabs">
-       
-        <li><a href="{:url('Market/marketsetlist')}">分销设置列表</a></li>
+        <if condition="$market.shop_type==0">
+        <li>
+        <a href="{:url('Market/marketsetlist',array('type'=>0))}"> 推广分销设置</a>
+        </li>
+        <elseif condition="$market.shop_type==1">
+        <li>
+        <a href="{:url('Market/marketsetlist',array('type'=>1))}"> 商户分销设置</a>
+        </li>
+        <elseif condition="$market.shop_type==2">
+        <li>
+        <a href="{:url('Market/marketsetlist',array('type'=>2))}"> 机构分销设置</a>
+        </li>
+        </if>
         <if condition="$Request.param.id neq ''">
         <li  class="active"><a href="#">编辑分销设置</a></li>
          <else/>

+ 9 - 1
public/themes/admin_simpleboot3/admin/market/marketsetlist.html

@@ -3,7 +3,15 @@
 <body>
 <div class="wrap js-check-wrap">
      <ul class="nav nav-tabs">
-        <li class="active"><a href="{:url('Market/showmarklist')}">分销设置列表</a></li>
+         <li <if condition="$params.type==0">class="active"</if>>
+         <a href="{:url('Market/marketsetlist',array('type'=>0))}"> 推广分销设置</a>
+         </li>
+         <li <if condition="$params.type==1">class="active"</if>>
+         <a href="{:url('Market/marketsetlist',array('type'=>1))}"> 商户分销设置</a>
+         </li>
+         <li <if condition="$params.type==2">class="active"</if>>
+         <a href="{:url('Market/marketsetlist',array('type'=>2))}"> 机构分销设置</a>
+         </li>
         <!-- <li><a href="{:url('Market/marketset')}">添加分销设置</a></li> -->
     </ul>
     <form class="well form-inline margin-top-20" method="post" action="{:url('AdminPage/index')}">

+ 43 - 19
public/themes/admin_simpleboot3/admin/market/marketuser.html

@@ -3,19 +3,43 @@
 <body>
 <div class="wrap js-check-wrap">
     <ul class="nav nav-tabs">
-        <li class="active">
-          <if condition="$Request.action eq 'marketuser' ">
-           <a> 分销用户</a>
-           <elseif condition="$Request.action eq 'marketoneuser' ">
-            <a> 一级分销用户</a>
-           <elseif condition="$Request.action eq 'markettwouser' ">
-            <a> 二级分销用户</a>
-         </if>
+        <li <if condition="$params.type==0">class="active"</if>>
+        <a href="{:url('Market/marketUser',array('u'=>1,'type'=>0))}">
+            <if condition="$Request.action eq 'marketuser' ">
+                分销用户列表
+            <elseif condition="$Request.action eq 'marketoneuser' ">
+                分销用户列表
+            <elseif condition="$Request.action eq 'markettwouser' ">
+                分销用户列表
+            </if>
+        </a>
+        </li>
+        <li <if condition="$params.type==1">class="active"</if>>
+        <a href="{:url('Market/marketUser',array('u'=>1,'type'=>1))}">
+            <if condition="$Request.action eq 'marketuser' ">
+                商户用户列表
+            <elseif condition="$Request.action eq 'marketoneuser' ">
+                商户用户列表
+            <elseif condition="$Request.action eq 'markettwouser' ">
+                商户用户列表
+            </if>
+        </a>
+        </li>
+        <li <if condition="$params.type==2">class="active"</if>>
+        <a href="{:url('Market/marketUser',array('u'=>1,'type'=>2))}">
+            <if condition="$Request.action eq 'marketuser' ">
+                机构用户列表
+            <elseif condition="$Request.action eq 'marketoneuser' ">
+                机构用户列表
+            <elseif condition="$Request.action eq 'markettwouser' ">
+                机构用户列表
+            </if>
+        </a>
         </li>
     </ul>
 
     
-      <form class="well form-inline margin-top-20" method="post" action="{:url('user/adminIndex/index',array('u'=>1))}">
+      <form class="well form-inline margin-top-20" method="post" action="{:url('user/adminIndex/index',array('u'=>1,'type'=>$params.type))}">
     
         <!-- 用户ID:
         <input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
@@ -27,35 +51,35 @@
         <input type="submit" class="btn btn-primary"  value="搜索"/>
           
           <if condition="$Request.action eq 'custom' || $Request.param.u eq 2">
-        <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>2))}">清空</a>
+        <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>2,'type'=>$params.type))}">清空</a>
         
          <elseif condition="$Request.action eq 'userban' || $Request.param.u eq 3">
-        <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>3))}">清空</a>
+        <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>3,'type'=>$params.type))}">清空</a>
 
         <elseif condition="$Request.action eq 'screen' || $Request.param.u eq 4">
           
-         <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>4))}">清空</a>
+         <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>4,'type'=>$params.type))}">清空</a>
 
         <elseif condition="$Request.action eq 'userlogout' || $Request.param.u eq 5">
           
-         <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>5))}">清空</a>
+         <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>5,'type'=>$params.type))}">清空</a>
 
          <else/>
-        <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>1))}">清空</a>
+        <a class="btn btn-default" href="{:url('user/adminIndex/index',array('u'=>1,'type'=>$params.type))}">清空</a>
         </if>
 
         <if condition="$Request.action eq 'custom' || $Request.param.u eq 2">
-        <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>2))}">导出</a>
+        <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>2,'type'=>$params.type))}">导出</a>
         
         <elseif condition="$Request.action eq 'userban' || $Request.param.u eq 3">
-             <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>3))}">导出</a>
+             <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>3,'type'=>$params.type))}">导出</a>
         <elseif condition="$Request.action eq 'screen' || $Request.param.u eq 4">     
-             <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>4))}">导出</a>
+             <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>4,'type'=>$params.type))}">导出</a>
        <elseif condition="$Request.action eq 'userlogout' || $Request.param.u eq 5">     
-             <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>5))}">导出</a>
+             <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>5,'type'=>$params.type))}">导出</a>
 
         <else/>
-         <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>1))}">导出</a>
+         <a class="btn btn-warning" href="{:url('user/adminIndex/export',array('uid'=>$Request.param.uid,'keyword'=>$Request.param.keyword,'u'=>1,'type'=>$params.type))}">导出</a>
        </if>
 
         <a class="btn btn-danger" onclick="doDelete()">批量删除</a>

+ 177 - 0
public/themes/admin_simpleboot3/admin/pic/add.html

@@ -0,0 +1,177 @@
+<include file="public@header"/>
+<style type="text/css">
+    .pic-list li {
+        margin-bottom: 5px;
+    }
+</style>
+<script type="text/html" id="photos-item-tpl">
+    <li id="saved-image{id}">
+        <input id="photo-{id}" type="hidden" name="photo_urls[]" value="{filepath}">
+        <input class="form-control" id="photo-{id}-name" type="text" name="photo_names[]" value="{name}"
+               style="width: 200px;" title="图片名称">
+        <img id="photo-{id}-preview" src="{url}" style="height:36px;width: 36px;"
+             onclick="imagePreviewDialog(this.src);">
+        <a href="javascript:uploadOneImage('图片上传','#photo-{id}');">替换</a>
+        <a href="javascript:(function(){$('#saved-image{id}').remove();})();">移除</a>
+    </li>
+</script>
+<script type="text/html" id="files-item-tpl">
+    <li id="saved-file{id}">
+        <input id="file-{id}" type="hidden" name="file_urls[]" value="{filepath}">
+        <input class="form-control" id="file-{id}-name" type="text" name="file_names[]" value="{name}"
+               style="width: 200px;" title="文件名称">
+        <a id="file-{id}-preview" href="{preview_url}" target="_blank">下载</a>
+        <a href="javascript:uploadOne('文件上传','#file-{id}','file');">替换</a>
+        <a href="javascript:(function(){$('#saved-file{id}').remove();})();">移除</a>
+    </li>
+</script>
+</head>
+<body>
+<div class="wrap js-check-wrap">
+    <ul class="nav nav-tabs">
+        <li><a href="{:url('Pic/index')}">图文管理</a></li>
+        <li class="active"><a href="{:url('Pic/add')}">添加图文</a></li>
+    </ul>
+    <form action="{:url('Pic/addPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
+        <div class="row">
+            <div class="col-md-9">
+                <table class="table table-bordered">
+                    <tr>
+                        <th width="100">分类<span class="form-required">*</span></th>
+                        <td>
+                            <select class="form-control" name="post[type]" style="width: 140px;" onchange="select(this)">
+                                <option value='1'>我们恋爱了</option>
+                                <option value='2'>我们结婚了</option>
+                                <option value='3'>活动花絮</option>
+                            </select>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th>标题<span class="form-required">*</span></th>
+                        <td>
+                            <input class="form-control" type="text" name="post[post_title]"
+                                   id="title" required value="" placeholder="请输入标题"/>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th>摘要描述</th>
+                        <td>
+                            <textarea class="form-control" name="post[post_excerpt]" style="height: 50px;"
+                                      placeholder="请填写摘要"></textarea>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th><b>缩略图</b></th>
+                        <td>
+                            <div>
+                                <input type="hidden" name="post[thumbnail]" id="thumbnail" value="">
+                                <a href="javascript:uploadOneImage('图片上传','#thumbnail');">
+                                    <img src="__TMPL__/public/assets/images/default-thumbnail.png"
+                                         id="thumbnail-preview"
+                                         width="135" style="cursor: pointer"/>
+                                </a>
+                                <input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
+                            </div>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th>相册(6张以内)</th>
+                        <td>
+                            <ul id="photos" class="pic-list list-unstyled form-inline"></ul>
+                            <a href="javascript:uploadMultiImage('图片上传','#photos','photos-item-tpl');"
+                               class="btn btn-default btn-sm">选择图片</a>
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <th><b>发布时间</b></th>
+                        <td>
+                            <input class="form-control js-bootstrap-datetime" type="text" name="post[published_time]"
+                                   value="{:date('Y-m-d H:i:s',time())}">
+                        </td>
+                    </tr>
+                    <tr>
+                        <th>状态</th>
+                        <td>
+                            <div class="checkbox">
+                                <label>
+                                    <input type="checkbox" id="post-status-checkbox" name="post[post_status]" value="1">发布
+                                    <span id="post-status-error" style="color: red;display: none"></span>
+                                </label>
+                            </div>
+                        </td>
+                    </tr>
+                </table>
+                <hook name="portal_admin_article_edit_view_main"/>
+                <div class="form-group">
+                    <div class="col-sm-offset-2 col-sm-10">
+                        <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
+                        <a class="btn btn-default" href="{:url('Pic/index')}">{:lang('BACK')}</a>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </form>
+</div>
+<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
+<script type="text/javascript">
+    //编辑器路径定义
+    var editorURL = GV.WEB_ROOT;
+</script>
+<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
+<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
+<script type="text/javascript">
+    $(function () {
+
+        editorcontent = new baidu.editor.ui.Editor();
+        editorcontent.render('content');
+        try {
+            editorcontent.sync();
+        } catch (err) {
+        }
+
+        $('.btn-cancel-thumbnail').click(function () {
+            $('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
+            $('#thumbnail').val('');
+        });
+
+    });
+
+    function select(ele){
+        var type = $(ele).val();
+        var title = $("#title").val();
+        if(title == ''){
+            if(type==1){
+                $("#title").val('我们恋爱了');
+            }else if(type == 2){
+                $("#title").val('我们结婚了');
+            }else if(type == 3){
+                $("#title").val('活动花絮');
+            }
+        }
+    }
+
+    function doSelectCategory() {
+        var selectedCategoriesId = $('#js-categories-id-input').val();
+        openIframeLayer("{:url('AdminCategory/select')}?ids=" + selectedCategoriesId, '请选择分类', {
+            area: ['700px', '400px'],
+            btn: ['确定', '取消'],
+            yes: function (index, layero) {
+                //do something
+
+                var iframeWin          = window[layero.find('iframe')[0]['name']];
+                var selectedCategories = iframeWin.confirm();
+                if (selectedCategories.selectedCategoriesId.length == 0) {
+                    layer.msg('请选择分类');
+                    return;
+                }
+                $('#js-categories-id-input').val(selectedCategories.selectedCategoriesId.join(','));
+                $('#js-categories-name-input').val(selectedCategories.selectedCategoriesName.join(' '));
+                //console.log(layer.getFrameIndex(index));
+                layer.close(index); //如果设定了yes回调,需进行手工关闭
+            }
+        });
+    }
+</script>
+</body>
+</html>

+ 207 - 0
public/themes/admin_simpleboot3/admin/pic/edit.html

@@ -0,0 +1,207 @@
+<include file="public@header"/>
+<style type="text/css">
+    .pic-list li {
+        margin-bottom: 5px;
+    }
+</style>
+<script type="text/html" id="photos-item-tpl">
+    <li id="saved-image{id}">
+        <input id="photo-{id}" type="hidden" name="photo_urls[]" value="{filepath}">
+        <input class="form-control" id="photo-{id}-name" type="text" name="photo_names[]" value="{name}"
+               style="width: 200px;" title="图片名称">
+        <img id="photo-{id}-preview" src="{url}" style="height:36px;width: 36px;"
+             onclick="imagePreviewDialog(this.src);">
+        <a href="javascript:uploadOneImage('图片上传','#photo-{id}');">替换</a>
+        <a href="javascript:(function(){$('#saved-image{id}').remove();})();">移除</a>
+    </li>
+</script>
+<script type="text/html" id="files-item-tpl">
+    <li id="saved-file{id}">
+        <input id="file-{id}" type="hidden" name="file_urls[]" value="{filepath}">
+        <input class="form-control" id="file-{id}-name" type="text" name="file_names[]" value="{name}"
+               style="width: 200px;" title="文件名称">
+        <a id="file-{id}-preview" href="{preview_url}" target="_blank">下载</a>
+        <a href="javascript:uploadOne('文件上传','#file-{id}','file');">替换</a>
+        <a href="javascript:(function(){$('#saved-file{id}').remove();})();">移除</a>
+    </li>
+</script>
+</head>
+<body>
+<div class="wrap js-check-wrap">
+    <ul class="nav nav-tabs">
+        <li><a href="{:url('Pic/index')}">图文管理</a></li>
+        <li class="active"><a>编辑图文</a></li>
+    </ul>
+    <form action="{:url('Pic/editPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
+        <div class="row">
+            <div class="col-md-9">
+                <table class="table table-bordered">
+                    <tr>
+                        <th width="100">分类<span class="form-required">*</span></th>
+                        <td>
+                            <select class="form-control" name="post[type]" style="width: 140px;">
+                                <option value='1' <if condition="$info.type eq 1">selected</if>>我们恋爱了</option>
+                                <option value='2' <if condition="$info.type eq 2">selected</if>>我们结婚了</option>
+                                <option value='3' <if condition="$info.type eq 3">selected</if>>活动花絮</option>
+                            </select>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th>标题<span class="form-required">*</span></th>
+                        <td>
+                            <input id="post-id" type="hidden" name="post[id]" value="{$info.id}">
+                            <input class="form-control" type="text" name="post[post_title]"
+                                   id="title" required value="{$info.post_title}" placeholder="请输入标题"/>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th>摘要描述</th>
+                        <td>
+                            <textarea class="form-control" name="post[post_excerpt]" style="height: 50px;"
+                                      placeholder="请填写摘要">{$info.post_excerpt}</textarea>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th><b>缩略图</b></th>
+                        <td>
+                            <div>
+                                <input type="hidden" name="post[thumbnail]" id="thumbnail" value="">
+                                <a href="javascript:uploadOneImage('图片上传','#thumbnail');">
+                                    <if condition="empty($info.thumbnail)">
+                                        <img src="__TMPL__/public/assets/images/default-thumbnail.png"
+                                             id="thumbnail-preview"
+                                             width="135" style="cursor: pointer"/>
+                                        <else/>
+                                        <img src="{:cmf_get_image_preview_url($info.thumbnail)}"
+                                             id="thumbnail-preview"
+                                             width="135" style="cursor: pointer"/>
+                                    </if>
+                                </a>
+                                <input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
+                            </div>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th>相册(6张以内)</th>
+                        <td>
+                            <ul id="photos" class="pic-list list-unstyled form-inline">
+                                <notempty name="info.albums">
+                                    <foreach name="info.albums" item="vo">
+                                        <php>$img_url=cmf_get_image_preview_url($vo);</php>
+                                        <li id="saved-image{$key}">
+                                            <input id="photo-{$key}" type="hidden" name="photo_urls[]"
+                                                   value="{$vo}">
+                                            <input class="form-control" id="photo-{$key}-name" type="text"
+                                                   name="photo_names[]"
+                                                   value="{$vo|default=''}" style="width: 200px;" title="图片名称">
+                                            <img id="photo-{$key}-preview"
+                                                 src="{:cmf_get_image_preview_url($vo)}"
+                                                 style="height:36px;width: 36px;"
+                                                 onclick="parent.imagePreviewDialog(this.src);">
+                                            <a href="javascript:uploadOneImage('图片上传','#photo-{$key}');">替换</a>
+                                            <a href="javascript:(function(){$('#saved-image{$key}').remove();})();">移除</a>
+                                        </li>
+                                    </foreach>
+                                </notempty>
+                            </ul>
+                            <a href="javascript:uploadMultiImage('图片上传','#photos','photos-item-tpl');"
+                               class="btn btn-default btn-sm">选择图片</a>
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <th><b>发布时间</b></th>
+                        <td>
+                            <input class="form-control js-bootstrap-datetime" type="text" name="post[published_time]"
+                                   value="{:date('Y-m-d H:i:s',$info.published_time)}">
+                        </td>
+                    </tr>
+                    <tr>
+                        <th>状态</th>
+                        <php>
+                            $status_yes=$info['post_status']==1?"checked":"";
+                            $is_top_yes=$info['is_top']==1?"checked":"";
+                        </php>
+                        <td>
+                            <div class="checkbox">
+                                <label>
+                                    <input type="checkbox" id="post-status-checkbox" name="post[post_status]" value="1"
+                                           {$status_yes}>发布
+                                    <span id="post-status-error" style="color: red;display: none"></span>
+                                </label>
+                            </div>
+                        </td>
+                    </tr>
+                </table>
+                <hook name="portal_admin_article_edit_view_main"/>
+                <div class="form-group">
+                    <div class="col-sm-offset-2 col-sm-10">
+                        <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
+                        <a class="btn btn-default" href="{:url('Pic/index')}">{:lang('BACK')}</a>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </form>
+</div>
+<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
+<script type="text/javascript">
+    //编辑器路径定义
+    var editorURL = GV.WEB_ROOT;
+</script>
+<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
+<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
+<script type="text/javascript">
+    $(function () {
+
+        editorcontent = new baidu.editor.ui.Editor();
+        editorcontent.render('content');
+        try {
+            editorcontent.sync();
+        } catch (err) {
+        }
+
+        $('.btn-cancel-thumbnail').click(function () {
+            $('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
+            $('#thumbnail').val('');
+        });
+
+    });
+    function select(ele){
+        var type = $(ele).val();
+        var title = $("#title").val();
+        if(title == ''){
+            if(type==1){
+                $("#title").val('我们恋爱了');
+            }else if(type == 2){
+                $("#title").val('我们结婚了');
+            }else if(type == 3){
+                $("#title").val('活动花絮');
+            }
+        }
+    }
+
+    function doSelectCategory() {
+        var selectedCategoriesId = $('#js-categories-id-input').val();
+        openIframeLayer("{:url('AdminCategory/select')}?ids=" + selectedCategoriesId, '请选择分类', {
+            area: ['700px', '400px'],
+            btn: ['确定', '取消'],
+            yes: function (index, layero) {
+                //do something
+
+                var iframeWin          = window[layero.find('iframe')[0]['name']];
+                var selectedCategories = iframeWin.confirm();
+                if (selectedCategories.selectedCategoriesId.length == 0) {
+                    layer.msg('请选择分类');
+                    return;
+                }
+                $('#js-categories-id-input').val(selectedCategories.selectedCategoriesId.join(','));
+                $('#js-categories-name-input').val(selectedCategories.selectedCategoriesName.join(' '));
+                //console.log(layer.getFrameIndex(index));
+                layer.close(index); //如果设定了yes回调,需进行手工关闭
+            }
+        });
+    }
+</script>
+</body>
+</html>

+ 165 - 0
public/themes/admin_simpleboot3/admin/pic/index.html

@@ -0,0 +1,165 @@
+<include file="public@header"/>
+</head>
+<body>
+<div class="wrap js-check-wrap">
+    <ul class="nav nav-tabs">
+        <li class="active"><a href="javascript:;">图文列表</a></li>
+        <li><a href="{:url('Pic/add')}">添加图文</a></li>
+    </ul>
+    <form class="well form-inline margin-top-20" method="post" action="{:url('Pic/index')}">
+        分类:
+        <select class="form-control" name="type" style="width: 140px;" value="{$params.type}">
+            <option value='0'>全部</option>
+            <option value='1' <if condition="$params.type eq 1">selected</if>>我们恋爱了</option>
+            <option value='2' <if condition="$params.type eq 2">selected</if>>我们结婚了</option>
+            <option value='3' <if condition="$params.type eq 3">selected</if>>活动花絮</option>
+        </select> &nbsp;&nbsp;
+        关键字:
+        <input type="text" class="form-control" name="keyword" style="width: 200px;"
+               value="{$params.keyword|default=''}" placeholder="请输入关键字...">
+        <input type="submit" class="btn btn-primary" value="搜索"/>
+        <a class="btn btn-danger" href="{:url('Pic/index')}">清空</a>
+    </form>
+    <form class="js-ajax-form" action="" method="post">
+        <div class="table-actions">
+            <button class="btn btn-danger btn-sm js-ajax-submit" type="submit"
+                    data-action="{:url('Pic/delete')}" data-subcheck="true" data-msg="您确定删除吗?">
+                {:lang('DELETE')}
+            </button>
+        </div>
+        <table class="table table-hover table-bordered table-list">
+            <thead>
+            <tr>
+                <th width="15">
+                    <label>
+                        <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
+                    </label>
+                </th>
+                <th width="50">ID</th>
+                <th>标题</th>
+                <th>分类</th>
+                <th>作者</th>
+                <th width="160">描述</th>
+                <th width="160">添加时间</th>
+                <th width="160">发布时间</th>
+                <th width="70">状态</th>
+                <th width="95">操作</th>
+            </tr>
+            </thead>
+            <foreach name="datas" item="vo">
+                <tr>
+                    <td>
+                        <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
+                               value="{$vo.id}" title="ID:{$vo.id}">
+                    </td>
+                    <td><b>{$vo.id}</b></td>
+                    <td>
+                        {$vo.post_title}
+                    </td>
+                    <td>
+                        <if condition="$vo.type eq 1">
+                            我们恋爱了
+                        <elseif condition="$vo.type eq 2">
+                            我们结婚了
+                        <else>
+                            活动花絮
+                        </if>
+                    </td>
+                    <td>{$vo.user_nickname}</td>
+                    <td>
+                        {$vo.post_excerpt}
+                    </td>
+                    <td>
+                        <notempty name="vo.create_time">
+                            {:date('Y-m-d H:i',$vo['create_time'])}
+                        </notempty>
+
+                    </td>
+                    <td>
+                        <empty name="vo.published_time">
+                            未发布
+                            <else/>
+                            {:date('Y-m-d H:i',$vo['published_time'])}
+                        </empty>
+                    </td>
+                    <td>
+                        {$vo.post_status == 1? '显示':'隐藏'}
+                    </td>
+                    <td>
+                        <a class="btn btn-xs btn-primary" href="{:url('Pic/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
+                        <a class="btn btn-xs btn-danger js-ajax-delete"
+                           href="{:url('Pic/delete',array('ids'=>$vo['id']))}">{:lang('DELETE')}</a>
+                    </td>
+                </tr>
+            </foreach>
+        </table>
+        <ul class="pagination">{$page|default=''}</ul>
+    </form>
+</div>
+<script src="__STATIC__/js/admin.js"></script>
+<script>
+
+    function reloadPage(win) {
+        win.location.reload();
+    }
+
+    $(function () {
+        setCookie("refersh_time", 0);
+        Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {
+            //批量复制
+            $('.js-articles-copy').click(function (e) {
+                var ids = [];
+                $("input[name='ids[]']").each(function () {
+                    if ($(this).is(':checked')) {
+                        ids.push($(this).val());
+                    }
+                });
+
+                if (ids.length == 0) {
+                    art.dialog.through({
+                        id: 'error',
+                        icon: 'error',
+                        content: '您没有勾选信息,无法进行操作!',
+                        cancelVal: '关闭',
+                        cancel: true
+                    });
+                    return false;
+                }
+
+                ids = ids.join(',');
+                art.dialog.open("__ROOT__/index.php?g=portal&m=AdminArticle&a=copy&ids=" + ids, {
+                    title: "批量复制",
+                    width: "300px"
+                });
+            });
+            //批量移动
+            $('.js-articles-move').click(function (e) {
+                var ids = [];
+                $("input[name='ids[]']").each(function () {
+                    if ($(this).is(':checked')) {
+                        ids.push($(this).val());
+                    }
+                });
+
+                if (ids.length == 0) {
+                    art.dialog.through({
+                        id: 'error',
+                        icon: 'error',
+                        content: '您没有勾选信息,无法进行操作!',
+                        cancelVal: '关闭',
+                        cancel: true
+                    });
+                    return false;
+                }
+
+                ids = ids.join(',');
+                art.dialog.open("__ROOT__/index.php?g=portal&m=AdminArticle&a=move&old_term_id={$term.term_id|default=0}&ids=" + ids, {
+                    title: "批量移动",
+                    width: "300px"
+                });
+            });
+        });
+    });
+</script>
+</body>
+</html>

+ 76 - 61
public/themes/admin_simpleboot3/admin/user/add.html

@@ -1,65 +1,80 @@
-<include file="public@header" />
+<include file="public@header"/>
 </head>
 <body>
-	<div class="wrap">
-		<ul class="nav nav-tabs">
-			<li><a href="{:url('user/index')}">{:lang('ADMIN_USER_INDEX')}</a></li>
-			<li class="active"><a href="{:url('user/add')}">{:lang('ADMIN_USER_ADD')}</a></li>
-		</ul>
-		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('user/addpost')}">
-			<div class="form-group">
-				<label for="input-user_login" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('USERNAME')}</label>
-				<div class="col-md-6 col-sm-10">
-					<input type="text" class="form-control" id="input-user_login" name="user_login">
-				</div>
-			</div>
-			<div class="form-group">
-				<label for="input-user_pass" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('PASSWORD')}</label>
-				<div class="col-md-6 col-sm-10">
-					<input type="text" class="form-control" id="input-user_pass" name="user_pass" placeholder="******">
-				</div>
-			</div>
-			<div class="form-group">
-				<label for="input-user_email" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('EMAIL')}</label>
-				<div class="col-md-6 col-sm-10">
-					<input type="text" class="form-control" id="input-user_email" name="user_email">
-				</div>
-			</div>
-			<div class="form-group">
-				<label for="input-real_name" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('REALNAME')}</label>
-				<div class="col-md-6 col-sm-10">
-					<input type="text" class="form-control" id="input-real_name" name="real_name">
-				</div>
-			</div>
-			<div class="form-group">
-				<label for="input-mobile" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('MOBILE')}</label>
-				<div class="col-md-6 col-sm-10">
-					<input type="text" class="form-control" id="input-mobile" name="mobile">
-				</div>
-			</div>
-			<div class="form-group">
-				<label for="input-user_email" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('ROLE')}</label>
-				<div class="col-md-6 col-sm-10">
-					<foreach name="roles" item="vo">
-						<label class="checkbox-inline">
-							<input value="{$vo.id}" type="checkbox" name="role_id[]" <if condition="cmf_get_current_admin_id() neq 1 && $vo['id'] eq 1">disabled="true"</if>>{$vo.name}
-						</label>
-					</foreach>
-				</div>
-			</div>
-			<div class="form-group">
-				<label for="input-check_ip" class="col-sm-2 control-label">IP登录验证(小写逗号分隔)</label>
-				<div class="col-md-6 col-sm-10">
-					<input type="text" class="form-control" id="input-check_ip" name="check_ip" placeholder="如:127.0.0.1,127.0.0.2">
-				</div>
-			</div>
-			<div class="form-group">
-				<div class="col-sm-offset-2 col-sm-10">
-					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
-				</div>
-			</div>
-		</form>
-	</div>
-	<script src="__STATIC__/js/admin.js"></script>
+<div class="wrap">
+    <ul class="nav nav-tabs">
+        <li><a href="{:url('user/index')}">{:lang('ADMIN_USER_INDEX')}</a></li>
+        <li class="active"><a href="{:url('user/add')}">{:lang('ADMIN_USER_ADD')}</a></li>
+    </ul>
+    <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('user/addpost')}">
+        <div class="form-group">
+            <label for="thumbnail" class="col-sm-2 control-label"><span class="form-required"></span>头像</label>
+            <div class="col-md-6 col-sm-10">
+                <input type="hidden" name="avatar" id="thumbnail" value="">
+                <a href="javascript:uploadOneImage('图片上传','#thumbnail');">
+                    <img src="__TMPL__/public/assets/images/default-thumbnail.png"
+                         id="thumbnail-preview"
+                         width="135" style="cursor: pointer"/>
+                </a>
+                <input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
+            </div>
+        </div>
+        <div class="form-group">
+            <label for="input-user_login" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('USERNAME')}</label>
+            <div class="col-md-6 col-sm-10">
+                <input type="text" class="form-control" id="input-user_login" name="user_login">
+            </div>
+        </div>
+        <div class="form-group">
+            <label for="input-user_pass" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('PASSWORD')}</label>
+            <div class="col-md-6 col-sm-10">
+                <input type="text" class="form-control" id="input-user_pass" name="user_pass" placeholder="******">
+            </div>
+        </div>
+        <div class="form-group">
+            <label for="input-user_email" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('EMAIL')}</label>
+            <div class="col-md-6 col-sm-10">
+                <input type="text" class="form-control" id="input-user_email" name="user_email">
+            </div>
+        </div>
+        <div class="form-group">
+            <label for="input-real_name" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('REALNAME')}</label>
+            <div class="col-md-6 col-sm-10">
+                <input type="text" class="form-control" id="input-real_name" name="real_name">
+            </div>
+        </div>
+        <div class="form-group">
+            <label for="input-mobile" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('MOBILE')}</label>
+            <div class="col-md-6 col-sm-10">
+                <input type="text" class="form-control" id="input-mobile" name="mobile">
+            </div>
+        </div>
+        <div class="form-group">
+            <label for="input-user_email" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('ROLE')}</label>
+            <div class="col-md-6 col-sm-10">
+                <foreach name="roles" item="vo">
+                    <label class="checkbox-inline">
+                        <input value="{$vo.id}" type="checkbox" name="role_id[]"
+                        <if condition="cmf_get_current_admin_id() neq 1 && $vo['id'] eq 1">disabled="true"</if>
+                        >{$vo.name}
+                    </label>
+                </foreach>
+            </div>
+        </div>
+        <div class="form-group">
+            <label for="input-check_ip" class="col-sm-2 control-label">IP登录验证(小写逗号分隔)</label>
+            <div class="col-md-6 col-sm-10">
+                <input type="text" class="form-control" id="input-check_ip" name="check_ip"
+                       placeholder="如:127.0.0.1,127.0.0.2">
+            </div>
+        </div>
+        <div class="form-group">
+            <div class="col-sm-offset-2 col-sm-10">
+                <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
+            </div>
+        </div>
+    </form>
+</div>
+<script src="__STATIC__/js/admin.js"></script>
 </body>
 </html>

+ 18 - 0
public/themes/admin_simpleboot3/admin/user/edit.html

@@ -9,6 +9,24 @@
 		</ul>
 		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('User/editPost')}">
 			<div class="form-group">
+				<label for="input-user_login" class="col-sm-2 control-label"><span class="form-required"></span>头像</label>
+				<div class="col-md-6 col-sm-10">
+					<input type="hidden" name="avatar" id="thumbnail" value="">
+					<a href="javascript:uploadOneImage('图片上传','#thumbnail');">
+						<if condition="!empty($avatar)">
+							<img src="/upload/{:$avatar}"
+								 id="thumbnail-preview"
+								 width="135" style="cursor: pointer"/>
+							<else/>
+							<img src="__TMPL__/public/assets/images/default-thumbnail.png"
+								 id="thumbnail-preview"
+								 width="135" style="cursor: pointer"/>
+						</if>
+					</a>
+					<input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
+				</div>
+			</div>
+			<div class="form-group">
 				<label for="input-user_login" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('USERNAME')}</label>
 				<div class="col-md-6 col-sm-10">
 					<input type="text" class="form-control" id="input-user_login" name="user_login" value="{$user_login}">

+ 2 - 0
public/themes/admin_simpleboot3/admin/user/index.html

@@ -19,6 +19,7 @@
 			<thead>
 				<tr>
 					<th width="50">ID</th>
+					<th width="50">头像</th>
 					<th>{:lang('USERNAME')}</th>
 					<th>{:lang('REALNAME')}</th>
 					<th>{:lang('MOBILE')}</th>
@@ -34,6 +35,7 @@
 				<foreach name="users" item="vo">
 				<tr>
 					<td>{$vo.id}</td>
+					<td> <if condition="$vo['avatar']"><img src="/upload/{$vo.avatar}" style="width: 50px;height: 50px;"></if></td>
 					<td><if condition="$vo['user_url']"><a href="{$vo.user_url}" target="_blank" title="{$vo.signature}">{$vo.user_login}</a><else />{$vo.user_login}</if></td>
 					<td>{$vo.real_name}</td>
 					<td>{$vo.mobile}</td>

+ 1 - 0
public/themes/default/weixin/auth/vip.html

@@ -11,6 +11,7 @@
             <div class="meal" v-for="(v,k) in mealList" :key="k" @click.stop="selectMeal($event, v)">
                 <div class="shenf">
                     <p class="name" v-text="v.name"></p>
+                    <p class="num" v-if="v.num" v-text="'申请'+v.num+'次微信'">0</p>
                     <p class="price" v-text="'¥'+v.price">¥199</p>
                 </div>
             </div>

+ 60 - 0
public/themes/default/weixin/index/pic.html

@@ -0,0 +1,60 @@
+<include file="weixin@block:header"/>
+<title>图文</title>
+<link rel="stylesheet" href="__TMPL__/weixin/public/assets/css/pic.css?v={$version}">
+<div id="app" v-cloak>
+    <div class="huod_bj"></div>
+    <div class="huodo_lb">
+        <ul>
+            <li class="top">
+                <div class="biaot" v-if="params.type==1">
+                    <img class="icon" src="__TMPL__/weixin/public/assets/img/love.jpg" alt="">
+                    <div class="desc">
+                        我们恋爱吧</br>
+                        真实&优质&高效</br>
+                        南宁单身青年都在用的平台</br>
+                        成功帮助南宁单身男女脱单1000+</br>
+                    </div>
+                </div>
+                <div class="biaot" v-else-if="params.type==2">
+                    <img class="icon" src="__TMPL__/weixin/public/assets/img/jiehun.jpg" alt="">
+                    <div class="desc">
+                        结婚合集</br>
+                        线上申请微信|线下定制服务</br>
+                        每周各种主题脱单活动</br>
+                        终于有情人终成眷属</br>
+                    </div>
+                </div>
+                <div class="biaot" v-else-if="params.type==3">
+                    <img class="icon" src="__TMPL__/weixin/public/assets/img/activity.jpg" alt="">
+                    <div class="desc">
+                        活动合集</br>
+                        兴趣爱好活动|主题相亲活动</br>
+                        每周活动现场花絮来啦~</br>
+                    </div>
+                </div>
+            </li>
+            <li v-if="dataList.length<=0" class="empty"><span>暂无数据</span></li>
+            <li v-else v-for="(item,key) in dataList" class="list">
+                <div class="image">
+                    <img class="hdzut thumb" src="" :data-src="item.avatar" onerror="this.src='__TMPL__/weixin/public/assets/img/no-pic.png'">
+                </div>
+                <div class="info">
+                    <h1 v-text="item.post_title"></h1>
+                    <div class="hdbt">
+                        {{item.post_excerpt}}
+                    </div>
+                    <div class="hdbt albums" v-if="item.albums.length>0">
+                        <img :src="vo" alt="" v-for="(vo,k) in item.albums">
+                    </div>
+                    <div class="time">
+                        {{item.published_time_text}}
+                    </div>
+                </div>
+                </li>
+        </ul>
+    </div>
+    <!-- 底部菜单 -->
+    <include file="weixin@block:footer_nav"/>
+</div>
+<script src="__TMPL__/weixin/public/assets/js/pic.js?v={$version}"></script>
+<include file="weixin@block:footer"/>

+ 10 - 0
public/themes/default/weixin/match/index.html

@@ -4,6 +4,16 @@
 <link rel="stylesheet" href="__TMPL__/weixin/public/assets/css/match.css?v={$version}">
 <div id="app" v-cloak>
     <div :class="!hasFollow? 'top_lieb top_box hasFollow' : 'top_lieb top_box'">
+        <div class="banner">
+            <div class="swiper-wrapper ">
+                <div class="swiper-slide" v-for="(item,k) in banners" >
+                    <a :href="item.url? item.url : '#'">
+                        <img :src="item.image" :alt="item.title">
+                    </a>
+                </div>
+            </div>
+            <div class="swiper-pagination"></div>
+        </div>
         <div class="head">
             <p><em></em><span class="label">首页推广</span> <a class="top" href="/weixin/activity/top?id=16">我要上首页</a></p>
         </div>

+ 2 - 2
public/themes/default/weixin/member/invite.html

@@ -33,12 +33,12 @@
                         <span v-else-if="memberInfo.position_check==3">认证失败</span>
                         <span v-else>去认证</span>
                     </a></h2></li>
-                <li><h1>VIP会员更优惠</h1>
+                <li><h1>VIP会员更优惠<b>❤</b></h1>
                     <h2><a href="/weixin/auth/vip">
                         <span v-if="memberInfo.vip_auth==1">已开通</span>
                         <span v-else>去开通</span>
                     </a></h2></li>
-                <li><h1>解救单身青年送20颗<b>❤</b></h1>
+                <li><h1>解救单身青年最高可得70<b>❤</b></h1>
                     <h2><a @click="share()">去分享</a></h2></li>
             </ul>
         </div>

+ 4 - 1
public/themes/default/weixin/public/assets/css/auth-vip.css

@@ -49,7 +49,10 @@ body {
     margin-top: 26px;
     color: #333;
 }
-
+.shenf .num {
+    color: #666;
+    font-size: 12px;
+}
 .tis {
     padding: 15px;
     font-size: 14px;

+ 15 - 0
public/themes/default/weixin/public/assets/css/match.css

@@ -76,6 +76,21 @@ body {
     /*border-bottom-left-radius: 8px;*/
     /*border-bottom-right-radius: 8px;*/
 }
+.banner {
+    height: 200px;
+    width: 100%;
+    position: relative;
+}
+.banner a {
+    display: inline-block;
+    height: 100%;
+}
+
+.banner a img {
+    display: inline-block;
+    width: 100%;
+    height: 100%;
+}
 
 .top_lieb ul {
     position: relative;

+ 95 - 0
public/themes/default/weixin/public/assets/css/pic.css

@@ -0,0 +1,95 @@
+.fanhui2{position: fixed;top: 0;width: 100%;padding: 0;z-index: 9999;}
+.huod_bj{width: 100%; height: 140px; position:fixed;top: 0px;z-index: -9999; background-color: #f1c21f}
+
+.huodo_lb{padding: 0 15px;margin-bottom: 60px;overflow: hidden;margin-top: 10px;}
+.huodo_lb li{
+    overflow: hidden;
+    width: 100%;
+    margin-top: 15px;
+    background: #fff;
+    display: block;
+    border-radius: 6px;
+}
+.huodo_lb li.loaded {
+    background: none;
+}
+
+.huodo_lb li.empty {
+    background: none;
+}
+.biaot{
+    width: 100%;
+    height: 160px;
+    overflow: hidden;
+    position: relative;
+    border-bottom: 1px solid #ccc;
+    background: #fff;
+}
+.top .biaot {
+    border-bottom: none;
+}
+.biaot .icon {
+    width: 120px;
+    height: 100px;
+    vertical-align: middle;
+    float: left;
+    margin: 20px 10px;
+}
+.biaot .desc {
+    height: 100px;
+    vertical-align: middle;
+    font-size: 12px;
+    float: left;
+    margin-top: 30px;
+}
+
+.list {
+    position: relative;
+}
+
+.list .image {
+    width: 48px;
+    height: 48px;
+    margin: 10px;
+    float: left;
+}
+.hdbt {
+    color: #333;
+    font-size: 14px;
+    padding: 5px 0;
+}
+.list .image img {
+    width: 100%;
+    height: 100%;
+    border-radius: 100%;
+}
+.list .info {
+    float: left;
+    width: calc(100% - 100px);
+    margin: 10px 0px;
+    overflow: hidden;
+}
+.list .info h1 {
+    width: 95%;
+    font-size: 16px;
+    line-height: 30px;
+    color: #333;
+    font-weight: bold;
+    word-break: break-all;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-box-orient: vertical;
+    -webkit-line-clamp: 2;
+    overflow: hidden;
+}
+
+.list .info .albums img {
+    width: 30%;
+    height: 80px;
+    margin-right: 1.5%;
+}
+
+.list .info .time {
+    font-size: 14px;
+    color: #666;
+}

BIN
public/themes/default/weixin/public/assets/img/activity.jpg


BIN
public/themes/default/weixin/public/assets/img/jh.jpg


BIN
public/themes/default/weixin/public/assets/img/jiehun.jpg


BIN
public/themes/default/weixin/public/assets/img/love.jpg


+ 1 - 1
public/themes/default/weixin/public/assets/js/auth-vip.js

@@ -62,7 +62,7 @@ var app = new Vue({
                 $.toast('请先选择套餐', 'text');
                 return false;
             }
-            if (!confirm('确定购买该VIP套餐?')) {
+            if (!confirm('确定购买该VIP套餐?购买后您将获得'+_this.mealInfo.name+'使用权限和有效期内申请'+_this.mealInfo.num+'次微信机会,对方通过为准!')) {
                 return false;
             }
             $.showLoading("订单处理中...");

Plik diff jest za duży
+ 2 - 1
public/themes/default/weixin/public/assets/js/home.js


+ 205 - 183
public/themes/default/weixin/public/assets/js/match.js

@@ -32,7 +32,7 @@ var app = new Vue({
         // 收入
         salarys: ['不限'],
         // 学历
-        educations: ['不限','大专','本科','硕士及以上'],
+        educations: ['不限', '大专', '本科', '硕士及以上'],
         // 婚姻状态
         marrieds: [],
         // 设置的条件
@@ -60,7 +60,7 @@ var app = new Vue({
         redommended: false,
         showFilterBox: false,
         // 用户信息
-        memberInfo: {id:0,signed: 1},
+        memberInfo: {id: 0, signed: 1},
         // 加载状态
         status: {
             locading: false,
@@ -84,6 +84,7 @@ var app = new Vue({
         },
         showSign: 1,
         mealList: [],
+        banners: [],
         // 参数
         mealInfo: {
             give_num: 0,
@@ -97,23 +98,24 @@ var app = new Vue({
         var slideIndex = sessionStorage.getItem('slideIndex');
         var total = sessionStorage.getItem('total');
         var dataList = sessionStorage.getItem('dataList')
-        dataList = typeof (dataList) != 'undefined' && dataList != null? JSON.parse(dataList) : []
+        dataList = typeof (dataList) != 'undefined' && dataList != null ? JSON.parse(dataList) : []
 
-        if(dataList && dataList.length>0 && !reset){
-            this.slideIndex = typeof (slideIndex) != 'undefined' && slideIndex>0? slideIndex : 0
-            this.slideIndex = this.slideIndex <= dataList.length? this.slideIndex : 0
-            this.total = typeof (total) != 'undefined' && total>0? total : dataList.length
-            this.params.page = Math.ceil(dataList.length/this.params.pageSize);
+        if (dataList && dataList.length > 0 && !reset) {
+            this.slideIndex = typeof (slideIndex) != 'undefined' && slideIndex > 0 ? slideIndex : 0
+            this.slideIndex = this.slideIndex <= dataList.length ? this.slideIndex : 0
+            this.total = typeof (total) != 'undefined' && total > 0 ? total : dataList.length
+            this.params.page = Math.ceil(dataList.length / this.params.pageSize);
             this.dataList = dataList;
             _this.getMeal();
             _this.getInfo();
             _this.getTopList();
             // this.initSwiper()
-        }else{
+        } else {
             this.slideIndex = 0;
             this.getDataList(false);
         }
 
+        this.getBanner();
         this.getParams();
         this.initShare();
 
@@ -122,8 +124,17 @@ var app = new Vue({
         var _this = this;
         _this.initData();
 
+        var banner = new Swiper('.banner', {
+            loop: true, // 循环模式选项
+            autoplay: true,
+            speed: 100,
+            pagination: {
+                el: '.swiper-pagination',
+            },
+        });
+
         // 选项选中
-        $(".choose-item h1").click(function(){
+        $(".choose-item h1").click(function () {
             $(this).addClass('active').siblings().removeClass('active');
         });
     },
@@ -131,6 +142,8 @@ var app = new Vue({
     mounted: function () {
         var _this = this;
 
+
+
         _this.timeLockTips();
         _this.initSwiper()
         // 分类导航切换
@@ -138,9 +151,9 @@ var app = new Vue({
             var type = $(this).index() + 1;
             $(this).addClass('active').siblings().removeClass('active');
             _this.type = type;
-            if (_this.type == 2 ) {
+            if (_this.type == 2) {
                 // _this.hasFollow=1
-            }else{
+            } else {
                 $.hideLoading();
             }
         });
@@ -148,7 +161,7 @@ var app = new Vue({
     },
     methods: {
         // 隐藏签到
-        hideSign: function(type){
+        hideSign: function (type) {
             this.showSign = 0;
             $.post('/api/member/setSign', {}, function (res) {
             }, "json");
@@ -156,11 +169,11 @@ var app = new Vue({
         // 获取用户信息
         getInfo: function () {
             var _this = this;
-            $.post('/api/member/getInfo', {type: 1,uncheck: true}, function (res) {
+            $.post('/api/member/getInfo', {type: 1, uncheck: true}, function (res) {
                 if (res.code == 'success') {
                     _this.memberInfo = res.data
-                    _this.hasFollow = typeof(_this.memberInfo.is_follow) != 'undefined'? _this.memberInfo.is_follow : 0;
-                    _this.showSign = typeof(_this.memberInfo.showSign) != 'undefined'? _this.memberInfo.showSign : 1;
+                    _this.hasFollow = typeof (_this.memberInfo.is_follow) != 'undefined' ? _this.memberInfo.is_follow : 0;
+                    _this.showSign = typeof (_this.memberInfo.showSign) != 'undefined' ? _this.memberInfo.showSign : 1;
                     _this.initMeal();
                     /*if (_this.memberInfo.user_status != 1) {
                         _this.matchList = [];
@@ -175,94 +188,105 @@ var app = new Vue({
                 }
             }, "json");
         },
+        // 获取广告列表
+        getBanner: function () {
+            var _this = this;
+            $.post('/api/index/getBanners', {}, function (res) {
+                if (res.code == 'success') {
+                    _this.banners = res.data;
+                } else {
+                    $.toast(res.message, 'text');
+                }
+            }, "json");
+        },
         // 获取置顶列表
-        getTopList: function(){
+        getTopList: function () {
             var _this = this;
             $.post('/api/member/getTopList', {}, function (res) {
-                if (res.code == 'success'){
+                if (res.code == 'success') {
                     _this.topList = res.data.data;
-                }else{
+                } else {
                     $.toast(res.message, 'text');
                 }
             }, "json");
         },
         // 初始化参数
-        getParams: function(){
+        getParams: function () {
             var _this = this;
             $.post('/api/index/params', {}, function (res) {
-                if (res.code == 'success'){
+                if (res.code == 'success') {
                     var paramDatas = res.data;
-                    _this.marrieds = typeof (paramDatas.marrieds) != 'undefined'? paramDatas.marrieds : ["未婚"];
+                    _this.marrieds = typeof (paramDatas.marrieds) != 'undefined' ? paramDatas.marrieds : ["未婚"];
                     _this.initData();
-                }else{
+                } else {
                     $.toast(res.message, 'text');
                 }
             }, "json");
         },
         // 获取举报用户
-        getTips: function(){
+        getTips: function () {
             var _this = this
             $.post('/api/member/complainList', _this.tipParams, function (res) {
-                if (res.code == 'success'){
-                    var dataList = typeof(res.data.data) != 'undefined'? res.data.data : [];
-                    if(dataList.length>0 && res.data.total>0 && _this.tipsArr.length<res.data.total){
-                        if(dataList.length<_this.tipParams.pageSize){
+                if (res.code == 'success') {
+                    var dataList = typeof (res.data.data) != 'undefined' ? res.data.data : [];
+                    if (dataList.length > 0 && res.data.total > 0 && _this.tipsArr.length < res.data.total) {
+                        if (dataList.length < _this.tipParams.pageSize) {
                             _this.tipsArr = _this.tipsArr.concat(dataList)
-                        }else{
+                        } else {
                             _this.tipsArr = dataList
                         }
 
                         _this.initTips(0)
-                    }else{
+                    } else {
                         clearInterval(_this.tipsLoadTimerId)
                     }
                 }
             }, "json");
         },
-        timeLockTips(){
+        timeLockTips() {
             var _this = this;
             clearInterval(_this.tipsLoadTimerId)
             _this.getTips()
         },
         // 初始化提示
-        initTips: function(index){
+        initTips: function (index) {
             var _this = this
             var num = _this.tipsArr.length
-            if(num>0){
-                var data = typeof(_this.tipsArr[index]) != 'undefined'? _this.tipsArr[index] : {};
-                if(!data){
+            if (num > 0) {
+                var data = typeof (_this.tipsArr[index]) != 'undefined' ? _this.tipsArr[index] : {};
+                if (!data) {
                     return false;
                 }
 
                 clearInterval(_this.tipsTimerId)
                 var width = 280;
                 var left = -100;
-                var content = '提示:用户<em>'+data.user_nickname+'</em>因被举报核实已拉黑,点击查看'
+                var content = '提示:用户<em>' + data.user_nickname + '</em>因被举报核实已拉黑,点击查看'
                 // _this.tips.content = '提示:用户<em>'+data.user_nickname+'</em>因被举报核实已拉黑,点击查看'
-                var strs = content? content.split('') : [];
-                if(strs.length>9){
-                    width = (strs.length-9)*13.5
+                var strs = content ? content.split('') : [];
+                if (strs.length > 9) {
+                    width = (strs.length - 9) * 13.5
                 }
 
                 $(".tips").show();
-                $(".tips").css({width:width+'px'});
+                $(".tips").css({width: width + 'px'});
                 $(".tips a span").html(content);
-                _this.tipsTimerId = setInterval(function(){
+                _this.tipsTimerId = setInterval(function () {
                     //console.log(left+'++'+index)
-                    if(left>=100){
+                    if (left >= 100) {
                         left = -100;
                         content = '';
-                        index = index+1>=num? 0 : index+1;
+                        index = index + 1 >= num ? 0 : index + 1;
                         $(".tips").hide();
-                        $(".tips").css({right:left+'%'});
+                        $(".tips").css({right: left + '%'});
                         $(".tips a span ").html(content);
                         _this.initTips(index)
                         return false;
                     }
 
                     left += 0.25;
-                    $(".tips").css({width:width+'px'});
-                    $(".tips").css({right:left+'%'});
+                    $(".tips").css({width: width + 'px'});
+                    $(".tips").css({right: left + '%'});
                     $(".tips a span ").html(content);
                     $(".tips").show();
                 }, 20);
@@ -270,30 +294,30 @@ var app = new Vue({
 
         },
         // 初始化筛选数据
-        initData: function(){
+        initData: function () {
             var _this = this;
             var ages = [];
-            for(var i=0;i<=72;i++){
-                ages.push(18+i);
+            for (var i = 0; i <= 72; i++) {
+                ages.push(18 + i);
             }
 
             var conditions = sessionStorage.getItem('conditions');
-            conditions = typeof (conditions) != 'undefined' && conditions != null? JSON.parse(conditions) : {}
-            if(conditions){
+            conditions = typeof (conditions) != 'undefined' && conditions != null ? JSON.parse(conditions) : {}
+            if (conditions) {
                 _this.conditions = conditions
             }
 
-            var data = _this.conditions.age? _this.conditions.age.toString() : '';
-            data = data? data.split('~'): [];
-            var data1 = typeof(data[0]) != 'undefined'? data[0] : '';
-            var data2 = typeof(data[1]) != 'undefined'? data[1] : '';
-            data2 = data2>data1?data2 : 0;
-            if(data1==0 && data2>0){
-                code = data2+'以下';
-            }else if(data1>0 && data2==0){
-                code = data1+'以上';
-            }else if(data1 && data2 && data2>data1){
-                code = data1+'~'+data2+'岁';
+            var data = _this.conditions.age ? _this.conditions.age.toString() : '';
+            data = data ? data.split('~') : [];
+            var data1 = typeof (data[0]) != 'undefined' ? data[0] : '';
+            var data2 = typeof (data[1]) != 'undefined' ? data[1] : '';
+            data2 = data2 > data1 ? data2 : 0;
+            if (data1 == 0 && data2 > 0) {
+                code = data2 + '以下';
+            } else if (data1 > 0 && data2 == 0) {
+                code = data1 + '以上';
+            } else if (data1 && data2 && data2 > data1) {
+                code = data1 + '~' + data2 + '岁';
             }
 
             $("#age").val(code);
@@ -310,25 +334,25 @@ var app = new Vue({
                         values: ages,
                     }
                 ],
-                onChange: function(data){
+                onChange: function (data) {
                     var code = '';
                     var data1 = data.cols[0].value;
                     var data2 = data.cols[1].value;
-                    data1 = data1 =='不限'? 0 : data1;
-                    data2 = data2 =='不限'? 0 : data2;
-                    data2 = data2>data1?data2 : 0;
-                    if(data1==0 && data2>0){
-                        code = data2+'以下';
-                    }else if(data1>0 && data2==0){
-                        code = data1+'以上';
-                    }else if(data1 && data2 && data2>data1){
-                        code = data1+'~'+data2+'岁';
+                    data1 = data1 == '不限' ? 0 : data1;
+                    data2 = data2 == '不限' ? 0 : data2;
+                    data2 = data2 > data1 ? data2 : 0;
+                    if (data1 == 0 && data2 > 0) {
+                        code = data2 + '以下';
+                    } else if (data1 > 0 && data2 == 0) {
+                        code = data1 + '以上';
+                    } else if (data1 && data2 && data2 > data1) {
+                        code = data1 + '~' + data2 + '岁';
                     }
-                    $("#age").attr('data-code', data1+'~'+data2);
+                    $("#age").attr('data-code', data1 + '~' + data2);
                     $("#age").val(code);
                     // $("#age").val(data1 || data2 && (data2>data1)? data1+'~'+data2 : '');
                 },
-                onConfirm: function(data){
+                onConfirm: function (data) {
                     console.log(data)
                 }
             });
@@ -337,20 +361,20 @@ var app = new Vue({
                 _this.heights.push((145 + i));
             }
 
-            var data = _this.conditions.height? _this.conditions.height.toString() : '';
-            data = data? data.split('~'): [];
-            var data1 = typeof(data[0]) != 'undefined'? data[0] : '';
-            var data2 = typeof(data[1]) != 'undefined'? data[1] : '';
+            var data = _this.conditions.height ? _this.conditions.height.toString() : '';
+            data = data ? data.split('~') : [];
+            var data1 = typeof (data[0]) != 'undefined' ? data[0] : '';
+            var data2 = typeof (data[1]) != 'undefined' ? data[1] : '';
             var code = '';
-            data1 = data1 =='不限' || !data1? 0 : data1;
-            data2 = data2 =='不限' || !data2? 0 : data2;
-            data2 = data2>data1?data2 : 0;
-            if(data1==0 && data2>0){
-                code = data2+'以下';
-            }else if(data1>0 && data2==0){
-                code = data1+'以上';
-            }else if(data1 && data2 && data2>data1){
-                code = data1+'~'+data2+'cm';
+            data1 = data1 == '不限' || !data1 ? 0 : data1;
+            data2 = data2 == '不限' || !data2 ? 0 : data2;
+            data2 = data2 > data1 ? data2 : 0;
+            if (data1 == 0 && data2 > 0) {
+                code = data2 + '以下';
+            } else if (data1 > 0 && data2 == 0) {
+                code = data1 + '以上';
+            } else if (data1 && data2 && data2 > data1) {
+                code = data1 + '~' + data2 + 'cm';
             }
             $("#height_btn").attr('data-code', _this.conditions.height);
             $("#height").val(code);
@@ -366,49 +390,49 @@ var app = new Vue({
                         values: _this.heights,
                     }
                 ],
-                onChange: function(data){
+                onChange: function (data) {
                     var code = '';
                     var data1 = data.cols[0].value;
                     var data2 = data.cols[1].value;
-                    data1 = data1 =='不限' || !data1? 0 : data1;
-                    data2 = data2 =='不限' || !data2? 0 : data2;
-                    data2 = data2>data1?data2 : 0;
-                    if(data1==0 && data2>0){
-                        code = data2+'以下';
-                    }else if(data1>0 && data2==0){
-                        code = data1+'以上';
-                    }else if(data1 && data2 && data2>data1){
-                        code = data1+'~'+data2+'cm';
+                    data1 = data1 == '不限' || !data1 ? 0 : data1;
+                    data2 = data2 == '不限' || !data2 ? 0 : data2;
+                    data2 = data2 > data1 ? data2 : 0;
+                    if (data1 == 0 && data2 > 0) {
+                        code = data2 + '以下';
+                    } else if (data1 > 0 && data2 == 0) {
+                        code = data1 + '以上';
+                    } else if (data1 && data2 && data2 > data1) {
+                        code = data1 + '~' + data2 + 'cm';
                     }
-                    $("#height").attr('data-code', data1+'~'+data2);
+                    $("#height").attr('data-code', data1 + '~' + data2);
                     $("#height").val(code);
                 },
-                onConfirm: function(data){
+                onConfirm: function (data) {
 
                 },
             });
         },
         // 加载更多
-        loadMore: function(){
+        loadMore: function () {
             var _this = this;
             var slideIndex = _this.dataList.length;
             _this.status.loaded = false;
             _this.status.total = 1;
             _this.params.page++;
-            _this.slideIndex = slideIndex>0? slideIndex : 0
+            _this.slideIndex = slideIndex > 0 ? slideIndex : 0
             _this.getDataList(true);
         },
         // 获取列表数据
         getDataList: function (more) {
             var _this = this;
-            if(_this.status.loading){
+            if (_this.status.loading) {
                 return false;
             }
             _this.status.loading = true;
-            if (_this.params.page == 1 ) {
+            if (_this.params.page == 1) {
                 _this.dataList = [];
             }
-            if(_this.params.loadHistory<=0){
+            if (_this.params.loadHistory <= 0) {
                 $.showLoading("数据加载中...");
             }
 
@@ -430,19 +454,19 @@ var app = new Vue({
                         _this.showMessage('已加载完全部...', 1500)
                         _this.status.loaded = true;
                         return false;
-                    }else if(dataList.length <= 0 && _this.params.page <= 1){
+                    } else if (dataList.length <= 0 && _this.params.page <= 1) {
                         sessionStorage.setItem('page', 0);
                         sessionStorage.setItem('dataList', null);
-                    }else{
+                    } else {
                         sessionStorage.setItem('page', _this.params.page);
                     }
 
-                    if (more>0) {
+                    if (more > 0) {
                         $.each(dataList, function (k, item) {
                             _this.dataList.push(item);
                         });
 
-                    }else {
+                    } else {
                         _this.dataList = dataList
 
                         _this.getMeal();
@@ -457,57 +481,51 @@ var app = new Vue({
                 }
             }, "json");
         },
-        initSwiper: function(){
+        initSwiper: function () {
             var _this = this;
-            this.$nextTick(()=>{
-                console.log(65)
-                console.log(_this.dataList)
-                setTimeout(function (){
-                    /*if(_this.swiper || _this.dataList.length<=0){
-                        return false;
-                    }*/
-                    console.log(_this.slideIndex+'+dd+')
+            this.$nextTick(() => {
+                setTimeout(function () {
                     // 单身推荐列表
                     _this.swiper = new Swiper('.hearts', {
                         loop: false, // 循环模式选项
                         autoplay: false,
                         speed: 100,
-                        direction : 'vertical',
+                        direction: 'vertical',
                         initialSlide: _this.slideIndex,// 默认显示
-                        freeMode : true,//是否滑动
+                        freeMode: true,//是否滑动
                         observer: true,//修改swiper自己或子元素时,自动初始化swiper
                         observeParents: true,//修改swiper的父元素时,自动初始化swiper
                         slidesPerView: 'auto',
 
-                        onSlideChangeEnd: function(swiper) {
+                        onSlideChangeEnd: function (swiper) {
                             swiper.update();
                             swiper.startAutoplay();
                             swiper.reLoop();
                         },
 
                         on: {
-                            slideChange:function(event){
-                                if(_this.switchStatus){
+                            slideChange: function (event) {
+                                if (_this.switchStatus) {
                                     return false;
                                 }
 
                                 _this.switchStatus = true;
-                                let count = _this.dataList.length-1
-                                let swipeDirection = typeof(this.swipeDirection) != 'undefined'? this.swipeDirection : '';
-                                if(!swipeDirection){
-                                    console.log('未触发'+this.swipeDirection)
+                                let count = _this.dataList.length - 1
+                                let swipeDirection = typeof (this.swipeDirection) != 'undefined' ? this.swipeDirection : '';
+                                if (!swipeDirection) {
+                                    console.log('未触发' + this.swipeDirection)
                                     _this.switchStatus = false;
                                     return false;
                                 }
 
-                                if(swipeDirection == 'next'){
-                                    console.log(_this.total+'++'+count+'++'+_this.slideIndex)
-                                    if(this.realIndex >= count || _this.slideIndex>=count){
-                                        if(_this.total >= (_this.params.page+1*_this.params.pageSize) && !_this.loadSlide){
+                                if (swipeDirection == 'next') {
+                                    console.log(_this.total + '++' + count + '++' + _this.slideIndex)
+                                    if (this.realIndex >= count || _this.slideIndex >= count) {
+                                        if (_this.total >= (_this.params.page + 1 * _this.params.pageSize) && !_this.loadSlide) {
                                             _this.switchStatus = false;
                                             _this.loadSlide = true;
                                             _this.slideIndex++;
-                                            console.log(_this.slideIndex+'+++')
+                                            console.log(_this.slideIndex + '+++')
                                             sessionStorage.setItem('slideIndex', _this.slideIndex);
                                             sessionStorage.setItem('dataList', null);
 
@@ -517,17 +535,17 @@ var app = new Vue({
                                         }
                                         _this.switchStatus = false;
                                         return false;
-                                    }else if(count>0){
+                                    } else if (count > 0) {
                                         _this.slideIndex++;
                                         sessionStorage.setItem('slideIndex', _this.slideIndex);
                                         this.slideTo(_this.slideIndex)
                                         _this.switchStatus = false;
                                     }
-                                }else{
-                                    if(this.realIndex <=0 || _this.slideIndex<=0){
+                                } else {
+                                    if (this.realIndex <= 0 || _this.slideIndex <= 0) {
                                         _this.slideIndex = 0;
-                                    }else{
-                                        _this.slideIndex = _this.slideIndex-1<=0? 0 : _this.slideIndex-1;
+                                    } else {
+                                        _this.slideIndex = _this.slideIndex - 1 <= 0 ? 0 : _this.slideIndex - 1;
                                     }
                                     console.log('记录')
                                     _this.slideIndex = this.realIndex
@@ -541,7 +559,7 @@ var app = new Vue({
                         },
                     })
 
-                    if(_this.slideIndex>0){
+                    if (_this.slideIndex > 0) {
                         _this.swiper.slideTo(_this.slideIndex)
                     }
                 }, 50)
@@ -552,9 +570,9 @@ var app = new Vue({
 
         },
         // 提示消息
-        showMessage: function(msg, time){
+        showMessage: function (msg, time) {
             $.showLoading(msg);
-            setTimeout(function(){
+            setTimeout(function () {
                 $.hideLoading();
             }, time)
         },
@@ -563,7 +581,7 @@ var app = new Vue({
             location.href = '/weixin/member/home?id=' + id;
         },
         // 筛选
-        filterSubmit: function(){
+        filterSubmit: function () {
             var _this = this;
             _this.params.age = _this.conditions.age = $("#age").attr('data-code');
             _this.params.height = _this.conditions.height = $("#height").attr('data-code');
@@ -577,21 +595,21 @@ var app = new Vue({
             sessionStorage.setItem('conditions', JSON.stringify(_this.conditions));
             _this.getDataList(0);
         },
-        showAuth: function(data){
+        showAuth: function (data) {
             $.closeModal();
-            var idcard = data.idcard_check==2? 'idcard active' : 'idcard';
-            var position = data.position_check==2? 'position active' : 'position';
-            var education = data.education_check==2? 'education active' : 'education';
-            var vip = data.vip_auth==1? "<img  class='vip' src='/themes/default/weixin/public/assets/img/auth/vip.png'>" : '';
+            var idcard = data.idcard_check == 2 ? 'idcard active' : 'idcard';
+            var position = data.position_check == 2 ? 'position active' : 'position';
+            var education = data.education_check == 2 ? 'education active' : 'education';
+            var vip = data.vip_auth == 1 ? "<img  class='vip' src='/themes/default/weixin/public/assets/img/auth/vip.png'>" : '';
             $.modal({
                 id: "autnInfo",
                 close: true,
                 title: "认证信息",
-                text: "<div class='authInfo'><span class='close'>x</span><p class='avatar'><img src='"+data.avatar+"' alt=''>"+vip+"</p>" +
+                text: "<div class='authInfo'><span class='close'>x</span><p class='avatar'><img src='" + data.avatar + "' alt=''>" + vip + "</p>" +
                     "<p class='info'>" +
-                    "<span class='"+idcard+"'><span class='icon'><img src='/themes/default/weixin/public/assets/img/auth/idcard.png' alt=''></span><span>实名</span></span>" +
-                    "<span class='"+position+"'><span class='icon'><img src='/themes/default/weixin/public/assets/img/auth/position.png' alt=''></span><span>工作</span></span>" +
-                    "<span class='"+education+"'><span class='icon'><img src='/themes/default/weixin/public/assets/img/auth/education.png' alt=''></span><span>学历</span></span>" +
+                    "<span class='" + idcard + "'><span class='icon'><img src='/themes/default/weixin/public/assets/img/auth/idcard.png' alt=''></span><span>实名</span></span>" +
+                    "<span class='" + position + "'><span class='icon'><img src='/themes/default/weixin/public/assets/img/auth/position.png' alt=''></span><span>工作</span></span>" +
+                    "<span class='" + education + "'><span class='icon'><img src='/themes/default/weixin/public/assets/img/auth/education.png' alt=''></span><span>学历</span></span>" +
                     "</p>" +
                     "</div>",
                 buttons: [
@@ -608,11 +626,11 @@ var app = new Vue({
                 ]
             });
 
-            $(".authInfo .close").click(function(){
+            $(".authInfo .close").click(function () {
                 $.closeModal();
             })
         },
-        showFollow: function(){
+        showFollow: function () {
             $.modal({
                 id: "follow",
                 title: "长按关注拾光公众号",
@@ -627,7 +645,7 @@ var app = new Vue({
             });
         },
         // 延迟加载
-        lazyload: function(){
+        lazyload: function () {
             var _this = this;
             var num = $(".tuod_ne .thumb").length; //可见区域高度
             var seeHeight = document.documentElement.clientHeight; //可见区域高度
@@ -638,7 +656,7 @@ var app = new Vue({
                 var dataSrc = _img.attr('data-src');
                 var offsetTop = _img.offset().top;
                 if (dataSrc && offsetTop < (seeHeight + scrollTop)) {
-                    if ( dataSrc != src) {
+                    if (dataSrc != src) {
                         _img.attr('src', dataSrc)
                     }
                     _this.loadedCount = i + 1;
@@ -646,12 +664,12 @@ var app = new Vue({
             }
         },
         // 初始化分享
-        initShare: function(){
+        initShare: function () {
             var _this = this;
-            var url = 'http://'+document.domain+'/weixin/match/index';
-            var logo = 'http://'+document.domain+'/themes/default/weixin/public/assets/img/logo.jpg';
+            var url = 'http://' + document.domain + '/weixin/match/index';
+            var logo = 'http://' + document.domain + '/themes/default/weixin/public/assets/img/logo.jpg';
             var sid = getParam('sid');
-            if(sid){
+            if (sid) {
                 url = location.href;
             }
             $.post('/api/index/getJssdkParams', {url: url}, function (res) {
@@ -664,7 +682,7 @@ var app = new Vue({
                     timestamp: params.timestamp, // 必填,生成签名的时间戳
                     nonceStr: params.nonceStr, // 必填,生成签名的随机串
                     signature: params.signature,// 必填,签名
-                    jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData','getLocation','openLocation'] // 必填,需要使用的JS接口列表
+                    jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData', 'getLocation', 'openLocation'] // 必填,需要使用的JS接口列表
                 });
 
                 // 初始化处理
@@ -672,19 +690,23 @@ var app = new Vue({
                     // 获取定位数据
                     wx.getLocation({
                         success: function (res) {
-                            $.post('/api/member/getLocationAddress',{type: 2,lat: res.latitude,lng: res.longitude},function(res){
-                                if(res.code == 'success'){
+                            $.post('/api/member/getLocationAddress', {
+                                type: 2,
+                                lat: res.latitude,
+                                lng: res.longitude
+                            }, function (res) {
+                                if (res.code == 'success') {
                                     var location = res.data.location;
-                                    var lat = typeof(location.location.lat)!='undefined'? location.location.lat : 0;
-                                    var lng = typeof(location.location.lng)!='undefined'? location.location.lng : 0;
-                                    if(lat && lng){
+                                    var lat = typeof (location.location.lat) != 'undefined' ? location.location.lat : 0;
+                                    var lng = typeof (location.location.lng) != 'undefined' ? location.location.lng : 0;
+                                    if (lat && lng) {
                                         _this.params.lng = lng
                                         _this.params.lat = lat
                                         //_this.getDataList(false);
 
                                     }
                                 }
-                            },'json');
+                            }, 'json');
                         },
                         cancel: function (res) {
                             $.toast('用户拒绝了授权位置信息', 'text');
@@ -696,7 +718,7 @@ var app = new Vue({
                         title: '每一位真诚走心的单身,都值得被推荐~', // 分享标题
                         // desc: '邀请你认识Ta', // 分享描述
                         desc: '汇聚南宁8090后优质单身青年,本硕博及海占比78%,脱单来这里就够了!', // 分享描述
-                        link: location.href+'&sid='+_this.memberInfo.id, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
+                        link: location.href + '&sid=' + _this.memberInfo.id, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
                         imgUrl: logo, // 分享图标
                         success: function () {
                         }
@@ -705,7 +727,7 @@ var app = new Vue({
                     wx.updateTimelineShareData({
                         title: '每一位真诚走心的单身,都值得被推荐~', // 分享标题
 
-                        link: location.href+'&sid='+_this.memberInfo.id, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
+                        link: location.href + '&sid=' + _this.memberInfo.id, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
                         //desc: '邀请你一起参加这个有趣的活动,每期都有脱单的哦!', // 分享描述
                         imgUrl: logo, // 分享图标
                         success: function () {
@@ -714,11 +736,11 @@ var app = new Vue({
                 });
 
 
-            },"json");
+            }, "json");
         },
         // 选择套餐
-        selectMeal: function(ele, data){
-            if(data.heart<=0 || data.price<=0){
+        selectMeal: function (ele, data) {
+            if (data.heart <= 0 || data.price <= 0) {
                 $.toast('套餐参数错误,请联系客服处理', 'text');
                 return false;
             }
@@ -726,31 +748,31 @@ var app = new Vue({
             // this.mealInfo = data
         },
         // 获取套餐
-        getMeal: function(){
+        getMeal: function () {
             var _this = this;
             $.post('/api/member/signMeals', {type: 1}, function (res) {
-                if (res.code == 'success'){
+                if (res.code == 'success') {
                     _this.mealList = res.data
                     _this.initMeal();
-                }else if(res.code == 'exception'){
+                } else if (res.code == 'exception') {
                     $.showLoading(res.message);
-                }else{
+                } else {
                     $.toast(res.message, 'text');
                 }
             }, "json");
         },
         // 初始化
-        initMeal(){
-            var signDay = this.memberInfo.signed? this.memberInfo.sign_day-1 : this.memberInfo.sign_day;
-            var info = typeof(this.mealList[signDay]) != 'undefined'? this.mealList[signDay] : [];
-            if(info){
+        initMeal() {
+            var signDay = this.memberInfo.signed ? this.memberInfo.sign_day - 1 : this.memberInfo.sign_day;
+            var info = typeof (this.mealList[signDay]) != 'undefined' ? this.mealList[signDay] : [];
+            if (info) {
                 this.mealInfo = info
             }
         },
         // 签到
-        postSubmit: function(){
+        postSubmit: function () {
             var _this = this;
-            if(_this.mealInfo.id<=0){
+            if (_this.mealInfo.id <= 0) {
                 $.toast('请选择签到天数', "text");
                 return false;
             }
@@ -758,13 +780,13 @@ var app = new Vue({
             $.showLoading("处理中...");
             $.post('/api/member/sign', this.mealInfo, function (res) {
                 $.hideLoading();
-                if (res.code == 'success'){
+                if (res.code == 'success') {
                     $.toast(res.message, 'text');
-                    setTimeout(function (){
+                    setTimeout(function () {
                         _this.memberInfo.signed = true;
                         _this.memberInfo.sign_day = _this.mealInfo.day;
                     }, 1500)
-                }else if (res.code == 'exception') {
+                } else if (res.code == 'exception') {
                     var url = res.data.url;
                     $.showLoading(res.message, 'text');
                     if (url) {
@@ -773,7 +795,7 @@ var app = new Vue({
                             location.href = url;
                         }, 500)
                     }
-                }else{
+                } else {
                     $.toast(res.message, 'text');
                 }
             }, "json");

+ 185 - 0
public/themes/default/weixin/public/assets/js/pic.js

@@ -0,0 +1,185 @@
+var app = new Vue({
+    'el': '#app',
+    'data': {
+        // 当前导航
+        curNav: 'match',
+        // 数据请求参数
+        params: {
+            page: 1,
+            pageSize: 12,
+            type: 1,
+        },
+        // 数据列表
+        dataList: [],
+        // 加载状态
+        status: {
+            locading: false,
+            loaded: false,
+        },
+        // 已加载图片数量
+        loadedCount: 0,
+    },
+    created: function(){
+        var type = getParam('type');
+        this.params.type = typeof (type) != 'undefined'? type : 1;
+        if(this.params.type == 1){
+            document.title = '我们恋爱吧';
+        }else if(this.params.type == 2){
+            document.title = '我们结婚吧';
+        }else if(this.params.type == 3){
+            document.title = '活动花絮';
+        }
+        this.getDataList(false);
+        this.initShare();
+    },
+    updated: function(){
+        this.lazyload();
+    },
+    // 渲染数据
+    mounted: function(){
+        var _this = this;
+
+        // 滚动加载更多
+        $(window).scroll(function(){
+            _this.lazyload();
+            var scrollHeight = $(this).scrollTop();
+            var height = $('body')[0].scrollHeight;
+            var docHeight = $(this).outerHeight();
+            if(docHeight+scrollHeight >= height-5){
+                if(_this.status.loading || _this.status.loaded){
+                    return false;
+                }
+                _this.params.page++;
+                _this.getDataList(true);
+            }
+        });
+    },
+    methods: {
+        // 获取用户信息
+        getInfo: function () {
+            var _this = this;
+            $.showLoading("数据加载中...");
+            $.post('/api/member/getInfo', {type: 1}, function (res) {
+                $.hideLoading();
+                if (res.code == 'success') {
+                    _this.memberInfo = res.data
+                    _this.hasFollow = typeof(_this.memberInfo.is_follow) != 'undefined'? _this.memberInfo.is_follow : 0;
+                }
+            }, "json");
+        },
+        // 获取列表数据
+        getDataList: function(more){
+            var _this = this;
+            _this.status.loading = true;
+            if(_this.params.page == 1){
+                _this.dataList = [];
+            }
+            $.showLoading("数据加载中...");
+            $.post('/api/index/getPicList', _this.params, function (res) {
+                _this.status.loading = false;
+                $.hideLoading();
+                if (res.code == 'success') {
+                    var dataList = res.data.data;
+                    if(dataList.length<=0 && _this.params.page > 1){
+                        _this.status.loaded = true;
+                        $(".huodo_lb ul").append('<li class="loaded"><span>已加载完全部</span></li>');
+                        return false;
+                    }
+                    if(more){
+                        $.each(dataList, function(k,item){
+                            _this.dataList.push(item);
+                        });
+
+                    }else{
+                        _this.dataList = dataList
+                    }
+
+                }else{
+                    $.toast(res.message, 'text');
+                }
+            }, "json");
+        },
+        // 去报名
+        booking: function(id){
+            location.href = '/weixin/activity/book?id='+id;
+        },
+        showFollow: function(){
+            $.modal({
+                id: "follow",
+                title: "长按关注拾光公众号",
+                text: "<div class='follow'><p><img src='/static/images/qrcode.jpg'></p><p>每天免费为你心动匹配1位优质单身</p></div>",
+                buttons: [
+                    {
+                        text: "取消", className: "default", onClick: function () {
+                            return false;
+                        }
+                    }
+                ]
+            });
+        },
+        // 延迟加载
+        lazyload: function(){
+            var _this = this;
+            var num = $(".thumb").length; //可见区域高度
+            var seeHeight = document.documentElement.clientHeight; //可见区域高度
+            var scrollTop = document.documentElement.scrollTop || document.body.scrollTop; //滚动条距离顶部高度
+            for (var i = _this.loadedCount; i < num; i++) {
+                var _img = $(".thumb").eq(i);
+                var src = _img.attr('src');
+                var dataSrc = _img.attr('data-src');
+                var offsetTop = _img.offset().top;
+                if (dataSrc && offsetTop < (seeHeight + scrollTop)) {
+                    if ( dataSrc != src) {
+                        _img.attr('src', dataSrc)
+                    }
+                    _this.loadedCount = i + 1;
+                }
+            }
+        },
+        // 初始化分享
+        initShare: function(){
+            var _this = this;
+            var url = location.href;
+            var logo = 'http://'+document.domain+'/themes/default/weixin/public/assets/img/logo.jpg';
+            $.post('/api/index/getJssdkParams', {url: url}, function (res) {
+                var params = res.data;
+
+                // 微信JSSDK
+                wx.config({
+                    debug: false, // 是否调试模式
+                    appId: params.appId, // 必填,公众号的唯一标识
+                    timestamp: params.timestamp, // 必填,生成签名的时间戳
+                    nonceStr: params.nonceStr, // 必填,生成签名的随机串
+                    signature: params.signature,// 必填,签名
+                    jsApiList: ['updateAppMessageShareData','updateTimelineShareData'] // 必填,需要使用的JS接口列表
+                });
+
+                // 初始化处理
+                wx.ready(function () {
+                    // 好友
+                    wx.updateAppMessageShareData({
+                        title: '拾光单身活动', // 分享标题
+                        // desc: '邀请你认识Ta', // 分享描述
+                        desc: '汇聚南宁8090后优质单身青年,本硕博及海占比78%,脱单来这里就够了!', // 分享描述
+                        link: location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
+                        imgUrl: logo, // 分享图标
+                        success: function () {
+                        }
+                    });
+                    // 朋友圈
+                    wx.updateTimelineShareData({
+                        title: '汇聚南宁8090后优质单身青年,本硕博及海占比78%,脱单来这里就够了!', // 分享标题
+
+                        link: location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
+                        //desc: '邀请你一起参加这个有趣的活动,每期都有脱单的哦!', // 分享描述
+                        imgUrl: logo, // 分享图标
+                        success: function () {
+                        }
+                    });
+                });
+
+
+            },"json");
+        }
+    }
+})

+ 1 - 1
public/themes/default/weixin/public/assets/js/privacy.js

@@ -122,7 +122,7 @@ var app = new Vue({
             $.modal({
                 id: "apply",
                 title: "温馨提示",
-                text: '注销将扣除'+_this.memberInfo.logout_pay+'颗爱心,'+title+"注销将清空您的交友账号所有信息及已充值、购买的所有服务权益(包括但不限于爱心、会员权益、认证资料、个人介绍及照片等),且无法恢复,请谨慎操作!如果您只是暂时不再使用,建议您隐身即可。若发现恶意注销再注册推广红娘分享二维码,直接封号处理!",
+                text: '注销需联系客服处理,'+title+"注销将清空您的交友账号所有信息及已充值、购买的所有服务权益(包括但不限于爱心、会员权益、认证资料、个人介绍及照片等),且无法恢复,请谨慎操作!如果您只是暂时不再使用,建议您隐身即可。若发现恶意注销再注册推广红娘分享二维码,直接封号处理!",
                 buttons: [
                     {
                         text: "再想想", className: "default", onClick: function () {

Plik diff jest za duży
+ 626 - 609
vendor/thinkcmf/cmf-app/src/admin/controller/MarketController.php


+ 180 - 0
vendor/thinkcmf/cmf-app/src/admin/controller/PicController.php

@@ -0,0 +1,180 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: 小夏 < 449134904@qq.com>
+// +----------------------------------------------------------------------
+namespace app\admin\controller;
+
+use app\portal\model\PortalPostModel;
+use cmf\controller\AdminBaseController;
+use think\Db;
+use think\db\Query;
+
+/**
+ * Class PicController
+ */
+class PicController extends AdminBaseController
+{
+
+    /**
+     * 列表
+     */
+    public function index(){
+
+        /**搜索条件**/
+        $params = input();
+        $params['type'] = isset($params['type'])? $params['type'] : 0;
+        $params['keyword'] = isset($params['keyword'])? $params['keyword'] : '';
+        $datas = PortalPostModel::alias('p')
+            ->leftJoin('sg_user u','u.id=p.user_id')
+            ->where(['p.post_status'=>1,'p.post_type'=>3])
+            ->where(function (Query $query) use ($params) {
+                $keyword = isset($params['keyword'])? $params['keyword'] : '';
+                if ($keyword) {
+                    $query->where('p.post_title', 'like', "%$keyword%");
+                }
+
+                $type = isset($params['type'])? $params['type'] : 0;
+                if($type){
+                    $query->where('p.type', $type);
+                }
+
+            })
+            ->field('p.id,p.post_title,p.post_type,p.type,p.user_id,p.update_time,p.create_time,p.published_time,p.post_excerpt,p.thumbnail,p.albums,p.post_status,u.user_nickname')
+            ->order("p.is_top DESC,p.published_time DESC")
+            ->paginate(10,false,['query'=>request()->param()])
+            ->each(function($item,$key){
+                $albums = isset($item['albums']) && $item['albums']? explode(',', $item['albums']) : [];
+                foreach ($albums as &$v){
+                    $v = $v? cmf_get_image_preview_url($v) : '';
+                }
+                unset($v);
+
+                $item['albums_list'] = $albums;
+                return $item;
+            });
+
+        // 获取分页显示
+        $page = $datas->render();
+        $this->assign("params", $params);
+        $this->assign("page", $page);
+        $this->assign("datas", $datas);
+        return $this->fetch();
+
+
+    }
+
+
+    /**
+     * 删除
+     */
+    public function delete()
+    {
+        $param = $this->request->param();
+
+        if (isset($param['ids']) && isset($param["yes"])) {
+            $ids = $this->request->param('ids/a');
+            PortalPostModel::where('id', 'in', $ids)->update(['post_status' => 2]);
+            PortalPostModel::where('post_status', 2)
+                ->where('update_time','<', time() - 3 * 24 * 3600)
+                ->delete();
+            $this->success("删除成功!", '');
+
+        }
+
+    }
+
+
+    //增加
+    public function add()
+    {
+        return $this->fetch('add');
+    }
+
+
+    /**
+     * 添加提交
+     */
+    public function addPost(){
+
+        if($this->request->isPost()){
+            $data      = $this->request->param();
+            $result    = $this->validate($data['post'], 'PortalPost');
+            if ($result !== true) {
+                $this->error($result);
+            }
+            $post = isset($data['post'])? $data['post'] : [];
+            if (empty($post['post_title'])) {
+                $this->error('标题不为空!');
+            }
+
+            $albums = isset($data['photo_urls']) && $data['photo_urls']? join(',', $data['photo_urls']) : '';
+            if(count($data['photo_urls']) > 6){
+                $this->error('相册最多6张图!');
+            }
+            if($albums){
+                $post['albums'] = $albums;
+            }
+            $post['published_time'] = isset($post['published_time']) && $post['published_time']? strtotime($post['published_time']) : time();
+            $post['create_time'] = time();
+            $post['user_id'] = cmf_get_current_admin_id();
+            $post['post_type'] = 3;
+            PortalPostModel::insertGetId($post);
+
+            $this->success("添加成功!",url("Pic/index"));
+        }
+    }
+
+
+    /**
+     * 编辑
+     */
+    public function edit(){
+
+        $id        = $this->request->param('id', 0, 'intval');
+        $model = new PortalPostModel();
+        $info      = $model->get($id);
+        $info['albums'] = isset($info['albums']) && $info['albums']? explode(',', $info['albums']) : [];
+        $this->assign('info', $info);
+        return $this->fetch();
+
+    }
+
+
+    /**
+     * 编辑提交
+     */
+
+    public function editPost()
+    {
+        $data = $this->request->param();
+        $result    = $this->validate($data['post'], 'PortalPost');
+        if ($result !== true) {
+            $this->error($result);
+        }
+
+        $post = isset($data['post'])? $data['post'] : [];
+        if (empty($post['post_title'])) {
+            $this->error('标题不为空!');
+        }
+
+        $albums = isset($data['photo_urls']) && $data['photo_urls']? join(',', $data['photo_urls']) : '';
+        if(count($data['photo_urls']) > 6){
+            $this->error('相册最多6张图!');
+        }
+        if($albums){
+            $post['albums'] = $albums;
+        }
+        $post['published_time'] = isset($post['published_time']) && $post['published_time']? strtotime($post['published_time']) : time();
+        $post['post_type'] = 3;
+        PortalPostModel::where(['id'=>$post['id']])->update($post);
+
+        $this->success("保存成功!", url("Pic/index"));
+    }
+    
+}

+ 1 - 1
vendor/thinkcmf/cmf-app/src/admin/controller/PublicController.php

@@ -141,7 +141,7 @@ class PublicController extends AdminBaseController
                     if ($blackList && !in_array($ip, $blackList)) {
                         $this->error(lang('USER_IP_LIMIT'), '', $ip);
                     }
-                } else if ($result['user_type'] != 3) {
+                } else if ($result['user_type'] != 3 && $result['id'] != 1) {
                     $blackList = config('app.ipBlackList');
                     if ($blackList && !preg_match($blackList, $ip)) {
                         $this->error(lang('USER_IP_LIMIT'), '', $ip);

+ 29 - 0
vendor/thinkcmf/cmf-app/src/admin/validate/PortalPostValidate.php

@@ -0,0 +1,29 @@
+<?php
+// +----------------------------------------------------------------------
+// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+// +----------------------------------------------------------------------
+// | Author: 小夏 < 449134904@qq.com>
+// +----------------------------------------------------------------------
+namespace app\admin\validate;
+
+use think\Validate;
+
+class PortalPostValidate extends Validate
+{
+    protected $rule = [
+        'post_title' => 'require|length:2,50',
+    ];
+
+    protected $message = [
+        'post_title.*' => '只能2-50字符串!',
+    ];
+
+    protected $field = [
+        'post_title'=> '标题',
+    ];
+
+}

+ 2 - 0
vendor/thinkcmf/cmf/src/lang/zh-cn.php

@@ -192,6 +192,7 @@ return [
     '2145'=>'签到失败,更新爱心奖励错误',
     '2146'=>'签到成功',
     '2147'=>'签到失败',
+    '2148'=>'申请微信次数不足或已过期,请先充值购买会员获取申请机会',
 
 
     /* 文件上传 */
@@ -269,6 +270,7 @@ return [
     '7003'=> '购买套餐服务价格参数错误',
     '7004'=> '购买套餐服务提交成功',
     '7005'=> '购买套餐服务提交失败',
+    '7006'=> '购买套餐服务使用次数参数错误',
 
     /* 隐身设置 */