You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2020/08/08 04:02:53 UTC

[GitHub] [incubator-weex] liu806784336 opened a new issue #3248: [JS Framework] Failed to receiveTasks, instance (2) is not available.

liu806784336 opened a new issue #3248:
URL: https://github.com/apache/incubator-weex/issues/3248


   根据其他回答里,是mainjs配置出错,以下是我的main.js配置
   import Vue from 'vue';
   import App from './App';
   import uView from 'uview-ui';
   import Validates from "./public/validate.js";
   import DataHanding from "public/dataHanding.js"
   
   Vue.use(uView);
   
   Vue.prototype.$Validates = Validates;
   Vue.prototype.$DataHanding = DataHanding;
   
   Vue.config.productionTip = false;
   
   App.mpType = 'app'
   
   const app = new Vue({
       ...App
   })
   app.$mount()
   
   并且会导致uni.request无法发出请求,仅限于pda端,自己的手机或者浏览器都能正常使用,仅限pda,以下是我的封装:
   const promise = new Promise(function(resolve,reject){
   			uni.request({
   				url: that.url,
   				method:that.method,
   				header:that.header,
   				data: that.params,
   				sslVerify:false,
   				success: (res) => {
   					resolve(res.data)
   				},
   				fail:(err) => {
   					console.log(err);
   					reject(err.data)
   				}
   			})
   		})
   		return promise;
   
   我想咨询一下原因


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org