ios手机iphone7,提示:“小程序意外退出,请稍候重试”
发布于 4 年前 作者 pqian 15618 次浏览 来自 问答

进入到小程序首页就 提示小程序意外退出,请稍候重试 , 然后就闪退了;

这是页面的js

// pages/index/index.js

var app = getApp();

Page({

/**

  * 页面的初始数据

  */

data: {

indicatorDots: true,

autoplay: true,

interval: 5000,

duration: 1000,

toView: ‘red’,

scrollTop: 100,

config: [],

inputValue: ‘’,

list:{},

slide:[],

},

bindInput: function (e) {

this.setData({

inputValue: e.detail.value

})

console.log(‘bindInput’ + this.data.inputValue)

},

setSearchStorage: function (e) {

var id = e.target.dataset.key;

console.log(id)

wx.navigateTo({

url: ‘/pages/result/result?id=’ + id

})

},

/**

  * 生命周期函数–监听页面加载

  */

getGoodsDetail: function (event) {

console.log(event);

var p = event.currentTarget.id

wx.navigateTo({ url: ‘/hckj_shopxcx/pages/detail/detail?id=’ + p })

},

call: function (e) {

var tel = e.target.dataset.shoptel;

wx.makePhoneCall({

//phoneNumber: tel

phoneNumber: tel

})

},

nav:function(options){

wx.switchTab({

url: ‘/pages/card/card’,

})

},

nav1: function (options) {

wx.switchTab({

url: ‘/pages/new/new’,

})

},

getLists: function () {

var that = this;

app.util.request({

‘url’: https://xcx.0768000.cn/app/index.php?i=45&t=0&v=v1.0.1&from=wxapp&c=entry&a=wxapp&do=rc&m=hckj_shopxcx,

data: {

m: ‘hckj_shopxcx’,

},

success(res) {

console.log(res.data);

that.setData({

list : res.data.data

})

console.log(“请求成功!”);

},

fail(res) {

app.util.message(res.data.message, ‘’, ‘success’)

}

})

},

getGoodsLists: function (event) {

console.log(event);

var p = event.currentTarget.id

console.log§;

wx.navigateTo({ url: ‘/hckj_shopxcx/pages/list/list?id=’ + p })

},

getIndexConfig: function (options) {

console.log(‘getIndexConfig’);

var that = this;

app.util.request({

‘url’: ‘entry/wxapp/index’,

data: {

m: ‘hckj_shopxcx’

},

success(res) {

that.setData({

config: res.data.data

})

wx.setStorageSync(‘config’, res.data.data);

// wx.setNavigationBarTitle({    //页面标题

//   title: res.data.data.name

// })

}

})

},

onLoad: function (options) {

var that = this;

wx.request({

‘url’: https://xcx.0768000.cn/app/index.php?i=47&t=0&v=v1.0.1&from=wxapp&c=entry&a=wxapp&do=slide&m=xx_blog,

‘cachetime’: ‘30’,

success: function (res) {

that.setData({

slide: res.data.data

})

}

}),

this.getLists();

this.getIndexConfig();

},

/**

  * 生命周期函数–监听页面初次渲染完成

  */

onReady: function () {

},

/**

  * 生命周期函数–监听页面显示

  */

onShow: function () {

},

/**

  * 生命周期函数–监听页面隐藏

  */

onHide: function () {

},

/**

  * 生命周期函数–监听页面卸载

  */

onUnload: function () {

},

/**

  * 页面相关事件处理函数–监听用户下拉动作

  */

onPullDownRefresh: function () {

},

/**

  * 页面上拉触底事件的处理函数

  */

onReachBottom: function () {

},

/**

  * 用户点击右上角分享

  */

onShareAppMessage: function () {

}

})

1 回复

请问楼主解决了没? 我这里也遇到同样的iPhone7会卡退的问题,我这里还木有手机测试

回到顶部