vuepress-theme-uniapp-official 1.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/components/AlgoliaSearchBox.vue +130 -0
- package/components/DcloudSearchPage/components/Result.vue +160 -0
- package/components/DcloudSearchPage/components/Results.vue +66 -0
- package/components/DcloudSearchPage/components/pagination.vue +155 -0
- package/components/DcloudSearchPage/index.styl +183 -0
- package/components/DcloudSearchPage/index.vue +500 -0
- package/components/DcloudSearchPage/styles/ask.styl +272 -0
- package/components/DcloudSearchPage/styles/ext.styl +68 -0
- package/components/DcloudSearchPage/utils/Base64.js +134 -0
- package/components/DcloudSearchPage/utils/mock.js +434 -0
- package/components/DcloudSearchPage/utils/postDcloudServer.js +141 -0
- package/components/DcloudSearchPage/utils/searchClient.js +101 -0
- package/components/DcloudSearchPage/utils/searchUtils.js +52 -0
- package/components/Footer.vue +142 -0
- package/components/MainNavbarLink.vue +57 -0
- package/components/NavLink.vue +95 -0
- package/components/NavLinks.vue +173 -0
- package/components/Navbar.vue +322 -0
- package/components/NavbarLogo.vue +24 -0
- package/components/OutboundLink.vue +45 -0
- package/components/SearchBox/dist/match-query.dev.js +61 -0
- package/components/SearchBox/index.vue +337 -0
- package/components/SearchBox/match-query.js +51 -0
- package/components/SearchBox/search.svg +1 -0
- package/components/SidebarGroup.vue +141 -0
- package/components/SidebarLink.vue +152 -0
- package/components/SidebarLinks.vue +106 -0
- package/components/SiderBarBottom.vue +134 -0
- package/components/Sticker.vue +64 -0
- package/components/Toc-top.vue +95 -0
- package/components/Toc.vue +165 -0
- package/config/copy.js +7 -0
- package/config/footer.js +195 -0
- package/config/i18n/index.js +2 -0
- package/config/navbar.js +163 -0
- package/config/redirectRouter.js +120 -0
- package/config/searchPage.js +48 -0
- package/config/siderbar/index.js +8 -0
- package/config/siderbar/uni-app.js +210 -0
- package/config/siderbar/uniCloud.js +55 -0
- package/config/toc.js +5 -0
- package/enhanceApp.js +142 -0
- package/global-components/CodeSimulator.vue +211 -0
- package/global-components/icons.js +647 -0
- package/global-components/iconsLayouts.vue +117 -0
- package/global-components/uniIcon.vue +85 -0
- package/global-components/uniicons.css +656 -0
- package/global-components/uniicons.ttf +0 -0
- package/index.js +152 -0
- package/layouts/404.vue +22 -0
- package/layouts/Layout.vue +238 -0
- package/layouts/SimpleLayout.vue +18 -0
- package/mixin/navInject.js +21 -0
- package/mixin/navProvider.js +65 -0
- package/mixin/toc.js +36 -0
- package/package.json +50 -0
- package/styles/custom-block.styl +336 -0
- package/styles/footer.styl +248 -0
- package/styles/index.styl +197 -0
- package/styles/navbar.styl +293 -0
- package/styles/palette.styl +9 -0
- package/util/index.js +317 -0
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
ext: {
|
|
3
|
+
"ret": 0,
|
|
4
|
+
"desc": "ok",
|
|
5
|
+
"data": [
|
|
6
|
+
{
|
|
7
|
+
"id": 7637,
|
|
8
|
+
"name": "map高德地图组件升级、离线设置个性化地图、样式文件 (ios、android)",
|
|
9
|
+
"version": "1.0.1",
|
|
10
|
+
"description": "nvue map 高德地图组件升级、离线个性化地图、离线设置样式文件、可使用nvue map 所有功能、免VIP使用个性化地图 QQ群:656731785",
|
|
11
|
+
"tags": "nvue map 高德地图组件升级、离线个性化地图、离线设置样式文件、可使用nvuemap所有功能、免VIP使用个性化地图",
|
|
12
|
+
"platforms": [
|
|
13
|
+
"Android",
|
|
14
|
+
"iOS"
|
|
15
|
+
],
|
|
16
|
+
"category_level1": "App原生插件",
|
|
17
|
+
"category_level2": "App原生插件",
|
|
18
|
+
"total_download": 2,
|
|
19
|
+
"average_rating": 0,
|
|
20
|
+
"support_count": 0,
|
|
21
|
+
"tagsArray": [
|
|
22
|
+
"nvue",
|
|
23
|
+
"map",
|
|
24
|
+
"高德地图组件升级、离线个性化地图、离线设置样式文件、可使用nvuemap所有功能、免VIP使用个性化地图"
|
|
25
|
+
],
|
|
26
|
+
"android_abis": [],
|
|
27
|
+
"url": "https://ext.dcloud.net.cn/plugin?id=7637"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": 7457,
|
|
31
|
+
"name": "【猫优壁纸】创作者收益系统、支持抖音、快手、微信、QQ四版本(尊享版)",
|
|
32
|
+
"version": "3.6.8.1",
|
|
33
|
+
"description": "版本升级来袭带PC后台管理,内置壁纸下载、头像下载、视频下载等超多丰富内容,更有完善的积分系统和订单系统,并且包括QQ小程序、微信小程序、抖音小程序三版本",
|
|
34
|
+
"tags": "maoeus-wall-pro 好看的前端UI设计 PC后台管理系统 云开发 完善的积分系统",
|
|
35
|
+
"platforms": [
|
|
36
|
+
"aliyun",
|
|
37
|
+
"tcb"
|
|
38
|
+
],
|
|
39
|
+
"category_level1": "uniCloud",
|
|
40
|
+
"category_level2": "云端一体项目模板",
|
|
41
|
+
"total_download": 103,
|
|
42
|
+
"average_rating": 0,
|
|
43
|
+
"support_count": 0,
|
|
44
|
+
"tagsArray": [
|
|
45
|
+
"maoeus-wall-pro",
|
|
46
|
+
"好看的前端UI设计",
|
|
47
|
+
"PC后台管理系统",
|
|
48
|
+
"云开发",
|
|
49
|
+
"完善的积分系统"
|
|
50
|
+
],
|
|
51
|
+
"android_abis": [],
|
|
52
|
+
"url": "https://ext.dcloud.net.cn/plugin?id=7457"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": 6998,
|
|
56
|
+
"name": "原生sqlite数据库",
|
|
57
|
+
"version": "1.0.1",
|
|
58
|
+
"description": "原生稳定sqlite数据库增删查改,分页查询,版本升级,事务控制,批量执行",
|
|
59
|
+
"tags": "sqlite数据库 增删查改 分页查询版本升级事务控制批量执行",
|
|
60
|
+
"platforms": [
|
|
61
|
+
"Android",
|
|
62
|
+
"iOS"
|
|
63
|
+
],
|
|
64
|
+
"category_level1": "App原生插件",
|
|
65
|
+
"category_level2": "App原生插件",
|
|
66
|
+
"total_download": 13,
|
|
67
|
+
"average_rating": 5,
|
|
68
|
+
"support_count": 0,
|
|
69
|
+
"tagsArray": [
|
|
70
|
+
"sqlite数据库",
|
|
71
|
+
"增删查改",
|
|
72
|
+
"分页查询版本升级事务控制批量执行"
|
|
73
|
+
],
|
|
74
|
+
"android_abis": [],
|
|
75
|
+
"url": "https://ext.dcloud.net.cn/plugin?id=6998"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": 6139,
|
|
79
|
+
"name": "【猫优壁纸】创作者收益系统、支持抖音、微信、QQ三版本(运营版)",
|
|
80
|
+
"version": "3.6.8",
|
|
81
|
+
"description": "版本升级来袭带PC后台管理,内置壁纸下载、头像下载、视频下载等超多丰富内容,更有完善的积分系统和订单系统,并且包括QQ小程序、微信小程序、抖音小程序三版本",
|
|
82
|
+
"tags": "maoeus-wallpaper 好看的前端UI设计 PC后台管理系统 云开发 完善的积分系统",
|
|
83
|
+
"platforms": [
|
|
84
|
+
"aliyun",
|
|
85
|
+
"tcb"
|
|
86
|
+
],
|
|
87
|
+
"category_level1": "uniCloud",
|
|
88
|
+
"category_level2": "云端一体项目模板",
|
|
89
|
+
"total_download": 482,
|
|
90
|
+
"average_rating": 4.5,
|
|
91
|
+
"support_count": 0,
|
|
92
|
+
"tagsArray": [
|
|
93
|
+
"maoeus-wallpaper",
|
|
94
|
+
"好看的前端UI设计",
|
|
95
|
+
"PC后台管理系统",
|
|
96
|
+
"云开发",
|
|
97
|
+
"完善的积分系统"
|
|
98
|
+
],
|
|
99
|
+
"android_abis": [],
|
|
100
|
+
"url": "https://ext.dcloud.net.cn/plugin?id=6139"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": 7453,
|
|
104
|
+
"name": "【猫优壁纸】单系统、积分系统、壁纸、头像、视频、表情包下载(基础版)",
|
|
105
|
+
"version": "3.6.6.3",
|
|
106
|
+
"description": "版本升级来袭带PC后台管理,内置壁纸下载、头像下载、视频下载等超多丰富内容,更有完善的积分系统和订单系统,并且包括QQ小程序、微信小程序、抖音小程序三版本",
|
|
107
|
+
"tags": "maoeus-wall-base 好看的前端UI设计 PC后台管理系统 云开发 完善的积分系统",
|
|
108
|
+
"platforms": [
|
|
109
|
+
"aliyun",
|
|
110
|
+
"tcb"
|
|
111
|
+
],
|
|
112
|
+
"category_level1": "uniCloud",
|
|
113
|
+
"category_level2": "云端一体项目模板",
|
|
114
|
+
"total_download": 35,
|
|
115
|
+
"average_rating": 0,
|
|
116
|
+
"support_count": 0,
|
|
117
|
+
"tagsArray": [
|
|
118
|
+
"maoeus-wall-base",
|
|
119
|
+
"好看的前端UI设计",
|
|
120
|
+
"PC后台管理系统",
|
|
121
|
+
"云开发",
|
|
122
|
+
"完善的积分系统"
|
|
123
|
+
],
|
|
124
|
+
"android_abis": [],
|
|
125
|
+
"url": "https://ext.dcloud.net.cn/plugin?id=7453"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"id": 3243,
|
|
129
|
+
"name": "app更新升级-wgt包热更新-整包更新-遮盖原生导航及tabbar ",
|
|
130
|
+
"version": "1.2.0",
|
|
131
|
+
"description": "请求接口返回ios及Android线上版本信息,再与本机app版本对比,如需更新则弹出更新提示框-支持外部链接、整包、热更新,",
|
|
132
|
+
"tags": "更新 热更新 app 不支持NVUE APP升级",
|
|
133
|
+
"platforms": [],
|
|
134
|
+
"category_level1": "前端组件",
|
|
135
|
+
"category_level2": "通用组件",
|
|
136
|
+
"total_download": 2997,
|
|
137
|
+
"average_rating": 4.7,
|
|
138
|
+
"support_count": 3,
|
|
139
|
+
"tagsArray": [
|
|
140
|
+
"更新",
|
|
141
|
+
"热更新",
|
|
142
|
+
"app",
|
|
143
|
+
"不支持NVUE",
|
|
144
|
+
"APP升级"
|
|
145
|
+
],
|
|
146
|
+
"android_abis": [],
|
|
147
|
+
"url": "https://ext.dcloud.net.cn/plugin?id=3243"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"id": 5579,
|
|
151
|
+
"name": "腾讯Bugly插件",
|
|
152
|
+
"version": "1.0.4",
|
|
153
|
+
"description": "腾讯Bugly插件,APP检查应用版本升级、运营统计、主动上报异常,bug奔溃闪退日志、设置用户ID、用户标签",
|
|
154
|
+
"tags": "腾讯Bugly bugly 版本升级 运营统计 bug奔溃闪退日志收集",
|
|
155
|
+
"platforms": [
|
|
156
|
+
"Android",
|
|
157
|
+
"iOS"
|
|
158
|
+
],
|
|
159
|
+
"category_level1": "App原生插件",
|
|
160
|
+
"category_level2": "App原生插件",
|
|
161
|
+
"total_download": 49,
|
|
162
|
+
"average_rating": 2.3,
|
|
163
|
+
"support_count": 0,
|
|
164
|
+
"tagsArray": [
|
|
165
|
+
"腾讯Bugly",
|
|
166
|
+
"bugly",
|
|
167
|
+
"版本升级",
|
|
168
|
+
"运营统计",
|
|
169
|
+
"bug奔溃闪退日志收集"
|
|
170
|
+
],
|
|
171
|
+
"android_abis": [],
|
|
172
|
+
"url": "https://ext.dcloud.net.cn/plugin?id=5579"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"id": 7238,
|
|
176
|
+
"name": "腾讯bugly服务插件",
|
|
177
|
+
"version": "1.0.1",
|
|
178
|
+
"description": "一键接入接入bugly服务",
|
|
179
|
+
"tags": "bugly 升级",
|
|
180
|
+
"platforms": [
|
|
181
|
+
"Android"
|
|
182
|
+
],
|
|
183
|
+
"category_level1": "App原生插件",
|
|
184
|
+
"category_level2": "App原生插件",
|
|
185
|
+
"total_download": 4,
|
|
186
|
+
"average_rating": 0,
|
|
187
|
+
"support_count": 0,
|
|
188
|
+
"tagsArray": [
|
|
189
|
+
"bugly",
|
|
190
|
+
"升级"
|
|
191
|
+
],
|
|
192
|
+
"android_abis": [],
|
|
193
|
+
"url": "https://ext.dcloud.net.cn/plugin?id=7238"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"id": 1371,
|
|
197
|
+
"name": "app版本升级原生弹框和进度提示(包含wgt升级)",
|
|
198
|
+
"version": "1.48",
|
|
199
|
+
"description": "app版本升级(包含热更新)弹框提示和进度显示,apk自动安装",
|
|
200
|
+
"tags": "版本升级 进度提示 app自动安装 弹框提示 wgt升级",
|
|
201
|
+
"platforms": [
|
|
202
|
+
"Android",
|
|
203
|
+
"iOS"
|
|
204
|
+
],
|
|
205
|
+
"category_level1": "App原生插件",
|
|
206
|
+
"category_level2": "App原生插件",
|
|
207
|
+
"total_download": 4967,
|
|
208
|
+
"average_rating": 4.9,
|
|
209
|
+
"support_count": 1,
|
|
210
|
+
"tagsArray": [
|
|
211
|
+
"版本升级",
|
|
212
|
+
"进度提示",
|
|
213
|
+
"app自动安装",
|
|
214
|
+
"弹框提示",
|
|
215
|
+
"wgt升级"
|
|
216
|
+
],
|
|
217
|
+
"android_abis": [],
|
|
218
|
+
"url": "https://ext.dcloud.net.cn/plugin?id=1371"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"id": 4542,
|
|
222
|
+
"name": "升级中心 uni-upgrade-center - App",
|
|
223
|
+
"version": "0.3.2",
|
|
224
|
+
"description": "uni升级中心 - 客户端检查更新",
|
|
225
|
+
"tags": "uniCloud update 升级 wgt",
|
|
226
|
+
"platforms": [
|
|
227
|
+
"aliyun",
|
|
228
|
+
"tcb"
|
|
229
|
+
],
|
|
230
|
+
"category_level1": "uniCloud",
|
|
231
|
+
"category_level2": "云端一体页面模板",
|
|
232
|
+
"total_download": 11374,
|
|
233
|
+
"average_rating": 4.8,
|
|
234
|
+
"support_count": 3,
|
|
235
|
+
"tagsArray": [
|
|
236
|
+
"uniCloud",
|
|
237
|
+
"update",
|
|
238
|
+
"升级",
|
|
239
|
+
"wgt"
|
|
240
|
+
],
|
|
241
|
+
"android_abis": [],
|
|
242
|
+
"url": "https://ext.dcloud.net.cn/plugin?id=4542"
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
},
|
|
246
|
+
ask: {
|
|
247
|
+
"code": 0,
|
|
248
|
+
"data": [
|
|
249
|
+
{
|
|
250
|
+
"url": "//ask.dcloud.net.cn/article/182",
|
|
251
|
+
"title": "App资源在线升级更新",
|
|
252
|
+
"content": " ... &amp;&amp;(wgtVer!=newVer)){\n\t\t\t\t\tdownWgt();\t// 下载<span style='font-weight:bold;color:red'>升级</span>包\n\t\t\t\t}else{\n\t\t\t\t\tplus.nativeUI.alert(&quot;无 ... ",
|
|
253
|
+
"type": "articles",
|
|
254
|
+
"comment_count": "212",
|
|
255
|
+
"view_count": "260871"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"url": "//ask.dcloud.net.cn/article/199",
|
|
259
|
+
"title": "App资源在线差量升级更新",
|
|
260
|
+
"content": " ... wgtu | 根节点 | | | |\t\n| appid | wgtu | 属性 | <span style='font-weight:bold;color:red'>升级</span>应用的appid | 是 |\n| basis | wgtu ... ",
|
|
261
|
+
"type": "articles",
|
|
262
|
+
"comment_count": "83",
|
|
263
|
+
"view_count": "76496"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"url": "//ask.dcloud.net.cn/article/17",
|
|
267
|
+
"title": "HBuilder升级失败或长时间无响应?",
|
|
268
|
+
"content": "如果装过其他eclipse插件,其<span style='font-weight:bold;color:red'>升级</span>服务器可能连不上而导致报错。\n此时在工具-插件安装-手动安装eclipse插件-可用软件站点,取消其他插件的<span style='font-weight:bold;color:red'>升级</span>地址。\n重新点击帮助-检查新版本即可。",
|
|
269
|
+
"type": "articles",
|
|
270
|
+
"comment_count": 0,
|
|
271
|
+
"view_count": "2500"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"url": "//ask.dcloud.net.cn/article/266",
|
|
275
|
+
"title": "增量升级",
|
|
276
|
+
"content": " ... ask.dcloud.net.cn/question/3388)\n\n**增量<span style='font-weight:bold;color:red'>升级</span>的问题**\n增量、差量<span style='font-weight:bold;color:red'>升级</span> ... 。但是在使用H5 的增量<span style='font-weight:bold;color:red'>升级</span>的时候遇到一个问题。 ... 是:\n当APP启动是出现<span style='font-weight:bold;color:red'>升级</span>页面,用户点击增量 ... ",
|
|
277
|
+
"type": "articles",
|
|
278
|
+
"comment_count": "5",
|
|
279
|
+
"view_count": "3090"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"url": "//ask.dcloud.net.cn/article/273",
|
|
283
|
+
"title": "请Mac版用户近期不要升级MacOS 10.11beta3及10.11公测版",
|
|
284
|
+
"content": " ... 近期发布的公测版上,HBuilder也无法启动。\n**请大家近期不要<span style='font-weight:bold;color:red'>升级</span>Mac 10.11beta3及10.11公测版,并等待苹果修复bug**\n详情 ... ",
|
|
285
|
+
"type": "articles",
|
|
286
|
+
"comment_count": "9",
|
|
287
|
+
"view_count": "3054"
|
|
288
|
+
}
|
|
289
|
+
],
|
|
290
|
+
"searchKeyword": "5Y2H57qn"
|
|
291
|
+
},
|
|
292
|
+
askHtml: `<div
|
|
293
|
+
class="aw-item active" >
|
|
294
|
+
<p class="aw-title">
|
|
295
|
+
<span class="tip-recommend">官方</span>
|
|
296
|
+
<a href="//ask.dcloud.net.cn/article/676" target="_blank"> 手机端监听<em>短信</em>验证码并自动提交表单 </a>
|
|
297
|
+
</p>
|
|
298
|
+
<p class="aw-search-body">
|
|
299
|
+
鉴定<em>短信</em>验证码仅能在App端实现,其他端无法使用。但在App端,更为合理的方式其实是使用一键登录。即无需<em>短信</em>验证码,一键登录获取真实的手机号。一键登陆的体验比<em>短信</em>验证码好很多,不需等待验证码、输入验证码,并且一键登陆的费用比<em>短信</em>便宜不少。所以*强烈推荐改用一键登陆*,uni一键登陆的文档另见:... </p>
|
|
300
|
+
|
|
301
|
+
<p class="aw-hide-text aw-text-color-666">
|
|
302
|
+
分类:
|
|
303
|
+
<a class="aw-search-result-tags"> 文章 </a>
|
|
304
|
+
77 个回复 •
|
|
305
|
+
32933 次查看 </p>
|
|
306
|
+
</div>
|
|
307
|
+
|
|
308
|
+
<div
|
|
309
|
+
class="aw-item active" >
|
|
310
|
+
<p class="aw-title">
|
|
311
|
+
<span class="tip-recommend">官方</span>
|
|
312
|
+
<a href="//ask.dcloud.net.cn/article/37534" target="_blank"> 发送<em>短信</em>教程(验证码、<em>短信</em>通知) </a>
|
|
313
|
+
</p>
|
|
314
|
+
<p class="aw-search-body">
|
|
315
|
+
添加模板完成后,如模板审核通过,则根据[https://uniapp.dcloud.io/uniCloud/send-<em>sms</em>](https://uniapp.dcloud.io/uniCloud/send-<em>sms</em>)进行<em>短信</em>接入。[attach]61670[/attach] 充值 <em>短信</em>验证码为预付费业务,使用<em>短信</em>验证码服务之前,需要先进行充值。点击页面上的“充值”按钮,可以选择预设金额进行充值,也可以选择自定义... </p>
|
|
316
|
+
|
|
317
|
+
<p class="aw-hide-text aw-text-color-666">
|
|
318
|
+
分类:
|
|
319
|
+
<a class="aw-search-result-tags"> 文章 </a>
|
|
320
|
+
60 个回复 •
|
|
321
|
+
16940 次查看 </p>
|
|
322
|
+
</div>
|
|
323
|
+
|
|
324
|
+
<div
|
|
325
|
+
class="aw-item active" >
|
|
326
|
+
<p class="aw-title">
|
|
327
|
+
<span class="tip-recommend">官方</span>
|
|
328
|
+
<a href="//ask.dcloud.net.cn/article/37746" target="_blank"> 公告:<em>短信</em>模板报备通知 </a>
|
|
329
|
+
</p>
|
|
330
|
+
<p class="aw-search-body">
|
|
331
|
+
由于近期有个别开发者利用<em>短信</em>服务发送违法信息,导致【uniID】、【uni验证】等<em>短信</em>服务模板被运营商停用。为了保证其他开发者可以正常使用,即日起,开发者使用<em>短信</em>服务需要进行<em>短信</em>模板...参考文档[https://uniapp.dcloud.net.cn/uniCloud/send-<em>sms</em>](https://uniapp.dcloud.net.cn/uniCloud/send-<em>sms</em>)更新发送<em>短信</em>相关代码。 </p>
|
|
332
|
+
|
|
333
|
+
<p class="aw-hide-text aw-text-color-666">
|
|
334
|
+
分类:
|
|
335
|
+
<a class="aw-search-result-tags"> 文章 </a>
|
|
336
|
+
43 个回复 •
|
|
337
|
+
3276 次查看 </p>
|
|
338
|
+
</div>
|
|
339
|
+
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 plugin-li" data="4542">
|
|
340
|
+
<div class="row extend-list card has-preview-img">
|
|
341
|
+
<div class="col-sm-3 col-md-3 col-lg-3 preview-img should-pop" style="width: 20%;" data-toggle="popover" data-src="//img-cdn-aliyun.dcloud.net.cn/stream/plugin_screens/3c30aa60-8d63-11eb-9913-cd96a30ab764_0.jpg?image_process=quality,q_70&v=1641979438" data-original-title="" title="">
|
|
342
|
+
<a href="https://ext.dcloud.net.cn/plugin?id=4542" target="_blank">
|
|
343
|
+
<img src="//img-cdn-aliyun.dcloud.net.cn/stream/plugin_screens/3c30aa60-8d63-11eb-9913-cd96a30ab764_0.jpg?image_process=quality,q_70&v=1641979438">
|
|
344
|
+
</a>
|
|
345
|
+
</div>
|
|
346
|
+
<div class="col-xs-12 col-sm-9 col-md-9 col-lg-9 plugin-info">
|
|
347
|
+
<div class="row extend-list-header">
|
|
348
|
+
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
|
|
349
|
+
<h2 class="extend-title elip">
|
|
350
|
+
<a href="https://ext.dcloud.net.cn/plugin?id=4542" target="_blank"> <em>升级中心</em> uni-upgrade-center-App </a>
|
|
351
|
+
</h2>
|
|
352
|
+
</div>
|
|
353
|
+
<div class="collection col-xs-6 col-sm-6 col-md-2 col-lg-2 pull-right ext-slg">
|
|
354
|
+
<a href="https://ext.dcloud.net.cn/plugin?id=4542" target="_blank" style="color: #ef5656;">
|
|
355
|
+
<img src="//img-cdn-aliyun.dcloud.net.cn/dev/img/ext/collection-small.png"> 收藏 <span class="collection-list-total-4542">385</span>
|
|
356
|
+
</a>
|
|
357
|
+
</div>
|
|
358
|
+
<div class="support col-xs-6 col-sm-6 col-md-2 col-lg-2 pull-right ext-slg">
|
|
359
|
+
<a href="https://ext.dcloud.net.cn/plugin?id=4542" target="_blank" style="color: #ef5656;">
|
|
360
|
+
<img src="//img-cdn-aliyun.dcloud.net.cn/dev/img/ext/heart.png"> 赞赏 3 </a>
|
|
361
|
+
</div>
|
|
362
|
+
<div class="download col-xs-6 col-sm-6 col-md-2 col-lg-2 pull-right ext-slg">
|
|
363
|
+
<a href="https://ext.dcloud.net.cn/plugin?id=4542" target="_blank" style="color: #4e92df;">
|
|
364
|
+
<img src="//img-cdn-aliyun.dcloud.net.cn/dev/img/ext/download.png"> 下载 11539 </a>
|
|
365
|
+
</div>
|
|
366
|
+
</div>
|
|
367
|
+
<div class="row">
|
|
368
|
+
<div class="col-xs-12">
|
|
369
|
+
<a href="https://ext.dcloud.net.cn/plugin?id=4542" target="_blank">
|
|
370
|
+
<span class="extend-list-desc">
|
|
371
|
+
uni<em>升级中心</em>-客户端检查更新 </span>
|
|
372
|
+
</a>
|
|
373
|
+
</div>
|
|
374
|
+
</div>
|
|
375
|
+
<div class="row rating" title="评分: 4.8 (129人评分)">
|
|
376
|
+
<div class="col-xs-12">
|
|
377
|
+
<div class="star-rating">
|
|
378
|
+
<div class="star-rating-top" style="width:95%">
|
|
379
|
+
<span class="glyphicon"></span>
|
|
380
|
+
<span class="glyphicon"></span>
|
|
381
|
+
<span class="glyphicon"></span>
|
|
382
|
+
<span class="glyphicon"></span>
|
|
383
|
+
<span class="glyphicon"></span>
|
|
384
|
+
</div>
|
|
385
|
+
<div class="star-rating-bottom">
|
|
386
|
+
<span class="glyphicon"></span>
|
|
387
|
+
<span class="glyphicon"></span>
|
|
388
|
+
<span class="glyphicon"></span>
|
|
389
|
+
<span class="glyphicon"></span>
|
|
390
|
+
<span class="glyphicon"></span>
|
|
391
|
+
</div>
|
|
392
|
+
</div>
|
|
393
|
+
<span class="star-rating-text">(129)</span>
|
|
394
|
+
</div>
|
|
395
|
+
</div>
|
|
396
|
+
<div class="row extend-list-tag">
|
|
397
|
+
<div class="col-xs-12">
|
|
398
|
+
|
|
399
|
+
<a class="badge bg-orange" href="javascript:;">uni_modules</a>
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
<a class="badge bg-green" href="javascript:;">uniCloud</a>
|
|
403
|
+
<a class="badge bg-green" href="javascript:;">update</a>
|
|
404
|
+
<a class="badge bg-green" href="javascript:;">升级</a>
|
|
405
|
+
<a class="badge bg-green" href="javascript:;">wgt</a>
|
|
406
|
+
|
|
407
|
+
</div>
|
|
408
|
+
</div>
|
|
409
|
+
|
|
410
|
+
<div class="row extend-list-more">
|
|
411
|
+
<div class="categorys col-xs-12 col-sm-6 col-md-4 col-lg-4" style="width:60%">
|
|
412
|
+
分类:<a href="javascript:;">uniCloud</a> /
|
|
413
|
+
<a href="javascript:;">云端一体页面模板</a>
|
|
414
|
+
</div>
|
|
415
|
+
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4" style="width:30%">
|
|
416
|
+
更新日期:2022-01-12</div>
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
<div class="extend-list-user col-md-4 col-lg-4" style="width: 10%">
|
|
420
|
+
<a href="https://ext.dcloud.net.cn/publisher?id=586192">
|
|
421
|
+
<img class="avatar pull-right" src="https://img-cdn-tc.dcloud.net.cn/uploads/avatar/001/67/43/81_avatar_max.jpg" alt="DCloud前端团队">
|
|
422
|
+
<span class="pull-right"></span>
|
|
423
|
+
</a>
|
|
424
|
+
</div>
|
|
425
|
+
</div>
|
|
426
|
+
</div>
|
|
427
|
+
|
|
428
|
+
<div class="plugin-action" style="display: none;">
|
|
429
|
+
<div class="plugin-like-btn " onclick="collection(this, 4542)">收藏</div>
|
|
430
|
+
</div>
|
|
431
|
+
</div>
|
|
432
|
+
</div>
|
|
433
|
+
`
|
|
434
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
const isProduction = process.env.NODE_ENV === "production"
|
|
2
|
+
const isMock = false
|
|
3
|
+
import mock from './mock'
|
|
4
|
+
|
|
5
|
+
function ajax(url = '', method = 'get',) {
|
|
6
|
+
return new Promise((resolve, reject) => {
|
|
7
|
+
if (!url) reject('url 不可为空')
|
|
8
|
+
const xhr = new XMLHttpRequest();
|
|
9
|
+
xhr.open(method, url);
|
|
10
|
+
xhr.onreadystatechange = function () {
|
|
11
|
+
if (this.readyState == 4 && this.status == 200) {
|
|
12
|
+
resolve(this.response)
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
xhr.send()
|
|
16
|
+
})
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export async function postExt(query) {
|
|
20
|
+
const base = isProduction ? '//ext.dcloud.net.cn' : '/ext'
|
|
21
|
+
let extRet
|
|
22
|
+
if (!isMock) {
|
|
23
|
+
const extRes = await ajax(base + '/search/json?query=' + encodeURIComponent(query))
|
|
24
|
+
extRet = JSON.parse(extRes);
|
|
25
|
+
} else {
|
|
26
|
+
extRet = mock.ext;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
let extHtml = '';
|
|
30
|
+
let data = extRet.data;
|
|
31
|
+
if (extRet.ret === 0) {
|
|
32
|
+
for (let i = 0, len = data.length; i < len; i++) {
|
|
33
|
+
extHtml += _renderExt(data[i], query);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
html: extHtml,
|
|
38
|
+
hits: data.length
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export async function postAsk(query, page = 1) {
|
|
43
|
+
const base = isProduction ? '//ask.dcloud.net.cn' : '/ask'
|
|
44
|
+
let askHtml = '';
|
|
45
|
+
|
|
46
|
+
if (!isMock) {
|
|
47
|
+
askHtml = await ajax(base + `/search/ajax/search_result/search_type-all__q-${query}__page-${page}`)
|
|
48
|
+
if (!askHtml) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
askHtml = mock.askHtml
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return {
|
|
56
|
+
html: askHtml,
|
|
57
|
+
hits: 0
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function _renderExt(ext, keyword) {
|
|
62
|
+
return `<div class="matching-post">
|
|
63
|
+
<a href="${ext.url}" target="_blank">
|
|
64
|
+
<div class="post-wrapper">
|
|
65
|
+
<h2>
|
|
66
|
+
<p class="aw-text">
|
|
67
|
+
<span class="post-tag">插件</span>
|
|
68
|
+
</p>
|
|
69
|
+
${_handleHTMLString(ext.name, keyword)}
|
|
70
|
+
</h2>
|
|
71
|
+
</div>
|
|
72
|
+
<p>${ext.total_download}次下载</p>
|
|
73
|
+
<p>${_handleHTMLString(ext.description, keyword)}</p>
|
|
74
|
+
</a>
|
|
75
|
+
</div>`
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function _renderPost(post, value) {
|
|
79
|
+
let html = '';
|
|
80
|
+
let commentText = '';
|
|
81
|
+
let tagName = '规范';
|
|
82
|
+
|
|
83
|
+
// 1,问题;2,文章;默认是规范。
|
|
84
|
+
switch (post.type) {
|
|
85
|
+
case 'questions':
|
|
86
|
+
tagName = '问题';
|
|
87
|
+
break;
|
|
88
|
+
case 'articles':
|
|
89
|
+
tagName = '文章';
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (!!value) {
|
|
94
|
+
post.title = _handleHTMLString(post.title, value);
|
|
95
|
+
post.content = _handleHTMLString(post.content, value);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
html += `<div class="matching-post">
|
|
99
|
+
<a href="${post.url}" target="_blank">
|
|
100
|
+
<div class="post-wrapper">
|
|
101
|
+
<h2>
|
|
102
|
+
<p class="aw-text">
|
|
103
|
+
<span class="post-tag">${tagName}</span>
|
|
104
|
+
</p>
|
|
105
|
+
${post.title}
|
|
106
|
+
</h2>
|
|
107
|
+
</div>`
|
|
108
|
+
|
|
109
|
+
if (!!value) {
|
|
110
|
+
commentText = post.type === 'questions' ? '回复' : '评论';
|
|
111
|
+
html += `<p>
|
|
112
|
+
${post.comment_count}个${commentText}
|
|
113
|
+
<span class="aw-text-space">-</span>
|
|
114
|
+
${post.view_count}次浏览
|
|
115
|
+
</p>`;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
html += `\n<p>${post.content}</p>\n</a>\n</div>`;
|
|
119
|
+
|
|
120
|
+
return html;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function _handleHTMLString(dataString, keyword) {
|
|
124
|
+
let keywordReg = new RegExp(
|
|
125
|
+
keyword.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&'),
|
|
126
|
+
'gi'
|
|
127
|
+
);
|
|
128
|
+
let tagStartReg = new RegExp(
|
|
129
|
+
'<span style=\'font-weight:bold;color:red\'>',
|
|
130
|
+
'g'
|
|
131
|
+
);
|
|
132
|
+
let tagEndReg = new RegExp(
|
|
133
|
+
'</span>',
|
|
134
|
+
'g'
|
|
135
|
+
);
|
|
136
|
+
|
|
137
|
+
return dataString
|
|
138
|
+
.replace(tagStartReg, '')
|
|
139
|
+
.replace(tagEndReg, '')
|
|
140
|
+
.replace(keywordReg, ("<em class=\"search-keyword\">" + keyword + "</em>"));
|
|
141
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import algoliasearch from 'algoliasearch/dist/algoliasearch-lite.esm.browser';
|
|
2
|
+
import { removeHighlightTags, groupBy } from './searchUtils'
|
|
3
|
+
|
|
4
|
+
let searchClient
|
|
5
|
+
function createSearchClient(appId, apiKey) {
|
|
6
|
+
if (searchClient) return searchClient
|
|
7
|
+
searchClient = algoliasearch(appId, apiKey);
|
|
8
|
+
searchClient.addAlgoliaAgent('dcloudsearch', '1.0.0');
|
|
9
|
+
|
|
10
|
+
return searchClient
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function search({ query, indexName, appId, apiKey, searchParameters = {}, snippetLength = 0, transformItems = () => { }, onClose = () => { }, ...args }) {
|
|
14
|
+
return createSearchClient(appId, apiKey)
|
|
15
|
+
.search([
|
|
16
|
+
{
|
|
17
|
+
query,
|
|
18
|
+
indexName,
|
|
19
|
+
params: {
|
|
20
|
+
attributesToRetrieve: [
|
|
21
|
+
'hierarchy.lvl0',
|
|
22
|
+
'hierarchy.lvl1',
|
|
23
|
+
'hierarchy.lvl2',
|
|
24
|
+
'hierarchy.lvl3',
|
|
25
|
+
'hierarchy.lvl4',
|
|
26
|
+
'hierarchy.lvl5',
|
|
27
|
+
'hierarchy.lvl6',
|
|
28
|
+
'content',
|
|
29
|
+
'type',
|
|
30
|
+
'url',
|
|
31
|
+
'url_without_anchor',
|
|
32
|
+
'category',
|
|
33
|
+
'tag'
|
|
34
|
+
],
|
|
35
|
+
attributesToSnippet: [
|
|
36
|
+
`hierarchy.lvl1:${snippetLength}`,
|
|
37
|
+
`hierarchy.lvl2:${snippetLength}`,
|
|
38
|
+
`hierarchy.lvl3:${snippetLength}`,
|
|
39
|
+
`hierarchy.lvl4:${snippetLength}`,
|
|
40
|
+
`hierarchy.lvl5:${snippetLength}`,
|
|
41
|
+
`hierarchy.lvl6:${snippetLength}`,
|
|
42
|
+
`content:${snippetLength}`,
|
|
43
|
+
],
|
|
44
|
+
snippetEllipsisText: '…',
|
|
45
|
+
highlightPreTag: '<mark>',
|
|
46
|
+
highlightPostTag: '</mark>',
|
|
47
|
+
hitsPerPage: 20,
|
|
48
|
+
...searchParameters,
|
|
49
|
+
...args,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
])
|
|
53
|
+
.catch((error) => {
|
|
54
|
+
throw error;
|
|
55
|
+
})
|
|
56
|
+
.then(({ results }) => {
|
|
57
|
+
const { hits, hitsPerPage, nbHits, nbPages, page } = results[0];
|
|
58
|
+
const sources = groupBy(hits, (hit) => removeHighlightTags(hit));
|
|
59
|
+
return {
|
|
60
|
+
hitsPerPage, nbHits, nbPages, page,
|
|
61
|
+
hits: Object.values(sources).map(
|
|
62
|
+
(items, index) => {
|
|
63
|
+
return {
|
|
64
|
+
sourceId: `hits${index}`,
|
|
65
|
+
onSelect({ item, event }) {
|
|
66
|
+
// saveRecentSearch(item);
|
|
67
|
+
|
|
68
|
+
if (!event.shiftKey && !event.ctrlKey && !event.metaKey) {
|
|
69
|
+
onClose()
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
getItemUrl({ item }) {
|
|
73
|
+
return item.url;
|
|
74
|
+
},
|
|
75
|
+
getItems() {
|
|
76
|
+
return Object.values(
|
|
77
|
+
groupBy(items, (item) => item.hierarchy.lvl1)
|
|
78
|
+
)
|
|
79
|
+
.map(transformItems)
|
|
80
|
+
.map((groupedHits) =>
|
|
81
|
+
groupedHits.map((item) => {
|
|
82
|
+
return {
|
|
83
|
+
...item,
|
|
84
|
+
__docsearch_parent:
|
|
85
|
+
item.type !== 'lvl1' &&
|
|
86
|
+
groupedHits.find(
|
|
87
|
+
(siblingItem) =>
|
|
88
|
+
siblingItem.type === 'lvl1' &&
|
|
89
|
+
siblingItem.hierarchy.lvl1 ===
|
|
90
|
+
item.hierarchy.lvl1
|
|
91
|
+
),
|
|
92
|
+
};
|
|
93
|
+
})
|
|
94
|
+
).flat();
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|