Browse Source

支付

master
jianglong 3 years ago
parent
commit
2340207805
  1. 8
      .env
  2. 12
      app/api/logic/IndexLogic.php
  3. 2
      app/common/enum/AdEnum.php
  4. 22
      app/common/enum/MenuEnum.php

8
.env

@ -3,12 +3,14 @@ app_debug = "false"
charset = "utf8mb4" charset = "utf8mb4"
database = "ahbcqz" database = "ahbcqz"
debug = "1" debug = "1"
hostname = "122.114.59.173" # hostname = "122.114.59.173"
hostname = "127.0.0.1"
hostport = "3306" hostport = "3306"
password = "DP3hD2E8tTCAJcZF" # password = "DP3hD2E8tTCAJcZF"
password = "123456"
prefix = "ls_" prefix = "ls_"
type = "mysql" type = "mysql"
username = "ahbcqz" username = "root"
[project] [project]
admin_name = "博创设计" admin_name = "博创设计"

12
app/api/logic/IndexLogic.php

@ -297,8 +297,18 @@ class IndexLogic extends Logic
$city = DevRegion::where('id',$city)->field('db09_lng,db09_lat')->findOrEmpty()->toArray(); $city = DevRegion::where('id',$city)->field('db09_lng,db09_lat')->findOrEmpty()->toArray();
// $shopLists = Db::name('shop')
// ->field('id,name,logo,background,expire_time,cover,banner,visited_num,longitude,latitude,round(st_distance_sphere(point('.$city['db09_lng'].','.$city['db09_lat'].'),point(longitude, latitude)),2) as distance')
// ->where($where)
// ->order('distance asc')
// ->limit(5)
// ->select()
// ->toArray();
$shopLists = Db::name('shop') $shopLists = Db::name('shop')
->field('id,name,logo,background,expire_time,cover,banner,visited_num,longitude,latitude,round(st_distance_sphere(point('.$city['db09_lng'].','.$city['db09_lat'].'),point(longitude, latitude)),2) as distance') ->field('id,name,logo,background,expire_time,cover,banner,visited_num,longitude,latitude,ROUND(ACOS(SIN(RADIANS('.$city['db09_lat'].')) * SIN(RADIANS(latitude)) +
COS(RADIANS('.$city['db09_lat'].')) * COS(RADIANS(latitude)) *
COS(RADIANS('.$city['db09_lng'].' - longitude))) * 6371,2) AS distance ' )
->where($where) ->where($where)
->order('distance asc') ->order('distance asc')
->limit(5) ->limit(5)

2
app/common/enum/AdEnum.php

@ -52,7 +52,7 @@ class AdEnum{
[ [
'name' => '商品分类', 'name' => '商品分类',
'path' => '/pages/goods_cate/goods_cate', 'path' => '/pages/goods_cate/goods_cate',
'is_tab' => 1, 'is_tab' => 0,
], ],
[ [
'name' => '领券中心', 'name' => '领券中心',

22
app/common/enum/MenuEnum.php

@ -97,7 +97,7 @@ class MenuEnum{
'index' => 110, 'index' => 110,
'name' => '商品分类', 'name' => '商品分类',
'link' => '/pages/goods_cate/goods_cate', 'link' => '/pages/goods_cate/goods_cate',
'is_tab' => 1, 'is_tab' => 0,
'link_type' => 1, 'link_type' => 1,
], ],
// //积分抽奖 // //积分抽奖
@ -129,7 +129,7 @@ class MenuEnum{
'index' => 114, 'index' => 114,
'name' => '商铺街', 'name' => '商铺街',
'link' => '/pages/shop_street/shop_street', 'link' => '/pages/shop_street/shop_street',
'is_tab' => 0, 'is_tab' => 1,
'link_type' => 1, 'link_type' => 1,
], ],
//商家入驻 //商家入驻
@ -185,7 +185,15 @@ class MenuEnum{
'index' => 121, 'index' => 121,
'name' => '投诉中心', 'name' => '投诉中心',
'link' => '/bundle/pages/user/complain', 'link' => '/bundle/pages/user/complain',
'is_tab' => 1, 'is_tab' => 0,
'link_type' => 1,
],
//资料库
[
'index' => 122,
'name' => '资料库',
'link' => '/pages/resource_list/resource_list',
'is_tab' => 0,
'link_type' => 1, 'link_type' => 1,
] ]
]; ];
@ -296,6 +304,14 @@ class MenuEnum{
'is_tab' => 0, 'is_tab' => 0,
'link_type' => 1, 'link_type' => 1,
'menu_type' => 1, 'menu_type' => 1,
],
[
'index' => 1002,
'name' => '资料库',
'link' => '/pages/resource_list/resource_list',
'is_tab' => 1,
'link_type' => 1,
'menu_type' => 1,
] ]
]; ];

Loading…
Cancel
Save