Skip to content

Commit

Permalink
WechatPlugin: upgrade to 1.3.2 #2396
Browse files Browse the repository at this point in the history
  • Loading branch information
airyland committed Mar 8, 2018
1 parent 17a17a8 commit 88603fe
Show file tree
Hide file tree
Showing 6 changed files with 750 additions and 38 deletions.
4 changes: 3 additions & 1 deletion .eslintignore
Expand Up @@ -5,4 +5,6 @@ config/*.js
src/tools/*/*.js
src/components/video/zy.media.js
src/plugins/wechat/1.3.0.js
src/plugins/wechat/origin.1.3.0.js
src/plugins/wechat/1.3.2.js
src/plugins/wechat/origin.1.3.0.js
src/plugins/wechat/origin.1.3.2.js
97 changes: 61 additions & 36 deletions src/plugins/wechat/1.3.0.js
Expand Up @@ -184,8 +184,8 @@ let wx
f(function () {
V.initEndTime = p()
});
var O = !1,
E = [],
var E = !1,
O = [],
N = {
config: function (e) {
C = e, u("config", e);
Expand Down Expand Up @@ -383,14 +383,14 @@ let wx
}, e)
},
getLocalImgData: function (e) {
!1 === O ? (O = !0, i("getLocalImgData", {
!1 === E ? (E = !0, i("getLocalImgData", {
localId: e.localId
}, (e._complete = function (e) {
if (O = !1, E.length > 0) {
var n = E.shift();
if (E = !1, O.length > 0) {
var n = O.shift();
wx.getLocalImgData(n)
}
}, e))) : E.push(e)
}, e))) : O.push(e)
},
getNetworkType: function (e) {
var n = function (e) {
Expand Down Expand Up @@ -572,44 +572,69 @@ let wx
},
miniProgram: {
navigateBack: function (e) {
i("invokeMiniProgramAPI", {
name: "navigateBack",
arg: {
delta: (e = e || {}).delta || 1
}
}, e)
e = e || {}, f(function () {
i("invokeMiniProgramAPI", {
name: "navigateBack",
arg: {
delta: e.delta || 1
}
}, e)
})
},
navigateTo: function (e) {
i("invokeMiniProgramAPI", {
name: "navigateTo",
arg: {
url: e.url
}
}, e)
f(function () {
i("invokeMiniProgramAPI", {
name: "navigateTo",
arg: {
url: e.url
}
}, e)
})
},
redirectTo: function (e) {
i("invokeMiniProgramAPI", {
name: "redirectTo",
arg: {
url: e.url
}
}, e)
f(function () {
i("invokeMiniProgramAPI", {
name: "redirectTo",
arg: {
url: e.url
}
}, e)
})
},
switchTab: function (e) {
i("invokeMiniProgramAPI", {
name: "switchTab",
arg: {
url: e.url
}
}, e)
f(function () {
i("invokeMiniProgramAPI", {
name: "switchTab",
arg: {
url: e.url
}
}, e)
})
},
reLaunch: function (e) {
i("invokeMiniProgramAPI", {
name: "reLaunch",
arg: {
url: e.url
}
}, e)
f(function () {
i("invokeMiniProgramAPI", {
name: "reLaunch",
arg: {
url: e.url
}
}, e)
})
},
postMessage: function (e) {
f(function () {
i("invokeMiniProgramAPI", {
name: "postMessage",
arg: e.data || {}
}, e)
})
},
getEnv: function (n) {
f(function () {
n({
miniprogram: "miniprogram" === e.__wxjs_environment
})
})
}
}
},
Expand Down

0 comments on commit 88603fe

Please sign in to comment.