diff --git a/ali-serve/router/wx.js b/ali-serve/router/wx.js index 87b07eb58fda54f5607465da3991b2faa89a93a3..1de641f020a2cb496c898919019c0dc740f80499 100644 --- a/ali-serve/router/wx.js +++ b/ali-serve/router/wx.js @@ -283,7 +283,7 @@ wx.post('/stores_search',(req,res,next)=>{ }) }) //取消订单支付 -wx.post('/cancel_order',(req,res,next)=>{ +wx.post('/cancel_pay_order',(req,res,next)=>{ // 起始时间是0s 结束时间是十五分钟后 // 在这期间 每一秒执行一次 let orderid = req.body.AO010 @@ -319,7 +319,47 @@ wx.post('/search_all_order',(req,res,next)=>{ } }) }) +// 新增租车常用联系人 +wx.post('/peoples_add',(req,res,next)=>{ + console.log(req.body) + let UCR02 =req.body.UCR02 + let UCR03 =req.body.UCR03 + let UCR04 =req.body.UCR04 + let UCR05 =req.body.UCR05 + let UCR06 =req.body.UCR06 + let sql = 'INSERT INTO user_car_rental value (?,?,?,?,?,?)' + pool.query(sql,[null,UCR02,UCR03,UCR04,UCR05,UCR06],(err,result)=>{ + if(err){ + next(err) + return + } + if(result.affectedRows!=0){ + res.send({code:200,msg:'新增成功!'}) + }else{ + res.send({code:201,msg:'新增失败!'}) + } + }) + +}) + +// 取消订单 +wx.post('/cancel_order',(req,res,next)=>{ + let AO010 = req.body.AO010 + let sql = 'UPDATE ali_order set AO007 ="4" WHERE AO010 =?' + pool.query(sql,AO010,(err,result)=>{ + if(err){ + next(err) + return + } + if(result.affectedRows!=0){ + res.send({code:200,msg:'订单取消成功!'}) + }else{ + res.send({code:201,msg:'订单取消失败!'}) + } + }) + +}) /**************************/ -module.exports = wx; \ No newline at end of file +module.exports = wx; \ No newline at end of file diff --git a/jw-rentalcar-wx/compoments/AllOrder.vue b/jw-rentalcar-wx/compoments/AllOrder.vue index 1dd596df2a47ae0aa0c0ed91fab698779810659c..f7ca3c1d99714d9492f316e3922501a456fd4457 100644 --- a/jw-rentalcar-wx/compoments/AllOrder.vue +++ b/jw-rentalcar-wx/compoments/AllOrder.vue @@ -41,7 +41,7 @@ - 咨询 + 取消订单 去取车 @@ -87,7 +87,7 @@ - 咨询 + 咨询 去支付 @@ -173,8 +173,8 @@ url:`/pages/payorder/payorder?orderid=${id}&price=${price}` }) }, - doCancel(){ - + doCancel(AO010){ + this.$emit('cancelOrder',AO010) } } } diff --git a/jw-rentalcar-wx/pages.json b/jw-rentalcar-wx/pages.json index 91a2b6d4aa2606df8ea73fe01969a7397dc4720d..7ffbc395915ef291665e9341dfb3b4b2678062af 100644 --- a/jw-rentalcar-wx/pages.json +++ b/jw-rentalcar-wx/pages.json @@ -115,6 +115,24 @@ } } + ,{ + "path" : "pages/rentalpeople/rentalpeople", + "style" : + { + "navigationBarTitleText": "常用租车人", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/addpeoples/addpeoples", + "style" : + { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } + + } ], "globalStyle": { "navigationBarTextStyle": "black", diff --git a/jw-rentalcar-wx/pages/addpeoples/addpeoples.vue b/jw-rentalcar-wx/pages/addpeoples/addpeoples.vue new file mode 100644 index 0000000000000000000000000000000000000000..2d1521c3667e9fcdfe826034a64d973978306936 --- /dev/null +++ b/jw-rentalcar-wx/pages/addpeoples/addpeoples.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/jw-rentalcar-wx/pages/index/index.vue b/jw-rentalcar-wx/pages/index/index.vue index 85fed7fdeef11137988807efac78078052be6e17..28254c28091811f489d3f726cfb6b05217ed6603 100644 --- a/jw-rentalcar-wx/pages/index/index.vue +++ b/jw-rentalcar-wx/pages/index/index.vue @@ -119,7 +119,7 @@ export default { }, dotest(){ uni.navigateTo({ - url:'/pages/payorder/payorder' + url:'/pages/addpeoples/addpeoples' }) } } diff --git a/jw-rentalcar-wx/pages/my/my.vue b/jw-rentalcar-wx/pages/my/my.vue index de4edefe7194661979d5bdaa4a41b8736fb70815..dfd1a729e904285f01114f11ae6938acdc8980b8 100644 --- a/jw-rentalcar-wx/pages/my/my.vue +++ b/jw-rentalcar-wx/pages/my/my.vue @@ -34,7 +34,7 @@ - + 客服热线: @@ -65,7 +65,7 @@ export default { list3: [ { icon: '/static/images/dd.png', text: '自驾订单', path: '' }, { icon: '/static/images/sz.png', text: '租车免押方式', path: '' }, - { icon: '/static/images/ren.png', text: '常用租车人', path: '' }, + { icon: '/static/images/ren.png', text: '常用租车人', path: '/pages/rentalpeople/rentalpeople' }, { icon: '/static/images/wx.png', text: '绑定公众号', path: '' }, { icon: '/static/images/xx.png', text: '常用收件信息', path: '' } ] @@ -171,6 +171,12 @@ export default { that.showErr('error','登录失败') } }); + }, + changeDo(path){ + console.log('111',path) + uni.navigateTo({ + url:path + }) } } }; diff --git a/jw-rentalcar-wx/pages/order/order.vue b/jw-rentalcar-wx/pages/order/order.vue index 7e4d701f7cb358ec5c7d7efe1127974acd09db26..c7602840aa6da75d525b87a28e01ee3e77b53298 100644 --- a/jw-rentalcar-wx/pages/order/order.vue +++ b/jw-rentalcar-wx/pages/order/order.vue @@ -1,10 +1,10 @@