Commit 34ff2b9a5449d3fefb6af11e743abb34def178b1

Authored by yvan.ni
1 parent 117aca77

礼包,新人,节日,生日,助力的onload就要判断注册

pages/giftpack/birthdaygift/birthdaygift.js
@@ -115,6 +115,15 @@ Page({ @@ -115,6 +115,15 @@ Page({
115 }, 115 },
116 116
117 onLoad: function onLoad(options) { 117 onLoad: function onLoad(options) {
  118 + //--先判断会员状态--
  119 + var user_info = getApp().globalData.userInfo;
  120 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  121 + wx.navigateTo({
  122 + url: '/pages/getphone/getphone',
  123 + })
  124 + return false;
  125 + }
  126 +
118 var th = this; 127 var th = this;
119 th.setData({ 128 th.setData({
120 getActId: options.actId, 129 getActId: options.actId,
pages/giftpack/buygiftpack/giftpackbuy.js
@@ -27,6 +27,16 @@ Page({ @@ -27,6 +27,16 @@ Page({
27 total: 0, //总数量 27 total: 0, //总数量
28 }, 28 },
29 onLoad: function(options) { 29 onLoad: function(options) {
  30 +
  31 + //--先判断会员状态--
  32 + var user_info = getApp().globalData.userInfo;
  33 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  34 + wx.navigateTo({
  35 + url: '/pages/getphone/getphone',
  36 + })
  37 + return false;
  38 + }
  39 +
30 var th = this; 40 var th = this;
31 var my_confirm = th.selectComponent("#my_confirm"); //组件的id 41 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
32 my_confirm.open_cancel(0); 42 my_confirm.open_cancel(0);
pages/giftpack/evaluategift/evaluategift.js
@@ -120,6 +120,16 @@ Page({ @@ -120,6 +120,16 @@ Page({
120 }) 120 })
121 }, 121 },
122 onLoad: function(options) { 122 onLoad: function(options) {
  123 +
  124 + //--先判断会员状态--
  125 + var user_info = getApp().globalData.userInfo;
  126 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  127 + wx.navigateTo({
  128 + url: '/pages/getphone/getphone',
  129 + })
  130 + return false;
  131 + }
  132 +
123 var th = this; 133 var th = this;
124 th.setData({ 134 th.setData({
125 getActId: options.actId, 135 getActId: options.actId,
pages/giftpack/festival/festival.js
@@ -118,6 +118,15 @@ Page({ @@ -118,6 +118,15 @@ Page({
118 }, 118 },
119 119
120 onLoad: function(options) { 120 onLoad: function(options) {
  121 + //--先判断会员状态--
  122 + var user_info = getApp().globalData.userInfo;
  123 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  124 + wx.navigateTo({
  125 + url: '/pages/getphone/getphone',
  126 + })
  127 + return false;
  128 + }
  129 +
121 var th = this; 130 var th = this;
122 th.setData({ 131 th.setData({
123 getActId: options.actId, 132 getActId: options.actId,
pages/giftpack/giftpacklist/giftpacklist.js
@@ -30,6 +30,15 @@ Page({ @@ -30,6 +30,15 @@ Page({
30 is_lb: 0, //是否有礼包 30 is_lb: 0, //是否有礼包
31 }, 31 },
32 onLoad: function(options) { 32 onLoad: function(options) {
  33 + //--先判断会员状态--
  34 + var user_info = getApp().globalData.userInfo;
  35 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  36 + wx.navigateTo({
  37 + url: '/pages/getphone/getphone',
  38 + })
  39 + return false;
  40 + }
  41 +
33 var th = this; 42 var th = this;
34 th.setData({ 43 th.setData({
35 isBuy: options.isBuy, 44 isBuy: options.isBuy,
pages/giftpack/mygiftpack/mygiftpack.js
@@ -28,6 +28,15 @@ Page({ @@ -28,6 +28,15 @@ Page({
28 }, 28 },
29 29
30 onLoad: function(options) { 30 onLoad: function(options) {
  31 + //--先判断会员状态--
  32 + var user_info = getApp().globalData.userInfo;
  33 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  34 + wx.navigateTo({
  35 + url: '/pages/getphone/getphone',
  36 + })
  37 + return false;
  38 + }
  39 +
31 var th = this; 40 var th = this;
32 th.setData({ 41 th.setData({
33 getStorageID: a.stoid, 42 getStorageID: a.stoid,
pages/giftpack/newvipgift/newvipgift.js
@@ -114,6 +114,14 @@ Page({ @@ -114,6 +114,14 @@ Page({
114 }, 114 },
115 115
116 onLoad: function(options) { 116 onLoad: function(options) {
  117 + //--先判断会员状态--
  118 + var user_info = getApp().globalData.userInfo;
  119 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  120 + wx.navigateTo({
  121 + url: '/pages/getphone/getphone',
  122 + })
  123 + return false;
  124 + }
117 var th = this; 125 var th = this;
118 th.setData({ 126 th.setData({
119 getActId: options.actId, 127 getActId: options.actId,
pages/user/assistance/assistance.js
@@ -34,6 +34,16 @@ Page({ @@ -34,6 +34,16 @@ Page({
34 * 生命周期函数--监听页面加载 34 * 生命周期函数--监听页面加载
35 */ 35 */
36 onLoad: function(options) { 36 onLoad: function(options) {
  37 +
  38 + //--先判断会员状态--
  39 + var user_info = getApp().globalData.userInfo;
  40 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  41 + wx.navigateTo({
  42 + url: '/pages/getphone/getphone',
  43 + })
  44 + return false;
  45 + }
  46 +
37 var th = this; 47 var th = this;
38 var nav_b = th.selectComponent("#nav_b"); //组件的id 48 var nav_b = th.selectComponent("#nav_b"); //组件的id
39 nav_b.set_name("助力", "/pages/user/assistance/assistance"); 49 nav_b.set_name("助力", "/pages/user/assistance/assistance");
@@ -44,6 +54,16 @@ Page({ @@ -44,6 +54,16 @@ Page({
44 * 生命周期函数--监听页面显示 54 * 生命周期函数--监听页面显示
45 */ 55 */
46 onShow: function() { 56 onShow: function() {
  57 +
  58 + //--先判断会员状态--
  59 + var user_info = getApp().globalData.userInfo;
  60 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  61 + wx.navigateTo({
  62 + url: '/pages/getphone/getphone',
  63 + })
  64 + return false;
  65 + }
  66 +
47 var th = this; 67 var th = this;
48 // 助力活动 68 // 助力活动
49 th.assistance(); 69 th.assistance();
pages/user/assistance/friend_assistance.js
@@ -28,6 +28,16 @@ Page({ @@ -28,6 +28,16 @@ Page({
28 * 生命周期函数--监听页面加载 28 * 生命周期函数--监听页面加载
29 */ 29 */
30 onLoad: function(options) { 30 onLoad: function(options) {
  31 +
  32 + //--先判断会员状态--
  33 + var user_info = getApp().globalData.userInfo;
  34 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  35 + wx.navigateTo({
  36 + url: '/pages/getphone/getphone',
  37 + })
  38 + return false;
  39 + }
  40 +
31 var th = this; 41 var th = this;
32 42
33 var nav_b = th.selectComponent("#nav_b"); //组件的id 43 var nav_b = th.selectComponent("#nav_b"); //组件的id
pages/user/assistance/giftpacklist.js
@@ -38,6 +38,16 @@ Page({ @@ -38,6 +38,16 @@ Page({
38 id: "", //一键领取的时候使用 38 id: "", //一键领取的时候使用
39 }, 39 },
40 onLoad: function(options) { 40 onLoad: function(options) {
  41 +
  42 + //--先判断会员状态--
  43 + var user_info = getApp().globalData.userInfo;
  44 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  45 + wx.navigateTo({
  46 + url: '/pages/getphone/getphone',
  47 + })
  48 + return false;
  49 + }
  50 +
41 var th = this; 51 var th = this;
42 if (options.is_libao == 0) { 52 if (options.is_libao == 0) {
43 th.setData({ 53 th.setData({
@@ -67,6 +77,14 @@ Page({ @@ -67,6 +77,14 @@ Page({
67 nav_b.set_name("助力", "/pages/user/assistance/assistance"); 77 nav_b.set_name("助力", "/pages/user/assistance/assistance");
68 }, 78 },
69 onShow: function() { 79 onShow: function() {
  80 + //--先判断会员状态--
  81 + var user_info = getApp().globalData.userInfo;
  82 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  83 + wx.navigateTo({
  84 + url: '/pages/getphone/getphone',
  85 + })
  86 + return false;
  87 + }
70 88
71 }, 89 },
72 //助力活动查看礼包详情调用 90 //助力活动查看礼包详情调用
pages/user/assistance/task_assistance.js
@@ -69,6 +69,14 @@ Page({ @@ -69,6 +69,14 @@ Page({
69 * 生命周期函数--监听页面加载 69 * 生命周期函数--监听页面加载
70 */ 70 */
71 onLoad: function (options) { 71 onLoad: function (options) {
  72 + //--先判断会员状态--
  73 + var user_info = getApp().globalData.userInfo;
  74 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  75 + wx.navigateTo({
  76 + url: '/pages/getphone/getphone',
  77 + })
  78 + return false;
  79 + }
72 var th = this; 80 var th = this;
73 var help_id = options.help_id; 81 var help_id = options.help_id;
74 var nav_b = th.selectComponent("#nav_b"); //组件的id 82 var nav_b = th.selectComponent("#nav_b"); //组件的id
@@ -135,6 +143,16 @@ Page({ @@ -135,6 +143,16 @@ Page({
135 * 生命周期函数--监听页面显示 143 * 生命周期函数--监听页面显示
136 */ 144 */
137 onShow: function () { 145 onShow: function () {
  146 +
  147 + //--先判断会员状态--
  148 + var user_info = getApp().globalData.userInfo;
  149 + if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  150 + wx.navigateTo({
  151 + url: '/pages/getphone/getphone',
  152 + })
  153 + return false;
  154 + }
  155 +
138 this.data.is_timer = 1; 156 this.data.is_timer = 1;
139 var th = this; 157 var th = this;
140 var help_id = th.data.help_id; 158 var help_id = th.data.help_id;