Skip to content

Commit

Permalink
fix(uni-mp-weibo): remove uni-h5 modify
Browse files Browse the repository at this point in the history
  • Loading branch information
lingxiao7 committed Jul 20, 2023
1 parent dc77d9b commit 98f1a90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 82 deletions.
30 changes: 1 addition & 29 deletions packages/uni-h5/dist/uni-h5.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1008,13 +1008,6 @@ const index$A = /* @__PURE__ */ defineBuiltInComponent({
}
return;
}
if (
// @ts-ignore
window.weibo && // @ts-ignore
typeof window.weibo.share === "function" && props2.openType === "share"
) {
window.weibo.share();
}
});
const uniLabel = vue.inject(uniLabelKey, false);
if (uniLabel) {
Expand Down Expand Up @@ -1405,11 +1398,6 @@ function handlePromise(promise) {
}
function promisify(name, fn) {
return (args = {}, ...rest) => {
try {
if (false)
;
} catch (e2) {
}
if (hasCallback(args)) {
return wrapperReturnValue(name, invokeApi(name, fn, args, rest));
}
Expand Down Expand Up @@ -1502,14 +1490,6 @@ function wrapperTaskApi(name, fn, protocol, options) {
}
function wrapperSyncApi(name, fn, protocol, options) {
return (...args) => {
try {
if (window.weibo && window.weibo[name]) {
window.currentWeiboApiName = name;
var value = window.weibo[name](args);
return value;
}
} catch (e2) {
}
const errMsg = beforeInvokeApi(name, args, protocol, options);
if (errMsg) {
throw new Error(errMsg);
Expand Down Expand Up @@ -2879,19 +2859,11 @@ function useImageState(rootRef, props2) {
opts[0] && (position = opts[0]);
opts[1] && (size = opts[1]);
}
if (window.weibo && props2.src.startsWith("Temp")) {
imgSrc.value = `../../${props2.src}`;
}
return `background-image:${imgSrc.value ? 'url("' + imgSrc.value + '")' : "none"};background-position:${position};background-size:${size};`;
});
const state = vue.reactive({
rootEl: rootRef,
src: vue.computed(function() {
if (window.weibo && props2.src.startsWith("Temp")) {
return `../../${props2.src}`;
}
return props2.src ? getRealPath(props2.src) : "";
}),
src: vue.computed(() => props2.src ? getRealPath(props2.src) : ""),
origWidth: 0,
origHeight: 0,
origStyle: {
Expand Down
54 changes: 1 addition & 53 deletions packages/uni-h5/dist/uni-h5.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -2312,13 +2312,6 @@ const index$x = /* @__PURE__ */ defineBuiltInComponent({
}
return;
}
if (
// @ts-ignore
window.weibo && // @ts-ignore
typeof window.weibo.share === "function" && props2.openType === "share"
) {
window.weibo.share();
}
});
const uniLabel = inject(uniLabelKey, false);
if (uniLabel) {
Expand Down Expand Up @@ -3008,11 +3001,6 @@ function handlePromise(promise) {
}
function promisify(name, fn) {
return (args = {}, ...rest) => {
try {
if (false)
;
} catch (e2) {
}
if (hasCallback(args)) {
return wrapperReturnValue(name, invokeApi(name, fn, args, rest));
}
Expand Down Expand Up @@ -3143,14 +3131,6 @@ function wrapperTaskApi(name, fn, protocol, options) {
}
function wrapperSyncApi(name, fn, protocol, options) {
return (...args) => {
try {
if (window.weibo && window.weibo[name]) {
window.currentWeiboApiName = name;
var value = window.weibo[name](args);
return value;
}
} catch (e2) {
}
const errMsg = beforeInvokeApi(name, args, protocol, options);
if (errMsg) {
throw new Error(errMsg);
Expand Down Expand Up @@ -5183,45 +5163,21 @@ function offPageNotFound(hook) {
offAppHook(ON_PAGE_NOT_FOUND, hook);
}
function onError(hook) {
if (window.weibo) {
window.weibo.onError(hook);
return;
}
onAppHook(ON_ERROR, hook);
}
function offError(hook) {
if (window.weibo) {
window.weibo.offError(hook);
return;
}
offAppHook(ON_ERROR, hook);
}
function onAppShow(hook) {
if (window.weibo) {
window.weibo.onAppShow(hook);
return;
}
onAppHook(ON_SHOW, hook);
}
function offAppShow(hook) {
if (window.weibo) {
window.weibo.offAppShow(hook);
return;
}
offAppHook(ON_SHOW, hook);
}
function onAppHide(hook) {
if (window.weibo) {
window.weibo.onAppHide(hook);
return;
}
onAppHook(ON_HIDE, hook);
}
function offAppHide(hook) {
if (window.weibo) {
window.weibo.offAppHide(hook);
return;
}
offAppHook(ON_HIDE, hook);
}
const API_GET_ENTER_OPTIONS_SYNC = "getEnterOptionsSync";
Expand Down Expand Up @@ -8980,19 +8936,11 @@ function useImageState(rootRef, props2) {
opts[0] && (position = opts[0]);
opts[1] && (size = opts[1]);
}
if (window.weibo && props2.src.startsWith("Temp")) {
imgSrc.value = `../../${props2.src}`;
}
return `background-image:${imgSrc.value ? 'url("' + imgSrc.value + '")' : "none"};background-position:${position};background-size:${size};`;
});
const state2 = reactive({
rootEl: rootRef,
src: computed(function() {
if (window.weibo && props2.src.startsWith("Temp")) {
return `../../${props2.src}`;
}
return props2.src ? getRealPath(props2.src) : "";
}),
src: computed(() => props2.src ? getRealPath(props2.src) : ""),
origWidth: 0,
origHeight: 0,
origStyle: {
Expand Down

0 comments on commit 98f1a90

Please sign in to comment.