diff --git a/project/controller/backDesigner.js b/project/controller/backDesigner.js index c5c271ff2a8f881a21e67ffcb7f071eeb77a9409..f9d5d3c8b6736996430f933bc74a662993ca9693 100644 --- a/project/controller/backDesigner.js +++ b/project/controller/backDesigner.js @@ -57,6 +57,35 @@ designer_table.designer_id`,[null],(err,data)=>{ // console.log(err); // console.log(data); }) + }, + getDesignerAdd(req,resp){ + console.log(req.query.awardDateDesigner) + // console.log(req.query); + let params=[ + null, + req.query.name, + req.query.birthPlace, + req.query.holdPlace, + req.query.motto, + req.query.picPath, + null, + req.query.describe, + req.query.state, + ]; + dbpool.connect(`INSERT INTO designer_table VALUES (?,?,?,?,?,?,?,?,?)`,params,(err,data)=>{ + // console.log(data) + let params2=[ + null, + data.insertId, + req.query.awardDateDesigner, + req.query.awardName, + req.query.awardPath + ]; + dbpool.connect(`INSERT INTO designer_awards_table VALUES (?,?,?,?,?)`,params2,(err,data)=>{ + // console.log(err); + // console.log(data); + }); + }); } }; module.exports=controller; diff --git a/project/controller/back_packageController.js b/project/controller/back_packageController.js index 82b9117b416da4e647345f2bf3497cb53832b7e5..96178d389c950cc8d6919d7aa42910e052c02cd9 100644 --- a/project/controller/back_packageController.js +++ b/project/controller/back_packageController.js @@ -8,9 +8,20 @@ module.exports = { let a=request.text; // console.log(a); packagemodule.config(a,(err,data)=>{ - - - + // console.log(data); + if(!err){ + if(data.length > 0){ + response.send(data); + } + }else{ + console.log(err); + } + }); + }, + chapackageController : (request,response) => { + let a=request.text; + // console.log(a); + packagemodule.chaconfig(a,(err,data)=>{ // console.log(data); if(!err){ if(data.length > 0){ @@ -43,6 +54,7 @@ module.exports = { let package_name = req.body.package_name; let create_date = req.body.create_date; let package_price=req.body.package_price; + let SKU_name=req.body.SKU_name; packagemodule.addconfig(package_id,package_name,create_date,package_price,(err,data)=>{ console.log(data) if(!err){ @@ -53,6 +65,16 @@ module.exports = { console.log(err); } }); + packagemodule.nameaddconfig(SKU_name,(err,data)=>{ + console.log(data) + if(!err){ + if(data.length > 0){ + res.send(data); + } + }else{ + console.log(err); + } + }); }, //删除 delController:(req,res)=>{ @@ -76,9 +98,9 @@ module.exports = { editController:(req,res)=>{ let package_id = req.body.package_id; let package_name = req.body.package_name; - let create_date = req.body.create_date; + // let create_date = req.body.create_date; let package_price=req.body.package_price; - packagemodule.editconfig(package_id,package_name,create_date,package_price,(err,data)=>{ + packagemodule.editconfig(package_id,package_name,package_price,(err,data)=>{ if(!err){ if(data.length > 0){ console.log(data); diff --git a/project/dao/back_packagemodule.js b/project/dao/back_packagemodule.js index 7d8c50c2b868356cf033924929a872de181ab659..c263b4b9885f24002c70b629ee6c6ac0db437852 100644 --- a/project/dao/back_packagemodule.js +++ b/project/dao/back_packagemodule.js @@ -8,6 +8,13 @@ module.exports = { let arr=[package_id]; dbpool.connect(sql,arr,fn); }, + chaconfig:(package_id,fn)=>{ + let sql = `SELECT package_id,package_name,package_price,DATE_FORMAT(create_date,'%Y-%m-%d% ')AS 'create_date' FROM package_table WHERE package_id AND package_isdel=1`; + // let sql = `SELECT * FROM package_view`;////全局查询 + // console.log(sql); + let arr=[package_id]; + dbpool.connect(sql,arr,fn); + }, addconfig:(package_id,package_name,create_date,package_price,fn)=>{ let sql = `INSERT INTO package_table(package_id,package_name,create_date,package_price) VALUES (?, ?, ?, ?)`; // let sql = `SELECT * FROM package_view`;////全局查询 @@ -15,6 +22,13 @@ module.exports = { let arr=[package_id,package_name,create_date,package_price]; dbpool.connect(sql,arr,fn) }, + nameaddconfig:(SKU_name,fn)=>{ + let sql = `SELECT * FROM package_sku_table AS a,sku_info AS b WHERE a.SKU_code = b.SKU_code`; + // let sql = `SELECT * FROM package_view`;////全局查询 + console.log(sql); + let arr=[SKU_name]; + dbpool.connect(sql,arr,fn) + }, delconfig:(package_id,package_isdel,fn)=>{ // let sql = `DELETE FROM package_table WHERE package_id = ?`; let sql=`UPDATE package_table SET package_isdel = 0 WHERE package_id =? `; @@ -24,14 +38,13 @@ module.exports = { dbpool.connect(sql,arr,fn) }, //编辑修改 - editconfig:(package_id,package_name,create_date,package_price,fn)=>{ - // let sql = `DELETE FROM package_table WHERE package_id = ?`; - let sql=`UPDATE package_table SET package_name=? ,create_date=? ,package_price=? WHERE package_id =? `; + editconfig:(package_id,package_name,package_price,fn)=>{ + let sql=`UPDATE package_table SET package_name=? ,package_price=? WHERE package_id =?`; console.log(package_id); console.log(package_name); - console.log(create_date); + // console.log(create_date); console.log(package_price); - let arr=[package_id,package_name,create_date,package_price]; + let arr=[package_id,package_name,package_price]; dbpool.connect(sql,arr,fn) }, //单个商品展示 diff --git a/project/public/js/shop/pay.js b/project/public/js/shop/pay.js index 5b5af99d8fab2f0a7e849013b37f2d28dff2eb4b..42a22c4c953b7e19f2699510a8ddff3004a6c888 100644 --- a/project/public/js/shop/pay.js +++ b/project/public/js/shop/pay.js @@ -44,5 +44,5 @@ $(function () { }) }); function paySuccess() { - location.href='index.html'; -} \ No newline at end of file + location.href='/home'; +} diff --git a/project/public/pages/CH/vip.html b/project/public/pages/CH/vip.html index 66d03549c4901db08e4422fe8e37de8a5934b83f..8f961dbb23ecc29d16c5f76e271fa25e98bc12a5 100644 --- a/project/public/pages/CH/vip.html +++ b/project/public/pages/CH/vip.html @@ -652,22 +652,21 @@ @@ -816,5 +815,11 @@ + diff --git a/project/routes/backDesignerRouter.js b/project/routes/backDesignerRouter.js index 11bb33624669a10f8be2cb13ed97a5318538fef7..06084b3f5ec6060d6134539b09db74798df62135 100644 --- a/project/routes/backDesignerRouter.js +++ b/project/routes/backDesignerRouter.js @@ -5,5 +5,6 @@ const controller=require('../controller/backDesigner'); router.get('/backDesigner',controller.getDesigner); router.get('/backDesignerState',controller.getDesignerState); router.get('/backDesignerEdit',controller.getDesignerEdit); +router.get('/backDesignerAdd',controller.getDesignerAdd); module.exports=router; diff --git a/project/routes/back_package_route.js b/project/routes/back_package_route.js index cd46939bd7b772fd93ac03788ae11f30e225e10a..85beef58ebb63f2f85186df4f6422a118de356e5 100644 --- a/project/routes/back_package_route.js +++ b/project/routes/back_package_route.js @@ -9,6 +9,7 @@ router.post('/back_del.ing',packageController.delController); router.post('/back_i.ing',packageController.addController); //组合显示列表 router.get("/back_login.ing",packageController.packageController); +router.get("/back_l.ing",packageController.chapackageController); //组合单品显示列表 router.get("/back_product.ing",packageController.productController); diff --git a/project/views/CH/Notpaying.ejs b/project/views/CH/Notpaying.ejs index ee974fc87316cb01049f28c3d75fe7a7ccb519b5..09cb1a87960fd24e172b96c54c3b93e4a2bda8c3 100644 --- a/project/views/CH/Notpaying.ejs +++ b/project/views/CH/Notpaying.ejs @@ -143,6 +143,29 @@ + <% include ../common/nav.ejs%> @@ -188,7 +211,7 @@

- +
@@ -213,9 +236,9 @@ diff --git a/project/views/CH/Order.ejs b/project/views/CH/Order.ejs index d28a29a1e86d1eb6cf740d75b723fc81936c7e84..1f228df7f048bcec8d839df067b8043ed925bb04 100644 --- a/project/views/CH/Order.ejs +++ b/project/views/CH/Order.ejs @@ -49,7 +49,7 @@ @@ -210,7 +210,7 @@

- +
@@ -241,5 +241,9 @@ // function getOrder() { // // } + function delShop() { + $('.ordersec2')[0].remove() + + } diff --git a/project/views/CH/Paymenthasbeen.ejs b/project/views/CH/Paymenthasbeen.ejs index a1b8ed750ea57f6cf4fd0af372a5d1a84c31355f..5f34513f85847d85c0abc1421588c276b0230f4b 100644 --- a/project/views/CH/Paymenthasbeen.ejs +++ b/project/views/CH/Paymenthasbeen.ejs @@ -72,7 +72,7 @@ @@ -234,7 +234,7 @@
- +
@@ -266,5 +266,9 @@ // function getOrder() { // // } + function delShop() { + $('.ordersec2')[0].remove() + + } diff --git a/project/views/FYK/me.ejs b/project/views/FYK/me.ejs index fc78336dd6769c76bb97d7ceb9f27fa665e7a701..65c064e215d444dcd58844ab9db938b9bcc2db82 100644 --- a/project/views/FYK/me.ejs +++ b/project/views/FYK/me.ejs @@ -56,7 +56,7 @@

<%= userData[0].user_nickname %>

下午好! - 修改个人信息 > + 修改个人信息 >
diff --git a/project/views/TYH/pay.ejs b/project/views/TYH/pay.ejs index 8bd1c8e39c3a77375a83de80062496df1edd8ab6..65d66f7bf8dfa9de86d2b5823af0d7fd2719604e 100644 --- a/project/views/TYH/pay.ejs +++ b/project/views/TYH/pay.ejs @@ -75,7 +75,7 @@ ¥ <%=list[0].order_amount%>
- + 确认支付
@@ -163,4 +163,4 @@ - \ No newline at end of file + diff --git a/project/views/common/nav.ejs b/project/views/common/nav.ejs index 446b964bd61f7f2e2d02415460171a2c621735cc..f4665d99fc94488193ad7df883530e4c00c792e8 100644 --- a/project/views/common/nav.ejs +++ b/project/views/common/nav.ejs @@ -634,11 +634,11 @@ -
-
- 结算 -
-
+ + + + + diff --git a/project/views/index.ejs b/project/views/index.ejs index d7e1079946b2be443ed94bf5a49178667ab76085..c3be8c5639a1169631de8b0c444c50af349e0cdf 100644 --- a/project/views/index.ejs +++ b/project/views/index.ejs @@ -120,7 +120,7 @@