diff --git a/packages/uni-cli-shared/components/ad.mixin.mp.js b/packages/uni-cli-shared/components/ad.mixin.mp.js index ea507591de985a27d15ad98b85b41112158b52c6..f250d01cd34d48bbe07461e503550f6ca8a1a13a 100644 --- a/packages/uni-cli-shared/components/ad.mixin.mp.js +++ b/packages/uni-cli-shared/components/ad.mixin.mp.js @@ -51,7 +51,7 @@ export default { this._startLoading() setTimeout(() => { - this.loading = false + this._onmpload() }, 3000) }, diff --git a/packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js b/packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js index 709da3ec905c88ed51ecfd26565991a6717e7704..4cfb6271c429461156df84527a9d611be6a50a46 100644 --- a/packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js +++ b/packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js @@ -211,9 +211,11 @@ if (process.env.UNI_USING_V3_NATIVE) { if (process.env.UNI_USING_NATIVE || process.env.UNI_USING_V3_NATIVE) { plugins.push(new WebpackUniMPPlugin()) + const assetsDir = 'static' + const hybridDir = 'hybrid/html' const array = [{ - from: path.resolve(process.env.UNI_INPUT_DIR, 'static'), - to: 'static' + from: path.resolve(process.env.UNI_INPUT_DIR, assetsDir), + to: assetsDir }] // 自动化测试时,不启用androidPrivacy.json if (!process.env.UNI_AUTOMATOR_WS_ENDPOINT) { @@ -225,14 +227,27 @@ if (process.env.UNI_USING_NATIVE || process.env.UNI_USING_V3_NATIVE) { }) } } - const hybridHtmlPath = path.resolve(process.env.UNI_INPUT_DIR, 'hybrid/html') + const hybridHtmlPath = path.resolve(process.env.UNI_INPUT_DIR, hybridDir) if (fs.existsSync(hybridHtmlPath)) { array.push({ from: hybridHtmlPath, - to: 'hybrid/html' + to: hybridDir }) } + global.uniModules.forEach(module => { + const modules = 'uni_modules/' + const assets = modules + module + '/' + assetsDir + const hybrid = modules + module + hybridDir + array.push({ + from: path.resolve(process.env.UNI_INPUT_DIR, assets), + to: assets + }, { + from: path.resolve(process.env.UNI_INPUT_DIR, hybrid), + to: hybrid + }) + }) + if (process.env.UNI_USING_NVUE_COMPILER) { array.push({ from: path.resolve(getTemplatePath(), 'common'), diff --git a/src/core/service/api/base/can-i-use.js b/src/core/service/api/base/can-i-use.js index 0189ee5ab0f61e35da33126227df4f1cb88f9557..1e434173fe986e0457a20e9de884607ee350f21f 100644 --- a/src/core/service/api/base/can-i-use.js +++ b/src/core/service/api/base/can-i-use.js @@ -3,11 +3,15 @@ import { } from 'uni-shared' import platformSchema from 'uni-platform/helpers/can-i-use' +import api from 'uni-service-api' // TODO 待处理其他 API 的检测 export function canIUse (schema) { if (hasOwn(platformSchema, schema)) { return platformSchema[schema] } - return true -} + if (hasOwn(api, schema)) { + return true + } + return false +}