diff --git a/app/common/dao/store/product/SpuDao.php b/app/common/dao/store/product/SpuDao.php index 31dbdd6..545d79e 100644 --- a/app/common/dao/store/product/SpuDao.php +++ b/app/common/dao/store/product/SpuDao.php @@ -70,6 +70,9 @@ class SpuDao extends BaseDao ->when(isset($where['is_new']) && $where['is_new'] !== '',function($query)use($where){ $query->whereIn('P.is_new',$where['is_new']); }) + ->when(isset($where['is_good']) && $where['is_good'] !== '',function($query)use($where){ + $query->where('P.is_good',$where['is_good']); + }) ->when(isset($where['keyword']) && $where['keyword'] !== '',function($query)use($where){ if (is_numeric($where['keyword'])) { $query->whereLike("S.store_name|S.keyword|S.product_id", "%{$where['keyword']}%"); diff --git a/app/common/repositories/store/order/StoreOrderRepository.php b/app/common/repositories/store/order/StoreOrderRepository.php index 5b2b9f8..3fb8ad7 100644 --- a/app/common/repositories/store/order/StoreOrderRepository.php +++ b/app/common/repositories/store/order/StoreOrderRepository.php @@ -30,7 +30,9 @@ use app\common\repositories\store\StorePrinterRepository; use app\common\repositories\store\StoreSeckillActiveRepository; use app\common\repositories\system\attachment\AttachmentRepository; use app\common\repositories\system\merchant\FinancialRecordRepository; +use app\common\repositories\system\merchant\MerchantCategoryRepository; use app\common\repositories\system\merchant\MerchantRepository; +use app\common\repositories\system\merchant\MerchantTypeRepository; use app\common\repositories\system\serve\ServeDumpRepository; use app\common\repositories\user\UserBillRepository; use app\common\repositories\user\UserBrokerageRepository; @@ -1363,10 +1365,16 @@ class StoreOrderRepository extends BaseRepository 'spread' => function ($query) { $query->field('uid,nickname,avatar'); }, + 'merchant', ] ); if (!$res) throw new ValidateException('数据不存在'); $res['integral'] = (int)$res['integral']; + + $typeList = app(MerchantTypeRepository::class)->getSelect(); + $typeList = array_column($typeList, 'type_name', 'mer_type_id'); + $res['merchant']['type_name'] = $typeList[$res['merchant']['type_id']] ?? ''; + return $res->append(['refund_extension_one', 'refund_extension_two']); } diff --git a/app/controller/admin/order/Order.php b/app/controller/admin/order/Order.php index e505071..801cbc2 100644 --- a/app/controller/admin/order/Order.php +++ b/app/controller/admin/order/Order.php @@ -140,6 +140,9 @@ class Order extends BaseController $data = $this->repository->getOne($id, null); if (!$data) return app('json')->fail('数据不存在'); + + + return app('json')->success($data); } diff --git a/app/controller/admin/store/StoreProduct.php b/app/controller/admin/store/StoreProduct.php index 98d7891..cae1b09 100755 --- a/app/controller/admin/store/StoreProduct.php +++ b/app/controller/admin/store/StoreProduct.php @@ -158,7 +158,7 @@ class StoreProduct extends BaseController */ public function checkParams(validate $validate) { - $data = $this->request->params(['is_hot','is_best','is_benefit','is_new','store_name','content','rank','star', 'base', 'cash_rate', 'commission_rate']); + $data = $this->request->params(['is_hot','is_best','is_benefit','is_new','is_good','store_name','content','rank','star', 'base', 'cash_rate', 'commission_rate']); $validate->check($data); return $data; } diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index b995c0d..e921907 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -20,6 +20,7 @@ use app\common\repositories\system\HuitongRepository; use app\common\repositories\system\notice\SystemNoticeConfigRepository; use app\common\repositories\user\UserAssetsLogRepository; use app\common\repositories\user\UserAssetsRepository; +use app\common\repositories\user\UserGroupRepository; use app\common\repositories\user\UserRepository; use app\common\repositories\user\UserSignRepository; use app\common\repositories\wechat\RoutineQrcodeRepository; @@ -155,7 +156,7 @@ class Auth extends BaseController */ public function userInfo() { - $user = $this->request->userInfo()->hidden(['label_id', 'group_id', 'pwd', 'addres', 'card_id', 'last_time', 'last_ip', 'create_time', 'mark', 'status', 'spread_uid', 'spread_time', 'real_name', 'birthday', 'brokerage_price']); + $user = $this->request->userInfo()->hidden(['label_id', 'pwd', 'addres', 'card_id', 'last_time', 'last_ip', 'create_time', 'mark', 'status', 'spread_uid', 'spread_time', 'real_name', 'birthday', 'brokerage_price']); $user->append(['service', 'topService', 'total_collect_product', 'total_collect_store', 'total_coupon', 'total_visit_product', 'total_unread', 'total_recharge', 'lock_integral', 'total_integral']); $data = $user->toArray(); $data['total_consume'] = $user['pay_price']; @@ -178,12 +179,25 @@ class Auth extends BaseController } } + $groupRepository = app(UserGroupRepository::class); + $groupData = $groupRepository->getList([], 1, 10); + + $groupList = array_column($groupData['list']->toArray(), 'group_name', 'group_id'); + $data['group_name'] = $groupList[$data['group_id']] ?? ''; + // 用户资产 $assets = app(UserAssetsRepository::class)->assets($data['uid']); $data['assets'] = $assets; return app('json')->success($data); } + + public function groupList(){ + $groupRepository = app(UserGroupRepository::class); + $data = $groupRepository->getList([], 1, 10); + return app('json')->success($data['list']); + } + /** * notes 兑换配置 * @return mixed diff --git a/app/controller/api/store/product/StoreSpu.php b/app/controller/api/store/product/StoreSpu.php index de1055d..366e427 100644 --- a/app/controller/api/store/product/StoreSpu.php +++ b/app/controller/api/store/product/StoreSpu.php @@ -63,6 +63,10 @@ class StoreSpu extends BaseController ]); $where['is_gift_bag'] = 0; $where['product_type'] = 0; + if($limit == 6){ + $limit = 10; + $where['is_good'] = 1; + } $where['order'] = $where['order'] ?: 'star'; if ($where['is_trader'] != 1) unset($where['is_trader']); $data = $this->repository->getApiSearch($where, $page, $limit, $this->userInfo); diff --git a/public/mer.html b/public/mer.html index 34936e3..595062b 100644 --- a/public/mer.html +++ b/public/mer.html @@ -1 +1 @@ -加载中...
\ No newline at end of file +加载中...
\ No newline at end of file diff --git a/public/mer/js/chunk-7459c510.67aab081.js b/public/mer/js/chunk-7459c510.67aab081.js deleted file mode 100644 index 8041373..0000000 --- a/public/mer/js/chunk-7459c510.67aab081.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7459c510"],{"23e02":function(e,t,n){"use strict";n.r(t),n.d(t,"conf",(function(){return o})),n.d(t,"language",(function(){return a}));var o={comments:{lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}],folding:{offSide:!0}},a={defaultToken:"",tokenPostfix:".pug",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["append","block","case","default","doctype","each","else","extends","for","if","in","include","mixin","typeof","unless","var","when"],tags:["a","abbr","acronym","address","area","article","aside","audio","b","base","basefont","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","keygen","kbd","label","li","link","map","mark","menu","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","tracks","tt","u","ul","video","wbr"],symbols:/[\+\-\*\%\&\|\!\=\/\.\,\:]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^(\s*)([a-zA-Z_-][\w-]*)/,{cases:{"$2@tags":{cases:{"@eos":["","tag"],"@default":["",{token:"tag",next:"@tag.$1"}]}},"$2@keywords":["",{token:"keyword.$2"}],"@default":["",""]}}],[/^(\s*)(#[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.id"],"@default":["",{token:"tag.id",next:"@tag.$1"}]}}],[/^(\s*)(\.[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.class"],"@default":["",{token:"tag.class",next:"@tag.$1"}]}}],[/^(\s*)(\|.*)$/,""],{include:"@whitespace"},[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":""}}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d+/,"number"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],tag:[[/(\.)(\s*$)/,[{token:"delimiter",next:"@blockText.$S2."},""]],[/\s+/,{token:"",next:"@simpleText"}],[/#[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.id",next:"@pop"},"@default":"tag.id"}}],[/\.[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.class",next:"@pop"},"@default":"tag.class"}}],[/\(/,{token:"delimiter.parenthesis",next:"@attributeList"}]],simpleText:[[/[^#]+$/,{token:"",next:"@popall"}],[/[^#]+/,{token:""}],[/(#{)([^}]*)(})/,{cases:{"@eos":["interpolation.delimiter","interpolation",{token:"interpolation.delimiter",next:"@popall"}],"@default":["interpolation.delimiter","interpolation","interpolation.delimiter"]}}],[/#$/,{token:"",next:"@popall"}],[/#/,""]],attributeList:[[/\s+/,""],[/(\w+)(\s*=\s*)("|')/,["attribute.name","delimiter",{token:"attribute.value",next:"@value.$3"}]],[/\w+/,"attribute.name"],[/,/,{cases:{"@eos":{token:"attribute.delimiter",next:"@popall"},"@default":"attribute.delimiter"}}],[/\)$/,{token:"delimiter.parenthesis",next:"@popall"}],[/\)/,{token:"delimiter.parenthesis",next:"@pop"}]],whitespace:[[/^(\s*)(\/\/.*)$/,{token:"comment",next:"@blockText.$1.comment"}],[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/