|
@@ -6,7 +6,8 @@ import {
|
|
|
showFailToast,
|
|
|
Popup,
|
|
|
Swipe,
|
|
|
- SwipeItem
|
|
|
+ SwipeItem,
|
|
|
+ closeToast
|
|
|
} from 'vant';
|
|
|
import {
|
|
|
PropType,
|
|
@@ -20,7 +21,7 @@ import {
|
|
|
import styles from './index.module.less';
|
|
|
import iconPreviewClose from '@/common/images/icon-preview-close.png';
|
|
|
import iconPreviewDownload from '@/common/images/icon-preview-download.png';
|
|
|
-import { promisefiyPostMessage } from '@/helpers/native-message';
|
|
|
+import { postMessage, promisefiyPostMessage } from '@/helpers/native-message';
|
|
|
import { checkFile } from '@/helpers/toolsValidate';
|
|
|
import MVideo from '../m-video-tcplayer';
|
|
|
import { state } from '@/state';
|
|
@@ -74,18 +75,19 @@ export default defineComponent({
|
|
|
forms.saveLoading = true;
|
|
|
showLoadingToast({ message: '下载中...', forbidClick: true });
|
|
|
try {
|
|
|
- const res = await promisefiyPostMessage({
|
|
|
+ postMessage({
|
|
|
api: 'saveFile',
|
|
|
content: {
|
|
|
img,
|
|
|
type: checkFile(img, 'image') ? 'image' : 'video'
|
|
|
}
|
|
|
});
|
|
|
- if (res?.content?.status === 'success') {
|
|
|
- showSuccessToast('已保存到相册');
|
|
|
- } else {
|
|
|
- showFailToast('保存失败');
|
|
|
- }
|
|
|
+ // if (res?.content?.status === 'success') {
|
|
|
+ // showSuccessToast('已保存到相册');
|
|
|
+ // } else {
|
|
|
+ // showFailToast('保存失败');
|
|
|
+ // }
|
|
|
+ closeToast();
|
|
|
} catch {
|
|
|
//
|
|
|
}
|