盒格速M源码盒格速M系统开发功能与玩法介绍

最近新开发了一款盒格速M系统,其主要功能有支付系统,电商系统,预约系统,会员系统等等,在开发的过程中,需要注意的是预约系统,用户如果需要预约,那么就需要先进行在电商系统中进行下单并且确认才能进行预约。

盒格速M玩法介绍:盒格速M源码盒格速M系统开发功能与玩法介绍_第1张图片

盒格速M源码盒格速M系统开发功能与玩法介绍_第2张图片 

盒格速M源码盒格速M系统开发功能与玩法介绍_第3张图片 

盒格速M源码盒格速M系统开发功能与玩法介绍_第4张图片 

盒格速M部分开发源码分享:

 


    $group = UtilService::postMore([
        ['unique', ''], ['comment', ''], ['pics', ''], ['product_score', 5], ['service_score', 5]
    ], $request);
    $unique = $group['unique'];
    unset($group['unique']);
    if (!$unique) return app('json')->fail('参数错误!');
    $cartInfo = StoreOrderCartInfo::where('unique', $unique)->find();
    $uid = $request->uid();
    $user_info = User::get($uid);
    $group['nickname'] = $user_info['nickname'];
    $group['avatar'] = $user_info['avatar'];
    if (!$cartInfo) return app('json')->fail('评价产品不存在!');
    $orderUid = StoreOrder::getOrderInfo($cartInfo['oid'], 'uid')['uid'];
    if ($uid != $orderUid) return app('json')->fail('评价产品不存在!');
    if (StoreProductReply::be(['oid' => $cartInfo['oid'], 'unique' => $unique]))
        return app('json')->fail('该产品已评价!');
    $group['comment'] = htmlspecialchars(trim($group['comment']));
    if ($group['product_score'] < 1) return app('json')->fail('请为产品评分');
    else if ($group['service_score'] < 1) return app('json')->fail('请为商家服务评分');
    if ($cartInfo['cart_info']['combination_id']) $productId = $cartInfo['cart_info']['product_id'];
    else if ($cartInfo['cart_info']['seckill_id']) $productId = $cartInfo['cart_info']['product_id'];
    else if ($cartInfo['cart_info']['bargain_id']) $productId = $cartInfo['cart_info']['product_id'];
    else $productId = $cartInfo['product_id'];
    if ($group['pics']) $group['pics'] = json_encode(is_array($group['pics']) ? $group['pics'] : explode(',', $group['pics']));
    $group = array_merge($group, [
        'uid' => $uid,
        'oid' => $cartInfo['oid'],
        'unique' => $unique,
        'product_id' => $productId,
        'add_time' => time(),
        'reply_type' => 'product'
    ]);
    StoreProductReply::beginTrans();
    $res = StoreProductReply::reply($group, 'product');
    if (!$res) {
        StoreProductReply::rollbackTrans();
        return app('json')->fail('评价失败!');
    }
    try {
        StoreOrder::checkOrderOver($cartInfo['oid']);
    } catch (\Exception $e) {
    

你可能感兴趣的:(php)