Browse Source

充值

master
林一峰 7 years ago
parent
commit
fade3cf5c1
  1. 31
      app/Http/Controllers/Api/PaymentController.php
  2. 12
      app/Http/Controllers/Api/UserAddressController.php
  3. 82
      app/Http/Controllers/Api/UserRechargeController.php
  4. 18
      app/Http/Controllers/Weixin/CartController.php
  5. 6
      app/Http/Controllers/Weixin/UserController.php
  6. 80
      app/Http/Model/Payment.php
  7. 49
      app/Http/Model/UserAddress.php
  8. 2
      app/Http/Model/UserBonus.php
  9. 6
      app/Http/Model/UserMoney.php
  10. 6
      app/Http/Model/UserPoint.php
  11. 86
      app/Http/Model/UserRecharge.php
  12. 12
      resources/views/weixin/address/index.blade.php
  13. 13
      resources/views/weixin/address/userAddressAdd.blade.php
  14. 13
      resources/views/weixin/address/userAddressUpdate.blade.php
  15. 14
      resources/views/weixin/article/category.blade.php
  16. 12
      resources/views/weixin/article/detail.blade.php
  17. 23
      resources/views/weixin/cart/cartCheckout.blade.php
  18. 14
      resources/views/weixin/cart/index.blade.php
  19. 10
      resources/views/weixin/common/headerNav.blade.php
  20. 12
      resources/views/weixin/goods/goodsDetail.blade.php
  21. 13
      resources/views/weixin/user/login.blade.php
  22. 13
      resources/views/weixin/user/register.blade.php
  23. 4
      resources/views/weixin/user/userAccount.blade.php
  24. 89
      resources/views/weixin/user/userRecharge.blade.php
  25. 12
      resources/views/weixin/user/userinfo.blade.php
  26. 3
      routes/web.php

31
app/Http/Controllers/Api/PaymentController.php

@ -0,0 +1,31 @@
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Api\CommonController;
use Illuminate\Http\Request;
use App\Common\ReturnData;
use App\Common\Token;
use App\Http\Model\Payment;
class PaymentController extends CommonController
{
public function __construct()
{
parent::__construct();
}
//获取支付方式列表
public function paymentList(Request $request)
{
//参数
$data['status'] = $request->input('status', -1);
$res = Payment::getList($data);
if(!$res)
{
return ReturnData::create(ReturnData::SYSTEM_FAIL,null,$res);
}
return ReturnData::create(ReturnData::SUCCESS,$res);
}
}

12
app/Http/Controllers/Api/UserAddressController.php

@ -135,4 +135,16 @@ class UserAddressController extends CommonController
return ReturnData::create(ReturnData::SUCCESS,$res);
}
//获取用户默认地址
public function userDefaultAddress(Request $request)
{
$res = UserAddress::userDefaultAddress(Token::$uid);
if(!$res)
{
return ReturnData::create(ReturnData::SYSTEM_FAIL);
}
return ReturnData::create(ReturnData::SUCCESS,$res);
}
}

82
app/Http/Controllers/Api/UserRechargeController.php

@ -0,0 +1,82 @@
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Api\CommonController;
use Illuminate\Http\Request;
use App\Common\ReturnData;
use App\Common\Token;
use App\Http\Model\UserRecharge;
class UserRechargeController extends CommonController
{
public function __construct()
{
parent::__construct();
}
//用户充值列表
public function userRechargeList(Request $request)
{
//参数
$data['limit'] = $request->input('limit', 10);
$data['offset'] = $request->input('offset', 0);
$data['status'] = $request->input('status', -1);
$data['user_id'] = Token::$uid;
$res = UserRecharge::getList($data);
if($res === false)
{
return ReturnData::create(ReturnData::SYSTEM_FAIL);
}
return ReturnData::create(ReturnData::SUCCESS,$res);
}
//添加充值记录
public function userRechargeAdd(Request $request)
{
//参数
$data['money'] = $request->input('money','');
if($request->input('status', '') != ''){$data['status'] = $request->input('status');}
if($request->input('pay_type', '') != ''){$data['pay_type'] = $request->input('pay_type');}
$data['user_id'] = Token::$uid;
if($data['money']=='')
{
return ReturnData::create(ReturnData::PARAMS_ERROR);
}
$res = UserRecharge::add($data);
if($res === false)
{
return ReturnData::create(ReturnData::SYSTEM_FAIL);
}
return ReturnData::create(ReturnData::SUCCESS,$res);
}
//修改充值记录
public function userRechargeUpdate(Request $request)
{
//参数
$id = $request->input('id','');
$data['trade_no'] = $request->input('trade_no','');
$data['pay_time'] = $request->input('pay_time','');
$data['status'] = UserRecharge::COMPLETE_PAY;
$data['updated_at'] = date('Y-m-d H:i:s',time());
if($id=='' || $data['trade_no']=='' || $data['pay_time']=='')
{
return ReturnData::create(ReturnData::PARAMS_ERROR);
}
$res = UserRecharge::modify(array('id'=>$id,'user_id'=>Token::$uid),$data);
if($res === false)
{
return ReturnData::create(ReturnData::SYSTEM_FAIL);
}
return ReturnData::create(ReturnData::SUCCESS);
}
}

18
app/Http/Controllers/Weixin/CartController.php

@ -38,6 +38,7 @@ class CartController extends CommonController
//购物车结算
public function cartCheckout($ids)
{
//购物车结算商品列表
$postdata = array(
'ids' => $ids,
'access_token' => $_SESSION['weixin_user_info']['access_token']
@ -46,6 +47,23 @@ class CartController extends CommonController
$res = curl_request($url,$postdata,'GET');
$data['list'] = $res['data']['list'];
//支付方式列表
$postdata = array(
'status' => 1,
'access_token' => $_SESSION['weixin_user_info']['access_token']
);
$url = env('APP_API_URL')."/payment_list";
$res = curl_request($url,$postdata,'GET');
$data['payment_list'] = $res['data']['list'];
//支付方式列表
$postdata = array(
'access_token' => $_SESSION['weixin_user_info']['access_token']
);
$url = env('APP_API_URL')."/user_default_address";
$res = curl_request($url,$postdata,'GET');
$data['user_default_address'] = $res['data'];
return view('weixin.cart.cartCheckout', $data);
}
}

6
app/Http/Controllers/Weixin/UserController.php

@ -55,6 +55,12 @@ class UserController extends CommonController
return view('weixin.user.userAccount', $data);
}
//用户充值
public function userRecharge(Request $request)
{
return view('weixin.user.userRecharge');
}
//余额明细
public function userMoneyList(Request $request)
{

80
app/Http/Model/Payment.php

@ -0,0 +1,80 @@
<?php
namespace App\Http\Model;
use App\Common\ReturnData;
class Payment extends BaseModel
{
//用户优惠券
protected $table = 'payment';
public $timestamps = false;
/**
* 不能被批量赋值的属性
*
* @var array
*/
protected $guarded = array();
const STATUS = 1; // 可用支付方式
//获取列表
public static function getList(array $param)
{
extract($param); //参数:limit,offset
$model = new Payment;
if(isset($status) && $status!=-1){$where['status'] = $status;} //-1表示获取所有
if(isset($where)){$model = $model->where($where);}
$res['count'] = $model->count();
$res['list'] = array();
if($res['count']>0)
{
$res['list'] = $model->orderBy('listorder','desc')->get();
}
return $res;
}
public static function getOne($where)
{
return self::where($where)->first();
}
public static function add(array $data)
{
if(self::where(array('pay_code'=>$data['pay_code']))->first()){return ReturnData::create(ReturnData::PARAMS_ERROR,null,'支付方式已存在');}
if ($id = self::insertGetId($data))
{
return ReturnData::create(ReturnData::SUCCESS,$id);
}
return ReturnData::create(ReturnData::SYSTEM_FAIL);
}
public static function modify($where, array $data)
{
if (self::where($where)->update($data))
{
return true;
}
return false;
}
//删除一条记录
public static function remove($id)
{
if (!self::whereIn('id', explode(',', $id))->delete())
{
return false;
}
return true;
}
}

49
app/Http/Model/UserAddress.php

@ -18,6 +18,8 @@ class UserAddress extends BaseModel
*/
protected $guarded = array();
const IS_DEFAULT = 1; //是默认地址
//获取列表
public static function getList(array $param)
{
@ -62,15 +64,6 @@ class UserAddress extends BaseModel
if ($address_id)
{
$arr = self::where('id',$address_id)->first();
if($arr)
{
$arr->country_name = Region::getRegionName($arr->country);
$arr->province_name = Region::getRegionName($arr->province);
$arr->city_name = Region::getRegionName($arr->city);
$arr->district_name = Region::getRegionName($arr->district);
}
return $arr;
}
@ -80,14 +73,14 @@ class UserAddress extends BaseModel
$arr = self::join('user','user_address.id', '=', 'user.address_id')
->where('user.id',$user_id)->select('user_address.id','user_address.name','country','province','city','district','address','user_address.mobile','zipcode')
->first();
if($arr)
{
$arr->country_name = Region::getRegionName($arr->country);
$arr->province_name = Region::getRegionName($arr->province);
$arr->city_name = Region::getRegionName($arr->city);
$arr->district_name = Region::getRegionName($arr->district);
}
}
if($arr)
{
$arr->country_name = Region::getRegionName($arr->country);
$arr->province_name = Region::getRegionName($arr->province);
$arr->city_name = Region::getRegionName($arr->city);
$arr->district_name = Region::getRegionName($arr->district);
}
return $arr;
@ -207,4 +200,26 @@ class UserAddress extends BaseModel
return false;
}
// 获取默认地址
public static function userDefaultAddress($user_id)
{
$arr = '';
$arr = self::where(array('user_id'=>$user_id,'is_default'=>self::IS_DEFAULT))->first();
if (!$arr)
{
$arr = self::where(array('user_id'=>$user_id))->first();
}
if($arr)
{
$arr->country_name = Region::getRegionName($arr->country);
$arr->province_name = Region::getRegionName($arr->province);
$arr->city_name = Region::getRegionName($arr->city);
$arr->district_name = Region::getRegionName($arr->district);
}
return $arr;
}
}

2
app/Http/Model/UserBonus.php

@ -13,7 +13,7 @@ class UserBonus extends BaseModel
*
* @var array
*/
protected $guarded = [];
protected $guarded = array();
//获取列表
public static function getList(array $param)

6
app/Http/Model/UserMoney.php

@ -13,7 +13,7 @@ class UserMoney extends BaseModel
*
* @var array
*/
protected $guarded = [];
protected $guarded = array();
//获取列表
public static function getList(array $param)
@ -35,7 +35,7 @@ class UserMoney extends BaseModel
if($res['count']>0)
{
$res['list'] = $model->skip($offset)->take($limit)->orderBy('id','desc')->get()->toArray();
$res['list'] = $model->skip($offset)->take($limit)->orderBy('id','desc')->get();
}
else
{
@ -47,7 +47,7 @@ class UserMoney extends BaseModel
public static function getOne($id)
{
return self::where('id', $id)->first()->toArray();
return self::where('id', $id)->first();
}
public static function add(array $data)

6
app/Http/Model/UserPoint.php

@ -13,7 +13,7 @@ class UserPoint extends BaseModel
*
* @var array
*/
protected $guarded = [];
protected $guarded = array();
//获取列表
public static function getList(array $param)
@ -35,7 +35,7 @@ class UserPoint extends BaseModel
if($res['count']>0)
{
$res['list'] = $model->skip($offset)->take($limit)->orderBy('id','desc')->get()->toArray();
$res['list'] = $model->skip($offset)->take($limit)->orderBy('id','desc')->get();
}
else
{
@ -47,7 +47,7 @@ class UserPoint extends BaseModel
public static function getOne($id)
{
return self::where('id', $id)->first()->toArray();
return self::where('id', $id)->first();
}
public static function add(array $data)

86
app/Http/Model/UserRecharge.php

@ -0,0 +1,86 @@
<?php
namespace App\Http\Model;
use App\Common\ReturnData;
class UserRecharge extends BaseModel
{
//用户余额明细
protected $table = 'user_recharge';
public $timestamps = false;
/**
* 不能被批量赋值的属性
*
* @var array
*/
protected $guarded = array();
const COMPLETE_PAY = 1;
//获取列表
public static function getList(array $param)
{
extract($param); //参数:limit,offset
$where['user_id'] = $user_id;
$limit = isset($limit) ? $limit : 10;
$offset = isset($offset) ? $offset : 0;
$model = new UserRecharge;
if(isset($status) && $status!=-1){$where['status'] = $status;} //-1表示获取所有
$model = $model->where($where);
$res['count'] = $model->count();
$res['list'] = array();
if($res['count']>0)
{
$res['list'] = $model->skip($offset)->take($limit)->orderBy('id','desc')->get();
}
else
{
return false;
}
return $res;
}
public static function getOne($where)
{
return self::where($where)->first();
}
public static function add(array $data)
{
if ($id = self::insertGetId($data))
{
return $id;
}
return false;
}
public static function modify($where, array $data)
{
if (self::where($where)->update($data) === false)
{
return false;
}
return true;
}
//删除一条记录
public static function remove($id)
{
if (!self::whereIn('id', explode(',', $id))->delete())
{
return false;
}
return true;
}
}

12
resources/views/weixin/address/index.blade.php

@ -9,16 +9,8 @@
<div class="ds-in-bl tit center"><span>收货地址管理</span></div>
<div class="ds-in-bl nav_menu"><a href="javascript:void(0);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/class1.png" alt="菜单"></a></div>
</div>
<div class="flool tpnavf cl">
<div class="nav_list">
<ul>
<a href="<?php echo route('weixin'); ?>"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon.png"><p>首页</p></li></a>
<a href="/Weixin/index.php?m=Store&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/brand_icon.png"><p>分类</p></li></a>
<a href="/Weixin/index.php?m=Cart&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/car_icon.png"><p>购物车</p></li></a>
<a href="/Weixin/index.php?m=User&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/center_icon.png"><p>个人中心</p></li></a></ul>
<div class="cl"></div>
</div>
</div>
@include('weixin.common.headerNav')
<style>
.address_list .flow-have-adr{padding:15px;margin-bottom:10px;background-color:#fff;}

13
resources/views/weixin/address/userAddressAdd.blade.php

@ -9,16 +9,9 @@
<div class="ds-in-bl tit center"><span>新增收货地址</span></div>
<div class="ds-in-bl nav_menu"><a href="javascript:void(0);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/class1.png" alt="菜单"></a></div>
</div>
<div class="flool tpnavf cl">
<div class="nav_list">
<ul>
<a href="index.html"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon.png"><p>首页</p></li></a>
<a href="/Weixin/index.php?m=Store&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/brand_icon.png"><p>分类</p></li></a>
<a href="/Weixin/index.php?m=Cart&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/car_icon.png"><p>购物车</p></li></a>
<a href="/Weixin/index.php?m=User&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/center_icon.png"><p>个人中心</p></li></a></ul>
<div class="cl"></div>
</div>
</div>
@include('weixin.common.headerNav')
<style>
.adr_add{margin:0 10px;}
.adr-form-group{margin-top:10px;}

13
resources/views/weixin/address/userAddressUpdate.blade.php

@ -9,16 +9,9 @@
<div class="ds-in-bl tit center"><span>收货地址编辑</span></div>
<div class="ds-in-bl nav_menu"><a href="javascript:void(0);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/class1.png" alt="菜单"></a></div>
</div>
<div class="flool tpnavf cl">
<div class="nav_list">
<ul>
<a href="index.html"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon.png"><p>首页</p></li></a>
<a href="/Weixin/index.php?m=Store&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/brand_icon.png"><p>分类</p></li></a>
<a href="/Weixin/index.php?m=Cart&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/car_icon.png"><p>购物车</p></li></a>
<a href="/Weixin/index.php?m=User&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/center_icon.png"><p>个人中心</p></li></a></ul>
<div class="cl"></div>
</div>
</div>
@include('weixin.common.headerNav')
<style>
.adr_add{margin:0 10px;}
.adr-form-group{margin-top:10px;}

14
resources/views/weixin/article/category.blade.php

@ -1,5 +1,5 @@
<!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<title><?php echo $post['name']; ?> - LQYCMS微商城</title><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
<title><?php echo $post['name']; ?></title><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
<link href="<?php echo env('APP_URL'); ?>/css/weixin/style.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/jquery.min.js"></script><script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/weixin/mobile.js"></script>
<meta name="keywords" content="<?php echo $post['keywords']; ?>"><meta name="description" content="<?php echo $post['description']; ?>"></head><body>
@ -8,16 +8,8 @@
<div class="ds-in-bl tit center"><span><?php echo $post['name']; ?></span></div>
<div class="ds-in-bl nav_menu"><a href="javascript:void(0);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/class1.png" alt="菜单"></a></div>
</div>
<div class="flool tpnavf cl">
<div class="nav_list">
<ul>
<a href="<?php echo route('weixin'); ?>"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon.png"><p>首页</p></li></a>
<a href="/Weixin/index.php?m=Store&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/brand_icon.png"><p>分类</p></li></a>
<a href="/Weixin/index.php?m=Cart&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/car_icon.png"><p>购物车</p></li></a>
<a href="/Weixin/index.php?m=User&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/center_icon.png"><p>个人中心</p></li></a></ul>
<div class="cl"></div>
</div>
</div>
@include('weixin.common.headerNav')
<div class="arc_list">
<ul class="arclist cl">

12
resources/views/weixin/article/detail.blade.php

@ -8,16 +8,8 @@
<div class="ds-in-bl tit center"><span>微商城</span></div>
<div class="ds-in-bl nav_menu"><a href="javascript:void(0);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/class1.png" alt="菜单"></a></div>
</div>
<div class="flool tpnavf cl">
<div class="nav_list">
<ul>
<a href="<?php echo route('weixin'); ?>"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon.png"><p>首页</p></li></a>
<a href="/Weixin/index.php?m=Store&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/brand_icon.png"><p>分类</p></li></a>
<a href="/Weixin/index.php?m=Cart&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/car_icon.png"><p>购物车</p></li></a>
<a href="/Weixin/index.php?m=User&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/center_icon.png"><p>个人中心</p></li></a></ul>
<div class="cl"></div>
</div>
</div>
@include('weixin.common.headerNav')
<h1 class="arc_tit"><?php echo $post['title']; ?></h1>

23
resources/views/weixin/cart/cartCheckout.blade.php

@ -11,22 +11,12 @@
<div class="ds-in-bl nav_menu"><a href="javascript:void(0);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/class1.png" alt="菜单"></a></div>
</div>
<div class="flool tpnavf cl">
<div class="nav_list">
<ul>
<a href="<?php echo route('weixin'); ?>"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon.png"><p>首页</p></li></a>
<a href="/Weixin/index.php?m=Store&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/brand_icon.png"><p>分类</p></li></a>
<a href="/Weixin/index.php?m=Cart&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/car_icon.png"><p>购物车</p></li></a>
<a href="/Weixin/index.php?m=User&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/center_icon.png"><p>个人中心</p></li></a></ul>
<div class="cl"></div>
</div>
</div>
@include('weixin.common.headerNav')
<a href="/v2/index.php?m=default&amp;c=flow&amp;a=consignee_list&amp;u=53657">
<div class="checkout-addr">
<p class="title">范例 <span>15280767654</span></p>
<p class="des">福建厦门湖里区 软件园二期100号</p>
<p class="title"><?php echo $user_default_address['name']; ?> <span><?php echo $user_default_address['mobile']; ?></span></p>
<p class="des"><?php echo $user_default_address['province_name']; ?><?php echo $user_default_address['city_name']; ?><?php echo $user_default_address['district_name']; ?> <?php echo $user_default_address['address']; ?></p>
<i></i>
</div>
</a>
@ -58,16 +48,19 @@
<a href="javascript:update_pay_mode_layer();"><li>
<div class="ui-list-info">
<h4 class="ui-nowrap">支付方式</h4>
<div class="ui-txt-info">支付 &nbsp;</div>
<div class="ui-txt-info">微信支付 &nbsp;</div>
</div>
<i class="fa fa-angle-right" aria-hidden="true"></i>
</li></a>
<style>
.bottoma{display:block;font-size:18px;padding:10px;border-radius:2px;}
</style>
<script>
function update_pay_mode_layer()
{
//询问框
layer.open({
content: '<div style="padding:15px;"><a style="margin-bottom:10px;background-color:#1aad19;text-align:center;color:white;border:1px solid #179e16;" class="bottoma" onclick="layer.closeAll();" href="javascript:update_pay_mode(1);"></a><a style="margin-bottom:10px;background-color:#ea5a3d;text-align:center;color:white;border:1px solid #dd2727;" class="bottoma" onclick="layer.closeAll();" href="javascript:update_pay_mode(2);"></a></div>'
content: '<div style="padding:15px;"><a style="margin-bottom:10px;background-color:#1aad19;text-align:center;color:white;border:1px solid #179e16;" class="bottoma" onclick="layer.closeAll();" href="javascript:update_pay_mode(1);">账户余额 38.62元</a><a style="margin-bottom:10px;background-color:#ea5a3d;text-align:center;color:white;border:1px solid #dd2727;" class="bottoma" onclick="layer.closeAll();" href="javascript:update_pay_mode(2);">微信支付</a></div>'
});
}

14
resources/views/weixin/cart/index.blade.php

@ -1,5 +1,5 @@
<!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<title>购物车 - 商城</title><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
<title>购物车</title><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
<link href="<?php echo env('APP_URL'); ?>/css/weixin/style.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/weixin/mobile.js"></script>
@ -10,17 +10,7 @@
<div class="ds-in-bl nav_menu"><a href="javascript:void(0);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/class1.png" alt="菜单"></a></div>
</div>
<div class="flool tpnavf cl">
<div class="nav_list">
<ul>
<a href="<?php echo route('weixin'); ?>"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon.png"><p>首页</p></li></a>
<a href="/Weixin/index.php?m=Store&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/brand_icon.png"><p>分类</p></li></a>
<a href="/Weixin/index.php?m=Cart&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/car_icon.png"><p>购物车</p></li></a>
<a href="/Weixin/index.php?m=User&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/center_icon.png"><p>个人中心</p></li></a></ul>
<div class="cl"></div>
</div>
</div>
@include('weixin.common.headerNav')
<div class="cart_list">
<!--商品列表-s-->

10
resources/views/weixin/common/headerNav.blade.php

@ -0,0 +1,10 @@
<div class="flool tpnavf cl">
<div class="nav_list">
<ul>
<a href="<?php echo route('weixin'); ?>"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon.png"><p>首页</p></li></a>
<a href="<?php echo route('weixin_category'); ?>"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/brand_icon.png"><p>分类</p></li></a>
<a href="<?php echo route('weixin_cart'); ?>"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/car_icon.png"><p>购物车</p></li></a>
<a href="<?php echo route('weixin_user'); ?>"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/center_icon.png"><p>个人中心</p></li></a></ul>
<div class="cl"></div>
</div>
</div>

12
resources/views/weixin/goods/goodsDetail.blade.php

@ -9,16 +9,8 @@
<div class="ds-in-bl tit center"><span>商品详情</span></div>
<div class="ds-in-bl nav_menu"><a href="javascript:void(0);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/class1.png" alt="菜单"></a></div>
</div>
<div class="flool tpnavf cl">
<div class="nav_list">
<ul>
<a href="<?php echo route('weixin'); ?>"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon.png"><p>首页</p></li></a>
<a href="<?php echo route('weixin_category'); ?>"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/brand_icon.png"><p>分类</p></li></a>
<a href="<?php echo route('weixin_cart'); ?>"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/car_icon.png"><p>购物车</p></li></a>
<a href="<?php echo route('weixin_user'); ?>"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/center_icon.png"><p>个人中心</p></li></a></ul>
<div class="cl"></div>
</div>
</div>
@include('weixin.common.headerNav')
<!--商品详情-start-->
<div class="goods_detail">

13
resources/views/weixin/user/login.blade.php

@ -9,16 +9,9 @@
<div class="ds-in-bl tit center"><span>登录</span></div>
<div class="ds-in-bl nav_menu"><a href="javascript:void(0);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/class1.png" alt="菜单"></a></div>
</div>
<div class="flool tpnavf cl">
<div class="nav_list">
<ul>
<a href="index.html"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon.png"><p>首页</p></li></a>
<a href="/Weixin/index.php?m=Store&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/brand_icon.png"><p>分类</p></li></a>
<a href="/Weixin/index.php?m=Cart&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/car_icon.png"><p>购物车</p></li></a>
<a href="/Weixin/index.php?m=User&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/center_icon.png"><p>个人中心</p></li></a></ul>
<div class="cl"></div>
</div>
</div>
@include('weixin.common.headerNav')
<style>
.account{text-align:center;margin-top:50px;}
.account .icon{color:#FFCC00;font-size:100px;}

13
resources/views/weixin/user/register.blade.php

@ -9,16 +9,9 @@
<div class="ds-in-bl tit center"><span>注册</span></div>
<div class="ds-in-bl nav_menu"><a href="javascript:void(0);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/class1.png" alt="菜单"></a></div>
</div>
<div class="flool tpnavf cl">
<div class="nav_list">
<ul>
<a href="index.html"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon.png"><p>首页</p></li></a>
<a href="/Weixin/index.php?m=Store&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/brand_icon.png"><p>分类</p></li></a>
<a href="/Weixin/index.php?m=Cart&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/car_icon.png"><p>购物车</p></li></a>
<a href="/Weixin/index.php?m=User&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/center_icon.png"><p>个人中心</p></li></a></ul>
<div class="cl"></div>
</div>
</div>
@include('weixin.common.headerNav')
<style>
.account{text-align:center;margin-top:50px;}
.account .icon{color:#FFCC00;font-size:100px;}

4
resources/views/weixin/user/userAccount.blade.php

@ -11,7 +11,7 @@
</div>
<style>
.account{text-align:center;margin-top:50px;}
.account{text-align:center;margin-top:30px;}
.account .icon{color:#FFCC00;font-size:100px;}
.account .money{color:#353535;font-size:36px;}
.account .tit{color:#000;font-size:18px;}
@ -22,7 +22,7 @@
<div class="tit">我的余额</div>
<div class="money"><small></small><?php echo $user_info['money']; ?></div>
<br>
<a style="margin:10px;background-color:#1aad19;text-align:center;color:white;border:1px solid #179e16;" class="bottoma" href="http://www.lqycms.com/weixin/user_address_add">充值</a>
<a style="margin:10px;background-color:#1aad19;text-align:center;color:white;border:1px solid #179e16;" class="bottoma" href="<?php echo route('weixin_user_recharge'); ?>">充值</a>
<a style="margin:0 10px 10px 10px;background-color:#f1f1f1;text-align:center;color:#000;border:1px solid #bfbfbf;" class="bottoma" href="javascript:tixian();">提现</a>
</div>

89
resources/views/weixin/user/userRecharge.blade.php

@ -0,0 +1,89 @@
<!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<title>充值</title><meta name="keywords" content="关键词"><meta name="description" content="描述"><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
<link href="<?php echo env('APP_URL'); ?>/css/weixin/style.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/weixin/mobile.js"></script>
<link href="<?php echo env('APP_URL'); ?>/css/font-awesome.min.css" type="text/css" rel="stylesheet"></head><body>
<div class="classreturn loginsignup">
<div class="ds-in-bl return"><a href="javascript:history.back(-1);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/return.png" alt="返回"></a></div>
<div class="ds-in-bl tit center"><span>充值</span></div>
</div>
<style>
.account{text-align:center;margin-top:30px;}
.account .icon{color:#FFCC00;font-size:100px;}
.account .money{color:#353535;font-size:36px;}
.account .tit{color:#000;font-size:18px;}
.bottoma{display:block;font-size:18px;padding:10px;border-radius:2px;}
</style>
<div class="floor account">
<div class="icon"><i class="fa fa-google-wallet"></i></div><br>
<div class="tit"><b style="color:#f23030;">1、填写金额</b> > 2、确认并支付 > 3、完成</div>
<br>
<div style="margin:10px;"><input name="money" min="10" max="10000" type="text" id="money" placeholder="充值金额(元)、整数" style="width:100%;text-align:center;border:1px solid #bfbfbf;color:#999;box-sizing:border-box;" class="bottoma"></div>
<a style="margin:0 10px 10px 10px;background-color:#1aad19;text-align:center;color:#fff;border:1px solid #179e16;" class="bottoma" href="javascript:chongzhi();">开始充值</a>
<!-- <p style="margin:0 10px 10px 10px;">支付金额:<span style="color:#f23030;">¥ 99.80</span>
实际到账:¥ 100.00</p> -->
</div>
<script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/layer/mobile/layer.js"></script>
<script>
function chongzhi()
{
var money = $('#money').val();
var re = /^[0-9]+$/; //判断字符串是否为数字
if(money == '')
{
//提示
layer.open({
content: '请输入充值金额'
,skin: 'msg'
,time: 2 //2秒后自动关闭
});
return false;
}
if(!re.test(money))
{
//提示
layer.open({
content: '金额格式不正确'
,skin: 'msg'
,time: 2 //2秒后自动关闭
});
return false;
}
//询问框
layer.open({
content: '确定要充值吗?'
,btn: ['确定', '取消']
,yes: function(){
var url = '<?php echo env('APP_API_URL')."/user_address_delete"; ?>';
$.post(url,{access_token:'<?php echo $_SESSION['weixin_user_info']['access_token']; ?>',id:id},function(res)
{
//提示
layer.open({
content: res.msg
,skin: 'msg'
,time: 2 //2秒后自动关闭
});
if(res.code==0)
{
location.reload();
}
else
{
}
},'json');
}
});
}
</script>
@include('weixin.common.footer')
</body></html>

12
resources/views/weixin/user/userinfo.blade.php

@ -9,16 +9,8 @@
<div class="ds-in-bl tit center"><span>编辑资料</span></div>
<div class="ds-in-bl nav_menu"><a href="javascript:void(0);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/class1.png" alt="菜单"></a></div>
</div>
<div class="flool tpnavf cl">
<div class="nav_list">
<ul>
<a href="<?php echo route('weixin'); ?>"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon.png"><p>首页</p></li></a>
<a href="/Weixin/index.php?m=Store&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/brand_icon.png"><p>分类</p></li></a>
<a href="/Weixin/index.php?m=Cart&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/car_icon.png"><p>购物车</p></li></a>
<a href="/Weixin/index.php?m=User&amp;a=index"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/center_icon.png"><p>个人中心</p></li></a></ul>
<div class="cl"></div>
</div>
</div>
@include('weixin.common.headerNav')
<div class="floor">
<ul class="fui-list mt10">

3
routes/web.php

@ -82,6 +82,7 @@ Route::group(['prefix' => 'weixin', 'namespace' => 'Weixin', 'middleware' => ['w
Route::get('/user_account', 'UserController@userAccount')->name('weixin_user_account');
Route::get('/user_money_list', 'UserController@userMoneyList')->name('weixin_user_money_list');
Route::get('/user_point_list', 'UserController@userPointList')->name('weixin_user_point_list');
Route::get('/user_recharge', 'UserController@userRecharge')->name('weixin_user_recharge');
//优惠券、红包
Route::get('/user_bonus_list', 'UserController@userBonusList')->name('weixin_user_bonus_list');
//浏览记录
@ -187,6 +188,7 @@ Route::group(['prefix' => 'dataapi', 'namespace' => 'Api', 'middleware' => ['web
//其它
Route::get('/verifycode_check', 'VerifyCodeController@verifyCodeCheck'); //验证码校验
Route::get('/andriod_upgrade', 'IndexController@andriodUpgrade'); //安卓升级
Route::get('/payment_list', 'PaymentController@paymentList'); //支付方式列表
//图片上传
Route::post('/image_upload', 'ImageController@imageUpload'); //普通文件/图片上传
//二维码
@ -194,6 +196,7 @@ Route::group(['prefix' => 'dataapi', 'namespace' => 'Api', 'middleware' => ['web
//收货地址
Route::get('/user_address_list', 'UserAddressController@userAddressList');
Route::get('/user_address_detail', 'UserAddressController@userAddressDetail');
Route::get('/user_default_address', 'UserAddressController@userDefaultAddress'); //获取用户默认地址
Route::post('/user_address_setdefault', 'UserAddressController@userAddressSetDefault');
Route::post('/user_address_add', 'UserAddressController@userAddressAdd');
Route::post('/user_address_update', 'UserAddressController@userAddressUpdate');

Loading…
Cancel
Save