From 39bac4d0ac602b8c080543c05ef370475d3c64a8 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Wed, 1 Dec 2021 18:21:12 +0800 Subject: [PATCH 1/2] settter --- route/api.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/route/api.php b/route/api.php index 5e9e5c9..6a670a8 100644 --- a/route/api.php +++ b/route/api.php @@ -10,6 +10,8 @@ // +---------------------------------------------------------------------- use think\facade\Route; - - - +Route::rule('account/loginByCode', "\\app\\controller\\api\\user@login");//用户登录 +Route::rule('consumer/home', "\\app\\controller\\api\\Consumer@home");//首页列表(优惠券列表) +Route::rule('dic/getDisList', "\\app\\controller\\api\\dictionary@getDisList");//距离选项列表 +Route::rule('dic/getBusinessTypeListByPid', "\\app\\controller\\api\\dictionary@getBusinessTypeList");//首页获取商家类型 +Route::rule('dic/getCouponTypeList', "\\app\\controller\\api\\dictionary@getCouponTypeList");//首页获取优惠券类型 From 08e392494a364593cd008a649b5941ccedd1e70e Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Thu, 2 Dec 2021 10:41:02 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Comment.php | 22 ++++++++++ app/model/Business.php | 11 +++-- view/manager/coupon/add.html | 75 ++++++++++++++++++++++++++++++++-- 3 files changed, 99 insertions(+), 9 deletions(-) create mode 100644 app/controller/api/Comment.php diff --git a/app/controller/api/Comment.php b/app/controller/api/Comment.php new file mode 100644 index 0000000..6fb3d1a --- /dev/null +++ b/app/controller/api/Comment.php @@ -0,0 +1,22 @@ +hasOne(Business::class, 'agency_code', "code"); + return $this->hasOne(self::class,"code","agency_code"); } + public function account() { return $this->hasOne(Account::class, 'business_code',"code"); } - public function agency() - { - return $this->hasOne(self::class,"code","agency_code"); - } + + } diff --git a/view/manager/coupon/add.html b/view/manager/coupon/add.html index 53e645c..c8094a2 100644 --- a/view/manager/coupon/add.html +++ b/view/manager/coupon/add.html @@ -90,13 +90,66 @@ +
+ 使用规则 +
+
- +
- +
+
+ +
+ + + + + + + +
+
+ + +
+ + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ 处罚规则 +
+
@@ -170,4 +223,20 @@
- \ No newline at end of file + + \ No newline at end of file