zengyyh 4 months ago
parent 2362c158a5
commit 9d7737a32a
  1. 15
      app/admin/controller/RetailDescribe.php
  2. 78
      app/admin/controller/Wxserve.php
  3. 1
      app/admin/controller/Wxwholesaler.php
  4. 48
      app/api/controller/Retail.php
  5. 4
      app/common/enum/RetailDescribeEnum.php
  6. 4
      app/common/library/wxserver/Server.php

@ -12,6 +12,7 @@ declare (strict_types=1);
namespace app\admin\controller; namespace app\admin\controller;
use app\store\model\RetailDescribe as retDescribeModel; use app\store\model\RetailDescribe as retDescribeModel;
use app\common\enum\RetailDescribeEnum;
class RetailDescribe extends Controller class RetailDescribe extends Controller
{ {
@ -19,7 +20,10 @@ class RetailDescribe extends Controller
{ {
$model = new retDescribeModel; $model = new retDescribeModel;
$where = $this->request->get(); $where = $this->request->get();
$list = $model->getList($where); $list = $model->getList($where)->toArray();
foreach($list['data'] as &$item){
$item['plate_name'] = RetailDescribeEnum::$version[$item['plate_id']]??'';
}
return $this->renderSuccess(compact('list')); return $this->renderSuccess(compact('list'));
} }
@ -47,4 +51,13 @@ class RetailDescribe extends Controller
return $this->renderError($model->getError() ?: '删除失败'); return $this->renderError($model->getError() ?: '删除失败');
} }
public function getPlate(){
$list1 = RetailDescribeEnum::$version;
$list = [];
foreach($list1 as $key => $value){
$list[] = ['id' => $key, 'name' => $value];
};
return $this->renderSuccess(compact('list'));
}
} }

@ -260,4 +260,82 @@ class Wxserve extends Controller
} }
return $this->renderError($msg); return $this->renderError($msg);
} }
/**
* @notes:设置域名
* @return Json
* @author: wanghousheng
*/
public function setDomain(): Json
{
$msg = 'appid不能为空';
$domain = $this->request->domain(true);
$appid = $this->request->get('appid', $domain);
if ($appid) {
$obj = new Server();
$msg = $obj->setDomain($appid, $domain);
if ($msg == 'ok') {
return $this->renderSuccess('success');
}
}
return $this->renderError($msg);
}
/**
* @notes:设置隐私
* @return Json
* @author: wanghousheng
*/
public function privacySetting(): Json
{
$msg = 'appid不能为空';
$appid = $this->request->get('appid');
if ($appid) {
$obj = new Server();
$msg = $obj->getPrivacySetting($appid);
if ($msg == 'ok') {
return $this->renderSuccess('success');
}
}
return $this->renderError($msg);
}
/**
* @notes:设置业务域名
* @return Json
* @author: wanghousheng
*/
public function modifyJumpDomain(): Json
{
$msg = 'appid不能为空';
$domain = $this->request->domain(true);
$appid = $this->request->get('appid');
if ($appid) {
$obj = new Server();
$msg = $obj->modifyJumpDomain($appid, $domain);
if ($msg == 'ok') {
return $this->renderSuccess('success');
}
}
return $this->renderError($msg);
}
/**
* @notes:设置订单页
* @return Json
* @author: wanghousheng
*/
public function setOrderPath(): Json
{
$msg = 'appid不能为空';
$appid = $this->request->get('appid');
if ($appid) {
$obj = new Server();
$msg = $obj->applySetOrderPathInfo([$appid]);
if ($msg == 'ok') {
return $this->renderSuccess('success');
}
}
return $this->renderError($msg);
}
} }

@ -4,6 +4,7 @@ declare (strict_types=1);
namespace app\admin\controller; namespace app\admin\controller;
use app\common\library\wxserver\Wholesaler; use app\common\library\wxserver\Wholesaler;
use app\common\library\wxserver\Server;
use app\job\controller\Wxholesaler as WxserverJob; use app\job\controller\Wxholesaler as WxserverJob;
use PHPQRCode\QRcode; use PHPQRCode\QRcode;
use think\db\exception\DbException; use think\db\exception\DbException;

@ -31,7 +31,8 @@ class Retail extends Controller
*/ */
public function list(int $retailType): Json public function list(int $retailType): Json
{ {
$list = RetailModel::withoutGlobalScope()->where('retail_type',$retailType)->where('retail_status',10)->select(); $list = RetailModel::withoutGlobalScope()->where('retail_type',$retailType)->where('retail_status',10)
->order(['sort' => 'asc','create_time' => 'asc'])->select();;
return $this->renderSuccess(compact('list')); return $this->renderSuccess(compact('list'));
} }
@ -99,39 +100,18 @@ class Retail extends Controller
<p> <p>
10-促进本地商家联盟数字化平台化发展 10-促进本地商家联盟数字化平台化发展
</p>'; </p>';
$list['wholesale'] = '<p> $list['wholesale'] = '<div style="text-align: left;">
1-采购代发商家实名注册认证,在线直接下单 <p>1-采购代发商家实名注册认证,在线直接下单</p>
</p> <p>2-认证商家、服务商数字化管理</p>
<p> <p>3-所有订单,发货记录,物流状态实时查询</p>
2-认证商家、服务商数字化管理 <p>4-所有调货记录在线实时查看</p>
</p> <p>5-审单实时做电话、地址校验比对,避免平台单</p>
<p> <p>6-供应链资源快速对接</p>
3-所有订单,发货记录,物流状态实时查询 <p>7-商品数据快速上架,商城之间商品数据实时传输</p>
</p> <p>8-商品市场价实时自动更新</p>
<p> <p>9-货款到账时间支持当天或隔天,支付费率低 至千分之 2.x</p>
4-所有调货记录在线实时查看 <p>10-供应商、服务商入驻,销售和推广效益提升</p>
</p> </div>';
<p>
5-审单实时做电话、地址校验比对,避免平台单
</p>
<p>
6-供应链资源快速对接
</p>
<p>
7-商品数据快速上架,商城之间商品数据实时传输
</p>
<p>
8-商品市场价实时自动更新
</p>
<p>
9-货款到账时间支持当天或隔天,支付费率低&nbsp; &nbsp;&nbsp;
</p>
<p>
&nbsp; &nbsp;至千分之2.x
</p>
<p>
10-供应商、服务商入驻,销售和推广效益提升
</p>';
return $this->renderSuccess(compact('list')); return $this->renderSuccess(compact('list'));
} }

@ -18,6 +18,8 @@ class RetailDescribeEnum extends EnumBasics
const MULTI_MERCHANT = 11; const MULTI_MERCHANT = 11;
const CONTENT_MANAGEMENT = 12; const CONTENT_MANAGEMENT = 12;
const OTHER_FEATURES = 13; const OTHER_FEATURES = 13;
const BUYER = 14; // 采购商
const SERVICE_PROVIDER = 15; // 服务商
public static $version = [ public static $version = [
self::GOODS => "商品", self::GOODS => "商品",
@ -33,6 +35,8 @@ class RetailDescribeEnum extends EnumBasics
self::MULTI_MERCHANT => "多商户", self::MULTI_MERCHANT => "多商户",
self::CONTENT_MANAGEMENT => "内容管理", self::CONTENT_MANAGEMENT => "内容管理",
self::OTHER_FEATURES => "其他功能", self::OTHER_FEATURES => "其他功能",
self::BUYER => "采购商",
self::SERVICE_PROVIDER => "服务商"
]; ];
private function __construct() { private function __construct() {

@ -656,7 +656,7 @@ class Server
} }
} }
private function modifyJumpDomain($appid, $domain): bool public function modifyJumpDomain($appid, $domain): bool
{ {
$token = $this->authorizerAccessToken($appid); $token = $this->authorizerAccessToken($appid);
if ($token) { if ($token) {
@ -665,6 +665,8 @@ class Server
$data['action'] = 'set'; $data['action'] = 'set';
$data['webviewdomain'] = $domain; $data['webviewdomain'] = $domain;
$result = $this->curlPost($url, json_encode($data)); $result = $this->curlPost($url, json_encode($data));
print_r($result);
exit;
$result = json_decode($result, true); $result = json_decode($result, true);
if ($result && !empty($result['errmsg']) && $result['errmsg'] == 'ok') { if ($result && !empty($result['errmsg']) && $result['errmsg'] == 'ok') {
return true; return true;

Loading…
Cancel
Save