success
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
const __uniConfig = {"pages":[],"globalStyle":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app x","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8"},"appname":"SkinCamera","compilerVersion":"4.87","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","themeConfig":{}};
|
||||
__uniConfig.getTabBarConfig = () => {return undefined};
|
||||
__uniConfig.tabBar = __uniConfig.getTabBarConfig();
|
||||
const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"navigationBarTitleText":"uni-app x"}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute)).concat(typeof __uniSystemRoutes !== 'undefined' ? __uniSystemRoutes : []);
|
||||
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
(function(vue) {
|
||||
"use strict";
|
||||
const { registerUTSInterface, initUTSProxyClass, initUTSProxyFunction, initUTSPackageName, initUTSIndexClassName, initUTSClassName } = uni;
|
||||
const name = "SkinCameraUTS";
|
||||
const moduleName = "UTS实现自定义相机拍照和录像功能";
|
||||
const moduleType = "";
|
||||
const errMsg = "";
|
||||
const is_uni_modules = true;
|
||||
const pkg = /* @__PURE__ */ initUTSPackageName(name, is_uni_modules);
|
||||
const cls = /* @__PURE__ */ initUTSIndexClassName(name, is_uni_modules);
|
||||
const XfCameraComponent = {};
|
||||
const takePhoto = /* @__PURE__ */ initUTSProxyFunction(false, { moduleName, moduleType, errMsg, main: true, package: pkg, class: cls, name: "takePhotoByJs", keepAlive: false, params: [{ "name": "options", "type": "UTSSDKModulesSkinCameraUTSTakePhotoOptionJSONObject" }], return: "" });
|
||||
function resolveEasycom(component, easycom) {
|
||||
return typeof component === "string" ? easycom : component;
|
||||
}
|
||||
const _sfc_main$1 = vue.defineComponent({
|
||||
data() {
|
||||
return {
|
||||
yanse: "red",
|
||||
widthNum: 750,
|
||||
heightNum: 200,
|
||||
flash: "on",
|
||||
device: "front",
|
||||
imagePath: "",
|
||||
videoPath: "https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4"
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
},
|
||||
methods: {
|
||||
onError(res = null) {
|
||||
uni.__log__("log", "at pages/index/index.uvue:54", res);
|
||||
},
|
||||
_takePhoto() {
|
||||
takePhoto({
|
||||
success: (res = null) => {
|
||||
uni.__log__("log", "at pages/index/index.uvue:59", "takePhoto", res);
|
||||
this.imagePath = res.tempImagePath;
|
||||
},
|
||||
fail: (res = null) => {
|
||||
uni.__log__("log", "at pages/index/index.uvue:64", "takePhoto", res);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
const _style_0$1 = { "video": { "": { "width": "100%", "height": 200 } } };
|
||||
const _export_sfc = (sfc, props) => {
|
||||
const target = sfc.__vccOpts || sfc;
|
||||
for (const [key, val] of props) {
|
||||
target[key] = val;
|
||||
}
|
||||
return target;
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
resolveEasycom(vue.resolveDynamicComponent("xf-camera"), XfCameraComponent);
|
||||
return vue.openBlock(), vue.createElementBlock("scroll-view", { class: "page-scroll-view" }, [
|
||||
vue.createElementVNode("view", null, [
|
||||
vue.createElementVNode("button", {
|
||||
onClick: _cache[0] || (_cache[0] = (...args) => $options._takePhoto && $options._takePhoto(...args))
|
||||
}, "拍照"),
|
||||
vue.createElementVNode("xf-camera", {
|
||||
style: { "height": "750rpx", "background-color": "red" },
|
||||
onError: _cache[1] || (_cache[1] = (...args) => $options.onError && $options.onError(...args)),
|
||||
flash: $data.flash,
|
||||
position: $data.device
|
||||
}, null, 40, ["flash", "position"]),
|
||||
$data.imagePath ? (vue.openBlock(), vue.createElementBlock("image", {
|
||||
key: 0,
|
||||
mode: "aspectFit",
|
||||
src: $data.imagePath
|
||||
}, null, 8, ["src"])) : vue.createCommentVNode("", true)
|
||||
])
|
||||
]);
|
||||
}
|
||||
const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["styles", [_style_0$1]]]);
|
||||
__definePage("pages/index/index", PagesIndexIndex);
|
||||
const _sfc_main = vue.defineComponent({
|
||||
onLaunch() {
|
||||
uni.__log__("log", "at App.uvue:7", "App Launch");
|
||||
},
|
||||
onShow() {
|
||||
uni.__log__("log", "at App.uvue:10", "App Show");
|
||||
},
|
||||
onHide() {
|
||||
uni.__log__("log", "at App.uvue:13", "App Hide");
|
||||
},
|
||||
onExit() {
|
||||
uni.__log__("log", "at App.uvue:34", "App Exit");
|
||||
}
|
||||
});
|
||||
const _style_0 = { "uni-row": { "": { "flexDirection": "row" } }, "uni-column": { "": { "flexDirection": "column" } } };
|
||||
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["styles", [_style_0]]]);
|
||||
const __global__ = typeof globalThis === "undefined" ? Function("return this")() : globalThis;
|
||||
__global__.__uniX = true;
|
||||
function createApp() {
|
||||
const app = vue.createSSRApp(App);
|
||||
return {
|
||||
app
|
||||
};
|
||||
}
|
||||
createApp().app.mount("#app");
|
||||
})(Vue);
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"id": "__UNI__644401D",
|
||||
"name": "SkinCamera",
|
||||
"description": "",
|
||||
"version": {
|
||||
"name": "1.0.0",
|
||||
"code": "100"
|
||||
},
|
||||
"uni-app-x": {
|
||||
"compilerVersion": "4.87"
|
||||
},
|
||||
"app-ios": {
|
||||
"distribute": {
|
||||
"modules": {},
|
||||
"icons": {},
|
||||
"splashScreens": {},
|
||||
"privacyDescription": {
|
||||
"NSPhotoLibraryUsageDescription": "读取相册",
|
||||
"NSPhotoLibraryAddUsageDescription": "写入相册",
|
||||
"NSCameraUsageDescription": "要摄像头",
|
||||
"NSMicrophoneUsageDescription": "要麦克风",
|
||||
"NSLocationWhenInUseUsageDescription": "要访问",
|
||||
"NSLocationAlwaysUsageDescription": "要访问",
|
||||
"NSLocationAlwaysAndWhenInUseUsageDescription": "要访问"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"deploymentTarget": "11",
|
||||
"components": [
|
||||
{
|
||||
"name": "xf-camera",
|
||||
"class": "UTSSDKModulesSkinCameraUTSXfCameraComponent",
|
||||
"delegateClass": "XfCameraComponentRegister"
|
||||
}
|
||||
]
|
||||
}
|
||||
+1407
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user