From d46c3e688cf7bd525b9e209050246a7c0a9ef3fd Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: Sat, 24 Oct 2020 23:37:03 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../goods/groupBuyManage/groupBuyManage.html | 88 +++++++++++++++++++
.../goods/groupBuyManage/groupBuyManage.js | 76 ++++++++++++++++
2 files changed, 164 insertions(+)
create mode 100644 public/pages/goods/groupBuyManage/groupBuyManage.html
create mode 100644 public/pages/goods/groupBuyManage/groupBuyManage.js
diff --git a/public/pages/goods/groupBuyManage/groupBuyManage.html b/public/pages/goods/groupBuyManage/groupBuyManage.html
new file mode 100644
index 000000000..67a850698
--- /dev/null
+++ b/public/pages/goods/groupBuyManage/groupBuyManage.html
@@ -0,0 +1,88 @@
+
\ No newline at end of file
diff --git a/public/pages/goods/groupBuyManage/groupBuyManage.js b/public/pages/goods/groupBuyManage/groupBuyManage.js
new file mode 100644
index 000000000..2a58633f9
--- /dev/null
+++ b/public/pages/goods/groupBuyManage/groupBuyManage.js
@@ -0,0 +1,76 @@
+/**
+ 入驻小区
+**/
+(function (vc) {
+ var DEFAULT_PAGE = 1;
+ var DEFAULT_ROWS = 10;
+ vc.extends({
+ data: {
+ groupBuyManageInfo: {
+ products: [],
+ total: 0,
+ records: 1,
+ moreCondition: false,
+ productId: '',
+ conditions: {
+ groupProdName: '',
+ keyword: '',
+ barCode: '',
+ }
+ }
+ },
+ _initMethod: function () {
+ vc.component._listProducts(DEFAULT_PAGE, DEFAULT_ROWS);
+ },
+ _initEvent: function () {
+
+ vc.on('groupBuyManage', 'listProduct', function (_param) {
+ $that.groupBuyManageInfo.componentShow = 'groupBuyManage';
+ vc.component._listProducts(DEFAULT_PAGE, DEFAULT_ROWS);
+ });
+ vc.on('pagination', 'page_event', function (_currentPage) {
+ vc.component._listProducts(_currentPage, DEFAULT_ROWS);
+ });
+ },
+ methods: {
+ _listProducts: function (_page, _rows) {
+
+ vc.component.groupBuyManageInfo.conditions.page = _page;
+ vc.component.groupBuyManageInfo.conditions.row = _rows;
+ var param = {
+ params: vc.component.groupBuyManageInfo.conditions
+ };
+
+ //发送get请求
+ vc.http.apiGet('/groupBuy/queryGroupBuy',
+ param,
+ function (json, res) {
+ var _groupBuyManageInfo = JSON.parse(json);
+ vc.component.groupBuyManageInfo.total = _groupBuyManageInfo.total;
+ vc.component.groupBuyManageInfo.records = _groupBuyManageInfo.records;
+ vc.component.groupBuyManageInfo.products = _groupBuyManageInfo.data;
+ vc.emit('pagination', 'init', {
+ total: vc.component.groupBuyManageInfo.records,
+ currentPage: _page
+ });
+ }, function (errInfo, error) {
+ console.log('请求失败处理');
+ }
+ );
+ },
+ _queryProductMethod: function () {
+ vc.component._listProducts(DEFAULT_PAGE, DEFAULT_ROWS);
+
+ },
+ _moreCondition: function () {
+ if (vc.component.groupBuyManageInfo.moreCondition) {
+ vc.component.groupBuyManageInfo.moreCondition = false;
+ } else {
+ vc.component.groupBuyManageInfo.moreCondition = true;
+ }
+ }
+
+
+ }
+ });
+})(window.vc);