diff --git a/pages/API/choose-image/choose-image.uvue b/pages/API/choose-image/choose-image.uvue
index 6367ccf603ded75d9d00c3e2b2b39ac57957b7d8..5b97b299764ee808edb52a1501fa63b7822b92b6 100644
--- a/pages/API/choose-image/choose-image.uvue
+++ b/pages/API/choose-image/choose-image.uvue
@@ -33,7 +33,7 @@
confirm-type="done" />
-
+
屏幕方向
@@ -41,8 +41,18 @@
{{orientationType[orientationTypeIndex]}}
-
-
+
+
+
+
+
+ 系统相册
+
+
+
+
+
+
图像裁剪
@@ -144,7 +154,8 @@
cropPercent: 80,
cropWidth: 100,
cropHeight: 100,
- cropResize: false
+ cropResize: false,
+ useSystemChecked:false
}
},
onUnload() {
@@ -191,6 +202,9 @@
})
}
},
+ useSystemChange(e : UniSwitchChangeEvent){
+ this.useSystemChecked = e.detail.value
+ },
cropResizeChange(e : UniSwitchChangeEvent) {
this.cropResize = e.detail.value
},
@@ -250,6 +264,7 @@
crop: this.isCrop ? { "quality": this.cropPercent, "width": this.cropWidth, "height": this.cropHeight, "resize": this.cropResize } as ChooseImageCropOptions : null,
count: this.imageList.length + this.count[this.countIndex] > 9 ? 9 - this.imageList.length : this.count[this.countIndex],
pageOrientation: orientationTypeArray[this.orientationTypeIndex],
+ useSystem:this.useSystemChecked,
success: (res) => {
this.imageList = this.imageList.concat(res.tempFilePaths);
},
diff --git a/pages/API/choose-video/choose-video.uvue b/pages/API/choose-video/choose-video.uvue
index b813a290e4e5f4cc5b24a20836171eabc324fbdc..e7c7187af83221d3aa21e1b69de3da4f8697d01b 100644
--- a/pages/API/choose-video/choose-video.uvue
+++ b/pages/API/choose-video/choose-video.uvue
@@ -12,8 +12,10 @@
-
+
+
+
@@ -22,6 +24,11 @@
+
+
+
+
+
@@ -35,19 +42,20 @@
data() {
return {
title: "chooseVideo",
- src: "",
+ src: "",
orientationTypeItemTypes: [{ "value": 0, "name": "竖屏" }, { "value": 1, "name": "横屏" }, { "value": 2, "name": "自动" }] as ItemType[],
sourceTypeItemTypes: [{ "value": 0, "name": "从相册中选择视频" }, { "value": 1, "name": "拍摄视频" }, { "value": 2, "name": "从相册中选择视频或拍摄视频" }] as ItemType[],
sourceTypeItems: [["album"], ["camera"], ["album", "camera"]] as Source[][],
cameraItemTypes: [{ "value": 0, "name": "后置摄像头" }, { "value": 1, "name": "前置摄像头" }] as ItemType[],
cameraItems: ["back", "front"] as Camera[],
- sourceType: ["album", "camera"] as Source[],
- orientationType: "portrait",
+ sourceType: ["album", "camera"] as Source[],
+ orientationType: "portrait",
orientationTypeItems: ["portrait", "landscape", "auto"],
compressed: true,
maxDuration: 60,
camera: "back" as Camera,
- videoInfo: ""
+ videoInfo: "",
+ useSystem: false
}
},
methods: {
@@ -55,11 +63,11 @@
uni.chooseVideo({
sourceType: this.sourceType,
// #ifdef APP
- compressed: this.compressed,
+ compressed: this.compressed,
pageOrientation: this.orientationType,
// #endif
- maxDuration: this.maxDuration,
-
+ maxDuration: this.maxDuration,
+ useSystem:this.useSystem,
camera: this.camera,
success: (res) => {
console.log("chooseVideo success", JSON.stringify(res));
@@ -74,9 +82,9 @@
});
}
});
- },
- onOrientationTypeChange(value : number) {
- this.orientationType = this.orientationTypeItems[value];
+ },
+ onOrientationTypeChange(value : number) {
+ this.orientationType = this.orientationTypeItems[value];
},
onSourceTypeChange(value : number) {
this.sourceType = this.sourceTypeItems[value];
@@ -89,6 +97,9 @@
},
onCameraChange(value : number) {
this.camera = this.cameraItems[value];
+ },
+ useSystemChange(value : boolean) {
+ this.useSystem = value
}
}
}