Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23,167 changes: 23,167 additions & 0 deletions smartspeaker/album/package-lock.json

Large diffs are not rendered by default.

17 changes: 3 additions & 14 deletions smartspeaker/album/quickapp.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
// const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const TerserPlugin = require("terser-webpack-plugin");

const resolve = dir => path.resolve(__dirname, dir)
Expand All @@ -8,7 +8,7 @@ module.exports = {
// 在此处添加命令行
cli: {
trimDotnine: true,
devtool: 'none',
devtool: false,
buildNameFormat: 'ORIGINAL',
optimizeDescMeta: true
},
Expand All @@ -21,18 +21,7 @@ module.exports = {
"@": resolve('src')
}
},
module: {
rules: [
{
test: /\.css$/,
use: [MiniCssExtractPlugin.loader, 'css-loader']
},
{
test: /\.less$/,
use: [MiniCssExtractPlugin.loader, 'css-loader', 'less-loader']
},
]
}

},
postHook: (config) => {
if (config.mode === "production") {
Expand Down
13 changes: 7 additions & 6 deletions smartspeaker/album/src/app.ux
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
import {dataList} from "@common/js/constants"

export default {
bigThumbnailInfo: dataList,
thumbnailInfo: dataList,
isLastPage: true,
setDeviceAlbumStatus:true,
bigThumbnailInfo: dataList, // 大图url链接
thumbnailInfo: dataList, // 缩略图url
isLastPage: true, // 是否是最后一页
screenWidth:0,
screenHeight:0,
screenShape:"",
time:0,
isScreensaver: false,
async onCreate() {
console.log("### 🚀Album ~ app.ux ~ onCreate ###")
console.log("[album] [list.ux] ### 🚀Album ~ ### onCreate ###")
},
onDestroy() {
console.log("app destroyed")
Expand Down
Binary file removed smartspeaker/album/src/common/images/add.png
Binary file not shown.
Binary file removed smartspeaker/album/src/common/images/bg-default.png
Binary file not shown.
Binary file modified smartspeaker/album/src/common/images/data/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified smartspeaker/album/src/common/images/data/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified smartspeaker/album/src/common/images/data/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified smartspeaker/album/src/common/images/data/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified smartspeaker/album/src/common/images/data/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified smartspeaker/album/src/common/images/data/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified smartspeaker/album/src/common/images/data/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified smartspeaker/album/src/common/images/data/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified smartspeaker/album/src/common/images/data/9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file removed smartspeaker/album/src/common/images/info.png
Binary file not shown.
Binary file removed smartspeaker/album/src/common/images/loading.png
Binary file not shown.
Binary file removed smartspeaker/album/src/common/images/step1.png
Binary file not shown.
Binary file removed smartspeaker/album/src/common/images/step2.png
Binary file not shown.
Binary file removed smartspeaker/album/src/common/images/step3.png
Binary file not shown.
Binary file removed smartspeaker/album/src/common/images/step4.png
Binary file not shown.
Binary file removed smartspeaker/album/src/common/images/wechat.png
Binary file not shown.
151 changes: 150 additions & 1 deletion smartspeaker/album/src/common/js/constants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
const SAVE_SCREEN = "settings.lockscreen.currentid"
const OPEN_ALBUM = "isOpenAlbum"
const SCREENID = "album"
const SCREEN_SHAPE = {
"rect": "rect",
"circle": "circle",
"pillShaped": "pill-shaped"
}
const dataList = [
{
imgUrl: "/common/images/data/1.png",
Expand Down Expand Up @@ -37,7 +42,151 @@ const dataList = [
{
imgUrl: "/common/images/data/9.png",
id: 8
},
{
imgUrl: "/common/images/data/1.png",
id: 9
},
{
imgUrl: "/common/images/data/2.png",
id: 10
},
{
imgUrl: "/common/images/data/3.png",
id: 11
},
{
imgUrl: "/common/images/data/4.png",
id: 12
},
{
imgUrl: "/common/images/data/5.png",
id: 13
},
{
imgUrl: "/common/images/data/6.png",
id: 14
},
{
imgUrl: "/common/images/data/7.png",
id: 15
},
{
imgUrl: "/common/images/data/8.png",
id: 16
},
{
imgUrl: "/common/images/data/9.png",
id: 17
},
{
imgUrl: "/common/images/data/1.png",
id: 18
},
{
imgUrl: "/common/images/data/2.png",
id: 19
},
{
imgUrl: "/common/images/data/3.png",
id: 20
},
{
imgUrl: "/common/images/data/4.png",
id: 21
},
{
imgUrl: "/common/images/data/5.png",
id: 22
},
{
imgUrl: "/common/images/data/6.png",
id: 23
},
{
imgUrl: "/common/images/data/7.png",
id: 24
},
{
imgUrl: "/common/images/data/8.png",
id: 25
},
{
imgUrl: "/common/images/data/9.png",
id: 26
},
{
imgUrl: "/common/images/data/1.png",
id: 27
},
{
imgUrl: "/common/images/data/2.png",
id: 28
},
{
imgUrl: "/common/images/data/3.png",
id: 29
},
{
imgUrl: "/common/images/data/4.png",
id: 30
},
{
imgUrl: "/common/images/data/5.png",
id: 31
},
{
imgUrl: "/common/images/data/6.png",
id: 32
},
{
imgUrl: "/common/images/data/7.png",
id: 33
},
{
imgUrl: "/common/images/data/8.png",
id: 34
},
{
imgUrl: "/common/images/data/9.png",
id: 35
},
{
imgUrl: "/common/images/data/1.png",
id: 36
},
{
imgUrl: "/common/images/data/2.png",
id: 37
},
{
imgUrl: "/common/images/data/3.png",
id: 38
},
{
imgUrl: "/common/images/data/4.png",
id: 39
},
{
imgUrl: "/common/images/data/5.png",
id: 40
},
{
imgUrl: "/common/images/data/6.png",
id: 41
},
{
imgUrl: "/common/images/data/7.png",
id: 42
},
{
imgUrl: "/common/images/data/8.png",
id: 43
},
{
imgUrl: "/common/images/data/9.png",
id: 44
}
]

export {SAVE_SCREEN, OPEN_ALBUM, SCREENID,dataList}
export { SAVE_SCREEN, OPEN_ALBUM, SCREENID, dataList, SCREEN_SHAPE }
2 changes: 1 addition & 1 deletion smartspeaker/album/src/common/js/promisify.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Convert Vela's asynchronous API into Promise.
* 将Vela的异步 API 转换成 Promise
* @param {Object} feature
* @param {String} methodName
* @example
Expand Down
23 changes: 16 additions & 7 deletions smartspeaker/album/src/common/js/util.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* turnObjAsQueryString
* @param {Object} obj
* 拼接get参数
* @param {Object} obj 拼接get参数
* @returns string
*/
function turnObjAsQueryString(obj) {
Expand All @@ -9,33 +9,42 @@ function turnObjAsQueryString(obj) {
}).join('&')
}


/**
* url
* @param {*} path
* @param {*} params
* 拼接url及其参数
* @param {Object} params url的参数
* @param {String} path url的地址
* @returns
*/
export function url(path, params) {
export function getOpaque(path, params) {
const str = path + '?' + turnObjAsQueryString({
...params
})
return str.toString()
}

// 定义防抖函数
// func: 点击按钮要执行的函数
// delay: 防抖时间
/**
* debounce
* @param {*} func
* @param {*} delay
* @returns
*/
export function debounce(func, delay) {
// 设置定时器标识
let timer
// 难点返回事件绑定函数
return function () {
// func指定this
let context = this
// func参数
let args = arguments
// 先清除定时器
clearTimeout(timer)
//设置定时器
timer = setTimeout(() => {
// 调用函数
func.apply(context, args)
}, delay)
}
Expand Down
Loading
Loading