diff --git a/app/Http/Model/Cart.php b/app/Http/Model/Cart.php index 7900294..6f521f2 100644 --- a/app/Http/Model/Cart.php +++ b/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'); } } \ No newline at end of file diff --git a/app/Http/Model/Goods.php b/app/Http/Model/Goods.php index 322814c..2967037 100644 --- a/app/Http/Model/Goods.php +++ b/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; } diff --git a/public/js/My97DatePicker.zip b/public/js/My97DatePicker.zip new file mode 100644 index 0000000..107e5ab Binary files /dev/null and b/public/js/My97DatePicker.zip differ diff --git a/public/js/My97DatePicker/WdatePicker.js b/public/js/My97DatePicker/WdatePicker.js new file mode 100644 index 0000000..f5e200e --- /dev/null +++ b/public/js/My97DatePicker/WdatePicker.js @@ -0,0 +1,58 @@ +/* + * My97 DatePicker 4.8 + * License: http://www.my97.net/license.asp + */ +var $dp,WdatePicker;(function(){var l={ +$langList:[ +{name:"en",charset:"UTF-8"}, +{name:"zh-cn",charset:"gb2312"}, +{name:"zh-tw",charset:"GBK"} +], +$skinList:[ +{name:"default",charset:"gb2312"}, +{name:"whyGreen",charset:"gb2312"}, +{name:"blue",charset:"gb2312"}, +{name:"green",charset:"gb2312"}, +{name:"simple",charset:"gb2312"}, +{name:"ext",charset:"gb2312"}, +{name:"blueFresh",charset:"gb2312"}, +{name:"twoer",charset:"gb2312"}, +{name:"YcloudRed",charset:"gb2312"}], +$wdate:true, +$crossFrame:false, +$preLoad:false, +$dpPath:"", +doubleCalendar:false, +enableKeyboard:true, +enableInputMask:true, +autoUpdateOnChanged:null, +weekMethod:"MSExcel", +position:{}, +lang:"auto", +skin:"default", +dateFmt:"yyyy-MM-dd", +realDateFmt:"yyyy-MM-dd", +realTimeFmt:"HH:mm:ss", +realFullFmt:"%Date %Time", +minDate:"0001-01-01 00:00:00", +maxDate:"9999-12-31 23:59:59", +minTime:"00:00:00", +maxTime:"23:59:59", +startDate:"", +alwaysUseStartDate:false, +yearOffset:1911, +firstDayOfWeek:0, +isShowWeek:false, +highLineWeekDay:true, +isShowClear:true, +isShowToday:true, +isShowOK:true, +isShowOthers:true, +readOnly:false, +errDealMode:0, +autoPickDate:null, +qsEnabled:true, +autoShowQS:false, +hmsMenuCfg:{H:[1,6],m:[5,6],s:[15,4]}, + +opposite:false,specialDates:null,specialDays:null,disabledDates:null,disabledDays:null,onpicking:null,onpicked:null,onclearing:null,oncleared:null,ychanging:null,ychanged:null,Mchanging:null,Mchanged:null,dchanging:null,dchanged:null,Hchanging:null,Hchanged:null,mchanging:null,mchanged:null,schanging:null,schanged:null,eCont:null,vel:null,elProp:"",errMsg:"",quickSel:[],has:{},getRealLang:function(){var d=l.$langList;for(var e=0;e0?1:0;var K=new Date(this.dt.y,this.dt.M,0).getDate();this.dt.d=Math.min(K+M,this.dt.d)}}}}if(this.dt.refresh()){return this.dt}}return""},show:function(){var K=E[z].getElementsByTagName("div"),J=100000;for(var e=0;eJ){J=L}}this.dd.style.zIndex=J+2;r(this.dd,"block");r(this.dd.firstChild,"")},unbind:function(e){e=this.$(e);if(e.initcfg){t(e,"onclick",function(){g(e.initcfg)});t(e,"onfocus",function(){g(e.initcfg)})}},hide:function(){r(this.dd,"none")},attachEvent:k};for(var d in w){E.$dp[d]=w[d]}$dp=E.$dp}function k(I,J,w,d){if(I.addEventListener){var e=J.replace(/on/,"");w._ieEmuEventHandler=function(K){return w(K)};I.addEventListener(e,w._ieEmuEventHandler,d)}else{I.attachEvent(J,w)}}function t(w,I,e){if(w.removeEventListener){var d=I.replace(/on/,"");e._ieEmuEventHandler=function(J){return e(J)};w.removeEventListener(d,e._ieEmuEventHandler,false)}else{w.detachEvent(I,e)}}function C(w,e,d){if(typeof w!=typeof e){return false}if(typeof w=="object"){if(!d){for(var I in w){if(typeof e[I]=="undefined"){return false}if(!C(w[I],e[I],true)){return false}}}return true}else{if(typeof w=="function"&&typeof e=="function"){return w.toString()==e.toString()}else{return w==e}}}function q(){var I,w,d=n[z][H]("script");for(var e=0;e0){I=I.substring(0,w+1)}if(I){break}}return I}function m(w,I,J){var d=n[z][H]("HEAD").item(0),e=n[z].createElement("link");if(d){e.href=w;e.rel="stylesheet";e.type="text/css";if(I){e.title=I}if(J){e.charset=J}d.appendChild(e)}}function p(I){I=I||E;var L=0,d=0;while(I!=E){var N=I.parent[z][H]("iframe");for(var J=0;JI.scrollTop||d.scrollLeft>I.scrollLeft))?d:I;return{top:J.scrollTop,left:J.scrollLeft}}function s(d){try{var w=d?(d.srcElement||d.target):null;if($dp.cal&&!$dp.eCont&&$dp.dd&&w!=$dp.el&&$dp.dd.style.display=="block"){$dp.cal.close()}}catch(d){}}function A(){$dp.status=2}var G,j;function g(M,d){if(!$dp){return}b();var J={};for(var L in M){J[L]=M[L]}for(var L in l){if(L.substring(0,1)!="$"&&J[L]===undefined){J[L]=l[L]}}if(d){if(!w()){j=j||setInterval(function(){if(E[z].readyState=="complete"){clearInterval(j)}g(null,true)},50);return}if($dp.status==0){$dp.status=1;J.el=i;a(J,true)}else{return}}else{if(J.eCont){J.eCont=$dp.$(J.eCont);J.el=i;J.autoPickDate=true;J.qsEnabled=false;a(J)}else{if(l.$preLoad&&$dp.status!=2){return}var I=N();if(n.event===I||I){J.srcEl=I.srcElement||I.target;I.cancelBubble=true}J.el=J.el=$dp.$(J.el||J.srcEl);if(J.el==null){alert("WdatePicker:el is null!\nexample:onclick=\"WdatePicker({el:this})\"");return;}try{if(!J.el||J.el.My97Mark===true||J.el.disabled||($dp.dd&&r($dp.dd)!="none"&&$dp.dd.style.left!="-970px")){if(J.el.My97Mark){J.el.My97Mark=false}return}}catch(K){}if(I&&J.el.nodeType==1&&!C(J.el.initcfg,M)){$dp.unbind(J.el);k(J.el,I.type=="focus"?"onclick":"onfocus",function(){g(M)});J.el.initcfg=M}a(J)}}function w(){if(h&&E!=n&&E[z].readyState!="complete"){return false}return true}function N(){if(f){try{func=N.caller;while(func!=null){var O=func.arguments[0];if(O&&(O+"").indexOf("Event")>=0){return O}func=func.caller}}catch(P){}return null}return event}}function c(e,d){return e.currentStyle?e.currentStyle[d]:document.defaultView.getComputedStyle(e,false)[d]}function r(e,d){if(e){if(d!=null){e.style.display=d}else{return c(e,"display")}}}function a(e,d){var K=e.el?e.el.nodeName:"INPUT";if(d||e.eCont||new RegExp(/input|textarea|div|span|p|a/ig).test(K)){e.elProp=K=="INPUT"?"value":"innerHTML"}else{return}if(e.lang=="auto"){e.lang=h?navigator.browserLanguage.toLowerCase():navigator.language.toLowerCase()}if(!e.eCont){for(var J in e){$dp[J]=e[J]}}if(!$dp.dd||e.eCont||($dp.dd&&(e.getRealLang().name!=$dp.dd.lang||e.skin!=$dp.dd.skin))){if(e.eCont){w(e.eCont,e)}else{$dp.dd=E[z].createElement("DIV");$dp.dd.style.cssText="position:absolute";E[z].body.appendChild($dp.dd);w($dp.dd,e);if(d){$dp.dd.style.left=$dp.dd.style.top="-970px"}else{$dp.show();I($dp)}}}else{if($dp.cal){$dp.show();$dp.cal.init();if(!$dp.eCont){I($dp)}}}function w(V,P){var O=E[z].domain,S=false,M='';V.innerHTML=M;var L=l.$langList,U=l.$skinList,T;try{T=V.lastChild.contentWindow[z]}catch(Q){S=true;V.removeChild(V.lastChild);var N=E[z].createElement("iframe");N.hideFocus=true;N.frameBorder=0;N.scrolling="no";N.src="javascript:(function(){var d=document;d.open();d.domain='"+O+"';})()";V.appendChild(N);setTimeout(function(){T=V.lastChild.contentWindow[z];R()},97);return}R();function R(){var Y=P.getRealLang();V.lang=Y.name;V.skin=P.skin;var X=[" + + + <- ҵڿؼ +
ע:Ĭ,ʱʱ,ѡ, ʱʱ,Ҫ2βſѡ
+autoPickDateΪtrueʱ,Ƿʱ,ǿΪһμ + + +



+demoʹٷҳ http://www.my97.net + +

+

ϸĶ


+
+ע:˰汾Ϊ 4.8 Release build 20170803
+
+:
+[]ʱ 鿴ʾ
+
+[]preloadԤѡ
+
+[]ʱѡ˵Ķƹ,hmsMenuCfg
+
+[]$dp.unbind,ûֶӴڿؼ
+
+[ǿ]֤ܿɱرerrDealMode=-1
+
+[ǿ]ǿ˶ڸʽݴ
+
+[޸]㷨ģʽ,weekMethod,ĬģʽͬMSExcel
+
+[޸]ȥMy97DatePicker.htm
+
+[޸]positionij(ԭΪ)
+
+[ָ]$dpPath,ڽbaseǩµ
+
+[]strictģʽ,ڿؼ޷
+
+[]ʾûȨ޵
+
+[]oppositeʽ
+
+[]޷̬󶨶ڸʽ
+
+[]onchange¼2ε
+
+[]startDateܳʼʱ
+
+[]ڿ򽹵
+
+[]onchangeܴ
+
+[]ںسԶΪǰڵ
+
+[]Safari,Opera,chrome
+
+[]<script>ձǩʱĴ
+
+[]ƽģʽµļż
+
+[]˫¿ѡ
+
+[]IEijЩdialogUIͻ
+
+
+
+ʹ÷:
+
+1. ȥٷվ,㵱ǰصǷµİ汾,ܶbugΪʹõIJ°汾ɵ
+ٷҳ:http://www.my97.net
+
+
+2. My97DatePickerĿ¼,ĿӦĿ¼
+
+My97DatePickerĿ¼¸ļ:
+  1.1 My97DatePickerĿ¼һ,ƻĿ¼ṹ,Ҳɶļ,ԸĿ¼
+  1.2 Ŀ¼ļ;:
+    WdatePicker.js ļ,ڵõĵطʹøļ,ɶ,xx_WdatePicker.jsʽ
+    calendar.js ڿļ,
+    Ŀ¼lang ļ,ԸҪļ
+    Ŀ¼skin Ƥļ,ԸҪƤļ
+
+
+3. ԸԼҪ,ɾҪƤļ
+
+
+4. ԸԼҪ,µƤ
+Ƥĵַ:http://www.my97.net/skin.asp
+
+
+5. ϸĶʾʹ˵,󲿷ⶼͨ,ϸ
+ʾ:http://www.my97.net/demo/
+
+
+6. ޷
+Ȳο:http://www.my97.net/support.asp
+
+
+7. ,֧ҳ޷
+֧ͨҳṩϵʽϵ,ע:ʱ,һҪصHTMLϸĴϢ
+
+
+8. ʲô,֧ͨҳṩϵʽϵ
+
+
+9. ڿؼЭȤ,Է:http://www.my97.net/license.asp
+
+
+10.ףĿ˳,¼н!
+
+---------------------------------------------------------------------
+ٷҳ
+http://www.my97.net
+
+ʾʹ˵
+http://www.my97.net/demo/
+
+Ƥ:
+http://www.my97.net/skin.asp
+
+Դ:
+http://www.my97.net/source.asp
+
+֧ҳ
+http://www.my97.net/support.asp
diff --git a/public/js/My97DatePicker/lang/en.js b/public/js/My97DatePicker/lang/en.js new file mode 100644 index 0000000..3159885 --- /dev/null +++ b/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!' +} \ No newline at end of file diff --git a/public/js/My97DatePicker/lang/zh-cn.js b/public/js/My97DatePicker/lang/zh-cn.js new file mode 100644 index 0000000..70e5e4f --- /dev/null +++ b/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!' +} \ No newline at end of file diff --git a/public/js/My97DatePicker/lang/zh-tw.js b/public/js/My97DatePicker/lang/zh-tw.js new file mode 100644 index 0000000..b92e0ee --- /dev/null +++ b/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!' +} \ No newline at end of file diff --git a/public/js/My97DatePicker/skin/WdatePicker.css b/public/js/My97DatePicker/skin/WdatePicker.css new file mode 100644 index 0000000..43534b6 --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/public/js/My97DatePicker/skin/datePicker.gif b/public/js/My97DatePicker/skin/datePicker.gif new file mode 100644 index 0000000..d6bf40c Binary files /dev/null and b/public/js/My97DatePicker/skin/datePicker.gif differ diff --git a/public/js/My97DatePicker/skin/default/datepicker.css b/public/js/My97DatePicker/skin/default/datepicker.css new file mode 100644 index 0000000..be5a970 --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/public/js/My97DatePicker/skin/default/img.gif b/public/js/My97DatePicker/skin/default/img.gif new file mode 100644 index 0000000..053205d Binary files /dev/null and b/public/js/My97DatePicker/skin/default/img.gif differ diff --git a/public/js/My97DatePicker/skin/whyGreen/bg.jpg b/public/js/My97DatePicker/skin/whyGreen/bg.jpg new file mode 100644 index 0000000..75516a6 Binary files /dev/null and b/public/js/My97DatePicker/skin/whyGreen/bg.jpg differ diff --git a/public/js/My97DatePicker/skin/whyGreen/datepicker.css b/public/js/My97DatePicker/skin/whyGreen/datepicker.css new file mode 100644 index 0000000..e1d7565 --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/public/js/My97DatePicker/skin/whyGreen/img.gif b/public/js/My97DatePicker/skin/whyGreen/img.gif new file mode 100644 index 0000000..4003f20 Binary files /dev/null and b/public/js/My97DatePicker/skin/whyGreen/img.gif differ diff --git a/resources/views/admin/goods/add.blade.php b/resources/views/admin/goods/add.blade.php index 8f34332..6136004 100644 --- a/resources/views/admin/goods/add.blade.php +++ b/resources/views/admin/goods/add.blade.php @@ -2,6 +2,7 @@ @section('title', '商品添加') @section('content') +
商品列表 > 添加商品
{{ csrf_field() }} @@ -26,6 +27,10 @@  否 + + 活动价: +    活动开始日期:   活动结束日期: + 推荐: diff --git a/routes/web.php b/routes/web.php index 85eb665..2a6278c 100644 --- a/routes/web.php +++ b/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'); //修改购物车 //分销 //积分