zydx-plus 1.35.564 → 1.35.566
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/package.json
CHANGED
|
@@ -2688,6 +2688,7 @@ let buttonNames = {
|
|
|
2688
2688
|
// }
|
|
2689
2689
|
headLevel: {
|
|
2690
2690
|
default: "pipeGuideAnalysis",
|
|
2691
|
+
qaResources: '答疑资源',
|
|
2691
2692
|
pipeGuideAnalysis: '管导评析'
|
|
2692
2693
|
},
|
|
2693
2694
|
}
|
|
@@ -2797,6 +2798,7 @@ let buttonNames = {
|
|
|
2797
2798
|
headLevel: {
|
|
2798
2799
|
default: "readResource",
|
|
2799
2800
|
readResource: '阅读资源',
|
|
2801
|
+
qaResources: '答疑资源',
|
|
2800
2802
|
pipeGuideAnalysis: '管导评析'
|
|
2801
2803
|
},
|
|
2802
2804
|
}
|
|
@@ -333,8 +333,34 @@ export default {
|
|
|
333
333
|
sampleRate: 16000, // 采样率,支持 11025、16000、22050、24000、44100、48000,根据浏览器默认值,我的chrome是48000
|
|
334
334
|
numChannels: 1, // 声道,支持 1 或 2, 默认是1
|
|
335
335
|
})
|
|
336
|
-
const
|
|
337
|
-
|
|
336
|
+
const ais = this.getCookie('aiToken');
|
|
337
|
+
if(ais) {
|
|
338
|
+
this.token = ais
|
|
339
|
+
}else {
|
|
340
|
+
const token = await this.getAccessToken('ai')
|
|
341
|
+
this.setCookie('aiToken', token.data.data, 60)
|
|
342
|
+
this.token = token.data.data
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
setCookie(name, value, minutes) {
|
|
346
|
+
let now = new Date();
|
|
347
|
+
now.setMinutes(now.getMinutes() + minutes);
|
|
348
|
+
document.cookie = name + '=' + value + ';expires=' + now.toUTCString();
|
|
349
|
+
},
|
|
350
|
+
getCookie(cname) {
|
|
351
|
+
let name = cname + "=";
|
|
352
|
+
let decodedCookie = decodeURIComponent(document.cookie);
|
|
353
|
+
let ca = decodedCookie.split(';');
|
|
354
|
+
for(let i = 0; i < ca.length; i++) {
|
|
355
|
+
let c = ca[i];
|
|
356
|
+
while (c.charAt(0) === ' ') {
|
|
357
|
+
c = c.substring(1);
|
|
358
|
+
}
|
|
359
|
+
if (c.indexOf(name) === 0) {
|
|
360
|
+
return c.substring(name.length, c.length);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
return "";
|
|
338
364
|
},
|
|
339
365
|
async getAccessToken(v) {
|
|
340
366
|
return axios({
|