Browse Source

js日期控件

master
林一峰 7 years ago
parent
commit
77e537573c
  1. 118
      app/Http/Model/Cart.php
  2. 2
      app/Http/Model/Goods.php
  3. BIN
      public/js/My97DatePicker.zip
  4. 58
      public/js/My97DatePicker/WdatePicker.js
  5. 5
      public/js/My97DatePicker/calendar.js
  6. 126
      public/js/My97DatePicker/demo.htm
  7. 14
      public/js/My97DatePicker/lang/en.js
  8. 14
      public/js/My97DatePicker/lang/zh-cn.js
  9. 14
      public/js/My97DatePicker/lang/zh-tw.js
  10. 11
      public/js/My97DatePicker/skin/WdatePicker.css
  11. BIN
      public/js/My97DatePicker/skin/datePicker.gif
  12. 246
      public/js/My97DatePicker/skin/default/datepicker.css
  13. BIN
      public/js/My97DatePicker/skin/default/img.gif
  14. BIN
      public/js/My97DatePicker/skin/whyGreen/bg.jpg
  15. 256
      public/js/My97DatePicker/skin/whyGreen/datepicker.css
  16. BIN
      public/js/My97DatePicker/skin/whyGreen/img.gif
  17. 5
      resources/views/admin/goods/add.blade.php
  18. 5
      routes/web.php

118
app/Http/Model/Cart.php

@ -30,7 +30,12 @@ class Cart extends BaseModel
*/
//protected $connection = 'connection-name';
const STATUS = 0; //商品是否删除,0未删除
//购物车商品类型
const CART_GENERAL_GOODS = 0; // 普通商品
const CART_GROUP_BUY_GOODS = 1; // 团购商品
const CART_AUCTION_GOODS = 2; // 拍卖商品
const CART_SNATCH_GOODS = 3; // 夺宝奇兵
const CART_EXCHANGE_GOODS = 4; // 积分商城
//获取列表
public static function getList($uid)
@ -60,15 +65,45 @@ class Cart extends BaseModel
return $goods->toArray();
}
/**
* 添加商品到购物车
*
* @access public
* @param integer $goods_id 商品编号
* @param integer $num 商品数量
* @param json $property 规格值对应的id json数组
* @return boolean
*/
public static function cartAdd(array $attributes)
{
extract($attributes);
//获取商品信息
$good = Goods::where(['goods_id' => $goods_id, 'status' => 0])->first();
if (!$good)
{
return '商品不存在';
}
if (isset($property) && json_decode($property,true))
{
$property = json_decode($property,true);
}
else
{
$property = [];
}
}
public static function getOne($id)
{
if(isset($status)){$where['status'] = $status;}else{$where['status'] = self::STATUS;}
$where['id'] = $id;
$goods = self::where($where)->first()->toArray();
$goods['price'] = get_final_price($id);
return $goods;
}
@ -104,69 +139,34 @@ class Cart extends BaseModel
}
/**
* 取得商品最终使用价格
*
* @param string $goods_id 商品编号
* @param string $goods_num 购买数量
*
* @return 商品最终购买价格
* 清空购物车
*
* @param int $type 类型:默认普通商品
*/
public static function get_final_price($goods_id)
public static function clearCart($user_id)
{
$final_price = '0'; //商品最终购买价格
$promote_price = '0'; //商品促销价格
$user_price = '0'; //商品会员价格,预留
//取得商品促销价格列表
$goods = Goods::where('id',$goods_id)->where('status',0)->first(['promote_price','promote_start_date','promote_end_date','price']);
$final_price = $goods->price;
// 计算商品的促销价格
if ($goods->promote_price > 0)
{
$promote_price = self::bargain_price($goods->promote_price, $goods->promote_start_date, $goods->promote_end_date);
}
else
{
$promote_price = 0;
}
self::where('user_id',$user_id)->delete();
return true;
}
//购物车总价格
public static function TotalPrice($user_id)
{
$goods = self::where('user_id',$user_id)->get();
$total = 0;
if ($promote_price != 0)
foreach ($goods as $k => $v)
{
$final_price = $promote_price;
$total += ($v['goods_number'] * $v['goods_price']);
}
//返回商品最终购买价格
return $final_price;
return (float)$total;
}
/**
* 判断某个商品是否正在特价促销期
*
* @access public
* @param float $price 促销价格
* @param string $start 促销开始日期
* @param string $end 促销结束日期
* @return float 如果还在促销期则返回促销价,否则返回0
*/
public static function bargain_price($price, $start, $end)
//购物车商品总数量
public static function TotalGoodsCount($user_id)
{
if ($price == 0)
{
return 0;
}
else
{
$time = time();
if ($time >= $start && $time <= $end)
{
return $price;
}
else
{
return 0;
}
}
return self::where('user_id',$user_id)->sum('goods_number');
}
}

2
app/Http/Model/Goods.php

@ -114,7 +114,7 @@ class Goods extends BaseModel
$goods = self::where($where)->first()->toArray();
$goods['price'] = get_final_price($id);
$goods['price'] = self::get_final_price($id);
return $goods;
}

BIN
public/js/My97DatePicker.zip

Binary file not shown.

58
public/js/My97DatePicker/WdatePicker.js
File diff suppressed because it is too large
View File

5
public/js/My97DatePicker/calendar.js
File diff suppressed because it is too large
View File

126
public/js/My97DatePicker/demo.htm

@ -0,0 +1,126 @@
<script language="javascript" type="text/javascript" src="WdatePicker.js"></script>
<input class="Wdate" type="text" onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm:ss'})"> <font color=red>&lt;- 点我弹出日期控件</font>
<br>注意:默认情况下,不含时分秒时,单击选择日期, 含有有时分秒时,需要点击2次才可以选择日期<br>
autoPickDate参数设置为true时,无论日期中是否有时分秒,强制为点击一次即返回日期
<br><br><br><br>
更多demo请访问官方主页 <a href="http://www.my97.net">http://www.my97.net</a>
<br><br>
<h1>请务必仔细阅读下面的文字</h1><br>
<pre>
注意:此版本为 4.8 Release build 20170803
更新内容:
[新增]单日时间段限制 点击查看示例
[新增]preload预载选项
[新增]时分秒选择菜单的定制功能,详见hmsMenuCfg属性
[新增]$dp.unbind函数,允许用户手动接触日期控件绑定
[增强]验证功能可被关闭errDealMode=-1
[增强]增强了对日期格式的容错性
[修改]调整周算法模式,新增weekMethod属性,默认模式同MSExcel
[修改]去除My97DatePicker.htm
[修改]position改成相对坐标(原来为绝对坐标)
[恢复]$dpPath属性,用于解决有base标签极端情况下的问题
[修正]strict模式下,日期控件无法工作的问题
[修正]跨域错误提示没有权限的问题
[修正]opposite情况下正则表达式日期限制问题
[修正]无法动态绑定多个日期格式的问题
[修正]onchange事件被触发2次的问题
[修正]startDate不能初始化时间的问题
[修正]两个日期框焦点混淆的问题
[修正]onchange不能触发的问题
[修正]输入日期后回车自动变为当前日期的问题
[修正]兼容最新Safari,Opera,chrome等浏览器
[修正]&lt;script&gt;空标签时的错误
[修正]平面模式下的几个偶发问题
[修正]双月日历下跨年选择出错的问题
[修正]IE下与某些dialogUI组件冲突的问题
使用方法:
1. 去官方网站看看,你当前下载的是否是最新的版本,很多bug都是因为使用的不是最新版本造成的
官方主页:<a href="http://www.my97.net" target="_blank">http://www.my97.net</a>
2. 将My97DatePicker整个目录包,放入您的项目的相应目录下
My97DatePicker目录下各文件的作用:
1.1 My97DatePicker目录是一个整体,不可破坏里面的目录结构,也不可对里面的文件改名,可以改目录名
1.2 各目录及文件的用途:
WdatePicker.js 配置文件,在调用的地方仅需使用该文件,可多个共存,以xx_WdatePicker.js方式命名
calendar.js 日期库主文件,无需引入
目录lang 存放语言文件,你可以根据需要清理或添加语言文件
目录skin 存放皮肤的相关文件,你可以根据需要清理或添加皮肤文件包
3. 您可以根据您自己的需要,删除不必要的皮肤和语言文件
4. 您可以根据您自己的需要,添加新的皮肤包
皮肤中心地址:<a href="http://www.my97.net/skin.asp" target="_blank">http://www.my97.net/skin.asp</a>
5. 详细阅读在线演示和使用说明,大部分问题都可以通过这里解决,请细看
在线演示:<a href="http://www.my97.net/demo/" target="_blank">http://www.my97.net/demo/</a>
6. 如果遇到无法解决的问题
请先参考:<a href="http://www.my97.net/support.asp" target="_blank">http://www.my97.net/support.asp</a>
7. 如果遇到问题,而技术支持页面无法解决的
您可以通过技术支持页面中提供的联系方式联系我,注意:问问题时,一定要附上相关的HTML代码和详细的错误信息
8. 您有什么意见或建议,你可以通过技术支持页面中提供的联系方式联系我
9. 如果您对日期控件的许可协议有兴趣,您可以访问:<a href="http://www.my97.net/license.asp">http://www.my97.net/license.asp</a>
10.最后祝大家项目顺利,月月加薪!
---------------------------------------------------------------------
官方主页
<a href="http://www.my97.net" target="_blank">http://www.my97.net</a>
在线演示和使用说明
<a href="http://www.my97.net/demo/" target="_blank">http://www.my97.net/demo/</a>
皮肤中心:
<a href="http://www.my97.net/skin.asp" target="_blank">http://www.my97.net/skin.asp</a>
源代码:
<a href="http://www.my97.net/source.asp" target="_blank">http://www.my97.net/source.asp</a>
技术支持页面
<a href="http://www.my97.net/support.asp" target="_blank">http://www.my97.net/support.asp</a></pre>

14
public/js/My97DatePicker/lang/en.js

@ -0,0 +1,14 @@
var $lang={
errAlertMsg: "Invalid date or the date out of range,redo or not?",
aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
aLongWeekStr:["wk","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],
aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
aLongMonStr: ["January","February","March","April","May","June","July","August","September","October","November","December"],
clearStr: "Clear",
todayStr: "Today",
okStr: "OK",
updateStr: "OK",
timeStr: "Time",
quickStr: "Quick Selection",
err_1: 'MinDate Cannot be bigger than MaxDate!'
}

14
public/js/My97DatePicker/lang/zh-cn.js

@ -0,0 +1,14 @@
var $lang={
errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u8303\u56F4,\u9700\u8981\u64A4\u9500\u5417?",
aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],
aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],
aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"],
aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],
clearStr: "\u6E05\u7A7A",
todayStr: "\u4ECA\u5929",
okStr: "\u786E\u5B9A",
updateStr: "\u786E\u5B9A",
timeStr: "\u65F6\u95F4",
quickStr: "\u5FEB\u901F\u9009\u62E9",
err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u4E8E\u6700\u5927\u65E5\u671F!'
}

14
public/js/My97DatePicker/lang/zh-tw.js

@ -0,0 +1,14 @@
var $lang={
errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u7BC4\u570D,\u9700\u8981\u64A4\u92B7\u55CE?",
aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],
aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],
aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"],
aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],
clearStr: "\u6E05\u7A7A",
todayStr: "\u4ECA\u5929",
okStr: "\u78BA\u5B9A",
updateStr: "\u78BA\u5B9A",
timeStr: "\u6642\u9593",
quickStr: "\u5FEB\u901F\u9078\u64C7",
err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u65BC\u6700\u5927\u65E5\u671F!'
}

11
public/js/My97DatePicker/skin/WdatePicker.css

@ -0,0 +1,11 @@
.Wdate{
border:#999 1px solid;
height:20px;
background:#fff url(datePicker.gif) no-repeat right;
}
.Wdate::-ms-clear{display:none;}
.WdateFmtErr{
font-weight:bold;
color:red;
}

BIN
public/js/My97DatePicker/skin/datePicker.gif

Binary file not shown.

After

Width: 16  |  Height: 22  |  Size: 1.0 KiB

246
public/js/My97DatePicker/skin/default/datepicker.css

@ -0,0 +1,246 @@
/*
* My97 DatePicker 4.8
*/
.WdateDiv{
width:180px;
background-color:#FFFFFF;
border:#bbb 1px solid;
padding:2px;
}
.WdateDiv2{
width:360px;
}
.WdateDiv *{font-size:9pt;}
.WdateDiv .NavImg a{
display:block;
cursor:pointer;
height:16px;
width:16px;
}
.WdateDiv .NavImgll a{
float:left;
background:transparent url(img.gif) no-repeat scroll 0 0;
}
.WdateDiv .NavImgl a{
float:left;
background:transparent url(img.gif) no-repeat scroll -16px 0;
}
.WdateDiv .NavImgr a{
float:right;
background:transparent url(img.gif) no-repeat scroll -32px 0;
}
.WdateDiv .NavImgrr a{
float:right;
background:transparent url(img.gif) no-repeat scroll -48px 0;
}
.WdateDiv #dpTitle{
height:24px;
margin-bottom:2px;
padding:1px;
}
.WdateDiv .yminput{
margin-top:2px;
text-align:center;
height:20px;
border:0px;
width:50px;
cursor:pointer;
}
.WdateDiv .yminputfocus{
margin-top:2px;
text-align:center;
font-weight:bold;
height:20px;
color:blue;
border:#ccc 1px solid;
width:50px;
}
.WdateDiv .menuSel{
z-index:1;
position:absolute;
background-color:#FFFFFF;
border:#ccc 1px solid;
display:none;
}
.WdateDiv .menu{
cursor:pointer;
background-color:#fff;
}
.WdateDiv .menuOn{
cursor:pointer;
background-color:#BEEBEE;
}
.WdateDiv .invalidMenu{
color:#aaa;
}
.WdateDiv .YMenu{
margin-top:20px;
}
.WdateDiv .MMenu{
margin-top:20px;
*width:62px;
}
.WdateDiv .hhMenu{
margin-top:-90px;
margin-left:26px;
}
.WdateDiv .mmMenu{
margin-top:-46px;
margin-left:26px;
}
.WdateDiv .ssMenu{
margin-top:-24px;
margin-left:26px;
}
.WdateDiv .Wweek {
text-align:center;
background:#DAF3F5;
border-right:#BDEBEE 1px solid;
}
.WdateDiv .MTitle{
background-color:#BDEBEE;
}
.WdateDiv .WdayTable2{
border-collapse:collapse;
border:#c5d9e8 1px solid;
}
.WdateDiv .WdayTable2 table{
border:0;
}
.WdateDiv .WdayTable{
line-height:20px;
border:#c5d9e8 1px solid;
}
.WdateDiv .WdayTable td{
text-align:center;
}
.WdateDiv .Wday{
cursor:pointer;
}
.WdateDiv .WdayOn{
cursor:pointer;
background-color:#C0EBEF;
}
.WdateDiv .Wwday{
cursor:pointer;
color:#FF2F2F;
}
.WdateDiv .WwdayOn{
cursor:pointer;
color:#000;
background-color:#C0EBEF;
}
.WdateDiv .Wtoday{
cursor:pointer;
color:blue;
}
.WdateDiv .Wselday{
background-color:#A9E4E9;
}
.WdateDiv .WspecialDay{
background-color:#66F4DF;
}
.WdateDiv .WotherDay{
cursor:pointer;
color:#6A6AFF;
}
.WdateDiv .WotherDayOn{
cursor:pointer;
background-color:#C0EBEF;
}
.WdateDiv .WinvalidDay{
color:#aaa;
}
.WdateDiv #dpTime{
float:left;
margin-top:3px;
margin-right:30px;
}
.WdateDiv #dpTime #dpTimeStr{
margin-left:1px;
}
.WdateDiv #dpTime input{
width:18px;
height:20px;
text-align:center;
border:#ccc 1px solid;
}
.WdateDiv #dpTime .tB{
border-right:0px;
}
.WdateDiv #dpTime .tE{
border-left:0;
border-right:0;
}
.WdateDiv #dpTime .tm{
width:7px;
border-left:0;
border-right:0;
}
.WdateDiv #dpTime #dpTimeUp{
height:10px;
width:13px;
border:0px;
background:url(img.gif) no-repeat -32px -16px;
}
.WdateDiv #dpTime #dpTimeDown{
height:10px;
width:13px;
border:0px;
background:url(img.gif) no-repeat -48px -16px;
}
.WdateDiv #dpQS {
float:left;
margin-right:3px;
margin-top:3px;
background:url(img.gif) no-repeat 0px -16px;
width:20px;
height:20px;
cursor:pointer;
}
.WdateDiv #dpControl {
text-align:right;
}
.WdateDiv .dpButton{
height:20px;
width:45px;
border:#ccc 1px solid;
margin-top:2px;
margin-right:1px;
}

BIN
public/js/My97DatePicker/skin/default/img.gif

Binary file not shown.

After

Width: 64  |  Height: 36  |  Size: 1.5 KiB

BIN
public/js/My97DatePicker/skin/whyGreen/bg.jpg

Binary file not shown.

After

Width: 1  |  Height: 24  |  Size: 307 B

256
public/js/My97DatePicker/skin/whyGreen/datepicker.css

@ -0,0 +1,256 @@
/*
* My97 DatePicker 4.8 Skin:whyGreen
*/
.WdateDiv{
width:180px;
background-color:#fff;
border:#C5E1E4 1px solid;
padding:2px;
}
.WdateDiv2{
width:360px;
}
.WdateDiv *{font-size:9pt;}
.WdateDiv .NavImg a{
cursor:pointer;
display:block;
width:16px;
height:16px;
margin-top:1px;
}
.WdateDiv .NavImgll a{
float:left;
background:url(img.gif) no-repeat;
}
.WdateDiv .NavImgl a{
float:left;
background:url(img.gif) no-repeat -16px 0px;
}
.WdateDiv .NavImgr a{
float:right;
background:url(img.gif) no-repeat -32px 0px;
}
.WdateDiv .NavImgrr a{
float:right;
background:url(img.gif) no-repeat -48px 0px;
}
.WdateDiv #dpTitle{
height:24px;
padding:1px;
border:#c5d9e8 1px solid;
background:url(bg.jpg);
margin-bottom:2px;
}
.WdateDiv .yminput{
margin-top:2px;
text-align:center;
border:0px;
height:20px;
width:50px;
color:#034c50;
background-color:transparent;
cursor:pointer;
}
.WdateDiv .yminputfocus{
margin-top:2px;
text-align:center;
border:#939393 1px solid;
font-weight:bold;
color:#034c50;
height:20px;
width:50px;
}
.WdateDiv .menuSel{
z-index:1;
position:absolute;
background-color:#FFFFFF;
border:#A3C6C8 1px solid;
display:none;
}
.WdateDiv .menu{
cursor:pointer;
background-color:#fff;
color:#11777C;
}
.WdateDiv .menuOn{
cursor:pointer;
background-color:#BEEBEE;
}
.WdateDiv .invalidMenu{
color:#aaa;
}
.WdateDiv .YMenu{
margin-top:20px;
}
.WdateDiv .MMenu{
margin-top:20px;
*width:62px;
}
.WdateDiv .hhMenu{
margin-top:-90px;
margin-left:26px;
}
.WdateDiv .mmMenu{
margin-top:-46px;
margin-left:26px;
}
.WdateDiv .ssMenu{
margin-top:-24px;
margin-left:26px;
}
.WdateDiv .Wweek {
text-align:center;
background:#DAF3F5;
border-right:#BDEBEE 1px solid;
}
.WdateDiv .MTitle{
color:#13777e;
background-color:#bdebee;
}
.WdateDiv .WdayTable2{
border-collapse:collapse;
border:#BEE9F0 1px solid;
}
.WdateDiv .WdayTable2 table{
border:0;
}
.WdateDiv .WdayTable{
line-height:20px;
color:#13777e;
background-color:#edfbfb;
border:#BEE9F0 1px solid;
}
.WdateDiv .WdayTable td{
text-align:center;
}
.WdateDiv .Wday{
cursor:pointer;
}
.WdateDiv .WdayOn{
cursor:pointer;
background-color:#74d2d9 ;
}
.WdateDiv .Wwday{
cursor:pointer;
color:#ab1e1e;
}
.WdateDiv .WwdayOn{
cursor:pointer;
background-color:#74d2d9;
}
.WdateDiv .Wtoday{
cursor:pointer;
color:blue;
}
.WdateDiv .Wselday{
background-color:#A7E2E7;
}
.WdateDiv .WspecialDay{
background-color:#66F4DF;
}
.WdateDiv .WotherDay{
cursor:pointer;
color:#0099CC;
}
.WdateDiv .WotherDayOn{
cursor:pointer;
background-color:#C0EBEF;
}
.WdateDiv .WinvalidDay{
color:#aaa;
}
.WdateDiv #dpTime{
float:left;
margin-top:3px;
margin-right:30px;
}
.WdateDiv #dpTime #dpTimeStr{
margin-left:1px;
color:#497F7F;
}
.WdateDiv #dpTime input{
height:20px;
width:18px;
text-align:center;
color:#333;
border:#61CAD0 1px solid;
}
.WdateDiv #dpTime .tB{
border-right:0px;
}
.WdateDiv #dpTime .tE{
border-left:0;
border-right:0;
}
.WdateDiv #dpTime .tm{
width:7px;
border-left:0;
border-right:0;
}
.WdateDiv #dpTime #dpTimeUp{
height:10px;
width:13px;
border:0px;
background:url(img.gif) no-repeat -32px -16px;
}
.WdateDiv #dpTime #dpTimeDown{
height:10px;
width:13px;
border:0px;
background:url(img.gif) no-repeat -48px -16px;
}
.WdateDiv #dpQS {
float:left;
margin-right:3px;
margin-top:3px;
background:url(img.gif) no-repeat 0px -16px;
width:20px;
height:20px;
cursor:pointer;
}
.WdateDiv #dpControl {
text-align:right;
margin-top:3px;
}
.WdateDiv .dpButton{
height:20px;
width:45px;
margin-top:2px;
border:#38B1B9 1px solid;
background-color:#CFEBEE;
color:#08575B;
}

BIN
public/js/My97DatePicker/skin/whyGreen/img.gif

Binary file not shown.

After

Width: 64  |  Height: 36  |  Size: 1.6 KiB

5
resources/views/admin/goods/add.blade.php

@ -2,6 +2,7 @@
@section('title', '商品添加')
@section('content')
<script language="javascript" type="text/javascript" src="http://<?php echo env('APP_DOMAIN'); ?>/js/My97DatePicker/WdatePicker.js"></script>
<h5 class="sub-header"><a href="/fladmin/goods">商品列表</a> > 添加商品</h5>
<form id="addarc" method="post" action="/fladmin/goods/doadd" role="form" enctype="multipart/form-data" class="table-responsive">{{ csrf_field() }}
@ -26,6 +27,10 @@
<input type="radio" value='1' name="status" />&nbsp;
</td>
</tr>
<tr>
<td align="right">活动价:</td>
<td colspan="2"><input name="promote_price" type="text" id="promote_price" style="width:80px" value="">&nbsp;&nbsp; 活动开始日期:<input name="promote_start_date" onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" id="promote_start_date" style="width:180px" value="">&nbsp;&nbsp; 活动结束日期:<input name="promote_end_date" onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" id="promote_end_date" style="width:180px" value=""></td>
</tr>
<tr>
<td align="right">推荐:</td>
<td>

5
routes/web.php

@ -210,7 +210,10 @@ Route::group(['prefix' => 'dataapi', 'namespace' => 'Api', 'middleware' => ['web
//订单
//购物车
Route::get('/cart_list', 'CartController@cartList'); //购物车列表
Route::post('/cart_clear', 'CartController@cartClear'); //清空购物车
Route::post('/cart_add', 'CartController@cartAdd'); //添加购物车
Route::post('/cart_update', 'CartController@cartUpdate'); //修改购物车
//分销
//积分

Loading…
Cancel
Save