hrjy 3 years ago
parent
commit
034ffb56a8

+ 0 - 7
app/admin/controller/wechat/index.php

@@ -1,7 +0,0 @@
-<?php
-/**
- * Created by PhpStorm.
- * User: Administrator
- * Date: 2018/4/18 0018
- * Time: 上午 10:44
- */

+ 5 - 0
app/admin/model/user/UserLevel.php

@@ -73,6 +73,11 @@ class UserLevel extends BaseModel
         self::rollbackTrans();
         self::rollbackTrans();
         $res = false !== self::where('uid', $uid)->update(['is_del' => 1]);
         $res = false !== self::where('uid', $uid)->update(['is_del' => 1]);
         $res = $res && UserTaskFinish::where('uid', $uid)->delete();
         $res = $res && UserTaskFinish::where('uid', $uid)->delete();
+        if (!$res){
+            $res = User::where('uid', $uid)->update(['level' => 0]);
+        }else{
+            $res = User::where('uid', $uid)->update(['level' => 0]);
+        }
         if ($res) {
         if ($res) {
             User::where('uid', $uid)->update(['clean_time' => time()]);
             User::where('uid', $uid)->update(['clean_time' => time()]);
             self::commitTrans();
             self::commitTrans();

+ 4 - 0
app/api/controller/store/StoreProductController.php

@@ -126,6 +126,10 @@ class StoreProductController
     public function detail(Request $request, $id, $type = 0)
     public function detail(Request $request, $id, $type = 0)
     {
     {
         if (!$id || !($storeInfo = StoreProduct::getValidProduct($id))) return app('json')->fail('商品不存在或已下架');
         if (!$id || !($storeInfo = StoreProduct::getValidProduct($id))) return app('json')->fail('商品不存在或已下架');
+        $puid = $request->post('spread', 0);
+        if ($puid){
+            User::setSpread($puid, $request->uid());
+        }
         $siteUrl = sys_config('site_url');
         $siteUrl = sys_config('site_url');
         $storeInfo['image'] = set_file_url($storeInfo['image'], $siteUrl);
         $storeInfo['image'] = set_file_url($storeInfo['image'], $siteUrl);
         $storeInfo['image_base'] = set_file_url($storeInfo['image'], $siteUrl);
         $storeInfo['image_base'] = set_file_url($storeInfo['image'], $siteUrl);

+ 4 - 4
app/api/controller/user/UserBillController.php

@@ -303,12 +303,12 @@ class UserBillController
                         ),
                         ),
                         'text' => array(
                         'text' => array(
                             array(
                             array(
-                                'text' => '',
-                                'left' => 250,
-                                'top' => 840,
+                                'text' => $user['nickname'],
+                                'left' => 295,
+                                'top' => 895,
                                 'fontPath' => $rootPath . 'public' . DS . $filelink['Bold'],     //字体文件
                                 'fontPath' => $rootPath . 'public' . DS . $filelink['Bold'],     //字体文件
                                 'fontSize' => 16,             //字号
                                 'fontSize' => 16,             //字号
-                                'fontColor' => '40,40,40',       //字体颜色
+                                'fontColor' => '250,0,0',       //字体颜色
                                 'angle' => 0,
                                 'angle' => 0,
                             ),
                             ),
                             array(
                             array(