问题:如题
一个选择学校的页面,注册时和修改资料会跳转到这,部分用户出现“微信小程序意外退出,请稍后重试”的情况。
代码
wxml
{{errorText}}
{{provinceData[provinceId]?provinceData[provinceId]:'选择省份'}}
{{cityData[cityId]?cityData[cityId]:'选择市区'}}
{{areasData[areaId]?areasData[areaId]:'选择地区'}}
{{item.name}}
+ 添加学校
请选择地区
{{item}}
{{item}}
{{item}}
js
// chooseSchool.js
var app = getApp();
var BMAP = require('../../utils/bmap-wx.min.js');
Page({
/**
* 页面的初始数据
*/
data: {
nowSlideType: '',
provinceId: '',
cityId: '',
areaId: '',
schoolId: 0,
maskHidden: true,
searchKeyWord: '',
addSchoolName: '',
errorText: '',
staticBaseUrl: app.globalData.staticBaseUrl,
cityData: {},
areasData: {}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that = this;
var from = options.from;
var high_school = Number(options.high_school);
wx.showLoading({
title: ' ',
mask: true,
})
this.setData({
from: from,
high_school: high_school
})
if (from === 'myinfo' || from == 'myset') {
var token = wx.getStorageSync('ets_token');
that.setData({
token: token,
})
//调用应用实例的方法获取全局数据
app.getUserInfo(function (userInfo) {
var class_province = userInfo.class_province; // 限制修改的省份
var class_city = userInfo.class_city; //限制修改的市区
var school_id = '';
if(from == 'myinfo'){
school_id = userInfo.school_id;
high_school = userInfo.high_school;
}
var param = {};
param.high_school = high_school;
param.province_id = userInfo.province_id;
param.city_id = userInfo.city_id;
param.area_id = userInfo.area_id;
param.school_id = school_id;
param.school_name = '';
//更新数据
that.setData({
param: param,
本文网址:http://www.91bianli.com/weixinxiaochengxu/47093.html