chore: initialize frontend repo with teaching terminology updates
Add the current frontend codebase with a baseline .gitignore and update piano-specific UI terms to teaching-oriented terms for the current product context. Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { shallowMount } from '@vue/test-utils'
|
||||
|
||||
describe('TopTip.vue', () => {
|
||||
it('renders props.messages when passed', () => {
|
||||
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,5 @@
|
||||
describe('page index', () => {
|
||||
it('renders index page', () => {
|
||||
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,15 @@
|
||||
import Crypto from 'crypto-js';
|
||||
|
||||
describe('upyun access token', () => {
|
||||
test('calculate access token', () => {
|
||||
const secret = "C29DBA1F1EA4462088136C3A85C2FBFC";
|
||||
// const etime = Math.ceil(Date.now() / 1000) + 3600; // 1小时有效
|
||||
let etime = 1657886416;
|
||||
const uri = '/music-room/17c832cb-bc6b-41f7-96cd-190b7fe4a3d7.jpeg';
|
||||
const sign = Crypto.MD5(`${secret}&${etime}&${uri}`).toString();
|
||||
let upt = sign.substring(12, 12 + 8) + etime;
|
||||
console.log(sign, upt, etime)
|
||||
expect(sign).toBe('48d172b8b96b84f91d806a7beee421f1')
|
||||
expect(upt).toBe('84f91d801657886416')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user