degrade.js
4.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
'use strict';
const Model = require('./model');
const _ = require('lodash');
const defaultDegrades = [
{
path: '/pc/common/disMyYohoHover',
name: '【禁止】公共头部>>> MY有货鼠标移入显示账户信息'
},
{
path: '/pc/common/removeCartCount',
name: '【移除】公共头部>>> 购物车图标显示的购物车商品数目'
},
{
path: '/pc/common/disSearchAssociation',
name: '【禁止】公共头部>>> 搜索框执行搜索联想'
},
{
path: '/pc/common/disCartHover',
name: '【禁止】公共头部>>> 购物车图标鼠标移入请求且不显示购物车商品列表'
},
{
path: '/pc/brands/disBrandNameHover',
name: '【禁止】品牌一览>>> 品牌名移入显示品牌简介Tip'
},
{
path: '/pc/product/removeRecentView',
name: '【移除】商品列表/商品详情>>> 最近浏览'
},
{
path: '/pc/guang/removeHotTag',
name: '【移除】逛>>> 热门标签'
},
{
path: '/pc/guang/removeAd',
name: '【移除】逛>>> 广告banner'
},
{
path: '/pc/guang/removeItemComment',
name: '【移除】逛>>> 详情页评论'
},
{
path: '/pc/cart/removeFavStatus',
name: '【移除】购物车>>> 商品收藏状态'
},
{
path: '/pc/clientService/new',
name: '【开关】开启新客服系统'
},
{
path: '/pc/qcloud_cdn',
name: '【开关】启动腾讯云备份CDN'
},
{
path: '/pc/user/removeStudentIdentification',
name: '【移除】学生认证开关'
},
{
path: '/pc/sys/noLimiter',
name: '【开关】关闭请求限制'
},
{
path: '/pc/open/bughd',
name: '【开关】打开JS错误收集功能'
},
{
path: '/pc/ci/tdk',
name: '【开关】打开TDK'
},
{
path: '/pc/login/closePasswordLogin',
name: '【开关】关闭账号密码登录'
},
{
path: '/pc/close/risk',
name: '【开关】关闭 风控中间件'
},
{
path: '/pc/open/apmrisk',
name: '【开关】启用 apm 风控中间件'
},
//wap
{
path: '/wap/webapp/degrade',
name: '【开关】APP内嵌SSR页面是否降级'
},
{
path: '/wap/open/yoluck-down',
name: 'yoluck接口降级到老版'
},
{
path: '/wap/plustar/removeCollect',
name: '【移除】Plustar>>> 品牌收藏'
},
{
path: '/wap/plustar/removeRelatedPost',
name: '【移除】Plustar>>> 相关资讯'
},
{
path: '/wap/search/removeHotSearch',
name: '【移除】搜索>>> 热门搜索'
},
{
path: '/wap/ucenter/removePrefer',
name: '【移除】个人中心>>> 为您优选'
},
{
path: '/wap/common/removeCartCount',
name: '【移除】公共>>> 购物车icon商品数目'
},
{
path: '/wap/cart/removePrefer',
name: '【移除】购物车>>> 为您优选新品'
},
{
path: '/wap/qcloud_cdn',
name: '【开关】启动腾讯云备份CDN'
},
{
path: '/wap/user/removeStudentIdentification',
name: '【移除】学生认证开关'
},
{
path: '/wap/sys/noLimiter',
name: '【开关】关闭请求限制'
},
{
path: '/wap/close/passwordLogin',
name: '【开关】关闭账号密码登录'
},
{
path: '/wap/open/bughd',
name: '【开关】打开JS错误收集功能'
},
{
path: '/wap/close/buyNowButton',
name: '【开关】关闭立即购买功能'
},
{
path: '/wap/ci/tdk',
name: '【开关】打开TDK'
},
{
path: '/wap/shop/removeCollect',
name: '【移除】店铺品牌收藏'
},
{
path: '/wap/wechat/miniPathOpen',
name: '【开关】微信>>> 进入小程序弹框'
},
{
path: '/wap/wechat/backDownload',
name: '【开关】微信>>> 返回跳转下载页面'
},
{
path: '/wap/close/usePwa',
name: '【开关】关闭 PWA 模式'
},
{
path: '/wap/close/risk',
name: '【开关】关闭 风控中间件'
},
{
path: '/wap/open/apmrisk',
name: '【开关】启用 apm 风控中间件'
},
];
class Degrade extends Model {
constructor() {
super('degrade');
}
async init() {
for (let i of defaultDegrades) {
let count = await this.count({
path: i.path
});
if (count === 0) {
await this.insert(i);
}
}
}
}
module.exports = Degrade;