红米k30打开小程序时报这个错误,没有具体的行号,无法排查,是不是小程序启动时候的初始化错误?
目前只有红米k30打开有问题,其他型号的手机打开是没问题的。
这个是报错的截图,因为没有行号,所以无法排查。发现和一个组件有关,以下是组件代码:
var func=require('../../js/function.js');
var util=require('../../js/util.js');
var api=require('../../api.js');
var http=require('../../js/request.js').default;
var global=require('../../js/global.js');
Component({
options: {
multipleSlots: true, // 在组件定义时的选项中启用多slot支持options:
styleIsolation: 'apply-shared'
},
data: {},
properties:{
bindUsers:Array,
show:0
},
attached() {
var p=this,d=this.data,setting,siteInfo,csreply,account;
setting=global('setting'),
siteInfo=global('siteInfo'),
csreply=global('csreply'),
account=global('account')
p.setData({setting,siteInfo,csreply,account})
},
detached(){
},
methods: {
loginByWeixin:function(e){
let p=this,d=this.data,openid=e.currentTarget.dataset.openid,mchid=e.currentTarget.dataset.mchid,mchUser,merchant,shop
http.post('mchmanage.loginbyweixin',{openid,mchid}).then(function(res){
if (res.errno==0){
mchUser=res.user
merchant=res.merchant
shop=res.shop
global('mchUser',mchUser);
global('merchant',res.merchant);
global('shop',res.shop);
p.triggerEvent('callParent',mchUser,merchant,shop)
util.showToast(res.message,'redirect:/packages/mchmanage/index',2000);
}else{
util.showToast(res.message)
}
})
},
maskTap:function(){
let c=this,d=this.data;
this.setData({show:0})
},
catchTap:function(){
},
closeLayer:function(){
let c=this,d=this.data
this.setData({show:0})
},
confirm:function(e){
let c=this,d=this.data,type=d.type
c.setData({show:0})
}
},
lefetimes:{
},
pageLifetimes: {
}
})
