后台页面优化

main
home.fengxinyhyl 8 months ago
parent 61459c2ae9
commit 15a189e7a2
  1. 3
      app/common/dao/store/product/SpuDao.php
  2. 8
      app/common/repositories/store/order/StoreOrderRepository.php
  3. 3
      app/controller/admin/order/Order.php
  4. 2
      app/controller/admin/store/StoreProduct.php
  5. 16
      app/controller/api/Auth.php
  6. 4
      app/controller/api/store/product/StoreSpu.php
  7. 2
      public/mer.html
  8. 1
      public/mer/js/chunk-7459c510.67aab081.js
  9. 2
      public/system.html
  10. 3
      route/api.php
  11. 5
      view/admin/src/views/product/productExamine/index.vue

@ -70,6 +70,9 @@ class SpuDao extends BaseDao
->when(isset($where['is_new']) && $where['is_new'] !== '',function($query)use($where){ ->when(isset($where['is_new']) && $where['is_new'] !== '',function($query)use($where){
$query->whereIn('P.is_new',$where['is_new']); $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){ ->when(isset($where['keyword']) && $where['keyword'] !== '',function($query)use($where){
if (is_numeric($where['keyword'])) { if (is_numeric($where['keyword'])) {
$query->whereLike("S.store_name|S.keyword|S.product_id", "%{$where['keyword']}%"); $query->whereLike("S.store_name|S.keyword|S.product_id", "%{$where['keyword']}%");

@ -30,7 +30,9 @@ use app\common\repositories\store\StorePrinterRepository;
use app\common\repositories\store\StoreSeckillActiveRepository; use app\common\repositories\store\StoreSeckillActiveRepository;
use app\common\repositories\system\attachment\AttachmentRepository; use app\common\repositories\system\attachment\AttachmentRepository;
use app\common\repositories\system\merchant\FinancialRecordRepository; 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\MerchantRepository;
use app\common\repositories\system\merchant\MerchantTypeRepository;
use app\common\repositories\system\serve\ServeDumpRepository; use app\common\repositories\system\serve\ServeDumpRepository;
use app\common\repositories\user\UserBillRepository; use app\common\repositories\user\UserBillRepository;
use app\common\repositories\user\UserBrokerageRepository; use app\common\repositories\user\UserBrokerageRepository;
@ -1363,10 +1365,16 @@ class StoreOrderRepository extends BaseRepository
'spread' => function ($query) { 'spread' => function ($query) {
$query->field('uid,nickname,avatar'); $query->field('uid,nickname,avatar');
}, },
'merchant',
] ]
); );
if (!$res) throw new ValidateException('数据不存在'); if (!$res) throw new ValidateException('数据不存在');
$res['integral'] = (int)$res['integral']; $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']); return $res->append(['refund_extension_one', 'refund_extension_two']);
} }

@ -140,6 +140,9 @@ class Order extends BaseController
$data = $this->repository->getOne($id, null); $data = $this->repository->getOne($id, null);
if (!$data) if (!$data)
return app('json')->fail('数据不存在'); return app('json')->fail('数据不存在');
return app('json')->success($data); return app('json')->success($data);
} }

@ -158,7 +158,7 @@ class StoreProduct extends BaseController
*/ */
public function checkParams(validate $validate) 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); $validate->check($data);
return $data; return $data;
} }

@ -20,6 +20,7 @@ use app\common\repositories\system\HuitongRepository;
use app\common\repositories\system\notice\SystemNoticeConfigRepository; use app\common\repositories\system\notice\SystemNoticeConfigRepository;
use app\common\repositories\user\UserAssetsLogRepository; use app\common\repositories\user\UserAssetsLogRepository;
use app\common\repositories\user\UserAssetsRepository; use app\common\repositories\user\UserAssetsRepository;
use app\common\repositories\user\UserGroupRepository;
use app\common\repositories\user\UserRepository; use app\common\repositories\user\UserRepository;
use app\common\repositories\user\UserSignRepository; use app\common\repositories\user\UserSignRepository;
use app\common\repositories\wechat\RoutineQrcodeRepository; use app\common\repositories\wechat\RoutineQrcodeRepository;
@ -155,7 +156,7 @@ class Auth extends BaseController
*/ */
public function userInfo() 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']); $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 = $user->toArray();
$data['total_consume'] = $user['pay_price']; $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']); $assets = app(UserAssetsRepository::class)->assets($data['uid']);
$data['assets'] = $assets; $data['assets'] = $assets;
return app('json')->success($data); return app('json')->success($data);
} }
public function groupList(){
$groupRepository = app(UserGroupRepository::class);
$data = $groupRepository->getList([], 1, 10);
return app('json')->success($data['list']);
}
/** /**
* notes 兑换配置 * notes 兑换配置
* @return mixed * @return mixed

@ -63,6 +63,10 @@ class StoreSpu extends BaseController
]); ]);
$where['is_gift_bag'] = 0; $where['is_gift_bag'] = 0;
$where['product_type'] = 0; $where['product_type'] = 0;
if($limit == 6){
$limit = 10;
$where['is_good'] = 1;
}
$where['order'] = $where['order'] ?: 'star'; $where['order'] = $where['order'] ?: 'star';
if ($where['is_trader'] != 1) unset($where['is_trader']); if ($where['is_trader'] != 1) unset($where['is_trader']);
$data = $this->repository->getApiSearch($where, $page, $limit, $this->userInfo); $data = $this->repository->getApiSearch($where, $page, $limit, $this->userInfo);

File diff suppressed because one or more lines are too long

@ -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:"@comment"}]],blockText:[[/^\s+.*$/,{cases:{"($S2\\s+.*$)":{token:"$S3"},"@default":{token:"@rematch",next:"@popall"}}}],[/./,{token:"@rematch",next:"@popall"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]],string:[[/[^\\"'#]+/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/@escapes/,{cases:{"@eos":{token:"string.escape",next:"@popall"},"@default":"string.escape"}}],[/\\./,{cases:{"@eos":{token:"string.escape.invalid",next:"@popall"},"@default":"string.escape.invalid"}}],[/(#{)([^}]*)(})/,["interpolation.delimiter","interpolation","interpolation.delimiter"]],[/#/,"string"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":{token:"string"}}}]],value:[[/[^\\"']+/,{cases:{"@eos":{token:"attribute.value",next:"@popall"},"@default":"attribute.value"}}],[/\\./,{cases:{"@eos":{token:"attribute.value",next:"@popall"},"@default":"attribute.value"}}],[/["']/,{cases:{"$#==$S2":{token:"attribute.value",next:"@pop"},"@default":{token:"attribute.value"}}}]]}}}}]);

File diff suppressed because one or more lines are too long

@ -40,6 +40,9 @@ Route::group('api/', function () {
//用户信息 //用户信息
Route::get('user', 'api.Auth/userInfo'); Route::get('user', 'api.Auth/userInfo');
//用户信息
Route::get('user/group', 'api.Auth/groupList');
//绑定推荐人 //绑定推荐人
Route::post('user/spread', 'api.Auth/spread'); Route::post('user/spread', 'api.Auth/spread');

@ -188,6 +188,9 @@
<el-rate class="rate_star" v-model="formValidate.star" :colors="colors" style="margin-top: 4px;"></el-rate> <el-rate class="rate_star" v-model="formValidate.star" :colors="colors" style="margin-top: 4px;"></el-rate>
<span style="margin-top: 4px; font-size: 12px;">备注5星为最高推荐级别1星为最低推荐级别设置后会在商城商品列表搜索商品列表中体现</span> <span style="margin-top: 4px; font-size: 12px;">备注5星为最高推荐级别1星为最低推荐级别设置后会在商城商品列表搜索商品列表中体现</span>
</el-form-item> </el-form-item>
<el-form-item label="首页推荐:">
<el-switch v-model="formValidate.is_good" active-text="" inactive-text="" :active-value="1" :inactive-value="0" style="width: 100px" />
</el-form-item>
<el-form-item label="惠通分类:"> <el-form-item label="惠通分类:">
<el-checkbox-group v-model="checkboxGroup" size="small" @change="onChangeGroup"> <el-checkbox-group v-model="checkboxGroup" size="small" @change="onChangeGroup">
<el-checkbox v-for="(item, index) in recommend" :key="index" :label="item.value">{{ item.name }}</el-checkbox> <el-checkbox v-for="(item, index) in recommend" :key="index" :label="item.value">{{ item.name }}</el-checkbox>
@ -361,6 +364,7 @@ export default {
is_best: 0, is_best: 0,
is_new: 0, is_new: 0,
is_benefit: 0, is_benefit: 0,
is_good: 0,
ficti: 0, ficti: 0,
content: '', content: '',
store_name: '', store_name: '',
@ -523,6 +527,7 @@ export default {
is_best: info.is_best, is_best: info.is_best,
is_new: info.is_new, is_new: info.is_new,
is_benefit: info.is_benefit, is_benefit: info.is_benefit,
is_good: info.is_good,
ficti: info.ficti, ficti: info.ficti,
content: info.content, content: info.content,
store_name: info.store_name, store_name: info.store_name,

Loading…
Cancel
Save