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 @@
+