作者 郭鑫

本地功能提交

<?php
// +----------------------------------------------------------------------
// | bronet [ 以客户为中心 以奋斗者为本 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2017 http://www.bronet.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
namespace app\portal\controller;
use app\portal\model\ShoppingModel;
use cmf\controller\HomeBaseController;
use EasyWeChat\Foundation\Application;
use think\Db;
use think\Session;
//地址
class AddressController extends CommentController
{
// 地址列表
public function index(){
$where_address['user_id'] = Session::get('uid');
$where_address['status'] = array('neq',9);
$address = Db::name('Address')->where($where_address)->order('is_check desc,create_time desc')->select()->toArray();
$this->assign('list',$address);
return $this->fetch();
}
// 添加地址
public function add(){
$data = $this->request->param();
if($this->request->isPost()){
$add = $data;
$add['user_id'] = Session::get('uid');
$add['create_time'] = time();
$add['update_time'] = time();
$res = Db::name('Address')->insertGetId($add);
if($res){
$this->apiResponse('1','添加成功');
}else{
$this->apiResponse('0','添加失败');
}
}else{
return $this->fetch();
}
}
// 修改地址
public function edit(){
$data = $this->request->param();
$where_find['id'] = $data['id'];
$where_find['status'] = array('neq',9);
$address = Db::name('Address')->where($where_find)->find();
$this->assign('list',$address);
if($this->request->isPost()){
$where_up['user_id'] = Session::get('uid');
$where_up['id'] = $address['id'];
$add = $data;
$add['update_time'] = time();
$res = Db::name('Address')->where($where_up)->update($add);
if($res){
$this->apiResponse('1','修改成功');
}else{
$this->apiResponse('0','添加失败');
}
}else{
return $this->fetch();
}
}
// 默认地址
public function isCheck(){
$data = $this->request->param();
$user_id = Session::get('uid');
$where_find['user_id'] = $user_id;
$where_find['status'] = array('neq',9);
$up_find['is_check'] = 0;
$up_find['update_time'] = time();
$find = Db::name('Address')->where($where_find)->update($up_find);
if($find){
$where_check['id'] = $data['address_id'];
$where_check['user_id'] = $user_id;
$where_check['status'] = array('neq',9);
$up_check['is_check'] = 1;
$up_check['update_time'] = time();
$res = Db::name('Address')->where($where_check)->update($up_check);
if($res){
$this->apiResponse('1','成功');
}else{
$this->apiResponse('0','失败');
}
}
}
// 地址删除
public function del(){
$data = $this->request->param();
$where_find['id'] = $data['id'];
$where_find['user_id'] = Session::get('uid');
$where_find['status'] = array('neq',9);
$update['status'] = 9;
$update['update_time'] = time();
$address = Db::name('Address')->where($where_find)->update($update);
if($address){
$this->apiResponse('1','删除成功');
}else{
$this->apiResponse('0','删除失败');
}
}
}
... ...
... ... @@ -96,7 +96,21 @@ class RentController extends CommentController
return $this->fetch('Rent/detail');
}
// 买商品详情
// 租车确认
public function rentSure(){
// 时间处理
$start_time = Session::get('start_time');
$end_time = Session::get('end_time');
$middle_start = empty($start_time)?time():strtotime(Session::get('start_time'));
$middle_end = empty($end_time)?time():strtotime(Session::get('end_time'));
$time['start_time'] = date('Y-m-d',$middle_start);
$time['end_time'] = date('Y-m-d',$middle_end);
$time['time_num'] = ceil((strtotime($time['end_time']) - strtotime($time['start_time']))/86400)+1;
$this->assign('time',$time);
return $this->fetch('Rent/rent_sure');
}
// 买商品详情
public function vehicleDetail()
{
$data = $this->request->param();
... ... @@ -120,14 +134,18 @@ class RentController extends CommentController
// 购物车
$where_shopping['user_id'] = Session::get('uid');
$where_shopping['status'] = array('neq',9);
$cart = Db::name('Shopping')->where($where_shopping)->count();
$this->assign('cart',$cart);
$cart = Db::name('Shopping')->where($where_shopping)->field('num')->select()->toArray();
$count_shopping = 0;
foreach ($cart as $ck=>$cv){
$count_shopping += $cv['num'];
}
$this->assign('cart',$count_shopping);
return $this->fetch('Rent/buy_detail');
}
// 租车确认
public function rentSure(){
// 租车确认
public function buySure(){
// 时间处理
$start_time = Session::get('start_time');
$end_time = Session::get('end_time');
... ... @@ -137,7 +155,7 @@ class RentController extends CommentController
$time['end_time'] = date('Y-m-d',$middle_end);
$time['time_num'] = ceil((strtotime($time['end_time']) - strtotime($time['start_time']))/86400)+1;
$this->assign('time',$time);
return $this->fetch('Rent/rent_sure');
return $this->fetch('Rent/buy_sure');
}
// 我要免押金
... ...
... ... @@ -39,8 +39,12 @@ class ShoppingController extends CommentController
if($res){
$where_count['user_id'] = Session::get('uid');
$where_count['status'] = array('neq',9);
$cart = $model->where($where_count)->count();
$this->apiResponse('1','成功',$cart);
$cart = $model->where($where_count)->field('num')->select()->toArray();
$count_shopping = 0;
foreach ($cart as $ck=>$cv){
$count_shopping += $cv['num'];
}
$this->apiResponse('1','成功',$count_shopping);
}else{
$this->apiResponse('0','加入购物车失败');
}
... ... @@ -49,11 +53,93 @@ class ShoppingController extends CommentController
// 购物车列表
public function index(){
$model = new ShoppingModel();
$where_shopping['user_id'] = Session::get('uid');
$where_shopping['status'] = array('neq',9);
$cart = $model->where($where_shopping)->select()->toArray();
$where_shopping['s.user_id'] = Session::get('uid');
$where_shopping['s.status'] = array('neq',9);
$cart = $model->alias('s')
->where($where_shopping)
->join("Vehicle v",'v.id = s.vehicle_id')
->field('s.id,s.num , v.name,v.pic,v.intro,v.money,v.now_stock')
->select()->toArray();
// 判断库存是否充足
foreach ($cart as $cartk=>$cartv){
$cart[$cartk]['adequate'] = 1;
if($cartv['num'] > $cartv['now_stock']){
$cart[$cartk]['adequate'] = 2;
}
}
$this->assign('cart',$cart);
// 合计
$all_price = 0;
foreach ($cart as $k=>$v){
$all_price += $v['money'] * $v['num'];
}
$all_price = number_format($all_price,2);
$this->assign('all_price',$all_price);
return $this->fetch();
}
// 更改购物车数量
public function changeShopping(){
$data = $this->request->param();
$where_find['s.id'] = $data['shopping_id'];
$where_find['s.user_id'] = Session::get('uid');
$where_find['s.status'] = array('neq',9);
$find_num = Db::name('Shopping')->alias('s')
->where($where_find)
->join("Vehicle v",'v.id = s.vehicle_id')
->field('s.num , v.now_stock')
->find();
$where_shopping['id'] = $data['shopping_id'];
$where_shopping['status'] = array('neq',9);
if($data['is_add'] == 1){
if($find_num['num'] >= $find_num['now_stock']){
$this->apiResponse('0','库存不足');
}else{
$res = Db::name('Shopping')->where($where_shopping)->setInc('num',1);
}
}else if($data['is_add'] == 2){
if($find_num['num'] <= 1){
$this->apiResponse('0','不能再少啦');
}else{
$res = Db::name('Shopping')->where($where_shopping)->setDec('num',1);
}
}
if($res){
$where_count['s.user_id'] = Session::get('uid');
$where_count['s.status'] = array('neq',9);
$cart = Db::name('Shopping')->alias('s')
->where($where_count)
->join("Vehicle v",'v.id = s.vehicle_id')
->field('s.num,s.id , v.money')
->select()->toArray();
// 合计
$all_price = 0;
foreach ($cart as $k=>$v){
$all_price += $v['money'] * $v['num'];
if($v['id'] == $data['shopping_id']){
$return['number'] = $v['num'];
}
}
$all_price = number_format($all_price,2);
$return['all_price'] = $all_price;
$this->apiResponse('1','成功',$return);
}else{
$this->apiResponse('0','加入购物车失败');
}
}
// 删除购物车
public function delShopping(){
$data = $this->request->param();
$where_shopping['id'] = array('in',$data['shopping_id']);
$up_shopping['status'] = 9;
$up_shopping['update_time'] = time();
$res = Db::name('Shopping')->where($where_shopping)->update($up_shopping);
if($res){
$this->apiResponse('1','删除成功');
}else{
$this->apiResponse('0','删除失败');
}
}
}
... ...
... ... @@ -11,6 +11,7 @@ namespace app\portal\controller;
use cmf\controller\HomeBaseController;
use EasyWeChat\Foundation\Application;
use think\Db;
use think\Session;
//个人中心
class UserController extends CommentController
... ... @@ -18,24 +19,43 @@ class UserController extends CommentController
// 个人中心首页
public function index()
{
// $where_art['type'] = 3;
// $where_art['status'] = array('neq',9);
// $art = Db::name('Art')->where($where_art)->order('score desc,create_time desc')->limit(1)->find();
// if($art){
// $art['content'] = htmlspecialchars_decode($art['content']);
// }
// $this->assign('art',$art);
return $this->fetch('User/index');
}
// 地址列表
public function address()
// 孝力等级
public function grade()
{
$where_art['type'] = 4;
$where_art['status'] = array('neq',9);
$art = Db::name('Art')->where($where_art)->order('score desc,create_time desc')->find();
$art['content'] = htmlspecialchars_decode($art['content']);
$this->assign('art',$art);
return $this->fetch();
}
// 修改地址
public function editAddress()
// 租赁协议
public function rentGrade()
{
$where_art['type'] = 5;
$where_art['status'] = array('neq',9);
$art = Db::name('Art')->where($where_art)->order('score desc,create_time desc')->find();
$art['content'] = htmlspecialchars_decode($art['content']);
$this->assign('art',$art);
return $this->fetch('User/rent_grade');
}
// 我的积分
public function score()
{
return $this->fetch('User/edit_address');
$where_member['id'] = Session::get('uid');
$where_member['status'] = array('neq',9);
$member = Db::name('Member')->where($where_member)->value('all_score');
$this->assign('member',$member);
$where_art['user_id'] = Session::get('uid');
$where_art['status'] = array('neq',9);
$art = Db::name('ScoreLog')->where($where_art)->order('create_time desc')->select()->toArray();
$this->assign('art',$art);
return $this->fetch();
}
}
... ...
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>2.6新增地址</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1, minimum-scale=1">
<link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper.min.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/weui.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/myweui.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/common/add_address.css">
<script src="__TMPL__/public/assets/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/weui.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/myweui.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/base.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/citypicker.js" type="text/javascript" charset="utf-8"></script>
<style>
</style>
</head>
<body>
<div class="container">
<p class="link_man"><img class="user_pic" src="__TMPL__/public/assets/images/user.png" alt="">联系人</p>
<div class="user_box">
<p class="user_name"><span>姓名:</span>
<input type="text" placeholder="请输入姓名" class="name">
</p>
<p class="user_tel"><span>电话:</span>
<input type="text" placeholder="请输入手机或固定电话" class="tel">
</p>
</div>
<p class="link_man"><img class="user_pic" src="__TMPL__/public/assets/images/dizhi.png" alt="">收货地址</p>
<div class="address_box">
<p class="user_diqu"><span>选择地区:</span>
<input class="select_city" type="text" placeholder="请选择省份/城市/地区" readonly>
<input class="city_number" type="hidden" >
<!--<img class="local_icon" src="__TMPL__/public/assets/images/aaaaaa@2x.png" alt="">-->
</p>
<p class="user_dizhi"><span>详细地址:</span>
<input type="text" placeholder="请输入街道/楼层/门牌号" class="address">
</p>
</div>
</div>
</div>
<footer class="footer">
<p class="add_address">保存收货地址</p>
</footer>
</div>
<script>
$('.select_city').on('click', function() {
weui.picker(rawCitiesData, {
defaultValue: ["110000", "110000", "110101"],
onConfirm: function(result) {
console.log(result)
$('.select_city').val(result[0].label + '-' + result[1].label + '-' + result[2].label);
$('.city_number').val(result[0].value + '-' + result[1].value + '-' + result[2].value);
}
});
})
// 提交
$('.add_address').click(function () {
var name = $('.name').val();
var tel = $('.tel').val();
var city = $('.select_city').val();
var address = $('.address').val();
var city_number = $('.city_number').val();
var nameReg = /^[\u4e00-\u9fa5]+$/;
if (!nameReg.test(name)){
alert("姓名只能是汉字");
}else if(tel.length == 0){
alert("手机号不能为空");
}else if(city.length == 0){
alert("地区不能为空");
}else if(address.length == 0){
alert("详细地址不能为空");
}else{
$.ajax({
type:"POST",
url:"{:url('Address/add')}",
data:{
"name":name,
"tel":tel,
"city":city,
"address":address,
"city_number":city_number,
},
success:function (data) {
alert(data.message);
if(data.code == 1){
window.location.href = "{:url('Address/index')}";
}
},
error:function () {
}
})
}
// var pattern = /^1[3|4|5|6|7|8|9]\d{1}\s\d{4}\s\d{4}$/;
})
</script>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>2.6新增地址</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1, minimum-scale=1">
<link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper.min.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/weui.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/myweui.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/common/add_address.css">
<script src="__TMPL__/public/assets/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/weui.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/myweui.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/base.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/citypicker.js" type="text/javascript" charset="utf-8"></script>
<style>
</style>
</head>
<body>
<div class="container">
<p class="link_man"><img class="user_pic" src="__TMPL__/public/assets/images/user.png" alt="">联系人</p>
<div class="user_box">
<p class="user_name"><span>姓名:</span>
<input type="text" placeholder="请输入姓名" class="name" value="{$list.name}">
</p>
<p class="user_tel"><span>电话:</span>
<input type="text" placeholder="请输入手机或固定电话" class="tel" value="{$list.tel}">
</p>
</div>
<p class="link_man"><img class="user_pic" src="__TMPL__/public/assets/images/dizhi.png" alt="">收货地址</p>
<div class="address_box">
<p class="user_diqu"><span>选择地区:</span>
<input class="select_city" type="text" placeholder="请选择省份/城市/地区" readonly value="{$list.city}">
<input class="city_number" type="hidden" >
<!--<img class="local_icon" src="__TMPL__/public/assets/images/aaaaaa@2x.png" alt="">-->
</p>
<p class="user_dizhi"><span>详细地址:</span>
<input type="text" placeholder="请输入街道/楼层/门牌号" class="address" value="{$list.address}">
</p>
</div>
</div>
</div>
<footer class="footer">
<p class="add_address">保存收货地址</p>
</footer>
</div>
<script>
$('.select_city').on('click', function() {
weui.picker(rawCitiesData, {
defaultValue: ["110000", "110000", "110101"],
onConfirm: function(result) {
$('.select_city').val(result[0].label + '-' + result[1].label + '-' + result[2].label);
$('.city_number').val(result[0].value + '-' + result[1].value + '-' + result[2].value);
}
});
})
// 提交
$('.add_address').click(function () {
var id = "{$list.id}";
var name = $('.name').val();
var tel = $('.tel').val();
var city = $('.select_city').val();
var address = $('.address').val();
var city_number = $('.city_number').val();
var nameReg = /^[\u4e00-\u9fa5]+$/;
if (!nameReg.test(name)){
alert("姓名只能是汉字");
}else if(tel.length == 0){
alert("手机号不能为空");
}else if(city.length == 0){
alert("地区不能为空");
}else if(address.length == 0){
alert("详细地址不能为空");
}else{
$.ajax({
type:"POST",
url:"{:url('Address/edit')}",
data:{
"id":id,
"name":name,
"tel":tel,
"city":city,
"address":address,
"city_number":city_number,
},
success:function (data) {
alert(data.message);
if(data.code == 1){
window.location.href = "{:url('Address/index')}";
}
},
error:function () {
}
})
}
// var pattern = /^1[3|4|5|6|7|8|9]\d{1}\s\d{4}\s\d{4}$/;
})
</script>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>2.5地址管理</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1, minimum-scale=1">
<link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper.min.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/common/address_manage.css">
<script src="__TMPL__/public/assets/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/base.js" type="text/javascript" charset="utf-8"></script>
<style>
</style>
</head>
<body>
<div class="container">
<div class="address_out_box" style="padding-bottom: 1.5rem;">
<volist name="list" id="list">
<div class="address_in_box">
<div class="user_box">
<div class="left_ltem">
<p class="user_name">{$list.name}</p>
<span class="phone"> {$list.tel}</span>
</div>
<div class="right_item">
<p class="moren">
<p class="moren_box <eq name='list.is_check' value='1'>choose_box</eq>" index="{$list.id}">
<img class="duigou" src="__TMPL__/public/assets/images/duigou.png" alt=""></p> 默认地址
</p>
</div>
</div>
<div class="address_box" index="{$list.id}">
<p class="user_address">{$list.city}{$list.address}
<span class="edit_box" index="{$list.id}">
<a href="{:url('Address/edit',array('id'=>$list.id))}">
<img class="add_pic" src="__TMPL__/public/assets/images/edit.png" alt="">
</a>
<img class="del_icon" src="__TMPL__/public/assets/images/delete.png" alt="">
</span>
</p>
</div>
</div>
</volist>
</div>
</div>
<footer class="footer">
<p class="add_address">新增收货地址</p>
</footer>
</div>
<script>
//默认地址勾选
$('.moren_box').on('click', function() {
var address_id = $(this).attr('index');
var obj = $(this);
console.log(address_id)
$.ajax({
type: "POST",
url: "{:url('Address/isCheck')}",
data: {
"address_id": address_id,
},
success: function (data) {
if (data.code == '1') {
$('.moren_box').removeClass('choose_box');
obj.addClass('choose_box');
} else {
alert(data.message);
}
},
error: function () {
}
})
})
//添加地址跳转
$('.add_address').on('click', function() {
window.location.href = "{:url('Address/add')}"
})
// 删除
$('.del_icon').click(function () {
var id = "{$list.id}";
$.ajax({
type:"POST",
url:"{:url('Address/del')}",
data:{
"id":id,
},
success:function (data) {
alert(data.message);
window.location.reload()
},
error:function () {
}
})
})
</script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -38,7 +38,7 @@
</div>
</div>
<div class="goods_detail_desc">
<p class="goods_detail_desc_money">¥{$art.money}.00 <span>联系客服<img src="__TMPL__/public/assets/images/kefu_icon.png" alt=""></span></p>
<p class="goods_detail_desc_money">¥{$art.money}<span>联系客服<img src="__TMPL__/public/assets/images/kefu_icon.png" alt=""></span></p>
<p class="goods_detail_desc_title">{$art.name}</p>
<p class="goods_detail_desc_content">{$art.intro}</p>
</div>
... ... @@ -66,7 +66,7 @@
<div class="head_img_box">
<img src="__TMPL__/public/assets/images/detail_head_img.png" alt="">
<p class="user_name">穷艾尔雅</p>
<span class="release_time">2018-07-14<span>
<span class="release_time">2018-07-14</span>
</div>
<div class="pingjia_box">
<p class="pingjia_content">出行收纳更方便,体积更小轻松放入汽车后备箱,非常好的
... ... @@ -89,6 +89,7 @@
</div>
<footer class="footer">
<a href="{:url('Shopping/index')}">
<div class="buycar_box">
<span class="goods_num">{$cart}</span>
<eq name="cart" value="0">
... ... @@ -97,6 +98,7 @@
<img class="footer_buycar_img" src="__TMPL__/public/assets/images/cdvcd@2x.png" alt="">
</eq>
</div>
</a>
<p class="footer_pay">前往支付</p>
<p class="footer_buycar">加入购物车</p>
</footer>
... ... @@ -154,7 +156,7 @@
})
//去购买
$('.footer_pay').on('click', function() {
window.location.href = "sure_buy.html"
window.location.href = "{:url('Rent/buySure')}"
})
</script>
</body>
... ...
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>2-4确认购买</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1, minimum-scale=1">
<link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper.min.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/common/sure_buy.css">
<script src="__TMPL__/public/assets/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
<style>
.shuru {
width: 2rem;
outline: none;
}
.beizhu_title {
display: inline-block;
vertical-align: top;
margin-top: 0.08rem;
}
textarea {
outline: none;
margin: 0 auto;
margin-top: 0.1rem;
margin-left: 0.1rem;
margin-right: 0.1rem;
line-height: 0.35rem;
}
.beizhu_content {
display: inline-block;
border-radius: 0.1rem;
border: 0.01rem solid #EBEBEB;
}
</style>
</head>
<body>
<div class="container">
<div class="address_box">
<img class="youjiantou" src="__TMPL__/public/assets/images/youjiantou1.png" alt="">
<div class="user_box">
<img class="head_img" src="__TMPL__/public/assets/images/head_img.png" alt="">
<p class="user_name">
<input class="shuru" type="text" maxlength="5" placeholder="赵先生">
</p>
<p class="user_phone">
<input class="shuru" type="number" maxlength="11" onkeyup="this.value = this.value.slice(0,11)" placeholder="15122953260">
</p>
</div>
<div class="local_box">
<img class="location_img" src="__TMPL__/public/assets/images/3336556@2x.png" alt="">
<span class="address_content">天津阿达宽大的</span>
</div>
</div>
<div class="con_warp">
<p class="buy_message buy_message_top"> 购买信息</p>
<ul class="con_list_ul">
<li class="con_list_li">
<img class="con_list_img" src="__TMPL__/public/assets/images/5653ceba1a219@2x.png" alt="">
<div class="goods_box">
<p class="goods_title">HO56C手动轮椅车</p>
<span class="goods_content">体积更小轻松放入汽车后备箱</span>
<p class="goods_money">$2000.06</p>
<span class="goods_nums"> X1</span>
</div>
</li>
</ul>
<div class="join">
<img class="subtract_img" src="__TMPL__/public/assets/images/item_reduce.png " alt="">
<p>1 </p>
<img class="add_img" src="__TMPL__/public/assets/images/item_add.png" alt="">
</div>
<p class="buy_message buy_message_bot"> 购买数量 </p>
</div>
<div class="peisong">
<div class="peisong_box">
<p> 配送方式<span> 快递:¥8.00</span></p>
</div>
<div class="beizhu_box">
<p class="beizhu_title"> 备注信息: </p>
<p class="beizhu_content">
<textarea name="" id="" cols="35" rows="3">晚一些的发货发的撒佛挡杀佛的萨芬</textarea>
</p>
</div>
</div>
<div class="xiaoji_box">
<p class="xiaoji">共一件商品 小计 : ¥2000.00</p>
</div>
<div class="zhifu">
<div class=" pay_method">
<div class="method_choose">
<p class="wx_pay pay_item"> 微信支付<span><img class="hand" src="__TMPL__/public/assets/images/hand.png" alt="">推荐使用</span> </p>
<p class="ali_pay pay_item"> 支付宝支付 </p>
</div>
<div class="methood_pic">
<img class="sure sure_item" src="__TMPL__/public/assets/images/sure.png" alt="">
<img class="cancel sure_item" src="__TMPL__/public/assets/images/sure_1.png" alt="">
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="buycar_box">
<p> 微信支付</p>
<span class="buycar_box_money">$2000.00</span>
</div>
<p class="footer_buycar">前往支付</p>
</footer>
</div>
<script src="__TMPL__/public/assets/js/picker.min.js"></script>
<script src="__TMPL__/public/assets/js/base.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/common.js" type="text/javascript" charset="utf-8"></script>
<script>
$(document).ready(function() {
get_main_content();
var $menu_box = $('.content_body .con_title>li');
$menu_box.click(function() {
$(this).addClass('con_curr').siblings().removeClass('con_curr');
var index = $menu_box.index(this);
$('.con_all .con_warp').eq(index).show().siblings().hide();
});
})
function get_main_content() {
}
//地址管理
$('.youjiantou').on('click', function() {
window.location.href = "{:url('Address/index')}";
})
</script>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>3-9效力等级说明</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1, minimum-scale=1">
<link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper.min.css">
<script src="__TMPL__/public/assets/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/base.js" type="text/javascript" charset="utf-8"></script>
<style>
</style>
</head>
<body>
<div class="container">
<div class="content_text_box">
<p class="text_title">{$art.title}</p>
<p class="content_text">{$art.content}</p>
</div>
</div>
<script>
$(document).ready(function() {
get_main_content();
var $menu_box = $('.content_body .con_title>li');
$menu_box.click(function() {
$(this).addClass('con_curr').siblings().removeClass('con_curr');
var index = $menu_box.index(this);
$('.con_all .con_warp').eq(index).show().siblings().hide();
});
})
function get_main_content() {
}
</script>
</body>
</html>
... ...
... ... @@ -12,102 +12,120 @@
<script src="__TMPL__/public/assets/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/base.js" type="text/javascript" charset="utf-8"></script>
<style>
.pic_item {
width: 0.68rem;
height: 0.73rem;
}
</style>
</head>
<body>
<div class="container">
<div class="head_box">
<div class="pic_box">
<img class="head_pic" src="__TMPL__/public/assets/images/user_pic.png" alt="">
</div>
<p class="user_name">合欢花</p>
</div>
<div class="jifen_box">
<img class="jifen" src="__TMPL__/public/assets/images/asvfvadv@2x.png" alt="">
</div>
<div class="order">
<p class="my_order">
<span class="order_left">我的订单</span>
<span class="order_right">查看更多订单<img src="__TMPL__/public/assets/images/youjiantou1.png" alt=""></span>
</p>
<ul class="person_list">
<li class="person_botlist"><img src="__TMPL__/public/assets/images/SDFAGFDAW@2x.png" alt=""><span>待支付</span></li>
<li class="person_botlist"><img src="__TMPL__/public/assets/images/orderclick.png" alt=""><span>待完成</span></li>
<li class="person_botlist"><img src="__TMPL__/public/assets/images/orderpingjia.png" alt=""><span>待评价</span></li>
<li class="person_botlist"><img src="__TMPL__/public/assets/images/ordersure.png" alt=""><span>待完成</span></li>
</ul>
</div>
<div class="list_box">
<ul>
<li class="list_item">
<span class="list_left"><img src="__TMPL__/public/assets/images/ACSACA@2x.png" alt="">我的积分</span>
<span class="list_right chakan">查看全部积分<img src="__TMPL__/public/assets/images/youjiantou1.png" alt=""></span>
</li>
<li class="list_item">
<a href="{:url('User/address')}">
<span class="list_left"><img src="__TMPL__/public/assets/images/acsc@2x.png" alt="">地址管理</span>
<span class="list_right"><img src="__TMPL__/public/assets/images/youjiantou1.png" alt=""></span>
</a>
</li>
<li class="list_item xiaoli">
<span class="list_left"><img src="__TMPL__/public/assets/images/acsc@2x.png" alt="">效力等级说明</span>
<span class="list_right"><img src="__TMPL__/public/assets/images/youjiantou1.png" alt=""></span>
</li>
<li class="list_item lease">
<span class="list_left"><img src="__TMPL__/public/assets/images/acsc@2x.png" alt="">租赁协议</span>
<span class="list_right"><img src="__TMPL__/public/assets/images/youjiantou1.png" alt=""></span>
</li>
<li class="list_item share">
<span class="list_left"><img src="__TMPL__/public/assets/images/acsc@2x.png" alt="">分享有礼</span>
<span class="list_right"><img src="__TMPL__/public/assets/images/youjiantou1.png" alt=""></span>
</li>
</ul>
<div class="container">
<div class="head_box">
<div class="pic_box">
<img class="head_pic" src="__TMPL__/public/assets/images/user_pic.png" alt="">
</div>
<p class="user_name">合欢花</p>
</div>
<footer class="footer">
<ul class="bottom_list">
<li id="index_bar" class="mainpage_botlist index"><img src="__TMPL__/public/assets/images/index.png" alt=""><span>首页</span></li>
<li id="buy_car" class="mainpage_botlist buy_car"><img src="__TMPL__/public/assets/images/cdvcd@1x.png" alt=""><span>购物车</span></li>
<li id="personal_center" class="mainpage_botlist personal_center"><img src="__TMPL__/public/assets/images/personal_checked.png" alt=""><span>我的</span></li>
<div class="jifen_box">
<img class="jifen" src="__TMPL__/public/assets/images/asvfvadv@2x.png" alt="">
</div>
<div class="order">
<p class="my_order">
<span class="order_left">我的订单</span>
<span class="order_right">查看更多订单<img src="__TMPL__/public/assets/images/youjiantou1.png" alt=""></span>
</p>
<ul class="person_list">
<li class="person_botlist">
<div class="box">
<img class="pic_item " src="__TMPL__/public/assets/images/orderyin2.png" alt="">
<span class="order_nums">2</span>
</div>
<span>待支付</span>
</li>
<li class="person_botlist">
<div class="box">
<img class=" pic_item_usual" src="__TMPL__/public/assets/images/orderclick.png" alt="">
</div>
<span>待完成</span>
</li>
<li class="person_botlist">
<div class="box">
<img class=" pic_item_usual" src="__TMPL__/public/assets/images/orderpingjia.png" alt="">
</div>
<span>待评价</span>
</li>
<li class="person_botlist">
<div class="box">
<img class=" pic_item_usual" src="__TMPL__/public/assets/images/ordersure.png" alt="">
</div>
<span>已完成</span>
</li>
</ul>
</div>
<div class="list_box">
<ul>
<li class="list_item">
<span class="list_left"><img src="__TMPL__/public/assets/images/ACSACA@2x.png" alt="">我的积分</span>
<span class="list_right chakan">查看全部积分<img src="__TMPL__/public/assets/images/youjiantou1.png" alt=""></span>
</li>
<li class="list_item adress">
<span class="list_left"><img src="__TMPL__/public/assets/images/acsc@2x.png" alt="">地址管理</span>
<span class="list_right"><img src="__TMPL__/public/assets/images/youjiantou1.png" alt=""></span>
</li>
<li class="list_item xiaoli">
<span class="list_left"><img src="__TMPL__/public/assets/images/ASFAfs@2x.png" alt="">效力等级说明</span>
<span class="list_right"><img src="__TMPL__/public/assets/images/youjiantou1.png" alt=""></span>
</li>
<li class="list_item lease">
<span class="list_left"><img class="tiaozheng" src="__TMPL__/public/assets/images/SCAC@2x.png" alt="">租赁协议</span>
<span class="list_right"><img src="__TMPL__/public/assets/images/youjiantou1.png" alt=""></span>
</li>
<li class="list_item share">
<span class="list_left"><img src="__TMPL__/public/assets/images/zan.png" alt="">分享有礼</span>
<span class="list_right"><img src="__TMPL__/public/assets/images/youjiantou1.png" alt=""></span>
</li>
</ul>
</footer>
</div>
<script src="__TMPL__/public/assets/js/common.js"></script>
<script>
$(document).ready(function() {
get_main_content();
</div>
<footer class="footer">
<ul class="bottom_list">
<li id="index_bar" class="mainpage_botlist index"><img src="__TMPL__/public/assets/images/index.png" alt=""><span>首页</span></li>
<li id="buy_car" class="mainpage_botlist buy_car"><img src="__TMPL__/public/assets/images/cdvcd@1x.png" alt=""><span>购物车</span></li>
<li id="personal_center" class="mainpage_botlist personal_center"><img src="__TMPL__/public/assets/images/personal_checked.png" alt=""><span>我的</span></li>
</ul>
</footer>
</div>
<script src="__TMPL__/public/assets/js/common.js"></script>
<script>
//我的积分
$('.chakan').on('click', function() {
window.location.href = "{:url('User/score')}"
})
// 地址管理
$('.adress').on('click', function() { window.location.href = "{:url('Address/index')}" });
// 孝力等级
$('.xiaoli').on('click', function() { window.location.href = "{:url('User/grade')}" });
// 租赁协议
$('.lease').on('click', function() { window.location.href = "{:url('User/rentGrade')}" });
})
function get_main_content() {
//导航栏跳转
$('#index_bar').on('click', function() { window.location.href = "{:url('Index/index')}" });
$('#buy_car').on('click', function() { window.location.href = "{:url('Shopping/index')}" })
}
//导航栏跳转
$('#index_bar').on('click', function() { window.location.href = '../index.html' });
$('#buy_car').on('click', function() { window.location.href = '../common/buy_car.html' })
//分享跳转
$('.jifen').on('click', function() { window.location.href = 'share.html' })
//租赁指南跳转
$('.adress').on('click', function() { window.location.href = 'address_manage.html' });
$('.xiaoli').on('click', function() { window.location.href = 'class_desc.html' });
$('.lease').on('click', function() { window.location.href = '../common/distribution_rule.html' });
$('.jifen').on('click', function() { window.location.href = "{:url('Address/score')}" })
$('.share').on('click', function() { window.location.href = 'share.html' });
//订单跳转
$('.order_right').on('click', function() { window.location.href = 'myorder.html' });
$('.zulin').on('click', function() {
window.location.href = 'common/zhinan.html'
});
//积分跳转
$('.chakan').on('click', function() {
window.location.href = 'jifen.html'
})
</script>
</script>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>3-9效力等级说明</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1, minimum-scale=1">
<link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper.min.css">
<script src="__TMPL__/public/assets/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/base.js" type="text/javascript" charset="utf-8"></script>
<style>
</style>
</head>
<body>
<div class="container">
<div class="content_text_box">
<p class="text_title">{$art.title}</p>
<p class="content_text">{$art.content}</p>
</div>
</div>
<script>
$(document).ready(function() {
get_main_content();
var $menu_box = $('.content_body .con_title>li');
$menu_box.click(function() {
$(this).addClass('con_curr').siblings().removeClass('con_curr');
var index = $menu_box.index(this);
$('.con_all .con_warp').eq(index).show().siblings().hide();
});
})
function get_main_content() {
}
</script>
</body>
</html>
... ...
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>3-我的积分</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1, minimum-scale=1">
<link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper.min.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/user/jifen.css">
<script src="__TMPL__/public/assets/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/base.js" type="text/javascript" charset="utf-8"></script>
<style>
</style>
</head>
<body>
<div class="container">
<div class="head_box">
<p class="all_jifen">{$member}</p>
<p class="use_jifen">可用积分</p>
</div>
<div class="jifen_card">
<div class="content_head">
<ul class="select_card con_title">
<li class="select_card_list con_curr" >
<img src="__TMPL__/public/assets/images/dscfv@2x.png" alt="">
<p>积分明细</p>
</li>
<li class="select_card_list " >
<img src="__TMPL__/public/assets/images/dsfvafds@2x.png" alt="">
<p>积分使用记录</p>
</li>
</ul>
</div>
</div>
<div class="con_all">
<div class="con_warp">
<div class="list_box">
<ul>
<volist name="art" id="list">
<eq name="list.status" value="2">
<li class="list_item list_item_first">
<p class="list_left">{$list.reason}</p>
<p class="use_date">{$list.create_time|date='Y-m-d',###}</p>
<p class="add_num">+{$list.score}</p>
</li>
</eq>
</volist>
</ul>
<img class="juchi" src="__TMPL__/public/assets/images/juchixing.png" alt="">
</div>
</div>
<div class="con_warp" style="display: none">
<div class="list_box">
<ul>
<volist name="art" id="list">
<eq name="list.status" value="3">
<li class="list_item list_item_first">
<p class="list_left">{$list.reason}</p>
<p class="use_date">{$list.create_time|date='Y-m-d',###}</p>
<p class="add_num">-{$list.score}</p>
</li>
</eq>
</volist>
</ul>
<img class="juchi" src="__TMPL__/public/assets/images/juchixing.png" alt="">
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
get_main_content();
var $menu_box = $('.content_head .con_title>li');
$menu_box.click(function() {
$(this).attr('background', "#000");
$(this).addClass('con_curr').siblings().removeClass('con_curr');
var index = $menu_box.index(this);
$('.con_all .con_warp').eq(index).show().siblings().hide();
});
})
function get_main_content() {
}
//首页轮播图
var swiper = new Swiper('.swiper-container', {
pagination: {
el: '.swiper-pagination',
clickable: true,
},
});
//我要租赁-查找器材跳转
$('.lookup_equipment').on('click', function() {
window.location.href = 'common/zhinan.html'
})
//地理位置跳转
$('.local_location').on('click', function() {
window.location.href = 'common/map.html'
})
//我要购买-去挑选商品跳转
//租赁指南跳转
$('.zulin').on('click', function() {
window.location.href = 'common/zhinan.html'
});
//关于我们跳转
$('.us').on('click', function() {
window.location.href = 'common/zhinan.html'
})
</script>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>购物车</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1, minimum-scale=1">
<link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper.min.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/common/buy_car.css">
<script src="__TMPL__/public/assets/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/base.js" type="text/javascript" charset="utf-8"></script>
<style>
.changeNone{
display: none;
}
.show{
display: block;
}
</style>
</head>
<body>
<header class="mui_bar">
<div class="delete_box">
<img class="del_img" src="__TMPL__/public/assets/images/sdfadgas@2x.png" alt="">
<p class="del_p">删除</p>
</div>
<h1 class="mui_title">购物车</h1>
</header>
<div class="container">
<div class="con_warp">
<ul class="con_list_ul first_ul">
<volist name="cart" id="cart">
<li class="con_list_li">
<div class="check_radio first_radio">
<!-- <input type="radio"> -->
<img class="sel_img changeNone" src="__TMPL__/public/assets/images/sure.png" alt="">
</div>
<img class="con_list_img" src="{:cmf_get_image_url($cart.pic)}" alt="">
<div class="goods_box" index="{$cart.id}">
<p class="goods_title">{$cart.name}</p>
<span class="goods_content">{$cart.intro}</span>
<p class="goods_money"><span class="onlyMoney">{$cart.money}</span></p>
<div class="join">
<img class="subtract_img" src="__TMPL__/public/assets/images/item_reduce.png " alt="">
<p class="number">{$cart.num} </p>
<img class="add_img" src="__TMPL__/public/assets/images/item_add.png" alt="">
</div>
</div>
</li>
</volist>
</ul>
</div>
</div>
<div class="zhifu">
<div class="radio_box">
<div class="all_ckeck ">
<!-- <input type="radio"> -->
<img class="all changeNone" src="__TMPL__/public/assets/images/sure.png" alt="">
</div>
<p>全选</p>
</div>
<div class="pay">
<p class="to_pay">前往支付</p>
<p class="all_price"> 合计:<span><span class="change_money">0.00</span></span></p>
</div>
</div>
<footer class="footer">
<ul class="bottom_list">
<li id="index_bar" class="mainpage_botlist index_bar"><img src="__TMPL__/public/assets/images/index.png" alt=""><span>首页</span></li>
<li id="buy_car" class="mainpage_botlist buy_car"><img src="__TMPL__/public/assets/images/cdvcd@1x_checked.png" alt=""><span>购物车</span></li>
<li id="personal_center" class="mainpage_botlist personal_center"><img src="__TMPL__/public/assets/images/personal.png" alt=""><span>我的</span></li>
</ul>
</footer>
</div>
<script src="__TMPL__/public/assets/js/common.js"></script>
<script>
// 购物车数量 start
var shopping_id = 0;
var is_add = 0;
// 购物车数量减少
$('.subtract_img').click(function () {
shopping_id = $(this).parent().parent().attr('index');
is_add = 2;
changenum($(this));
});
// 购物车数量增加
$('.add_img').click(function () {
shopping_id = $(this).parent().parent().attr('index');
is_add = 1;
changenum($(this));
});
function changenum(k) {
$.ajax({
type:"POST",
url:"{:url('Shopping/changeShopping')}",
data:{
"shopping_id":shopping_id,
"is_add":is_add,
},
success:function (data) {
var count_allFirst = 0;
if(data.code == '1'){
k.parent().find('.number').html(data.data.number);
var is_has = k.parent().parent().parent().find('.sel_img').hasClass('show');
if(is_has == true){
$('.show').map(function () {
var money = $(this).parent().parent().find('.onlyMoney').text();
var num = $(this).parent().parent().find('.number').text();
count_allFirst += parseFloat(money)*parseFloat(num);
})
// 更改总额
var final = count_allFirst.toFixed(2);
$('.change_money').text(final);
}
}else{
alert(data.message);
}
},
error:function () {
}
})
}
// end
// 选中
$('.first_radio').click(function () {
// 增加样式
var count_all = 0;
if($(this).find('.sel_img').hasClass('show')){
$(this).find('.sel_img').removeClass('show');
$(this).find('.sel_img').addClass('changeNone');
}else{
$(this).find('.sel_img').removeClass('changeNone');
$(this).find('.sel_img').addClass('show');
}
$('.first_radio .show').map(function () {
var money = $(this).parent().parent().find('.onlyMoney').text();
var num = $(this).parent().parent().find('.number').text();
count_all += parseFloat(money)*parseFloat(num);
})
// 更改总额
var final = count_all.toFixed(2);
$('.change_money').text(final);
// 全选
var all_con = $(".first_ul .con_list_li").length;
var choose_con = $(".first_ul .show").length;
if(all_con == choose_con){
$('.all_ckeck').find('.all').removeClass('changeNone');
$('.all_ckeck').find('.all').addClass('show');
}else{
$('.all_ckeck').find('.all').removeClass('show');
$('.all_ckeck').find('.all').addClass('changeNone');
}
});
// 全选
$('.all_ckeck').click(function () {
if($('.all_ckeck').find('img').hasClass('show')){
$('.first_ul li').find('.sel_img').removeClass('show');
$('.first_ul li').find('.sel_img').addClass('changeNone');
$('.all_ckeck').find('img').removeClass('show');
$('.all_ckeck').find('img').addClass('changeNone');
}else{
$('.first_ul li').find('.sel_img').removeClass('changeNone');
$('.first_ul li').find('.sel_img').addClass('show');
$('.all_ckeck').find('img').removeClass('changeNone');
$('.all_ckeck').find('img').addClass('show');
}
var count_all = 0;
$('.first_radio .show').map(function () {
var money = $(this).parent().parent().find('.onlyMoney').text();
var num = $(this).parent().parent().find('.number').text();
count_all += parseFloat(money)*parseFloat(num);
})
// 更改总额
var final = count_all.toFixed(2);
$('.change_money').text(final);
})
//删除
$('.delete_box').on('click', function() {
var del_arr = [];
$('.first_ul').find('.show').map(function () {
var del_id = $(this).parent().parent().find('.goods_box').attr('index');
del_arr.push(del_id);
})
if(del_arr.length == 0){
alert('请选择您要删除的物品!')
}else{
$.ajax({
type:"POST",
url:"{:url('Shopping/delShopping')}",
data:{
"shopping_id":del_arr,
},
success:function (data) {
alert(data.message);
if(data.code == 1){
window.location.reload();
}
},
error:function () {
}
})
}
});
// $(document).ready(function() {
// var $menu_box = $('.content_body .con_title>li');
// $menu_box.click(function() {
// $(this).addClass('con_curr').siblings().removeClass('con_curr');
// var index = $menu_box.index(this);
// $('.con_all .con_warp').eq(index).show().siblings().hide();
// });
// })
//勾选
// $('.check_radio').on('click', function() {
//
// if ($('.check_radio img').is(':hidden')) { //如果当前隐藏
// $('.check_radio img').show(); //那么就显示div
// $('.check_radio').css('border', '0.01rem solid #FFF');
//
// } else { //否则
// $('.check_radio img').hide(); //就隐藏div
// $('.check_radio').css('border', '0.01rem solid rgba(0,0,0,0.4)');
// }
// if ($('.con_list_li').length == 1 && $('.check_radio img').is(':hidden') == false) {
// $('.all_ckeck img').show();
// $('.all_ckeck').css('border', '0.01rem solid #FFF');
// } else {
// $('.all_ckeck img').hide();
// $('.all_ckeck').css('border', '0.01rem solid rgba(0,0,0,0.4)');
//
// }
// })
// //全部勾选
// $('.all_ckeck').on('click', function() {
// if ($('.all_ckeck img').is(':hidden')) { //如果当前隐藏
// $('.all_ckeck img').show(); //那么就显示tupain
// $('.all_ckeck').css('border', '0.01rem solid #FFF');
// $('.check_radio img').show(); //那么就显示div
// $('.check_radio').css('border', '0.01rem solid #FFF');
// } else {
// $('.check_radio img').hide();
// $('.check_radio').css('border', 'none')
// $('.check_radio').css('border', '0.01em solid rgba(0,0,0,0.4)');
// $('.all_ckeck img').hide(); //那么就显示div
// $('.all_ckeck ').css('border', '0.01rem solid rgba(0,0,0,0.4)');
//
// }
//
// })
//导航栏跳转
$('#index_bar').on('click', function() { window.location.href = "{:url('Index/index')}" });
$('#personal_center').on('click', function() { window.location.href = "{:url('User/index')}"})
</script>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>2-7购物车</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1, minimum-scale=1">
<link rel="stylesheet" href="../css/base.css">
<link rel="stylesheet" href="../css/swiper.min.css">
<link rel="stylesheet" href="../css/common/buy_car.css">
<script src="__TMPL__/public/assets/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__TMPL__/public/assets/js/base.js" type="text/javascript" charset="utf-8"></script>
<style>
</style>
</head>
<body>
<header class="mui_bar">
<div class="delete_box">
<img class="del_img" src="__TMPL__/public/assets/images/sdfadgas@2x.png" alt="">
<p class="del_p">删除</p>
</div>
<h1 class="mui_title">购物车</h1>
</header>
<div class="container">
<div class="con_warp">
<ul class="con_list_ul first_ul">
<volist name="cart" id="cart">
<li class="con_list_li">
<div class="check_radio">
<!-- <input type="radio"> -->
<img class="sel_img" style="display: none;" src="__TMPL__/public/assets/images/sure.png" alt="">
</div>
<img class="con_list_img" src="__TMPL__/public/assets/images/5653ceba1a219@2x.png" alt="">
<div class="goods_box">
<p class="goods_title">HO56C手动轮椅车</p>
<span class="goods_content">体积更小轻松放入汽车后备箱</span>
<p class="goods_money">¥2000.00</p>
<div class="join">
<img class="subtract_img" src="__TMPL__/public/assets/images/item_reduce.png " alt="">
<p>1 </p>
<img class="add_img" src="__TMPL__/public/assets/images/item_add.png" alt="">
</div>
</div>
</li>
</volist>
</ul>
</div>
</div>
<div class="zhifu">
<div class="radio_box">
<div class="all_ckeck ">
<!-- <input type="radio"> -->
<img style="display: none;" src="__TMPL__/public/assets/images/sure.png" alt="">
</div>
<p>全选</p>
</div>
<div class="pay">
<p class="to_pay">前往支付</p>
<p class="all_price"> 合计:<span>¥4000.00</span></p>
</div>
</div>
<footer class="footer">
<ul class="bottom_list">
<li id="index_bar" class="mainpage_botlist index_bar"><img src="__TMPL__/public/assets/images/index.png" alt=""><span>首页</span></li>
<li id="buy_car" class="mainpage_botlist buy_car"><img src="__TMPL__/public/assets/images/cdvcd@1x_checked.png" alt=""><span>购物车</span></li>
<li id="personal_center" class="mainpage_botlist personal_center"><img src="__TMPL__/public/assets/images/personal.png" alt=""><span>我的</span></li>
</ul>
</footer>
</div>
<script src="__TMPL__/public/assets/js/common.js"></script>
<script>
$(document).ready(function() {
get_main_content();
var $menu_box = $('.content_body .con_title>li');
$menu_box.click(function() {
$(this).addClass('con_curr').siblings().removeClass('con_curr');
var index = $menu_box.index(this);
$('.con_all .con_warp').eq(index).show().siblings().hide();
});
})
function get_main_content() {
}
//删除
$('.delete_box').on('click', function() {
if ($('.con_list_li .sel_img').is(':hidden')) {
} else {
$('.con_list_li').hide();
$('.all_ckeck img').hide();
}
});
//勾选
$('.check_radio').on('click', function() {
if ($('.check_radio img').is(':hidden')) { //如果当前隐藏
$('.check_radio img').show(); //那么就显示div
$('.check_radio').css('border', '0.01rem solid #FFF');
} else { //否则
$('.check_radio img').hide(); //就隐藏div
$('.check_radio').css('border', '0.01rem solid rgba(0,0,0,0.4)');
}
if ($('.con_list_li').length == 1 && $('.check_radio img').is(':hidden') == false) {
$('.all_ckeck img').show();
$('.all_ckeck').css('border', '0.01rem solid #FFF');
} else {
$('.all_ckeck img').hide();
$('.all_ckeck').css('border', '0.01rem solid rgba(0,0,0,0.4)');
}
})
//全部勾选
$('.all_ckeck').on('click', function() {
if ($('.all_ckeck img').is(':hidden')) { //如果当前隐藏
$('.all_ckeck img').show(); //那么就显示tupain
$('.all_ckeck').css('border', '0.01rem solid #FFF');
$('.check_radio img').show(); //那么就显示div
$('.check_radio').css('border', '0.01rem solid #FFF');
} else {
$('.check_radio img').hide();
$('.check_radio').css('border', 'none')
$('.check_radio').css('border', '0.01em solid rgba(0,0,0,0.4)');
$('.all_ckeck img').hide(); //那么就显示div
$('.all_ckeck ').css('border', '0.01rem solid rgba(0,0,0,0.4)');
}
})
//导航栏跳转
$('#index_bar').on('click', function() { window.location.href = '../index.html' });
$('#personal_center').on('click', function() { window.location.href = '../user/personal_center.html' })
</script>
</body>
</html>
\ No newline at end of file