我正在尝试在此网站的导航栏中添加一个下拉菜单(http://thrivematching.com/)
登录下拉列表在主页上起作用,但是当您导航到其他页面时,它没有响应!有人可以帮我解决这个问题吗?我在其他页面上使用的代码与首页上相同。
道歉 stackOverflow显示我的代码很奇怪。因此,如果您可以在浏览器中检查页面,那就太好了。
答案 0 :(得分:0)
此下拉列表使用了一个名为WITH gdp AS (
SELECT
SUM(du + de + sc + 1) AS gdp
FROM (
SELECT
(
CASE WHEN description IS NOT NULL THEN
0.5
ELSE
0
END) AS "de",
(
CASE WHEN duration IS NOT NULL THEN
0.5
ELSE
0
END) AS "du",
(
CASE WHEN shipping_cost IS NOT NULL THEN
2.0
ELSE
0
END) AS "sc"
FROM
products
WHERE
id = :product_id) AS a
),
td AS (
SELECT
COUNT(*) AS td
FROM
product_degrees
WHERE
product_id = :product_id
)
SELECT
SUM(
CASE WHEN td <= 50 THEN
td + gdp
WHEN td <= 200 THEN
gdp + 50 + (td - 50) * 1.5
ELSE
gdp + 275 + (td - 200) * 2
END) AS gd_points
FROM
td,
gdp
的js文件,而该文件在其他页面中不存在,添加此文件可能会解决问题。
例如:thrive.js