diff --git a/pages/activity/book.vue b/pages/activity/book.vue index 9d267df..9c6a24d 100644 --- a/pages/activity/book.vue +++ b/pages/activity/book.vue @@ -350,41 +350,43 @@ this.form.type = (options.type == 'user' ? 2 : 1); this.form.activity_id = parseInt(options.activity_id); this.form.activity_number_id = parseInt(options.activity_number_id); - var that = this; - wx.getStorage({ - key: 'activityinfo', - success(res) { - that.list = res.data; - console.log(that.list) - for (var m of that.list.numbers) { - if (that.form.activity_number_id == m.id) { - that.numberlist = m - } - } - console.log(that.numberlist) - if (that.form.type == 2) { - that.form.total = 1 - } else if (that.form.type == 1) { - that.form.total = 1;//res.data.team_min_count; - } - } - }) - - //先登录 - that.util.getOpenidInfo(function(res) { - //手机号 - that.util.getUserInfo(function(r) { - //如果手机号为空 需要先授权手机号 - if (that.util.isNull(r.mobile)) { - that.showAuthorization = true; - } else { - that.showAuthorization = false; - that.form.mobile = r.mobile; - } - }, true); - that.loadCommonUser() - - }, true); + + }, + onShow(){ + var that = this; + that.numberlist={}; + wx.getStorage({ + key: 'activityinfo', + success(res) { + that.list = res.data; + for (var m of that.list.numbers) { + if (that.form.activity_number_id == m.id) { + that.numberlist = m + } + } + if (that.form.type == 2) { + that.form.total = 1 + } else if (that.form.type == 1) { + that.form.total = 1;//res.data.team_min_count; + } + } + }) + + //先登录 + that.util.getOpenidInfo(function(res) { + //手机号 + that.util.getUserInfo(function(r) { + //如果手机号为空 需要先授权手机号 + if (that.util.isNull(r.mobile)) { + that.showAuthorization = true; + } else { + that.showAuthorization = false; + that.form.mobile = r.mobile; + } + }, true); + that.loadCommonUser() + + }, true); }, onHide() { clearInterval(this.t) diff --git a/pages/activity/info.vue b/pages/activity/info.vue index 5af4e94..8a50644 100644 --- a/pages/activity/info.vue +++ b/pages/activity/info.vue @@ -141,16 +141,21 @@ }, onLoad(options) { var that = this; - that.id = options.id; - wx.getLocation({ - success(res) { - console.log(res) - that.latitude = res.latitude; - that.longitude = res.longitude; - that.loadActiveInfo() - } - }) - + that.id = options.id; + + + }, + onShow(){ + var that = this; + that.numbers=[]; + wx.getLocation({ + success(res) { + console.log(res) + that.latitude = res.latitude; + that.longitude = res.longitude; + that.loadActiveInfo() + } + }) }, onShareAppMessage() { return { diff --git a/utils/util.js b/utils/util.js index 359e6c0..36c8f53 100755 --- a/utils/util.js +++ b/utils/util.js @@ -1,6 +1,6 @@ import md5 from "./md5.min"; const HOSTARR = { - 'development':'https://leyitest.ali251.langye.net', + 'development':'https://leyitest.ali251.langye.net',//'https://leyiyuyue.szgmbwg.org.cn',// 'production': 'https://leyiyuyue.szgmbwg.org.cn' }; // 审核状态