We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
问题描述 支付宝小程序在启动页无法请求云函数
复现步骤
<template> <view class="home"> <view ref="test123" @click="test">点击调试</view> </view> </template> <script> import { mapState, mapMutations } from 'vuex'; export default { data() { return {} }, computed: { ...mapState([ 'movieList', ]) }, onLoad() { setTimeout(() => { this.test(); }, 10000) }, watch: {}, methods: { ...mapMutations(['setSelectedMovie', 'setMovieList']), test(e) { uniCloud.callFunction({ name: 'movie-list', data: {} }).then(res => { console.log('list res', res) //this.movieList = res.result.data.data this.setMovieList(res.result.data.data) }).catch(err => { console.log('err', err) uni.showModal({ content: err.errMsg, showCancel: false }); }) }, } } </script> <style lang="scss"> </style>
预期结果 onLoad 里得请求数据总是失败,点击得时候可以获取数据。
实际结果 onLoad 可以获取
系统信息:
补充信息 [可选] [根据你的分析,出现这个问题的原因可能在哪里?]
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
问题描述
支付宝小程序在启动页无法请求云函数
复现步骤
预期结果
onLoad 里得请求数据总是失败,点击得时候可以获取数据。
实际结果
onLoad 可以获取
系统信息:
补充信息
[可选]
[根据你的分析,出现这个问题的原因可能在哪里?]
The text was updated successfully, but these errors were encountered: