提交 933e5082 编写于 作者: W weishaoxiong

Signed-off-by: weishaoxiong <weishaoxiong1@huawei.com>

fix:
上级 d4ddf8c0
...@@ -82,7 +82,7 @@ setVideo(source: string, wallpaperType: WallpaperType, callback: AsyncCallback&l ...@@ -82,7 +82,7 @@ setVideo(source: string, wallpaperType: WallpaperType, callback: AsyncCallback&l
**示例:** **示例:**
```js ```js
let wallpaperPath = "/data/storage/el2/base/haps/test.mp4"; let wallpaperPath = "/data/storage/el2/base/haps/entry/files/test.mp4";
try { try {
wallpaper.setVideo(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error) => { wallpaper.setVideo(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error) => {
if (error) { if (error) {
...@@ -125,7 +125,7 @@ setVideo(source: string, wallpaperType: WallpaperType): Promise&lt;void&gt; ...@@ -125,7 +125,7 @@ setVideo(source: string, wallpaperType: WallpaperType): Promise&lt;void&gt;
**示例:** **示例:**
```js ```js
let wallpaperPath = "/data/storage/el2/base/haps/test.mp4"; let wallpaperPath = "/data/storage/el2/base/haps/entry/files/test.mp4";
try { try {
wallpaper.setVideo(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM).then(() => { wallpaper.setVideo(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM).then(() => {
console.log(`success to setVideo.`); console.log(`success to setVideo.`);
...@@ -377,7 +377,7 @@ setImage(source: string | image.PixelMap, wallpaperType: WallpaperType, callback ...@@ -377,7 +377,7 @@ setImage(source: string | image.PixelMap, wallpaperType: WallpaperType, callback
```js ```js
// source类型为string // source类型为string
let wallpaperPath = "/data/storage/el2/base/haps/js.jpeg"; let wallpaperPath = "/data/storage/el2/base/haps/entry/files/js.jpeg";
wallpaper.setImage(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error) => { wallpaper.setImage(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error) => {
if (error) { if (error) {
console.error(`failed to setImage because: ${JSON.stringify(error)}`); console.error(`failed to setImage because: ${JSON.stringify(error)}`);
...@@ -437,7 +437,7 @@ setImage(source: string | image.PixelMap, wallpaperType: WallpaperType): Promise ...@@ -437,7 +437,7 @@ setImage(source: string | image.PixelMap, wallpaperType: WallpaperType): Promise
```js ```js
// source类型为string // source类型为string
let wallpaperPath = "/data/storage/el2/base/haps/js.jpeg"; let wallpaperPath = "/data/storage/el2/base/haps/entry/files/js.jpeg";
wallpaper.setImage(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM).then(() => { wallpaper.setImage(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM).then(() => {
console.log(`success to setImage.`); console.log(`success to setImage.`);
}).catch((error) => { }).catch((error) => {
...@@ -1065,7 +1065,7 @@ setWallpaper(source: string | image.PixelMap, wallpaperType: WallpaperType, call ...@@ -1065,7 +1065,7 @@ setWallpaper(source: string | image.PixelMap, wallpaperType: WallpaperType, call
```js ```js
// source类型为string // source类型为string
let wallpaperPath = "/data/data/ohos.acts.aafwk.plrdtest.form/files/Cup_ic.jpg"; let wallpaperPath = "/data/storage/el2/base/haps/entry/files/js.jpeg";
wallpaper.setWallpaper(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error) => { wallpaper.setWallpaper(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM, (error) => {
if (error) { if (error) {
console.error(`failed to setWallpaper because: ${JSON.stringify(error)}`); console.error(`failed to setWallpaper because: ${JSON.stringify(error)}`);
...@@ -1127,7 +1127,7 @@ setWallpaper(source: string | image.PixelMap, wallpaperType: WallpaperType): Pro ...@@ -1127,7 +1127,7 @@ setWallpaper(source: string | image.PixelMap, wallpaperType: WallpaperType): Pro
```js ```js
// source类型为string // source类型为string
let wallpaperPath = "/data/data/ohos.acts.aafwk.plrdtest.form/files/Cup_ic.jpg"; let wallpaperPath = "/data/storage/el2/base/haps/entry/files/js.jpeg";
wallpaper.setWallpaper(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM).then(() => { wallpaper.setWallpaper(wallpaperPath, wallpaper.WallpaperType.WALLPAPER_SYSTEM).then(() => {
console.log(`success to setWallpaper.`); console.log(`success to setWallpaper.`);
}).catch((error) => { }).catch((error) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册