diff --git a/app/common/model/system/supplychain/SupplyChain.php b/app/common/model/system/supplychain/SupplyChain.php index 70139318..c557efe3 100644 --- a/app/common/model/system/supplychain/SupplyChain.php +++ b/app/common/model/system/supplychain/SupplyChain.php @@ -21,6 +21,7 @@ class SupplyChain extends BaseModel // 设置当前模型的数据库连接 protected $connection = 'nongke'; + protected $table = 'fa_supply_chain'; /** * @return string diff --git a/app/common/model/system/supplychain/SupplyChainLinkMerchant.php b/app/common/model/system/supplychain/SupplyChainLinkMerchant.php index 1461e960..c81c2473 100644 --- a/app/common/model/system/supplychain/SupplyChainLinkMerchant.php +++ b/app/common/model/system/supplychain/SupplyChainLinkMerchant.php @@ -22,7 +22,7 @@ class SupplyChainLinkMerchant extends BaseModel // 设置当前模型的数据库连接 protected $connection = 'nongke'; - + protected $table = 'fa_supply_chain_link_merchant'; /** * @return string * @author xaboy diff --git a/app/common/repositories/store/product/SpuRepository.php b/app/common/repositories/store/product/SpuRepository.php index 1b9877e5..85c6e57b 100644 --- a/app/common/repositories/store/product/SpuRepository.php +++ b/app/common/repositories/store/product/SpuRepository.php @@ -160,6 +160,8 @@ class SpuRepository extends BaseRepository // 只获取当前供应链内商户的商品 $query->whereIn('S.mer_id', $MerListId); + //获取自提 + $query->whereLike('delivery_way',"%1%"); } $productMake = app()->make(ProductRepository::class); diff --git a/app/common/repositories/system/diy/DiyRepository.php b/app/common/repositories/system/diy/DiyRepository.php index f7c0f757..f5a46611 100644 --- a/app/common/repositories/system/diy/DiyRepository.php +++ b/app/common/repositories/system/diy/DiyRepository.php @@ -58,9 +58,9 @@ class DiyRepository extends BaseRepository ], 'green' => [ 'type' => 'green', - 'theme_color' => '#42CA4D', + 'theme_color' => '#20A162', 'assist_color' => '#FE960F', - 'theme' => '--view-theme: #42CA4D;--view-assist:#FE960F;--view-priceColor:#FE960F;--view-bgColor:rgba(254, 150, 15,.1);--view-minorColor:rgba(66, 202, 77,.1);--view-bntColor11:#FDBA00;--view-bntColor12:#FFAA00;--view-bntColor21:#42CA4D;--view-bntColor22:#70E038;' + 'theme' => '--view-theme: #20A162;--view-assist:#FE960F;--view-priceColor:#FE960F;--view-bgColor:rgba(254, 150, 15,.1);--view-minorColor:rgba(66, 202, 77,.1);--view-bntColor11:#FDBA00;--view-bntColor12:#FFAA00;--view-bntColor21:#20A162;--view-bntColor22:#70E038;' ], 'blue' => [ 'type' => 'blue', diff --git a/app/common/repositories/system/merchant/MerchantIntentionRepository.php b/app/common/repositories/system/merchant/MerchantIntentionRepository.php index eb364b62..7df87be1 100644 --- a/app/common/repositories/system/merchant/MerchantIntentionRepository.php +++ b/app/common/repositories/system/merchant/MerchantIntentionRepository.php @@ -161,6 +161,35 @@ class MerchantIntentionRepository extends BaseRepository if ($create) { $merchant = app()->make(MerchantRepository::class)->createMerchant($merData); $data['mer_id'] = $merchant->mer_id; + // 写入商户客服表 + $store_service_data['mer_id'] = $merchant->mer_id; + $store_service_data['uid'] = $intention['uid']; + $store_service_data['avatar'] = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/1b716202302251108516996.png'; + $store_service_data['nickname'] = $intention['mer_name']; + $store_service_data['account'] = $intention['phone']; + $store_service_data['pwd'] = password_hash('123456', PASSWORD_BCRYPT);; + $store_service_data['status'] = 1; + $store_service_data['is_open'] = 1; + $store_service_data['notify'] = 1; + $store_service_data['customer'] = 1; + $store_service_data['is_verify'] = 1; + $store_service_data['is_goods'] = 1; + $store_service_data['phone'] = $intention['phone']; + $store_service_data['create_time'] = date('Y-m-d H:i:s'); + Db::name('store_service')->insert($store_service_data); +// topservice + $top_store_service['mer_id'] = 0; + $top_store_service['uid'] = $intention['uid']; + $top_store_service['avatar'] = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/1b716202302251108516996.png'; + $top_store_service['nickname'] = $intention['mer_name']; + $top_store_service['account'] = $intention['phone']; + $top_store_service['pwd'] = password_hash('123456', PASSWORD_BCRYPT);; + $top_store_service['status'] = 1; + $top_store_service['is_open'] = 1; + $top_store_service['phone'] = $intention['phone']; + $top_store_service['create_time'] = date('Y-m-d H:i:s'); + Db::name('store_service')->insert($top_store_service); + Queue::push(SendSmsJob::class, ['tempId' => 'APPLY_MER_SUCCESS', 'id' => $smsData]); } } else { diff --git a/app/common/repositories/system/merchant/MerchantRepository.php b/app/common/repositories/system/merchant/MerchantRepository.php index 7802fc3c..090d0fdd 100644 --- a/app/common/repositories/system/merchant/MerchantRepository.php +++ b/app/common/repositories/system/merchant/MerchantRepository.php @@ -311,6 +311,8 @@ class MerchantRepository extends BaseRepository $item['distance'] = $distance; } $item['recommend'] = isset($where['delivery_way']) ? $item['CityRecommend'] : $item['AllRecommend']; + $item['area_name'] = Db::name('merchant_address')->alias('a')->join('eb_geo_area b','a.area_id=b.area_code')->where('a.mer_id',$item['mer_id'])->value('b.area_name')??''; + $item['street_name'] = Db::name('merchant_address')->alias('a')->join('eb_geo_street b','a.street_id=b.street_code')->where('a.mer_id',$item['mer_id'])->value('b.street_name'); return $item; }); diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index c4c6233a..718440f3 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -168,6 +168,8 @@ class Auth extends BaseController }else{ $data['group_id']=1; } +// 新增返回商户后台登录地址 + $data['merchant_login'] = $this->request->domain().'/merchant'; return app('json')->success($data); } diff --git a/app/controller/api/store/order/StoreCartDg.php b/app/controller/api/store/order/StoreCartDg.php index 81f08cbd..32c55232 100644 --- a/app/controller/api/store/order/StoreCartDg.php +++ b/app/controller/api/store/order/StoreCartDg.php @@ -252,7 +252,7 @@ class StoreCartDg extends BaseController ->page($page,$limit) ->withAttr('goods',function ($value,$data){ $www[] = ['a.cart_id','in',$data['cart_ids']]; - $goods = Db::table('eb_store_cart')->alias('a')->join('eb_store_product b','a.product_id = b.product_id')->field("a.cart_num,b.product_id,b.store_name,b.price")->where($www)->select(); + $goods = Db::table('eb_store_cart')->alias('a')->join('eb_store_product b','a.product_id = b.product_id')->field("a.cart_num,b.product_id,b.store_name,b.price,b.image")->where($www)->select(); return $goods; }) ->withAttr('total',function ($value,$data){ diff --git a/public/system/css/chunk-70702520.ec27404b.css b/public/system/css/chunk-70702520.ec27404b.css index 97b6737e..f07bb237 100644 --- a/public/system/css/chunk-70702520.ec27404b.css +++ b/public/system/css/chunk-70702520.ec27404b.css @@ -1 +1 @@ -.box[data-v-58788263]{margin:0;width:100px;height:40px;border-radius:4px;position:relative}[data-v-58788263] .el-radio--medium.is-bordered .el-radio__inner{width:20px;height:20px;opacity:1;border-radius:2px}.red[data-v-58788263] .el-radio__inner{background-color:#e93323;border:1px solid #e93323}.orange[data-v-58788263] .el-radio__inner{background-color:#ff5c2d;border:1px solid #ff5c2d}.pink[data-v-58788263] .el-radio__inner{background-color:#ff448f;border:1px solid #ff448f}.green[data-v-58788263] .el-radio__inner{background-color:#42ca4d;border:1px solid #42ca4d}.blue[data-v-58788263] .el-radio__inner{background-color:#1db0fc;border:1px solid #1db0fc}.purple[data-v-58788263] .el-radio__inner{background-color:#905eff;border:1px solid #905eff}.bgred[data-v-58788263]{background-color:#e93323}.bgorange[data-v-58788263]{background-color:#ff5c2d}.bgpink[data-v-58788263]{background-color:#ff448f}.bggreen[data-v-58788263]{background-color:#42ca4d}.bgblue[data-v-58788263]{background-color:#1db0fc}.bgpurple[data-v-58788263]{background-color:#905eff}.iconfont[data-v-58788263]{position:absolute;top:15px;left:14px;font-size:12px;display:none}[data-v-58788263] .is-checked .iconfont{display:inline-block}.styleBox[data-v-58788263]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.styleBox .pictrue[data-v-58788263]{width:300px;height:560px;margin:10px 30px 0 0}.styleBox .pictrue img[data-v-58788263]{width:100%;height:100%}.save[data-v-58788263]{width:100%;margin:0 auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center} \ No newline at end of file +.box[data-v-58788263]{margin:0;width:100px;height:40px;border-radius:4px;position:relative}[data-v-58788263] .el-radio--medium.is-bordered .el-radio__inner{width:20px;height:20px;opacity:1;border-radius:2px}.red[data-v-58788263] .el-radio__inner{background-color:#e93323;border:1px solid #e93323}.orange[data-v-58788263] .el-radio__inner{background-color:#ff5c2d;border:1px solid #ff5c2d}.pink[data-v-58788263] .el-radio__inner{background-color:#ff448f;border:1px solid #ff448f}.green[data-v-58788263] .el-radio__inner{background-color:#20A162;border:1px solid #20A162}.blue[data-v-58788263] .el-radio__inner{background-color:#1db0fc;border:1px solid #1db0fc}.purple[data-v-58788263] .el-radio__inner{background-color:#905eff;border:1px solid #905eff}.bgred[data-v-58788263]{background-color:#e93323}.bgorange[data-v-58788263]{background-color:#ff5c2d}.bgpink[data-v-58788263]{background-color:#ff448f}.bggreen[data-v-58788263]{background-color:#20A162}.bgblue[data-v-58788263]{background-color:#1db0fc}.bgpurple[data-v-58788263]{background-color:#905eff}.iconfont[data-v-58788263]{position:absolute;top:15px;left:14px;font-size:12px;display:none}[data-v-58788263] .is-checked .iconfont{display:inline-block}.styleBox[data-v-58788263]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.styleBox .pictrue[data-v-58788263]{width:300px;height:560px;margin:10px 30px 0 0}.styleBox .pictrue img[data-v-58788263]{width:100%;height:100%}.save[data-v-58788263]{width:100%;margin:0 auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center} \ No newline at end of file