From 83954fa7f2810dfa867aba5887bc4cf6c2dc9fbf Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 7 Aug 2023 18:18:04 +0800 Subject: [PATCH] 1 --- doc/Mall.py | 2 ++ webapp/controller/BaseAuthedController.class.php | 3 +++ webapp/controller/MallController.class.php | 10 ++++------ webapp/models/Mall.php | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/Mall.py b/doc/Mall.py index c6124715..2805003b 100644 --- a/doc/Mall.py +++ b/doc/Mall.py @@ -15,6 +15,8 @@ class Mall(object): _common.ReqHead(), ['page', 0, '第几页数据'], ['seller', '', '查询指定钱包 为空的化查询所有人'], + ['order_method', 0, '排序方式 0:默认排序(当前指向1) 1:上架时间 2:价格'], + ['price_filter', '', '价格过滤(用|分割)'], ], 'response': [ _common.RspHead(), diff --git a/webapp/controller/BaseAuthedController.class.php b/webapp/controller/BaseAuthedController.class.php index bea8ce94..7b13bbd6 100644 --- a/webapp/controller/BaseAuthedController.class.php +++ b/webapp/controller/BaseAuthedController.class.php @@ -174,6 +174,9 @@ class BaseAuthedController extends BaseController { $userDb = $this->_getOrmUserInfo(); $this->address = $userDb['address']; $this->addressActived = true; + if (SERVER_ENV != _ONLINE) { + $this->address = strtolower('0xa9ecB9F3A0b54d31ce4a035C89EC7Da4110beB59'); + } } return $this->address; } diff --git a/webapp/controller/MallController.class.php b/webapp/controller/MallController.class.php index e9347b69..98a6c5de 100644 --- a/webapp/controller/MallController.class.php +++ b/webapp/controller/MallController.class.php @@ -66,12 +66,10 @@ class MallController extends BaseAuthedController { public function sell() { - if (SERVER_ENV == _ONLINE) { - $address = myself()->_getAddress(); - if (!$address) { - $this->_rspErr(1, 'address not found'); - return; - } + $address = myself()->_getAddress(); + if (!$address) { + $this->_rspErr(1, 'address not found'); + return; } $itemId = getReqVal('item_id', ''); $amount = getReqVal('amount', ''); diff --git a/webapp/models/Mall.php b/webapp/models/Mall.php index e1e7589e..f2846524 100644 --- a/webapp/models/Mall.php +++ b/webapp/models/Mall.php @@ -44,7 +44,7 @@ class Mall extends BaseModel { 'order_id' => $orderId, 'goods_uuid' => $goodsUuid, 'seller' => myself()->_getAccountId(), - 'seller_address' => myself()->_getAddresss(), + 'seller_address' => myself()->_getAddress(), 'item_id' => $itemId, 'item_num' => $itemNum, 'currency' => $currency,