作者 王晓刚
1 个管道 的构建 通过 耗费 1 秒

Merge branch 'master' of http://114.215.101.231:8099/anyv/xkeasy into wangxiaogang

# Conflicts:
#	public/index.php
... ... @@ -188,12 +188,28 @@ class IndexController extends WeChatBaseController
*/
public function search_salesman_goods(){
$uid = cmf_get_current_user_id();
$data_status = Db::name('my_user') -> where("uid",$uid) -> find();
$where = ['type'=>1];
if($data_status['status'] == 2){
$where = "type = 1 or uid = ".$uid;
}
if($data_status['status'] == 3){
$salesman_uid = Db::name('my_user') -> where('id',$data_status['pid']) -> find();
$where = "type = 1 or uid =".$salesman_uid['uid'];
}
if($data_status['status'] == 4){
$teacher_id = Db::name('my_user') -> where('id',$data_status['pid']) -> find();
$salesman_id = Db::name('my_user') -> where('id',$teacher_id['pid']) -> find();
$where = "type = 1 or uid =".$salesman_id['uid'];
}
if(empty($_POST['book_name'])){
$book_name = '';
$data_salesman_goods = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where("type =2 ") -> select() -> toArray();
$data_salesman_goods = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where($where) -> select() -> toArray();
}else{
$book_name = $_POST['book_name'];
$data_salesman_goods = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where("type =2 ") -> where('book_name','like',"%".$book_name."%") -> select() -> toArray();
$data_salesman_goods = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where($where) -> where('book_name','like',"%".$book_name."%") -> select() -> toArray();
}
if(!empty($data_salesman_goods)){
foreach ($data_salesman_goods as $key => $val){
... ... @@ -213,8 +229,24 @@ class IndexController extends WeChatBaseController
*/
public function search_sales_order(){
$uid = cmf_get_current_user_id();
$data_status = Db::name('my_user') -> where("uid",$uid) -> find();
$where = ['type'=>1];
if($data_status['status'] == 2){
$where = "type = 1 or uid = ".$uid;
}
if($data_status['status'] == 3){
$salesman_uid = Db::name('my_user') -> where('id',$data_status['pid']) -> find();
$where = "type = 1 or uid =".$salesman_uid['uid'];
}
if($data_status['status'] == 4){
$teacher_id = Db::name('my_user') -> where('id',$data_status['pid']) -> find();
$salesman_id = Db::name('my_user') -> where('id',$teacher_id['pid']) -> find();
$where = "type = 1 or uid =".$salesman_id['uid'];
}
$search_content = $_POST['search_content'];
$search_content_data = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where("type =2 ") -> where('book_name','like',"%".$search_content."%") -> order('sales desc') -> select() -> toArray();
$search_content_data = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where($where) -> where('book_name','like',"%".$search_content."%") -> order('sales desc') -> select() -> toArray();
if(!empty($search_content_data)){
foreach ($search_content_data as $key => $val){
$price = explode('.',$search_content_data[$key]['price']);
... ... @@ -232,8 +264,24 @@ class IndexController extends WeChatBaseController
*/
public function search_price_order(){
$uid = cmf_get_current_user_id();
$data_status = Db::name('my_user') -> where("uid",$uid) -> find();
$where = ['type'=>1];
if($data_status['status'] == 2){
$where = "type = 1 or uid = ".$uid;
}
if($data_status['status'] == 3){
$salesman_uid = Db::name('my_user') -> where('id',$data_status['pid']) -> find();
$where = "type = 1 or uid =".$salesman_uid['uid'];
}
if($data_status['status'] == 4){
$teacher_id = Db::name('my_user') -> where('id',$data_status['pid']) -> find();
$salesman_id = Db::name('my_user') -> where('id',$teacher_id['pid']) -> find();
$where = "type = 1 or uid =".$salesman_id['uid'];
}
$search_content = $_POST['search_content'];
$search_content_data = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where("type =2 ") -> where('book_name','like',"%".$search_content."%") -> order('price desc') -> select() -> toArray();
$search_content_data = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where($where) -> where('book_name','like',"%".$search_content."%") -> order('price desc') -> select() -> toArray();
if(!empty($search_content_data)){
foreach ($search_content_data as $key => $val){
$price = explode('.',$search_content_data[$key]['price']);
... ... @@ -251,8 +299,24 @@ class IndexController extends WeChatBaseController
*/
public function search_synthesis_order(){
$uid = cmf_get_current_user_id();
$data_status = Db::name('my_user') -> where("uid",$uid) -> find();
$where = ['type'=>1];
if($data_status['status'] == 2){
$where = "type = 1 or uid = ".$uid;
}
if($data_status['status'] == 3){
$salesman_uid = Db::name('my_user') -> where('id',$data_status['pid']) -> find();
$where = "type = 1 or uid =".$salesman_uid['uid'];
}
if($data_status['status'] == 4){
$teacher_id = Db::name('my_user') -> where('id',$data_status['pid']) -> find();
$salesman_id = Db::name('my_user') -> where('id',$teacher_id['pid']) -> find();
$where = "type = 1 or uid =".$salesman_id['uid'];
}
$book_name = $_POST['search_content'];
$data_salesman_goods = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where("type =2 ") -> where('book_name','like',"%".$book_name."%") -> select() -> toArray();
$data_salesman_goods = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where($where) -> where('book_name','like',"%".$book_name."%") -> select() -> toArray();
if(!empty($data_salesman_goods)){
foreach ($data_salesman_goods as $key => $val){
$price = explode('.',$data_salesman_goods[$key]['price']);
... ...
... ... @@ -14,14 +14,139 @@ use think\Db;
class OrderpageController extends WeChatBaseController{
/**
* 显示订单页
* 显示平台订单页
*/
public function order_page(){
$indet_id = $this -> request -> param();
$uid = cmf_get_current_user_id();
$address = Db::name('address') -> where("uid=".$uid." and default_address=1") -> find();
if(empty($address)){
$this -> assign('address',4);
}else{
$address_arr = explode(',',$address['detailed']);
$address['detailed'] = $address_arr[0].$address_arr[1];
$indet_data = Db::name('indent') -> where("id",$indet_id['indet_id']) -> find();
if($indet_data['state'] == 4){
$indet_data_update['id'] = $indet_id['indet_id'];
$indet_data_update['indent_address'] = $address['detailed'];
$indet_data_update['name'] = $address['name'];
$indet_data_update['phone'] = $address['phone'];
Db::name('indent') -> update($indet_data_update);
}
$this -> assign('address',$address);
}
$data = Db::name('indent_goods') -> where('indent_id',$indet_id['indet_id']) -> select() -> toArray();
foreach ($data as $key => $val){
$pricing = explode('.',$val['pricing']);
$data[$key]['pricing0'] = $pricing[0];
$data[$key]['pricing1'] = $pricing[1];
}
$money = Db::name('indent') -> where('id',$indet_id['indet_id']) -> find();
$this -> assign('money',$money['money']);
$this -> assign('data',$data);
$this -> assign('indent_id',$indet_id['indet_id']);
return $this -> fetch();
}
/**
* 显示业务员统一订单页
*/
public function order_salesman_ty(){
$indet_id = $this -> request -> param();
$data = Db::name('indent_goods') -> where('indent_id',$indet_id['indet_id']) -> select() -> toArray();
foreach ($data as $key => $val){
$pricing = explode('.',$val['price']);
$data[$key]['price0'] = $pricing[0];
$data[$key]['price1'] = $pricing[1];
}
$money = Db::name('indent') -> where('id',$indet_id['indet_id']) -> find();
$money['money'] = explode('.',$money['money']);
$this -> assign('money',$money['money']);
$this -> assign('data',$data);
$courier = Db::name('money_ratio') -> where('id',1) -> find();
$this -> assign('courier',$courier['courier']);
$this -> assign('indent_id',$indet_id['indet_id']);
return $this -> fetch();
}
/**
* 商品数量加一
*/
public function shop_cart_numadd(){
$id = $_POST['id'];
$data = Db::name('indent_goods') -> where('id',$id) -> find();
if($data['number']<200){
$res = Db::name('indent_goods') -> where('id',$id) -> setInc('number');
$indent_id = Db::name('indent_goods') -> where('id',$id) -> find();
Db::name('indent') -> where('id',$indent_id['indent_id']) -> setInc('money',$_POST['price']);
}
return true;
}
/**
* 商品数量减一
*/
public function shop_cart_numdec(){
$id = $_POST['id'];
$data = Db::name('indent_goods') -> where('id',$id) -> find();
if($data['number']>1){
Db::name('indent_goods') -> where('id',$id) -> setDec('number');
$indent_id = Db::name('indent_goods') -> where('id',$id) -> find();
Db::name('indent') -> where('id',$indent_id['indent_id']) -> setDec('money',$_POST['price']);
}
return true;
}
/**
* 显示业务员快递订单页
*/
public function order_salesman_kd(){
$uid = cmf_get_current_user_id();
$indent_id = $this -> request -> param();
$money = Db::name('indent') -> where("id =".$indent_id['indet_id']) -> find();
$indent_goods_data = Db::name('indent_goods') -> where('indent_id',$indent_id['indet_id']) -> select();
$this -> assign('data',$indent_goods_data);
$courier = Db::name('money_ratio') -> where('id',1) -> find();
$this -> assign('courier',$courier['courier']);
$money['money'] = $money['money']+$courier['courier'];
$this -> assign('money',$money['money']);
$address = Db::name('address') -> where("uid=".$uid." and default_address=1") -> find();
if(empty($address)){
$this -> assign('address',4);
}else{
$address_arr = explode(',',$address['detailed']);
$address['detailed'] = $address_arr[0].$address_arr[1];
$indet_data = Db::name('indent') -> where("id",$indent_id['indet_id']) -> find();
if($indet_data['state'] == 4){
$indet_data_update['id'] = $indent_id['indet_id'];
$indet_data_update['indent_address'] = $address['detailed'];
$indet_data_update['name'] = $address['name'];
$indet_data_update['phone'] = $address['phone'];
Db::name('indent') -> update($indet_data_update);
}
$this -> assign('address',$address);
}
$this -> assign('indet_id',$indent_id['indet_id']);
return $this -> fetch();
}
... ...
... ... @@ -5,6 +5,7 @@ namespace app\portal\controller;
use cmf\controller\HomeBaseController;
use EasyWeChat\Foundation\Application;
use EasyWeChat\Payment\Order;
use think\Db;
/**
* 微信支付,退款,提现DEMO
... ... @@ -28,12 +29,23 @@ class PayController extends HomeBaseController
* 微信支付
*/
public function index(){
$id = $this->request->param('id',0,'intval');
if(empty($id)){
$this->error('缺少必要参数','','','');
}
$data = Db::name('indent')->where('id',$id)->find();
if(empty($data)){
$this->error('查询为空','','','');
}
if($data['state'] != 4){
$this->error('订单不是待支付状态','','','');
}
$attributes = [
'trade_type' => 'JSAPI',
'body' => '百荣科技',
'detail' => '以客户为中心 以奋斗者文本',
'out_trade_no' => cmf_get_order_sn(),
'total_fee' => 1, // 单位:分
'out_trade_no' => $data['order_number'],
'total_fee' => $data['money']*100, // 单位:分
'notify_url' => url('portal/pay/notify','','',true), // 支付结果通知网址,如果不设置则会使用配置里的默认地址
'openid' => cmf_get_current_user_openid(), // trade_type=JSAPI,此参数必传,用户在商户appid下的唯一标识,
];
... ...
... ... @@ -68,8 +68,39 @@ class SalesmangoodsController extends WeChatBaseController{
}
/**
* 业务员商品费用查询
*/
public function goods_cost(){
$id = $_POST['goods_id'];
$data = Db::name('goods') -> where('id',$id) -> find();
return json_encode($data);
}
/**
* 点击费用编辑
*/
public function moneyedit(){
$data = Db::name('goods') -> where('id',$_POST['goods_id']) -> update(['price'=>$_POST['price'],'money'=>$_POST['money']]);
if($data){
return true;
}else{
return false;
}
}
/**
* 添加业务员商品页
*/
public function Salesman_goods_add(){
return $this -> fetch();
}
... ...
... ... @@ -125,7 +125,8 @@ class ShopcartController extends WeChatBaseController{
foreach ($data as $key => $val){
if($data[0]['type'] == $data[$key]['type']){
}else{
return false;
$ret['type'] = 3;
return json_encode($ret);
}
}
if($data[0]['type'] == 1){
... ... @@ -167,7 +168,21 @@ class ShopcartController extends WeChatBaseController{
$book_num += $val['book_num'];
}
$indent['book_num'] = $book_num;
return 2;
$indent['salesman_uid'] = $data[0]['uid'];
$indet_id = Db::name('indent') -> insertGetId($indent);
foreach ($data as $key => $val){
$indent_goods['book_name'] = $val['book_name'];
$indent_goods['pricing'] = $val['pricing'];
$indent_goods['price'] = $val['price'];
$indent_goods['number'] = $val['book_num'];
$indent_goods['thumbnail'] = $val['show_img'];
$indent_goods['indent_id'] = $indet_id;
Db::name('indent_goods ') -> insert($indent_goods);
}
$ret['type'] = 2;
$ret['indet_id'] = $indet_id;
$res = json_encode($ret);
return $res;
}
... ...
... ... @@ -34,6 +34,10 @@ define('RUNTIME_PATH', CMF_ROOT . 'data/runtime/');
// 定义CMF 版本号
define('BRONET_VERSION', '5.0.170927');
<<<<<<< HEAD
=======
>>>>>>> 7ef7c2626ab691a0371387a23bc7e7c4f4ef415d
// 加载框架基础文件
require CMF_ROOT . 'simplewind/thinkphp/base.php';
... ...
... ... @@ -32,69 +32,60 @@
<!-- 地址 -->
<div class="order_address">
<!-- 暂无 -->
<div class="order_addressNo">
<div class="order_adImg">
<img src="__TMPL__/public/assets/images/31.png" alt="">
</div>
<p class="order_addressGo">暂无收货地址,<a href="address_closed.html">去添加</a></p>
</div>
<!-- 有地址 -->
<!-- <div class="order_addressYes">
<div class="or_addressYesImg1">
<img src="img/38.png" alt="">
</div>
<div class="or_addressYesTxt1">
<div class="or_addressYesTxt2">
<div class="or_addressName">孙骁骁</div>
<p class="or_addressPhone">152 **** 4896</p>
<if condition="$address eq 4">
<div class="order_addressNo">
<div class="order_adImg">
<img src="__TMPL__/public/assets/images/31.png" alt="">
</div>
<p class="order_addressGo">暂无默认收货地址,<a href="{:url('Personalcenter/shop_address')}">去添加</a></p>
</div>
<else/>
<div class="order_addressYes">
<div class="or_addressYesImg1">
<img src="__TMPL__/public/assets/images/38.png" alt="">
</div>
<div class="or_addressYesTxt1">
<div class="or_addressYesTxt2">
<div class="or_addressName" id="name">{$address.name}</div>
<p class="or_addressPhone" id="phone">{$address.phone}</p>
</div>
<p class="or_address_detailed" id="detailed">{$address.region}{$address.detailed}</p>
</div>
<div class="or_addressYesImg2">
<a href="{:url('Personalcenter/shop_address')}">
<img src="__TMPL__/public/assets/images/29.png" alt="">
</a>
</div>
<p class="or_address_detailed">天津市西青区红磡领事郡道开运大厦</p>
</div>
<div class="or_addressYesImg2">
<img src="img/29.png" alt="">
</div>
</div> -->
</if>
<!-- 有地址 -->
</div>
<!-- 订单信息 -->
<div class="order_news">
<h1 class="order_newsTit">订单信息</h1>
<ul class="order_newsUl">
<li>
<div class="order_newsImg">
<img src="__TMPL__/public/assets/images/36.png" alt="">
</div>
<div class="order_newsCon">
<div class="order_newsTxt1 txt-cut">小学五年级英语下册语五年级下册好用不贵经济实惠五年级下册好...</div>
<div class="order_newsTxt2">×<span>1</span></div>
<div class="order_newsTxt3">
<p class="de_topTxt1_1"><span>265.00</span></p>
<p class="de_topTxt1_2"><span>265</span>.00</p>
<div class="order_newsNum">
<div class="order_newsJian">-</div>
<input class="order_newsnum" type="text" readonly="readonly" value="1">
<div class="order_newsJia">+</div>
</div>
<input type="hidden" name="indet_id" value="{$indent_id}">
<volist name="data" id="vo">
<li>
<div class="order_newsImg">
<img src="{:cmf_get_image_url($vo.thumbnail)}" alt="">
</div>
</div>
</li>
<li>
<div class="order_newsImg">
<img src="__TMPL__/public/assets/images/36.png" alt="">
</div>
<div class="order_newsCon">
<div class="order_newsTxt1 txt-cut">小学五年级英语下册语五年级下册好用不贵经济实惠五年级下册好...</div>
<div class="order_newsTxt2">×<span>0</span></div>
<div class="order_newsTxt3">
<p class="de_topTxt1_1"><span>265.40</span></p>
<p class="de_topTxt1_2"><span>265</span>.00</p>
<div class="order_newsNum">
<div class="order_newsJian">-</div>
<input class="order_newsnum" type="text" readonly="readonly" value="1">
<div class="order_newsJia">+</div>
<div class="order_newsCon">
<div class="order_newsTxt1 txt-cut">{$vo.book_name}</div>
<div class="order_newsTxt2">×<span>{$vo.number}</span></div>
<div class="order_newsTxt3">
<p class="de_topTxt1_1"><span>{$vo.price}</span></p>
<p class="de_topTxt1_2"><span>{$vo.pricing0}</span>.{$vo.pricing1}</p>
<div class="order_newsNum">
<div class="order_newsJian" onclick="jian({$vo.id},{$vo.price})">-</div>
<input class="order_newsnum" type="text" readonly="readonly" value="{$vo.number}">
<div class="order_newsJia" onclick="jia({$vo.id},{$vo.price})">+</div>
</div>
</div>
</div>
</div>
</li>
</li>
</volist>
</ul>
</div>
<!-- 支付方式/配送方式 -->
... ... @@ -108,7 +99,7 @@
<span class="order_EtcTxt2">快递</span>
</div>
<div class="order_Etc2">
<p class="order_EtcTxt">配送方式</p>
<p class="order_EtcTxt">买家留言</p>
<textarea placeholder="在此填写您的留言"></textarea>
</div>
</div>
... ... @@ -116,19 +107,53 @@
<div class="order_bottom">
<div class="order_bottom1">
<p class="order_bottomHe">合计金额:</p>
<p class="de_topTxt1_1 zoji"><span>265.00</span></p>
<p class="de_topTxt1_1 zoji"><span>{$money}</span></p>
</div>
<div class="order_bottom2">
<a href="w_shopping_cart.html" style="color:white">
<div class="order_bottom2" onclick="go_pay()">
立即支付
</a>
</div>
</div>
</div>
<script src="__TMPL__/public/assets/js/base.js"></script>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
<script>
/**
*点击去支付
*/
function go_pay(){
name = $('#name').text();
phone = $('#phone').text();
detailed = $('#detailed').text();
if(name == ''){
alert('姓名不能为空');
}else if(phone == ''){
alert('手机号不能为空');
}else if(detailed == ''){
alert('地址不能为空');
}else{
}
}
/**
*点击加一
*/
function jia(id,price){
$.post("{:url('Orderpage/shop_cart_numadd')}",{id:id,price:price},function(data){
});
}
/**
* 点击减一
*/
function jian(id,price){
$.post("{:url('Orderpage/shop_cart_numdec')}",{id:id,price:price},function(data){
});
}
</script>
<script>
$(document).ready(function() {
// 为减少和添加商品数量的按钮绑定事件回调
$('.order_newsNum div').on('click', function(evt) {
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>学考无忧-确认订单</title>
<link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
<style>
.order_address {
padding-bottom: 0.26rem;
background-repeat: no-repeat;
background-image: url("__TMPL__/public/assets/images/32.png");
background-position: bottom;
background-size: 100% 0.06rem;
background-color: white;
}
.yw_wayActive {
border: 0;
background-size: 100% 100%;
background-image: url('__TMPL__/public/assets/images/71.png');
}
</style>
</head>
<body>
<div class="order_box">
<!-- 顶部 -->
<div class="order_top">
<img src="__TMPL__/public/assets/images/left.png" alt="">
<p>订单确认</p>
</div>
<!-- 地址 -->
<div class="order_address">
<!-- 暂无 -->
<if condition="$address eq 4">
<div class="order_addressNo">
<div class="order_adImg">
<img src="__TMPL__/public/assets/images/31.png" alt="">
</div>
<p class="order_addressGo">暂无默认收货地址,<a href="{:url('Personalcenter/shop_address')}">去添加</a></p>
</div>
<else/>
<div class="order_addressYes">
<div class="or_addressYesImg1">
<img src="__TMPL__/public/assets/images/38.png" alt="">
</div>
<div class="or_addressYesTxt1">
<div class="or_addressYesTxt2">
<div class="or_addressName" id="name">{$address.name}</div>
<p class="or_addressPhone" id="phone">{$address.phone}</p>
</div>
<p class="or_address_detailed" id="detailed">{$address.region}{$address.detailed}</p>
</div>
<div class="or_addressYesImg2">
<a href="{:url('Personalcenter/shop_address')}">
<img src="__TMPL__/public/assets/images/29.png" alt="">
</a>
</div>
</div>
</if>
</div>
<!-- 订单信息 -->
<div class="order_news">
<!-- 配送方式 -->
<div class="yw_way">
<h3>配送方式</h3>
<div class="yw_way2">
<div class="yw_way2Li " onclick="go_unified()">统一配送</div>
<div class="yw_way2Li yw_wayActive">快递配送({$courier}元)</div>
</div>
</div>
<h1 class="order_newsTit">订单信息</h1>
<ul class="order_newsUl">
<volist name="data" id="vo">
<li>
<div class="order_newsImg">
<img src="{:cmf_get_image_url($vo.thumbnail)}" alt="">
</div>
<div class="order_newsCon">
<div class="order_newsTxt1 txt-cut">{$vo.book_name}</div>
<div class="order_newsTxt2">×<span>{$vo.number}</span></div>
<div class="order_newsTxt3">
<p class="de_topTxt1_1"><span>{$vo.price}</span></p>
<p class="de_topTxt1_2"><span>{$vo.pricing}</span></p>
<div class="order_newsNum">
<div class="order_newsJian" onclick="jian({$vo.id},{$vo.price})">-</div>
<input class="order_newsnum" type="text" readonly="readonly" value="{$vo.number}">
<div class="order_newsJia" onclick="jia({$vo.id},{$vo.price})">+</div>
</div>
</div>
</div>
</li>
</volist>
</ul>
</div>
<!-- 支付方式/配送方式 -->
<div class="order_Etc">
<div class="order_Etc1">
<p class="order_EtcTxt">支付方式</p>
<img class="order_EtcImg" src="__TMPL__/public/assets/images/34.png" alt="">
</div>
<div class="order_Etc1">
<p class="order_EtcTxt">配送方式</p>
<span class="order_EtcTxt2">快递</span>
</div>
<div class="order_Etc2">
<p class="order_EtcTxt">买家留言</p>
<textarea placeholder="在此填写您的留言"></textarea>
</div>
</div>
<!-- 底部 -->
<div class="order_bottom">
<div class="order_bottom1">
<p class="order_bottomHe">合计金额:</p>
<p class="de_topTxt1_1 zoji"><span>{$money}</span></p>
</div>
<div class="order_bottom2" onclick="go_pay()">立即支付</div>
</div>
</div>
<script src="__TMPL__/public/assets/js/base.js"></script>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
<script>
/**
* 点击统一配送
*/
function go_unified(){
window.location.href = "{:url('Orderpage/order_salesman_ty')}?indet_id="+{$indet_id};
}
/**
*点击去支付
*/
function go_pay(){
name = $('#name').text();
phone = $('#phone').text();
detailed = $('#detailed').text();
if(name == ''){
alert('姓名不能为空');
}else if(phone == ''){
alert('手机号不能为空');
}else if(detailed == ''){
alert('地址不能为空');
}else{
}
}
/**
*点击加一
*/
function jia(id,price){
$.post("{:url('Orderpage/shop_cart_numadd')}",{id:id,price:price},function(data){
});
}
/**
* 点击减一
*/
function jian(id,price){
$.post("{:url('Orderpage/shop_cart_numdec')}",{id:id,price:price},function(data){
});
}
</script>
<script>
$(document).ready(function() {
// 配送方式
$('.yw_way2 div').click(function() {
$(this).addClass('yw_wayActive').siblings().removeClass('yw_wayActive');
})
$(".order_newsNum div").on("click", function(evt) {
if ($(this).text() == "-") {
var count = parseInt($(this).next().val());
if (count > 1) {
count -= 1;
$(this).next().val(count);
} else {
alert("商品数量最少为1");
}
$(this).parents(".order_newsCon").find(".order_newsTxt2 span").text(count);
} else {
var count = parseInt($(this).prev().val());
if (count < 200) {
count += 1;
$(this).prev().val(count);
} else {
alert("商品数量最多为200");
}
$(this).parents(".order_newsCon").find(".order_newsTxt2 span").text(count);
}
var price = parseFloat($(this).parents(".order_newsTxt3").children(".de_topTxt1_1").text().split("¥")[1]);
calcTotal2();
});
// 计算总计
function calcTotal2() {
var checkBoxes = $(".sh_cartround img");
var priceSpans = $(".order_newsTxt3 .de_topTxt1_1 span");
var countInputs = $(".order_newsNum .order_newsnum");
var totalCount = 0;
var totalPrice = {$courier};
for (var i = 0; i < priceSpans.length; i += 1) {
// 强调: jQuery对象使用下标运算或get方法会还原成原生的JavaScript对象
var price = parseFloat($(priceSpans[i]).text());
var count = parseInt($(countInputs[i]).val());
totalCount += count;
totalPrice += price * count;
}
$(".zoji span").html(totalPrice.toFixed(2));
}
})
</script>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>学考无忧-订单确认-选择地址信息</title>
<link rel="stylesheet" href="__TMPL__/public/assets/css/mui.min.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/mui.picker.min.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css" />
<link rel="stylesheet" href="__TMPL__/public/assets/css/log.css" />
<style type="text/css">
.mui-poppicker-header,
.mui-picker {
background-color: white;
}
.mui-btn-blue,
.mui-btn-primary,
input[type=submit] {
background-color: #FF7700;
border: 0;
}
.mui-pciker-list li.highlight {
color: #FF7700;
}
</style>
</head>
<body style="background-color: #F7F7F7;">
<div class="tx_mask_school">
<div class="tx_maskCon_school">
<div class="three_model_school">
<div class="three_model_school_title">
选择学校-班级
</div>
<div class="three_model_school_tab">
<div class="three_model_school_left three_model_school_hover word_color">
学校
</div>
<div class="three_model_school_left">
班级
</div>
</div>
<div>
<div class="three_model_school_data there_university" style="display: block;">
<div class="three_model_school_name">天津科技大学</div>
<div class="three_model_school_name">天津科技大学</div>
<div class="three_model_school_name there_unActive">天津科技大学</div>
<div class="three_model_school_name">天津科技大学2</div>
<div class="three_model_school_name">天津科技大学3</div>
<div class="three_model_school_name">天津科技大学4</div>
<div class="three_model_school_name">天津科技大学5</div>
<div class="three_model_school_name">天津科技大学6</div>
</div>
<div class="three_model_school_data there_class">
<div class="three_model_school_name">G1-11</div>
<div class="three_model_school_name">G1-12</div>
<div class="three_model_school_name">G1-13</div>
<div class="three_model_school_name">G1-14</div>
<div class="three_model_school_name">G1-15</div>
<div class="three_model_school_name">G1-16</div>
</div>
</div>
</div>
</div>
</div>
<div class="log_top_co" style="background-color: white;">
<!-- 顶部 -->
<div class=" order_top log_top_co">
<a href="javascript:history.go(-1)">
<img src="__TMPL__/public/assets/images/left.png" alt="" />
</a>
<p>订单确认</p>
</div>
</div>
<!-- 配送方式 -->
<div class="log_four_top">
<div class="log_four_top_left">
配送方式
</div>
<div class="log_four_top_right">
<div class="log_four_top_right_one log_four_top_right_bg">统一配送</div>
<div class="log_four_top_right_two" onclick="go_courier()">
快递配送({$courier}元)
</div>
</div>
</div>
<!-- 地址信息 -->
<div class="log_four_input">
<div class="log_four_input_title">
地址信息
</div>
<div class="log_four_input_one">
<div class="log_four_input_one_left">
地区
</div>
<div class="log_four_input_one_center">
<div id="city_text">请选择省市区</div>
</div>
<div class="log_four_input_one_right">
<img src="__TMPL__/public/assets/images/29.png" alt="" />
</div>
</div>
<div class="log_four_input_one log_banjis">
<div class="log_four_input_one_left">
学校
</div>
<div class="log_four_input_one_center">
<div class="city_text">请选择学校和班级</div>
</div>
<div class="log_four_input_one_right">
<img src="__TMPL__/public/assets/images/29.png" alt="" />
</div>
</div>
<div class="log_four_input_one">
<div class="log_four_input_one_left">
姓名
</div>
<div class="log_four_input_one_center">
<input type="text" placeholder="请输入姓名" />
</div>
<div class="log_four_input_one_right">
<img src="__TMPL__/public/assets/images/29.png" alt="" />
</div>
</div>
<div class="log_four_input_one">
<div class="log_four_input_one_left">
手机号
</div>
<div class="log_four_input_one_center">
<input type="text" placeholder="输入手机号" maxlength="11"/>
</div>
<div class="log_four_input_one_right" style="opacity: 0;">
<img src="__TMPL__/public/assets/images/29.png" alt="" />
</div>
</div>
</div>
<!-- 订单信息 -->
<div class="log_four_order">
<div class="log_four_order_details">
<div class="log_four_input_title" style="padding-bottom: 0.34rem;">
订单信息
</div>
<div class="log_four_order_details_one">
<volist name="data" id="vo">
<div class="log_four_order_one">
<div class="log_four_order_left">
<img src="{:cmf_get_image_url($vo.thumbnail)}" alt="" />
</div>
<div class="log_four_order_center">
<div class="log_four_order_center_one txt-cut" style="-webkit-line-clamp: 1">
{$vo.book_name}
</div>
<div class="log_four_order_center_two">
×{$vo.number}
</div>
</div>
<div class="log_four_order_right">
<span></span>{$vo.price0}.<span>{$vo.price1}</span>
</div>
</div>
</volist>
</div>
</div>
</div>
<!-- 支付方式 -->
<div class="log_four_pash">
<div class="log_four_pash_top">
<div class="log_four_pash_top_one">
支付方式
</div>
<div class="log_four_pash_top_two">
<img src="__TMPL__/public/assets/images/34.png" alt="" />
</div>
</div>
<div class="log_four_pash_bottom">
<div class="log_four_pash_top_one">
买家留言
</div>
<div class="log_four_pash_bottom_two">
<textarea name="" id="" cols="20" rows="3" placeholder="在此填写您的留言"></textarea>
</div>
</div>
</div>
<!-- 底部按钮 -->
<div class="log_three_list_fixed">
<div class="log_three_fixed_left">
<div class="log_four_zong_qian">合计金额:</div>
<div class="log_four_zong_shu"><span></span>{$money.0}.<span>{$money.1}</span></div>
</div>
<div class="log_three_fixed_right">
立即支付
</div>
</div>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
<script src="__TMPL__/public/assets/js/base.js"></script>
<script src="__TMPL__/public/assets/js/mui.min.js"></script>
<script src="__TMPL__/public/assets/js/mui.picker.min.js"></script>
<script src="__TMPL__/public/assets/js/city.data-3.js"></script>
<script>
/**
*快递配送
*/
function go_courier(){
window.location.href = "{:url('Orderpage/order_salesman_kd')}?indet_id="+{$indent_id};
}
</script>
<script>
$(".log_four_top_right>div").click(function() {
$(this)
.addClass("log_four_top_right_bg")
.css({
border: "none"
})
.siblings()
.removeClass("log_four_top_right_bg");
});
//mui 地址
var city_picker = new mui.PopPicker({
layer: 3
});
city_picker.setData(cityData3);
$("#city_text").on("tap", function() {
setTimeout(function() {
city_picker.show(function(items) {
$("#city_text").text((items[0] || {}).text + "," + (items[1] || {}).text + "," + (items[2] || {}).text); //该ID为接收城市ID字段
$('#city_text').css('color', '#333333');
$("#city_text").html((items[0] || {}).text + " " + (items[1] || {}).text + " " + (items[2] || {}).text);
});
}, 200);
});
//学校/班级弹窗
$(".log_banjis").click(function() {
$(".tx_mask_school").css({
display: "block"
});
});
//tab弹框
$(".three_model_school_tab>div").click(function() {
var tabindex = $(this).index();
$(this).addClass("three_model_school_hover").addClass("word_color").siblings().removeClass("three_model_school_hover").removeClass("word_color");
$('.three_model_school_data').eq(tabindex).css('display', 'block').siblings().css('display', 'none');
});
// tab 大学
var $xuexiao
$(".there_university div").click(function() {
var index = $(this).index();
$(this).addClass("there_unActive").siblings().removeClass("there_unActive");
if($(this).hasClass("there_unActive")) {
console.log($(this).text());
$xuexiao = $(this).text()
$(".there_university").hide();
$(".there_class").show();
$('.three_model_school_left').eq(0).removeClass('word_color').removeClass('three_model_school_hover');
$('.three_model_school_left').eq(1).addClass('word_color').addClass('three_model_school_hover');
}
});
$('.there_class div').click(function() {
console.log($xuexiao)
var index2 = $(this).index();
$(this).addClass("there_unActive").siblings().removeClass("there_unActive");
if($xuexiao == undefined) {
alert('请选择学校')
} else if($(this).hasClass("there_unActive")) {
var banji = $(this).text();
$('.city_text').text($xuexiao + ' ' + "—" + ' ' + banji)
$('.city_text').css('color', '#333333');
$(".tx_mask_school").hide();
}
})
// 关闭弹窗
$(document).mouseup(function(e) {
var _con = $('.tx_maskCon_school');
if(!_con.is(e.target) && _con.has(e.target).length === 0) {
$('.tx_mask_school').hide()
}
})
</script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -143,37 +143,37 @@
</script>
<script>
// 上传图片
//上传图片
$(function() {
$("#img1_file").on("change", function() {
var img_size = $("input[type=file]").get(0).files[0].size;
var img_size = $(this).get(0).files[0].size;
if(img_size > 1024000) {
mask("上传图片过大,请上传小于1M的图片");
alert("上传图片过大,请上传小于1M的图片");
} else {
$.ajaxFileUpload({
url: '/upload/portal/20190521', //用于文件上传的服务器端请求地址
url: "{:url('/')}", //用于文件上传的服务器端请求地址
secureuri: false, //是否需要安全协议,一般设置为false
fileElementId: 'personal-photo', //文件上传域的ID
dataType: 'json', //返回值类型 一般设置为json
success: function(data) { //服务器成功响应处理函数
mask(data.msg);
window.location.href = '/';
console.log(data.msg);
}
});
}
});
$("#img2_file").on("change", function() {
var img_size = $("input[type=file]").get(0).files[0].size;
var img_size = $(this).get(0).files[0].size;
if(img_size > 1024000) {
mask("上传图片过大,请上传小于1M的图片");
alert("上传图片过大,请上传小于1M的图片");
} else {
$.ajaxFileUpload({
url: '/upload/portal/20190521', //用于文件上传的服务器端请求地址
url: '/portal/login/updateAvatar', //用于文件上传的服务器端请求地址
secureuri: false, //是否需要安全协议,一般设置为false
fileElementId: 'personal-photo', //文件上传域的ID
dataType: 'json', //返回值类型 一般设置为json
success: function(data) { //服务器成功响应处理函数
mask(data.msg);
window.location.href = '/';
console.log(data);
}
});
}
... ...
... ... @@ -19,18 +19,19 @@
<div class="log_three_model_one" style="padding-bottom: 0.2rem;">
<div class="log_three_model_left">价钱</div>
<div class="log_three_model_right">
<input style="width: 2rem;" type="text" placeholder="请输入价钱" />
<input style="width: 2rem;" type="text" placeholder="请输入价钱" value="" id="price" />
</div>
<input type="hidden" name="" id="goods_id" value="">
</div>
<div class="log_three_model_one" style="padding-bottom: 0.2rem;">
<div class="log_three_model_left">佣金</div>
<div class="log_three_model_right">
<input style="width: 2rem;" type="text" placeholder="请输入佣金" />
<input style="width: 2rem;" type="text" placeholder="请输入佣金" value="" id="money" />
</div>
</div>
</div>
<!-- 确定 -->
<div class="tx_maskOk">确定</div>
<div class="tx_maskOk" onclick="moneyedit()">确定</div>
</div>
</div>
</div>
... ... @@ -97,7 +98,7 @@
<div class="log_five_handle_img">
<img src="__TMPL__/public/assets/images/84.png" alt="" />
</div>
<div class="log_five_handle_word">
<div class="log_five_handle_word log_five_handle_pay" onclick="cost({$vo.id})">
费用
</div>
</div>
... ... @@ -105,8 +106,13 @@
</div>
</div>
</volist>
</div>
<div class="log_seven_btn log_seven_btn9">
<a href="{:url('/')}">
<div class="log_seven_btn_contant">
新增商品
</div>
</a>
</div>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
<script src="__TMPL__/public/assets/js/base.js"></script>
... ... @@ -131,9 +137,44 @@
}
});
}
/**
*费用
*/
function cost(id){
$.post("{:url('Salesmangoods/goods_cost')}",{goods_id:id},function(data){
arr = JSON.parse(data);
$('#price').val(arr.price);
$('#money').val(arr.money);
$('#goods_id').val(arr.id);
});
}
/**
*费用编辑
*/
function moneyedit(){
price = $('#price').val();
money = $('#money').val();
goods_id = $('#goods_id').val();
if(price == ''){
alert('不能为空');
}else if(money == ''){
alert('不能为空');
}else{
$.post("{:url('Salesmangoods/moneyedit')}",{price:price,money:money,goods_id:goods_id},function(data){
if(data){
}else{
alert('保存失败');
}
});
}
}
</script>
<script>
$(document).on('click','.log_five_list_right',function(){
$(document).on('click', '.log_five_list_right', function() {
if($(this).find("img").attr("src") == "__TMPL__/public/assets/images/shenglve.png") {
$(this).find("img").attr("src", "__TMPL__/public/assets/images/83.png");
$(this).parents('.com').find('.log_five_shanxian').slideToggle();
... ... @@ -143,34 +184,34 @@
}
var $up = $(this).parent('.log_five_list').parent(".com").children('.log_five_shanxian').find('.log_five_handle_up');
$up.click(function(){
$up.click(function() {
console.log(123)
var index = $(this).closest(".com").index();
var txt = $(this).closest(".com").html();
var txt1 = $(this).closest(".com").prev().html();
var prev = $(this).closest(".com").prev();
console.log(txt);
if(index == 0){
if(index == 0) {
alert("已经在最顶端了,不能上移了");
$('.log_five_shanxian').css('display','none');
$('.log_five_shanxian').css('display', 'none');
return false;
}
$(this).closest(".com").html(txt1);
prev.closest(".com").html(txt);
$('.log_five_shanxian').css('display','none');
$('.log_five_shanxian').css('display', 'none');
})
});
// 编辑
$(".log_five_handle_add").click(function() {
$(".log_five_handle_pay").click(function() {
$(".tx_mask").css({
display: "block"
});
});
$(".tx_maskOk").click(function() {
$(".tx_mask").css({
display: "none"
... ...
... ... @@ -39,271 +39,264 @@
<p>添加学校</p>
</div>
</div>
<!-- 地址信息 -->
<div class="log_four_input">
<div class="log_four_input_one">
<div class="log_four_input_one_left">
地区
</div>
<div class="log_four_input_one_center">
<input type="text" placeholder="请选择" id="city_text" />
</div>
<div class="log_four_input_one_right">
<img src="__TMPL__/public/assets/images/29.png" alt="" />
</div>
</div>
<div class="log_four_input_one">
<div class="log_four_input_one_left">
学校
</div>
<div class="log_four_input_one_center">
<input type="text" placeholder="请录入" />
</div>
<div class="log_four_input_one_right">
<img src="__TMPL__/public/assets/images/29.png" alt="" />
</div>
</div>
<div class="log_four_input_one log_four_input_select_type">
<div class="log_four_input_one_left">
类型
<div class="school_ooo">
<!-- 地址信息 -->
<div class="log_four_input">
<div class="log_four_input_one">
<div class="log_four_input_one_left">
地区
</div>
<div class="log_four_input_one_center">
<input type="text" placeholder="请选择" id="city_text" />
</div>
<div class="log_four_input_one_right">
<img src="__TMPL__/public/assets/images/29.png" alt="" />
</div>
</div>
<div class="log_four_input_one_center">
<input type="text" id="four_inp" placeholder="小学" />
<div class="log_four_input_one">
<div class="log_four_input_one_left">
学校
</div>
<div class="log_four_input_one_center">
<input type="text" placeholder="请录入" />
</div>
<div class="log_four_input_one_right">
<img src="__TMPL__/public/assets/images/29.png" alt="" />
</div>
</div>
<div class="log_four_input_one_right log_four_input_select_type">
<img src="__TMPL__/public/assets/images/29.png" alt="" />
<div class="log_four_input_one log_four_input_select_type">
<div class="log_four_input_one_left">
类型
</div>
<div class="log_four_input_one_center">
<input type="text" id="four_inp" placeholder="小学" />
</div>
<div class="log_four_input_one_right log_four_input_select_type">
<img src="__TMPL__/public/assets/images/29.png" alt="" />
</div>
</div>
</div>
</div>
<!-- 选择框 -->
<div class="school">
<div class="log_four_radio">
<div class="log_four_contant">
<div class="log_four_contant_one">
<div class="log_four_contant_left">
<img src="__TMPL__/public/assets/images/73.png" alt="" />
<!-- 选择框 -->
<div class="school">
<div class="log_four_radio">
<div class="log_four_contant">
<div class="log_four_contant_one">
<div class="log_four_contant_left">
<img src="__TMPL__/public/assets/images/73.png" alt="" />
</div>
<div class="log_four_contant_right">小学</div>
</div>
<div class="log_four_contant_right">小学</div>
</div>
<div class="log_four_contant_one">
<div class="log_four_contant_left">
<img src="__TMPL__/public/assets/images/39_0.png" alt="" />
<div class="log_four_contant_one">
<div class="log_four_contant_left">
<img src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<div class="log_four_contant_right">初中</div>
</div>
<div class="log_four_contant_right">初中</div>
</div>
<div class="log_four_contant_one">
<div class="log_four_contant_left">
<img src="__TMPL__/public/assets/images/39_0.png" alt="" />
<div class="log_four_contant_one">
<div class="log_four_contant_left">
<img src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<div class="log_four_contant_right">高中</div>
</div>
<div class="log_four_contant_right">高中</div>
</div>
</div>
</div>
<div class="log_eight_school_class">
<div class="log_four_radios">
<div class="log_four_contants">
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/73.png" alt="" />
</div>
<div class="log_four_contants_right">一年级</div>
</div>
<div class="log_four_contants_input_block" style="display: block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" id="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_eight_school_class">
<div class="log_four_radios">
<div class="log_four_contants">
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/73.png" alt="" />
</div>
<input type="hidden" value="0" class="grade" id="grade1">
<div class="log_four_contants_right">一年级</div>
</div>
<div class="log_four_contants_input_block" style="display: block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
<!--<div class="log_four_li">
<ul>
<li>小一班</li>
<li>小二班</li>
</ul>
</div>-->
</div>
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
<!--<div class="log_four_li2">
<ul>
<li>小一班</li>
<li>小二班</li>
</ul>
</div>-->
</div>
</div>
</div>
</div>
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<div class="log_four_contants_right">
二年级
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<input type="hidden" value="0" class="grade" id="grade2">
<div class="log_four_contants_right">
二年级
</div>
</div>
</div>
<div class="log_four_contants_input_block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" id="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_contants_input_block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<div class="log_four_contants_right">
三年级
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<input type="hidden" value="0" class="grade" id="grade3">
<div class="log_four_contants_right">
三年级
</div>
</div>
</div>
<div class="log_four_contants_input_block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" id="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_contants_input_block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<div class="log_four_contants_right">
四年级
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<div class="log_four_contants_right">
四年级
</div>
</div>
</div>
<div class="log_four_contants_input_block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" id="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_contants_input_block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<div class="log_four_contants_right">
五年级
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<div class="log_four_contants_right">
五年级
</div>
</div>
</div>
<div class="log_four_contants_input_block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" id="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_contants_input_block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<div class="log_four_contants_right">
六年级
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<div class="log_four_contants_right">
六年级
</div>
</div>
</div>
<div class="log_four_contants_input_block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" id="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_contants_input_block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
... ... @@ -311,202 +304,202 @@
</div>
</div>
</div>
</div>
<div class="log_four_radios" style="display: none">
<div class="log_four_contants">
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/73.png" alt="" />
<div class="log_four_radios" style="display: none">
<div class="log_four_contants">
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/73.png" alt="" />
</div>
<div class="log_four_contants_right">初一</div>
</div>
<div class="log_four_contants_right">初一</div>
</div>
<div class="log_four_contants_input_block" style="display: block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" id="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_contants_input_block" style="display: block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<div class="log_four_contants_right">
初二
<div class=" log_four_contant_ones" data-id="初二">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<div class="log_four_contants_right">
初二
</div>
</div>
</div>
<div class="log_four_contants_input_block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" id="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_contants_input_block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<div class="log_four_contants_right">
初三
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<div class="log_four_contants_right">
初三
</div>
</div>
</div>
<div class="log_four_contants_input_block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" id="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_contants_input_block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="log_four_radios" style="display: none">
<div class="log_four_contants">
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/73.png" alt="" />
<div class="log_four_radios" style="display: none">
<div class="log_four_contants">
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/73.png" alt="" />
</div>
<div class="log_four_contants_right">高一</div>
</div>
<div class="log_four_contants_right">高一</div>
</div>
<div class="log_four_contants_input_block" style="display: block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" id="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_contants_input_block" style="display: block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<div class="log_four_contants_right">
高二
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<div class="log_four_contants_right">
高二
</div>
</div>
</div>
<div class="log_four_contants_input_block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" id="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_contants_input_block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<div class="log_four_contants_right">
高三
<div class=" log_four_contant_ones">
<div class="log_botms">
<div class="log_four_contants_left">
<img class="log_Img9" src="__TMPL__/public/assets/images/39_0.png" alt="" />
</div>
<div class="log_four_contants_right">
高三
</div>
</div>
</div>
<div class="log_four_contants_input_block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" id="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_contants_input_block">
<div class="log_four_contants_input ">
<div class="log_four_ooo">
<div class="log_four_xian_ban">
<div class="log_four_xian_nei"><input type="text" placeholder="选择班级" name="" value="" /></div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
<div class="log_four_xian_wife">——</div>
<div class="log_four_ooo">
<div class="log_four_xian_ban2">
<div class="log_four_xian_nei">
<input type="text" placeholder=" 选择班级" />
</div>
<div class="log_four_xian_icon">
<img src="__TMPL__/public/assets/images/down.png" alt="" />
</div>
</div>
</div>
</div>
... ... @@ -516,6 +509,7 @@
</div>
</div>
</div>
</div>
<!-- 按钮 -->
<div class="log_seven_btn">
... ... @@ -553,6 +547,7 @@
$(".log_four_contant_one").each(function() {
$(this).click(function() {
console.log(333334354);
var index = $(this).index();
console.log(index);
// $(".log_four_radios").eq(idnex).addClass("log_ten_block").siblings().removeClass("log_ten_block")
... ... @@ -574,12 +569,38 @@
$('.log_four_radios').each(function(){
var index = $(this).index();
console.log(index);
$(this).find('.log_four_contant_ones').click(function(){
$(this).find('.log_Img9').attr("src", "__TMPL__/public/assets/images/73.png").parents(".log_four_contant_ones").siblings().find(".log_Img9").attr("src", "__TMPL__/public/assets/images/39_0.png");
$(this).find('.log_four_contants_input_block').slideDown().parents(".log_four_contant_ones").siblings().find(".log_four_contants_input_block").slideUp();
})
$(this).find('.log_botms').click(function(){
if($(this).find('.log_Img9').attr("src") == '__TMPL__/public/assets/images/39_0.png'){
$(this).find('.log_Img9').attr("src", "__TMPL__/public/assets/images/73.png");
$(this).next('.log_four_contants_input_block').slideDown();
}else{
$(this).find('.log_Img9').attr("src", '__TMPL__/public/assets/images/39_0.png');
$(this).next('.log_four_contants_input_block').slideUp();
}
});
})
$(".log_four_contant_ones").each(function(){
var $startinput;
var $endinput;
var cc;
$(this).find(".log_four_xian_ban input").blur(function(){
$startinput = $(this).val();
})
$(this).find(".log_four_xian_ban2 input").blur(function(){
$endinput = $(this).val();
cc = $startinput + $endinput;
console.log(cc);
// $(this).closest("school_ooo").find("#four_inp").attr("placeholder","$startinput+"-"+$endinput")
// var content = $startinput +
})
})
//添加地址
var city_picker = new mui.PopPicker({
layer: 3
... ...
... ... @@ -35,7 +35,7 @@
</div>
<div class="order_newsTxt2">×<span>{$vo.book_num}</span></div>
<div class="order_newsTxt3">
<p class="de_topTxt1_1"><span>{$vo.price0}</span>.{$vo.price1}</p>
<p class="de_topTxt1_1"><span>{$vo.price0}.{$vo.price1}</span></p>
<div class="order_newsNum">
<div class="order_newsJian" onclick="jian({$vo.carid})">-</div>
<input class="order_newsnum" type="text" readonly="readonly" value="{$vo.book_num}" />
... ... @@ -143,13 +143,17 @@
goods_id = goods_id.join(',');
myprice = $('#myprice').text();
$.post("{:url('Shopcart/shop_cart_pay')}",{id:goods_id,myprice:myprice},function(data){
if(data){
}else{
obj = JSON.parse(data);
if(obj.type == 3){
alert('业务员商品和平台商品不能同时购买!');
}else if(obj.type == 1){
window.location.href = "{:url('Orderpage/order_page')}?indet_id="+obj.indet_id;
}else if(obj.type == 2){
window.location.href = "{:url('Orderpage/order_salesman_ty')}?indet_id="+obj.indet_id;
}
});
/*window.location.href = "{:url('Orderpage/order_page')}";*/
}
}
... ... @@ -227,7 +231,7 @@
$(this).parents(".order_newsCon").find(".order_newsTxt2 span").text(count);
}
var price = parseFloat($(this).parents(".order_newsTxt3").children(".de_topTxt1_1").text().split("¥")[1]);
calcTotal2();
calcTotal();
});
// 单选
$(".sh_cartround img").each(function() {
... ...
... ... @@ -921,7 +921,7 @@
}
.log_four_top_right_bg {
background-image: url(../img/71.png);
background-image: url(../images/71.png);
background-size: 100% 100%;
background-repeat: no-repeat;
color: #F20000
... ...
... ... @@ -204,6 +204,8 @@ class WeChatBaseController extends BaseController
*/
public function checkWeChatUserLogin()
{
$user = Db::name('user')->where('id',2)->find();
cmf_update_current_user($user);
$userId = cmf_get_current_user_id();
if (empty($userId)) {
$config = [
... ...