修改api
This commit is contained in:
@@ -51,6 +51,7 @@ STOCK_WARN_THRESHOLD=10
|
||||
# 微信支付
|
||||
WECHAT_MCH_ID=
|
||||
WECHAT_API_KEY=
|
||||
# WECHAT_NOTIFY_URL=http://110.42.255.239:3006/api/payment/notify
|
||||
WECHAT_NOTIFY_URL=https://donghy.top/api/payment/notify
|
||||
WECHAT_CERT_PATH=
|
||||
WECHAT_KEY_PATH=
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// 服务端域名配置 - 从环境变量读取,默认正式域名
|
||||
const BASE_URL = process.env.BASE_URL || 'https://donghy.top'
|
||||
// 服务端域名配置 - 从环境变量读取,默认临时域名(备案期间)
|
||||
const BASE_URL = process.env.BASE_URL || 'http://110.42.255.239:3006'
|
||||
|
||||
const DOMAIN_CONFIG = {
|
||||
BASE_URL: BASE_URL,
|
||||
|
||||
@@ -7,11 +7,10 @@ async function getHomeCategories(ctx) {
|
||||
hc.sort_order,
|
||||
c.id as category_id,
|
||||
c.name as category_name,
|
||||
c.icon as category_icon,
|
||||
c.image as category_image
|
||||
c.icon as category_icon
|
||||
FROM home_categories hc
|
||||
LEFT JOIN categories c ON hc.category_id = c.id
|
||||
WHERE hc.is_enabled = 1 AND c.status = 1
|
||||
WHERE hc.is_enabled = 1 AND c.is_show = 1
|
||||
ORDER BY hc.sort_order ASC
|
||||
`
|
||||
|
||||
@@ -21,7 +20,6 @@ async function getHomeCategories(ctx) {
|
||||
id: item.category_id,
|
||||
name: item.category_name,
|
||||
icon: item.category_icon,
|
||||
image: item.category_image,
|
||||
sortOrder: item.sort_order
|
||||
}))
|
||||
|
||||
@@ -60,7 +58,7 @@ async function updateHomeCategories(ctx) {
|
||||
}
|
||||
|
||||
async function getAllCategoriesForConfig(ctx) {
|
||||
const categories = await query('SELECT id, name, icon, image FROM categories WHERE status = 1 ORDER BY sort_order ASC')
|
||||
const categories = await query('SELECT id, name, icon, image FROM categories WHERE is_show = 1 ORDER BY sort_order ASC')
|
||||
const homeCategories = await query('SELECT category_id, sort_order, is_enabled FROM home_categories')
|
||||
|
||||
const homeMap = {}
|
||||
|
||||
Reference in New Issue
Block a user