mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-10 17:42:50 +00:00
update
This commit is contained in:
parent
047ac148d1
commit
6986c23602
@ -43,7 +43,7 @@ class UserSearchController
|
||||
public function cleanUserSearch(Request $request)
|
||||
{
|
||||
$uid = (int)$request->uid();
|
||||
$this->services->update(['uid' => $uid], ['is_del' => 1]);
|
||||
$this->services->delete(['uid' => $uid]);
|
||||
return app('json')->success(100002);
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ class OrderPaySuccessListener implements ListenerInterface
|
||||
}
|
||||
|
||||
//虚拟商品自动发货
|
||||
if ($orderInfo['virtual_type'] > 0 && $orderInfo['combination_id'] == 0) {
|
||||
if (in_array($orderInfo['virtual_type'], [1, 2]) && $orderInfo['combination_id'] == 0) {
|
||||
/** @var StoreOrderDeliveryServices $orderDeliveryServices */
|
||||
$orderDeliveryServices = app()->make(StoreOrderDeliveryServices::class);
|
||||
$orderDeliveryServices->virtualSend($orderInfo);
|
||||
|
||||
@ -16,7 +16,7 @@ class OrderShippingListener implements ListenerInterface
|
||||
public function handle($event): void
|
||||
{
|
||||
/** @var StoreOrder $order */
|
||||
[$order_type, $order, $delivery_type, $delivery_id, $delivery_name] = $event;
|
||||
[$order_type, $order, $delivery_type, $delivery_id, $delivery_code] = $event;
|
||||
$order_shipping_open = sys_config('order_shipping_open', 0); // 小程序发货信息管理服务开关
|
||||
$secs = 0;
|
||||
if ($order && $order_shipping_open) {
|
||||
@ -87,8 +87,7 @@ class OrderShippingListener implements ListenerInterface
|
||||
$shipping_list = [
|
||||
[
|
||||
'tracking_no' => $delivery_id ?? '',
|
||||
// 'express_company' => $delivery_name ? $expressData[$delivery_name] : '',
|
||||
'express_company' => $delivery_name,
|
||||
'express_company' => $delivery_code,
|
||||
'item_desc' => $item_desc,
|
||||
'contact' => [
|
||||
'receiver_contact' => $order['user_phone']
|
||||
|
||||
@ -50,7 +50,7 @@ class RegisterListener implements ListenerInterface
|
||||
|
||||
//自定义消息-下级用户绑定成功
|
||||
if ($res) {
|
||||
$phone = app()->make(UserServices::class)->value($uid, 'phone');
|
||||
$phone = app()->make(UserServices::class)->value($spreadUid, 'phone');
|
||||
event('CustomNoticeListener', [$spreadUid, ['nickname' => $name, 'time' => date('Y-m-d H:i:s'), 'phone' => $phone], 'spread_success']);
|
||||
}
|
||||
}
|
||||
|
||||
@ -413,7 +413,7 @@ class StorePinkServices extends BaseServices
|
||||
//拼团卡密和优惠券商品,成团后发放
|
||||
$orderInfos = $orderService->getColumn([['order_id', 'in', $order_ids]], '*', 'order_id');
|
||||
foreach ($orderInfos as $orderInfo) {
|
||||
if ($orderInfo['virtual_type'] > 0) {
|
||||
if (in_array($orderInfo['virtual_type'], [1, 2])) {
|
||||
$orderInfo['cart_id'] = json_decode($orderInfo['cart_id'], true);
|
||||
/** @var StoreOrderDeliveryServices $orderDeliveryServices */
|
||||
$orderDeliveryServices = app()->make(StoreOrderDeliveryServices::class);
|
||||
|
||||
@ -117,11 +117,11 @@ class StoreSeckillServices extends BaseServices
|
||||
}
|
||||
}
|
||||
//限制编辑
|
||||
if ($data['copy'] == 0 && $seckill) {
|
||||
if ($seckill['stop_time'] + 86400 < time()) {
|
||||
throw new AdminException(400508);
|
||||
}
|
||||
}
|
||||
// if ($data['copy'] == 0 && $seckill) {
|
||||
// if ($seckill['stop_time'] + 86400 < time()) {
|
||||
// throw new AdminException(400508);
|
||||
// }
|
||||
// }
|
||||
if ($data['num'] < $data['once_num']) {
|
||||
throw new AdminException(400500);
|
||||
}
|
||||
@ -861,9 +861,9 @@ class StoreSeckillServices extends BaseServices
|
||||
if (!isset($sattr['price']) || !$sattr['price']) {
|
||||
throw new AdminException('请填写商品(' . $product['store_name'] . ' | ' . $sattr['suk'] . ')活动价');
|
||||
}
|
||||
if ($sattr['price'] > $sattr['ot_price']) {
|
||||
throw new AdminException('商品(' . $product['store_name'] . ' | ' . $sattr['suk'] . ')活动价不能大于原价');
|
||||
}
|
||||
// if ($sattr['price'] > $sattr['ot_price']) {
|
||||
// throw new AdminException('商品(' . $product['store_name'] . ' | ' . $sattr['suk'] . ')活动价不能大于原价');
|
||||
// }
|
||||
if (!isset($sattr['quota']) || !$sattr['quota']) {
|
||||
throw new AdminException('请填写商品(' . $product['store_name'] . ' | ' . $sattr['suk'] . ')限量');
|
||||
}
|
||||
@ -888,6 +888,7 @@ class StoreSeckillServices extends BaseServices
|
||||
}
|
||||
}
|
||||
$seckillId = $this->dao->value(['activity_id' => $id, 'product_id' => $seckillData['product_id']], 'id') ?? 0;
|
||||
$seckillData['description'] = app()->make(StoreDescriptionServices::class)->getDescription(['product_id' => $seckillData['product_id'], 'type' => 1]);
|
||||
$this->saveData($seckillId, $seckillData);
|
||||
}
|
||||
return true;
|
||||
|
||||
@ -548,6 +548,7 @@ class StoreOrderCreateServices extends BaseServices
|
||||
$uni_integral_price = (string)bcdiv((string)$integral_price, (string)$cart['cart_num'], 4);
|
||||
$cart['truePrice'] = $cart['truePrice'] > $uni_integral_price ? bcsub((string)$cart['truePrice'], $uni_integral_price, 2) : 0;
|
||||
}
|
||||
if ($cart['sum_true_price'] < 0) $cart['sum_true_price'] = '0.00';
|
||||
}
|
||||
try {
|
||||
[$cartInfo, $spread_ids] = $this->computeOrderProductBrokerage($uid, $cartInfo);
|
||||
|
||||
@ -78,7 +78,7 @@ class OrderOfflineServices extends BaseServices
|
||||
}
|
||||
|
||||
//虚拟商品自动发货
|
||||
if ($orderInfo['virtual_type'] > 0) {
|
||||
if (in_array($orderInfo['virtual_type'], [1, 2])) {
|
||||
/** @var StoreOrderDeliveryServices $orderDeliveryServices */
|
||||
$orderDeliveryServices = app()->make(StoreOrderDeliveryServices::class);
|
||||
$orderDeliveryServices->virtualSend($orderInfo);
|
||||
|
||||
@ -33,6 +33,7 @@ use app\services\system\SystemUserLevelServices;
|
||||
use app\services\user\UserLabelServices;
|
||||
use app\services\user\member\MemberCardServices;
|
||||
use app\services\user\UserLevelServices;
|
||||
use app\services\user\UserSearchServices;
|
||||
use app\services\user\UserServices;
|
||||
use crmeb\exceptions\AdminException;
|
||||
use app\jobs\ProductLogJob;
|
||||
@ -1188,6 +1189,10 @@ class StoreProductServices extends BaseServices
|
||||
$where['is_show'] = 1;
|
||||
$where['is_del'] = 0;
|
||||
$where['star'] = 1;
|
||||
$ifKeyword = isset($where['store_name']) && $where['store_name'];
|
||||
if ($ifKeyword) {
|
||||
app()->make(UserSearchServices::class)->saveUserSearch($uid, $where['store_name'], [$where['store_name']], []);
|
||||
}
|
||||
[$page, $limit] = $this->getPageValue();
|
||||
$where['vip_user'] = $uid ? app()->make(UserServices::class)->value(['uid' => $uid], 'is_money_level') : 0;
|
||||
$list = $this->dao->getSearchList($where, $page, $limit, ['id,store_name,cate_id,image,IFNULL(sales, 0) + IFNULL(ficti, 0) as sales,price,stock,activity,ot_price,spec_type,recommend_image,unit_name,is_vip,vip_price,is_virtual,presale,custom_form,virtual_type,min_qty,label_list']);
|
||||
|
||||
@ -155,7 +155,7 @@ class WechatQrcodeServices extends BaseServices
|
||||
}
|
||||
if (!$res) throw new AdminException(400237);
|
||||
$imageInfo = $this->downloadImage($resCode['url'], $name);
|
||||
$systemAttachment->attachmentAdd($name, $imageInfo['size'], $imageInfo['type'], $imageInfo['att_dir'], $imageInfo['att_dir'], 1, $imageInfo['image_type'], time(), 2);
|
||||
$systemAttachment->attachmentAdd($name, $imageInfo['size'], $imageInfo['type'], $imageInfo['att_dir'], $imageInfo['att_dir'], 1, $imageInfo['image_type'], time(), 1);
|
||||
}
|
||||
return strpos($imageInfo['att_dir'], 'http') === false ? $siteUrl . $imageInfo['att_dir'] : $imageInfo['att_dir'];
|
||||
}
|
||||
|
||||
@ -17,9 +17,8 @@
|
||||
<text v-else>{{ $t(`无门槛券`) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.is_use == true" class="button" :style="[bntBgColor]">{{ $t(`已领取`) }}</view>
|
||||
<view v-else-if="item.is_use == false" class="button" :style="[bntBgColor]" @click="receiveCoupon(item)">{{ $t(`去领取`) }}</view>
|
||||
<view v-else-if="item.is_use == 2" class="button" :style="[bntBgColor]">{{ $t(`已过期`) }}</view>
|
||||
<view v-if="item.is_use >= item.receive_limit" class="button" :style="[bntBgColor]">{{ $t(`已领取`) }}</view>
|
||||
<view v-else class="button" :style="[bntBgColor]" @click="receiveCoupon(item)">{{ $t(`去领取`) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@ -40,9 +39,8 @@
|
||||
<text v-else>{{ $t(`无门槛券`) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.is_use == true" class="button" :style="[bntBgColor]">{{ $t(`已领取`) }}</view>
|
||||
<view v-else-if="item.is_use == false" class="button" :style="[bntBgColor]" @click="receiveCoupon(item)">{{ $t(`去领取`) }}</view>
|
||||
<view v-else-if="item.is_use == 2" class="button" :style="[bntBgColor]">{{ $t(`已过期`) }}</view>
|
||||
<view v-if="item.is_use >= item.receive_limit" class="button" :style="[bntBgColor]">{{ $t(`已领取`) }}</view>
|
||||
<view v-else class="button" :style="[bntBgColor]" @click="receiveCoupon(item)">{{ $t(`去领取`) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@ -63,9 +61,8 @@
|
||||
<text v-else>{{ $t(`无门槛券`) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.is_use == true" class="button acea-row row-middle">{{ $t(`已领取`) }}</view>
|
||||
<view v-else-if="item.is_use == false" class="button acea-row row-middle" @click="receiveCoupon(item)">{{ $t(`立即领取`) }}</view>
|
||||
<view v-else-if="item.is_use == 2" class="button acea-row row-middle">{{ $t(`已过期`) }}</view>
|
||||
<view v-if="item.is_use >= item.receive_limit" class="button acea-row row-middle">{{ $t(`已领取`) }}</view>
|
||||
<view v-else class="button acea-row row-middle" @click="receiveCoupon(item)">{{ $t(`立即领取`) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -74,7 +71,7 @@
|
||||
<view v-else-if="dataConfig.styleConfig.tabVal == 3" class="coupon4" :style="[coupon4Color]">
|
||||
<view class="content">
|
||||
<scroll-view scroll-x="true">
|
||||
<view class="list acea-row">
|
||||
<view class="list acea-row">
|
||||
<view v-for="item in couponList" :key="item.id" :style="[couponItemStyle]" class="item">
|
||||
<view class="name" :style="typeStyle">
|
||||
<view class="inner">{{ item.type | typeFilter }}</view>
|
||||
@ -115,9 +112,8 @@
|
||||
<text v-else>{{ $t(`无门槛券`) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.is_use == true" class="button acea-row row-middle">{{ $t(`已领取`) }}</view>
|
||||
<view v-else-if="item.is_use == false" class="button acea-row row-middle" @click="receiveCoupon(item)">{{ $t(`领取`) }}</view>
|
||||
<view v-else-if="item.is_use == 2" class="button acea-row row-middle">{{ $t(`已过期`) }}</view>
|
||||
<view v-if="item.is_use >= item.receive_limit" class="button acea-row row-middle">{{ $t(`已领取`) }}</view>
|
||||
<view v-else class="button acea-row row-middle" @click="receiveCoupon(item)">{{ $t(`领取`) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@ -157,7 +153,7 @@
|
||||
},
|
||||
filters:{
|
||||
typeFilter(val){
|
||||
let obj = {
|
||||
let obj = {
|
||||
0: '通用券',
|
||||
1: '品类券',
|
||||
2: '商品券',
|
||||
@ -700,4 +696,4 @@
|
||||
color: var(--coupon4-color);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user