@dcloudio/uni-mp-toutiao 3.0.0-alpha-3021320211117005 → 3.0.0-alpha-3021320211119002

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -272,7 +272,7 @@ function getApiInterceptorHooks(method) {
272
272
  }
273
273
  return interceptor;
274
274
  }
275
- function invokeApi(method, api, options, ...params) {
275
+ function invokeApi(method, api, options, params) {
276
276
  const interceptor = getApiInterceptorHooks(method);
277
277
  if (interceptor && Object.keys(interceptor).length) {
278
278
  if (isArray(interceptor.invoke)) {
@@ -622,17 +622,17 @@ function promisify(name, api) {
622
622
  if (!isFunction(api)) {
623
623
  return api;
624
624
  }
625
- return function promiseApi(options = {}) {
625
+ return function promiseApi(options = {}, ...rest) {
626
626
  if (isFunction(options.success) ||
627
627
  isFunction(options.fail) ||
628
628
  isFunction(options.complete)) {
629
- return wrapperReturnValue(name, invokeApi(name, api, options));
629
+ return wrapperReturnValue(name, invokeApi(name, api, options, rest));
630
630
  }
631
631
  return wrapperReturnValue(name, handlePromise(new Promise((resolve, reject) => {
632
632
  invokeApi(name, api, extend({}, options, {
633
633
  success: resolve,
634
634
  fail: reject,
635
- }));
635
+ }), rest);
636
636
  })));
637
637
  };
638
638
  }
@@ -201,7 +201,9 @@ function createEmitFn(oldEmit, ctx) {
201
201
  const scope = ctx.$scope;
202
202
  if (scope && event) {
203
203
  const detail = { __args__: args };
204
- scope.triggerEvent(event, detail);
204
+ {
205
+ scope.triggerEvent(event, detail);
206
+ }
205
207
  }
206
208
  return oldEmit.apply(this, [event, ...args]);
207
209
  };
@@ -256,7 +258,7 @@ function initMocks(instance, mpInstance, mocks) {
256
258
  const ctx = instance.ctx;
257
259
  mocks.forEach((mock) => {
258
260
  if (hasOwn(mpInstance, mock)) {
259
- ctx[mock] = mpInstance[mock];
261
+ instance[mock] = ctx[mock] = mpInstance[mock];
260
262
  }
261
263
  });
262
264
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-mp-toutiao",
3
- "version": "3.0.0-alpha-3021320211117005",
3
+ "version": "3.0.0-alpha-3021320211119002",
4
4
  "description": "uni-app mp-toutiao",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -22,11 +22,11 @@
22
22
  },
23
23
  "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
24
24
  "dependencies": {
25
- "@dcloudio/uni-cli-shared": "3.0.0-alpha-3021320211117005",
26
- "@dcloudio/uni-mp-compiler": "3.0.0-alpha-3021320211117005",
27
- "@dcloudio/uni-mp-vite": "3.0.0-alpha-3021320211117005",
28
- "@dcloudio/uni-mp-vue": "3.0.0-alpha-3021320211117005",
29
- "@dcloudio/uni-shared": "3.0.0-alpha-3021320211117005",
25
+ "@dcloudio/uni-cli-shared": "3.0.0-alpha-3021320211119002",
26
+ "@dcloudio/uni-mp-compiler": "3.0.0-alpha-3021320211119002",
27
+ "@dcloudio/uni-mp-vite": "3.0.0-alpha-3021320211119002",
28
+ "@dcloudio/uni-mp-vue": "3.0.0-alpha-3021320211119002",
29
+ "@dcloudio/uni-shared": "3.0.0-alpha-3021320211119002",
30
30
  "@vue/compiler-core": "3.2.22"
31
31
  }
32
32
  }