rabin 5 years ago
parent
commit
3e2955b7eb

+ 148 - 33
doc/api_data.js

@@ -103,7 +103,7 @@ define({ "api": [
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Common"
   },
   {
@@ -154,7 +154,7 @@ define({ "api": [
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Passport"
   },
   {
@@ -219,7 +219,7 @@ define({ "api": [
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Passport"
   },
   {
@@ -298,7 +298,7 @@ define({ "api": [
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Passport"
   },
   {
@@ -391,7 +391,7 @@ define({ "api": [
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Passport"
   },
   {
@@ -435,7 +435,7 @@ define({ "api": [
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Passport"
   },
   {
@@ -514,7 +514,7 @@ define({ "api": [
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -552,7 +552,7 @@ define({ "api": [
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -614,6 +614,13 @@ define({ "api": [
             "field": "feedback.pdf",
             "description": "<p>pdf文件</p>"
           },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "feedback.num",
+            "description": "<p>评分数</p>"
+          },
           {
             "group": "Success 200",
             "type": "Object[]",
@@ -673,7 +680,45 @@ define({ "api": [
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
+    "groupTitle": "Service"
+  },
+  {
+    "type": "get",
+    "url": "service/?l=api.feedback_num_submit",
+    "title": "提交反馈方案的评分数",
+    "version": "1.0.0",
+    "name": "api_feedback_num_submit",
+    "group": "Service",
+    "description": "<p>提交反馈方案的评分数</p>",
+    "parameter": {
+      "fields": {
+        "Parameter": [
+          {
+            "group": "Parameter",
+            "type": "String",
+            "optional": false,
+            "field": "signature",
+            "description": "<p>signature</p>"
+          },
+          {
+            "group": "Parameter",
+            "type": "String",
+            "optional": false,
+            "field": "id",
+            "description": "<p>反馈方案id</p>"
+          },
+          {
+            "group": "Parameter",
+            "type": "String",
+            "optional": false,
+            "field": "num",
+            "description": "<p>评分数</p>"
+          }
+        ]
+      }
+    },
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -791,6 +836,34 @@ define({ "api": [
             "field": "config.question_content",
             "description": "<p>问卷介绍</p>"
           },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "config.act_name",
+            "description": "<p>参与活动标题</p>"
+          },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "config.act_desc",
+            "description": "<p>参与活动介绍</p>"
+          },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "config.act_link",
+            "description": "<p>参与活动链接</p>"
+          },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "config.act_code",
+            "description": "<p>是否显示兑换码按钮1为显示2为不显示</p>"
+          },
           {
             "group": "Success 200",
             "type": "Object[]",
@@ -812,6 +885,20 @@ define({ "api": [
             "field": "focus.pic",
             "description": "<p>图片</p>"
           },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "focus.appid",
+            "description": "<p>跳转的小程序appid,默认为空</p>"
+          },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "focus.link",
+            "description": "<p>链接或者小程序路径</p>"
+          },
           {
             "group": "Success 200",
             "type": "Object[]",
@@ -844,41 +931,55 @@ define({ "api": [
             "group": "Success 200",
             "type": "String",
             "optional": false,
+            "field": "product.content",
+            "description": "<p>内容</p>"
+          },
+          {
+            "group": "Success 200",
+            "type": "Object[]",
+            "optional": false,
             "field": "product.price",
-            "description": "<p>价格</p>"
+            "description": "<p>格</p>"
           },
           {
             "group": "Success 200",
             "type": "String",
             "optional": false,
-            "field": "product.content",
-            "description": "<p>内容</p>"
+            "field": "product.price.price",
+            "description": "<p>原价</p>"
+          },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "product.price.zhe_price",
+            "description": "<p>折扣价(特价)</p>"
           },
           {
             "group": "Success 200",
             "type": "String",
             "optional": false,
-            "field": "product.type",
+            "field": "product.price.type",
             "description": "<p>获取方式 1为购买,2为兑换,同时出现1,2,两个按钮同时出现</p>"
           },
           {
             "group": "Success 200",
             "type": "String",
             "optional": false,
-            "field": "product.cash",
+            "field": "product.price.cash",
             "description": "<p>购买金额,当type=1时有效</p>"
           },
           {
             "group": "Success 200",
             "type": "String",
             "optional": false,
-            "field": "product.code",
+            "field": "product.price.code",
             "description": "<p>兑换码数量,当type=2时有效</p>"
           }
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -964,7 +1065,7 @@ define({ "api": [
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -1155,7 +1256,7 @@ define({ "api": [
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -1207,7 +1308,7 @@ define({ "api": [
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -1265,7 +1366,7 @@ define({ "api": [
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -1345,42 +1446,56 @@ define({ "api": [
             "group": "Success 200",
             "type": "String",
             "optional": false,
+            "field": "product.pic",
+            "description": "<p>产品图片,多个用逗号隔开</p>"
+          },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "product.content",
+            "description": "<p>内容</p>"
+          },
+          {
+            "group": "Success 200",
+            "type": "Object[]",
+            "optional": false,
             "field": "product.price",
-            "description": "<p>价格</p>"
+            "description": "<p>格</p>"
           },
           {
             "group": "Success 200",
             "type": "String",
             "optional": false,
-            "field": "product.pic",
-            "description": "<p>产品图片,多个用逗号隔开</p>"
+            "field": "product.price.price",
+            "description": "<p>原价</p>"
           },
           {
             "group": "Success 200",
             "type": "String",
             "optional": false,
-            "field": "product.content",
-            "description": "<p>内容</p>"
+            "field": "product.price.zhe_price",
+            "description": "<p>折扣价(特价)</p>"
           },
           {
             "group": "Success 200",
             "type": "String",
             "optional": false,
-            "field": "product.type",
+            "field": "product.price.type",
             "description": "<p>获取方式 1为购买,2为兑换,同时出现1,2,两个按钮同时出现</p>"
           },
           {
             "group": "Success 200",
             "type": "String",
             "optional": false,
-            "field": "product.cash",
+            "field": "product.price.cash",
             "description": "<p>购买金额,当type=1时有效</p>"
           },
           {
             "group": "Success 200",
             "type": "String",
             "optional": false,
-            "field": "product.code",
+            "field": "product.price.code",
             "description": "<p>兑换码数量,当type=2时有效</p>"
           },
           {
@@ -1463,7 +1578,7 @@ define({ "api": [
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -1494,7 +1609,7 @@ define({ "api": [
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -1520,9 +1635,9 @@ define({ "api": [
     "type": "",
     "url": "",
     "version": "0.0.0",
-    "filename": "/root/input/doc/main.js",
-    "group": "_root_input_doc_main_js",
-    "groupTitle": "_root_input_doc_main_js",
+    "filename": "/root/input/main.js",
+    "group": "_root_input_main_js",
+    "groupTitle": "_root_input_main_js",
     "name": ""
   }
 ] });

+ 148 - 33
doc/api_data.json

@@ -103,7 +103,7 @@
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Common"
   },
   {
@@ -154,7 +154,7 @@
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Passport"
   },
   {
@@ -219,7 +219,7 @@
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Passport"
   },
   {
@@ -298,7 +298,7 @@
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Passport"
   },
   {
@@ -391,7 +391,7 @@
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Passport"
   },
   {
@@ -435,7 +435,7 @@
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Passport"
   },
   {
@@ -514,7 +514,7 @@
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -552,7 +552,7 @@
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -614,6 +614,13 @@
             "field": "feedback.pdf",
             "description": "<p>pdf文件</p>"
           },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "feedback.num",
+            "description": "<p>评分数</p>"
+          },
           {
             "group": "Success 200",
             "type": "Object[]",
@@ -673,7 +680,45 @@
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
+    "groupTitle": "Service"
+  },
+  {
+    "type": "get",
+    "url": "service/?l=api.feedback_num_submit",
+    "title": "提交反馈方案的评分数",
+    "version": "1.0.0",
+    "name": "api_feedback_num_submit",
+    "group": "Service",
+    "description": "<p>提交反馈方案的评分数</p>",
+    "parameter": {
+      "fields": {
+        "Parameter": [
+          {
+            "group": "Parameter",
+            "type": "String",
+            "optional": false,
+            "field": "signature",
+            "description": "<p>signature</p>"
+          },
+          {
+            "group": "Parameter",
+            "type": "String",
+            "optional": false,
+            "field": "id",
+            "description": "<p>反馈方案id</p>"
+          },
+          {
+            "group": "Parameter",
+            "type": "String",
+            "optional": false,
+            "field": "num",
+            "description": "<p>评分数</p>"
+          }
+        ]
+      }
+    },
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -791,6 +836,34 @@
             "field": "config.question_content",
             "description": "<p>问卷介绍</p>"
           },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "config.act_name",
+            "description": "<p>参与活动标题</p>"
+          },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "config.act_desc",
+            "description": "<p>参与活动介绍</p>"
+          },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "config.act_link",
+            "description": "<p>参与活动链接</p>"
+          },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "config.act_code",
+            "description": "<p>是否显示兑换码按钮1为显示2为不显示</p>"
+          },
           {
             "group": "Success 200",
             "type": "Object[]",
@@ -812,6 +885,20 @@
             "field": "focus.pic",
             "description": "<p>图片</p>"
           },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "focus.appid",
+            "description": "<p>跳转的小程序appid,默认为空</p>"
+          },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "focus.link",
+            "description": "<p>链接或者小程序路径</p>"
+          },
           {
             "group": "Success 200",
             "type": "Object[]",
@@ -844,41 +931,55 @@
             "group": "Success 200",
             "type": "String",
             "optional": false,
+            "field": "product.content",
+            "description": "<p>内容</p>"
+          },
+          {
+            "group": "Success 200",
+            "type": "Object[]",
+            "optional": false,
             "field": "product.price",
-            "description": "<p>价格</p>"
+            "description": "<p>格</p>"
           },
           {
             "group": "Success 200",
             "type": "String",
             "optional": false,
-            "field": "product.content",
-            "description": "<p>内容</p>"
+            "field": "product.price.price",
+            "description": "<p>原价</p>"
+          },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "product.price.zhe_price",
+            "description": "<p>折扣价(特价)</p>"
           },
           {
             "group": "Success 200",
             "type": "String",
             "optional": false,
-            "field": "product.type",
+            "field": "product.price.type",
             "description": "<p>获取方式 1为购买,2为兑换,同时出现1,2,两个按钮同时出现</p>"
           },
           {
             "group": "Success 200",
             "type": "String",
             "optional": false,
-            "field": "product.cash",
+            "field": "product.price.cash",
             "description": "<p>购买金额,当type=1时有效</p>"
           },
           {
             "group": "Success 200",
             "type": "String",
             "optional": false,
-            "field": "product.code",
+            "field": "product.price.code",
             "description": "<p>兑换码数量,当type=2时有效</p>"
           }
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -964,7 +1065,7 @@
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -1155,7 +1256,7 @@
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -1207,7 +1308,7 @@
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -1265,7 +1366,7 @@
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -1345,42 +1446,56 @@
             "group": "Success 200",
             "type": "String",
             "optional": false,
+            "field": "product.pic",
+            "description": "<p>产品图片,多个用逗号隔开</p>"
+          },
+          {
+            "group": "Success 200",
+            "type": "String",
+            "optional": false,
+            "field": "product.content",
+            "description": "<p>内容</p>"
+          },
+          {
+            "group": "Success 200",
+            "type": "Object[]",
+            "optional": false,
             "field": "product.price",
-            "description": "<p>价格</p>"
+            "description": "<p>格</p>"
           },
           {
             "group": "Success 200",
             "type": "String",
             "optional": false,
-            "field": "product.pic",
-            "description": "<p>产品图片,多个用逗号隔开</p>"
+            "field": "product.price.price",
+            "description": "<p>原价</p>"
           },
           {
             "group": "Success 200",
             "type": "String",
             "optional": false,
-            "field": "product.content",
-            "description": "<p>内容</p>"
+            "field": "product.price.zhe_price",
+            "description": "<p>折扣价(特价)</p>"
           },
           {
             "group": "Success 200",
             "type": "String",
             "optional": false,
-            "field": "product.type",
+            "field": "product.price.type",
             "description": "<p>获取方式 1为购买,2为兑换,同时出现1,2,两个按钮同时出现</p>"
           },
           {
             "group": "Success 200",
             "type": "String",
             "optional": false,
-            "field": "product.cash",
+            "field": "product.price.cash",
             "description": "<p>购买金额,当type=1时有效</p>"
           },
           {
             "group": "Success 200",
             "type": "String",
             "optional": false,
-            "field": "product.code",
+            "field": "product.price.code",
             "description": "<p>兑换码数量,当type=2时有效</p>"
           },
           {
@@ -1463,7 +1578,7 @@
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -1494,7 +1609,7 @@
         ]
       }
     },
-    "filename": "/root/input/doc/apidoc.php",
+    "filename": "/root/input/apidoc.php",
     "groupTitle": "Service"
   },
   {
@@ -1520,9 +1635,9 @@
     "type": "",
     "url": "",
     "version": "0.0.0",
-    "filename": "/root/input/doc/main.js",
-    "group": "_root_input_doc_main_js",
-    "groupTitle": "_root_input_doc_main_js",
+    "filename": "/root/input/main.js",
+    "group": "_root_input_main_js",
+    "groupTitle": "_root_input_main_js",
     "name": ""
   }
 ]

+ 1 - 1
doc/api_project.js

@@ -13,7 +13,7 @@ define({
   "apidoc": "0.3.0",
   "generator": {
     "name": "apidoc",
-    "time": "2018-09-12T05:47:58.337Z",
+    "time": "2018-10-21T13:24:50.118Z",
     "url": "http://apidocjs.com",
     "version": "0.17.6"
   }

+ 1 - 1
doc/api_project.json

@@ -13,7 +13,7 @@
   "apidoc": "0.3.0",
   "generator": {
     "name": "apidoc",
-    "time": "2018-09-12T05:47:58.337Z",
+    "time": "2018-10-21T13:24:50.118Z",
     "url": "http://apidocjs.com",
     "version": "0.17.6"
   }

+ 9 - 0
doc/apidoc.php

@@ -139,9 +139,17 @@
  * @apiSuccess {String}   config.video_content 	视频页介绍
  * @apiSuccess {String}   config.question_content 		问卷介绍
 
+ * @apiSuccess {String}   config.act_name      参与活动标题
+ * @apiSuccess {String}   config.act_desc       参与活动介绍
+ * @apiSuccess {String}   config.act_link       参与活动链接
+ * @apiSuccess {String}   config.act_code       是否显示兑换码按钮1为显示2为不显示
+
+
  * @apiSuccess {Object[]} focus 焦点图
  * @apiSuccess {String}   focus.name 名称
  * @apiSuccess {String}   focus.pic 图片
+ * @apiSuccess {String}   focus.appid 跳转的小程序appid,默认为空
+ * @apiSuccess {String}   focus.link 链接或者小程序路径
 
  * @apiSuccess {Object[]} product 产品列表
  * @apiSuccess {String}   product.id 产品id
@@ -255,6 +263,7 @@
  * @apiSuccess {String}   feedback.name 名称
  * @apiSuccess {String}   feedback.pic 最终效果图
  * @apiSuccess {String}   feedback.pdf pdf文件
+ * @apiSuccess {String}   feedback.num 评分数
  * @apiSuccess {Object[]}   feedback.product 商品清单
  * @apiSuccess {Object[]}   feedback.product.name 商品名称
  * @apiSuccess {Object[]}   feedback.product.type 商品类型1为有赞2为淘宝

+ 1 - 1
ku/database/product.php

@@ -196,7 +196,7 @@ return array
 			),
 			'type' => 'all',
 			'order' => array('id', 'desc'),
-			'col' => '*,name as value,name as label,cate|id',//这里为了做autocomplete进行测试,必须输出value和label
+			'col' => '*,name as value,name as label,cate,pic|id',//这里为了做autocomplete进行测试,必须输出value和label
 		),
 	),
 );

+ 4 - 0
ku/lib/Manage.php

@@ -70,6 +70,10 @@ class Manage
                     $cate = Dever::db('ku/cate')->one($v['cate']);
                     $data[$k]['category'] = $cate['name'];
                 }
+
+                if(isset($v['pic']) && $v['pic']) {
+                    //$data[$k]['label'] = $data[$k]['value'] = '<img src="'.$v['pic'].'" />' . $data[$k]['value'];
+                }
             }
             return $data;
         }

+ 54 - 0
main/database/config.php

@@ -7,6 +7,12 @@ $code = array
 	3 => '随机数字+字母',
 );
 
+$act_code = array
+(
+	1 => '显示',
+	2 => '不显示',
+);
+
 return array
 (
 	# 表名
@@ -249,6 +255,54 @@ return array
 			'update'	=> 'text',
 		),
 
+		'hr5'		=> array
+		(
+			'name' 		=> '参与活动',
+			'class'		=> '',//本项必须填写
+			'attr'		=> '',
+		),
+
+		'act_name'		=> array
+		(
+			'type' 		=> 'varchar-800',
+			'name' 		=> '参与活动标题',
+			'default' 	=> '',
+			'desc' 		=> '参与活动标题',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+		),
+
+		'act_desc'		=> array
+		(
+			'type' 		=> 'varchar-800',
+			'name' 		=> '参与活动介绍',
+			'default' 	=> '',
+			'desc' 		=> '参与活动介绍',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'act_link'		=> array
+		(
+			'type' 		=> 'varchar-800',
+			'name' 		=> '参与活动链接',
+			'default' 	=> '',
+			'desc' 		=> '参与活动链接',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'act_code'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '是否显示兑换码按钮',
+			'default' 	=> '1',
+			'desc' 		=> '是否显示兑换码按钮',
+			'match' 	=> 'option',
+			'update'	=> 'radio',
+			'option'	=> $act_code,
+		),
+
 		/*
 		'question_content'		=> array
 		(

+ 11 - 0
main/database/focus.php

@@ -34,6 +34,17 @@ return array
 			'list'		=> true,
 		),
 
+		'appid'		=> array
+		(
+			'type' 		=> 'varchar-400',
+			'name' 		=> '跳转的小程序appid-如果填写了该项,则下面的link请填写另外一个小程序的path',
+			'default' 	=> '',
+			'desc' 		=> '跳转的小程序appid',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			//'list'		=> true,
+		),
+
 		'link'		=> array
 		(
 			'type' 		=> 'varchar-400',

+ 12 - 2
service/database/product.php

@@ -98,9 +98,19 @@ return array
 		'price'		=> array
 		(
 			'type' 		=> 'varchar-50',
-			'name' 		=> '产品显示价格',
+			'name' 		=> '产品销售价格',
 			'default' 	=> '',
-			'desc' 		=> '产品显示价格',
+			'desc' 		=> '产品销售价格',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+		),
+
+		'oprice'		=> array
+		(
+			'type' 		=> 'varchar-50',
+			'name' 		=> '产品原价',
+			'default' 	=> '',
+			'desc' 		=> '产品原价',
 			'match' 	=> 'is_string',
 			'update'	=> 'text',
 		),

+ 6 - 3
service/src/Api.php

@@ -332,15 +332,15 @@ class Api extends Base
     # 兑换
     public function code()
     {
-    	$product_id = Dever::input('product_id', false, '> 0', '请传入正确的产品id');
+    	//$product_id = Dever::input('product_id', false, '> 0', '请传入正确的产品id');
 
     	$code = Dever::input('code');
 
     	if ($code) {
 
-    		$product = Dever::db('service/product')->one($product_id);
+    		//$product = Dever::db('service/product')->one($product_id);
 
-    		$info = Dever::db('code/info')->one(array('product_id' => $product_id, 'code' => $code));
+    		$info = Dever::db('code/info')->one(array('code' => $code));
 
     		if (!$info) {
     			Dever::alert('兑换码不存在');
@@ -354,6 +354,9 @@ class Api extends Base
     			//Dever::alert('兑换码已被领取');
     		}
 
+            $product_id = $info['product_id'];
+            $product = Dever::db('service/product')->one($info['product_id']);
+
     		$order = Dever::db('service/order')->one(array('product_id' => $product_id, 'code' => $code, 'uid' => $this->data['uid']));
 
     		if ($order) {