Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] uni-app支付宝小程序环境 #50

Closed
ssw1992 opened this issue Apr 19, 2023 · 4 comments
Closed

[Bug Report] uni-app支付宝小程序环境 #50

ssw1992 opened this issue Apr 19, 2023 · 4 comments
Labels
bug:confirmed Something isn't working released

Comments

@ssw1992
Copy link

ssw1992 commented Apr 19, 2023

Reproduction Link

empty

alova Version

2.1.1

Describe the Bug

image
image
image
image
我尝试改源码,只需要把self函数更名就可以解决
支付宝小程序环境,因为把self设置成readonly,所以编译不通过,微信小程序没有这种设置,所有没这个问题

Reproduce Steps

初始化项目
npx degit dcloudio/uni-preset-vue#vite-ts my-vue3-project

进入项目安装依赖
npm i

安装alova
npm install alova @alova/adapter-uniapp --save

在src/pages/index/index.vue下编写代码

<script setup lang="ts"> import { createAlova } from "alova"; import type { Method } from "alova"; import AdapterUniapp from "@alova/adapter-uniapp"; createAlova({ ...AdapterUniapp(), }); </script> 1111 运行代码 npm run dev:mp-alipay 打开支付宝小程序工具,打开项目目录dist\dev\mp-alipay,运行小程序就会出现这个问题

Device / Browser / Browser Version

支付宝小程序

@JOU-amjs
Copy link
Contributor

兄弟,这个问题真的发现的真的很厉害,我稍后发布一个版本解决这个问题。
非常感谢你的反馈哦!🤞😁😁

@JOU-amjs JOU-amjs added the bug:confirmed Something isn't working label Apr 19, 2023
@JOU-amjs
Copy link
Contributor

🎉 This issue has been resolved in version 2.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@JOU-amjs
Copy link
Contributor

已发布2.1.2,已将self修改为了_self来解决你的问题。

export const _self = <T>(arg: T) => arg;

JOU-amjs pushed a commit that referenced this issue May 6, 2023
# [2.3.0](v2.2.0...v2.3.0) (2023-05-06)

### Bug Fixes

* because of keyword. change function name self ([7864be7](7864be7)), closes [#50](#50)
* don't cache in onError when beforeRequest(sync fn) throw a error ([4b782dd](4b782dd)), closes [#63](#63)

### Features

* **ssr:** support ssr, you can use alova in Nuxt, Next, Sveltekit ([fc06f1e](fc06f1e)), closes [#51](#51)
* throw error when get error ([19bff85](19bff85))
@JOU-amjs
Copy link
Contributor

JOU-amjs commented May 6, 2023

🎉 This issue has been resolved in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Codechief09 added a commit to Codechief09/vue-alova that referenced this issue Oct 13, 2023
# [2.3.0](alovajs/alova@v2.2.0...v2.3.0) (2023-05-06)

### Bug Fixes

* because of keyword. change function name self ([7864be7](alovajs/alova@7864be7)), closes [#50](alovajs/alova#50)
* don't cache in onError when beforeRequest(sync fn) throw a error ([4b782dd](alovajs/alova@4b782dd)), closes [#63](alovajs/alova#63)

### Features

* **ssr:** support ssr, you can use alova in Nuxt, Next, Sveltekit ([fc06f1e](alovajs/alova@fc06f1e)), closes [#51](alovajs/alova#51)
* throw error when get error ([19bff85](alovajs/alova@19bff85))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:confirmed Something isn't working released
Projects
None yet
Development

No branches or pull requests

2 participants