麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
var a, t = require("…/…/components/wxSearch/wxSearch.js"), e = require("…/…/utils/qqmap-wx-jssdk.min.js"), i = getApp();
Page({
data: {
list: [],
banner: [],
info: [],
isShow: !1,
uid: “”,
keys: “”
},
onLoad: function() {
var t = this;
t.seachTag(), t.vUpdate(), i.util.getUserInfo(function(a) {
a.memberInfo ? (t.setData({
uid: a.memberInfo.uid
}), wx.setStorageSync(“uid”, a.memberInfo.uid)) : t.hideDialog();
}), i.util.request({
url: “entry/wxapp/Api”,
data: {
m: “ox_master”,
r: “home.index”
},
success: function(i) {
if (i.data.data) {
wx.setNavigationBarTitle({
title: i.data.data.info.name
});
a = new e({
key: i.data.data.key
}), wx.getLocation({
type: “wgs84”,
success: function(a) {
t.getCity(a.latitude, a.longitude);
}
}), t.setData({
banner: i.data.data.banner,
list: i.data.data.list,
nav: i.data.data.nav,
info: i.data.data.info
});
}
}
});
},
hideDialog: function() {
this.setData({
isShow: !this.data.isShow
});
},
updateUserInfo: function(a) {
var t = this;
t.hideDialog(), i.util.getUserInfo(function(a) {
t.setData({
uid: res.memberInfo.uid
}), wx.setStorageSync(“uid”, a.memberInfo.uid);
}, a.detail);
},
onPullDownRefresh: function() {
var a = this;
i.util.request({
url: “entry/wxapp/Api”,
data: {
m: “ox_master”,
r: “home.index”
},
success: function(t) {
t.data.data && (wx.setNavigationBarTitle({
title: t.data.data.info.name
}), a.setData({
banner: t.data.data.banner,
list: t.data.data.list,
nav: t.data.data.nav,
info: t.data.data.info
})), wx.stopPullDownRefresh();
}
});
},
goType: function(a) {
var t = this;
i.util.request({
url: “entry/wxapp/Api”,
data: {
m: “ox_master”,
r: “me.add_formid”,
uid: t.data.uid,
formid: a.detail.formId
}
}), wx.navigateTo({
url: “/pages/index/serviceList/index?type=” + a.target.dataset.id
});
},
onShareAppMessage: function() {},
gofenlei: function(a) {
var t = this;
i.util.request({
url: “entry/wxapp/Api”,
showLoading: !1,
data: {
m: “ox_master”,
r: “me.add_formid”,
uid: t.data.uid,
formid: a.detail.formId
}
}), wx.navigateTo({
url: “/pages/need/pages/home/index?type_value=” + a.target.dataset.name
});
},
vUpdate: function() {
var a = wx.getUpdateManager();
a.onCheckForUpdate(function(a) {
console.log(a.hasUpdate);
}), a.onUpdateReady(function() {
wx.showModal({
title: “يىڭلىنىش ئەسكەرتمىسى”,
content: “نەشىرى يىڭلىنىپ بولدى قايتا قوزغىتامسىز؟”,
success: function(t) {
t.confirm && a.applyUpdate();
}
});
});
},
wxSearchFn: function(a) {},
wxSearchInput: function(a) {
var e = this;
t.wxSearchInput(a, e);
},
wxSerchFocus: function(a) {
var e = this;
t.wxSearchFocus(a, e);
},
wxSearchBlur: function(a) {
var e = this;
t.wxSearchBlur(a, e);
},
wxSearchKeyTap: function(a) {
wx.navigateTo({
url: “/pages/need/pages/home/index?type_value=” + a.target.dataset.key
});
},
wxSearchDeleteKey: function(a) {
var e = this;
t.wxSearchDeleteKey(a, e);
},
wxSearchDeleteAll: function(a) {
var e = this;
t.wxSearchDeleteAll(e);
},
wxSearchTap: function(a) {
var e = this;
t.wxSearchHiddenPancel(e);
},
seachTag: function(a) {
var e = this;
i.util.request({
url: “entry/wxapp/Api”,
data: {
m: “ox_master”,
r: “home.hotTag”,
uid: e.data.uid
},
success: function(a) {
if (a.data.data) {
var i = a.data.data.list, n = a.data.data.hot;
t.init(e, 46, n), t.initMindKeys(i);
}
}
});
},
getCity: function(t, e) {
var i = this;
a.reverseGeocoder({
location: {
latitude: t,
longitude: e
},
success: function(a) {
var a = a.result, t = [];
t.push({
title: a.address_component.city
}), i.setData({
title: t[0].title
});
},
fail: function(a) {
console.error(a);
}
});
}
});