diff --git a/ali-serve/router/wx.js b/ali-serve/router/wx.js index 9fb2e25b0b4fc4a534c386857c0256310baebafe..a774ea15e17ebb82f6f2ed520a319d466c62a5ce 100644 --- a/ali-serve/router/wx.js +++ b/ali-serve/router/wx.js @@ -214,6 +214,27 @@ wx.post('/carid_search',(req,res,next)=>{ }) }) +// 订单 +wx.post('/send_order',(req,res,next)=>{ + let obj = req.body + console.log(obj) + let code = 'AL'+Math.floor(Math.random() * 900000000) + 100000000; + let sql =`INSERT INTO ali_order(AO001,AO010,AO002,AO003,AO008,AO004,AO005,AO009,AO006,AO007,AO011,AC001) VALUES(?,?,?,?,?,?,?,?,?,?,?,?)` + // return + pool.query(sql,[,code,obj.AO002,obj.AO003,obj.AO008,obj.AO004,obj.AO005,obj.AO009,obj.AO006*1,obj.AO007,obj.AO011,obj.AC001*1],(err,result)=>{ + if(err){ + next(err) + return + } + if(result.affectedRows!=0){ + res.send({code:200,msg:'订单提交成功!'}) + }else{ + res.send({code:201,msg:'订单提交失败!'}) + } + }) +}) + + /**************************/ diff --git a/jw-rentalcar-wx/compoments/ChonsePlace.vue b/jw-rentalcar-wx/compoments/ChonsePlace.vue index 954f00028932e318edec5d99dc468c55d471ce2c..3741264e67c285b4d316309d45dde5b5ddb554cf 100644 --- a/jw-rentalcar-wx/compoments/ChonsePlace.vue +++ b/jw-rentalcar-wx/compoments/ChonsePlace.vue @@ -144,6 +144,7 @@ }, SelectCar(){ + uni.setStorageSync('chonsePlace',{ sdate:this.sdate,edate:this.edate,stime:this.stime,etime:this.etime,place:this.place,place2:this.place2,days:this.days }) diff --git a/jw-rentalcar-wx/pages.json b/jw-rentalcar-wx/pages.json index b8f33c491ee05b316efa95fa1c16a68e2e063643..84a9f623557b41862ae02dff1292c87922f857f0 100644 --- a/jw-rentalcar-wx/pages.json +++ b/jw-rentalcar-wx/pages.json @@ -99,6 +99,15 @@ } } + ,{ + "path" : "pages/payorder/payorder", + "style" : + { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } + + } ], "globalStyle": { "navigationBarTextStyle": "black", diff --git a/jw-rentalcar-wx/pages/index/index.vue b/jw-rentalcar-wx/pages/index/index.vue index bac2020ae6887e40cf6a7e9b65f23dcd97a9713d..078cf488643263c2dc00fc8371342cc849b8e19a 100644 --- a/jw-rentalcar-wx/pages/index/index.vue +++ b/jw-rentalcar-wx/pages/index/index.vue @@ -71,11 +71,9 @@ export default { onShow() { uni.$on('getplace',(place)=>{ this.place = place - console.log(this.place) }) uni.$on('sendplace',(place2)=>{ this.place2 = place2 - console.log(this.place2) }) uni.$on('gettime',(stime,etime,sdate,edate,syear,eyear,sweek,eweek,starttime,endtime,days)=>{ this.stime=stime diff --git a/jw-rentalcar-wx/pages/orderconfirm/orderconfirm.vue b/jw-rentalcar-wx/pages/orderconfirm/orderconfirm.vue index e920827fc4cbeebfc96056b9c679f457ed4f9e95..d95b9757cc20cc6c3b1dc7c7becd4484689dfa3e 100644 --- a/jw-rentalcar-wx/pages/orderconfirm/orderconfirm.vue +++ b/jw-rentalcar-wx/pages/orderconfirm/orderconfirm.vue @@ -51,7 +51,7 @@ 车辆租赁费用以及门店服务费(现价付) - ¥{{base*days}}/{{days}}天 + ¥{{base*days}}{{days}}天 基本保障服务费 @@ -91,7 +91,7 @@ 费用明细 - 提交订单 + 提交订单 @@ -132,6 +132,28 @@ } }, methods: { + async sendOrder(data){ + let carid = data[0].AC001 + let obj = uni.getStorageSync('chonsePlace') + console.log('提交订单',data) + const Rres = await this.$wxRequest({ + url:'/wx/send_order', + method:'POST', + data:{ + AC001:carid, + AO002:obj.place, + AO003:obj.edate, + AO008:obj.etime, + AO004:obj.place2, + AO005:obj.sdate, + AO009:obj.stime, + AO006:this.service, + AO007:'2', + AO011:this.days + } + }) + }, + hq(data){ this.service = data }, diff --git a/jw-rentalcar-wx/pages/payorder/payorder.vue b/jw-rentalcar-wx/pages/payorder/payorder.vue new file mode 100644 index 0000000000000000000000000000000000000000..61b909581e4f53b67de425171db00beedefc3b6b --- /dev/null +++ b/jw-rentalcar-wx/pages/payorder/payorder.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/jw-rentalcar-wx/tm-vuetify/tool/function/dayjs/zh-cn.min.js b/jw-rentalcar-wx/tm-vuetify/tool/function/dayjs/zh-cn.min.js index d50cdff63dbad21076ec5c613b82a4db7edea780..e12504ff969871a6ba2f56d6db5431d744c3e900 100644 --- a/jw-rentalcar-wx/tm-vuetify/tool/function/dayjs/zh-cn.min.js +++ b/jw-rentalcar-wx/tm-vuetify/tool/function/dayjs/zh-cn.min.js @@ -4,4 +4,68 @@ * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ -!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("./dayjs.min")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_zh_cn=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),d={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e,_){switch(_){case"W":return e+"周";default:return e+"日"}},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s后",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(e,_){var t=100*e+_;return t<600?"凌晨":t<900?"早上":t<1100?"上午":t<1300?"中午":t<1800?"下午":"晚上"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file +! function(e, _) { + "object" == typeof exports && "undefined" != typeof module ? module.exports = _(require("./dayjs.min")) : + "function" == typeof define && define.amd ? define(["dayjs"], _) : (e = "undefined" != typeof globalThis ? + globalThis : e || self).dayjs_locale_zh_cn = _(e.dayjs) +}(this, (function(e) { + "use strict"; + + function _(e) { + return e && "object" == typeof e && "default" in e ? e : { + default: e + } + } + var t = _(e), + d = { + name: "zh-cn", + weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), + weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), + weekdaysMin: "日_一_二_三_四_五_六".split("_"), + months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), + monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), + ordinal: function(e, _) { + switch (_) { + case "W": + return e + "周"; + default: + return e + "日" + } + }, + weekStart: 1, + yearStart: 4, + formats: { + LT: "HH:mm", + LTS: "HH:mm:ss", + L: "YYYY/MM/DD", + LL: "YYYY年M月D日", + LLL: "YYYY年M月D日Ah点mm分", + LLLL: "YYYY年M月D日ddddAh点mm分", + l: "YYYY/M/D", + ll: "YYYY年M月D日", + lll: "YYYY年M月D日 HH:mm", + llll: "YYYY年M月D日dddd HH:mm" + }, + relativeTime: { + future: "%s后", + past: "%s前", + s: "几秒", + m: "1 分钟", + mm: "%d 分钟", + h: "1 小时", + hh: "%d 小时", + d: "1 天", + dd: "%d 天", + M: "1 个月", + MM: "%d 个月", + y: "1 年", + yy: "%d 年" + }, + meridiem: function(e, _) { + var t = 100 * e + _; + return t < 600 ? "凌晨" : t < 900 ? "早上" : t < 1100 ? "上午" : t < 1300 ? "中午" : t < 1800 ? + "下午" : "晚上" + } + }; + return t.default.locale(d, null, !0), d +}));