2024-08-03 10:04:14 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace app\api\controller;
|
|
|
|
|
|
2024-09-29 15:48:09 +08:00
|
|
|
use app\api\logic\LocalStoreLogic;
|
2024-08-03 10:04:14 +08:00
|
|
|
use app\common\basics\Api;
|
2024-08-26 17:32:19 +08:00
|
|
|
use app\common\enum\NoticeEnum;
|
2024-08-03 10:04:14 +08:00
|
|
|
use app\common\model\user\User;
|
2024-09-29 13:56:19 +08:00
|
|
|
use app\common\server\ConfigServer;
|
2024-08-03 10:04:14 +08:00
|
|
|
use app\common\server\JsonServer;
|
|
|
|
|
use app\common\server\WeChatServer;
|
2024-09-29 17:34:12 +08:00
|
|
|
use app\common\model\LocalStorePostStation;
|
2024-08-03 10:04:14 +08:00
|
|
|
use EasyWeChat\Factory;
|
|
|
|
|
use think\facade\Config as FileConfig;
|
2024-09-29 15:48:09 +08:00
|
|
|
use think\facade\Db;
|
2024-08-03 10:04:14 +08:00
|
|
|
|
|
|
|
|
class LocalStore extends Api
|
|
|
|
|
{
|
2024-09-29 17:23:43 +08:00
|
|
|
public $like_not_need_login = ['makeMyPayImage', 'getLocalShopById', 'getLocalList', 'getLocation'];
|
2024-09-02 16:47:29 +08:00
|
|
|
|
2024-08-03 10:04:14 +08:00
|
|
|
public function getLocalStore()
|
|
|
|
|
{
|
2024-09-05 22:10:46 +08:00
|
|
|
$lstore_id = $this->request->post('lstore_id');
|
2024-08-03 10:04:14 +08:00
|
|
|
$user_id = $this->user_id;
|
2024-09-05 22:10:46 +08:00
|
|
|
if ($lstore_id) {
|
|
|
|
|
$result = Db::name("local_store")->where(['lstore_id' => $lstore_id, "user_id" => $user_id])->find();
|
|
|
|
|
} else {
|
|
|
|
|
$result = Db::name("local_store")->where("user_id", $user_id)->select()->toArray();
|
|
|
|
|
}
|
2024-08-03 10:04:14 +08:00
|
|
|
$data['local'] = $result;
|
|
|
|
|
$data['set_state'] = 1;
|
2024-09-29 15:48:09 +08:00
|
|
|
return JsonServer::success('查询成功', $data);
|
2024-08-03 10:04:14 +08:00
|
|
|
}
|
2024-09-29 15:48:09 +08:00
|
|
|
|
2024-08-10 10:18:04 +08:00
|
|
|
// 查询本地商家
|
2024-09-29 15:48:09 +08:00
|
|
|
public function getLocalList()
|
|
|
|
|
{
|
2024-08-10 10:18:04 +08:00
|
|
|
$model = new LocalStoreLogic;
|
|
|
|
|
$data = $this->request->param();
|
|
|
|
|
$result = $model->getLocalList($data);
|
2024-09-29 15:48:09 +08:00
|
|
|
return JsonServer::success('查询成功', $result);
|
2024-08-10 10:18:04 +08:00
|
|
|
}
|
2024-09-29 15:48:09 +08:00
|
|
|
|
2024-09-30 09:50:50 +08:00
|
|
|
// 查询店铺街
|
|
|
|
|
public function getStreetlList() {
|
|
|
|
|
$data = $this->request->param();
|
|
|
|
|
$result = (new LocalStoreLogic)->getStreetlList($data);
|
|
|
|
|
return JsonServer::success('查询成功', $result);
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-11 16:58:13 +08:00
|
|
|
// 查询本地商户订单
|
2024-09-29 15:48:09 +08:00
|
|
|
public function getLocalOrderList()
|
|
|
|
|
{
|
2024-08-11 16:58:13 +08:00
|
|
|
$model = new LocalStoreLogic;
|
|
|
|
|
$data = $this->request->param();
|
|
|
|
|
$result = $model->getLocalOrderList($data);
|
2024-09-29 15:48:09 +08:00
|
|
|
return JsonServer::success('查询成功', $result);
|
2024-08-11 16:58:13 +08:00
|
|
|
}
|
2024-09-29 15:48:09 +08:00
|
|
|
|
2024-08-12 10:31:55 +08:00
|
|
|
// 查询本地商户用户订单
|
2024-09-29 15:48:09 +08:00
|
|
|
public function getLocalUserOrderList()
|
|
|
|
|
{
|
2024-08-12 10:31:55 +08:00
|
|
|
$model = new LocalStoreLogic;
|
|
|
|
|
$data = $this->request->param();
|
|
|
|
|
$user_id = $this->user_id;
|
|
|
|
|
$data['user_id'] = $user_id;
|
|
|
|
|
$result = $model->getLocalUserOrderList($data);
|
2024-09-29 15:48:09 +08:00
|
|
|
return JsonServer::success('查询成功', $result);
|
2024-08-12 10:31:55 +08:00
|
|
|
}
|
2024-09-29 15:48:09 +08:00
|
|
|
|
2024-08-03 10:04:14 +08:00
|
|
|
public function addLocalStore()
|
|
|
|
|
{
|
|
|
|
|
$user_id = $this->user_id;
|
|
|
|
|
$data = $this->request->param();
|
2024-09-29 15:48:09 +08:00
|
|
|
if (isset($data['lstore_id']) && $data['lstore_id'] != 0) {
|
2024-09-03 18:32:55 +08:00
|
|
|
$data['store_state'] = 0;
|
|
|
|
|
$data['update_time'] = date("Y-m-d H:i:s");
|
2024-09-29 15:48:09 +08:00
|
|
|
$result = Db::name("local_store")->where("lstore_id", $data['lstore_id'])->save($data);
|
|
|
|
|
} else {
|
2024-09-03 18:32:55 +08:00
|
|
|
$data['user_id'] = $user_id;
|
|
|
|
|
$data['create_time'] = date("Y-m-d H:i:s");
|
|
|
|
|
$result = Db::name("local_store")->save($data);
|
2024-08-03 10:04:14 +08:00
|
|
|
}
|
2024-08-27 09:24:19 +08:00
|
|
|
|
2024-09-29 15:48:09 +08:00
|
|
|
if ($result) {
|
2024-09-03 18:32:55 +08:00
|
|
|
event('Notice', [
|
|
|
|
|
'scene' => NoticeEnum::LOCAL_SHOP_SETTLED_NOTICE,
|
|
|
|
|
'mobile' => 18436015360, // 张慧娟的手机号码
|
|
|
|
|
'params' => [
|
|
|
|
|
'user_id' => $this->user_id,
|
|
|
|
|
'shopName' => $data['shopName'],
|
|
|
|
|
]
|
|
|
|
|
]);
|
2024-08-03 10:04:14 +08:00
|
|
|
return JsonServer::success('上传成功');
|
2024-09-29 15:48:09 +08:00
|
|
|
} else {
|
2024-08-03 10:04:14 +08:00
|
|
|
return JsonServer::error('上传失败');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 查询协议
|
|
|
|
|
public function checkTreaty()
|
|
|
|
|
{
|
2024-09-29 15:48:09 +08:00
|
|
|
$result = Db::name("procurement_treaty")->where("id", 1)->find();
|
|
|
|
|
return JsonServer::success('查询成功', $result);
|
2024-08-03 10:04:14 +08:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取本地生活商家列表
|
|
|
|
|
public function getLocalStoreList()
|
|
|
|
|
{
|
|
|
|
|
$page = $this->request->get('page_no', $this->page_no);
|
|
|
|
|
$size = $this->request->get('page_size', $this->page_size);
|
|
|
|
|
$lists = Db::name('local_store')
|
2024-09-05 23:23:46 +08:00
|
|
|
->where(['user_id' => $this->user_id, 'store_state' => 1, 'is_delete' => 0])
|
2024-08-03 10:04:14 +08:00
|
|
|
->order('create_time', 'desc')
|
2024-09-29 15:48:09 +08:00
|
|
|
->page($page, $size)
|
2024-08-03 10:04:14 +08:00
|
|
|
->select()
|
|
|
|
|
->toArray();
|
|
|
|
|
|
|
|
|
|
$count = Db::name('local_store')
|
2024-09-29 15:48:09 +08:00
|
|
|
->where(['user_id' => $this->user_id, 'store_state' => 1, 'is_delete' => 0])
|
2024-08-03 10:04:14 +08:00
|
|
|
->count();
|
|
|
|
|
|
|
|
|
|
$more = is_more($count, $page, $size); //是否有下一页
|
|
|
|
|
$data = [
|
|
|
|
|
'list' => $lists,
|
|
|
|
|
'page_no' => $page,
|
|
|
|
|
'page_size' => $size,
|
|
|
|
|
'count' => $count,
|
|
|
|
|
'more' => $more,
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
return JsonServer::success('查询成功', $data);
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-07 09:17:18 +08:00
|
|
|
// 获取本地生活商家列表
|
|
|
|
|
public function getLocalAllStoreList()
|
|
|
|
|
{
|
|
|
|
|
$page = $this->request->get('page_no', $this->page_no);
|
|
|
|
|
$size = $this->request->get('page_size', $this->page_size);
|
|
|
|
|
$lists = Db::name('local_store')
|
|
|
|
|
->where(['store_state' => 1])
|
|
|
|
|
->order('create_time', 'desc')
|
2024-09-29 15:48:09 +08:00
|
|
|
->page($page, $size)
|
2024-08-07 09:17:18 +08:00
|
|
|
->select()
|
|
|
|
|
->toArray();
|
|
|
|
|
|
|
|
|
|
foreach ($lists as &$v) {
|
|
|
|
|
if (!empty($v['header_image'])) {
|
|
|
|
|
$v['header_image'] = FileConfig::get('aliyunoss.domain') . 'local_life_shop/' . $v['header_image'];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$count = Db::name('local_store')
|
|
|
|
|
->where(['user_id' => $this->user_id, 'store_state' => 1])
|
|
|
|
|
->count();
|
|
|
|
|
|
|
|
|
|
$more = is_more($count, $page, $size); //是否有下一页
|
|
|
|
|
$data = [
|
|
|
|
|
'list' => $lists,
|
|
|
|
|
'page_no' => $page,
|
|
|
|
|
'page_size' => $size,
|
|
|
|
|
'count' => $count,
|
|
|
|
|
'more' => $more,
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
return JsonServer::success('查询成功', $data);
|
|
|
|
|
}
|
2024-09-29 15:48:09 +08:00
|
|
|
|
2024-08-03 10:04:14 +08:00
|
|
|
/**
|
|
|
|
|
*生成本地商家支付二维码
|
|
|
|
|
*/
|
2024-09-29 15:48:09 +08:00
|
|
|
public function makeMyPayImage()
|
|
|
|
|
{
|
2024-08-03 10:04:14 +08:00
|
|
|
// $user_id = 2;
|
|
|
|
|
$user_id = $this->user_id;
|
|
|
|
|
$lstore_id = $this->request->post('lstore_id');
|
2024-09-29 15:48:09 +08:00
|
|
|
$user_msg = User::where("id", $user_id)->where("del", 0)->where("disable", 0)->find();
|
|
|
|
|
if ($user_msg == null) {
|
2024-08-03 10:04:14 +08:00
|
|
|
return JsonServer::error('暂无用户');
|
|
|
|
|
}
|
2024-09-29 15:48:09 +08:00
|
|
|
$user_local_msg = Db::name("local_store")->where("user_id", $user_id)->where("store_state", 1)->find();
|
|
|
|
|
if ($user_local_msg != null) {
|
|
|
|
|
if ($user_local_msg['pay_image'] != null) {
|
2024-08-03 10:04:14 +08:00
|
|
|
$data['pay_image'] = $user_local_msg['pay_image'];
|
2024-09-29 15:48:09 +08:00
|
|
|
return JsonServer::success('查询成功', $data);
|
|
|
|
|
} else {
|
2024-08-03 10:04:14 +08:00
|
|
|
$url = "bundle_b/pages/local_shop/local_pay";
|
2024-09-29 15:48:09 +08:00
|
|
|
$save_dir = ROOT_PATH . '/uploads/localpay/';
|
|
|
|
|
$scene = 'lid=' . $lstore_id;
|
|
|
|
|
$a = time() . $scene;
|
2024-08-03 10:04:14 +08:00
|
|
|
$qr_src = $a . '.jpg';
|
|
|
|
|
}
|
2024-09-29 15:48:09 +08:00
|
|
|
} else {
|
2024-08-03 10:04:14 +08:00
|
|
|
$url = "bundle_b/pages/local_shop/local_pay";
|
2024-09-29 15:48:09 +08:00
|
|
|
$save_dir = ROOT_PATH . '/uploads/localpay/';
|
|
|
|
|
$scene = 'lid=' . $lstore_id;
|
|
|
|
|
$a = time() . $scene;
|
2024-08-03 10:04:14 +08:00
|
|
|
$qr_src = $a . '.jpg';
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
$config = WeChatServer::getMnpConfig();
|
|
|
|
|
$app = Factory::miniProgram($config);
|
|
|
|
|
|
|
|
|
|
$response = $app->app_code->getUnlimit($scene, [
|
2024-09-29 15:48:09 +08:00
|
|
|
'page' => $url
|
2024-08-03 10:04:14 +08:00
|
|
|
// 'env_version' => 'trial',
|
2024-08-10 14:52:26 +08:00
|
|
|
// 'env_version' => 'develop'
|
2024-08-03 10:04:14 +08:00
|
|
|
]);
|
|
|
|
|
// print_r("<pre>");
|
|
|
|
|
// var_dump($response);die;
|
|
|
|
|
if ($response instanceof \EasyWeChat\Kernel\Http\StreamResponse) {
|
|
|
|
|
$response->saveAs($save_dir, $a);
|
|
|
|
|
$us = \think\facade\Request::instance()->domain();
|
2024-09-29 15:48:09 +08:00
|
|
|
$data['pay_image'] = $us . '/uploads/localpay/' . $qr_src;
|
|
|
|
|
$user_msg = Db::name("local_store")->where("lstore_id", $lstore_id)->update($data);
|
|
|
|
|
if ($user_msg) {
|
|
|
|
|
return JsonServer::success('查询成功', $data);
|
|
|
|
|
} else {
|
2024-08-03 10:04:14 +08:00
|
|
|
return JsonServer::error('查询失败');
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-09-29 15:48:09 +08:00
|
|
|
if (isset($response['errcode']) && 41030 === $response['errcode']) {
|
2024-08-03 10:04:14 +08:00
|
|
|
return '商城小程序未上线或商城小程序页面发布';
|
|
|
|
|
}
|
|
|
|
|
return $response['errmsg'];
|
2024-09-29 15:48:09 +08:00
|
|
|
} catch (\EasyWeChat\Kernel\Exceptions\Exception $e) {
|
2024-08-03 10:04:14 +08:00
|
|
|
return $e->getMessage();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getLocalShopById()
|
|
|
|
|
{
|
|
|
|
|
$id = $this->request->post('id');
|
2024-09-29 15:48:09 +08:00
|
|
|
$latitude = $this->request->post('latitude', 0);
|
|
|
|
|
$longitude = $this->request->post('longitude', 0);
|
|
|
|
|
$type = $this->request->post('type', 0);
|
2024-08-13 09:28:28 +08:00
|
|
|
$user_id = $this->user_id;
|
|
|
|
|
$u = "";
|
2024-09-29 15:48:09 +08:00
|
|
|
if ($type == 0) {
|
2024-08-13 09:28:28 +08:00
|
|
|
$u = "user_id = $user_id";
|
|
|
|
|
}
|
2024-08-03 10:04:14 +08:00
|
|
|
$result = Db::name('local_store')
|
2024-09-29 15:48:09 +08:00
|
|
|
->where('lstore_id', $id)
|
|
|
|
|
->where('store_state', 1)
|
2024-08-13 09:28:28 +08:00
|
|
|
->where($u)
|
2024-08-13 09:41:33 +08:00
|
|
|
->order('create_time desc')
|
2024-08-03 10:04:14 +08:00
|
|
|
->find();
|
2024-09-29 15:48:09 +08:00
|
|
|
if ($result) {
|
|
|
|
|
$model = new LocalStoreLogic;
|
|
|
|
|
$result['distance'] = round($model->distance($result['latitude'], $result['longitude'], $latitude, $longitude) / 1000, 2) . "公里";
|
|
|
|
|
$result['header_image'] = FileConfig::get('aliyunoss.domain') . 'local_life_shop/' . $result['header_image'];
|
2024-10-01 16:18:36 +08:00
|
|
|
$result['post_station'] = LocalStorePostStation::where(['lstore_id' => $id, 'is_delete' => 0])->field('id, province, city, area, address, lat,lng')->select()->toArray();
|
2024-08-03 10:04:14 +08:00
|
|
|
return JsonServer::success('成功获取', $result);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return JsonServer::error('获取失败');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function editLocaShopInfo()
|
|
|
|
|
{
|
|
|
|
|
$id = $this->request->post('id');
|
|
|
|
|
$header_image = $this->request->post('header_image');
|
|
|
|
|
$store_name = $this->request->post('store_name');
|
|
|
|
|
$result = false;
|
|
|
|
|
|
|
|
|
|
if ($id && $header_image) {
|
|
|
|
|
$result = Db::name('local_store')
|
|
|
|
|
->where(['lstore_id' => $id, 'user_id' => $this->user_id])
|
2024-08-23 17:44:07 +08:00
|
|
|
->update(['shopLogo' => $header_image, 'update_time' => date('Y-m-d H:i:s')]);
|
2024-08-03 10:04:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($id && $store_name) {
|
|
|
|
|
$result = Db::name('local_store')
|
|
|
|
|
->where(['lstore_id' => $id, 'user_id' => $this->user_id])
|
2024-08-23 17:34:50 +08:00
|
|
|
->update(['shopName' => $store_name, 'update_time' => date('Y-m-d H:i:s')]);
|
2024-08-03 10:04:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($result) {
|
|
|
|
|
return JsonServer::success('修改成功');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return JsonServer::error('修改失败');
|
|
|
|
|
}
|
2024-09-05 16:31:02 +08:00
|
|
|
|
|
|
|
|
// 本地商家提交记录
|
|
|
|
|
public function record()
|
|
|
|
|
{
|
|
|
|
|
$page = $this->request->get('page_no', $this->page_no);
|
|
|
|
|
$size = $this->request->get('page_size', $this->page_size);
|
|
|
|
|
$data = LocalStoreLogic::record($page, $size, $this->user_id);
|
|
|
|
|
return JsonServer::success('查询成功', $data);
|
|
|
|
|
}
|
2024-09-29 13:56:19 +08:00
|
|
|
|
2024-09-16 15:40:03 +08:00
|
|
|
//下单购买商品
|
2024-09-29 15:48:09 +08:00
|
|
|
public function submitLocalOrder()
|
|
|
|
|
{
|
2024-09-16 15:40:03 +08:00
|
|
|
$post = $this->request->post();
|
|
|
|
|
$user_id = $this->user_id;
|
2024-09-29 15:48:09 +08:00
|
|
|
$data = LocalStoreLogic::submitOrder($post, $user_id);
|
|
|
|
|
if ($data === -1) {
|
2024-09-16 15:50:39 +08:00
|
|
|
return JsonServer::error('库存不足');
|
2024-09-16 15:40:03 +08:00
|
|
|
}
|
|
|
|
|
return JsonServer::success('下单成功', $data);
|
|
|
|
|
}
|
2024-09-29 13:56:19 +08:00
|
|
|
|
2024-09-16 15:40:03 +08:00
|
|
|
// 订单详情
|
2024-09-29 15:48:09 +08:00
|
|
|
public function localOrderDetails()
|
|
|
|
|
{
|
2024-09-16 15:40:03 +08:00
|
|
|
$post = $this->request->post();
|
|
|
|
|
$data = LocalStoreLogic::orderDetails($post);
|
|
|
|
|
return JsonServer::success('查询成功', $data);
|
|
|
|
|
}
|
2024-09-29 13:56:19 +08:00
|
|
|
|
2024-09-16 17:21:05 +08:00
|
|
|
// 取消订单
|
2024-09-29 15:48:09 +08:00
|
|
|
public function cancelLocalOrder()
|
|
|
|
|
{
|
2024-09-16 17:21:05 +08:00
|
|
|
$post = $this->request->post();
|
|
|
|
|
$data = LocalStoreLogic::cancelOrder($post);
|
2024-09-29 15:48:09 +08:00
|
|
|
if ($data) {
|
2024-09-16 17:21:05 +08:00
|
|
|
return JsonServer::success('取消成功');
|
2024-09-29 15:48:09 +08:00
|
|
|
} else {
|
2024-09-16 17:21:05 +08:00
|
|
|
return JsonServer::error('取消失败');
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-09-29 13:56:19 +08:00
|
|
|
|
|
|
|
|
// 我的订单
|
2024-09-29 15:48:09 +08:00
|
|
|
public function localMyOrderList()
|
|
|
|
|
{
|
2024-09-16 21:53:19 +08:00
|
|
|
$post = $this->request->post();
|
|
|
|
|
$user_id = $this->user_id;
|
|
|
|
|
$post['user_id'] = $user_id;
|
|
|
|
|
$data = LocalStoreLogic::myOrderList($post);
|
|
|
|
|
return JsonServer::success('查询成功', $data);
|
|
|
|
|
}
|
2024-09-29 13:56:19 +08:00
|
|
|
|
2024-09-16 21:53:19 +08:00
|
|
|
// 店铺订单列表
|
2024-09-29 15:48:09 +08:00
|
|
|
public function localOrderList()
|
|
|
|
|
{
|
2024-09-16 21:53:19 +08:00
|
|
|
$post = $this->request->post();
|
|
|
|
|
$data = LocalStoreLogic::orderList($post);
|
|
|
|
|
return JsonServer::success('查询成功', $data);
|
|
|
|
|
}
|
2024-09-29 13:56:19 +08:00
|
|
|
|
|
|
|
|
// 腾讯地图逆编码
|
|
|
|
|
public function getLocation()
|
|
|
|
|
{
|
2024-09-29 14:11:38 +08:00
|
|
|
try {
|
|
|
|
|
$post = $this->request->post();
|
|
|
|
|
$url = 'https://apis.map.qq.com/ws/geocoder/v1?key=' . ConfigServer::get('map', 'tx_map_key') . '&address=' . $post['address'];
|
|
|
|
|
$result = file_get_contents($url);
|
|
|
|
|
$data = json_decode($result, true);
|
|
|
|
|
if ($data['message'] == 'Success') {
|
|
|
|
|
return JsonServer::success('', $data['result']['location']);
|
|
|
|
|
}
|
2024-09-29 15:48:09 +08:00
|
|
|
} catch (\Exception $e) {
|
2024-09-29 14:11:38 +08:00
|
|
|
return JsonServer::error($e->getMessage());
|
2024-09-29 13:56:19 +08:00
|
|
|
}
|
|
|
|
|
}
|
2024-09-29 15:14:04 +08:00
|
|
|
|
|
|
|
|
// 设置自提站点
|
2024-09-29 17:14:43 +08:00
|
|
|
public function addPostStation()
|
2024-09-29 15:14:04 +08:00
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
$post = $this->request->post();
|
2024-09-29 17:14:43 +08:00
|
|
|
LocalStoreLogic::addPostStation($post, $this->user_id);
|
2024-09-29 15:28:27 +08:00
|
|
|
return JsonServer::success('设置成功');
|
2024-09-29 15:48:09 +08:00
|
|
|
} catch (\Exception $e) {
|
2024-09-29 15:14:04 +08:00
|
|
|
return JsonServer::error($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-09-29 17:53:43 +08:00
|
|
|
|
|
|
|
|
public function delPostStation()
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
$post = $this->request->post();
|
|
|
|
|
LocalStoreLogic::delPostStation($post, $this->user_id);
|
|
|
|
|
return JsonServer::success('设置成功');
|
|
|
|
|
} catch (\Exception $e) {
|
|
|
|
|
return JsonServer::error($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-08-03 10:04:14 +08:00
|
|
|
}
|