最近新开发了一款姿薇优选系统,其主要功能有预约系统,支付系统,商城系统,会员系统,积分系统,物流系统,赠送系统,实名认证系统等等。
会员系统包含:
会员注册,会员登陆,密码修改,找回密码,专属二维码,收货地址,积分兑换等等
1. 会员注册。
会员注册设置为手机号作为唯一的注册ID。该算法为当前成员生成一个隐藏的ID,这是用户数据查询的唯一ID。同事们,会员注册成功后,系统会随机生成一个邀请码ID,以备日后分享推广。
2. 会员登录。
系统有两种注册方式。您可以选择使用密码或接收短信验证码登录。从用户体验上看,目前市面上大部分APP都是选择后者,毕竟短信验证码登录方式是不需要记住密码的。短信验证码点击后会自动在文本框中填写,方便很多。这两种登陆方式也是目前主流的登陆方式,很多软件在开发过程中通常会选择这两个登陆方式。
3. 修改密码。
有两个密码更改。功能,一是修改登录密码,二是修改支付密码。登录密码用户帐号登录,支付密码用户余额付款,提款申请填写。用户在修改密码的过程中,需要注意密码的哪一部分忘记了,然后再进行修改。
4. 修改信息。
修改信息说明就是修改用户自己的昵称、性别、头像等相关个人信息。
5. 专属二维码。
系统为当前会员生成专属二维码信息。二维码信息包括报名地址和邀请码ID。二维码信息用户邀请新会员注册。微信扫码后会弹出报名地址,报名系统默认。记录当前促销的会员ID,以绑定和锁定会员促销的关联公司和关联公司之间的关系。
6.积分兑换
用户在平台消费可以获得积分,在积分兑换页面,用户可以根据自己账户积分情况,进行选择积分兑换方式,积分兑换方式分为两种,一种是直接选择积分兑换,另外一种是积分+现金的方式进行兑换,积分可以通过平台兑换产品,不同的产品兑换积分不同。用户如果积分不足也可以通过现金+积分的方式进行兑换产品,产品分类多样化。
姿薇优选系统用户源码分享:
<?php
namespace app\api\controller\user;
use app\http\validates\user\AddressValidate;
use app\models\system\SystemCity;
use app\models\system\SystemUserLevel;
use app\models\system\SystemUserTask;
use app\models\user\UserProfitLog;
use think\exception\ValidateException;
use app\Request;
use app\models\user\UserLevel;
use app\models\user\UserSign;
use app\models\store\StoreBargain;
use app\models\store\StoreCombination;
use app\models\store\StoreCouponUser;
use app\models\store\StoreOrder;
use app\models\store\StoreProductRelation;
use app\models\store\StoreSeckill;
use app\models\user\User;
use app\models\user\UserAddress;
use app\models\user\UserBill;
use app\models\user\UserExtract;
use app\models\user\UserNotice;
use crmeb\services\GroupDataService;
use crmeb\services\UtilService;
use think\facade\Db;
/**
* 用户类
* Class UserController
* @package app\api\controller\store
*/
class UserController
{
/**
* 获取用户信息
* @param Request $request
* @return mixed
*/
public function userInfo(Request $request)
{
$info = $request->user()->toArray();
$broken_time = intval(sys_config('extract_time'));
$search_time = time() - 86400 * $broken_time;
//返佣 +
$brokerage_commission = UserBill::where(['uid' => $info['uid'], 'category' => 'now_money', 'type' => 'brokerage'])
->where('add_time', '>', $search_time)
->where('pm', 1)
->sum('number');
//退款退的佣金 -
$refund_commission = UserBill::where(['uid' => $info['uid'], 'category' => 'now_money', 'type' => 'brokerage'])
->where('add_time', '>', $search_time)
->where('pm', 0)
->sum('number');
$info['broken_commission'] = bcsub($brokerage_commission, $refund_commission, 2);
if ($info['broken_commission'] < 0)
$info['broken_commission'] = 0;
$info['commissionCount'] = bcsub($info['brokerage_price'], $info['broken_commission'], 2);
if ($info['commissionCount'] < 0)
$info['commissionCount'] = 0;
return app('json')->success($info);
}
/**
* 用户资金统计
* @param Request $request
* @return mixed
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function balance(Request $request)
{
$uid = $request->uid();
$user['now_money'] = User::getUserInfo($uid, 'now_money')['now_money'];//当前总资金
$user['recharge'] = UserBill::getRecharge($uid);//累计充值
//$user['orderStatusSum'] = StoreOrder::getOrderStatusSum($uid);//累计消费
return app('json')->successful($user);
}
/**
* 个人中心
* @param Request $request
* @return mixed
*/
public function user(Request $request)
{
$user = $request->user();
$user = $user->toArray();
$user['couponCount'] = StoreCouponUser::getUserValidCouponCount($user['uid']);
$user['like'] = StoreProductRelation::getUserIdCollect($user['uid']);
$user['orderStatusNum'] = StoreOrder::getOrderData($user['uid']);
$user['notice'] = UserNotice::getNotice($user['uid']);
// $user['brokerage'] = UserBill::getBrokerage($user['uid']);//获取总佣金
$user['recharge'] = UserBill::getRecharge($user['uid']);//累计充值
$user['orderStatusSum'] = StoreOrder::getOrderStatusSum($user['uid']);//累计消费
$user['extractTotalPrice'] = UserExtract::userExtractTotalPrice($user['uid']);//累计提现
$user['extractPrice'] = $user['brokerage_price'];//可提现
$user['statu'] = (int)sys_config('store_brokerage_statu');
$broken_time = intval(sys_config('extract_time'));
$search_time = time() - 86400 * $broken_time;
if (!$user['is_promoter'] && $user['statu'] == 2) {
$price = StoreOrder::where(['paid' => 1, 'refund_status' => 0, 'uid' => $user['uid']])->sum('pay_price');
$status = is_brokerage_statu($price);
if ($status) {
User::where('uid', $user['uid'])->update(['is_promoter' => 1]);
$user['is_promoter'] = 1;
} else {
$storeBrokeragePrice = sys_config('store_brokerage_price', 0);
$user['promoter_price'] = bcsub($storeBrokeragePrice, $price, 2);
}
}
//可提现佣金
//返佣 +
$brokerage_commission = UserBill::where(['uid' => $user['uid'], 'category' => 'now_money', 'type' => 'brokerage'])
->where('add_time', '>', $search_time)
->where('pm', 1)
->sum('number');
//退款退的佣金 -
$refund_commission = UserBill::where(['uid' => $user['uid'], 'category' => 'now_money', 'type' => 'brokerage'])
->where('add_time', '>', $search_time)
->where('pm', 0)
->sum('number');
$user['broken_commission'] = bcsub($brokerage_commission, $refund_commission, 2);
if ($user['broken_commission'] < 0)
$user['broken_commission'] = 0;
$user['commissionCount'] = bcsub($user['brokerage_price'], $user['broken_commission'], 2);
if ($user['commissionCount'] < 0)
$user['commissionCount'] = 0;
if (!sys_config('vip_open'))
$user['vip'] = false;
else {
$vipId = UserLevel::getUserLevel($user['uid']);
$user['vip'] = $vipId !== false ? true : false;
if ($user['vip']) {
$user['vip_id'] = $vipId;
$grade = UserLevel::getUserLevelInfo($vipId, 'grade');
$next_id = (new SystemUserLevel)->where('grade',$grade+1)->value('id');
$user['next_vip'] = (new SystemUserTask())
->where('level_id',$next_id)
->where('task_type','TeamPerformance')
->find()->toArray();
$user['next_vip_name'] = (new SystemUserLevel())->where('id',$next_id)->value('name');
$user['vip_name'] = UserLevel::getUserLevelInfo($vipId, 'name');
$user['jd'] = number_format($user['team_sales_total']/$user['next_vip']['number']*100);
}else{
$user['vip_name']='会员';
$next_id = (new SystemUserLevel)->where('grade',1)->value('id');
$user['next_vip'] = (new SystemUserTask())
->where('level_id',$next_id)
->where('task_type','TeamPerformance')
->find()->toArray();
$user['next_vip_name'] = (new SystemUserLevel())->where('id',$next_id)->value('name');
$user['jd'] = number_format($user['team_sales_total']/$user['next_vip']['number']*100);
}
}
$user['yesterDay'] = Db::name('user_profit_log')->where('uid',$user['uid'])->where('add_time',date("Y-m-d",strtotime("-1 day")))->sum('price');
$user['recharge_switch'] = (int)sys_config('recharge_switch');//充值开关
$user['adminid'] = (boolean)\app\models\store\StoreService::orderServiceStatus($user['uid']);
if ($user['phone'] && $user['user_type'] != 'h5') {
$user['switchUserInfo'][] = $request->user();
if ($h5UserInfo = User::where('account', $user['phone'])->where('user_type', 'h5')->find()) {
$user['switchUserInfo'][] = $h5UserInfo;
}
} else if ($user['phone'] && $user['user_type'] == 'h5') {
if ($wechatUserInfo = User::where('phone', $user['phone'])->where('user_type', '<>', 'h5')->find()) {
$user['switchUserInfo'][] = $wechatUserInfo;
}
$user['switchUserInfo'][] = $request->user();
} else if (!$user['phone']) {
$user['switchUserInfo'][] = $request->user();
}
$user['box'] =StoreOrder::where('paid',1)->where('status',10)->where('uid',$user['uid'])->count();
$user['bb'] =StoreOrder::where('paid',1)->where('status',11)->where('uid',$user['uid'])->where('is_sell','in','0,1,3')->count();
// $user['static'] = UserProfitLog::where('type',2)->where('uid',$request->uid())->sum('price');
// $user['todySy'] = number_format(UserProfitLog::where('add_time',date('Y-m-d'))->where('uid',$request->uid())->sum('price'),2);
return app('json')->successful($user);
}
/**
* 地址 获取单个
* @param Request $request
* @param $id
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function address(Request $request, $id)
{
$addressInfo = [];
if ($id && is_numeric($id) && UserAddress::be(['is_del' => 0, 'id' => $id, 'uid' => $request->uid()])) {
$addressInfo = UserAddress::find($id)->toArray();
}
return app('json')->successful($addressInfo);
}
/**
* 地址列表
* @param Request $request
* @param $page
* @param $limit
* @return mixed
*/
public function address_list(Request $request)
{
list($page, $limit) = UtilService::getMore([['page', 0], ['limit', 20]], $request, true);
$list = UserAddress::getUserValidAddressList($request->uid(), $page, $limit, 'id,real_name,phone,province,city,district,detail,is_default');
return app('json')->successful($list);
}
/**
* 设置默认地址
*
* @param Request $request
* @return mixed
*/
public function address_default_set(Request $request)
{
list($id) = UtilService::getMore([['id', 0]], $request, true);
if (!$id || !is_numeric($id)) return app('json')->fail('参数错误!');
if (!UserAddress::be(['is_del' => 0, 'id' => $id, 'uid' => $request->uid()]))
return app('json')->fail('地址不存在!');
$res = UserAddress::setDefaultAddress($id, $request->uid());
if (!$res)
return app('json')->fail('地址不存在!');
else
return app('json')->successful();
}
/**
* 获取默认地址
* @param Request $request
* @return mixed
*/
public function address_default(Request $request)
{
$defaultAddress = UserAddress::getUserDefaultAddress($request->uid(), 'id,real_name,phone,province,city,district,detail,is_default');
if ($defaultAddress) {
$defaultAddress = $defaultAddress->toArray();
return app('json')->successful('ok', $defaultAddress);
}
return app('json')->successful('empty', []);
}
/**
* 修改 添加地址
* @param Request $request
* @return mixed
*/
public function address_edit(Request $request)
{
$addressInfo = UtilService::postMore([
['address', []],
['is_default', false],
['real_name', ''],
['post_code', ''],
['phone', ''],
['detail', ''],
['id', 0],
['type', 0]
], $request);
if (!isset($addressInfo['address']['province'])) return app('json')->fail('收货地址格式错误!');
if (!isset($addressInfo['address']['city'])) return app('json')->fail('收货地址格式错误!');
if (!isset($addressInfo['address']['district'])) return app('json')->fail('收货地址格式错误!');
if (!isset($addressInfo['address']['city_id']) && $addressInfo['type'] == 0) {
return app('json')->fail('收货地址格式错误!请重新选择!');
} else if ($addressInfo['type'] == 1 && !$addressInfo['id']) {
$city = $addressInfo['address']['city'];
$cityId = SystemCity::where('name', $city)->where('parent_id', '<>', 0)->value('city_id');
if ($cityId) {
$addressInfo['address']['city_id'] = $cityId;
} else {
if (!($cityId = SystemCity::where('parent_id', '<>', 0)->where('name', 'like', "%$city%")->value('city_id'))) {
return app('json')->fail('收货地址格式错误!修改后请重新导入!');
}
}
}
$addressInfo['province'] = $addressInfo['address']['province'];
$addressInfo['city'] = $addressInfo['address']['city'];
$addressInfo['city_id'] = $addressInfo['address']['city_id'] ?? 0;
$addressInfo['district'] = $addressInfo['address']['district'];
$addressInfo['is_default'] = (int)$addressInfo['is_default'] == true ? 1 : 0;
$addressInfo['uid'] = $request->uid();
unset($addressInfo['address'], $addressInfo['type']);
try {
validate(AddressValidate::class)->check($addressInfo);
} catch (ValidateException $e) {
return app('json')->fail($e->getError());
}
//编辑
if ($addressInfo['id'] && UserAddress::be(['id' => $addressInfo['id'], 'uid' => $request->uid(), 'is_del' => 0])) {
$id = $addressInfo['id'];
unset($addressInfo['id']);
if ($addressInfo['city_id'] == 0)
unset($addressInfo['city_id']);
if (UserAddress::edit($addressInfo, $id, 'id')) {
if ($addressInfo['is_default'])
UserAddress::setDefaultAddress($id, $request->uid());
return app('json')->successful();
} else
return app('json')->fail('编辑收货地址失败!');
} else {
$addressInfo['add_time'] = time();
if ($address = UserAddress::create($addressInfo)) {
if ($addressInfo['is_default']) {
UserAddress::setDefaultAddress($address->id, $request->uid());
}
return app('json')->successful(['id' => $address->id]);
} else {
return app('json')->fail('添加收货地址失败!');
}
}
}
/**
* 删除地址
*
* @param Request $request
* @return mixed
*/
public function address_del(Request $request)
{
list($id) = UtilService::postMore([['id', 0]], $request, true);
if (!$id || !is_numeric($id)) return app('json')->fail('参数错误!');
if (!UserAddress::be(['is_del' => 0, 'id' => $id, 'uid' => $request->uid()]))
return app('json')->fail('地址不存在!');
if (UserAddress::edit(['is_del' => '1'], $id, 'id'))
return app('json')->successful();
else
return app('json')->fail('删除地址失败!');
}
/**
* 获取收藏产品
*
* @param Request $request
* @return mixed
*/
public function collect_user(Request $request)
{
list($page, $limit) = UtilService::getMore([
['page', 0],
['limit', 0]
], $request, true);
if (!(int)$limit) return app('json')->successful([]);
$productRelationList = StoreProductRelation::getUserCollectProduct($request->uid(), (int)$page, (int)$limit);
return app('json')->successful($productRelationList);
}
/**
* 添加收藏
* @param Request $request
* @param $id
* @param $category
* @return mixed
*/
public function collect_add(Request $request)
{
list($id, $category) = UtilService::postMore([['id', 0], ['category', 'product']], $request, true);
if (!$id || !is_numeric($id)) return app('json')->fail('参数错误');
$res = StoreProductRelation::productRelation($id, $request->uid(), 'collect', $category);
if (!$res) return app('json')->fail(StoreProductRelation::getErrorInfo());
else return app('json')->successful();
}
/**
* 取消收藏
*
* @param Request $request
* @return mixed
*/
public function collect_del(Request $request)
{
list($id, $category) = UtilService::postMore([['id', 0], ['category', 'product']], $request, true);
if (!$id || !is_numeric($id)) return app('json')->fail('参数错误');
$res = StoreProductRelation::unProductRelation($id, $request->uid(), 'collect', $category);
if (!$res) return app('json')->fail(StoreProductRelation::getErrorInfo());
else return app('json')->successful();
}
/**
* 批量收藏
* @param Request $request
* @return mixed
*/
public function collect_all(Request $request)
{
$collectInfo = UtilService::postMore([
['id', []],
['category', 'product'],
], $request);
if (!count($collectInfo['id'])) return app('json')->fail('参数错误');
$productIdS = $collectInfo['id'];
$res = StoreProductRelation::productRelationAll($productIdS, $request->uid(), 'collect', $collectInfo['category']);
if (!$res) return app('json')->fail(StoreProductRelation::getErrorInfo());
else return app('json')->successful('收藏成功');
}
/**
* 添加点赞
*
* @param Request $request
* @return mixed
*/
// public function like_add(Request $request)
// {
// list($id, $category) = UtilService::postMore([['id',0], ['category','product']], $request, true);
// if(!$id || !is_numeric($id)) return app('json')->fail('参数错误');
// $res = StoreProductRelation::productRelation($id,$request->uid(),'like',$category);
// if(!$res) return app('json')->fail(StoreProductRelation::getErrorInfo());
// else return app('json')->successful();
// }
/**
* 取消点赞
*
* @param Request $request
* @return mixed
*/
// public function like_del(Request $request)
// {
// list($id, $category) = UtilService::postMore([['id',0], ['category','product']], $request, true);
// if(!$id || !is_numeric($id)) return app('json')->fail('参数错误');
// $res = StoreProductRelation::unProductRelation($id, $request->uid(),'like',$category);
// if(!$res) return app('json')->fail(StoreProductRelation::getErrorInfo());
// else return app('json')->successful();
// }
/**
* 签到 配置
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function sign_config()
{
$signConfig = sys_data('sign_day_num') ?? [];
return app('json')->successful($signConfig);
}
/**
* 签到 列表
* @param Request $request
* @param $page
* @param $limit
* @return mixed
*/
public function sign_list(Request $request)
{
list($page, $limit) = UtilService::getMore([
['page', 0],
['limit', 0]
], $request, true);
if (!$limit) return app('json')->successful([]);
$signList = UserSign::getSignList($request->uid(), (int)$page, (int)$limit);
if ($signList) $signList = $signList->toArray();
return app('json')->successful($signList);
}
/**
* 签到
* @param Request $request
* @return mixed
*/
public function sign_integral(Request $request)
{
$signed = UserSign::getIsSign($request->uid());
if ($signed) return app('json')->fail('已签到');
if (false !== ($integral = UserSign::sign($request->uid())))
return app('json')->successful('签到获得' . floatval($integral) . '积分', ['integral' => $integral]);
return app('json')->fail(UserSign::getErrorInfo('签到失败'));
}
/**
* 签到用户信息
* @param Request $request
* @return mixed
*/
public function sign_user(Request $request)
{
list($sign, $integral, $all) = UtilService::postMore([
['sign', 0],
['integral', 0],
['all', 0],
], $request, true);
$user = $request->user();
//是否统计签到
if ($sign || $all) {
$user['sum_sgin_day'] = UserSign::getSignSumDay($user['uid']);
$user['is_day_sgin'] = UserSign::getIsSign($user['uid']);
$user['is_YesterDay_sgin'] = UserSign::getIsSign($user['uid'], 'yesterday');
if (!$user['is_day_sgin'] && !$user['is_YesterDay_sgin']) {
$user['sign_num'] = 0;
}
}
//是否统计积分使用情况
if ($integral || $all) {
$user['sum_integral'] = (int)UserBill::getRecordCount($user['uid'], 'integral', 'sign,system_add,gain');
$refund_integral = (int)UserBill::where(['uid' => $user['uid'], 'category' => 'integral', 'status' => 1, 'pm' => 0])->where('type', 'in', 'sign,system_add,gain')->sum('number');
if ($user['sum_integral'] > $refund_integral)
$user['sum_integral'] = $user['sum_integral'] - $refund_integral;
else
$user['sum_integral'] = 0;
$user['deduction_integral'] = (int)UserBill::getRecordCount($user['uid'], 'integral', 'deduction', '', true) ?? 0;
$user['today_integral'] = (int)UserBill::getRecordCount($user['uid'], 'integral', 'sign,system_add,gain', 'today');
}
unset($user['pwd']);
if (!$user['is_promoter']) {
$user['is_promoter'] = (int)sys_config('store_brokerage_statu') == 2 ? true : false;
}
return app('json')->successful($user->hidden(['account', 'real_name', 'birthday', 'card_id', 'mark', 'partner_id', 'group_id', 'add_time', 'add_ip', 'phone', 'last_time', 'last_ip', 'spread_uid', 'spread_time', 'user_type', 'status', 'level', 'clean_time', 'addres'])->toArray());
}
/**
* 签到列表(年月)
*
* @param Request $request
* @return mixed
*/
public function sign_month(Request $request)
{
list($page, $limit) = UtilService::getMore([
['page', 0],
['limit', 0]
], $request, true);
if (!$limit) return app('json')->successful([]);
$userSignList = UserSign::getSignMonthList($request->uid(), (int)$page, (int)$limit);
return app('json')->successful($userSignList);
}
/**
* 获取活动状态
* @return mixed
*/
public function activity()
{
$data['is_bargin'] = StoreBargain::validBargain() ? true : false;
$data['is_pink'] = StoreCombination::getPinkIsOpen() ? true : false;
$data['is_seckill'] = StoreSeckill::getSeckillCount() ? true : false;
return app('json')->successful($data);
}
/**
* 用户修改信息
* @param Request $request
* @return mixed
*/
public function edit(Request $request)
{
list($avatar, $nickname) = UtilService::postMore([
['avatar', ''],
['nickname', ''],
], $request, true);
if (User::editUser($avatar, $nickname, $request->uid())) return app('json')->successful('修改成功');
return app('json')->fail('修改失败');
}
/**
* 推广人排行
* @param Request $request
* @return mixed
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function rank(Request $request)
{
$data = UtilService::getMore([
['page', ''],
['limit', ''],
['type', '']
], $request);
$users = User::getRankList($data);
return app('json')->success($users);
}
/**
* 佣金排行
* @param Request $request
* @return mixed
*/
public function brokerage_rank(Request $request)
{
$data = UtilService::getMore([
['page', ''],
['limit'],
['type']
], $request);
$users = User::brokerageRank($data);
foreach ($users as $key => $item) {
if ($item['brokerage_price'] == '0.00' || $item['brokerage_price'] == 0 || !$item['brokerage_price']) {
unset($users[$key]);
}
}
$position_tmp = User::brokerageRank(['type' => $data['type'], 'page' => 0, 'limit' => 99999]);
$position_tmp_one = array_column($position_tmp, 'uid');
$position_tmp_two = array_column($position_tmp, 'brokerage_price', 'uid');
if (!in_array($request->uid(), $position_tmp_one)) {
$position = 0;
} else {
if ($position_tmp_two[$request->uid()] == 0.00) {
$position = 0;
} else {
$position = array_search($request->uid(), $position_tmp_one) + 1;
}
}
return app('json')->success([
'rank' => $users,
'position' => $position
]);
}
/**
* @return void
*
*
*/
public function my_order(Request $request){
$data['brokerage_price'] = User::getUserInfo($request->uid(),'now_money')['now_money'];
$data['box'] = StoreOrder::getUserOrderList($request->uid(),10);
$data['baobei'] = StoreOrder::where('uid',$request->uid())->where('status',11)
->alias('a')->join('store_product b','a.product_id = b.id')
->where('refund_status',0)->field('a.product_id,a.id,a.add_time,b.image,b.store_name,a.is_sell,b.sell_price')->order('id','desc')->select();
return app('json')->success($data);
}
/**
* @return void
*
*/
public function changeBoxSell(Request $request){
$data = UtilService::getMore([
['id'],
['sell_id']
], $request);
$params['is_sell'] = $data['sell_id'];
if($data['sell_id']==4){
$params['status'] = 0;
}
$res = StoreOrder::edit($params,$data['id']);
if($res){
return app('json')->success();
}
return app('json')->error();
}
}
姿薇优选系统玩法介绍:
根据每天团购时间,进行抢购。每仓的开始都是10000的额度,第二期13000,第三期16900……30%进行递增,以此类推。
每个人抢购额度为100-3000,一个账号可进行多次抢购。每仓额度被抢完,表示团购成功,两天一期,当第三期成功,第一期本金和利润全部返回。开始时,一天分四个时段进行抢购。