From 4c8bf94991bca692efb0f0dfa5b06da5bc39d1bf Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Thu, 4 Apr 2019 13:51:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(runtime):=20uni-mp-weixin=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=9C=80=E4=BD=8E=E7=89=88=E6=9C=AC=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/uni-mp-weixin/dist/index.js | 8 +++++++- packages/uni-mp-weixin/package.json | 2 +- src/core/runtime/wrapper/create-app.js | 8 +++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/uni-mp-weixin/dist/index.js b/packages/uni-mp-weixin/dist/index.js index 82f12fa57..d83a2c462 100644 --- a/packages/uni-mp-weixin/dist/index.js +++ b/packages/uni-mp-weixin/dist/index.js @@ -589,7 +589,13 @@ function createApp (vm) { }); const appOptions = { - onLaunch (args) { + onLaunch (args) { + { + if (!wx.canIUse('nextTick')) { // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断 + console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上'); + } + } + this.$vm = vm; this.$vm._isMounted = true; diff --git a/packages/uni-mp-weixin/package.json b/packages/uni-mp-weixin/package.json index f8973c987..678be06e1 100644 --- a/packages/uni-mp-weixin/package.json +++ b/packages/uni-mp-weixin/package.json @@ -1,6 +1,6 @@ { "name": "@dcloudio/uni-mp-weixin", - "version": "0.0.924", + "version": "0.0.925", "description": "uni-app mp-weixin", "main": "dist/index.js", "scripts": { diff --git a/src/core/runtime/wrapper/create-app.js b/src/core/runtime/wrapper/create-app.js index 0f44c4e48..f81792ea3 100644 --- a/src/core/runtime/wrapper/create-app.js +++ b/src/core/runtime/wrapper/create-app.js @@ -40,7 +40,13 @@ export function createApp (vm) { }) const appOptions = { - onLaunch (args) { + onLaunch (args) { + if (__PLATFORM__ === 'mp-weixin') { + if (!wx.canIUse('nextTick')) { // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断 + console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上') + } + } + this.$vm = vm this.$vm._isMounted = true -- GitLab