Merge branch 'v4.7.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v4.7.0dev

This commit is contained in:
liaofei 2023-02-20 18:11:58 +08:00
commit 9cfe0c1bd8
43 changed files with 2286 additions and 2271 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
/.idea
*.log
*.DS_Store
/crmeb/.env
/crmeb/runtime/cache
/crmeb/runtime/log
/crmeb/runtime/session

View File

@ -106,10 +106,7 @@ class StoreSeckill extends AuthController
$storeProductAttrValueServices = app()->make(StoreProductAttrValueServices::class);
$unique = $storeProductAttrValueServices->value(['product_id' => $id, 'type' => 1], 'unique');
if ($unique) {
$name = 'seckill_' . $unique . '_1';
/** @var CacheService $cache */
$cache = app()->make(CacheService::class);
$cache->del($name);
CacheService::delete('seckill_' . $unique . '_1');
}
return app('json')->success(100002);
}

View File

@ -125,7 +125,7 @@ class StoreOrderController
if ($this->services->be(['order_id|unique' => $key, 'uid' => $uid, 'is_del' => 0]))
return app('json')->status('extend_order', 410173, ['orderId' => $key, 'key' => $key]);
list($addressId, $couponId, $payType, $useIntegral, $mark, $combinationId, $pinkId, $seckill_id, $bargainId, $shipping_type) = $request->postMore([
'addressId', 'couponId', ['payType', 'yue'], ['useIntegral', 0], 'mark', ['combinationId', 0], ['pinkId', 0], ['seckill_id', 0], ['bargainId', ''],
'addressId', 'couponId', ['payType', ''], ['useIntegral', 0], 'mark', ['combinationId', 0], ['pinkId', 0], ['seckill_id', 0], ['bargainId', ''],
['shipping_type', 1],
], true);
$payType = strtolower($payType);
@ -166,7 +166,7 @@ class StoreOrderController
$uid = (int)$request->uid();
if ($checkOrder = $this->services->getOne(['order_id|unique' => $key, 'uid' => $uid, 'is_del' => 0]))
return app('json')->status('extend_order', 410209, ['orderId' => $checkOrder['order_id'], 'key' => $key]);
[$addressId, $couponId, $payType, $useIntegral, $mark, $combinationId, $pinkId, $seckill_id, $bargainId, $from, $shipping_type, $real_name, $phone, $storeId, $news, $invoice_id, $quitUrl, $advanceId, $virtual_type, $customForm] = $request->postMore([
[$addressId, $couponId, $payType, $useIntegral, $mark, $combinationId, $pinkId, $seckill_id, $bargainId, $shipping_type, $real_name, $phone, $storeId, $news, $invoice_id, $quitUrl, $advanceId, $virtual_type, $customForm] = $request->postMore([
[['addressId', 'd'], 0],
[['couponId', 'd'], 0],
['payType', ''],
@ -176,7 +176,6 @@ class StoreOrderController
[['pinkId', 'd'], 0],
[['seckill_id', 'd'], 0],
[['bargainId', 'd'], ''],
['from', 'weixin'],
[['shipping_type', 'd'], 1],
['real_name', ''],
['phone', ''],
@ -214,7 +213,6 @@ class StoreOrderController
}
}
$isChannel = $this->getChennel[$from] ?? ($request->isApp() ? 0 : 1);
$cartInfo = null;
if ($seckill_id || $combinationId || $bargainId || $advanceId) {
$cartInfo = $cartGroup['cartInfo'];
@ -237,7 +235,7 @@ class StoreOrderController
}
}
$virtual_type = $cartGroup['cartInfo'][0]['productInfo']['virtual_type'] ?? 0;
$order = $createServices->createOrder($uid, $key, $cartGroup, $request->user()->toArray(), $addressId, $payType, !!$useIntegral, $couponId, $mark, $combinationId, $pinkId, $seckill_id, $bargainId, $isChannel, $shipping_type, $real_name, $phone, $storeId, !!$news, $advanceId, $virtual_type, $customForm);
$order = $createServices->createOrder($uid, $key, $cartGroup, $request->user()->toArray(), $addressId, $payType, !!$useIntegral, $couponId, $mark, $combinationId, $pinkId, $seckill_id, $bargainId, $shipping_type, $real_name, $phone, $storeId, !!$news, $advanceId, $virtual_type, $customForm);
if ($order === false) {
if ($seckill_id || $combinationId || $advanceId || $bargainId) {
foreach ($cartInfo as $item) {
@ -397,10 +395,9 @@ class StoreOrderController
*/
public function pay(Request $request, StorePinkServices $services, OrderPayServices $payServices, YuePayServices $yuePayServices)
{
[$uni, $paytype, $from, $quitUrl, $type] = $request->postMore([
[$uni, $paytype, $quitUrl, $type] = $request->postMore([
['uni', ''],
['paytype', 'weixin'],
['from', 'weixin'],
['paytype', ''],
['quitUrl', ''],
['type', 0]
], true);
@ -418,36 +415,9 @@ class StoreOrderController
if ($order['pink_id'] && $services->isPinkStatus($order['pink_id'])) {
return app('json')->fail(410215);
}
$isChannel = $this->getChennel[$from];
//缓存不存在 || 切换另一端支付
if (!Cache::get('pay_' . $order['order_id']) || $isChannel != $order['is_channel']) {
switch ($from) {
case 'weixin':
if ($type == 1 || in_array($order['is_channel'], [1, 2, 3, 4])) {//0
$order['order_id'] = mt_rand(100, 999) . '_' . $order['order_id'];
}
break;
case 'weixinh5':
if ($type == 1 || in_array($order['is_channel'], [0, 1, 3, 4])) {
$order['order_id'] = mt_rand(100, 999) . '_' . $order['order_id'];
}
break;
case 'routine':
if ($type == 1 || in_array($order['is_channel'], [0, 2, 3, 4])) {
$order['order_id'] = mt_rand(100, 999) . '_' . $order['order_id'];
}
break;
case 'app':
if ($type == 1 || in_array($order['is_channel'], [0, 1, 2, 3])) {
$order['order_id'] = mt_rand(100, 999) . '_' . $order['order_id'];
}
break;
case 'pc':
case 'aliapy':
$order['order_id'] = mt_rand(100, 999) . '_' . $order['order_id'];
break;
}
}
//重新生成订单号去支付
$order['order_id'] = mt_rand(100, 999) . '_' . $order['order_id'];
//0元支付
if (bcsub((string)$orderInfo['pay_price'], '0', 2) <= 0) {

View File

@ -19,8 +19,12 @@ class SystemTimer implements ListenerInterface
{
public function handle($event): void
{
new Crontab('*/6 * * * * *', function () {
file_put_contents(root_path() . 'runtime/.timer', time());
$time = time();
$date = date('Y-m-d H:i:s', time());
$timer_log_open = config("log.timer_log", false);
new Crontab('*/6 * * * * *', function () use ($time) {
file_put_contents(root_path() . 'runtime/.timer', $time);
});
/** @var SystemTimerServices $systemTimerServices */
@ -31,11 +35,12 @@ class SystemTimer implements ListenerInterface
$timeStr = $this->getTimerStr($item);
//未支付自动取消订单
if ($item['mark'] == 'order_cancel') {
new Crontab($timeStr, function () {
new Crontab($timeStr, function () use ($date, $timer_log_open) {
try {
/** @var StoreOrderServices $orderServices */
$orderServices = app()->make(StoreOrderServices::class);
$orderServices->orderUnpaidCancel();
if ($timer_log_open) Log::notice($date . ' 执行未支付自动取消订单');
} catch (\Throwable $e) {
Log::error('自动取消订单失败,失败原因:' . $e->getMessage());
}
@ -43,11 +48,12 @@ class SystemTimer implements ListenerInterface
}
//拼团到期订单处理
if ($item['mark'] == 'pink_expiration') {
new Crontab($timeStr, function () {
new Crontab($timeStr, function () use ($date, $timer_log_open) {
try {
/** @var StorePinkServices $storePinkServices */
$storePinkServices = app()->make(StorePinkServices::class);
$storePinkServices->statusPink();
if ($timer_log_open) Log::notice($date . ' 执行拼团到期订单处理');
} catch (\Throwable $e) {
Log::error('拼团到期订单处理失败,失败原因:' . $e->getMessage());
}
@ -55,11 +61,12 @@ class SystemTimer implements ListenerInterface
}
//自动解绑上级绑定
if ($item['mark'] == 'agent_unbind') {
new Crontab($timeStr, function () {
new Crontab($timeStr, function () use ($date, $timer_log_open) {
try {
/** @var AgentManageServices $agentManage */
$agentManage = app()->make(AgentManageServices::class);
$agentManage->removeSpread();
if ($timer_log_open) Log::notice($date . ' 执行自动解绑上级绑定');
} catch (\Throwable $e) {
Log::error('自动解除上级绑定失败,失败原因:' . $e->getMessage());
}
@ -67,11 +74,12 @@ class SystemTimer implements ListenerInterface
}
//更新直播商品状态
if ($item['mark'] == 'live_product_status') {
new Crontab($timeStr, function () {
new Crontab($timeStr, function () use ($date, $timer_log_open) {
try {
/** @var LiveGoodsServices $liveGoods */
$liveGoods = app()->make(LiveGoodsServices::class);
$liveGoods->syncGoodStatus();
if ($timer_log_open) Log::notice($date . ' 执行更新直播商品状态');
} catch (\Throwable $e) {
Log::error('更新直播商品状态失败,失败原因:' . $e->getMessage());
}
@ -79,11 +87,12 @@ class SystemTimer implements ListenerInterface
}
//更新直播间状态
if ($item['mark'] == 'live_room_status') {
new Crontab($timeStr, function () {
new Crontab($timeStr, function () use ($date, $timer_log_open) {
try {
/** @var LiveRoomServices $liveRoom */
$liveRoom = app()->make(LiveRoomServices::class);
$liveRoom->syncRoomStatus();
if ($timer_log_open) Log::notice($date . ' 执行更新直播间状态');
} catch (\Throwable $e) {
Log::error('更新直播间状态失败,失败原因:' . $e->getMessage());
}
@ -91,11 +100,12 @@ class SystemTimer implements ListenerInterface
}
//自动收货
if ($item['mark'] == 'take_delivery') {
new Crontab($timeStr, function () {
new Crontab($timeStr, function () use ($date, $timer_log_open) {
try {
/** @var StoreOrderTakeServices $services */
$services = app()->make(StoreOrderTakeServices::class);
$services->autoTakeOrder();
if ($timer_log_open) Log::notice($date . ' 执行自动收货');
} catch (\Throwable $e) {
Log::error('自动收货失败,失败原因:' . $e->getMessage());
}
@ -103,11 +113,12 @@ class SystemTimer implements ListenerInterface
}
//查询预售到期商品自动下架
if ($item['mark'] == 'advance_off') {
new Crontab($timeStr, function () {
new Crontab($timeStr, function () use ($date, $timer_log_open) {
try {
/** @var StoreProductServices $product */
$product = app()->make(StoreProductServices::class);
$product->downAdvance();
if ($timer_log_open) Log::notice($date . ' 执行预售到期商品自动下架');
} catch (\Throwable $e) {
Log::error('预售到期商品自动下架失败,失败原因:' . $e->getMessage());
}
@ -115,11 +126,12 @@ class SystemTimer implements ListenerInterface
}
//自动好评
if ($item['mark'] == 'product_replay') {
new Crontab($timeStr, function () {
new Crontab($timeStr, function () use ($date, $timer_log_open) {
try {
/** @var StoreOrderServices $orderServices */
$orderServices = app()->make(StoreOrderServices::class);
$orderServices->autoComment();
if ($timer_log_open) Log::notice($date . ' 执行自动好评');
} catch (\Throwable $e) {
Log::error('自动好评失败,失败原因:' . $e->getMessage());
}
@ -127,11 +139,12 @@ class SystemTimer implements ListenerInterface
}
//清除昨日海报
if ($item['mark'] == 'clear_poster') {
new Crontab($timeStr, function () {
new Crontab($timeStr, function () use ($date, $timer_log_open) {
try {
/** @var SystemAttachmentServices $attach */
$attach = app()->make(SystemAttachmentServices::class);
$attach->emptyYesterdayAttachment();
if ($timer_log_open) Log::notice($date . ' 执行清除昨日海报');
} catch (\Throwable $e) {
Log::error('清除昨日海报失败,失败原因:' . $e->getMessage());
}
@ -141,13 +154,13 @@ class SystemTimer implements ListenerInterface
}
/**
* 0 1 2 3 4 5
| | | | | |
| | | | | +------ day of week (0 - 6) (Sunday=0)
| | | | +------ month (1 - 12)
| | | +-------- day of month (1 - 31)
| | +---------- hour (0 - 23)
| +------------ min (0 - 59)
+-------------- sec (0-59)[可省略,如果没有0位,则最小时间粒度是分钟]
* | | | | | |
* | | | | | +------ day of week (0 - 6) (Sunday=0)
* | | | | +------ month (1 - 12)
* | | | +-------- day of month (1 - 31)
* | | +---------- hour (0 - 23)
* | +------------ min (0 - 59)
* +-------------- sec (0-59)[可省略,如果没有0位,则最小时间粒度是分钟]
*/
/**
* 获取定时任务时间表达式

View File

@ -190,7 +190,7 @@ class StorePointRecordServices extends BaseServices
$list[] = [
'name' => $item['name'],
'value' => $item['value'],
'percent' => $count != 0 ? bcmul((string)bcdiv((string)$item['value'], (string)$count, 4), '100', 1) : 0,
'percent' => $count != 0 ? bcmul((string)bcdiv((string)$item['value'], (string)$count, 4), '100', 2) : 0,
];
}
array_multisort(array_column($list, 'value'), SORT_DESC, $list);
@ -222,7 +222,7 @@ class StorePointRecordServices extends BaseServices
$list[] = [
'name' => $item['name'],
'value' => $item['value'],
'percent' => $count != 0 ? bcmul((string)bcdiv((string)$item['value'], (string)$count, 4), '100', 1) : 0,
'percent' => $count != 0 ? bcmul((string)bcdiv((string)$item['value'], (string)$count, 4), '100', 2) : 0,
];
}
array_multisort(array_column($list, 'value'), SORT_DESC, $list);

View File

@ -256,7 +256,7 @@ class AgentLevelServices extends BaseServices
*/
public function createForm()
{
$field[] = Form::input('name', '等级名称')->col(24);
$field[] = Form::input('name', '等级名称')->maxlength(8)->col(24);
$field[] = Form::number('grade', '等级', 0)->min(0)->precision(0);
$field[] = Form::frameImage('image', '背景图', Url::buildUrl('admin/widget.images/index', array('fodder' => 'image')))->icon('ios-add')->width('950px')->height('505px')->modal(['footer-hide' => true]);
$field[] = Form::number('one_brokerage', '一级上浮', 0)->info('在分销一级佣金基础上浮(0-1000之间整数)百分比')->min(0)->max(1000)->precision(0);
@ -278,7 +278,7 @@ class AgentLevelServices extends BaseServices
throw new AdminException(100026);
$field = [];
$field[] = Form::hidden('id', $id);
$field[] = Form::input('name', '等级名称', $levelInfo['name'])->col(24);
$field[] = Form::input('name', '等级名称', $levelInfo['name'])->maxlength(8)->col(24);
$field[] = Form::number('grade', '等级', $levelInfo['grade'])->min(0)->precision(0);
$field[] = Form::frameImage('image', '背景图', Url::buildUrl('admin/widget.images/index', array('fodder' => 'image')), $levelInfo['image'])->icon('ios-add')->width('950px')->height('505px')->modal(['footer-hide' => true]);
$field[] = Form::number('one_brokerage', '一级上浮', $levelInfo['one_brokerage'])->info('在分销一级佣金基础上浮(0-1000之间整数)百分比')->min(0)->max(1000)->precision(0);

View File

@ -82,11 +82,6 @@ class StoreOrderComputedServices extends BaseServices
$offlinePayStatus = (int)sys_config('offline_pay_status') ?? (int)2;
$systemPayType = PayServices::PAY_TYPE;
if ($offlinePayStatus == 2) unset($systemPayType['offline']);
if (strtolower($payType) != 'pc' && strtolower($payType) != 'friend') {
if (!array_key_exists($payType, $systemPayType)) {
throw new ApiException(410241);
}
}
if (!$userInfo) {
/** @var UserServices $userServices */
$userServices = app()->make(UserServices::class);
@ -453,7 +448,7 @@ class StoreOrderComputedServices extends BaseServices
}
//会员邮费享受折扣
if ($storePostage) {
$express_rule_number = 0;
$express_rule_number = 100;
if (!$userInfo) {
/** @var UserServices $userService */
$userService = app()->make(UserServices::class);

View File

@ -120,7 +120,6 @@ class StoreOrderCreateServices extends BaseServices
* @param int $pinkId
* @param int $seckillId
* @param int $bargainId
* @param int $isChannel
* @param int $shippingType
* @param string $real_name
* @param string $phone
@ -132,7 +131,7 @@ class StoreOrderCreateServices extends BaseServices
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function createOrder($uid, $key, $cartGroup, $userInfo, $addressId, $payType, $useIntegral = false, $couponId = 0, $mark = '', $combinationId = 0, $pinkId = 0, $seckillId = 0, $bargainId = 0, $isChannel = 0, $shippingType = 1, $real_name = '', $phone = '', $storeId = 0, $news = false, $advanceId = 0, $virtual_type = 0, $customForm = [])
public function createOrder($uid, $key, $cartGroup, $userInfo, $addressId, $payType, $useIntegral = false, $couponId = 0, $mark = '', $combinationId = 0, $pinkId = 0, $seckillId = 0, $bargainId = 0, $shippingType = 1, $real_name = '', $phone = '', $storeId = 0, $news = false, $advanceId = 0, $virtual_type = 0, $customForm = [])
{
/** @var StoreOrderComputedServices $computedServices */
$computedServices = app()->make(StoreOrderComputedServices::class);
@ -183,11 +182,6 @@ class StoreOrderCreateServices extends BaseServices
if ($deduction) {
$couponId = 0;
$useIntegral = false;
$systemPayType = PayServices::PAY_TYPE;
unset($systemPayType['offline']);
if ($payType != 'pc' && !array_key_exists($payType, $systemPayType)) {
throw new ApiException(410246);
}
}
//$shipping_type = 1 快递发货 $shipping_type = 2 门店自提
$storeSelfMention = sys_config('store_self_mention') ?? 0;
@ -219,7 +213,6 @@ class StoreOrderCreateServices extends BaseServices
'bargain_id' => $bargainId,
'advance_id' => $advance_id,
'cost' => $priceGroup['costPrice'],
'is_channel' => $isChannel,
'add_time' => time(),
'unique' => $key,
'shipping_type' => $shippingType,

View File

@ -1058,7 +1058,7 @@ class StoreOrderRefundServices extends BaseServices
if ($list) {
foreach ($list as &$item) {
$item['paid'] = 1;
$item['add_time'] = isset($item['add_time']) ? date('Y-m-d H:i', (int)$item['add_time']) : '';
$item['add_time'] = $item['_add_time'] = isset($item['add_time']) ? date('Y-m-d H:i', (int)$item['add_time']) : '';
$item['cartInfo'] = $item['cart_info'];
if (in_array($item['refund_type'], [1, 2, 4, 5])) {
$item['refund_status'] = 1;

View File

@ -1724,6 +1724,24 @@ HTML;
*/
public function setOrderTypePayOffline(string $orderId)
{
if (($count = strpos($orderId, '_')) !== false) {
$orderId = substr($orderId, $count + 1);
}
if (sys_config('offline_postage', 0) == 1) {
$orderInfo = $this->dao->get(['order_id' => $orderId]);
$cartInfoService = app()->make(StoreOrderCartInfoServices::class);
$cartInfo = $cartInfoService->getColumn(['oid' => $orderInfo['id']], 'cart_info', 'id');
foreach ($cartInfo as $key => &$item) {
$item_arr = json_decode($item, true);
$item_arr['postage_price'] = $item_arr['origin_postage_price'] = 0;
$cartInfoService->update(['id' => $key], ['cart_info' => json_encode($item_arr)]);
}
return $this->dao->update($orderId, [
'pay_type' => 'offline',
'pay_price' => bcsub((string)$orderInfo['pay_price'], (string)$orderInfo['pay_postage'], 2),
'pay_postage' => 0
], 'order_id');
}
return $this->dao->update($orderId, ['pay_type' => 'offline'], 'order_id');
}
@ -2508,7 +2526,7 @@ HTML;
switch ($type) {
case 'order':
$info = $this->dao->get(['order_id' => $orderId], ['pay_price', 'add_time', 'combination_id', 'seckill_id', 'bargain_id']);
$info = $this->dao->get(['order_id' => $orderId], ['pay_price', 'add_time', 'combination_id', 'seckill_id', 'bargain_id', 'pay_postage']);
if (!$info) {
throw new PayException('您支付的订单不存在');
}
@ -2529,6 +2547,8 @@ HTML;
}
$data['pay_price'] = $info['pay_price'];
$data['pay_postage'] = $info['pay_postage'];
$data['offline_postage'] = sys_config('offline_postage', 0);
$data['invalid_time'] = $time;
break;

View File

@ -176,19 +176,17 @@ class OrderPayServices
* @param $order
* @param $jsConfig
* @param string $payType
* @param array $options
* @return array
* @author 等风来
* @email 136327134@qq.com
* @date 2023/2/15
*/
public function afterPay($order, $jsConfig, string $payType, array $options = [])
public function afterPay($order, $jsConfig, string $payType)
{
$payKey = md5($order['order_id']);
switch ($payType) {
case PayServices::ALIAPY_PAY:
$isCode = $options['isCode'] ?? '';
if ($isCode && !($jsConfig->invalid ?? false)) $jsConfig->invalid = time() + 60;
$jsConfig->invalid = time() + 60;
CacheService::set($payKey, ['order_id' => $order['order_id'], 'other_pay_type' => false], 300);
break;
case PayServices::ALLIN_PAY:

View File

@ -95,7 +95,7 @@ class StoreCategoryServices extends BaseServices
$where = [];
if ($show !== '') $where['is_show'] = $show;
if (!$type) $where['pid'] = 0;
$data = get_tree_children($this->dao->getTierList($where, ['id as value', 'cate_name as label', 'pid']), 'children', 'value');
$data = get_tree_children($this->dao->getTierList($where, ['id', 'cate_name as title', 'pid']), 'children', 'id');
foreach ($data as &$item) {
if (!isset($item['children'])) {
$item['disabled'] = true;

View File

@ -13,6 +13,7 @@ use app\services\order\StoreOrderTakeServices;
use app\services\product\product\StoreProductServices;
use app\services\system\attachment\SystemAttachmentServices;
use crmeb\exceptions\AdminException;
use think\facade\Log;
class SystemTimerServices extends BaseServices
{
@ -204,40 +205,52 @@ class SystemTimerServices extends BaseServices
*/
public function timerRun()
{
file_put_contents(root_path() . 'runtime/.timer', time()); //检测定时任务是否正常
$time = time();
$date = date('Y-m-d H:i:s', time());
$timer_log_open = config("log.timer_log", false);
file_put_contents(root_path() . 'runtime/.timer', $time); //检测定时任务是否正常
$list = $this->dao->selectList(['is_open' => 1, 'is_del' => 0])->toArray();
foreach ($list as $item) {
if ($item['next_execution_time'] < time()) {
if ($item['next_execution_time'] < $time) {
if ($item['mark'] == 'order_cancel') {
//未支付自动取消订单
app()->make(StoreOrderServices::class)->orderUnpaidCancel();
if($timer_log_open) Log::notice($date . ' 执行未支付自动取消订单');
} elseif ($item['mark'] == 'pink_expiration') {
//拼团到期订单处理
app()->make(StorePinkServices::class)->statusPink();
if($timer_log_open) Log::notice($date . ' 执行拼团到期订单处理');
} elseif ($item['mark'] == 'agent_unbind') {
//自动解绑上级绑定
app()->make(AgentManageServices::class)->removeSpread();
if($timer_log_open) Log::notice($date . ' 执行自动解绑上级绑定');
} elseif ($item['mark'] == 'live_product_status') {
//更新直播商品状态
app()->make(LiveGoodsServices::class)->syncGoodStatus();
if($timer_log_open) Log::notice($date . ' 执行更新直播商品状态');
} elseif ($item['mark'] == 'live_room_status') {
//更新直播间状态
app()->make(LiveRoomServices::class)->syncRoomStatus();
if($timer_log_open) Log::notice($date . ' 执行更新直播间状态');
} elseif ($item['mark'] == 'take_delivery') {
//自动收货
app()->make(StoreOrderTakeServices::class)->autoTakeOrder();
if($timer_log_open) Log::notice($date . ' 执行自动收货');
} elseif ($item['mark'] == 'advance_off') {
//查询预售到期商品自动下架
app()->make(StoreProductServices::class)->downAdvance();
if($timer_log_open) Log::notice($date . ' 执行预售到期商品自动下架');
} elseif ($item['mark'] == 'product_replay') {
//自动好评
app()->make(StoreOrderServices::class)->autoComment();
if($timer_log_open) Log::notice($date . ' 执行自动好评');
} elseif ($item['mark'] == 'clear_poster') {
//清除昨日海报
app()->make(SystemAttachmentServices::class)->emptyYesterdayAttachment();
if($timer_log_open) Log::notice($date . ' 执行清除昨日海报');
}
//写入本次执行时间和下次执行时间
$this->dao->update(['mark' => $item['mark']], ['last_execution_time' => time(), 'next_execution_time' => $this->getTimerCycleTime($item)]);
$this->dao->update(['mark' => $item['mark']], ['last_execution_time' => $time, 'next_execution_time' => $this->getTimerCycleTime($item)]);
}
}
}

View File

@ -76,7 +76,7 @@ return [
//每页截取key
'limitKey' => 'limit',
//每页截取最大值
'limitMax' => 50,
'limitMax' => 100,
//默认条数
'defaultLimit' => 10,
]

View File

@ -24,6 +24,8 @@ return [
'success_log' => false,
//是否开启业务失败日志
'fail_log' => false,
//是否开启定时任务日志
'timer_log' => false,
// 日志通道列表
'channels' => [
'file' => [

View File

@ -126,17 +126,17 @@ class Cos extends BaseUpload
if (!$isStream) {
$fileHandle = app()->request->file($file);
if (!$fileHandle) {
return $this->setError('Upload file does not exist');
return $this->setError('上传的文件不存在');
}
if ($this->validate) {
if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) {
return $this->setError('Upload fileExt error');
return $this->setError('不合法的文件后缀');
}
if (filesize($fileHandle) > $this->validate['filesize']) {
return $this->setError('Upload filesize error');
return $this->setError('文件过大');
}
if (!in_array($fileHandle->getOriginalMime(), $this->validate['fileMime'])) {
return $this->setError('Upload fileMine error');
return $this->setError('不合法的文件类型');
}
}
$key = $this->saveFileName($fileHandle->getRealPath(), $fileHandle->getOriginalExtension());

View File

@ -113,17 +113,17 @@ class Local extends BaseUpload
{
$fileHandle = app()->request->file($file);
if (!$fileHandle) {
return $this->setError('Upload file does not exist');
return $this->setError('上传的文件不存在');
}
if ($this->validate) {
if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) {
return $this->setError('Upload fileExt error');
return $this->setError('不合法的文件后缀');
}
if (filesize($fileHandle) > $this->validate['filesize']) {
return $this->setError('Upload filesize error');
return $this->setError('文件过大');
}
if (!in_array($fileHandle->getOriginalMime(), $this->validate['fileMime'])) {
return $this->setError('Upload fileMine error');
return $this->setError('不合法的文件类型');
}
}
if ($realName) {

View File

@ -121,17 +121,17 @@ class Oss extends BaseUpload
{
$fileHandle = app()->request->file($file);
if (!$fileHandle) {
return $this->setError('Upload file does not exist');
return $this->setError('上传的文件不存在');
}
if ($this->validate) {
if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) {
return $this->setError('Upload fileExt error');
return $this->setError('不合法的文件后缀');
}
if (filesize($fileHandle) > $this->validate['filesize']) {
return $this->setError('Upload filesize error');
return $this->setError('文件过大');
}
if (!in_array($fileHandle->getOriginalMime(), $this->validate['fileMime'])) {
return $this->setError('Upload fileMine error');
return $this->setError('不合法的文件类型');
}
}
$key = $this->saveFileName($fileHandle->getRealPath(), $fileHandle->getOriginalExtension());

View File

@ -117,17 +117,17 @@ class Qiniu extends BaseUpload
{
$fileHandle = app()->request->file($file);
if (!$fileHandle) {
return $this->setError('Upload file does not exist');
return $this->setError('上传的文件不存在');
}
if ($this->validate) {
if (!in_array(pathinfo($fileHandle->getOriginalName(), PATHINFO_EXTENSION), $this->validate['fileExt'])) {
return $this->setError('Upload fileExt error');
return $this->setError('不合法的文件后缀');
}
if (filesize($fileHandle) > $this->validate['filesize']) {
return $this->setError('Upload filesize error');
return $this->setError('文件过大');
}
if (!in_array($fileHandle->getOriginalMime(), $this->validate['fileMime'])) {
return $this->setError('Upload fileMine error');
return $this->setError('不合法的文件类型');
}
}
$key = $this->saveFileName($fileHandle->getRealPath(), $fileHandle->getOriginalExtension());

File diff suppressed because one or more lines are too long

View File

@ -173,7 +173,8 @@
<div class="listBig" v-if="list.length > 0">
<div class="itemBig" :class="conStyle ? '' : 'itemOn'" v-for="(item, index) in list" :key="index">
<div class="img-box">
<img v-if="item.image" :src="item.image" alt="" />
<img v-if="item.recommend_image" :src="item.recommend_image" alt="" />
<img v-else-if="item.image" :src="item.image" alt="" />
<div v-else class="empty-box"><span class="iconfont-diy icontupian"></span></div>
<div class="label" :style="{ background: labelColor }" v-if="index == 0">标签</div>
</div>
@ -533,6 +534,7 @@ export default {
width 100%
height 160px
border-radius 10px 10px 0 0
object-fit unset
.empty-box
border-radius 8px 8px 0 0;
.label

View File

@ -53,7 +53,7 @@
class="label"
:style="'border:1px solid ' + labelColor + ';color:' + labelColor"
:class="priceShow ? '' : 'on'"
v-if="couponShow && item.checkCoupon"
v-if="couponShow"
>
券
</div>
@ -408,6 +408,7 @@ export default {
text-align center
line-height 18px
font-size 11px
border-radius 3px
&.on
margin-left 0;
</style>

View File

@ -223,7 +223,7 @@ export default {
let keys = Object.keys(this.editData);
keys.forEach((item) => {
this.formValidate[item] = this.editData[item];
if (item === 'coupon_title') {
if (item === 'coupon_title' && this.editData[item]) {
this.couponName.push({
title: this.editData[item],
id: this.editData.coupon_id,

View File

@ -100,14 +100,15 @@
<div v-else-if="row.status === 1">待收货</div>
<div v-else-if="row.status === 2">待评价</div>
<div v-else-if="row.status === 3">已完成</div>
<div v-else-if="row.status === -2">已退款</div>
</template>
<template slot-scope="{ row, index }" slot="header_type">
<div v-if="row.header_type === 1">个人</div>
<div v-else>企业</div>
</template>
<template slot-scope="{ row, index }" slot="action">
<a @click="edit(row)">编辑</a>
<Divider type="vertical" />
<a v-if="row.status != -2" @click="edit(row)">编辑</a>
<Divider v-if="row.status != -2" type="vertical" />
<a @click="orderInfo(row.id)">订单信息</a>
</template>
</Table>

View File

@ -294,7 +294,7 @@
>
<!-- 批量设置-->
<Col span="24" v-if="!formValidate.is_virtual">
<Col span="24" v-if="[0, 3].includes(formValidate.virtual_type)">
<FormItem label="批量设置:" class="labeltop">
<Table :data="oneFormBatch" :columns="formValidate.is_virtual ? columns3 : columns2" border>
<template slot-scope="{ row, index }" slot="pic">
@ -2137,7 +2137,7 @@ export default {
},
end() {
this.moveIndex = '';
this.generate(1)
this.generate(1);
},
// 单独设置会员设置
checkAllGroupChange(data) {

View File

@ -145,12 +145,12 @@
v-model="batchModal"
class="batch-box"
scrollable
closable
:closable="false"
title="批量设置"
:mask-closable="false"
width="1000"
@on-ok="batchSub"
@on-visible-change="clearBatchData"
@on-cancel="clearBatchData"
>
<Form
class="batchFormData"
@ -326,7 +326,7 @@ export default {
limit: 15,
cate_id: '',
type: '1',
store_name: ''
store_name: '',
},
list: [],
tableList: [],
@ -458,7 +458,9 @@ export default {
.then((res) => {
this.$Message.success(res.msg);
this.getDataList();
this.clearBatchData();
this.clearBatchData(false);
this.ids = [];
this.clearAll(false);
})
.catch((err) => {
this.$Message.error(err.msg);
@ -477,9 +479,7 @@ export default {
coupon_ids: [],
recommend: [],
};
this.ids = [];
this.dataLabel = [];
this.clearAll(false);
}
},
// 批量设置商品

View File

@ -125,7 +125,7 @@
<a @click="delTask(row, '删除这条信息', index)">删除</a>
</template>
</Table>
<div class="acea-row row-right page">
<!-- <div class="acea-row row-right page">
<Page
:total="taskTotal"
:current="taskData.page"
@ -134,7 +134,7 @@
@on-change="pageTaskChange"
:page-size="taskData.limit"
/>
</div>
</div> -->
</div>
</div>
</Modal>

View File

@ -78,7 +78,6 @@
let arr = new Array(num.toString().length);
arr.fill(0);
this.indexArr = arr;
console.log(this.indexArr)
},
watch: {
num: function(val, oldVal) {
@ -99,7 +98,6 @@
this.indexArr = arr;
}
this.numChange(val);
console.log(this.indexArr)
}
},
mounted() {
@ -129,7 +127,6 @@
}
}
this.indexArr = copyIndexArr;
console.log(this.indexArr)
})
}
}

View File

@ -392,13 +392,13 @@
bottom: 0px;
width: 100%;
height: 30px;
background-color: rgb(231, 27, 27, .5);
background-color: rgb(197, 150, 63, 0.5);
line-height: 30px;
color: #fff;
}
.suc-bg {
background-color: rgba(92, 184, 92, .5);
background-color: rgb(197, 150, 63, 0.5);
filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7f5CB85C, endcolorstr=#7f5CB85C);
}

View File

@ -11,7 +11,7 @@
</view>
<transition name="tips">
<text v-if="tipWords" class="verify-tips"
:class="passFlag ? 'suc-bg' : 'err-bg'">{{ tipWords }}</text>
:class="passFalg ? 'suc-bg' : 'err-bg'">{{ tipWords }}</text>
</transition>
</view>
</view>
@ -123,7 +123,7 @@ export default {
data() {
return {
secretKey: "", // 后端返回的加密秘钥 字段
passFlag: "", // 是否通过的标识
passFalg: "", // 是否通过的标识
backImgBase: "", // 验证码背景图片
blockBackImgBase: "", // 验证滑块的背景图片
backToken: "", // 后端返回的唯一token值
@ -491,13 +491,13 @@ export default {
bottom: 0px;
width: 100%;
height: 30px;
background-color: rgb(231, 27, 27, .5);
background-color: rgb(197, 150, 63, 0.5);
line-height: 30px;
color: #fff;
}
.suc-bg {
background-color: rgba(92, 184, 92, .5);
background-color: rgb(197, 150, 63, 0.5);
filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7f5CB85C, endcolorstr=#7f5CB85C);
}

View File

@ -469,7 +469,7 @@
this.groomList();
uni.hideLoading();
uni.showToast({
title: this.$t(`成功开启0元试用`),
title: this.$t(`成功开启试用`),
});
}
}).catch(err => {
@ -488,7 +488,7 @@
this.groomList();
uni.hideLoading();
uni.showToast({
title: this.$t(`成功开启0元试用`),
title: this.$t(`成功开启试用`),
});
}
}).catch(err => {

View File

@ -1,9 +1,9 @@
<template>
<view class="page" v-if="payPrice">
<view class="page" v-if="payPriceShow">
<view class="pay-price">
<view class="price">
<text class="unit">{{$t(`¥`)}}</text>
<numberScroll :num='payPrice' color="#E93323" width='30' height='50' fontSize='50'></numberScroll>
<numberScroll :num='payPriceShow' color="#E93323" width='30' height='50' fontSize='50'></numberScroll>
</view>
<view class="count-down">
{{$t(`支付剩余时间`)}}:
@ -94,7 +94,10 @@
orderId: 0,
fromType: '',
active: 0,
payPrice: 0,
payPrice: 0,
payPriceShow: 0,
payPostage: 0,
offlinePostage: false,
invalidTime: 0,
initIn: false,
jumpData: {
@ -140,7 +143,7 @@
title: this.$t(`取消支付`)
}, {
tab: 5,
url: `/pages/goods/order_pay_status/index?order_id=${this.orderId}&msg=${this.$t(`取消支付`)}&type=3&totalPrice=${this.payPrice}&status=2`
url: `/pages/goods/order_pay_status/index?order_id=${this.orderId}&msg=${this.$t(`取消支付`)}&type=3&totalPrice=${this.payPriceShow}&status=2`
});
} else {
if (extraData.code == 'success') {
@ -149,7 +152,7 @@
icon: 'success'
}, {
tab: 5,
url: `/pages/goods/order_pay_status/index?order_id=${this.orderId}&msg=${this.jumpData.msg}&type=3&totalPrice=${this.payPrice}`
url: `/pages/goods/order_pay_status/index?order_id=${this.orderId}&msg=${this.jumpData.msg}&type=3&totalPrice=${this.payPriceShow}`
});
} else if (extraData.code == 'cancel') {
// "支付已取消";
@ -157,12 +160,12 @@
title: this.$t(`取消支付`)
}, {
tab: 5,
url: `/pages/goods/order_pay_status/index?order_id=${this.orderId}&msg=${this.$t(`取消支付`)}&type=3&totalPrice=${this.payPrice}&status=2`
url: `/pages/goods/order_pay_status/index?order_id=${this.orderId}&msg=${this.$t(`取消支付`)}&type=3&totalPrice=${this.payPriceShow}&status=2`
});
} else {
// "支付失败:" + extraData.errmsg;
uni.reLaunch({
url: `/pages/goods/order_pay_status/index?order_id=${this.orderId}&msg=${this.$t(`支付失败`)}&totalPrice=${this.payPrice}`
url: `/pages/goods/order_pay_status/index?order_id=${this.orderId}&msg=${this.$t(`支付失败`)}&totalPrice=${this.payPriceShow}`
})
}
}
@ -175,7 +178,9 @@
});
getCashierOrder(this.orderId, this.fromType).then(res => {
console.log(res)
this.payPrice = res.data.pay_price
this.payPrice = this.payPriceShow = res.data.pay_price
this.payPostage = res.data.pay_postage
this.offlinePostage = res.data.offline_postage
this.invalidTime = res.data.invalid_time
//微信支付是否开启
this.cartArr[0].payStatus = res.data.wechat_pay_status || 0
@ -207,6 +212,14 @@
this.active = index;
this.paytype = paytype;
this.number = number;
if (this.offlinePostage) {
if (paytype == 'offline') {
this.payPriceShow = this.$util.$h.Sub(this.payPrice, this.payPostage);
} else {
this.payPriceShow = this.payPrice;
}
}
},
formpost(url, postData) {
let tempform = document.createElement("form");
@ -228,7 +241,7 @@
waitPay() {
uni.reLaunch({
url: '/pages/goods/order_pay_status/index?order_id=' + this.orderId + '&msg=取消支付&type=3' +
'&status=2&totalPrice=' + this.payPrice
'&status=2&totalPrice=' + this.payPriceShow
})
},
goPay(number, paytype) {
@ -236,7 +249,7 @@
if (!that.orderId) return that.$util.Tips({
title: that.$t(`请选择要支付的订单`)
});
if (paytype == 'yue' && parseFloat(number) < parseFloat(that.payPrice)) return that.$util.Tips({
if (paytype == 'yue' && parseFloat(number) < parseFloat(that.payPriceShow)) return that.$util.Tips({
title: that.$t(`余额不足`)
});
uni.showLoading({
@ -272,7 +285,7 @@
goPages = '/pages/goods/order_pay_status/index?order_id=' + this.orderId + '&msg=' +
res
.msg +
'&type=3' + '&totalPrice=' + this.payPrice,
'&type=3' + '&totalPrice=' + this.payPriceShow,
friendPay = '/pages/users/payment_on_behalf/index?order_id=' + this.orderId +
'&spread=' +
this
@ -505,17 +518,11 @@
case 'ALIPAY_PAY':
//#ifdef H5
if (this.from === 'weixin') {
uni.redirectTo({
url: `/pages/users/alipay_invoke/index?id=${orderId}&pay_key=${res.data.result.pay_key}`
});
} else {
uni.hideLoading();
that.formContent = res.data.result.jsConfig;
that.$nextTick(() => {
document.getElementById('alipaysubmit').submit();
})
}
uni.hideLoading();
that.formContent = res.data.result.jsConfig;
that.$nextTick(() => {
document.getElementById('alipaysubmit').submit();
})
//#endif
// #ifdef MP
uni.navigateTo({

View File

@ -10,7 +10,7 @@
<view class='text acea-row row-between'>
<view class='name line2'>{{item.productInfo.store_name}}</view>
<view class='money'>
<view>{{$t(`¥`)}}{{item.truePrice}}</view>
<view>{{$t(`¥`)}}{{(parseFloat(item.truePrice)+parseFloat(item.postage_price)).toFixed(2)}}</view>
<view class='num'>x{{item.cart_num}}</view>
</view>
</view>

View File

@ -342,7 +342,7 @@
],
virtual_type: 0,
formContent: '',
payType: 'weixin', //支付方式
payType: '', //支付方式
openType: 1, //优惠券打开方式 1=使用
active: 0, //支付方式切换
coupon: {
@ -1284,9 +1284,6 @@
let that = this,
data = {};
if (!that.payType) return that.$util.Tips({
title: that.$t(`请选择支付方式`)
});
if (!that.addressId && !that.shippingType && !that.virtual_type) return that.$util.Tips({
title: that.$t(`请选择收货地址`)
});
@ -1614,8 +1611,8 @@
.mark {
background-color: #f9f9f9;
width: 345px;
height: 70px;
// width: 345px;
min-height: 70px;
border-radius: 1px;
margin-top: 15px;
padding: 12px 14px;
@ -1626,7 +1623,7 @@
.mark-msg {
color: #333;
font-size: 32rpx;
font-size: 28rpx;
}
}
@ -1669,11 +1666,12 @@
.order-submission .wrapper .item textarea {
background-color: #f9f9f9;
width: 690rpx;
height: 140rpx;
width: 100%;
height: 135rpx;
border-radius: 3rpx;
margin-top: 30rpx;
padding: 25rpx 28rpx;
padding: 25rpx 28rpx;
font-size: 28rpx;
box-sizing: border-box;
}

View File

@ -1,195 +1,197 @@
<template>
<view v-show="!isSortType">
<view class="explosion" :style="'margin-top:' + mbConfig*2 +'rpx;background-color:' + boxColor+';'"
v-if="explosiveMoney.length">
<view class="hd skeleton-rect">
<!-- <image src="/static/images/explosion-title.png" mode=""></image> -->
<view class="title" :style="'color:'+themeColor+';'">{{$t(titleConfig)}}</view>
<view class="txt"
:style="'background: linear-gradient(90deg, '+ bgColor[0].item +' 0%, '+ bgColor[1].item +' 100%);'">
{{$t(desConfig)}}
</view>
</view>
<view class="bd">
<view class="item skeleton-rect" @click="goDetail(item)" v-for="(item,index) in explosiveMoney" :key="index">
<view class="con-box">
<view class="title line1">{{$t(item.info[0].value)}}</view>
<view class="con line2">{{$t(item.info[1].value)}}</view>
<view class="go">GO!<image src="/static/images/right-icon.png" mode=""></image>
</view>
</view>
<image :src="item.img" mode="aspectFill"></image>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'activeParty',
props: {
dataConfig: {
type: Object,
default: () => {}
},
isSortType: {
type: String | Number,
default: 0
}
},
data() {
return {
titleConfig: this.dataConfig.titleConfig.value,
desConfig: this.dataConfig.desConfig.value,
explosiveMoney: this.dataConfig.menuConfig.list,
themeColor: this.dataConfig.themeColor.color[0].item,
bgColor: this.dataConfig.bgColor.color,
mbConfig: this.dataConfig.mbConfig.val,
boxColor: this.dataConfig.boxColor.color[0].item
};
},
created() {},
methods: {
goDetail(item) {
let urls = item.info[2].value
if (['/pages/goods_cate/goods_cate', '/pages/order_addcart/order_addcart', '/pages/user/index']
.indexOf(urls) == -1) {
uni.navigateTo({
url: urls
})
} else {
uni.switchTab({
url: urls
})
}
}
}
}
</script>
<style lang="scss">
.explosion {
width: 710rpx;
margin-top: 20rpx;
margin: 20rpx auto 0 auto;
padding: 30rpx 20rpx;
padding: 30rpx 20rpx 6rpx 20rpx;
background-color: #FFE5E3;
background-size: 100% 100%;
border-radius: 13px;
box-sizing: border-box;
.hd {
display: flex;
align-items: center;
.title {
font-size: 32rpx;
font-weight: bold;
margin-right: 12rpx;
}
image {
width: 147rpx;
height: 35rpx;
margin-right: 20rpx;
}
.txt {
padding: 0 10rpx;
height: 36rpx;
// background: linear-gradient(90deg, rgba(255, 168, 0, 1) 0%, rgba(255, 34, 15, 1) 100%);
border-radius: 26rpx 0px 26rpx 0px;
color: #fff;
text-align: center;
font-size: 22rpx;
box-shadow: 3px 1px 1px 1px var(--view-minorColorT);
}
}
.bd {
display: flex;
flex-wrap: wrap;
margin-top: 28rpx;
.item {
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
width: 325rpx;
height: 180rpx;
margin-bottom: 20rpx;
margin-right: 20rpx;
background-color: #fff;
border-radius: 16rpx;
padding: 0 20rpx;
box-sizing: border-box;
image {
width: 140rpx;
height: 140rpx;
}
.con-box {
display: flex;
flex-direction: column;
justify-content: center;
width: 130rpx;
height: 100%;
.title {
color: #282828;
font-size: 28rpx;
}
.con {
color: #999999;
font-size: 20rpx;
margin-top: 2rpx;
}
.go {
display: flex;
align-items: center;
justify-content: center;
margin-top: 10rpx;
width: 112rpx;
height: 36rpx;
border-radius: 18rpx;
color: #fff;
font-size: 26rpx;
font-weight: bold;
font-style: italic;
image {
width: 26rpx;
height: 26rpx;
}
}
}
&:first-child .go {
background: linear-gradient(90deg, rgba(75, 196, 255, 1) 0%, rgba(32, 126, 255, 1) 100%);
}
&:nth-child(2) .go {
background: linear-gradient(90deg, rgba(255, 144, 67, 1) 0%, rgba(255, 83, 29, 1) 100%);
}
&:nth-child(3) .go {
background: linear-gradient(90deg, rgba(150, 225, 135, 1) 0%, rgba(72, 206, 44, 1) 100%);
}
&:nth-child(4) .go {
background: linear-gradient(90deg, rgba(255, 197, 96, 1) 0%, rgba(255, 156, 0, 1) 100%);
}
&:nth-child(2n) {
margin-right: 0;
}
}
}
}
</style>
<template>
<view v-show="!isSortType">
<view class="explosion" :style="'margin-top:' + mbConfig*2 +'rpx;background-color:' + boxColor+';'"
v-if="explosiveMoney.length">
<view class="hd skeleton-rect">
<!-- <image src="/static/images/explosion-title.png" mode=""></image> -->
<view class="title" :style="'color:'+themeColor+';'">{{$t(titleConfig)}}</view>
<view class="txt"
:style="'background: linear-gradient(90deg, '+ bgColor[0].item +' 0%, '+ bgColor[1].item +' 100%);'">
{{$t(desConfig)}}
</view>
</view>
<view class="bd">
<view class="item skeleton-rect" @click="goDetail(item)" v-for="(item,index) in explosiveMoney"
:key="index">
<view class="con-box">
<view class="title line1">{{$t(item.info[0].value)}}</view>
<view class="con line2">{{$t(item.info[1].value)}}</view>
<view class="go">GO!<image src="/static/images/right-icon.png" mode=""></image>
</view>
</view>
<image :src="item.img" mode="aspectFill"></image>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'activeParty',
props: {
dataConfig: {
type: Object,
default: () => {}
},
isSortType: {
type: String | Number,
default: 0
}
},
data() {
return {
titleConfig: this.dataConfig.titleConfig.value,
desConfig: this.dataConfig.desConfig.value,
explosiveMoney: this.dataConfig.menuConfig.list,
themeColor: this.dataConfig.themeColor.color[0].item,
bgColor: this.dataConfig.bgColor.color,
mbConfig: this.dataConfig.mbConfig.val,
boxColor: this.dataConfig.boxColor.color[0].item
};
},
created() {},
methods: {
goDetail(item) {
let urls = item.info[2].value
if (['/pages/goods_cate/goods_cate', '/pages/order_addcart/order_addcart', '/pages/user/index']
.indexOf(urls) == -1) {
uni.navigateTo({
url: urls
})
} else {
uni.switchTab({
url: urls
})
}
}
}
}
</script>
<style lang="scss">
.explosion {
width: 710rpx;
margin-top: 20rpx;
margin: 20rpx auto 0 auto;
padding: 30rpx 20rpx;
padding: 30rpx 20rpx 6rpx 20rpx;
background-color: #FFE5E3;
background-size: 100% 100%;
border-radius: 13px;
box-sizing: border-box;
.hd {
display: flex;
align-items: center;
.title {
font-size: 32rpx;
font-weight: bold;
margin-right: 12rpx;
}
image {
width: 147rpx;
height: 35rpx;
margin-right: 20rpx;
}
.txt {
padding: 0 10rpx;
height: 36rpx;
line-height: 36rpx;
// background: linear-gradient(90deg, rgba(255, 168, 0, 1) 0%, rgba(255, 34, 15, 1) 100%);
border-radius: 26rpx 0px 26rpx 0px;
color: #fff;
text-align: center;
font-size: 22rpx;
box-shadow: 3px 1px 1px 1px var(--view-minorColorT);
}
}
.bd {
display: flex;
flex-wrap: wrap;
margin-top: 28rpx;
.item {
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
width: 325rpx;
height: 180rpx;
margin-bottom: 20rpx;
margin-right: 20rpx;
background-color: #fff;
border-radius: 16rpx;
padding: 0 20rpx;
box-sizing: border-box;
image {
width: 140rpx;
height: 140rpx;
}
.con-box {
display: flex;
flex-direction: column;
justify-content: center;
width: 130rpx;
height: 100%;
.title {
color: #282828;
font-size: 28rpx;
}
.con {
color: #999999;
font-size: 20rpx;
margin-top: 2rpx;
}
.go {
display: flex;
align-items: center;
justify-content: center;
margin-top: 10rpx;
width: 112rpx;
height: 36rpx;
border-radius: 18rpx;
color: #fff;
font-size: 26rpx;
font-weight: bold;
font-style: italic;
image {
width: 26rpx;
height: 26rpx;
}
}
}
&:first-child .go {
background: linear-gradient(90deg, rgba(75, 196, 255, 1) 0%, rgba(32, 126, 255, 1) 100%);
}
&:nth-child(2) .go {
background: linear-gradient(90deg, rgba(255, 144, 67, 1) 0%, rgba(255, 83, 29, 1) 100%);
}
&:nth-child(3) .go {
background: linear-gradient(90deg, rgba(150, 225, 135, 1) 0%, rgba(72, 206, 44, 1) 100%);
}
&:nth-child(4) .go {
background: linear-gradient(90deg, rgba(255, 197, 96, 1) 0%, rgba(255, 156, 0, 1) 100%);
}
&:nth-child(2n) {
margin-right: 0;
}
}
}
}
</style>

View File

@ -117,8 +117,8 @@
v-if="item.activity && item.activity.type === '2'">{{$t(`砍价`)}}</span>
<span class="pictrue_log_big pictrue_log_class" :style="'background-color:'+labelColor"
v-if="item.activity && item.activity.type === '3'">{{$t(`拼团`)}}</span>
<image :src="item.recommend_image" mode="aspectFill" v-if="item.recommend_image"></image>
<image :src="item.image" mode="widthFix" v-else></image>
<image :src="item.recommend_image" mode="" v-if="item.recommend_image"></image>
<image :src="item.image" mode="" v-else></image>
</view>
<view class="name line2"><span class="coupon"
:style="'border:1px solid '+labelColor+';color:'+labelColor"

View File

@ -706,18 +706,19 @@
addCart: function(index) {
let that = this;
let item = that.cartList.valid[index];
item.cart_num = Number(item.cart_num) + 1;
let lastnum = Number(item.cart_num) + 1
let productInfo = item.productInfo;
if (productInfo.hasOwnProperty('attrInfo') && item.cart_num >= item.productInfo.attrInfo.stock) {
item.cart_num = item.productInfo.attrInfo.stock;
if (productInfo.hasOwnProperty('attrInfo') && lastnum >= item.productInfo.attrInfo.stock) {
lastnum = item.productInfo.attrInfo.stock;
item.numAdd = true;
item.numSub = false;
} else {
item.numAdd = false;
item.numSub = false;
}
that.setCartNum(item.id, item.cart_num, function(data) {
that.setCartNum(item.id, lastnum, (data) => {
that.cartList.valid[index] = item;
item.cart_num = Number(item.cart_num) + 1;
that.getCartNum();
that.switchSelect();
});

File diff suppressed because it is too large Load Diff

View File

@ -52,7 +52,7 @@
<!-- #endif -->
</view>
<view class="info">
<!-- #ifdef MP -->
<!-- #ifdef MP || APP-PLUS -->
<view class="name" v-if="!userInfo.uid" @click="openAuto"
style="height: 100%; display: flex; align-items: center;">
{{$t('请点击授权')}}

View File

@ -392,13 +392,13 @@
bottom: 0px;
width: 100%;
height: 30px;
background-color: rgb(231, 27, 27, .5);
background-color: rgb(197, 150, 63, 0.5);;
line-height: 30px;
color: #fff;
}
.suc-bg {
background-color: rgba(92, 184, 92, .5);
background-color: rgb(197, 150, 63, 0.5);;
filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7f5CB85C, endcolorstr=#7f5CB85C);
}

View File

@ -11,7 +11,7 @@
</view>
<transition name="tips">
<text v-if="tipWords" class="verify-tips"
:class="passFlag ? 'suc-bg' : 'err-bg'">{{ tipWords }}</text>
:class="passFalg ? 'suc-bg' : 'err-bg'">{{ tipWords }}</text>
</transition>
</view>
</view>
@ -123,7 +123,7 @@ export default {
data() {
return {
secretKey: "", // 后端返回的加密秘钥 字段
passFlag: "", // 是否通过的标识
passFalg: "", // 是否通过的标识
backImgBase: "", // 验证码背景图片
blockBackImgBase: "", // 验证滑块的背景图片
backToken: "", // 后端返回的唯一token值
@ -491,13 +491,13 @@ export default {
bottom: 0px;
width: 100%;
height: 30px;
background-color: rgb(231, 27, 27, .5);
background-color: rgb(197, 150, 63, 0.5);;
line-height: 30px;
color: #fff;
}
.suc-bg {
background-color: rgba(92, 184, 92, .5);
background-color: rgb(197, 150, 63, 0.5);;
filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7f5CB85C, endcolorstr=#7f5CB85C);
}

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,7 @@
<view class='name line1'>{{$t(itemn.title)}}</view>
<view>{{itemn.add_time}}</view>
</view>
<view class='num font-color'>+{{itemn.number}}</view>
<view class='num'>+{{itemn.number}}</view>
</view>
</view>
</view>